@xyd-js/core 0.0.0-build-56377ca-20251013180714 → 0.0.0-build-1f6458c-20251015205119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,53 +5,58 @@ import type { Theme as SyntaxHighlight } from "@code-hike/lighter";
5
5
  /**
6
6
  * Main settings interface for the application
7
7
  */
8
- export interface Settings {
9
- /** Theme configuration for the application */
10
- theme?: Theme
8
+ export interface Settings {
9
+ /** Theme configuration for the application */
10
+ theme?: Theme;
11
11
 
12
- /** Navigation configuration */
13
- navigation?: Navigation
12
+ /** Navigation configuration */
13
+ navigation?: Navigation;
14
14
 
15
- /** API Docs configuration */
16
- api?: API
15
+ /** API Docs configuration */
16
+ api?: API;
17
17
 
18
- /** Integrations configuration */
19
- integrations?: Integrations
18
+ /** Integrations configuration */
19
+ integrations?: Integrations;
20
20
 
21
- /** Plugins configuration */
22
- plugins?: Plugins
21
+ /** Plugins configuration */
22
+ plugins?: Plugins;
23
23
 
24
- /**
25
- * SEO configuration
26
- */
27
- seo?: SEO
24
+ /**
25
+ * SEO configuration
26
+ */
27
+ seo?: SEO;
28
28
 
29
- /**
30
- * Advanced configuration
31
- */
32
- advanced?: Advanced
29
+ /**
30
+ * AI configuration
31
+ */
32
+ ai?: AI;
33
33
 
34
- /**
35
- * @internal
36
- *
37
- * WebEditor configuration - building blocks for UI editing
38
- */
39
- webeditor?: WebEditor
34
+ /**
35
+ * Advanced configuration
36
+ */
37
+ advanced?: Advanced;
40
38
 
41
- /**
42
- *
43
- * Components configuration
44
- */
45
- components?: Components
39
+ /**
40
+ * @internal
41
+ *
42
+ * WebEditor configuration - building blocks for UI editing
43
+ */
44
+ webeditor?: WebEditor;
46
45
 
47
- /** Engine configuration - advanced engine-like configuration */
48
- engine?: Engine
46
+ /**
47
+ *
48
+ * Components configuration
49
+ */
50
+ components?: Components;
49
51
 
50
- /**
51
- * @internal
52
- * Redirects configuration
53
- */
54
- redirects?: Redirects[]
52
+ /** Engine configuration - advanced engine-like configuration */
53
+ engine?: Engine;
54
+
55
+ /**
56
+ * @internal
57
+ * Redirects configuration
58
+ */
59
+ redirects?: Redirects[];
55
60
  }
56
61
 
57
62
  // ------ START settings for theme START ------
@@ -60,349 +65,352 @@ export interface Settings {
60
65
  * Theme configuration that changes the look and feel of the project
61
66
  */
62
67
  export interface Theme {
63
- /**
64
- * A theme name.
65
- */
66
- readonly name: ThemePresetName | (string & {})
67
-
68
- /**
69
- * Path to logo image or object with path to "light" and "dark" mode logo images, and where the logo links to.
70
- */
71
- logo?: string | Logo | React.JSX.Element
72
-
73
- /**
74
- * Font configuration for the theme.
75
- */
76
- fonts?: ThemeFont
77
-
78
- /**
79
- * Path to the favicon image. For example: /path/to/favicon.svg
80
- */
81
- favicon?: string;
82
-
83
- /**
84
- * The iconify library setup.
85
- */
86
- icons?: Icons
87
-
88
- /**
89
- * Appearance configuration for the theme.
90
- */
91
- appearance?: Appearance
92
-
93
- /**
94
- * Writer configuration for the theme.
95
- */
96
- writer?: Writer
97
-
98
- /**
99
- * Coder configuration for the theme, including options like syntax highlighting.
100
- */
101
- coder?: Coder
102
-
103
- /**
104
- * Head configuration
105
- */
106
- head?: HeadConfig[]
107
-
108
- /**
109
- * Custom scripts to be added to the head of the every page.
110
- * Paths are relative to the root of the project or absolute.
111
- */
112
- scripts?: Script[]
113
- }
114
-
115
- export type ThemeFont = Font | Font[] | {
116
- body?: Font | Font[]
117
- coder?: Font | Font[]
118
- }
68
+ /**
69
+ * A theme name.
70
+ */
71
+ readonly name: ThemePresetName | (string & {});
72
+
73
+ /**
74
+ * Path to logo image or object with path to "light" and "dark" mode logo images, and where the logo links to.
75
+ */
76
+ logo?: string | Logo | React.JSX.Element;
77
+
78
+ /**
79
+ * Font configuration for the theme.
80
+ */
81
+ fonts?: ThemeFont;
82
+
83
+ /**
84
+ * Path to the favicon image. For example: /path/to/favicon.svg
85
+ */
86
+ favicon?: string;
87
+
88
+ /**
89
+ * The iconify library setup.
90
+ */
91
+ icons?: Icons;
92
+
93
+ /**
94
+ * Appearance configuration for the theme.
95
+ */
96
+ appearance?: Appearance;
97
+
98
+ /**
99
+ * Writer configuration for the theme.
100
+ */
101
+ writer?: Writer;
102
+
103
+ /**
104
+ * Coder configuration for the theme, including options like syntax highlighting.
105
+ */
106
+ coder?: Coder;
107
+
108
+ /**
109
+ * Head configuration
110
+ */
111
+ head?: HeadConfig[];
112
+
113
+ /**
114
+ * Custom scripts to be added to the head of the every page.
115
+ * Paths are relative to the root of the project or absolute.
116
+ */
117
+ scripts?: Script[];
118
+ }
119
+
120
+ export type ThemeFont =
121
+ | Font
122
+ | Font[]
123
+ | {
124
+ body?: Font | Font[];
125
+ coder?: Font | Font[];
126
+ };
119
127
  // #endregion Theme
120
128
 
121
129
  export interface Font {
122
- /**
123
- * The font family to use.
124
- */
125
- family?: string;
130
+ /**
131
+ * The font family to use.
132
+ */
133
+ family?: string;
126
134
 
127
- /**
128
- * The font weight to use.
129
- */
130
- weight?: string;
135
+ /**
136
+ * The font weight to use.
137
+ */
138
+ weight?: string;
131
139
 
132
- /**
133
- * The font src to use.
134
- */
135
- src?: string;
140
+ /**
141
+ * The font src to use.
142
+ */
143
+ src?: string;
136
144
 
137
- /**
138
- * The font format to use.
139
- */
140
- format?: "woff2" | "woff" | "ttf"
145
+ /**
146
+ * The font format to use.
147
+ */
148
+ format?: "woff2" | "woff" | "ttf";
141
149
  }
142
150
 
143
151
  /**
144
152
  * Coder configuration for the theme, including options like syntax highlighting.
145
153
  */
146
154
  export interface Coder {
147
- /**
148
- * If `true` then code blocks will have line numbers by default.
149
- */
150
- lines?: boolean
155
+ /**
156
+ * If `true` then code blocks will have line numbers by default.
157
+ */
158
+ lines?: boolean;
151
159
 
152
- /**
153
- * If `true` then code blocks will have a scrollbar by default.
154
- */
155
- scroll?: boolean
160
+ /**
161
+ * If `true` then code blocks will have a scrollbar by default.
162
+ */
163
+ scroll?: boolean;
156
164
 
157
- /**
158
- * Syntax highlighting configuration.
159
- */
160
- syntaxHighlight?: SyntaxHighlight
165
+ /**
166
+ * Syntax highlighting configuration.
167
+ */
168
+ syntaxHighlight?: SyntaxHighlight;
161
169
  }
162
170
 
163
171
  export interface Writer {
164
- /**
165
- * The maximum number of table of conten§ts levels.
166
- */
167
- maxTocDepth?: number
172
+ /**
173
+ * The maximum number of table of conten§ts levels.
174
+ */
175
+ maxTocDepth?: number;
168
176
 
169
- /**
170
- * Copy page button
171
- */
172
- copyPage?: boolean
177
+ /**
178
+ * Copy page button
179
+ */
180
+ copyPage?: boolean;
173
181
  }
174
182
 
175
183
  /**
176
184
  * Appearance configuration for the theme.
177
185
  */
178
186
  export interface Appearance {
179
- /**
180
- * The default color scheme to use.
181
- */
182
- colorScheme?: "light" | "dark" | "os" | false
183
-
184
- /**
185
- * If `false` then the color scheme button will not be displayed.
186
- */
187
- colorSchemeButton?: false
188
-
189
- /**
190
- * Colors configuration for the theme.
191
- */
192
- colors?: Colors
193
-
194
- /**
195
- * CSS tokens for the theme.
196
- */
197
- cssTokens?: { [token: string]: string }
198
-
199
- // TODO: global and theme presets?
200
- /**
201
- * Presets for the theme.
202
- */
203
- presets?: string[]
204
-
205
- /**
206
- * Logo appearance for the theme.
207
- */
208
- logo?: AppearanceLogo
209
-
210
- /**
211
- * Search appearance for the theme.
212
- */
213
- search?: AppearanceSearch
214
-
215
- /**
216
- * Header appearance for the theme.
217
- */
218
- header?: AppearanceHeader
219
-
220
- /**
221
- * Tabs appearance for the theme.
222
- */
223
- tabs?: AppearanceTabs
224
-
225
- /**
226
- * Sidebar appearance for the theme.
227
- */
228
- sidebar?: AppearanceSidebar
229
-
230
- /**
231
- * Buttons appearance for the theme.
232
- */
233
- buttons?: AppearanceButtons
234
-
235
- /**
236
- * Table appearance for the theme.
237
- */
238
- tables?: AppearanceTables
239
-
240
- /**
241
- * Banner appearance for the theme.
242
- */
243
- banner?: AppearanceBanner
244
-
245
- /**
246
- * Content appearance for the theme.
247
- */
248
- content?: AppearanceContent
249
-
250
- /**
251
- * Footer appearance for the theme.
252
- */
253
- footer?: AppearanceFooter
187
+ /**
188
+ * The default color scheme to use.
189
+ */
190
+ colorScheme?: "light" | "dark" | "os" | false;
191
+
192
+ /**
193
+ * If `false` then the color scheme button will not be displayed.
194
+ */
195
+ colorSchemeButton?: false;
196
+
197
+ /**
198
+ * Colors configuration for the theme.
199
+ */
200
+ colors?: Colors;
201
+
202
+ /**
203
+ * CSS tokens for the theme.
204
+ */
205
+ cssTokens?: { [token: string]: string };
206
+
207
+ // TODO: global and theme presets?
208
+ /**
209
+ * Presets for the theme.
210
+ */
211
+ presets?: string[];
212
+
213
+ /**
214
+ * Logo appearance for the theme.
215
+ */
216
+ logo?: AppearanceLogo;
217
+
218
+ /**
219
+ * Search appearance for the theme.
220
+ */
221
+ search?: AppearanceSearch;
222
+
223
+ /**
224
+ * Header appearance for the theme.
225
+ */
226
+ header?: AppearanceHeader;
227
+
228
+ /**
229
+ * Tabs appearance for the theme.
230
+ */
231
+ tabs?: AppearanceTabs;
232
+
233
+ /**
234
+ * Sidebar appearance for the theme.
235
+ */
236
+ sidebar?: AppearanceSidebar;
237
+
238
+ /**
239
+ * Buttons appearance for the theme.
240
+ */
241
+ buttons?: AppearanceButtons;
242
+
243
+ /**
244
+ * Table appearance for the theme.
245
+ */
246
+ tables?: AppearanceTables;
247
+
248
+ /**
249
+ * Banner appearance for the theme.
250
+ */
251
+ banner?: AppearanceBanner;
252
+
253
+ /**
254
+ * Content appearance for the theme.
255
+ */
256
+ content?: AppearanceContent;
257
+
258
+ /**
259
+ * Footer appearance for the theme.
260
+ */
261
+ footer?: AppearanceFooter;
254
262
  }
255
263
 
256
264
  export interface Colors {
257
- /**
258
- * The primary color of the theme.
259
- */
260
- primary: string
265
+ /**
266
+ * The primary color of the theme.
267
+ */
268
+ primary: string;
261
269
 
262
- /**
263
- * The light color of the theme.
264
- */
265
- light?: string
270
+ /**
271
+ * The light color of the theme.
272
+ */
273
+ light?: string;
266
274
 
267
- /**
268
- * The dark color of the theme.
269
- */
270
- dark?: string
275
+ /**
276
+ * The dark color of the theme.
277
+ */
278
+ dark?: string;
271
279
  }
272
280
 
273
281
  export interface AppearanceTabs {
274
- /**
275
- * The tabs to display in the header.
276
- */
277
- surface?: "center" | "sidebar"
282
+ /**
283
+ * The tabs to display in the header.
284
+ */
285
+ surface?: "center" | "sidebar";
278
286
  }
279
287
 
280
288
  /**
281
289
  * AppearanceLogo configuration for the theme.
282
290
  */
283
291
  export interface AppearanceLogo {
284
- /**
285
- * If `true` then the logo will be displayed on the sidebar.
286
- */
287
- sidebar?: boolean | "mobile" | "desktop"
292
+ /**
293
+ * If `true` then the logo will be displayed on the sidebar.
294
+ */
295
+ sidebar?: boolean | "mobile" | "desktop";
288
296
 
289
- /**
290
- * If `true` then the logo will be displayed on the header.
291
- */
292
- header?: boolean | "mobile" | "desktop"
297
+ /**
298
+ * If `true` then the logo will be displayed on the header.
299
+ */
300
+ header?: boolean | "mobile" | "desktop";
293
301
  }
294
302
 
295
303
  export interface AppearanceContent {
296
- /**
297
- * Content decorator for the theme.
298
- */
299
- contentDecorator?: "secondary"
304
+ /**
305
+ * Content decorator for the theme.
306
+ */
307
+ contentDecorator?: "secondary";
300
308
 
301
- /**
302
- * If `true` then the breadcrumbs will be displayed.
303
- */
304
- breadcrumbs?: boolean
309
+ /**
310
+ * If `true` then the breadcrumbs will be displayed.
311
+ */
312
+ breadcrumbs?: boolean;
305
313
 
306
- /**
307
- * If `true` then the section separator will be displayed.
308
- */
309
- sectionSeparator?: boolean;
314
+ /**
315
+ * If `true` then the section separator will be displayed.
316
+ */
317
+ sectionSeparator?: boolean;
310
318
  }
311
319
 
312
320
  export interface AppearanceFooter {
313
- /**
314
- * The footer surface.
315
- */
316
- surface?: "page"
321
+ /**
322
+ * The footer surface.
323
+ */
324
+ surface?: "page";
317
325
  }
318
326
 
319
327
  export interface AppearanceSearch {
320
- /**
321
- * If `true` then the search bar will be displayed as a full width.
322
- */
323
- fullWidth?: boolean
328
+ /**
329
+ * If `true` then the search bar will be displayed as a full width.
330
+ */
331
+ fullWidth?: boolean;
324
332
 
325
- /**
326
- * If `true` then the search bar will be displayed on the sidebar.
327
- */
328
- sidebar?: boolean | "mobile" | "desktop"
333
+ /**
334
+ * If `true` then the search bar will be displayed on the sidebar.
335
+ */
336
+ sidebar?: boolean | "mobile" | "desktop";
329
337
 
330
- /**
331
- * If `true` then the search bar will be displayed in the middle of the header.
332
- */
333
- middle?: boolean | "mobile" | "desktop"
338
+ /**
339
+ * If `true` then the search bar will be displayed in the middle of the header.
340
+ */
341
+ middle?: boolean | "mobile" | "desktop";
334
342
 
335
- /**
336
- * If `true` then the search bar will be displayed on the right side of the header.
337
- */
338
- right?: boolean | "mobile" | "desktop"
343
+ /**
344
+ * If `true` then the search bar will be displayed on the right side of the header.
345
+ */
346
+ right?: boolean | "mobile" | "desktop";
339
347
  }
340
348
 
341
349
  export interface AppearanceHeader {
342
- /**
343
- * If `true` then the header external links will display an external arrow.
344
- */
345
- externalArrow?: boolean
350
+ /**
351
+ * If `true` then the header external links will display an external arrow.
352
+ */
353
+ externalArrow?: boolean;
346
354
 
347
- /**
348
- * If `right` then separator will be displayed on the right side of the header.
349
- */
350
- separator?: "right"
355
+ /**
356
+ * If `right` then separator will be displayed on the right side of the header.
357
+ */
358
+ separator?: "right";
351
359
 
352
- /**
353
- * The type of the header.
354
- */
355
- type?: "classic" | "pad"
360
+ /**
361
+ * The type of the header.
362
+ */
363
+ type?: "classic" | "pad";
356
364
 
357
- /**
358
- * The button size of the header.
359
- */
360
- buttonSize?: "sm" | "md" | "lg"
365
+ /**
366
+ * The button size of the header.
367
+ */
368
+ buttonSize?: "sm" | "md" | "lg";
361
369
  }
362
370
 
363
371
  export interface AppearanceSidebar {
364
- /**
365
- * If `true` then the sidebar will display a scroll shadow.
366
- */
367
- externalArrow?: boolean
372
+ /**
373
+ * If `true` then the sidebar will display a scroll shadow.
374
+ */
375
+ externalArrow?: boolean;
368
376
 
369
- /**
370
- * If `true` then the sidebar will display a scroll shadow.
371
- */
372
- scrollShadow?: boolean
377
+ /**
378
+ * If `true` then the sidebar will display a scroll shadow.
379
+ */
380
+ scrollShadow?: boolean;
373
381
 
374
- /**
375
- * The color of the sidebar scrollbar.
376
- */
377
- scrollbar?: "secondary"
382
+ /**
383
+ * The color of the sidebar scrollbar.
384
+ */
385
+ scrollbar?: "secondary";
378
386
 
379
- /**
380
- * The color of the sidebar scrollbar.
381
- */
382
- scrollbarColor?: string
387
+ /**
388
+ * The color of the sidebar scrollbar.
389
+ */
390
+ scrollbarColor?: string;
383
391
 
384
- /**
385
- * The transition behaviour of the sidebar scroll when navigating to a new page.
386
- */
387
- scrollTransition?: "smooth" | "instant"
392
+ /**
393
+ * The transition behaviour of the sidebar scroll when navigating to a new page.
394
+ */
395
+ scrollTransition?: "smooth" | "instant";
388
396
  }
389
397
 
390
398
  export interface AppearanceButtons {
391
- rounded?: boolean | "lg" | "md" | "sm"
399
+ rounded?: boolean | "lg" | "md" | "sm";
392
400
  }
393
401
 
394
402
  export interface AppearanceTables {
395
- /**
396
- * The kind of the table.
397
- */
398
- kind?: "secondary"
403
+ /**
404
+ * The kind of the table.
405
+ */
406
+ kind?: "secondary";
399
407
  }
400
408
 
401
409
  export interface AppearanceBanner {
402
- /**
403
- * If `true` then the banner will have fixed position (always visible).
404
- */
405
- fixed?: boolean
410
+ /**
411
+ * If `true` then the banner will have fixed position (always visible).
412
+ */
413
+ fixed?: boolean;
406
414
  }
407
415
 
408
416
  /**
@@ -411,120 +419,124 @@ export interface AppearanceBanner {
411
419
  *
412
420
  * @example: ['script', { src: 'https://example.com/script.js', defer: true }]
413
421
  */
414
- export type HeadConfig =
415
- | [string, Record<string, string | boolean>, string?]
422
+ export type HeadConfig = [string, Record<string, string | boolean>, string?];
416
423
 
417
- export type Script = string
424
+ export type Script = string;
418
425
 
419
426
  /**
420
427
  * Logo configuration interface
421
428
  */
422
429
  export interface Logo {
423
- /** Path to the logo in light mode. For example: `/path/to/logo.svg` */
424
- light?: string;
430
+ /** Path to the logo in light mode. For example: `/path/to/logo.svg` */
431
+ light?: string;
425
432
 
426
- /** Path to the logo in dark mode. For example: `/path/to/logo.svg` */
427
- dark?: string;
433
+ /** Path to the logo in dark mode. For example: `/path/to/logo.svg` */
434
+ dark?: string;
428
435
 
429
- /** External href to when clicking on the logo */
430
- href?: string;
436
+ /** External href to when clicking on the logo */
437
+ href?: string;
431
438
 
432
- /** The page to link to when clicking on the logo */
433
- page?: string
439
+ /** The page to link to when clicking on the logo */
440
+ page?: string;
434
441
  }
435
442
 
436
443
  export interface IconLibrary {
437
- /** The iconify library name */
438
- name: string
444
+ /** The iconify library name */
445
+ name: string;
439
446
 
440
- /** The iconify library version */
441
- version?: string
447
+ /** The iconify library version */
448
+ version?: string;
442
449
 
443
- /** The default iconify icon name */
444
- default?: boolean
450
+ /** The default iconify icon name */
451
+ default?: boolean;
445
452
 
446
- /** Merge icons from the library into the default iconify library */
447
- noprefix?: boolean
453
+ /** Merge icons from the library into the default iconify library */
454
+ noprefix?: boolean;
448
455
  }
449
456
 
450
457
  export interface Icons {
451
- /** The iconify library */
452
- library?: string | IconLibrary | (string | IconLibrary)[]
458
+ /** The iconify library */
459
+ library?: string | IconLibrary | (string | IconLibrary)[];
453
460
  }
454
461
 
455
462
  /** Available theme preset names */
456
- export type ThemePresetName = "poetry" | "cosmo" | "opener" | "picasso" | "gusto" | "solar"
463
+ export type ThemePresetName =
464
+ | "poetry"
465
+ | "cosmo"
466
+ | "opener"
467
+ | "picasso"
468
+ | "gusto"
469
+ | "solar";
457
470
 
458
471
  /** Search bar location options */
459
- export type SearchType = "side" | "top"
472
+ export type SearchType = "side" | "top";
460
473
 
461
474
  // ------ END settings for theme END ------
462
475
 
463
-
464
476
  // ------ START settings for navigation START ------
465
477
  /**
466
478
  * Navigation configuration interface
467
479
  */
468
480
  export interface Navigation {
469
- /**
470
- * Sidebar navigation - main navigation on the left side of the page.
471
- */
472
- sidebar: SidebarNavigation
481
+ /**
482
+ * Sidebar navigation - main navigation on the left side of the page.
483
+ */
484
+ sidebar: SidebarNavigation;
473
485
 
474
- /**
475
- * Tabs navigation - navigation through tabs.
476
- */
477
- tabs?: Tabs
486
+ /**
487
+ * Tabs navigation - navigation through tabs.
488
+ */
489
+ tabs?: Tabs;
478
490
 
479
- /**
480
- * Sidebar dropdown navigation - navigation through dropdown in the sidebar.
481
- */
482
- sidebarDropdown?: SidebarDropdown
491
+ /**
492
+ * Sidebar dropdown navigation - navigation through dropdown in the sidebar.
493
+ */
494
+ sidebarDropdown?: SidebarDropdown;
483
495
 
484
- /**
485
- * Segments navigation - navigation elements visible only on specific routes.
486
- */
487
- segments?: Segment[]
496
+ /**
497
+ * Segments navigation - navigation elements visible only on specific routes.
498
+ */
499
+ segments?: Segment[];
488
500
 
489
- /**
490
- * Anchors navigation - fixed navigation, for anchor-like elements.
491
- */
492
- anchors?: Anchors
501
+ /**
502
+ * Anchors navigation - fixed navigation, for anchor-like elements.
503
+ */
504
+ anchors?: Anchors;
493
505
 
494
- /**
495
- * Array of version names. Only use this if you want to show different versions of docs
496
- * with a dropdown in the navigation bar.
497
- */
498
- // versions?: string[]
506
+ /**
507
+ * Array of version names. Only use this if you want to show different versions of docs
508
+ * with a dropdown in the navigation bar.
509
+ */
510
+ // versions?: string[]
499
511
  }
500
512
 
501
- export type SidebarDropdown = NavigationItem[]
513
+ export type SidebarDropdown = NavigationItem[];
502
514
 
503
515
  /**
504
516
  * Tabs configuration
505
517
  */
506
- export type Tabs = NavigationItem[]
518
+ export type Tabs = NavigationItem[];
507
519
 
508
520
  /**
509
521
  * Sidebar navigation type
510
522
  */
511
- export type SidebarNavigation = (SidebarRoute | Sidebar | string)[]
523
+ export type SidebarNavigation = (SidebarRoute | Sidebar | string)[];
512
524
 
513
525
  /**
514
526
  * Sidebar route configuration
515
527
  */
516
528
  export interface SidebarRoute {
517
- /** Route for this sidebar */
518
- route: string
529
+ /** Route for this sidebar */
530
+ route: string;
519
531
 
520
- /** The group of the route */
521
- group?: string | false
532
+ /** The group of the route */
533
+ group?: string | false;
522
534
 
523
- /** The id of the route */
524
- id?: string
535
+ /** The id of the route */
536
+ id?: string;
525
537
 
526
- /** Sidebar pages within this route or sub routes */
527
- pages: Sidebar[] | SidebarRoute[]
538
+ /** Sidebar pages within this route or sub routes */
539
+ pages: Sidebar[] | SidebarRoute[];
528
540
  }
529
541
 
530
542
  // TODO: rename to NavigationGroup ?
@@ -533,36 +545,32 @@ export interface SidebarRoute {
533
545
  * Sidebar configuration
534
546
  */
535
547
  export interface Sidebar {
536
- /** The name of the group */
537
- group?: string | false
548
+ /** The name of the group */
549
+ group?: string | false;
538
550
 
539
- /**
540
- * The relative paths to the markdown files that will serve as pages.
541
- * Note: groups are recursive, so to add a sub-folder add another group object in the page array.
542
- */
543
- pages?: PageURL[]
551
+ /**
552
+ * The relative paths to the markdown files that will serve as pages.
553
+ * Note: groups are recursive, so to add a sub-folder add another group object in the page array.
554
+ */
555
+ pages?: PageURL[];
544
556
 
545
- /**
546
- * The icon of the group.
547
- */
548
- icon?: string
557
+ /**
558
+ * The icon of the group.
559
+ */
560
+ icon?: string;
549
561
 
550
- /**
551
- * The order of the group.
552
- */
553
- order?: Order
562
+ /**
563
+ * The order of the group.
564
+ */
565
+ order?: Order;
554
566
  }
555
567
 
556
- type Order =
557
- | 0
558
- | -1
559
- | { after: string }
560
- | { before: string };
568
+ type Order = 0 | -1 | { after: string } | { before: string };
561
569
 
562
570
  /**
563
571
  * Page URL type
564
572
  */
565
- export type PageURL = string | VirtualPage | Sidebar
573
+ export type PageURL = string | VirtualPage | Sidebar;
566
574
 
567
575
  /**
568
576
  * @internal
@@ -581,124 +589,128 @@ export type PageURL = string | VirtualPage | Sidebar
581
589
  *
582
590
  * above will be rendered as docs/rest/todo.md using composition from xyd's `.content`
583
591
  */
584
- export type VirtualPage = string | {
585
- /** The virtual page to use for the page */
586
- virtual: string
592
+ export type VirtualPage =
593
+ | string
594
+ | {
595
+ /** The virtual page to use for the page */
596
+ virtual: string;
587
597
 
588
- /** The page to use for the page */
589
- page: string
598
+ /** The page to use for the page */
599
+ page: string;
590
600
 
591
- /** The template to use for the page */
592
- templates?: string | string[]
593
- }
601
+ /** The template to use for the page */
602
+ templates?: string | string[];
603
+ };
594
604
 
595
605
  /**
596
606
  * Segment configuration
597
607
  */
598
608
  export interface Segment {
599
- /** Route for this segment */
600
- route: string
609
+ /** Route for this segment */
610
+ route: string;
601
611
 
602
- /** Title of this segment */
603
- title?: string
612
+ /** Title of this segment */
613
+ title?: string;
604
614
 
605
- /** Appearance of this segment. If 'sidebarDropdown' then show this segment as a dropdown in the sidebar if match. */
606
- appearance?: "sidebarDropdown"
615
+ /** Appearance of this segment. If 'sidebarDropdown' then show this segment as a dropdown in the sidebar if match. */
616
+ appearance?: "sidebarDropdown";
607
617
 
608
- /** Items within this segment */
609
- pages: NavigationItem[]
618
+ /** Items within this segment */
619
+ pages: NavigationItem[];
610
620
  }
611
621
 
612
622
  /**
613
623
  * Core interface for navigation items
614
624
  */
615
625
  export interface NavigationItem {
616
- /**
617
- * The navigation item title
618
- */
619
- title?: string
626
+ /**
627
+ * The navigation item title
628
+ */
629
+ title?: string;
620
630
 
621
- /**
622
- * The navigation item description
623
- */
624
- description?: string
631
+ /**
632
+ * The navigation item description
633
+ */
634
+ description?: string;
625
635
 
626
- /**
627
- * The navigation page, if set it redirects to the page + matches based on routing
628
- */
629
- page?: string
636
+ /**
637
+ * The navigation page, if set it redirects to the page + matches based on routing
638
+ */
639
+ page?: string;
630
640
 
631
- /**
632
- * The navigation href, if set it redirects but does not match based on routing
633
- */
634
- href?: string
641
+ /**
642
+ * The navigation href, if set it redirects but does not match based on routing
643
+ */
644
+ href?: string;
635
645
 
636
- /**
637
- * The navigation item icon
638
- */
639
- icon?: string | React.ReactNode
646
+ /**
647
+ * The navigation item icon
648
+ */
649
+ icon?: string | React.ReactNode;
640
650
  }
641
651
 
642
652
  export type NavigationItemButton = NavigationItem & {
643
- button: "primary" | "secondary"
644
- }
653
+ button: "primary" | "secondary";
654
+ };
645
655
 
646
656
  export type NavigationItemSocial = NavigationItem & {
647
- social: Social
648
- }
649
-
657
+ social: Social;
658
+ };
650
659
 
