@scalar/api-reference 1.36.1 → 1.37.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 +63 -0
- package/dist/browser/standalone.js +26246 -25660
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
- package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
- package/dist/components/ApiReferenceContent.vue.js +8 -0
- package/dist/components/ApiReferenceContent.vue2.js +148 -0
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +239 -219
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +21 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +132 -95
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
- package/dist/components/Content/Models/Models.vue.d.ts +10 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +25 -27
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
- package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +24 -24
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
- package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.js +14 -12
- package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.js +49 -52
- package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue.d.ts +1 -0
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +12 -12
- package/dist/consts/urls.d.ts +17 -0
- package/dist/consts/urls.d.ts.map +1 -0
- package/dist/consts/urls.js +7 -0
- package/dist/features/Operation/Operation.vue.d.ts +21 -9
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +42 -53
- package/dist/features/Operation/components/Header.vue.d.ts +2 -2
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +9 -8
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue2.js +35 -33
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
- package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +17 -19
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
- 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 +64 -65
- package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
- package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/Search/types.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
- package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
- package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- 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 +26 -18
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +11 -6
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +57 -48
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +16 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +43 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts +13 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +12 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +14 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +95 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts +10 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +27 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +123 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +11 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +41 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts +26 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +46 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +58 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +84 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +42 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +56 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +4 -0
- package/dist/{v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts → features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts} +6 -6
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +83 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts +3 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +51 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +4 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts +3 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts.map +1 -0
- package/dist/features/toolbar/uploadTempDocument.js +21 -0
- package/dist/helpers/test-utils.d.ts +3 -365
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +4 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +31 -27
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -19
- package/dist/style.css +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +6 -6
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +93 -79
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.d.ts +22 -22
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +21 -18
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
- package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
- package/dist/components/Content/Operations/index.d.ts +0 -2
- package/dist/components/Content/Operations/index.d.ts.map +0 -1
- package/dist/hooks/useConfig.d.ts +0 -9
- package/dist/hooks/useConfig.d.ts.map +0 -1
- package/dist/hooks/useConfig.js +0 -10
- package/dist/legacy/stores/index.d.ts +0 -2
- package/dist/legacy/stores/index.d.ts.map +0 -1
- package/dist/legacy/stores/useExampleStore.d.ts +0 -5
- package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
- package/dist/legacy/stores/useExampleStore.js +0 -8
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
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,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,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,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,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,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,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
|
@@ -4,17 +4,17 @@ type __VLS_Props = {
|
|
|
4
4
|
configuration?: AnyApiReferenceConfiguration;
|
|
5
5
|
store: WorkspaceStore;
|
|
6
6
|
};
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_20: {}, __VLS_22: {}, __VLS_24: {}, __VLS_26: {}, __VLS_28: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
'content-start'?: (props: typeof
|
|
9
|
+
'content-start'?: (props: typeof __VLS_20) => any;
|
|
10
10
|
} & {
|
|
11
|
-
'content-end'?: (props: typeof
|
|
11
|
+
'content-end'?: (props: typeof __VLS_22) => any;
|
|
12
12
|
} & {
|
|
13
|
-
'sidebar-start'?: (props: typeof
|
|
13
|
+
'sidebar-start'?: (props: typeof __VLS_24) => any;
|
|
14
14
|
} & {
|
|
15
|
-
'sidebar-end'?: (props: typeof
|
|
15
|
+
'sidebar-end'?: (props: typeof __VLS_26) => any;
|
|
16
16
|
} & {
|
|
17
|
-
footer?: (props: typeof
|
|
17
|
+
footer?: (props: typeof __VLS_28) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
20
|
updateContent: (content: any) => any;
|
|
@@ -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":"AAwWA,OAAO,KAAK,EACV,4BAA4B,EAG7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAyBpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAkVF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC9G,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8B/C,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,60 +1,68 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as w, ref as m, toRef as I, provide as N, useTemplateRef as P, onBeforeMount as L, watch as s, computed as U, createElementBlock as V, openBlock as C, createBlock as A, createCommentVNode as B, createVNode as f, unref as n, resolveDynamicComponent as _, withCtx as i, createTextVNode as H, toDisplayString as K, renderSlot as u, isRef as O } from "vue";
|
|
2
|
+
import { isClient as D } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
3
|
+
import { safeLocalStorage as F, REFERENCE_LS_KEYS as W } from "@scalar/helpers/object/local-storage";
|
|
3
4
|
import { makeUrlAbsolute as Y } from "@scalar/helpers/url/make-url-absolute";
|
|
4
5
|
import { redirectToProxy as z } from "@scalar/oas-utils/helpers";
|
|
5
|
-
import { useColorMode as
|
|
6
|
-
import { useSeoMeta as
|
|
7
|
-
import { useFavicon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { getDocumentName as
|
|
12
|
-
import { mapConfiguration as
|
|
13
|
-
import { normalizeContent as
|
|
14
|
-
import { useWorkspaceStoreEvents as
|
|
15
|
-
import { useMultipleDocuments as
|
|
16
|
-
import
|
|
17
|
-
const
|
|
6
|
+
import { useColorMode as j } from "@scalar/use-hooks/useColorMode";
|
|
7
|
+
import { useSeoMeta as q } from "@unhead/vue";
|
|
8
|
+
import { useFavicon as G } from "@vueuse/core";
|
|
9
|
+
import J from "../components/ApiReferenceLayout.vue.js";
|
|
10
|
+
import Q from "../features/toolbar/ApiReferenceToolbar.vue.js";
|
|
11
|
+
import { NAV_STATE_SYMBOL as X } from "../hooks/useNavState.js";
|
|
12
|
+
import { getDocumentName as Z } from "./helpers/get-document-name.js";
|
|
13
|
+
import { mapConfiguration as E } from "./helpers/map-configuration.js";
|
|
14
|
+
import { normalizeContent as ee } from "./helpers/normalize-content.js";
|
|
15
|
+
import { useWorkspaceStoreEvents as te } from "./hooks/use-workspace-store-events.js";
|
|
16
|
+
import { useMultipleDocuments as oe } from "../features/multiple-documents/useMultipleDocuments.js";
|
|
17
|
+
import re from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
18
|
+
const Se = /* @__PURE__ */ w({
|
|
18
19
|
__name: "ApiReferenceWorkspace",
|
|
19
20
|
props: {
|
|
20
21
|
configuration: {},
|
|
21
22
|
store: {}
|
|
22
23
|
},
|
|
23
24
|
emits: ["updateContent"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
availableDocuments:
|
|
25
|
+
setup(S) {
|
|
26
|
+
const p = S, d = m({}), {
|
|
27
|
+
availableDocuments: v,
|
|
27
28
|
selectedConfiguration: o,
|
|
28
|
-
selectedDocumentIndex:
|
|
29
|
-
isIntersectionEnabled:
|
|
30
|
-
hash:
|
|
31
|
-
hashPrefix:
|
|
32
|
-
} =
|
|
33
|
-
configuration: I(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
selectedDocumentIndex: l,
|
|
30
|
+
isIntersectionEnabled: c,
|
|
31
|
+
hash: h,
|
|
32
|
+
hashPrefix: M
|
|
33
|
+
} = oe({
|
|
34
|
+
configuration: I(p, "configuration"),
|
|
35
|
+
configurationOverrides: d,
|
|
36
|
+
isIntersectionEnabled: m(!1),
|
|
37
|
+
hash: m(""),
|
|
38
|
+
hashPrefix: m("")
|
|
39
|
+
}), b = (e, t) => fetch(
|
|
38
40
|
z(o.value.proxyUrl, e.toString()),
|
|
39
41
|
t
|
|
40
42
|
);
|
|
41
|
-
N(
|
|
42
|
-
|
|
43
|
+
N(X, {
|
|
44
|
+
isIntersectionEnabled: c,
|
|
45
|
+
hash: h,
|
|
46
|
+
hashPrefix: M,
|
|
47
|
+
basePath: () => o.value.pathRouting?.basePath,
|
|
48
|
+
generateHeadingSlug: () => o.value.generateHeadingSlug
|
|
49
|
+
});
|
|
50
|
+
const g = P("root"), r = p.store;
|
|
43
51
|
L(() => {
|
|
44
|
-
const e =
|
|
52
|
+
const e = F().getItem(
|
|
45
53
|
W.SELECTED_CLIENT
|
|
46
54
|
);
|
|
47
55
|
D(e) && !r.workspace["x-scalar-default-client"] && r.update("x-scalar-default-client", e);
|
|
48
56
|
});
|
|
49
|
-
const
|
|
50
|
-
const t =
|
|
57
|
+
const x = async (e) => {
|
|
58
|
+
const t = ee(e.content), a = Z({
|
|
51
59
|
name: e.slug || e.title,
|
|
52
60
|
url: e.url,
|
|
53
61
|
document: t
|
|
54
62
|
});
|
|
55
63
|
if (r.workspace.documents[a]) {
|
|
56
|
-
t && (
|
|
57
|
-
|
|
64
|
+
t && (c.value = !1, r.replaceDocument(a, t), r.update("x-scalar-active-document", a), setTimeout(() => {
|
|
65
|
+
c.value = !0;
|
|
58
66
|
}, 300));
|
|
59
67
|
return;
|
|
60
68
|
}
|
|
@@ -62,7 +70,7 @@ const De = /* @__PURE__ */ R({
|
|
|
62
70
|
return await r.addDocument({
|
|
63
71
|
name: a,
|
|
64
72
|
document: t,
|
|
65
|
-
config:
|
|
73
|
+
config: E(e)
|
|
66
74
|
});
|
|
67
75
|
if (e.url)
|
|
68
76
|
return await r.addDocument({
|
|
@@ -70,94 +78,100 @@ const De = /* @__PURE__ */ R({
|
|
|
70
78
|
url: Y(e.url, {
|
|
71
79
|
basePath: o.value.pathRouting?.basePath
|
|
72
80
|
}),
|
|
73
|
-
fetch: e.fetch ??
|
|
74
|
-
config:
|
|
81
|
+
fetch: e.fetch ?? b,
|
|
82
|
+
config: E(e)
|
|
75
83
|
});
|
|
76
84
|
};
|
|
77
|
-
|
|
85
|
+
s(
|
|
78
86
|
[
|
|
79
87
|
() => o.value.slug,
|
|
80
88
|
() => o.value.url,
|
|
81
89
|
() => o.value.content
|
|
82
90
|
],
|
|
83
91
|
([e, t, a]) => {
|
|
84
|
-
(e || t || a) &&
|
|
92
|
+
(e || t || a) && x(o.value);
|
|
85
93
|
},
|
|
86
94
|
{ immediate: !0 }
|
|
87
|
-
),
|
|
95
|
+
), te(r, g), s(
|
|
88
96
|
() => o.value.defaultHttpClient,
|
|
89
97
|
(e) => {
|
|
90
98
|
if (e) {
|
|
91
|
-
const { targetKey: t, clientKey: a } = e,
|
|
92
|
-
D(
|
|
99
|
+
const { targetKey: t, clientKey: a } = e, k = `${t}/${a}`;
|
|
100
|
+
D(k) && r.update("x-scalar-default-client", k);
|
|
93
101
|
}
|
|
94
102
|
},
|
|
95
103
|
{ immediate: !0 }
|
|
96
104
|
);
|
|
97
|
-
function
|
|
105
|
+
function y(e) {
|
|
98
106
|
if (e === !0)
|
|
99
107
|
return "dark";
|
|
100
108
|
if (e === !1)
|
|
101
109
|
return "light";
|
|
102
110
|
}
|
|
103
|
-
const { toggleColorMode:
|
|
104
|
-
initialColorMode:
|
|
111
|
+
const { toggleColorMode: $, isDarkMode: R } = j({
|
|
112
|
+
initialColorMode: y(o.value.darkMode),
|
|
105
113
|
overrideColorMode: o.value.forceDarkModeState
|
|
106
114
|
});
|
|
107
|
-
|
|
115
|
+
s(
|
|
108
116
|
() => o.value.darkMode,
|
|
109
117
|
(e) => r.update("x-scalar-dark-mode", !!e)
|
|
110
|
-
),
|
|
111
|
-
() =>
|
|
118
|
+
), s(
|
|
119
|
+
() => R.value,
|
|
112
120
|
(e) => r.update("x-scalar-dark-mode", e),
|
|
113
121
|
{ immediate: !0 }
|
|
114
|
-
),
|
|
115
|
-
() =>
|
|
122
|
+
), s(
|
|
123
|
+
() => l.value,
|
|
116
124
|
(e) => r.update(
|
|
117
125
|
"x-scalar-active-document",
|
|
118
|
-
|
|
126
|
+
v.value[e]?.slug
|
|
119
127
|
),
|
|
120
128
|
{ immediate: !0 }
|
|
121
|
-
), o.value.metaData &&
|
|
122
|
-
const
|
|
123
|
-
return
|
|
129
|
+
), o.value.metaData && q(o.value.metaData);
|
|
130
|
+
const T = U(() => o.value.favicon);
|
|
131
|
+
return G(T), (e, t) => (C(), V("div", {
|
|
124
132
|
ref_key: "root",
|
|
125
|
-
ref:
|
|
133
|
+
ref: g
|
|
126
134
|
}, [
|
|
127
|
-
n(o)?.customCss ? (C(),
|
|
128
|
-
default:
|
|
129
|
-
|
|
135
|
+
n(o)?.customCss ? (C(), A(_("style"), { key: 0 }, {
|
|
136
|
+
default: i(() => [
|
|
137
|
+
H(K(n(o).customCss), 1)
|
|
130
138
|
]),
|
|
131
139
|
_: 1
|
|
132
|
-
})) :
|
|
133
|
-
|
|
140
|
+
})) : B("", !0),
|
|
141
|
+
f(J, {
|
|
134
142
|
configuration: n(o),
|
|
135
143
|
isDark: !!n(r).workspace["x-scalar-dark-mode"],
|
|
136
144
|
store: n(r),
|
|
137
|
-
onToggleDarkMode: t[
|
|
138
|
-
onUpdateContent: t[
|
|
145
|
+
onToggleDarkMode: t[2] || (t[2] = () => n($)()),
|
|
146
|
+
onUpdateContent: t[3] || (t[3] = (a) => e.$emit("updateContent", a))
|
|
139
147
|
}, {
|
|
140
|
-
"document-selector":
|
|
141
|
-
|
|
142
|
-
modelValue: n(
|
|
143
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) =>
|
|
144
|
-
options: n(
|
|
148
|
+
"document-selector": i(() => [
|
|
149
|
+
f(n(re), {
|
|
150
|
+
modelValue: n(l),
|
|
151
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => O(l) ? l.value = a : null),
|
|
152
|
+
options: n(v)
|
|
145
153
|
}, null, 8, ["modelValue", "options"])
|
|
146
154
|
]),
|
|
147
|
-
"content-start":
|
|
148
|
-
|
|
155
|
+
"content-start": i(() => [
|
|
156
|
+
f(Q, {
|
|
157
|
+
overrides: d.value,
|
|
158
|
+
"onUpdate:overrides": t[1] || (t[1] = (a) => d.value = a),
|
|
159
|
+
configuration: n(o),
|
|
160
|
+
workspace: n(r)
|
|
161
|
+
}, null, 8, ["overrides", "configuration", "workspace"]),
|
|
162
|
+
u(e.$slots, "content-start")
|
|
149
163
|
]),
|
|
150
|
-
"content-end":
|
|
151
|
-
|
|
164
|
+
"content-end": i(() => [
|
|
165
|
+
u(e.$slots, "content-end")
|
|
152
166
|
]),
|
|
153
|
-
"sidebar-start":
|
|
154
|
-
|
|
167
|
+
"sidebar-start": i(() => [
|
|
168
|
+
u(e.$slots, "sidebar-start")
|
|
155
169
|
]),
|
|
156
|
-
"sidebar-end":
|
|
157
|
-
|
|
170
|
+
"sidebar-end": i(() => [
|
|
171
|
+
u(e.$slots, "sidebar-end")
|
|
158
172
|
]),
|
|
159
|
-
footer:
|
|
160
|
-
|
|
173
|
+
footer: i(() => [
|
|
174
|
+
u(e.$slots, "footer")
|
|
161
175
|
]),
|
|
162
176
|
_: 3
|
|
163
177
|
}, 8, ["configuration", "isDark", "store"])
|
|
@@ -165,5 +179,5 @@ const De = /* @__PURE__ */ R({
|
|
|
165
179
|
}
|
|
166
180
|
});
|
|
167
181
|
export {
|
|
168
|
-
|
|
182
|
+
Se as default
|
|
169
183
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type ClientOption, type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
|
|
1
2
|
import type { AvailableClients } from '@scalar/types/snippetz';
|
|
2
|
-
import type { ClientOption, ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/** Client options */
|
|
5
5
|
clientOptions: ClientOptionGroup[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"AAwPA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAA;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAA;AAMxE,KAAK,WAAW,GAAG;IACjB,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,eAAe,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC1C,+BAA+B;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAA;IAC/B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;;AA+OF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientDropdown.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5e88579a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as y, ref as _, computed as S, createElementBlock as o, openBlock as i, createVNode as m, Fragment as k, renderList as w, createBlock as p, unref as n, normalizeClass as a, withCtx as u, createElementVNode as r, toDisplayString as h, createCommentVNode as f } from "vue";
|
|
2
2
|
import { Tab as x } from "@headlessui/vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { findClient as V } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
+
import { ScalarIcon as b, ScalarCombobox as B } from "@scalar/components";
|
|
5
|
+
import { freezeElement as z } from "@scalar/helpers/dom/freeze-element";
|
|
6
|
+
import { emitCustomEvent as E } from "@scalar/workspace-store/events";
|
|
6
7
|
import { isFeaturedClient as g } from "../helpers/featured-clients.js";
|
|
7
|
-
import { findClient as E } from "../../scalar-request-example-block/helpers/find-client.js";
|
|
8
8
|
const K = { class: "client-libraries-text" }, M = {
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
class: "client-libraries-icon__more"
|
|
@@ -31,10 +31,10 @@ const K = { class: "client-libraries-text" }, M = {
|
|
|
31
31
|
const s = _(), d = (e) => `programming-language-${e === "js" ? "javascript" : e}`, C = (e) => {
|
|
32
32
|
if (!s.value)
|
|
33
33
|
return;
|
|
34
|
-
const t =
|
|
34
|
+
const t = z(s.value);
|
|
35
35
|
setTimeout(() => {
|
|
36
36
|
t();
|
|
37
|
-
}, 300),
|
|
37
|
+
}, 300), E(
|
|
38
38
|
s.value,
|
|
39
39
|
"scalar-update-selected-client",
|
|
40
40
|
e.id
|
|
@@ -66,12 +66,12 @@ const K = { class: "client-libraries-text" }, M = {
|
|
|
66
66
|
]),
|
|
67
67
|
_: 2
|
|
68
68
|
}, 1032, ["class"]))), 128)),
|
|
69
|
-
m(n(
|
|
69
|
+
m(n(B), {
|
|
70
|
+
modelValue: n(V)(e.clientOptions, e.xSelectedClient),
|
|
70
71
|
options: e.clientOptions,
|
|
71
|
-
modelValue: n(E)(e.clientOptions, e.xSelectedClient),
|
|
72
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => C(l)),
|
|
73
72
|
placement: "bottom-end",
|
|
74
|
-
teleport: ""
|
|
73
|
+
teleport: "",
|
|
74
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => C(l))
|
|
75
75
|
}, {
|
|
76
76
|
default: u(() => [
|
|
77
77
|
r("button", {
|
|
@@ -103,7 +103,7 @@ const K = { class: "client-libraries-text" }, M = {
|
|
|
103
103
|
], 2)
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
|
-
}, 8, ["
|
|
106
|
+
}, 8, ["modelValue", "options"])
|
|
107
107
|
], 512));
|
|
108
108
|
}
|
|
109
109
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
|
|
1
2
|
import type { AvailableClients } from '@scalar/snippetz';
|
|
2
3
|
import type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation';
|
|
3
|
-
import type { ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
/** Selected SDK installation instructions */
|
|
6
6
|
xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation'];
|
|
@@ -10,7 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
xSelectedClient?: AvailableClients[number];
|
|
11
11
|
};
|
|
12
12
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
-
selectedClientOption: import("vue").ComputedRef<import("
|
|
13
|
+
selectedClientOption: import("vue").ComputedRef<import("@scalar/api-client/v2/blocks/operation-code-sample").ClientOption>;
|
|
14
14
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
export default _default;
|
|
16
16
|
//# sourceMappingURL=ClientSelector.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"AA2MA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAA;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAA;AAU3H,KAAK,WAAW,GAAG;IACjB,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,2BAA2B,CAAC,CAAA;IAC5E,yDAAyD;IACzD,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,yCAAyC;IACzC,eAAe,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CAC3C,CAAC;;;;AAuRF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7bba5108"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as g, useId as b, computed as c, useTemplateRef as I, createElementBlock as o, createCommentVNode as f, openBlock as i, createVNode as r, unref as t, withCtx as u, createElementVNode as T, Fragment as x, normalizeClass as w, renderList as O, createBlock as L, createTextVNode as E, toDisplayString as S } from "vue";
|
|
2
2
|
import { TabGroup as N, TabList as P, TabPanels as B, TabPanel as F } from "@headlessui/vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { DEFAULT_CLIENT as V } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
4
|
+
import { ScalarMarkdown as A, ScalarCodeBlock as D } from "@scalar/components";
|
|
5
|
+
import { emitCustomEvent as M } from "@scalar/workspace-store/events";
|
|
6
|
+
import { getFeaturedClients as z, isFeaturedClient as G } from "../helpers/featured-clients.js";
|
|
7
7
|
import K from "./ClientDropdown.vue.js";
|
|
8
8
|
const R = {
|
|
9
9
|
key: 0,
|
|
@@ -18,20 +18,20 @@ const R = {
|
|
|
18
18
|
props: {
|
|
19
19
|
xScalarSdkInstallation: {},
|
|
20
20
|
clientOptions: {},
|
|
21
|
-
xSelectedClient: { default: () =>
|
|
21
|
+
xSelectedClient: { default: () => V }
|
|
22
22
|
},
|
|
23
23
|
setup(l, { expose: k }) {
|
|
24
24
|
const p = b(), m = b(), C = c(
|
|
25
25
|
() => l.clientOptions.flatMap(
|
|
26
26
|
(e) => e.options.find((a) => a.id === l.xSelectedClient) ?? []
|
|
27
27
|
)[0]
|
|
28
|
-
), s = c(() =>
|
|
28
|
+
), s = c(() => z(l.clientOptions)), y = c(
|
|
29
29
|
() => s.value.findIndex(
|
|
30
30
|
(e) => l.xSelectedClient === e.id
|
|
31
31
|
)
|
|
32
32
|
), v = I("wrapper-ref"), h = (e) => {
|
|
33
33
|
const a = s.value[e];
|
|
34
|
-
!a || !v.value ||
|
|
34
|
+
!a || !v.value || M(v.value, "scalar-update-selected-client", a.id);
|
|
35
35
|
}, n = c(() => {
|
|
36
36
|
if (!Array.isArray(l.xScalarSdkInstallation) || !l.xScalarSdkInstallation?.length)
|
|
37
37
|
return;
|
|
@@ -78,19 +78,19 @@ const R = {
|
|
|
78
78
|
role: "tabpanel",
|
|
79
79
|
tabindex: "0"
|
|
80
80
|
}, [
|
|
81
|
-
r(t(
|
|
81
|
+
r(t(A), {
|
|
82
82
|
value: n.value.description
|
|
83
83
|
}, null, 8, ["value"])
|
|
84
84
|
], 2)) : f("", !0),
|
|
85
85
|
n.value.source ? (i(), o("div", _, [
|
|
86
|
-
r(t(
|
|
86
|
+
r(t(D), {
|
|
87
87
|
class: "rounded-t-none rounded-b-lg px-3 py-2 -outline-offset-1 has-focus:outline",
|
|
88
88
|
content: n.value.source,
|
|
89
89
|
copy: !0,
|
|
90
90
|
lang: "shell"
|
|
91
91
|
}, null, 8, ["content"])
|
|
92
92
|
])) : f("", !0)
|
|
93
|
-
], 64)) : t(
|
|
93
|
+
], 64)) : t(G)(e.xSelectedClient) ? (i(!0), o(x, { key: 1 }, O(s.value, (d) => (i(), L(t(F), {
|
|
94
94
|
key: d.id,
|
|
95
95
|
class: "selected-client card-footer -outline-offset-2"
|
|
96
96
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientOption, ClientOptionGroup } from '
|
|
1
|
+
import type { ClientOption, ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
|
|
2
2
|
import type { AvailableClients } from '@scalar/snippetz';
|
|
3
3
|
/** Whether or not a client is in the featured list */
|
|
4
4
|
export declare const isFeaturedClient: (clientId: AvailableClients[number] | undefined, featuredClients?: AvailableClients[number][]) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featured-clients.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/helpers/featured-clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"featured-clients.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-client-selector-block/helpers/featured-clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAWxD,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,GAC3B,UAAU,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,EAC9C,kBAAiB,gBAAgB,CAAC,MAAM,CAAC,EAAqB,YACgC,CAAA;AAEhG;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,eAAe,iBAAiB,EAAE,EAClC,kBAAiB,gBAAgB,CAAC,MAAM,CAAC,EAAqB,KAC7D,YAAY,EAgBd,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
title?: string;
|
|
3
4
|
getOriginalDocument: () => string;
|
|
5
|
+
url: string | undefined;
|
|
6
|
+
documentDownloadType: ApiReferenceConfiguration['documentDownloadType'];
|
|
4
7
|
};
|
|
5
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-info-block/components/DownloadLink.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-info-block/components/DownloadLink.vue"],"names":[],"mappings":"AAyMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAO9D,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,EAAE,MAAM,MAAM,CAAA;IACjC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,oBAAoB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;CACxE,CAAC;;AA4JF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DownloadLink.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-803c00d1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const O = ["href"], V = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as f, computed as k, createElementBlock as n, createCommentVNode as d, openBlock as t, normalizeClass as g, withModifiers as u, createElementVNode as m, createVNode as s, withCtx as i, createTextVNode as p, Fragment as b } from "vue";
|
|
2
|
+
import c from "github-slugger";
|
|
3
|
+
import w from "../../../../components/Badge/Badge.vue.js";
|
|
4
|
+
import { downloadDocument as v } from "../../../../libs/download.js";
|
|
5
|
+
const T = ["href"], I = /* @__PURE__ */ f({
|
|
7
6
|
__name: "DownloadLink",
|
|
8
7
|
props: {
|
|
9
8
|
title: {},
|
|
10
|
-
getOriginalDocument: { type: Function }
|
|
9
|
+
getOriginalDocument: { type: Function },
|
|
10
|
+
url: {},
|
|
11
|
+
documentDownloadType: {}
|
|
11
12
|
},
|
|
12
13
|
setup(a) {
|
|
13
|
-
const
|
|
14
|
-
|
|
14
|
+
const y = new c(), D = k(() => y.slug(a.title ?? "")), l = (e) => {
|
|
15
|
+
v(a.getOriginalDocument?.() ?? "", D.value, e);
|
|
15
16
|
};
|
|
16
|
-
return (
|
|
17
|
+
return (e, o) => ["yaml", "json", "both"].includes(e.documentDownloadType) ? (t(), n("div", {
|
|
17
18
|
key: 0,
|
|
18
|
-
class:
|
|
19
|
-
"download-both":
|
|
19
|
+
class: g(["download-container group", {
|
|
20
|
+
"download-both": e.documentDownloadType === "both"
|
|
20
21
|
}])
|
|
21
22
|
}, [
|
|
22
|
-
|
|
23
|
+
e.documentDownloadType === "json" || e.documentDownloadType === "both" ? (t(), n("button", {
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "download-button",
|
|
25
26
|
type: "button",
|
|
26
|
-
onClick: o[0] || (o[0] = u((
|
|
27
|
+
onClick: o[0] || (o[0] = u((r) => l("json"), ["prevent"]))
|
|
27
28
|
}, [
|
|
28
29
|
o[4] || (o[4] = m("span", null, " Download OpenAPI Document ", -1)),
|
|
29
|
-
|
|
30
|
-
default:
|
|
31
|
-
|
|
30
|
+
s(w, { class: "extension hidden group-hover:flex" }, {
|
|
31
|
+
default: i(() => o[3] || (o[3] = [
|
|
32
|
+
p("json")
|
|
32
33
|
])),
|
|
33
34
|
_: 1,
|
|
34
35
|
__: [3]
|
|
35
36
|
})
|
|
36
|
-
])) :
|
|
37
|
-
|
|
37
|
+
])) : d("", !0),
|
|
38
|
+
e.documentDownloadType === "yaml" || e.documentDownloadType === "both" ? (t(), n("button", {
|
|
38
39
|
key: 1,
|
|
39
40
|
class: "download-button",
|
|
40
41
|
type: "button",
|
|
41
|
-
onClick: o[1] || (o[1] = u((
|
|
42
|
+
onClick: o[1] || (o[1] = u((r) => l("yaml"), ["prevent"]))
|
|
42
43
|
}, [
|
|
43
44
|
o[6] || (o[6] = m("span", null, " Download OpenAPI Document ", -1)),
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
|
|
45
|
+
s(w, { class: "extension hidden group-hover:flex" }, {
|
|
46
|
+
default: i(() => o[5] || (o[5] = [
|
|
47
|
+
p("yaml")
|
|
47
48
|
])),
|
|
48
49
|
_: 1,
|
|
49
50
|
__: [5]
|
|
50
51
|
})
|
|
51
|
-
])) :
|
|
52
|
-
], 2)) :
|
|
53
|
-
|
|
52
|
+
])) : d("", !0)
|
|
53
|
+
], 2)) : e.documentDownloadType === "direct" ? (t(), n(b, { key: 1 }, [
|
|
54
|
+
e.url ? (t(), n("a", {
|
|
54
55
|
key: 0,
|
|
55
56
|
class: "download-link",
|
|
56
|
-
href:
|
|
57
|
-
}, " Download OpenAPI Document ", 8,
|
|
57
|
+
href: e.url
|
|
58
|
+
}, " Download OpenAPI Document ", 8, T)) : (t(), n("a", {
|
|
58
59
|
key: 1,
|
|
59
60
|
class: "download-link",
|
|
60
61
|
href: "#",
|
|
61
|
-
onClick: o[2] || (o[2] = u((
|
|
62
|
+
onClick: o[2] || (o[2] = u((r) => l("json"), ["prevent"]))
|
|
62
63
|
}, " Download OpenAPI Document "))
|
|
63
|
-
], 64)) :
|
|
64
|
+
], 64)) : d("", !0);
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
I as default
|
|
68
69
|
};
|