@camunda8/docusaurus-theme-openapi-docs 4.5.1
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/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 +154 -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 +7 -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 +201 -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 +394 -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 +11 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +435 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +133 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +283 -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 +178 -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 +49 -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 +11 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +80 -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 +176 -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 +230 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +71 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +97 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +72 -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 +233 -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 +443 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.js +223 -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 +207 -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 +519 -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 +213 -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 +511 -0
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +107 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +19 -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 +58 -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 +275 -0
- package/lib/theme/ArrayBrackets/index.d.ts +3 -0
- package/lib/theme/ArrayBrackets/index.js +50 -0
- package/lib/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/lib/theme/CodeSamples/index.d.ts +8 -0
- package/lib/theme/CodeSamples/index.js +27 -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 +93 -0
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.d.ts +22 -0
- package/lib/theme/ParamsItem/index.js +281 -0
- package/lib/theme/RequestSchema/index.d.ts +15 -0
- package/lib/theme/RequestSchema/index.js +208 -0
- package/lib/theme/ResponseExamples/index.d.ts +18 -0
- package/lib/theme/ResponseExamples/index.js +213 -0
- package/lib/theme/ResponseHeaders/index.d.ts +13 -0
- package/lib/theme/ResponseHeaders/index.js +39 -0
- package/lib/theme/ResponseSchema/index.d.ts +15 -0
- package/lib/theme/ResponseSchema/index.js +165 -0
- package/lib/theme/Schema/index.d.ts +8 -0
- package/lib/theme/Schema/index.js +853 -0
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +314 -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 +90 -0
- package/lib/theme/styles.scss +215 -0
- package/lib/theme/translationIds.d.ts +83 -0
- package/lib/theme/translationIds.js +106 -0
- package/lib/types.d.ts +46 -0
- package/lib/types.js +8 -0
- package/package.json +85 -0
- package/src/index.ts +85 -0
- package/src/markdown/createDescription.ts +13 -0
- package/src/markdown/schema.ts +186 -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 +83 -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 +199 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
- package/src/theme/ApiExplorer/Body/index.tsx +388 -0
- package/src/theme/ApiExplorer/Body/json2xml.d.ts +8 -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 +383 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.ts +139 -0
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +261 -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 +124 -0
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +40 -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 +89 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +122 -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 +185 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +72 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +94 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +74 -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 +154 -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 +352 -0
- package/src/theme/ApiExplorer/Request/makeRequest.ts +255 -0
- package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/src/theme/ApiExplorer/Response/index.tsx +173 -0
- package/src/theme/ApiExplorer/Response/slice.ts +52 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +375 -0
- package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/src/theme/ApiExplorer/Server/index.tsx +138 -0
- package/src/theme/ApiExplorer/Server/slice.ts +39 -0
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +524 -0
- package/src/theme/ApiExplorer/index.tsx +52 -0
- package/src/theme/ApiExplorer/persistanceMiddleware.ts +73 -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 +243 -0
- package/src/theme/ArrayBrackets/index.tsx +37 -0
- package/src/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/src/theme/CodeSamples/index.tsx +26 -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.d.ts +8 -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 +90 -0
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.tsx +246 -0
- package/src/theme/RequestSchema/index.tsx +172 -0
- package/src/theme/ResponseExamples/index.tsx +209 -0
- package/src/theme/ResponseHeaders/index.tsx +49 -0
- package/src/theme/ResponseSchema/index.tsx +150 -0
- package/src/theme/Schema/index.tsx +938 -0
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.tsx +273 -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 +83 -0
- package/src/theme/styles.scss +215 -0
- package/src/theme/translationIds.ts +103 -0
- package/src/theme-classic.d.ts +80 -0
- package/src/theme-openapi.d.ts +20 -0
- package/src/types.ts +72 -0
- package/tsconfig.json +16 -0
package/babel.config.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
module.exports = {
|
|
9
|
+
env: {
|
|
10
|
+
// USED FOR NODE/RUNTIME
|
|
11
|
+
// maybe we should differenciate both cases because
|
|
12
|
+
// we mostly need to transpile some features so that node does not crash...
|
|
13
|
+
lib: {
|
|
14
|
+
presets: [
|
|
15
|
+
["@babel/preset-typescript", { isTSX: true, allExtensions: true }],
|
|
16
|
+
],
|
|
17
|
+
// Useful to transpile for older node versions
|
|
18
|
+
plugins: [
|
|
19
|
+
"@babel/plugin-transform-modules-commonjs",
|
|
20
|
+
"@babel/plugin-proposal-nullish-coalescing-operator",
|
|
21
|
+
"@babel/plugin-proposal-optional-chaining",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
// USED FOR JS SWIZZLE
|
|
26
|
+
// /lib-next folder is used as source to swizzle JS source code
|
|
27
|
+
// This JS code is created from TS source code
|
|
28
|
+
// This source code should look clean/human readable to be usable
|
|
29
|
+
"lib-next": {
|
|
30
|
+
presets: [
|
|
31
|
+
["@babel/preset-typescript", { isTSX: true, allExtensions: true }],
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
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 = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.default = docusaurusThemeOpenAPI;
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
function docusaurusThemeOpenAPI() {
|
|
15
|
+
return {
|
|
16
|
+
name: "docusaurus-theme-openapi",
|
|
17
|
+
getClientModules() {
|
|
18
|
+
const modules = [
|
|
19
|
+
require.resolve(path_1.default.join(__dirname, "..", "lib", "theme", "styles.scss")),
|
|
20
|
+
];
|
|
21
|
+
return modules;
|
|
22
|
+
},
|
|
23
|
+
getThemePath() {
|
|
24
|
+
return path_1.default.join(__dirname, "..", "lib", "theme");
|
|
25
|
+
},
|
|
26
|
+
getTypeScriptThemePath() {
|
|
27
|
+
return path_1.default.resolve(__dirname, "..", "src", "theme");
|
|
28
|
+
},
|
|
29
|
+
configureWebpack(_, isServer, utils) {
|
|
30
|
+
const rules = _.module?.rules ?? [];
|
|
31
|
+
const sassLoaderRule = rules.filter((r) => {
|
|
32
|
+
return String(r.test) === String(/\.s[ca]ss$/);
|
|
33
|
+
});
|
|
34
|
+
const { getStyleLoaders } = utils;
|
|
35
|
+
// Avoid conflicts with docusaurus-plugin-sass
|
|
36
|
+
if (sassLoaderRule.length === 0) {
|
|
37
|
+
return {
|
|
38
|
+
resolve: {
|
|
39
|
+
fallback: {
|
|
40
|
+
buffer: require.resolve("buffer/"),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
plugins: [
|
|
44
|
+
new utils.currentBundler.instance.ProvidePlugin({
|
|
45
|
+
process: require.resolve("process/browser"),
|
|
46
|
+
Buffer: ["buffer", "Buffer"],
|
|
47
|
+
}),
|
|
48
|
+
],
|
|
49
|
+
module: {
|
|
50
|
+
rules: [
|
|
51
|
+
{
|
|
52
|
+
test: /\.s[ac]ss$/,
|
|
53
|
+
include: path_1.default.resolve(__dirname, "..", "lib", "theme"),
|
|
54
|
+
use: [
|
|
55
|
+
...getStyleLoaders(isServer, {}),
|
|
56
|
+
{
|
|
57
|
+
loader: require.resolve("sass-loader"),
|
|
58
|
+
options: {},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
resolve: {
|
|
68
|
+
fallback: {
|
|
69
|
+
buffer: require.resolve("buffer/"),
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
plugins: [
|
|
73
|
+
new utils.currentBundler.instance.ProvidePlugin({
|
|
74
|
+
process: require.resolve("process/browser"),
|
|
75
|
+
Buffer: ["buffer", "Buffer"],
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createDescription(description: string | undefined): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
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.createDescription = createDescription;
|
|
10
|
+
function createDescription(description) {
|
|
11
|
+
if (!description) {
|
|
12
|
+
return "";
|
|
13
|
+
}
|
|
14
|
+
return `\n\n${description}\n\n`;
|
|
15
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
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.getSchemaName = getSchemaName;
|
|
10
|
+
exports.getQualifierMessage = getQualifierMessage;
|
|
11
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
12
|
+
const translationIds_1 = require("../theme/translationIds");
|
|
13
|
+
function prettyName(schema, circular) {
|
|
14
|
+
if (schema.format) {
|
|
15
|
+
return schema.format;
|
|
16
|
+
}
|
|
17
|
+
if (schema.allOf) {
|
|
18
|
+
if (typeof schema.allOf[0] === "string") {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
if (schema.allOf[0].includes("circular")) {
|
|
21
|
+
return schema.allOf[0];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return "object";
|
|
25
|
+
}
|
|
26
|
+
if (schema.oneOf) {
|
|
27
|
+
return "object";
|
|
28
|
+
}
|
|
29
|
+
if (schema.anyOf) {
|
|
30
|
+
return "object";
|
|
31
|
+
}
|
|
32
|
+
if (schema.type === "object") {
|
|
33
|
+
return schema.xml?.name ?? schema.type;
|
|
34
|
+
// return schema.type;
|
|
35
|
+
}
|
|
36
|
+
if (schema.type === "array") {
|
|
37
|
+
return schema.xml?.name ?? schema.type;
|
|
38
|
+
// return schema.type;
|
|
39
|
+
}
|
|
40
|
+
return schema.title ?? schema.type;
|
|
41
|
+
}
|
|
42
|
+
function getSchemaName(schema, circular) {
|
|
43
|
+
if (schema.items) {
|
|
44
|
+
return prettyName(schema.items, circular) + "[]";
|
|
45
|
+
}
|
|
46
|
+
return prettyName(schema, circular) ?? "";
|
|
47
|
+
}
|
|
48
|
+
function getQualifierMessage(schema) {
|
|
49
|
+
// TODO:
|
|
50
|
+
// - uniqueItems
|
|
51
|
+
// - maxProperties
|
|
52
|
+
// - minProperties
|
|
53
|
+
// - multipleOf
|
|
54
|
+
if (!schema) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
if (schema.items &&
|
|
58
|
+
schema.minItems === undefined &&
|
|
59
|
+
schema.maxItems === undefined) {
|
|
60
|
+
return getQualifierMessage(schema.items);
|
|
61
|
+
}
|
|
62
|
+
let message = `**${(0, Translate_1.translate)({
|
|
63
|
+
id: translationIds_1.OPENAPI_SCHEMA_ITEM.POSSIBLE_VALUES,
|
|
64
|
+
message: "Possible values:",
|
|
65
|
+
})}** `;
|
|
66
|
+
let qualifierGroups = [];
|
|
67
|
+
if (schema.items && schema.items.enum) {
|
|
68
|
+
if (schema.items.enum) {
|
|
69
|
+
qualifierGroups.push(`[${schema.items.enum.map((e) => `\`${e}\``).join(", ")}]`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (schema.minLength || schema.maxLength) {
|
|
73
|
+
let lengthQualifier = "";
|
|
74
|
+
let minLength;
|
|
75
|
+
let maxLength;
|
|
76
|
+
if (schema.minLength && schema.minLength > 1) {
|
|
77
|
+
minLength = `\`>= ${schema.minLength} characters\``;
|
|
78
|
+
}
|
|
79
|
+
if (schema.minLength && schema.minLength === 1) {
|
|
80
|
+
minLength = `\`non-empty\``;
|
|
81
|
+
}
|
|
82
|
+
if (schema.maxLength) {
|
|
83
|
+
maxLength = `\`<= ${schema.maxLength} characters\``;
|
|
84
|
+
}
|
|
85
|
+
if (minLength && !maxLength) {
|
|
86
|
+
lengthQualifier += minLength;
|
|
87
|
+
}
|
|
88
|
+
if (maxLength && !minLength) {
|
|
89
|
+
lengthQualifier += maxLength;
|
|
90
|
+
}
|
|
91
|
+
if (minLength && maxLength) {
|
|
92
|
+
lengthQualifier += `${minLength} and ${maxLength}`;
|
|
93
|
+
}
|
|
94
|
+
qualifierGroups.push(lengthQualifier);
|
|
95
|
+
}
|
|
96
|
+
if (schema.minimum != null ||
|
|
97
|
+
schema.maximum != null ||
|
|
98
|
+
typeof schema.exclusiveMinimum === "number" ||
|
|
99
|
+
typeof schema.exclusiveMaximum === "number") {
|
|
100
|
+
let minmaxQualifier = "";
|
|
101
|
+
let minimum;
|
|
102
|
+
let maximum;
|
|
103
|
+
if (typeof schema.exclusiveMinimum === "number") {
|
|
104
|
+
minimum = `\`> ${schema.exclusiveMinimum}\``;
|
|
105
|
+
}
|
|
106
|
+
else if (schema.minimum != null && !schema.exclusiveMinimum) {
|
|
107
|
+
minimum = `\`>= ${schema.minimum}\``;
|
|
108
|
+
}
|
|
109
|
+
else if (schema.minimum != null && schema.exclusiveMinimum === true) {
|
|
110
|
+
minimum = `\`> ${schema.minimum}\``;
|
|
111
|
+
}
|
|
112
|
+
if (typeof schema.exclusiveMaximum === "number") {
|
|
113
|
+
maximum = `\`< ${schema.exclusiveMaximum}\``;
|
|
114
|
+
}
|
|
115
|
+
else if (schema.maximum != null && !schema.exclusiveMaximum) {
|
|
116
|
+
maximum = `\`<= ${schema.maximum}\``;
|
|
117
|
+
}
|
|
118
|
+
else if (schema.maximum != null && schema.exclusiveMaximum === true) {
|
|
119
|
+
maximum = `\`< ${schema.maximum}\``;
|
|
120
|
+
}
|
|
121
|
+
if (minimum && !maximum) {
|
|
122
|
+
minmaxQualifier += minimum;
|
|
123
|
+
}
|
|
124
|
+
if (maximum && !minimum) {
|
|
125
|
+
minmaxQualifier += maximum;
|
|
126
|
+
}
|
|
127
|
+
if (minimum && maximum) {
|
|
128
|
+
minmaxQualifier += `${minimum} and ${maximum}`;
|
|
129
|
+
}
|
|
130
|
+
qualifierGroups.push(minmaxQualifier);
|
|
131
|
+
}
|
|
132
|
+
if (schema.pattern) {
|
|
133
|
+
qualifierGroups.push(`Value must match regular expression \`${schema.pattern}\``);
|
|
134
|
+
}
|
|
135
|
+
// Check if discriminator mapping
|
|
136
|
+
const discriminator = schema;
|
|
137
|
+
if (discriminator.mapping) {
|
|
138
|
+
const values = Object.keys(discriminator.mapping);
|
|
139
|
+
qualifierGroups.push(`[${values.map((e) => `\`${e}\``).join(", ")}]`);
|
|
140
|
+
}
|
|
141
|
+
if (schema.enum) {
|
|
142
|
+
qualifierGroups.push(`[${schema.enum.map((e) => `\`${e}\``).join(", ")}]`);
|
|
143
|
+
}
|
|
144
|
+
if (schema.minItems) {
|
|
145
|
+
qualifierGroups.push(`\`>= ${schema.minItems}\``);
|
|
146
|
+
}
|
|
147
|
+
if (schema.maxItems) {
|
|
148
|
+
qualifierGroups.push(`\`<= ${schema.maxItems}\``);
|
|
149
|
+
}
|
|
150
|
+
if (qualifierGroups.length === 0) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
return message + qualifierGroups.join(", ");
|
|
154
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/** @deprecated use ReactNode from React instead */
|
|
3
|
+
export type Children = ReactNode;
|
|
4
|
+
export type Props = Record<string, any> & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function create(tag: string, props: Props): string;
|
|
8
|
+
export declare function guard<T>(value: T | undefined | string, cb: (value: T) => ReactNode): string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
|
|
9
|
+
export declare function render(children: ReactNode): string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
|
|
10
|
+
export declare function toString(value: any): string | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
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.create = create;
|
|
10
|
+
exports.guard = guard;
|
|
11
|
+
exports.render = render;
|
|
12
|
+
exports.toString = toString;
|
|
13
|
+
function create(tag, props) {
|
|
14
|
+
const { children, ...rest } = props;
|
|
15
|
+
let propString = "";
|
|
16
|
+
for (const [key, value] of Object.entries(rest)) {
|
|
17
|
+
propString += ` ${key}={${JSON.stringify(value)}}`;
|
|
18
|
+
}
|
|
19
|
+
return `<${tag}${propString}>${render(children)}</${tag}>`;
|
|
20
|
+
}
|
|
21
|
+
function guard(value, cb) {
|
|
22
|
+
if (!!value || value === 0) {
|
|
23
|
+
const children = cb(value);
|
|
24
|
+
return render(children);
|
|
25
|
+
}
|
|
26
|
+
return "";
|
|
27
|
+
}
|
|
28
|
+
function render(children) {
|
|
29
|
+
if (Array.isArray(children)) {
|
|
30
|
+
return children.filter((c) => c !== undefined).join("");
|
|
31
|
+
}
|
|
32
|
+
return children ?? "";
|
|
33
|
+
}
|
|
34
|
+
function toString(value) {
|
|
35
|
+
// Return as-is if already string
|
|
36
|
+
if (typeof value === "string") {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
// Return undefined if null or undefined
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
// Return formatted array if Array
|
|
44
|
+
if (Array.isArray(value)) {
|
|
45
|
+
return `[${value.join(", ")}]`;
|
|
46
|
+
}
|
|
47
|
+
// Coerce to string in all other cases,
|
|
48
|
+
return value + "";
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
const utils_1 = require("./utils");
|
|
10
|
+
describe("guard", () => {
|
|
11
|
+
it("should guard empty strings", () => {
|
|
12
|
+
const actual = (0, utils_1.guard)("", (_) => {
|
|
13
|
+
throw new Error("Should not be called");
|
|
14
|
+
});
|
|
15
|
+
expect(actual).toBe("");
|
|
16
|
+
});
|
|
17
|
+
it("should guard undefined", () => {
|
|
18
|
+
const actual = (0, utils_1.guard)(undefined, (value) => {
|
|
19
|
+
throw new Error("Should not be called");
|
|
20
|
+
});
|
|
21
|
+
expect(actual).toBe("");
|
|
22
|
+
});
|
|
23
|
+
it("should guard false booleans", () => {
|
|
24
|
+
const actual = (0, utils_1.guard)(false, (value) => `${value}`);
|
|
25
|
+
expect(actual).toBe("");
|
|
26
|
+
});
|
|
27
|
+
it("should not guard strings", () => {
|
|
28
|
+
const actual = (0, utils_1.guard)("hello", (value) => value);
|
|
29
|
+
expect(actual).toBe("hello");
|
|
30
|
+
});
|
|
31
|
+
it("should not guard numbers", () => {
|
|
32
|
+
const actual = (0, utils_1.guard)(1, (value) => `${value}`);
|
|
33
|
+
expect(actual).toBe("1");
|
|
34
|
+
});
|
|
35
|
+
it("should not guard numbers equals to 0", () => {
|
|
36
|
+
const actual = (0, utils_1.guard)(0, (value) => `${value}`);
|
|
37
|
+
expect(actual).toBe("0");
|
|
38
|
+
});
|
|
39
|
+
it("should not guard true booleans", () => {
|
|
40
|
+
const actual = (0, utils_1.guard)(true, (value) => `${value}`);
|
|
41
|
+
expect(actual).toBe("true");
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
15
|
+
const FormItem_1 = __importDefault(require("@theme/ApiExplorer/FormItem"));
|
|
16
|
+
const FormSelect_1 = __importDefault(require("@theme/ApiExplorer/FormSelect"));
|
|
17
|
+
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
18
|
+
const slice_1 = require("./slice");
|
|
19
|
+
function Accept() {
|
|
20
|
+
const value = (0, hooks_1.useTypedSelector)((state) => state.accept.value);
|
|
21
|
+
const options = (0, hooks_1.useTypedSelector)(
|
|
22
|
+
(state) => state.accept.options
|
|
23
|
+
);
|
|
24
|
+
const dispatch = (0, hooks_1.useTypedDispatch)();
|
|
25
|
+
if (options.length <= 1) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return react_1.default.createElement(
|
|
29
|
+
FormItem_1.default,
|
|
30
|
+
{ label: "Accept" },
|
|
31
|
+
react_1.default.createElement(FormSelect_1.default, {
|
|
32
|
+
value: value,
|
|
33
|
+
options: options,
|
|
34
|
+
onChange: (e) => dispatch((0, slice_1.setAccept)(e.target.value)),
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
exports.default = Accept;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
export interface State {
|
|
3
|
+
value: string;
|
|
4
|
+
options: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const slice: import("@reduxjs/toolkit").Slice<State, {
|
|
7
|
+
setAccept: (state: import("immer").WritableDraft<State>, action: PayloadAction<string>) => void;
|
|
8
|
+
}, "accept", "accept", import("@reduxjs/toolkit").SliceSelectors<State>>;
|
|
9
|
+
export declare const setAccept: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "accept/setAccept">;
|
|
10
|
+
declare const _default: import("redux").Reducer<State>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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.setAccept = exports.slice = void 0;
|
|
10
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
11
|
+
const initialState = {};
|
|
12
|
+
exports.slice = (0, toolkit_1.createSlice)({
|
|
13
|
+
name: "accept",
|
|
14
|
+
initialState,
|
|
15
|
+
reducers: {
|
|
16
|
+
setAccept: (state, action) => {
|
|
17
|
+
state.value = action.payload;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
exports.setAccept = exports.slice.actions.setAccept;
|
|
22
|
+
exports.default = exports.slice.reducer;
|
|
@@ -0,0 +1,35 @@
|
|
|
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 = CodeBlockContainer;
|
|
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 clsx_1 = __importDefault(require("clsx"));
|
|
19
|
+
function CodeBlockContainer({ as: As, ...props }) {
|
|
20
|
+
const prismTheme = (0, theme_common_1.usePrismTheme)();
|
|
21
|
+
const prismCssVariables = (0, internal_1.getPrismCssVariables)(prismTheme);
|
|
22
|
+
return react_1.default.createElement(
|
|
23
|
+
As,
|
|
24
|
+
// Polymorphic components are hard to type, without `oneOf` generics
|
|
25
|
+
{
|
|
26
|
+
...props,
|
|
27
|
+
style: prismCssVariables,
|
|
28
|
+
className: (0, clsx_1.default)(
|
|
29
|
+
"openapi-explorer__code-block-container",
|
|
30
|
+
props.className,
|
|
31
|
+
theme_common_1.ThemeClassNames.common.codeBlock
|
|
32
|
+
),
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 = CodeBlockJSX;
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const Container_1 = __importDefault(
|
|
17
|
+
require("@theme/ApiExplorer/ApiCodeBlock/Container")
|
|
18
|
+
);
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
// <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
|
|
21
|
+
// the children is not a simple string, we just return a styled block without
|
|
22
|
+
// actually highlighting.
|
|
23
|
+
function CodeBlockJSX({ children, className }) {
|
|
24
|
+
return react_1.default.createElement(
|
|
25
|
+
Container_1.default,
|
|
26
|
+
{
|
|
27
|
+
as: "pre",
|
|
28
|
+
tabIndex: 0,
|
|
29
|
+
className: (0, clsx_1.default)(
|
|
30
|
+
"openapi-explorer__code-block-standalone",
|
|
31
|
+
"thin-scrollbar",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
},
|
|
35
|
+
react_1.default.createElement(
|
|
36
|
+
"code",
|
|
37
|
+
{ className: "openapi-explorer__code-block-lines" },
|
|
38
|
+
children
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Props } from "@theme/CodeBlock/Content/String";
|
|
3
|
+
export default function CodeBlockString({ children, className: blockClassName, metastring, title: titleProp, showLineNumbers: showLineNumbersProp, language: languageProp, }: Props): React.JSX.Element;
|