651
660
  /**
652
661
  * Anchor root configuration
653
662
  */
654
663
  export interface Anchors {
655
- /** Header anchors */
656
- header?: AnchorHeader[]
664
+ /** Header anchors */
665
+ header?: AnchorHeader[];
657
666
 
658
- /** Sidebar anchors */
659
- sidebar?: {
660
- top?: NavigationItem[]
667
+ /** Sidebar anchors */
668
+ sidebar?: {
669
+ top?: NavigationItem[];
661
670
 
662
- bottom?: NavigationItem[]
663
- }
671
+ bottom?: NavigationItem[];
672
+ };
664
673
  }
665
674
 
666
675
  // TODO: in the future
667
676
  type AnchorHeaderGithub = {
668
- githubUrl: string
669
- }
677
+ githubUrl: string;
678
+ };
670
679
 
671
- export type AnchorHeader = NavigationItem | NavigationItemButton | NavigationItemSocial
680
+ export type AnchorHeader =
681
+ | NavigationItem
682
+ | NavigationItemButton
683
+ | NavigationItemSocial;
672
684
 
673
685
  // ------ END settings for navigation END ------
674
686
 
675
-
676
687
  // ------ START settings for webeditor START ------
677
688
  /**
678
689
  * WebEditor navigation item configuration
679
690
  */
