@docusaurus/theme-classic 2.4.0 → 3.0.0-alpha.0

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.
Files changed (170) hide show
  1. package/lib/getSwizzleConfig.js +99 -7
  2. package/lib/index.js +20 -6
  3. package/lib/nprogress.d.ts +1 -1
  4. package/lib/options.js +1 -0
  5. package/lib/theme/Admonition/Icon/Caution.d.ts +9 -0
  6. package/lib/theme/Admonition/Icon/Caution.js +17 -0
  7. package/lib/theme/Admonition/Icon/Danger.d.ts +9 -0
  8. package/lib/theme/Admonition/Icon/Danger.js +17 -0
  9. package/lib/theme/Admonition/Icon/Info.d.ts +9 -0
  10. package/lib/theme/Admonition/Icon/Info.js +17 -0
  11. package/lib/theme/Admonition/Icon/Note.d.ts +9 -0
  12. package/lib/theme/Admonition/Icon/Note.js +17 -0
  13. package/lib/theme/Admonition/Icon/Tip.d.ts +9 -0
  14. package/lib/theme/Admonition/Icon/Tip.js +17 -0
  15. package/lib/theme/Admonition/Layout/index.d.ts +9 -0
  16. package/lib/theme/Admonition/Layout/index.js +45 -0
  17. package/lib/theme/Admonition/{styles.module.css → Layout/styles.module.css} +4 -0
  18. package/lib/theme/Admonition/Type/Caution.d.ts +9 -0
  19. package/lib/theme/Admonition/Type/Caution.js +32 -0
  20. package/lib/theme/Admonition/Type/Danger.d.ts +9 -0
  21. package/lib/theme/Admonition/Type/Danger.js +32 -0
  22. package/lib/theme/Admonition/Type/Info.d.ts +9 -0
  23. package/lib/theme/Admonition/Type/Info.js +32 -0
  24. package/lib/theme/Admonition/Type/Note.d.ts +9 -0
  25. package/lib/theme/Admonition/Type/Note.js +32 -0
  26. package/lib/theme/Admonition/Type/Tip.d.ts +9 -0
  27. package/lib/theme/Admonition/Type/Tip.js +32 -0
  28. package/lib/theme/Admonition/Types.d.ts +12 -0
  29. package/lib/theme/Admonition/Types.js +33 -0
  30. package/lib/theme/Admonition/index.d.ts +1 -1
  31. package/lib/theme/Admonition/index.js +12 -171
  32. package/lib/theme/BlogArchivePage/index.js +7 -2
  33. package/lib/theme/BlogPostPage/index.js +3 -1
  34. package/lib/theme/BlogSidebar/Desktop/index.js +3 -1
  35. package/lib/theme/BlogSidebar/Mobile/index.js +3 -1
  36. package/lib/theme/BlogTagsListPage/index.js +2 -1
  37. package/lib/theme/BlogTagsPostsPage/index.js +4 -2
  38. package/lib/theme/CodeBlock/CopyButton/index.js +4 -6
  39. package/lib/theme/CodeBlock/WordWrapButton/index.js +2 -9
  40. package/lib/theme/DocBreadcrumbs/index.js +6 -2
  41. package/lib/theme/DocCard/index.js +8 -4
  42. package/lib/theme/DocItem/Layout/index.js +5 -0
  43. package/lib/theme/DocPaginator/index.js +1 -1
  44. package/lib/theme/{DocPage → DocRoot}/Layout/Main/index.d.ts +2 -2
  45. package/lib/theme/{DocPage → DocRoot}/Layout/Main/index.js +1 -1
  46. package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.d.ts +2 -2
  47. package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.js +1 -1
  48. package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/index.d.ts +2 -2
  49. package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/index.js +8 -3
  50. package/lib/theme/{DocPage → DocRoot}/Layout/index.d.ts +2 -2
  51. package/lib/theme/{DocPage → DocRoot}/Layout/index.js +9 -10
  52. package/lib/theme/{DocPage → DocRoot}/Layout/styles.module.css +1 -2
  53. package/lib/theme/{DocPage → DocRoot}/index.d.ts +2 -2
  54. package/lib/theme/DocRoot/index.js +31 -0
  55. package/lib/theme/DocSidebarItem/Category/index.js +3 -3
  56. package/lib/theme/DocSidebarItems/index.js +6 -4
  57. package/lib/theme/DocTagDocListPage/index.d.ts +1 -1
  58. package/lib/theme/DocTagDocListPage/index.js +53 -39
  59. package/lib/theme/DocTagsListPage/index.d.ts +1 -1
  60. package/lib/theme/DocTagsListPage/index.js +26 -17
  61. package/lib/theme/DocVersionRoot/index.d.ts +10 -0
  62. package/lib/theme/DocVersionRoot/index.js +46 -0
  63. package/lib/theme/DocsRoot/index.d.ts +10 -0
  64. package/lib/theme/DocsRoot/index.js +18 -0
  65. package/lib/theme/EditThisPage/index.js +3 -6
  66. package/lib/theme/ErrorPageContent.js +3 -2
  67. package/lib/theme/{MDXComponents/Head.d.ts → Icon/Copy/index.d.ts} +2 -2
  68. package/lib/theme/Icon/Copy/index.js +17 -0
  69. package/lib/theme/Icon/Success/index.d.ts +9 -0
  70. package/lib/theme/Icon/Success/index.js +17 -0
  71. package/lib/theme/Icon/WordWrap/index.d.ts +9 -0
  72. package/lib/theme/Icon/WordWrap/index.js +17 -0
  73. package/lib/theme/MDXComponents/Code.js +2 -36
  74. package/lib/theme/MDXComponents/Details.js +1 -1
  75. package/lib/theme/MDXComponents/Pre.d.ts +2 -2
  76. package/lib/theme/MDXComponents/Pre.js +4 -11
  77. package/lib/theme/MDXComponents/index.js +3 -3
  78. package/lib/theme/MDXContent/index.js +1 -0
  79. package/lib/theme/MDXPage/index.js +16 -4
  80. package/lib/theme/NavbarItem/DocNavbarItem.js +4 -3
  81. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +1 -1
  82. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -1
  83. package/lib/theme/NotFound/Content/index.d.ts +9 -0
  84. package/lib/theme/NotFound/Content/index.js +42 -0
  85. package/lib/theme/{NotFound.d.ts → NotFound/index.d.ts} +1 -1
  86. package/lib/theme/NotFound/index.js +25 -0
  87. package/lib/theme/TOCItems/Tree.js +3 -4
  88. package/lib/theme/Tabs/index.js +4 -2
  89. package/lib/theme/TagsListByLetter/index.js +4 -1
  90. package/lib/theme/ThemedImage/index.js +8 -24
  91. package/lib/theme/Unlisted/index.d.ts +9 -0
  92. package/lib/theme/Unlisted/index.js +38 -0
  93. package/package.json +24 -24
  94. package/src/getSwizzleConfig.ts +107 -8
  95. package/src/index.ts +21 -6
  96. package/src/nprogress.ts +2 -1
  97. package/src/options.ts +1 -0
  98. package/src/theme/Admonition/Icon/Caution.tsx +20 -0
  99. package/src/theme/Admonition/Icon/Danger.tsx +20 -0
  100. package/src/theme/Admonition/Icon/Info.tsx +20 -0
  101. package/src/theme/Admonition/Icon/Note.tsx +20 -0
  102. package/src/theme/Admonition/Icon/Tip.tsx +20 -0
  103. package/src/theme/Admonition/Layout/index.tsx +57 -0
  104. package/src/theme/Admonition/{styles.module.css → Layout/styles.module.css} +4 -0
  105. package/src/theme/Admonition/Type/Caution.tsx +37 -0
  106. package/src/theme/Admonition/Type/Danger.tsx +37 -0
  107. package/src/theme/Admonition/Type/Info.tsx +37 -0
  108. package/src/theme/Admonition/Type/Note.tsx +37 -0
  109. package/src/theme/Admonition/Type/Tip.tsx +37 -0
  110. package/src/theme/Admonition/Types.tsx +38 -0
  111. package/src/theme/Admonition/index.tsx +13 -194
  112. package/src/theme/BlogArchivePage/index.tsx +7 -2
  113. package/src/theme/BlogPostPage/index.tsx +3 -1
  114. package/src/theme/BlogSidebar/Desktop/index.tsx +3 -1
  115. package/src/theme/BlogSidebar/Mobile/index.tsx +3 -1
  116. package/src/theme/BlogTagsListPage/index.tsx +2 -1
  117. package/src/theme/BlogTagsPostsPage/index.tsx +4 -2
  118. package/src/theme/CodeBlock/CopyButton/index.tsx +4 -6
  119. package/src/theme/CodeBlock/WordWrapButton/index.tsx +2 -9
  120. package/src/theme/DocBreadcrumbs/index.tsx +6 -2
  121. package/src/theme/DocCard/index.tsx +11 -6
  122. package/src/theme/DocItem/Layout/index.tsx +5 -0
  123. package/src/theme/DocPaginator/index.tsx +1 -1
  124. package/src/theme/{DocPage → DocRoot}/Layout/Main/index.tsx +2 -2
  125. package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.tsx +2 -2
  126. package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/index.tsx +9 -4
  127. package/src/theme/{DocPage → DocRoot}/Layout/index.tsx +10 -11
  128. package/src/theme/{DocPage → DocRoot}/Layout/styles.module.css +1 -2
  129. package/src/theme/DocRoot/index.tsx +34 -0
  130. package/src/theme/DocSidebarItem/Category/index.tsx +3 -3
  131. package/src/theme/DocSidebarItems/index.tsx +6 -4
  132. package/src/theme/DocTagDocListPage/index.tsx +60 -39
  133. package/src/theme/DocTagsListPage/index.tsx +33 -17
  134. package/src/theme/DocVersionRoot/index.tsx +51 -0
  135. package/src/theme/DocsRoot/index.tsx +22 -0
  136. package/src/theme/EditThisPage/index.tsx +3 -6
  137. package/src/theme/ErrorPageContent.tsx +3 -2
  138. package/src/theme/Icon/Copy/index.tsx +20 -0
  139. package/src/theme/Icon/Success/index.tsx +20 -0
  140. package/src/theme/Icon/WordWrap/index.tsx +20 -0
  141. package/src/theme/MDXComponents/Code.tsx +2 -39
  142. package/src/theme/MDXComponents/Details.tsx +1 -2
  143. package/src/theme/MDXComponents/Pre.tsx +5 -13
  144. package/src/theme/MDXComponents/index.tsx +3 -3
  145. package/src/theme/MDXContent/index.tsx +1 -0
  146. package/src/theme/MDXPage/index.tsx +16 -4
  147. package/src/theme/NavbarItem/DocNavbarItem.tsx +4 -3
  148. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +2 -1
  149. package/src/theme/NotFound/Content/index.tsx +45 -0
  150. package/src/theme/NotFound/index.tsx +27 -0
  151. package/src/theme/SkipToContent/index.tsx +0 -1
  152. package/src/theme/TOCItems/Tree.tsx +3 -4
  153. package/src/theme/Tabs/index.tsx +4 -2
  154. package/src/theme/TagsListByLetter/index.tsx +4 -2
  155. package/src/theme/ThemedImage/index.tsx +8 -31
  156. package/src/theme/Unlisted/index.tsx +42 -0
  157. package/src/theme/prism-include-languages.ts +2 -1
  158. package/src/theme-classic.d.ts +154 -20
  159. package/lib/theme/DocPage/index.js +0 -67
  160. package/lib/theme/MDXComponents/Head.js +0 -23
  161. package/lib/theme/NotFound.js +0 -52
  162. package/src/theme/DocPage/index.tsx +0 -71
  163. package/src/theme/MDXComponents/Head.tsx +0 -29
  164. package/src/theme/NotFound.tsx +0 -54
  165. /package/lib/theme/{DocPage → DocRoot}/Layout/Main/styles.module.css +0 -0
  166. /package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
  167. /package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/styles.module.css +0 -0
  168. /package/src/theme/{DocPage → DocRoot}/Layout/Main/styles.module.css +0 -0
  169. /package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
  170. /package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/styles.module.css +0 -0
