docusaurus-theme-openapi-docs 0.0.0-beta.651 → 0.0.0-beta.652
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.
|
@@ -15,8 +15,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
15
15
|
const theme_common_1 = require("@docusaurus/theme-common");
|
|
16
16
|
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
17
17
|
const react_2 = require("@nextui-org/react");
|
|
18
|
+
const ApiCodeBlock_1 = __importDefault(
|
|
19
|
+
require("@theme/ApiDemoPanel/ApiCodeBlock")
|
|
20
|
+
);
|
|
18
21
|
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
19
|
-
const CodeBlock_1 = __importDefault(require("@theme/CodeBlock"));
|
|
20
22
|
const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
|
|
21
23
|
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
22
24
|
const clsx_1 = __importDefault(require("clsx"));
|
|
@@ -126,7 +128,7 @@ function Response({ item }) {
|
|
|
126
128
|
default: true,
|
|
127
129
|
},
|
|
128
130
|
react_1.default.createElement(
|
|
129
|
-
|
|
131
|
+
ApiCodeBlock_1.default,
|
|
130
132
|
{
|
|
131
133
|
className:
|
|
132
134
|
"openapi-demo__code-block openapi-response__status-code",
|
|
@@ -150,7 +152,7 @@ function Response({ item }) {
|
|
|
150
152
|
TabItem_1.default,
|
|
151
153
|
{ label: "Headers", value: "headers" },
|
|
152
154
|
react_1.default.createElement(
|
|
153
|
-
|
|
155
|
+
ApiCodeBlock_1.default,
|
|
154
156
|
{
|
|
155
157
|
className:
|
|
156
158
|
"openapi-demo__code-block openapi-response__status-headers",
|
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-beta.
|
|
4
|
+
"version": "0.0.0-beta.652",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"clsx": "^1.1.1",
|
|
52
52
|
"copy-text-to-clipboard": "^3.1.0",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-beta.
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-beta.652",
|
|
55
55
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
56
56
|
"file-saver": "^2.0.5",
|
|
57
57
|
"immer": "^9.0.7",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"engines": {
|
|
79
79
|
"node": ">=14"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c9926c88116321abaeaae5b2d995bddb5c8b6690"
|
|
82
82
|
}
|
|
@@ -10,8 +10,8 @@ import React from "react";
|
|
|
10
10
|
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
11
|
import { useDoc } from "@docusaurus/theme-common/internal";
|
|
12
12
|
import { Loading } from "@nextui-org/react";
|
|
13
|
+
import ApiCodeBlock from "@theme/ApiDemoPanel/ApiCodeBlock";
|
|
13
14
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
14
|
-
import CodeBlock from "@theme/CodeBlock";
|
|
15
15
|
import SchemaTabs from "@theme/SchemaTabs";
|
|
16
16
|
import TabItem from "@theme/TabItem";
|
|
17
17
|
import clsx from "clsx";
|
|
@@ -108,7 +108,8 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
108
108
|
}}
|
|
109
109
|
default
|
|
110
110
|
>
|
|
111
|
-
|
|
111
|
+
{/* @ts-ignore */}
|
|
112
|
+
<ApiCodeBlock
|
|
112
113
|
className="openapi-demo__code-block openapi-response__status-code"
|
|
113
114
|
language={response.startsWith("<") ? `xml` : `json`}
|
|
114
115
|
>
|
|
@@ -118,16 +119,17 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
118
119
|
the response here!
|
|
119
120
|
</p>
|
|
120
121
|
)}
|
|
121
|
-
</
|
|
122
|
+
</ApiCodeBlock>
|
|
122
123
|
</TabItem>
|
|
123
124
|
{/* @ts-ignore */}
|
|
124
125
|
<TabItem label="Headers" value="headers">
|
|
125
|
-
|
|
126
|
+
{/* @ts-ignore */}
|
|
127
|
+
<ApiCodeBlock
|
|
126
128
|
className="openapi-demo__code-block openapi-response__status-headers"
|
|
127
129
|
language={response.startsWith("<") ? `xml` : `json`}
|
|
128
130
|
>
|
|
129
131
|
{JSON.stringify(headers, undefined, 2)}
|
|
130
|
-
</
|
|
132
|
+
</ApiCodeBlock>
|
|
131
133
|
</TabItem>
|
|
132
134
|
</SchemaTabs>
|
|
133
135
|
) : prettyResponse === "Fetching..." ? (
|