680
- export type WebEditorNavigationItem = NavigationItem & Partial<JSONComponent> & {
691
+ export type WebEditorNavigationItem = NavigationItem &
692
+ Partial<JSONComponent> & {
681
693
  /**
682
694
  * If `true` then the item will be displayed on mobile.
683
695
  */
684
- mobile?: boolean
696
+ mobile?: boolean;
685
697
 
686
698
  /**
687
699
  * If `true` then the item will be displayed on desktop.
688
700
  */
689
- desktop?: boolean
690
- }
701
+ desktop?: boolean;
702
+ };
691
703
 
692
704
  export interface Components {
693
- /**
694
- * WebEditor banner configuration
695
- */
696
- banner?: WebEditorBanner
705
+ /**
706
+ * WebEditor banner configuration
707
+ */
708
+ banner?: WebEditorBanner;
697
709
 
698
- /**
699
- * WebEditor footer configuration
700
- */
701
- footer?: WebEditorFooter
710
+ /**
711
+ * WebEditor footer configuration
712
+ */
713
+ footer?: WebEditorFooter;
702
714
  }
703
715
 
704
716
  // TODO: webeditor appearance?
@@ -706,152 +718,166 @@ export interface Components {
706
718
  * WebEditor configuration
707
719
  */
708
720
  export interface WebEditor {
709
- /**
710
- * WebEditor header configuration
711
- */
712
- sidebarTop?: WebEditorNavigationItem[]
713
-
714
- /**
715
- * WebEditor header configuration
716
- */
717
- header?: WebEditorHeader[]
718
-
719
- /**
720
- * WebEditor header configuration
721
- */
722
- subheader?: WebEditorSubHeader
723
- }
724
-
725
- export type Social = "x" | "facebook" | "youtube" | "discord" | "slack" | "github" | "linkedin" | "instagram" | "hackernews" | "medium" | "telegram" | "bluesky" | "reddit"
721
+ /**
722
+ * WebEditor header configuration
723
+ */
724
+ sidebarTop?: WebEditorNavigationItem[];
725
+
726
+ /**
727
+ * WebEditor header configuration
728
+ */
729
+ header?: WebEditorHeader[];
730
+
731
+ /**
732
+ * WebEditor header configuration
733
+ */
734
+ subheader?: WebEditorSubHeader;
735
+ }
736
+
737
+ export type Social =
738
+ | "x"
739
+ | "facebook"
740
+ | "youtube"
741
+ | "discord"
742
+ | "slack"
743
+ | "github"
744
+ | "linkedin"
745
+ | "instagram"
746
+ | "hackernews"
747
+ | "medium"
748
+ | "telegram"
749
+ | "bluesky"
750
+ | "reddit";
726
751
 
