docusaurus-theme-openapi-docs 2.0.1 → 3.0.0-beta.2
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/ApiExplorer/ApiCodeBlock/Content/String.js +2 -2
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +2 -2
- package/lib/theme/ApiItem/Layout/index.js +3 -0
- package/lib/theme/ApiItem/index.js +1 -1
- package/package.json +6 -6
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +2 -2
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +2 -2
- package/src/theme/ApiItem/Layout/index.tsx +3 -0
- package/src/theme/ApiItem/index.tsx +1 -1
|
@@ -21,7 +21,7 @@ import ExpandButton from "@theme/ApiExplorer/ApiCodeBlock/ExpandButton";
|
|
|
21
21
|
import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
|
|
22
22
|
import WordWrapButton from "@theme/ApiExplorer/ApiCodeBlock/WordWrapButton";
|
|
23
23
|
import clsx from "clsx";
|
|
24
|
-
import
|
|
24
|
+
import { Highlight } from "prism-react-renderer";
|
|
25
25
|
|
|
26
26
|
export default function CodeBlockString({
|
|
27
27
|
children,
|
|
@@ -65,7 +65,7 @@ export default function CodeBlockString({
|
|
|
65
65
|
)}
|
|
66
66
|
<div className="openapi-explorer__code-block-content">
|
|
67
67
|
<Highlight
|
|
68
|
-
{...defaultProps}
|
|
68
|
+
// {...defaultProps}
|
|
69
69
|
theme={prismTheme}
|
|
70
70
|
code={code}
|
|
71
71
|
language={language ?? "text"}
|
|
@@ -14,7 +14,7 @@ import CopyButton from "@theme/ApiExplorer/ApiCodeBlock/CopyButton";
|
|
|
14
14
|
import ExitButton from "@theme/ApiExplorer/ApiCodeBlock/ExitButton";
|
|
15
15
|
import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
|
|
16
16
|
import clsx from "clsx";
|
|
17
|
-
import
|
|
17
|
+
import { Highlight } from "prism-react-renderer";
|
|
18
18
|
import Modal from "react-modal";
|
|
19
19
|
|
|
20
20
|
export default function ExpandButton({
|
|
@@ -102,7 +102,7 @@ export default function ExpandButton({
|
|
|
102
102
|
)}
|
|
103
103
|
<div className="openapi-explorer__code-block-content">
|
|
104
104
|
<Highlight
|
|
105
|
-
{...defaultProps}
|
|
105
|
+
// {...defaultProps}
|
|
106
106
|
theme={prismTheme}
|
|
107
107
|
code={code}
|
|
108
108
|
language={language ?? "text"}
|
|
@@ -22,6 +22,7 @@ const Desktop_1 = __importDefault(require("@theme/DocItem/TOC/Desktop"));
|
|
|
22
22
|
const Mobile_1 = __importDefault(require("@theme/DocItem/TOC/Mobile"));
|
|
23
23
|
const DocVersionBadge_1 = __importDefault(require("@theme/DocVersionBadge"));
|
|
24
24
|
const DocVersionBanner_1 = __importDefault(require("@theme/DocVersionBanner"));
|
|
25
|
+
const Unlisted_1 = __importDefault(require("@theme/Unlisted"));
|
|
25
26
|
const clsx_1 = __importDefault(require("clsx"));
|
|
26
27
|
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
27
28
|
/**
|
|
@@ -48,6 +49,7 @@ function useDocTOC() {
|
|
|
48
49
|
function DocItemLayout({ children }) {
|
|
49
50
|
const docTOC = useDocTOC();
|
|
50
51
|
const {
|
|
52
|
+
metadata: { unlisted },
|
|
51
53
|
frontMatter: { api },
|
|
52
54
|
} = (0, internal_1.useDoc)();
|
|
53
55
|
return react_1.default.createElement(
|
|
@@ -61,6 +63,7 @@ function DocItemLayout({ children }) {
|
|
|
61
63
|
!docTOC.hidden && styles_module_css_1.default.docItemCol
|
|
62
64
|
),
|
|
63
65
|
},
|
|
66
|
+
unlisted && react_1.default.createElement(Unlisted_1.default, null),
|
|
64
67
|
react_1.default.createElement(DocVersionBanner_1.default, null),
|
|
65
68
|
react_1.default.createElement(
|
|
66
69
|
"div",
|
|
@@ -35,7 +35,7 @@ if (ExecutionEnvironment_1.default.canUseDOM) {
|
|
|
35
35
|
ApiExplorer = require("@theme/ApiExplorer").default;
|
|
36
36
|
}
|
|
37
37
|
function ApiItem(props) {
|
|
38
|
-
const docHtmlClassName = `docs-doc-id-${props.content.metadata.
|
|
38
|
+
const docHtmlClassName = `docs-doc-id-${props.content.metadata.id}`;
|
|
39
39
|
const MDXComponent = props.content;
|
|
40
40
|
const { frontMatter } = MDXComponent;
|
|
41
41
|
const { info_path: infoPath } = frontMatter;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-beta.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\""
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@docusaurus/types": "
|
|
31
|
+
"@docusaurus/types": "^3.0.0",
|
|
32
32
|
"@types/crypto-js": "^4.1.0",
|
|
33
33
|
"@types/file-saver": "^2.0.5",
|
|
34
34
|
"@types/lodash": "^4.14.176",
|
|
35
35
|
"concurrently": "^5.2.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@docusaurus/theme-common": "
|
|
38
|
+
"@docusaurus/theme-common": "^3.0.0",
|
|
39
39
|
"@hookform/error-message": "^2.0.1",
|
|
40
40
|
"@paloaltonetworks/postman-code-generators": "1.1.15-patch.2",
|
|
41
41
|
"@paloaltonetworks/postman-collection": "^4.1.0",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"clsx": "^1.1.1",
|
|
44
44
|
"copy-text-to-clipboard": "^3.1.0",
|
|
45
45
|
"crypto-js": "^4.1.1",
|
|
46
|
-
"docusaurus-plugin-openapi-docs": "^
|
|
46
|
+
"docusaurus-plugin-openapi-docs": "^3.0.0-beta.2",
|
|
47
47
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
48
48
|
"file-saver": "^2.0.5",
|
|
49
49
|
"lodash": "^4.17.20",
|
|
50
50
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
51
|
-
"prism-react-renderer": "^1.
|
|
51
|
+
"prism-react-renderer": "^2.1.0",
|
|
52
52
|
"react-hook-form": "^7.43.8",
|
|
53
53
|
"react-live": "^4.0.0",
|
|
54
54
|
"react-magic-dropzone": "^1.0.1",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=14"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "9e573198abcfbdd4af3b89f92658d0bf94648cfa"
|
|
72
72
|
}
|
|
@@ -21,7 +21,7 @@ import ExpandButton from "@theme/ApiExplorer/ApiCodeBlock/ExpandButton";
|
|
|
21
21
|
import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
|
|
22
22
|
import WordWrapButton from "@theme/ApiExplorer/ApiCodeBlock/WordWrapButton";
|
|
23
23
|
import clsx from "clsx";
|
|
24
|
-
import
|
|
24
|
+
import { Highlight } from "prism-react-renderer";
|
|
25
25
|
|
|
26
26
|
export default function CodeBlockString({
|
|
27
27
|
children,
|
|
@@ -65,7 +65,7 @@ export default function CodeBlockString({
|
|
|
65
65
|
)}
|
|
66
66
|
<div className="openapi-explorer__code-block-content">
|
|
67
67
|
<Highlight
|
|
68
|
-
{...defaultProps}
|
|
68
|
+
// {...defaultProps}
|
|
69
69
|
theme={prismTheme}
|
|
70
70
|
code={code}
|
|
71
71
|
language={language ?? "text"}
|
|
@@ -14,7 +14,7 @@ import CopyButton from "@theme/ApiExplorer/ApiCodeBlock/CopyButton";
|
|
|
14
14
|
import ExitButton from "@theme/ApiExplorer/ApiCodeBlock/ExitButton";
|
|
15
15
|
import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
|
|
16
16
|
import clsx from "clsx";
|
|
17
|
-
import
|
|
17
|
+
import { Highlight } from "prism-react-renderer";
|
|
18
18
|
import Modal from "react-modal";
|
|
19
19
|
|
|
20
20
|
export default function ExpandButton({
|
|
@@ -102,7 +102,7 @@ export default function ExpandButton({
|
|
|
102
102
|
)}
|
|
103
103
|
<div className="openapi-explorer__code-block-content">
|
|
104
104
|
<Highlight
|
|
105
|
-
{...defaultProps}
|
|
105
|
+
// {...defaultProps}
|
|
106
106
|
theme={prismTheme}
|
|
107
107
|
code={code}
|
|
108
108
|
language={language ?? "text"}
|
|
@@ -18,6 +18,7 @@ import DocItemTOCDesktop from "@theme/DocItem/TOC/Desktop";
|
|
|
18
18
|
import DocItemTOCMobile from "@theme/DocItem/TOC/Mobile";
|
|
19
19
|
import DocVersionBadge from "@theme/DocVersionBadge";
|
|
20
20
|
import DocVersionBanner from "@theme/DocVersionBanner";
|
|
21
|
+
import Unlisted from "@theme/Unlisted";
|
|
21
22
|
import clsx from "clsx";
|
|
22
23
|
|
|
23
24
|
import styles from "./styles.module.css";
|
|
@@ -49,12 +50,14 @@ function useDocTOC() {
|
|
|
49
50
|
export default function DocItemLayout({ children }: Props): JSX.Element {
|
|
50
51
|
const docTOC = useDocTOC();
|
|
51
52
|
const {
|
|
53
|
+
metadata: { unlisted },
|
|
52
54
|
frontMatter: { api },
|
|
53
55
|
} = useDoc();
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
58
|
<div className="row">
|
|
57
59
|
<div className={clsx("col", !docTOC.hidden && styles.docItemCol)}>
|
|
60
|
+
{unlisted && <Unlisted />}
|
|
58
61
|
<DocVersionBanner />
|
|
59
62
|
<div className={styles.docItemContainer}>
|
|
60
63
|
<article>
|
|
@@ -45,7 +45,7 @@ interface ApiFrontMatter extends DocFrontMatter {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export default function ApiItem(props: Props): JSX.Element {
|
|
48
|
-
const docHtmlClassName = `docs-doc-id-${props.content.metadata.
|
|
48
|
+
const docHtmlClassName = `docs-doc-id-${props.content.metadata.id}`;
|
|
49
49
|
const MDXComponent = props.content;
|
|
50
50
|
const { frontMatter } = MDXComponent;
|
|
51
51
|
const { info_path: infoPath } = frontMatter as DocFrontMatter;
|