@scalar/api-reference 1.49.0 → 1.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/AgentScalarChatInterface-MUbtSqMw.js +41 -0
- package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +1 -0
- package/dist/ExternalDocs-phu7GxpZ.js +272 -0
- package/dist/ExternalDocs-phu7GxpZ.js.map +1 -0
- package/dist/MobileHeader-B71jYJdT.js +1373 -0
- package/dist/MobileHeader-B71jYJdT.js.map +1 -0
- package/dist/Operation-CixLVfKd.js +3827 -0
- package/dist/Operation-CixLVfKd.js.map +1 -0
- package/dist/SearchButton-xzhIpMCZ.js +621 -0
- package/dist/SearchButton-xzhIpMCZ.js.map +1 -0
- package/dist/ServerSelector-5y29y2BJ.js +852 -0
- package/dist/ServerSelector-5y29y2BJ.js.map +1 -0
- package/dist/blocks/index.js +3 -10
- package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
- package/dist/blocks/scalar-info-block/index.d.ts +2 -2
- package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
- package/dist/browser/standalone.js +40759 -34701
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/index.d.ts +3 -3
- package/dist/components/Anchor/index.d.ts +2 -2
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Content/Auth/index.d.ts +1 -1
- package/dist/components/Content/Models/index.d.ts +2 -2
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
- package/dist/components/Content/Schema/index.d.ts +4 -4
- package/dist/components/Content/Tags/index.d.ts +1 -1
- package/dist/components/Content/index.d.ts +2 -2
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/LinkList/index.d.ts +1 -1
- package/dist/components/OperationsList/index.d.ts +1 -1
- package/dist/components/RenderPlugins/index.d.ts +1 -1
- package/dist/components/Section/index.d.ts +10 -10
- package/dist/components/SectionFlare/index.d.ts +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +102 -42
- package/dist/components/index.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
- 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/ModernLayout.vue.d.ts +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/developer-tools/index.d.ts +1 -1
- package/dist/features/example-responses/index.d.ts +1 -1
- package/dist/features/external-docs/index.d.ts +1 -1
- package/dist/features/index.d.ts +2 -2
- package/dist/features/index.js +4 -10
- package/dist/features/info-object/index.d.ts +3 -3
- package/dist/features/specification-extension/index.d.ts +2 -2
- package/dist/features/test-request-button/index.d.ts +1 -1
- package/dist/features/x-badges/index.d.ts +1 -1
- package/dist/helpers/download.d.ts +1 -1
- package/dist/helpers/download.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +8 -8
- package/dist/helpers/index.js +3 -24
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +3 -8
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -14
- package/dist/lazy-bus-CV8Ox5hD.js +333 -0
- package/dist/lazy-bus-CV8Ox5hD.js.map +1 -0
- package/dist/normalize-configurations-DcVpOEjD.js +232 -0
- package/dist/normalize-configurations-DcVpOEjD.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.js +2 -9
- package/dist/plugins-4EyiUD_A.js +80 -0
- package/dist/plugins-4EyiUD_A.js.map +1 -0
- package/dist/src-DqcYVBWI.js +1686 -0
- package/dist/src-DqcYVBWI.js.map +1 -0
- package/dist/ssr.d.ts +2 -2
- package/dist/ssr.js +7 -14
- package/dist/storage--3JuzjCI.js +42 -0
- package/dist/storage--3JuzjCI.js.map +1 -0
- package/dist/style.css +6773 -7332
- package/dist/urls-gPTXGgbj.js +17 -0
- package/dist/urls-gPTXGgbj.js.map +1 -0
- package/dist/use-agent-Bnm1de0n.js +60 -0
- package/dist/use-agent-Bnm1de0n.js.map +1 -0
- package/dist/use-intersection-8QqPi2O-.js +24 -0
- package/dist/use-intersection-8QqPi2O-.js.map +1 -0
- package/package.json +25 -27
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +0 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +0 -123
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +0 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +0 -142
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +0 -24
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +0 -63
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +0 -59
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +0 -70
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +0 -38
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +0 -38
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +0 -28
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue2.js +0 -4
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +0 -19
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +0 -14
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +0 -7
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +0 -112
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +0 -21
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +0 -4
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +0 -76
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue2.js +0 -4
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +0 -72
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +0 -4
- package/dist/components/AgentScalar/AgentScalarButton.vue.js +0 -22
- package/dist/components/AgentScalar/AgentScalarButton.vue2.js +0 -4
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +0 -4
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue2.js +0 -29
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +0 -7
- package/dist/components/AgentScalar/AgentScalarDrawer.vue2.js +0 -78
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +0 -7
- package/dist/components/AgentScalar/OpenMCPButton.vue2.js +0 -191
- package/dist/components/Anchor/Anchor.vue.js +0 -51
- package/dist/components/Anchor/Anchor.vue2.js +0 -4
- package/dist/components/Anchor/WithBreadcrumb.vue.js +0 -41
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +0 -4
- package/dist/components/ApiReference.vue.js +0 -10
- package/dist/components/ApiReference.vue2.js +0 -742
- package/dist/components/Badge/Badge.vue.js +0 -7
- package/dist/components/Badge/Badge.vue2.js +0 -26
- package/dist/components/ClassicHeader.vue.js +0 -21
- package/dist/components/Content/Auth/Auth.vue.js +0 -77
- package/dist/components/Content/Auth/Auth.vue2.js +0 -4
- package/dist/components/Content/Auth/helpers/get-default-security.js +0 -55
- package/dist/components/Content/Content.vue.js +0 -171
- package/dist/components/Content/Content.vue3.js +0 -5
- package/dist/components/Content/Models/Model.vue.js +0 -47
- package/dist/components/Content/Models/Model.vue2.js +0 -4
- package/dist/components/Content/Models/ModelTag.vue.js +0 -76
- package/dist/components/Content/Models/ModelTag.vue2.js +0 -4
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +0 -78
- package/dist/components/Content/Models/components/ModernLayout.vue.js +0 -61
- package/dist/components/Content/Models/components/ModernLayout.vue2.js +0 -4
- package/dist/components/Content/Operations/TraversedEntry.vue.js +0 -146
- package/dist/components/Content/Operations/TraversedEntry.vue2.js +0 -4
- package/dist/components/Content/Schema/RenderString.vue.js +0 -27
- package/dist/components/Content/Schema/RenderString.vue2.js +0 -4
- package/dist/components/Content/Schema/Schema.vue.js +0 -7
- package/dist/components/Content/Schema/Schema.vue2.js +0 -193
- package/dist/components/Content/Schema/SchemaComposition.vue.js +0 -120
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +0 -36
- package/dist/components/Content/Schema/SchemaEnums.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaEnums.vue2.js +0 -112
- package/dist/components/Content/Schema/SchemaHeading.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +0 -61
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +0 -66
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +0 -120
- package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +0 -4
- package/dist/components/Content/Schema/SchemaProperty.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +0 -236
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue2.js +0 -45
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +0 -40
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +0 -80
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +0 -7
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +0 -318
- package/dist/components/Content/Schema/helpers/format-example.js +0 -41
- package/dist/components/Content/Schema/helpers/format-value.js +0 -35
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +0 -31
- package/dist/components/Content/Schema/helpers/get-enum-values.js +0 -20
- package/dist/components/Content/Schema/helpers/get-property-description.js +0 -34
- package/dist/components/Content/Schema/helpers/get-ref-name.js +0 -14
- package/dist/components/Content/Schema/helpers/get-schema-type.js +0 -47
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js +0 -48
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +0 -13
- package/dist/components/Content/Schema/helpers/is-type-object.js +0 -27
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +0 -215
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +0 -64
- package/dist/components/Content/Schema/helpers/schema-composition.js +0 -4
- package/dist/components/Content/Schema/helpers/schema-name.js +0 -24
- package/dist/components/Content/Schema/helpers/should-display-description.js +0 -12
- package/dist/components/Content/Schema/helpers/should-display-heading.js +0 -12
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +0 -15
- package/dist/components/Content/Schema/helpers/sort-property-names.js +0 -71
- package/dist/components/Content/Tags/Tag.vue.js +0 -46
- package/dist/components/Content/Tags/Tag.vue2.js +0 -4
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +0 -57
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +0 -7
- package/dist/components/Content/Tags/components/ModernLayout.vue2.js +0 -56
- package/dist/components/Content/Tags/components/TagSection.vue.js +0 -100
- package/dist/components/Content/Tags/components/TagSection.vue2.js +0 -4
- package/dist/components/GettingStarted.vue.js +0 -7
- package/dist/components/GettingStarted.vue2.js +0 -82
- package/dist/components/HttpMethod/HttpMethod.vue.js +0 -34
- package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -4
- package/dist/components/IntersectionObserver.vue.js +0 -55
- package/dist/components/IntersectionObserver.vue2.js +0 -4
- package/dist/components/Lazy/Lazy.vue.js +0 -106
- package/dist/components/Lazy/Lazy.vue2.js +0 -4
- package/dist/components/LinkList/LinkList.vue.js +0 -7
- package/dist/components/LinkList/LinkList.vue2.js +0 -48
- package/dist/components/LoadingSkeleton.vue.js +0 -7
- package/dist/components/LoadingSkeleton.vue2.js +0 -20
- package/dist/components/MobileHeader.vue.js +0 -62
- package/dist/components/MobileHeader.vue2.js +0 -4
- package/dist/components/OperationPath.vue.js +0 -7
- package/dist/components/OperationPath.vue2.js +0 -30
- package/dist/components/OperationsList/OperationsList.vue.js +0 -7
- package/dist/components/OperationsList/OperationsList.vue2.js +0 -61
- package/dist/components/OperationsList/OperationsListItem.vue.js +0 -7
- package/dist/components/OperationsList/OperationsListItem.vue2.js +0 -68
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +0 -43
- package/dist/components/RenderPlugins/RenderPlugins.vue2.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -21
- package/dist/components/Section/CompactSection.vue.js +0 -7
- package/dist/components/Section/CompactSection.vue2.js +0 -60
- package/dist/components/Section/Section.vue.js +0 -7
- package/dist/components/Section/Section.vue2.js +0 -23
- package/dist/components/Section/SectionAccordion.vue.js +0 -7
- package/dist/components/Section/SectionAccordion.vue2.js +0 -76
- package/dist/components/Section/SectionColumn.vue.js +0 -14
- package/dist/components/Section/SectionColumns.vue.js +0 -14
- package/dist/components/Section/SectionContainer.vue.js +0 -7
- package/dist/components/Section/SectionContainer.vue2.js +0 -21
- package/dist/components/Section/SectionContainerAccordion.vue.js +0 -7
- package/dist/components/Section/SectionContainerAccordion.vue2.js +0 -54
- package/dist/components/Section/SectionContent.vue.js +0 -7
- package/dist/components/Section/SectionContent.vue2.js +0 -22
- package/dist/components/Section/SectionHeader.vue.js +0 -7
- package/dist/components/Section/SectionHeader.vue2.js +0 -26
- package/dist/components/Section/SectionHeaderTag.vue.js +0 -7
- package/dist/components/Section/SectionHeaderTag.vue2.js +0 -20
- package/dist/components/SectionFlare/SectionFlare.vue.js +0 -14
- package/dist/components/ShowMoreButton.vue.js +0 -7
- package/dist/components/ShowMoreButton.vue2.js +0 -23
- package/dist/consts/urls.js +0 -16
- package/dist/features/Operation/Operation.vue.js +0 -100
- package/dist/features/Operation/Operation.vue2.js +0 -4
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +0 -88
- package/dist/features/Operation/components/ContentTypeSelect.vue2.js +0 -4
- package/dist/features/Operation/components/Header.vue.js +0 -33
- package/dist/features/Operation/components/Header.vue2.js +0 -4
- package/dist/features/Operation/components/Headers.vue.js +0 -7
- package/dist/features/Operation/components/Headers.vue2.js +0 -71
- package/dist/features/Operation/components/OperationParameters.vue.js +0 -92
- package/dist/features/Operation/components/OperationParameters.vue2.js +0 -4
- package/dist/features/Operation/components/OperationResponses.vue.js +0 -44
- package/dist/features/Operation/components/OperationResponses.vue2.js +0 -4
- package/dist/features/Operation/components/ParameterList.vue.js +0 -50
- package/dist/features/Operation/components/ParameterList.vue2.js +0 -4
- package/dist/features/Operation/components/ParameterListItem.vue.js +0 -7
- package/dist/features/Operation/components/ParameterListItem.vue2.js +0 -163
- package/dist/features/Operation/components/RequestBody.vue.js +0 -7
- package/dist/features/Operation/components/RequestBody.vue2.js +0 -164
- package/dist/features/Operation/components/callbacks/Callback.vue.js +0 -7
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +0 -60
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +0 -63
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +0 -4
- package/dist/features/Operation/helpers/filter-selected-security.js +0 -28
- package/dist/features/Operation/helpers/get-first-server.js +0 -25
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +0 -7
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +0 -243
- package/dist/features/Operation/layouts/ModernLayout.vue.js +0 -7
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +0 -256
- package/dist/features/Search/components/SearchButton.vue.js +0 -88
- package/dist/features/Search/components/SearchButton.vue2.js +0 -4
- package/dist/features/Search/components/SearchModal.vue.js +0 -7
- package/dist/features/Search/components/SearchModal.vue2.js +0 -120
- package/dist/features/Search/components/SearchResult.vue.js +0 -84
- package/dist/features/Search/components/SearchResult.vue2.js +0 -4
- package/dist/features/Search/helpers/create-fuse-instance.js +0 -43
- package/dist/features/Search/helpers/create-search-index.js +0 -119
- package/dist/features/Search/hooks/useSearchIndex.js +0 -33
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +0 -7
- package/dist/features/ask-agent-button/AskAgentButton.vue2.js +0 -51
- package/dist/features/developer-tools/DeveloperTools.vue.js +0 -60
- package/dist/features/developer-tools/DeveloperTools.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +0 -13
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +0 -33
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +0 -138
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +0 -66
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +0 -54
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +0 -71
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +0 -63
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +0 -73
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue2.js +0 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +0 -57
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue2.js +0 -4
- package/dist/features/developer-tools/components/DeployApiReference.vue.js +0 -35
- package/dist/features/developer-tools/components/DeployApiReference.vue2.js +0 -4
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +0 -103
- package/dist/features/developer-tools/components/ModifyConfiguration.vue2.js +0 -4
- package/dist/features/developer-tools/components/ShareApiReference.vue.js +0 -35
- package/dist/features/developer-tools/components/ShareApiReference.vue2.js +0 -4
- package/dist/features/example-responses/ExampleResponse.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponse.vue2.js +0 -61
- package/dist/features/example-responses/ExampleResponseTab.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponseTab.vue2.js +0 -25
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponseTabList.vue2.js +0 -37
- package/dist/features/example-responses/ExampleResponses.vue.js +0 -7
- package/dist/features/example-responses/ExampleResponses.vue2.js +0 -181
- package/dist/features/example-responses/ExampleSchema.vue.js +0 -42
- package/dist/features/example-responses/ExampleSchema.vue2.js +0 -4
- package/dist/features/example-responses/has-response-content.js +0 -28
- package/dist/features/external-docs/ExternalDocs.vue.js +0 -42
- package/dist/features/external-docs/ExternalDocs.vue2.js +0 -4
- package/dist/features/info-object/Contact.vue.js +0 -46
- package/dist/features/info-object/Contact.vue2.js +0 -4
- package/dist/features/info-object/License.vue.js +0 -40
- package/dist/features/info-object/License.vue2.js +0 -4
- package/dist/features/info-object/TermsOfService.vue.js +0 -34
- package/dist/features/info-object/TermsOfService.vue2.js +0 -4
- package/dist/features/multiple-documents/DocumentSelector.vue.js +0 -54
- package/dist/features/multiple-documents/DocumentSelector.vue2.js +0 -4
- package/dist/features/specification-extension/SpecificationExtension.vue.js +0 -4
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +0 -52
- package/dist/features/specification-extension/helpers.js +0 -9
- package/dist/features/test-request-button/TestRequestButton.vue.js +0 -7
- package/dist/features/test-request-button/TestRequestButton.vue2.js +0 -46
- package/dist/features/x-badges/XBadges.vue.js +0 -35
- package/dist/features/x-badges/XBadges.vue2.js +0 -4
- package/dist/helpers/color-mode.js +0 -9
- package/dist/helpers/download.js +0 -45
- package/dist/helpers/id-routing.js +0 -109
- package/dist/helpers/lazy-bus.js +0 -195
- package/dist/helpers/load-from-perssistance.js +0 -17
- package/dist/helpers/map-config-plugins.js +0 -27
- package/dist/helpers/map-config-to-workspace-store.js +0 -45
- package/dist/helpers/normalize-configurations.js +0 -69
- package/dist/helpers/openapi.js +0 -135
- package/dist/helpers/storage.js +0 -47
- package/dist/helpers/upload-temp-document.js +0 -24
- package/dist/hooks/use-agent.js +0 -42
- package/dist/hooks/use-intersection.js +0 -32
- package/dist/plugins/hooks/usePluginManager.js +0 -14
- package/dist/plugins/persistance-plugin.js +0 -48
- package/dist/plugins/plugin-manager.js +0 -39
- package/dist/standalone/lib/html-api.js +0 -81
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/consts/urls.ts
|
|
2
|
+
/** Scalar registry base url */
|
|
3
|
+
var REGISTRY_URL = "https://registry.scalar.com";
|
|
4
|
+
/** Registry URL where shared documents can be accessed */
|
|
5
|
+
var REGISTRY_SHARE_URL = `${REGISTRY_URL}/share`;
|
|
6
|
+
/** Scalar proxy service */
|
|
7
|
+
var PROXY_URL = "https://proxy.scalar.com";
|
|
8
|
+
/** Scalar API base url */
|
|
9
|
+
var API_BASE_URL = "https://api.scalar.com";
|
|
10
|
+
/** API endpoint for uploading temporary documents */
|
|
11
|
+
var UPLOAD_TEMP_API_URL = `${API_BASE_URL}/core/share/upload/apis`;
|
|
12
|
+
var DASHBOARD_URL = "https://dashboard.scalar.com";
|
|
13
|
+
var DASHBOARD_REGISTER_URL = `${DASHBOARD_URL}/register`;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { REGISTRY_SHARE_URL as a, PROXY_URL as i, DASHBOARD_REGISTER_URL as n, REGISTRY_URL as o, DASHBOARD_URL as r, UPLOAD_TEMP_API_URL as s, API_BASE_URL as t };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=urls-gPTXGgbj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls-gPTXGgbj.js","names":[],"sources":["../src/consts/urls.ts"],"sourcesContent":["/** Scalar registry base url */\nexport const REGISTRY_URL = 'https://registry.scalar.com' as const\n\n/** Registry URL where shared documents can be accessed */\nexport const REGISTRY_SHARE_URL = `${REGISTRY_URL}/share` as const\n\n/** Scalar proxy service */\nexport const PROXY_URL = 'https://proxy.scalar.com' as const\n\n/** Scalar API base url */\nexport const API_BASE_URL = 'https://api.scalar.com'\n\n/** API endpoint for uploading temporary documents */\nexport const UPLOAD_TEMP_API_URL = `${API_BASE_URL}/core/share/upload/apis` as const\n\nexport const DASHBOARD_URL = 'https://dashboard.scalar.com' as const\nexport const DASHBOARD_REGISTER_URL = `${DASHBOARD_URL}/register` as const\n"],"mappings":";;AACA,IAAa,eAAe;;AAG5B,IAAa,qBAAqB,GAAG,aAAa;;AAGlD,IAAa,YAAY;;AAGzB,IAAa,eAAe;;AAG5B,IAAa,sBAAsB,GAAG,aAAa;AAEnD,IAAa,gBAAgB;AAC7B,IAAa,yBAAyB,GAAG,cAAc"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { computed, inject, ref } from "vue";
|
|
2
|
+
import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
|
|
3
|
+
//#region src/hooks/use-agent.ts
|
|
4
|
+
var AGENT_CONTEXT_SYMBOL = Symbol();
|
|
5
|
+
/**
|
|
6
|
+
* Module-level ref so useAgentContext() can resolve context even when inject fails
|
|
7
|
+
* (e.g. async component boundary or mount order). Set when ApiReference calls useAgent().
|
|
8
|
+
*/
|
|
9
|
+
var agentStateRef = ref(null);
|
|
10
|
+
/**
|
|
11
|
+
* Hook for agent visibility and enabled state.
|
|
12
|
+
* Call from the API Reference root (e.g. ApiReference.vue) with options to create the state, then provide it so descendants can inject it.
|
|
13
|
+
*
|
|
14
|
+
* Returns:
|
|
15
|
+
* - showAgent: whether the agent panel is visible
|
|
16
|
+
* - agentEnabled: whether the agent is enabled
|
|
17
|
+
* - openAgent, closeAgent, toggleAgent: imperative controls
|
|
18
|
+
*/
|
|
19
|
+
function useAgent(options) {
|
|
20
|
+
const showAgent = ref(false);
|
|
21
|
+
const prefilledMessage = ref("");
|
|
22
|
+
const agentEnabled = options.agentEnabled ?? computed(() => isLocalUrl(window.location.href));
|
|
23
|
+
const openAgent = (message) => {
|
|
24
|
+
prefilledMessage.value = message ?? "";
|
|
25
|
+
showAgent.value = true;
|
|
26
|
+
};
|
|
27
|
+
const closeAgent = () => {
|
|
28
|
+
showAgent.value = false;
|
|
29
|
+
prefilledMessage.value = "";
|
|
30
|
+
};
|
|
31
|
+
const toggleAgent = () => {
|
|
32
|
+
showAgent.value = !showAgent.value;
|
|
33
|
+
if (!showAgent.value) prefilledMessage.value = "";
|
|
34
|
+
};
|
|
35
|
+
const state = {
|
|
36
|
+
showAgent,
|
|
37
|
+
agentEnabled,
|
|
38
|
+
prefilledMessage,
|
|
39
|
+
openAgent,
|
|
40
|
+
closeAgent,
|
|
41
|
+
toggleAgent
|
|
42
|
+
};
|
|
43
|
+
agentStateRef.value = state;
|
|
44
|
+
return state;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Inject the agent context provided by ApiReference.
|
|
48
|
+
* Falls back to module-level state when inject is undefined (e.g. async boundary or mount order).
|
|
49
|
+
* Use in descendant components (e.g. AskAgentButton) to open the agent or check if it is enabled.
|
|
50
|
+
*
|
|
51
|
+
* Returns a computed ref; use v-if="agentContext?.agentEnabled" so the button only renders when context exists and agent is enabled.
|
|
52
|
+
*/
|
|
53
|
+
function useAgentContext() {
|
|
54
|
+
const injected = inject(AGENT_CONTEXT_SYMBOL, void 0);
|
|
55
|
+
return computed(() => injected ?? agentStateRef.value ?? void 0);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { useAgent as n, useAgentContext as r, AGENT_CONTEXT_SYMBOL as t };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=use-agent-Bnm1de0n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-agent-Bnm1de0n.js","names":[],"sources":["../src/hooks/use-agent.ts"],"sourcesContent":["import { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { ComputedRef, Ref } from 'vue'\nimport { type InjectionKey, computed, inject, ref } from 'vue'\n\ntype UseAgentOptions = {\n /** Optional. When provided, controls whether the agent UI is enabled (e.g. from doc config). Defaults to isLocalUrl. */\n agentEnabled?: ComputedRef<boolean>\n}\n\ntype UseAgentReturn = {\n showAgent: Ref<boolean>\n agentEnabled: ComputedRef<boolean>\n /** Ref used to pass a prefill message into the agent when opening. Cleared on close. */\n prefilledMessage: Ref<string>\n openAgent: (message?: string) => void\n closeAgent: () => void\n toggleAgent: () => void\n}\n\nexport const AGENT_CONTEXT_SYMBOL = Symbol() as InjectionKey<UseAgentReturn>\n\n/**\n * Module-level ref so useAgentContext() can resolve context even when inject fails\n * (e.g. async component boundary or mount order). Set when ApiReference calls useAgent().\n */\nconst agentStateRef: Ref<UseAgentReturn | null> = ref(null)\n\n/**\n * Hook for agent visibility and enabled state.\n * Call from the API Reference root (e.g. ApiReference.vue) with options to create the state, then provide it so descendants can inject it.\n *\n * Returns:\n * - showAgent: whether the agent panel is visible\n * - agentEnabled: whether the agent is enabled\n * - openAgent, closeAgent, toggleAgent: imperative controls\n */\nexport function useAgent(options: UseAgentOptions): UseAgentReturn {\n const showAgent = ref(false)\n const prefilledMessage = ref('')\n\n const agentEnabled = options.agentEnabled ?? computed(() => isLocalUrl(window.location.href))\n\n const openAgent = (message?: string) => {\n prefilledMessage.value = message ?? ''\n showAgent.value = true\n }\n\n const closeAgent = () => {\n showAgent.value = false\n prefilledMessage.value = ''\n }\n\n const toggleAgent = () => {\n showAgent.value = !showAgent.value\n if (!showAgent.value) {\n prefilledMessage.value = ''\n }\n }\n\n const state: UseAgentReturn = {\n showAgent,\n agentEnabled,\n prefilledMessage,\n openAgent,\n closeAgent,\n toggleAgent,\n }\n agentStateRef.value = state\n return state\n}\n\n/**\n * Inject the agent context provided by ApiReference.\n * Falls back to module-level state when inject is undefined (e.g. async boundary or mount order).\n * Use in descendant components (e.g. AskAgentButton) to open the agent or check if it is enabled.\n *\n * Returns a computed ref; use v-if=\"agentContext?.agentEnabled\" so the button only renders when context exists and agent is enabled.\n */\nexport function useAgentContext(): ComputedRef<UseAgentReturn | undefined> {\n const injected = inject(AGENT_CONTEXT_SYMBOL, undefined)\n return computed((): UseAgentReturn | undefined => injected ?? agentStateRef.value ?? undefined)\n}\n"],"mappings":";;;AAmBA,IAAa,uBAAuB,QAAQ;;;;;AAM5C,IAAM,gBAA4C,IAAI,KAAK;;;;;;;;;;AAW3D,SAAgB,SAAS,SAA0C;CACjE,MAAM,YAAY,IAAI,MAAM;CAC5B,MAAM,mBAAmB,IAAI,GAAG;CAEhC,MAAM,eAAe,QAAQ,gBAAgB,eAAe,WAAW,OAAO,SAAS,KAAK,CAAC;CAE7F,MAAM,aAAa,YAAqB;AACtC,mBAAiB,QAAQ,WAAW;AACpC,YAAU,QAAQ;;CAGpB,MAAM,mBAAmB;AACvB,YAAU,QAAQ;AAClB,mBAAiB,QAAQ;;CAG3B,MAAM,oBAAoB;AACxB,YAAU,QAAQ,CAAC,UAAU;AAC7B,MAAI,CAAC,UAAU,MACb,kBAAiB,QAAQ;;CAI7B,MAAM,QAAwB;EAC5B;EACA;EACA;EACA;EACA;EACA;EACD;AACD,eAAc,QAAQ;AACtB,QAAO;;;;;;;;;AAUT,SAAgB,kBAA2D;CACzE,MAAM,WAAW,OAAO,sBAAsB,KAAA,EAAU;AACxD,QAAO,eAA2C,YAAY,cAAc,SAAS,KAAA,EAAU"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { onMounted } from "vue";
|
|
2
|
+
import { useIntersectionObserver } from "@vueuse/core";
|
|
3
|
+
//#region src/hooks/use-intersection.ts
|
|
4
|
+
var useIntersection = (el, onIntersect) => {
|
|
5
|
+
const calculateRootMargin = (element) => {
|
|
6
|
+
const height = element.offsetHeight;
|
|
7
|
+
return `${height / 2}px 0px ${height / 2}px 0px`;
|
|
8
|
+
};
|
|
9
|
+
const calculateThreshold = (element) => {
|
|
10
|
+
return element.offsetHeight < window.innerHeight ? .8 : .5;
|
|
11
|
+
};
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
if (el.value) useIntersectionObserver(el, ([entry]) => {
|
|
14
|
+
if (entry?.isIntersecting) onIntersect();
|
|
15
|
+
}, {
|
|
16
|
+
rootMargin: calculateRootMargin(el.value),
|
|
17
|
+
threshold: calculateThreshold(el.value)
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { useIntersection as t };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=use-intersection-8QqPi2O-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-intersection-8QqPi2O-.js","names":[],"sources":["../src/hooks/use-intersection.ts"],"sourcesContent":["import { useIntersectionObserver } from '@vueuse/core'\nimport { type TemplateRef, onMounted } from 'vue'\n\nexport const useIntersection = (el: TemplateRef<HTMLElement | undefined>, onIntersect: () => void) => {\n const calculateRootMargin = (element: HTMLElement) => {\n const height = element.offsetHeight\n // Use of a margin on height to ensure sooner intersection detection.\n return `${height / 2}px 0px ${height / 2}px 0px`\n }\n\n const calculateThreshold = (element: HTMLElement) => {\n const height = element.offsetHeight\n // Favor larger threshold if the element is smaller that the screen\n // to ensure that it is selected\n return height < window.innerHeight ? 0.8 : 0.5\n }\n\n onMounted(() => {\n if (el.value) {\n const options = {\n rootMargin: calculateRootMargin(el.value),\n threshold: calculateThreshold(el.value),\n }\n\n useIntersectionObserver(\n el,\n ([entry]) => {\n if (entry?.isIntersecting) {\n onIntersect()\n }\n },\n options,\n )\n }\n })\n}\n"],"mappings":";;;AAGA,IAAa,mBAAmB,IAA0C,gBAA4B;CACpG,MAAM,uBAAuB,YAAyB;EACpD,MAAM,SAAS,QAAQ;AAEvB,SAAO,GAAG,SAAS,EAAE,SAAS,SAAS,EAAE;;CAG3C,MAAM,sBAAsB,YAAyB;AAInD,SAHe,QAAQ,eAGP,OAAO,cAAc,KAAM;;AAG7C,iBAAgB;AACd,MAAI,GAAG,MAML,yBACE,KACC,CAAC,WAAW;AACX,OAAI,OAAO,eACT,cAAa;KATH;GACd,YAAY,oBAAoB,GAAG,MAAM;GACzC,WAAW,mBAAmB,GAAG,MAAM;GACxC,CAUA;GAEH"}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.49.
|
|
23
|
+
"version": "1.49.1",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=22"
|
|
26
26
|
},
|
|
@@ -90,27 +90,27 @@
|
|
|
90
90
|
"microdiff": "^1.5.0",
|
|
91
91
|
"nanoid": "^5.1.6",
|
|
92
92
|
"vue": "^3.5.26",
|
|
93
|
-
"
|
|
94
|
-
"@scalar/
|
|
95
|
-
"@scalar/code-highlight": "0.3.
|
|
96
|
-
"@scalar/
|
|
97
|
-
"@scalar/
|
|
98
|
-
"@scalar/
|
|
99
|
-
"@scalar/
|
|
100
|
-
"@scalar/
|
|
101
|
-
"@scalar/
|
|
102
|
-
"@scalar/
|
|
103
|
-
"@scalar/
|
|
104
|
-
"@scalar/
|
|
105
|
-
"@scalar/
|
|
106
|
-
"@scalar/
|
|
107
|
-
"@scalar/
|
|
108
|
-
"@scalar/
|
|
93
|
+
"yaml": "^2.8.0",
|
|
94
|
+
"@scalar/api-client": "2.38.2",
|
|
95
|
+
"@scalar/code-highlight": "0.3.1",
|
|
96
|
+
"@scalar/agent-chat": "0.9.10",
|
|
97
|
+
"@scalar/components": "0.20.10",
|
|
98
|
+
"@scalar/helpers": "0.4.2",
|
|
99
|
+
"@scalar/oas-utils": "0.10.9",
|
|
100
|
+
"@scalar/snippetz": "0.7.5",
|
|
101
|
+
"@scalar/icons": "0.6.1",
|
|
102
|
+
"@scalar/openapi-types": "0.6.1",
|
|
103
|
+
"@scalar/themes": "0.15.1",
|
|
104
|
+
"@scalar/sidebar": "0.8.10",
|
|
105
|
+
"@scalar/use-hooks": "0.4.1",
|
|
106
|
+
"@scalar/types": "0.7.4",
|
|
107
|
+
"@scalar/use-toasts": "0.10.1",
|
|
108
|
+
"@scalar/workspace-store": "0.40.3"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@hono/node-server": "^1.19.7",
|
|
112
112
|
"@playwright/test": "1.56.0",
|
|
113
|
-
"@tailwindcss/vite": "^4.
|
|
113
|
+
"@tailwindcss/vite": "^4.2.0",
|
|
114
114
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
115
115
|
"@vue/server-renderer": "^3.5.26",
|
|
116
116
|
"@vue/test-utils": "2.4.6",
|
|
@@ -119,17 +119,16 @@
|
|
|
119
119
|
"react": "^19.2.3",
|
|
120
120
|
"rollup-plugin-webpack-stats": "^0.2.5",
|
|
121
121
|
"tailwindcss": "^4.1.18",
|
|
122
|
-
"vite": "
|
|
122
|
+
"vite": "8.0.0",
|
|
123
123
|
"vite-plugin-banner": "^0.8.1",
|
|
124
124
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
125
|
-
"vitest": "4.0
|
|
126
|
-
"@scalar/
|
|
127
|
-
"@scalar/
|
|
128
|
-
"@scalar/core": "0.4.
|
|
129
|
-
"@scalar/galaxy": "0.6.0"
|
|
125
|
+
"vitest": "4.1.0",
|
|
126
|
+
"@scalar/react-renderer": "0.4.1",
|
|
127
|
+
"@scalar/galaxy": "0.6.1",
|
|
128
|
+
"@scalar/core": "0.4.4"
|
|
130
129
|
},
|
|
131
130
|
"scripts": {
|
|
132
|
-
"build": "pnpm build:default && pnpm build:standalone &&
|
|
131
|
+
"build": "pnpm build:default && pnpm build:standalone && vue-tsc -p tsconfig.build.json",
|
|
133
132
|
"build:default": "vite build",
|
|
134
133
|
"build:standalone": "vite build -c vite.standalone.config.ts",
|
|
135
134
|
"dev": "vite",
|
|
@@ -147,7 +146,6 @@
|
|
|
147
146
|
"test:e2e:cdn:ci": "TEST_MODE=CDN playwright test",
|
|
148
147
|
"test:e2e:ci": "playwright test",
|
|
149
148
|
"test:e2e:update-snapshots": "pnpm test:e2e --update-snapshots",
|
|
150
|
-
"types:
|
|
151
|
-
"types:check": "scalar-types-check-vue"
|
|
149
|
+
"types:check": "vue-tsc --noEmit"
|
|
152
150
|
}
|
|
153
151
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./ClientDropdown.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ClientDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6a49c111"]]);
|
|
5
|
-
export {
|
|
6
|
-
ClientDropdown as default
|
|
7
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, createElementBlock, openBlock, createVNode, Fragment, renderList, createBlock, unref, normalizeClass, withCtx, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { Tab } from "@headlessui/vue";
|
|
3
|
-
import { findClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
-
import { ScalarIcon, ScalarCombobox } from "@scalar/components";
|
|
5
|
-
import { freezeElement } from "@scalar/helpers/dom/freeze-element";
|
|
6
|
-
import { isFeaturedClient } from "../helpers/featured-clients.js";
|
|
7
|
-
const _hoisted_1 = { class: "client-libraries-text" };
|
|
8
|
-
const _hoisted_2 = {
|
|
9
|
-
"aria-hidden": "true",
|
|
10
|
-
class: "client-libraries-icon__more"
|
|
11
|
-
};
|
|
12
|
-
const _hoisted_3 = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "client-libraries-icon",
|
|
15
|
-
height: "50",
|
|
16
|
-
role: "presentation",
|
|
17
|
-
viewBox: "0 0 50 50",
|
|
18
|
-
width: "50",
|
|
19
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
20
|
-
};
|
|
21
|
-
const _hoisted_4 = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "client-libraries-text client-libraries-text-more"
|
|
24
|
-
};
|
|
25
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
-
__name: "ClientDropdown",
|
|
27
|
-
props: {
|
|
28
|
-
clientOptions: {},
|
|
29
|
-
selectedClient: {},
|
|
30
|
-
featuredClients: {},
|
|
31
|
-
eventBus: {}
|
|
32
|
-
},
|
|
33
|
-
setup(__props) {
|
|
34
|
-
const containerRef = ref();
|
|
35
|
-
const getIconByLanguageKey = (targetKey) => `programming-language-${targetKey === "js" ? "javascript" : targetKey}`;
|
|
36
|
-
const selectClient = (option) => {
|
|
37
|
-
if (!containerRef.value) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const unfreeze = freezeElement(containerRef.value);
|
|
41
|
-
setTimeout(() => {
|
|
42
|
-
unfreeze();
|
|
43
|
-
}, 300);
|
|
44
|
-
if (option.clientKey !== "custom") {
|
|
45
|
-
__props.eventBus.emit("workspace:update:selected-client", option.id);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const selectedTargetKey = computed(
|
|
49
|
-
() => __props.selectedClient?.split("/")[0]
|
|
50
|
-
);
|
|
51
|
-
return (_ctx, _cache) => {
|
|
52
|
-
return openBlock(), createElementBlock("div", {
|
|
53
|
-
ref_key: "containerRef",
|
|
54
|
-
ref: containerRef,
|
|
55
|
-
class: "client-libraries-content"
|
|
56
|
-
}, [
|
|
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", {
|
|
61
|
-
"client-libraries__active": featuredClient.id === __props.selectedClient
|
|
62
|
-
}])
|
|
63
|
-
}, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
createElementVNode("div", {
|
|
66
|
-
class: normalizeClass(`client-libraries-icon__${featuredClient.targetKey}`)
|
|
67
|
-
}, [
|
|
68
|
-
createVNode(unref(ScalarIcon), {
|
|
69
|
-
class: "client-libraries-icon",
|
|
70
|
-
icon: getIconByLanguageKey(featuredClient.targetKey)
|
|
71
|
-
}, null, 8, ["icon"])
|
|
72
|
-
], 2),
|
|
73
|
-
createElementVNode("span", _hoisted_1, toDisplayString(featuredClient.targetTitle), 1)
|
|
74
|
-
]),
|
|
75
|
-
_: 2
|
|
76
|
-
}, 1032, ["class"]);
|
|
77
|
-
}), 128)),
|
|
78
|
-
createVNode(unref(ScalarCombobox), {
|
|
79
|
-
modelValue: unref(findClient)(__props.clientOptions, __props.selectedClient),
|
|
80
|
-
options: __props.clientOptions,
|
|
81
|
-
placement: "bottom-end",
|
|
82
|
-
teleport: "",
|
|
83
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectClient($event))
|
|
84
|
-
}, {
|
|
85
|
-
default: withCtx(() => [
|
|
86
|
-
createElementVNode("button", {
|
|
87
|
-
class: normalizeClass(["client-libraries client-libraries__select", {
|
|
88
|
-
"client-libraries__active": __props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient)
|
|
89
|
-
}]),
|
|
90
|
-
type: "button"
|
|
91
|
-
}, [
|
|
92
|
-
createElementVNode("div", _hoisted_2, [
|
|
93
|
-
__props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(), createElementBlock("div", {
|
|
94
|
-
key: 0,
|
|
95
|
-
class: normalizeClass(`client-libraries-icon__${selectedTargetKey.value}`)
|
|
96
|
-
}, [
|
|
97
|
-
selectedTargetKey.value ? (openBlock(), createBlock(unref(ScalarIcon), {
|
|
98
|
-
key: 0,
|
|
99
|
-
class: "client-libraries-icon",
|
|
100
|
-
icon: getIconByLanguageKey(selectedTargetKey.value)
|
|
101
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
102
|
-
], 2)) : (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[1] || (_cache[1] = [
|
|
103
|
-
createElementVNode("g", {
|
|
104
|
-
fill: "currentColor",
|
|
105
|
-
"fill-rule": "nonzero"
|
|
106
|
-
}, [
|
|
107
|
-
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" })
|
|
108
|
-
], -1)
|
|
109
|
-
])]))
|
|
110
|
-
]),
|
|
111
|
-
__props.clientOptions.length ? (openBlock(), createElementBlock("span", _hoisted_4, " More ")) : createCommentVNode("", true),
|
|
112
|
-
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Select from all clients", -1))
|
|
113
|
-
], 2)
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["modelValue", "options"])
|
|
117
|
-
], 512);
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
export {
|
|
122
|
-
_sfc_main as default
|
|
123
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./ClientSelector.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ClientSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd2e9b07"]]);
|
|
5
|
-
export {
|
|
6
|
-
ClientSelector as default
|
|
7
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useId, computed, useTemplateRef, createElementBlock, createCommentVNode, openBlock, createVNode, unref, withCtx, createElementVNode, Fragment, normalizeClass, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { TabGroup, TabList, TabPanels, TabPanel } from "@headlessui/vue";
|
|
3
|
-
import { DEFAULT_CLIENT } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
-
import { ScalarMarkdown, ScalarCodeBlock } from "@scalar/components";
|
|
5
|
-
import { getFeaturedClients, isFeaturedClient } from "../helpers/featured-clients.js";
|
|
6
|
-
import ClientDropdown from "./ClientDropdown.vue.js";
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
ref: "wrapper-ref"
|
|
10
|
-
};
|
|
11
|
-
const _hoisted_2 = ["id"];
|
|
12
|
-
const _hoisted_3 = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "selected-client card-footer border-t-0 p-0",
|
|
15
|
-
role: "tabpanel",
|
|
16
|
-
tabindex: "1"
|
|
17
|
-
};
|
|
18
|
-
const _hoisted_4 = ["id"];
|
|
19
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
-
__name: "ClientSelector",
|
|
21
|
-
props: {
|
|
22
|
-
xScalarSdkInstallation: {},
|
|
23
|
-
clientOptions: {},
|
|
24
|
-
selectedClient: { default: () => DEFAULT_CLIENT },
|
|
25
|
-
eventBus: {}
|
|
26
|
-
},
|
|
27
|
-
setup(__props, { expose: __expose }) {
|
|
28
|
-
const headingId = useId();
|
|
29
|
-
const morePanel = useId();
|
|
30
|
-
const selectedClientOption = computed(
|
|
31
|
-
() => __props.clientOptions.flatMap(
|
|
32
|
-
(optionGroup) => optionGroup.options.find((option) => option.id === __props.selectedClient) ?? []
|
|
33
|
-
)[0]
|
|
34
|
-
);
|
|
35
|
-
const featuredClients = computed(() => getFeaturedClients(__props.clientOptions));
|
|
36
|
-
const tabIndex = computed(
|
|
37
|
-
() => featuredClients.value.findIndex(
|
|
38
|
-
(featuredClient) => __props.selectedClient === featuredClient.id
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
const wrapper = useTemplateRef("wrapper-ref");
|
|
42
|
-
const onTabSelect = (i) => {
|
|
43
|
-
const client = featuredClients.value[i];
|
|
44
|
-
if (!client || !wrapper.value) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
__props.eventBus.emit("workspace:update:selected-client", client.id);
|
|
48
|
-
};
|
|
49
|
-
const installationInstructions = computed(() => {
|
|
50
|
-
if (!Array.isArray(__props.xScalarSdkInstallation) || !__props.xScalarSdkInstallation?.length) {
|
|
51
|
-
return void 0;
|
|
52
|
-
}
|
|
53
|
-
const instruction = __props.xScalarSdkInstallation.find((instruction2) => {
|
|
54
|
-
const targetKey = __props.selectedClient?.split("/")[0]?.toLowerCase();
|
|
55
|
-
return instruction2.lang.toLowerCase() === targetKey;
|
|
56
|
-
});
|
|
57
|
-
if (!instruction) {
|
|
58
|
-
return void 0;
|
|
59
|
-
}
|
|
60
|
-
return instruction;
|
|
61
|
-
});
|
|
62
|
-
__expose({
|
|
63
|
-
selectedClientOption
|
|
64
|
-
});
|
|
65
|
-
return (_ctx, _cache) => {
|
|
66
|
-
return __props.clientOptions.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
67
|
-
createVNode(unref(TabGroup), {
|
|
68
|
-
manual: "",
|
|
69
|
-
selectedIndex: tabIndex.value,
|
|
70
|
-
onChange: onTabSelect
|
|
71
|
-
}, {
|
|
72
|
-
default: withCtx(() => [
|
|
73
|
-
createElementVNode("div", {
|
|
74
|
-
id: unref(headingId),
|
|
75
|
-
class: "client-libraries-heading"
|
|
76
|
-
}, " Client Libraries ", 8, _hoisted_2),
|
|
77
|
-
createVNode(unref(TabList), {
|
|
78
|
-
"aria-labelledby": unref(headingId),
|
|
79
|
-
class: "client-libraries-list"
|
|
80
|
-
}, {
|
|
81
|
-
default: withCtx(() => [
|
|
82
|
-
createVNode(ClientDropdown, {
|
|
83
|
-
clientOptions: __props.clientOptions,
|
|
84
|
-
eventBus: __props.eventBus,
|
|
85
|
-
featuredClients: featuredClients.value,
|
|
86
|
-
morePanel: unref(morePanel),
|
|
87
|
-
selectedClient: __props.selectedClient
|
|
88
|
-
}, null, 8, ["clientOptions", "eventBus", "featuredClients", "morePanel", "selectedClient"])
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["aria-labelledby"]),
|
|
92
|
-
createVNode(unref(TabPanels), null, {
|
|
93
|
-
default: withCtx(() => [
|
|
94
|
-
installationInstructions.value?.source || installationInstructions.value?.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
95
|
-
installationInstructions.value.description ? (openBlock(), createElementBlock("div", {
|
|
96
|
-
key: 0,
|
|
97
|
-
class: normalizeClass(["selected-client card-footer -outline-offset-2", installationInstructions.value.source && "rounded-b-none"]),
|
|
98
|
-
role: "tabpanel",
|
|
99
|
-
tabindex: "0"
|
|
100
|
-
}, [
|
|
101
|
-
createVNode(unref(ScalarMarkdown), {
|
|
102
|
-
value: installationInstructions.value.description
|
|
103
|
-
}, null, 8, ["value"])
|
|
104
|
-
], 2)) : createCommentVNode("", true),
|
|
105
|
-
installationInstructions.value.source ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
106
|
-
createVNode(unref(ScalarCodeBlock), {
|
|
107
|
-
class: "rounded-b-lg *:first:p-3",
|
|
108
|
-
content: installationInstructions.value.source,
|
|
109
|
-
copy: "always",
|
|
110
|
-
lang: "shell"
|
|
111
|
-
}, null, 8, ["content"])
|
|
112
|
-
])) : createCommentVNode("", true)
|
|
113
|
-
], 64)) : unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(featuredClients.value, (client) => {
|
|
114
|
-
return openBlock(), createBlock(unref(TabPanel), {
|
|
115
|
-
key: client.id,
|
|
116
|
-
class: "selected-client card-footer -outline-offset-2"
|
|
117
|
-
}, {
|
|
118
|
-
default: withCtx(() => [
|
|
119
|
-
createTextVNode(toDisplayString(client.title), 1)
|
|
120
|
-
]),
|
|
121
|
-
_: 2
|
|
122
|
-
}, 1024);
|
|
123
|
-
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
124
|
-
key: 2,
|
|
125
|
-
id: unref(morePanel),
|
|
126
|
-
class: "selected-client card-footer -outline-offset-2",
|
|
127
|
-
role: "tabpanel",
|
|
128
|
-
tabindex: "0"
|
|
129
|
-
}, toDisplayString(selectedClientOption.value?.title), 9, _hoisted_4))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
})
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
}, 8, ["selectedIndex"])
|
|
136
|
-
], 512)) : createCommentVNode("", true);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
export {
|
|
141
|
-
_sfc_main as default
|
|
142
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const FEATURED_CLIENTS = [
|
|
2
|
-
"shell/curl",
|
|
3
|
-
"ruby/native",
|
|
4
|
-
"node/undici",
|
|
5
|
-
"php/guzzle",
|
|
6
|
-
"python/python3"
|
|
7
|
-
];
|
|
8
|
-
const isFeaturedClient = (clientId, featuredClients = FEATURED_CLIENTS) => Boolean(clientId && featuredClients.includes(clientId));
|
|
9
|
-
const getFeaturedClients = (clientOptions, featuredClients = FEATURED_CLIENTS) => {
|
|
10
|
-
const clientMap = /* @__PURE__ */ new Map();
|
|
11
|
-
for (const group of clientOptions) {
|
|
12
|
-
for (const option of group.options) {
|
|
13
|
-
clientMap.set(option.id, option);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return featuredClients.flatMap((clientId) => {
|
|
17
|
-
const client = clientMap.get(clientId);
|
|
18
|
-
return client ?? [];
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
getFeaturedClients,
|
|
23
|
-
isFeaturedClient
|
|
24
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./DownloadLink.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const DownloadLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-95e980e1"]]);
|
|
5
|
-
export {
|
|
6
|
-
DownloadLink as default
|
|
7
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, createElementVNode, withModifiers, createVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import Badge from "../../../components/Badge/Badge.vue.js";
|
|
3
|
-
const _hoisted_1 = ["href"];
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "DownloadLink",
|
|
6
|
-
props: {
|
|
7
|
-
documentDownloadType: {},
|
|
8
|
-
eventBus: {},
|
|
9
|
-
documentUrl: {}
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
const handleDownloadClick = (format) => {
|
|
13
|
-
__props.eventBus.emit("ui:download:document", { format });
|
|
14
|
-
};
|
|
15
|
-
return (_ctx, _cache) => {
|
|
16
|
-
return ["yaml", "json", "both"].includes(__props.documentDownloadType) || __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("div", {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: normalizeClass(["download-container group", {
|
|
19
|
-
"download-both": __props.documentDownloadType === "both"
|
|
20
|
-
}])
|
|
21
|
-
}, [
|
|
22
|
-
__props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("a", {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "download-link download-button",
|
|
25
|
-
href: __props.documentUrl
|
|
26
|
-
}, [..._cache[2] || (_cache[2] = [
|
|
27
|
-
createElementVNode("span", null, " Download OpenAPI Document ", -1)
|
|
28
|
-
])], 8, _hoisted_1)) : createCommentVNode("", true),
|
|
29
|
-
__props.documentDownloadType === "json" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
|
|
30
|
-
key: 1,
|
|
31
|
-
class: "download-button",
|
|
32
|
-
type: "button",
|
|
33
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => handleDownloadClick("json"), ["prevent"]))
|
|
34
|
-
}, [
|
|
35
|
-
_cache[4] || (_cache[4] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
|
|
36
|
-
createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
|
|
37
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
38
|
-
createTextVNode("json", -1)
|
|
39
|
-
])]),
|
|
40
|
-
_: 1
|
|
41
|
-
})
|
|
42
|
-
])) : createCommentVNode("", true),
|
|
43
|
-
__props.documentDownloadType === "yaml" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
|
|
44
|
-
key: 2,
|
|
45
|
-
class: "download-button",
|
|
46
|
-
type: "button",
|
|
47
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(() => handleDownloadClick("yaml"), ["prevent"]))
|
|
48
|
-
}, [
|
|
49
|
-
_cache[6] || (_cache[6] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
|
|
50
|
-
createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
|
|
51
|
-
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
52
|
-
createTextVNode("yaml", -1)
|
|
53
|
-
])]),
|
|
54
|
-
_: 1
|
|
55
|
-
})
|
|
56
|
-
])) : createCommentVNode("", true)
|
|
57
|
-
], 2)) : createCommentVNode("", true);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
_sfc_main as default
|
|
63
|
-
};
|