727
752
  export interface WebEditorFooter {
728
- kind?: "minimal"
753
+ kind?: "minimal";
729
754
 
730
- logo?: boolean | ComponentLike
755
+ logo?: boolean | ComponentLike;
731
756
 
732
- /** Footer socials */
733
- social?: {
734
- [K in Social]?: string
735
- }
736
- /** Footer links */
737
- links?: WebEditorFooterLinks
757
+ /** Footer socials */
758
+ social?: {
759
+ [K in Social]?: string;
760
+ };
761
+ /** Footer links */
762
+ links?: WebEditorFooterLinks;
738
763
 
739
- /** Footer footnote */
740
- footnote?: ComponentLike
764
+ /** Footer footnote */
765
+ footnote?: ComponentLike;
741
766
  }
742
767
 
743
- export type WebEditorFooterLinks = WebEditorFooterLink[] | WebEditorFooterLinkItem[]
768
+ export type WebEditorFooterLinks =
769
+ | WebEditorFooterLink[]
770
+ | WebEditorFooterLinkItem[];
744
771
 
745
772
  export interface WebEditorFooterLink {
746
- header: string
747
- items: WebEditorFooterLinkItem[]
773
+ header: string;
774
+ items: WebEditorFooterLinkItem[];
748
775
  }
749
776
 
