Skip to content

Commit ed98911

Browse files
committed
Docs: Added content + updated formatting
1 parent 6b0886b commit ed98911

File tree

20 files changed

+591
-105
lines changed

20 files changed

+591
-105
lines changed

packages/docs/.vitepress/config.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,22 @@ export default defineConfig({
115115
]
116116
},
117117
]
118-
}
118+
},
119+
{
120+
text: "Functions",
121+
base: "/reference/functions/",
122+
collapsed: false,
123+
items: [
124+
{ text: "Array", link: "/array" },
125+
{ text: "Browser", link: "/browser" },
126+
{ text: "Date", link: "/date" },
127+
{ text: "Math", link: "/math" },
128+
]
129+
},
130+
{
131+
text: "Constants",
132+
link: "constants"
133+
},
119134
]
120135
},
121136
},

packages/docs/.vitepress/theme/style.css

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
:root {
105105
--vp-font-family-base: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
106106
--vp-font-family-mono: "Roboto Mono", source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
107+
--vp-custom-block-font-size: 16px;
107108
}
108109

109110
/**
@@ -256,8 +257,8 @@
256257

257258
--vp-custom-block-details-border: transparent;
258259
--vp-custom-block-details-text: var(--vp-c-text-1);
259-
--vp-custom-block-details-bg: var(--vp-c-default-1);
260-
--vp-custom-block-details-code-bg: var(--vp-c-default-1);
260+
--vp-custom-block-details-bg: var(--vp-c-bg-alt);
261+
--vp-custom-block-details-code-bg: var(--vp-c-bg);
261262
}
262263

263264
/**
@@ -273,6 +274,8 @@
273274
* -------------------------------------------------------------------------- */
274275

275276
.custom-block {
277+
--vp-code-block-bg: var(--vp-c-bg);
278+
276279
border: none;
277280
border-left: 5px solid;
278281
padding: 12px 12px 6px;
@@ -314,12 +317,45 @@
314317
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z'/%3E%3C/svg%3E")
315318
}
316319

