@scalar/api-reference 1.34.5 → 1.35.0
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 +71 -0
- package/dist/browser/standalone.js +30859 -30766
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts +6 -11
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +11 -13
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.d.ts +14 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +24 -10
- package/dist/components/ApiReferenceLayout.vue.d.ts +7 -31
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +179 -191
- package/dist/components/Badge/Badge.vue.d.ts +6 -11
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/ClassicHeader.vue.d.ts +8 -12
- package/dist/components/ClassicHeader.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -3
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/index.d.ts +1 -1
- package/dist/components/Content/Content.vue.d.ts +9 -12
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +180 -36
- package/dist/components/Content/IntroductionSection.vue.d.ts +18 -0
- package/dist/components/Content/IntroductionSection.vue.d.ts.map +1 -0
- package/dist/components/Content/IntroductionSection.vue.js +26 -0
- package/dist/components/Content/IntroductionSection.vue2.js +4 -0
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Models/ModernLayout.vue2.js +6 -6
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +1 -5
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +28 -35
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
- package/dist/components/Content/Schema/RenderString.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +84 -81
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +3 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +49 -41
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +6 -11
- package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts +10 -13
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +6 -11
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +6 -11
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts +5 -63
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts +7 -11
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.js +1 -1
- package/dist/components/GettingStarted.vue.d.ts +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +5 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/IntersectionObserver.vue.d.ts +5 -12
- package/dist/components/IntersectionObserver.vue.d.ts.map +1 -1
- package/dist/components/Lazy/Lazy.vue.d.ts +5 -10
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/LinkList/LinkList.vue.d.ts +6 -13
- package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -1
- package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts +6 -11
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/OperationPath.vue.d.ts +1 -1
- package/dist/components/OperationPath.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/ScreenReader.vue.d.ts +7 -11
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.d.ts +8 -12
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.d.ts +5 -10
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.d.ts +13 -66
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionColumn.vue.d.ts +6 -11
- package/dist/components/Section/SectionColumn.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionColumns.vue.d.ts +6 -11
- package/dist/components/Section/SectionColumns.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainer.vue.d.ts +7 -11
- package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts +8 -12
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContent.vue.d.ts +6 -11
- package/dist/components/Section/SectionContent.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts +8 -12
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.d.ts +5 -10
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +5 -10
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts +5 -10
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +2 -2
- package/dist/features/Operation/helpers/combine-params.d.ts +1 -2
- package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +35 -34
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -3
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +28 -27
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +50 -53
- package/dist/features/api-client-modal/useApiClient.d.ts +496 -496
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -13
- package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -2
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts +5 -10
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts +7 -11
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +9 -9
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -1
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
- package/dist/features/info-object/License.vue.d.ts +1 -1
- package/dist/features/info-object/License.vue.d.ts.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/sidebar/components/Sidebar.vue.d.ts +8 -14
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts +8 -12
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +60 -55
- package/dist/features/sidebar/components/SidebarGroup.vue.d.ts +6 -11
- package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts +5 -10
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.d.ts.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.js +2 -47
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +47 -2
- package/dist/features/specification-extension/helpers.d.ts +10 -0
- package/dist/features/specification-extension/helpers.d.ts.map +1 -0
- package/dist/features/specification-extension/helpers.js +4 -0
- package/dist/features/specification-extension/index.d.ts +1 -0
- package/dist/features/specification-extension/index.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts +3 -1
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +7 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +3 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +3 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +5 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +1 -3
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
- package/dist/helpers/convert-security-scheme.d.ts +1 -1
- package/dist/helpers/convert-security-scheme.d.ts.map +1 -1
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useFreezing.d.ts +6 -0
- package/dist/hooks/useFreezing.d.ts.map +1 -0
- package/dist/hooks/useFreezing.js +29 -0
- package/dist/hooks/useNavState.d.ts +1 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -16
- package/dist/libs/download.d.ts +0 -5
- package/dist/libs/download.d.ts.map +1 -1
- package/dist/libs/download.js +10 -13
- package/dist/libs/markdown.d.ts.map +1 -1
- package/dist/libs/openapi.d.ts +2 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +11 -14
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +92 -95
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +223 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +64 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +17 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +267 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +151 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +96 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +50 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +50 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +17 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +253 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts +8 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +22 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +15 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +7 -0
- package/dist/{components/Content/ClientLibraries/ClientSelector.vue2.js → v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js} +33 -33
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +16 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +7 -0
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +124 -0
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +11 -0
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-client-selector-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-client-selector-block/index.d.ts.map +1 -0
- package/dist/{features/base-url/BaseUrl.vue.d.ts → v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts} +3 -4
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +7 -0
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +62 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +36 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +49 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue2.js +4 -0
- package/dist/{components/Content/Introduction/Description.vue.d.ts → v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts} +2 -2
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +7 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue2.js +72 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.js +36 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue2.js +4 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.d.ts +7 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.js +25 -0
- package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue2.js +4 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts +16 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +7 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue2.js +17 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +4 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts +13 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +13 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +4 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +27 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +7 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +122 -0
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +4 -0
- package/dist/{features/download-link/DownloadLink.vue.d.ts → v2/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts} +2 -2
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.js +19 -0
- package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +4 -0
- package/dist/v2/blocks/scalar-info-block/index.d.ts +3 -0
- package/dist/v2/blocks/scalar-info-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +5 -8
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +38 -52
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +7 -8
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +148 -133
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -3
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +4 -3
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +51 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +78 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue2.js +4 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts +18 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +72 -0
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +4 -0
- package/dist/v2/blocks/scalar-server-selector-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-server-selector-block/index.d.ts.map +1 -0
- package/dist/v2/helpers/get-document-name.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.d.ts +1 -1
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/dist/v2/helpers/normalize-content.d.ts.map +1 -1
- package/dist/v2/hooks/use-legacy-store-events.d.ts +14 -0
- package/dist/v2/hooks/use-legacy-store-events.d.ts.map +1 -0
- package/dist/v2/hooks/use-legacy-store-events.js +65 -0
- package/dist/v2/hooks/use-workspace-store-events.d.ts +4 -0
- package/dist/v2/hooks/use-workspace-store-events.d.ts.map +1 -0
- package/dist/v2/hooks/use-workspace-store-events.js +43 -0
- package/package.json +21 -19
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +0 -7
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +0 -122
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +0 -7
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +0 -1
- package/dist/components/Content/Introduction/Description.vue.js +0 -7
- package/dist/components/Content/Introduction/Description.vue2.js +0 -72
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +0 -13
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +0 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +0 -7
- package/dist/components/Content/Introduction/Introduction.vue2.js +0 -113
- package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts +0 -25
- package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts.map +0 -1
- package/dist/components/Content/Introduction/IntroductionSection.vue.js +0 -7
- package/dist/components/Content/Introduction/IntroductionSection.vue2.js +0 -159
- package/dist/components/Content/Introduction/index.d.ts +0 -2
- package/dist/components/Content/Introduction/index.d.ts.map +0 -1
- package/dist/features/base-url/BaseUrl.vue.d.ts.map +0 -1
- package/dist/features/base-url/BaseUrl.vue.js +0 -56
- package/dist/features/base-url/BaseUrl.vue2.js +0 -4
- package/dist/features/base-url/index.d.ts +0 -2
- package/dist/features/base-url/index.d.ts.map +0 -1
- package/dist/features/download-link/DownloadLink.vue.d.ts.map +0 -1
- package/dist/features/download-link/DownloadLink.vue.js +0 -7
- package/dist/features/download-link/DownloadLink.vue2.js +0 -61
- package/dist/features/download-link/index.d.ts +0 -3
- package/dist/features/download-link/index.d.ts.map +0 -1
- package/dist/features/download-link/openapi-version-symbol.d.ts +0 -2
- package/dist/features/download-link/openapi-version-symbol.d.ts.map +0 -1
- package/dist/features/download-link/openapi-version-symbol.js +0 -4
- package/dist/v2/events/definitions.d.ts +0 -44
- package/dist/v2/events/definitions.d.ts.map +0 -1
- package/dist/v2/events/definitions.js +0 -7
- package/dist/v2/events/index.d.ts +0 -3
- package/dist/v2/events/index.d.ts.map +0 -1
- package/dist/v2/events/listeners.d.ts +0 -8
- package/dist/v2/events/listeners.d.ts.map +0 -1
- package/dist/v2/events/listeners.js +0 -15
- /package/dist/{components/Content/ClientLibraries/ClientLibraries.vue3.js → v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js} +0 -0
- /package/dist/{components/Content/ClientLibraries/ClientSelector.vue3.js → v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js} +0 -0
- /package/dist/{components/Content/Introduction/Description.vue3.js → v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js} +0 -0
- /package/dist/{components/Content/Introduction/Introduction.vue3.js → v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js} +0 -0
- /package/dist/{components/Content/ClientLibraries → v2/blocks/scalar-client-selector-block/helpers}/featured-clients.js +0 -0
- /package/dist/{features/download-link → v2/blocks/scalar-info-block/components}/DownloadLink.vue3.js +0 -0
- /package/dist/{components/Content/Introduction/IntroductionSection.vue3.js → v2/blocks/scalar-info-block/components/InfoDescription.vue3.js} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarCard as
|
|
3
|
-
import { freezeElement as
|
|
4
|
-
import { ScalarIconCaretDown as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { defineComponent as F, computed as i, ref as x, watch as U, useId as T, createBlock as q, createCommentVNode as C, openBlock as h, unref as a, withCtx as r, createVNode as n, createSlots as A, createElementVNode as b, createElementBlock as V, renderSlot as k, toDisplayString as G } from "vue";
|
|
2
|
+
import { ScalarCard as W, ScalarCardHeader as J, ScalarCombobox as P, ScalarButton as Q, ScalarCardSection as j, ScalarCodeBlock as X, ScalarCardFooter as Y } from "@scalar/components";
|
|
3
|
+
import { freezeElement as Z } from "@scalar/helpers/dom/freeze-element";
|
|
4
|
+
import { ScalarIconCaretDown as _ } from "@scalar/icons";
|
|
5
|
+
import { operationToHar as ee } from "@scalar/oas-utils/helpers/operation-to-har";
|
|
6
|
+
import { emitCustomEvent as w } from "@scalar/workspace-store/events";
|
|
7
|
+
import { getResolvedRef as te } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
8
|
+
import { getResolvedRefDeep as E } from "../../../../features/example-responses/helpers/get-resolved-ref-deep.js";
|
|
9
|
+
import { findClient as L } from "../helpers/find-client.js";
|
|
10
|
+
import { generateCustomId as O } from "../helpers/generate-client-options.js";
|
|
11
|
+
import { generateCodeSnippet as le } from "../helpers/generate-code-snippet.js";
|
|
12
|
+
import { getSecrets as oe } from "../helpers/get-secrets.js";
|
|
13
|
+
import ae from "./ExamplePicker.vue2.js";
|
|
14
|
+
import R from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
15
|
+
const se = ["innerHTML"], ne = { class: "text-base font-normal" }, re = ["id"], ue = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "request-card-footer-addon"
|
|
17
|
-
},
|
|
18
|
-
...
|
|
18
|
+
}, ie = { class: "request-header" }, ce = {}, $e = /* @__PURE__ */ F({
|
|
19
|
+
...ce,
|
|
19
20
|
__name: "RequestExample",
|
|
20
21
|
props: {
|
|
21
22
|
clientOptions: {},
|
|
@@ -28,122 +29,139 @@ const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], l
|
|
|
28
29
|
path: {},
|
|
29
30
|
operation: {},
|
|
30
31
|
fallback: { type: Boolean },
|
|
31
|
-
generateLabel: { type: Function }
|
|
32
|
+
generateLabel: { type: Function },
|
|
33
|
+
isWebhook: { type: Boolean }
|
|
32
34
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
var s,
|
|
36
|
-
const
|
|
37
|
-
return ((
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
),
|
|
35
|
+
setup(l) {
|
|
36
|
+
const c = i(() => {
|
|
37
|
+
var s, f;
|
|
38
|
+
const e = ((s = te(l.operation.requestBody)) == null ? void 0 : s.content) ?? {}, t = l.selectedContentType || Object.keys(e)[0];
|
|
39
|
+
return ((f = e[t]) == null ? void 0 : f.examples) ?? {};
|
|
40
|
+
}), v = x(
|
|
41
|
+
l.selectedExample ?? Object.keys(c.value)[0]
|
|
42
|
+
), g = i(() => [
|
|
41
43
|
"x-custom-examples",
|
|
42
44
|
"x-codeSamples",
|
|
43
45
|
"x-code-samples"
|
|
44
|
-
].flatMap((
|
|
46
|
+
].flatMap((t) => l.operation[t] ?? [])), p = i(() => g.value.length ? [
|
|
45
47
|
{
|
|
46
48
|
label: "Code Examples",
|
|
47
|
-
options:
|
|
48
|
-
const
|
|
49
|
+
options: g.value.map((t) => {
|
|
50
|
+
const o = O(t), s = t.label || t.lang || o;
|
|
49
51
|
return {
|
|
50
|
-
id:
|
|
51
|
-
lang:
|
|
52
|
+
id: o,
|
|
53
|
+
lang: t.lang || "plaintext",
|
|
52
54
|
title: s,
|
|
53
55
|
label: s
|
|
54
56
|
};
|
|
55
57
|
})
|
|
56
58
|
},
|
|
57
|
-
...
|
|
58
|
-
] :
|
|
59
|
-
|
|
59
|
+
...l.clientOptions
|
|
60
|
+
] : l.clientOptions), u = x(
|
|
61
|
+
L(p.value, l.selectedClient) ?? null
|
|
60
62
|
);
|
|
61
|
-
|
|
62
|
-
() =>
|
|
63
|
-
(
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
U(
|
|
64
|
+
() => l.selectedClient,
|
|
65
|
+
(e) => {
|
|
66
|
+
const t = L(p.value, e);
|
|
67
|
+
t && (u.value = t);
|
|
66
68
|
}
|
|
67
69
|
);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
+
const y = i(() => {
|
|
71
|
+
if (!l.isWebhook) return null;
|
|
70
72
|
try {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
const e = c.value[v.value || ""], t = E(e), o = (t == null ? void 0 : t.value) ?? (t == null ? void 0 : t.summary);
|
|
74
|
+
return ee({ operation: l.operation, method: l.method, path: l.path, example: o });
|
|
75
|
+
} catch (e) {
|
|
76
|
+
return console.error("[webhookHar]", e), null;
|
|
77
|
+
}
|
|
78
|
+
}), $ = i(() => {
|
|
79
|
+
var e, t, o, s, f;
|
|
80
|
+
try {
|
|
81
|
+
if ((e = u.value) != null && e.id.startsWith("custom"))
|
|
82
|
+
return ((t = g.value.find(
|
|
83
|
+
(M) => {
|
|
84
|
+
var B;
|
|
85
|
+
return O(M) === ((B = u.value) == null ? void 0 : B.id);
|
|
76
86
|
}
|
|
77
|
-
)) == null ? void 0 :
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
clientId: (
|
|
81
|
-
operation:
|
|
82
|
-
method:
|
|
83
|
-
server:
|
|
84
|
-
securitySchemes:
|
|
85
|
-
contentType:
|
|
86
|
-
path:
|
|
87
|
-
example:
|
|
87
|
+
)) == null ? void 0 : t.source) ?? "Custom example not found";
|
|
88
|
+
const S = c.value[v.value || ""], d = E(S), K = (d == null ? void 0 : d.value) ?? (d == null ? void 0 : d.summary);
|
|
89
|
+
return l.isWebhook ? ((s = (o = y.value) == null ? void 0 : o.postData) == null ? void 0 : s.text) ?? "" : le({
|
|
90
|
+
clientId: (f = u.value) == null ? void 0 : f.id,
|
|
91
|
+
operation: l.operation,
|
|
92
|
+
method: l.method,
|
|
93
|
+
server: l.selectedServer,
|
|
94
|
+
securitySchemes: l.securitySchemes,
|
|
95
|
+
contentType: l.selectedContentType,
|
|
96
|
+
path: l.path,
|
|
97
|
+
example: K
|
|
88
98
|
});
|
|
89
|
-
} catch (
|
|
90
|
-
return console.error("[generateSnippet]",
|
|
99
|
+
} catch (S) {
|
|
100
|
+
return console.error("[generateSnippet]", S), "";
|
|
91
101
|
}
|
|
92
|
-
}),
|
|
102
|
+
}), D = i(() => {
|
|
93
103
|
var e;
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
return l.isWebhook ? H.value : (e = u.value) == null ? void 0 : e.lang;
|
|
105
|
+
}), H = i(() => {
|
|
106
|
+
var t;
|
|
107
|
+
if (!((t = y.value) != null && t.postData)) return "json";
|
|
108
|
+
const e = y.value.postData.mimeType;
|
|
109
|
+
return e != null && e.includes("json") ? "json" : e != null && e.includes("xml") ? "xml" : e != null && e.includes("yaml") || e != null && e.includes("yml") ? "yaml" : e != null && e.includes("text/plain") ? "text" : "json";
|
|
110
|
+
}), I = i(() => oe(l.securitySchemes)), m = x(null), N = (e) => {
|
|
111
|
+
var t;
|
|
112
|
+
if (m.value) {
|
|
113
|
+
const o = Z(m.value.$el);
|
|
96
114
|
setTimeout(() => {
|
|
97
|
-
|
|
115
|
+
o();
|
|
98
116
|
}, 300);
|
|
99
117
|
}
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
return (
|
|
118
|
+
u.value = e, e.id.startsWith("custom") || w((t = m.value) == null ? void 0 : t.$el, "scalar-update-selected-client", e.id);
|
|
119
|
+
}, z = T();
|
|
120
|
+
return (e, t) => $.value ? (h(), q(a(W), {
|
|
103
121
|
key: 0,
|
|
104
|
-
class: "request-card dark-mode",
|
|
105
122
|
ref_key: "elem",
|
|
106
|
-
ref:
|
|
123
|
+
ref: m,
|
|
124
|
+
class: "request-card dark-mode"
|
|
107
125
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
n(
|
|
110
|
-
default:
|
|
111
|
-
|
|
112
|
-
n(
|
|
126
|
+
default: r(() => [
|
|
127
|
+
n(a(J), { class: "pr-2.5" }, A({
|
|
128
|
+
default: r(() => [
|
|
129
|
+
t[3] || (t[3] = b("span", { class: "sr-only" }, "Request Example for", -1)),
|
|
130
|
+
n(a(R), {
|
|
113
131
|
as: "span",
|
|
114
132
|
class: "request-method",
|
|
115
|
-
method:
|
|
133
|
+
method: e.method
|
|
116
134
|
}, null, 8, ["method"]),
|
|
117
|
-
|
|
135
|
+
e.generateLabel ? (h(), V("span", {
|
|
118
136
|
key: 0,
|
|
119
|
-
innerHTML:
|
|
120
|
-
}, null, 8,
|
|
137
|
+
innerHTML: e.generateLabel()
|
|
138
|
+
}, null, 8, se)) : e.isWebhook ? C("", !0) : k(e.$slots, "header", { key: 1 }, void 0, !0)
|
|
121
139
|
]),
|
|
122
140
|
_: 2
|
|
123
141
|
}, [
|
|
124
|
-
p.value.length ? {
|
|
142
|
+
!e.isWebhook && p.value.length ? {
|
|
125
143
|
name: "actions",
|
|
126
|
-
fn:
|
|
127
|
-
n(
|
|
144
|
+
fn: r(() => [
|
|
145
|
+
n(a(P), {
|
|
128
146
|
class: "max-h-80",
|
|
129
|
-
modelValue:
|
|
147
|
+
modelValue: u.value,
|
|
130
148
|
options: p.value,
|
|
131
|
-
teleport: "",
|
|
132
149
|
placement: "bottom-end",
|
|
133
|
-
|
|
150
|
+
teleport: "",
|
|
151
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => N(o))
|
|
134
152
|
}, {
|
|
135
|
-
default:
|
|
136
|
-
n(
|
|
137
|
-
"data-testid": "client-picker",
|
|
153
|
+
default: r(() => [
|
|
154
|
+
n(a(Q), {
|
|
138
155
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
|
|
156
|
+
"data-testid": "client-picker",
|
|
139
157
|
fullWidth: "",
|
|
140
158
|
variant: "ghost"
|
|
141
159
|
}, {
|
|
142
|
-
default:
|
|
143
|
-
|
|
144
|
-
n(
|
|
145
|
-
|
|
146
|
-
|
|
160
|
+
default: r(() => [
|
|
161
|
+
b("span", ne, G(u.value.title), 1),
|
|
162
|
+
n(a(_), {
|
|
163
|
+
class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
164
|
+
weight: "bold"
|
|
147
165
|
})
|
|
148
166
|
]),
|
|
149
167
|
_: 1
|
|
@@ -155,74 +173,71 @@ const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], l
|
|
|
155
173
|
key: "0"
|
|
156
174
|
} : void 0
|
|
157
175
|
]), 1024),
|
|
158
|
-
n(
|
|
159
|
-
default:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
], 8, te)
|
|
174
|
-
];
|
|
175
|
-
}),
|
|
176
|
+
n(a(j), { class: "request-editor-section custom-scroll p-0" }, {
|
|
177
|
+
default: r(() => [
|
|
178
|
+
b("div", {
|
|
179
|
+
id: `${a(z)}-example`,
|
|
180
|
+
class: "code-snippet"
|
|
181
|
+
}, [
|
|
182
|
+
n(a(X), {
|
|
183
|
+
class: "bg-b-2 !min-h-full -outline-offset-2",
|
|
184
|
+
content: $.value,
|
|
185
|
+
hideCredentials: I.value,
|
|
186
|
+
lang: D.value,
|
|
187
|
+
lineNumbers: ""
|
|
188
|
+
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
189
|
+
], 8, re)
|
|
190
|
+
]),
|
|
176
191
|
_: 1
|
|
177
192
|
}),
|
|
178
|
-
Object.keys(
|
|
193
|
+
Object.keys(c.value).length || e.$slots.footer ? (h(), q(a(Y), {
|
|
179
194
|
key: 0,
|
|
180
195
|
class: "request-card-footer bg-b-3"
|
|
181
196
|
}, {
|
|
182
|
-
default:
|
|
183
|
-
Object.keys(
|
|
184
|
-
n(
|
|
185
|
-
|
|
186
|
-
modelValue: C.value,
|
|
197
|
+
default: r(() => [
|
|
198
|
+
Object.keys(c.value).length ? (h(), V("div", ue, [
|
|
199
|
+
n(ae, {
|
|
200
|
+
modelValue: v.value,
|
|
187
201
|
"onUpdate:modelValue": [
|
|
188
|
-
|
|
189
|
-
|
|
202
|
+
t[1] || (t[1] = (o) => v.value = o),
|
|
203
|
+
t[2] || (t[2] = (o) => {
|
|
190
204
|
var s;
|
|
191
|
-
return
|
|
205
|
+
return a(w)((s = m.value) == null ? void 0 : s.$el, "scalar-update-selected-example", o);
|
|
192
206
|
})
|
|
193
|
-
]
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
207
|
+
],
|
|
208
|
+
examples: c.value
|
|
209
|
+
}, null, 8, ["modelValue", "examples"])
|
|
210
|
+
])) : C("", !0),
|
|
211
|
+
k(e.$slots, "footer", {}, void 0, !0)
|
|
197
212
|
]),
|
|
198
213
|
_: 3
|
|
199
|
-
})) :
|
|
214
|
+
})) : C("", !0)
|
|
200
215
|
]),
|
|
201
216
|
_: 3
|
|
202
|
-
}, 512)) :
|
|
217
|
+
}, 512)) : e.fallback ? (h(), q(a(W), {
|
|
203
218
|
key: 1,
|
|
204
219
|
class: "request-card dark-mode"
|
|
205
220
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
n(
|
|
208
|
-
default:
|
|
209
|
-
|
|
210
|
-
n(
|
|
221
|
+
default: r(() => [
|
|
222
|
+
n(a(j), { class: "request-card-simple" }, {
|
|
223
|
+
default: r(() => [
|
|
224
|
+
b("div", ie, [
|
|
225
|
+
n(a(R), {
|
|
211
226
|
as: "span",
|
|
212
227
|
class: "request-method",
|
|
213
|
-
method:
|
|
228
|
+
method: e.method
|
|
214
229
|
}, null, 8, ["method"]),
|
|
215
|
-
|
|
230
|
+
k(e.$slots, "header", {}, void 0, !0)
|
|
216
231
|
]),
|
|
217
|
-
|
|
232
|
+
k(e.$slots, "footer", {}, void 0, !0)
|
|
218
233
|
]),
|
|
219
234
|
_: 3
|
|
220
235
|
})
|
|
221
236
|
]),
|
|
222
237
|
_: 3
|
|
223
|
-
})) :
|
|
238
|
+
})) : C("", !0);
|
|
224
239
|
}
|
|
225
240
|
});
|
|
226
241
|
export {
|
|
227
|
-
|
|
242
|
+
$e as default
|
|
228
243
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,GAAI,IAAI,GAAG,KAAG,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAmC,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,GACrB,cAAc,iBAAiB,EAAE,EACjC,WAAW,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
|
package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,WAA6B,CAAA;AAElF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAChC,eAAe,yBAAyB,CAAC,eAAe,CAAC,KACxD,iBAAiB,EAwDnB,CAAA"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { AvailableClients } from '@scalar/snippetz';
|
|
2
|
-
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
|
|
3
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
4
|
-
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
5
2
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
3
|
+
import type { ServerObject, OperationObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
4
|
type Props = {
|
|
7
5
|
clientId: AvailableClients[number];
|
|
8
6
|
operation: OperationObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAA;AAG5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAErE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAClC,SAAS,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACjC,eAAe,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAA;CACrD,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,uFASjC,KAAK,KAAG,MAmBV,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/
|
|
1
|
+
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
/** Extract secrets from security schemes */
|
|
3
3
|
export declare const getSecrets: (securitySchemes: SecuritySchemeObject[]) => string[];
|
|
4
4
|
//# sourceMappingURL=get-secrets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,MAAM,EAqBrD,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { isDefined as o } from "@scalar/helpers/array/is-defined";
|
|
2
|
-
|
|
2
|
+
import { encode as s } from "js-base64";
|
|
3
|
+
const p = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : (r == null ? void 0 : r.type) === "http" ? [
|
|
3
4
|
r["x-scalar-secret-token"],
|
|
4
5
|
r["x-scalar-secret-username"],
|
|
5
6
|
r["x-scalar-secret-password"],
|
|
6
|
-
|
|
7
|
+
s(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
|
|
7
8
|
] : r.type === "oauth2" ? Object.values(r.flows).map((a) => a["x-scalar-secret-token"]) : []).filter(o);
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
p as getSecrets
|
|
10
11
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The selected server URL */
|
|
4
|
+
xSelectedServer?: string;
|
|
5
|
+
/** Available servers */
|
|
6
|
+
servers: ServerObject[];
|
|
7
|
+
/** The id of the target to use for the popover (e.g. address bar) */
|
|
8
|
+
target: string;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
server: import("vue").ComputedRef<{
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
variables?: {
|
|
14
|
+
[x: string]: {
|
|
15
|
+
default?: string | undefined;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
enum?: string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
} | undefined;
|
|
20
|
+
url: string;
|
|
21
|
+
} | undefined>;
|
|
22
|
+
servers: {
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
variables?: {
|
|
25
|
+
[x: string]: {
|
|
26
|
+
default?: string | undefined;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
enum?: string[] | undefined;
|
|
29
|
+
};
|
|
30
|
+
} | undefined;
|
|
31
|
+
url: string;
|
|
32
|
+
}[];
|
|
33
|
+
serverUrlWithoutTrailingSlash: import("vue").ComputedRef<string>;
|
|
34
|
+
serverOptions: import("vue").ComputedRef<{
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
}[]>;
|
|
38
|
+
selectedServer: import("vue").WritableComputedRef<{
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
} | undefined, {
|
|
42
|
+
id: string;
|
|
43
|
+
label: string;
|
|
44
|
+
} | undefined>;
|
|
45
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
46
|
+
"update:modelValue": (value: string) => any;
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
48
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
49
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
export default _default;
|
|
51
|
+
//# sourceMappingURL=Selector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgMF,wBAQG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as S, computed as l, createBlock as w, createElementBlock as b, openBlock as d, unref as u, withCtx as c, createVNode as v, createElementVNode as o, toDisplayString as m } from "vue";
|
|
2
|
+
import { ScalarListbox as h, ScalarButton as y } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as V } from "@scalar/icons";
|
|
4
|
+
const k = { class: "overflow-x-auto" }, B = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
|
|
7
|
+
}, C = { class: "overflow-x-auto" }, N = /* @__PURE__ */ S({
|
|
8
|
+
__name: "Selector",
|
|
9
|
+
props: {
|
|
10
|
+
xSelectedServer: {},
|
|
11
|
+
servers: {},
|
|
12
|
+
target: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(r, { expose: p, emit: f }) {
|
|
16
|
+
const x = f, a = l(
|
|
17
|
+
() => r.servers.map((e) => ({
|
|
18
|
+
id: e.url,
|
|
19
|
+
label: e.url
|
|
20
|
+
}))
|
|
21
|
+
), i = l(() => r.servers.find((e) => e.url === r.xSelectedServer)), s = l(
|
|
22
|
+
() => {
|
|
23
|
+
var e, t;
|
|
24
|
+
return ((t = (e = i.value) == null ? void 0 : e.url) == null ? void 0 : t.replace(/\/$/, "")) || "";
|
|
25
|
+
}
|
|
26
|
+
), n = l({
|
|
27
|
+
get: () => {
|
|
28
|
+
if (r.xSelectedServer && a.value.length > 0)
|
|
29
|
+
return a.value.find((e) => e.id === r.xSelectedServer);
|
|
30
|
+
},
|
|
31
|
+
set: (e) => {
|
|
32
|
+
e && x("update:modelValue", e.id);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return p({
|
|
36
|
+
server: i,
|
|
37
|
+
servers: r.servers,
|
|
38
|
+
serverUrlWithoutTrailingSlash: s,
|
|
39
|
+
serverOptions: a,
|
|
40
|
+
selectedServer: n
|
|
41
|
+
}), (e, t) => a.value.length > 1 ? (d(), w(u(h), {
|
|
42
|
+
key: 0,
|
|
43
|
+
ref: "elem",
|
|
44
|
+
modelValue: n.value,
|
|
45
|
+
"onUpdate:modelValue": t[0] || (t[0] = (g) => n.value = g),
|
|
46
|
+
class: "group",
|
|
47
|
+
options: a.value,
|
|
48
|
+
placement: "bottom-start",
|
|
49
|
+
resize: "",
|
|
50
|
+
target: e.target
|
|
51
|
+
}, {
|
|
52
|
+
default: c(() => [
|
|
53
|
+
v(u(y), {
|
|
54
|
+
class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-lg px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
|
|
55
|
+
variant: "ghost"
|
|
56
|
+
}, {
|
|
57
|
+
default: c(() => [
|
|
58
|
+
t[1] || (t[1] = o("span", { class: "sr-only" }, "Server:", -1)),
|
|
59
|
+
o("span", k, m(s.value), 1),
|
|
60
|
+
v(u(V), {
|
|
61
|
+
class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
62
|
+
weight: "bold"
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
_: 1,
|
|
66
|
+
__: [1]
|
|
67
|
+
})
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["modelValue", "options", "target"])) : (d(), b("div", B, [
|
|
71
|
+
t[2] || (t[2] = o("span", { class: "sr-only" }, "Server:", -1)),
|
|
72
|
+
o("span", C, m(s.value), 1)
|
|
73
|
+
]));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
N as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
export type SelectorProps = {
|
|
3
|
+
/** The selected server URL */
|
|
4
|
+
xSelectedServer?: string;
|
|
5
|
+
/** Available servers */
|
|
6
|
+
servers: ServerObject[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* ServerSelector
|
|
10
|
+
*
|
|
11
|
+
* Core component for rendering a server selector block.
|
|
12
|
+
* Handles server selection and emits a 'scalar-update-selected-server' event when the selected server changes.
|
|
13
|
+
*
|
|
14
|
+
* @event scalar-update-selected-server - Emitted when the selected server changes
|
|
15
|
+
*/
|
|
16
|
+
declare const _default: import("vue").DefineComponent<SelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=ServerSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAOhG,MAAM,MAAM,aAAa,GAAG;IAC1B,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;GAOG;;AACH,wBA+KC"}
|