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,121 @@
|
|
|
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 = DocItemLayout;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const client_1 = require("@docusaurus/plugin-content-docs/client");
|
|
17
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
18
|
+
const ContentVisibility_1 = __importDefault(
|
|
19
|
+
require("@theme/ContentVisibility")
|
|
20
|
+
);
|
|
21
|
+
const DocBreadcrumbs_1 = __importDefault(require("@theme/DocBreadcrumbs"));
|
|
22
|
+
const Content_1 = __importDefault(require("@theme/DocItem/Content"));
|
|
23
|
+
const Footer_1 = __importDefault(require("@theme/DocItem/Footer"));
|
|
24
|
+
const Paginator_1 = __importDefault(require("@theme/DocItem/Paginator"));
|
|
25
|
+
const Desktop_1 = __importDefault(require("@theme/DocItem/TOC/Desktop"));
|
|
26
|
+
const Mobile_1 = __importDefault(require("@theme/DocItem/TOC/Mobile"));
|
|
27
|
+
const DocVersionBadge_1 = __importDefault(require("@theme/DocVersionBadge"));
|
|
28
|
+
const DocVersionBanner_1 = __importDefault(require("@theme/DocVersionBanner"));
|
|
29
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
30
|
+
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
31
|
+
/**
|
|
32
|
+
* Decide if the toc should be rendered, on mobile or desktop viewports
|
|
33
|
+
*/
|
|
34
|
+
function useDocTOC() {
|
|
35
|
+
const { frontMatter, toc } = (0, client_1.useDoc)();
|
|
36
|
+
const windowSize = (0, theme_common_1.useWindowSize)();
|
|
37
|
+
const hidden = frontMatter.hide_table_of_contents;
|
|
38
|
+
const canRender = !hidden && toc.length > 0;
|
|
39
|
+
const mobile = canRender
|
|
40
|
+
? react_1.default.createElement(Mobile_1.default, null)
|
|
41
|
+
: undefined;
|
|
42
|
+
const desktop =
|
|
43
|
+
canRender && (windowSize === "desktop" || windowSize === "ssr")
|
|
44
|
+
? react_1.default.createElement(Desktop_1.default, null)
|
|
45
|
+
: undefined;
|
|
46
|
+
return {
|
|
47
|
+
hidden,
|
|
48
|
+
mobile,
|
|
49
|
+
desktop,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function DocItemLayout({ children }) {
|
|
53
|
+
const docTOC = useDocTOC();
|
|
54
|
+
const { metadata } = (0, client_1.useDoc)();
|
|
55
|
+
const { frontMatter } = (0, client_1.useDoc)();
|
|
56
|
+
const api = frontMatter.api;
|
|
57
|
+
const schema = frontMatter.schema;
|
|
58
|
+
return react_1.default.createElement(
|
|
59
|
+
"div",
|
|
60
|
+
{ className: "row" },
|
|
61
|
+
react_1.default.createElement(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: (0, clsx_1.default)(
|
|
65
|
+
"col",
|
|
66
|
+
!docTOC.hidden && styles_module_css_1.default.docItemCol
|
|
67
|
+
),
|
|
68
|
+
},
|
|
69
|
+
react_1.default.createElement(ContentVisibility_1.default, {
|
|
70
|
+
metadata: metadata,
|
|
71
|
+
}),
|
|
72
|
+
react_1.default.createElement(DocVersionBanner_1.default, null),
|
|
73
|
+
react_1.default.createElement(
|
|
74
|
+
"div",
|
|
75
|
+
{ className: styles_module_css_1.default.docItemContainer },
|
|
76
|
+
react_1.default.createElement(
|
|
77
|
+
"article",
|
|
78
|
+
null,
|
|
79
|
+
react_1.default.createElement(DocBreadcrumbs_1.default, null),
|
|
80
|
+
react_1.default.createElement(DocVersionBadge_1.default, null),
|
|
81
|
+
docTOC.mobile,
|
|
82
|
+
react_1.default.createElement(Content_1.default, null, children),
|
|
83
|
+
react_1.default.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{ className: "row" },
|
|
86
|
+
react_1.default.createElement(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: (0, clsx_1.default)(
|
|
90
|
+
"col",
|
|
91
|
+
api || schema ? "col--7" : "col--12"
|
|
92
|
+
),
|
|
93
|
+
},
|
|
94
|
+
react_1.default.createElement(Footer_1.default, null)
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
),
|
|
98
|
+
react_1.default.createElement(
|
|
99
|
+
"div",
|
|
100
|
+
{ className: "row" },
|
|
101
|
+
react_1.default.createElement(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: (0, clsx_1.default)(
|
|
105
|
+
"col",
|
|
106
|
+
api || schema ? "col--7" : "col--12"
|
|
107
|
+
),
|
|
108
|
+
},
|
|
109
|
+
react_1.default.createElement(Paginator_1.default, null)
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
),
|
|
114
|
+
docTOC.desktop &&
|
|
115
|
+
react_1.default.createElement(
|
|
116
|
+
"div",
|
|
117
|
+
{ className: "col col--3" },
|
|
118
|
+
docTOC.desktop
|
|
119
|
+
)
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
.docItemContainer header + *,
|
|
9
|
+
.docItemContainer article > *:first-child {
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media (min-width: 997px) {
|
|
14
|
+
.docItemCol {
|
|
15
|
+
max-width: 75% !important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TypedUseSelectorHook } from "react-redux";
|
|
2
|
+
import type { RootState } from "./store";
|
|
3
|
+
export declare const useTypedDispatch: () => import("redux-thunk").ThunkDispatch<import("redux").CombinedState<{
|
|
4
|
+
accept: unknown;
|
|
5
|
+
contentType: unknown;
|
|
6
|
+
response: unknown;
|
|
7
|
+
server: unknown;
|
|
8
|
+
body: unknown;
|
|
9
|
+
params: unknown;
|
|
10
|
+
auth: unknown;
|
|
11
|
+
}>, undefined, import("redux").AnyAction> & import("redux").Dispatch<any>;
|
|
12
|
+
export declare const useTypedSelector: TypedUseSelectorHook<RootState>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.useTypedSelector = exports.useTypedDispatch = void 0;
|
|
10
|
+
const react_redux_1 = require("react-redux");
|
|
11
|
+
const useTypedDispatch = () => (0, react_redux_1.useDispatch)();
|
|
12
|
+
exports.useTypedDispatch = useTypedDispatch;
|
|
13
|
+
exports.useTypedSelector = react_redux_1.useSelector;
|
|
@@ -0,0 +1,238 @@
|
|
|
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 = ApiItem;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const BrowserOnly_1 = __importDefault(require("@docusaurus/BrowserOnly"));
|
|
17
|
+
const ExecutionEnvironment_1 = __importDefault(
|
|
18
|
+
require("@docusaurus/ExecutionEnvironment")
|
|
19
|
+
);
|
|
20
|
+
const client_1 = require("@docusaurus/plugin-content-docs/client");
|
|
21
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
22
|
+
const useDocusaurusContext_1 = __importDefault(
|
|
23
|
+
require("@docusaurus/useDocusaurusContext")
|
|
24
|
+
);
|
|
25
|
+
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
26
|
+
const slice_1 = require("@theme/ApiExplorer/Authorization/slice");
|
|
27
|
+
const persistanceMiddleware_1 = require("@theme/ApiExplorer/persistanceMiddleware");
|
|
28
|
+
const Layout_1 = __importDefault(require("@theme/ApiItem/Layout"));
|
|
29
|
+
const CodeBlock_1 = __importDefault(require("@theme/CodeBlock"));
|
|
30
|
+
const Metadata_1 = __importDefault(require("@theme/DocItem/Metadata"));
|
|
31
|
+
const SkeletonLoader_1 = __importDefault(require("@theme/SkeletonLoader"));
|
|
32
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
33
|
+
const pako_1 = require("pako");
|
|
34
|
+
const react_redux_1 = require("react-redux");
|
|
35
|
+
const store_1 = require("./store");
|
|
36
|
+
let ApiExplorer = (_) => react_1.default.createElement("div", null);
|
|
37
|
+
if (ExecutionEnvironment_1.default.canUseDOM) {
|
|
38
|
+
ApiExplorer = require("@theme/ApiExplorer").default;
|
|
39
|
+
}
|
|
40
|
+
function base64ToUint8Array(base64) {
|
|
41
|
+
const binary = atob(base64);
|
|
42
|
+
const len = binary.length;
|
|
43
|
+
const bytes = new Uint8Array(len);
|
|
44
|
+
for (let i = 0; i < len; i++) {
|
|
45
|
+
bytes[i] = binary.charCodeAt(i);
|
|
46
|
+
}
|
|
47
|
+
return bytes;
|
|
48
|
+
}
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
function ApiItem(props) {
|
|
51
|
+
const docHtmlClassName = `docs-doc-id-${props.content.metadata.id}`;
|
|
52
|
+
const MDXComponent = props.content;
|
|
53
|
+
const { frontMatter } = MDXComponent;
|
|
54
|
+
const { info_path: infoPath } = frontMatter;
|
|
55
|
+
let { api } = frontMatter;
|
|
56
|
+
const { schema } = frontMatter;
|
|
57
|
+
const { sample } = frontMatter;
|
|
58
|
+
// decompress and parse
|
|
59
|
+
if (api) {
|
|
60
|
+
try {
|
|
61
|
+
api = JSON.parse(
|
|
62
|
+
new TextDecoder().decode((0, pako_1.ungzip)(base64ToUint8Array(api)))
|
|
63
|
+
);
|
|
64
|
+
} catch {}
|
|
65
|
+
}
|
|
66
|
+
const { siteConfig } = (0, useDocusaurusContext_1.default)();
|
|
67
|
+
const themeConfig = siteConfig.themeConfig;
|
|
68
|
+
const options = themeConfig.api;
|
|
69
|
+
const isBrowser = (0, useIsBrowser_1.default)();
|
|
70
|
+
// Regex for 2XX status
|
|
71
|
+
const statusRegex = new RegExp("(20[0-9]|2[1-9][0-9])");
|
|
72
|
+
// Define store2
|
|
73
|
+
let store2 = {};
|
|
74
|
+
const persistanceMiddleware = (0,
|
|
75
|
+
persistanceMiddleware_1.createPersistanceMiddleware)(options);
|
|
76
|
+
// Init store for SSR
|
|
77
|
+
if (!isBrowser) {
|
|
78
|
+
store2 = (0, store_1.createStoreWithoutState)({}, [persistanceMiddleware]);
|
|
79
|
+
}
|
|
80
|
+
// Init store for CSR to hydrate components
|
|
81
|
+
if (isBrowser) {
|
|
82
|
+
// Create list of only 2XX response content types to create request samples from
|
|
83
|
+
let acceptArray = [];
|
|
84
|
+
for (const [code, content] of Object.entries(api?.responses ?? [])) {
|
|
85
|
+
if (statusRegex.test(code)) {
|
|
86
|
+
acceptArray.push(Object.keys(content.content ?? {}));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
acceptArray = acceptArray.flat();
|
|
90
|
+
const content = api?.requestBody?.content ?? {};
|
|
91
|
+
const contentTypeArray = Object.keys(content);
|
|
92
|
+
const servers = api?.servers ?? [];
|
|
93
|
+
const params = {
|
|
94
|
+
path: [],
|
|
95
|
+
query: [],
|
|
96
|
+
header: [],
|
|
97
|
+
cookie: [],
|
|
98
|
+
};
|
|
99
|
+
api?.parameters?.forEach((param) => {
|
|
100
|
+
const paramType = param.in;
|
|
101
|
+
const paramsArray = params[paramType];
|
|
102
|
+
paramsArray.push(param);
|
|
103
|
+
});
|
|
104
|
+
const auth = (0, slice_1.createAuth)({
|
|
105
|
+
security: api?.security,
|
|
106
|
+
securitySchemes: api?.securitySchemes,
|
|
107
|
+
options,
|
|
108
|
+
});
|
|
109
|
+
// TODO: determine way to rehydrate without flashing
|
|
110
|
+
// const acceptValue = window?.sessionStorage.getItem("accept");
|
|
111
|
+
// const contentTypeValue = window?.sessionStorage.getItem("contentType");
|
|
112
|
+
const server = window?.sessionStorage.getItem("server");
|
|
113
|
+
const serverObject = JSON.parse(server) ?? {};
|
|
114
|
+
store2 = (0, store_1.createStoreWithState)(
|
|
115
|
+
{
|
|
116
|
+
accept: {
|
|
117
|
+
value: acceptArray[0],
|
|
118
|
+
options: acceptArray,
|
|
119
|
+
},
|
|
120
|
+
contentType: {
|
|
121
|
+
value: contentTypeArray[0],
|
|
122
|
+
options: contentTypeArray,
|
|
123
|
+
},
|
|
124
|
+
server: {
|
|
125
|
+
value: serverObject.url ? serverObject : undefined,
|
|
126
|
+
options: servers,
|
|
127
|
+
},
|
|
128
|
+
response: { value: undefined },
|
|
129
|
+
body: { type: "empty" },
|
|
130
|
+
params,
|
|
131
|
+
auth,
|
|
132
|
+
},
|
|
133
|
+
[persistanceMiddleware]
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
if (api) {
|
|
137
|
+
return react_1.default.createElement(
|
|
138
|
+
client_1.DocProvider,
|
|
139
|
+
{ content: props.content },
|
|
140
|
+
react_1.default.createElement(
|
|
141
|
+
theme_common_1.HtmlClassNameProvider,
|
|
142
|
+
{ className: docHtmlClassName },
|
|
143
|
+
react_1.default.createElement(Metadata_1.default, null),
|
|
144
|
+
react_1.default.createElement(
|
|
145
|
+
Layout_1.default,
|
|
146
|
+
null,
|
|
147
|
+
react_1.default.createElement(
|
|
148
|
+
react_redux_1.Provider,
|
|
149
|
+
{ store: store2 },
|
|
150
|
+
react_1.default.createElement(
|
|
151
|
+
"div",
|
|
152
|
+
{ className: (0, clsx_1.default)("row", "theme-api-markdown") },
|
|
153
|
+
react_1.default.createElement(
|
|
154
|
+
"div",
|
|
155
|
+
{ className: "col col--7 openapi-left-panel__container" },
|
|
156
|
+
react_1.default.createElement(MDXComponent, null)
|
|
157
|
+
),
|
|
158
|
+
react_1.default.createElement(
|
|
159
|
+
"div",
|
|
160
|
+
{ className: "col col--5 openapi-right-panel__container" },
|
|
161
|
+
react_1.default.createElement(
|
|
162
|
+
BrowserOnly_1.default,
|
|
163
|
+
{
|
|
164
|
+
fallback: react_1.default.createElement(
|
|
165
|
+
SkeletonLoader_1.default,
|
|
166
|
+
{ size: "lg" }
|
|
167
|
+
),
|
|
168
|
+
},
|
|
169
|
+
() => {
|
|
170
|
+
return react_1.default.createElement(ApiExplorer, {
|
|
171
|
+
item: api,
|
|
172
|
+
infoPath: infoPath,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
)
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
|
+
} else if (schema) {
|
|
183
|
+
return react_1.default.createElement(
|
|
184
|
+
client_1.DocProvider,
|
|
185
|
+
{ content: props.content },
|
|
186
|
+
react_1.default.createElement(
|
|
187
|
+
theme_common_1.HtmlClassNameProvider,
|
|
188
|
+
{ className: docHtmlClassName },
|
|
189
|
+
react_1.default.createElement(Metadata_1.default, null),
|
|
190
|
+
react_1.default.createElement(
|
|
191
|
+
Layout_1.default,
|
|
192
|
+
null,
|
|
193
|
+
react_1.default.createElement(
|
|
194
|
+
"div",
|
|
195
|
+
{ className: (0, clsx_1.default)("row", "theme-api-markdown") },
|
|
196
|
+
react_1.default.createElement(
|
|
197
|
+
"div",
|
|
198
|
+
{ className: "col col--7 openapi-left-panel__container schema" },
|
|
199
|
+
react_1.default.createElement(MDXComponent, null)
|
|
200
|
+
),
|
|
201
|
+
react_1.default.createElement(
|
|
202
|
+
"div",
|
|
203
|
+
{ className: "col col--5 openapi-right-panel__container" },
|
|
204
|
+
react_1.default.createElement(
|
|
205
|
+
CodeBlock_1.default,
|
|
206
|
+
{ language: "json", title: `${frontMatter.title}` },
|
|
207
|
+
JSON.stringify(sample, null, 2)
|
|
208
|
+
)
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
)
|
|
212
|
+
)
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
// Non-API docs
|
|
216
|
+
return react_1.default.createElement(
|
|
217
|
+
client_1.DocProvider,
|
|
218
|
+
{ content: props.content },
|
|
219
|
+
react_1.default.createElement(
|
|
220
|
+
theme_common_1.HtmlClassNameProvider,
|
|
221
|
+
{ className: docHtmlClassName },
|
|
222
|
+
react_1.default.createElement(Metadata_1.default, null),
|
|
223
|
+
react_1.default.createElement(
|
|
224
|
+
Layout_1.default,
|
|
225
|
+
null,
|
|
226
|
+
react_1.default.createElement(
|
|
227
|
+
"div",
|
|
228
|
+
{ className: "row" },
|
|
229
|
+
react_1.default.createElement(
|
|
230
|
+
"div",
|
|
231
|
+
{ className: "col col--12 markdown" },
|
|
232
|
+
react_1.default.createElement(MDXComponent, null)
|
|
233
|
+
)
|
|
234
|
+
)
|
|
235
|
+
)
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const rootReducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
2
|
+
accept: unknown;
|
|
3
|
+
contentType: unknown;
|
|
4
|
+
response: unknown;
|
|
5
|
+
server: unknown;
|
|
6
|
+
body: unknown;
|
|
7
|
+
params: unknown;
|
|
8
|
+
auth: unknown;
|
|
9
|
+
}>, any>;
|
|
10
|
+
export type RootState = ReturnType<typeof rootReducer>;
|
|
11
|
+
export declare const createStoreWithState: (preloadedState: RootState, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
12
|
+
accept: unknown;
|
|
13
|
+
contentType: unknown;
|
|
14
|
+
response: unknown;
|
|
15
|
+
server: unknown;
|
|
16
|
+
body: unknown;
|
|
17
|
+
params: unknown;
|
|
18
|
+
auth: unknown;
|
|
19
|
+
}, any, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
20
|
+
accept: unknown;
|
|
21
|
+
contentType: unknown;
|
|
22
|
+
response: unknown;
|
|
23
|
+
server: unknown;
|
|
24
|
+
body: unknown;
|
|
25
|
+
params: unknown;
|
|
26
|
+
auth: unknown;
|
|
27
|
+
}>, import("redux").AnyAction>, ...any[]]>>;
|
|
28
|
+
export declare const createStoreWithoutState: (preloadedState: {}, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
29
|
+
accept: unknown;
|
|
30
|
+
contentType: unknown;
|
|
31
|
+
response: unknown;
|
|
32
|
+
server: unknown;
|
|
33
|
+
body: unknown;
|
|
34
|
+
params: unknown;
|
|
35
|
+
auth: unknown;
|
|
36
|
+
}, any, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
37
|
+
accept: unknown;
|
|
38
|
+
contentType: unknown;
|
|
39
|
+
response: unknown;
|
|
40
|
+
server: unknown;
|
|
41
|
+
body: unknown;
|
|
42
|
+
params: unknown;
|
|
43
|
+
auth: unknown;
|
|
44
|
+
}>, import("redux").AnyAction>, ...any[]]>>;
|
|
45
|
+
export type AppDispatch = ReturnType<typeof createStoreWithState>["dispatch"];
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
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.createStoreWithoutState = exports.createStoreWithState = void 0;
|
|
15
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
16
|
+
const slice_1 = __importDefault(require("@theme/ApiExplorer/Accept/slice"));
|
|
17
|
+
const slice_2 = __importDefault(
|
|
18
|
+
require("@theme/ApiExplorer/Authorization/slice")
|
|
19
|
+
);
|
|
20
|
+
const slice_3 = __importDefault(require("@theme/ApiExplorer/Body/slice"));
|
|
21
|
+
const slice_4 = __importDefault(
|
|
22
|
+
require("@theme/ApiExplorer/ContentType/slice")
|
|
23
|
+
);
|
|
24
|
+
const slice_5 = __importDefault(
|
|
25
|
+
require("@theme/ApiExplorer/ParamOptions/slice")
|
|
26
|
+
);
|
|
27
|
+
const slice_6 = __importDefault(require("@theme/ApiExplorer/Response/slice"));
|
|
28
|
+
const slice_7 = __importDefault(require("@theme/ApiExplorer/Server/slice"));
|
|
29
|
+
const rootReducer = (0, toolkit_1.combineReducers)({
|
|
30
|
+
accept: slice_1.default,
|
|
31
|
+
contentType: slice_4.default,
|
|
32
|
+
response: slice_6.default,
|
|
33
|
+
server: slice_7.default,
|
|
34
|
+
body: slice_3.default,
|
|
35
|
+
params: slice_5.default,
|
|
36
|
+
auth: slice_2.default,
|
|
37
|
+
});
|
|
38
|
+
const createStoreWithState = (preloadedState, middlewares) =>
|
|
39
|
+
(0, toolkit_1.configureStore)({
|
|
40
|
+
reducer: rootReducer,
|
|
41
|
+
preloadedState,
|
|
42
|
+
middleware: (getDefaultMiddleware) =>
|
|
43
|
+
getDefaultMiddleware().concat(...middlewares),
|
|
44
|
+
});
|
|
45
|
+
exports.createStoreWithState = createStoreWithState;
|
|
46
|
+
const createStoreWithoutState = (preloadedState, middlewares) =>
|
|
47
|
+
(0, toolkit_1.configureStore)({
|
|
48
|
+
reducer: rootReducer,
|
|
49
|
+
preloadedState,
|
|
50
|
+
middleware: (getDefaultMiddleware) =>
|
|
51
|
+
getDefaultMiddleware().concat(...middlewares),
|
|
52
|
+
});
|
|
53
|
+
exports.createStoreWithoutState = createStoreWithoutState;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 = ApiLogo;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
17
|
+
const useBaseUrl_1 = __importDefault(require("@docusaurus/useBaseUrl"));
|
|
18
|
+
const ThemedImage_1 = __importDefault(require("@theme/ThemedImage"));
|
|
19
|
+
function ApiLogo(props) {
|
|
20
|
+
const { colorMode } = (0, theme_common_1.useColorMode)();
|
|
21
|
+
const { logo, darkLogo } = props;
|
|
22
|
+
const altText = () => {
|
|
23
|
+
if (colorMode === "dark") {
|
|
24
|
+
return darkLogo?.altText ?? logo?.altText;
|
|
25
|
+
}
|
|
26
|
+
return logo?.altText;
|
|
27
|
+
};
|
|
28
|
+
const lightLogoUrl = (0, useBaseUrl_1.default)(logo?.url);
|
|
29
|
+
const darkLogoUrl = (0, useBaseUrl_1.default)(darkLogo?.url);
|
|
30
|
+
if (logo && darkLogo) {
|
|
31
|
+
return react_1.default.createElement(ThemedImage_1.default, {
|
|
32
|
+
alt: altText(),
|
|
33
|
+
sources: {
|
|
34
|
+
light: lightLogoUrl,
|
|
35
|
+
dark: darkLogoUrl,
|
|
36
|
+
},
|
|
37
|
+
className: "openapi__logo",
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (logo || darkLogo) {
|
|
41
|
+
return react_1.default.createElement(ThemedImage_1.default, {
|
|
42
|
+
alt: altText(),
|
|
43
|
+
sources: {
|
|
44
|
+
light: lightLogoUrl ?? darkLogoUrl,
|
|
45
|
+
dark: lightLogoUrl ?? darkLogoUrl,
|
|
46
|
+
},
|
|
47
|
+
className: "openapi__logo",
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|