docusaurus-theme-openapi-docs 0.0.0-983 → 0.0.0-985
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/index.js +0 -4
- package/lib/theme/ApiExplorer/Response/index.js +0 -1
- package/lib/theme/DiscriminatorTabs/index.js +2 -0
- package/package.json +4 -3
- package/src/index.ts +0 -4
- package/src/theme/ApiExplorer/Response/index.tsx +0 -1
- package/src/theme/DiscriminatorTabs/index.tsx +3 -0
- package/src/theme-classic.d.ts +3 -1
package/lib/index.js
CHANGED
|
@@ -38,14 +38,12 @@ function docusaurusThemeOpenAPI() {
|
|
|
38
38
|
resolve: {
|
|
39
39
|
fallback: {
|
|
40
40
|
buffer: require.resolve("buffer/"),
|
|
41
|
-
url: require.resolve("url/"),
|
|
42
41
|
},
|
|
43
42
|
},
|
|
44
43
|
plugins: [
|
|
45
44
|
new utils.currentBundler.instance.ProvidePlugin({
|
|
46
45
|
process: require.resolve("process/browser"),
|
|
47
46
|
Buffer: ["buffer", "Buffer"],
|
|
48
|
-
URL: ["url", "URL"],
|
|
49
47
|
}),
|
|
50
48
|
],
|
|
51
49
|
module: {
|
|
@@ -69,14 +67,12 @@ function docusaurusThemeOpenAPI() {
|
|
|
69
67
|
resolve: {
|
|
70
68
|
fallback: {
|
|
71
69
|
buffer: require.resolve("buffer/"),
|
|
72
|
-
url: require.resolve("url/"),
|
|
73
70
|
},
|
|
74
71
|
},
|
|
75
72
|
plugins: [
|
|
76
73
|
new utils.currentBundler.instance.ProvidePlugin({
|
|
77
74
|
process: require.resolve("process/browser"),
|
|
78
75
|
Buffer: ["buffer", "Buffer"],
|
|
79
|
-
URL: ["url", "URL"],
|
|
80
76
|
}),
|
|
81
77
|
],
|
|
82
78
|
};
|
|
@@ -12,7 +12,6 @@ var __importDefault =
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
const react_1 = __importDefault(require("react"));
|
|
15
|
-
// @ts-ignore
|
|
16
15
|
const client_1 = require("@docusaurus/plugin-content-docs/client");
|
|
17
16
|
const theme_common_1 = require("@docusaurus/theme-common");
|
|
18
17
|
const ApiCodeBlock_1 = __importDefault(
|
|
@@ -238,6 +238,8 @@ function TabsComponent(props) {
|
|
|
238
238
|
}
|
|
239
239
|
function DiscriminatorTabs(props) {
|
|
240
240
|
const isBrowser = (0, useIsBrowser_1.default)();
|
|
241
|
+
if (!props.length)
|
|
242
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
241
243
|
return react_1.default.createElement(
|
|
242
244
|
TabsComponent,
|
|
243
245
|
// Remount tabs after hydration
|
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-985",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -28,6 +28,7 @@
|
|
|
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/theme-classic": "^3.5.0",
|
|
31
32
|
"@docusaurus/theme-common": "^3.5.0",
|
|
32
33
|
"@docusaurus/types": "^3.5.0",
|
|
33
34
|
"@types/crypto-js": "^4.1.0",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"@types/lodash": "^4.14.176",
|
|
36
37
|
"@types/pako": "^2.0.3",
|
|
37
38
|
"concurrently": "^5.2.0",
|
|
38
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
39
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-985",
|
|
39
40
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
40
41
|
"eslint-plugin-prettier": "^5.0.1"
|
|
41
42
|
},
|
|
@@ -78,5 +79,5 @@
|
|
|
78
79
|
"engines": {
|
|
79
80
|
"node": ">=14"
|
|
80
81
|
},
|
|
81
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "9bdb2f50d0a01aa03ed4b3e5ba4a2ed67d55b02c"
|
|
82
83
|
}
|
package/src/index.ts
CHANGED
|
@@ -42,14 +42,12 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
|
|
|
42
42
|
resolve: {
|
|
43
43
|
fallback: {
|
|
44
44
|
buffer: require.resolve("buffer/"),
|
|
45
|
-
url: require.resolve("url/"),
|
|
46
45
|
},
|
|
47
46
|
},
|
|
48
47
|
plugins: [
|
|
49
48
|
new utils.currentBundler.instance.ProvidePlugin({
|
|
50
49
|
process: require.resolve("process/browser"),
|
|
51
50
|
Buffer: ["buffer", "Buffer"],
|
|
52
|
-
URL: ["url", "URL"],
|
|
53
51
|
}),
|
|
54
52
|
],
|
|
55
53
|
module: {
|
|
@@ -73,14 +71,12 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
|
|
|
73
71
|
resolve: {
|
|
74
72
|
fallback: {
|
|
75
73
|
buffer: require.resolve("buffer/"),
|
|
76
|
-
url: require.resolve("url/"),
|
|
77
74
|
},
|
|
78
75
|
},
|
|
79
76
|
plugins: [
|
|
80
77
|
new utils.currentBundler.instance.ProvidePlugin({
|
|
81
78
|
process: require.resolve("process/browser"),
|
|
82
79
|
Buffer: ["buffer", "Buffer"],
|
|
83
|
-
URL: ["url", "URL"],
|
|
84
80
|
}),
|
|
85
81
|
],
|
|
86
82
|
};
|
|
@@ -209,6 +209,9 @@ function TabsComponent(props: TabProps): React.JSX.Element {
|
|
|
209
209
|
}
|
|
210
210
|
export default function DiscriminatorTabs(props: TabProps): React.JSX.Element {
|
|
211
211
|
const isBrowser = useIsBrowser();
|
|
212
|
+
|
|
213
|
+
if (!props.length) return <React.Fragment />;
|
|
214
|
+
|
|
212
215
|
return (
|
|
213
216
|
<TabsComponent
|
|
214
217
|
// Remount tabs after hydration
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ declare module "@docusaurus/theme-common/internal" {
|
|
|
21
21
|
import { Props as ILineProps } from "@theme/CodeBlock/Line";
|
|
22
22
|
import { PrismTheme } from "prism-react-renderer";
|
|
23
23
|
|
|
24
|
-
export interface TabProps extends ITabsProps {
|
|
24
|
+
export interface TabProps extends ITabsProps {
|
|
25
|
+
length?: number;
|
|
26
|
+
}
|
|
25
27
|
|
|
26
28
|
export interface CopyButtonProps extends ICopyButtonProps {}
|
|
27
29
|
export interface LineProps extends ILineProps {}
|