@scalar/api-reference 1.32.10 → 1.34.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 +16194 -15784
- 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/Anchor/WithBreadcrumb.vue.d.ts +24 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js +4 -0
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +46 -0
- package/dist/components/Anchor/index.d.ts +1 -0
- package/dist/components/Anchor/index.d.ts.map +1 -1
- 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 +179 -193
- 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.js +1 -1
- 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.js +1 -1
- 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 +3 -3
- package/dist/components/Content/Introduction/Introduction.vue2.js +104 -150
- 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 +22 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.js +97 -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 +60 -0
- package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +4 -0
- package/dist/components/Content/Operations/get-current-index.d.ts +4 -0
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -0
- package/dist/components/Content/Operations/get-current-index.js +16 -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.preview.d.ts +28 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +3 -3
- package/dist/components/Content/Schema/Schema.vue2.js +164 -157
- package/dist/components/Content/Schema/Schema.vue3.js +4 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +58 -53
- 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/SchemaObjectProperties.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +52 -40
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +103 -89
- 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 +30 -24
- 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 +2 -10
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -0
- package/dist/components/Lazy/Lazy.vue2.js +26 -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 +10 -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 +3 -1
- package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -1
- package/dist/components/LinkList/LinkList.vue.js +5 -10
- package/dist/components/LinkList/LinkList.vue2.js +32 -0
- package/dist/components/LinkList/LinkList.vue3.js +4 -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.js +1 -1
- 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 +5 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +55 -38
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +4 -4
- 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/OperationParameters.vue.d.ts +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +49 -43
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +4 -3
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +1 -0
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +28 -26
- package/dist/features/Operation/components/ParameterHeaders.vue3.js +4 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +3 -3
- package/dist/features/Operation/components/ParameterList.vue2.js +17 -15
- package/dist/features/Operation/components/ParameterList.vue3.js +4 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -33
- package/dist/features/Operation/components/ParameterListItem.vue3.js +4 -0
- package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -2
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +3 -3
- package/dist/features/Operation/components/RequestBody.vue2.js +47 -39
- package/dist/features/Operation/components/RequestBody.vue3.js +4 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +10 -9
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +4 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +20 -28
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -0
- 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 +77 -62
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +4 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -0
- 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 +72 -57
- package/dist/features/Operation/layouts/ModernLayout.vue3.js +4 -0
- package/dist/features/Search/{SearchButton.vue.d.ts → components/SearchButton.vue.d.ts} +0 -2
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.js +65 -0
- package/dist/features/Search/{SearchModal.vue.d.ts → components/SearchModal.vue.d.ts} +0 -2
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.js +7 -0
- package/dist/features/Search/components/SearchModal.vue2.js +199 -0
- package/dist/features/Search/components/SearchModal.vue3.js +4 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +9 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -0
- package/dist/features/Search/helpers/create-fuse-instance.js +46 -0
- package/dist/features/Search/helpers/create-search-index.d.ts +7 -0
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -0
- package/dist/features/Search/helpers/create-search-index.js +109 -0
- package/dist/features/Search/hooks/useSearchIndex.d.ts +14 -0
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -0
- package/dist/features/Search/hooks/useSearchIndex.js +46 -0
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/index.d.ts.map +1 -1
- package/dist/features/Search/types.d.ts +15 -0
- package/dist/features/Search/types.d.ts.map +1 -0
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/useApiClient.d.ts +414 -354
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- 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 +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue3.js +4 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- 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 +107 -104
- package/dist/features/example-responses/ExampleResponses.vue3.js +4 -0
- package/dist/features/info-object/License.vue.d.ts.map +1 -1
- package/dist/features/info-object/License.vue.js +18 -15
- 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.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue3.js +4 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +3 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +18 -18
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/index.d.ts +2 -1
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +10 -6
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/test-utils.d.ts +60 -0
- package/dist/helpers/test-utils.d.ts.map +1 -0
- package/dist/hooks/useNavState.d.ts +4 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -23
- package/dist/libs/openapi.d.ts +11 -8
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +34 -55
- package/dist/style.css +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +128 -129
- 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 -2
- 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 +32 -29
- 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 +3 -3
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +185 -181
- 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 +1 -0
- 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 +28 -30
- 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/helpers/get-document-name.d.ts +13 -0
- package/dist/v2/helpers/get-document-name.d.ts.map +1 -0
- package/dist/v2/helpers/get-document-name.js +15 -0
- package/dist/v2/helpers/normalize-content.d.ts +3 -0
- package/dist/v2/helpers/normalize-content.d.ts.map +1 -0
- package/dist/v2/helpers/normalize-content.js +8 -0
- package/package.json +25 -19
- 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/Search/SearchButton.vue.d.ts.map +0 -1
- package/dist/features/Search/SearchButton.vue.js +0 -66
- package/dist/features/Search/SearchModal.vue.d.ts.map +0 -1
- package/dist/features/Search/SearchModal.vue.js +0 -7
- package/dist/features/Search/SearchModal.vue2.js +0 -207
- package/dist/features/Search/useSearchIndex.d.ts +0 -32
- package/dist/features/Search/useSearchIndex.d.ts.map +0 -1
- package/dist/features/Search/useSearchIndex.js +0 -170
- package/dist/helpers/parse.d.ts +0 -10
- package/dist/helpers/parse.d.ts.map +0 -1
- package/dist/helpers/parse.js +0 -81
- 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/v2/hooks/useStore.js +0 -14
- /package/dist/components/Content/{Tag → Tags}/Tag.vue2.js +0 -0
- /package/dist/components/{Content/Lazy → Lazy}/Lazy.vue.js +0 -0
- /package/dist/features/Search/{SearchButton.vue2.js → components/SearchButton.vue2.js} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type ParameterMap } from '../../libs/openapi.js';
|
|
2
|
-
import type { Spec, TransformedOperation } from '@scalar/types/legacy';
|
|
3
|
-
import { type FuseResult } from 'fuse.js';
|
|
4
|
-
import { type Ref } from 'vue';
|
|
5
|
-
export type EntryType = 'req' | 'webhook' | 'model' | 'heading' | 'tag';
|
|
6
|
-
export type FuseData = {
|
|
7
|
-
title: string;
|
|
8
|
-
href: string;
|
|
9
|
-
type: EntryType;
|
|
10
|
-
operationId?: string;
|
|
11
|
-
description: string;
|
|
12
|
-
body?: string | string[] | ParameterMap;
|
|
13
|
-
httpVerb?: string;
|
|
14
|
-
path?: string;
|
|
15
|
-
tag?: string;
|
|
16
|
-
operation?: TransformedOperation;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Creates the search index from an OpenAPI document.
|
|
20
|
-
*/
|
|
21
|
-
export declare function useSearchIndex({ specification, hideModels, }: {
|
|
22
|
-
specification: Ref<Spec>;
|
|
23
|
-
hideModels?: boolean;
|
|
24
|
-
}): {
|
|
25
|
-
resetSearch: () => void;
|
|
26
|
-
fuseSearch: () => void;
|
|
27
|
-
selectedSearchIndex: Ref<number | undefined, number | undefined>;
|
|
28
|
-
selectedSearchResult: import("vue").ComputedRef<FuseResult<FuseData> | undefined>;
|
|
29
|
-
searchResultsWithPlaceholderResults: import("vue").ComputedRef<FuseResult<FuseData>[]>;
|
|
30
|
-
searchText: Ref<string, string>;
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=useSearchIndex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAqD,MAAM,gBAAgB,CAAA;AAErG,OAAO,KAAK,EAAe,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACnF,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,YAAY,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,UAAkB,GACnB,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;uBAsEyB,IAAI;sBAbL,IAAI;;;;;EAoM5B"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { useNavState as W } from "../../hooks/useNavState.js";
|
|
2
|
-
import { getHeadingsFromMarkdown as _ } from "../../libs/markdown.js";
|
|
3
|
-
import { createParameterMap as k, extractRequestBody as A, getModels as B } from "../../libs/openapi.js";
|
|
4
|
-
import { isHttpMethod as U } from "@scalar/helpers/http/is-http-method";
|
|
5
|
-
import X from "fuse.js";
|
|
6
|
-
import { ref as f, watch as H, computed as j } from "vue";
|
|
7
|
-
const q = 25;
|
|
8
|
-
function Z({
|
|
9
|
-
specification: C,
|
|
10
|
-
hideModels: L = !1
|
|
11
|
-
}) {
|
|
12
|
-
const { getHeadingId: O, getModelId: T, getTagId: F } = W(), a = f([]), u = f([]), s = f(), n = f(""), v = new X(a.value, {
|
|
13
|
-
// Define searchable fields with weights to prioritize more important matches
|
|
14
|
-
keys: [
|
|
15
|
-
// Highest weight - titles are most descriptive
|
|
16
|
-
{ name: "title", weight: 0.7 },
|
|
17
|
-
// Medium weight - helpful but often verbose
|
|
18
|
-
{ name: "description", weight: 0.3 },
|
|
19
|
-
// Lowest weight - can be very long and noisy
|
|
20
|
-
{ name: "body", weight: 0.2 },
|
|
21
|
-
// High weight - unique identifiers for operations
|
|
22
|
-
{ name: "operationId", weight: 0.6 },
|
|
23
|
-
// Good weight - endpoint paths are searchable
|
|
24
|
-
{ name: "path", weight: 0.5 },
|
|
25
|
-
// Medium-high weight - helps with categorization
|
|
26
|
-
{ name: "tag", weight: 0.4 },
|
|
27
|
-
// Medium weight - useful for filtering by method
|
|
28
|
-
{ name: "httpVerb", weight: 0.3 }
|
|
29
|
-
],
|
|
30
|
-
// Threshold controls how strict the matching is (0.0 = perfect match, 1.0 = very loose)
|
|
31
|
-
// 0.3 allows for some typos and partial matches while maintaining relevance
|
|
32
|
-
threshold: 0.3,
|
|
33
|
-
// Maximum distance between characters that can be matched
|
|
34
|
-
// Higher values allow matches even when characters are far apart in long text
|
|
35
|
-
distance: 100,
|
|
36
|
-
// Include the match score in results for debugging and potential UI enhancements
|
|
37
|
-
includeScore: !0,
|
|
38
|
-
// Include detailed match information showing which parts of the text matched
|
|
39
|
-
includeMatches: !0,
|
|
40
|
-
// Minimum number of characters that must match to be considered a result
|
|
41
|
-
// Prevents single-character matches that are usually noise
|
|
42
|
-
minMatchCharLength: 2,
|
|
43
|
-
// Don't require matches to be at the beginning of strings
|
|
44
|
-
// Makes search more flexible and user-friendly
|
|
45
|
-
ignoreLocation: !0,
|
|
46
|
-
// Enable advanced search syntax like 'exact' for exact matches or !exclude for exclusions
|
|
47
|
-
useExtendedSearch: !0,
|
|
48
|
-
// Find all possible matches in each item, not just the first one
|
|
49
|
-
// Ensures comprehensive search results
|
|
50
|
-
findAllMatches: !0
|
|
51
|
-
}), y = () => {
|
|
52
|
-
s.value = 0, u.value = v.search(n.value);
|
|
53
|
-
};
|
|
54
|
-
H(n, (e) => {
|
|
55
|
-
e.length ? y() : u.value = [];
|
|
56
|
-
});
|
|
57
|
-
function N() {
|
|
58
|
-
n.value = "", s.value = void 0, u.value = [];
|
|
59
|
-
}
|
|
60
|
-
const b = j(() => n.value.length === 0 ? a.value.slice(0, q).map((e) => ({
|
|
61
|
-
item: e
|
|
62
|
-
})) : u.value.slice(0, q)), P = j(
|
|
63
|
-
() => typeof s.value == "number" ? b.value[s.value] : void 0
|
|
64
|
-
);
|
|
65
|
-
return H(
|
|
66
|
-
C,
|
|
67
|
-
(e) => {
|
|
68
|
-
var $, x, R;
|
|
69
|
-
a.value = [];
|
|
70
|
-
const g = [], M = _((($ = e == null ? void 0 : e.info) == null ? void 0 : $.description) ?? "");
|
|
71
|
-
if (M.length && (M.forEach((t) => {
|
|
72
|
-
g.push({
|
|
73
|
-
type: "heading",
|
|
74
|
-
title: t.value,
|
|
75
|
-
description: "Introduction",
|
|
76
|
-
href: `#${O(t)}`,
|
|
77
|
-
tag: t.slug,
|
|
78
|
-
body: ""
|
|
79
|
-
});
|
|
80
|
-
}), a.value = a.value.concat(g)), (x = e == null ? void 0 : e.tags) != null && x.length)
|
|
81
|
-
(R = e == null ? void 0 : e.tags) == null || R.forEach((t) => {
|
|
82
|
-
const d = {
|
|
83
|
-
title: t["x-displayName"] ?? t.name,
|
|
84
|
-
href: `#${F(t)}`,
|
|
85
|
-
description: t.description,
|
|
86
|
-
type: "tag",
|
|
87
|
-
tag: t.name,
|
|
88
|
-
body: ""
|
|
89
|
-
};
|
|
90
|
-
a.value.push(d), t.operations && t.operations.forEach((o) => {
|
|
91
|
-
var h;
|
|
92
|
-
const r = k(o.information), l = A(o.information) || r;
|
|
93
|
-
let i = null;
|
|
94
|
-
typeof l != "boolean" && (i = l);
|
|
95
|
-
const c = {
|
|
96
|
-
type: "req",
|
|
97
|
-
title: o.name ?? o.path,
|
|
98
|
-
href: `#${o.id}`,
|
|
99
|
-
operationId: (h = o.information) == null ? void 0 : h.operationId,
|
|
100
|
-
description: o.description ?? "",
|
|
101
|
-
httpVerb: o.httpVerb,
|
|
102
|
-
path: o.path,
|
|
103
|
-
tag: t.name,
|
|
104
|
-
operation: o
|
|
105
|
-
};
|
|
106
|
-
i && (c.body = i), a.value.push(c);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
else if (e != null && e.paths) {
|
|
110
|
-
const t = e.paths;
|
|
111
|
-
Object.keys(t ?? {}).forEach((d) => {
|
|
112
|
-
Object.keys((t == null ? void 0 : t[d]) ?? {}).forEach((o) => {
|
|
113
|
-
var l, i;
|
|
114
|
-
const r = (l = t == null ? void 0 : t[d]) == null ? void 0 : l[o];
|
|
115
|
-
if (U(o) && r) {
|
|
116
|
-
const c = k(r), h = A(r) || c;
|
|
117
|
-
let p = null;
|
|
118
|
-
typeof h != "boolean" && (p = h);
|
|
119
|
-
const V = {
|
|
120
|
-
type: "req",
|
|
121
|
-
title: r.name ?? r.path,
|
|
122
|
-
href: `#${r.id}`,
|
|
123
|
-
operationId: (i = r.information) == null ? void 0 : i.operationId,
|
|
124
|
-
description: r.description ?? "",
|
|
125
|
-
httpVerb: r.httpVerb,
|
|
126
|
-
path: r.path,
|
|
127
|
-
operation: r
|
|
128
|
-
};
|
|
129
|
-
p && (V.body = p), a.value.push(V);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
const I = e == null ? void 0 : e.webhooks, E = [];
|
|
135
|
-
I && I.forEach((t) => {
|
|
136
|
-
E.push({
|
|
137
|
-
type: "webhook",
|
|
138
|
-
title: `${t.name}`,
|
|
139
|
-
href: `#${t.id}`,
|
|
140
|
-
description: "Webhook",
|
|
141
|
-
httpVerb: t.httpVerb,
|
|
142
|
-
tag: t.name,
|
|
143
|
-
body: ""
|
|
144
|
-
}), a.value = a.value.concat(E);
|
|
145
|
-
});
|
|
146
|
-
const m = L ? {} : B(e), D = [];
|
|
147
|
-
m && (Object.keys(m).forEach((t) => {
|
|
148
|
-
D.push({
|
|
149
|
-
type: "model",
|
|
150
|
-
title: `${m[t].title ?? t}`,
|
|
151
|
-
href: `#${T({ name: t })}`,
|
|
152
|
-
description: "Model",
|
|
153
|
-
tag: t,
|
|
154
|
-
body: ""
|
|
155
|
-
});
|
|
156
|
-
}), a.value = a.value.concat(D)), v.setCollection(a.value);
|
|
157
|
-
},
|
|
158
|
-
{ immediate: !0 }
|
|
159
|
-
), {
|
|
160
|
-
resetSearch: N,
|
|
161
|
-
fuseSearch: y,
|
|
162
|
-
selectedSearchIndex: s,
|
|
163
|
-
selectedSearchResult: P,
|
|
164
|
-
searchResultsWithPlaceholderResults: b,
|
|
165
|
-
searchText: n
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
export {
|
|
169
|
-
Z as useSearchIndex
|
|
170
|
-
};
|
package/dist/helpers/parse.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { Spec } from '@scalar/types/legacy';
|
|
3
|
-
import type { TraversedEntry } from '../features/traverse-schema';
|
|
4
|
-
/**
|
|
5
|
-
* Parse the given dereferencedDocument and return a super custom transformed dereferencedDocument.
|
|
6
|
-
*
|
|
7
|
-
* @deprecated Try to use a store instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare const parse: (dereferencedDocument: OpenAPIV3_1.Document, items?: TraversedEntry[]) => Promise<Spec>;
|
|
10
|
-
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,sBAAsB,CAAA;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAKhE;;;;GAIG;AACH,eAAO,MAAM,KAAK,yBAA0B,WAAW,CAAC,QAAQ,UAAU,cAAc,EAAE,KAAG,OAAO,CAAC,IAAI,CAiBrG,CAAA"}
|
package/dist/helpers/parse.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { createEmptySpecification as w } from "../libs/openapi.js";
|
|
2
|
-
import { normalizeHttpMethod as m } from "@scalar/helpers/http/normalize-http-method";
|
|
3
|
-
const P = (s, i) => new Promise((e, b) => {
|
|
4
|
-
try {
|
|
5
|
-
return e(s ? k(s, i) : k(w()));
|
|
6
|
-
} catch (p) {
|
|
7
|
-
console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(p), b(p);
|
|
8
|
-
}
|
|
9
|
-
return e(k(w()));
|
|
10
|
-
}), k = (s, i) => {
|
|
11
|
-
let e = {};
|
|
12
|
-
s && typeof s == "object" ? e = s : e = w(), e.tags || (e.tags = []), e.paths || (e.paths = {}), e.components || (e.components = {}), e.webhooks || (e.webhooks = {}), e.servers || (e.servers = []), e.security || (e.security = []);
|
|
13
|
-
const b = [], p = (o) => {
|
|
14
|
-
var h;
|
|
15
|
-
!("children" in o) || !((h = o.children) != null && h.length) || o.children.forEach((a) => {
|
|
16
|
-
var f, u, t, n, g, d;
|
|
17
|
-
let r = (f = e.tags) == null ? void 0 : f.findIndex((y) => "tag" in o && y.name === o.tag.name);
|
|
18
|
-
r === -1 && "tag" in o && (e.tags.push({
|
|
19
|
-
name: o.tag.name,
|
|
20
|
-
operations: []
|
|
21
|
-
}), r = e.tags.length - 1), (u = e.tags[r]).operations || (u.operations = []), "tag" in a ? p(a) : "operation" in a ? e.tags[r].operations.push({
|
|
22
|
-
id: a.id,
|
|
23
|
-
httpVerb: m(a.method),
|
|
24
|
-
path: a.path,
|
|
25
|
-
name: a.operation.summary || a.path || "",
|
|
26
|
-
description: a.operation.description || "",
|
|
27
|
-
isWebhook: !1,
|
|
28
|
-
information: a.operation,
|
|
29
|
-
pathParameters: (n = (t = e.paths) == null ? void 0 : t[a.path ?? ""]) == null ? void 0 : n.parameters
|
|
30
|
-
}) : "webhook" in a && e.tags[r].operations.push({
|
|
31
|
-
id: a.id,
|
|
32
|
-
httpVerb: m(a.method),
|
|
33
|
-
path: a.name,
|
|
34
|
-
name: a.webhook.summary || a.name || "",
|
|
35
|
-
description: a.webhook.description || "",
|
|
36
|
-
isWebhook: !0,
|
|
37
|
-
information: a.webhook,
|
|
38
|
-
pathParameters: (d = (g = e.webhooks) == null ? void 0 : g[a.name ?? ""]) == null ? void 0 : d.parameters
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
return i == null || i.forEach((o) => {
|
|
43
|
-
var h, a, r, f, u;
|
|
44
|
-
if (o.id.startsWith("tag/default") && "operation" in o) {
|
|
45
|
-
let t = (h = e.tags) == null ? void 0 : h.findIndex((n) => n.name === "default");
|
|
46
|
-
t === -1 && (e.tags.push({
|
|
47
|
-
name: "default",
|
|
48
|
-
description: "",
|
|
49
|
-
operations: []
|
|
50
|
-
}), t = e.tags.length - 1), e.tags[t].operations.push({
|
|
51
|
-
id: o.id,
|
|
52
|
-
httpVerb: m(o.method),
|
|
53
|
-
path: o.path,
|
|
54
|
-
name: o.operation.summary || o.path || "",
|
|
55
|
-
description: o.operation.description || "",
|
|
56
|
-
isWebhook: !1,
|
|
57
|
-
information: o.operation,
|
|
58
|
-
pathParameters: (r = (a = e.paths) == null ? void 0 : a[o.path ?? ""]) == null ? void 0 : r.parameters
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
"tag" in o && o.isGroup && ((f = o.children) != null && f.length) ? o.children.forEach(p) : "tag" in o && p(o), "isWebhooks" in o && o.isWebhooks && ((u = o.children) != null && u.length) && o.children.forEach((t) => {
|
|
62
|
-
var n, g;
|
|
63
|
-
"webhook" in t && t.name && t.method && b.push({
|
|
64
|
-
id: t.id,
|
|
65
|
-
httpVerb: m(t.method),
|
|
66
|
-
path: t.name,
|
|
67
|
-
name: t.webhook.summary || t.name || "",
|
|
68
|
-
description: t.webhook.description || "",
|
|
69
|
-
isWebhook: !0,
|
|
70
|
-
information: t.webhook,
|
|
71
|
-
pathParameters: (g = (n = e.webhooks) == null ? void 0 : n[t.name ?? ""]) == null ? void 0 : g.parameters
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}), {
|
|
75
|
-
...e,
|
|
76
|
-
webhooks: b
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
export {
|
|
80
|
-
P as parse
|
|
81
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { HiddenClients } from '@scalar/types/legacy';
|
|
2
|
-
import type { Target, TargetId } from '@scalar/types/snippetz';
|
|
3
|
-
import { type Ref } from 'vue';
|
|
4
|
-
/**
|
|
5
|
-
* Gets the client title from the availableTargets
|
|
6
|
-
* { targetKey: 'shell', clientKey: 'curl' } -> 'Shell'
|
|
7
|
-
*/
|
|
8
|
-
declare function getTargetTitle(client: HttpClientState): string;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the client title from the availableTargets
|
|
11
|
-
* { targetKey: 'shell', clientKey: 'curl' } -> 'cURL'
|
|
12
|
-
*/
|
|
13
|
-
declare function getClientTitle(client: HttpClientState): string;
|
|
14
|
-
/**
|
|
15
|
-
* Filters out hidden clients from the available targets (based on the given configuration).
|
|
16
|
-
*/
|
|
17
|
-
export declare function filterHiddenClients(targets: Target[], exclude: Ref<HiddenClients>): Target[];
|
|
18
|
-
/** The selected HTTP client */
|
|
19
|
-
export type HttpClientState = {
|
|
20
|
-
targetKey: TargetId;
|
|
21
|
-
clientKey: string;
|
|
22
|
-
};
|
|
23
|
-
declare function setDefaultHttpClient(httpClient?: HttpClientState): void;
|
|
24
|
-
declare function resetState(): void;
|
|
25
|
-
/** Keep track of the available and the selected HTTP client(s) */
|
|
26
|
-
export declare const useHttpClientStore: () => {
|
|
27
|
-
httpClient: {
|
|
28
|
-
readonly targetKey: TargetId;
|
|
29
|
-
readonly clientKey: string;
|
|
30
|
-
};
|
|
31
|
-
resetState: typeof resetState;
|
|
32
|
-
setHttpClient: (newState: Partial<HttpClientState>) => void;
|
|
33
|
-
setDefaultHttpClient: typeof setDefaultHttpClient;
|
|
34
|
-
excludedClients: Ref<HiddenClients>;
|
|
35
|
-
setExcludedClients: (v: HiddenClients) => void;
|
|
36
|
-
availableTargets: import("vue").ComputedRef<Target[]>;
|
|
37
|
-
getClientTitle: typeof getClientTitle;
|
|
38
|
-
getTargetTitle: typeof getTargetTitle;
|
|
39
|
-
httpTargetTitle: import("vue").ComputedRef<string>;
|
|
40
|
-
httpClientTitle: import("vue").ComputedRef<string>;
|
|
41
|
-
};
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=useHttpClientStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHttpClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/useHttpClientStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,KAAK,GAAG,EAAqC,MAAM,KAAK,CAAA;AASjE;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAE9C;AAED;;;GAGG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,eAAe,UAM9C;AAYD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAoD5F;AASD,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAMxE,iBAAS,oBAAoB,CAAC,UAAU,CAAC,EAAE,eAAe,QAOzD;AAiCD,iBAAS,UAAU,SAElB;AAeD,kEAAkE;AAClE,eAAO,MAAM,kBAAkB;;4BAhEY,QAAQ;4BAAa,MAAM;;;8BAqDrC,OAAO,CAAC,eAAe,CAAC;;qBAiBP,GAAG,CAAC,aAAa,CAAC;4BACxC,aAAa;;;;;;CAaxC,CAAA"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { safeLocalStorage as T, REFERENCE_LS_KEYS as m } from "@scalar/helpers/object/local-storage";
|
|
2
|
-
import { objectReplace as p } from "@scalar/helpers/object/object-replace";
|
|
3
|
-
import { snippetz as A } from "@scalar/snippetz";
|
|
4
|
-
import { computed as o, readonly as a, ref as C, reactive as k } from "vue";
|
|
5
|
-
const y = {
|
|
6
|
-
targetKey: "shell",
|
|
7
|
-
clientKey: "curl"
|
|
8
|
-
}, { clients: H } = A();
|
|
9
|
-
function d(t) {
|
|
10
|
-
var n;
|
|
11
|
-
return ((n = r.value.find((e) => e.key === t.targetKey)) == null ? void 0 : n.title) ?? t.targetKey;
|
|
12
|
-
}
|
|
13
|
-
function E(t) {
|
|
14
|
-
var n, e;
|
|
15
|
-
return ((e = (n = r.value.find((i) => i.key === t.targetKey)) == null ? void 0 : n.clients.find((i) => i.client === t.clientKey)) == null ? void 0 : e.title) ?? t.clientKey;
|
|
16
|
-
}
|
|
17
|
-
const L = o(() => d(l)), S = o(() => E(l));
|
|
18
|
-
function _(t, n) {
|
|
19
|
-
return n.value === !0 ? [] : t.flatMap((e) => {
|
|
20
|
-
var i;
|
|
21
|
-
return typeof n.value != "object" ? [] : Array.isArray(n.value) ? (e.clients = e.clients.filter(
|
|
22
|
-
// @ts-expect-error Typescript, chill. It's all good. It has to be an array.
|
|
23
|
-
(s) => !n.value.includes(s.client)
|
|
24
|
-
), e.clients.length ? [e] : []) : n.value[e.key] === !0 ? [] : (Array.isArray(n.value[e.key]) && (e.clients = e.clients.filter((s) => !// @ts-expect-error We checked whether it's an Array already.
|
|
25
|
-
n.value[e.key].includes(s.client))), (i = e == null ? void 0 : e.clients) != null && i.length ? [e] : []);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
const r = o(() => _(H(), c)), c = C({}), f = C();
|
|
29
|
-
function b(t) {
|
|
30
|
-
t !== void 0 && (f.value = t, K(u()));
|
|
31
|
-
}
|
|
32
|
-
const u = () => {
|
|
33
|
-
var t, n, e, i;
|
|
34
|
-
return v(f.value) ? f.value : v(y) ? y : {
|
|
35
|
-
targetKey: (t = r.value[0]) == null ? void 0 : t.key,
|
|
36
|
-
clientKey: (i = (e = (n = r.value[0]) == null ? void 0 : n.clients) == null ? void 0 : e[0]) == null ? void 0 : i.client
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
function v(t) {
|
|
40
|
-
return t === void 0 ? !1 : !!r.value.find(
|
|
41
|
-
(n) => n.key === t.targetKey && n.clients.find((e) => e.client === t.clientKey)
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function D() {
|
|
45
|
-
p(l, u());
|
|
46
|
-
}
|
|
47
|
-
const l = k(u()), K = (t) => {
|
|
48
|
-
Object.assign(l, {
|
|
49
|
-
...l,
|
|
50
|
-
...t
|
|
51
|
-
}), T().setItem(m.SELECTED_CLIENT_DEPRECATED, JSON.stringify(l));
|
|
52
|
-
}, I = () => ({
|
|
53
|
-
httpClient: a(l),
|
|
54
|
-
resetState: D,
|
|
55
|
-
setHttpClient: K,
|
|
56
|
-
setDefaultHttpClient: b,
|
|
57
|
-
excludedClients: a(c),
|
|
58
|
-
setExcludedClients: (t) => {
|
|
59
|
-
c.value = t, p(l, u());
|
|
60
|
-
},
|
|
61
|
-
availableTargets: r,
|
|
62
|
-
getClientTitle: E,
|
|
63
|
-
getTargetTitle: d,
|
|
64
|
-
httpTargetTitle: L,
|
|
65
|
-
httpClientTitle: S
|
|
66
|
-
});
|
|
67
|
-
export {
|
|
68
|
-
_ as filterHiddenClients,
|
|
69
|
-
I as useHttpClientStore
|
|
70
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
-
/**
|
|
3
|
-
* Composable for accessing the new workspace store
|
|
4
|
-
*
|
|
5
|
-
* When called with a store it provides that store
|
|
6
|
-
* When called without parameters, it returns the injected store
|
|
7
|
-
*/
|
|
8
|
-
export declare const useStore: (store?: WorkspaceStore) => WorkspaceStore;
|
|
9
|
-
//# sourceMappingURL=useStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/useStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,WAAY,cAAc,mBAe9C,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { provide as r, inject as n } from "vue";
|
|
2
|
-
const o = Symbol(), a = (e) => {
|
|
3
|
-
if (e)
|
|
4
|
-
return r(o, e), e;
|
|
5
|
-
const t = n(o);
|
|
6
|
-
if (!t)
|
|
7
|
-
throw new Error(
|
|
8
|
-
"useStore() was called without a store and no store instance was found. Make sure to call useStore(store) in a parent component first."
|
|
9
|
-
);
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
a as useStore
|
|
14
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|