@scalar/api-reference 1.49.2 → 1.49.4
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/CHANGELOG.md +15 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/blocks/index.js +4 -2
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/index.d.ts +2 -2
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
- package/dist/browser/standalone.js +35377 -34973
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
- package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +5 -6
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +0 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +65 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/index.d.ts +3 -3
- package/dist/components/Anchor/Anchor.vue.js +7 -0
- package/dist/components/Anchor/Anchor.vue.js.map +1 -0
- package/dist/components/Anchor/Anchor.vue.script.js +40 -0
- package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
- package/dist/components/Anchor/index.d.ts +2 -2
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +12 -0
- package/dist/components/ApiReference.vue.js.map +1 -0
- package/dist/components/ApiReference.vue.script.js +662 -0
- package/dist/components/ApiReference.vue.script.js.map +1 -0
- package/dist/components/Badge/Badge.vue.js +9 -0
- package/dist/components/Badge/Badge.vue.js.map +1 -0
- package/dist/components/Badge/Badge.vue.script.js +22 -0
- package/dist/components/Badge/Badge.vue.script.js.map +1 -0
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/ClassicHeader.vue.js +16 -0
- package/dist/components/ClassicHeader.vue.js.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.js +7 -0
- package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
- package/dist/components/Content/Auth/index.d.ts +1 -1
- package/dist/components/Content/Content.vue.js +8 -0
- package/dist/components/Content/Content.vue.js.map +1 -0
- package/dist/components/Content/Content.vue.script.js +192 -0
- package/dist/components/Content/Content.vue.script.js.map +1 -0
- package/dist/components/Content/Models/Model.vue.js +7 -0
- package/dist/components/Content/Models/Model.vue.js.map +1 -0
- package/dist/components/Content/Models/Model.vue.script.js +61 -0
- package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
- package/dist/components/Content/Models/ModelTag.vue.js +7 -0
- package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
- package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
- package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Models/index.d.ts +2 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/RenderString.vue.js +7 -0
- package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
- package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
- package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +9 -0
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.script.js +184 -0
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +146 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +161 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +256 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/helpers/format-example.js +26 -0
- package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
- package/dist/components/Content/Schema/helpers/format-value.js +22 -0
- package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
- package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
- package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
- package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
- package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
- package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
- package/dist/components/Content/Schema/index.d.ts +4 -4
- package/dist/components/Content/Tags/Tag.vue.js +7 -0
- package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
- package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
- package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
- package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/index.d.ts +1 -1
- package/dist/components/Content/index.d.ts +2 -2
- package/dist/components/GettingStarted.vue.js +9 -0
- package/dist/components/GettingStarted.vue.js.map +1 -0
- package/dist/components/GettingStarted.vue.script.js +71 -0
- package/dist/components/GettingStarted.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IntersectionObserver.vue.js +7 -0
- package/dist/components/IntersectionObserver.vue.js.map +1 -0
- package/dist/components/IntersectionObserver.vue.script.js +45 -0
- package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
- package/dist/components/Lazy/Lazy.vue.js +7 -0
- package/dist/components/Lazy/Lazy.vue.js.map +1 -0
- package/dist/components/Lazy/Lazy.vue.script.js +101 -0
- package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
- package/dist/components/LinkList/LinkList.vue.js +9 -0
- package/dist/components/LinkList/LinkList.vue.js.map +1 -0
- package/dist/components/LinkList/LinkList.vue.script.js +53 -0
- package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
- package/dist/components/LinkList/index.d.ts +1 -1
- package/dist/components/LoadingSkeleton.vue.js +9 -0
- package/dist/components/LoadingSkeleton.vue.js.map +1 -0
- package/dist/components/LoadingSkeleton.vue.script.js +20 -0
- package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +7 -0
- package/dist/components/MobileHeader.vue.js.map +1 -0
- package/dist/components/MobileHeader.vue.script.js +43 -0
- package/dist/components/MobileHeader.vue.script.js.map +1 -0
- package/dist/components/OperationPath.vue.js +9 -0
- package/dist/components/OperationPath.vue.js.map +1 -0
- package/dist/components/OperationPath.vue.script.js +24 -0
- package/dist/components/OperationPath.vue.script.js.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.js +9 -0
- package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
- package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
- package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
- package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
- package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
- package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
- package/dist/components/OperationsList/index.d.ts +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
- package/dist/components/RenderPlugins/index.d.ts +1 -1
- package/dist/components/ScreenReader.vue.js +9 -0
- package/dist/components/ScreenReader.vue.js.map +1 -0
- package/dist/components/ScreenReader.vue.script.js +22 -0
- package/dist/components/ScreenReader.vue.script.js.map +1 -0
- package/dist/components/Section/CompactSection.vue.js +9 -0
- package/dist/components/Section/CompactSection.vue.js.map +1 -0
- package/dist/components/Section/CompactSection.vue.script.js +56 -0
- package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
- package/dist/components/Section/Section.vue.js +9 -0
- package/dist/components/Section/Section.vue.js.map +1 -0
- package/dist/components/Section/Section.vue.script.js +23 -0
- package/dist/components/Section/Section.vue.script.js.map +1 -0
- package/dist/components/Section/SectionAccordion.vue.js +9 -0
- package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
- package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
- package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
- package/dist/components/Section/SectionColumn.vue.js +14 -0
- package/dist/components/Section/SectionColumn.vue.js.map +1 -0
- package/dist/components/Section/SectionColumns.vue.js +14 -0
- package/dist/components/Section/SectionColumns.vue.js.map +1 -0
- package/dist/components/Section/SectionContainer.vue.js +9 -0
- package/dist/components/Section/SectionContainer.vue.js.map +1 -0
- package/dist/components/Section/SectionContainer.vue.script.js +19 -0
- package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
- package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
- package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
- package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
- package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
- package/dist/components/Section/SectionContent.vue.js +9 -0
- package/dist/components/Section/SectionContent.vue.js.map +1 -0
- package/dist/components/Section/SectionContent.vue.script.js +23 -0
- package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
- package/dist/components/Section/SectionHeader.vue.js +9 -0
- package/dist/components/Section/SectionHeader.vue.js.map +1 -0
- package/dist/components/Section/SectionHeader.vue.script.js +23 -0
- package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
- package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
- package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
- package/dist/components/Section/index.d.ts +10 -10
- package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
- package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
- package/dist/components/SectionFlare/index.d.ts +1 -1
- package/dist/components/ShowMoreButton.vue.js +9 -0
- package/dist/components/ShowMoreButton.vue.js.map +1 -0
- package/dist/components/ShowMoreButton.vue.script.js +22 -0
- package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +20 -102
- package/dist/{urls-gPTXGgbj.js → consts/urls.js} +2 -2
- package/dist/consts/urls.js.map +1 -0
- package/dist/features/Operation/Operation.vue.js +7 -0
- package/dist/features/Operation/Operation.vue.js.map +1 -0
- package/dist/features/Operation/Operation.vue.script.js +115 -0
- package/dist/features/Operation/Operation.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
- package/dist/features/Operation/components/Header.vue.js +7 -0
- package/dist/features/Operation/components/Header.vue.js.map +1 -0
- package/dist/features/Operation/components/Header.vue.script.js +42 -0
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
- package/dist/features/Operation/components/Headers.vue.js +9 -0
- package/dist/features/Operation/components/Headers.vue.js.map +1 -0
- package/dist/features/Operation/components/Headers.vue.script.js +58 -0
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
- package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +7 -0
- package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
- package/dist/features/Operation/components/RequestBody.vue.js +9 -0
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
- package/dist/features/Operation/components/RequestBody.vue.script.js +154 -0
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
- package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
- package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
- package/dist/features/Operation/helpers/get-first-server.js +27 -0
- package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
- package/dist/features/Operation/index.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +243 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +243 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.js +7 -0
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.js +9 -0
- package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
- package/dist/features/Search/components/SearchResult.vue.js +7 -0
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
- package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
- package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
- package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
- package/dist/features/Search/helpers/create-search-index.js +127 -0
- package/dist/features/Search/helpers/create-search-index.js.map +1 -0
- package/dist/features/Search/hooks/useSearchIndex.js +31 -0
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
- package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
- package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
- package/dist/features/developer-tools/DeveloperTools.vue.script.js +49 -0
- package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +80 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +66 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +26 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +26 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
- package/dist/features/developer-tools/index.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
- package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
- package/dist/features/example-responses/has-response-content.js +37 -0
- package/dist/features/example-responses/has-response-content.js.map +1 -0
- package/dist/features/example-responses/index.d.ts +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
- package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
- package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
- package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
- package/dist/features/external-docs/index.d.ts +1 -1
- package/dist/features/index.d.ts +2 -2
- package/dist/features/index.js +4 -3
- package/dist/features/info-object/Contact.vue.js +7 -0
- package/dist/features/info-object/Contact.vue.js.map +1 -0
- package/dist/features/info-object/Contact.vue.script.js +37 -0
- package/dist/features/info-object/Contact.vue.script.js.map +1 -0
- package/dist/features/info-object/License.vue.js +7 -0
- package/dist/features/info-object/License.vue.js.map +1 -0
- package/dist/features/info-object/License.vue.script.js +32 -0
- package/dist/features/info-object/License.vue.script.js.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.js +7 -0
- package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
- package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
- package/dist/features/info-object/index.d.ts +3 -3
- package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
- package/dist/features/specification-extension/helpers.js +15 -0
- package/dist/features/specification-extension/helpers.js.map +1 -0
- package/dist/features/specification-extension/index.d.ts +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
- package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
- package/dist/features/test-request-button/TestRequestButton.vue.script.js +47 -0
- package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
- package/dist/features/test-request-button/index.d.ts +1 -1
- package/dist/features/x-badges/XBadges.vue.js +7 -0
- package/dist/features/x-badges/XBadges.vue.js.map +1 -0
- package/dist/features/x-badges/XBadges.vue.script.js +31 -0
- package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
- package/dist/features/x-badges/index.d.ts +1 -1
- package/dist/helpers/color-mode.js +15 -0
- package/dist/helpers/color-mode.js.map +1 -0
- package/dist/helpers/download.js +77 -0
- package/dist/helpers/download.js.map +1 -0
- package/dist/helpers/id-routing.js +107 -0
- package/dist/helpers/id-routing.js.map +1 -0
- package/dist/helpers/index.d.ts +8 -8
- package/dist/helpers/index.js +8 -2
- package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
- package/dist/helpers/lazy-bus.js.map +1 -0
- package/dist/helpers/load-from-perssistance.js +23 -0
- package/dist/helpers/load-from-perssistance.js.map +1 -0
- package/dist/helpers/map-config-plugins.js +44 -0
- package/dist/helpers/map-config-plugins.js.map +1 -0
- package/dist/helpers/map-config-to-workspace-store.js +24 -0
- package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
- package/dist/helpers/normalize-configurations.js +66 -0
- package/dist/helpers/normalize-configurations.js.map +1 -0
- package/dist/helpers/openapi.js +132 -0
- package/dist/helpers/openapi.js.map +1 -0
- package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
- package/dist/helpers/storage.js.map +1 -0
- package/dist/helpers/upload-temp-document.js +24 -0
- package/dist/helpers/upload-temp-document.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
- package/dist/hooks/use-agent.js.map +1 -0
- package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
- package/dist/hooks/use-intersection.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.js +16 -0
- package/dist/plugins/hooks/usePluginManager.js.map +1 -0
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.js +3 -1
- package/dist/plugins/persistance-plugin.js +39 -0
- package/dist/plugins/persistance-plugin.js.map +1 -0
- package/dist/plugins/plugin-manager.js +32 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/ssr.d.ts +2 -2
- package/dist/ssr.js +6 -6
- package/dist/standalone/lib/html-api.js +73 -0
- package/dist/standalone/lib/html-api.js.map +1 -0
- package/dist/style.css +7878 -6432
- package/package.json +12 -12
- package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
- package/dist/ExternalDocs-phu7GxpZ.js +0 -272
- package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
- package/dist/MobileHeader-DAm6yQX0.js +0 -1373
- package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
- package/dist/Operation-CvpVIkc3.js +0 -3829
- package/dist/Operation-CvpVIkc3.js.map +0 -1
- package/dist/SearchButton-xzhIpMCZ.js +0 -621
- package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
- package/dist/ServerSelector-5y29y2BJ.js +0 -852
- package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
- package/dist/normalize-configurations-DcVpOEjD.js +0 -232
- package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
- package/dist/plugins-4EyiUD_A.js +0 -80
- package/dist/plugins-4EyiUD_A.js.map +0 -1
- package/dist/src-DJwsRvMU.js +0 -1686
- package/dist/src-DJwsRvMU.js.map +0 -1
- package/dist/storage--3JuzjCI.js.map +0 -1
- package/dist/urls-gPTXGgbj.js.map +0 -1
- package/dist/use-agent-Bnm1de0n.js.map +0 -1
- package/dist/use-intersection-8QqPi2O-.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @scalar/api-reference
|
|
2
2
|
|
|
3
|
+
## 1.49.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#8513](https://github.com/scalar/scalar/pull/8513): fix(api-reference): make responsive header rendering SSR-safe
|
|
8
|
+
- [#8526](https://github.com/scalar/scalar/pull/8526): feat: improve filtering of client selector
|
|
9
|
+
- [#8571](https://github.com/scalar/scalar/pull/8571): fix: [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for
|
|
10
|
+
- [#8563](https://github.com/scalar/scalar/pull/8563): fix: type declarations don't use the full path for imports
|
|
11
|
+
|
|
12
|
+
## 1.49.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#8529](https://github.com/scalar/scalar/pull/8529): rewrite declaration aliases in built type files
|
|
17
|
+
|
|
3
18
|
## 1.49.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region \0plugin-vue:export-helper
|
|
2
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
3
|
+
const target = sfc.__vccOpts || sfc;
|
|
4
|
+
for (const [key, val] of props) target[key] = val;
|
|
5
|
+
return target;
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _plugin_vue_export_helper_default as default };
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
1
|
+
import ClientSelector_default from "./scalar-client-selector-block/components/ClientSelector.vue.js";
|
|
2
|
+
import InfoBlock_default from "./scalar-info-block/components/InfoBlock.vue.js";
|
|
3
|
+
import IntroductionCardItem_default from "./scalar-info-block/components/IntroductionCardItem.vue.js";
|
|
4
|
+
import ServerSelector_default from "./scalar-server-selector-block/components/ServerSelector.vue.js";
|
|
3
5
|
export { ClientSelector_default as ClientSelector, InfoBlock_default as InfoBlock, IntroductionCardItem_default as IntroductionCardItem, ServerSelector_default as ServerSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"AA2PA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEvB,MAAM,oDAAoD,CAAA;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,KAAK,WAAW,GAAG;IACf,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC,+BAA+B;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAA;IAC/B,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAqPJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import ClientDropdown_vue_vue_type_script_setup_true_lang_default from "./ClientDropdown.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue
|
|
5
|
+
var ClientDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6ae3e515"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ClientDropdown_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=ClientDropdown.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { isFeaturedClient } from "../helpers/featured-clients.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
3
|
+
import { Tab } from "@headlessui/vue";
|
|
4
|
+
import { ScalarCombobox, ScalarIcon } from "@scalar/components";
|
|
5
|
+
import { filterClientsByQuery, findClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
6
|
+
import { freezeElement } from "@scalar/helpers/dom/freeze-element";
|
|
7
|
+
//#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = { class: "client-libraries-text" };
|
|
9
|
+
var _hoisted_2 = {
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
class: "client-libraries-icon__more"
|
|
12
|
+
};
|
|
13
|
+
var _hoisted_3 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "client-libraries-icon",
|
|
16
|
+
height: "50",
|
|
17
|
+
role: "presentation",
|
|
18
|
+
viewBox: "0 0 50 50",
|
|
19
|
+
width: "50",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
};
|
|
22
|
+
var _hoisted_4 = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "client-libraries-text client-libraries-text-more"
|
|
25
|
+
};
|
|
26
|
+
var ClientDropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
27
|
+
__name: "ClientDropdown",
|
|
28
|
+
props: {
|
|
29
|
+
clientOptions: {},
|
|
30
|
+
selectedClient: {},
|
|
31
|
+
featuredClients: {},
|
|
32
|
+
eventBus: {}
|
|
33
|
+
},
|
|
34
|
+
setup(__props) {
|
|
35
|
+
const containerRef = ref();
|
|
36
|
+
/**
|
|
37
|
+
* Icons have longer names to appear in icon searches, e.g. "javascript-js" instead of just "javascript". This function
|
|
38
|
+
* maps the language key to the icon name.
|
|
39
|
+
*/
|
|
40
|
+
const getIconByLanguageKey = (targetKey) => `programming-language-${targetKey === "js" ? "javascript" : targetKey}`;
|
|
41
|
+
/** Set custom example, or update the selected HTTP client globally */
|
|
42
|
+
const selectClient = (option) => {
|
|
43
|
+
if (!containerRef.value) return;
|
|
44
|
+
const unfreeze = freezeElement(containerRef.value);
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
unfreeze();
|
|
47
|
+
}, 300);
|
|
48
|
+
if (option.clientKey !== "custom") __props.eventBus.emit("workspace:update:selected-client", option.id);
|
|
49
|
+
};
|
|
50
|
+
/** Calculates the targetKey from the selected client id */
|
|
51
|
+
const selectedTargetKey = computed(() => __props.selectedClient?.split("/")[0]);
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return openBlock(), createElementBlock("div", {
|
|
54
|
+
ref_key: "containerRef",
|
|
55
|
+
ref: containerRef,
|
|
56
|
+
class: "client-libraries-content"
|
|
57
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.featuredClients, (featuredClient) => {
|
|
58
|
+
return openBlock(), createBlock(unref(Tab), {
|
|
59
|
+
key: featuredClient.clientKey,
|
|
60
|
+
class: normalizeClass(["client-libraries rendered-code-sdks", { "client-libraries__active": featuredClient.id === __props.selectedClient }])
|
|
61
|
+
}, {
|
|
62
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(`client-libraries-icon__${featuredClient.targetKey}`) }, [createVNode(unref(ScalarIcon), {
|
|
63
|
+
class: "client-libraries-icon",
|
|
64
|
+
icon: getIconByLanguageKey(featuredClient.targetKey)
|
|
65
|
+
}, null, 8, ["icon"])], 2), createElementVNode("span", _hoisted_1, toDisplayString(featuredClient.targetTitle), 1)]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1032, ["class"]);
|
|
68
|
+
}), 128)), createVNode(unref(ScalarCombobox), {
|
|
69
|
+
filterFn: unref(filterClientsByQuery),
|
|
70
|
+
modelValue: unref(findClient)(__props.clientOptions, __props.selectedClient),
|
|
71
|
+
options: __props.clientOptions,
|
|
72
|
+
placement: "bottom-end",
|
|
73
|
+
teleport: "",
|
|
74
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectClient($event))
|
|
75
|
+
}, {
|
|
76
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
77
|
+
class: normalizeClass(["client-libraries client-libraries__select", { "client-libraries__active": __props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) }]),
|
|
78
|
+
type: "button"
|
|
79
|
+
}, [
|
|
80
|
+
createElementVNode("div", _hoisted_2, [__props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(), createElementBlock("div", {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: normalizeClass(`client-libraries-icon__${selectedTargetKey.value}`)
|
|
83
|
+
}, [selectedTargetKey.value ? (openBlock(), createBlock(unref(ScalarIcon), {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: "client-libraries-icon",
|
|
86
|
+
icon: getIconByLanguageKey(selectedTargetKey.value)
|
|
87
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)], 2)) : (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[1] || (_cache[1] = [createElementVNode("g", {
|
|
88
|
+
fill: "currentColor",
|
|
89
|
+
"fill-rule": "nonzero"
|
|
90
|
+
}, [createElementVNode("path", { d: "M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0" })], -1)])]))]),
|
|
91
|
+
__props.clientOptions.length ? (openBlock(), createElementBlock("span", _hoisted_4, " More ")) : createCommentVNode("", true),
|
|
92
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Select from all clients", -1))
|
|
93
|
+
], 2)]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 8, [
|
|
96
|
+
"filterFn",
|
|
97
|
+
"modelValue",
|
|
98
|
+
"options"
|
|
99
|
+
])], 512);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ClientDropdown_vue_vue_type_script_setup_true_lang_default as default };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=ClientDropdown.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,eAAe,KAAiB;;;;;EAMtC,MAAM,wBAAwB,cAC5B,wBAAwB,cAAc,OAAO,eAAe;;EAG9D,MAAM,gBAAgB,WAA8C;AAClE,OAAI,CAAC,aAAa,MAChB;GAIF,MAAM,WAAW,cAAc,aAAa,MAAK;AACjD,oBAAiB;AACf,cAAS;MACR,IAAG;AAGN,OAAI,OAAO,cAAc,SACvB,SAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;;EAK/D,MAAM,oBAAoB,eAClB,QAAA,gBAAgB,MAAM,IAAI,CAAC,GACnC;;uBAGE,mBAuEM,OAAA;aAtEA;IAAJ,KAAI;IACJ,OAAM;yBACN,mBAeM,UAAA,MAAA,WAdqB,QAAA,kBAAlB,mBAAc;wBADvB,YAeM,MAAA,IAAA,EAAA;KAbH,KAAK,eAAe;KACrB,OAAK,eAAA,CAAC,uCAAqC,EAAA,4BACG,eAAe,OAAO,QAAA,gBAAA,CAAA,CAAA;;4BAO9D,CAJN,mBAIM,OAAA,EAJA,OAAK,eAAA,0BAA4B,eAAe,YAAS,EAAA,EAAA,CAC7D,YAE2D,MAAA,WAAA,EAAA;MADzD,OAAM;MACL,MAAM,qBAAqB,eAAe,UAAS;iCAExD,mBAES,QAFT,YAES,gBADP,eAAe,YAAW,EAAA,EAAA,CAAA,CAAA;;;cAK9B,YAiDiB,MAAA,eAAA,EAAA;IAhDd,UAAU,MAAA,qBAAoB;IAC9B,YAAY,MAAA,WAAU,CAAC,QAAA,eAAe,QAAA,eAAc;IACpD,SAAS,QAAA;IACV,WAAU;IACV,UAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAA,WAAE,aAAa,OAAM;;2BA0C9B,CAzCT,mBAyCS,UAAA;KAxCP,OAAK,eAAA,CAAC,6CAA2C,EAAA,4BACW,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,EAAA,CAAA,CAAA;KAI9G,MAAK;;KACL,mBA2BM,OA3BN,YA2BM,CAxBY,QAAA,kBAAc,CAAK,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,WAAA,EAChE,mBAKM,OAAA;;MALA,OAAK,eAAA,0BAA4B,kBAAA,QAAiB;SAE9C,kBAAA,SAAA,WAAA,EADR,YAGoD,MAAA,WAAA,EAAA;;MADlD,OAAM;MACL,MAAM,qBAAqB,kBAAA,MAAiB;iFAIjD,mBAaM,OAbN,YAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CANJ,mBAKI,KAAA;MAJF,MAAK;MACL,aAAU;SACV,mBACoL,QAAA,EAAlL,GAAE,+KAA6K,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,EAAA,CAAA;KAMjL,QAAA,cAAc,UAAA,WAAA,EADtB,mBAIO,QAJP,YAE2D,SAE3D,IAAA,mBAAA,IAAA,KAAA;+BACA,mBAAoD,QAAA,EAA9C,OAAM,WAAS,EAAC,2BAAuB,GAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import ClientSelector_vue_vue_type_script_setup_true_lang_default from "./ClientSelector.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/blocks/scalar-client-selector-block/components/ClientSelector.vue
|
|
5
|
+
var ClientSelector_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClientSelector_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-dd2e9b07"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ClientSelector_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=ClientSelector.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { getFeaturedClients, isFeaturedClient } from "../helpers/featured-clients.js";
|
|
2
|
+
import ClientDropdown_default from "./ClientDropdown.vue.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
|
|
4
|
+
import { TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/vue";
|
|
5
|
+
import { ScalarCodeBlock, ScalarMarkdown } from "@scalar/components";
|
|
6
|
+
import { DEFAULT_CLIENT } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
7
|
+
//#region src/blocks/scalar-client-selector-block/components/ClientSelector.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
ref: "wrapper-ref"
|
|
11
|
+
};
|
|
12
|
+
var _hoisted_2 = ["id"];
|
|
13
|
+
var _hoisted_3 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "selected-client card-footer border-t-0 p-0",
|
|
16
|
+
role: "tabpanel",
|
|
17
|
+
tabindex: "1"
|
|
18
|
+
};
|
|
19
|
+
var _hoisted_4 = ["id"];
|
|
20
|
+
var ClientSelector_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "ClientSelector",
|
|
22
|
+
props: {
|
|
23
|
+
xScalarSdkInstallation: {},
|
|
24
|
+
clientOptions: {},
|
|
25
|
+
selectedClient: { default: () => DEFAULT_CLIENT },
|
|
26
|
+
eventBus: {}
|
|
27
|
+
},
|
|
28
|
+
setup(__props, { expose: __expose }) {
|
|
29
|
+
const headingId = useId();
|
|
30
|
+
const morePanel = useId();
|
|
31
|
+
/** Grab the option for the currently selected Http Client */
|
|
32
|
+
const selectedClientOption = computed(() => __props.clientOptions.flatMap((optionGroup) => optionGroup.options.find((option) => option.id === __props.selectedClient) ?? [])[0]);
|
|
33
|
+
/** List of featured clients */
|
|
34
|
+
const featuredClients = computed(() => getFeaturedClients(__props.clientOptions));
|
|
35
|
+
/** Currently selected tab index */
|
|
36
|
+
const tabIndex = computed(() => featuredClients.value.findIndex((featuredClient) => __props.selectedClient === featuredClient.id));
|
|
37
|
+
const wrapper = useTemplateRef("wrapper-ref");
|
|
38
|
+
/** Emit the selected client event on tab */
|
|
39
|
+
const onTabSelect = (i) => {
|
|
40
|
+
const client = featuredClients.value[i];
|
|
41
|
+
if (!client || !wrapper.value) return;
|
|
42
|
+
__props.eventBus.emit("workspace:update:selected-client", client.id);
|
|
43
|
+
};
|
|
44
|
+
const installationInstructions = computed(() => {
|
|
45
|
+
if (!Array.isArray(__props.xScalarSdkInstallation) || !__props.xScalarSdkInstallation?.length) return;
|
|
46
|
+
const instruction = __props.xScalarSdkInstallation.find((instruction) => {
|
|
47
|
+
const targetKey = __props.selectedClient?.split("/")[0]?.toLowerCase();
|
|
48
|
+
return instruction.lang.toLowerCase() === targetKey;
|
|
49
|
+
});
|
|
50
|
+
if (!instruction) return;
|
|
51
|
+
return instruction;
|
|
52
|
+
});
|
|
53
|
+
__expose({ selectedClientOption });
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return __props.clientOptions.length ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(TabGroup), {
|
|
56
|
+
manual: "",
|
|
57
|
+
selectedIndex: tabIndex.value,
|
|
58
|
+
onChange: onTabSelect
|
|
59
|
+
}, {
|
|
60
|
+
default: withCtx(() => [
|
|
61
|
+
createElementVNode("div", {
|
|
62
|
+
id: unref(headingId),
|
|
63
|
+
class: "client-libraries-heading"
|
|
64
|
+
}, " Client Libraries ", 8, _hoisted_2),
|
|
65
|
+
createVNode(unref(TabList), {
|
|
66
|
+
"aria-labelledby": unref(headingId),
|
|
67
|
+
class: "client-libraries-list"
|
|
68
|
+
}, {
|
|
69
|
+
default: withCtx(() => [createVNode(ClientDropdown_default, {
|
|
70
|
+
clientOptions: __props.clientOptions,
|
|
71
|
+
eventBus: __props.eventBus,
|
|
72
|
+
featuredClients: featuredClients.value,
|
|
73
|
+
morePanel: unref(morePanel),
|
|
74
|
+
selectedClient: __props.selectedClient
|
|
75
|
+
}, null, 8, [
|
|
76
|
+
"clientOptions",
|
|
77
|
+
"eventBus",
|
|
78
|
+
"featuredClients",
|
|
79
|
+
"morePanel",
|
|
80
|
+
"selectedClient"
|
|
81
|
+
])]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["aria-labelledby"]),
|
|
84
|
+
createVNode(unref(TabPanels), null, {
|
|
85
|
+
default: withCtx(() => [installationInstructions.value?.source || installationInstructions.value?.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [installationInstructions.value.description ? (openBlock(), createElementBlock("div", {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: normalizeClass(["selected-client card-footer -outline-offset-2", installationInstructions.value.source && "rounded-b-none"]),
|
|
88
|
+
role: "tabpanel",
|
|
89
|
+
tabindex: "0"
|
|
90
|
+
}, [createVNode(unref(ScalarMarkdown), { value: installationInstructions.value.description }, null, 8, ["value"])], 2)) : createCommentVNode("", true), installationInstructions.value.source ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(ScalarCodeBlock), {
|
|
91
|
+
class: "rounded-b-lg *:first:p-3",
|
|
92
|
+
content: installationInstructions.value.source,
|
|
93
|
+
copy: "always",
|
|
94
|
+
lang: "shell"
|
|
95
|
+
}, null, 8, ["content"])])) : createCommentVNode("", true)], 64)) : unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(featuredClients.value, (client) => {
|
|
96
|
+
return openBlock(), createBlock(unref(TabPanel), {
|
|
97
|
+
key: client.id,
|
|
98
|
+
class: "selected-client card-footer -outline-offset-2"
|
|
99
|
+
}, {
|
|
100
|
+
default: withCtx(() => [createTextVNode(toDisplayString(client.title), 1)]),
|
|
101
|
+
_: 2
|
|
102
|
+
}, 1024);
|
|
103
|
+
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
104
|
+
key: 2,
|
|
105
|
+
id: unref(morePanel),
|
|
106
|
+
class: "selected-client card-footer -outline-offset-2",
|
|
107
|
+
role: "tabpanel",
|
|
108
|
+
tabindex: "0"
|
|
109
|
+
}, toDisplayString(selectedClientOption.value?.title), 9, _hoisted_4))]),
|
|
110
|
+
_: 1
|
|
111
|
+
})
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["selectedIndex"])], 512)) : createCommentVNode("", true);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
//#endregion
|
|
119
|
+
export { ClientSelector_vue_vue_type_script_setup_true_lang_default as default };
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=ClientSelector.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,YAAY,OAAM;EACxB,MAAM,YAAY,OAAM;;EAGxB,MAAM,uBAAuB,eAEzB,QAAA,cAAc,SACX,gBACC,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO,QAAA,eAAe,IAClE,EAAE,CACL,CAAC,GACN;;EAGA,MAAM,kBAAkB,eAAe,mBAAmB,QAAA,cAAc,CAAA;;EAGxE,MAAM,WAAW,eACf,gBAAgB,MAAM,WACnB,mBAAmB,QAAA,mBAAmB,eAAe,GACvD,CACH;EAEA,MAAM,UAAU,eAAe,cAAa;;EAG5C,MAAM,eAAe,MAAc;GACjC,MAAM,SAAS,gBAAgB,MAAM;AAErC,OAAI,CAAC,UAAU,CAAC,QAAQ,MACtB;AAGF,WAAA,SAAS,KAAK,oCAAoC,OAAO,GAAE;;EAG7D,MAAM,2BAA2B,eAAe;AAE9C,OACE,CAAC,MAAM,QAAQ,QAAA,uBAAuB,IACtC,CAAC,QAAA,wBAAwB,OAEzB;GAIF,MAAM,cAAc,QAAA,uBAAuB,MAAM,gBAAgB;IAC/D,MAAM,YAAY,QAAA,gBAAgB,MAAM,IAAI,CAAC,IAAI,aAAY;AAC7D,WAAO,YAAY,KAAK,aAAa,KAAK;KAC3C;AAGD,OAAI,CAAC,YACH;AAIF,UAAO;IACR;AAED,WAAa,EACX,sBACD,CAAA;;UAIS,QAAA,cAAc,UAAA,WAAA,EADtB,mBAsEM,OAtEN,YAsEM,CAnEJ,YAkEW,MAAA,SAAA,EAAA;IAjET,QAAA;IACC,eAAe,SAAA;IACf,UAAQ;;2BAKH;KAJN,mBAIM,OAAA;MAHH,IAAI,MAAA,UAAS;MACd,OAAM;QAA2B,sBAEnC,GAAA,WAAA;KAGA,YASU,MAAA,QAAA,EAAA;MARP,mBAAiB,MAAA,UAAS;MAC3B,OAAM;;6BAMc,CALpB,YAKoB,wBAAA;OAJjB,eAAA,QAAA;OACA,UAAA,QAAA;OACA,iBAAA,gBAAA;OACA,WAAA,MAAA,UAAS;OACT,gBAAA,QAAA;;;;;;;;;;KAIL,YA0CY,MAAA,UAAA,EAAA,MAAA;6BAjBC,CAvBU,yBAAA,OAA0B,UAAsB,yBAAA,OAA0B,eAAA,WAAA,EAD/F,mBAwBW,UAAA,EAAA,KAAA,GAAA,EAAA,CAlBD,yBAAA,MAAyB,eAAA,WAAA,EADjC,mBAOM,OAAA;;OALJ,OAAK,eAAA,CAAC,iDACE,yBAAA,MAAyB,UAAM,iBAAA,CAAA;OACvC,MAAK;OACL,UAAS;UACT,YAAgE,MAAA,eAAA,EAAA,EAA/C,OAAO,yBAAA,MAAyB,aAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,EAG3C,yBAAA,MAAyB,UAAA,WAAA,EADjC,mBAUM,OAVN,YAUM,CALJ,YAIiB,MAAA,gBAAA,EAAA;OAHf,OAAM;OACL,SAAS,yBAAA,MAAyB;OACnC,MAAK;OACL,MAAK;0EAGU,MAAA,iBAAgB,CAAC,QAAA,eAAc,IAAA,UAAA,KAAA,EAClD,mBAKW,UAAA,EAAA,KAAA,GAAA,EAAA,WAJQ,gBAAA,QAAV,WAAM;2BADf,YAKW,MAAA,SAAA,EAAA;QAHR,KAAK,OAAO;QACb,OAAM;;+BACY,CAAA,gBAAA,gBAAf,OAAO,MAAK,EAAA,EAAA,CAAA,CAAA;;;gCAGnB,mBAOM,OAAA;;OALH,IAAI,MAAA,UAAS;OACd,OAAM;OACN,MAAK;OACL,UAAS;yBACN,qBAAA,OAAsB,MAAK,EAAA,GAAA,WAAA,EAAA,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/blocks/scalar-client-selector-block/helpers/featured-clients.ts
|
|
2
|
+
/** Hard coded list of default featured clients */
|
|
3
|
+
var FEATURED_CLIENTS = [
|
|
4
|
+
"shell/curl",
|
|
5
|
+
"ruby/native",
|
|
6
|
+
"node/undici",
|
|
7
|
+
"php/guzzle",
|
|
8
|
+
"python/python3"
|
|
9
|
+
];
|
|
10
|
+
/** Whether or not a client is in the featured list */
|
|
11
|
+
var isFeaturedClient = (clientId, featuredClients = FEATURED_CLIENTS) => Boolean(clientId && featuredClients.includes(clientId));
|
|
12
|
+
/**
|
|
13
|
+
* Maps featured client IDs to their corresponding ClientOption objects.
|
|
14
|
+
* Returns an array of ClientOption objects that match the featured clients list,
|
|
15
|
+
* maintaining the order of the featured clients.
|
|
16
|
+
*/
|
|
17
|
+
var getFeaturedClients = (clientOptions, featuredClients = FEATURED_CLIENTS) => {
|
|
18
|
+
const clientMap = /* @__PURE__ */ new Map();
|
|
19
|
+
for (const group of clientOptions) for (const option of group.options) clientMap.set(option.id, option);
|
|
20
|
+
return featuredClients.flatMap((clientId) => {
|
|
21
|
+
return clientMap.get(clientId) ?? [];
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getFeaturedClients, isFeaturedClient };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=featured-clients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featured-clients.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/helpers/featured-clients.ts"],"sourcesContent":["import type { ClientOption, ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { AvailableClients } from '@scalar/snippetz'\n\n/** Hard coded list of default featured clients */\nconst FEATURED_CLIENTS = [\n 'shell/curl',\n 'ruby/native',\n 'node/undici',\n 'php/guzzle',\n 'python/python3',\n] satisfies AvailableClients[number][]\n\n/** Whether or not a client is in the featured list */\nexport const isFeaturedClient = (\n clientId: AvailableClients[number] | undefined,\n featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n) => Boolean(clientId && featuredClients.includes(clientId as (typeof featuredClients)[number]))\n\n/**\n * Maps featured client IDs to their corresponding ClientOption objects.\n * Returns an array of ClientOption objects that match the featured clients list,\n * maintaining the order of the featured clients.\n */\nexport const getFeaturedClients = (\n clientOptions: ClientOptionGroup[],\n featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n): ClientOption[] => {\n // Create a map of all available client options for quick lookup\n const clientMap = new Map<string, ClientOption>()\n\n // Using the map means we only have to loop through once\n for (const group of clientOptions) {\n for (const option of group.options) {\n clientMap.set(option.id, option)\n }\n }\n\n // Map featured clients to their corresponding options, maintaining order\n return featuredClients.flatMap((clientId) => {\n const client = clientMap.get(clientId)\n return client ?? []\n })\n}\n"],"mappings":";;AAIA,IAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACD;;AAGD,IAAa,oBACX,UACA,kBAA8C,qBAC3C,QAAQ,YAAY,gBAAgB,SAAS,SAA6C,CAAC;;;;;;AAOhG,IAAa,sBACX,eACA,kBAA8C,qBAC3B;CAEnB,MAAM,4BAAY,IAAI,KAA2B;AAGjD,MAAK,MAAM,SAAS,cAClB,MAAK,MAAM,UAAU,MAAM,QACzB,WAAU,IAAI,OAAO,IAAI,OAAO;AAKpC,QAAO,gBAAgB,SAAS,aAAa;AAE3C,SADe,UAAU,IAAI,SAAS,IACrB,EAAE;GACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ClientSelector } from './components/ClientSelector.vue';
|
|
1
|
+
export { default as ClientSelector } from './components/ClientSelector.vue.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import DownloadLink_vue_vue_type_script_setup_true_lang_default from "./DownloadLink.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/blocks/scalar-info-block/components/DownloadLink.vue
|
|
5
|
+
var DownloadLink_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DownloadLink_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-95e980e1"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { DownloadLink_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=DownloadLink.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadLink.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/DownloadLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport Badge from '@/components/Badge/Badge.vue'\n\nconst { eventBus, documentDownloadType, documentUrl } = defineProps<{\n /** The document download type. */\n documentDownloadType: ApiReferenceConfiguration['documentDownloadType']\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /**\n * URL of the OpenAPI document. Required when documentDownloadType is 'direct'\n * so the link can point to the document.\n */\n documentUrl?: string\n}>()\n\n// The id is retrieved at the layout level.\nconst handleDownloadClick = (format: 'json' | 'yaml') => {\n eventBus.emit('ui:download:document', { format })\n}\n</script>\n<template>\n <div\n v-if=\"\n ['yaml', 'json', 'both'].includes(documentDownloadType) ||\n (documentDownloadType === 'direct' && documentUrl)\n \"\n class=\"download-container group\"\n :class=\"{\n 'download-both': documentDownloadType === 'both',\n }\">\n <!-- Direct link to the document -->\n <a\n v-if=\"documentDownloadType === 'direct' && documentUrl\"\n class=\"download-link download-button\"\n :href=\"documentUrl\">\n <span> Download OpenAPI Document </span>\n </a>\n\n <!-- JSON -->\n <button\n v-if=\"documentDownloadType === 'json' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('json')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">json</Badge>\n </button>\n\n <!-- YAML -->\n <button\n v-if=\"documentDownloadType === 'yaml' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('yaml')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">yaml</Badge>\n </button>\n </div>\n</template>\n\n<style scoped>\n@reference '@/style.css';\n\n.download-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 0.5px 8px;\n position: relative;\n width: fit-content;\n z-index: 1;\n}\n\n.download-container:has(:focus-visible)::before,\n.download-container.download-both:hover::before {\n content: '';\n width: calc(100% + 24px);\n height: 90px;\n position: absolute;\n top: -11px;\n left: -12px;\n border-radius: var(--scalar-radius-lg);\n box-shadow: var(--scalar-shadow-2);\n pointer-events: none;\n background: var(--scalar-background-1);\n}\n\n.download-button {\n color: var(--scalar-link-color);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: fit-content;\n padding: 0;\n position: relative;\n white-space: nowrap !important;\n\n outline: none;\n}\n\n.download-button::before {\n border-radius: var(--scalar-radius);\n content: '';\n height: calc(100% + 16px);\n left: -9px;\n position: absolute;\n top: -8px;\n width: calc(100% + 18px);\n}\n\n.download-button:last-of-type::before {\n width: calc(100% + 15px);\n}\n\n.download-button:hover::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.download-button:focus-visible::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n @apply outline;\n}\n\n.download-button span {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n align-items: center;\n display: flex;\n gap: 6px;\n line-height: 1.625;\n z-index: 1;\n}\n\n.download-button:hover span {\n text-decoration-color: var(--scalar-color-1, currentColor);\n color: var(--scalar-link-color-hover, var(--scalar-color-accent));\n -webkit-text-decoration: var(--scalar-text-decoration-hover);\n text-decoration: var(--scalar-text-decoration-hover);\n}\n\n/* Second button displayed when hovering over the download container */\n.download-button:nth-of-type(2) {\n @apply sr-only;\n}\n\n.download-container:has(:focus-visible) .download-button:nth-of-type(2),\n.download-container:hover .download-button:nth-of-type(2) {\n @apply not-sr-only;\n\n position: absolute;\n top: 42px;\n}\n\n.extension {\n z-index: 1;\n background: var(--scalar-link-color, var(--scalar-color-accent));\n color: var(--scalar-background-1);\n}\n.download-container:has(:focus-visible) .extension,\n.download-container:hover .extension {\n opacity: 1;\n}\n\n.download-link {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n}\n\n.download-link:hover {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n text-decoration-color: var(--font-color);\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Badge_default from "../../../components/Badge/Badge.vue.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, withCtx, withModifiers } from "vue";
|
|
3
|
+
//#region src/blocks/scalar-info-block/components/DownloadLink.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = ["href"];
|
|
5
|
+
var DownloadLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "DownloadLink",
|
|
7
|
+
props: {
|
|
8
|
+
documentDownloadType: {},
|
|
9
|
+
eventBus: {},
|
|
10
|
+
documentUrl: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const handleDownloadClick = (format) => {
|
|
14
|
+
__props.eventBus.emit("ui:download:document", { format });
|
|
15
|
+
};
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return [
|
|
18
|
+
"yaml",
|
|
19
|
+
"json",
|
|
20
|
+
"both"
|
|
21
|
+
].includes(__props.documentDownloadType) || __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("div", {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: normalizeClass(["download-container group", { "download-both": __props.documentDownloadType === "both" }])
|
|
24
|
+
}, [
|
|
25
|
+
__props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("a", {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "download-link download-button",
|
|
28
|
+
href: __props.documentUrl
|
|
29
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", null, " Download OpenAPI Document ", -1)])], 8, _hoisted_1)) : createCommentVNode("", true),
|
|
30
|
+
__props.documentDownloadType === "json" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: "download-button",
|
|
33
|
+
type: "button",
|
|
34
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => handleDownloadClick("json"), ["prevent"]))
|
|
35
|
+
}, [_cache[4] || (_cache[4] = createElementVNode("span", null, " Download OpenAPI Document ", -1)), createVNode(Badge_default, { class: "extension hidden group-hover:flex" }, {
|
|
36
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("json", -1)])]),
|
|
37
|
+
_: 1
|
|
38
|
+
})])) : createCommentVNode("", true),
|
|
39
|
+
__props.documentDownloadType === "yaml" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
|
|
40
|
+
key: 2,
|
|
41
|
+
class: "download-button",
|
|
42
|
+
type: "button",
|
|
43
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => handleDownloadClick("yaml"), ["prevent"]))
|
|
44
|
+
}, [_cache[6] || (_cache[6] = createElementVNode("span", null, " Download OpenAPI Document ", -1)), createVNode(Badge_default, { class: "extension hidden group-hover:flex" }, {
|
|
45
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("yaml", -1)])]),
|
|
46
|
+
_: 1
|
|
47
|
+
})])) : createCommentVNode("", true)
|
|
48
|
+
], 2)) : createCommentVNode("", true);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { DownloadLink_vue_vue_type_script_setup_true_lang_default as default };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=DownloadLink.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadLink.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/DownloadLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport Badge from '@/components/Badge/Badge.vue'\n\nconst { eventBus, documentDownloadType, documentUrl } = defineProps<{\n /** The document download type. */\n documentDownloadType: ApiReferenceConfiguration['documentDownloadType']\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /**\n * URL of the OpenAPI document. Required when documentDownloadType is 'direct'\n * so the link can point to the document.\n */\n documentUrl?: string\n}>()\n\n// The id is retrieved at the layout level.\nconst handleDownloadClick = (format: 'json' | 'yaml') => {\n eventBus.emit('ui:download:document', { format })\n}\n</script>\n<template>\n <div\n v-if=\"\n ['yaml', 'json', 'both'].includes(documentDownloadType) ||\n (documentDownloadType === 'direct' && documentUrl)\n \"\n class=\"download-container group\"\n :class=\"{\n 'download-both': documentDownloadType === 'both',\n }\">\n <!-- Direct link to the document -->\n <a\n v-if=\"documentDownloadType === 'direct' && documentUrl\"\n class=\"download-link download-button\"\n :href=\"documentUrl\">\n <span> Download OpenAPI Document </span>\n </a>\n\n <!-- JSON -->\n <button\n v-if=\"documentDownloadType === 'json' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('json')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">json</Badge>\n </button>\n\n <!-- YAML -->\n <button\n v-if=\"documentDownloadType === 'yaml' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('yaml')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">yaml</Badge>\n </button>\n </div>\n</template>\n\n<style scoped>\n@reference '@/style.css';\n\n.download-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 0.5px 8px;\n position: relative;\n width: fit-content;\n z-index: 1;\n}\n\n.download-container:has(:focus-visible)::before,\n.download-container.download-both:hover::before {\n content: '';\n width: calc(100% + 24px);\n height: 90px;\n position: absolute;\n top: -11px;\n left: -12px;\n border-radius: var(--scalar-radius-lg);\n box-shadow: var(--scalar-shadow-2);\n pointer-events: none;\n background: var(--scalar-background-1);\n}\n\n.download-button {\n color: var(--scalar-link-color);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: fit-content;\n padding: 0;\n position: relative;\n white-space: nowrap !important;\n\n outline: none;\n}\n\n.download-button::before {\n border-radius: var(--scalar-radius);\n content: '';\n height: calc(100% + 16px);\n left: -9px;\n position: absolute;\n top: -8px;\n width: calc(100% + 18px);\n}\n\n.download-button:last-of-type::before {\n width: calc(100% + 15px);\n}\n\n.download-button:hover::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.download-button:focus-visible::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n @apply outline;\n}\n\n.download-button span {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n align-items: center;\n display: flex;\n gap: 6px;\n line-height: 1.625;\n z-index: 1;\n}\n\n.download-button:hover span {\n text-decoration-color: var(--scalar-color-1, currentColor);\n color: var(--scalar-link-color-hover, var(--scalar-color-accent));\n -webkit-text-decoration: var(--scalar-text-decoration-hover);\n text-decoration: var(--scalar-text-decoration-hover);\n}\n\n/* Second button displayed when hovering over the download container */\n.download-button:nth-of-type(2) {\n @apply sr-only;\n}\n\n.download-container:has(:focus-visible) .download-button:nth-of-type(2),\n.download-container:hover .download-button:nth-of-type(2) {\n @apply not-sr-only;\n\n position: absolute;\n top: 42px;\n}\n\n.extension {\n z-index: 1;\n background: var(--scalar-link-color, var(--scalar-color-accent));\n color: var(--scalar-background-1);\n}\n.download-container:has(:focus-visible) .extension,\n.download-container:hover .extension {\n opacity: 1;\n}\n\n.download-link {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n}\n\n.download-link:hover {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n text-decoration-color: var(--font-color);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;EAmBA,MAAM,uBAAuB,WAA4B;AACvD,WAAA,SAAS,KAAK,wBAAwB,EAAE,QAAQ,CAAA;;;;;;;KAKR,SAAS,QAAA,qBAAoB,IAAY,QAAA,yBAAoB,YAAiB,QAAA,eAAA,WAAA,EADtH,mBAoCM,OAAA;;IA/BJ,OAAK,eAAA,CAAC,4BAA0B,EAAA,iBACC,QAAA,yBAAoB,QAAA,CAAA,CAAA;;IAK7C,QAAA,yBAAoB,YAAiB,QAAA,eAAA,WAAA,EAD7C,mBAKI,KAAA;;KAHF,OAAM;KACL,MAAM,QAAA;sCACP,mBAAwC,QAAA,MAAlC,+BAA2B,GAAA,CAAA,EAAA,EAAA,GAAA,WAAA,IAAA,mBAAA,IAAA,KAAA;IAK3B,QAAA,yBAAoB,UAAe,QAAA,yBAAoB,UAAA,WAAA,EAD/D,mBAOS,UAAA;;KALP,OAAM;KACN,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAgB,oBAAmB,OAAA,EAAA,CAAA,UAAA,CAAA;kCACzC,mBAAwC,QAAA,MAAlC,+BAA2B,GAAA,GACjC,YAA6D,eAAA,EAAtD,OAAM,qCAAmC,EAAA;4BAAK,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAJ,QAAI,GAAA,CAAA,EAAA,CAAA;;;IAK/C,QAAA,yBAAoB,UAAe,QAAA,yBAAoB,UAAA,WAAA,EAD/D,mBAOS,UAAA;;KALP,OAAM;KACN,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAgB,oBAAmB,OAAA,EAAA,CAAA,UAAA,CAAA;kCACzC,mBAAwC,QAAA,MAAlC,+BAA2B,GAAA,GACjC,YAA6D,eAAA,EAAtD,OAAM,qCAAmC,EAAA;4BAAK,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAJ,QAAI,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import InfoBlock_vue_vue_type_script_setup_true_lang_default from "./InfoBlock.vue.script.js";
|
|
2
|
+
//#region src/blocks/scalar-info-block/components/InfoBlock.vue
|
|
3
|
+
var InfoBlock_default = InfoBlock_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { InfoBlock_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=InfoBlock.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.vue.js","names":[],"sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original openapi version of the input document */\n oasVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :oasVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import DownloadLink_default from "./DownloadLink.vue.js";
|
|
2
|
+
import IntroductionCard_default from "./IntroductionCard.vue.js";
|
|
3
|
+
import IntroductionLayout_default from "./IntroductionLayout.vue.js";
|
|
4
|
+
import { computed, createBlock, createVNode, defineComponent, openBlock, renderSlot, withCtx } from "vue";
|
|
5
|
+
//#region src/blocks/scalar-info-block/components/InfoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var InfoBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "InfoBlock",
|
|
8
|
+
props: {
|
|
9
|
+
id: {},
|
|
10
|
+
oasVersion: {},
|
|
11
|
+
info: {},
|
|
12
|
+
externalDocs: {},
|
|
13
|
+
documentExtensions: {},
|
|
14
|
+
infoExtensions: {},
|
|
15
|
+
eventBus: {},
|
|
16
|
+
headingSlugGenerator: { type: Function },
|
|
17
|
+
layout: {},
|
|
18
|
+
documentDownloadType: { default: "both" },
|
|
19
|
+
documentUrl: {}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
/**
|
|
23
|
+
* Put the selectors in
|
|
24
|
+
* - the after slot for classic layout,
|
|
25
|
+
* - and the aside slot for other layouts.
|
|
26
|
+
*/
|
|
27
|
+
const introCardsSlot = computed(() => __props.layout === "classic" ? "after" : "aside");
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createBlock(IntroductionLayout_default, {
|
|
30
|
+
id: __props.id,
|
|
31
|
+
documentExtensions: __props.documentExtensions,
|
|
32
|
+
eventBus: __props.eventBus,
|
|
33
|
+
externalDocs: __props.externalDocs,
|
|
34
|
+
headingSlugGenerator: __props.headingSlugGenerator,
|
|
35
|
+
info: __props.info,
|
|
36
|
+
infoExtensions: __props.infoExtensions,
|
|
37
|
+
oasVersion: __props.oasVersion
|
|
38
|
+
}, {
|
|
39
|
+
[introCardsSlot.value]: withCtx(() => [createVNode(IntroductionCard_default, { row: __props.layout === "classic" }, {
|
|
40
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "selectors")]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 8, ["row"])]),
|
|
43
|
+
"download-link": withCtx(() => [createVNode(DownloadLink_default, {
|
|
44
|
+
documentDownloadType: __props.documentDownloadType,
|
|
45
|
+
documentUrl: __props.documentUrl,
|
|
46
|
+
eventBus: __props.eventBus
|
|
47
|
+
}, null, 8, [
|
|
48
|
+
"documentDownloadType",
|
|
49
|
+
"documentUrl",
|
|
50
|
+
"eventBus"
|
|
51
|
+
])]),
|
|
52
|
+
_: 2
|
|
53
|
+
}, 1032, [
|
|
54
|
+
"id",
|
|
55
|
+
"documentExtensions",
|
|
56
|
+
"eventBus",
|
|
57
|
+
"externalDocs",
|
|
58
|
+
"headingSlugGenerator",
|
|
59
|
+
"info",
|
|
60
|
+
"infoExtensions",
|
|
61
|
+
"oasVersion"
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
export { InfoBlock_vue_vue_type_script_setup_true_lang_default as default };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=InfoBlock.vue.script.js.map
|