750
777
  export type WebEditorFooterLinkItem = {
751
- label: string
752
- href: string
753
- }
778
+ label: string;
779
+ href: string;
780
+ };
754
781
 
755
782
  export interface WebEditorBanner {
756
- /**
757
- * Banner content.
758
- */
759
- content: ComponentLike
783
+ /**
784
+ * Banner content.
785
+ */
786
+ content: ComponentLike;
760
787
 
761
- /**
762
- * Banner label.
763
- */
764
- label?: string
788
+ /**
789
+ * Banner label.
790
+ */
791
+ label?: string;
765
792
 
766
- /**
767
- * Banner kind.
768
- */
769
- kind?: "secondary"
793
+ /**
794
+ * Banner kind.
795
+ */
796
+ kind?: "secondary";
770
797
 
771
- /**
772
- * Banner href.
773
- */
774
- href?: string
798
+ /**
799
+ * Banner href.
800
+ */
801
+ href?: string;
775
802
 
776
- /**
777
- * Banner icon.
778
- */
779
- icon?: string
803
+ /**
804
+ * Banner icon.
805
+ */
806
+ icon?: string;
780
807
 
781
- // /**
782
- // * Banner store. TODO: in the future
783
- // */
784
- // store?: number
808
+ // /**
809
+ // * Banner store. TODO: in the future
810
+ // */
811
+ // store?: number
785
812
  }
786
813
 
787
814
  /**
788
815
  * WebEditor header configuration
789
816
  */
790
817
  export type WebEditorHeader = WebEditorNavigationItem & {
791
- /** Float the header to the right */
792
- float?: "right" | "center"
793
- }
818
+ /** Float the header to the right */
819
+ float?: "right" | "center";
820
+ };
794
821
 
795
822
  /**
796
823
  * WebEditorSubHeader header configuration
797
824
  */
798
825
  export interface WebEditorSubHeader {
799
- /** Items of this subheader */
800
- items: WebEditorNavigationItem[]
826
+ /** Items of this subheader */
827
+ items: WebEditorNavigationItem[];
801
828
 
802
- /** Title of this segment */
803
- title?: string
829
+ /** Title of this segment */
830
+ title?: string;
804
831
  }
805
832
 
806
833
  // ------ END settings for webeditor END ------
807
834
 
808
-
809
835
  // ------ START settings for API START ------
810
836
  /**
811
837
  * API Docs configuration interface
812
838
  */
813
839
  export interface API {
814
- /**
815
- * OpenAPI configuration
816
- */
817
- openapi?: APIFile
840
+ /**
841
+ * OpenAPI configuration
842
+ */
843
+ openapi?: APIFile;
818
844
 
819
- /**
820
- * GraphQL configuration
821
- */
822
- graphql?: APIFile
845
+ /**
846
+ * GraphQL configuration
847
+ */
848
+ graphql?: APIFile;
823
849
 
824
- /**
825
- * Sources configuration
826
- */
827
- sources?: APIFile
850
+ /**
851
+ * Sources configuration
852
+ */
853
+ sources?: APIFile;
828
854
  }
829
855
 
830
856
  /**
831
857
  * API file configuration. Can be a path, an array of paths, a map of paths, or an advanced configuration
832
858
  */
833
- export type APIFile = string | string[] | APIFileMap | APIFileAdvanced
859
+ export type APIFile = string | string[] | APIFileMap | APIFileAdvanced;
834
860
 
835
861
  /**
836
862
  * API file map type
837
863
  */
838
864
  export type APIFileMap = {
839
- [name: string]: string | APIFileAdvanced
840
- }
865
+ [name: string]: string | APIFileAdvanced;
866
+ };
841
867
 
842
868
  /**
843
869
  * API file advanced type
844
870
  */
845
871
  export type APIFileAdvanced = {
846
- /** Source configuration */
847
- source: string
872
+ /** Source configuration */
873
+ source: string;
848
874
 
849
- /** Route configuration */
850
- route?: string
875
+ /** Route configuration */
876
+ route?: string;
851
877
 
852
- /** API information configuration */
853
- info?: APIInfo
854
- }
878
+ /** API information configuration */
879
+ info?: APIInfo;
880
+ };
855
881
 
856
882
  /**
857
883
  * API file type - can be a string, array of strings, or a map of strings
@@ -861,115 +887,114 @@ export type APIFileAdvanced = {
861
887
  * API information configuration
862
888
  */
863
889
  export interface APIInfo {
864
- /**
865
- * The base url for all API endpoints. If baseUrl is an array, it will enable
866
- * for multiple base url options that the user can toggle.
867
- */
868
- baseUrl?: string
890
+ /**
891
+ * The base url for all API endpoints. If baseUrl is an array, it will enable
892
+ * for multiple base url options that the user can toggle.
893
+ */
894
+ baseUrl?: string;
869
895
 
870
- /** Authentication information */
871
- auth?: APIAuth
896
+ /** Authentication information */
897
+ auth?: APIAuth;
872
898
 
873
- /**
874
- * The name of the authentication parameter used in the API playground.
875
- * If method is basic, the format should be [usernameName]:[passwordName]
876
- */
877
- name?: string
899
+ /**
900
+ * The name of the authentication parameter used in the API playground.
901
+ * If method is basic, the format should be [usernameName]:[passwordName]
902
+ */
903
+ name?: string;
878
904
 
879
- /**
880
- * The default value that's designed to be a prefisx for the authentication input field.
881
- * E.g. If an inputPrefix of AuthKey would inherit the default input result of the authentication field as AuthKey.
882
- */
883
- inputPrefix?: string
905
+ /**
906
+ * The default value that's designed to be a prefisx for the authentication input field.
907
+ * E.g. If an inputPrefix of AuthKey would inherit the default input result of the authentication field as AuthKey.
908
+ */
909
+ inputPrefix?: string;
884
910
 
885
- /** Request configuration */
886
- request?: APIInfoRequest
911
+ /** Request configuration */
912
+ request?: APIInfoRequest;
887
913
  }
888
914
 
889
915
  /**
890
916
  * API authentication configuration
891
917
  */
