@scalar/api-reference 1.32.9 → 1.33.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 +99 -0
- package/dist/browser/standalone.js +17026 -16443
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +50 -5
- package/dist/components/Anchor/Anchor.vue2.js +2 -42
- package/dist/components/ApiReference.vue.js +6 -6
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +6 -6
- package/dist/components/ApiReferenceLayout.vue2.js +167 -176
- package/dist/components/ApiReferenceLayout.vue3.js +4 -0
- package/dist/components/ApiReferenceLayout.vue4.js +4 -0
- package/dist/components/ApiReferenceLayout.vue5.js +4 -0
- package/dist/components/ApiReferenceLayout.vue6.js +4 -0
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +4 -4
- package/dist/components/Badge/Badge.vue2.js +4 -0
- package/dist/components/ClassicHeader.vue.js +1 -1
- package/dist/components/ClassicHeader.vue2.js +4 -0
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +14 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +3 -3
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +74 -84
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue3.js +4 -0
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +8 -0
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +81 -80
- package/dist/components/Content/ClientLibraries/ClientSelector.vue3.js +4 -0
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts +11 -0
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -0
- package/dist/components/Content/ClientLibraries/featured-clients.js +17 -0
- package/dist/components/Content/Content.vue.d.ts +5 -6
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +49 -6
- package/dist/components/Content/Content.vue2.js +2 -160
- package/dist/components/Content/Content.vue3.js +5 -0
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +3 -3
- package/dist/components/Content/Introduction/Description.vue3.js +4 -0
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +7 -17
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +103 -118
- package/dist/components/Content/Introduction/Introduction.vue3.js +4 -0
- package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts +25 -0
- package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts.map +1 -0
- package/dist/components/Content/Introduction/IntroductionSection.vue.js +7 -0
- package/dist/components/Content/Introduction/IntroductionSection.vue2.js +159 -0
- package/dist/components/Content/Introduction/IntroductionSection.vue3.js +4 -0
- package/dist/components/Content/Models/{ModelsAccordion.vue.d.ts → ClassicLayout.vue.d.ts} +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/ClassicLayout.vue.js +7 -0
- package/dist/components/Content/Models/{ModelsAccordion.vue2.js → ClassicLayout.vue2.js} +30 -30
- package/dist/components/Content/Models/ClassicLayout.vue3.js +4 -0
- package/dist/components/Content/Models/Models.vue.d.ts +3 -1
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +38 -5
- package/dist/components/Content/Models/Models.vue2.js +2 -114
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +7 -0
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/ModernLayout.vue.js +7 -0
- package/dist/components/Content/Models/ModernLayout.vue2.js +100 -0
- package/dist/components/Content/Models/ModernLayout.vue3.js +4 -0
- package/dist/components/Content/Models/index.d.ts +0 -1
- package/dist/components/Content/Models/index.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +21 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.js +95 -0
- package/dist/components/Content/Operations/TraversedEntry.vue2.js +4 -0
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +17 -0
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -0
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +56 -0
- package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +4 -0
- package/dist/components/Content/Operations/index.d.ts +2 -0
- package/dist/components/Content/Operations/index.d.ts.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +63 -68
- package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +23 -22
- package/dist/components/Content/Schema/SchemaHeading.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +34 -33
- package/dist/components/Content/Schema/SchemaProperty.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +26 -23
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +4 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +59 -52
- 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 +24 -20
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/{Tag/TagAccordion.vue.d.ts → Tags/ClassicLayout.vue.d.ts} +3 -3
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/ClassicLayout.vue.js +7 -0
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +51 -0
- package/dist/components/Content/Tags/ClassicLayout.vue3.js +4 -0
- package/dist/components/Content/{Tag/TagSection.vue.d.ts → Tags/ModernLayout.vue.d.ts} +17 -13
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/ModernLayout.vue.js +7 -0
- package/dist/components/Content/Tags/ModernLayout.vue2.js +69 -0
- package/dist/components/Content/Tags/ModernLayout.vue3.js +4 -0
- package/dist/components/Content/Tags/Tag.vue.d.ts +25 -0
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/Tag.vue.js +27 -0
- package/dist/components/Content/{Tag/Tag.vue.d.ts → Tags/TagSection.vue.d.ts} +3 -6
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -0
- package/dist/components/Content/Tags/TagSection.vue.js +104 -0
- package/dist/components/Content/Tags/TagSection.vue2.js +4 -0
- package/dist/components/Content/Tags/index.d.ts +2 -0
- package/dist/components/Content/Tags/index.d.ts.map +1 -0
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue3.js +4 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +8 -6
- package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.d.ts +1 -10
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -0
- package/dist/components/Lazy/Lazy.vue2.js +25 -0
- package/dist/components/Lazy/index.d.ts +3 -0
- package/dist/components/Lazy/index.d.ts.map +1 -0
- package/dist/components/Lazy/lazyBus.d.ts +8 -0
- package/dist/components/Lazy/lazyBus.d.ts.map +1 -0
- package/dist/components/Lazy/lazyBus.js +7 -0
- package/dist/components/LinkList/LinkList.vue.d.ts +20 -0
- package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -0
- package/dist/components/LinkList/LinkList.vue.js +7 -0
- package/dist/components/LinkList/LinkList.vue2.js +32 -0
- package/dist/components/LinkList/LinkList.vue3.js +4 -0
- package/dist/components/LinkList/index.d.ts +2 -0
- package/dist/components/LinkList/index.d.ts.map +1 -0
- package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
- package/dist/components/LoadingSkeleton.vue.js +3 -3
- package/dist/components/LoadingSkeleton.vue3.js +4 -0
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue3.js +4 -0
- package/dist/components/OperationPath.vue.js +1 -1
- package/dist/components/OperationPath.vue3.js +4 -0
- package/dist/components/{Content/Tag → OperationsList}/OperationsList.vue.d.ts +2 -5
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.js +7 -0
- package/dist/components/OperationsList/OperationsList.vue2.js +60 -0
- package/dist/components/OperationsList/OperationsList.vue3.js +4 -0
- package/dist/components/{Content/Tag → OperationsList}/OperationsListItem.vue.d.ts +2 -4
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -0
- package/dist/components/OperationsList/OperationsListItem.vue.js +7 -0
- package/dist/components/OperationsList/OperationsListItem.vue2.js +63 -0
- package/dist/components/OperationsList/OperationsListItem.vue3.js +4 -0
- package/dist/components/OperationsList/index.d.ts +2 -0
- package/dist/components/OperationsList/index.d.ts.map +1 -0
- package/dist/components/ScreenReader.vue.js +1 -1
- package/dist/components/ScreenReader.vue3.js +4 -0
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue2.js +35 -36
- package/dist/components/Section/CompactSection.vue3.js +4 -0
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue3.js +4 -0
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +3 -3
- package/dist/components/Section/SectionAccordion.vue2.js +42 -36
- package/dist/components/Section/SectionAccordion.vue3.js +4 -0
- package/dist/components/Section/SectionColumn.vue.js +1 -1
- package/dist/components/Section/SectionColumn.vue2.js +4 -0
- package/dist/components/Section/SectionColumns.vue.js +1 -1
- package/dist/components/Section/SectionColumns.vue2.js +4 -0
- package/dist/components/Section/SectionContainer.vue.d.ts +9 -2
- package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainer.vue.js +5 -11
- package/dist/components/Section/SectionContainer.vue2.js +18 -0
- package/dist/components/Section/SectionContainer.vue3.js +4 -0
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +3 -3
- package/dist/components/Section/SectionContainerAccordion.vue3.js +4 -0
- package/dist/components/Section/SectionContent.vue.js +1 -1
- package/dist/components/Section/SectionContent.vue3.js +4 -0
- package/dist/components/Section/SectionHeader.vue.d.ts +1 -0
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +3 -3
- package/dist/components/Section/SectionHeader.vue2.js +11 -10
- package/dist/components/Section/SectionHeader.vue3.js +4 -0
- package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue3.js +4 -0
- package/dist/components/SectionFlare/SectionFlare.vue.d.ts +3 -0
- package/dist/components/SectionFlare/SectionFlare.vue.d.ts.map +1 -0
- package/dist/components/SectionFlare/SectionFlare.vue.js +13 -0
- package/dist/components/SectionFlare/SectionFlare.vue2.js +4 -0
- package/dist/components/SectionFlare/index.d.ts +2 -0
- package/dist/components/SectionFlare/index.d.ts.map +1 -0
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +3 -3
- package/dist/components/ShowMoreButton.vue2.js +12 -12
- package/dist/components/ShowMoreButton.vue3.js +4 -0
- package/dist/features/Operation/Operation.vue.d.ts +11 -7
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +66 -48
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +28 -30
- package/dist/features/Operation/components/ParameterHeaders.vue.js +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue3.js +4 -0
- package/dist/features/Operation/components/ParameterList.vue.js +1 -1
- package/dist/features/Operation/components/ParameterList.vue3.js +4 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +31 -29
- package/dist/features/Operation/components/ParameterListItem.vue3.js +4 -0
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue3.js +4 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
- 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 +22 -29
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +4 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +25 -18
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +17 -12
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +178 -162
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +4 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +18 -13
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +132 -126
- package/dist/features/Operation/layouts/ModernLayout.vue3.js +4 -0
- package/dist/features/Search/SearchModal.vue.js +4 -4
- package/dist/features/Search/SearchModal.vue2.js +9 -9
- package/dist/features/Search/SearchModal.vue3.js +4 -0
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/useApiClient.d.ts +5188 -5128
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/base-url/BaseUrl.vue.js +26 -26
- package/dist/features/download-link/DownloadLink.vue.js +2 -2
- package/dist/features/download-link/DownloadLink.vue3.js +4 -0
- package/dist/features/example-responses/ExampleResponse.vue.d.ts +4 -2
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
- package/dist/features/example-responses/ExampleResponse.vue2.js +15 -14
- package/dist/features/example-responses/ExampleResponse.vue3.js +4 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +3 -3
- package/dist/features/example-responses/ExampleResponseTab.vue3.js +4 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponseTabList.vue3.js +4 -0
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +3 -2
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +4 -4
- package/dist/features/example-responses/ExampleResponses.vue2.js +110 -104
- package/dist/features/example-responses/ExampleResponses.vue3.js +4 -0
- package/dist/features/external-docs/ExternalDocs.vue.d.ts +7 -0
- package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -0
- package/dist/features/external-docs/ExternalDocs.vue.js +36 -0
- package/dist/features/external-docs/ExternalDocs.vue2.js +4 -0
- package/dist/features/external-docs/index.d.ts +2 -0
- package/dist/features/external-docs/index.d.ts.map +1 -0
- package/dist/features/info-object/Contact.vue.d.ts +7 -0
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -0
- package/dist/features/info-object/Contact.vue.js +44 -0
- package/dist/features/info-object/Contact.vue2.js +4 -0
- package/dist/features/info-object/License.vue.d.ts +7 -0
- package/dist/features/info-object/License.vue.d.ts.map +1 -0
- package/dist/features/info-object/License.vue.js +37 -0
- package/dist/features/info-object/License.vue2.js +4 -0
- package/dist/features/info-object/TermsOfService.vue.d.ts +7 -0
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.js +30 -0
- package/dist/features/info-object/TermsOfService.vue2.js +4 -0
- package/dist/features/info-object/index.d.ts +4 -0
- package/dist/features/info-object/index.d.ts.map +1 -0
- package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
- package/dist/features/sidebar/components/Sidebar.vue3.js +4 -0
- package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
- package/dist/features/sidebar/components/SidebarElement.vue3.js +4 -0
- package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarGroup.vue3.js +4 -0
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +4 -0
- package/dist/features/sidebar/helpers/create-sidebar.js +12 -12
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +3 -3
- package/dist/features/test-request-button/TestRequestButton.vue2.js +21 -19
- package/dist/features/test-request-button/TestRequestButton.vue3.js +4 -0
- package/dist/features/traverse-schema/index.d.ts +2 -1
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/helpers/convert-security-scheme.js +23 -0
- package/dist/helpers/test-utils.d.ts +51 -0
- package/dist/helpers/test-utils.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -23
- package/dist/style.css +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -2
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +100 -83
- package/dist/v2/ApiReferenceWorkspace.vue2.js +4 -0
- package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +2 -4
- 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.vue.js +4 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +72 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +4 -13
- 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 +7 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +231 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +4 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +1 -0
- 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/find-client.js +21 -3
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +12 -13
- 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-client-options.js +33 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts +11 -3
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -1
- package/dist/v2/events/definitions.js +7 -0
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/package.json +18 -18
- package/LICENSE +0 -21
- package/dist/blocks/constants.js +0 -6
- package/dist/blocks/helpers/getPointer.js +0 -12
- package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
- package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
- package/dist/blocks/hooks/useBlockProps.js +0 -24
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +0 -16
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.js +0 -36
- package/dist/components/Content/Lazy/Lazy.vue.d.ts.map +0 -1
- package/dist/components/Content/Lazy/Lazy.vue2.js +0 -22
- package/dist/components/Content/Lazy/Loading.vue.d.ts +0 -18
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +0 -1
- package/dist/components/Content/Lazy/Loading.vue.js +0 -163
- package/dist/components/Content/Lazy/Loading.vue3.js +0 -5
- package/dist/components/Content/Lazy/index.d.ts +0 -3
- package/dist/components/Content/Lazy/index.d.ts.map +0 -1
- package/dist/components/Content/Lazy/lazyBus.d.ts +0 -4
- package/dist/components/Content/Lazy/lazyBus.d.ts.map +0 -1
- package/dist/components/Content/Lazy/lazyBus.js +0 -5
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +0 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +0 -7
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +0 -7
- package/dist/components/Content/Tag/OperationsList.vue2.js +0 -58
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +0 -7
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +0 -67
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/Tag.vue.js +0 -99
- package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +0 -7
- package/dist/components/Content/Tag/TagAccordion.vue2.js +0 -50
- package/dist/components/Content/Tag/TagList.vue.d.ts +0 -22
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/TagList.vue.js +0 -73
- package/dist/components/Content/Tag/TagList.vue2.js +0 -4
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/TagSection.vue.js +0 -7
- package/dist/components/Content/Tag/TagSection.vue2.js +0 -67
- package/dist/components/Content/Tag/index.d.ts +0 -3
- package/dist/components/Content/Tag/index.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.js +0 -7
- package/dist/features/example-request/ExamplePicker.vue2.js +0 -57
- package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -85
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExampleRequest.vue.js +0 -7
- package/dist/features/example-request/ExampleRequest.vue2.js +0 -348
- package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
- package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
- package/dist/features/example-request/TextSelect.vue.js +0 -48
- package/dist/features/example-request/TextSelect.vue3.js +0 -5
- package/dist/features/example-request/index.d.ts +0 -3
- package/dist/features/example-request/index.d.ts.map +0 -1
- package/dist/stores/useHttpClientStore.d.ts +0 -43
- package/dist/stores/useHttpClientStore.d.ts.map +0 -1
- package/dist/stores/useHttpClientStore.js +0 -70
- package/dist/v2/hooks/useStore.d.ts +0 -9
- package/dist/v2/hooks/useStore.d.ts.map +0 -1
- /package/dist/components/Content/{Tag → Tags}/Tag.vue2.js +0 -0
- /package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.js +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
import type { OpenAPIV3_1, Spec } from '@scalar/types/legacy';
|
|
3
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
4
|
export type { ApiReferenceConfiguration };
|
|
4
5
|
export type ReferenceProps = {
|
|
5
6
|
configuration?: AnyApiReferenceConfiguration;
|
|
@@ -36,6 +37,10 @@ export type ReferenceLayoutProps = {
|
|
|
36
37
|
* @deprecated Use `originalDocument` instead.
|
|
37
38
|
*/
|
|
38
39
|
rawSpec?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated this is just temporary until we switch to the new store, we prop drill it down
|
|
42
|
+
*/
|
|
43
|
+
store: WorkspaceStore;
|
|
39
44
|
};
|
|
40
45
|
export type GettingStartedExamples = 'Petstore' | 'CoinMarketCap';
|
|
41
46
|
export type ContentProperties = {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAC/B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,EAAE,iBAAiB,CAAA;KAC9B,CAAA;CACF,CAAA;AACD,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,GAAG,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
|
@@ -2,7 +2,7 @@ import type { AnyApiReferenceConfiguration } from '@scalar/types';
|
|
|
2
2
|
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
configuration?: AnyApiReferenceConfiguration;
|
|
5
|
-
|
|
5
|
+
store: WorkspaceStore;
|
|
6
6
|
};
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
8
|
attrs: Partial<{}>;
|
|
@@ -11,7 +11,9 @@ declare function __VLS_template(): {
|
|
|
11
11
|
footer?(_: {}): any;
|
|
12
12
|
"sidebar-start"?(_: {}): any;
|
|
13
13
|
};
|
|
14
|
-
refs: {
|
|
14
|
+
refs: {
|
|
15
|
+
root: HTMLDivElement;
|
|
16
|
+
};
|
|
15
17
|
rootEl: any;
|
|
16
18
|
};
|
|
17
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAkVA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA0BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAkOF,iBAAS,cAAc;WA8GT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;;;EAcxC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,143 +1,160 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, ref as p, toRef as _, provide as $, useTemplateRef as P, onServerPrefetch as V, onBeforeMount as A, onMounted as B, watch as s, computed as w, createElementBlock as U, openBlock as E, createBlock as K, createCommentVNode as Y, createVNode as D, unref as r, resolveDynamicComponent as F, withCtx as u, createTextVNode as O, toDisplayString as j, renderSlot as v, isRef as H } from "vue";
|
|
2
2
|
import { safeLocalStorage as x, REFERENCE_LS_KEYS as h } from "@scalar/helpers/object/local-storage";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
3
|
+
import { makeUrlAbsolute as J } from "@scalar/helpers/url/make-url-absolute";
|
|
4
|
+
import { parseJsonOrYaml as W, redirectToProxy as q } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { useColorMode as z } from "@scalar/use-hooks/useColorMode";
|
|
6
|
+
import { useSeoMeta as G } from "@unhead/vue";
|
|
7
|
+
import { useFavicon as Q } from "@vueuse/core";
|
|
8
|
+
import X from "../components/ApiReferenceLayout.vue.js";
|
|
9
|
+
import { NAV_STATE_SYMBOL as Z } from "../hooks/useNavState.js";
|
|
10
|
+
import { isClient as y } from "./blocks/scalar-request-example-block/helpers/find-client.js";
|
|
11
|
+
import { useMultipleDocuments as ee } from "../features/multiple-documents/useMultipleDocuments.js";
|
|
12
|
+
import { onCustomEvent as k } from "./events/listeners.js";
|
|
13
|
+
import te from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
14
|
+
const ve = /* @__PURE__ */ N({
|
|
14
15
|
__name: "ApiReferenceWorkspace",
|
|
15
16
|
props: {
|
|
16
17
|
configuration: {},
|
|
17
|
-
|
|
18
|
+
store: {}
|
|
18
19
|
},
|
|
19
20
|
setup(M) {
|
|
20
|
-
const
|
|
21
|
-
availableDocuments:
|
|
21
|
+
const C = M, {
|
|
22
|
+
availableDocuments: d,
|
|
22
23
|
selectedConfiguration: a,
|
|
23
|
-
selectedDocumentIndex:
|
|
24
|
-
isIntersectionEnabled:
|
|
25
|
-
hash:
|
|
24
|
+
selectedDocumentIndex: i,
|
|
25
|
+
isIntersectionEnabled: S,
|
|
26
|
+
hash: g,
|
|
26
27
|
hashPrefix: T
|
|
27
|
-
} =
|
|
28
|
-
configuration:
|
|
29
|
-
isIntersectionEnabled:
|
|
30
|
-
hash:
|
|
31
|
-
hashPrefix:
|
|
32
|
-
}),
|
|
33
|
-
|
|
28
|
+
} = ee({
|
|
29
|
+
configuration: _(C, "configuration"),
|
|
30
|
+
isIntersectionEnabled: p(!1),
|
|
31
|
+
hash: p(""),
|
|
32
|
+
hashPrefix: p("")
|
|
33
|
+
}), b = (e, t) => fetch(
|
|
34
|
+
q(a.value.proxyUrl, e.toString()),
|
|
34
35
|
t
|
|
35
36
|
);
|
|
36
|
-
|
|
37
|
-
const
|
|
37
|
+
$(Z, { isIntersectionEnabled: S, hash: g, hashPrefix: T });
|
|
38
|
+
const c = P("root"), o = C.store, f = d, m = (e) => {
|
|
39
|
+
var t;
|
|
38
40
|
if (o.workspace.documents[e.slug ?? "default"] === void 0) {
|
|
39
41
|
if (e.content) {
|
|
40
|
-
const
|
|
42
|
+
const n = typeof e.content == "string" ? W(e.content) : e.content;
|
|
41
43
|
return o.addDocumentSync({
|
|
42
44
|
name: e.slug ?? "default",
|
|
43
|
-
document: typeof
|
|
45
|
+
document: typeof n == "function" ? n() : n
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
if (e.url)
|
|
47
49
|
return o.addDocument({
|
|
48
50
|
name: e.slug ?? "default",
|
|
49
|
-
url: e.url,
|
|
50
|
-
|
|
51
|
+
url: J(e.url, {
|
|
52
|
+
basePath: (t = a.value.pathRouting) == null ? void 0 : t.basePath
|
|
53
|
+
}),
|
|
54
|
+
fetch: b
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
};
|
|
54
|
-
|
|
55
|
-
e.content &&
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
e.url &&
|
|
58
|
+
f.value.forEach((e) => {
|
|
59
|
+
e.content && m(e);
|
|
60
|
+
}), V(() => {
|
|
61
|
+
f.value.forEach((e) => {
|
|
62
|
+
e.url && m(e);
|
|
59
63
|
});
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
}), A(() => {
|
|
65
|
+
const e = x().getItem(
|
|
66
|
+
h.SELECTED_CLIENT
|
|
67
|
+
);
|
|
68
|
+
y(e) && !o.workspace["x-scalar-default-client"] && o.update("x-scalar-default-client", e);
|
|
69
|
+
}), B(() => {
|
|
70
|
+
f.value.forEach((e) => {
|
|
71
|
+
e.url && m(e);
|
|
63
72
|
});
|
|
64
|
-
}),
|
|
73
|
+
}), k(c, "scalar-update-dark-mode", (e) => {
|
|
65
74
|
o.update("x-scalar-dark-mode", e.detail.value);
|
|
66
|
-
}),
|
|
75
|
+
}), k(c, "scalar-update-active-document", (e) => {
|
|
67
76
|
o.update("x-scalar-active-document", e.detail.value);
|
|
68
|
-
}),
|
|
77
|
+
}), k(c, "scalar-update-selected-client", (e) => {
|
|
69
78
|
o.update("x-scalar-default-client", e.detail), x().setItem(h.SELECTED_CLIENT, e.detail);
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
}), s(
|
|
80
|
+
() => a.value.defaultHttpClient,
|
|
81
|
+
(e) => {
|
|
82
|
+
if (e) {
|
|
83
|
+
const { targetKey: t, clientKey: n } = e, l = `${t}/${n}`;
|
|
84
|
+
y(l) && o.update("x-scalar-default-client", l);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{ immediate: !0 }
|
|
88
|
+
);
|
|
89
|
+
const { toggleColorMode: I, isDarkMode: L } = z({
|
|
77
90
|
initialColorMode: a.value.darkMode ? "dark" : void 0,
|
|
78
91
|
overrideColorMode: a.value.forceDarkModeState
|
|
79
92
|
});
|
|
80
|
-
|
|
93
|
+
s(
|
|
81
94
|
() => a.value.darkMode,
|
|
82
95
|
(e) => o.update("x-scalar-dark-mode", !!e)
|
|
83
|
-
),
|
|
84
|
-
() =>
|
|
96
|
+
), s(
|
|
97
|
+
() => L.value,
|
|
85
98
|
(e) => o.update("x-scalar-dark-mode", e),
|
|
86
99
|
{ immediate: !0 }
|
|
87
|
-
),
|
|
88
|
-
() =>
|
|
100
|
+
), s(
|
|
101
|
+
() => i.value,
|
|
89
102
|
(e) => {
|
|
90
103
|
var t;
|
|
91
104
|
return o.update(
|
|
92
105
|
"x-scalar-active-document",
|
|
93
|
-
(t =
|
|
106
|
+
(t = d.value[e]) == null ? void 0 : t.slug
|
|
94
107
|
);
|
|
95
108
|
},
|
|
96
109
|
{ immediate: !0 }
|
|
97
|
-
),
|
|
98
|
-
() =>
|
|
110
|
+
), s(
|
|
111
|
+
() => d.value,
|
|
99
112
|
(e) => {
|
|
100
|
-
e.forEach(
|
|
113
|
+
e.forEach(m);
|
|
101
114
|
}
|
|
102
|
-
), a.value.metaData &&
|
|
103
|
-
const R =
|
|
104
|
-
return
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
), a.value.metaData && G(a.value.metaData);
|
|
116
|
+
const R = w(() => a.value.favicon);
|
|
117
|
+
return Q(R), (e, t) => {
|
|
118
|
+
var n;
|
|
119
|
+
return E(), U("div", {
|
|
120
|
+
ref_key: "root",
|
|
121
|
+
ref: c
|
|
122
|
+
}, [
|
|
123
|
+
(n = r(a)) != null && n.customCss ? (E(), K(F("style"), { key: 0 }, {
|
|
124
|
+
default: u(() => [
|
|
125
|
+
O(j(r(a).customCss), 1)
|
|
110
126
|
]),
|
|
111
127
|
_: 1
|
|
112
|
-
})) :
|
|
113
|
-
|
|
128
|
+
})) : Y("", !0),
|
|
129
|
+
D(X, {
|
|
114
130
|
configuration: r(a),
|
|
115
131
|
isDark: !!r(o).workspace["x-scalar-dark-mode"],
|
|
132
|
+
store: r(o),
|
|
116
133
|
onToggleDarkMode: t[1] || (t[1] = () => r(I)()),
|
|
117
|
-
onUpdateContent: t[2] || (t[2] = (
|
|
134
|
+
onUpdateContent: t[2] || (t[2] = (l) => e.$emit("updateContent", l))
|
|
118
135
|
}, {
|
|
119
|
-
footer:
|
|
120
|
-
|
|
136
|
+
footer: u(() => [
|
|
137
|
+
v(e.$slots, "footer")
|
|
121
138
|
]),
|
|
122
|
-
"content-end":
|
|
123
|
-
|
|
139
|
+
"content-end": u(() => [
|
|
140
|
+
v(e.$slots, "footer")
|
|
124
141
|
]),
|
|
125
|
-
"document-selector":
|
|
126
|
-
|
|
127
|
-
modelValue: r(
|
|
128
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
129
|
-
options: r(
|
|
142
|
+
"document-selector": u(() => [
|
|
143
|
+
D(r(te), {
|
|
144
|
+
modelValue: r(i),
|
|
145
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => H(i) ? i.value = l : null),
|
|
146
|
+
options: r(d)
|
|
130
147
|
}, null, 8, ["modelValue", "options"])
|
|
131
148
|
]),
|
|
132
|
-
"sidebar-start":
|
|
133
|
-
|
|
149
|
+
"sidebar-start": u(() => [
|
|
150
|
+
v(e.$slots, "sidebar-start")
|
|
134
151
|
]),
|
|
135
152
|
_: 3
|
|
136
|
-
}, 8, ["configuration", "isDark"])
|
|
137
|
-
],
|
|
153
|
+
}, 8, ["configuration", "isDark", "store"])
|
|
154
|
+
], 512);
|
|
138
155
|
};
|
|
139
156
|
}
|
|
140
157
|
});
|
|
141
158
|
export {
|
|
142
|
-
|
|
159
|
+
ve as default
|
|
143
160
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/example';
|
|
1
|
+
import type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/media-header-encoding';
|
|
3
2
|
type __VLS_Props = {
|
|
4
|
-
examples:
|
|
3
|
+
examples: MediaTypeObject['examples'];
|
|
5
4
|
};
|
|
6
5
|
type __VLS_PublicProps = {
|
|
7
6
|
modelValue: string;
|
|
8
7
|
} & __VLS_Props;
|
|
9
8
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
10
9
|
getLabel: (key: string | null) => string;
|
|
11
|
-
selectedExample: import("vue").ComputedRef<ScalarComboboxOption>;
|
|
12
10
|
selectedExampleKey: import("vue").ModelRef<string, string, string, string>;
|
|
13
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
12
|
"update:modelValue": (value: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mEAAmE,CAAA;AAIxG,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACtC,CAAC;AAwCF,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAAC;;oBAjCO,MAAM,GAAG,IAAI;;;;;;;AAuLpC,wBASG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as h, mergeModels as w, useModel as _, createBlock as u, openBlock as c, unref as t, withCtx as r, createVNode as i, createElementVNode as m, toDisplayString as p, createElementBlock as g, Fragment as v, renderList as b, normalizeClass as C } from "vue";
|
|
2
|
+
import { ScalarDropdown as S, ScalarButton as k, ScalarDropdownItem as E, ScalarIcon as V } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as B } from "@scalar/icons";
|
|
4
|
+
const D = { class: "overflow-hidden text-ellipsis" }, N = /* @__PURE__ */ h({
|
|
5
|
+
__name: "ExamplePicker",
|
|
6
|
+
props: /* @__PURE__ */ w({
|
|
7
|
+
examples: {}
|
|
8
|
+
}, {
|
|
9
|
+
modelValue: {
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(d, { expose: f }) {
|
|
16
|
+
const a = _(d, "modelValue"), o = (e) => {
|
|
17
|
+
var n, s;
|
|
18
|
+
return e ? ((s = (n = d.examples) == null ? void 0 : n[e]) == null ? void 0 : s.summary) ?? e : "Select an example";
|
|
19
|
+
}, x = (e) => {
|
|
20
|
+
a.value = e;
|
|
21
|
+
};
|
|
22
|
+
return f({
|
|
23
|
+
getLabel: o,
|
|
24
|
+
selectedExampleKey: a
|
|
25
|
+
}), (e, n) => (c(), u(t(S), { placement: "bottom-start" }, {
|
|
26
|
+
items: r(() => [
|
|
27
|
+
(c(!0), g(v, null, b(e.examples, (s, l) => (c(), u(t(E), {
|
|
28
|
+
key: l,
|
|
29
|
+
onClick: (z) => x(l)
|
|
30
|
+
}, {
|
|
31
|
+
default: r(() => [
|
|
32
|
+
m("div", {
|
|
33
|
+
class: C([
|
|
34
|
+
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
35
|
+
a.value === l ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
|
|
36
|
+
])
|
|
37
|
+
}, [
|
|
38
|
+
i(t(V), {
|
|
39
|
+
class: "size-2.5",
|
|
40
|
+
icon: "Checkmark",
|
|
41
|
+
thickness: "3"
|
|
42
|
+
})
|
|
43
|
+
], 2),
|
|
44
|
+
m("span", D, p(o(l)), 1)
|
|
45
|
+
]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, 1032, ["onClick"]))), 128))
|
|
48
|
+
]),
|
|
49
|
+
default: r(() => [
|
|
50
|
+
i(t(k), {
|
|
51
|
+
"data-testid": "example-picker",
|
|
52
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-1.5 py-0.75 text-base font-normal",
|
|
53
|
+
fullWidth: "",
|
|
54
|
+
variant: "ghost"
|
|
55
|
+
}, {
|
|
56
|
+
default: r(() => [
|
|
57
|
+
m("span", null, p(o(a.value)), 1),
|
|
58
|
+
i(t(B), {
|
|
59
|
+
weight: "bold",
|
|
60
|
+
class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
|
|
61
|
+
})
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
})
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
N as default
|
|
72
|
+
};
|
|
@@ -4,20 +4,16 @@ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/stric
|
|
|
4
4
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
5
5
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
6
6
|
import { type Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
|
|
7
|
+
import type { ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
|
|
7
8
|
export type RequestExampleProps = {
|
|
8
9
|
/**
|
|
9
|
-
* List of all
|
|
10
|
-
*
|
|
11
|
-
* For the complete list:
|
|
12
|
-
* @see https://github.com/scalar/scalar/blob/main/packages/types/src/snippetz/snippetz.ts#L8
|
|
13
|
-
*
|
|
14
|
-
* @defaults to all available clients + any included custom code examples
|
|
10
|
+
* List of all http clients formatted into option groups for the client selector
|
|
15
11
|
*/
|
|
16
|
-
|
|
12
|
+
clientOptions: ClientOptionGroup[];
|
|
17
13
|
/**
|
|
18
14
|
* Pre-selected client, this will determine which client is initially selected in the dropdown
|
|
19
15
|
*
|
|
20
|
-
* @defaults to
|
|
16
|
+
* @defaults to shell/curl or a custom sample if one is available
|
|
21
17
|
*/
|
|
22
18
|
selectedClient?: AvailableClients[number];
|
|
23
19
|
/**
|
|
@@ -59,11 +55,6 @@ export type RequestExampleProps = {
|
|
|
59
55
|
* A method to generate the label of the block, should return an html string
|
|
60
56
|
*/
|
|
61
57
|
generateLabel?: () => string;
|
|
62
|
-
/**
|
|
63
|
-
* Whether to hide the client selector
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
|
-
hideClientSelector?: boolean;
|
|
67
58
|
};
|
|
68
59
|
/**
|
|
69
60
|
* Request Example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAuZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAQxD,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gDAAgD,CAAA;AAOvD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAmBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AAnBvB,wBAicC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|