@scalar/api-client 2.15.0 → 2.17.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 +150 -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 +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +103 -80
- 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/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 +18 -18
- 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/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,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import {
|
|
4
|
-
import { getParentEntry as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as q, mergeModels as B, computed as c, capitalize as x, useModel as C, ref as V, createElementBlock as I, openBlock as m, createVNode as l, createBlock as S, createCommentVNode as v, unref as o, createSlots as G, withCtx as r, createTextVNode as b, toDisplayString as R, createElementVNode as d, normalizeClass as j } from "vue";
|
|
2
|
+
import { useModal as F, ScalarSidebarItem as W, ScalarIconButton as H, ScalarButton as O, ScalarModal as K } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as L, ScalarIconDotsThree as U, ScalarIconGlobe as J } from "@scalar/icons";
|
|
4
|
+
import { getParentEntry as f } from "@scalar/workspace-store/navigation";
|
|
5
|
+
import Y from "../../../../assets/rabbit.ascii.js";
|
|
6
|
+
import Q from "../../../../assets/rabbitjump.ascii.js";
|
|
7
7
|
import M from "../../../../components/ScalarAsciiArt.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { dragHandleFactory as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
8
|
+
import X from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
9
|
+
import Z from "./ItemDecorator.vue.js";
|
|
10
|
+
import { dragHandleFactory as _ } from "../../../helpers/drag-handle-factory.js";
|
|
11
|
+
import ee from "../../../components/sidebar/Sidebar.vue.js";
|
|
12
|
+
const te = { class: "flex" }, ae = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
|
|
15
|
-
},
|
|
15
|
+
}, oe = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, ne = { class: "gap-1.5 p-2" }, fe = /* @__PURE__ */ q({
|
|
16
16
|
__name: "AppSidebar",
|
|
17
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ B({
|
|
18
18
|
layout: {},
|
|
19
19
|
sidebarState: {},
|
|
20
20
|
isWorkspaceOpen: { type: Boolean },
|
|
@@ -31,27 +31,27 @@ const _ = { class: "flex" }, ee = {
|
|
|
31
31
|
},
|
|
32
32
|
sidebarWidthModifiers: {}
|
|
33
33
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
34
|
+
emits: /* @__PURE__ */ B(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
35
35
|
setup(n, { emit: h }) {
|
|
36
|
-
const u = h,
|
|
37
|
-
() =>
|
|
36
|
+
const u = h, $ = c(() => x(n.activeWorkspace.name)), y = C(n, "isSidebarOpen"), g = C(n, "sidebarWidth"), k = c(() => n.sidebarState.items.value.length <= 1), w = c(
|
|
37
|
+
() => _({
|
|
38
38
|
store: n.store,
|
|
39
39
|
sidebarState: n.sidebarState
|
|
40
40
|
})
|
|
41
|
-
), D = (t, e) =>
|
|
42
|
-
const t =
|
|
41
|
+
), D = (t, e) => w.value.handleDragEnd(t, e), N = (t, e) => w.value.isDroppable(t, e), i = V(null), p = F(), A = c(() => {
|
|
42
|
+
const t = i.value?.item;
|
|
43
43
|
return t?.type === "document" ? "This cannot be undone. You're about to delete the document and all tags and operations inside it." : `Are you sure you want to delete this ${t?.type ?? "item"}? This action cannot be undone.`;
|
|
44
|
-
}),
|
|
45
|
-
const t =
|
|
44
|
+
}), E = () => {
|
|
45
|
+
const t = i.value?.item;
|
|
46
46
|
if (!t)
|
|
47
47
|
return;
|
|
48
|
-
const e = n.sidebarState.getEntryById(t.id), a =
|
|
48
|
+
const e = n.sidebarState.getEntryById(t.id), a = f("document", e), s = f("operation", e);
|
|
49
49
|
if (a) {
|
|
50
50
|
if (t.type === "document")
|
|
51
|
-
n.eventBus.emit("document:delete:document", { name:
|
|
51
|
+
n.eventBus.emit("document:delete:document", { name: a.name });
|
|
52
52
|
else if (t.type === "tag")
|
|
53
53
|
n.eventBus.emit("tag:delete:tag", {
|
|
54
|
-
documentName: a.
|
|
54
|
+
documentName: a.name,
|
|
55
55
|
name: t.name
|
|
56
56
|
});
|
|
57
57
|
else if (t.type === "operation") {
|
|
@@ -62,7 +62,7 @@ const _ = { class: "flex" }, ee = {
|
|
|
62
62
|
method: s.method,
|
|
63
63
|
path: s.path
|
|
64
64
|
},
|
|
65
|
-
documentName: a.
|
|
65
|
+
documentName: a.name
|
|
66
66
|
});
|
|
67
67
|
} else if (t.type === "example") {
|
|
68
68
|
if (!s)
|
|
@@ -73,30 +73,39 @@ const _ = { class: "flex" }, ee = {
|
|
|
73
73
|
path: s.path,
|
|
74
74
|
exampleKey: t.name
|
|
75
75
|
},
|
|
76
|
-
documentName: a.
|
|
76
|
+
documentName: a.name
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
p.hide(),
|
|
79
|
+
p.hide(), i.value = null;
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
t.preventDefault(), t.stopPropagation(),
|
|
81
|
+
}, z = (t, e) => {
|
|
82
|
+
t.preventDefault(), t.stopPropagation(), i.value = {
|
|
83
83
|
item: e,
|
|
84
84
|
target: t.currentTarget,
|
|
85
85
|
isOpen: !0
|
|
86
86
|
};
|
|
87
|
-
},
|
|
88
|
-
|
|
87
|
+
}, P = () => {
|
|
88
|
+
i.value && (i.value.isOpen = !1);
|
|
89
|
+
}, T = (t) => {
|
|
90
|
+
const e = n.sidebarState.getEntryById(t.id), a = f("document", e), s = f("tag", e);
|
|
91
|
+
n.eventBus.emit("ui:open:command-palette", {
|
|
92
|
+
action: "create-request",
|
|
93
|
+
payload: {
|
|
94
|
+
documentId: a?.id,
|
|
95
|
+
tagId: s?.name
|
|
96
|
+
}
|
|
97
|
+
});
|
|
89
98
|
};
|
|
90
|
-
return (t, e) => (m(),
|
|
91
|
-
|
|
92
|
-
isSidebarOpen:
|
|
93
|
-
"onUpdate:isSidebarOpen": e[3] || (e[3] = (a) =>
|
|
94
|
-
sidebarWidth:
|
|
95
|
-
"onUpdate:sidebarWidth": e[4] || (e[4] = (a) =>
|
|
99
|
+
return (t, e) => (m(), I("div", te, [
|
|
100
|
+
l(o(ee), {
|
|
101
|
+
isSidebarOpen: y.value,
|
|
102
|
+
"onUpdate:isSidebarOpen": e[3] || (e[3] = (a) => y.value = a),
|
|
103
|
+
sidebarWidth: g.value,
|
|
104
|
+
"onUpdate:sidebarWidth": e[4] || (e[4] = (a) => g.value = a),
|
|
96
105
|
activeWorkspace: t.activeWorkspace,
|
|
97
106
|
documents: Object.values(t.store.workspace.documents),
|
|
98
107
|
eventBus: t.eventBus,
|
|
99
|
-
isDroppable:
|
|
108
|
+
isDroppable: N,
|
|
100
109
|
layout: t.layout,
|
|
101
110
|
sidebarState: t.sidebarState,
|
|
102
111
|
workspaces: t.workspaces,
|
|
@@ -104,57 +113,71 @@ const _ = { class: "flex" }, ee = {
|
|
|
104
113
|
onReorder: e[6] || (e[6] = (a, s) => D(a, s)),
|
|
105
114
|
"onSelect:workspace": e[7] || (e[7] = (a) => u("select:workspace", a)),
|
|
106
115
|
onSelectItem: e[8] || (e[8] = (a) => u("selectItem", a))
|
|
107
|
-
},
|
|
108
|
-
workspaceButton:
|
|
109
|
-
|
|
116
|
+
}, G({
|
|
117
|
+
workspaceButton: r(() => [
|
|
118
|
+
l(o(W), {
|
|
110
119
|
is: "button",
|
|
111
120
|
active: t.isWorkspaceOpen,
|
|
112
|
-
icon:
|
|
121
|
+
icon: o(J),
|
|
113
122
|
onClick: e[0] || (e[0] = (a) => u("click:workspace"))
|
|
114
123
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
124
|
+
default: r(() => [
|
|
125
|
+
b(R($.value), 1)
|
|
117
126
|
]),
|
|
118
127
|
_: 1
|
|
119
128
|
}, 8, ["active", "icon"])
|
|
120
129
|
]),
|
|
121
|
-
decorator:
|
|
122
|
-
|
|
123
|
-
icon:
|
|
124
|
-
weight: "bold",
|
|
130
|
+
decorator: r(({ item: a }) => [
|
|
131
|
+
l(o(H), {
|
|
132
|
+
icon: o(U),
|
|
125
133
|
label: "More options",
|
|
126
134
|
size: "sm",
|
|
127
|
-
|
|
135
|
+
weight: "bold",
|
|
136
|
+
onClick: (s) => z(s, a)
|
|
128
137
|
}, null, 8, ["icon", "onClick"])
|
|
129
138
|
]),
|
|
139
|
+
empty: r(({ item: a }) => [
|
|
140
|
+
l(o(W), {
|
|
141
|
+
is: "button",
|
|
142
|
+
onClick: (s) => T(a)
|
|
143
|
+
}, {
|
|
144
|
+
icon: r(() => [
|
|
145
|
+
l(o(L))
|
|
146
|
+
]),
|
|
147
|
+
default: r(() => [...e[11] || (e[11] = [
|
|
148
|
+
b("Add operation", -1)
|
|
149
|
+
])]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["onClick"])
|
|
152
|
+
]),
|
|
130
153
|
_: 2
|
|
131
154
|
}, [
|
|
132
155
|
t.layout !== "modal" ? {
|
|
133
156
|
name: "footer",
|
|
134
|
-
fn:
|
|
157
|
+
fn: r(() => [
|
|
135
158
|
d("div", {
|
|
136
|
-
class:
|
|
137
|
-
"empty-sidebar-item border-t":
|
|
159
|
+
class: j({
|
|
160
|
+
"empty-sidebar-item border-t": k.value
|
|
138
161
|
})
|
|
139
162
|
}, [
|
|
140
|
-
|
|
141
|
-
d("div",
|
|
142
|
-
|
|
143
|
-
art:
|
|
163
|
+
k.value ? (m(), I("div", ae, [
|
|
164
|
+
d("div", oe, [
|
|
165
|
+
l(M, {
|
|
166
|
+
art: o(Y),
|
|
144
167
|
class: "rabbitsit font-bold"
|
|
145
168
|
}, null, 8, ["art"]),
|
|
146
|
-
|
|
147
|
-
art:
|
|
169
|
+
l(M, {
|
|
170
|
+
art: o(Q),
|
|
148
171
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
149
172
|
}, null, 8, ["art"])
|
|
150
173
|
]),
|
|
151
|
-
e[
|
|
174
|
+
e[12] || (e[12] = d("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
|
|
152
175
|
d("b", { class: "font-medium" }, "Let's Get Started"),
|
|
153
176
|
d("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
154
177
|
], -1))
|
|
155
178
|
])) : v("", !0),
|
|
156
|
-
d("div",
|
|
157
|
-
|
|
179
|
+
d("div", ne, [
|
|
180
|
+
k.value ? (m(), S(o(O), {
|
|
158
181
|
key: 0,
|
|
159
182
|
class: "w-full",
|
|
160
183
|
size: "sm",
|
|
@@ -163,20 +186,20 @@ const _ = { class: "flex" }, ee = {
|
|
|
163
186
|
payload: void 0
|
|
164
187
|
}))
|
|
165
188
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
189
|
+
default: r(() => [...e[13] || (e[13] = [
|
|
190
|
+
b(" Import Collection ", -1)
|
|
168
191
|
])]),
|
|
169
192
|
_: 1
|
|
170
193
|
})) : v("", !0),
|
|
171
|
-
|
|
194
|
+
l(o(O), {
|
|
172
195
|
class: "w-full",
|
|
173
196
|
hotkey: "K",
|
|
174
197
|
size: "sm",
|
|
175
198
|
variant: "outlined",
|
|
176
199
|
onClick: e[2] || (e[2] = (a) => t.eventBus.emit("ui:open:command-palette"))
|
|
177
200
|
}, {
|
|
178
|
-
default:
|
|
179
|
-
|
|
201
|
+
default: r(() => [...e[14] || (e[14] = [
|
|
202
|
+
b(" Add Item ", -1)
|
|
180
203
|
])]),
|
|
181
204
|
_: 1
|
|
182
205
|
})
|
|
@@ -186,27 +209,27 @@ const _ = { class: "flex" }, ee = {
|
|
|
186
209
|
key: "0"
|
|
187
210
|
} : void 0
|
|
188
211
|
]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "eventBus", "layout", "sidebarState", "workspaces"]),
|
|
189
|
-
|
|
212
|
+
i.value && i.value.isOpen ? (m(), S(Z, {
|
|
190
213
|
key: 0,
|
|
191
214
|
eventBus: t.eventBus,
|
|
192
|
-
item:
|
|
215
|
+
item: i.value.item,
|
|
193
216
|
sidebarState: t.sidebarState,
|
|
194
|
-
target:
|
|
195
|
-
onCloseMenu:
|
|
196
|
-
onShowDeleteModal: e[9] || (e[9] = (a) =>
|
|
217
|
+
target: i.value.target,
|
|
218
|
+
onCloseMenu: P,
|
|
219
|
+
onShowDeleteModal: e[9] || (e[9] = (a) => o(p).show())
|
|
197
220
|
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) : v("", !0),
|
|
198
|
-
|
|
221
|
+
i.value ? (m(), S(o(K), {
|
|
199
222
|
key: 1,
|
|
200
223
|
size: "xxs",
|
|
201
|
-
state:
|
|
202
|
-
title: `Delete ${
|
|
224
|
+
state: o(p),
|
|
225
|
+
title: `Delete ${i.value.item.title}`
|
|
203
226
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
|
|
206
|
-
variableName:
|
|
207
|
-
warningMessage:
|
|
208
|
-
onClose: e[10] || (e[10] = (a) =>
|
|
209
|
-
onDelete:
|
|
227
|
+
default: r(() => [
|
|
228
|
+
l(X, {
|
|
229
|
+
variableName: i.value.item.title,
|
|
230
|
+
warningMessage: A.value,
|
|
231
|
+
onClose: e[10] || (e[10] = (a) => o(p).hide()),
|
|
232
|
+
onDelete: E
|
|
210
233
|
}, null, 8, ["variableName", "warningMessage"])
|
|
211
234
|
]),
|
|
212
235
|
_: 1
|
|
@@ -215,5 +238,5 @@ const _ = { class: "flex" }, ee = {
|
|
|
215
238
|
}
|
|
216
239
|
});
|
|
217
240
|
export {
|
|
218
|
-
|
|
241
|
+
fe as default
|
|
219
242
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { UseTabsReturn } from '../../../../v2/hooks/use-tabs.js';
|
|
2
|
+
import type { UseTabsReturn } from '../../../../v2/features/app/hooks/use-tabs.js';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/** Tabs state */
|
|
5
5
|
tabsState: UseTabsReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,iBAAiB;IACjB,SAAS,EAAE,aAAa,CAAA;IACxB,0DAA0D;IAC1D,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AA6IF,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebTopNav.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/WebTopNav.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WebTopNav.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/WebTopNav.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAK/E;;;;GAIG;;IAGD;;;OAGG;qBACc,SAAS;IAC1B;;;OAGG;gBACS,SAAS,EAAE;;;;;IATvB;;;OAGG;qBACc,SAAS;IAC1B;;;OAGG;gBACS,SAAS,EAAE;;;;;AAXzB,wBAuGC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientPlugin } from '../../../../v2/plugins';
|
|
1
|
+
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
2
2
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
3
3
|
export type CreateApiClientOptions = {
|
|
4
4
|
/**
|
|
@@ -20,5 +20,5 @@ export declare const createAppRouter: (layout: CreateApiClientOptions["layout"])
|
|
|
20
20
|
/**
|
|
21
21
|
* Create the API Client with router and passes in the workspace store as a prop
|
|
22
22
|
*/
|
|
23
|
-
export declare const createApiClientApp: (el: HTMLElement | null, { layout }: CreateApiClientOptions) => void;
|
|
23
|
+
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins }: CreateApiClientOptions) => void;
|
|
24
24
|
//# sourceMappingURL=create-api-client-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,sBAAsB,CAAC,QAAQ,CAAC,gCAQvE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,WAAW,GAAG,IAAI,EAAE,qBAAiC,sBAAsB,SAkBjH,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createApp as
|
|
2
|
-
import { createRouter as o, createWebHistory as
|
|
3
|
-
import
|
|
1
|
+
import { createApp as p } from "vue";
|
|
2
|
+
import { createRouter as o, createWebHistory as c, createWebHashHistory as s } from "vue-router";
|
|
3
|
+
import n from "../App.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { ROUTES as a } from "./routes.js";
|
|
6
|
-
const
|
|
7
|
-
const t =
|
|
8
|
-
if (t.use(
|
|
6
|
+
const m = (e) => e === "web" ? o({ history: c(), routes: a }) : o({ history: s(), routes: a }), A = (e, { layout: r = "desktop", plugins: i }) => {
|
|
7
|
+
const t = p(n, { layout: r, plugins: i });
|
|
8
|
+
if (t.use(m(r)), !e) {
|
|
9
9
|
console.error(
|
|
10
10
|
"[@scalar/api-client-modal] Could not create the API client.",
|
|
11
11
|
"Invalid HTML element provided.",
|
|
@@ -16,6 +16,6 @@ const n = (e) => e === "web" ? o({ history: p(), routes: a }) : o({ history: c()
|
|
|
16
16
|
t.mount(e);
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
A as createApiClientApp,
|
|
20
|
+
m as createAppRouter
|
|
21
21
|
};
|
|
@@ -3,7 +3,8 @@ import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
|
3
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
4
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
5
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
6
|
-
import type { Workspace } from '../../../../v2/hooks/use-workspace-selector.js';
|
|
6
|
+
import type { Workspace } from '../../../../v2/features/app/hooks/use-workspace-selector.js';
|
|
7
|
+
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
7
8
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
8
9
|
/** These props are provided at the route level */
|
|
9
10
|
export type RouteProps = {
|
|
@@ -17,6 +18,7 @@ export type RouteProps = {
|
|
|
17
18
|
environment: XScalarEnvironment;
|
|
18
19
|
workspaceStore: WorkspaceStore;
|
|
19
20
|
activeWorkspace: Workspace;
|
|
21
|
+
plugins: ClientPlugin[];
|
|
20
22
|
};
|
|
21
23
|
/** When in the collections pages */
|
|
22
24
|
export type CollectionProps = RouteProps & ({
|
|
@@ -34,12 +36,12 @@ export declare const ROUTES: ({
|
|
|
34
36
|
children: ({
|
|
35
37
|
name: string;
|
|
36
38
|
path: string;
|
|
37
|
-
component: ()
|
|
39
|
+
component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
40
|
children?: undefined;
|
|
39
41
|
} | {
|
|
40
42
|
name: string;
|
|
41
43
|
path: string;
|
|
42
|
-
component: ()
|
|
44
|
+
component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
45
|
children: ({
|
|
44
46
|
name: string;
|
|
45
47
|
path: string;
|
|
@@ -50,7 +52,19 @@ export declare const ROUTES: ({
|
|
|
50
52
|
} | {
|
|
51
53
|
name: string;
|
|
52
54
|
path: string;
|
|
53
|
-
component:
|
|
55
|
+
component: import("vue").DefineComponent<(RouteProps & {
|
|
56
|
+
collectionType: "document";
|
|
57
|
+
document: WorkspaceDocument;
|
|
58
|
+
}) | (RouteProps & {
|
|
59
|
+
collectionType: "workspace";
|
|
60
|
+
document: null;
|
|
61
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & {
|
|
62
|
+
collectionType: "document";
|
|
63
|
+
document: WorkspaceDocument;
|
|
64
|
+
}) | (RouteProps & {
|
|
65
|
+
collectionType: "workspace";
|
|
66
|
+
document: null;
|
|
67
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
68
|
redirect?: undefined;
|
|
55
69
|
})[];
|
|
56
70
|
})[];
|
|
@@ -59,11 +73,23 @@ export declare const ROUTES: ({
|
|
|
59
73
|
} | {
|
|
60
74
|
name: string;
|
|
61
75
|
path: string;
|
|
62
|
-
component: ()
|
|
76
|
+
component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
77
|
children: {
|
|
64
78
|
name: string;
|
|
65
79
|
path: string;
|
|
66
|
-
component:
|
|
80
|
+
component: import("vue").DefineComponent<(RouteProps & {
|
|
81
|
+
collectionType: "document";
|
|
82
|
+
document: WorkspaceDocument;
|
|
83
|
+
}) | (RouteProps & {
|
|
84
|
+
collectionType: "workspace";
|
|
85
|
+
document: null;
|
|
86
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & {
|
|
87
|
+
collectionType: "document";
|
|
88
|
+
document: WorkspaceDocument;
|
|
89
|
+
}) | (RouteProps & {
|
|
90
|
+
collectionType: "workspace";
|
|
91
|
+
document: null;
|
|
92
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
93
|
}[];
|
|
68
94
|
})[];
|
|
69
95
|
redirect?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAU/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,cAAc,EAAE,cAAc,CAAA;IAC9B,eAAe,EAAE,SAAS,CAAA;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;CAGxB,CAAA;AAED,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,UAAU,GACtC,CACI;IACE,cAAc,EAAE,UAAU,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GACD;IACE,cAAc,EAAE,WAAW,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;CACf,CACJ,CAAA;AAEH,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;oCAVK,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;oCALE,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;;;;;;;;;;;;;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;;;;;;;;IAwGM,CAAA"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import n from "../../collection/components/Authentication.vue.js";
|
|
2
|
+
import e from "../../collection/components/Cookies.vue.js";
|
|
3
|
+
import o from "../../collection/components/Environment.vue.js";
|
|
4
|
+
import m from "../../collection/components/Overview.vue.js";
|
|
5
|
+
import a from "../../collection/components/Servers.vue.js";
|
|
6
|
+
import t from "../../collection/components/Settings.vue.js";
|
|
7
|
+
import c from "../../collection/DocumentCollection.vue.js";
|
|
8
|
+
import r from "../../collection/WorkspaceCollection.vue.js";
|
|
9
|
+
import p from "../../operation/Operation.vue.js";
|
|
10
|
+
import { workspaceStorage as i } from "../../../helpers/storage.js";
|
|
11
|
+
const g = [
|
|
3
12
|
{
|
|
4
13
|
path: "/workspace/:workspaceSlug",
|
|
5
14
|
children: [
|
|
@@ -10,13 +19,13 @@ const o = [
|
|
|
10
19
|
{
|
|
11
20
|
name: "example",
|
|
12
21
|
path: "path/:pathEncoded/method/:method/example/:exampleName",
|
|
13
|
-
component:
|
|
22
|
+
component: p
|
|
14
23
|
},
|
|
15
24
|
// Document Page
|
|
16
25
|
{
|
|
17
26
|
name: "document",
|
|
18
27
|
path: "",
|
|
19
|
-
component:
|
|
28
|
+
component: c,
|
|
20
29
|
children: [
|
|
21
30
|
// Redirect to overview
|
|
22
31
|
{
|
|
@@ -30,37 +39,37 @@ const o = [
|
|
|
30
39
|
{
|
|
31
40
|
name: "document.overview",
|
|
32
41
|
path: "overview",
|
|
33
|
-
component:
|
|
42
|
+
component: m
|
|
34
43
|
},
|
|
35
44
|
// Document servers
|
|
36
45
|
{
|
|
37
46
|
name: "document.servers",
|
|
38
47
|
path: "servers",
|
|
39
|
-
component:
|
|
48
|
+
component: a
|
|
40
49
|
},
|
|
41
50
|
// Document environment
|
|
42
51
|
{
|
|
43
52
|
name: "document.environment",
|
|
44
53
|
path: "environment",
|
|
45
|
-
component:
|
|
54
|
+
component: o
|
|
46
55
|
},
|
|
47
56
|
// Document authentication
|
|
48
57
|
{
|
|
49
58
|
name: "document.authentication",
|
|
50
59
|
path: "authentication",
|
|
51
|
-
component:
|
|
60
|
+
component: n
|
|
52
61
|
},
|
|
53
62
|
// Document cookies
|
|
54
63
|
{
|
|
55
64
|
name: "document.cookies",
|
|
56
65
|
path: "cookies",
|
|
57
|
-
component:
|
|
66
|
+
component: e
|
|
58
67
|
},
|
|
59
68
|
// Document settings
|
|
60
69
|
{
|
|
61
70
|
name: "document.settings",
|
|
62
71
|
path: "settings",
|
|
63
|
-
component:
|
|
72
|
+
component: t
|
|
64
73
|
}
|
|
65
74
|
]
|
|
66
75
|
}
|
|
@@ -70,25 +79,25 @@ const o = [
|
|
|
70
79
|
{
|
|
71
80
|
name: "workspace",
|
|
72
81
|
path: "",
|
|
73
|
-
component:
|
|
82
|
+
component: r,
|
|
74
83
|
children: [
|
|
75
84
|
// Workspace environment
|
|
76
85
|
{
|
|
77
86
|
name: "workspace.environment",
|
|
78
87
|
path: "environment",
|
|
79
|
-
component:
|
|
88
|
+
component: o
|
|
80
89
|
},
|
|
81
90
|
// Workspace cookies
|
|
82
91
|
{
|
|
83
92
|
name: "workspace.cookies",
|
|
84
93
|
path: "cookies",
|
|
85
|
-
component:
|
|
94
|
+
component: e
|
|
86
95
|
},
|
|
87
96
|
// Workspace settings
|
|
88
97
|
{
|
|
89
98
|
name: "workspace.settings",
|
|
90
99
|
path: "settings",
|
|
91
|
-
component:
|
|
100
|
+
component: t
|
|
92
101
|
}
|
|
93
102
|
]
|
|
94
103
|
}
|
|
@@ -96,9 +105,9 @@ const o = [
|
|
|
96
105
|
},
|
|
97
106
|
{
|
|
98
107
|
path: "/:pathMatch(.*)*",
|
|
99
|
-
redirect: () =>
|
|
108
|
+
redirect: () => i.getLastPath() ?? "/workspace/default/document/drafts/overview"
|
|
100
109
|
}
|
|
101
110
|
];
|
|
102
111
|
export {
|
|
103
|
-
|
|
112
|
+
g as ROUTES
|
|
104
113
|
};
|
|
@@ -2,8 +2,8 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
|
2
2
|
import { createSidebarState } from '@scalar/sidebar';
|
|
3
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
4
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
5
|
-
import { type
|
|
6
|
-
export type
|
|
5
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
6
|
+
export type UseAppSidebarReturn = {
|
|
7
7
|
handleSelectItem: (id: string) => void;
|
|
8
8
|
state: ReturnType<typeof createSidebarState<TraversedEntry>>;
|
|
9
9
|
getEntryByLocation: (location: {
|
|
@@ -30,12 +30,11 @@ export type UseSidebarStateReturn = {
|
|
|
30
30
|
* exampleName,
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
export declare const
|
|
34
|
-
workspaceStore:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=use-sidebar-state.d.ts.map
|
|
33
|
+
export declare const useAppSidebar: ({ workspaceStore, documentSlug, path, method, exampleName, }: {
|
|
34
|
+
workspaceStore: Ref<WorkspaceStore | null>;
|
|
35
|
+
documentSlug: ComputedRef<string | undefined>;
|
|
36
|
+
path: ComputedRef<string | undefined>;
|
|
37
|
+
method: ComputedRef<HttpMethod | undefined>;
|
|
38
|
+
exampleName: ComputedRef<string | undefined>;
|
|
39
|
+
}) => UseAppSidebarReturn;
|
|
40
|
+
//# sourceMappingURL=use-app-sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-app-sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-app-sidebar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAwB,MAAM,iBAAiB,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAA4B,MAAM,KAAK,CAAA;AAG1E,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,KAAK,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAA;IAC5D,kBAAkB,EAAE,CAAC,QAAQ,EAAE;QAC7B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,UAAU,CAAA;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,KAAK,cAAc,GAAG,SAAS,CAAA;CACjC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,GAAI,8DAM3B;IACD,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,YAAY,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAC7C,KAAG,mBAoOH,CAAA"}
|