@@ -44,13 +44,114 @@ declare module '@theme/Admonition' {
44
44
 
45
45
  export interface Props {
46
46
  readonly children: ReactNode;
47
- readonly type: 'note' | 'tip' | 'danger' | 'info' | 'caution';
47
+ readonly type: string;
48
48
  readonly icon?: ReactNode;
49
49
  readonly title?: ReactNode;
50
+ readonly className?: string;
50
51
  }
52
+
51
53
  export default function Admonition(props: Props): JSX.Element;
52
54
  }
53
55
 
56
+ declare module '@theme/Admonition/Type/Note' {
57
+ import type {Props as AdmonitionProps} from '@theme/Admonition';
58
+
59
+ export interface Props extends AdmonitionProps {}
60
+ export default function AdmonitionTypeNote(props: Props): JSX.Element;
61
+ }
62
+
63
+ declare module '@theme/Admonition/Type/Info' {
64
+ import type {Props as AdmonitionProps} from '@theme/Admonition';
65
+
66
+ export interface Props extends AdmonitionProps {}
67
+ export default function AdmonitionTypeInfo(props: Props): JSX.Element;
68
+ }
69
+
70
+ declare module '@theme/Admonition/Type/Tip' {
71
+ import type {Props as AdmonitionProps} from '@theme/Admonition';
72
+
73
+ export interface Props extends AdmonitionProps {}
74
+ export default function AdmonitionTypeTip(props: Props): JSX.Element;
75
+ }
76
+
77
+ declare module '@theme/Admonition/Type/Caution' {
78
+ import type {Props as AdmonitionProps} from '@theme/Admonition';
79
+
80
+ export interface Props extends AdmonitionProps {}
81
+ export default function AdmonitionTypeCaution(props: Props): JSX.Element;
82
+ }
83
+
84
+ declare module '@theme/Admonition/Type/Danger' {
85
+ import type {Props as AdmonitionProps} from '@theme/Admonition';
86
+
87
+ export interface Props extends AdmonitionProps {}
88
+ export default function AdmonitionTypeDanger(props: Props): JSX.Element;
89
+ }
90
+
91
+ declare module '@theme/Admonition/Types' {
92
+ import type {ComponentType} from 'react';
93
+ import type {Props} from '@theme/Admonition';
94
+
95
+ const AdmonitionTypes: {
96
+ [admonitionType: string]: ComponentType<Props>;
97
+ };
98
+
99
+ export default AdmonitionTypes;
100
+ }
101
+
102
+ declare module '@theme/Admonition/Layout' {
103
+ import type {ReactNode} from 'react';
104
+
105
+ export interface Props {
106
+ readonly children: ReactNode;
107
+ readonly type: string;
108
+ readonly icon?: ReactNode;
109
+ readonly title?: ReactNode;
110
+ readonly className?: string;
111
+ }
112
+ export default function AdmonitionLayout(props: Props): JSX.Element;
113
+ }
114
+
115
+ declare module '@theme/Admonition/Icon/Note' {
116
+ import type {ComponentProps} from 'react';
117
+
118
+ export interface Props extends ComponentProps<'svg'> {}
119
+
120
+ export default function AdmonitionIconNote(props: Props): JSX.Element;
121
+ }
122
+
123
+ declare module '@theme/Admonition/Icon/Tip' {
124
+ import type {ComponentProps} from 'react';
125
+
126
+ export interface Props extends ComponentProps<'svg'> {}
127
+
128
+ export default function AdmonitionIconTip(props: Props): JSX.Element;
129
+ }
130
+
131
+ declare module '@theme/Admonition/Icon/Caution' {
132
+ import type {ComponentProps} from 'react';
133
+
134
+ export interface Props extends ComponentProps<'svg'> {}
135
+
136
+ export default function AdmonitionIconCaution(props: Props): JSX.Element;
137
+ }
138
+
139
+ declare module '@theme/Admonition/Icon/Danger' {
140
+ import type {ComponentProps} from 'react';
141
+
142
+ export interface Props extends ComponentProps<'svg'> {}
143
+
144
+ export default function AdmonitionIconDanger(props: Props): JSX.Element;
145
+ }
146
+
147
+ declare module '@theme/Admonition/Icon/Info' {
148
+ import type {ComponentProps} from 'react';
149
+
150
+ export interface Props extends ComponentProps<'svg'> {}
151
+
152
+ export default function AdmonitionIconInfo(props: Props): JSX.Element;
153
+ }
154
+
54
155
  declare module '@theme/AnnouncementBar' {
55
156
  export default function AnnouncementBar(): JSX.Element | null;
56
157
  }
