docusaurus-theme-openapi-docs 1.4.2 → 1.4.4

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 (128) hide show
  1. package/lib/index.js +5 -8
  2. package/lib/markdown/createDescription.js +1 -2
  3. package/lib/markdown/schema.js +7 -42
  4. package/lib/markdown/utils.js +1 -7
  5. package/lib/theme/ApiDemoPanel/Accept/index.js +1 -10
  6. package/lib/theme/ApiDemoPanel/Accept/slice.js +1 -2
  7. package/lib/theme/ApiDemoPanel/Authorization/auth-types.js +7 -8
  8. package/lib/theme/ApiDemoPanel/Authorization/index.js +1 -19
  9. package/lib/theme/ApiDemoPanel/Authorization/slice.js +7 -21
  10. package/lib/theme/ApiDemoPanel/Body/index.js +14 -47
  11. package/lib/theme/ApiDemoPanel/Body/slice.js +1 -4
  12. package/lib/theme/ApiDemoPanel/CodeTabs/index.js +14 -46
  13. package/lib/theme/ApiDemoPanel/ContentType/index.js +1 -10
  14. package/lib/theme/ApiDemoPanel/ContentType/slice.js +1 -2
  15. package/lib/theme/ApiDemoPanel/Curl/index.js +9 -29
  16. package/lib/theme/ApiDemoPanel/Execute/index.js +6 -23
  17. package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +4 -27
  18. package/lib/theme/ApiDemoPanel/Export/index.js +1 -8
  19. package/lib/theme/ApiDemoPanel/FloatingButton/index.js +1 -5
  20. package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +1 -14
  21. package/lib/theme/ApiDemoPanel/FormItem/index.js +1 -5
  22. package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +1 -8
  23. package/lib/theme/ApiDemoPanel/FormSelect/index.js +1 -6
  24. package/lib/theme/ApiDemoPanel/FormTextInput/index.js +1 -6
  25. package/lib/theme/ApiDemoPanel/LiveEditor/index.js +3 -17
  26. package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +1 -12
  27. package/lib/theme/ApiDemoPanel/ParamOptions/index.js +20 -52
  28. package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +1 -2
  29. package/lib/theme/ApiDemoPanel/Request/index.js +1 -15
  30. package/lib/theme/ApiDemoPanel/Response/index.js +1 -14
  31. package/lib/theme/ApiDemoPanel/Response/slice.js +1 -2
  32. package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -9
  33. package/lib/theme/ApiDemoPanel/Server/index.js +3 -27
  34. package/lib/theme/ApiDemoPanel/Server/slice.js +1 -3
  35. package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +11 -62
  36. package/lib/theme/ApiDemoPanel/index.js +2 -14
  37. package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +5 -11
  38. package/lib/theme/ApiDemoPanel/storage-utils.js +1 -7
  39. package/lib/theme/ApiItem/Layout/index.js +5 -22
  40. package/lib/theme/ApiItem/Layout/styles.module.css +0 -403
  41. package/lib/theme/ApiItem/hooks.js +1 -3
  42. package/lib/theme/ApiItem/index.js +14 -30
  43. package/lib/theme/ApiItem/store.js +1 -14
  44. package/lib/theme/ApiLogo/index.js +1 -4
  45. package/lib/theme/styles.css +428 -0
  46. package/lib/theme-classic.d.ts +5 -0
  47. package/lib-next/index.js +5 -3
  48. package/lib-next/markdown/createDescription.js +1 -1
  49. package/lib-next/markdown/schema.js +7 -35
  50. package/lib-next/markdown/utils.js +1 -4
  51. package/lib-next/theme/ApiDemoPanel/Accept/index.js +1 -4
  52. package/lib-next/theme/ApiDemoPanel/Accept/slice.js +1 -0
  53. package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +7 -4
  54. package/lib-next/theme/ApiDemoPanel/Authorization/index.js +1 -8
  55. package/lib-next/theme/ApiDemoPanel/Authorization/slice.js +12 -14
  56. package/lib-next/theme/ApiDemoPanel/Body/index.js +16 -34
  57. package/lib-next/theme/ApiDemoPanel/Body/slice.js +1 -2
  58. package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +12 -26
  59. package/lib-next/theme/ApiDemoPanel/ContentType/index.js +1 -4
  60. package/lib-next/theme/ApiDemoPanel/ContentType/slice.js +1 -0
  61. package/lib-next/theme/ApiDemoPanel/Curl/index.js +11 -12
  62. package/lib-next/theme/ApiDemoPanel/Execute/index.js +10 -13
  63. package/lib-next/theme/ApiDemoPanel/Execute/makeRequest.js +4 -22
  64. package/lib-next/theme/ApiDemoPanel/Export/index.js +1 -5
  65. package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +1 -2
  66. package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +1 -7
  67. package/lib-next/theme/ApiDemoPanel/FormItem/index.js +1 -2
  68. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +1 -5
  69. package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +1 -3
  70. package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +1 -2
  71. package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +3 -6
  72. package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +1 -9
  73. package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +34 -29
  74. package/lib-next/theme/ApiDemoPanel/ParamOptions/slice.js +1 -0
  75. package/lib-next/theme/ApiDemoPanel/Request/index.js +1 -2
  76. package/lib-next/theme/ApiDemoPanel/Response/index.js +3 -9
  77. package/lib-next/theme/ApiDemoPanel/Response/slice.js +1 -0
  78. package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -5
  79. package/lib-next/theme/ApiDemoPanel/Server/index.js +3 -13
  80. package/lib-next/theme/ApiDemoPanel/Server/slice.js +1 -0
  81. package/lib-next/theme/ApiDemoPanel/buildPostmanRequest.js +12 -49
  82. package/lib-next/theme/ApiDemoPanel/index.js +2 -4
  83. package/lib-next/theme/ApiDemoPanel/persistanceMiddleware.js +5 -6
  84. package/lib-next/theme/ApiDemoPanel/storage-utils.js +1 -3
  85. package/lib-next/theme/ApiItem/Layout/index.js +8 -9
  86. package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -403
  87. package/lib-next/theme/ApiItem/hooks.js +1 -0
  88. package/lib-next/theme/ApiItem/index.js +14 -13
  89. package/lib-next/theme/ApiItem/store.js +1 -0
  90. package/lib-next/theme/ApiLogo/index.js +1 -0
  91. package/lib-next/theme/styles.css +428 -0
  92. package/lib-next/theme-classic.d.ts +5 -0
  93. package/package.json +5 -5
  94. package/src/index.ts +5 -0
  95. package/src/theme/ApiDemoPanel/Execute/index.tsx +1 -0
  96. package/src/theme/ApiDemoPanel/index.tsx +1 -2
  97. package/src/theme/ApiItem/Layout/index.tsx +5 -6
  98. package/src/theme/ApiItem/Layout/styles.module.css +0 -403
  99. package/src/theme/ApiItem/index.tsx +5 -4
  100. package/src/theme/styles.css +428 -0
  101. package/src/theme-classic.d.ts +5 -0
  102. package/lib/theme/ApiDemoPanel/styles.module.css +0 -44
  103. package/lib/theme/ApiItem/Content/index.js +0 -65
  104. package/lib/theme/ApiItem/Footer/index.js +0 -78
  105. package/lib/theme/ApiItem/Footer/styles.module.css +0 -18
  106. package/lib/theme/ApiItem/Metadata/index.js +0 -32
  107. package/lib/theme/ApiItem/Paginator/index.js +0 -33
  108. package/lib/theme/ApiItem/TOC/Desktop/index.js +0 -31
  109. package/lib/theme/ApiItem/TOC/Mobile/index.js +0 -35
  110. package/lib/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
  111. package/lib-next/theme/ApiDemoPanel/styles.module.css +0 -44
  112. package/lib-next/theme/ApiItem/Content/index.js +0 -55
  113. package/lib-next/theme/ApiItem/Footer/index.js +0 -88
  114. package/lib-next/theme/ApiItem/Footer/styles.module.css +0 -18
  115. package/lib-next/theme/ApiItem/Metadata/index.js +0 -21
  116. package/lib-next/theme/ApiItem/Paginator/index.js +0 -19
  117. package/lib-next/theme/ApiItem/TOC/Desktop/index.js +0 -22
  118. package/lib-next/theme/ApiItem/TOC/Mobile/index.js +0 -24
  119. package/lib-next/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
  120. package/src/theme/ApiDemoPanel/styles.module.css +0 -44
  121. package/src/theme/ApiItem/Content/index.tsx +0 -57
  122. package/src/theme/ApiItem/Footer/index.tsx +0 -101
  123. package/src/theme/ApiItem/Footer/styles.module.css +0 -18
  124. package/src/theme/ApiItem/Metadata/index.tsx +0 -24
  125. package/src/theme/ApiItem/Paginator/index.tsx +0 -21
  126. package/src/theme/ApiItem/TOC/Desktop/index.tsx +0 -25
  127. package/src/theme/ApiItem/TOC/Mobile/index.tsx +0 -28
  128. package/src/theme/ApiItem/TOC/Mobile/styles.module.css +0 -19
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocItemTOCDesktop;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _themeCommon = require("@docusaurus/theme-common");
11
-
12
- var _internal = require("@docusaurus/theme-common/internal");
13
-
14
- var _TOC = _interopRequireDefault(require("@theme/TOC"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- /* ============================================================================
19
- * Copyright (c) Palo Alto Networks
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
- // @ts-ignore
25
- function DocItemTOCDesktop() {
26
- const {
27
- toc,
28
- frontMatter
29
- } = (0, _internal.useDoc)();
30
- return <_TOC.default toc={toc} minHeadingLevel={frontMatter.toc_min_heading_level} maxHeadingLevel={frontMatter.toc_max_heading_level} className={_themeCommon.ThemeClassNames.docs.docTocDesktop} />;
31
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DocItemTOCMobile;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _themeCommon = require("@docusaurus/theme-common");
11
-
12
- var _internal = require("@docusaurus/theme-common/internal");
13
-
14
- var _TOCCollapsible = _interopRequireDefault(require("@theme/TOCCollapsible"));
15
-
16
- var _clsx = _interopRequireDefault(require("clsx"));
17
-
18
- var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- /* ============================================================================
23
- * Copyright (c) Palo Alto Networks
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
- // @ts-ignore
29
- function DocItemTOCMobile() {
30
- const {
31
- toc,
32
- frontMatter
33
- } = (0, _internal.useDoc)();
34
- return <_TOCCollapsible.default toc={toc} minHeadingLevel={frontMatter.toc_min_heading_level} maxHeadingLevel={frontMatter.toc_max_heading_level} className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docTocMobile, _stylesModule.default.tocMobile)} />;
35
- }
@@ -1,19 +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
- /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
10
- .tocMobile {
11
- display: none;
12
- }
13
- }
14
-
15
- @media print {
16
- .tocMobile {
17
- display: none;
18
- }
19
- }
@@ -1,44 +0,0 @@
1
- :root {
2
- /* VS Dark mode */
3
- --openapi-monaco-background-color-dark: var(--ifm-color-gray-900);
4
- --openapi-code-bright-dark: var(--ifm-color-secondary-lighter);
5
- --openapi-code-dim-dark: var(--ifm-color-secondary-dark);
6
- --openapi-code-blue-dark: var(--ifm-color-primary);
7
- --openapi-code-green-dark: var(--ifm-color-success);
8
- --openapi-code-select-dark: var(--ifm-color-secondary-lightest);
9
-
10
- /* VS Light mode */
11
- --openapi-monaco-background-color-light: var(--ifm-color-gray-100);
12
- --openapi-code-bright-light: var(--ifm-color-black);
13
- --openapi-code-dim-light: var(--ifm-color-black);
14
- --openapi-code-blue-light: var(--ifm-color-primary);
15
- --openapi-code-green-light: var(--ifm-color-success);
16
- --openapi-code-select-light: var(--ifm-color-secondary-light);
17
-
18
- --openapi-card-background-color: var(--ifm-color-gray-100);
19
- --openapi-card-border-radius: var(--ifm-pre-border-radius);
20
- --openapi-monaco-border-color: var(--openapi-card-background-color);
21
- --openapi-input-border: var(--ifm-color-primary);
22
- }
23
-
24
- [data-theme="dark"] {
25
- --openapi-card-background-color: var(--ifm-color-gray-900) !important;
26
- }
27
-
28
- .optionsPanel:empty {
29
- display: none;
30
- }
31
-
32
- .optionsPanel {
33
- background: var(--openapi-card-background-color);
34
- border-radius: var(--openapi-card-border-radius);
35
- color: var(--ifm-pre-color);
36
- line-height: var(--ifm-pre-line-height);
37
- margin-bottom: var(--ifm-spacing-vertical);
38
- margin-top: 0;
39
- overflow: auto;
40
- padding: var(--ifm-pre-padding);
41
-
42
- /* hack for view calculation when monaco is hidden */
43
- position: relative;
44
- }
@@ -1,55 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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 { ThemeClassNames } from "@docusaurus/theme-common"; // @ts-ignore
9
-
10
- import { useDoc } from "@docusaurus/theme-common/internal";
11
- import Heading from "@theme/Heading";
12
- import MDXContent from "@theme/MDXContent";
13
- import clsx from "clsx";
14
- /**
15
- Title can be declared inside md content or declared through
16
- front matter and added manually. To make both cases consistent,
17
- the added title is added under the same div.markdown block
18
- See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
19
-
20
- We render a "synthetic title" if:
21
- - user doesn't ask to hide it with front matter
22
- - the markdown content does not already contain a top-level h1 heading
23
- */
24
-
25
- function useSyntheticTitle() {
26
- const { metadata, frontMatter, contentTitle } = useDoc();
27
- const shouldRender =
28
- !frontMatter.hide_title && typeof contentTitle === "undefined";
29
-
30
- if (!shouldRender) {
31
- return null;
32
- }
33
-
34
- return metadata.title;
35
- }
36
-
37
- export default function DocItemContent({ children }) {
38
- const syntheticTitle = useSyntheticTitle();
39
- return (
40
- <div
41
- className={clsx(
42
- ThemeClassNames.docs.docMarkdown,
43
- "theme-api-markdown",
44
- "markdown"
45
- )}
46
- >
47
- {syntheticTitle && (
48
- <header>
49
- <Heading as="h1">{syntheticTitle}</Heading>
50
- </header>
51
- )}
52
- <MDXContent>{children}</MDXContent>
53
- </div>
54
- );
55
- }
@@ -1,88 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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 { ThemeClassNames } from "@docusaurus/theme-common";
9
- import {
10
- useDoc, // @ts-ignore
11
- } from "@docusaurus/theme-common/internal";
12
- import EditThisPage from "@theme/EditThisPage";
13
- import LastUpdated from "@theme/LastUpdated";
14
- import TagsListInline from "@theme/TagsListInline";
15
- import clsx from "clsx";
16
- import styles from "./styles.module.css";
17
-
18
- function TagsRow(props) {
19
- return (
20
- <div
21
- className={clsx(
22
- ThemeClassNames.docs.docFooterTagsRow,
23
- "row margin-bottom--sm"
24
- )}
25
- >
26
- <div className="col">
27
- <TagsListInline {...props} />
28
- </div>
29
- </div>
30
- );
31
- }
32
-
33
- function EditMetaRow({
34
- editUrl,
35
- lastUpdatedAt,
36
- lastUpdatedBy,
37
- formattedLastUpdatedAt,
38
- }) {
39
- return (
40
- <div className={clsx(ThemeClassNames.docs.docFooterEditMetaRow, "row")}>
41
- <div className="col">{editUrl && <EditThisPage editUrl={editUrl} />}</div>
42
-
43
- <div className={clsx("col", styles.lastUpdated)}>
44
- {(lastUpdatedAt || lastUpdatedBy) && (
45
- <LastUpdated
46
- lastUpdatedAt={lastUpdatedAt}
47
- formattedLastUpdatedAt={formattedLastUpdatedAt}
48
- lastUpdatedBy={lastUpdatedBy}
49
- />
50
- )}
51
- </div>
52
- </div>
53
- );
54
- }
55
-
56
- export default function DocItemFooter() {
57
- const { metadata } = useDoc();
58
- const {
59
- editUrl,
60
- lastUpdatedAt,
61
- formattedLastUpdatedAt,
62
- lastUpdatedBy,
63
- tags,
64
- } = metadata;
65
- const canDisplayTagsRow = tags.length > 0;
66
- const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
67
- const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
68
-
69
- if (!canDisplayFooter) {
70
- return null;
71
- }
72
-
73
- return (
74
- <footer
75
- className={clsx(ThemeClassNames.docs.docFooter, "docusaurus-mt-lg")}
76
- >
77
- {canDisplayTagsRow && <TagsRow tags={tags} />}
78
- {canDisplayEditMetaRow && (
79
- <EditMetaRow
80
- editUrl={editUrl}
81
- lastUpdatedAt={lastUpdatedAt}
82
- lastUpdatedBy={lastUpdatedBy}
83
- formattedLastUpdatedAt={formattedLastUpdatedAt}
84
- />
85
- )}
86
- </footer>
87
- );
88
- }
@@ -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
- }
@@ -1,21 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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 { PageMetadata } from "@docusaurus/theme-common"; // @ts-ignore
9
-
10
- import { useDoc } from "@docusaurus/theme-common/internal";
11
- export default function DocItemMetadata() {
12
- const { metadata, frontMatter, assets } = useDoc();
13
- return (
14
- <PageMetadata
15
- title={metadata.title}
16
- description={metadata.description}
17
- keywords={frontMatter.keywords}
18
- image={assets.image ?? frontMatter.image}
19
- />
20
- );
21
- }
@@ -1,19 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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"; // @ts-ignore
8
-
9
- import { useDoc } from "@docusaurus/theme-common/internal";
10
- import DocPaginator from "@theme/DocPaginator";
11
- /**
12
- * This extra component is needed, because <DocPaginator> should remain generic.
13
- * DocPaginator is used in non-docs contexts too: generated-index pages...
14
- */
15
-
16
- export default function DocItemPaginator() {
17
- const { metadata } = useDoc();
18
- return <DocPaginator previous={metadata.previous} next={metadata.next} />;
19
- }
@@ -1,22 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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 { ThemeClassNames } from "@docusaurus/theme-common"; // @ts-ignore
9
-
10
- import { useDoc } from "@docusaurus/theme-common/internal";
11
- import TOC from "@theme/TOC";
12
- export default function DocItemTOCDesktop() {
13
- const { toc, frontMatter } = useDoc();
14
- return (
15
- <TOC
16
- toc={toc}
17
- minHeadingLevel={frontMatter.toc_min_heading_level}
18
- maxHeadingLevel={frontMatter.toc_max_heading_level}
19
- className={ThemeClassNames.docs.docTocDesktop}
20
- />
21
- );
22
- }
@@ -1,24 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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 { ThemeClassNames } from "@docusaurus/theme-common"; // @ts-ignore
9
-
10
- import { useDoc } from "@docusaurus/theme-common/internal";
11
- import TOCCollapsible from "@theme/TOCCollapsible";
12
- import clsx from "clsx";
13
- import styles from "./styles.module.css";
14
- export default function DocItemTOCMobile() {
15
- const { toc, frontMatter } = useDoc();
16
- return (
17
- <TOCCollapsible
18
- toc={toc}
19
- minHeadingLevel={frontMatter.toc_min_heading_level}
20
- maxHeadingLevel={frontMatter.toc_max_heading_level}
21
- className={clsx(ThemeClassNames.docs.docTocMobile, styles.tocMobile)}
22
- />
23
- );
24
- }
@@ -1,19 +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
- /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
10
- .tocMobile {
11
- display: none;
12
- }
13
- }
14
-
15
- @media print {
16
- .tocMobile {
17
- display: none;
18
- }
19
- }
@@ -1,44 +0,0 @@
1
- :root {
2
- /* VS Dark mode */
3
- --openapi-monaco-background-color-dark: var(--ifm-color-gray-900);
4
- --openapi-code-bright-dark: var(--ifm-color-secondary-lighter);
5
- --openapi-code-dim-dark: var(--ifm-color-secondary-dark);
6
- --openapi-code-blue-dark: var(--ifm-color-primary);
7
- --openapi-code-green-dark: var(--ifm-color-success);
8
- --openapi-code-select-dark: var(--ifm-color-secondary-lightest);
9
-
10
- /* VS Light mode */
11
- --openapi-monaco-background-color-light: var(--ifm-color-gray-100);
12
- --openapi-code-bright-light: var(--ifm-color-black);
13
- --openapi-code-dim-light: var(--ifm-color-black);
14
- --openapi-code-blue-light: var(--ifm-color-primary);
15
- --openapi-code-green-light: var(--ifm-color-success);
16
- --openapi-code-select-light: var(--ifm-color-secondary-light);
17
-
18
- --openapi-card-background-color: var(--ifm-color-gray-100);
19
- --openapi-card-border-radius: var(--ifm-pre-border-radius);
20
- --openapi-monaco-border-color: var(--openapi-card-background-color);
21
- --openapi-input-border: var(--ifm-color-primary);
22
- }
23
-
24
- [data-theme="dark"] {
25
- --openapi-card-background-color: var(--ifm-color-gray-900) !important;
26
- }
27
-
28
- .optionsPanel:empty {
29
- display: none;
30
- }
31
-
32
- .optionsPanel {
33
- background: var(--openapi-card-background-color);
34
- border-radius: var(--openapi-card-border-radius);
35
- color: var(--ifm-pre-color);
36
- line-height: var(--ifm-pre-line-height);
37
- margin-bottom: var(--ifm-spacing-vertical);
38
- margin-top: 0;
39
- overflow: auto;
40
- padding: var(--ifm-pre-padding);
41
-
42
- /* hack for view calculation when monaco is hidden */
43
- position: relative;
44
- }
@@ -1,57 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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
-
10
- import { ThemeClassNames } from "@docusaurus/theme-common";
11
- // @ts-ignore
12
- import { useDoc } from "@docusaurus/theme-common/internal";
13
- import type { Props } from "@theme/DocItem/Content";
14
- import Heading from "@theme/Heading";
15
- import MDXContent from "@theme/MDXContent";
16
- import clsx from "clsx";
17
-
18
- /**
19
- Title can be declared inside md content or declared through
20
- front matter and added manually. To make both cases consistent,
21
- the added title is added under the same div.markdown block
22
- See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
23
-
24
- We render a "synthetic title" if:
25
- - user doesn't ask to hide it with front matter
26
- - the markdown content does not already contain a top-level h1 heading
27
- */
28
- function useSyntheticTitle(): string | null {
29
- const { metadata, frontMatter, contentTitle } = useDoc();
30
- const shouldRender =
31
- !frontMatter.hide_title && typeof contentTitle === "undefined";
32
- if (!shouldRender) {
33
- return null;
34
- }
35
- return metadata.title;
36
- }
37
-
38
- export default function DocItemContent({ children }: Props): JSX.Element {
39
- const syntheticTitle = useSyntheticTitle();
40
-
41
- return (
42
- <div
43
- className={clsx(
44
- ThemeClassNames.docs.docMarkdown,
45
- "theme-api-markdown",
46
- "markdown"
47
- )}
48
- >
49
- {syntheticTitle && (
50
- <header>
51
- <Heading as="h1">{syntheticTitle}</Heading>
52
- </header>
53
- )}
54
- <MDXContent>{children}</MDXContent>
55
- </div>
56
- );
57
- }
@@ -1,101 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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
-
10
- import { ThemeClassNames } from "@docusaurus/theme-common";
11
- import {
12
- useDoc,
13
- type DocContextValue,
14
- // @ts-ignore
15
- } from "@docusaurus/theme-common/internal";
16
- import EditThisPage from "@theme/EditThisPage";
17
- import LastUpdated from "@theme/LastUpdated";
18
- import TagsListInline, {
19
- type Props as TagsListInlineProps,
20
- } from "@theme/TagsListInline";
21
- import clsx from "clsx";
22
-
23
- import styles from "./styles.module.css";
24
-
25
- function TagsRow(props: TagsListInlineProps) {
26
- return (
27
- <div
28
- className={clsx(
29
- ThemeClassNames.docs.docFooterTagsRow,
30
- "row margin-bottom--sm"
31
- )}
32
- >
33
- <div className="col">
34
- <TagsListInline {...props} />
35
- </div>
36
- </div>
37
- );
38
- }
39
-
40
- type EditMetaRowProps = Pick<
41
- DocContextValue["metadata"],
42
- "editUrl" | "lastUpdatedAt" | "lastUpdatedBy" | "formattedLastUpdatedAt"
43
- >;
44
- function EditMetaRow({
45
- editUrl,
46
- lastUpdatedAt,
47
- lastUpdatedBy,
48
- formattedLastUpdatedAt,
49
- }: EditMetaRowProps) {
50
- return (
51
- <div className={clsx(ThemeClassNames.docs.docFooterEditMetaRow, "row")}>
52
- <div className="col">{editUrl && <EditThisPage editUrl={editUrl} />}</div>
53
-
54
- <div className={clsx("col", styles.lastUpdated)}>
55
- {(lastUpdatedAt || lastUpdatedBy) && (
56
- <LastUpdated
57
- lastUpdatedAt={lastUpdatedAt}
58
- formattedLastUpdatedAt={formattedLastUpdatedAt}
59
- lastUpdatedBy={lastUpdatedBy}
60
- />
61
- )}
62
- </div>
63
- </div>
64
- );
65
- }
66
-
67
- export default function DocItemFooter(): JSX.Element | null {
68
- const { metadata } = useDoc();
69
- const {
70
- editUrl,
71
- lastUpdatedAt,
72
- formattedLastUpdatedAt,
73
- lastUpdatedBy,
74
- tags,
75
- } = metadata;
76
-
77
- const canDisplayTagsRow = tags.length > 0;
78
- const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
79
-
80
- const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
81
-
82
- if (!canDisplayFooter) {
83
- return null;
84
- }
85
-
86
- return (
87
- <footer
88
- className={clsx(ThemeClassNames.docs.docFooter, "docusaurus-mt-lg")}
89
- >
90
- {canDisplayTagsRow && <TagsRow tags={tags} />}
91
- {canDisplayEditMetaRow && (
92
- <EditMetaRow
93
- editUrl={editUrl}
94
- lastUpdatedAt={lastUpdatedAt}
95
- lastUpdatedBy={lastUpdatedBy}
96
- formattedLastUpdatedAt={formattedLastUpdatedAt}
97
- />
98
- )}
99
- </footer>
100
- );
101
- }
@@ -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
- }
@@ -1,24 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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
-
10
- import { PageMetadata } from "@docusaurus/theme-common";
11
- // @ts-ignore
12
- import { useDoc } from "@docusaurus/theme-common/internal";
13
-
14
- export default function DocItemMetadata(): JSX.Element {
15
- const { metadata, frontMatter, assets } = useDoc();
16
- return (
17
- <PageMetadata
18
- title={metadata.title}
19
- description={metadata.description}
20
- keywords={frontMatter.keywords}
21
- image={assets.image ?? frontMatter.image}
22
- />
23
- );
24
- }
@@ -1,21 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
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
-
10
- // @ts-ignore
11
- import { useDoc } from "@docusaurus/theme-common/internal";
12
- import DocPaginator from "@theme/DocPaginator";
13
-
14
- /**
15
- * This extra component is needed, because <DocPaginator> should remain generic.
16
- * DocPaginator is used in non-docs contexts too: generated-index pages...
17
- */
18
- export default function DocItemPaginator(): JSX.Element {
19
- const { metadata } = useDoc();
20
- return <DocPaginator previous={metadata.previous} next={metadata.next} />;
21
- }