@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
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, createBlock, openBlock, unref, withCtx, createElementVNode, createVNode, withKeys, withModifiers, isRef, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { ScalarModal, ScalarSearchInput, ScalarSearchResultList } from "@scalar/components";
|
|
3
|
-
import { nanoid } from "nanoid";
|
|
4
|
-
import { useSearchIndex } from "../hooks/useSearchIndex.js";
|
|
5
|
-
import _sfc_main$1 from "./SearchResult.vue.js";
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
class: "mb-0 flex flex-col",
|
|
8
|
-
role: "search"
|
|
9
|
-
};
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "SearchModal",
|
|
12
|
-
props: {
|
|
13
|
-
modalState: {},
|
|
14
|
-
document: {},
|
|
15
|
-
eventBus: {}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const id = nanoid();
|
|
20
|
-
const listboxId = `${id}-search-result`;
|
|
21
|
-
const instructionsId = `${id}-search-instructions`;
|
|
22
|
-
const { query, results } = useSearchIndex(() => props.document);
|
|
23
|
-
const selectedIndex = ref(void 0);
|
|
24
|
-
watch(
|
|
25
|
-
() => props.modalState.open,
|
|
26
|
-
(open) => {
|
|
27
|
-
if (open) {
|
|
28
|
-
query.value = "";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
const navigateSearchResults = (direction) => {
|
|
33
|
-
const offset = direction === "up" ? -1 : 1;
|
|
34
|
-
const length = results.value.length;
|
|
35
|
-
if (typeof selectedIndex.value === "number") {
|
|
36
|
-
selectedIndex.value = (selectedIndex.value + offset + length) % length;
|
|
37
|
-
} else {
|
|
38
|
-
selectedIndex.value = offset === -1 ? length - 1 : 0;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
function handleSelect(idx) {
|
|
42
|
-
if (typeof idx !== "number" || !results.value[idx]) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const result = results.value[idx];
|
|
46
|
-
props.modalState.hide();
|
|
47
|
-
props.eventBus.emit("scroll-to:nav-item", { id: result.item.id });
|
|
48
|
-
}
|
|
49
|
-
const activeDescendantId = computed(() => {
|
|
50
|
-
const selectedResult = results.value[selectedIndex.value ?? -1];
|
|
51
|
-
return selectedResult ? `search-result-${selectedResult.item.id}` : void 0;
|
|
52
|
-
});
|
|
53
|
-
return (_ctx, _cache) => {
|
|
54
|
-
return openBlock(), createBlock(unref(ScalarModal), {
|
|
55
|
-
"aria-label": "Reference Search",
|
|
56
|
-
state: __props.modalState,
|
|
57
|
-
variant: "search"
|
|
58
|
-
}, {
|
|
59
|
-
default: withCtx(() => [
|
|
60
|
-
createElementVNode("div", _hoisted_1, [
|
|
61
|
-
createVNode(unref(ScalarSearchInput), {
|
|
62
|
-
modelValue: unref(query),
|
|
63
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(query) ? query.value = $event : null),
|
|
64
|
-
"aria-activedescendant": activeDescendantId.value,
|
|
65
|
-
"aria-autocomplete": "list",
|
|
66
|
-
"aria-controls": listboxId,
|
|
67
|
-
"aria-describedby": instructionsId,
|
|
68
|
-
role: "combobox",
|
|
69
|
-
onBlur: _cache[1] || (_cache[1] = ($event) => selectedIndex.value = void 0),
|
|
70
|
-
onKeydown: [
|
|
71
|
-
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => navigateSearchResults("down"), ["stop", "prevent"]), ["down"])),
|
|
72
|
-
_cache[3] || (_cache[3] = withKeys(withModifiers(() => handleSelect(selectedIndex.value), ["stop", "prevent"]), ["enter"])),
|
|
73
|
-
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => navigateSearchResults("up"), ["stop", "prevent"]), ["up"]))
|
|
74
|
-
]
|
|
75
|
-
}, null, 8, ["modelValue", "aria-activedescendant"])
|
|
76
|
-
]),
|
|
77
|
-
createVNode(unref(ScalarSearchResultList), {
|
|
78
|
-
id: listboxId,
|
|
79
|
-
"aria-label": "Reference Search Results",
|
|
80
|
-
class: "custom-scroll p-1 pt-0",
|
|
81
|
-
noResults: !unref(results).length
|
|
82
|
-
}, {
|
|
83
|
-
query: withCtx(() => [
|
|
84
|
-
createTextVNode(toDisplayString(unref(query)), 1)
|
|
85
|
-
]),
|
|
86
|
-
default: withCtx(() => [
|
|
87
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(results), (result, idx) => {
|
|
88
|
-
return openBlock(), createBlock(_sfc_main$1, {
|
|
89
|
-
id: `search-result-${result.item.id}`,
|
|
90
|
-
key: result.refIndex,
|
|
91
|
-
isSelected: selectedIndex.value === idx,
|
|
92
|
-
result,
|
|
93
|
-
onClick: withModifiers(() => handleSelect(idx), ["prevent"])
|
|
94
|
-
}, null, 8, ["id", "isSelected", "result", "onClick"]);
|
|
95
|
-
}), 128))
|
|
96
|
-
]),
|
|
97
|
-
_: 1
|
|
98
|
-
}, 8, ["noResults"]),
|
|
99
|
-
createElementVNode("div", {
|
|
100
|
-
id: instructionsId,
|
|
101
|
-
class: "ref-search-meta"
|
|
102
|
-
}, [..._cache[5] || (_cache[5] = [
|
|
103
|
-
createElementVNode("span", {
|
|
104
|
-
"aria-hidden": "true",
|
|
105
|
-
class: "contents"
|
|
106
|
-
}, [
|
|
107
|
-
createElementVNode("span", null, "↑↓ Navigate"),
|
|
108
|
-
createElementVNode("span", null, "⏎ Select")
|
|
109
|
-
], -1),
|
|
110
|
-
createElementVNode("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)
|
|
111
|
-
])])
|
|
112
|
-
]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["state"]);
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
export {
|
|
119
|
-
_sfc_main as default
|
|
120
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createBlock, openBlock, unref, createSlots, withCtx, createElementVNode, normalizeClass, createTextVNode, createElementBlock, createCommentVNode, toDisplayString, Fragment, createVNode } from "vue";
|
|
2
|
-
import { ScalarSearchResultItem } from "@scalar/components";
|
|
3
|
-
import { ScalarIconTerminalWindow, ScalarIconTag, ScalarIconBracketsCurly, ScalarIconTextAlignLeft } from "@scalar/icons";
|
|
4
|
-
import { HttpMethod } from "@scalar/sidebar";
|
|
5
|
-
const _hoisted_1 = { class: "sr-only" };
|
|
6
|
-
const _hoisted_2 = { class: "inline-flex items-center gap-1" };
|
|
7
|
-
const _hoisted_3 = { class: "sr-only" };
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "SearchResult",
|
|
10
|
-
props: {
|
|
11
|
-
id: {},
|
|
12
|
-
isSelected: { type: Boolean },
|
|
13
|
-
result: {}
|
|
14
|
-
},
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const ENTRY_ICONS = {
|
|
17
|
-
heading: ScalarIconTextAlignLeft,
|
|
18
|
-
model: ScalarIconBracketsCurly,
|
|
19
|
-
operation: ScalarIconTerminalWindow,
|
|
20
|
-
tag: ScalarIconTag,
|
|
21
|
-
webhook: ScalarIconTerminalWindow
|
|
22
|
-
};
|
|
23
|
-
const ENTRY_LABELS = {
|
|
24
|
-
heading: "Heading",
|
|
25
|
-
operation: "Operation",
|
|
26
|
-
tag: "Tag",
|
|
27
|
-
model: "Model",
|
|
28
|
-
webhook: "Webhook"
|
|
29
|
-
};
|
|
30
|
-
return (_ctx, _cache) => {
|
|
31
|
-
return openBlock(), createBlock(unref(ScalarSearchResultItem), {
|
|
32
|
-
id: __props.id,
|
|
33
|
-
icon: ENTRY_ICONS[__props.result.item.type],
|
|
34
|
-
selected: __props.isSelected
|
|
35
|
-
}, createSlots({
|
|
36
|
-
default: withCtx(() => [
|
|
37
|
-
createElementVNode("span", {
|
|
38
|
-
class: normalizeClass({
|
|
39
|
-
"text-decoration-line": __props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated
|
|
40
|
-
})
|
|
41
|
-
}, [
|
|
42
|
-
createElementVNode("span", _hoisted_1, [
|
|
43
|
-
createTextVNode(toDisplayString(ENTRY_LABELS[__props.result.item.type]) + ": ", 1),
|
|
44
|
-
__props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
45
|
-
createTextVNode(" (Deprecated) ")
|
|
46
|
-
], 64)) : createCommentVNode("", true)
|
|
47
|
-
]),
|
|
48
|
-
createTextVNode(" " + toDisplayString(__props.result.item.title) + " ", 1),
|
|
49
|
-
_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, ",", -1))
|
|
50
|
-
], 2)
|
|
51
|
-
]),
|
|
52
|
-
_: 2
|
|
53
|
-
}, [
|
|
54
|
-
__props.result.item.type !== "webhook" && (__props.result.item.method || __props.result.item.path) && __props.result.item.path !== __props.result.item.title ? {
|
|
55
|
-
name: "description",
|
|
56
|
-
fn: withCtx(() => [
|
|
57
|
-
createElementVNode("span", _hoisted_2, [
|
|
58
|
-
__props.result.item.type === "operation" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
59
|
-
createVNode(unref(HttpMethod), {
|
|
60
|
-
"aria-hidden": "true",
|
|
61
|
-
method: __props.result.item.method ?? "get"
|
|
62
|
-
}, null, 8, ["method"]),
|
|
63
|
-
createElementVNode("span", _hoisted_3, " HTTP Method: " + toDisplayString(__props.result.item.method ?? "get"), 1)
|
|
64
|
-
], 64)) : createCommentVNode("", true),
|
|
65
|
-
_cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Path: ", -1)),
|
|
66
|
-
createTextVNode(" " + toDisplayString(__props.result.item.path), 1)
|
|
67
|
-
])
|
|
68
|
-
]),
|
|
69
|
-
key: "0"
|
|
70
|
-
} : __props.result.item.description ? {
|
|
71
|
-
name: "description",
|
|
72
|
-
fn: withCtx(() => [
|
|
73
|
-
_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Description: ", -1)),
|
|
74
|
-
createTextVNode(" " + toDisplayString(__props.result.item.description), 1)
|
|
75
|
-
]),
|
|
76
|
-
key: "1"
|
|
77
|
-
} : void 0
|
|
78
|
-
]), 1032, ["id", "icon", "selected"]);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
export {
|
|
83
|
-
_sfc_main as default
|
|
84
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import Fuse from "fuse.js";
|
|
2
|
-
function createFuseInstance() {
|
|
3
|
-
return new Fuse([], {
|
|
4
|
-
// Define searchable fields with weights to prioritize more important matches
|
|
5
|
-
keys: [
|
|
6
|
-
// Highest weight - titles are most descriptive
|
|
7
|
-
{ name: "title", weight: 0.7 },
|
|
8
|
-
// Medium weight - helpful but often verbose
|
|
9
|
-
{ name: "description", weight: 0.3 },
|
|
10
|
-
// Lowest weight - can be very long and noisy
|
|
11
|
-
{ name: "body", weight: 0.2 },
|
|
12
|
-
// High weight - unique identifiers for operations
|
|
13
|
-
{ name: "operationId", weight: 0.6 },
|
|
14
|
-
// Good weight - endpoint paths are searchable
|
|
15
|
-
{ name: "path", weight: 0.5 },
|
|
16
|
-
// Medium-high weight - helps with categorization
|
|
17
|
-
{ name: "tag", weight: 0.4 },
|
|
18
|
-
// Medium weight - useful for filtering by method
|
|
19
|
-
{ name: "method", weight: 0.3 }
|
|
20
|
-
],
|
|
21
|
-
// Threshold controls how strict the matching is (0.0 = perfect match, 1.0 = very loose)
|
|
22
|
-
// 0.3 allows for some typos and partial matches while maintaining relevance
|
|
23
|
-
threshold: 0.3,
|
|
24
|
-
// Maximum distance between characters that can be matched
|
|
25
|
-
// Higher values allow matches even when characters are far apart in long text
|
|
26
|
-
distance: 100,
|
|
27
|
-
// Include the match score in results for debugging and potential UI enhancements
|
|
28
|
-
includeScore: true,
|
|
29
|
-
// Include detailed match information showing which parts of the text matched
|
|
30
|
-
includeMatches: true,
|
|
31
|
-
// Don't require matches to be at the beginning of strings
|
|
32
|
-
// Makes search more flexible and user-friendly
|
|
33
|
-
ignoreLocation: true,
|
|
34
|
-
// Enable advanced search syntax like 'exact' for exact matches or !exclude for exclusions
|
|
35
|
-
useExtendedSearch: true,
|
|
36
|
-
// Find all possible matches in each item, not just the first one
|
|
37
|
-
// Ensures comprehensive search results
|
|
38
|
-
findAllMatches: true
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
createFuseInstance
|
|
43
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
-
import { extractRequestBody, createParameterMap } from "../../../helpers/openapi.js";
|
|
3
|
-
function createSearchIndex(document) {
|
|
4
|
-
const index = [];
|
|
5
|
-
function processEntries(entriesToProcess) {
|
|
6
|
-
entriesToProcess.forEach((entry) => {
|
|
7
|
-
addEntryToIndex(entry, index, document);
|
|
8
|
-
if ("children" in entry && entry.children) {
|
|
9
|
-
processEntries(entry.children);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
processEntries(document?.["x-scalar-navigation"]?.children ?? []);
|
|
14
|
-
return index;
|
|
15
|
-
}
|
|
16
|
-
function addEntryToIndex(entry, index, document) {
|
|
17
|
-
if (entry.type === "operation") {
|
|
18
|
-
const operation = getResolvedRef(document?.paths?.[entry.path]?.[entry.method]) ?? {};
|
|
19
|
-
const requestBodyOrParameterMap = extractRequestBody(operation) || createParameterMap(operation);
|
|
20
|
-
const body = typeof requestBodyOrParameterMap !== "boolean" ? requestBodyOrParameterMap : null;
|
|
21
|
-
index.push({
|
|
22
|
-
type: "operation",
|
|
23
|
-
title: entry.title,
|
|
24
|
-
id: entry.id,
|
|
25
|
-
description: operation.description || "",
|
|
26
|
-
method: entry.method,
|
|
27
|
-
path: entry.path,
|
|
28
|
-
body: body || "",
|
|
29
|
-
operationId: operation.operationId,
|
|
30
|
-
entry
|
|
31
|
-
});
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (entry.type === "webhook") {
|
|
35
|
-
const webhook = getResolvedRef(document?.webhooks?.[entry.name]?.[entry.method]) ?? {};
|
|
36
|
-
index.push({
|
|
37
|
-
id: entry.id,
|
|
38
|
-
type: "webhook",
|
|
39
|
-
title: entry.title,
|
|
40
|
-
description: "Webhook",
|
|
41
|
-
method: entry.method,
|
|
42
|
-
body: webhook.description || "",
|
|
43
|
-
operationId: webhook.operationId,
|
|
44
|
-
entry
|
|
45
|
-
});
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (entry.type === "model") {
|
|
49
|
-
const schema = getResolvedRef(document?.components?.schemas?.[entry.name]);
|
|
50
|
-
const description = schema?.description ?? "";
|
|
51
|
-
index.push({
|
|
52
|
-
type: "model",
|
|
53
|
-
title: entry.title,
|
|
54
|
-
description: "Model",
|
|
55
|
-
id: entry.id,
|
|
56
|
-
body: description,
|
|
57
|
-
entry
|
|
58
|
-
});
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (entry.type === "models") {
|
|
62
|
-
index.push({
|
|
63
|
-
id: entry.id,
|
|
64
|
-
type: "heading",
|
|
65
|
-
title: "Models",
|
|
66
|
-
description: "Heading",
|
|
67
|
-
body: "",
|
|
68
|
-
entry
|
|
69
|
-
});
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (entry.type === "tag" && entry.isWebhooks === true) {
|
|
73
|
-
index.push({
|
|
74
|
-
id: entry.id,
|
|
75
|
-
type: "heading",
|
|
76
|
-
title: "Webhooks",
|
|
77
|
-
description: "Heading",
|
|
78
|
-
body: "",
|
|
79
|
-
entry
|
|
80
|
-
});
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (entry.type === "tag" && entry.isGroup === false) {
|
|
84
|
-
index.push({
|
|
85
|
-
id: entry.id,
|
|
86
|
-
title: entry.title,
|
|
87
|
-
description: entry.description || "",
|
|
88
|
-
type: "tag",
|
|
89
|
-
body: "",
|
|
90
|
-
entry
|
|
91
|
-
});
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if (entry.type === "tag" && entry.isGroup === true) {
|
|
95
|
-
index.push({
|
|
96
|
-
id: entry.id,
|
|
97
|
-
title: entry.title,
|
|
98
|
-
description: "Tag Group",
|
|
99
|
-
type: "tag",
|
|
100
|
-
body: "",
|
|
101
|
-
entry
|
|
102
|
-
});
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (entry.type === "text") {
|
|
106
|
-
index.push({
|
|
107
|
-
id: entry.id,
|
|
108
|
-
type: "heading",
|
|
109
|
-
title: entry.title ?? "",
|
|
110
|
-
description: "Heading",
|
|
111
|
-
body: "",
|
|
112
|
-
entry
|
|
113
|
-
});
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
export {
|
|
118
|
-
createSearchIndex
|
|
119
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { computed, toValue, ref } from "vue";
|
|
2
|
-
import { createFuseInstance } from "../helpers/create-fuse-instance.js";
|
|
3
|
-
import { createSearchIndex } from "../helpers/create-search-index.js";
|
|
4
|
-
const MAX_SEARCH_RESULTS = 25;
|
|
5
|
-
function useSearchIndex(document) {
|
|
6
|
-
const fuse = computed(() => {
|
|
7
|
-
const instance = createFuseInstance();
|
|
8
|
-
instance.setCollection(createSearchIndex(toValue(document)));
|
|
9
|
-
return instance;
|
|
10
|
-
});
|
|
11
|
-
const query = ref("");
|
|
12
|
-
const results = computed(() => {
|
|
13
|
-
if (query.value.length !== 0) {
|
|
14
|
-
return fuse.value.search(query.value, {
|
|
15
|
-
limit: MAX_SEARCH_RESULTS
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const allEntries = fuse.value._docs;
|
|
19
|
-
return allEntries.slice(0, MAX_SEARCH_RESULTS).map(
|
|
20
|
-
(item, index) => ({
|
|
21
|
-
item,
|
|
22
|
-
refIndex: index
|
|
23
|
-
})
|
|
24
|
-
);
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
results,
|
|
28
|
-
query
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
useSearchIndex
|
|
33
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./AskAgentButton.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78f5377c"]]);
|
|
5
|
-
export {
|
|
6
|
-
AskAgentButton as default
|
|
7
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, createElementBlock, createCommentVNode, unref, openBlock, withModifiers, createVNode, createElementVNode, withDirectives, normalizeClass, vModelText } from "vue";
|
|
2
|
-
import { ScalarIconSparkle, ScalarIconArrowUp } from "@scalar/icons";
|
|
3
|
-
import { useAgentContext } from "../../hooks/use-agent.js";
|
|
4
|
-
const _hoisted_1 = {
|
|
5
|
-
class: "ask-agent-scalar-send",
|
|
6
|
-
type: "submit"
|
|
7
|
-
};
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "AskAgentButton",
|
|
10
|
-
setup(__props) {
|
|
11
|
-
const agentContext = useAgentContext();
|
|
12
|
-
const message = ref("");
|
|
13
|
-
const inputRef = ref();
|
|
14
|
-
function handleSubmit() {
|
|
15
|
-
agentContext.value?.openAgent(message.value);
|
|
16
|
-
message.value = "";
|
|
17
|
-
}
|
|
18
|
-
return (_ctx, _cache) => {
|
|
19
|
-
return unref(agentContext)?.agentEnabled.value ? (openBlock(), createElementBlock("form", {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "agent-button-container",
|
|
22
|
-
onClick: _cache[1] || (_cache[1] = ($event) => inputRef.value?.focus()),
|
|
23
|
-
onSubmit: _cache[2] || (_cache[2] = withModifiers(($event) => handleSubmit(), ["prevent"]))
|
|
24
|
-
}, [
|
|
25
|
-
createVNode(unref(ScalarIconSparkle), {
|
|
26
|
-
class: "size-3 shrink-0",
|
|
27
|
-
weight: "fill"
|
|
28
|
-
}),
|
|
29
|
-
_cache[3] || (_cache[3] = createElementVNode("div", { class: "ask-agent-scalar-input-label" }, "Ask AI Agent", -1)),
|
|
30
|
-
withDirectives(createElementVNode("input", {
|
|
31
|
-
ref_key: "inputRef",
|
|
32
|
-
ref: inputRef,
|
|
33
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => message.value = $event),
|
|
34
|
-
class: normalizeClass(["ask-agent-scalar-input", { "ask-agent-scalar-input-not-empty": message.value.length > 0 }]),
|
|
35
|
-
placeholder: "Ask AI Agent"
|
|
36
|
-
}, null, 2), [
|
|
37
|
-
[vModelText, message.value]
|
|
38
|
-
]),
|
|
39
|
-
createElementVNode("button", _hoisted_1, [
|
|
40
|
-
createVNode(unref(ScalarIconArrowUp), {
|
|
41
|
-
class: "size-3",
|
|
42
|
-
weight: "bold"
|
|
43
|
-
})
|
|
44
|
-
])
|
|
45
|
-
], 32)) : createCommentVNode("", true);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
_sfc_main as default
|
|
51
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, Fragment } from "vue";
|
|
2
|
-
import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
|
|
3
|
-
import _sfc_main$1 from "./components/ApiReferenceToolbarTitle.vue.js";
|
|
4
|
-
import _sfc_main$4 from "./components/DeployApiReference.vue.js";
|
|
5
|
-
import _sfc_main$2 from "./components/ModifyConfiguration.vue.js";
|
|
6
|
-
import _sfc_main$3 from "./components/ShareApiReference.vue.js";
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
"aria-label": "Developer Tools",
|
|
10
|
-
class: "api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15"
|
|
11
|
-
};
|
|
12
|
-
const _hoisted_2 = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" };
|
|
13
|
-
const _hoisted_3 = { class: "flex flex-1 items-center" };
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
-
__name: "DeveloperTools",
|
|
16
|
-
props: /* @__PURE__ */ mergeModels({
|
|
17
|
-
workspace: {},
|
|
18
|
-
configuration: {}
|
|
19
|
-
}, {
|
|
20
|
-
"overrides": {},
|
|
21
|
-
"overridesModifiers": {}
|
|
22
|
-
}),
|
|
23
|
-
emits: ["update:overrides"],
|
|
24
|
-
setup(__props) {
|
|
25
|
-
const overrides = useModel(__props, "overrides");
|
|
26
|
-
const showDeveloperTools = computed(() => {
|
|
27
|
-
if (__props.configuration?.showDeveloperTools === "always") {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
if (__props.configuration?.showDeveloperTools === "never") {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
if (typeof window === "undefined") {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
return isLocalUrl(window.location.href);
|
|
37
|
-
});
|
|
38
|
-
return (_ctx, _cache) => {
|
|
39
|
-
return showDeveloperTools.value ? (openBlock(), createElementBlock("header", _hoisted_1, [
|
|
40
|
-
createElementVNode("div", _hoisted_2, [
|
|
41
|
-
createElementVNode("div", _hoisted_3, [
|
|
42
|
-
createVNode(_sfc_main$1)
|
|
43
|
-
]),
|
|
44
|
-
createVNode(_sfc_main$2, {
|
|
45
|
-
overrides: overrides.value,
|
|
46
|
-
"onUpdate:overrides": _cache[0] || (_cache[0] = ($event) => overrides.value = $event),
|
|
47
|
-
configuration: __props.configuration
|
|
48
|
-
}, null, 8, ["overrides", "configuration"]),
|
|
49
|
-
__props.workspace ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
50
|
-
createVNode(_sfc_main$3, { workspace: __props.workspace }, null, 8, ["workspace"]),
|
|
51
|
-
createVNode(_sfc_main$4, { workspace: __props.workspace }, null, 8, ["workspace"])
|
|
52
|
-
], 64)) : createCommentVNode("", true)
|
|
53
|
-
])
|
|
54
|
-
])) : createCommentVNode("", true);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
export {
|
|
59
|
-
_sfc_main as default
|
|
60
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, renderSlot } from "vue";
|
|
2
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const _sfc_main = {};
|
|
4
|
-
const _hoisted_1 = { class: "text-c-3 [&_code]:font-code [&_a:hover]:text-c-1 text-center leading-normal [&_a]:underline" };
|
|
5
|
-
function _sfc_render(_ctx, _cache) {
|
|
6
|
-
return openBlock(), createElementBlock("p", _hoisted_1, [
|
|
7
|
-
renderSlot(_ctx.$slots, "default")
|
|
8
|
-
]);
|
|
9
|
-
}
|
|
10
|
-
const ApiReferenceToolbarBlurb = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
11
|
-
export {
|
|
12
|
-
ApiReferenceToolbarBlurb as default
|
|
13
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useModel, computed, createBlock, openBlock, unref } from "vue";
|
|
2
|
-
import { ScalarCheckboxRadioGroup } from "@scalar/components";
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "ApiReferenceToolbarConfigLayout",
|
|
5
|
-
props: {
|
|
6
|
-
"modelValue": {},
|
|
7
|
-
"modelModifiers": {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(__props) {
|
|
11
|
-
const ModernOption = { label: "Modern", value: "modern" };
|
|
12
|
-
const ClassicOption = { label: "Classic", value: "classic" };
|
|
13
|
-
const options = [
|
|
14
|
-
ModernOption,
|
|
15
|
-
ClassicOption
|
|
16
|
-
];
|
|
17
|
-
const model = useModel(__props, "modelValue");
|
|
18
|
-
const selected = computed({
|
|
19
|
-
get: () => model.value === "modern" ? ModernOption : ClassicOption,
|
|
20
|
-
set: (option) => model.value = option.value
|
|
21
|
-
});
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
return openBlock(), createBlock(unref(ScalarCheckboxRadioGroup), {
|
|
24
|
-
modelValue: selected.value,
|
|
25
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
|
|
26
|
-
options
|
|
27
|
-
}, null, 8, ["modelValue"]);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
export {
|
|
32
|
-
_sfc_main as default
|
|
33
|
-
};
|