docusaurus-theme-openapi-docs 0.0.0-410 → 0.0.0-413
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/ApiLogo/index.js +29 -0
- package/lib/theme/ResponseSamples/index.js +27 -0
- package/lib/theme/ResponseSamples/styles.module.css +7 -0
- package/lib/theme/SchemaTabs/styles.module.css +0 -8
- package/lib-next/theme/ApiLogo/index.js +21 -0
- package/lib-next/theme/ResponseSamples/index.js +27 -0
- package/lib-next/theme/ResponseSamples/styles.module.css +7 -0
- package/lib-next/theme/SchemaTabs/styles.module.css +0 -8
- package/package.json +6 -6
- package/src/theme/ApiLogo/index.tsx +25 -0
- package/src/theme/ResponseSamples/index.js +27 -0
- package/src/theme/ResponseSamples/styles.module.css +7 -0
- package/src/theme/SchemaTabs/styles.module.css +0 -8
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ApiLogo;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _themeCommon = require("@docusaurus/theme-common");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
/* ============================================================================
|
|
15
|
+
* Copyright (c) Palo Alto Networks
|
|
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 ApiLogo(props) {
|
|
21
|
+
const {
|
|
22
|
+
colorMode
|
|
23
|
+
} = (0, _themeCommon.useColorMode)();
|
|
24
|
+
const {
|
|
25
|
+
logo,
|
|
26
|
+
darkLogo
|
|
27
|
+
} = props;
|
|
28
|
+
return logo ? <img alt={colorMode === "dark" && darkLogo ? darkLogo.altText : logo.altText} src={colorMode === "dark" && darkLogo ? darkLogo.url : logo.url} width="250px" /> : <div />;
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
|
|
12
|
+
import styles from "./styles.module.css";
|
|
13
|
+
|
|
14
|
+
function ResponseSamples({ responseExample }) {
|
|
15
|
+
return (
|
|
16
|
+
<div className={styles.responseSamplesContainer}>
|
|
17
|
+
<CodeBlock
|
|
18
|
+
language="javascript"
|
|
19
|
+
className={styles.responseSamplesCodeBlock}
|
|
20
|
+
>
|
|
21
|
+
{responseExample}
|
|
22
|
+
</CodeBlock>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default ResponseSamples;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { useColorMode } from "@docusaurus/theme-common";
|
|
9
|
+
export default function ApiLogo(props) {
|
|
10
|
+
const { colorMode } = useColorMode();
|
|
11
|
+
const { logo, darkLogo } = props;
|
|
12
|
+
return logo ? (
|
|
13
|
+
<img
|
|
14
|
+
alt={colorMode === "dark" && darkLogo ? darkLogo.altText : logo.altText}
|
|
15
|
+
src={colorMode === "dark" && darkLogo ? darkLogo.url : logo.url}
|
|
16
|
+
width="250px"
|
|
17
|
+
/>
|
|
18
|
+
) : (
|
|
19
|
+
<div />
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
|
|
12
|
+
import styles from "./styles.module.css";
|
|
13
|
+
|
|
14
|
+
function ResponseSamples({ responseExample }) {
|
|
15
|
+
return (
|
|
16
|
+
<div className={styles.responseSamplesContainer}>
|
|
17
|
+
<CodeBlock
|
|
18
|
+
language="javascript"
|
|
19
|
+
className={styles.responseSamplesCodeBlock}
|
|
20
|
+
>
|
|
21
|
+
{responseExample}
|
|
22
|
+
</CodeBlock>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default ResponseSamples;
|
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": "0.0.0-
|
|
4
|
+
"version": "0.0.0-413",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"format:lib-next": "prettier --config ../../.prettierrc.json --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@docusaurus/module-type-aliases": "2.0.
|
|
35
|
-
"@docusaurus/types": "2.0.
|
|
34
|
+
"@docusaurus/module-type-aliases": "2.0.1",
|
|
35
|
+
"@docusaurus/types": "2.0.1",
|
|
36
36
|
"@types/concurrently": "^6.3.0",
|
|
37
37
|
"@types/crypto-js": "^4.1.0",
|
|
38
38
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"concurrently": "^5.2.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@docusaurus/theme-common": "2.0.
|
|
45
|
+
"@docusaurus/theme-common": "2.0.1",
|
|
46
46
|
"@mdx-js/react": "^1.6.21",
|
|
47
47
|
"@paloaltonetworks/postman-code-generators": "1.1.5-hotfix.5",
|
|
48
48
|
"@paloaltonetworks/postman-collection": "^4.1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"buffer": "^6.0.3",
|
|
51
51
|
"clsx": "^1.1.1",
|
|
52
52
|
"crypto-js": "^4.1.1",
|
|
53
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
53
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-413",
|
|
54
54
|
"immer": "^9.0.7",
|
|
55
55
|
"lodash": "^4.17.20",
|
|
56
56
|
"process": "^0.11.10",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=14"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "f2cafe5a93dc9b203fc039174c56dc7e8c8db8c4"
|
|
72
72
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { useColorMode } from "@docusaurus/theme-common";
|
|
11
|
+
|
|
12
|
+
export default function ApiLogo(props: any): JSX.Element {
|
|
13
|
+
const { colorMode } = useColorMode();
|
|
14
|
+
const { logo, darkLogo } = props;
|
|
15
|
+
|
|
16
|
+
return logo ? (
|
|
17
|
+
<img
|
|
18
|
+
alt={colorMode === "dark" && darkLogo ? darkLogo.altText : logo.altText}
|
|
19
|
+
src={colorMode === "dark" && darkLogo ? darkLogo.url : logo.url}
|
|
20
|
+
width="250px"
|
|
21
|
+
/>
|
|
22
|
+
) : (
|
|
23
|
+
<div />
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
|
|
12
|
+
import styles from "./styles.module.css";
|
|
13
|
+
|
|
14
|
+
function ResponseSamples({ responseExample }) {
|
|
15
|
+
return (
|
|
16
|
+
<div className={styles.responseSamplesContainer}>
|
|
17
|
+
<CodeBlock
|
|
18
|
+
language="javascript"
|
|
19
|
+
className={styles.responseSamplesCodeBlock}
|
|
20
|
+
>
|
|
21
|
+
{responseExample}
|
|
22
|
+
</CodeBlock>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default ResponseSamples;
|