892
918
  export interface APIAuth {
893
- /** The authentication strategy used for all API endpoints */
894
- method: "bearer" | "basic" | "key"
919
+ /** The authentication strategy used for all API endpoints */
920
+ method: "bearer" | "basic" | "key";
895
921
  }
896
922
 
897
923
  /**
898
924
  * API request configuration
899
925
  */
900
926
  export interface APIInfoRequest {
901
- /** Configurations for the auto-generated API request examples */
902
- example?: {
903
- /**
904
- * An array of strings that determine the order of the languages of the auto-generated request examples.
905
- * You can either define custom languages utilizing x-codeSamples or use our default languages which include
906
- * bash, python, javascript, php, go, java
907
- */
908
- languages?: string[]
909
- }
927
+ /** Configurations for the auto-generated API request examples */
928
+ example?: {
929
+ /**
930
+ * An array of strings that determine the order of the languages of the auto-generated request examples.
931
+ * You can either define custom languages utilizing x-codeSamples or use our default languages which include
932
+ * bash, python, javascript, php, go, java
933
+ */
934
+ languages?: string[];
935
+ };
910
936
  }
911
937
 
912
938
  // ------ END settings for API END ------
913
939
 
914
-
915
940
  // ------ START settings for integrations START ------
916
941
  /**
917
942
  * Integrations configuration
918
943
  */
919
944
  export interface Integrations {
920
- /**
921
- * Configurations to add third-party analytics integrations.
922
- * See full list of supported analytics here.
923
- */
924
- analytics?: IntegrationAnalytics
925
-
926
- /**
927
- * Configurations to add third-party support integrations.
928
- */
929
- support?: IntegrationSupport
930
-
931
- /**
932
- * Configurations to add third-party search integrations.
933
- * See full list of supported search here.
934
- */
935
- search?: IntegrationSearch
936
-
937
- /**
938
- * A/B testing configuration
939
- */
940
- abtesting?: IntegrationABTesting
941
-
942
- /**
943
- * Diagrams configuration
944
- */
945
- diagrams?: boolean
946
-
947
- /**
948
- * Edit link configuration
949
- */
950
- editLink?: EditLink
951
-
952
- /**
953
- * Custom apps directory.
954
- */
955
- [".apps"]?: AppsDirectory
945
+ /**
946
+ * Configurations to add third-party analytics integrations.
947
+ * See full list of supported analytics here.
948
+ */
949
+ analytics?: IntegrationAnalytics;
950
+
951
+ /**
952
+ * Configurations to add third-party support integrations.
953
+ */
954
+ support?: IntegrationSupport;
955
+
956
+ /**
957
+ * Configurations to add third-party search integrations.
958
+ * See full list of supported search here.
959
+ */
960
+ search?: IntegrationSearch;
961
+
962
+ /**
963
+ * A/B testing configuration
964
+ */
965
+ abtesting?: IntegrationABTesting;
966
+
967
+ /**
968
+ * Diagrams configuration
969
+ */
970
+ diagrams?: boolean;
971
+
972
+ /**
973
+ * Edit link configuration
974
+ */
975
+ editLink?: EditLink;
976
+
977
+ /**
978
+ * Custom apps directory.
979
+ */
980
+ [".apps"]?: AppsDirectory;
956
981
  }
957
982
 
958
983
  export interface EditLink {
959
- /**
960
- * The base URL for the edit link
961
- */
962
- baseUrl: string
984
+ /**
985
+ * The base URL for the edit link
986
+ */
987
+ baseUrl: string;
963
988
 
964
- /**
965
- * The title for the edit link
966
- */
967
- title?: string
989
+ /**
990
+ * The title for the edit link
991
+ */
992
+ title?: string;
968
993
 
969
- /**
970
- * The icon for the edit link
971
- */
972
- icon?: string
994
+ /**
995
+ * The icon for the edit link
996
+ */
997
+ icon?: string;
973
998
  }
974
999
 
975
1000
  // #region IntegrationAnalytics
