@scalar/api-reference 1.38.1 → 1.39.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 +69 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +7 -6
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +11 -0
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +259 -0
- package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +66 -0
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +4 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +271 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +4 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +150 -0
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +4 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +116 -0
- package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +55 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +4 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +288 -0
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +4 -0
- package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +1 -0
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.js +26 -0
- package/dist/blocks/scalar-auth-selector-block/index.d.ts.map +1 -0
- package/dist/{v2/blocks → blocks}/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +0 -2
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +7 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +125 -0
- package/dist/{v2/blocks → blocks}/scalar-client-selector-block/components/ClientSelector.vue.d.ts +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +7 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +141 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +24 -0
- package/dist/blocks/scalar-client-selector-block/index.d.ts.map +1 -0
- package/dist/{v2/blocks → blocks}/scalar-info-block/components/DownloadLink.vue.d.ts +0 -3
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +62 -0
- package/dist/{v2/blocks → blocks}/scalar-info-block/components/InfoBlock.vue.d.ts +7 -10
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +54 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue2.js +4 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts +11 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +66 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +38 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue2.js +4 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.d.ts +10 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +36 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue2.js +4 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +28 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue2.js +4 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +19 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
- package/dist/{v2/blocks → blocks}/scalar-info-block/components/IntroductionLayout.vue.d.ts +9 -7
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +112 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +21 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +4 -0
- package/dist/blocks/scalar-info-block/index.d.ts.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +88 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue2.js +4 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +89 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +4 -0
- package/dist/blocks/scalar-server-selector-block/index.d.ts.map +1 -0
- package/dist/browser/standalone.js +32761 -32285
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts +5 -4
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +45 -46
- package/dist/components/Anchor/Anchor.vue2.js +2 -2
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +2 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.js +2 -2
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +31 -33
- package/dist/components/ApiReference.vue.d.ts +275 -8
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +8 -35
- package/dist/components/ApiReference.vue2.js +665 -2
- package/dist/components/Badge/Badge.vue.js +4 -4
- package/dist/components/Badge/Badge.vue2.js +16 -14
- package/dist/components/ClassicHeader.vue.js +14 -11
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +0 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +15 -10
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +153 -191
- package/dist/components/Content/Content.vue3.js +2 -2
- package/dist/components/Content/Models/{Models.vue.d.ts → Model.vue.d.ts} +8 -8
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/Model.vue.js +47 -0
- package/dist/components/Content/Models/Model.vue2.js +4 -0
- package/dist/{v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts → components/Content/Models/ModelTag.vue.d.ts} +12 -11
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/ModelTag.vue.js +82 -0
- package/dist/components/Content/Models/ModelTag.vue2.js +4 -0
- package/dist/components/Content/Models/{ModernLayout.vue.d.ts → components/ClassicLayout.vue.d.ts} +7 -8
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +7 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +84 -0
- package/dist/components/Content/Models/{ClassicLayout.vue.d.ts → components/ModernLayout.vue.d.ts} +7 -6
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.js +61 -0
- package/dist/components/Content/Models/components/ModernLayout.vue2.js +4 -0
- package/dist/components/Content/Models/index.d.ts +1 -1
- package/dist/components/Content/Models/index.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +13 -11
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +142 -91
- package/dist/components/Content/Operations/TraversedEntry.vue2.js +2 -2
- package/dist/components/Content/Schema/RenderString.vue.js +19 -6
- package/dist/components/Content/Schema/RenderString.vue2.js +2 -2
- package/dist/components/Content/Schema/Schema.vue.d.ts +3 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +4 -4
- package/dist/components/Content/Schema/Schema.vue2.js +162 -135
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +3 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +88 -71
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +20 -14
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +90 -60
- package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +47 -29
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +79 -59
- package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +228 -149
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +25 -20
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +65 -55
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +301 -206
- package/dist/components/Content/Schema/helpers/format-example.js +38 -3
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +13 -8
- package/dist/components/Content/Schema/helpers/get-schema-type.js +54 -33
- package/dist/components/Content/Schema/helpers/is-type-object.js +24 -14
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +197 -118
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +56 -34
- package/dist/components/Content/Schema/helpers/schema-composition.js +2 -2
- package/dist/components/Content/Schema/helpers/schema-name.js +56 -28
- package/dist/components/Content/Schema/helpers/sort-property-names.js +47 -25
- package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.js +35 -29
- package/dist/components/Content/Tags/Tag.vue2.js +2 -2
- package/dist/components/Content/Tags/{ClassicLayout.vue.d.ts → components/ClassicLayout.vue.d.ts} +5 -2
- package/dist/components/Content/Tags/components/ClassicLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +7 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +57 -0
- package/dist/components/Content/Tags/{ModernLayout.vue.d.ts → components/ModernLayout.vue.d.ts} +5 -3
- package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +7 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue2.js +68 -0
- package/dist/components/Content/Tags/{TagSection.vue.d.ts → components/TagSection.vue.d.ts} +2 -0
- package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/components/TagSection.vue.js +100 -0
- package/dist/components/Content/Tags/components/TagSection.vue2.js +4 -0
- package/dist/components/GettingStarted.vue.js +4 -4
- package/dist/components/GettingStarted.vue2.js +59 -50
- package/dist/components/HttpMethod/HttpMethod.vue.js +23 -19
- package/dist/components/HttpMethod/HttpMethod.vue2.js +2 -2
- package/dist/components/IntersectionObserver.vue.d.ts +2 -2
- package/dist/components/IntersectionObserver.vue.js +41 -29
- package/dist/components/IntersectionObserver.vue2.js +2 -2
- package/dist/components/Lazy/Lazy.vue.d.ts +1 -4
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/Lazy/Lazy.vue.js +15 -2
- package/dist/components/Lazy/Lazy.vue2.js +2 -24
- package/dist/components/LinkList/LinkList.vue.js +4 -4
- package/dist/components/LinkList/LinkList.vue2.js +41 -25
- package/dist/components/LoadingSkeleton.vue.js +4 -4
- package/dist/components/LoadingSkeleton.vue2.js +12 -8
- package/dist/components/MobileHeader.vue.d.ts +13 -4
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +58 -5
- package/dist/components/MobileHeader.vue2.js +2 -26
- package/dist/components/OperationPath.vue.js +4 -4
- package/dist/components/OperationPath.vue2.js +21 -14
- package/dist/components/OperationsList/OperationsList.vue.d.ts +2 -0
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +4 -4
- package/dist/components/OperationsList/OperationsList.vue2.js +54 -45
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +2 -0
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +4 -4
- package/dist/components/OperationsList/OperationsListItem.vue2.js +56 -48
- package/dist/{v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts → components/RenderPlugins/RenderPlugins.vue.d.ts} +3 -3
- package/dist/components/RenderPlugins/RenderPlugins.vue.d.ts.map +1 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +43 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue2.js +4 -0
- package/dist/components/RenderPlugins/index.d.ts +2 -0
- package/dist/components/RenderPlugins/index.d.ts.map +1 -0
- package/dist/components/ScreenReader.vue.js +4 -4
- package/dist/components/ScreenReader.vue2.js +12 -9
- package/dist/components/Section/CompactSection.vue.d.ts +11 -6
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +4 -4
- package/dist/components/Section/CompactSection.vue2.js +47 -48
- package/dist/components/Section/Section.vue.d.ts +7 -7
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +4 -4
- package/dist/components/Section/Section.vue2.js +18 -25
- package/dist/components/Section/SectionAccordion.vue.d.ts +13 -9
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +4 -4
- package/dist/components/Section/SectionAccordion.vue2.js +64 -63
- package/dist/components/Section/SectionColumn.vue.js +9 -8
- package/dist/components/Section/SectionColumns.vue.js +9 -8
- package/dist/components/Section/SectionContainer.vue.js +4 -4
- package/dist/components/Section/SectionContainer.vue2.js +11 -8
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts +11 -4
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +4 -4
- package/dist/components/Section/SectionContainerAccordion.vue2.js +49 -34
- package/dist/components/Section/SectionContent.vue.js +4 -4
- package/dist/components/Section/SectionContent.vue2.js +15 -12
- package/dist/components/Section/SectionHeader.vue.js +4 -4
- package/dist/components/Section/SectionHeader.vue2.js +17 -14
- package/dist/components/Section/SectionHeaderTag.vue.js +4 -4
- package/dist/components/Section/SectionHeaderTag.vue2.js +12 -10
- package/dist/components/SectionFlare/SectionFlare.vue.js +10 -9
- package/dist/components/ShowMoreButton.vue.d.ts +0 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +4 -4
- package/dist/components/ShowMoreButton.vue2.js +25 -21
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/consts/urls.js +8 -5
- package/dist/features/Operation/Operation.vue.d.ts +8 -4
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +56 -53
- package/dist/features/Operation/Operation.vue2.js +2 -2
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +64 -55
- package/dist/features/Operation/components/ContentTypeSelect.vue2.js +2 -2
- package/dist/features/Operation/components/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +21 -17
- package/dist/features/Operation/components/Header.vue2.js +2 -2
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +4 -4
- package/dist/features/Operation/components/Headers.vue2.js +58 -52
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +68 -60
- package/dist/features/Operation/components/OperationParameters.vue2.js +2 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +30 -19
- package/dist/features/Operation/components/OperationResponses.vue2.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +40 -20
- package/dist/features/Operation/components/ParameterList.vue2.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +4 -4
- package/dist/features/Operation/components/ParameterListItem.vue2.js +120 -97
- package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -0
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +4 -4
- package/dist/features/Operation/components/RequestBody.vue2.js +126 -99
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +4 -4
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +48 -39
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +41 -26
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +2 -2
- package/dist/features/Operation/helpers/combine-params.js +10 -9
- package/dist/features/Operation/helpers/get-first-server.js +19 -14
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +207 -184
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +230 -214
- package/dist/features/Search/components/SearchButton.vue.d.ts +3 -0
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js +77 -54
- package/dist/features/Search/components/SearchButton.vue2.js +2 -2
- package/dist/features/Search/components/SearchModal.vue.d.ts +3 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +4 -4
- package/dist/features/Search/components/SearchModal.vue2.js +104 -181
- package/dist/features/Search/components/SearchResult.vue.d.ts +10 -0
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -0
- package/dist/features/Search/components/SearchResult.vue.js +84 -0
- package/dist/features/Search/components/SearchResult.vue2.js +4 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js +10 -10
- package/dist/features/Search/helpers/create-search-index.d.ts +1 -2
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +69 -61
- package/dist/features/Search/hooks/useSearchIndex.d.ts +6 -7
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +26 -39
- package/dist/features/Search/types.d.ts +3 -3
- package/dist/features/Search/types.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +4 -4
- package/dist/features/example-responses/ExampleResponse.vue2.js +48 -34
- package/dist/features/example-responses/ExampleResponseTab.vue.js +4 -4
- package/dist/features/example-responses/ExampleResponseTab.vue2.js +20 -18
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +4 -4
- package/dist/features/example-responses/ExampleResponseTabList.vue2.js +30 -27
- package/dist/features/example-responses/ExampleResponses.vue.js +4 -4
- package/dist/features/example-responses/ExampleResponses.vue2.js +160 -138
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +31 -21
- package/dist/features/external-docs/ExternalDocs.vue.js +28 -22
- package/dist/features/external-docs/ExternalDocs.vue2.js +2 -2
- package/dist/features/info-object/Contact.vue.js +29 -24
- package/dist/features/info-object/Contact.vue2.js +2 -2
- package/dist/features/info-object/License.vue.js +32 -26
- package/dist/features/info-object/License.vue2.js +2 -2
- package/dist/features/info-object/TermsOfService.vue.js +24 -20
- package/dist/features/info-object/TermsOfService.vue2.js +2 -2
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts +7 -5
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.js +37 -34
- package/dist/features/multiple-documents/DocumentSelector.vue2.js +2 -2
- package/dist/features/specification-extension/SpecificationExtension.vue.js +2 -2
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +38 -32
- package/dist/features/specification-extension/helpers.js +7 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +4 -4
- package/dist/features/test-request-button/TestRequestButton.vue2.js +33 -30
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +47 -30
- package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +9 -8
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +90 -82
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +24 -18
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +107 -110
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +34 -30
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +45 -37
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +52 -39
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +70 -65
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +36 -34
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +50 -47
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +75 -68
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +49 -43
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +2 -2
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
- package/dist/features/x-badges/XBadges.vue.js +26 -17
- package/dist/features/x-badges/XBadges.vue2.js +2 -2
- package/dist/helpers/convert-security-scheme.js +32 -21
- package/dist/helpers/download.d.ts.map +1 -0
- package/dist/helpers/download.js +45 -0
- package/dist/helpers/get-document-name.d.ts.map +1 -0
- package/dist/helpers/id-routing.d.ts +28 -0
- package/dist/helpers/id-routing.d.ts.map +1 -0
- package/dist/helpers/id-routing.js +57 -0
- package/dist/helpers/index.d.ts +10 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +23 -0
- package/dist/helpers/lazy-bus.d.ts +39 -0
- package/dist/helpers/lazy-bus.d.ts.map +1 -0
- package/dist/helpers/lazy-bus.js +161 -0
- package/dist/helpers/map-config-to-client-store.d.ts +72 -0
- package/dist/helpers/map-config-to-client-store.d.ts.map +1 -0
- package/dist/helpers/map-config-to-client-store.js +146 -0
- package/dist/helpers/map-config-to-workspace-store.d.ts +9 -0
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -0
- package/dist/helpers/map-config-to-workspace-store.js +47 -0
- package/dist/helpers/map-configuration.d.ts.map +1 -0
- package/dist/helpers/map-configuration.js +52 -0
- package/dist/helpers/markdown.d.ts.map +1 -0
- package/dist/helpers/normalize-configurations.d.ts +42 -0
- package/dist/helpers/normalize-configurations.d.ts.map +1 -0
- package/dist/helpers/normalize-configurations.js +69 -0
- package/dist/helpers/openapi.d.ts.map +1 -0
- package/dist/helpers/openapi.js +119 -0
- package/dist/{features/toolbar/uploadTempDocument.d.ts → helpers/upload-temp-document.d.ts} +1 -1
- package/dist/helpers/upload-temp-document.d.ts.map +1 -0
- package/dist/helpers/upload-temp-document.js +24 -0
- package/dist/hooks/use-intersection.d.ts +3 -0
- package/dist/hooks/use-intersection.d.ts.map +1 -0
- package/dist/hooks/use-intersection.js +32 -0
- package/dist/hooks/use-legacy-store-events.d.ts.map +1 -0
- package/dist/hooks/use-legacy-store-events.js +91 -0
- package/dist/hooks/use-workspace-store-events.d.ts +4 -0
- package/dist/hooks/use-workspace-store-events.d.ts.map +1 -0
- package/dist/hooks/use-workspace-store-events.js +68 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -45
- package/dist/plugins/hooks/usePluginManager.js +11 -7
- package/dist/plugins/plugin-manager.d.ts +5 -1
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.js +31 -13
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +59 -32
- package/dist/style.css +11893 -1
- package/package.json +47 -36
- package/dist/components/ApiReferenceContent.vue.d.ts +0 -34
- package/dist/components/ApiReferenceContent.vue.d.ts.map +0 -1
- package/dist/components/ApiReferenceContent.vue.js +0 -8
- package/dist/components/ApiReferenceContent.vue2.js +0 -148
- package/dist/components/ApiReferenceLayout.vue.d.ts +0 -34
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +0 -1
- package/dist/components/ApiReferenceLayout.vue.js +0 -10
- package/dist/components/ApiReferenceLayout.vue2.js +0 -316
- package/dist/components/Content/IntroductionSection.vue.d.ts +0 -18
- package/dist/components/Content/IntroductionSection.vue.d.ts.map +0 -1
- package/dist/components/Content/IntroductionSection.vue.js +0 -26
- package/dist/components/Content/IntroductionSection.vue2.js +0 -4
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +0 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Models/ClassicLayout.vue2.js +0 -90
- package/dist/components/Content/Models/Models.vue.d.ts.map +0 -1
- package/dist/components/Content/Models/Models.vue.js +0 -42
- package/dist/components/Content/Models/Models.vue2.js +0 -4
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +0 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +0 -7
- package/dist/components/Content/Models/ModernLayout.vue2.js +0 -102
- package/dist/components/Content/Operations/get-current-index.d.ts +0 -4
- package/dist/components/Content/Operations/get-current-index.d.ts.map +0 -1
- package/dist/components/Content/Operations/get-current-index.js +0 -16
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +0 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.js +0 -7
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +0 -48
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +0 -1
- package/dist/components/Content/Tags/ModernLayout.vue.js +0 -7
- package/dist/components/Content/Tags/ModernLayout.vue2.js +0 -69
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +0 -1
- package/dist/components/Content/Tags/TagSection.vue.js +0 -95
- package/dist/components/Content/Tags/TagSection.vue2.js +0 -4
- package/dist/components/Lazy/index.d.ts +0 -3
- package/dist/components/Lazy/index.d.ts.map +0 -1
- package/dist/components/Lazy/lazyBus.d.ts +0 -10
- package/dist/components/Lazy/lazyBus.d.ts.map +0 -1
- package/dist/components/Lazy/lazyBus.js +0 -7
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts +0 -9
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +0 -83
- package/dist/features/api-client-modal/ApiClientModal.vue2.js +0 -4
- package/dist/features/api-client-modal/index.d.ts +0 -3
- package/dist/features/api-client-modal/index.d.ts.map +0 -1
- package/dist/features/api-client-modal/useApiClient.d.ts +0 -8073
- package/dist/features/api-client-modal/useApiClient.d.ts.map +0 -1
- package/dist/features/api-client-modal/useApiClient.js +0 -12
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +0 -11
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +0 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +0 -37
- package/dist/features/document-source/hooks/useDocumentSource.d.ts +0 -19
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +0 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +0 -73
- package/dist/features/document-source/index.d.ts +0 -2
- package/dist/features/document-source/index.d.ts.map +0 -1
- package/dist/features/multiple-documents/index.d.ts +0 -3
- package/dist/features/multiple-documents/index.d.ts.map +0 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +0 -36
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +0 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +0 -91
- package/dist/features/toolbar/uploadTempDocument.d.ts.map +0 -1
- package/dist/features/toolbar/uploadTempDocument.js +0 -21
- package/dist/helpers/test-utils.d.ts +0 -60
- package/dist/helpers/test-utils.d.ts.map +0 -1
- package/dist/hooks/useFreezing.d.ts +0 -6
- package/dist/hooks/useFreezing.d.ts.map +0 -1
- package/dist/hooks/useFreezing.js +0 -29
- package/dist/hooks/useNavState.d.ts +0 -54
- package/dist/hooks/useNavState.d.ts.map +0 -1
- package/dist/hooks/useNavState.js +0 -62
- package/dist/libs/download.d.ts.map +0 -1
- package/dist/libs/download.js +0 -28
- package/dist/libs/markdown.d.ts.map +0 -1
- package/dist/libs/openapi.d.ts.map +0 -1
- package/dist/libs/openapi.js +0 -75
- package/dist/types.d.ts +0 -71
- package/dist/types.d.ts.map +0 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +0 -31
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +0 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +0 -194
- package/dist/v2/ApiReferenceWorkspace.vue3.js +0 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -203
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -57
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -266
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -135
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -96
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -50
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -253
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +0 -21
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +0 -7
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +0 -112
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +0 -7
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +0 -119
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.js +0 -17
- package/dist/v2/blocks/scalar-client-selector-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +0 -7
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +0 -69
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +0 -54
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +0 -7
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue2.js +0 -72
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.js +0 -36
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.js +0 -25
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +0 -7
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue2.js +0 -17
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +0 -13
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +0 -7
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +0 -102
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.js +0 -19
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +0 -75
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +0 -69
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-server-selector-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +0 -7
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +0 -131
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +0 -35
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +0 -7
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +0 -118
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts +0 -16
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +0 -7
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue2.js +0 -18
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts +0 -17
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +0 -7
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue2.js +0 -29
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +0 -23
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +0 -35
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +0 -9
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +0 -9
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts +0 -18
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +0 -18
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +0 -4
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +0 -1
- package/dist/v2/helpers/get-document-name.d.ts.map +0 -1
- package/dist/v2/helpers/get-document-name.js +0 -15
- package/dist/v2/helpers/map-configuration.d.ts.map +0 -1
- package/dist/v2/helpers/map-configuration.js +0 -50
- package/dist/v2/helpers/normalize-content.d.ts +0 -3
- package/dist/v2/helpers/normalize-content.d.ts.map +0 -1
- package/dist/v2/helpers/normalize-content.js +0 -8
- package/dist/v2/hooks/use-legacy-store-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-legacy-store-events.js +0 -61
- package/dist/v2/hooks/use-workspace-store-events.d.ts +0 -5
- package/dist/v2/hooks/use-workspace-store-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-store-events.js +0 -40
- package/dist/v2/styles.d.ts +0 -2
- package/dist/v2/styles.d.ts.map +0 -1
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/helpers/update-scheme.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-auth-selector-block/index.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-client-selector-block/helpers/featured-clients.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-client-selector-block/index.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/components/InfoLinks.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/components/InfoVersion.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/components/IntroductionCard.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/components/IntroductionCardItem.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/components/OpenApiVersion.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-info-block/index.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-server-selector-block/components/Selector.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-server-selector-block/components/ServerSelector.vue.d.ts +0 -0
- /package/dist/{v2/blocks → blocks}/scalar-server-selector-block/index.d.ts +0 -0
- /package/dist/{libs → helpers}/download.d.ts +0 -0
- /package/dist/{v2/helpers → helpers}/get-document-name.d.ts +0 -0
- /package/dist/{v2/helpers → helpers}/map-configuration.d.ts +0 -0
- /package/dist/{libs → helpers}/markdown.d.ts +0 -0
- /package/dist/{libs → helpers}/openapi.d.ts +0 -0
- /package/dist/{v2/hooks → hooks}/use-legacy-store-events.d.ts +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { watchDebounced } from "@vueuse/core";
|
|
2
|
+
import { nanoid } from "nanoid";
|
|
3
|
+
import { computed, ref, reactive, onBeforeUnmount, nextTick } from "vue";
|
|
4
|
+
import { getSchemaParamsFromId } from "./id-routing.js";
|
|
5
|
+
const priorityQueue = reactive(/* @__PURE__ */ new Set());
|
|
6
|
+
const pendingQueue = reactive(/* @__PURE__ */ new Set());
|
|
7
|
+
const readyQueue = reactive(/* @__PURE__ */ new Set());
|
|
8
|
+
const isRunning = ref(false);
|
|
9
|
+
const firstLazyLoadComplete = ref(false);
|
|
10
|
+
const intersectionBlockers = reactive(/* @__PURE__ */ new Set());
|
|
11
|
+
const onRenderComplete = /* @__PURE__ */ new Set();
|
|
12
|
+
const addLazyCompleteCallback = (callback) => {
|
|
13
|
+
if (callback) {
|
|
14
|
+
onRenderComplete.add(callback);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const blockIntersection = () => {
|
|
18
|
+
const blockId = nanoid();
|
|
19
|
+
intersectionBlockers.add(blockId);
|
|
20
|
+
return () => setTimeout(() => intersectionBlockers.delete(blockId), 100);
|
|
21
|
+
};
|
|
22
|
+
const intersectionEnabled = computed(() => intersectionBlockers.size === 0);
|
|
23
|
+
const runLazyBus = () => {
|
|
24
|
+
if (typeof window === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const unblock = blockIntersection();
|
|
28
|
+
const executeRender = async () => {
|
|
29
|
+
if (pendingQueue.size > 0 || priorityQueue.size > 0) {
|
|
30
|
+
isRunning.value = true;
|
|
31
|
+
for (const id of pendingQueue.values()) {
|
|
32
|
+
readyQueue.add(id);
|
|
33
|
+
pendingQueue.delete(id);
|
|
34
|
+
priorityQueue.delete(id);
|
|
35
|
+
}
|
|
36
|
+
for (const id of priorityQueue.values()) {
|
|
37
|
+
readyQueue.add(id);
|
|
38
|
+
priorityQueue.delete(id);
|
|
39
|
+
pendingQueue.delete(id);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
await nextTick();
|
|
43
|
+
onRenderComplete.forEach((fn) => fn());
|
|
44
|
+
onRenderComplete.clear();
|
|
45
|
+
unblock();
|
|
46
|
+
isRunning.value = false;
|
|
47
|
+
firstLazyLoadComplete.value = true;
|
|
48
|
+
};
|
|
49
|
+
if (window.requestIdleCallback) {
|
|
50
|
+
window.requestIdleCallback(executeRender, { timeout: 1500 });
|
|
51
|
+
} else {
|
|
52
|
+
nextTick(executeRender);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
watchDebounced(
|
|
56
|
+
[() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],
|
|
57
|
+
() => {
|
|
58
|
+
if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {
|
|
59
|
+
runLazyBus();
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{ debounce: 300, maxWait: 1500 }
|
|
63
|
+
);
|
|
64
|
+
const addToPendingQueue = (id) => {
|
|
65
|
+
if (!!id && !readyQueue.has(id) && !priorityQueue.has(id)) {
|
|
66
|
+
pendingQueue.add(id);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const addToPriorityQueue = (id) => {
|
|
70
|
+
if (id && !readyQueue.has(id)) {
|
|
71
|
+
priorityQueue.add(id);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const resetLazyElement = (id) => {
|
|
75
|
+
priorityQueue.delete(id);
|
|
76
|
+
pendingQueue.delete(id);
|
|
77
|
+
readyQueue.delete(id);
|
|
78
|
+
};
|
|
79
|
+
function useLazyBus(id) {
|
|
80
|
+
addToPendingQueue(id);
|
|
81
|
+
onBeforeUnmount(() => {
|
|
82
|
+
resetLazyElement(id);
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
isReady: computed(() => typeof window === "undefined" || priorityQueue.has(id) || readyQueue.has(id))
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const scrollToLazy = (id, setExpanded, getEntryById) => {
|
|
89
|
+
const item = getEntryById(id);
|
|
90
|
+
const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id));
|
|
91
|
+
const unfreeze = isLazy ? freeze(id) : void 0;
|
|
92
|
+
addLazyCompleteCallback(unfreeze);
|
|
93
|
+
const unblock = blockIntersection();
|
|
94
|
+
const { rawId } = getSchemaParamsFromId(id);
|
|
95
|
+
addToPriorityQueue(id);
|
|
96
|
+
addToPriorityQueue(rawId);
|
|
97
|
+
if (item?.children) {
|
|
98
|
+
item.children.slice(0, 2).forEach((child) => {
|
|
99
|
+
addToPriorityQueue(child.id);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (item?.parent) {
|
|
103
|
+
const parent = getEntryById(item.parent.id);
|
|
104
|
+
const elementIdx = parent?.children?.findIndex((child) => child.id === id);
|
|
105
|
+
if (elementIdx !== void 0 && elementIdx >= 0) {
|
|
106
|
+
parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => {
|
|
107
|
+
addToPriorityQueue(child.id);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
tryScroll(id, Date.now() + 1e3, unblock, unfreeze);
|
|
112
|
+
setExpanded(rawId, true);
|
|
113
|
+
const addParents = (currentId) => {
|
|
114
|
+
const parent = getEntryById(currentId)?.parent;
|
|
115
|
+
if (parent) {
|
|
116
|
+
addToPriorityQueue(parent.id);
|
|
117
|
+
setExpanded(parent.id, true);
|
|
118
|
+
addParents(parent.id);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
addParents(rawId);
|
|
122
|
+
};
|
|
123
|
+
const tryScroll = (id, stopTime, onComplete, onFailure) => {
|
|
124
|
+
const element = document.getElementById(id);
|
|
125
|
+
if (element) {
|
|
126
|
+
element.scrollIntoView({
|
|
127
|
+
block: "start"
|
|
128
|
+
});
|
|
129
|
+
onComplete();
|
|
130
|
+
} else if (Date.now() < stopTime) {
|
|
131
|
+
requestAnimationFrame(() => tryScroll(id, stopTime, onComplete));
|
|
132
|
+
} else {
|
|
133
|
+
onComplete();
|
|
134
|
+
onFailure?.();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const freeze = (id) => {
|
|
138
|
+
let stop = false;
|
|
139
|
+
const runFrame = (stopAfterFrame) => {
|
|
140
|
+
const element = document.getElementById(id);
|
|
141
|
+
if (element) {
|
|
142
|
+
element.scrollIntoView({
|
|
143
|
+
block: "start"
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (!stopAfterFrame) {
|
|
147
|
+
requestAnimationFrame(() => runFrame(stop));
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
runFrame(false);
|
|
151
|
+
return () => {
|
|
152
|
+
stop = true;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
firstLazyLoadComplete,
|
|
157
|
+
freeze,
|
|
158
|
+
intersectionEnabled,
|
|
159
|
+
scrollToLazy,
|
|
160
|
+
useLazyBus
|
|
161
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
+
import type { ApiReferenceConfigurationRaw, OpenAPIV3_1 } from '@scalar/types';
|
|
3
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
|
+
import type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-requirement';
|
|
5
|
+
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
6
|
+
import { type MaybeRefOrGetter } from '@vueuse/core';
|
|
7
|
+
import { type Ref } from 'vue';
|
|
8
|
+
/**
|
|
9
|
+
* Temporary state mapping factory to handle syncing the client store with the workspace store.
|
|
10
|
+
*/
|
|
11
|
+
export declare function mapConfigToClientStore({ config, workspaceStore, el, root, dereferencedDocument, documentUrl, }: {
|
|
12
|
+
/** Element the client will be mounted to */
|
|
13
|
+
el: Ref<HTMLElement | null>;
|
|
14
|
+
/** Root element used to capture custom events on */
|
|
15
|
+
root: Ref<HTMLElement | null>;
|
|
16
|
+
/** Configuration object for API client */
|
|
17
|
+
config: MaybeRefOrGetter<ApiReferenceConfigurationRaw>;
|
|
18
|
+
/** Instantiated client store */
|
|
19
|
+
workspaceStore: WorkspaceStore;
|
|
20
|
+
dereferencedDocument: MaybeRefOrGetter<OpenAPIV3_1.Document | null>;
|
|
21
|
+
/** Document URL */
|
|
22
|
+
documentUrl: MaybeRefOrGetter<string | undefined>;
|
|
23
|
+
}): {
|
|
24
|
+
activeServer: import("vue").ComputedRef<{
|
|
25
|
+
url: string;
|
|
26
|
+
uid: string & import("zod").$brand<"server">;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
variables?: Record<string, {
|
|
29
|
+
enum?: string[] | undefined;
|
|
30
|
+
default?: string | undefined;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
value?: string | undefined;
|
|
33
|
+
}> | undefined;
|
|
34
|
+
} | undefined>;
|
|
35
|
+
activeEnvVariables: import("vue").ComputedRef<import("@scalar/api-client/store").EnvVariable[]>;
|
|
36
|
+
activeEnvironment: import("vue").ComputedRef<{
|
|
37
|
+
uid: string & import("zod").$brand<"environment">;
|
|
38
|
+
name: string;
|
|
39
|
+
color: string;
|
|
40
|
+
value: string;
|
|
41
|
+
isDefault?: boolean | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
activeWorkspace: import("vue").ComputedRef<{
|
|
44
|
+
uid: string & import("zod").$brand<"workspace">;
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
collections: (string & import("zod").$brand<"collection">)[];
|
|
48
|
+
environments: Record<string, string>;
|
|
49
|
+
activeEnvironmentId: string;
|
|
50
|
+
cookies: (string & import("zod").$brand<"cookie">)[];
|
|
51
|
+
themeId: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
52
|
+
selectedHttpClient: {
|
|
53
|
+
targetKey: string;
|
|
54
|
+
clientKey: string;
|
|
55
|
+
};
|
|
56
|
+
hotKeyConfig?: {
|
|
57
|
+
modifiers: ("default" | "Meta" | "Control" | "Shift" | "Alt")[];
|
|
58
|
+
hotKeys?: Partial<Record<"" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "End" | "Home" | "PageDown" | "PageUp" | "Delete" | "*" | "+" | "-" | "." | "/" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]" | "4" | "1" | "2" | "3" | "5" | "6" | "7" | "8" | "9", {
|
|
59
|
+
event: "addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar";
|
|
60
|
+
modifiers?: ("default" | "Meta" | "Control" | "Shift" | "Alt")[] | undefined;
|
|
61
|
+
}>> | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
proxyUrl?: string | undefined;
|
|
64
|
+
} | undefined>;
|
|
65
|
+
getSecuritySchemes: SecuritySchemeGetter;
|
|
66
|
+
openClient: (payload: {
|
|
67
|
+
method: HttpMethod;
|
|
68
|
+
path: string;
|
|
69
|
+
}) => void | undefined;
|
|
70
|
+
};
|
|
71
|
+
export type SecuritySchemeGetter = (operationSecurity: SecurityRequirementObject[] | undefined, documentSecurity: SecurityRequirementObject[] | undefined) => SecuritySchemeObject[];
|
|
72
|
+
//# sourceMappingURL=map-config-to-client-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-config-to-client-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-client-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAA;AACjH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,KAAK,GAAG,EAA4C,MAAM,KAAK,CAAA;AAKxE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,cAAc,EACd,EAAE,EACF,IAAI,EACJ,oBAAoB,EACpB,WAAW,GACZ,EAAE;IACD,4CAA4C;IAC5C,EAAE,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC3B,oDAAoD;IACpD,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC7B,0CAA0C;IAC1C,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,gCAAgC;IAChC,cAAc,EAAE,cAAc,CAAA;IAC9B,oBAAoB,EAAE,gBAAgB,CAAC,WAAW,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IACnE,mBAAmB;IACnB,WAAW,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAClD;;;;;;gBAuMk7K,CAAC;mBAA2C,CAAC;uBAA6C,CAAC;iBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA5rC,CAAC;;yBAAg6B,CAAC;;;;;;0BARlwK;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;EAE7D;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,iBAAiB,EAAE,yBAAyB,EAAE,GAAG,SAAS,EAC1D,gBAAgB,EAAE,yBAAyB,EAAE,GAAG,SAAS,KACtD,oBAAoB,EAAE,CAAA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { createApiClientModal } from "@scalar/api-client/layouts/Modal";
|
|
2
|
+
import { createWorkspaceStore, createActiveEntitiesStore, WORKSPACE_SYMBOL, ACTIVE_ENTITIES_SYMBOL } from "@scalar/api-client/store";
|
|
3
|
+
import { mutateSecuritySchemeDiff } from "@scalar/api-client/views/Request/libs";
|
|
4
|
+
import { filterSecurityRequirements } from "@scalar/api-client/views/Request/RequestSection";
|
|
5
|
+
import { getServersFromDocument } from "@scalar/oas-utils/helpers";
|
|
6
|
+
import { emitCustomEvent } from "@scalar/workspace-store/events";
|
|
7
|
+
import { watchDebounced } from "@vueuse/core";
|
|
8
|
+
import microdiff from "microdiff";
|
|
9
|
+
import { toValue, provide, watch, toRaw, computed } from "vue";
|
|
10
|
+
import { convertSecurityScheme } from "./convert-security-scheme.js";
|
|
11
|
+
import { useLegacyStoreEvents } from "../hooks/use-legacy-store-events.js";
|
|
12
|
+
function mapConfigToClientStore({
|
|
13
|
+
config,
|
|
14
|
+
workspaceStore,
|
|
15
|
+
el,
|
|
16
|
+
root,
|
|
17
|
+
dereferencedDocument,
|
|
18
|
+
documentUrl
|
|
19
|
+
}) {
|
|
20
|
+
const store = createWorkspaceStore({
|
|
21
|
+
useLocalStorage: false,
|
|
22
|
+
proxyUrl: toValue(config).proxyUrl,
|
|
23
|
+
theme: toValue(config).theme,
|
|
24
|
+
showSidebar: toValue(config).showSidebar,
|
|
25
|
+
hideClientButton: toValue(config).hideClientButton,
|
|
26
|
+
_integration: toValue(config)._integration
|
|
27
|
+
});
|
|
28
|
+
let client = null;
|
|
29
|
+
const activeEntities = createActiveEntitiesStore(store);
|
|
30
|
+
provide(WORKSPACE_SYMBOL, store);
|
|
31
|
+
provide(ACTIVE_ENTITIES_SYMBOL, activeEntities);
|
|
32
|
+
useLegacyStoreEvents(workspaceStore, store, activeEntities, root);
|
|
33
|
+
watch(
|
|
34
|
+
el,
|
|
35
|
+
() => {
|
|
36
|
+
console.info(`[CLIENT]: Client element changed. ${el.value ? "Mounting client..." : "Unmounting client..."}`);
|
|
37
|
+
if (!el.value) {
|
|
38
|
+
client?.app?.unmount();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const clientConfig = toValue(config);
|
|
42
|
+
const mount = createApiClientModal({
|
|
43
|
+
el: el.value,
|
|
44
|
+
configuration: {
|
|
45
|
+
...clientConfig,
|
|
46
|
+
plugins: typeof clientConfig.onBeforeRequest === "function" ? [
|
|
47
|
+
() => ({
|
|
48
|
+
name: "on-before-request",
|
|
49
|
+
hooks: {
|
|
50
|
+
onBeforeRequest: clientConfig.onBeforeRequest
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
] : []
|
|
54
|
+
},
|
|
55
|
+
store
|
|
56
|
+
});
|
|
57
|
+
client = mount.client;
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
immediate: true
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
watchDebounced(
|
|
64
|
+
() => toValue(config),
|
|
65
|
+
(newConfig, oldConfig) => {
|
|
66
|
+
if (!oldConfig || !activeEntities.activeCollection.value) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
microdiff(oldConfig, newConfig).forEach((d) => {
|
|
70
|
+
if (d.path[0] === "authentication") {
|
|
71
|
+
mutateSecuritySchemeDiff(d, activeEntities, store);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
{ deep: true, debounce: 300 }
|
|
76
|
+
);
|
|
77
|
+
watch(
|
|
78
|
+
[() => toValue(config).servers, () => toValue(dereferencedDocument)?.servers, () => toValue(config).baseServerURL],
|
|
79
|
+
([newServers], [oldServers]) => {
|
|
80
|
+
if (newServers || oldServers) {
|
|
81
|
+
const servers = getServersFromDocument(newServers ?? toValue(dereferencedDocument)?.servers, {
|
|
82
|
+
baseServerURL: toValue(config).baseServerURL
|
|
83
|
+
});
|
|
84
|
+
emitCustomEvent(el.value, "scalar-replace-servers", {
|
|
85
|
+
servers,
|
|
86
|
+
options: {
|
|
87
|
+
disableOldStoreUpdate: true
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
watchDebounced(
|
|
94
|
+
() => toValue(dereferencedDocument),
|
|
95
|
+
(newDocument, oldDocument) => {
|
|
96
|
+
if (!newDocument) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const diff = microdiff(newDocument, oldDocument || {});
|
|
100
|
+
if (!diff?.length) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (activeEntities.activeCollection.value) {
|
|
104
|
+
client?.resetStore();
|
|
105
|
+
}
|
|
106
|
+
return store.importSpecFile(void 0, "default", {
|
|
107
|
+
dereferencedDocument: toRaw(newDocument),
|
|
108
|
+
shouldLoad: true,
|
|
109
|
+
documentUrl: toValue(documentUrl),
|
|
110
|
+
useCollectionSecurity: true,
|
|
111
|
+
...toValue(config)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
const { activeCollection, activeEnvVariables, activeEnvironment, activeWorkspace } = activeEntities;
|
|
116
|
+
const activeServer = computed(() => {
|
|
117
|
+
if (!activeCollection.value) {
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
120
|
+
if (activeCollection.value.selectedServerUid) {
|
|
121
|
+
const server = store.servers[activeCollection.value.selectedServerUid];
|
|
122
|
+
if (server) {
|
|
123
|
+
return server;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return store.servers[activeCollection.value.servers[0] ?? ""];
|
|
127
|
+
});
|
|
128
|
+
const getSecuritySchemes = (operationSecurity, documentSecurity) => {
|
|
129
|
+
return filterSecurityRequirements(
|
|
130
|
+
operationSecurity || documentSecurity || [],
|
|
131
|
+
activeCollection.value?.selectedSecuritySchemeUids || [],
|
|
132
|
+
store.securitySchemes
|
|
133
|
+
).map(convertSecurityScheme);
|
|
134
|
+
};
|
|
135
|
+
return {
|
|
136
|
+
activeServer,
|
|
137
|
+
activeEnvVariables,
|
|
138
|
+
activeEnvironment,
|
|
139
|
+
activeWorkspace,
|
|
140
|
+
getSecuritySchemes,
|
|
141
|
+
openClient: (payload) => client?.open(payload)
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
mapConfigToClientStore
|
|
146
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ApiReferenceConfigurationRaw } from '@scalar/types';
|
|
2
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
4
|
+
export declare const mapConfigToWorkspaceStore: ({ config, store, isDarkMode, }: {
|
|
5
|
+
config: MaybeRefOrGetter<ApiReferenceConfigurationRaw>;
|
|
6
|
+
store: WorkspaceStore;
|
|
7
|
+
isDarkMode: Ref<boolean>;
|
|
8
|
+
}) => void;
|
|
9
|
+
//# sourceMappingURL=map-config-to-workspace-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-config-to-workspace-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-workspace-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAGpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA2C,MAAM,KAAK,CAAA;AAE9F,eAAO,MAAM,yBAAyB,GAAI,gCAIvC;IACD,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,SA4CA,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { isClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
2
|
+
import { safeLocalStorage, REFERENCE_LS_KEYS } from "@scalar/helpers/object/local-storage";
|
|
3
|
+
import { useSeoMeta } from "@unhead/vue";
|
|
4
|
+
import { useFavicon } from "@vueuse/core";
|
|
5
|
+
import { onBeforeMount, watch, toValue, computed } from "vue";
|
|
6
|
+
const mapConfigToWorkspaceStore = ({
|
|
7
|
+
config,
|
|
8
|
+
store,
|
|
9
|
+
isDarkMode
|
|
10
|
+
}) => {
|
|
11
|
+
onBeforeMount(() => {
|
|
12
|
+
const storedClient = safeLocalStorage().getItem(REFERENCE_LS_KEYS.SELECTED_CLIENT);
|
|
13
|
+
if (isClient(storedClient) && !store.workspace["x-scalar-default-client"]) {
|
|
14
|
+
store.update("x-scalar-default-client", storedClient);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
watch(
|
|
18
|
+
() => toValue(config).defaultHttpClient,
|
|
19
|
+
(newValue) => {
|
|
20
|
+
if (newValue) {
|
|
21
|
+
const { targetKey, clientKey } = newValue;
|
|
22
|
+
const clientId = `${targetKey}/${clientKey}`;
|
|
23
|
+
if (isClient(clientId)) {
|
|
24
|
+
store.update("x-scalar-default-client", clientId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{ immediate: true }
|
|
29
|
+
);
|
|
30
|
+
watch(
|
|
31
|
+
() => toValue(config).darkMode,
|
|
32
|
+
(isDark) => store.update("x-scalar-dark-mode", !!isDark)
|
|
33
|
+
);
|
|
34
|
+
watch(
|
|
35
|
+
() => isDarkMode.value,
|
|
36
|
+
(newValue) => store.update("x-scalar-dark-mode", newValue),
|
|
37
|
+
{ immediate: true }
|
|
38
|
+
);
|
|
39
|
+
if (toValue(config).metaData) {
|
|
40
|
+
useSeoMeta(toValue(config).metaData);
|
|
41
|
+
}
|
|
42
|
+
const favicon = computed(() => toValue(config).favicon);
|
|
43
|
+
useFavicon(favicon);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
mapConfigToWorkspaceStore
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1E,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const mapConfiguration = (config) => {
|
|
2
|
+
return {
|
|
3
|
+
"x-scalar-reference-config": {
|
|
4
|
+
title: config.title,
|
|
5
|
+
slug: config.slug,
|
|
6
|
+
features: {
|
|
7
|
+
// Feature toggles for UI elements and behaviors
|
|
8
|
+
showModels: !config.hideModels,
|
|
9
|
+
expandAllTagSections: config.defaultOpenAllTags,
|
|
10
|
+
persistAuthenticationState: config.persistAuth,
|
|
11
|
+
showDarkModeToggle: !config.hideDarkModeToggle,
|
|
12
|
+
showDownload: !config.hideDownloadButton,
|
|
13
|
+
showSearch: !config.hideSearch,
|
|
14
|
+
showSidebar: config.showSidebar,
|
|
15
|
+
showTestRequestButton: !config.hideTestRequestButton
|
|
16
|
+
},
|
|
17
|
+
appearance: {
|
|
18
|
+
// Appearance-related configuration
|
|
19
|
+
css: config.customCss,
|
|
20
|
+
favicon: config.favicon,
|
|
21
|
+
forceColorMode: config.forceDarkModeState,
|
|
22
|
+
initialColorMode: config.darkMode ? "dark" : void 0,
|
|
23
|
+
layout: config.layout,
|
|
24
|
+
loadDefaultFonts: config.withDefaultFonts,
|
|
25
|
+
theme: config.theme
|
|
26
|
+
},
|
|
27
|
+
routing: {
|
|
28
|
+
// Routing configuration
|
|
29
|
+
basePath: config.pathRouting?.basePath
|
|
30
|
+
},
|
|
31
|
+
settings: {
|
|
32
|
+
// Miscellaneous settings
|
|
33
|
+
proxyUrl: config.proxyUrl,
|
|
34
|
+
searchKey: config.searchHotKey,
|
|
35
|
+
baseServerUrl: config.baseServerURL,
|
|
36
|
+
servers: config.servers
|
|
37
|
+
},
|
|
38
|
+
meta: config.metaData,
|
|
39
|
+
// In memory configuration
|
|
40
|
+
tagSort: config.tagsSorter,
|
|
41
|
+
operationsSorter: config.operationsSorter,
|
|
42
|
+
generateHeadingSlug: config.generateHeadingSlug,
|
|
43
|
+
generateModelSlug: config.generateModelSlug,
|
|
44
|
+
generateOperationSlug: config.generateOperationSlug,
|
|
45
|
+
generateTagSlug: config.generateTagSlug,
|
|
46
|
+
generateWebhookSlug: config.generateWebhookSlug
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
mapConfiguration
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/helpers/markdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWnD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAMhE;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,OAAO,EAAE,KAAG,aAQ3D,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type AnyApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithSource } from '@scalar/types';
|
|
2
|
+
import GithubSlugger from 'github-slugger';
|
|
3
|
+
/** Processed API Reference Configuration
|
|
4
|
+
*
|
|
5
|
+
* Creates the required title and slug for the API Reference.
|
|
6
|
+
* Separate the source into a dedicated object
|
|
7
|
+
* Returns the raw configuration to pass to components
|
|
8
|
+
*/
|
|
9
|
+
export type NormalizedConfiguration = {
|
|
10
|
+
title: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
config: ApiReferenceConfigurationRaw;
|
|
13
|
+
default: boolean;
|
|
14
|
+
source: {
|
|
15
|
+
url: string;
|
|
16
|
+
content?: never;
|
|
17
|
+
} | {
|
|
18
|
+
content: Record<string, unknown>;
|
|
19
|
+
url?: never;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type NormalizedConfigurations = Record<string, NormalizedConfiguration>;
|
|
23
|
+
type ConfigWithRequiredSource = Omit<ApiReferenceConfigurationWithSource, 'url' | 'content'> & ({
|
|
24
|
+
url: string;
|
|
25
|
+
content?: never;
|
|
26
|
+
} | {
|
|
27
|
+
content: Record<string, unknown>;
|
|
28
|
+
url?: never;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Take any configuration and return a flat array of configurations.
|
|
32
|
+
*/
|
|
33
|
+
export declare const normalizeConfigurations: (configuration: AnyApiReferenceConfiguration | undefined) => NormalizedConfigurations;
|
|
34
|
+
/** Normalize content into a JS object or return null if it is falsey */
|
|
35
|
+
export declare const normalizeContent: (content: string | Record<string, unknown> | (() => string | Record<string, unknown>)) => Record<string, unknown> | null;
|
|
36
|
+
/** Process a single spec configuration so that it has a title and a slug */
|
|
37
|
+
export declare const addSlugAndTitle: (source: ConfigWithRequiredSource, index: number | undefined, slugger: GithubSlugger) => ConfigWithRequiredSource & {
|
|
38
|
+
slug: string;
|
|
39
|
+
title: string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=normalize-configurations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-configurations.d.ts","sourceRoot":"","sources":["../../src/helpers/normalize-configurations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EAGzC,MAAM,eAAe,CAAA;AACtB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,4BAA4B,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,GAAG,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAC7F,CAAA;AAED,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;AAEvE,KAAK,wBAAwB,GAAG,IAAI,CAAC,mCAAmC,EAAE,KAAK,GAAG,SAAS,CAAC,GAC1F,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,wBAmDF,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACnF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAc5B,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,eAAe,GAC1B,QAAQ,wBAAwB,EAChC,yBAAS,EACT,SAAS,aAAa,KACrB,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAyB1D,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { parseJsonOrYaml } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { isConfigurationWithSources, apiReferenceConfigurationWithSourceSchema } from "@scalar/types";
|
|
3
|
+
import GitHubSlugger from "github-slugger";
|
|
4
|
+
const normalizeConfigurations = (configuration) => {
|
|
5
|
+
const slugger = new GitHubSlugger();
|
|
6
|
+
const normalized = {};
|
|
7
|
+
if (!configuration) {
|
|
8
|
+
return normalized;
|
|
9
|
+
}
|
|
10
|
+
const configList = Array.isArray(configuration) ? configuration : [configuration];
|
|
11
|
+
configList.flatMap((c) => {
|
|
12
|
+
if (isConfigurationWithSources(c)) {
|
|
13
|
+
const { sources: configSources, ...rest } = c;
|
|
14
|
+
return configSources?.map((source) => ({ ...rest, ...source })) ?? [];
|
|
15
|
+
}
|
|
16
|
+
return [c];
|
|
17
|
+
}).map((source) => {
|
|
18
|
+
const validated = apiReferenceConfigurationWithSourceSchema.safeParse(source);
|
|
19
|
+
return validated.success ? validated.data : null;
|
|
20
|
+
}).filter((c) => !!c && (!!c.url || !!c.content)).map((source, index) => addSlugAndTitle(source, index, slugger)).forEach((c) => {
|
|
21
|
+
const { url, content, ...config } = c;
|
|
22
|
+
normalized[c.slug] = {
|
|
23
|
+
config,
|
|
24
|
+
title: c.title,
|
|
25
|
+
slug: c.slug,
|
|
26
|
+
default: !!c?.default,
|
|
27
|
+
source: content ? { content: normalizeContent(content) ?? {} } : { url }
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
return normalized;
|
|
31
|
+
};
|
|
32
|
+
const normalizeContent = (content) => {
|
|
33
|
+
if (!content) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
if (typeof content === "function") {
|
|
37
|
+
return normalizeContent(content());
|
|
38
|
+
}
|
|
39
|
+
if (typeof content === "string") {
|
|
40
|
+
return parseJsonOrYaml(content);
|
|
41
|
+
}
|
|
42
|
+
return content;
|
|
43
|
+
};
|
|
44
|
+
const addSlugAndTitle = (source, index = 0, slugger) => {
|
|
45
|
+
if (source.title) {
|
|
46
|
+
return {
|
|
47
|
+
...source,
|
|
48
|
+
slug: source.slug || slugger.slug(source.title),
|
|
49
|
+
title: source.title
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (source.slug) {
|
|
53
|
+
return {
|
|
54
|
+
...source,
|
|
55
|
+
slug: slugger.slug(source.slug),
|
|
56
|
+
title: source.slug
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
...source,
|
|
61
|
+
slug: `api-${index + 1}`,
|
|
62
|
+
title: `API #${index + 1}`
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
addSlugAndTitle,
|
|
67
|
+
normalizeConfigurations,
|
|
68
|
+
normalizeContent
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/helpers/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEpH;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,CAAC,YAAY,GAAG,MAAM,CAejF;AA+BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,EAAE,GAAG,OAAO,CAYjF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,OAAO,CAAC,QAAQ,CACvB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,eAAe,gBA2D5D"}
|