@docusaurus/theme-classic 0.0.0-4279 → 0.0.0-4286

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 (154) hide show
  1. package/lib/theme-classic.d.ts +9 -14
  2. package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +1 -2
  3. package/lib-next/theme/Tabs/index.js +14 -7
  4. package/package.json +12 -12
  5. package/src/index.ts +2 -5
  6. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +1 -2
  7. package/src/theme/Tabs/index.tsx +18 -6
  8. package/src/theme-classic.d.ts +9 -14
  9. package/babel.config.js +0 -35
  10. package/lib/__tests__/__snapshots__/translations.test.ts.snap +0 -116
  11. package/lib/__tests__/translations.test.js +0 -112
  12. package/lib/__tests__/validateThemeConfig.test.js +0 -607
  13. package/lib/theme/AnnouncementBar/index.js +0 -68
  14. package/lib/theme/AnnouncementBar/styles.module.css +0 -63
  15. package/lib/theme/BackToTopButton/index.js +0 -140
  16. package/lib/theme/BackToTopButton/styles.module.css +0 -42
  17. package/lib/theme/BlogArchivePage/index.js +0 -89
  18. package/lib/theme/BlogLayout/index.js +0 -51
  19. package/lib/theme/BlogListPage/index.js +0 -60
  20. package/lib/theme/BlogListPaginator/index.js +0 -63
  21. package/lib/theme/BlogPostAuthor/index.js +0 -51
  22. package/lib/theme/BlogPostAuthor/styles.module.css +0 -12
  23. package/lib/theme/BlogPostAuthors/index.js +0 -47
  24. package/lib/theme/BlogPostAuthors/styles.module.css +0 -11
  25. package/lib/theme/BlogPostItem/index.js +0 -152
  26. package/lib/theme/BlogPostItem/styles.module.css +0 -18
  27. package/lib/theme/BlogPostPage/index.js +0 -82
  28. package/lib/theme/BlogPostPaginator/index.js +0 -64
  29. package/lib/theme/BlogSidebar/index.js +0 -49
  30. package/lib/theme/BlogSidebar/styles.module.css +0 -44
  31. package/lib/theme/BlogTagsListPage/index.js +0 -40
  32. package/lib/theme/BlogTagsPostsPage/index.js +0 -86
  33. package/lib/theme/CodeBlock/index.js +0 -133
  34. package/lib/theme/CodeBlock/styles.module.css +0 -65
  35. package/lib/theme/Details/index.js +0 -30
  36. package/lib/theme/Details/styles.module.css +0 -13
  37. package/lib/theme/DocCard/index.js +0 -84
  38. package/lib/theme/DocCard/styles.module.css +0 -43
  39. package/lib/theme/DocCardList/index.js +0 -28
  40. package/lib/theme/DocCategoryGeneratedIndexPage/index.js +0 -57
  41. package/lib/theme/DocCategoryGeneratedIndexPage/styles.module.css +0 -18
  42. package/lib/theme/DocItem/index.js +0 -112
  43. package/lib/theme/DocItem/styles.module.css +0 -22
  44. package/lib/theme/DocItemFooter/index.js +0 -79
  45. package/lib/theme/DocItemFooter/styles.module.css +0 -18
  46. package/lib/theme/DocPage/index.js +0 -154
  47. package/lib/theme/DocPage/styles.module.css +0 -85
  48. package/lib/theme/DocPaginator/index.js +0 -62
  49. package/lib/theme/DocSidebar/index.js +0 -134
  50. package/lib/theme/DocSidebar/styles.module.css +0 -106
  51. package/lib/theme/DocSidebarItem/index.js +0 -209
  52. package/lib/theme/DocSidebarItem/styles.module.css +0 -19
  53. package/lib/theme/DocTagDocListPage/index.js +0 -89
  54. package/lib/theme/DocTagsListPage/index.js +0 -44
  55. package/lib/theme/DocVersionBadge/index.js +0 -34
  56. package/lib/theme/DocVersionBanner/index.js +0 -130
  57. package/lib/theme/EditThisPage/index.js +0 -33
  58. package/lib/theme/ErrorPageContent.js +0 -43
  59. package/lib/theme/Footer/index.js +0 -119
  60. package/lib/theme/Footer/styles.module.css +0 -15
  61. package/lib/theme/Heading/index.js +0 -71
  62. package/lib/theme/Heading/styles.css +0 -22
  63. package/lib/theme/Heading/styles.module.css +0 -19
  64. package/lib/theme/IconArrow/index.js +0 -28
  65. package/lib/theme/IconClose/index.js +0 -31
  66. package/lib/theme/IconEdit/index.js +0 -34
  67. package/lib/theme/IconEdit/styles.module.css +0 -11
  68. package/lib/theme/IconExternalLink/index.js +0 -30
  69. package/lib/theme/IconExternalLink/styles.module.css +0 -12
  70. package/lib/theme/IconLanguage/index.js +0 -29
  71. package/lib/theme/IconMenu/index.js +0 -30
  72. package/lib/theme/LastUpdated/index.js +0 -63
  73. package/lib/theme/Layout/index.js +0 -68
  74. package/lib/theme/Layout/styles.css +0 -27
  75. package/lib/theme/LayoutHead/index.js +0 -149
  76. package/lib/theme/LayoutProviders/index.js +0 -40
  77. package/lib/theme/Logo/index.js +0 -62
  78. package/lib/theme/MDXComponents/index.js +0 -106
  79. package/lib/theme/MDXComponents/styles.css +0 -11
  80. package/lib/theme/MDXPage/index.js +0 -67
  81. package/lib/theme/MDXPage/styles.module.css +0 -10
  82. package/lib/theme/Navbar/index.js +0 -267
  83. package/lib/theme/Navbar/styles.module.css +0 -27
  84. package/lib/theme/NavbarItem/DefaultNavbarItem.js +0 -113
  85. package/lib/theme/NavbarItem/DocNavbarItem.js +0 -62
  86. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +0 -83
  87. package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +0 -43
  88. package/lib/theme/NavbarItem/DropdownNavbarItem.js +0 -155
  89. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +0 -68
  90. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +0 -11
  91. package/lib/theme/NavbarItem/SearchNavbarItem.js +0 -28
  92. package/lib/theme/NavbarItem/index.js +0 -74
  93. package/lib/theme/NotFound.js +0 -57
  94. package/lib/theme/SearchBar.js +0 -15
  95. package/lib/theme/SearchMetadata/index.js +0 -33
  96. package/lib/theme/Seo/index.js +0 -52
  97. package/lib/theme/SkipToContent/index.js +0 -71
  98. package/lib/theme/SkipToContent/styles.module.css +0 -14
  99. package/lib/theme/TOC/index.js +0 -39
  100. package/lib/theme/TOC/styles.module.css +0 -23
  101. package/lib/theme/TOCCollapsible/index.js +0 -53
  102. package/lib/theme/TOCCollapsible/styles.module.css +0 -50
  103. package/lib/theme/TOCInline/index.js +0 -33
  104. package/lib/theme/TOCInline/styles.module.css +0 -12
  105. package/lib/theme/TOCItems/index.js +0 -78
  106. package/lib/theme/TabItem/index.js +0 -32
  107. package/lib/theme/Tabs/__tests__/index.test.js +0 -123
  108. package/lib/theme/Tabs/index.js +0 -173
  109. package/lib/theme/Tabs/styles.module.css +0 -10
  110. package/lib/theme/Tag/index.js +0 -40
  111. package/lib/theme/Tag/styles.module.css +0 -70
  112. package/lib/theme/TagsListByLetter/index.js +0 -48
  113. package/lib/theme/TagsListByLetter/styles.module.css +0 -11
  114. package/lib/theme/TagsListInline/index.js +0 -44
  115. package/lib/theme/TagsListInline/styles.module.css +0 -15
  116. package/lib/theme/ThemeContext.js +0 -21
  117. package/lib/theme/ThemeProvider/index.js +0 -43
  118. package/lib/theme/ThemedImage/index.js +0 -47
  119. package/lib/theme/ThemedImage/styles.module.css +0 -18
  120. package/lib/theme/Toggle/index.js +0 -91
  121. package/lib/theme/Toggle/styles.module.css +0 -105
  122. package/lib/theme/UserPreferencesContext.js +0 -18
  123. package/lib/theme/UserPreferencesProvider/index.js +0 -41
  124. package/lib/theme/hooks/styles.css +0 -10
  125. package/lib/theme/hooks/useDocs.js +0 -18
  126. package/lib/theme/hooks/useHideableNavbar.js +0 -74
  127. package/lib/theme/hooks/useKeyboardNavigation.js +0 -45
  128. package/lib/theme/hooks/useLocationHash.js +0 -28
  129. package/lib/theme/hooks/useLockBodyScroll.js +0 -26
  130. package/lib/theme/hooks/usePrismTheme.js +0 -36
  131. package/lib/theme/hooks/useTabGroupChoice.js +0 -51
  132. package/lib/theme/hooks/useTheme.js +0 -97
  133. package/lib/theme/hooks/useThemeContext.js +0 -31
  134. package/lib/theme/hooks/useUserPreferencesContext.js +0 -31
  135. package/lib/theme/hooks/useWindowSize.js +0 -68
  136. package/lib/theme/prism-include-languages.js +0 -40
  137. package/lib-next/__tests__/__snapshots__/translations.test.ts.snap +0 -116
  138. package/lib-next/__tests__/translations.test.js +0 -128
  139. package/lib-next/__tests__/validateThemeConfig.test.js +0 -607
  140. package/lib-next/admonitions.css +0 -35
  141. package/lib-next/deps.d.ts +0 -13
  142. package/lib-next/index.js +0 -227
  143. package/lib-next/prism-include-languages.js +0 -9
  144. package/lib-next/theme/hooks/useLocationHash.js +0 -20
  145. package/lib-next/theme-classic.d.ts +0 -806
  146. package/lib-next/translations.js +0 -141
  147. package/lib-next/types.d.ts +0 -11
  148. package/lib-next/validateThemeConfig.js +0 -344
  149. package/src/__tests__/__snapshots__/translations.test.ts.snap +0 -116
  150. package/src/__tests__/translations.test.ts +0 -116
  151. package/src/__tests__/validateThemeConfig.test.js +0 -607
  152. package/src/theme/Tabs/__tests__/index.test.tsx +0 -129
  153. package/src/theme/hooks/useLocationHash.ts +0 -25
  154. package/tsconfig.json +0 -11
