@scalar/api-reference 1.36.2 → 1.38.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 +83 -0
- package/dist/browser/standalone.js +28796 -26431
- 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/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +2 -2
- package/dist/components/GettingStarted.vue2.js +22 -22
- 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/esm.d.ts +2 -2
- package/dist/esm.d.ts.map +1 -1
- 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 +3039 -2895
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +2 -2
- 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 +2 -2
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +38 -34
- 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/DocumentSelector.vue.d.ts +2 -2
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +10 -7
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +47 -44
- 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/standalone/lib/html-api.d.ts +3 -3
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/register-globals.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- 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-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +18 -19
- 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 +24 -24
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +20 -17
- 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
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
1
|
+
import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration, ApiReferenceConfigurationWithSource } from '@scalar/types/api-reference';
|
|
2
2
|
import type { OpenAPIV3_1 } from '@scalar/types/legacy';
|
|
3
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
4
|
export type { ApiReferenceConfiguration };
|
|
@@ -9,7 +9,7 @@ export type ReferenceProps = {
|
|
|
9
9
|
* Before the configuration is parsed, we can use the broader types.
|
|
10
10
|
*/
|
|
11
11
|
export type ReferenceLayoutProps = {
|
|
12
|
-
configuration: Partial<
|
|
12
|
+
configuration: Partial<ApiReferenceConfigurationWithSource>;
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* The OpenAPI 3.1 document, but all $ref's are resolved already.
|
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,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,mCAAmC,EACpC,MAAM,6BAA6B,CAAA;AACpC,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,mCAAmC,CAAC,CAAA;IAC3D;;;;;;;;;;;;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"}
|
|
@@ -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,54 +1,60 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
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";
|
|
4
|
+
import { makeUrlAbsolute as Y } from "@scalar/helpers/url/make-url-absolute";
|
|
5
|
+
import { redirectToProxy as z } from "@scalar/oas-utils/helpers";
|
|
5
6
|
import { useColorMode as j } from "@scalar/use-hooks/useColorMode";
|
|
6
7
|
import { useSeoMeta as q } from "@unhead/vue";
|
|
7
8
|
import { useFavicon as G } from "@vueuse/core";
|
|
8
9
|
import J from "../components/ApiReferenceLayout.vue.js";
|
|
9
10
|
import Q from "../features/toolbar/ApiReferenceToolbar.vue.js";
|
|
10
11
|
import { NAV_STATE_SYMBOL as X } from "../hooks/useNavState.js";
|
|
11
|
-
import { isClient as D } from "./blocks/scalar-request-example-block/helpers/find-client.js";
|
|
12
12
|
import { getDocumentName as Z } from "./helpers/get-document-name.js";
|
|
13
13
|
import { mapConfiguration as E } from "./helpers/map-configuration.js";
|
|
14
14
|
import { normalizeContent as ee } from "./helpers/normalize-content.js";
|
|
15
15
|
import { useWorkspaceStoreEvents as te } from "./hooks/use-workspace-store-events.js";
|
|
16
16
|
import { useMultipleDocuments as oe } from "../features/multiple-documents/useMultipleDocuments.js";
|
|
17
17
|
import re from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
18
|
-
const
|
|
18
|
+
const Se = /* @__PURE__ */ w({
|
|
19
19
|
__name: "ApiReferenceWorkspace",
|
|
20
20
|
props: {
|
|
21
21
|
configuration: {},
|
|
22
22
|
store: {}
|
|
23
23
|
},
|
|
24
24
|
emits: ["updateContent"],
|
|
25
|
-
setup(
|
|
26
|
-
const p =
|
|
25
|
+
setup(S) {
|
|
26
|
+
const p = S, d = m({}), {
|
|
27
27
|
availableDocuments: v,
|
|
28
28
|
selectedConfiguration: o,
|
|
29
29
|
selectedDocumentIndex: l,
|
|
30
30
|
isIntersectionEnabled: c,
|
|
31
|
-
hash:
|
|
32
|
-
hashPrefix:
|
|
31
|
+
hash: h,
|
|
32
|
+
hashPrefix: M
|
|
33
33
|
} = oe({
|
|
34
34
|
configuration: I(p, "configuration"),
|
|
35
35
|
configurationOverrides: d,
|
|
36
36
|
isIntersectionEnabled: m(!1),
|
|
37
37
|
hash: m(""),
|
|
38
38
|
hashPrefix: m("")
|
|
39
|
-
}),
|
|
40
|
-
|
|
39
|
+
}), b = (e, t) => fetch(
|
|
40
|
+
z(o.value.proxyUrl, e.toString()),
|
|
41
41
|
t
|
|
42
42
|
);
|
|
43
|
-
N(X, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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;
|
|
51
|
+
L(() => {
|
|
52
|
+
const e = F().getItem(
|
|
53
|
+
W.SELECTED_CLIENT
|
|
48
54
|
);
|
|
49
55
|
D(e) && !r.workspace["x-scalar-default-client"] && r.update("x-scalar-default-client", e);
|
|
50
56
|
});
|
|
51
|
-
const
|
|
57
|
+
const x = async (e) => {
|
|
52
58
|
const t = ee(e.content), a = Z({
|
|
53
59
|
name: e.slug || e.title,
|
|
54
60
|
url: e.url,
|
|
@@ -69,10 +75,10 @@ const Me = /* @__PURE__ */ R({
|
|
|
69
75
|
if (e.url)
|
|
70
76
|
return await r.addDocument({
|
|
71
77
|
name: e.slug ?? "default",
|
|
72
|
-
url:
|
|
78
|
+
url: Y(e.url, {
|
|
73
79
|
basePath: o.value.pathRouting?.basePath
|
|
74
80
|
}),
|
|
75
|
-
fetch: e.fetch ??
|
|
81
|
+
fetch: e.fetch ?? b,
|
|
76
82
|
config: E(e)
|
|
77
83
|
});
|
|
78
84
|
};
|
|
@@ -83,34 +89,34 @@ const Me = /* @__PURE__ */ R({
|
|
|
83
89
|
() => o.value.content
|
|
84
90
|
],
|
|
85
91
|
([e, t, a]) => {
|
|
86
|
-
(e || t || a) &&
|
|
92
|
+
(e || t || a) && x(o.value);
|
|
87
93
|
},
|
|
88
94
|
{ immediate: !0 }
|
|
89
|
-
), te(r,
|
|
95
|
+
), te(r, g), s(
|
|
90
96
|
() => o.value.defaultHttpClient,
|
|
91
97
|
(e) => {
|
|
92
98
|
if (e) {
|
|
93
|
-
const { targetKey: t, clientKey: a } = e,
|
|
94
|
-
D(
|
|
99
|
+
const { targetKey: t, clientKey: a } = e, k = `${t}/${a}`;
|
|
100
|
+
D(k) && r.update("x-scalar-default-client", k);
|
|
95
101
|
}
|
|
96
102
|
},
|
|
97
103
|
{ immediate: !0 }
|
|
98
104
|
);
|
|
99
|
-
function
|
|
105
|
+
function y(e) {
|
|
100
106
|
if (e === !0)
|
|
101
107
|
return "dark";
|
|
102
108
|
if (e === !1)
|
|
103
109
|
return "light";
|
|
104
110
|
}
|
|
105
|
-
const { toggleColorMode: $, isDarkMode:
|
|
106
|
-
initialColorMode:
|
|
111
|
+
const { toggleColorMode: $, isDarkMode: R } = j({
|
|
112
|
+
initialColorMode: y(o.value.darkMode),
|
|
107
113
|
overrideColorMode: o.value.forceDarkModeState
|
|
108
114
|
});
|
|
109
115
|
s(
|
|
110
116
|
() => o.value.darkMode,
|
|
111
117
|
(e) => r.update("x-scalar-dark-mode", !!e)
|
|
112
118
|
), s(
|
|
113
|
-
() =>
|
|
119
|
+
() => R.value,
|
|
114
120
|
(e) => r.update("x-scalar-dark-mode", e),
|
|
115
121
|
{ immediate: !0 }
|
|
116
122
|
), s(
|
|
@@ -121,17 +127,17 @@ const Me = /* @__PURE__ */ R({
|
|
|
121
127
|
),
|
|
122
128
|
{ immediate: !0 }
|
|
123
129
|
), o.value.metaData && q(o.value.metaData);
|
|
124
|
-
const
|
|
125
|
-
return G(
|
|
130
|
+
const T = U(() => o.value.favicon);
|
|
131
|
+
return G(T), (e, t) => (C(), V("div", {
|
|
126
132
|
ref_key: "root",
|
|
127
|
-
ref:
|
|
133
|
+
ref: g
|
|
128
134
|
}, [
|
|
129
|
-
n(o)?.customCss ? (
|
|
135
|
+
n(o)?.customCss ? (C(), A(_("style"), { key: 0 }, {
|
|
130
136
|
default: i(() => [
|
|
131
|
-
K(
|
|
137
|
+
H(K(n(o).customCss), 1)
|
|
132
138
|
]),
|
|
133
139
|
_: 1
|
|
134
|
-
})) :
|
|
140
|
+
})) : B("", !0),
|
|
135
141
|
f(J, {
|
|
136
142
|
configuration: n(o),
|
|
137
143
|
isDark: !!n(r).workspace["x-scalar-dark-mode"],
|
|
@@ -142,17 +148,17 @@ const Me = /* @__PURE__ */ R({
|
|
|
142
148
|
"document-selector": i(() => [
|
|
143
149
|
f(n(re), {
|
|
144
150
|
modelValue: n(l),
|
|
145
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) =>
|
|
151
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => O(l) ? l.value = a : null),
|
|
146
152
|
options: n(v)
|
|
147
153
|
}, null, 8, ["modelValue", "options"])
|
|
148
154
|
]),
|
|
149
155
|
"content-start": i(() => [
|
|
150
156
|
f(Q, {
|
|
151
|
-
workspace: n(r),
|
|
152
|
-
configuration: n(o),
|
|
153
157
|
overrides: d.value,
|
|
154
|
-
"onUpdate:overrides": t[1] || (t[1] = (a) => d.value = a)
|
|
155
|
-
|
|
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"]),
|
|
156
162
|
u(e.$slots, "content-start")
|
|
157
163
|
]),
|
|
158
164
|
"content-end": i(() => [
|
|
@@ -173,5 +179,5 @@ const Me = /* @__PURE__ */ R({
|
|
|
173
179
|
}
|
|
174
180
|
});
|
|
175
181
|
export {
|
|
176
|
-
|
|
182
|
+
Se as default
|
|
177
183
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AA2YA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAsBzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAuhBF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AuthSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-780420ba"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as N, useId as M, ref as x, computed as y, useTemplateRef as K, createBlock as D, openBlock as u, unref as n, withCtx as c, createVNode as m, createElementVNode as a, createElementBlock as h, Fragment as k, createTextVNode as C, toDisplayString as v, createCommentVNode as L, withModifiers as z, normalizeClass as j } from "vue";
|
|
2
|
-
import { ViewLayoutCollapse as
|
|
3
|
-
import { useLayout as
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import { getSecurityRequirements as
|
|
2
|
+
import { ViewLayoutCollapse as Y } from "@scalar/api-client/components/ViewLayout";
|
|
3
|
+
import { useLayout as F } from "@scalar/api-client/hooks";
|
|
4
|
+
import { useWorkspace as H } from "@scalar/api-client/store";
|
|
5
|
+
import { getSecurityRequirements as J, formatComplexScheme as P, formatScheme as W, getSchemeOptions as G } from "@scalar/api-client/views/Request/libs";
|
|
6
6
|
import { useModal as Q, ScalarComboboxMultiselect as X, ScalarButton as Z, ScalarListboxCheckbox as _, ScalarIconButton as ee } from "@scalar/components";
|
|
7
7
|
import { safeLocalStorage as te, CLIENT_LS_KEYS as oe } from "@scalar/helpers/object/local-storage";
|
|
8
8
|
import { ScalarIconCaretDown as le, ScalarIconTrash as ne } from "@scalar/icons";
|
|
9
9
|
import { isDefined as re } from "@scalar/oas-utils/helpers";
|
|
10
|
-
import { emitCustomEvent as
|
|
10
|
+
import { emitCustomEvent as w } from "@scalar/workspace-store/events";
|
|
11
11
|
import ae from "./DeleteRequestAuthModal.vue.js";
|
|
12
12
|
import se from "./RequestAuthDataTable.vue.js";
|
|
13
|
-
const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1 truncate" },
|
|
13
|
+
const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1 truncate" }, we = /* @__PURE__ */ N({
|
|
14
14
|
__name: "AuthSelector",
|
|
15
15
|
props: {
|
|
16
16
|
collection: {},
|
|
@@ -25,10 +25,10 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
25
25
|
workspace: {}
|
|
26
26
|
},
|
|
27
27
|
setup(r) {
|
|
28
|
-
const { layout:
|
|
28
|
+
const { layout: A } = F(), { securitySchemes: p } = H(), R = M(), S = x(null), d = Q(), b = x(
|
|
29
29
|
null
|
|
30
30
|
), V = x(!1), q = y(() => {
|
|
31
|
-
const t =
|
|
31
|
+
const t = J(r.operation, r.collection);
|
|
32
32
|
return { filteredRequirements: t.filter((o) => Object.keys(o).length), requirements: t };
|
|
33
33
|
}), g = y(() => {
|
|
34
34
|
const { filteredRequirements: t, requirements: e } = q.value;
|
|
@@ -41,10 +41,10 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
41
41
|
}), s = y(
|
|
42
42
|
() => r.selectedSecuritySchemeUids.map((t) => {
|
|
43
43
|
if (Array.isArray(t))
|
|
44
|
-
return
|
|
44
|
+
return P(t, p);
|
|
45
45
|
const e = p[t ?? ""];
|
|
46
46
|
if (e)
|
|
47
|
-
return
|
|
47
|
+
return W(e);
|
|
48
48
|
}).filter(re)
|
|
49
49
|
);
|
|
50
50
|
function T(t) {
|
|
@@ -52,13 +52,13 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
52
52
|
const i = l.split(",");
|
|
53
53
|
return i.length > 1 ? i : l;
|
|
54
54
|
});
|
|
55
|
-
e?.payload && (
|
|
55
|
+
e?.payload && (w(f.value?.$el, "scalar-add-auth-option", {
|
|
56
56
|
payload: e.payload
|
|
57
57
|
}), e.payload.uid && o.push(e.payload.uid)), O(o);
|
|
58
58
|
}
|
|
59
59
|
const O = (t) => {
|
|
60
60
|
if (r.collection.useCollectionSecurity) {
|
|
61
|
-
if (
|
|
61
|
+
if (w(f.value?.$el, "scalar-select-security-schemes", {
|
|
62
62
|
uids: t
|
|
63
63
|
}), !r.persistAuth)
|
|
64
64
|
return;
|
|
@@ -67,7 +67,7 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
67
67
|
oe.SELECTED_SECURITY_SCHEMES,
|
|
68
68
|
JSON.stringify(e)
|
|
69
69
|
);
|
|
70
|
-
} else r.operation?.uid &&
|
|
70
|
+
} else r.operation?.uid && w(
|
|
71
71
|
f.value?.$el,
|
|
72
72
|
"scalar-select-operation-security-schemes",
|
|
73
73
|
{
|
|
@@ -92,12 +92,12 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
92
92
|
q.value.filteredRequirements,
|
|
93
93
|
r.collection?.securitySchemes ?? [],
|
|
94
94
|
p,
|
|
95
|
-
|
|
95
|
+
A === "modal" || r.layout === "reference"
|
|
96
96
|
)
|
|
97
97
|
), B = (t) => {
|
|
98
98
|
V.value && t.stopPropagation(), S.value?.$el.click();
|
|
99
99
|
}, f = K("wrapperRef");
|
|
100
|
-
return (t, e) => (u(), D(n(
|
|
100
|
+
return (t, e) => (u(), D(n(Y), {
|
|
101
101
|
ref_key: "wrapperRef",
|
|
102
102
|
ref: f,
|
|
103
103
|
class: "group/params relative",
|
|
@@ -136,7 +136,7 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
136
136
|
selected: l
|
|
137
137
|
}, null, 8, ["selected"]),
|
|
138
138
|
a("div", ce, v(o.label), 1),
|
|
139
|
-
o.isDeletable ?? (n(
|
|
139
|
+
o.isDeletable ?? (n(A) !== "modal" && t.layout !== "reference") ? (u(), D(n(ee), {
|
|
140
140
|
key: 0,
|
|
141
141
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
142
142
|
icon: n(ne),
|
|
@@ -150,8 +150,7 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
150
150
|
ref_key: "comboboxButtonRef",
|
|
151
151
|
ref: S,
|
|
152
152
|
"aria-describedby": n(R),
|
|
153
|
-
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
154
|
-
fullWidth: "",
|
|
153
|
+
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
155
154
|
variant: "ghost"
|
|
156
155
|
}, {
|
|
157
156
|
default: c(() => [
|
|
@@ -200,5 +199,5 @@ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1
|
|
|
200
199
|
}
|
|
201
200
|
});
|
|
202
201
|
export {
|
|
203
|
-
|
|
202
|
+
we as default
|
|
204
203
|
};
|
|
@@ -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
|
};
|