docusaurus-theme-openapi-docs 0.0.0-619 → 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,291 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bash-background-color: transparent;
|
|
3
|
+
--bash-border-radius: none;
|
|
4
|
+
--code-tab-logo-width: 24px;
|
|
5
|
+
--code-tab-logo-height: 24px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-theme="dark"] {
|
|
9
|
+
--bash-background-color: lightgrey;
|
|
10
|
+
--bash-border-radius: 20px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.openapi-tabs__code-container {
|
|
14
|
+
margin-bottom: 1rem;
|
|
15
|
+
|
|
16
|
+
&:not(.openapi-tabs__code-container-inner) {
|
|
17
|
+
padding: 1rem;
|
|
18
|
+
background-color: var(--ifm-pre-background);
|
|
19
|
+
border-radius: var(--ifm-global-radius);
|
|
20
|
+
border: 1px solid var(--openapi-explorer-border-color);
|
|
21
|
+
box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
|
|
22
|
+
0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
|
|
23
|
+
transition: 300ms;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
box-shadow: 0 0 0 2px rgba(38, 53, 61, 0.15),
|
|
27
|
+
0 2px 3px hsla(222, 8%, 43%, 0.15),
|
|
28
|
+
0 16px 16px -10px hsla(222, 8%, 43%, 0.2);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.openapi-tabs__code-item {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column-reverse;
|
|
35
|
+
flex: 0 0 80px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: 0.5rem 0 !important;
|
|
38
|
+
margin-top: 0 !important;
|
|
39
|
+
margin-right: 0.5rem;
|
|
40
|
+
border: 1px solid transparent;
|
|
41
|
+
transition: 300ms;
|
|
42
|
+
|
|
43
|
+
&:not(.active):hover {
|
|
44
|
+
border: 1px solid var(--openapi-code-tab-border-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
background-color: transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
span {
|
|
52
|
+
padding-top: 0.5rem;
|
|
53
|
+
color: var(--ifm-font-color-secondary);
|
|
54
|
+
font-size: 10px;
|
|
55
|
+
text-transform: uppercase;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.openapi-tabs__code-list-container {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: flex-start;
|
|
63
|
+
padding: 0.25rem;
|
|
64
|
+
padding-bottom: 0.6rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.openapi-tabs__code-content {
|
|
68
|
+
margin-top: unset !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.openapi-explorer__code-block code {
|
|
72
|
+
max-height: 200px;
|
|
73
|
+
font-size: var(--openapi-explorer-font-size-code);
|
|
74
|
+
padding-top: var(--ifm-pre-padding);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
body[class="ReactModal__Body--open"] {
|
|
78
|
+
.openapi-explorer__code-block code {
|
|
79
|
+
max-height: 600px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.openapi-tabs__code-item--variant {
|
|
84
|
+
color: var(--ifm-color-secondary);
|
|
85
|
+
|
|
86
|
+
&.active {
|
|
87
|
+
border-color: var(--ifm-toc-border-color);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.openapi-tabs__code-item--variant > span {
|
|
92
|
+
padding-top: unset !important;
|
|
93
|
+
padding-left: 0.5rem !important;
|
|
94
|
+
padding-right: 0.5rem !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.openapi-tabs__code-item--python {
|
|
98
|
+
color: var(--ifm-color-success);
|
|
99
|
+
|
|
100
|
+
&::after {
|
|
101
|
+
content: "";
|
|
102
|
+
width: var(--code-tab-logo-width);
|
|
103
|
+
height: var(--code-tab-logo-height);
|
|
104
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg")
|
|
105
|
+
no-repeat;
|
|
106
|
+
margin-block: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.active {
|
|
110
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-python);
|
|
111
|
+
border-color: var(--openapi-code-tab-border-color-python);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.openapi-tabs__code-item--go {
|
|
116
|
+
color: var(--ifm-color-info);
|
|
117
|
+
|
|
118
|
+
&::after {
|
|
119
|
+
content: "";
|
|
120
|
+
width: var(--code-tab-logo-width);
|
|
121
|
+
height: var(--code-tab-logo-height);
|
|
122
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/go/go-original-wordmark.svg")
|
|
123
|
+
no-repeat;
|
|
124
|
+
margin-block: auto;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.active {
|
|
128
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-go);
|
|
129
|
+
border-color: var(--openapi-code-tab-border-color-go);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.openapi-tabs__code-item--javascript {
|
|
134
|
+
color: var(--ifm-color-warning);
|
|
135
|
+
|
|
136
|
+
&::after {
|
|
137
|
+
content: "";
|
|
138
|
+
width: var(--code-tab-logo-width);
|
|
139
|
+
height: var(--code-tab-logo-height);
|
|
140
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg")
|
|
141
|
+
no-repeat;
|
|
142
|
+
margin-block: auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.active {
|
|
146
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-js);
|
|
147
|
+
border-color: var(--openapi-code-tab-border-color-js);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.openapi-tabs__code-item--bash {
|
|
152
|
+
color: var(--ifm-color-danger);
|
|
153
|
+
|
|
154
|
+
&::after {
|
|
155
|
+
content: "";
|
|
156
|
+
width: var(--code-tab-logo-width);
|
|
157
|
+
height: var(--code-tab-logo-height);
|
|
158
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/bash/bash-plain.svg")
|
|
159
|
+
no-repeat;
|
|
160
|
+
margin-block: auto;
|
|
161
|
+
background-color: var(--bash-background-color);
|
|
162
|
+
border-radius: var(--bash-border-radius);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.active {
|
|
166
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-bash);
|
|
167
|
+
border-color: var(--ifm-color-danger);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.openapi-tabs__code-item--ruby {
|
|
172
|
+
color: var(--ifm-color-danger);
|
|
173
|
+
|
|
174
|
+
&::after {
|
|
175
|
+
content: "";
|
|
176
|
+
width: var(--code-tab-logo-width);
|
|
177
|
+
height: var(--code-tab-logo-height);
|
|
178
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/ruby/ruby-plain.svg")
|
|
179
|
+
no-repeat;
|
|
180
|
+
margin-block: auto;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.active {
|
|
184
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-ruby);
|
|
185
|
+
border-color: var(--openapi-code-tab-border-color-ruby);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.openapi-tabs__code-item--csharp {
|
|
190
|
+
color: var(--ifm-color-gray-500);
|
|
191
|
+
|
|
192
|
+
&::after {
|
|
193
|
+
content: "";
|
|
194
|
+
width: var(--code-tab-logo-width);
|
|
195
|
+
height: var(--code-tab-logo-height);
|
|
196
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/csharp/csharp-original.svg")
|
|
197
|
+
no-repeat;
|
|
198
|
+
margin-block: auto;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&.active {
|
|
202
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-csharp);
|
|
203
|
+
border-color: var(--openapi-code-tab-border-color-csharp);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.openapi-tabs__code-item--nodejs {
|
|
208
|
+
color: var(--ifm-color-success);
|
|
209
|
+
|
|
210
|
+
&::after {
|
|
211
|
+
content: "";
|
|
212
|
+
width: var(--code-tab-logo-width);
|
|
213
|
+
height: var(--code-tab-logo-height);
|
|
214
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-original.svg")
|
|
215
|
+
no-repeat;
|
|
216
|
+
margin-block: auto;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&.active {
|
|
220
|
+
box-shadow: 0 0 0 3px var(--opeanpi-code-tab-shadow-color-nodejs);
|
|
221
|
+
border-color: var(--openapi-code-tab-border-color-nodejs);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.openapi-tabs__code-item--php {
|
|
226
|
+
color: var(--ifm-color-gray-500);
|
|
227
|
+
|
|
228
|
+
&::after {
|
|
229
|
+
content: "";
|
|
230
|
+
width: var(--code-tab-logo-width);
|
|
231
|
+
height: var(--code-tab-logo-height);
|
|
232
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/php/php-original.svg")
|
|
233
|
+
no-repeat;
|
|
234
|
+
margin-block: auto;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&.active {
|
|
238
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-php);
|
|
239
|
+
border-color: var(--openapi-code-tab-border-color-php);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.openapi-tabs__code-item--java {
|
|
244
|
+
color: var(--ifm-color-warning);
|
|
245
|
+
|
|
246
|
+
&::after {
|
|
247
|
+
content: "";
|
|
248
|
+
width: var(--code-tab-logo-width);
|
|
249
|
+
height: var(--code-tab-logo-height);
|
|
250
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/java/java-original.svg")
|
|
251
|
+
no-repeat;
|
|
252
|
+
margin-block: auto;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&.active {
|
|
256
|
+
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-java);
|
|
257
|
+
border-color: var(--openapi-code-tab-border-color-java);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.openapi-tabs__code-item--powershell {
|
|
262
|
+
color: var(--ifm-color-info);
|
|
263
|
+
|
|
264
|
+
&::after {
|
|
265
|
+
content: "";
|
|
266
|
+
width: var(--code-tab-logo-width);
|
|
267
|
+
height: var(--code-tab-logo-height);
|
|
268
|
+
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg")
|
|
269
|
+
no-repeat;
|
|
270
|
+
margin-block: auto;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&.active {
|
|
274
|
+
box-shadow: 0 0 0 3px var(--opeanpi-code-tab-shadow-color-powershell);
|
|
275
|
+
border-color: var(--openapi-code-tab-border-color-powershell);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@media only screen and (min-width: 768px) and (max-width: 996px) {
|
|
280
|
+
.openapi-tabs__code-list {
|
|
281
|
+
justify-content: space-around;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.ReactModal__Body--open {
|
|
286
|
+
overflow: hidden !important;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.openapi-modal--open {
|
|
290
|
+
background-color: rgba(0, 0, 0, 0.7) !important;
|
|
291
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
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, { cloneElement } from "react";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
useScrollPositionBlocker,
|
|
12
|
+
useTabs,
|
|
13
|
+
} from "@docusaurus/theme-common/internal";
|
|
14
|
+
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
15
|
+
import { languageSet } from "@theme/ApiExplorer/CodeSnippets";
|
|
16
|
+
import clsx from "clsx";
|
|
17
|
+
|
|
18
|
+
function TabList({
|
|
19
|
+
action,
|
|
20
|
+
currentLanguage,
|
|
21
|
+
includeVariant,
|
|
22
|
+
className,
|
|
23
|
+
block,
|
|
24
|
+
selectedValue,
|
|
25
|
+
selectValue,
|
|
26
|
+
tabValues,
|
|
27
|
+
}) {
|
|
28
|
+
const tabRefs = [];
|
|
29
|
+
const { blockElementScrollPositionUntilNextRender } =
|
|
30
|
+
useScrollPositionBlocker();
|
|
31
|
+
|
|
32
|
+
const handleTabChange = (event) => {
|
|
33
|
+
const newTab = event.currentTarget;
|
|
34
|
+
const newTabIndex = tabRefs.indexOf(newTab);
|
|
35
|
+
const newTabValue = tabValues[newTabIndex].value;
|
|
36
|
+
|
|
37
|
+
if (newTabValue !== selectedValue) {
|
|
38
|
+
blockElementScrollPositionUntilNextRender(newTab);
|
|
39
|
+
selectValue(newTabValue);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (action) {
|
|
43
|
+
let newLanguage;
|
|
44
|
+
if (currentLanguage && includeVariant) {
|
|
45
|
+
newLanguage = languageSet.filter(
|
|
46
|
+
(lang) => lang.language === currentLanguage
|
|
47
|
+
)[0];
|
|
48
|
+
newLanguage.variant = newTabValue;
|
|
49
|
+
action.setSelectedVariant(newTabValue.toLowerCase());
|
|
50
|
+
} else {
|
|
51
|
+
newLanguage = languageSet.filter(
|
|
52
|
+
(lang) => lang.language === newTabValue
|
|
53
|
+
)[0];
|
|
54
|
+
action.setSelectedVariant(newLanguage.variant.toLowerCase());
|
|
55
|
+
}
|
|
56
|
+
action.setLanguage(newLanguage);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const handleKeydown = (event) => {
|
|
61
|
+
let focusElement = null;
|
|
62
|
+
switch (event.key) {
|
|
63
|
+
case "Enter": {
|
|
64
|
+
handleTabChange(event);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
case "ArrowRight": {
|
|
68
|
+
const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
|
|
69
|
+
focusElement = tabRefs[nextTab] ?? tabRefs[0];
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case "ArrowLeft": {
|
|
73
|
+
const prevTab = tabRefs.indexOf(event.currentTarget) - 1;
|
|
74
|
+
focusElement = tabRefs[prevTab] ?? tabRefs[tabRefs.length - 1];
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
default:
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
focusElement?.focus();
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<ul
|
|
85
|
+
role="tablist"
|
|
86
|
+
aria-orientation="horizontal"
|
|
87
|
+
className={clsx(
|
|
88
|
+
"tabs",
|
|
89
|
+
"openapi-tabs__code-list-container",
|
|
90
|
+
{
|
|
91
|
+
"tabs--block": block,
|
|
92
|
+
},
|
|
93
|
+
className
|
|
94
|
+
)}
|
|
95
|
+
>
|
|
96
|
+
{tabValues.map(({ value, label, attributes }) => (
|
|
97
|
+
<li
|
|
98
|
+
// TODO extract TabListItem
|
|
99
|
+
role="tab"
|
|
100
|
+
tabIndex={selectedValue === value ? 0 : -1}
|
|
101
|
+
aria-selected={selectedValue === value}
|
|
102
|
+
key={value}
|
|
103
|
+
ref={(tabControl) => tabRefs.push(tabControl)}
|
|
104
|
+
onKeyDown={handleKeydown}
|
|
105
|
+
onClick={handleTabChange}
|
|
106
|
+
{...attributes}
|
|
107
|
+
className={clsx(
|
|
108
|
+
"tabs__item",
|
|
109
|
+
"openapi-tabs__code-item",
|
|
110
|
+
attributes?.className,
|
|
111
|
+
{
|
|
112
|
+
active: selectedValue === value,
|
|
113
|
+
}
|
|
114
|
+
)}
|
|
115
|
+
>
|
|
116
|
+
<span>{label ?? value}</span>
|
|
117
|
+
</li>
|
|
118
|
+
))}
|
|
119
|
+
</ul>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function TabContent({ lazy, children, selectedValue }) {
|
|
124
|
+
// eslint-disable-next-line no-param-reassign
|
|
125
|
+
children = Array.isArray(children) ? children : [children];
|
|
126
|
+
if (lazy) {
|
|
127
|
+
const selectedTabItem = children.find(
|
|
128
|
+
(tabItem) => tabItem.props.value === selectedValue
|
|
129
|
+
);
|
|
130
|
+
if (!selectedTabItem) {
|
|
131
|
+
// fail-safe or fail-fast? not sure what's best here
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
return cloneElement(selectedTabItem, { className: "margin-top--md" });
|
|
135
|
+
}
|
|
136
|
+
return (
|
|
137
|
+
<div className="margin-top--md openapi-tabs__code-content">
|
|
138
|
+
{children.map((tabItem, i) =>
|
|
139
|
+
cloneElement(tabItem, {
|
|
140
|
+
key: i,
|
|
141
|
+
hidden: tabItem.props.value !== selectedValue,
|
|
142
|
+
})
|
|
143
|
+
)}
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function TabsComponent(props) {
|
|
149
|
+
const tabs = useTabs(props);
|
|
150
|
+
const { className } = props;
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<div
|
|
154
|
+
className={clsx("tabs-container openapi-tabs__code-container", {
|
|
155
|
+
[className]: className,
|
|
156
|
+
})}
|
|
157
|
+
>
|
|
158
|
+
<TabList {...props} {...tabs} />
|
|
159
|
+
<TabContent {...props} {...tabs} />
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export default function CodeTabs(props) {
|
|
165
|
+
const isBrowser = useIsBrowser();
|
|
166
|
+
return (
|
|
167
|
+
<TabsComponent
|
|
168
|
+
// Remount tabs after hydration
|
|
169
|
+
// Temporary fix for https://github.com/facebook/docusaurus/issues/5653
|
|
170
|
+
key={String(isBrowser)}
|
|
171
|
+
{...props}
|
|
172
|
+
/>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
@@ -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 { setContentType } from "./slice";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.openapi-explorer__floating-btn {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
button {
|
|
5
|
+
position: relative;
|
|
6
|
+
background: var(--ifm-color-emphasis-900);
|
|
7
|
+
border: none;
|
|
8
|
+
border-radius: var(--ifm-global-radius);
|
|
9
|
+
color: var(--ifm-color-emphasis-100);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
padding: 0.4rem 0.5rem;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
visibility: hidden;
|
|
14
|
+
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
|
|
15
|
+
bottom 0.2s ease-in-out;
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: calc(var(--ifm-pre-padding) / 2);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.openapi-explorer__floating-btn:hover button,
|
|
21
|
+
.openapi-explorer__floating-btn:focus-visible button,
|
|
22
|
+
.openapi-explorer__floating-btn button:focus-visible {
|
|
23
|
+
visibility: visible;
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import styles from "./styles.module.css";
|
|
11
|
-
|
|
12
10
|
export interface Props {
|
|
13
11
|
label?: string;
|
|
14
12
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -17,7 +15,7 @@ export interface Props {
|
|
|
17
15
|
|
|
18
16
|
function FloatingButton({ label, onClick, children }: Props) {
|
|
19
17
|
return (
|
|
20
|
-
<div tabIndex={0} className=
|
|
18
|
+
<div tabIndex={0} className="openapi-explorer__floating-btn">
|
|
21
19
|
{label && (
|
|
22
20
|
<button tabIndex={0} onClick={onClick}>
|
|
23
21
|
{label}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
.
|
|
1
|
+
.openapi-explorer__dropzone {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
border: 2px dashed var(--openapi-monaco-border-color);
|
|
7
|
-
/* border: 2px dashed var(--ifm-color-primary); */
|
|
8
7
|
background-color: var(--openapi-input-background);
|
|
9
8
|
|
|
10
9
|
width: 100%;
|
|
11
|
-
/* min-height: 120px; */
|
|
12
|
-
/* padding: 16px 11px; */
|
|
13
10
|
border-radius: 4px;
|
|
14
11
|
padding: var(--ifm-pre-padding);
|
|
15
12
|
font-size: var(--ifm-code-font-size);
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
border: 2px dashed var(--ifm-color-primary);
|
|
16
|
+
background: linear-gradient(
|
|
17
|
+
var(--openapi-dropzone-hover-shim),
|
|
18
|
+
var(--openapi-dropzone-hover-shim)
|
|
19
|
+
),
|
|
20
|
+
linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
|
|
21
|
+
|
|
22
|
+
.openapi-explorer__dropzone-content {
|
|
23
|
+
color: var(--ifm-pre-color);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
16
26
|
}
|
|
17
27
|
|
|
18
|
-
.
|
|
28
|
+
.openapi-explorer__dropzone-hover {
|
|
19
29
|
display: inline-flex;
|
|
20
30
|
align-items: center;
|
|
21
31
|
justify-content: center;
|
|
@@ -33,43 +43,30 @@
|
|
|
33
43
|
var(--openapi-dropzone-hover-shim)
|
|
34
44
|
),
|
|
35
45
|
linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
|
|
36
|
-
}
|
|
37
46
|
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
}
|
|
47
|
+
.openapi-explorer__dropzone-content {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
margin: var(--ifm-pre-padding) 0;
|
|
53
|
+
color: var(--ifm-pre-color);
|
|
54
|
+
}
|
|
46
55
|
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
.openapi-explorer__file-name {
|
|
57
|
+
margin: 0 calc(var(--ifm-pre-padding) * 1.5);
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
flex: 1;
|
|
62
|
+
}
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
.
|
|
57
|
-
color: var(--ifm-pre-color);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.dropzoneHover .dropzoneContent {
|
|
65
|
+
.openapi-explorer__dropzone-content {
|
|
61
66
|
display: flex;
|
|
62
67
|
align-items: center;
|
|
63
68
|
justify-content: center;
|
|
64
69
|
flex-wrap: wrap;
|
|
65
70
|
margin: var(--ifm-pre-padding) 0;
|
|
66
|
-
color: var(--
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.filename {
|
|
70
|
-
margin: 0 calc(var(--ifm-pre-padding) * 1.5);
|
|
71
|
-
white-space: nowrap;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
text-overflow: ellipsis;
|
|
74
|
-
flex: 1;
|
|
71
|
+
color: var(--openapi-dropzone-color);
|
|
75
72
|
}
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
9
|
|
|
10
|
-
import FloatingButton from "@theme/
|
|
10
|
+
import FloatingButton from "@theme/ApiExplorer/FloatingButton";
|
|
11
11
|
import MagicDropzone from "react-magic-dropzone";
|
|
12
12
|
|
|
13
|
-
import styles from "./styles.module.css";
|
|
14
|
-
|
|
15
13
|
type PreviewFile = { preview: string } & File;
|
|
16
14
|
|
|
17
15
|
interface RenderPreviewProps {
|
|
@@ -55,7 +53,7 @@ function RenderPreview({ file }: RenderPreviewProps) {
|
|
|
55
53
|
d="M0.210,-0.000 L40.000,39.790 L40.000,40.000 L15.000,40.000 C6.716,40.000 0.000,33.284 0.000,25.000 L0.000,-0.000 L0.210,-0.000 Z"
|
|
56
54
|
/>
|
|
57
55
|
</svg>
|
|
58
|
-
<div className=
|
|
56
|
+
<div className="openapi-explorer__file-name">{file.name}</div>
|
|
59
57
|
</div>
|
|
60
58
|
);
|
|
61
59
|
}
|
|
@@ -84,7 +82,11 @@ function FormFileUpload({ placeholder, onChange }: Props) {
|
|
|
84
82
|
return (
|
|
85
83
|
<FloatingButton>
|
|
86
84
|
<MagicDropzone
|
|
87
|
-
className={
|
|
85
|
+
className={
|
|
86
|
+
hover
|
|
87
|
+
? "openapi-explorer__dropzone-hover"
|
|
88
|
+
: "openapi-explorer__dropzone"
|
|
89
|
+
}
|
|
88
90
|
onDrop={handleDrop}
|
|
89
91
|
onDragEnter={() => setHover(true)}
|
|
90
92
|
onDragLeave={() => setHover(false)}
|
|
@@ -105,7 +107,9 @@ function FormFileUpload({ placeholder, onChange }: Props) {
|
|
|
105
107
|
<RenderPreview file={file} />
|
|
106
108
|
</>
|
|
107
109
|
) : (
|
|
108
|
-
<div className=
|
|
110
|
+
<div className="openapi-explorer__dropzone-content">
|
|
111
|
+
{placeholder}
|
|
112
|
+
</div>
|
|
109
113
|
)}
|
|
110
114
|
</MagicDropzone>
|
|
111
115
|
</FloatingButton>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.openapi-explorer__form-item {
|
|
2
|
+
padding: var(--openapi-explorer-padding-input);
|
|
3
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
4
|
+
|
|
5
|
+
&:first-child {
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.required {
|
|
10
|
+
color: var(--openapi-required);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.openapi-explorer__form-item-body-container {
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.openapi-explorer__form-item-label {
|
|
19
|
+
font-family: var(--ifm-font-family-monospace);
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
}
|