docusaurus-theme-openapi-docs 1.0.6 → 1.1.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.
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +8 -3
- package/lib/theme/ApiDemoPanel/FloatingButton/index.js +4 -2
- package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +3 -2
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +17 -4
- package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +2 -1
- package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -4
- package/lib/theme/ApiDemoPanel/Server/index.js +1 -1
- package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -4
- package/lib/theme/ApiItem/Content/index.js +65 -0
- package/lib/theme/ApiItem/Footer/index.js +78 -0
- package/lib/theme/ApiItem/Footer/styles.module.css +18 -0
- package/lib/theme/ApiItem/{icons → Layout/icons}/bash-original.svg +0 -0
- package/lib/theme/ApiItem/{icons → Layout/icons}/go-original-wordmark.svg +0 -0
- package/lib/theme/ApiItem/{icons → Layout/icons}/javascript-original.svg +0 -0
- package/lib/theme/ApiItem/{icons → Layout/icons}/linux-original.svg +0 -0
- package/lib/theme/ApiItem/{icons → Layout/icons}/python-original.svg +0 -0
- package/lib/theme/ApiItem/Layout/index.js +93 -0
- package/lib/theme/ApiItem/{styles.module.css → Layout/styles.module.css} +42 -4
- package/lib/theme/ApiItem/Metadata/index.js +32 -0
- package/lib/theme/ApiItem/Paginator/index.js +33 -0
- package/lib/theme/ApiItem/TOC/Desktop/index.js +31 -0
- package/lib/theme/ApiItem/TOC/Mobile/index.js +35 -0
- package/lib/theme/ApiItem/TOC/Mobile/styles.module.css +19 -0
- package/lib/theme/ApiItem/index.js +37 -126
- package/lib/theme/ApiTabs/index.js +17 -6
- package/lib/theme/ApiTabs/styles.module.css +0 -1
- package/lib/theme/SchemaTabs/index.js +258 -0
- package/lib/theme/SchemaTabs/styles.module.css +110 -0
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +7 -6
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +6 -2
- package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +3 -2
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +14 -3
- package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +2 -1
- package/lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -4
- package/lib-next/theme/ApiDemoPanel/Server/index.js +1 -0
- package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -4
- package/lib-next/theme/ApiItem/Content/index.js +55 -0
- package/lib-next/theme/ApiItem/Footer/index.js +88 -0
- package/lib-next/theme/ApiItem/Footer/styles.module.css +18 -0
- package/lib-next/theme/ApiItem/{icons → Layout/icons}/bash-original.svg +0 -0
- package/lib-next/theme/ApiItem/{icons → Layout/icons}/go-original-wordmark.svg +0 -0
- package/lib-next/theme/ApiItem/{icons → Layout/icons}/javascript-original.svg +0 -0
- package/lib-next/theme/ApiItem/{icons → Layout/icons}/linux-original.svg +0 -0
- package/lib-next/theme/ApiItem/{icons → Layout/icons}/python-original.svg +0 -0
- package/lib-next/theme/ApiItem/Layout/index.js +69 -0
- package/lib-next/theme/ApiItem/{styles.module.css → Layout/styles.module.css} +42 -4
- package/lib-next/theme/ApiItem/Metadata/index.js +21 -0
- package/lib-next/theme/ApiItem/Paginator/index.js +19 -0
- package/lib-next/theme/ApiItem/TOC/Desktop/index.js +22 -0
- package/lib-next/theme/ApiItem/TOC/Mobile/index.js +24 -0
- package/lib-next/theme/ApiItem/TOC/Mobile/styles.module.css +19 -0
- package/lib-next/theme/ApiItem/index.js +31 -133
- package/lib-next/theme/ApiTabs/index.js +17 -6
- package/lib-next/theme/ApiTabs/styles.module.css +0 -1
- package/lib-next/theme/SchemaTabs/index.js +258 -0
- package/lib-next/theme/SchemaTabs/styles.module.css +110 -0
- package/package.json +6 -6
- package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +6 -5
- package/src/theme/ApiDemoPanel/FloatingButton/index.tsx +6 -2
- package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +3 -2
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +15 -3
- package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +2 -1
- package/src/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -4
- package/src/theme/ApiDemoPanel/Server/index.tsx +1 -0
- package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -4
- package/src/theme/ApiItem/Content/index.tsx +57 -0
- package/src/theme/ApiItem/Footer/index.tsx +101 -0
- package/src/theme/ApiItem/Footer/styles.module.css +18 -0
- package/src/theme/ApiItem/{icons → Layout/icons}/bash-original.svg +0 -0
- package/src/theme/ApiItem/{icons → Layout/icons}/go-original-wordmark.svg +0 -0
- package/src/theme/ApiItem/{icons → Layout/icons}/javascript-original.svg +0 -0
- package/src/theme/ApiItem/{icons → Layout/icons}/linux-original.svg +0 -0
- package/src/theme/ApiItem/{icons → Layout/icons}/python-original.svg +0 -0
- package/src/theme/ApiItem/Layout/index.tsx +78 -0
- package/src/theme/ApiItem/{styles.module.css → Layout/styles.module.css} +42 -4
- package/src/theme/ApiItem/Metadata/index.tsx +24 -0
- package/src/theme/ApiItem/Paginator/index.tsx +21 -0
- package/src/theme/ApiItem/TOC/Desktop/index.tsx +25 -0
- package/src/theme/ApiItem/TOC/Mobile/index.tsx +28 -0
- package/src/theme/ApiItem/TOC/Mobile/styles.module.css +19 -0
- package/src/theme/ApiItem/index.tsx +31 -130
- package/src/theme/ApiTabs/index.js +17 -6
- package/src/theme/ApiTabs/styles.module.css +0 -1
- package/src/theme/SchemaTabs/index.js +258 -0
- package/src/theme/SchemaTabs/styles.module.css +110 -0
|
@@ -29,8 +29,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
|
31
31
|
* ========================================================================== */
|
|
32
|
-
|
|
32
|
+
const {
|
|
33
|
+
useScrollPositionBlocker,
|
|
34
|
+
useTabGroupChoice
|
|
35
|
+
} = require("@docusaurus/theme-common/internal"); // A very rough duck type, but good enough to guard against mistakes while
|
|
33
36
|
// allowing customization
|
|
37
|
+
|
|
38
|
+
|
|
34
39
|
function isTabItem(comp) {
|
|
35
40
|
return "value" in comp.props;
|
|
36
41
|
}
|
|
@@ -87,12 +92,12 @@ function TabsComponent(props) {
|
|
|
87
92
|
const {
|
|
88
93
|
tabGroupChoices,
|
|
89
94
|
setTabGroupChoices
|
|
90
|
-
} =
|
|
95
|
+
} = useTabGroupChoice();
|
|
91
96
|
const [selectedValue, setSelectedValue] = (0, _react.useState)(defaultValue);
|
|
92
97
|
const tabRefs = [];
|
|
93
98
|
const {
|
|
94
99
|
blockElementScrollPositionUntilNextRender
|
|
95
|
-
} =
|
|
100
|
+
} = useScrollPositionBlocker();
|
|
96
101
|
|
|
97
102
|
if (groupId != null) {
|
|
98
103
|
const relevantTabGroupChoice = tabGroupChoices[groupId];
|
|
@@ -22,8 +22,10 @@ function FloatingButton({
|
|
|
22
22
|
onClick,
|
|
23
23
|
children
|
|
24
24
|
}) {
|
|
25
|
-
return <div className={_stylesModule.default.floatingButton}>
|
|
26
|
-
{label && <button onClick={onClick}>
|
|
25
|
+
return <div tabIndex={0} className={_stylesModule.default.floatingButton}>
|
|
26
|
+
{label && <button tabIndex={0} onClick={onClick}>
|
|
27
|
+
{label}
|
|
28
|
+
</button>}
|
|
27
29
|
{children}
|
|
28
30
|
</div>;
|
|
29
31
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
border-radius: var(--ifm-global-radius);
|
|
10
10
|
color: var(--ifm-color-white);
|
|
11
11
|
cursor: pointer;
|
|
12
|
-
outline: none;
|
|
13
12
|
padding: 0.4rem 0.5rem;
|
|
14
13
|
opacity: 0;
|
|
15
14
|
visibility: hidden;
|
|
@@ -20,7 +19,9 @@
|
|
|
20
19
|
right: calc(var(--ifm-pre-padding) / 2);
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
.floatingButton:hover button
|
|
22
|
+
.floatingButton:hover button,
|
|
23
|
+
.floatingButton:focus-visible button,
|
|
24
|
+
.floatingButton button:focus-visible {
|
|
24
25
|
visibility: visible;
|
|
25
26
|
opacity: 1;
|
|
26
27
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _themeCommon = require("@docusaurus/theme-common");
|
|
11
11
|
|
|
@@ -19,6 +19,10 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
22
26
|
/* ============================================================================
|
|
23
27
|
* Copyright (c) Palo Alto Networks
|
|
24
28
|
*
|
|
@@ -29,9 +33,18 @@ function Live({
|
|
|
29
33
|
onEdit
|
|
30
34
|
}) {
|
|
31
35
|
const isBrowser = (0, _useIsBrowser.default)();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
const [editorDisabled, setEditorDisabled] = (0, _react.useState)(false); // TODO: Temporary solution for disabling tab key
|
|
37
|
+
|
|
38
|
+
const handleKeydown = event => {
|
|
39
|
+
if (event.key === "Tab") {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
setEditorDisabled(true);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return <div onClick={() => setEditorDisabled(false)}>
|
|
46
|
+
<_reactLive.LiveEditor key={String(isBrowser)} className={_stylesModule.default.playgroundEditor} onChange={onEdit} disabled={editorDisabled} onKeyDown={handleKeydown} />
|
|
47
|
+
</div>;
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
const LiveComponent = (0, _reactLive.withLive)(Live);
|
|
@@ -73,7 +73,7 @@ function Server() {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return <div className={_stylesModule.default.optionsPanel}>
|
|
76
|
-
<button className={_stylesModule.default.showMoreButton} onClick={() => setIsEditing(false)}>
|
|
76
|
+
<button className={_stylesModule.default.showMoreButton} onClick={() => setIsEditing(false)} tabIndex={0}>
|
|
77
77
|
Hide
|
|
78
78
|
</button>
|
|
79
79
|
<_FormItem.default label="Endpoint">
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = DocItemContent;
|
|
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 _Heading = _interopRequireDefault(require("@theme/Heading"));
|
|
15
|
+
|
|
16
|
+
var _MDXContent = _interopRequireDefault(require("@theme/MDXContent"));
|
|
17
|
+
|
|
18
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
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
|
+
|
|
30
|
+
/**
|
|
31
|
+
Title can be declared inside md content or declared through
|
|
32
|
+
front matter and added manually. To make both cases consistent,
|
|
33
|
+
the added title is added under the same div.markdown block
|
|
34
|
+
See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
|
|
35
|
+
|
|
36
|
+
We render a "synthetic title" if:
|
|
37
|
+
- user doesn't ask to hide it with front matter
|
|
38
|
+
- the markdown content does not already contain a top-level h1 heading
|
|
39
|
+
*/
|
|
40
|
+
function useSyntheticTitle() {
|
|
41
|
+
const {
|
|
42
|
+
metadata,
|
|
43
|
+
frontMatter,
|
|
44
|
+
contentTitle
|
|
45
|
+
} = (0, _internal.useDoc)();
|
|
46
|
+
const shouldRender = !frontMatter.hide_title && typeof contentTitle === "undefined";
|
|
47
|
+
|
|
48
|
+
if (!shouldRender) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return metadata.title;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function DocItemContent({
|
|
56
|
+
children
|
|
57
|
+
}) {
|
|
58
|
+
const syntheticTitle = useSyntheticTitle();
|
|
59
|
+
return <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docMarkdown, "theme-api-markdown", "markdown")}>
|
|
60
|
+
{syntheticTitle && <header>
|
|
61
|
+
<_Heading.default as="h1">{syntheticTitle}</_Heading.default>
|
|
62
|
+
</header>}
|
|
63
|
+
<_MDXContent.default>{children}</_MDXContent.default>
|
|
64
|
+
</div>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 _themeCommon = require("@docusaurus/theme-common");
|
|
11
|
+
|
|
12
|
+
var _internal = require("@docusaurus/theme-common/internal");
|
|
13
|
+
|
|
14
|
+
var _EditThisPage = _interopRequireDefault(require("@theme/EditThisPage"));
|
|
15
|
+
|
|
16
|
+
var _LastUpdated = _interopRequireDefault(require("@theme/LastUpdated"));
|
|
17
|
+
|
|
18
|
+
var _TagsListInline = _interopRequireDefault(require("@theme/TagsListInline"));
|
|
19
|
+
|
|
20
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
21
|
+
|
|
22
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
/* ============================================================================
|
|
27
|
+
* Copyright (c) Palo Alto Networks
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
* ========================================================================== */
|
|
32
|
+
function TagsRow(props) {
|
|
33
|
+
return <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooterTagsRow, "row margin-bottom--sm")}>
|
|
34
|
+
<div className="col">
|
|
35
|
+
<_TagsListInline.default {...props} />
|
|
36
|
+
</div>
|
|
37
|
+
</div>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function EditMetaRow({
|
|
41
|
+
editUrl,
|
|
42
|
+
lastUpdatedAt,
|
|
43
|
+
lastUpdatedBy,
|
|
44
|
+
formattedLastUpdatedAt
|
|
45
|
+
}) {
|
|
46
|
+
return <div className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooterEditMetaRow, "row")}>
|
|
47
|
+
<div className="col">{editUrl && <_EditThisPage.default editUrl={editUrl} />}</div>
|
|
48
|
+
|
|
49
|
+
<div className={(0, _clsx.default)("col", _stylesModule.default.lastUpdated)}>
|
|
50
|
+
{(lastUpdatedAt || lastUpdatedBy) && <_LastUpdated.default lastUpdatedAt={lastUpdatedAt} formattedLastUpdatedAt={formattedLastUpdatedAt} lastUpdatedBy={lastUpdatedBy} />}
|
|
51
|
+
</div>
|
|
52
|
+
</div>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function DocItemFooter() {
|
|
56
|
+
const {
|
|
57
|
+
metadata
|
|
58
|
+
} = (0, _internal.useDoc)();
|
|
59
|
+
const {
|
|
60
|
+
editUrl,
|
|
61
|
+
lastUpdatedAt,
|
|
62
|
+
formattedLastUpdatedAt,
|
|
63
|
+
lastUpdatedBy,
|
|
64
|
+
tags
|
|
65
|
+
} = metadata;
|
|
66
|
+
const canDisplayTagsRow = tags.length > 0;
|
|
67
|
+
const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
|
|
68
|
+
const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
|
|
69
|
+
|
|
70
|
+
if (!canDisplayFooter) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return <footer className={(0, _clsx.default)(_themeCommon.ThemeClassNames.docs.docFooter, "docusaurus-mt-lg")}>
|
|
75
|
+
{canDisplayTagsRow && <TagsRow tags={tags} />}
|
|
76
|
+
{canDisplayEditMetaRow && <EditMetaRow editUrl={editUrl} lastUpdatedAt={lastUpdatedAt} lastUpdatedBy={lastUpdatedBy} formattedLastUpdatedAt={formattedLastUpdatedAt} />}
|
|
77
|
+
</footer>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = DocItemLayout;
|
|
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 _DocBreadcrumbs = _interopRequireDefault(require("@theme/DocBreadcrumbs"));
|
|
15
|
+
|
|
16
|
+
var _DocVersionBadge = _interopRequireDefault(require("@theme/DocVersionBadge"));
|
|
17
|
+
|
|
18
|
+
var _DocVersionBanner = _interopRequireDefault(require("@theme/DocVersionBanner"));
|
|
19
|
+
|
|
20
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
21
|
+
|
|
22
|
+
var _Content = _interopRequireDefault(require("../Content"));
|
|
23
|
+
|
|
24
|
+
var _Footer = _interopRequireDefault(require("../Footer"));
|
|
25
|
+
|
|
26
|
+
var _Paginator = _interopRequireDefault(require("../Paginator"));
|
|
27
|
+
|
|
28
|
+
var _Desktop = _interopRequireDefault(require("../TOC/Desktop"));
|
|
29
|
+
|
|
30
|
+
var _Mobile = _interopRequireDefault(require("../TOC/Mobile"));
|
|
31
|
+
|
|
32
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
+
|
|
36
|
+
/* ============================================================================
|
|
37
|
+
* Copyright (c) Palo Alto Networks
|
|
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
|
+
// @ts-ignore
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Decide if the toc should be rendered, on mobile or desktop viewports
|
|
46
|
+
*/
|
|
47
|
+
function useDocTOC() {
|
|
48
|
+
const {
|
|
49
|
+
frontMatter,
|
|
50
|
+
toc
|
|
51
|
+
} = (0, _internal.useDoc)();
|
|
52
|
+
const windowSize = (0, _themeCommon.useWindowSize)();
|
|
53
|
+
const hidden = frontMatter.hide_table_of_contents;
|
|
54
|
+
const canRender = !hidden && toc.length > 0;
|
|
55
|
+
const mobile = canRender ? <_Mobile.default /> : undefined;
|
|
56
|
+
const desktop = canRender && (windowSize === "desktop" || windowSize === "ssr") ? <_Desktop.default /> : undefined;
|
|
57
|
+
return {
|
|
58
|
+
hidden,
|
|
59
|
+
mobile,
|
|
60
|
+
desktop
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function DocItemLayout({
|
|
65
|
+
children
|
|
66
|
+
}) {
|
|
67
|
+
const docTOC = useDocTOC();
|
|
68
|
+
const {
|
|
69
|
+
frontMatter: {
|
|
70
|
+
api
|
|
71
|
+
}
|
|
72
|
+
} = (0, _internal.useDoc)();
|
|
73
|
+
return <div className="row">
|
|
74
|
+
<div className={(0, _clsx.default)("col", !docTOC.hidden && _stylesModule.default.docItemCol)}>
|
|
75
|
+
<_DocVersionBanner.default />
|
|
76
|
+
<div className={_stylesModule.default.docItemContainer}>
|
|
77
|
+
<article>
|
|
78
|
+
<_DocBreadcrumbs.default />
|
|
79
|
+
<_DocVersionBadge.default />
|
|
80
|
+
{docTOC.mobile}
|
|
81
|
+
<_Content.default>{children}</_Content.default>
|
|
82
|
+
<div className={(0, _clsx.default)("col", api ? "col--7" : "col--12")}>
|
|
83
|
+
<_Footer.default />
|
|
84
|
+
</div>
|
|
85
|
+
</article>
|
|
86
|
+
<div className={(0, _clsx.default)("col", api ? "col--7" : "col--12")}>
|
|
87
|
+
<_Paginator.default />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
{docTOC.desktop && <div className="col col--3">{docTOC.desktop}</div>}
|
|
92
|
+
</div>;
|
|
93
|
+
}
|
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
:root {
|
|
2
9
|
--openapi-required: var(--ifm-color-danger);
|
|
3
10
|
--openapi-code-blue: var(--ifm-color-info);
|
|
@@ -6,6 +13,21 @@
|
|
|
6
13
|
--openapi-code-green: var(--ifm-color-success);
|
|
7
14
|
}
|
|
8
15
|
|
|
16
|
+
:global(.docs-wrapper) {
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.docItemContainer header + *,
|
|
21
|
+
.docItemContainer article > *:first-child {
|
|
22
|
+
margin-top: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 997px) {
|
|
26
|
+
.docItemCol {
|
|
27
|
+
max-width: 75% !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
9
31
|
.apiItemContainer article > *:first-child,
|
|
10
32
|
.apiItemContainer header + * {
|
|
11
33
|
margin-top: 0;
|
|
@@ -70,10 +92,6 @@
|
|
|
70
92
|
padding-top: 5px;
|
|
71
93
|
}
|
|
72
94
|
|
|
73
|
-
:global(.theme-api-markdown details li:last-child) {
|
|
74
|
-
border-left: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
95
|
:global(.theme-api-markdown details p) {
|
|
78
96
|
margin-bottom: 0;
|
|
79
97
|
}
|
|
@@ -147,6 +165,11 @@
|
|
|
147
165
|
border-bottom-color: var(--ifm-color-success);
|
|
148
166
|
}
|
|
149
167
|
|
|
168
|
+
:global(.language-python) {
|
|
169
|
+
max-height: 500px;
|
|
170
|
+
overflow: auto;
|
|
171
|
+
}
|
|
172
|
+
|
|
150
173
|
:global(.code__tab--go::after) {
|
|
151
174
|
content: "";
|
|
152
175
|
width: 32px;
|
|
@@ -165,6 +188,11 @@
|
|
|
165
188
|
border-bottom-color: var(--ifm-color-info);
|
|
166
189
|
}
|
|
167
190
|
|
|
191
|
+
:global(.language-go) {
|
|
192
|
+
max-height: 500px;
|
|
193
|
+
overflow: auto;
|
|
194
|
+
}
|
|
195
|
+
|
|
168
196
|
:global(.code__tab--javascript::after) {
|
|
169
197
|
content: "";
|
|
170
198
|
width: 32px;
|
|
@@ -183,6 +211,11 @@
|
|
|
183
211
|
border-bottom-color: var(--ifm-color-warning);
|
|
184
212
|
}
|
|
185
213
|
|
|
214
|
+
:global(.language-javascript) {
|
|
215
|
+
max-height: 500px;
|
|
216
|
+
overflow: auto;
|
|
217
|
+
}
|
|
218
|
+
|
|
186
219
|
:global(.code__tab--bash::after) {
|
|
187
220
|
content: "";
|
|
188
221
|
width: 32px;
|
|
@@ -200,3 +233,8 @@
|
|
|
200
233
|
:global(.code__tab--bash.tabs__item--active) {
|
|
201
234
|
border-bottom-color: var(--ifm-color-danger);
|
|
202
235
|
}
|
|
236
|
+
|
|
237
|
+
:global(.language-bash) {
|
|
238
|
+
max-height: 500px;
|
|
239
|
+
overflow: auto;
|
|
240
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = DocItemMetadata;
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
/* ============================================================================
|
|
17
|
+
* Copyright (c) Palo Alto Networks
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
* ========================================================================== */
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
function DocItemMetadata() {
|
|
24
|
+
var _assets$image;
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
metadata,
|
|
28
|
+
frontMatter,
|
|
29
|
+
assets
|
|
30
|
+
} = (0, _internal.useDoc)();
|
|
31
|
+
return <_themeCommon.PageMetadata title={metadata.title} description={metadata.description} keywords={frontMatter.keywords} image={(_assets$image = assets.image) !== null && _assets$image !== void 0 ? _assets$image : frontMatter.image} />;
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = DocItemPaginator;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _internal = require("@docusaurus/theme-common/internal");
|
|
11
|
+
|
|
12
|
+
var _DocPaginator = _interopRequireDefault(require("@theme/DocPaginator"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
/* ============================================================================
|
|
17
|
+
* Copyright (c) Palo Alto Networks
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
* ========================================================================== */
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* This extra component is needed, because <DocPaginator> should remain generic.
|
|
26
|
+
* DocPaginator is used in non-docs contexts too: generated-index pages...
|
|
27
|
+
*/
|
|
28
|
+
function DocItemPaginator() {
|
|
29
|
+
const {
|
|
30
|
+
metadata
|
|
31
|
+
} = (0, _internal.useDoc)();
|
|
32
|
+
return <_DocPaginator.default previous={metadata.previous} next={metadata.next} />;
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}
|