@@ -379,17 +480,17 @@ declare module '@theme/DocItem/Footer' {
379
480
  export default function DocItemFooter(): JSX.Element;
380
481
  }
381
482
 
382
- declare module '@theme/DocPage/Layout' {
483
+ declare module '@theme/DocRoot/Layout' {
383
484
  import type {ReactNode} from 'react';
384
485
 
385
486
  export interface Props {
386
487
  readonly children: ReactNode;
387
488
  }
388
489
 
389
- export default function DocPageLayout(props: Props): JSX.Element;
490
+ export default function DocRootLayout(props: Props): JSX.Element;
390
491
  }
391
492
 
392
- declare module '@theme/DocPage/Layout/Sidebar' {
493
+ declare module '@theme/DocRoot/Layout/Sidebar' {
393
494
  import type {Dispatch, SetStateAction} from 'react';
394
495
  import type {PropSidebar} from '@docusaurus/plugin-content-docs';
395
496
 
@@ -399,20 +500,20 @@ declare module '@theme/DocPage/Layout/Sidebar' {
399
500
  readonly setHiddenSidebarContainer: Dispatch<SetStateAction<boolean>>;
400
501
  }
401
502
 
402
- export default function DocPageLayoutSidebar(props: Props): JSX.Element;
503
+ export default function DocRootLayoutSidebar(props: Props): JSX.Element;
403
504
  }
404
505
 
405
- declare module '@theme/DocPage/Layout/Sidebar/ExpandButton' {
506
+ declare module '@theme/DocRoot/Layout/Sidebar/ExpandButton' {
406
507
  export interface Props {
407
508
  toggleSidebar: () => void;
408
509
  }
409
510
 
410
- export default function DocPageLayoutSidebarExpandButton(
511
+ export default function DocRootLayoutSidebarExpandButton(
411
512
  props: Props,
412
513
  ): JSX.Element;
413
514
  }
414
515
 
415
- declare module '@theme/DocPage/Layout/Main' {
516
+ declare module '@theme/DocRoot/Layout/Main' {
416
517
  import type {ReactNode} from 'react';
417
518
 
418
519
  export interface Props {
@@ -420,7 +521,7 @@ declare module '@theme/DocPage/Layout/Main' {
420
521
  readonly children: ReactNode;
421
522
  }
422
523
 
423
- export default function DocPageLayoutMain(props: Props): JSX.Element;
524
+ export default function DocRootLayoutMain(props: Props): JSX.Element;
424
525
  }
425
526
 
426
527
  declare module '@theme/DocPaginator' {
@@ -662,6 +763,14 @@ declare module '@theme/Heading' {
662
763
  export default function Heading(props: Props): JSX.Element;
663
764
  }
664
765
 
766
+ declare module '@theme/NotFound/Content' {
767
+ export interface Props {
768
+ readonly className?: string;
769
+ }
770
+
771
+ export default function NotFoundContent(props: Props): JSX.Element;
772
+ }
773
+
665
774
  declare module '@theme/Layout' {
666
775
  import type {ReactNode} from 'react';
667
776
 
@@ -752,14 +861,6 @@ declare module '@theme/MDXComponents/Img' {
752
861
  export default function MDXImg(props: Props): JSX.Element;
753
862
  }
754
863
 
755
- declare module '@theme/MDXComponents/Head' {
756
- import type {ComponentProps} from 'react';
757
-
758
- export interface Props extends ComponentProps<'head'> {}
759
-
760
- export default function MDXHead(props: Props): JSX.Element;
761
- }
762
-
763
864
  declare module '@theme/MDXComponents/Heading' {
764
865
  import type {ComponentProps} from 'react';
765
866
  import type Heading from '@theme/Heading';
@@ -780,7 +881,6 @@ declare module '@theme/MDXComponents/Pre' {
780
881
  declare module '@theme/MDXComponents' {
781
882
  import type {ComponentType, ComponentProps} from 'react';
782
883
 
783
- import type MDXHead from '@theme/MDXComponents/Head';
784
884
  import type MDXCode from '@theme/MDXComponents/Code';
785
885
  import type MDXA from '@theme/MDXComponents/A';
786
886
  import type MDXPre from '@theme/MDXComponents/Pre';
@@ -789,13 +889,14 @@ declare module '@theme/MDXComponents' {
789
889
  import type MDXImg from '@theme/MDXComponents/Img';
790
890
  import type Admonition from '@theme/Admonition';
791
891
  import type Mermaid from '@theme/Mermaid';
892
+ import type Head from '@docusaurus/Head';
792
893
 
793
894
  export type MDXComponentsObject = {
794
- readonly head: typeof MDXHead;
895
+ readonly Head: typeof Head;
896
+ readonly Details: typeof MDXDetails;
795
897
  readonly code: typeof MDXCode;
796
898
  readonly a: typeof MDXA;
797
899
  readonly pre: typeof MDXPre;
798
- readonly details: typeof MDXDetails;
799
900
  readonly ul: typeof MDXUl;
800
901
  readonly img: typeof MDXImg;
801
902
  readonly h1: (props: ComponentProps<'h1'>) => JSX.Element;
@@ -963,6 +1064,7 @@ declare module '@theme/NavbarItem/LocaleDropdownNavbarItem' {
963
1064
  export interface Props extends DropdownNavbarItemProps {
964
1065
  readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
965
1066
  readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
1067
+ readonly queryString?: string;
966
1068
  }
967
1069
 
968
1070
  export default function LocaleDropdownNavbarItem(props: Props): JSX.Element;
@@ -1322,6 +1424,14 @@ declare module '@theme/Icon/Close' {
1322
1424
  export default function IconClose(props: Props): JSX.Element;
1323
1425
  }
1324
1426
 
1427
+ declare module '@theme/Icon/Copy' {
1428
+ import type {ComponentProps} from 'react';
1429
+
1430
+ export interface Props extends ComponentProps<'svg'> {}
1431
+
1432
+ export default function IconCopy(props: Props): JSX.Element;
1433
+ }
1434
+
1325
1435
  declare module '@theme/Icon/Language' {
1326
1436
  import type {ComponentProps} from 'react';
1327
1437
 
@@ -1330,6 +1440,14 @@ declare module '@theme/Icon/Language' {
1330
1440
  export default function IconLanguage(props: Props): JSX.Element;
1331
1441
  }
1332
1442
 
1443
+ declare module '@theme/Icon/Success' {
1444
+ import type {ComponentProps} from 'react';
1445
+
1446
+ export interface Props extends ComponentProps<'svg'> {}
1447
+
1448
+ export default function IconSuccess(props: Props): JSX.Element;
1449
+ }
1450
+
1333
1451
  declare module '@theme/Icon/ExternalLink' {
1334
1452
  import type {ComponentProps} from 'react';
1335
1453
 
@@ -1338,6 +1456,14 @@ declare module '@theme/Icon/ExternalLink' {
1338
1456
  export default function IconExternalLink(props: Props): JSX.Element;
1339
1457
  }
1340
1458
 
1459
+ declare module '@theme/Icon/WordWrap' {
1460
+ import type {ComponentProps} from 'react';
1461
+
1462
+ export interface Props extends ComponentProps<'svg'> {}
1463
+
1464
+ export default function IconWordWrap(props: Props): JSX.Element;
1465
+ }
1466
+
1341
1467
  declare module '@theme/TagsListByLetter' {
1342
1468
  import type {TagsListItem} from '@docusaurus/utils';
1343
1469
 
@@ -1365,6 +1491,14 @@ declare module '@theme/Tag' {
1365
1491
  export default function Tag(props: Props): JSX.Element;
1366
1492
  }
1367
1493
 
1494
+ declare module '@theme/Unlisted' {
1495
+ export interface Props {
1496
+ className?: string;
1497
+ }
1498
+
1499
+ export default function Unlisted(props: Props): JSX.Element;
1500
+ }
1501
+
1368
1502
  declare module '@theme/prism-include-languages' {
1369
1503
  import type * as PrismNamespace from 'prismjs';
1370
1504
 
@@ -1,67 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import React from 'react';
8
- import clsx from 'clsx';
9
- import {
10
- HtmlClassNameProvider,
11
- ThemeClassNames,
12
- PageMetadata,
13
- } from '@docusaurus/theme-common';
14
- import {
15
- docVersionSearchTag,
16
- DocsSidebarProvider,
17
- DocsVersionProvider,
18
- useDocRouteMetadata,
19
- } from '@docusaurus/theme-common/internal';
20
- import DocPageLayout from '@theme/DocPage/Layout';
21
- import NotFound from '@theme/NotFound';
22
- import SearchMetadata from '@theme/SearchMetadata';
23
- function DocPageMetadata(props) {
24
- const {versionMetadata} = props;
25
- return (
26
- <>
27
- <SearchMetadata
28
- version={versionMetadata.version}
29
- tag={docVersionSearchTag(
30
- versionMetadata.pluginId,
31
- versionMetadata.version,
32
- )}
33
- />
34
- <PageMetadata>
35
- {versionMetadata.noIndex && (
36
- <meta name="robots" content="noindex, nofollow" />
37
- )}
38
- </PageMetadata>
39
- </>
40
- );
41
- }
42
- export default function DocPage(props) {
43
- const {versionMetadata} = props;
44
- const currentDocRouteMetadata = useDocRouteMetadata(props);
45
- if (!currentDocRouteMetadata) {
46
- return <NotFound />;
47
- }
48
- const {docElement, sidebarName, sidebarItems} = currentDocRouteMetadata;
49
- return (
50
- <>
51
- <DocPageMetadata {...props} />
52
- <HtmlClassNameProvider
53
- className={clsx(
54
- // TODO: it should be removed from here
55
- ThemeClassNames.wrapper.docsPages,
56
- ThemeClassNames.page.docsDocPage,
57
- props.versionMetadata.className,
58
- )}>
59
- <DocsVersionProvider version={versionMetadata}>
60
- <DocsSidebarProvider name={sidebarName} items={sidebarItems}>
61
- <DocPageLayout>{docElement}</DocPageLayout>
62
- </DocsSidebarProvider>
63
- </DocsVersionProvider>
64
- </HtmlClassNameProvider>
65
- </>
66
- );
67
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import React from 'react';
8
- import Head from '@docusaurus/Head';
9
- // MDX elements are wrapped through the MDX pragma. In some cases (notably usage
10
- // with Head/Helmet) we need to unwrap those elements.
11
- function unwrapMDXElement(element) {
12
- if (element.props?.mdxType && element.props.originalType) {
13
- const {mdxType, originalType, ...newProps} = element.props;
14
- return React.createElement(element.props.originalType, newProps);
15
- }
16
- return element;
17
- }
18
- export default function MDXHead(props) {
19
- const unwrappedChildren = React.Children.map(props.children, (child) =>
20
- React.isValidElement(child) ? unwrapMDXElement(child) : child,
21
- );
22
- return <Head {...props}>{unwrappedChildren}</Head>;
23
- }
@@ -1,52 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import React from 'react';
8
- import Translate, {translate} from '@docusaurus/Translate';
9
- import {PageMetadata} from '@docusaurus/theme-common';
10
- import Layout from '@theme/Layout';
11
- export default function NotFound() {
12
- return (
13
- <>
14
- <PageMetadata
15
- title={translate({
16
- id: 'theme.NotFound.title',
17
- message: 'Page Not Found',
18
- })}
19
- />
20
- <Layout>
21
- <main className="container margin-vert--xl">
22
- <div className="row">
23
- <div className="col col--6 col--offset-3">
24
- <h1 className="hero__title">
25
- <Translate
26
- id="theme.NotFound.title"
27
- description="The title of the 404 page">
28
- Page Not Found
29
- </Translate>
30
- </h1>
31
- <p>
32
- <Translate
33
- id="theme.NotFound.p1"
34
- description="The first paragraph of the 404 page">
35
- We could not find what you were looking for.
36
- </Translate>
37
- </p>
38
- <p>
39
- <Translate
40
- id="theme.NotFound.p2"
41
- description="The 2nd paragraph of the 404 page">
42
- Please contact the owner of the site that linked you to the
43
- original URL and let them know their link is broken.
44
- </Translate>
45
- </p>
46
- </div>
47
- </div>
48
- </main>
49
- </Layout>
50
- </>
51
- );
52
- }
@@ -1,71 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import React from 'react';
9
- import clsx from 'clsx';
10
- import {
11
- HtmlClassNameProvider,
12
- ThemeClassNames,
13
- PageMetadata,
14
- } from '@docusaurus/theme-common';
15
- import {
16
- docVersionSearchTag,
17
- DocsSidebarProvider,
18
- DocsVersionProvider,
19
- useDocRouteMetadata,
20
- } from '@docusaurus/theme-common/internal';
21
- import DocPageLayout from '@theme/DocPage/Layout';
22
- import NotFound from '@theme/NotFound';
23
- import SearchMetadata from '@theme/SearchMetadata';
24
- import type {Props} from '@theme/DocPage';
25
-
26
- function DocPageMetadata(props: Props): JSX.Element {
27
- const {versionMetadata} = props;
28
- return (
29
- <>
30
- <SearchMetadata
31
- version={versionMetadata.version}
32
- tag={docVersionSearchTag(
33
- versionMetadata.pluginId,
34
- versionMetadata.version,
35
- )}
36
- />
37
- <PageMetadata>
38
- {versionMetadata.noIndex && (
39
- <meta name="robots" content="noindex, nofollow" />
40
- )}
41
- </PageMetadata>
42
- </>
43
- );
44
- }
45
-
46
- export default function DocPage(props: Props): JSX.Element {
47
- const {versionMetadata} = props;
48
- const currentDocRouteMetadata = useDocRouteMetadata(props);
49
- if (!currentDocRouteMetadata) {
50
- return <NotFound />;
51
- }
52
- const {docElement, sidebarName, sidebarItems} = currentDocRouteMetadata;
53
- return (
54
- <>
55
- <DocPageMetadata {...props} />
56
- <HtmlClassNameProvider
57
- className={clsx(
58
- // TODO: it should be removed from here
59
- ThemeClassNames.wrapper.docsPages,
60
- ThemeClassNames.page.docsDocPage,
61
- props.versionMetadata.className,
62
- )}>
63
- <DocsVersionProvider version={versionMetadata}>
64
- <DocsSidebarProvider name={sidebarName} items={sidebarItems}>
65
- <DocPageLayout>{docElement}</DocPageLayout>
66
- </DocsSidebarProvider>
67
- </DocsVersionProvider>
68
- </HtmlClassNameProvider>
69
- </>
70
- );
71
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import React, {type ReactElement} from 'react';
9
- import Head, {type Props as HeadProps} from '@docusaurus/Head';
10
- import type {Props} from '@theme/MDXComponents/Head';
11
-
12
- // MDX elements are wrapped through the MDX pragma. In some cases (notably usage
13
- // with Head/Helmet) we need to unwrap those elements.
14
- function unwrapMDXElement(
15
- element: ReactElement<{mdxType?: string; originalType?: string} | undefined>,
16
- ) {
17
- if (element.props?.mdxType && element.props.originalType) {
18
- const {mdxType, originalType, ...newProps} = element.props;
19
- return React.createElement(element.props.originalType, newProps);
20
- }
21
- return element;
22
- }
23
-
24
- export default function MDXHead(props: Props): JSX.Element {
25
- const unwrappedChildren = React.Children.map(props.children, (child) =>
26
- React.isValidElement(child) ? unwrapMDXElement(child) : child,
27
- );
28
- return <Head {...(props as HeadProps)}>{unwrappedChildren}</Head>;
29
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import React from 'react';
9
- import Translate, {translate} from '@docusaurus/Translate';
10
- import {PageMetadata} from '@docusaurus/theme-common';
11
- import Layout from '@theme/Layout';
12
-
13
- export default function NotFound(): JSX.Element {
14
- return (
15
- <>
16
- <PageMetadata
17
- title={translate({
18
- id: 'theme.NotFound.title',
19
- message: 'Page Not Found',
20
- })}
21
- />
22
- <Layout>
23
- <main className="container margin-vert--xl">
24
- <div className="row">
25
- <div className="col col--6 col--offset-3">
26
- <h1 className="hero__title">
27
- <Translate
28
- id="theme.NotFound.title"
29
- description="The title of the 404 page">
30
- Page Not Found
31
- </Translate>
32
- </h1>
33
- <p>
34
- <Translate
35
- id="theme.NotFound.p1"
36
- description="The first paragraph of the 404 page">
37
- We could not find what you were looking for.
38
- </Translate>
39
- </p>
40
- <p>
41
- <Translate
42
- id="theme.NotFound.p2"
43
- description="The 2nd paragraph of the 404 page">
44
- Please contact the owner of the site that linked you to the
45
- original URL and let them know their link is broken.
46
- </Translate>
47
- </p>
48
- </div>
49
- </div>
50
- </main>
51
- </Layout>
52
- </>
53
- );
54
- }