docusaurus-theme-openapi-docs 0.0.0-618 → 0.0.0-684
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +2 -0
- package/lib/index.js +53 -27
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +8 -11
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +138 -139
- package/lib/markdown/utils.d.ts +8 -0
- package/lib/markdown/utils.js +36 -42
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -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-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Accept/slice.js +7 -5
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -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.js +74 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +4 -10
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +157 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Authorization/slice.js +23 -16
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +363 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/slice.js +21 -12
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +20 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +406 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +174 -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-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ContentType/slice.js +7 -5
- 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 +25 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/{lib-next/theme/ApiDemoPanel/FormFileUpload/styles.module.css → lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +161 -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/{src/theme/ApiDemoPanel/FormSelect/styles.module.css → lib/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- 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 +154 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +83 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -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/{src/theme/ApiDemoPanel/ParamOptions/styles.module.css → lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +210 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/slice.js +7 -5
- package/lib/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +365 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +10 -9
- package/lib/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +190 -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/{src/theme/ApiDemoPanel/Request/styles.module.css → lib/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +187 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/slice.js +10 -5
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/buildPostmanRequest.js +27 -40
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +37 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/persistanceMiddleware.js +11 -14
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +14 -13
- package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
- package/lib/theme/ApiItem/Layout/index.js +78 -56
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +5 -10
- package/lib/theme/ApiItem/index.d.ts +4 -0
- package/lib/theme/ApiItem/index.js +141 -118
- package/lib/theme/ApiItem/store.d.ts +46 -0
- package/lib/theme/ApiItem/store.js +44 -34
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +34 -32
- package/lib/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/lib/theme/ApiTabs/index.js +105 -190
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/lib/theme/DiscriminatorTabs/index.js +102 -189
- package/lib/theme/Markdown/Details/_Details.scss +119 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/lib/theme/MimeTabs/index.js +125 -199
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.js +9 -8
- package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/lib/theme/ResponseSamples/index.js +2 -7
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.js +31 -22
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/lib/theme/SchemaTabs/index.js +97 -185
- package/lib/theme/styles.scss +160 -0
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -1
- package/package.json +17 -23
- package/src/index.ts +33 -3
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +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.js +74 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.ts +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/index.tsx +64 -41
- package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +94 -34
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/src/theme/ApiExplorer/CodeTabs/index.js +174 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -3
- package/src/theme/{ApiDemoPanel/FormFileUpload/styles.module.css → ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +10 -6
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +8 -12
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +6 -3
- package/{lib/theme/ApiDemoPanel/FormSelect/styles.module.css → src/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +5 -3
- 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 +112 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +87 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +156 -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/{lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css → src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +145 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/src/theme/ApiExplorer/Request/index.tsx +286 -0
- package/src/theme/{ApiDemoPanel/Execute → ApiExplorer/Request}/makeRequest.ts +9 -6
- package/src/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/src/theme/ApiExplorer/Response/index.tsx +154 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +22 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
- package/{lib/theme/ApiDemoPanel/Request/styles.module.css → src/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +14 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
- package/src/theme/ApiItem/index.tsx +7 -7
- package/src/theme/ApiItem/store.ts +7 -7
- package/src/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/src/theme/ApiTabs/index.js +105 -190
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/src/theme/DiscriminatorTabs/index.js +102 -189
- package/src/theme/Markdown/Details/_Details.scss +119 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/src/theme/MimeTabs/index.js +125 -199
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.js +9 -8
- package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/src/theme/ResponseSamples/index.js +2 -7
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.js +31 -22
- package/src/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/src/theme/SchemaTabs/index.js +97 -185
- package/src/theme/styles.scss +160 -0
- package/src/theme-openapi.d.ts +90 -47
- package/tsconfig.json +6 -3
- package/lib/postman-code-generators.d.ts +0 -9
- package/lib/react-magic-dropzone.d.ts +0 -9
- package/lib/theme/ApiDemoPanel/Accept/index.js +0 -32
- package/lib/theme/ApiDemoPanel/Accept/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Authorization/index.js +0 -107
- package/lib/theme/ApiDemoPanel/Authorization/slice.js +0 -123
- package/lib/theme/ApiDemoPanel/Body/index.js +0 -256
- package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +0 -161
- package/lib/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib/theme/ApiDemoPanel/ContentType/index.js +0 -32
- package/lib/theme/ApiDemoPanel/ContentType/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Curl/index.js +0 -240
- package/lib/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib/theme/ApiDemoPanel/Execute/index.js +0 -151
- package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
- package/lib/theme/ApiDemoPanel/Export/index.js +0 -47
- package/lib/theme/ApiDemoPanel/FloatingButton/index.js +0 -30
- package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -83
- package/lib/theme/ApiDemoPanel/FormFileUpload/styles.module.css +0 -75
- package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -38
- package/lib/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -34
- package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -28
- package/lib/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -62
- package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -56
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -216
- package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
- package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -176
- package/lib/theme/ApiDemoPanel/Request/index.js +0 -67
- package/lib/theme/ApiDemoPanel/Response/index.js +0 -66
- package/lib/theme/ApiDemoPanel/Response/slice.js +0 -36
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
- package/lib/theme/ApiDemoPanel/Server/index.js +0 -104
- package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
- package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
- package/lib/theme/ApiDemoPanel/index.js +0 -41
- package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +0 -59
- package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/lib/theme/ApiTabs/styles.module.css +0 -120
- package/lib/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib/theme/MimeTabs/styles.module.css +0 -126
- package/lib/theme/ParamsItem/styles.module.css +0 -24
- package/lib/theme/ResponseSamples/styles.module.css +0 -7
- package/lib/theme/SchemaItem/styles.module.css +0 -38
- package/lib/theme/SchemaTabs/styles.module.css +0 -110
- package/lib/theme/styles.css +0 -520
- package/lib/theme-classic.d.ts +0 -13
- package/lib/theme-openapi.d.ts +0 -234
- package/lib/theme-translations.d.ts +0 -9
- package/lib-next/index.js +0 -29
- package/lib-next/markdown/createDescription.js +0 -13
- package/lib-next/markdown/schema.js +0 -153
- package/lib-next/markdown/utils.js +0 -44
- package/lib-next/postman-code-generators.d.ts +0 -9
- package/lib-next/react-magic-dropzone.d.ts +0 -9
- package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
- package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
- package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -324
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -201
- package/lib-next/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -283
- package/lib-next/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -167
- package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -22
- package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -106
- package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -36
- package/lib-next/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -26
- package/lib-next/theme/ApiDemoPanel/FormSelect/styles.module.css +0 -51
- package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -24
- package/lib-next/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -59
- package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -53
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -292
- package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -60
- package/lib-next/theme/ApiDemoPanel/Request/styles.module.css +0 -18
- package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -67
- package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -23
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
- package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -132
- package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib-next/theme/ApiDemoPanel/index.js +0 -28
- package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
- package/lib-next/theme/ApiItem/Layout/index.js +0 -68
- package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
- package/lib-next/theme/ApiItem/hooks.js +0 -10
- package/lib-next/theme/ApiItem/index.js +0 -155
- package/lib-next/theme/ApiItem/store.js +0 -38
- package/lib-next/theme/ApiLogo/index.js +0 -48
- package/lib-next/theme/ApiTabs/index.js +0 -277
- package/lib-next/theme/ApiTabs/styles.module.css +0 -120
- package/lib-next/theme/DiscriminatorTabs/index.js +0 -272
- package/lib-next/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib-next/theme/MimeTabs/index.js +0 -295
- package/lib-next/theme/MimeTabs/styles.module.css +0 -126
- package/lib-next/theme/ParamsItem/index.js +0 -135
- package/lib-next/theme/ParamsItem/styles.module.css +0 -24
- package/lib-next/theme/ResponseSamples/index.js +0 -27
- package/lib-next/theme/ResponseSamples/styles.module.css +0 -7
- package/lib-next/theme/SchemaItem/index.js +0 -114
- package/lib-next/theme/SchemaItem/styles.module.css +0 -38
- package/lib-next/theme/SchemaTabs/index.js +0 -270
- package/lib-next/theme/SchemaTabs/styles.module.css +0 -110
- package/lib-next/theme/styles.css +0 -520
- package/lib-next/theme-classic.d.ts +0 -13
- package/lib-next/theme-openapi.d.ts +0 -234
- package/lib-next/theme-translations.d.ts +0 -9
- package/lib-next/types.js +0 -1
- package/src/theme/ApiDemoPanel/Body/json2xml.js +0 -43
- package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +0 -239
- package/src/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
- package/src/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -189
- package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/src/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/src/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -34
- package/src/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +0 -62
- package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -326
- package/src/theme/ApiDemoPanel/Request/index.tsx +0 -71
- package/src/theme/ApiDemoPanel/Response/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/src/theme/ApiTabs/styles.module.css +0 -120
- package/src/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/src/theme/MimeTabs/styles.module.css +0 -126
- package/src/theme/ParamsItem/styles.module.css +0 -24
- package/src/theme/ResponseSamples/styles.module.css +0 -7
- package/src/theme/SchemaItem/styles.module.css +0 -38
- package/src/theme/SchemaTabs/styles.module.css +0 -110
- package/src/theme/styles.css +0 -520
- /package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/{lib-next/theme/ApiDemoPanel/Curl → lib/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
- /package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
- /package/{lib/theme/ApiDemoPanel/Curl → src/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Export/index.tsx +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/postman-collection.d.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/react-modal.d.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
import React, { useCallback, useState, useRef, useEffect } from "react";
|
|
9
|
+
|
|
10
|
+
import { translate } from "@docusaurus/Translate";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
// @ts-expect-error: TODO, we need to make theme-classic have type: module
|
|
13
|
+
import copy from "copy-text-to-clipboard";
|
|
14
|
+
|
|
15
|
+
export default function CopyButton({ code, className }) {
|
|
16
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
17
|
+
const copyTimeout = useRef(undefined);
|
|
18
|
+
const handleCopyCode = useCallback(() => {
|
|
19
|
+
copy(code);
|
|
20
|
+
setIsCopied(true);
|
|
21
|
+
copyTimeout.current = window.setTimeout(() => {
|
|
22
|
+
setIsCopied(false);
|
|
23
|
+
}, 1000);
|
|
24
|
+
}, [code]);
|
|
25
|
+
useEffect(() => () => window.clearTimeout(copyTimeout.current), []);
|
|
26
|
+
return (
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
aria-label={
|
|
30
|
+
isCopied
|
|
31
|
+
? translate({
|
|
32
|
+
id: "theme.CodeBlock.copied",
|
|
33
|
+
message: "Copied",
|
|
34
|
+
description: "The copied button label on code blocks",
|
|
35
|
+
})
|
|
36
|
+
: translate({
|
|
37
|
+
id: "theme.CodeBlock.copyButtonAriaLabel",
|
|
38
|
+
message: "Copy code to clipboard",
|
|
39
|
+
description: "The ARIA label for copy code blocks button",
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
title={translate({
|
|
43
|
+
id: "theme.CodeBlock.copy",
|
|
44
|
+
message: "Copy",
|
|
45
|
+
description: "The copy button label on code blocks",
|
|
46
|
+
})}
|
|
47
|
+
className={clsx(
|
|
48
|
+
"clean-btn",
|
|
49
|
+
className,
|
|
50
|
+
"openapi-explorer__code-block-copy-btn",
|
|
51
|
+
isCopied && "openapi-explorer__code-block-copy-btn--copied"
|
|
52
|
+
)}
|
|
53
|
+
onClick={handleCopyCode}
|
|
54
|
+
>
|
|
55
|
+
<span
|
|
56
|
+
className="openapi-explorer__code-block-copy-btn-icons"
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
>
|
|
59
|
+
<svg
|
|
60
|
+
className="openapi-explorer__code-block-copy-btn-icon"
|
|
61
|
+
viewBox="0 0 24 24"
|
|
62
|
+
>
|
|
63
|
+
<path 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" />
|
|
64
|
+
</svg>
|
|
65
|
+
<svg
|
|
66
|
+
className="openapi-explorer__code-block-copy-btn-icon--success"
|
|
67
|
+
viewBox="0 0 24 24"
|
|
68
|
+
>
|
|
69
|
+
<path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
|
|
70
|
+
</svg>
|
|
71
|
+
</span>
|
|
72
|
+
</button>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -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,47 @@
|
|
|
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
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import { translate } from "@docusaurus/Translate";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
|
|
13
|
+
export default function ExitButton({ className, handler }) {
|
|
14
|
+
return (
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
aria-label={translate({
|
|
18
|
+
id: "theme.CodeBlock.exitButtonAriaLabel",
|
|
19
|
+
message: "Exit expanded view",
|
|
20
|
+
description: "The ARIA label for exit expanded view button",
|
|
21
|
+
})}
|
|
22
|
+
title={translate({
|
|
23
|
+
id: "theme.CodeBlock.copy",
|
|
24
|
+
message: "Copy",
|
|
25
|
+
description: "The exit button label on code blocks",
|
|
26
|
+
})}
|
|
27
|
+
className={clsx(
|
|
28
|
+
"clean-btn",
|
|
29
|
+
"openapi-explorer__code-block-exit-btn",
|
|
30
|
+
className
|
|
31
|
+
)}
|
|
32
|
+
onClick={handler}
|
|
33
|
+
>
|
|
34
|
+
<span
|
|
35
|
+
className="openapi-explorer__code-block-exit-btn-icons"
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
>
|
|
38
|
+
<svg
|
|
39
|
+
className="openapi-explorer__code-block-exit-btn-icon"
|
|
40
|
+
viewBox="0 0 384 512"
|
|
41
|
+
>
|
|
42
|
+
<path 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" />
|
|
43
|
+
</svg>
|
|
44
|
+
</span>
|
|
45
|
+
</button>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -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,156 @@
|
|
|
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
|
+
import React, { useEffect, useState } from "react";
|
|
9
|
+
|
|
10
|
+
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
|
+
import { translate } from "@docusaurus/Translate";
|
|
12
|
+
import Container from "@theme/ApiExplorer/ApiCodeBlock/Container";
|
|
13
|
+
import CopyButton from "@theme/ApiExplorer/ApiCodeBlock/CopyButton";
|
|
14
|
+
import ExitButton from "@theme/ApiExplorer/ApiCodeBlock/ExitButton";
|
|
15
|
+
import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
|
|
16
|
+
import clsx from "clsx";
|
|
17
|
+
import Highlight, { defaultProps } from "prism-react-renderer";
|
|
18
|
+
import Modal from "react-modal";
|
|
19
|
+
|
|
20
|
+
export default function ExpandButton({
|
|
21
|
+
code,
|
|
22
|
+
className,
|
|
23
|
+
language,
|
|
24
|
+
showLineNumbers,
|
|
25
|
+
blockClassName,
|
|
26
|
+
title,
|
|
27
|
+
lineClassNames,
|
|
28
|
+
}) {
|
|
29
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
30
|
+
const prismTheme = usePrismTheme();
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
Modal.setAppElement("body");
|
|
34
|
+
}, []);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<button
|
|
39
|
+
type="button"
|
|
40
|
+
aria-label={
|
|
41
|
+
isModalOpen
|
|
42
|
+
? translate({
|
|
43
|
+
id: "theme.CodeBlock.expanded",
|
|
44
|
+
message: "Expanded",
|
|
45
|
+
description: "The expanded button label on code blocks",
|
|
46
|
+
})
|
|
47
|
+
: translate({
|
|
48
|
+
id: "theme.CodeBlock.expandButtonAriaLabel",
|
|
49
|
+
message: "Expand code to fullscreen",
|
|
50
|
+
description: "The ARIA label for expand code blocks button",
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
title={translate({
|
|
54
|
+
id: "theme.CodeBlock.expand",
|
|
55
|
+
message: "Expand",
|
|
56
|
+
description: "The expand button label on code blocks",
|
|
57
|
+
})}
|
|
58
|
+
className={clsx(
|
|
59
|
+
"clean-btn",
|
|
60
|
+
className,
|
|
61
|
+
"openapi-explorer__code-block-expand-btn",
|
|
62
|
+
isModalOpen && "openapi-explorer__code-block-expand-btn--copied"
|
|
63
|
+
)}
|
|
64
|
+
onClick={() => setIsModalOpen(true)}
|
|
65
|
+
>
|
|
66
|
+
<span
|
|
67
|
+
className="openapi-explorer__code-block-expand-btn-icons"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
>
|
|
70
|
+
<svg
|
|
71
|
+
className="openapi-explorer__code-block-expand-btn-icon"
|
|
72
|
+
viewBox="0 0 448 512"
|
|
73
|
+
>
|
|
74
|
+
<path d="M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z" />
|
|
75
|
+
</svg>
|
|
76
|
+
<svg
|
|
77
|
+
className="openapi-explorer__code-block-expand-btn-icon--success"
|
|
78
|
+
viewBox="0 0 24 24"
|
|
79
|
+
>
|
|
80
|
+
<path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
|
|
81
|
+
</svg>
|
|
82
|
+
</span>
|
|
83
|
+
</button>
|
|
84
|
+
<Modal
|
|
85
|
+
className="openapi-explorer__expand-modal-content"
|
|
86
|
+
overlayClassName="openapi-explorer__expand-modal-overlay"
|
|
87
|
+
isOpen={isModalOpen}
|
|
88
|
+
onRequestClose={() => setIsModalOpen(false)}
|
|
89
|
+
contentLabel="Code Snippet"
|
|
90
|
+
>
|
|
91
|
+
<Container
|
|
92
|
+
as="div"
|
|
93
|
+
className={clsx(
|
|
94
|
+
"openapi-explorer__code-block-container",
|
|
95
|
+
language &&
|
|
96
|
+
!blockClassName.includes(`language-${language}`) &&
|
|
97
|
+
`language-${language}`
|
|
98
|
+
)}
|
|
99
|
+
>
|
|
100
|
+
{title && (
|
|
101
|
+
<div className="openapi-explorer__code-block-title">{title}</div>
|
|
102
|
+
)}
|
|
103
|
+
<div className="openapi-explorer__code-block-content">
|
|
104
|
+
<Highlight
|
|
105
|
+
{...defaultProps}
|
|
106
|
+
theme={prismTheme}
|
|
107
|
+
code={code}
|
|
108
|
+
language={language ?? "text"}
|
|
109
|
+
>
|
|
110
|
+
{({ className, tokens, getLineProps, getTokenProps }) => (
|
|
111
|
+
<pre
|
|
112
|
+
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
113
|
+
tabIndex={0}
|
|
114
|
+
className={clsx(
|
|
115
|
+
className,
|
|
116
|
+
"openapi-explorer__code-block",
|
|
117
|
+
"thin-scrollbar"
|
|
118
|
+
)}
|
|
119
|
+
>
|
|
120
|
+
<code
|
|
121
|
+
className={clsx(
|
|
122
|
+
"openapi-explorer__code-block-lines",
|
|
123
|
+
showLineNumbers &&
|
|
124
|
+
"openapi-explorer__code-block-lines-numbers"
|
|
125
|
+
)}
|
|
126
|
+
>
|
|
127
|
+
{tokens.map((line, i) => (
|
|
128
|
+
<Line
|
|
129
|
+
key={i}
|
|
130
|
+
line={line}
|
|
131
|
+
getLineProps={getLineProps}
|
|
132
|
+
getTokenProps={getTokenProps}
|
|
133
|
+
classNames={lineClassNames[i]}
|
|
134
|
+
showLineNumbers={showLineNumbers}
|
|
135
|
+
/>
|
|
136
|
+
))}
|
|
137
|
+
</code>
|
|
138
|
+
</pre>
|
|
139
|
+
)}
|
|
140
|
+
</Highlight>
|
|
141
|
+
<div className="openapi-explorer__code-block-btn-group">
|
|
142
|
+
<CopyButton
|
|
143
|
+
className="openapi-explorer__code-block-code-btn"
|
|
144
|
+
code={code}
|
|
145
|
+
/>
|
|
146
|
+
<ExitButton
|
|
147
|
+
className="openapi-explorer__code-block-code-btn"
|
|
148
|
+
handler={() => setIsModalOpen(false)}
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</Container>
|
|
153
|
+
</Modal>
|
|
154
|
+
</>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* Intentionally has zero specificity, so that to be able to override
|
|
2
|
+
the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */
|
|
3
|
+
:where(:root) {
|
|
4
|
+
--docusaurus-highlighted-code-line-bg: rgb(72 77 91);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where([data-theme="dark"]) {
|
|
8
|
+
--docusaurus-highlighted-code-line-bg: rgb(100 100 100);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.theme-code-block-highlighted-line {
|
|
12
|
+
background-color: var(--docusaurus-highlighted-code-line-bg);
|
|
13
|
+
display: block;
|
|
14
|
+
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
15
|
+
padding: 0 var(--ifm-pre-padding);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.openapi-explorer__code-block-code-line {
|
|
19
|
+
display: table-row;
|
|
20
|
+
counter-increment: line-count;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.openapi-explorer__code-block-code-line-number {
|
|
24
|
+
display: table-cell;
|
|
25
|
+
text-align: right;
|
|
26
|
+
width: 1%;
|
|
27
|
+
position: sticky;
|
|
28
|
+
left: 0;
|
|
29
|
+
padding: 0 var(--ifm-pre-padding);
|
|
30
|
+
background: var(--ifm-pre-background);
|
|
31
|
+
overflow-wrap: normal;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.openapi-explorer__code-block-code-line-number::before {
|
|
35
|
+
content: counter(line-count);
|
|
36
|
+
opacity: 0.4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(.theme-code-block-highlighted-line)
|
|
40
|
+
.openapi-explorer__code-block-code-line-number::before {
|
|
41
|
+
opacity: 0.8;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.openapi-explorer__code-block-code-line-number {
|
|
45
|
+
padding-right: var(--ifm-pre-padding);
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import clsx from "clsx";
|
|
11
|
+
|
|
12
|
+
export default function CodeBlockLine({
|
|
13
|
+
line,
|
|
14
|
+
classNames,
|
|
15
|
+
showLineNumbers,
|
|
16
|
+
getLineProps,
|
|
17
|
+
getTokenProps,
|
|
18
|
+
}) {
|
|
19
|
+
if (line.length === 1 && line[0].content === "\n") {
|
|
20
|
+
line[0].content = "";
|
|
21
|
+
}
|
|
22
|
+
const lineProps = getLineProps({
|
|
23
|
+
line,
|
|
24
|
+
className: clsx(
|
|
25
|
+
classNames,
|
|
26
|
+
showLineNumbers && "openapi-explorer__code-block-code-line"
|
|
27
|
+
),
|
|
28
|
+
});
|
|
29
|
+
const lineTokens = line.map((token, key) => (
|
|
30
|
+
<span key={key} {...getTokenProps({ token, key })} />
|
|
31
|
+
));
|
|
32
|
+
return (
|
|
33
|
+
<span {...lineProps}>
|
|
34
|
+
{showLineNumbers ? (
|
|
35
|
+
<>
|
|
36
|
+
<span className="openapi-explorer__code-block-code-line-number" />
|
|
37
|
+
<span className="openapi-explorer__code-block-code-line-content">
|
|
38
|
+
{lineTokens}
|
|
39
|
+
</span>
|
|
40
|
+
</>
|
|
41
|
+
) : (
|
|
42
|
+
lineTokens
|
|
43
|
+
)}
|
|
44
|
+
<br />
|
|
45
|
+
</span>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
import { translate } from "@docusaurus/Translate";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
|
|
13
|
+
export default function WordWrapButton({ className, onClick, isEnabled }) {
|
|
14
|
+
const title = translate({
|
|
15
|
+
id: "theme.CodeBlock.wordWrapToggle",
|
|
16
|
+
message: "Toggle word wrap",
|
|
17
|
+
description:
|
|
18
|
+
"The title attribute for toggle word wrapping button of code block lines",
|
|
19
|
+
});
|
|
20
|
+
return (
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
onClick={onClick}
|
|
24
|
+
className={clsx(
|
|
25
|
+
"clean-btn",
|
|
26
|
+
className,
|
|
27
|
+
isEnabled && "openapi-explorer__code-block-word-wrap-btn--enabled"
|
|
28
|
+
)}
|
|
29
|
+
aria-label={title}
|
|
30
|
+
title={title}
|
|
31
|
+
>
|
|
32
|
+
<svg
|
|
33
|
+
className="openapi-explorer__code-block-word-wrap-btn-icon"
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
aria-hidden="true"
|
|
36
|
+
>
|
|
37
|
+
<path
|
|
38
|
+
fill="currentColor"
|
|
39
|
+
d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
</button>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import React, { isValidElement } from "react";
|
|
9
|
+
|
|
10
|
+
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
11
|
+
import ElementContent from "@theme/ApiExplorer/ApiCodeBlock/Content/Element";
|
|
12
|
+
import StringContent from "@theme/ApiExplorer/ApiCodeBlock/Content/String";
|
|
13
|
+
/**
|
|
14
|
+
* Best attempt to make the children a plain string so it is copyable. If there
|
|
15
|
+
* are react elements, we will not be able to copy the content, and it will
|
|
16
|
+
* return `children` as-is; otherwise, it concatenates the string children
|
|
17
|
+
* together.
|
|
18
|
+
*/
|
|
19
|
+
function maybeStringifyChildren(children) {
|
|
20
|
+
if (React.Children.toArray(children).some((el) => isValidElement(el))) {
|
|
21
|
+
return children;
|
|
22
|
+
}
|
|
23
|
+
// The children is now guaranteed to be one/more plain strings
|
|
24
|
+
return Array.isArray(children) ? children.join("") : children;
|
|
25
|
+
}
|
|
26
|
+
export default function ApiCodeBlock({ children: rawChildren, ...props }) {
|
|
27
|
+
// The Prism theme on SSR is always the default theme but the site theme can
|
|
28
|
+
// be in a different mode. React hydration doesn't update DOM styles that come
|
|
29
|
+
// from SSR. Hence force a re-render after mounting to apply the current
|
|
30
|
+
// relevant styles.
|
|
31
|
+
const isBrowser = useIsBrowser();
|
|
32
|
+
const children = maybeStringifyChildren(rawChildren);
|
|
33
|
+
const CodeBlockComp =
|
|
34
|
+
typeof children === "string" ? StringContent : ElementContent;
|
|
35
|
+
return (
|
|
36
|
+
<CodeBlockComp key={String(isBrowser)} {...props}>
|
|
37
|
+
{children}
|
|
38
|
+
</CodeBlockComp>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getAuthDataKeys = getAuthDataKeys;
|
|
7
2
|
/* ============================================================================
|
|
8
3
|
* Copyright (c) Palo Alto Networks
|
|
9
4
|
*
|
|
10
5
|
* This source code is licensed under the MIT license found in the
|
|
11
6
|
* LICENSE file in the root directory of this source tree.
|
|
12
7
|
* ========================================================================== */
|
|
13
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getAuthDataKeys = void 0;
|
|
14
10
|
function getAuthDataKeys(security) {
|
|
15
11
|
// Bearer Auth
|
|
16
12
|
if (security.type === "http" && security.scheme === "bearer") {
|
|
@@ -19,17 +15,15 @@ function getAuthDataKeys(security) {
|
|
|
19
15
|
if (security.type === "oauth2") {
|
|
20
16
|
return ["token"];
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
// Basic Auth
|
|
24
19
|
if (security.type === "http" && security.scheme === "basic") {
|
|
25
20
|
return ["username", "password"];
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
// API Auth
|
|
29
23
|
if (security.type === "apiKey") {
|
|
30
24
|
return ["apiKey"];
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
// none
|
|
34
27
|
return [];
|
|
35
|
-
}
|
|
28
|
+
}
|
|
29
|
+
exports.getAuthDataKeys = getAuthDataKeys;
|