@scalar/api-client 2.15.0 → 2.17.1
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 +166 -0
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/libs/errors.d.ts +1 -0
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/errors.js +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -35
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +84 -45
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -11
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +28 -35
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +15 -19
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +158 -125
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +59 -50
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +148 -149
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -87
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
- 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 +59 -56
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +7 -6
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +61 -59
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
- package/dist/v2/components/resize/index.d.ts +0 -1
- package/dist/v2/components/resize/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -5
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +49 -47
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.d.ts +3 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +128 -139
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -105
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/{ItemDecorator.vue.d.ts → SidebarItemMenu.vue.d.ts} +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +129 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +4 -0
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
- package/dist/v2/features/app/helpers/routes.d.ts +32 -6
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +25 -16
- package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
- package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
- package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
- package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
- package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
- package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
- package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
- package/dist/v2/features/collection/components/Environment.vue.js +32 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
- package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
- package/dist/v2/features/collection/components/Servers.vue.js +142 -2
- package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
- package/dist/v2/features/collection/components/Settings.vue.js +58 -2
- package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
- package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +118 -31
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +59 -28
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
- package/dist/v2/features/operation/index.d.ts +0 -1
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
- package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
- package/dist/v2/helpers/generate-location-id.d.ts +19 -0
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
- package/dist/v2/helpers/generate-location-id.js +10 -0
- package/dist/v2/helpers/get-active-environment.d.ts +5 -0
- package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-environment.js +22 -0
- package/dist/v2/helpers/get-tab-details.d.ts +2 -2
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/plugins.d.ts +59 -0
- package/dist/v2/helpers/plugins.d.ts.map +1 -0
- package/dist/v2/helpers/plugins.js +11 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/v2/hooks/use-scroll-lock.js +21 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -20
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/ItemDecorator.vue.js +0 -138
- package/dist/v2/features/app/components/ItemDecorator.vue2.js +0 -4
- package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.js +0 -51
- package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
- package/dist/v2/plugins.d.ts +0 -44
- package/dist/v2/plugins.d.ts.map +0 -1
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergeObjects as x } from "@scalar/workspace-store/helpers/merge-object";
|
|
2
|
-
import { updateActiveProxy as g, updateColorMode as
|
|
2
|
+
import { updateActiveProxy as g, updateColorMode as y, updateTheme as T, updateSelectedClient as w, updateDocumentIcon as R, toggleSecurity as O, updateWatchMode as N, createEmptyDocument as C, deleteDocument as E, upsertEnvironment as q, upsertEnvironmentVariable as P, upsertCookie as I, deleteCookie as k, deleteSecurityScheme as A, updateSelectedAuthTab as M, updateSecurityScheme as D, updateSelectedScopes as F, updateSelectedSecuritySchemes as U, addServer as V, updateServer as K, deleteServer as L, updateServerVariables as W, updateSelectedServer as j, createOperation as z, updateOperationPathMethod as G, updateOperationSummary as H, deleteOperation as J, deleteOperationExample as Q, addOperationParameter as S, updateOperationParameter as X, deleteOperationParameter as Y, deleteAllOperationParameters as Z, updateOperationRequestBodyContentType as _, updateOperationRequestBodyExample as $, addOperationRequestBodyFormRow as B, updateOperationRequestBodyFormRow as ee, deleteOperationRequestBodyFormRow as ae, createTag as te, deleteTag as oe, addTab as re, closeTab as ne, closeOtherTabs as le, focusTab as ie, focusLastTab as ue, navigatePreviousTab as ce, navigateNextTab as pe, updateTabs as me } from "@scalar/workspace-store/mutators";
|
|
3
3
|
import { toValue as f } from "vue";
|
|
4
|
-
import { useRouter as
|
|
5
|
-
const
|
|
4
|
+
import { useRouter as de, useRoute as se } from "vue-router";
|
|
5
|
+
const xe = ({
|
|
6
6
|
eventBus: a,
|
|
7
7
|
document: t,
|
|
8
8
|
workspaceStore: o,
|
|
@@ -10,7 +10,7 @@ const fe = ({
|
|
|
10
10
|
commandPaletteState: s,
|
|
11
11
|
sidebarState: v
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
13
|
+
const c = de(), i = se(), p = (e, r) => {
|
|
14
14
|
const n = f(o);
|
|
15
15
|
return n ? r === "document" ? e.value : n.workspace : null;
|
|
16
16
|
}, l = async () => {
|
|
@@ -18,11 +18,11 @@ const fe = ({
|
|
|
18
18
|
if (!e)
|
|
19
19
|
return;
|
|
20
20
|
const r = e.workspace["x-scalar-active-tab"] ?? 0, n = e.workspace["x-scalar-tabs"]?.[r];
|
|
21
|
-
n && await
|
|
21
|
+
n && await c.replace(n.path);
|
|
22
22
|
}, u = (e) => {
|
|
23
23
|
e && o.value?.buildSidebar(e);
|
|
24
|
-
},
|
|
25
|
-
const r = t.value?.["x-scalar-navigation"]?.
|
|
24
|
+
}, m = (e) => {
|
|
25
|
+
const r = t.value?.["x-scalar-navigation"]?.name;
|
|
26
26
|
if (!r)
|
|
27
27
|
return;
|
|
28
28
|
const n = v.getEntryByLocation({
|
|
@@ -43,61 +43,64 @@ const fe = ({
|
|
|
43
43
|
(e) => g(o.value?.workspace ?? null, e)
|
|
44
44
|
), a.on(
|
|
45
45
|
"workspace:update:color-mode",
|
|
46
|
-
(e) =>
|
|
47
|
-
), a.on("workspace:update:theme", (e) =>
|
|
48
|
-
|
|
46
|
+
(e) => y(o.value?.workspace ?? null, e)
|
|
47
|
+
), a.on("workspace:update:theme", (e) => T(o.value?.workspace ?? null, e)), a.on(
|
|
48
|
+
"workspace:update:selected-client",
|
|
49
|
+
(e) => w(o.value?.workspace, e)
|
|
50
|
+
), a.on("document:update:icon", (e) => R(t.value, e)), a.on("document:update:info", (e) => t.value && x(t.value.info, e)), a.on("document:toggle:security", () => O(t.value)), a.on("document:update:watch-mode", (e) => N(t.value, e)), a.on("document:create:empty-document", (e) => C(o.value, e)), a.on("document:delete:document", async (e) => {
|
|
51
|
+
E(o.value, e), i.params.documentSlug === e.name && await c.push({
|
|
49
52
|
name: "workspace.environment"
|
|
50
53
|
});
|
|
51
54
|
}), a.on("environment:upsert:environment", (e) => {
|
|
52
|
-
o.value &&
|
|
55
|
+
o.value && q(t.value, o.value.workspace, e);
|
|
53
56
|
}), a.on(
|
|
54
57
|
"environment:delete:environment",
|
|
55
58
|
({ environmentName: e, collectionType: r }) => delete p(t, r)?.["x-scalar-environments"]?.[e]
|
|
56
59
|
), a.on("environment:upsert:environment-variable", (e) => {
|
|
57
60
|
const r = p(t, e.collectionType);
|
|
58
|
-
|
|
61
|
+
P(r, e);
|
|
59
62
|
}), a.on(
|
|
60
63
|
"environment:delete:environment-variable",
|
|
61
64
|
({ environmentName: e, index: r, collectionType: n }) => p(t, n)?.["x-scalar-environments"]?.[e]?.variables?.splice(r, 1)
|
|
62
65
|
), a.on("cookie:upsert:cookie", (e) => {
|
|
63
66
|
const r = p(t, e.collectionType);
|
|
64
|
-
|
|
67
|
+
I(r, e);
|
|
65
68
|
}), a.on("cookie:delete:cookie", (e) => {
|
|
66
69
|
const r = p(t, e.collectionType);
|
|
67
|
-
|
|
68
|
-
}), a.on("auth:delete:security-scheme", (e) =>
|
|
70
|
+
k(r, e);
|
|
71
|
+
}), a.on("auth:delete:security-scheme", (e) => A(t.value, e)), a.on("auth:update:active-index", (e) => M(t.value, e)), a.on("auth:update:security-scheme", (e) => D(t.value, e)), a.on("auth:update:selected-scopes", (e) => F(t.value, e)), a.on(
|
|
69
72
|
"auth:update:selected-security-schemes",
|
|
70
|
-
async (e) => await
|
|
71
|
-
), a.on("server:add:server", () =>
|
|
73
|
+
async (e) => await U(t.value, e)
|
|
74
|
+
), a.on("server:add:server", () => V(t.value)), a.on("server:update:server", (e) => K(t.value, e)), a.on("server:delete:server", (e) => L(t.value, e)), a.on("server:update:variables", (e) => W(t.value, e)), a.on("server:update:selected", (e) => j(t.value, e)), a.on("operation:create:operation", (e) => z(o.value, e)), a.on(
|
|
72
75
|
"operation:update:pathMethod",
|
|
73
|
-
(e) =>
|
|
74
|
-
r === "success" && (await
|
|
76
|
+
(e) => G(t.value, o.value, e, async (r) => {
|
|
77
|
+
r === "success" && (await c.replace({
|
|
75
78
|
name: "example",
|
|
76
79
|
params: {
|
|
77
80
|
method: e.payload.method,
|
|
78
81
|
pathEncoded: encodeURIComponent(e.payload.path),
|
|
79
82
|
exampleName: i.params.exampleName
|
|
80
83
|
}
|
|
81
|
-
}), u(t.value?.["x-scalar-navigation"]?.
|
|
84
|
+
}), u(t.value?.["x-scalar-navigation"]?.name)), e.callback(r);
|
|
82
85
|
})
|
|
83
|
-
), a.on("operation:update:summary", (e) =>
|
|
84
|
-
|
|
86
|
+
), a.on("operation:update:summary", (e) => H(t.value, e)), a.on("operation:delete:operation", async (e) => {
|
|
87
|
+
J(o.value, e), u(e.documentName), h({
|
|
85
88
|
documentName: e.documentName,
|
|
86
89
|
path: e.meta.path,
|
|
87
90
|
method: e.meta.method
|
|
88
|
-
}) &&
|
|
91
|
+
}) && await c.replace({
|
|
89
92
|
name: "document.overview",
|
|
90
93
|
params: {
|
|
91
94
|
documentSlug: e.documentName
|
|
92
95
|
}
|
|
93
96
|
});
|
|
94
|
-
}), a.on("operation:delete:example", (e) => {
|
|
95
|
-
|
|
97
|
+
}), a.on("operation:delete:example", async (e) => {
|
|
98
|
+
Q(o.value, e), u(e.documentName), h({
|
|
96
99
|
documentName: e.documentName,
|
|
97
100
|
path: e.meta.path,
|
|
98
101
|
method: e.meta.method,
|
|
99
102
|
exampleName: e.meta.exampleKey
|
|
100
|
-
}) &&
|
|
103
|
+
}) && await c.replace({
|
|
101
104
|
name: "example",
|
|
102
105
|
params: {
|
|
103
106
|
pathEncoded: encodeURIComponent(e.meta.path),
|
|
@@ -107,47 +110,47 @@ const fe = ({
|
|
|
107
110
|
}
|
|
108
111
|
});
|
|
109
112
|
}), a.on("operation:add:parameter", (e) => {
|
|
110
|
-
|
|
113
|
+
S(t.value, e), m(e.meta);
|
|
111
114
|
}), a.on("operation:update:parameter", (e) => {
|
|
112
|
-
|
|
113
|
-
}), a.on("operation:delete:parameter", (e) =>
|
|
115
|
+
X(t.value, e), m(e.meta);
|
|
116
|
+
}), a.on("operation:delete:parameter", (e) => Y(t.value, e)), a.on("operation:delete-all:parameters", (e) => Z(t.value, e)), a.on(
|
|
114
117
|
"operation:update:requestBody:contentType",
|
|
115
|
-
(e) =>
|
|
118
|
+
(e) => _(t.value, e)
|
|
116
119
|
), a.on("operation:update:requestBody:value", (e) => {
|
|
117
|
-
|
|
120
|
+
$(t.value, e), m(e.meta);
|
|
118
121
|
}), a.on("operation:add:requestBody:formRow", (e) => {
|
|
119
|
-
|
|
122
|
+
B(t.value, e), m(e.meta);
|
|
120
123
|
}), a.on(
|
|
121
124
|
"operation:update:requestBody:formRow",
|
|
122
|
-
(e) =>
|
|
125
|
+
(e) => ee(t.value, e)
|
|
123
126
|
), a.on(
|
|
124
127
|
"operation:delete:requestBody:formRow",
|
|
125
|
-
(e) =>
|
|
128
|
+
(e) => ae(t.value, e)
|
|
126
129
|
), a.on("tag:create:tag", (e) => {
|
|
127
|
-
ae(o.value, e), u(e.documentName);
|
|
128
|
-
}), a.on("tag:delete:tag", (e) => {
|
|
129
130
|
te(o.value, e), u(e.documentName);
|
|
131
|
+
}), a.on("tag:delete:tag", (e) => {
|
|
132
|
+
oe(o.value, e), u(e.documentName);
|
|
130
133
|
}), a.on("ui:toggle:sidebar", () => d.value = !d.value), a.on(
|
|
131
134
|
"ui:open:command-palette",
|
|
132
135
|
(e) => {
|
|
133
136
|
e ? s.open(e.action, e.payload) : s.open();
|
|
134
137
|
}
|
|
135
138
|
), a.on("tabs:add:tab", async (e) => {
|
|
136
|
-
oe(o.value?.workspace ?? null, e), await l();
|
|
137
|
-
}), a.on("tabs:close:tab", async (e) => {
|
|
138
139
|
re(o.value?.workspace ?? null, e), await l();
|
|
139
|
-
}), a.on("tabs:close:
|
|
140
|
-
|
|
141
|
-
}), a.on("tabs:focus:tab
|
|
140
|
+
}), a.on("tabs:close:tab", async (e) => {
|
|
141
|
+
ne(o.value?.workspace ?? null, e), await l();
|
|
142
|
+
}), a.on("tabs:close:other-tabs", (e) => le(o.value?.workspace ?? null, e)), a.on("tabs:focus:tab", async (e) => {
|
|
142
143
|
ie(o.value?.workspace ?? null, e), await l();
|
|
143
|
-
}), a.on("tabs:
|
|
144
|
+
}), a.on("tabs:focus:tab-last", async (e) => {
|
|
144
145
|
ue(o.value?.workspace ?? null, e), await l();
|
|
146
|
+
}), a.on("tabs:navigate:previous", async (e) => {
|
|
147
|
+
ce(o.value?.workspace ?? null, e), await l();
|
|
145
148
|
}), a.on("tabs:navigate:next", async (e) => {
|
|
146
|
-
me(o.value?.workspace ?? null, e), await l();
|
|
147
|
-
}), a.on("tabs:update:tabs", async (e) => {
|
|
148
149
|
pe(o.value?.workspace ?? null, e), await l();
|
|
150
|
+
}), a.on("tabs:update:tabs", async (e) => {
|
|
151
|
+
me(o.value?.workspace ?? null, e), await l();
|
|
149
152
|
});
|
|
150
153
|
};
|
|
151
154
|
export {
|
|
152
|
-
|
|
155
|
+
xe as useWorkspaceClientAppEvents
|
|
153
156
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-workspace-selector.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-workspace-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAK1F,OAAO,EAAE,KAAK,GAAG,EAAO,MAAM,KAAK,CAAA;AAOnC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAA;AA0BD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACtC,UAAU,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;IAC5B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAA;IAC5E,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,SAAS,EAAE,cAAc,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;CAC1G,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAO,0BA8HvC,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { createWorkspaceStorePersistence as v } from "@scalar/workspace-store/pe
|
|
|
4
4
|
import { persistencePlugin as D } from "@scalar/workspace-store/plugins/client";
|
|
5
5
|
import { ref as i } from "vue";
|
|
6
6
|
import { useRouter as g } from "vue-router";
|
|
7
|
-
import { slugify as y } from "
|
|
7
|
+
import { slugify as y } from "../../../helpers/slugify.js";
|
|
8
8
|
const S = 1e3, R = {
|
|
9
9
|
name: "Default Workspace",
|
|
10
10
|
id: "default"
|
|
@@ -1,4 +1,94 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as f, computed as d, createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as o, withCtx as c, unref as m, createBlock as x, resolveDynamicComponent as v, mergeProps as _ } from "vue";
|
|
2
|
+
import { ScalarButton as h } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as b } from "@scalar/icons/library";
|
|
4
|
+
import { RouterView as y } from "vue-router";
|
|
5
|
+
import w from "../../../components/IconSelector.vue.js";
|
|
6
|
+
import g from "./components/LabelInput.vue.js";
|
|
7
|
+
import k from "./components/Tabs.vue.js";
|
|
8
|
+
const V = { class: "custom-scroll h-full" }, B = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "w-full md:mx-auto md:max-w-[720px]"
|
|
11
|
+
}, C = ["aria-label"], D = { class: "flex flex-row items-center gap-2" }, N = { class: "group relative ml-1.25" }, I = { class: "px-1.5 py-8" }, S = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "flex w-full flex-1 items-center justify-center"
|
|
14
|
+
}, U = {
|
|
15
|
+
name: "DocumentCollection"
|
|
16
|
+
}, P = /* @__PURE__ */ f({
|
|
17
|
+
...U,
|
|
18
|
+
props: {
|
|
19
|
+
documentSlug: {},
|
|
20
|
+
document: {},
|
|
21
|
+
eventBus: {},
|
|
22
|
+
layout: {},
|
|
23
|
+
path: {},
|
|
24
|
+
method: {},
|
|
25
|
+
exampleName: {},
|
|
26
|
+
environment: {},
|
|
27
|
+
workspaceStore: {},
|
|
28
|
+
activeWorkspace: {},
|
|
29
|
+
plugins: {}
|
|
30
|
+
},
|
|
31
|
+
setup(p) {
|
|
32
|
+
const s = p, u = d(() => s.document?.info?.title || "Untitled Document"), i = d(
|
|
33
|
+
() => s.document?.["x-scalar-icon"] || "interface-content-folder"
|
|
34
|
+
);
|
|
35
|
+
return (a, t) => (n(), r("div", V, [
|
|
36
|
+
a.document ? (n(), r("div", B, [
|
|
37
|
+
e("div", {
|
|
38
|
+
"aria-label": `title: ${u.value}`,
|
|
39
|
+
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
40
|
+
}, [
|
|
41
|
+
e("div", D, [
|
|
42
|
+
o(w, {
|
|
43
|
+
modelValue: i.value,
|
|
44
|
+
placement: "bottom-start",
|
|
45
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => a.eventBus.emit("document:update:icon", l))
|
|
46
|
+
}, {
|
|
47
|
+
default: c(() => [
|
|
48
|
+
o(m(h), {
|
|
49
|
+
class: "hover:bg-b-2 aspect-square h-7 w-7 cursor-pointer rounded border border-transparent p-0 hover:border-inherit",
|
|
50
|
+
variant: "ghost"
|
|
51
|
+
}, {
|
|
52
|
+
default: c(() => [
|
|
53
|
+
o(m(b), {
|
|
54
|
+
class: "text-c-2 size-5",
|
|
55
|
+
src: i.value,
|
|
56
|
+
"stroke-width": "2"
|
|
57
|
+
}, null, 8, ["src"])
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
})
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["modelValue"])
|
|
64
|
+
]),
|
|
65
|
+
e("div", N, [
|
|
66
|
+
o(g, {
|
|
67
|
+
class: "text-xl font-bold",
|
|
68
|
+
inputId: "documentName",
|
|
69
|
+
modelValue: u.value,
|
|
70
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => a.eventBus.emit("document:update:info", { title: l }))
|
|
71
|
+
}, null, 8, ["modelValue"])
|
|
72
|
+
])
|
|
73
|
+
], 8, C),
|
|
74
|
+
o(k, { type: "document" }),
|
|
75
|
+
e("div", I, [
|
|
76
|
+
o(m(y), null, {
|
|
77
|
+
default: c(({ Component: l }) => [
|
|
78
|
+
(n(), x(v(l), _(s, { collectionType: "document" }), null, 16))
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
82
|
+
])
|
|
83
|
+
])) : (n(), r("div", S, [...t[2] || (t[2] = [
|
|
84
|
+
e("div", { class: "flex h-full flex-col items-center justify-center" }, [
|
|
85
|
+
e("h1", { class: "text-2xl font-bold" }, "Document not found"),
|
|
86
|
+
e("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
|
|
87
|
+
], -1)
|
|
88
|
+
])]))
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
2
92
|
export {
|
|
3
|
-
|
|
93
|
+
P as default
|
|
4
94
|
};
|
|
@@ -1,93 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ScalarButton as h } from "@scalar/components";
|
|
3
|
-
import { LibraryIcon as b } from "@scalar/icons/library";
|
|
4
|
-
import { RouterView as y } from "vue-router";
|
|
5
|
-
import w from "../../../components/IconSelector.vue.js";
|
|
6
|
-
import g from "./components/LabelInput.vue.js";
|
|
7
|
-
import k from "./components/Tabs.vue.js";
|
|
8
|
-
const V = { class: "custom-scroll h-full" }, B = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "w-full md:mx-auto md:max-w-[720px]"
|
|
11
|
-
}, C = ["aria-label"], D = { class: "flex flex-row items-center gap-2" }, N = { class: "group relative ml-1.25" }, I = { class: "px-1.5 py-8" }, S = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "flex w-full flex-1 items-center justify-center"
|
|
14
|
-
}, U = {
|
|
15
|
-
name: "DocumentCollection"
|
|
16
|
-
}, P = /* @__PURE__ */ f({
|
|
17
|
-
...U,
|
|
18
|
-
props: {
|
|
19
|
-
documentSlug: {},
|
|
20
|
-
document: {},
|
|
21
|
-
eventBus: {},
|
|
22
|
-
layout: {},
|
|
23
|
-
path: {},
|
|
24
|
-
method: {},
|
|
25
|
-
exampleName: {},
|
|
26
|
-
environment: {},
|
|
27
|
-
workspaceStore: {},
|
|
28
|
-
activeWorkspace: {}
|
|
29
|
-
},
|
|
30
|
-
setup(p) {
|
|
31
|
-
const s = p, u = d(() => s.document?.info?.title || "Untitled Document"), i = d(
|
|
32
|
-
() => s.document?.["x-scalar-icon"] || "interface-content-folder"
|
|
33
|
-
);
|
|
34
|
-
return (a, t) => (n(), r("div", V, [
|
|
35
|
-
a.document ? (n(), r("div", B, [
|
|
36
|
-
e("div", {
|
|
37
|
-
"aria-label": `title: ${u.value}`,
|
|
38
|
-
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
39
|
-
}, [
|
|
40
|
-
e("div", D, [
|
|
41
|
-
o(w, {
|
|
42
|
-
modelValue: i.value,
|
|
43
|
-
placement: "bottom-start",
|
|
44
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => a.eventBus.emit("document:update:icon", l))
|
|
45
|
-
}, {
|
|
46
|
-
default: c(() => [
|
|
47
|
-
o(m(h), {
|
|
48
|
-
class: "hover:bg-b-2 aspect-square h-7 w-7 cursor-pointer rounded border border-transparent p-0 hover:border-inherit",
|
|
49
|
-
variant: "ghost"
|
|
50
|
-
}, {
|
|
51
|
-
default: c(() => [
|
|
52
|
-
o(m(b), {
|
|
53
|
-
class: "text-c-2 size-5",
|
|
54
|
-
src: i.value,
|
|
55
|
-
"stroke-width": "2"
|
|
56
|
-
}, null, 8, ["src"])
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
})
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["modelValue"])
|
|
63
|
-
]),
|
|
64
|
-
e("div", N, [
|
|
65
|
-
o(g, {
|
|
66
|
-
class: "text-xl font-bold",
|
|
67
|
-
inputId: "documentName",
|
|
68
|
-
modelValue: u.value,
|
|
69
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => a.eventBus.emit("document:update:info", { title: l }))
|
|
70
|
-
}, null, 8, ["modelValue"])
|
|
71
|
-
])
|
|
72
|
-
], 8, C),
|
|
73
|
-
o(k, { type: "document" }),
|
|
74
|
-
e("div", I, [
|
|
75
|
-
o(m(y), null, {
|
|
76
|
-
default: c(({ Component: l }) => [
|
|
77
|
-
(n(), x(v(l), _(s, { collectionType: "document" }), null, 16))
|
|
78
|
-
]),
|
|
79
|
-
_: 1
|
|
80
|
-
})
|
|
81
|
-
])
|
|
82
|
-
])) : (n(), r("div", S, [...t[2] || (t[2] = [
|
|
83
|
-
e("div", { class: "flex h-full flex-col items-center justify-center" }, [
|
|
84
|
-
e("h1", { class: "text-2xl font-bold" }, "Document not found"),
|
|
85
|
-
e("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
|
|
86
|
-
], -1)
|
|
87
|
-
])]))
|
|
88
|
-
]));
|
|
89
|
-
}
|
|
90
|
-
});
|
|
1
|
+
import f from "./DocumentCollection.vue.js";
|
|
91
2
|
export {
|
|
92
|
-
|
|
3
|
+
f as default
|
|
93
4
|
};
|
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as l, createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as o, unref as s, toDisplayString as i, mergeProps as m } from "vue";
|
|
2
|
+
import { ScalarIconGlobe as p } from "@scalar/icons";
|
|
3
|
+
import { RouterView as d } from "vue-router";
|
|
4
|
+
import u from "./components/Tabs.vue.js";
|
|
5
|
+
const _ = { class: "custom-scroll h-full" }, f = { class: "w-full md:mx-auto md:max-w-[720px]" }, x = ["aria-label"], h = { class: "group relative ml-1.25" }, v = { class: "text-c-1 flex h-8 items-center" }, k = { class: "px-1.5 py-8" }, w = {}, B = /* @__PURE__ */ l({
|
|
6
|
+
...w,
|
|
7
|
+
__name: "WorkspaceCollection",
|
|
8
|
+
props: {
|
|
9
|
+
documentSlug: {},
|
|
10
|
+
document: {},
|
|
11
|
+
eventBus: {},
|
|
12
|
+
layout: {},
|
|
13
|
+
path: {},
|
|
14
|
+
method: {},
|
|
15
|
+
exampleName: {},
|
|
16
|
+
environment: {},
|
|
17
|
+
workspaceStore: {},
|
|
18
|
+
activeWorkspace: {},
|
|
19
|
+
plugins: {}
|
|
20
|
+
},
|
|
21
|
+
setup(a) {
|
|
22
|
+
const c = a;
|
|
23
|
+
return (t, g) => (n(), r("div", _, [
|
|
24
|
+
e("div", f, [
|
|
25
|
+
e("div", {
|
|
26
|
+
"aria-label": `title: ${t.activeWorkspace.name}`,
|
|
27
|
+
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
28
|
+
}, [
|
|
29
|
+
o(s(p), { class: "text-c-2 size-6" }),
|
|
30
|
+
e("div", h, [
|
|
31
|
+
e("span", v, i(t.activeWorkspace.name), 1)
|
|
32
|
+
])
|
|
33
|
+
], 8, x),
|
|
34
|
+
o(u, { type: "workspace" }),
|
|
35
|
+
e("div", k, [
|
|
36
|
+
o(s(d), m(c, { collectionType: "workspace" }), null, 16)
|
|
37
|
+
])
|
|
38
|
+
])
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
2
42
|
export {
|
|
3
|
-
|
|
43
|
+
B as default
|
|
4
44
|
};
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ScalarIconGlobe as p } from "@scalar/icons";
|
|
3
|
-
import { RouterView as d } from "vue-router";
|
|
4
|
-
import _ from "./components/Tabs.vue.js";
|
|
5
|
-
const u = { class: "custom-scroll h-full" }, f = { class: "w-full md:mx-auto md:max-w-[720px]" }, x = ["aria-label"], h = { class: "group relative ml-1.25" }, v = { class: "text-c-1 flex h-8 items-center" }, k = { class: "px-1.5 py-8" }, w = {}, B = /* @__PURE__ */ l({
|
|
6
|
-
...w,
|
|
7
|
-
__name: "WorkspaceCollection",
|
|
8
|
-
props: {
|
|
9
|
-
documentSlug: {},
|
|
10
|
-
document: {},
|
|
11
|
-
eventBus: {},
|
|
12
|
-
layout: {},
|
|
13
|
-
path: {},
|
|
14
|
-
method: {},
|
|
15
|
-
exampleName: {},
|
|
16
|
-
environment: {},
|
|
17
|
-
workspaceStore: {},
|
|
18
|
-
activeWorkspace: {}
|
|
19
|
-
},
|
|
20
|
-
setup(s) {
|
|
21
|
-
const c = s;
|
|
22
|
-
return (t, g) => (n(), r("div", u, [
|
|
23
|
-
e("div", f, [
|
|
24
|
-
e("div", {
|
|
25
|
-
"aria-label": `title: ${t.activeWorkspace.name}`,
|
|
26
|
-
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
27
|
-
}, [
|
|
28
|
-
o(a(p), { class: "text-c-2 size-6" }),
|
|
29
|
-
e("div", h, [
|
|
30
|
-
e("span", v, m(t.activeWorkspace.name), 1)
|
|
31
|
-
])
|
|
32
|
-
], 8, x),
|
|
33
|
-
o(_, { type: "workspace" }),
|
|
34
|
-
e("div", k, [
|
|
35
|
-
o(a(d), i(c, { collectionType: "workspace" }), null, 16)
|
|
36
|
-
])
|
|
37
|
-
])
|
|
38
|
-
]));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
1
|
+
import f from "./WorkspaceCollection.vue.js";
|
|
41
2
|
export {
|
|
42
|
-
|
|
3
|
+
f as default
|
|
43
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;AA8NA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Authentication.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e15e1c6f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as
|
|
1
|
+
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as r, unref as a, normalizeClass as i } from "vue";
|
|
2
2
|
import { ScalarToggle as p } from "@scalar/components";
|
|
3
3
|
import v from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
4
|
-
const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, h = { class: "flex h-8 items-center justify-between" },
|
|
4
|
+
const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, h = { class: "flex h-8 items-center justify-between" }, b = /* @__PURE__ */ u({
|
|
5
5
|
__name: "Authentication",
|
|
6
6
|
props: {
|
|
7
7
|
documentSlug: {},
|
|
@@ -14,21 +14,22 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
14
14
|
environment: {},
|
|
15
15
|
workspaceStore: {},
|
|
16
16
|
activeWorkspace: {},
|
|
17
|
+
plugins: {},
|
|
17
18
|
collectionType: {}
|
|
18
19
|
},
|
|
19
20
|
setup(o) {
|
|
20
21
|
const s = l(
|
|
21
22
|
() => o.document?.["x-scalar-set-operation-security"] ?? !1
|
|
22
|
-
),
|
|
23
|
+
), c = l(
|
|
23
24
|
() => o.document?.servers?.find(
|
|
24
25
|
({ url: e }) => e === o.document?.["x-scalar-selected-server"]
|
|
25
|
-
)
|
|
26
|
+
) ?? null
|
|
26
27
|
);
|
|
27
28
|
return (e, t) => (d(), m("div", y, [
|
|
28
29
|
n("div", f, [
|
|
29
30
|
n("div", h, [
|
|
30
31
|
t[1] || (t[1] = n("h3", { class: "font-bold" }, "Authentication", -1)),
|
|
31
|
-
|
|
32
|
+
r(a(p), {
|
|
32
33
|
class: "w-4",
|
|
33
34
|
modelValue: s.value,
|
|
34
35
|
"onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
|
|
@@ -37,10 +38,10 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
37
38
|
t[2] || (t[2] = n("p", { class: "pr-6 text-sm" }, " If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1))
|
|
38
39
|
]),
|
|
39
40
|
n("div", {
|
|
40
|
-
class:
|
|
41
|
+
class: i(!s.value && "cursor-not-allowed")
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
class:
|
|
43
|
+
r(a(v), {
|
|
44
|
+
class: i([
|
|
44
45
|
"scalar-collection-auth !border-none",
|
|
45
46
|
!s.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
46
47
|
]),
|
|
@@ -48,16 +49,17 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
48
49
|
eventBus: e.eventBus,
|
|
49
50
|
isStatic: "",
|
|
50
51
|
meta: { type: "document" },
|
|
51
|
-
|
|
52
|
+
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
53
|
+
securityRequirements: e.document?.security ?? [],
|
|
52
54
|
securitySchemes: e.document?.components?.securitySchemes ?? {},
|
|
53
55
|
selectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
54
|
-
server:
|
|
56
|
+
server: c.value,
|
|
55
57
|
title: "Authentication"
|
|
56
|
-
}, null, 8, ["class", "environment", "eventBus", "
|
|
58
|
+
}, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
|
|
57
59
|
], 2)
|
|
58
60
|
]));
|
|
59
61
|
}
|
|
60
62
|
});
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
b as default
|
|
63
65
|
};
|
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as c, computed as n, createElementBlock as l, openBlock as a, createStaticVNode as i, createVNode as r, unref as u } from "vue";
|
|
2
|
+
import d from "../../global-cookies/components/CookiesTable.vue.js";
|
|
3
|
+
const p = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ c({
|
|
4
|
+
__name: "Cookies",
|
|
5
|
+
props: {
|
|
6
|
+
documentSlug: {},
|
|
7
|
+
document: {},
|
|
8
|
+
eventBus: {},
|
|
9
|
+
layout: {},
|
|
10
|
+
path: {},
|
|
11
|
+
method: {},
|
|
12
|
+
exampleName: {},
|
|
13
|
+
environment: {},
|
|
14
|
+
workspaceStore: {},
|
|
15
|
+
activeWorkspace: {},
|
|
16
|
+
plugins: {},
|
|
17
|
+
collectionType: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const s = n(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
|
|
21
|
+
return (o, t) => (a(), l("div", p, [
|
|
22
|
+
t[0] || (t[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Cookies</h3></div><p class="text-c-2 mb-4 text-sm"> Manage your collection's cookies here.<br>Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.<br></p></div></div>', 1)),
|
|
23
|
+
r(u(d), {
|
|
24
|
+
cookies: s.value,
|
|
25
|
+
eventBus: o.eventBus,
|
|
26
|
+
collectionType: o.collectionType
|
|
27
|
+
}, null, 8, ["cookies", "eventBus", "collectionType"])
|
|
28
|
+
]));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
2
31
|
export {
|
|
3
32
|
f as default
|
|
4
33
|
};
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import d from "../../global-cookies/components/CookiesTable.vue.js";
|
|
3
|
-
const p = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ c({
|
|
4
|
-
__name: "Cookies",
|
|
5
|
-
props: {
|
|
6
|
-
documentSlug: {},
|
|
7
|
-
document: {},
|
|
8
|
-
eventBus: {},
|
|
9
|
-
layout: {},
|
|
10
|
-
path: {},
|
|
11
|
-
method: {},
|
|
12
|
-
exampleName: {},
|
|
13
|
-
environment: {},
|
|
14
|
-
workspaceStore: {},
|
|
15
|
-
activeWorkspace: {},
|
|
16
|
-
collectionType: {}
|
|
17
|
-
},
|
|
18
|
-
setup(e) {
|
|
19
|
-
const s = n(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
|
|
20
|
-
return (o, t) => (a(), l("div", p, [
|
|
21
|
-
t[0] || (t[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Cookies</h3></div><p class="text-c-2 mb-4 text-sm"> Manage your collection's cookies here.<br>Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.<br></p></div></div>', 1)),
|
|
22
|
-
r(u(d), {
|
|
23
|
-
cookies: s.value,
|
|
24
|
-
eventBus: o.eventBus,
|
|
25
|
-
collectionType: o.collectionType
|
|
26
|
-
}, null, 8, ["cookies", "eventBus", "collectionType"])
|
|
27
|
-
]));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
1
|
+
import f from "./Cookies.vue.js";
|
|
30
2
|
export {
|
|
31
3
|
f as default
|
|
32
4
|
};
|