docusaurus-theme-openapi-docs 0.0.0-1000
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/LICENSE +21 -0
- package/babel.config.js +35 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +81 -0
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +15 -0
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +149 -0
- package/lib/markdown/utils.d.ts +10 -0
- package/lib/markdown/utils.js +49 -0
- package/lib/markdown/utils.test.d.ts +1 -0
- package/lib/markdown/utils.test.js +43 -0
- package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Accept/index.js +38 -0
- package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +160 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +381 -0
- package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/lib/theme/ApiExplorer/Body/slice.js +97 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +389 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +95 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +271 -0
- package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
- package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
- package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Export/index.js +57 -0
- package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +173 -0
- package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
- package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
- package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
- package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.js +168 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +220 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
- package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +223 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
- package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +396 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.js +222 -0
- package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +193 -0
- package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/Response/slice.js +51 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
- package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +199 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/lib/theme/ApiExplorer/Server/slice.js +33 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.js +465 -0
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +41 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/ApiExplorer/storage-utils.js +41 -0
- package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
- package/lib/theme/ApiItem/Layout/index.js +121 -0
- package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +13 -0
- package/lib/theme/ApiItem/index.d.ts +2 -0
- package/lib/theme/ApiItem/index.js +238 -0
- package/lib/theme/ApiItem/store.d.ts +46 -0
- package/lib/theme/ApiItem/store.js +53 -0
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +51 -0
- package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/lib/theme/ApiTabs/index.d.ts +7 -0
- package/lib/theme/ApiTabs/index.js +270 -0
- package/lib/theme/ArrayBrackets/index.d.ts +3 -0
- package/lib/theme/ArrayBrackets/index.js +50 -0
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
- package/lib/theme/DiscriminatorTabs/index.js +258 -0
- package/lib/theme/Markdown/Details/_Details.scss +122 -0
- package/lib/theme/Markdown/index.js +179 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/lib/theme/MimeTabs/index.d.ts +6 -0
- package/lib/theme/MimeTabs/index.js +286 -0
- package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/lib/theme/OperationTabs/index.d.ts +3 -0
- package/lib/theme/OperationTabs/index.js +248 -0
- package/lib/theme/ParamsDetails/index.d.ts +6 -0
- package/lib/theme/ParamsDetails/index.js +85 -0
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.d.ts +25 -0
- package/lib/theme/ParamsItem/index.js +218 -0
- package/lib/theme/RequestSchema/index.d.ts +15 -0
- package/lib/theme/RequestSchema/index.js +194 -0
- package/lib/theme/ResponseExamples/index.d.ts +18 -0
- package/lib/theme/ResponseExamples/index.js +193 -0
- package/lib/theme/ResponseHeaders/index.d.ts +13 -0
- package/lib/theme/ResponseHeaders/index.js +39 -0
- package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/lib/theme/ResponseSamples/index.d.ts +8 -0
- package/lib/theme/ResponseSamples/index.js +27 -0
- package/lib/theme/ResponseSchema/index.d.ts +15 -0
- package/lib/theme/ResponseSchema/index.js +159 -0
- package/lib/theme/Schema/index.d.ts +8 -0
- package/lib/theme/Schema/index.js +885 -0
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +213 -0
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/lib/theme/SchemaTabs/index.d.ts +3 -0
- package/lib/theme/SchemaTabs/index.js +255 -0
- package/lib/theme/SkeletonLoader/index.d.ts +6 -0
- package/lib/theme/SkeletonLoader/index.js +20 -0
- package/lib/theme/StatusCodes/index.d.ts +9 -0
- package/lib/theme/StatusCodes/index.js +81 -0
- package/lib/theme/styles.scss +212 -0
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -0
- package/package.json +83 -0
- package/src/index.ts +85 -0
- package/src/markdown/createDescription.ts +13 -0
- package/src/markdown/schema.ts +181 -0
- package/src/markdown/utils.test.ts +49 -0
- package/src/markdown/utils.ts +59 -0
- package/src/plugin-content-docs.d.ts +20 -0
- package/src/postman-code-generators.d.ts +9 -0
- package/src/react-magic-dropzone.d.ts +9 -0
- package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
- package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +79 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
- package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
- package/src/theme/ApiExplorer/Authorization/index.tsx +158 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
- package/src/theme/ApiExplorer/Body/index.tsx +376 -0
- package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/src/theme/ApiExplorer/Body/slice.ts +133 -0
- package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
- package/src/theme/ApiExplorer/CodeSnippets/index.tsx +338 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.ts +96 -0
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +248 -0
- package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
- package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
- package/src/theme/ApiExplorer/Export/index.tsx +47 -0
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
- package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/src/theme/ApiExplorer/FormFileUpload/index.tsx +119 -0
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +33 -0
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
- package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
- package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +114 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +175 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
- package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +146 -0
- package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/src/theme/ApiExplorer/Request/index.tsx +309 -0
- package/src/theme/ApiExplorer/Request/makeRequest.ts +254 -0
- package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/src/theme/ApiExplorer/Response/index.tsx +157 -0
- package/src/theme/ApiExplorer/Response/slice.ts +52 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +287 -0
- package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/src/theme/ApiExplorer/Server/index.tsx +130 -0
- package/src/theme/ApiExplorer/Server/slice.ts +39 -0
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +526 -0
- package/src/theme/ApiExplorer/index.tsx +41 -0
- package/src/theme/ApiExplorer/persistanceMiddleware.ts +71 -0
- package/src/theme/ApiExplorer/postman-collection.d.ts +10 -0
- package/src/theme/ApiExplorer/react-modal.d.ts +8 -0
- package/src/theme/ApiExplorer/storage-utils.ts +39 -0
- package/src/theme/ApiItem/Layout/index.tsx +85 -0
- package/src/theme/ApiItem/Layout/styles.module.css +17 -0
- package/src/theme/ApiItem/hooks.ts +13 -0
- package/src/theme/ApiItem/index.tsx +222 -0
- package/src/theme/ApiItem/store.ts +51 -0
- package/src/theme/ApiLogo/index.tsx +52 -0
- package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/src/theme/ApiTabs/index.tsx +238 -0
- package/src/theme/ArrayBrackets/index.tsx +37 -0
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/src/theme/DiscriminatorTabs/index.tsx +229 -0
- package/src/theme/Markdown/Details/_Details.scss +122 -0
- package/src/theme/Markdown/index.js +179 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/src/theme/MimeTabs/index.tsx +257 -0
- package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/src/theme/OperationTabs/index.tsx +220 -0
- package/src/theme/ParamsDetails/index.tsx +81 -0
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.tsx +205 -0
- package/src/theme/RequestSchema/index.tsx +157 -0
- package/src/theme/ResponseExamples/index.tsx +192 -0
- package/src/theme/ResponseHeaders/index.tsx +49 -0
- package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/src/theme/ResponseSamples/index.tsx +31 -0
- package/src/theme/ResponseSchema/index.tsx +144 -0
- package/src/theme/Schema/index.tsx +939 -0
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.tsx +198 -0
- package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/src/theme/SchemaTabs/index.tsx +224 -0
- package/src/theme/SkeletonLoader/index.tsx +18 -0
- package/src/theme/StatusCodes/index.tsx +72 -0
- package/src/theme/styles.scss +212 -0
- package/src/theme-classic.d.ts +80 -0
- package/src/theme-openapi.d.ts +288 -0
- package/src/theme-translations.d.ts +9 -0
- package/src/types.ts +182 -0
- package/tsconfig.json +16 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var __importDefault =
|
|
9
|
+
(this && this.__importDefault) ||
|
|
10
|
+
function (mod) {
|
|
11
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.default = CodeBlockString;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
17
|
+
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
18
|
+
const Container_1 = __importDefault(
|
|
19
|
+
require("@theme/ApiExplorer/ApiCodeBlock/Container")
|
|
20
|
+
);
|
|
21
|
+
const CopyButton_1 = __importDefault(
|
|
22
|
+
require("@theme/ApiExplorer/ApiCodeBlock/CopyButton")
|
|
23
|
+
);
|
|
24
|
+
const ExpandButton_1 = __importDefault(
|
|
25
|
+
require("@theme/ApiExplorer/ApiCodeBlock/ExpandButton")
|
|
26
|
+
);
|
|
27
|
+
const Line_1 = __importDefault(require("@theme/ApiExplorer/ApiCodeBlock/Line"));
|
|
28
|
+
const WordWrapButton_1 = __importDefault(
|
|
29
|
+
require("@theme/ApiExplorer/ApiCodeBlock/WordWrapButton")
|
|
30
|
+
);
|
|
31
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
32
|
+
const prism_react_renderer_1 = require("prism-react-renderer");
|
|
33
|
+
function CodeBlockString({
|
|
34
|
+
children,
|
|
35
|
+
className: blockClassName = "",
|
|
36
|
+
metastring,
|
|
37
|
+
title: titleProp,
|
|
38
|
+
showLineNumbers: showLineNumbersProp,
|
|
39
|
+
language: languageProp,
|
|
40
|
+
}) {
|
|
41
|
+
const {
|
|
42
|
+
prism: { defaultLanguage, magicComments },
|
|
43
|
+
} = (0, theme_common_1.useThemeConfig)();
|
|
44
|
+
const language =
|
|
45
|
+
languageProp ??
|
|
46
|
+
(0, internal_1.parseLanguage)(blockClassName) ??
|
|
47
|
+
defaultLanguage;
|
|
48
|
+
const prismTheme = (0, theme_common_1.usePrismTheme)();
|
|
49
|
+
const wordWrap = (0, internal_1.useCodeWordWrap)();
|
|
50
|
+
// We still parse the metastring in case we want to support more syntax in the
|
|
51
|
+
// future. Note that MDX doesn't strip quotes when parsing metastring:
|
|
52
|
+
// "title=\"xyz\"" => title: "\"xyz\""
|
|
53
|
+
const title = (0, internal_1.parseCodeBlockTitle)(metastring) || titleProp;
|
|
54
|
+
const { lineClassNames, code } = (0, internal_1.parseLines)(children, {
|
|
55
|
+
metastring,
|
|
56
|
+
language,
|
|
57
|
+
magicComments,
|
|
58
|
+
});
|
|
59
|
+
const showLineNumbers =
|
|
60
|
+
showLineNumbersProp ?? (0, internal_1.containsLineNumbers)(metastring);
|
|
61
|
+
return react_1.default.createElement(
|
|
62
|
+
Container_1.default,
|
|
63
|
+
{
|
|
64
|
+
as: "div",
|
|
65
|
+
className: (0, clsx_1.default)(
|
|
66
|
+
blockClassName,
|
|
67
|
+
language &&
|
|
68
|
+
!blockClassName.includes(`language-${language}`) &&
|
|
69
|
+
`language-${language}`
|
|
70
|
+
),
|
|
71
|
+
},
|
|
72
|
+
title &&
|
|
73
|
+
react_1.default.createElement(
|
|
74
|
+
"div",
|
|
75
|
+
{ className: "openapi-explorer__code-block-title" },
|
|
76
|
+
title
|
|
77
|
+
),
|
|
78
|
+
react_1.default.createElement(
|
|
79
|
+
"div",
|
|
80
|
+
{ className: "openapi-explorer__code-block-content" },
|
|
81
|
+
react_1.default.createElement(
|
|
82
|
+
prism_react_renderer_1.Highlight,
|
|
83
|
+
// {...defaultProps}
|
|
84
|
+
{
|
|
85
|
+
// {...defaultProps}
|
|
86
|
+
theme: prismTheme,
|
|
87
|
+
code: code,
|
|
88
|
+
language: language ?? "text",
|
|
89
|
+
},
|
|
90
|
+
({ className, tokens, getLineProps, getTokenProps }) =>
|
|
91
|
+
react_1.default.createElement(
|
|
92
|
+
"pre",
|
|
93
|
+
{
|
|
94
|
+
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
95
|
+
tabIndex: 0,
|
|
96
|
+
ref: wordWrap.codeBlockRef,
|
|
97
|
+
className: (0, clsx_1.default)(
|
|
98
|
+
className,
|
|
99
|
+
"openapi-explorer__code-block",
|
|
100
|
+
"thin-scrollbar"
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
react_1.default.createElement(
|
|
104
|
+
"code",
|
|
105
|
+
{
|
|
106
|
+
className: (0, clsx_1.default)(
|
|
107
|
+
"openapi-explorer__code-block-lines",
|
|
108
|
+
showLineNumbers &&
|
|
109
|
+
"openapi-explorer__code-block-lines-numbering"
|
|
110
|
+
),
|
|
111
|
+
},
|
|
112
|
+
tokens.map((line, i) =>
|
|
113
|
+
react_1.default.createElement(Line_1.default, {
|
|
114
|
+
key: i,
|
|
115
|
+
line: line,
|
|
116
|
+
getLineProps: getLineProps,
|
|
117
|
+
getTokenProps: getTokenProps,
|
|
118
|
+
classNames: lineClassNames[i],
|
|
119
|
+
showLineNumbers: showLineNumbers,
|
|
120
|
+
})
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
),
|
|
125
|
+
react_1.default.createElement(
|
|
126
|
+
"div",
|
|
127
|
+
{ className: "openapi-explorer__code-block-btn-group" },
|
|
128
|
+
(wordWrap.isEnabled || wordWrap.isCodeScrollable) &&
|
|
129
|
+
react_1.default.createElement(WordWrapButton_1.default, {
|
|
130
|
+
className: "openapi-explorer__code-block-code-btn",
|
|
131
|
+
onClick: () => wordWrap.toggle(),
|
|
132
|
+
isEnabled: wordWrap.isEnabled,
|
|
133
|
+
}),
|
|
134
|
+
react_1.default.createElement(CopyButton_1.default, {
|
|
135
|
+
className: "openapi-explorer__code-block-code-btn",
|
|
136
|
+
code: code,
|
|
137
|
+
}),
|
|
138
|
+
react_1.default.createElement(ExpandButton_1.default, {
|
|
139
|
+
className: (0, clsx_1.default)(
|
|
140
|
+
"openapi-explorer__code-block-code-btn",
|
|
141
|
+
"openapi-explorer__expand-btn"
|
|
142
|
+
),
|
|
143
|
+
code: code,
|
|
144
|
+
language: language ?? "text",
|
|
145
|
+
showLineNumbers: showLineNumbers,
|
|
146
|
+
blockClassName: blockClassName,
|
|
147
|
+
title: title,
|
|
148
|
+
lineClassNames: lineClassNames,
|
|
149
|
+
})
|
|
150
|
+
)
|
|
151
|
+
)
|
|
152
|
+
);
|
|
153
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.openapi-explorer__code-block-content {
|
|
2
|
+
height: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
/* rtl:ignore */
|
|
5
|
+
direction: ltr;
|
|
6
|
+
border-radius: inherit;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.openapi-explorer__code-block-title {
|
|
10
|
+
border-bottom: 1px solid var(--ifm-color-emphasis-300);
|
|
11
|
+
font-size: var(--ifm-code-font-size);
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
padding: 0.75rem var(--ifm-pre-padding);
|
|
14
|
+
border-top-left-radius: inherit;
|
|
15
|
+
border-top-right-radius: inherit;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.openapi-explorer__code-block {
|
|
19
|
+
height: 100%;
|
|
20
|
+
border-radius: var(--ifm-global-radius);
|
|
21
|
+
--ifm-pre-background: var(--prism-background-color);
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.openapi-explorer__code-block-title
|
|
27
|
+
+ .openapi-explorer__code-block-content
|
|
28
|
+
.openapi-explorer__code-block {
|
|
29
|
+
border-top-left-radius: 0;
|
|
30
|
+
border-top-right-radius: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.openapi-explorer__code-block-standalone {
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.openapi-explorer__code-block-lines {
|
|
38
|
+
font: inherit;
|
|
39
|
+
/* rtl:ignore */
|
|
40
|
+
float: left;
|
|
41
|
+
min-width: 100%;
|
|
42
|
+
padding: var(--ifm-pre-padding);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.openapi-explorer__code-block-lines-numbering {
|
|
46
|
+
// This causes max-height to unset
|
|
47
|
+
// display: table;
|
|
48
|
+
padding: var(--ifm-pre-padding) 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media print {
|
|
52
|
+
.openapi-explorer__code-block-lines {
|
|
53
|
+
white-space: pre-wrap;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.openapi-explorer__code-block-btn-group {
|
|
58
|
+
display: flex;
|
|
59
|
+
column-gap: 0.2rem;
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: calc(var(--ifm-pre-padding) / 2);
|
|
62
|
+
top: calc(var(--ifm-pre-padding) / 2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.openapi-explorer__code-block-btn-group button {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
background: var(--prism-background-color);
|
|
69
|
+
color: var(--prism-color);
|
|
70
|
+
border: 1px solid var(--ifm-color-emphasis-300);
|
|
71
|
+
border-radius: var(--ifm-global-radius);
|
|
72
|
+
padding: 0.4rem;
|
|
73
|
+
line-height: 0;
|
|
74
|
+
transition: opacity 200ms ease-in-out;
|
|
75
|
+
opacity: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.openapi-explorer__code-block-btn-group button:focus-visible,
|
|
79
|
+
.openapi-explorer__code-block-btn-group button:hover {
|
|
80
|
+
opacity: 1 !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.theme-code-block:hover .openapi-explorer__code-block-btn-group button {
|
|
84
|
+
opacity: 0.4;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media screen and (max-width: 996px) {
|
|
88
|
+
.openapi-explorer__expand-btn {
|
|
89
|
+
display: none !important;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.theme-code-block:hover {
|
|
2
|
+
.openapi-explorer__code-block-copy-btn--copied {
|
|
3
|
+
opacity: 1 !important;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.openapi-explorer__code-block-copy-btn-icons {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 1.125rem;
|
|
10
|
+
height: 1.125rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.openapi-explorer__code-block-copy-btn-icon,
|
|
14
|
+
.openapi-explorer__code-block-copy-btn-icon--success {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
fill: currentColor;
|
|
19
|
+
opacity: inherit;
|
|
20
|
+
width: inherit;
|
|
21
|
+
height: inherit;
|
|
22
|
+
transition: all 0.15s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.openapi-explorer__code-block-copy-btn-icon--success {
|
|
26
|
+
top: 50%;
|
|
27
|
+
left: 50%;
|
|
28
|
+
transform: translate(-50%, -50%) scale(0.33);
|
|
29
|
+
opacity: 0;
|
|
30
|
+
color: #00d600;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.openapi-explorer__code-block-copy-btn--copied {
|
|
34
|
+
.openapi-explorer__code-block-copy-btn-icon {
|
|
35
|
+
transform: scale(0.33);
|
|
36
|
+
opacity: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.openapi-explorer__code-block-copy-btn-icon--success {
|
|
40
|
+
transform: translate(-50%, -50%) scale(1);
|
|
41
|
+
opacity: 1;
|
|
42
|
+
transition-delay: 0.075s;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var __createBinding =
|
|
9
|
+
(this && this.__createBinding) ||
|
|
10
|
+
(Object.create
|
|
11
|
+
? function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (
|
|
15
|
+
!desc ||
|
|
16
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
17
|
+
) {
|
|
18
|
+
desc = {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return m[k];
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}
|
|
27
|
+
: function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
var __setModuleDefault =
|
|
32
|
+
(this && this.__setModuleDefault) ||
|
|
33
|
+
(Object.create
|
|
34
|
+
? function (o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}
|
|
37
|
+
: function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
var __importStar =
|
|
41
|
+
(this && this.__importStar) ||
|
|
42
|
+
(function () {
|
|
43
|
+
var ownKeys = function (o) {
|
|
44
|
+
ownKeys =
|
|
45
|
+
Object.getOwnPropertyNames ||
|
|
46
|
+
function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
return ownKeys(o);
|
|
53
|
+
};
|
|
54
|
+
return function (mod) {
|
|
55
|
+
if (mod && mod.__esModule) return mod;
|
|
56
|
+
var result = {};
|
|
57
|
+
if (mod != null)
|
|
58
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
59
|
+
if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
60
|
+
__setModuleDefault(result, mod);
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
64
|
+
var __importDefault =
|
|
65
|
+
(this && this.__importDefault) ||
|
|
66
|
+
function (mod) {
|
|
67
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
68
|
+
};
|
|
69
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
|
+
exports.default = CopyButton;
|
|
71
|
+
const react_1 = __importStar(require("react"));
|
|
72
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
73
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
74
|
+
const copy_text_to_clipboard_1 = __importDefault(
|
|
75
|
+
require("copy-text-to-clipboard")
|
|
76
|
+
);
|
|
77
|
+
function CopyButton({ code, className }) {
|
|
78
|
+
const [isCopied, setIsCopied] = (0, react_1.useState)(false);
|
|
79
|
+
const copyTimeout = (0, react_1.useRef)(undefined);
|
|
80
|
+
const handleCopyCode = (0, react_1.useCallback)(() => {
|
|
81
|
+
(0, copy_text_to_clipboard_1.default)(code);
|
|
82
|
+
setIsCopied(true);
|
|
83
|
+
copyTimeout.current = window.setTimeout(() => {
|
|
84
|
+
setIsCopied(false);
|
|
85
|
+
}, 1000);
|
|
86
|
+
}, [code]);
|
|
87
|
+
(0, react_1.useEffect)(
|
|
88
|
+
() => () => window.clearTimeout(copyTimeout.current),
|
|
89
|
+
[]
|
|
90
|
+
);
|
|
91
|
+
return react_1.default.createElement(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
"aria-label": isCopied
|
|
96
|
+
? (0, Translate_1.translate)({
|
|
97
|
+
id: "theme.CodeBlock.copied",
|
|
98
|
+
message: "Copied",
|
|
99
|
+
description: "The copied button label on code blocks",
|
|
100
|
+
})
|
|
101
|
+
: (0, Translate_1.translate)({
|
|
102
|
+
id: "theme.CodeBlock.copyButtonAriaLabel",
|
|
103
|
+
message: "Copy code to clipboard",
|
|
104
|
+
description: "The ARIA label for copy code blocks button",
|
|
105
|
+
}),
|
|
106
|
+
title: (0, Translate_1.translate)({
|
|
107
|
+
id: "theme.CodeBlock.copy",
|
|
108
|
+
message: "Copy",
|
|
109
|
+
description: "The copy button label on code blocks",
|
|
110
|
+
}),
|
|
111
|
+
className: (0, clsx_1.default)(
|
|
112
|
+
"clean-btn",
|
|
113
|
+
className,
|
|
114
|
+
"openapi-explorer__code-block-copy-btn",
|
|
115
|
+
isCopied && "openapi-explorer__code-block-copy-btn--copied"
|
|
116
|
+
),
|
|
117
|
+
onClick: handleCopyCode,
|
|
118
|
+
},
|
|
119
|
+
react_1.default.createElement(
|
|
120
|
+
"span",
|
|
121
|
+
{
|
|
122
|
+
className: "openapi-explorer__code-block-copy-btn-icons",
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
},
|
|
125
|
+
react_1.default.createElement(
|
|
126
|
+
"svg",
|
|
127
|
+
{
|
|
128
|
+
className: "openapi-explorer__code-block-copy-btn-icon",
|
|
129
|
+
viewBox: "0 0 24 24",
|
|
130
|
+
},
|
|
131
|
+
react_1.default.createElement("path", {
|
|
132
|
+
d: "M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",
|
|
133
|
+
})
|
|
134
|
+
),
|
|
135
|
+
react_1.default.createElement(
|
|
136
|
+
"svg",
|
|
137
|
+
{
|
|
138
|
+
className: "openapi-explorer__code-block-copy-btn-icon--success",
|
|
139
|
+
viewBox: "0 0 24 24",
|
|
140
|
+
},
|
|
141
|
+
react_1.default.createElement("path", {
|
|
142
|
+
d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",
|
|
143
|
+
})
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.openapi-explorer__code-block-exit-btn-icons {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 1.125rem;
|
|
4
|
+
height: 1.125rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.openapi-explorer__code-block-exit-btn-icon {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
opacity: inherit;
|
|
13
|
+
width: inherit;
|
|
14
|
+
height: inherit;
|
|
15
|
+
transition: all 0.15s ease;
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var __importDefault =
|
|
9
|
+
(this && this.__importDefault) ||
|
|
10
|
+
function (mod) {
|
|
11
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.default = ExitButton;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
17
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
18
|
+
function ExitButton({ className, handler }) {
|
|
19
|
+
return react_1.default.createElement(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
type: "button",
|
|
23
|
+
"aria-label": (0, Translate_1.translate)({
|
|
24
|
+
id: "theme.CodeBlock.exitButtonAriaLabel",
|
|
25
|
+
message: "Exit expanded view",
|
|
26
|
+
description: "The ARIA label for exit expanded view button",
|
|
27
|
+
}),
|
|
28
|
+
title: (0, Translate_1.translate)({
|
|
29
|
+
id: "theme.CodeBlock.copy",
|
|
30
|
+
message: "Copy",
|
|
31
|
+
description: "The exit button label on code blocks",
|
|
32
|
+
}),
|
|
33
|
+
className: (0, clsx_1.default)(
|
|
34
|
+
"clean-btn",
|
|
35
|
+
"openapi-explorer__code-block-exit-btn",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
onClick: handler,
|
|
39
|
+
},
|
|
40
|
+
react_1.default.createElement(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
className: "openapi-explorer__code-block-exit-btn-icons",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
},
|
|
46
|
+
react_1.default.createElement(
|
|
47
|
+
"svg",
|
|
48
|
+
{
|
|
49
|
+
className: "openapi-explorer__code-block-exit-btn-icon",
|
|
50
|
+
viewBox: "0 0 384 512",
|
|
51
|
+
},
|
|
52
|
+
react_1.default.createElement("path", {
|
|
53
|
+
d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z",
|
|
54
|
+
})
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.openapi-explorer__expand-modal-content {
|
|
2
|
+
padding: none;
|
|
3
|
+
border: thin solid var(--ifm-toc-border-color);
|
|
4
|
+
border-radius: var(--ifm-global-radius);
|
|
5
|
+
max-width: 95%;
|
|
6
|
+
width: 65vw;
|
|
7
|
+
height: 65vh;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.openapi-explorer__expand-modal-overlay {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset: 0px;
|
|
17
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
18
|
+
z-index: 201;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.theme-code-block:hover .openapi-explorer__code-block-expand-btn--copied {
|
|
22
|
+
opacity: 1 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.openapi-explorer__code-block-expand-btn-icons {
|
|
26
|
+
position: relative;
|
|
27
|
+
width: 1.125rem;
|
|
28
|
+
height: 1.125rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.openapi-explorer__code-block-expand-btn-icon,
|
|
32
|
+
.openapi-explorer__code-block-expand-btn-icon--success {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
fill: currentColor;
|
|
37
|
+
opacity: inherit;
|
|
38
|
+
width: inherit;
|
|
39
|
+
height: inherit;
|
|
40
|
+
transition: all 0.15s ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.openapi-explorer__code-block-expand-btn-icon--success {
|
|
44
|
+
top: 50%;
|
|
45
|
+
left: 50%;
|
|
46
|
+
transform: translate(-50%, -50%) scale(0.33);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
color: #00d600;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.openapi-explorer__code-block-expand-btn--copied
|
|
52
|
+
.openapi-explorer__code-block-expand-btn-icon {
|
|
53
|
+
transform: scale(0.33);
|
|
54
|
+
opacity: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.openapi-explorer__code-block-expand-btn--copied
|
|
58
|
+
.openapi-explorer__code-block-expand-btn-icon--success {
|
|
59
|
+
transform: translate(-50%, -50%) scale(1);
|
|
60
|
+
opacity: 1;
|
|
61
|
+
transition-delay: 0.075s;
|
|
62
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Language } from "prism-react-renderer";
|
|
3
|
+
export interface Props {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
readonly className: string;
|
|
6
|
+
readonly language: Language;
|
|
7
|
+
readonly showLineNumbers: boolean;
|
|
8
|
+
readonly blockClassName: string;
|
|
9
|
+
readonly title: string | undefined;
|
|
10
|
+
readonly lineClassNames: {
|
|
11
|
+
[lineIndex: number]: string[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export default function ExpandButton({ code, className, language, showLineNumbers, blockClassName, title, lineClassNames, }: Props): React.JSX.Element;
|