@scalar/api-reference 1.36.2 → 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 +49 -0
- package/dist/browser/standalone.js +26143 -25935
- 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/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 +2 -2
- 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/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/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 +2 -2
- package/dist/features/Operation/components/Headers.vue2.js +31 -29
- 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 +3 -3
- 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 +2 -2
- 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 +8 -5
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +46 -43
- 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.js +18 -18
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
- 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.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
- 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 +2 -2
- 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 +19 -16
- 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 +0 -14
- 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,6 +1,6 @@
|
|
|
1
|
-
import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SpecConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import { type Ref } from 'vue';
|
|
3
|
-
import type {
|
|
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.
|
|
@@ -11,7 +11,10 @@ type UseMultipleDocumentsProps = {
|
|
|
11
11
|
configurationOverrides?: Ref<Partial<ApiReferenceConfiguration> | undefined>;
|
|
12
12
|
/** The initial index to pre-select a document, if there is no query parameter available */
|
|
13
13
|
initialIndex?: number;
|
|
14
|
-
|
|
14
|
+
isIntersectionEnabled: Ref<boolean>;
|
|
15
|
+
hash: Ref<string>;
|
|
16
|
+
hashPrefix: Ref<string>;
|
|
17
|
+
};
|
|
15
18
|
/**
|
|
16
19
|
* Take any configuration and return a flat array of configurations.
|
|
17
20
|
*/
|
|
@@ -22,7 +25,7 @@ export declare const normalizeConfigurations: (configuration: AnyApiReferenceCon
|
|
|
22
25
|
* @deprecated
|
|
23
26
|
*/
|
|
24
27
|
export declare const useMultipleDocuments: ({ configuration, configurationOverrides, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
25
|
-
selectedConfiguration:
|
|
28
|
+
selectedConfiguration: ComputedRef<z.infer<typeof apiReferenceConfigurationSchema>>;
|
|
26
29
|
availableDocuments: Ref<SpecConfiguration[]>;
|
|
27
30
|
selectedDocumentIndex: Ref<number>;
|
|
28
31
|
isIntersectionEnabled: Ref<boolean>;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,23 +1,23 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
import { isConfigurationWithSources as
|
|
3
|
-
import
|
|
4
|
-
import { computed as
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
const { sources:
|
|
8
|
-
return
|
|
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,
|
|
@@ -27,62 +27,65 @@ const m = "api", g = new y(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMa
|
|
|
27
27
|
slug: `api-${i + 1}`,
|
|
28
28
|
title: `API #${i + 1}`
|
|
29
29
|
};
|
|
30
|
-
},
|
|
30
|
+
}, U = ({
|
|
31
31
|
configuration: t,
|
|
32
32
|
configurationOverrides: i,
|
|
33
33
|
initialIndex: e,
|
|
34
|
-
isIntersectionEnabled:
|
|
35
|
-
hash:
|
|
34
|
+
isIntersectionEnabled: u,
|
|
35
|
+
hash: o,
|
|
36
36
|
hashPrefix: f
|
|
37
37
|
}) => {
|
|
38
|
-
const n =
|
|
38
|
+
const n = m(() => A(t.value)), s = D((() => {
|
|
39
39
|
if (typeof window > "u")
|
|
40
40
|
return typeof e == "number" ? e : 0;
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const l = n.value.findIndex((
|
|
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
44
|
if (l !== -1)
|
|
45
45
|
return l;
|
|
46
|
-
const
|
|
47
|
-
if (!isNaN(
|
|
48
|
-
return
|
|
46
|
+
const d = Number.parseInt(r, 10);
|
|
47
|
+
if (!isNaN(d) && d >= 0 && d < n.value.length)
|
|
48
|
+
return d;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
})()), c =
|
|
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
53
|
const a = i?.value ?? {};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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],
|
|
58
65
|
...a
|
|
59
|
-
}
|
|
60
|
-
...[t.value].flat()[o.value] ?? {},
|
|
61
|
-
...n.value[o.value],
|
|
62
|
-
...a
|
|
63
|
-
};
|
|
66
|
+
});
|
|
64
67
|
});
|
|
65
68
|
return b(
|
|
66
|
-
|
|
69
|
+
s,
|
|
67
70
|
(a) => {
|
|
68
71
|
if (typeof window > "u" || n.value.length === 1)
|
|
69
72
|
return;
|
|
70
|
-
const
|
|
71
|
-
c.value.pathRouting && (
|
|
72
|
-
const l =
|
|
73
|
-
|
|
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?.();
|
|
74
77
|
},
|
|
75
78
|
{ flush: "sync" }
|
|
76
79
|
), {
|
|
77
80
|
selectedConfiguration: c,
|
|
78
81
|
availableDocuments: n,
|
|
79
|
-
selectedDocumentIndex:
|
|
80
|
-
isIntersectionEnabled:
|
|
81
|
-
hash:
|
|
82
|
+
selectedDocumentIndex: s,
|
|
83
|
+
isIntersectionEnabled: u,
|
|
84
|
+
hash: o,
|
|
82
85
|
hashPrefix: f
|
|
83
86
|
};
|
|
84
87
|
};
|
|
85
88
|
export {
|
|
86
89
|
A as normalizeConfigurations,
|
|
87
|
-
|
|
90
|
+
U as useMultipleDocuments
|
|
88
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
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as d, mergeModels as m, useModel as u, computed as p, createElementBlock as n, createCommentVNode as
|
|
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
2
|
import { isLocalUrl as v } from "@scalar/helpers/url/is-local-url";
|
|
3
3
|
import k from "./ApiReferenceToolbarConfig.vue.js";
|
|
4
4
|
import b from "./ApiReferenceToolbarSdks.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import h from "./ApiReferenceToolbarShare.vue.js";
|
|
6
|
+
import _ from "./ApiReferenceToolbarTitle.vue.js";
|
|
7
|
+
const g = {
|
|
8
8
|
key: 0,
|
|
9
|
-
"aria-label": "
|
|
9
|
+
"aria-label": "Developer Tools",
|
|
10
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" },
|
|
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
12
|
__name: "ApiReferenceToolbar",
|
|
13
13
|
props: /* @__PURE__ */ m({
|
|
14
14
|
workspace: {},
|
|
@@ -19,25 +19,25 @@ const _ = {
|
|
|
19
19
|
}),
|
|
20
20
|
emits: ["update:overrides"],
|
|
21
21
|
setup(r) {
|
|
22
|
-
const
|
|
23
|
-
return (e,
|
|
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
24
|
c("div", x, [
|
|
25
25
|
c("div", y, [
|
|
26
|
-
o(
|
|
26
|
+
o(_)
|
|
27
27
|
]),
|
|
28
|
-
e.workspace ? (
|
|
29
|
-
o(
|
|
28
|
+
e.workspace ? (a(), n(w, { key: 0 }, [
|
|
29
|
+
o(h, { workspace: e.workspace }, null, 8, ["workspace"]),
|
|
30
30
|
o(b, { workspace: e.workspace }, null, 8, ["workspace"])
|
|
31
|
-
], 64)) :
|
|
31
|
+
], 64)) : s("", !0),
|
|
32
32
|
o(k, {
|
|
33
|
-
|
|
34
|
-
overrides: i.value,
|
|
35
|
-
|
|
36
|
-
}, null, 8, ["
|
|
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
37
|
])
|
|
38
|
-
])) :
|
|
38
|
+
])) : s("", !0);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
C as default
|
|
43
43
|
};
|
|
@@ -3,9 +3,9 @@ type __VLS_PublicProps = {
|
|
|
3
3
|
modelValue?: ThemeId;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:modelValue": (value: "
|
|
6
|
+
"update:modelValue": (value: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined) => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: ((value: "
|
|
8
|
+
"onUpdate:modelValue"?: ((value: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined) => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=ApiReferenceToolbarConfigTheme.vue.d.ts.map
|
|
@@ -29,7 +29,7 @@ const v = { class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1
|
|
|
29
29
|
o(e.$slots, "info", {}, () => [
|
|
30
30
|
t[0] || (t[0] = i(' "')),
|
|
31
31
|
o(e.$slots, "label"),
|
|
32
|
-
t[1] || (t[1] = i('" will only appear when running on localhost '))
|
|
32
|
+
t[1] || (t[1] = i('" will only appear when running on localhost. '))
|
|
33
33
|
])
|
|
34
34
|
])
|
|
35
35
|
])
|
|
@@ -16,7 +16,7 @@ const B = { class: "inline-flex items-center gap-2" }, I = /* @__PURE__ */ f({
|
|
|
16
16
|
icon: "programming-language-typescript"
|
|
17
17
|
},
|
|
18
18
|
{ key: "python", label: "Python", icon: "programming-language-python" },
|
|
19
|
-
{ key: "csharp", label: "C", icon: "programming-language-csharp" },
|
|
19
|
+
{ key: "csharp", label: "C#", icon: "programming-language-csharp" },
|
|
20
20
|
{ key: "java", label: "Java", icon: "programming-language-java" },
|
|
21
21
|
{ key: "ruby", label: "Ruby", icon: "programming-language-ruby" },
|
|
22
22
|
{ key: "php", label: "PHP", icon: "programming-language-php" },
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarFormSection as
|
|
1
|
+
import { defineComponent as n, createBlock as s, openBlock as m, withCtx as r, createVNode as o, unref as p, createTextVNode as a } from "vue";
|
|
2
|
+
import { ScalarFormSection as t } from "@scalar/components";
|
|
3
3
|
import f from "./ApiReferenceToolbarPopover.vue.js";
|
|
4
4
|
import i from "./ApiReferenceToolbarShareRegister.vue.js";
|
|
5
5
|
import u from "./ApiReferenceToolbarShareTemporary.vue.js";
|
|
6
|
-
const S = /* @__PURE__ */
|
|
6
|
+
const S = /* @__PURE__ */ n({
|
|
7
7
|
__name: "ApiReferenceToolbarShare",
|
|
8
8
|
props: {
|
|
9
9
|
workspace: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
return (l, e) => (
|
|
11
|
+
setup(c) {
|
|
12
|
+
return (l, e) => (m(), s(f, { class: "w-120" }, {
|
|
13
13
|
label: r(() => e[0] || (e[0] = [
|
|
14
14
|
a("Share")
|
|
15
15
|
])),
|
|
16
16
|
default: r(() => [
|
|
17
|
-
o(
|
|
17
|
+
o(p(t), null, {
|
|
18
18
|
label: r(() => e[1] || (e[1] = [
|
|
19
19
|
a("Temporary Link")
|
|
20
20
|
])),
|
|
@@ -23,9 +23,9 @@ const S = /* @__PURE__ */ t({
|
|
|
23
23
|
]),
|
|
24
24
|
_: 1
|
|
25
25
|
}),
|
|
26
|
-
o(
|
|
26
|
+
o(p(t), null, {
|
|
27
27
|
label: r(() => e[2] || (e[2] = [
|
|
28
|
-
a("
|
|
28
|
+
a("Cloud Hosting")
|
|
29
29
|
])),
|
|
30
30
|
default: r(() => [
|
|
31
31
|
o(i, { workspace: l.workspace }, null, 8, ["workspace"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;;AAgGF,wBAMG"}
|
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, createElementBlock as t, openBlock as l, Fragment as n, createElementVNode as r, createVNode as c, renderList as d, createBlock as u, createTextVNode as o, resolveDynamicComponent as S, toDisplayString as g, withCtx as i } from "vue";
|
|
2
|
+
import { ScalarIconGlobeSimple as b, ScalarIconGitBranch as f, ScalarIconFileMd as _, ScalarIconLockSimple as k, ScalarIconWarningOctagon as w, ScalarIconBracketsCurly as h } from "@scalar/icons";
|
|
3
|
+
import y from "./ApiReferenceToolbarBlurb.vue.js";
|
|
4
|
+
import x from "./ApiReferenceToolbarRegisterButton.vue.js";
|
|
5
|
+
const B = { class: "text-c-2 grid grid-cols-2 gap-2.5 font-medium" }, N = /* @__PURE__ */ m({
|
|
6
6
|
__name: "ApiReferenceToolbarShareRegister",
|
|
7
7
|
props: {
|
|
8
8
|
workspace: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
{ icon: g, label: "Password Protected" },
|
|
10
|
+
setup(I) {
|
|
11
|
+
const s = [
|
|
13
12
|
{ icon: b, label: "Custom Domains" },
|
|
14
|
-
{ icon:
|
|
15
|
-
{ icon: _, label: "
|
|
16
|
-
{ icon:
|
|
17
|
-
{ icon:
|
|
13
|
+
{ icon: f, label: "GitHub Sync" },
|
|
14
|
+
{ icon: _, label: "Markdown/MDX" },
|
|
15
|
+
{ icon: k, label: "Password Protection" },
|
|
16
|
+
{ icon: w, label: "Spectral Linting" },
|
|
17
|
+
{ icon: h, label: "JSON Schema Support" }
|
|
18
18
|
];
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
(
|
|
22
|
-
key:
|
|
19
|
+
return (p, e) => (l(), t(n, null, [
|
|
20
|
+
r("ul", B, [
|
|
21
|
+
(l(), t(n, null, d(s, (a) => r("li", {
|
|
22
|
+
key: a.label,
|
|
23
23
|
class: "flex items-center gap-2"
|
|
24
24
|
}, [
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
(l(), u(S(a.icon), {
|
|
26
|
+
class: "text-c-3 size-3.5",
|
|
27
|
+
weight: "bold"
|
|
28
28
|
})),
|
|
29
|
-
|
|
29
|
+
o(" " + g(a.label), 1)
|
|
30
30
|
])), 64))
|
|
31
31
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
c(x, { workspace: p.workspace }, {
|
|
33
|
+
default: i(() => e[0] || (e[0] = [
|
|
34
|
+
o(" Deploy on Scalar ")
|
|
35
|
+
])),
|
|
36
|
+
_: 1,
|
|
37
|
+
__: [0]
|
|
38
|
+
}, 8, ["workspace"]),
|
|
39
|
+
c(y, null, {
|
|
40
|
+
default: i(() => e[1] || (e[1] = [
|
|
41
|
+
o(" Uploading documents to the Scalar Registry is a Premium feature. See what else is included in our "),
|
|
42
|
+
r("a", {
|
|
37
43
|
href: "https://guides.scalar.com/",
|
|
38
44
|
target: "_blank"
|
|
39
45
|
}, " guides", -1),
|
|
40
|
-
|
|
46
|
+
o(". ")
|
|
41
47
|
])),
|
|
42
48
|
_: 1,
|
|
43
|
-
__: [
|
|
49
|
+
__: [1]
|
|
44
50
|
})
|
|
45
51
|
], 64));
|
|
46
52
|
}
|
|
47
53
|
});
|
|
48
54
|
export {
|
|
49
|
-
|
|
55
|
+
N as default
|
|
50
56
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
1
|
+
import { defineComponent as a, createBlock as p, openBlock as d, withCtx as l, createElementVNode as e, createTextVNode as t, createVNode as r, toDisplayString as c, unref as n } from "vue";
|
|
2
|
+
import { ScalarIconButton as u } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCopy as m, ScalarIconInfo as f } from "@scalar/icons";
|
|
4
4
|
import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
5
|
+
import x from "./ApiReferenceToolbarPopover.vue.js";
|
|
6
|
+
const y = {
|
|
7
|
+
class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none",
|
|
8
|
+
type: "button"
|
|
9
|
+
}, g = { class: "-m-2 flex flex-col gap-2 leading-relaxed" }, v = { class: "bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm" }, i = 'showToolbar: "never"', k = /* @__PURE__ */ a({
|
|
10
10
|
__name: "ApiReferenceToolbarTitle",
|
|
11
|
-
setup(
|
|
12
|
-
const { copyToClipboard:
|
|
13
|
-
return (C, o) => (d(), p(
|
|
11
|
+
setup(T) {
|
|
12
|
+
const { copyToClipboard: s } = b();
|
|
13
|
+
return (C, o) => (d(), p(x, {
|
|
14
14
|
class: "w-120",
|
|
15
15
|
placement: "bottom-start"
|
|
16
16
|
}, {
|
|
17
|
-
button:
|
|
18
|
-
|
|
19
|
-
o[1] || (o[1] =
|
|
20
|
-
|
|
17
|
+
button: l(() => [
|
|
18
|
+
e("button", y, [
|
|
19
|
+
o[1] || (o[1] = t(" Developer Tools ")),
|
|
20
|
+
r(n(f))
|
|
21
21
|
])
|
|
22
22
|
]),
|
|
23
|
-
info:
|
|
24
|
-
|
|
23
|
+
info: l(() => o[5] || (o[5] = [
|
|
24
|
+
t(" The developer tools will only appear when running on localhost. ")
|
|
25
25
|
])),
|
|
26
|
-
default:
|
|
27
|
-
|
|
28
|
-
o[4] || (o[4] =
|
|
29
|
-
|
|
30
|
-
o[2] || (o[2] =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
default: l(() => [
|
|
27
|
+
e("div", g, [
|
|
28
|
+
o[4] || (o[4] = e("div", null, " The developer tools allow you to customize the appearance and behavior of your documentation. You can also share your documentation using the Scalar Registry. ", -1)),
|
|
29
|
+
e("div", null, [
|
|
30
|
+
o[2] || (o[2] = t(" To disable the toolbar, set ")),
|
|
31
|
+
e("div", v, [
|
|
32
|
+
e("code", { class: "font-code" }, c(i)),
|
|
33
|
+
r(n(u), {
|
|
34
|
+
class: "-m-1 p-1.25",
|
|
34
35
|
icon: n(m),
|
|
35
36
|
label: "Copy link to clipboard",
|
|
36
|
-
class: "-m-1 p-1.25",
|
|
37
37
|
size: "sm",
|
|
38
|
-
onClick: o[0] || (o[0] = (w) => n(
|
|
38
|
+
onClick: o[0] || (o[0] = (w) => n(s)(i))
|
|
39
39
|
}, null, 8, ["icon"])
|
|
40
40
|
]),
|
|
41
|
-
o[3] || (o[3] =
|
|
41
|
+
o[3] || (o[3] = t(" in your configuration. "))
|
|
42
42
|
])
|
|
43
43
|
])
|
|
44
44
|
]),
|