@@ -977,16 +1002,16 @@ export interface EditLink {
977
1002
  * Analytics configuration
978
1003
  */
979
1004
  export interface IntegrationAnalytics {
980
- /** LiveSession analytics configuration */
981
- livesession?: IntegrationAnalyticsLiveSession
1005
+ /** LiveSession analytics configuration */
1006
+ livesession?: IntegrationAnalyticsLiveSession;
982
1007
  }
983
1008
 
984
1009
  /**
985
1010
  * LiveSession analytics configuration
986
- */
1011
+ */
987
1012
  export interface IntegrationAnalyticsLiveSession {
988
- /** LiveSession's TrackID */
989
- trackId: string
1013
+ /** LiveSession's TrackID */
1014
+ trackId: string;
990
1015
  }
991
1016
  // #endregion IntegrationAnalytics
992
1017
 
@@ -994,176 +1019,178 @@ export interface IntegrationAnalyticsLiveSession {
994
1019
  * Support configuration
995
1020
  */
996
1021
  export interface IntegrationSupport {
997
- /** Chatwoot support configuration */
998
- chatwoot?: IntegrationSupportChatwoot
1022
+ /** Chatwoot support configuration */
1023
+ chatwoot?: IntegrationSupportChatwoot;
999
1024
 
1000
- /** Intercom support configuration */
1001
- intercom?: IntegrationSupportIntercom
1025
+ /** Intercom support configuration */
1026
+ intercom?: IntegrationSupportIntercom;
1002
1027
 
1003
- /** Livechat support configuration */
1004
- livechat?: IntegrationSupportLivechat
1028
+ /** Livechat support configuration */
1029
+ livechat?: IntegrationSupportLivechat;
1005
1030
  }
1006
1031
 
1007
1032
  /**
1008
1033
  * Chatwoot support configuration
1009
1034
  */
1010
1035
  export interface IntegrationSupportChatwoot {
1011
- /** Chatwoot website token */
1012
- websiteToken: string
1036
+ /** Chatwoot website token */
1037
+ websiteToken: string;
1013
1038
 
1014
- /** Chatwoot base URL */
1015
- baseURL?: string
1039
+ /** Chatwoot base URL */
1040
+ baseURL?: string;
1016
1041
 
1017
- /** Chatwoot settings */
1018
- chatwootSettings?: JSON
1042
+ /** Chatwoot settings */
1043
+ chatwootSettings?: JSON;
1019
1044
  }
1020
1045
 
1021
1046
  /**
1022
1047
  * Intercom support configuration
1023
1048
  */
1024
1049
  export interface IntegrationSupportIntercom {
1025
- /** Intercom app ID */
1026
- appId: string
1050
+ /** Intercom app ID */
1051
+ appId: string;
1027
1052
 
1028
- /** Intercom API base */
1029
- apiBase?: string
1053
+ /** Intercom API base */
1054
+ apiBase?: string;
1030
1055
  }
1031
1056
 
1032
1057
  export interface IntegrationSupportLivechat {
1033
- /** Livechat license ID */
1034
- licenseId: string
1058
+ /** Livechat license ID */
1059
+ licenseId: string;
1035
1060
  }
1036
1061
 
1037
1062
  /**
1038
1063
  * Search configuration
1039
1064
  */
1040
1065
  export interface IntegrationSearch {
1041
- /** Algolia search configuration */
1042
- algolia?: {
1043
- /** Algolia application ID */
1044
- appId: string
1066
+ /** Algolia search configuration */
1067
+ algolia?: {
1068
+ /** Algolia application ID */
1069
+ appId: string;
1045
1070
 
1046
- /** Algolia API key */
1047
- apiKey: string
1048
- }
1071
+ /** Algolia API key */
1072
+ apiKey: string;
1073
+ };
1049
1074
 
1050
- orama?: {
1075
+ orama?:
1076
+ | {
1051
1077
  /** Orama endpoint */
1052
- endpoint: string
1078
+ endpoint: string;
1053
1079
 
1054
1080
  /** Orama API key */
1055
- apiKey: string
1081
+ apiKey: string;
1056
1082
 
1057
1083
  /** Orama suggestions */
1058
- suggestions?: string[]
1059
- } | boolean
1084
+ suggestions?: string[];
1085
+ }
1086
+ | boolean;
1060
1087
  }
1061
1088
 
1062
1089
  /**
1063
1090
  * A/B testing configuration
1064
1091
  */
1065
1092
  export interface IntegrationABTesting {
1066
- /**
1067
- * Context max age in milliseconds
1068
- */
1069
- contextMaxAge?: number
1093
+ /**
1094
+ * Context max age in milliseconds
1095
+ */
1096
+ contextMaxAge?: number;
1070
1097
 
1071
- /**
1072
- * Context storage key used to store the context in the browser storage
1073
- */
1074
- contextStorageKey?: string
1098
+ /**
1099
+ * Context storage key used to store the context in the browser storage
1100
+ */
1101
+ contextStorageKey?: string;
1075
1102
 
1076
- /**
1077
- * Providers configuration
1078
- */
1079
- providers?: IntegrationABTestingProviders
1103
+ /**
1104
+ * Providers configuration
1105
+ */
1106
+ providers?: IntegrationABTestingProviders;
1080
1107
  }
1081
1108
 
1082
1109
  export interface IntegrationABTestingProviders {
1083
- /**
1084
- * GrowthBook configuration
1085
- */
1086
- growthbook?: IntegrationABTestingGrowthBook
1110
+ /**
1111
+ * GrowthBook configuration
1112
+ */
1113
+ growthbook?: IntegrationABTestingGrowthBook;
1087
1114
 
1088
- /**
1089
- * LaunchDarkly configuration
1090
- */
1091
- launchdarkly?: IntegrationABTestingLaunchDarkly
1115
+ /**
1116
+ * LaunchDarkly configuration
1117
+ */
1118
+ launchdarkly?: IntegrationABTestingLaunchDarkly;
1092
1119
  }
1093
1120
 
1094
1121
  export interface IntegrationABTestingGrowthBook {
1095
- /**
1096
- * GrowthBook API host
1097
- */
1098
- apiHost: string
1122
+ /**
1123
+ * GrowthBook API host
1124
+ */
1125
+ apiHost: string;
1099
1126
 
1100
- /**
1101
- * GrowthBook client key
1102
- */
1103
- clientKey: string
1127
+ /**
1128
+ * GrowthBook client key
1129
+ */
1130
+ clientKey: string;
1104
1131
  }
1105
1132
 
1106
1133
  export interface IntegrationABTestingLaunchDarkly {
1107
- /**
1108
- * LaunchDarkly environment key
1109
- */
1110
- env: string
1134
+ /**
1135
+ * LaunchDarkly environment key
1136
+ */
1137
+ env: string;
1111
1138
  }
1112
1139
 
1113
1140
  export interface AppsDirectory {
1114
- /**
1115
- * Github star app configuration.
1116
- */
1117
- githubStar?: IntegrationAppGithubStar
1141
+ /**
1142
+ * Github star app configuration.
1143
+ */
1144
+ githubStar?: IntegrationAppGithubStar;
1118
1145
 
1119
- /**
1120
- * Supademo app configuration.
1121
- */
1122
- supademo?: IntegrationAppSupademo
1146
+ /**
1147
+ * Supademo app configuration.
1148
+ */
1149
+ supademo?: IntegrationAppSupademo;
1123
1150
  }
1124
1151
 
1125
1152
  export interface IntegrationAppGithubStar {
1126
- /**
1127
- * The title of the Github button
1128
- */
1129
- title: string
1130
-
1131
- /**
1132
- * The label of the Github Button
1133
- */
1134
- label?: string
1135
-
1136
- /**
1137
- * The href of the Github project
1138
- */
1139
- href: string
1140
-
1141
- /**
1142
- * The data-show-count of the Github project
1143
- */
1144
- dataShowCount?: boolean
1145
-
1146
- /**
1147
- * The data-icon of the Github button
1148
- */
1149
- dataIcon?: string
1150
-
1151
- /**
1152
- * The data-size of the Github button
1153
- */
1154
- dataSize?: string
1155
-
1156
- /**
1157
- * The aria-label of the Github button
1158
- */
1159
- ariaLabel?: string
1153
+ /**
1154
+ * The title of the Github button
1155
+ */
1156
+ title: string;
1157
+
1158
+ /**
1159
+ * The label of the Github Button
1160
+ */
1161
+ label?: string;
1162
+
1163
+ /**
1164
+ * The href of the Github project
1165
+ */
1166
+ href: string;
1167
+
1168
+ /**
1169
+ * The data-show-count of the Github project
1170
+ */
1171
+ dataShowCount?: boolean;
1172
+
1173
+ /**
1174
+ * The data-icon of the Github button
1175
+ */
1176
+ dataIcon?: string;
1177
+
1178
+ /**
1179
+ * The data-size of the Github button
1180
+ */
1181
+ dataSize?: string;
1182
+
1183
+ /**
1184
+ * The aria-label of the Github button
1185
+ */
1186
+ ariaLabel?: string;
1160
1187
  }
1161
1188
 
1162
1189
  export interface IntegrationAppSupademo {
1163
- /**
1164
- * The Supademo API key
1165
- */
1166
- apiKey: string
1190
+ /**
1191
+ * The Supademo API key
1192
+ */
1193
+ apiKey: string;
1167
1194
  }
1168
1195
 
1169
1196
  // ------ END settings for integrations END ------
@@ -1205,13 +1232,12 @@ export interface IntegrationAppSupademo {
1205
1232
  * }
1206
1233
  * ]
1207
1234
  */
1208
- export type Plugins = (string | PluginConfig)[]
1235
+ export type Plugins = (string | PluginConfig)[];
1209
1236
 
1210
1237
  export type PluginConfig<
1211
- PluginName extends string = string,
1212
- PluginArgs extends unknown[] = unknown[]
1213
- > = [PluginName, ...PluginArgs]
1214
-
1238
+ PluginName extends string = string,
1239
+ PluginArgs extends unknown[] = unknown[],
1240
+ > = [PluginName, ...PluginArgs];
1215
1241
 
1216
1242
  // ------ END settings for plugins END ------
1217
1243
 
@@ -1220,36 +1246,123 @@ export type PluginConfig<
1220
1246
  * Redirects configuration
1221
1247
  */
1222
1248
  export interface Redirects {
1223
- /** Source path to redirect from */
1224
- source: string
1249
+ /** Source path to redirect from */
1250
+ source: string;
1225
1251
 
1226
- /** Destination path to redirect to */
1227
- destination: string
1252
+ /** Destination path to redirect to */
1253
+ destination: string;
1228
1254
  }
1229
1255
 
1230
1256
  /**
1231
1257
  * SEO configuration
1232
1258
  */
1233
1259
  export interface SEO {
1260
+ /**
1261
+ * Domain name
1262
+ */
1263
+ domain?: string;
1264
+
1265
+ /**
1266
+ * Meta tags
1267
+ */
1268
+ metatags?: { [tag: string]: string }; // TODO: in the future type-safe
1269
+ }
1270
+
1271
+ /**
1272
+ * AI configuration
1273
+ */
1274
+ export interface AI {
1275
+ /**
1276
+ * LLMs txt configuration
1277
+ *
1278
+ *
1279
+ * @example
1280
+ * ```json
1281
+ * {
1282
+ * "title": "LLMs txt",
1283
+ * "domain": "https://www.example.com",
1284
+ * "summary": "Summary of the LLMs txt",
1285
+ * "sections": { "section1": { "title": "Section 1", "url": "https://www.example.com", "description": "Description of section 1" } }
1286
+ * }
1287
+ * ```
1288
+ *
1289
+ * or
1290
+ * @example
1291
+ * ```json
1292
+ * "llmsTxt": "llms.txt"
1293
+ * ```
1294
+ *
1295
+ * or
1296
+ * @example
1297
+ * ```json
1298
+ * "llmsTxt": "# LLMs txt \n ## Section 1 \n ## Section 2 \n ### Section 2"
1299
+ * ```
1300
+ *
1301
+ */
1302
+ llmsTxt?: false | LLMsTxt | llmsTxtString;
1303
+ }
1304
+
1305
+ /**
1306
+ * LLMs txt as a path to a file or a llms.txt content
1307
+ */
1308
+ export type llmsTxtString = string;
1309
+
1310
+ // #region LLMsTxt
1311
+ /**
1312
+ * LLMs txt configuration
1313
+ */
1314
+ export interface LLMsTxt {
1315
+ /**
1316
+ * Title of the LLMs txt
1317
+ * @example "LLMs txt"
1318
+ */
1319
+ title: string;
1320
+
1321
+ /**
1322
+ * Base URL of the LLMs txt
1323
+ */
1324
+ baseUrl: string;
1325
+
1326
+ /**
1327
+ * Description of the LLMs txt
1328
+ */
1329
+ summary?: string;
1330
+
1331
+ /**
1332
+ * Sections of the LLMs txt
1333
+ */
1334
+ sections?: LLMsTxtSectionMap;
1335
+ }
1336
+ // #endregion LLMsTxt
1337
+
1338
+ export type LLMsTxtSectionMap = { [section: string]: {
1234
1339
  /**
1235
- * Domain name
1340
+ * Title of the section
1341
+ * @example "Section 1"
1236
1342
  */
1237
- domain?: string
1343
+ title: string;
1238
1344
 
1239
1345
  /**
1240
- * Meta tags
1346
+ * URL of the section
1347
+ * @example "https://www.example.com"
1241
1348
  */
1242
- metatags?: { [tag: string]: string } // TODO: in the future type-safe
1243
- }
1349
+ url: string;
1350
+
1351
+ /**
1352
+ * Description of the section
1353
+ * @example "Description of section 1"
1354
+ */
1355
+ description: string;
1356
+ } };
1244
1357
 