317-
.custom-block ul {
318-
margin: 8px 0;
320+
.custom-block.details {
321+
padding: 0;
322+
}
323+
324+
.custom-block.details > summary {
325+
padding: 12px;
326+
margin: 0;
327+
color: var(--vp-c-text-2);
328+
font-weight: 400;
329+
}
330+
331+
.custom-block.details > summary ~ * {
332+
margin-left: 12px !important;
333+
margin-right: 12px !important;
334+
}
335+
336+
.custom-block.details > *:nth-child(2) {
337+
margin-top: 0;
338+
}
339+
340+
.custom-block.details > *:last-child {
341+
margin-bottom: 0;
342+
}
343+
344+
.custom-block.details[open] {
345+
padding-bottom: 16px;
346+
}
347+
348+
.custom-block ul ul {
349+
margin: 0 !important;
319350
}
320351

321352
.custom-block li + li {
322-
margin-top: 4px;
353+
margin-top: 4px !important;
354+
}
355+
356+
li > p {
357+
margin: 0 !important;
358+
line-height: 24px !important;
323359
}
324360

325361
.VPContent.is-home .vp-doc {
@@ -347,4 +383,9 @@
347383

348384
.vp-doc .VPTeamMembers.medium.count-1.center .container {
349385
max-width: 368px !important;
386+
}
387+
388+
.vp-doc img {
389+
border-radius: 8px;
390+
margin: 16px 0;
350391
}
21.3 KB
Loading
21.5 KB
Loading

packages/docs/src/reference/classes/apps/app.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,33 @@ interface WindowOptions {
5353

5454
### name
5555

56+
The display name of this application
57+
5658
- **Type:** `string`
5759
- **Default:** `"App"`
5860

59-
The display name of this application
60-
6161
### id
6262

63+
The unique ID of this application
64+
6365
- **Type:** `string`
6466
- **Default:** `"app"`
6567

66-
The unique ID of this application
67-
6868
> [!WARNING]
6969
> Every app must have a unique ID that only contains lower case letters (a-z), numbers (0-9) and dashes (-).
7070
7171
### windowContent
7272

73-
- **Type:** `React.FC<AppProps>`
74-
7573
React component that renders this app inside a window when the app is running
7674

77-
### windowOptions
75+
- **Type:** `React.FC<AppProps>`
7876

79-
- **Type:** `WindowOptions`
77+
### windowOptions
8078

8179
Default options that get passed to the `windowContent` component
8280

81+
- **Type:** `WindowOptions`
82+
8383
```ts
8484
interface WindowOptions {
8585
size?: Vector2;
@@ -92,120 +92,120 @@ interface WindowOptions {
9292
9393
### description
9494

95-
- **Type:** `string | null`
96-
9795
Description of this application
9896

99-
### iconUrl
100-
10197
- **Type:** `string | null`
10298

103-
URL of the icon of this application
99+
### iconUrl
104100

105-
### role
101+
URL of the icon of this application
106102

107103
- **Type:** `string | null`
108104

109-
Defines what parts of the OS this app is responsible for and how it can be used by other apps
105+
### role
110106

111-
### associatedExtensions
107+
Defines what parts of the OS this app is responsible for and how it can be used by other apps
112108

113109
- **Type:** `string | null`
114110

111+
### associatedExtensions
112+
115113
An array of file extensions that this application is used to open and read
116114

115+
- **Type:** `string | null`
116+
117117
### pinnedByDefault
118118

119+
Determines whether the app is pinned by default
120+
119121
- **Type:** `boolean`
120122
- **Default:** `true`
121123

122-
Determines whether the app is pinned by default
123-
124124
### launchAtStartup
125125

126+
Determines whether the app is launched at startup
127+
126128
- **Type:** `boolean`
127129
- **Default:** `false`
128130

129-
Determines whether the app is launched at startup
130-
131131
## Methods
132132

133133
### setName(name)
134134

135+
Set the display name of this application
136+
135137
- **Parameters**
136138
- **name**
137139
- **Type:** `string`
138140
- **Returns**
139141
- **Type:** `this`
140142

141-
Set the display name of this application
142-
143143
### setDescription(description)
144144

145+
Set the description of this application
146+
145147
- **Parameters**
146148
- **description**
147149
- **Type:** `string`
148150
- **Returns**
149151
- **Type:** `this`
150152

151-
Set the description of this application
152-
153153
### setIconUrl(iconUrl)
154154

155+
Set the URL of the icon of this application
156+
155157
- **Parameters**
156158
- **iconUrl**
157159
- **Type:** `string | null`
158160
- **Returns**
159161
- **Type:** `this`
160162

161-
Set the URL of the icon of this application
162-
163163
### setRole(role)
164164

165+
Set the role of this application
166+
165167
- **Parameters**
166168
- **role**
167169
- **Type:** `string | null`
168170
- **Returns**
169171
- **Type:** `this`
170172

171-
Set the role of this application
172-
173173
### setAssociatedExtensions(extensions)
174174

175+
Set the associated extensions of this application
176+
175177
- **Parameters**
176178
- **extensions**
177179
- **Type:** `string[] | null`
178180
- **Returns**
179181
- **Type:** `this`
180182

181-
Set the associated extensions of this application
182-
183183
### setPinnedByDefault(pinnedByDefault)
184184

185+
Changes whether this application is pinned by default or not
186+
185187
- **Parameters**
186188
- **pinnedByDefault**
187189
- **Type:** `boolean`
188190
- **Returns**
189191
- **Type:** `this`
190192

191-
Changes whether this application is pinned by default or not
192-
193193
### setLaunchAtStartup(launchAtStartup)
194194

195+
Changes whether this application is launched at startup or not
196+
195197
- **Parameters**
196198
- **launchAtStartup**
197199
- **Type:** `boolean`
198200
- **Returns**
199201
- **Type:** `this`
200202

201-
Changes whether this application is launched at startup or not
202-
203203
### WindowContent(props)
204204

205+
Renders the app as a React component
206+
205207
- **Parameters**
206208
- **props**
207209
- **Type:** `AppProps`
208210
- **Returns**
209211
- **Type:** `React.ReactElement`
210-
211-
Renders the app as a React component

0 commit comments

Comments
 (0)