@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
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type
|
|
3
|
-
import {
|
|
1
|
+
import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SpecConfiguration, apiReferenceConfigurationSchema } from '@scalar/types/api-reference';
|
|
2
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
3
|
+
import type { z } from 'zod';
|
|
4
4
|
type UseMultipleDocumentsProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Configuration for the API reference.
|
|
7
7
|
* Can be a single configuration or an array of configurations for multiple documents.
|
|
8
8
|
*/
|
|
9
9
|
configuration: Ref<AnyApiReferenceConfiguration | undefined>;
|
|
10
|
+
/** Configuration options to apply over the currently selected configuration */
|
|
11
|
+
configurationOverrides?: Ref<Partial<ApiReferenceConfiguration> | undefined>;
|
|
10
12
|
/** The initial index to pre-select a document, if there is no query parameter available */
|
|
11
13
|
initialIndex?: number;
|
|
12
|
-
|
|
14
|
+
isIntersectionEnabled: Ref<boolean>;
|
|
15
|
+
hash: Ref<string>;
|
|
16
|
+
hashPrefix: Ref<string>;
|
|
17
|
+
};
|
|
13
18
|
/**
|
|
14
19
|
* Take any configuration and return a flat array of configurations.
|
|
15
20
|
*/
|
|
@@ -19,8 +24,8 @@ export declare const normalizeConfigurations: (configuration: AnyApiReferenceCon
|
|
|
19
24
|
*
|
|
20
25
|
* @deprecated
|
|
21
26
|
*/
|
|
22
|
-
export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
23
|
-
selectedConfiguration:
|
|
27
|
+
export declare const useMultipleDocuments: ({ configuration, configurationOverrides, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
28
|
+
selectedConfiguration: ComputedRef<z.infer<typeof apiReferenceConfigurationSchema>>;
|
|
24
29
|
availableDocuments: Ref<SpecConfiguration[]>;
|
|
25
30
|
selectedDocumentIndex: Ref<number>;
|
|
26
31
|
isIntersectionEnabled: Ref<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AACtE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAK5B,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,CAAA;IAC5E,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,CAAA;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,iBAAiB,EA6BnB,CAAA;AA0CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,mGAOlC,yBAAyB,KAAG;IAC7B,qBAAqB,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAA;IACnF,kBAAkB,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC5C,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAwIxB,CAAA"}
|
|
@@ -1,82 +1,91 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
import { isConfigurationWithSources as
|
|
3
|
-
import
|
|
4
|
-
import { computed as m, ref as
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
const { sources: o, ...
|
|
8
|
-
return o?.map((
|
|
1
|
+
import { isDefined as y } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { isConfigurationWithSources as h, apiReferenceConfigurationSchema as v } from "@scalar/types/api-reference";
|
|
3
|
+
import R from "github-slugger";
|
|
4
|
+
import { computed as m, ref as D, watch as b } from "vue";
|
|
5
|
+
const g = "api", w = new R(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMap((u) => {
|
|
6
|
+
if (h(u)) {
|
|
7
|
+
const { sources: o, ...f } = u;
|
|
8
|
+
return o?.map((n) => ({ ...f, ...n })) ?? [];
|
|
9
9
|
}
|
|
10
|
-
return [
|
|
11
|
-
}).map((
|
|
10
|
+
return [u];
|
|
11
|
+
}).map((u, o) => u && C(u, o)).filter(y) : [], C = (t, i = 0) => {
|
|
12
12
|
const e = {
|
|
13
13
|
...t,
|
|
14
14
|
// @ts-expect-error this is before parsing so we transform the old style
|
|
15
15
|
...t.spec ?? {}
|
|
16
16
|
};
|
|
17
17
|
if (!(!e?.url && !e?.content))
|
|
18
|
-
return
|
|
18
|
+
return w.reset(), e.title ? {
|
|
19
19
|
...e,
|
|
20
|
-
slug: e.slug ||
|
|
20
|
+
slug: e.slug || w.slug(e.title),
|
|
21
21
|
title: e.title
|
|
22
22
|
} : e.slug ? {
|
|
23
23
|
...e,
|
|
24
24
|
title: e.slug
|
|
25
25
|
} : {
|
|
26
26
|
...e,
|
|
27
|
-
slug: `api-${
|
|
28
|
-
title: `API #${
|
|
27
|
+
slug: `api-${i + 1}`,
|
|
28
|
+
title: `API #${i + 1}`
|
|
29
29
|
};
|
|
30
|
-
},
|
|
30
|
+
}, U = ({
|
|
31
31
|
configuration: t,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
configurationOverrides: i,
|
|
33
|
+
initialIndex: e,
|
|
34
|
+
isIntersectionEnabled: u,
|
|
35
|
+
hash: o,
|
|
36
|
+
hashPrefix: f
|
|
36
37
|
}) => {
|
|
37
|
-
const n = m(() => A(t.value)),
|
|
38
|
+
const n = m(() => A(t.value)), s = D((() => {
|
|
38
39
|
if (typeof window > "u")
|
|
39
|
-
return typeof
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
const d = Number.parseInt(
|
|
40
|
+
return typeof e == "number" ? e : 0;
|
|
41
|
+
const r = new URL(window.location.href).searchParams.get(g);
|
|
42
|
+
if (r) {
|
|
43
|
+
const l = n.value.findIndex((S) => S.slug === r);
|
|
44
|
+
if (l !== -1)
|
|
45
|
+
return l;
|
|
46
|
+
const d = Number.parseInt(r, 10);
|
|
46
47
|
if (!isNaN(d) && d >= 0 && d < n.value.length)
|
|
47
48
|
return d;
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
})()),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
const p = n.value.findIndex((l) => "default" in l && l.default === !0);
|
|
51
|
+
return p !== -1 ? p : typeof e == "number" ? e : 0;
|
|
52
|
+
})()), c = m(() => {
|
|
53
|
+
const a = i?.value ?? {};
|
|
54
|
+
if (t.value && h(t.value))
|
|
55
|
+
return v.parse({
|
|
56
|
+
...t.value,
|
|
57
|
+
...t.value?.sources?.[s.value],
|
|
58
|
+
...n.value[s.value],
|
|
59
|
+
...a
|
|
60
|
+
});
|
|
61
|
+
const r = [t.value].flat()[s.value] ?? {};
|
|
62
|
+
return v.parse({
|
|
63
|
+
...r,
|
|
64
|
+
...n.value[s.value],
|
|
65
|
+
...a
|
|
66
|
+
});
|
|
58
67
|
});
|
|
59
68
|
return b(
|
|
60
|
-
|
|
61
|
-
(
|
|
69
|
+
s,
|
|
70
|
+
(a) => {
|
|
62
71
|
if (typeof window > "u" || n.value.length === 1)
|
|
63
72
|
return;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
73
|
+
const r = new URL(window.location.href), p = n.value[a];
|
|
74
|
+
c.value.pathRouting && (r.pathname = c.value.pathRouting?.basePath ?? "");
|
|
75
|
+
const l = p?.slug ?? a.toString();
|
|
76
|
+
r.searchParams.set(g, l), r.hash = "", window.history.replaceState({}, "", r.toString()), o.value = "", f.value = "", u.value = !1, typeof window < "u" && window.scrollTo({ top: 0, behavior: "instant" }), typeof c.value.onDocumentSelect == "function" && c.value.onDocumentSelect?.();
|
|
68
77
|
},
|
|
69
78
|
{ flush: "sync" }
|
|
70
79
|
), {
|
|
71
|
-
selectedConfiguration:
|
|
80
|
+
selectedConfiguration: c,
|
|
72
81
|
availableDocuments: n,
|
|
73
|
-
selectedDocumentIndex:
|
|
74
|
-
isIntersectionEnabled:
|
|
75
|
-
hash:
|
|
76
|
-
hashPrefix:
|
|
82
|
+
selectedDocumentIndex: s,
|
|
83
|
+
isIntersectionEnabled: u,
|
|
84
|
+
hash: o,
|
|
85
|
+
hashPrefix: f
|
|
77
86
|
};
|
|
78
87
|
};
|
|
79
88
|
export {
|
|
80
89
|
A as normalizeConfigurations,
|
|
81
|
-
|
|
90
|
+
U as useMultipleDocuments
|
|
82
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAMnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAgFF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53a06e4f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconPlay as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const R = ["method"], S = /* @__PURE__ */ c({
|
|
1
|
+
import { defineComponent as r, createElementBlock as s, openBlock as m, withModifiers as p, createVNode as n, createElementVNode as d, unref as c, withCtx as h, createTextVNode as u, toDisplayString as l } from "vue";
|
|
2
|
+
import { ScalarIconPlay as f } from "@scalar/icons";
|
|
3
|
+
import C from "../../components/ScreenReader.vue.js";
|
|
4
|
+
import { useApiClient as k } from "../api-client-modal/useApiClient.js";
|
|
5
|
+
const w = ["method"], R = /* @__PURE__ */ r({
|
|
7
6
|
__name: "TestRequestButton",
|
|
8
7
|
props: {
|
|
9
8
|
method: {},
|
|
10
9
|
path: {}
|
|
11
10
|
},
|
|
12
11
|
setup(t) {
|
|
13
|
-
const { client: a } =
|
|
14
|
-
() => m.value.hideTestRequestButton !== !0
|
|
15
|
-
), p = () => {
|
|
12
|
+
const { client: a } = k(), i = () => {
|
|
16
13
|
a.value?.open({
|
|
17
14
|
method: t.method,
|
|
18
15
|
path: t.path
|
|
19
16
|
});
|
|
20
17
|
};
|
|
21
|
-
return (e, o) =>
|
|
22
|
-
key: 0,
|
|
18
|
+
return (e, o) => (m(), s("button", {
|
|
23
19
|
class: "show-api-client-button",
|
|
24
20
|
method: e.method,
|
|
25
21
|
type: "button",
|
|
26
|
-
onClick:
|
|
22
|
+
onClick: p(i, ["stop"])
|
|
27
23
|
}, [
|
|
28
|
-
|
|
24
|
+
n(c(f), {
|
|
29
25
|
class: "size-3",
|
|
30
26
|
weight: "fill"
|
|
31
27
|
}),
|
|
32
|
-
o[0] || (o[0] =
|
|
33
|
-
|
|
34
|
-
default:
|
|
35
|
-
|
|
28
|
+
o[0] || (o[0] = d("span", null, "Test Request", -1)),
|
|
29
|
+
n(C, null, {
|
|
30
|
+
default: h(() => [
|
|
31
|
+
u("(" + l(e.method) + " " + l(e.path) + ")", 1)
|
|
36
32
|
]),
|
|
37
33
|
_: 1
|
|
38
34
|
})
|
|
39
|
-
], 8,
|
|
40
|
-
l(" ")
|
|
41
|
-
], 64));
|
|
35
|
+
], 8, w));
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
export {
|
|
45
|
-
|
|
39
|
+
R as default
|
|
46
40
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
2
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
workspace?: WorkspaceStore;
|
|
5
|
+
configuration?: Partial<ApiReferenceConfiguration>;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
8
|
+
'overrides'?: Partial<ApiReferenceConfiguration>;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:overrides": (value: Partial<ApiReferenceConfiguration> | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:overrides"?: ((value: Partial<ApiReferenceConfiguration> | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=ApiReferenceToolbar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbar.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbar.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAQpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAyBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AAoGF,wBAOG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as d, mergeModels as m, useModel as u, computed as p, createElementBlock as n, createCommentVNode as s, openBlock as a, createElementVNode as c, createVNode as o, Fragment as w } from "vue";
|
|
2
|
+
import { isLocalUrl as v } from "@scalar/helpers/url/is-local-url";
|
|
3
|
+
import k from "./ApiReferenceToolbarConfig.vue.js";
|
|
4
|
+
import b from "./ApiReferenceToolbarSdks.vue.js";
|
|
5
|
+
import h from "./ApiReferenceToolbarShare.vue.js";
|
|
6
|
+
import _ from "./ApiReferenceToolbarTitle.vue.js";
|
|
7
|
+
const g = {
|
|
8
|
+
key: 0,
|
|
9
|
+
"aria-label": "Developer Tools",
|
|
10
|
+
class: "api-reference-toolbar h-header bg-b-1 sticky top-0 z-10 flex justify-center border-b px-15"
|
|
11
|
+
}, x = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" }, y = { class: "flex flex-1 items-center" }, C = /* @__PURE__ */ d({
|
|
12
|
+
__name: "ApiReferenceToolbar",
|
|
13
|
+
props: /* @__PURE__ */ m({
|
|
14
|
+
workspace: {},
|
|
15
|
+
configuration: {}
|
|
16
|
+
}, {
|
|
17
|
+
overrides: {},
|
|
18
|
+
overridesModifiers: {}
|
|
19
|
+
}),
|
|
20
|
+
emits: ["update:overrides"],
|
|
21
|
+
setup(r) {
|
|
22
|
+
const t = u(r, "overrides"), l = p(() => r.configuration?.showToolbar === "always" ? !0 : r.configuration?.showToolbar === "never" || typeof window > "u" ? !1 : v(window.location.href));
|
|
23
|
+
return (e, i) => l.value ? (a(), n("header", g, [
|
|
24
|
+
c("div", x, [
|
|
25
|
+
c("div", y, [
|
|
26
|
+
o(_)
|
|
27
|
+
]),
|
|
28
|
+
e.workspace ? (a(), n(w, { key: 0 }, [
|
|
29
|
+
o(h, { workspace: e.workspace }, null, 8, ["workspace"]),
|
|
30
|
+
o(b, { workspace: e.workspace }, null, 8, ["workspace"])
|
|
31
|
+
], 64)) : s("", !0),
|
|
32
|
+
o(k, {
|
|
33
|
+
overrides: t.value,
|
|
34
|
+
"onUpdate:overrides": i[0] || (i[0] = (f) => t.value = f),
|
|
35
|
+
configuration: e.configuration
|
|
36
|
+
}, null, 8, ["overrides", "configuration"])
|
|
37
|
+
])
|
|
38
|
+
])) : s("", !0);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
C as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ApiReferenceToolbarBlurb.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarBlurb.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarBlurb.vue"],"names":[],"mappings":"AA6BA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as o, renderSlot as r } from "vue";
|
|
2
|
+
import c from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const n = {}, l = { class: "text-c-3 [&_code]:font-code [&_a:hover]:text-c-1 text-center leading-normal [&_a]:underline" };
|
|
4
|
+
function a(e, s) {
|
|
5
|
+
return o(), t("p", l, [
|
|
6
|
+
r(e.$slots, "default")
|
|
7
|
+
]);
|
|
8
|
+
}
|
|
9
|
+
const f = /* @__PURE__ */ c(n, [["render", a]]);
|
|
10
|
+
export {
|
|
11
|
+
f as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
configuration?: Partial<ApiReferenceConfiguration>;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
'overrides'?: Partial<ApiReferenceConfiguration>;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:overrides": (value: Partial<ApiReferenceConfiguration> | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:overrides"?: ((value: Partial<ApiReferenceConfiguration> | undefined) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=ApiReferenceToolbarConfig.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfig.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfig.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAQ9D,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA2BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;;;;;;AA4JF,wBAOG"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as g, useModel as V, computed as m, createBlock as b, openBlock as c, withCtx as l, createVNode as t, createElementVNode as x, unref as u, createTextVNode as r } from "vue";
|
|
2
|
+
import { ScalarFormSection as y, ScalarCodeBlock as C, ScalarFormField as d } from "@scalar/components";
|
|
3
|
+
import { prettyPrintJson as S } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import $ from "./ApiReferenceToolbarConfigLayout.vue.js";
|
|
5
|
+
import k from "./ApiReferenceToolbarConfigLayoutOptions.vue.js";
|
|
6
|
+
import B from "./ApiReferenceToolbarConfigTheme.vue.js";
|
|
7
|
+
import F from "./ApiReferenceToolbarPopover.vue.js";
|
|
8
|
+
const M = { class: "flex flex-col gap-4" }, E = /* @__PURE__ */ p({
|
|
9
|
+
__name: "ApiReferenceToolbarConfig",
|
|
10
|
+
props: /* @__PURE__ */ g({
|
|
11
|
+
configuration: {}
|
|
12
|
+
}, {
|
|
13
|
+
overrides: {},
|
|
14
|
+
overridesModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: ["update:overrides"],
|
|
17
|
+
setup(i) {
|
|
18
|
+
const o = V(i, "overrides"), v = m(() => S({
|
|
19
|
+
...o.value,
|
|
20
|
+
// Make sure the overrides are first
|
|
21
|
+
...i.configuration,
|
|
22
|
+
...o.value
|
|
23
|
+
// But also that they override the configuration
|
|
24
|
+
})), f = m({
|
|
25
|
+
get: () => o.value?.theme ?? i.configuration?.theme ?? "default",
|
|
26
|
+
set: (a) => o.value = { ...o.value, theme: a }
|
|
27
|
+
}), s = m({
|
|
28
|
+
get: () => o.value?.layout ?? i.configuration?.layout ?? "modern",
|
|
29
|
+
set: (a) => o.value = { ...o.value, layout: a }
|
|
30
|
+
});
|
|
31
|
+
return (a, e) => (c(), b(F, { class: "w-120" }, {
|
|
32
|
+
label: l(() => e[3] || (e[3] = [
|
|
33
|
+
r("Configure")
|
|
34
|
+
])),
|
|
35
|
+
default: l(() => [
|
|
36
|
+
t(u(y), null, {
|
|
37
|
+
label: l(() => e[4] || (e[4] = [
|
|
38
|
+
r("Scalar Configuration")
|
|
39
|
+
])),
|
|
40
|
+
default: l(() => [
|
|
41
|
+
t(u(C), {
|
|
42
|
+
class: "bg-b-1.5 max-h-40 rounded border text-sm",
|
|
43
|
+
content: v.value,
|
|
44
|
+
lang: "json"
|
|
45
|
+
}, null, 8, ["content"])
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
}),
|
|
49
|
+
x("div", M, [
|
|
50
|
+
t(u(d), null, {
|
|
51
|
+
label: l(() => e[5] || (e[5] = [
|
|
52
|
+
r("Theme")
|
|
53
|
+
])),
|
|
54
|
+
default: l(() => [
|
|
55
|
+
t(B, {
|
|
56
|
+
modelValue: f.value,
|
|
57
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => f.value = n)
|
|
58
|
+
}, null, 8, ["modelValue"])
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}),
|
|
62
|
+
t(u(d), null, {
|
|
63
|
+
label: l(() => e[6] || (e[6] = [
|
|
64
|
+
r("Layout")
|
|
65
|
+
])),
|
|
66
|
+
default: l(() => [
|
|
67
|
+
t($, {
|
|
68
|
+
modelValue: s.value,
|
|
69
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => s.value = n)
|
|
70
|
+
}, null, 8, ["modelValue"])
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
}),
|
|
74
|
+
t(u(d), { is: "div" }, {
|
|
75
|
+
label: l(() => e[7] || (e[7] = [
|
|
76
|
+
r("Layout Options")
|
|
77
|
+
])),
|
|
78
|
+
default: l(() => [
|
|
79
|
+
t(k, {
|
|
80
|
+
configuration: a.configuration,
|
|
81
|
+
modelValue: o.value,
|
|
82
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => o.value = n)
|
|
83
|
+
}, null, 8, ["configuration", "modelValue"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
})
|
|
87
|
+
])
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
E as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_PublicProps = {
|
|
2
|
+
modelValue?: 'modern' | 'classic';
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: "modern" | "classic" | undefined) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: "modern" | "classic" | undefined) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ApiReferenceToolbarConfigLayout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayout.vue"],"names":[],"mappings":"AAsDA,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACjC,CAAC;;;;;;AA8CF,wBAOG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as r, useModel as m, computed as c, createBlock as i, openBlock as p, unref as f } from "vue";
|
|
2
|
+
import { ScalarCheckboxRadioGroup as v } from "@scalar/components";
|
|
3
|
+
const b = /* @__PURE__ */ r({
|
|
4
|
+
__name: "ApiReferenceToolbarConfigLayout",
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {},
|
|
7
|
+
modelModifiers: {}
|
|
8
|
+
},
|
|
9
|
+
emits: ["update:modelValue"],
|
|
10
|
+
setup(u) {
|
|
11
|
+
const e = { label: "Modern", value: "modern" }, o = { label: "Classic", value: "classic" }, s = [
|
|
12
|
+
e,
|
|
13
|
+
o
|
|
14
|
+
], l = m(u, "modelValue"), a = c({
|
|
15
|
+
get: () => l.value === "modern" ? e : o,
|
|
16
|
+
set: (t) => l.value = t.value
|
|
17
|
+
});
|
|
18
|
+
return (t, n) => (p(), i(f(v), {
|
|
19
|
+
modelValue: a.value,
|
|
20
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => a.value = d),
|
|
21
|
+
options: s
|
|
22
|
+
}, null, 8, ["modelValue"]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
b as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
2
|
+
type LayoutOptions = {
|
|
3
|
+
showSidebar?: boolean;
|
|
4
|
+
defaultOpenAllTags?: boolean;
|
|
5
|
+
expandAllModelSections?: boolean;
|
|
6
|
+
expandAllResponses?: boolean;
|
|
7
|
+
hideClientButton?: boolean;
|
|
8
|
+
hideDarkModeToggle?: boolean;
|
|
9
|
+
hideModels?: boolean;
|
|
10
|
+
hideSearch?: boolean;
|
|
11
|
+
hideTestRequestButton?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
configuration?: Partial<ApiReferenceConfiguration>;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
17
|
+
modelValue?: LayoutOptions;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: LayoutOptions) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: LayoutOptions) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA8BF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;;;;;;AA8MF,wBAOG"}
|