@@ -1,65 +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
- .codeBlockContainer {
9
- margin-bottom: var(--ifm-leading);
10
- border-radius: var(--ifm-global-radius);
11
- box-shadow: var(--ifm-global-shadow-lw);
12
- overflow: hidden;
13
- }
14
-
15
- .codeBlockContent {
16
- position: relative;
17
- /*rtl:ignore*/
18
- direction: ltr;
19
- }
20
-
21
- .codeBlockTitle {
22
- border-bottom: 1px solid var(--ifm-color-emphasis-300);
23
- font-size: var(--ifm-code-font-size);
24
- font-weight: 500;
25
- padding: 0.75rem var(--ifm-pre-padding);
26
- }
27
-
28
- .codeBlock {
29
- margin: 0;
30
- padding: 0;
31
- border-radius: 0;
32
- }
33
-
34
- .copyButton {
35
- background: rgba(0, 0, 0, 0.3);
36
- border-radius: var(--ifm-global-radius);
37
- color: var(--ifm-color-white);
38
- opacity: 0;
39
- user-select: none;
40
- padding: 0.4rem 0.5rem;
41
- position: absolute;
42
- right: calc(var(--ifm-pre-padding) / 2);
43
- top: calc(var(--ifm-pre-padding) / 2);
44
- transition: opacity 200ms ease-in-out;
45
- }
46
-
47
- .codeBlockTitle:hover + .codeBlockContent .copyButton,
48
- .codeBlockContent:hover > .copyButton,
49
- .copyButton:focus {
50
- opacity: 1;
51
- }
52
-
53
- .codeBlockLines {
54
- font: inherit;
55
- /*rtl:ignore*/
56
- float: left;
57
- min-width: 100%;
58
- padding: var(--ifm-pre-padding);
59
- }
60
-
61
- @media print {
62
- .codeBlockLines {
63
- white-space: pre-wrap;
64
- }
65
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = Details;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _clsx = _interopRequireDefault(require("clsx"));
11
-
12
- var _themeCommon = require("@docusaurus/theme-common");
13
-
14
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- /**
19
- * Copyright (c) Facebook, Inc. and its affiliates.
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- */
24
- // Should we have a custom details/summary comp in Infima instead of reusing alert classes?
25
- const InfimaClasses = 'alert alert--info';
26
-
27
- function Details({ ...props
28
- }) {
29
- return <_themeCommon.Details {...props} className={(0, _clsx.default)(InfimaClasses, _stylesModule.default.details, props.className)} />;
30
- }
@@ -1,13 +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
- .details {
9
- --docusaurus-details-decoration-color: var(--ifm-alert-border-color);
10
- --docusaurus-details-transition: transform var(--ifm-transition-fast) ease;
11
- margin: 0 0 var(--ifm-spacing-vertical);
12
- border: 1px solid var(--ifm-alert-border-color);
13
- }
@@ -1,84 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocCard;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _Link = _interopRequireDefault(require("@docusaurus/Link"));
11
-
12
- var _themeCommon = require("@docusaurus/theme-common");
13
-
14
- var _clsx = _interopRequireDefault(require("clsx"));
15
-
16
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
17
-
18
- var _isInternalUrl = _interopRequireDefault(require("@docusaurus/isInternalUrl"));
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- /**
23
- * Copyright (c) Facebook, Inc. and its affiliates.
24
- *
25
- * This source code is licensed under the MIT license found in the
26
- * LICENSE file in the root directory of this source tree.
27
- */
28
- function CardContainer({
29
- href,
30
- children
31
- }) {
32
- const className = (0, _clsx.default)('card margin-bottom--lg padding--lg', _stylesModule.default.cardContainer, href && _stylesModule.default.cardContainerLink);
33
- return href ? <_Link.default href={href} className={className}>
34
- {children}
35
- </_Link.default> : <div className={className}>{children}</div>;
36
- }
37
-
38
- function CardLayout({
39
- href,
40
- icon,
41
- title,
42
- description
43
- }) {
44
- return <CardContainer href={href}>
45
- <h2 className={(0, _clsx.default)('text--truncate', _stylesModule.default.cardTitle)} title={title}>
46
- {icon} {title}
47
- </h2>
48
- <div className={(0, _clsx.default)('text--truncate', _stylesModule.default.cardDescription)} title={description}>
49
- {description}
50
- </div>
51
- </CardContainer>;
52
- }
53
-
54
- function CardCategory({
55
- item
56
- }) {
57
- const href = (0, _themeCommon.findFirstCategoryLink)(item);
58
- return <CardLayout href={href} icon="🗃️" title={item.label} description={`${item.items.length} items`} />;
59
- }
60
-
61
- function CardLink({
62
- item
63
- }) {
64
- var _item$docId;
65
-
66
- const icon = (0, _isInternalUrl.default)(item.href) ? '📄️' : '🔗';
67
- const doc = (0, _themeCommon.useDocById)((_item$docId = item.docId) !== null && _item$docId !== void 0 ? _item$docId : undefined);
68
- return <CardLayout href={item.href} icon={icon} title={item.label} description={doc === null || doc === void 0 ? void 0 : doc.description} />;
69
- }
70
-
71
- function DocCard({
72
- item
73
- }) {
74
- switch (item.type) {
75
- case 'link':
76
- return <CardLink item={item} />;
77
-
78
- case 'category':
79
- return <CardCategory item={item} />;
80
-
81
- default:
82
- throw new Error(`unknown item type ${JSON.stringify(item)}`);
83
- }
84
- }
@@ -1,43 +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
- .cardContainer {
9
- height: 8rem;
10
-
11
- color: var(--ifm-color-emphasis-800);
12
- --ifm-link-color: var(--ifm-color-emphasis-800);
13
- --ifm-link-hover-color: var(--ifm-color-emphasis-800);
14
- --ifm-link-hover-decoration: none;
15
-
16
- /* box-shadow: var(--ifm-global-shadow-lw); */
17
- box-shadow: 0 1.5px 3px 0 rgba(0, 0, 0, 0.15);
18
- border: 1px solid var(--ifm-color-emphasis-200);
19
- transition: box-shadow var(--ifm-transition-fast) ease,
20
- background-color var(--ifm-transition-fast) ease;
21
- }
22
-
23
- .cardContainer.cardContainerLink:hover {
24
- /* box-shadow: var(--ifm-global-shadow-md); */
25
- box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
26
- }
27
- html[data-theme='dark'] .cardContainer.cardContainerLink:hover {
28
- --ifm-card-background-color: #2d2d2d; /* original, non-hovered color is #242526 */
29
- }
30
-
31
- .cardContainer:not(.cardContainerLink) {
32
- cursor: not-allowed;
33
- }
34
-
35
- .cardTitle {
36
- font-size: 1.2rem;
37
- min-height: 1.2rem;
38
- }
39
-
40
- .cardDescription {
41
- font-size: 0.8rem;
42
- min-height: 0.8rem;
43
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocCardList;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _DocCard = _interopRequireDefault(require("@theme/DocCard"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- /**
15
- * Copyright (c) Facebook, Inc. and its affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */
20
- function DocCardList({
21
- items
22
- }) {
23
- return <div className="row">
24
- {items.map((item, index) => <article key={index} className="col col--6">
25
- <_DocCard.default item={item} />
26
- </article>)}
27
- </div>;
28
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocCategoryGeneratedIndexPage;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _themeCommon = require("@docusaurus/theme-common");
11
-
12
- var _DocCardList = _interopRequireDefault(require("@theme/DocCardList"));
13
-
14
- var _DocPaginator = _interopRequireDefault(require("@theme/DocPaginator"));
15
-
16
- var _Seo = _interopRequireDefault(require("@theme/Seo"));
17
-
18
- var _DocVersionBanner = _interopRequireDefault(require("@theme/DocVersionBanner"));
19
-
20
- var _DocVersionBadge = _interopRequireDefault(require("@theme/DocVersionBadge"));
21
-
22
- var _Heading = require("@theme/Heading");
23
-
24
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
- /**
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */
34
- function DocCategoryGeneratedIndexPage({
35
- categoryGeneratedIndex
36
- }) {
37
- const category = (0, _themeCommon.useCurrentSidebarCategory)();
38
- return <>
39
- <_Seo.default title={categoryGeneratedIndex.title} description={categoryGeneratedIndex.description} />
40
- <div className={_stylesModule.default.generatedIndexPage}>
41
- <_DocVersionBanner.default />
42
- <_DocVersionBadge.default />
43
- <header>
44
- <_Heading.MainHeading className={_stylesModule.default.title}>
45
- {categoryGeneratedIndex.title}
46
- </_Heading.MainHeading>
47
- {categoryGeneratedIndex.description && <p>{categoryGeneratedIndex.description}</p>}
48
- </header>
49
- <main className="margin-top--lg">
50
- <_DocCardList.default items={category.items} />
51
- </main>
52
- <footer className="margin-top--lg">
53
- <_DocPaginator.default previous={categoryGeneratedIndex.navigation.previous} next={categoryGeneratedIndex.navigation.next} />
54
- </footer>
55
- </div>
56
- </>;
57
- }
@@ -1,18 +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
- @media (min-width: 997px) {
9
- .generatedIndexPage {
10
- max-width: 75% !important;
11
- }
12
- }
13
-
14
- /* Duplicated from .markdown h1 */
15
- .title {
16
- --ifm-h1-font-size: 3rem;
17
- margin-bottom: calc(1.25 * var(--ifm-leading));
18
- }
@@ -1,112 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocItem;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _clsx = _interopRequireDefault(require("clsx"));
11
-
12
- var _useWindowSize = _interopRequireDefault(require("@theme/hooks/useWindowSize"));
13
-
14
- var _DocPaginator = _interopRequireDefault(require("@theme/DocPaginator"));
15
-
16
- var _DocVersionBanner = _interopRequireDefault(require("@theme/DocVersionBanner"));
17
-
18
- var _DocVersionBadge = _interopRequireDefault(require("@theme/DocVersionBadge"));
19
-
20
- var _Seo = _interopRequireDefault(require("@theme/Seo"));
21
-
22
- var _DocItemFooter = _interopRequireDefault(require("@theme/DocItemFooter"));
23
-
24
- var _TOC = _interopRequireDefault(require("@theme/TOC"));
25
-
26
- var _TOCCollapsible = _interopRequireDefault(require("@theme/TOCCollapsible"));
27
-
28
- var _Heading = require("@theme/Heading");
29
-
30
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
31
-
32
- var _themeCommon = require("@docusaurus/theme-common");
33
-
34
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
-
36
- /**
37
- * Copyright (c) Facebook, Inc. and its affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */
42
- function DocItem(props) {
43
- const {
44
- content: DocContent
45
- } = props;
46
- const {
47
- metadata,
48
- frontMatter
49
- } = DocContent;
50
- const {
51
- image,
52
- keywords,
53
- hide_title: hideTitle,
54
- hide_table_of_contents: hideTableOfContents,
55
- toc_min_heading_level: tocMinHeadingLevel,
56
- toc_max_heading_level: tocMaxHeadingLevel
57
- } = frontMatter;
58
- const {
59
- description,
60
- title
61
- } = metadata; // We only add a title if:
62
- // - user asks to hide it with frontmatter
63
- // - the markdown content does not already contain a top-level h1 heading
64
-
65
- const shouldAddTitle = !hideTitle && typeof DocContent.contentTitle === 'undefined';
66
- const windowSize = (0, _useWindowSize.default)();
67
- const canRenderTOC = !hideTableOfContents && DocContent.toc && DocContent.toc.length > 0;
68
- const renderTocDesktop = canRenderTOC && (windowSize === 'desktop' || windowSize === 'ssr');
69
- return <>
70
- <_Seo.default {...{
71
- title,
72
- description,
73
- keywords,
74
- image
75
- }} />
76
-
77
- <div className="row">
78
- <div className={(0, _clsx.default)('col', {
79
- [_stylesModule.default.docItemCol]: !hideTableOfContents
80
- })}>
81
- <_DocVersionBanner.default />
82
- <div className={_stylesModule.default.docItemContainer}>
83
- <article>
84
- <_DocVersionBadge.default />
85
-
86
- {canRenderTOC && <_TOCCollapsible.default toc={DocContent.toc} minHeadingLevel={tocMinHeadingLevel} maxHeadingLevel={tocMaxHeadingLevel} className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docTocMobile, _stylesModule.default.tocMobile)} />}
87
-
88
- <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docMarkdown, 'markdown')}>
89
- {
90
- /*
91
- Title can be declared inside md content or declared through frontmatter and added manually
92
- To make both cases consistent, the added title is added under the same div.markdown block
93
- See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
94
- */
95
- }
96
- {shouldAddTitle && <_Heading.MainHeading>{title}</_Heading.MainHeading>}
97
-
98
- <DocContent />
99
- </div>
100
-
101
- <_DocItemFooter.default {...props} />
102
- </article>
103
-
104
- <_DocPaginator.default previous={metadata.previous} next={metadata.next} />
105
- </div>
106
- </div>
107
- {renderTocDesktop && <div className="col col--3">
108
- <_TOC.default toc={DocContent.toc} minHeadingLevel={tocMinHeadingLevel} maxHeadingLevel={tocMaxHeadingLevel} className={_themeCommon.ThemeClassNames.docs.docTocDesktop} />
109
- </div>}
110
- </div>
111
- </>;
112
- }
@@ -1,22 +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
- .docItemContainer article > *:first-child,
9
- .docItemContainer header + * {
10
- margin-top: 0;
11
- }
12
-
13
- @media (min-width: 997px) {
14
- .docItemCol {
15
- max-width: 75% !important;
16
- }
17
-
18
- /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
19
- .tocMobile {
20
- display: none;
21
- }
22
- }
@@ -1,79 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocItemFooter;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _clsx = _interopRequireDefault(require("clsx"));
11
-
12
- var _LastUpdated = _interopRequireDefault(require("@theme/LastUpdated"));
13
-
14
- var _EditThisPage = _interopRequireDefault(require("@theme/EditThisPage"));
15
-
16
- var _TagsListInline = _interopRequireDefault(require("@theme/TagsListInline"));
17
-
18
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
19
-
20
- var _themeCommon = require("@docusaurus/theme-common");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- /**
25
- * Copyright (c) Facebook, Inc. and its affiliates.
26
- *
27
- * This source code is licensed under the MIT license found in the
28
- * LICENSE file in the root directory of this source tree.
29
- */
30
- function TagsRow(props) {
31
- return <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooterTagsRow, 'row margin-bottom--sm')}>
32
- <div className="col">
33
- <_TagsListInline.default {...props} />
34
- </div>
35
- </div>;
36
- }
37
-
38
- function EditMetaRow({
39
- editUrl,
40
- lastUpdatedAt,
41
- lastUpdatedBy,
42
- formattedLastUpdatedAt
43
- }) {
44
- return <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooterEditMetaRow, 'row')}>
45
- <div className="col">{editUrl && <_EditThisPage.default editUrl={editUrl} />}</div>
46
-
47
- <div className={(0, _clsx.default)('col', _stylesModule.default.lastUpdated)}>
48
- {(lastUpdatedAt || lastUpdatedBy) && <_LastUpdated.default lastUpdatedAt={lastUpdatedAt} formattedLastUpdatedAt={formattedLastUpdatedAt} lastUpdatedBy={lastUpdatedBy} />}
49
- </div>
50
- </div>;
51
- }
52
-
53
- function DocItemFooter(props) {
54
- const {
55
- content: DocContent
56
- } = props;
57
- const {
58
- metadata
59
- } = DocContent;
60
- const {
61
- editUrl,
62
- lastUpdatedAt,
63
- formattedLastUpdatedAt,
64
- lastUpdatedBy,
65
- tags
66
- } = metadata;
67
- const canDisplayTagsRow = tags.length > 0;
68
- const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
69
- const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
70
-
71
- if (!canDisplayFooter) {
72
- return null;
73
- }
74
-
75
- return <footer className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooter, 'docusaurus-mt-lg')}>
76
- {canDisplayTagsRow && <TagsRow tags={tags} />}
77
- {canDisplayEditMetaRow && <EditMetaRow editUrl={editUrl} lastUpdatedAt={lastUpdatedAt} lastUpdatedBy={lastUpdatedBy} formattedLastUpdatedAt={formattedLastUpdatedAt} />}
78
- </footer>;
79
- }
@@ -1,18 +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
- .lastUpdated {
9
- margin-top: 0.2rem;
10
- font-style: italic;
11
- font-size: smaller;
12
- }
13
-
14
- @media (min-width: 997px) {
15
- .lastUpdated {
16
- text-align: right;
17
- }
18
- }