docusaurus-theme-openapi-docs 0.0.0-619 → 0.0.0-685
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
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { FrontMatterTag } from "@docusaurus/utils";
|
|
2
|
+
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
3
|
+
export interface ThemeConfig {
|
|
4
|
+
api?: {
|
|
5
|
+
proxy?: string;
|
|
6
|
+
authPersistance?: false | "localStorage" | "sessionStorage";
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface Map<T> {
|
|
10
|
+
[key: string]: T;
|
|
11
|
+
}
|
|
12
|
+
export declare type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
13
|
+
export declare type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf" | "not" | "items" | "properties" | "additionalProperties"> & {
|
|
14
|
+
type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
|
|
15
|
+
allOf?: SchemaObject[];
|
|
16
|
+
oneOf?: SchemaObject[];
|
|
17
|
+
anyOf?: SchemaObject[];
|
|
18
|
+
not?: SchemaObject;
|
|
19
|
+
items?: SchemaObject;
|
|
20
|
+
properties?: Map<SchemaObject>;
|
|
21
|
+
additionalProperties?: boolean | SchemaObject;
|
|
22
|
+
nullable?: boolean;
|
|
23
|
+
discriminator?: DiscriminatorObject;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
writeOnly?: boolean;
|
|
26
|
+
xml?: XMLObject;
|
|
27
|
+
externalDocs?: ExternalDocumentationObject;
|
|
28
|
+
example?: any;
|
|
29
|
+
deprecated?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export interface DiscriminatorObject {
|
|
32
|
+
propertyName: string;
|
|
33
|
+
mapping?: Map<string>;
|
|
34
|
+
}
|
|
35
|
+
export interface XMLObject {
|
|
36
|
+
name?: string;
|
|
37
|
+
namespace?: string;
|
|
38
|
+
prefix?: string;
|
|
39
|
+
attribute?: boolean;
|
|
40
|
+
wrapped?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface ExternalDocumentationObject {
|
|
43
|
+
description?: string;
|
|
44
|
+
url: string;
|
|
45
|
+
}
|
|
46
|
+
export declare type FileChange = {
|
|
47
|
+
author?: string;
|
|
48
|
+
/** Date can be any
|
|
49
|
+
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
|
|
50
|
+
*/
|
|
51
|
+
date?: Date | string;
|
|
52
|
+
};
|
|
53
|
+
export declare type DocFrontMatter = {
|
|
54
|
+
/**
|
|
55
|
+
* The last part of the doc ID (will be refactored in the future to be the
|
|
56
|
+
* full ID instead)
|
|
57
|
+
* @see {@link DocMetadata.id}
|
|
58
|
+
*/
|
|
59
|
+
id?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Will override the default title collected from h1 heading.
|
|
62
|
+
* @see {@link DocMetadata.title}
|
|
63
|
+
*/
|
|
64
|
+
title?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Front matter tags, unnormalized.
|
|
67
|
+
* @see {@link DocMetadata.tags}
|
|
68
|
+
*/
|
|
69
|
+
tags?: FrontMatterTag[];
|
|
70
|
+
/**
|
|
71
|
+
* If there isn't a Markdown h1 heading (which, if there is, we don't
|
|
72
|
+
* remove), this front matter will cause the front matter title to not be
|
|
73
|
+
* displayed in the doc page.
|
|
74
|
+
*/
|
|
75
|
+
hide_title?: boolean;
|
|
76
|
+
/** Hide the TOC on the right. */
|
|
77
|
+
hide_table_of_contents?: boolean;
|
|
78
|
+
/** Used in the head meta. */
|
|
79
|
+
keywords?: string[];
|
|
80
|
+
/** Used in the head meta. Should use `assets.image` in priority. */
|
|
81
|
+
image?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Will override the default excerpt.
|
|
84
|
+
* @see {@link DocMetadata.description}
|
|
85
|
+
*/
|
|
86
|
+
description?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Custom slug appended after /<baseUrl>/<routeBasePath>/<versionPath>
|
|
89
|
+
* @see {@link DocMetadata.slug}
|
|
90
|
+
*/
|
|
91
|
+
slug?: string;
|
|
92
|
+
/** Customizes the sidebar label for this doc. Will default to its title. */
|
|
93
|
+
sidebar_label?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Controls the position of a doc inside the generated sidebar slice when
|
|
96
|
+
* using autogenerated sidebar items.
|
|
97
|
+
*
|
|
98
|
+
* @see https://docusaurus.io/docs/sidebar#autogenerated-sidebar-metadata
|
|
99
|
+
*/
|
|
100
|
+
sidebar_position?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Gives the corresponding sidebar label a special class name when using
|
|
103
|
+
* autogenerated sidebars.
|
|
104
|
+
*/
|
|
105
|
+
sidebar_class_name?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Will be propagated to the final sidebars data structure. Useful if you
|
|
108
|
+
* have swizzled sidebar-related code or simply querying doc data through
|
|
109
|
+
* sidebars.
|
|
110
|
+
*/
|
|
111
|
+
sidebar_custom_props?: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Changes the sidebar association of the current doc. Use `null` to make
|
|
116
|
+
* the current doc not associated to any sidebar.
|
|
117
|
+
*/
|
|
118
|
+
displayed_sidebar?: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Customizes the pagination label for this doc. Will default to the sidebar
|
|
121
|
+
* label.
|
|
122
|
+
*/
|
|
123
|
+
pagination_label?: string;
|
|
124
|
+
/** Overrides the default URL computed for this doc. */
|
|
125
|
+
custom_edit_url?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Whether number prefix parsing is disabled on this doc.
|
|
128
|
+
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
|
|
129
|
+
*/
|
|
130
|
+
parse_number_prefixes?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Minimum TOC heading level. Must be between 2 and 6 and lower or equal to
|
|
133
|
+
* the max value.
|
|
134
|
+
*/
|
|
135
|
+
toc_min_heading_level?: number;
|
|
136
|
+
/** Maximum TOC heading level. Must be between 2 and 6. */
|
|
137
|
+
toc_max_heading_level?: number;
|
|
138
|
+
/**
|
|
139
|
+
* The ID of the documentation you want the "Next" pagination to link to.
|
|
140
|
+
* Use `null` to disable showing "Next" for this page.
|
|
141
|
+
* @see {@link DocMetadata.next}
|
|
142
|
+
*/
|
|
143
|
+
pagination_next?: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the documentation you want the "Previous" pagination to link
|
|
146
|
+
* to. Use `null` to disable showing "Previous" for this page.
|
|
147
|
+
* @see {@link DocMetadata.prev}
|
|
148
|
+
*/
|
|
149
|
+
pagination_prev?: string | null;
|
|
150
|
+
/** Should this doc be excluded from production builds? */
|
|
151
|
+
draft?: boolean;
|
|
152
|
+
/** Allows overriding the last updated author and/or date. */
|
|
153
|
+
last_update?: FileChange;
|
|
154
|
+
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
155
|
+
info_path?: string;
|
|
156
|
+
};
|
|
157
|
+
export {};
|
package/lib/types.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
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 });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-685",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -24,55 +24,49 @@
|
|
|
24
24
|
"types": "src/theme-openapi.d.ts",
|
|
25
25
|
"main": "lib/index.js",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "tsc --
|
|
28
|
-
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\""
|
|
29
|
-
"babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
|
|
30
|
-
"babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
|
|
31
|
-
"format:lib-next": "prettier --config ../../.prettierrc.json --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
27
|
+
"build": "tsc --build && node ../../scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc.json --write \"lib/theme/**/*.js\"",
|
|
28
|
+
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\""
|
|
32
29
|
},
|
|
33
30
|
"devDependencies": {
|
|
34
|
-
"@docusaurus/
|
|
35
|
-
"@docusaurus/types": ">=2.0.1 <2.3.0",
|
|
36
|
-
"@types/concurrently": "^6.3.0",
|
|
31
|
+
"@docusaurus/types": ">=2.4.1 <=2.4.3",
|
|
37
32
|
"@types/crypto-js": "^4.1.0",
|
|
38
33
|
"@types/file-saver": "^2.0.5",
|
|
39
|
-
"@types/fs-extra": "^9.0.13",
|
|
40
34
|
"@types/lodash": "^4.14.176",
|
|
41
|
-
"@types/mdx-js__react": "^1.5.4",
|
|
42
|
-
"@types/rtlcss": "^3.1.1",
|
|
43
35
|
"concurrently": "^5.2.0"
|
|
44
36
|
},
|
|
45
37
|
"dependencies": {
|
|
46
|
-
"@docusaurus/theme-common": ">=2.
|
|
47
|
-
"@
|
|
38
|
+
"@docusaurus/theme-common": ">=2.4.1 <=2.4.3",
|
|
39
|
+
"@hookform/error-message": "^2.0.1",
|
|
48
40
|
"@paloaltonetworks/postman-code-generators": "1.1.15-patch.2",
|
|
49
41
|
"@paloaltonetworks/postman-collection": "^4.1.0",
|
|
50
42
|
"@reduxjs/toolkit": "^1.7.1",
|
|
51
|
-
"buffer": "^6.0.3",
|
|
52
43
|
"clsx": "^1.1.1",
|
|
44
|
+
"copy-text-to-clipboard": "^3.1.0",
|
|
53
45
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
46
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-685",
|
|
47
|
+
"docusaurus-plugin-sass": "^0.2.3",
|
|
55
48
|
"file-saver": "^2.0.5",
|
|
56
|
-
"immer": "^9.0.7",
|
|
57
49
|
"lodash": "^4.17.20",
|
|
58
50
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
59
|
-
"
|
|
60
|
-
"react-
|
|
51
|
+
"prism-react-renderer": "^1.3.5",
|
|
52
|
+
"react-hook-form": "^7.43.8",
|
|
53
|
+
"react-live": "^4.0.0",
|
|
61
54
|
"react-magic-dropzone": "^1.0.1",
|
|
62
55
|
"react-markdown": "^8.0.1",
|
|
63
56
|
"react-modal": "^3.15.1",
|
|
64
57
|
"react-redux": "^7.2.0",
|
|
65
|
-
"redux-devtools-extension": "^2.13.8",
|
|
66
58
|
"rehype-raw": "^6.1.1",
|
|
59
|
+
"sass": "^1.58.1",
|
|
60
|
+
"sass-loader": "^13.3.2",
|
|
67
61
|
"webpack": "^5.61.0",
|
|
68
62
|
"xml-formatter": "^2.6.1"
|
|
69
63
|
},
|
|
70
64
|
"peerDependencies": {
|
|
71
|
-
"react": "^16.8.4 || ^17.0.0",
|
|
72
|
-
"react-dom": "^16.8.4 || ^17.0.0"
|
|
65
|
+
"react": "^16.8.4 || ^17.0.0 || ^18.0.0",
|
|
66
|
+
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0"
|
|
73
67
|
},
|
|
74
68
|
"engines": {
|
|
75
69
|
"node": ">=14"
|
|
76
70
|
},
|
|
77
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "be2a2cae3e2ce07d438c2159207caf2f87f2ba3c"
|
|
78
72
|
}
|
package/src/index.ts
CHANGED
|
@@ -16,19 +16,49 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
|
|
|
16
16
|
name: "docusaurus-theme-openapi",
|
|
17
17
|
|
|
18
18
|
getClientModules() {
|
|
19
|
-
const modules = [
|
|
19
|
+
const modules = [
|
|
20
|
+
require.resolve(
|
|
21
|
+
path.join(__dirname, "..", "lib", "theme", "styles.scss")
|
|
22
|
+
),
|
|
23
|
+
];
|
|
20
24
|
return modules;
|
|
21
25
|
},
|
|
22
26
|
|
|
23
27
|
getThemePath() {
|
|
24
|
-
return path.join(__dirname, "..", "lib
|
|
28
|
+
return path.join(__dirname, "..", "lib", "theme");
|
|
25
29
|
},
|
|
26
30
|
|
|
27
31
|
getTypeScriptThemePath() {
|
|
28
32
|
return path.resolve(__dirname, "..", "src", "theme");
|
|
29
33
|
},
|
|
30
34
|
|
|
31
|
-
configureWebpack() {
|
|
35
|
+
configureWebpack(_, isServer, utils) {
|
|
36
|
+
const rules: any = _.module?.rules ?? [];
|
|
37
|
+
const sassLoaderRule = rules.filter((r: any) => {
|
|
38
|
+
return String(r.test) === String(/\.s[ca]ss$/);
|
|
39
|
+
});
|
|
40
|
+
const { getStyleLoaders } = utils;
|
|
41
|
+
// Avoid conflicts with docusaurus-plugin-sass
|
|
42
|
+
if (sassLoaderRule.length === 0) {
|
|
43
|
+
return {
|
|
44
|
+
plugins: [new NodePolyfillPlugin()],
|
|
45
|
+
module: {
|
|
46
|
+
rules: [
|
|
47
|
+
{
|
|
48
|
+
test: /\.s[ac]ss$/,
|
|
49
|
+
include: path.resolve(__dirname, "..", "lib", "theme"),
|
|
50
|
+
use: [
|
|
51
|
+
...getStyleLoaders(isServer, {}),
|
|
52
|
+
{
|
|
53
|
+
loader: require.resolve("sass-loader"),
|
|
54
|
+
options: {},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
32
62
|
return {
|
|
33
63
|
plugins: [new NodePolyfillPlugin()],
|
|
34
64
|
};
|
|
@@ -0,0 +1,165 @@
|
|
|
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 } from "react";
|
|
9
|
+
|
|
10
|
+
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
|
+
import { translate } from "@docusaurus/Translate";
|
|
12
|
+
import Container from "@theme/ApiDemoPanel/ApiCodeBlock/Container";
|
|
13
|
+
import CopyButton from "@theme/ApiDemoPanel/ApiCodeBlock/CopyButton";
|
|
14
|
+
import ExitButton from "@theme/ApiDemoPanel/ApiCodeBlock/ExitButton";
|
|
15
|
+
import Line from "@theme/ApiDemoPanel/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 prismTheme = usePrismTheme();
|
|
30
|
+
|
|
31
|
+
function openModal() {
|
|
32
|
+
setIsOpen(true);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function closeModal() {
|
|
36
|
+
setIsOpen(false);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const [modalIsOpen, setIsOpen] = React.useState(false);
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
Modal.setAppElement("body");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<button
|
|
48
|
+
type="button"
|
|
49
|
+
aria-label={
|
|
50
|
+
modalIsOpen
|
|
51
|
+
? translate({
|
|
52
|
+
id: "theme.CodeBlock.expanded",
|
|
53
|
+
message: "Expanded",
|
|
54
|
+
description: "The expanded button label on code blocks",
|
|
55
|
+
})
|
|
56
|
+
: translate({
|
|
57
|
+
id: "theme.CodeBlock.expandButtonAriaLabel",
|
|
58
|
+
message: "Expand code to fullscreen",
|
|
59
|
+
description: "The ARIA label for expand code blocks button",
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
title={translate({
|
|
63
|
+
id: "theme.CodeBlock.expand",
|
|
64
|
+
message: "Expand",
|
|
65
|
+
description: "The expand button label on code blocks",
|
|
66
|
+
})}
|
|
67
|
+
className={clsx(
|
|
68
|
+
"clean-btn",
|
|
69
|
+
className,
|
|
70
|
+
"openapi-explorer__code-block-expand-btn",
|
|
71
|
+
modalIsOpen && "openapi-explorer__code-block-expand-btn--copied"
|
|
72
|
+
)}
|
|
73
|
+
onClick={openModal}
|
|
74
|
+
>
|
|
75
|
+
<span
|
|
76
|
+
className="openapi-explorer__code-block-expand-btn-icons"
|
|
77
|
+
aria-hidden="true"
|
|
78
|
+
>
|
|
79
|
+
<svg
|
|
80
|
+
className="openapi-explorer__code-block-expand-btn-icon"
|
|
81
|
+
viewBox="0 0 448 512"
|
|
82
|
+
>
|
|
83
|
+
<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" />
|
|
84
|
+
</svg>
|
|
85
|
+
<svg
|
|
86
|
+
className="openapi-explorer__code-block-expand-btn-icon--success"
|
|
87
|
+
viewBox="0 0 24 24"
|
|
88
|
+
>
|
|
89
|
+
<path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
|
|
90
|
+
</svg>
|
|
91
|
+
</span>
|
|
92
|
+
</button>
|
|
93
|
+
<Modal
|
|
94
|
+
className="openapi-explorer__expand-modal-content"
|
|
95
|
+
overlayClassName="openapi-explorer__expand-modal-overlay"
|
|
96
|
+
isOpen={modalIsOpen}
|
|
97
|
+
onRequestClose={closeModal}
|
|
98
|
+
contentLabel="Code Snippet"
|
|
99
|
+
>
|
|
100
|
+
<Container
|
|
101
|
+
as="div"
|
|
102
|
+
className={clsx(
|
|
103
|
+
"openapi-explorer__code-block-container",
|
|
104
|
+
language &&
|
|
105
|
+
!blockClassName.includes(`language-${language}`) &&
|
|
106
|
+
`language-${language}`
|
|
107
|
+
)}
|
|
108
|
+
>
|
|
109
|
+
{title && (
|
|
110
|
+
<div className="openapi-explorer__code-block-title">{title}</div>
|
|
111
|
+
)}
|
|
112
|
+
<div className="openapi-explorer__code-block-content">
|
|
113
|
+
<Highlight
|
|
114
|
+
{...defaultProps}
|
|
115
|
+
theme={prismTheme}
|
|
116
|
+
code={code}
|
|
117
|
+
language={language ?? "text"}
|
|
118
|
+
>
|
|
119
|
+
{({ className, tokens, getLineProps, getTokenProps }) => (
|
|
120
|
+
<pre
|
|
121
|
+
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
122
|
+
tabIndex={0}
|
|
123
|
+
className={clsx(
|
|
124
|
+
className,
|
|
125
|
+
"openapi-explorer__code-block",
|
|
126
|
+
"thin-scrollbar"
|
|
127
|
+
)}
|
|
128
|
+
>
|
|
129
|
+
<code
|
|
130
|
+
className={clsx(
|
|
131
|
+
"openapi-explorer__code-block-lines",
|
|
132
|
+
showLineNumbers &&
|
|
133
|
+
"openapi-explorer__code-block-lines-numbers"
|
|
134
|
+
)}
|
|
135
|
+
>
|
|
136
|
+
{tokens.map((line, i) => (
|
|
137
|
+
<Line
|
|
138
|
+
key={i}
|
|
139
|
+
line={line}
|
|
140
|
+
getLineProps={getLineProps}
|
|
141
|
+
getTokenProps={getTokenProps}
|
|
142
|
+
classNames={lineClassNames[i]}
|
|
143
|
+
showLineNumbers={showLineNumbers}
|
|
144
|
+
/>
|
|
145
|
+
))}
|
|
146
|
+
</code>
|
|
147
|
+
</pre>
|
|
148
|
+
)}
|
|
149
|
+
</Highlight>
|
|
150
|
+
<div className="openapi-explorer__code-block-btn-group">
|
|
151
|
+
<CopyButton
|
|
152
|
+
className="openapi-explorer__code-block-code-btn"
|
|
153
|
+
code={code}
|
|
154
|
+
/>
|
|
155
|
+
<ExitButton
|
|
156
|
+
className="openapi-dmeo__code-block-code-btn"
|
|
157
|
+
handler={closeModal}
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</Container>
|
|
162
|
+
</Modal>
|
|
163
|
+
</>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import FormItem from "@theme/
|
|
11
|
-
import FormSelect from "@theme/
|
|
10
|
+
import FormItem from "@theme/ApiExplorer/FormItem";
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
12
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
13
13
|
|
|
14
14
|
import { setAccept } from "./slice";
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { ThemeClassNames, usePrismTheme } from "@docusaurus/theme-common";
|
|
11
|
+
import { getPrismCssVariables } from "@docusaurus/theme-common/internal";
|
|
12
|
+
import clsx from "clsx";
|
|
13
|
+
|
|
14
|
+
export default function CodeBlockContainer({ as: As, ...props }) {
|
|
15
|
+
const prismTheme = usePrismTheme();
|
|
16
|
+
const prismCssVariables = getPrismCssVariables(prismTheme);
|
|
17
|
+
return (
|
|
18
|
+
<As
|
|
19
|
+
// Polymorphic components are hard to type, without `oneOf` generics
|
|
20
|
+
{...props}
|
|
21
|
+
style={prismCssVariables}
|
|
22
|
+
className={clsx(
|
|
23
|
+
"openapi-explorer__code-block-container",
|
|
24
|
+
props.className,
|
|
25
|
+
ThemeClassNames.common.codeBlock
|
|
26
|
+
)}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 Container from "@theme/ApiExplorer/ApiCodeBlock/Container";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
|
|
13
|
+
// <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
|
|
14
|
+
// the children is not a simple string, we just return a styled block without
|
|
15
|
+
// actually highlighting.
|
|
16
|
+
export default function CodeBlockJSX({ children, className }) {
|
|
17
|
+
return (
|
|
18
|
+
<Container
|
|
19
|
+
as="pre"
|
|
20
|
+
tabIndex={0}
|
|
21
|
+
className={clsx(
|
|
22
|
+
"openapi-explorer__code-block-standalone",
|
|
23
|
+
"thin-scrollbar",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
>
|
|
27
|
+
<code className="openapi-explorer__code-block-lines">{children}</code>
|
|
28
|
+
</Container>
|
|
29
|
+
);
|
|
30
|
+
}
|