@xyd-js/core 0.1.0-xyd.4 → 0.1.0-xyd.54

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.
package/dist/index.d.ts CHANGED
@@ -1,186 +1,1029 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
 
3
- interface FrontMatter {
4
- title: string | {
3
+ /**
4
+ * @todo rename to PageMeta
5
+ *
6
+ * Represents metadata for a content page.
7
+ * Usually used as md/mdx frontmatter.
8
+ *
9
+ */
10
+ interface Metadata<P = void> {
11
+ /** The main title of the content - by default visible in navigation and page title */
12
+ title: string;
13
+ /** Title to display in the sidebar navigation */
14
+ sidebarTitle?: string;
15
+ /** Disply description for SEO purposes */
16
+ description?: string;
17
+ /** Icon identifier for the navigation item */
18
+ icon?: string;
19
+ /** Layout type for the content display */
20
+ layout?: PageLayout;
21
+ /** Max depth for table of contents */
22
+ maxTocDepth?: number;
23
+ /**
24
+ * @internal
25
+ *
26
+ * The type of component to render this content with
27
+ */
28
+ component?: "docs" | "atlas" | "page";
29
+ /**
30
+ * @internal
31
+ *
32
+ * Properties specific to the component type
33
+ */
34
+ componentProps?: P;
35
+ /**
36
+ * @internal
37
+ *
38
+ * Group for sidebar navigation
39
+ */
40
+ group?: string[];
41
+ /**
42
+ * Uniform for API Docs references
43
+ */
44
+ uniform?: PageMetaUniform;
45
+ /**
46
+ * @internal
47
+ *
48
+ * used for graphql references
49
+ */
50
+ graphql?: string;
51
+ /**
52
+ * @internal
53
+ *
54
+ * used for openapi references
55
+ */
56
+ openapi?: string;
57
+ /**
58
+ * If true, hide from navigation
59
+ */
60
+ hidden?: boolean;
61
+ /**
62
+ * @todo: !!! IN THE FUTURE COMPOSE API !!!
63
+ *
64
+ * Optional 'tocCard' for github references
65
+ *
66
+ * @example
67
+ * ```
68
+ * tocCard: {
69
+ * link: "https://github.com/livesession/livesession-browser",
70
+ * title: "Checkout the code",
71
+ * description: "Check how to use the LiveSession Browser SDK",
72
+ * icon: "github"
73
+ * }
74
+ * ```
75
+ */
76
+ tocCard?: {
77
+ /** 'link' to the card */
78
+ link: string;
79
+ /** 'title' of the card */
5
80
  title: string;
6
- code: string;
81
+ /** 'description' of the card */
82
+ description: string;
83
+ /** 'icon' of the card */
84
+ icon?: string;
7
85
  };
8
- group?: string[];
9
86
  }
10
- type PageFrontMatter = {
11
- [page: string]: FrontMatter;
87
+ type PageMetaUniform = string | PageMetaUniformDetails;
88
+ /**
89
+ * Uniform details allows to specify more options than just the path, for example eager loading
90
+ */
91
+ type PageMetaUniformDetails = {
92
+ /**
93
+ * Path to the uniform file / url
94
+ */
95
+ path: string;
96
+ /**
97
+ * If true, the uniform will be eagerly loaded
98
+ */
99
+ eager?: boolean;
100
+ };
101
+ type MetadataMap<P = void> = {
102
+ [page: string]: Metadata<P>;
103
+ };
104
+ type PageLayout = "wide" | "page" | "center";
105
+
106
+ /**
107
+ * Interface representing all possible meta tags that can be used in HTML documents.
108
+ * This includes standard meta tags, Open Graph tags, Twitter cards, and various other
109
+ * specialized meta tags for different content types.
110
+ *
111
+ */
112
+ interface MetaTags {
113
+ /** Standard meta tag for controlling search engine crawling and indexing
114
+ * @example "noindex"
115
+ */
116
+ robots: string;
117
+ /** Character encoding for the document
118
+ * @example "UTF-8"
119
+ */
120
+ charset: string;
121
+ /** Viewport settings for responsive design
122
+ * @example "width=device-width, initial-scale=1, maximum-scale=1"
123
+ */
124
+ viewport: string;
125
+ /** Brief description of the page content
126
+ * @example "Your page description"
127
+ */
128
+ description: string;
129
+ /** Keywords relevant to the page content
130
+ * @example "keyword, keyword2"
131
+ */
132
+ keywords: string;
133
+ /** Author of the page content
134
+ * @example "Author Name"
135
+ */
136
+ author: string;
137
+ /** Google-specific crawling instructions
138
+ * @example "index, follow"
139
+ */
140
+ googlebot: string;
141
+ /** Google-specific settings
142
+ * @example "notranslate"
143
+ */
144
+ google: string;
145
+ /** Google Search Console verification token
146
+ * @example "verification_token"
147
+ */
148
+ "google-site-verification": string;
149
+ /** Software used to generate the page
150
+ * @example "xyd"
151
+ */
152
+ generator: string;
153
+ /** Theme color for browser UI
154
+ * @example "#ffffff"
155
+ */
156
+ "theme-color": string;
157
+ /** Color scheme preference
158
+ * @example "light"
159
+ */
160
+ "color-scheme": string;
161
+ /** Format detection settings
162
+ * @example "telephone=no"
163
+ */
164
+ "format-detection": string;
165
+ /** Referrer policy
166
+ * @example "origin"
167
+ */
168
+ referrer: string;
169
+ /** Page refresh settings
170
+ * @example "0;url=https://example.com"
171
+ */
172
+ refresh: string;
173
+ /** Content rating
174
+ * @example "general"
175
+ */
176
+ rating: string;
177
+ /** Crawl frequency suggestion
178
+ * @example "7 days"
179
+ */
180
+ "revisit-after": string;
181
+ /** Page language
182
+ * @example "en-US"
183
+ */
184
+ language: string;
185
+ /** Copyright information
186
+ * @example "Copyright 2024"
187
+ */
188
+ copyright: string;
189
+ /** Reply-to email address
190
+ * @example "contact@example.com"
191
+ */
192
+ "reply-to": string;
193
+ /** Content distribution scope
194
+ * @example "global"
195
+ */
196
+ distribution: string;
197
+ /** Content coverage area
198
+ * @example "Worldwide"
199
+ */
200
+ coverage: string;
201
+ /** Content category
202
+ * @example "Technology"
203
+ */
204
+ category: string;
205
+ /** Target audience
206
+ * @example "all"
207
+ */
208
+ target: string;
209
+ /** Mobile device compatibility
210
+ * @example "true"
211
+ */
212
+ HandheldFriendly: string;
213
+ /** Mobile optimization settings
214
+ * @example "width"
215
+ */
216
+ MobileOptimized: string;
217
+ /** iOS web app capability
218
+ * @example "yes"
219
+ */
220
+ "apple-mobile-web-app-capable": string;
221
+ /** iOS status bar style
222
+ * @example "black"
223
+ */
224
+ "apple-mobile-web-app-status-bar-style": string;
225
+ /** iOS web app title
226
+ * @example "App Name"
227
+ */
228
+ "apple-mobile-web-app-title": string;
229
+ /** Web application name
230
+ * @example "My App"
231
+ */
232
+ "application-name": string;
233
+ /** Windows tile color
234
+ * @example "#2b5797"
235
+ */
236
+ "msapplication-TileColor": string;
237
+ /** Windows tile image
238
+ * @example "/mstile-144x144.png"a
239
+ */
240
+ "msapplication-TileImage": string;
241
+ /** Windows browser config
242
+ * @example "/browserconfig.xml"
243
+ */
244
+ "msapplication-config": string;
245
+ /** Open Graph title
246
+ * @example "Page Title"
247
+ */
248
+ "og:title": string;
249
+ /** Open Graph content type
250
+ * @example "website"
251
+ */
252
+ "og:type": string;
253
+ /** Open Graph URL
254
+ * @example "https://example.com"
255
+ */
256
+ "og:url": string;
257
+ /** Open Graph image
258
+ * @example "https://example.com/image.jpg"
259
+ */
260
+ "og:image": string;
261
+ /** Open Graph description
262
+ * @example "A brief description for social media"
263
+ */
264
+ "og:description": string;
265
+ /** Open Graph site name
266
+ * @example "Site Name"
267
+ */
268
+ "og:site_name": string;
269
+ /** Open Graph locale
270
+ * @example "en_US"
271
+ */
272
+ "og:locale": string;
273
+ /** Open Graph video
274
+ * @example "https://example.com/video.mp4"
275
+ */
276
+ "og:video": string;
277
+ /** Open Graph audio
278
+ * @example "https://example.com/audio.mp3"
279
+ */
280
+ "og:audio": string;
281
+ /** Twitter card type
282
+ * @example "summary"
283
+ */
284
+ "twitter:card": string;
285
+ /** Twitter site handle
286
+ * @example "@username"
287
+ */
288
+ "twitter:site": string;
289
+ /** Twitter creator handle
290
+ * @example "@author"
291
+ */
292
+ "twitter:creator": string;
293
+ /** Twitter title
294
+ * @example "Page Title"
295
+ */
296
+ "twitter:title": string;
297
+ /** Twitter description
298
+ * @example "A brief description for Twitter"
299
+ */
300
+ "twitter:description": string;
301
+ /** Twitter image
302
+ * @example "https://example.com/image.jpg"
303
+ */
304
+ "twitter:image": string;
305
+ /** Twitter image alt text
306
+ * @example "Image description"
307
+ */
308
+ "twitter:image:alt": string;
309
+ /** Twitter player URL
310
+ * @example "https://example.com/player"
311
+ */
312
+ "twitter:player": string;
313
+ /** Twitter player width
314
+ * @example "480"
315
+ */
316
+ "twitter:player:width": string;
317
+ /** Twitter player height
318
+ * @example "480"
319
+ */
320
+ "twitter:player:height": string;
321
+ /** Twitter iOS app name
322
+ * @example "App Name"
323
+ */
324
+ "twitter:app:name:iphone": string;
325
+ /** Twitter iOS app ID
326
+ * @example "123456789"
327
+ */
328
+ "twitter:app:id:iphone": string;
329
+ /** Twitter iOS app URL
330
+ * @example "app://"
331
+ */
332
+ "twitter:app:url:iphone": string;
333
+ /** Article publication time
334
+ * @example "2024-03-20T12:00:00Z"
335
+ */
336
+ "article:published_time": string;
337
+ /** Article modification time
338
+ * @example "2024-03-21T15:30:00Z"
339
+ */
340
+ "article:modified_time": string;
341
+ /** Article expiration time
342
+ * @example "2024-04-20T12:00:00Z"
343
+ */
344
+ "article:expiration_time": string;
345
+ /** Article author
346
+ * @example "John Doe"
347
+ */
348
+ "article:author": string;
349
+ /** Article section
350
+ * @example "Technology"
351
+ */
352
+ "article:section": string;
353
+ /** Article tags
354
+ * @example "Web Development"
355
+ */
356
+ "article:tag": string;
357
+ /** Book author
358
+ * @example "Jane Smith"
359
+ */
360
+ "book:author": string;
361
+ /** Book ISBN
362
+ * @example "978-3-16-148410-0"
363
+ */
364
+ "book:isbn": string;
365
+ /** Book release date
366
+ * @example "2024-01-01"
367
+ */
368
+ "book:release_date": string;
369
+ /** Book tags
370
+ * @example "Fiction"
371
+ */
372
+ "book:tag": string;
373
+ /** Profile first name
374
+ * @example "John"
375
+ */
376
+ "profile:first_name": string;
377
+ /** Profile last name
378
+ * @example "Doe"
379
+ */
380
+ "profile:last_name": string;
381
+ /** Profile username
382
+ * @example "johndoe"
383
+ */
384
+ "profile:username": string;
385
+ /** Profile gender
386
+ * @example "male"
387
+ */
388
+ "profile:gender": string;
389
+ /** Music duration in seconds
390
+ * @example "180"
391
+ */
392
+ "music:duration": string;
393
+ /** Music album name
394
+ * @example "Album Name"
395
+ */
396
+ "music:album": string;
397
+ /** Music album disc number
398
+ * @example "1"
399
+ */
400
+ "music:album:disc": string;
401
+ /** Music album track number
402
+ * @example "1"
403
+ */
404
+ "music:album:track": string;
405
+ /** Music musician/artist
406
+ * @example "Artist Name"
407
+ */
408
+ "music:musician": string;
409
+ /** Music song name
410
+ * @example "Song Name"
411
+ */
412
+ "music:song": string;
413
+ /** Music song disc number
414
+ * @example "1"
415
+ */
416
+ "music:song:disc": string;
417
+ /** Music song track number
418
+ * @example "1"
419
+ */
420
+ "music:song:track": string;
421
+ /** Video actor name
422
+ * @example "Actor Name"
423
+ */
424
+ "video:actor": string;
425
+ /** Video actor role
426
+ * @example "Character Name"
427
+ */
428
+ "video:actor:role": string;
429
+ /** Video director
430
+ * @example "Director Name"
431
+ */
432
+ "video:director": string;
433
+ /** Video writer
434
+ * @example "Writer Name"
435
+ */
436
+ "video:writer": string;
437
+ /** Video duration in seconds
438
+ * @example "120"
439
+ */
440
+ "video:duration": string;
441
+ /** Video release date
442
+ * @example "2024-01-01"
443
+ */
444
+ "video:release_date": string;
445
+ /** Video tags
446
+ * @example "Action"
447
+ */
448
+ "video:tag": string;
449
+ /** Video series name
450
+ * @example "Series Name"
451
+ */
452
+ "video:series": string;
453
+ }
454
+
455
+ type RawTheme = {
456
+ name?: string;
457
+ type?: string;
458
+ tokenColors?: ThemeSetting[];
459
+ colors?: {
460
+ [key: string]: string;
461
+ };
462
+ [key: string]: any;
463
+ };
464
+ type ThemeSetting = {
465
+ name?: string;
466
+ scope?: string | string[];
467
+ settings: {
468
+ fontStyle?: string;
469
+ foreground?: string;
470
+ background?: string;
471
+ };
12
472
  };
473
+ declare const THEME_NAMES: readonly ["dark-plus", "dracula-soft", "dracula", "github-dark", "github-dark-dimmed", "github-from-css", "github-light", "light-plus", "material-darker", "material-default", "material-from-css", "material-lighter", "material-ocean", "material-palenight", "min-dark", "min-light", "monokai", "nord", "one-dark-pro", "poimandres", "slack-dark", "slack-ochin", "solarized-dark", "solarized-light"];
474
+ type NamesTuple$1 = typeof THEME_NAMES;
475
+ type StringTheme = NamesTuple$1[number];
476
+ type Theme$1 = StringTheme | RawTheme;
13
477
 
478
+ /**
479
+ * Main settings interface for the application
480
+ */
14
481
  interface Settings {
15
- styling?: Styling;
16
- structure?: Structure;
482
+ /** Theme configuration for the application */
483
+ theme?: Theme;
484
+ /** Navigation configuration */
485
+ navigation?: Navigation;
486
+ /** API configuration */
17
487
  api?: API;
488
+ /** Integrations configuration */
18
489
  integrations?: Integrations;
490
+ /** Plugins configuration */
491
+ plugins?: Plugins;
492
+ /**
493
+ * @internal
494
+ *
495
+ * Redirects configuration
496
+ */
19
497
  redirects?: Redirects[];
498
+ /**
499
+ * SEO configuration
500
+ */
20
501
  seo?: SEO;
502
+ /** Engine configuration */
503
+ engine?: Engine;
21
504
  }
22
- interface Styling {
23
- name: string;
505
+ /**
506
+ * Theme configuration that changes the look and feel of the project
507
+ */
508
+ interface Theme {
509
+ /**
510
+ * A preset theme configuration that changes the look and feel of the project.
511
+ * A theme is a set of default styling configurations.
512
+ *
513
+ * Example built-in themes: `cosmo`, `gusto`, `poetry`, `picasso`
514
+ */
515
+ readonly name: ThemePresetName | (string & {});
516
+ /**
517
+ * The default color scheme to use.
518
+ */
519
+ defaultColorScheme?: "light" | "dark" | "os";
520
+ /**
521
+ * Path to logo image or object with path to "light" and "dark" mode logo images, and where the logo links to.
522
+ * SVG format is recommended as it does not pixelate and the file size is generally smaller.
523
+ */
24
524
  logo?: string | Logo | React.JSX.Element;
525
+ /**
526
+ * Coder configuration for the theme, including options like syntax highlighting.
527
+ */
528
+ coder?: Coder;
529
+ /**
530
+ * Banner configuration for the theme.
531
+ */
532
+ banner?: Banner;
533
+ /** Path to the favicon image. For example: /path/to/favicon.svg */
25
534
  favicon?: string;
26
- colors?: Colors;
27
- theme?: ThemeType;
28
- layout?: LayoutType;
29
- background?: Background;
30
- backgroundImage?: string;
31
- font?: FontDetailsType | {
32
- headings?: FontDetailsType;
33
- body?: FontDetailsType;
34
- };
35
- modeToggle?: ModeToggle;
36
- sidebar?: StyleSidebar;
37
- topbar?: Topbar;
38
- search?: SearchType;
39
- rounded?: Rounded;
535
+ /** The defult level of the table of contents. */
536
+ maxTocDepth?: number;
537
+ /** Head configuration */
538
+ head?: HeadConfig[];
539
+ /** The iconify library */
540
+ icons?: Icons;
541
+ /**
542
+ * Custom scripts to be added to the head of the every page.
543
+ * Paths are relative to the root of the project or absolute.
544
+ */
545
+ scripts?: Script[];
40
546
  }
547
+ /**
548
+ * Coder configuration for the theme, including options like syntax highlighting.
549
+ */
550
+ interface Coder {
551
+ /**
552
+ * If `true` then code blocks will have line numbers.
553
+ */
554
+ lines?: boolean;
555
+ /**
556
+ * If `true` then code blocks will have a scrollbar.
557
+ */
558
+ scroll?: boolean;
559
+ /**
560
+ * Syntax highlighting configuration.
561
+ */
562
+ syntaxHighlight?: Theme$1;
563
+ }
564
+ /**
565
+ * Configuration type for head elements that can be added to the HTML head.
566
+ * Format: [tagName, attributes]
567
+ *
568
+ * @example: ['script', { src: 'https://example.com/script.js', defer: true }]
569
+ */
570
+ type HeadConfig = [string, Record<string, string | boolean>];
571
+ type Script = string;
572
+ /**
573
+ * Logo configuration interface
574
+ */
41
575
  interface Logo {
576
+ /** Path to the logo in light mode. For example: `/path/to/logo.svg` */
42
577
  light?: string;
578
+ /** Path to the logo in dark mode. For example: `/path/to/logo.svg` */
43
579
  dark?: string;
580
+ /** Where clicking on the logo links you to */
44
581
  href?: string;
45
582
  }
46
- interface Colors {
47
- primary: string;
48
- light?: string;
49
- dark?: string;
50
- background?: {
51
- light: string;
52
- dark: string;
53
- };
54
- }
55
- interface Background {
56
- style?: "gradient" | "grid" | "windows";
57
- }
58
- interface FontDetailsType {
59
- family: string;
60
- weight?: number;
61
- url?: string;
62
- format?: "woff" | "woff2";
63
- }
64
- interface ModeToggle {
65
- default?: "light" | "dark";
66
- isHidden?: boolean;
583
+ /**
584
+ * Banner configuration interface
585
+ */
586
+ interface Banner {
587
+ /**
588
+ * Banner content.
589
+ */
590
+ content: string | React.JSX.Element;
591
+ /**
592
+ * Banner label.
593
+ */
594
+ label?: string;
595
+ /**
596
+ * Banner kind.
597
+ */
598
+ kind?: "secondary";
599
+ /**
600
+ * Banner icon.
601
+ */
602
+ icon?: string;
67
603
  }
68
- interface StyleSidebar {
69
- items: "container" | "card" | "border" | "undecorated";
604
+ interface IconLibrary {
605
+ /** The iconify library name */
606
+ name: string;
607
+ /** The iconify library version */
608
+ version?: string;
609
+ /** The default iconify icon name */
610
+ default?: boolean;
611
+ /** Merge icons from the library into the default iconify library */
612
+ noprefix?: boolean;
70
613
  }
71
- interface Topbar {
72
- style: "default" | "gradient";
614
+ interface Icons {
615
+ /** The iconify library */
616
+ library?: string | string[] | IconLibrary | IconLibrary[];
73
617
  }
74
- type ThemeType = "gusto" | "poetry" | "plato" | "picasso";
75
- type LayoutType = "app" | "default";
618
+ /** Available theme preset names */
619
+ type ThemePresetName = "poetry" | "cosmo" | "opener" | "picasso";
620
+ /** Search bar location options */
76
621
  type SearchType = "side" | "top";
77
- type Rounded = "default" | "sharp";
78
- interface Structure {
79
- sidebar: (SidebarMulti | Sidebar)[];
622
+ /**
623
+ * Navigation configuration interface
624
+ */
625
+ interface Navigation {
626
+ /** Definition of sidebar - an array of groups with all the pages within that group */
627
+ sidebar: SidebarNavigation;
628
+ /** Array of headers */
80
629
  header?: Header[];
81
- topbarCtaButton?: CallToAction;
82
- versions?: string[];
630
+ /** Array of segments */
631
+ segments?: Segment[];
632
+ /**
633
+ * Array of version names. Only use this if you want to show different versions of docs
634
+ * with a dropdown in the navigation bar.
635
+ */
636
+ /** Anchors, includes the icon, name, and url */
83
637
  anchors?: AnchorRoot;
84
- footerSocials?: FooterSocials;
85
- feedback?: Feedback;
86
- search?: Search;
87
638
  }
88
- interface SidebarMulti {
89
- match: string;
90
- items: Sidebar[];
639
+ /**
640
+ * Sidebar navigation type
641
+ */
642
+ type SidebarNavigation = (SidebarRoute | Sidebar | string)[];
643
+ /**
644
+ * Sidebar multi-group configuration
645
+ */
646
+ interface SidebarRoute {
647
+ /** Route for this sidebar group */
648
+ route: string;
649
+ /** Sidebar pages within this group */
650
+ pages: Sidebar[];
91
651
  }
652
+ /**
653
+ * Sidebar configuration
654
+ */
92
655
  interface Sidebar {
656
+ /** The name of the group */
93
657
  group?: string;
94
- pages?: (string | Sidebar)[];
658
+ /**
659
+ * The relative paths to the markdown files that will serve as pages.
660
+ * Note: groups are recursive, so to add a sub-folder add another group object in the page array.
661
+ */
662
+ pages?: PageURL[];
663
+ /**
664
+ * The icon of the group.
665
+ */
95
666
  icon?: string;
96
- iconType?: string;
97
- }
98
- interface SubHeader {
99
- match: string;
100
- name: string;
101
- items: Header[];
667
+ /**
668
+ * The sort order of the group.
669
+ */
670
+ sort?: number;
102
671
  }
103
- interface Header {
104
- name?: string;
105
- url?: string;
106
- sub?: SubHeader;
672
+ /**
673
+ * Page URL type
674
+ */
675
+ type PageURL = string | VirtualPage | Sidebar;
676
+ /**
677
+ * @internal
678
+ *
679
+ * Virtual page type
680
+ *
681
+ * Virtual pages are composition of pages, needed for templating e.g in uniform
682
+ *
683
+ * Example:
684
+ *
685
+ * {
686
+ * pages: [0
687
+ * ".xyd/.cache/.content/docs/rest/todo:docs/rest/todo",
688
+ * ]
689
+ * }
690
+ *
691
+ * above will be rendered as docs/rest/todo.md using composition from xyd's `.content`
692
+ */
693
+ type VirtualPage = string | {
694
+ /** The virtual page to use for the page */
695
+ virtual: string;
696
+ /** The page to use for the page */
697
+ page: string;
698
+ /** The template to use for the page */
699
+ templates?: string | string[];
700
+ };
701
+ /**
702
+ * Segment configuration
703
+ */
704
+ interface Segment {
705
+ /** Route for this segment */
706
+ route: string;
707
+ /** Title of this segment */
708
+ title: string;
709
+ /** Items within this segment */
710
+ pages: SegmentPage[];
107
711
  }
108
- interface CallToAction {
109
- type?: "link" | "github";
110
- url?: string;
111
- name?: string;
112
- style?: "pill" | "roundedRectangle";
113
- arrow?: boolean;
712
+ interface SegmentPage {
713
+ page: string;
714
+ title: string;
114
715
  }
716
+ /**
717
+ * Header configuration
718
+ */
719
+ type Header = {
720
+ /** The name of the button */
721
+ title?: string;
722
+ /** The url once you click on the button */
723
+ page?: string;
724
+ /** Float the header to the right */
725
+ float?: "right";
726
+ };
727
+ /**
728
+ * Anchor configuration
729
+ */
115
730
  interface Anchor {
116
- icon?: string | React.JSX.Element;
731
+ /** The iconify icon name */
732
+ icon?: string;
733
+ /** The name of the anchor label */
117
734
  name?: string;
735
+ /**
736
+ * The start of the URL that marks what pages go in the anchor.
737
+ * Generally, this is the name of the folder you put your pages in.
738
+ */
118
739
  url?: string;
119
740
  }
741
+ /**
742
+ * Anchor root configuration
743
+ */
120
744
  interface AnchorRoot {
121
- bottom: Anchor[];
122
- }
123
- interface FooterSocials {
124
- [key: string]: string;
125
- property: string;
126
- }
127
- interface Feedback {
128
- thumbsRating?: boolean;
129
- suggestEdit?: boolean;
130
- raiseIssue?: boolean;
745
+ /** Bottom anchors */
746
+ bottom?: Anchor[];
131
747
  }
132
- interface Search {
133
- prompt?: string;
134
- }
135
- type APIFile = string | string[] | {
136
- [id: string]: string;
137
- };
748
+ /**
749
+ * API configuration interface
750
+ */
138
751
  interface API {
139
- info?: APIInfo;
752
+ /**
753
+ * OpenAPI configuration
754
+ */
140
755
  openapi?: APIFile;
756
+ /**
757
+ * GraphQL configuration
758
+ */
141
759
  graphql?: APIFile;
142
- match?: {
143
- graphql?: string;
144
- openapi?: string;
145
- };
760
+ /**
761
+ * Sources configuration
762
+ */
763
+ sources?: APIFile;
146
764
  }
765
+ /**
766
+ * API file configuration. Can be a path, an array of paths, a map of paths, or an advanced configuration
767
+ */
768
+ type APIFile = string | string[] | APIFileMap | APIFileAdvanced;
769
+ /**
770
+ * API file map type
771
+ */
772
+ type APIFileMap = {
773
+ [name: string]: string | APIFileAdvanced;
774
+ };
775
+ /**
776
+ * API file advanced type
777
+ */
778
+ type APIFileAdvanced = {
779
+ /** API information configuration */
780
+ info?: APIInfo;
781
+ /** Route configuration */
782
+ route: string;
783
+ };
784
+ /**
785
+ * API file type - can be a string, array of strings, or a map of strings
786
+ */
787
+ /**
788
+ * API information configuration
789
+ */
147
790
  interface APIInfo {
791
+ /**
792
+ * The base url for all API endpoints. If baseUrl is an array, it will enable
793
+ * for multiple base url options that the user can toggle.
794
+ */
148
795
  baseUrl?: string;
796
+ /** Authentication information */
149
797
  auth?: APIAuth;
798
+ /**
799
+ * The name of the authentication parameter used in the API playground.
800
+ * If method is basic, the format should be [usernameName]:[passwordName]
801
+ */
150
802
  name?: string;
803
+ /**
804
+ * The default value that's designed to be a prefisx for the authentication input field.
805
+ * E.g. If an inputPrefix of AuthKey would inherit the default input result of the authentication field as AuthKey.
806
+ */
151
807
  inputPrefix?: string;
808
+ /** Configurations for the API playground */
152
809
  playground?: APIPlayground;
810
+ /** Request configuration */
153
811
  request?: APIInfoRequest;
154
- paramFields?: ApiParamFields;
155
812
  }
813
+ /**
814
+ * API authentication configuration
815
+ */
156
816
  interface APIAuth {
817
+ /** The authentication strategy used for all API endpoints */
157
818
  method: "bearer" | "basic" | "key";
158
819
  }
820
+ /**
821
+ * API playground configuration
822
+ */
159
823
  interface APIPlayground {
824
+ /** Playground display mode */
160
825
  mode?: "show" | "simple" | "hide";
161
826
  }
827
+ /**
828
+ * API request configuration
829
+ */
162
830
  interface APIInfoRequest {
831
+ /** Configurations for the auto-generated API request examples */
163
832
  example?: {
833
+ /**
834
+ * An array of strings that determine the order of the languages of the auto-generated request examples.
835
+ * You can either define custom languages utilizing x-codeSamples or use our default languages which include
836
+ * bash, python, javascript, php, go, java
837
+ */
164
838
  languages?: string[];
165
839
  };
166
840
  }
167
- interface ApiParamFields {
168
- expanded: "all" | "topLevel" | "topLevelOneOfs" | "none";
169
- }
841
+ /**
842
+ * Integrations configuration
843
+ */
170
844
  interface Integrations {
171
- analytics?: Analytics;
845
+ /**
846
+ * Configurations to add third-party analytics integrations.
847
+ * See full list of supported analytics here.
848
+ */
849
+ analytics?: IntegrationAnalytics;
850
+ /**
851
+ * Configurations to add third-party search integrations.
852
+ * See full list of supported search here.
853
+ */
854
+ search?: IntegrationSearch;
855
+ apps?: IntegrationApps;
172
856
  }
173
- interface Analytics {
174
- livesession: {
857
+ /**
858
+ * Analytics configuration
859
+ */
860
+ interface IntegrationAnalytics {
861
+ /** Livesession analytics configuration */
862
+ livesession?: {
863
+ /** Livesession's TrackID */
175
864
  trackId: string;
176
865
  };
177
866
  }
867
+ /**
868
+ * Search configuration
869
+ */
870
+ interface IntegrationSearch {
871
+ /** Algolia search configuration */
872
+ algolia?: {
873
+ /** Algolia application ID */
874
+ appId: string;
875
+ /** Algolia API key */
876
+ apiKey: string;
877
+ };
878
+ orama?: {
879
+ /** Orama endpoint */
880
+ endpoint: string;
881
+ /** Orama API key */
882
+ apiKey: string;
883
+ /** Orama suggestions */
884
+ suggestions?: string[];
885
+ } | boolean;
886
+ }
887
+ interface IntegrationApps {
888
+ /**
889
+ * Github star app configuration.
890
+ * List of all [options](https://github.com/buttons/react-github-btn).
891
+ */
892
+ githubStar?: IntegrationAppGithubStar;
893
+ }
894
+ interface IntegrationAppGithubStar {
895
+ /**
896
+ * The title of the Github button
897
+ */
898
+ title: string;
899
+ /**
900
+ * The label of the Github Button
901
+ */
902
+ label?: string;
903
+ /**
904
+ * The href of the Github project
905
+ */
906
+ href: string;
907
+ /**
908
+ * The data-show-count of the Github project
909
+ */
910
+ dataShowCount?: boolean;
911
+ /**
912
+ * The data-icon of the Github button
913
+ */
914
+ dataIcon?: string;
915
+ /**
916
+ * The data-size of the Github button
917
+ */
918
+ dataSize?: string;
919
+ /**
920
+ * The aria-label of the Github button
921
+ */
922
+ ariaLabel?: string;
923
+ }
924
+ /**
925
+ * Plugin configuration
926
+ *
927
+ * @example
928
+ * 1)
929
+ * {
930
+ * plugins: [
931
+ * "livesession",
932
+ * ]
933
+ * }
934
+ *
935
+ * or 2)
936
+ * {
937
+ * plugins: [
938
+ * [
939
+ * "livesession",
940
+ * "accountID.websiteID",
941
+ * {
942
+ * keystrokes: true
943
+ * }
944
+ * ]
945
+ * ]
946
+ * }
947
+ *
948
+ * @example [audience:dev]
949
+ * You can also use the type to define the plugin config in your code:
950
+ *
951
+ * const livesessionPlugin: PluginConfig<"livesession", [string, { keystrokes: boolean }]> = [
952
+ * "livesession",
953
+ * "accountID.websiteID",
954
+ * {
955
+ * keystrokes: true
956
+ * }
957
+ * ]
958
+ */
959
+ type Plugins = (string | PluginConfig)[];
960
+ type PluginConfig<PluginName extends string = string, PluginArgs extends unknown[] = unknown[]> = [PluginName, ...PluginArgs];
961
+ /**
962
+ * Redirects configuration
963
+ */
178
964
  interface Redirects {
965
+ /** Source path to redirect from */
179
966
  source: string;
967
+ /** Destination path to redirect to */
180
968
  destination: string;
181
969
  }
970
+ /**
971
+ * SEO configuration
972
+ */
182
973
  interface SEO {
183
- indexHiddenPages: boolean;
974
+ /**
975
+ * Domain name
976
+ */
977
+ domain?: string;
978
+ /**
979
+ * Meta tags
980
+ */
981
+ metatags?: {
982
+ [tag: string]: string;
983
+ };
184
984
  }
985
+ /**
986
+ * Config configuration
987
+ */
988
+ interface Engine {
989
+ /**
990
+ * Path aliases for imports. Avoid long relative paths by creating shortcuts.
991
+ *
992
+ * @example
993
+ * ```json
994
+ * {
995
+ * "paths": {
996
+ * "@my-package/*": ["../my-package/src/*"],
997
+ * "@livesession-go/*": ["https://github.com/livesession/livesession-go/*"]
998
+ * }
999
+ * }
1000
+ * ```
1001
+ *
1002
+ * Usage:
1003
+ * ```typescript
1004
+ * // Instead of
1005
+ * @importCode("../../../my-package/src/components/Badge.tsx")
1006
+ *
1007
+ * // Use
1008
+ * @importCode("@my-package/src/components/Badge.tsx")
1009
+ * ```
1010
+ */
1011
+ paths?: EnginePaths;
1012
+ /**
1013
+ *
1014
+ * Uniform configuration
1015
+ *
1016
+ */
1017
+ uniform?: EngineUniform;
1018
+ }
1019
+ type EnginePaths = {
1020
+ [key: string]: string[];
1021
+ };
1022
+ type EngineUniform = {
1023
+ /**
1024
+ * If `true` then virtual pages will not created and generated content will be stored on disk
1025
+ */
1026
+ store?: boolean;
1027
+ };
185
1028
 
186
- export type { API, APIAuth, APIFile, APIInfo, APIInfoRequest, APIPlayground, Analytics, Anchor, AnchorRoot, ApiParamFields, Background, CallToAction, Colors, Feedback, FontDetailsType, FooterSocials, FrontMatter, Header, Integrations, LayoutType, Logo, ModeToggle, PageFrontMatter, Redirects, Rounded, SEO, Search, SearchType, Settings, Sidebar, SidebarMulti, Structure, StyleSidebar, Styling, SubHeader, ThemeType, Topbar };
1029
+ export type { API, APIAuth, APIFile, APIFileAdvanced, APIFileMap, APIInfo, APIInfoRequest, APIPlayground, Anchor, AnchorRoot, Banner, Coder, Engine, EnginePaths, EngineUniform, HeadConfig, Header, IconLibrary, Icons, IntegrationAnalytics, IntegrationAppGithubStar, IntegrationApps, IntegrationSearch, Integrations, Logo, MetaTags, Metadata, MetadataMap, Navigation, PageLayout, PageMetaUniform, PageMetaUniformDetails, PageURL, PluginConfig, Plugins, Redirects, SEO, Script, SearchType, Segment, SegmentPage, Settings, Sidebar, SidebarNavigation, SidebarRoute, Theme, ThemePresetName, VirtualPage };