1245
1358
  /**
1246
1359
  * Advanced configuration
1247
1360
  */
1248
1361
  export interface Advanced {
1249
- /**
1250
- * basename
1251
- */
1252
- basename?: string
1362
+ /**
1363
+ * basename
1364
+ */
1365
+ basename?: string;
1253
1366
  }
1254
1367
 
1255
1368
  // ------ END settings for redirects END ------
@@ -1259,46 +1372,46 @@ export interface Advanced {
1259
1372
  * Engine configuration
1260
1373
  */
1261
1374
  export interface Engine {
1262
- /**
1263
- * Path aliases for imports. Avoid long relative paths by creating shortcuts.
1264
- *
1265
- * @example
1266
- * ```json
1267
- * {
1268
- * "paths": {
1269
- * "@my-package/*": ["../my-package/src/*"],
1270
- * "@livesession-go/*": ["https://github.com/livesession/livesession-go/*"]
1271
- * }
1272
- * }
1273
- * ```
1274
- *
1275
- * Usage:
1276
- * ```typescript
1277
- * // Instead of
1278
- * @importCode("../../../my-package/src/components/Badge.tsx")
1279
- *
1280
- * // Use
1281
- * @importCode("@my-package/src/components/Badge.tsx")
1282
- * ```
1283
- */
1284
- paths?: EnginePaths
1285
-
1286
- /**
1287
- *
1288
- * Uniform configuration
1289
- *
1290
- */
1291
- uniform?: EngineUniform
1292
- }
1293
-
1294
- export type EnginePaths = { [key: string]: string[] }
1375
+ /**
1376
+ * Path aliases for imports. Avoid long relative paths by creating shortcuts.
1377
+ *
1378
+ * @example
1379
+ * ```json
1380
+ * {
1381
+ * "paths": {
1382
+ * "@my-package/*": ["../my-package/src/*"],
1383
+ * "@livesession-go/*": ["https://github.com/livesession/livesession-go/*"]
1384
+ * }
1385
+ * }
1386
+ * ```
1387
+ *
1388
+ * Usage:
1389
+ * ```typescript
1390
+ * // Instead of
1391
+ * @importCode("../../../my-package/src/components/Badge.tsx")
1392
+ *
1393
+ * // Use
1394
+ * @importCode("@my-package/src/components/Badge.tsx")
1395
+ * ```
1396
+ */
1397
+ paths?: EnginePaths;
1398
+
1399
+ /**
1400
+ *
1401
+ * Uniform configuration
1402
+ *
1403
+ */
1404
+ uniform?: EngineUniform;
1405
+ }
1406
+
1407
+ export type EnginePaths = { [key: string]: string[] };
1295
1408
 
1296
1409
  export type EngineUniform = {
1297
- /**
1298
- * If `true` then virtual pages will not created and generated content will be stored on disk
1299
- */
1300
- store?: boolean
1301
- }
1410
+ /**
1411
+ * If `true` then virtual pages will not created and generated content will be stored on disk
1412
+ */
1413
+ store?: boolean;
1414
+ };
1302
1415
 
1303
1416
  // ------ END settings for config END ------
1304
1417
 
@@ -1306,77 +1419,77 @@ export type EngineUniform = {
1306
1419
  * JSON representation of a component.
1307
1420
  */
1308
1421
  export interface JSONComponent {
1309
- /**
1310
- * The component type, e.g. "Button", "Card", etc.
1311
- */
1312
- component: string
1422
+ /**
1423
+ * The component type, e.g. "Button", "Card", etc.
1424
+ */
1425
+ component: string;
1313
1426
 
1314
- /**
1315
- * The component's children, which can be a string, an array of strings, or an array of JSONComponent objects.
1316
- */
1317
- props?: Record<string, any>
1427
+ /**
1428
+ * The component's children, which can be a string, an array of strings, or an array of JSONComponent objects.
1429
+ */
1430
+ props?: Record<string, any>;
1318
1431
  }
1319
1432
 
1320
1433
  /**
1321
1434
  * A type that can be used to represent a component-like structure.
1322
1435
  */
1323
- export type ComponentLike = React.JSX.Element | JSONComponent | string
1436
+ export type ComponentLike = React.JSX.Element | JSONComponent | string;
1324
1437
 
1325
1438
  export interface ThemeColors {
1326
- colorScheme: string;
1439
+ colorScheme: string;
1440
+ foreground: string;
1441
+ background: string;
1442
+ lighter: {
1443
+ inlineBackground: string;
1444
+ };
1445
+ editor: {
1446
+ background: string;
1327
1447
  foreground: string;
1448
+ lineHighlightBackground: string;
1449
+ rangeHighlightBackground: string;
1450
+ infoForeground: string;
1451
+ selectionBackground: string;
1452
+ };
1453
+ focusBorder: string;
1454
+ tab: {
1455
+ activeBackground: string;
1456
+ activeForeground: string;
1457
+ inactiveBackground: string;
1458
+ inactiveForeground: string;
1459
+ border: string;
1460
+ activeBorder: string;
1461
+ activeBorderTop: string;
1462
+ };
1463
+ editorGroup: {
1464
+ border: string;
1465
+ };
1466
+ editorGroupHeader: {
1467
+ tabsBackground: string;
1468
+ };
1469
+ editorLineNumber: {
1470
+ foreground: string;
1471
+ };
1472
+ input: {
1328
1473
  background: string;
1329
- lighter: {
1330
- inlineBackground: string;
1331
- };
1332
- editor: {
1333
- background: string;
1334
- foreground: string;
1335
- lineHighlightBackground: string;
1336
- rangeHighlightBackground: string;
1337
- infoForeground: string;
1338
- selectionBackground: string;
1339
- };
1340
- focusBorder: string;
1341
- tab: {
1342
- activeBackground: string;
1343
- activeForeground: string;
1344
- inactiveBackground: string;
1345
- inactiveForeground: string;
1346
- border: string;
1347
- activeBorder: string;
1348
- activeBorderTop: string;
1349
- };
1350
- editorGroup: {
1351
- border: string;
1352
- };
1353
- editorGroupHeader: {
1354
- tabsBackground: string;
1355
- };
1356
- editorLineNumber: {
1357
- foreground: string;
1358
- };
1359
- input: {
1360
- background: string;
1361
- foreground: string;
1362
- border: string;
1363
- };
1364
- icon: {
1365
- foreground: string;
1366
- };
1367
- sideBar: {
1368
- background: string;
1369
- foreground: string;
1370
- border: string;
1371
- };
1372
- list: {
1373
- activeSelectionBackground: string;
1374
- activeSelectionForeground: string;
1375
- hoverBackground: string;
1376
- hoverForeground: string;
1377
- };
1474
+ foreground: string;
1475
+ border: string;
1476
+ };
1477
+ icon: {
1478
+ foreground: string;
1479
+ };
1480
+ sideBar: {
1481
+ background: string;
1482
+ foreground: string;
1483
+ border: string;
1484
+ };
1485
+ list: {
1486
+ activeSelectionBackground: string;
1487
+ activeSelectionForeground: string;
1488
+ hoverBackground: string;
1489
+ hoverForeground: string;
1490
+ };
1378
1491
  }
1379
1492
 
1380
1493
  export interface UserPreferences {
1381
- themeColors?: ThemeColors
1382
- }
1494
+ themeColors?: ThemeColors;
1495
+ }