@scalar/api-client 2.14.1 → 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 +176 -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 +81 -65
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -23
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -38
- 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 +202 -160
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +60 -51
- 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 +2 -2
- 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/RequestTable.vue.d.ts +2 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +3 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +146 -147
- 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/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
- 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 +4 -15
- 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 +117 -71
- 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 +16 -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 +81 -65
- 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 +9 -5
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +51 -46
- 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 +130 -143
- 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 +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +216 -106
- 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 +22 -0
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
- package/dist/v2/features/app/components/ItemDecorator.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/features/app/hooks/use-workspace-client-app-events.js +156 -0
- 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/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
- 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/features/settings/DocumentSettings.vue.js +2 -2
- package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
- 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/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +5 -5
- 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 +19 -19
- 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-client-events.js +0 -112
- 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,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as o, Fragment as Q, createBlock as c, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as F, withKeys as b, withModifiers as T, createTextVNode as V, renderSlot as $ } from "vue";
|
|
2
|
+
import { isDefined as Y } from "@scalar/helpers/array/is-defined";
|
|
3
|
+
import { useCodeMirror as Z, useDropdown as _, colorPicker as ee } from "@scalar/use-codemirror";
|
|
4
|
+
import { nanoid as te } from "nanoid";
|
|
4
5
|
import B from "../data-table/DataTableInputSelect.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { pillPlugin as
|
|
7
|
-
const
|
|
6
|
+
import le from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
|
|
7
|
+
import { pillPlugin as ne, backspaceCommand as oe } from "./code-variable-widget.js";
|
|
8
|
+
const ae = { class: "whitespace-nowrap" }, re = ["id"], ie = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "z-context text-c-2 absolute right-1.5 bottom-1 hidden font-sans group-has-[:focus-visible]/input:block",
|
|
10
11
|
role: "alert"
|
|
11
|
-
},
|
|
12
|
+
}, ue = {
|
|
12
13
|
key: 5,
|
|
13
14
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
14
|
-
},
|
|
15
|
+
}, de = {
|
|
15
16
|
key: 6,
|
|
16
17
|
class: "centered-y absolute right-0 flex h-full items-center p-1.5 group-has-[.cm-focused]:z-1"
|
|
17
|
-
},
|
|
18
|
+
}, se = {
|
|
18
19
|
key: 7,
|
|
19
20
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
20
|
-
},
|
|
21
|
+
}, fe = {
|
|
21
22
|
inheritAttrs: !1
|
|
22
|
-
},
|
|
23
|
-
...
|
|
23
|
+
}, ve = /* @__PURE__ */ W({
|
|
24
|
+
...fe,
|
|
24
25
|
__name: "CodeInput",
|
|
25
26
|
props: {
|
|
26
|
-
modelValue: {},
|
|
27
|
+
modelValue: { type: [String, Number, Boolean] },
|
|
27
28
|
environment: {},
|
|
28
29
|
type: {},
|
|
29
30
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -31,7 +32,7 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
31
32
|
layout: { default: "desktop" },
|
|
32
33
|
enum: {},
|
|
33
34
|
examples: {},
|
|
34
|
-
default: {},
|
|
35
|
+
default: { type: [String, Number, Boolean] },
|
|
35
36
|
nullable: { type: Boolean, default: !1 },
|
|
36
37
|
placeholder: {},
|
|
37
38
|
required: { type: Boolean },
|
|
@@ -47,18 +48,19 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
47
48
|
emitOnBlur: { type: Boolean, default: !0 },
|
|
48
49
|
withVariables: { type: Boolean, default: !0 },
|
|
49
50
|
importCurl: { type: Boolean, default: !1 },
|
|
51
|
+
alwaysEmitChange: { type: Boolean, default: !1 },
|
|
50
52
|
handleFieldChange: { type: Function },
|
|
51
53
|
handleFieldSubmit: { type: Function }
|
|
52
54
|
},
|
|
53
55
|
emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
|
|
54
|
-
setup(t, { expose:
|
|
55
|
-
const u =
|
|
56
|
-
if (e
|
|
56
|
+
setup(t, { expose: I, emit: M }) {
|
|
57
|
+
const u = M, k = j(), N = k.id || `id-${te()}`, y = d(!1), R = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), q = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
|
|
58
|
+
if (!(!t.alwaysEmitChange && e === t.modelValue)) {
|
|
57
59
|
if (t.importCurl && e.trim().toLowerCase().startsWith("curl")) {
|
|
58
|
-
u("curl", e),
|
|
60
|
+
u("curl", e), n.value && n.value.dispatch({
|
|
59
61
|
changes: {
|
|
60
62
|
from: 0,
|
|
61
|
-
to:
|
|
63
|
+
to: n.value.state.doc.length,
|
|
62
64
|
insert: String(t.modelValue)
|
|
63
65
|
}
|
|
64
66
|
});
|
|
@@ -66,31 +68,31 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
66
68
|
}
|
|
67
69
|
t.handleFieldChange ? t.handleFieldChange(e) : u("update:modelValue", e);
|
|
68
70
|
}
|
|
69
|
-
},
|
|
71
|
+
}, h = (e) => {
|
|
70
72
|
t.handleFieldSubmit ? t.handleFieldSubmit(e) : u("submit", e);
|
|
71
73
|
}, S = (e) => {
|
|
72
|
-
|
|
74
|
+
y.value = !1, t.emitOnBlur && t.modelValue && h(e), u("blur", e);
|
|
73
75
|
}, g = (e) => {
|
|
74
76
|
u("update:modelValue", e);
|
|
75
|
-
},
|
|
77
|
+
}, A = () => {
|
|
76
78
|
const e = [...t.extensions];
|
|
77
|
-
return t.colorPicker && e.push(
|
|
79
|
+
return t.colorPicker && e.push(ee), e;
|
|
78
80
|
}, O = s(
|
|
79
|
-
() =>
|
|
81
|
+
() => ne({
|
|
80
82
|
environment: t.environment,
|
|
81
83
|
isReadOnly: t.layout === "modal"
|
|
82
84
|
})
|
|
83
85
|
), z = s(() => [
|
|
84
|
-
...
|
|
86
|
+
...A(),
|
|
85
87
|
O.value,
|
|
86
|
-
|
|
87
|
-
]), E = d(null), { codeMirror:
|
|
88
|
+
oe
|
|
89
|
+
]), E = d(null), { codeMirror: n } = Z({
|
|
88
90
|
content: r(() => String(t.modelValue ?? "")),
|
|
89
91
|
onChange: (e) => {
|
|
90
92
|
C(e), L();
|
|
91
93
|
},
|
|
92
94
|
onFocus: () => {
|
|
93
|
-
|
|
95
|
+
y.value = !0;
|
|
94
96
|
},
|
|
95
97
|
onBlur: S,
|
|
96
98
|
codeMirrorRef: E,
|
|
@@ -103,59 +105,73 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
103
105
|
extensions: z,
|
|
104
106
|
placeholder: r(() => t.placeholder)
|
|
105
107
|
});
|
|
106
|
-
H(
|
|
107
|
-
|
|
108
|
+
H(n, () => {
|
|
109
|
+
n.value && Object.hasOwn(k, "autofocus") && n.value.focus();
|
|
108
110
|
});
|
|
109
|
-
const
|
|
110
|
-
codeMirror:
|
|
111
|
-
query:
|
|
112
|
-
showDropdown:
|
|
113
|
-
dropdownPosition:
|
|
114
|
-
}), U = s(() =>
|
|
115
|
-
if (
|
|
111
|
+
const p = d(!1), P = d(""), D = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = _({
|
|
112
|
+
codeMirror: n,
|
|
113
|
+
query: P,
|
|
114
|
+
showDropdown: p,
|
|
115
|
+
dropdownPosition: D
|
|
116
|
+
}), U = s(() => p.value && t.withVariables && t.layout !== "modal" && !!t.environment), m = (e, l) => {
|
|
117
|
+
if (p.value) {
|
|
116
118
|
e === "down" || e === "up" ? (l.preventDefault(), v.value?.handleArrowKey(e)) : e === "enter" && (l.preventDefault(), v.value?.handleSelect());
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
119
|
-
e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement &&
|
|
121
|
+
e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && h(l.target.textContent ?? "");
|
|
120
122
|
};
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
return I({
|
|
124
|
+
/**
|
|
125
|
+
* Focus the codemirror element
|
|
126
|
+
*
|
|
127
|
+
* @param cursorAtEnd boolean place the cursor at the end of the input
|
|
128
|
+
*/
|
|
129
|
+
focus: (e) => {
|
|
130
|
+
if (!n.value || (n.value.focus(), !Y(e)))
|
|
131
|
+
return;
|
|
132
|
+
const l = e === "start" ? 0 : e === "end" ? n.value.state.doc.length : e;
|
|
133
|
+
n.value.dispatch({
|
|
134
|
+
selection: { anchor: l },
|
|
135
|
+
scrollIntoView: !0
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
isFocused: y,
|
|
124
139
|
handleChange: C,
|
|
125
|
-
handleSubmit:
|
|
140
|
+
handleSubmit: h,
|
|
126
141
|
handleBlur: S,
|
|
127
142
|
booleanOptions: x,
|
|
128
|
-
codeMirror:
|
|
129
|
-
modelValue: t.modelValue
|
|
130
|
-
|
|
131
|
-
|
|
143
|
+
codeMirror: n,
|
|
144
|
+
modelValue: t.modelValue,
|
|
145
|
+
cursorPosition: () => n.value?.state.selection.main.head
|
|
146
|
+
}), (e, l) => (o(), i(Q, null, [
|
|
147
|
+
e.disabled ? (o(), i("div", {
|
|
132
148
|
key: 0,
|
|
133
149
|
class: G(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
|
|
134
150
|
"data-testid": "code-input-disabled"
|
|
135
151
|
}, [
|
|
136
|
-
w("span",
|
|
137
|
-
], 2)) : t.enum?.length ? (
|
|
152
|
+
w("span", ae, J(e.modelValue), 1)
|
|
153
|
+
], 2)) : t.enum?.length ? (o(), c(B, {
|
|
138
154
|
key: 1,
|
|
139
155
|
default: t.default,
|
|
140
156
|
modelValue: e.modelValue,
|
|
141
|
-
type:
|
|
157
|
+
type: q.value,
|
|
142
158
|
value: t.enum,
|
|
143
159
|
"onUpdate:modelValue": g
|
|
144
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) :
|
|
160
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : R.value ? (o(), c(B, {
|
|
145
161
|
key: 2,
|
|
146
162
|
default: t.default,
|
|
147
163
|
modelValue: e.modelValue,
|
|
148
164
|
value: x.value,
|
|
149
165
|
"onUpdate:modelValue": g
|
|
150
|
-
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (
|
|
166
|
+
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (o(), c(B, {
|
|
151
167
|
key: 3,
|
|
152
168
|
default: t.default,
|
|
153
169
|
modelValue: e.modelValue,
|
|
154
170
|
value: e.examples,
|
|
155
171
|
"onUpdate:modelValue": g
|
|
156
|
-
}, null, 8, ["default", "modelValue", "value"])) : (
|
|
172
|
+
}, null, 8, ["default", "modelValue", "value"])) : (o(), i("div", X({
|
|
157
173
|
key: 4,
|
|
158
|
-
id:
|
|
174
|
+
id: F(N)
|
|
159
175
|
}, e.$attrs, {
|
|
160
176
|
ref_key: "codeMirrorRef",
|
|
161
177
|
ref: E,
|
|
@@ -164,40 +180,40 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
164
180
|
"flow-code-input--error": e.error
|
|
165
181
|
}],
|
|
166
182
|
onKeydown: [
|
|
167
|
-
l[0] || (l[0] = b(
|
|
183
|
+
l[0] || (l[0] = b(T((a) => m("down", a), ["stop"]), ["down"])),
|
|
168
184
|
l[1] || (l[1] = b((a) => m("enter", a), ["enter"])),
|
|
169
185
|
l[2] || (l[2] = b((a) => m("escape", a), ["escape"])),
|
|
170
|
-
l[3] || (l[3] = b(
|
|
186
|
+
l[3] || (l[3] = b(T((a) => m("up", a), ["stop"]), ["up"]))
|
|
171
187
|
]
|
|
172
188
|
}), [
|
|
173
|
-
e.disableTabIndent ? f("", !0) : (
|
|
189
|
+
e.disableTabIndent ? f("", !0) : (o(), i("div", ie, [...l[5] || (l[5] = [
|
|
174
190
|
V(" Press ", -1),
|
|
175
191
|
w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
176
192
|
V(" then ", -1),
|
|
177
193
|
w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
|
|
178
194
|
V(" to exit ", -1)
|
|
179
195
|
])]))
|
|
180
|
-
], 16,
|
|
181
|
-
e.$slots.warning ? (
|
|
196
|
+
], 16, re)),
|
|
197
|
+
e.$slots.warning ? (o(), i("div", ue, [
|
|
182
198
|
$(e.$slots, "warning", {}, void 0, !0)
|
|
183
199
|
])) : f("", !0),
|
|
184
|
-
e.$slots.icon ? (
|
|
200
|
+
e.$slots.icon ? (o(), i("div", de, [
|
|
185
201
|
$(e.$slots, "icon", {}, void 0, !0)
|
|
186
202
|
])) : f("", !0),
|
|
187
|
-
e.required ? (
|
|
188
|
-
U.value && e.environment ? (
|
|
203
|
+
e.required ? (o(), i("div", se, " Required ")) : f("", !0),
|
|
204
|
+
U.value && e.environment ? (o(), c(le, {
|
|
189
205
|
key: 8,
|
|
190
206
|
ref_key: "dropdownRef",
|
|
191
207
|
ref: v,
|
|
192
|
-
dropdownPosition:
|
|
208
|
+
dropdownPosition: D.value,
|
|
193
209
|
environment: e.environment,
|
|
194
|
-
query:
|
|
210
|
+
query: P.value,
|
|
195
211
|
onRedirect: l[4] || (l[4] = (a) => u("redirectToEnvironment")),
|
|
196
|
-
onSelect:
|
|
212
|
+
onSelect: F(K)
|
|
197
213
|
}, null, 8, ["dropdownPosition", "environment", "query", "onSelect"])) : f("", !0)
|
|
198
214
|
], 64));
|
|
199
215
|
}
|
|
200
216
|
});
|
|
201
217
|
export {
|
|
202
|
-
|
|
218
|
+
ve as default
|
|
203
219
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
modelValue: string | number;
|
|
2
|
+
modelValue: string | number | boolean;
|
|
3
3
|
value?: string[];
|
|
4
|
-
default?: string | number | undefined;
|
|
4
|
+
default?: string | number | boolean | undefined;
|
|
5
5
|
canAddCustomValue?: boolean;
|
|
6
6
|
type?: string | undefined;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IAC/C,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;AA2Z/B,wBAQG"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as T, computed as m, ref as
|
|
2
|
-
import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as
|
|
1
|
+
import { defineComponent as T, computed as m, ref as y, watch as k, nextTick as E, createElementBlock as f, openBlock as o, createBlock as v, withDirectives as K, unref as a, withCtx as n, createVNode as s, createElementVNode as i, toDisplayString as V, withKeys as M, vModelText as R, createCommentVNode as C, Fragment as _, renderList as U, normalizeClass as $ } from "vue";
|
|
2
|
+
import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as B, ScalarDropdownDivider as W } from "@scalar/components";
|
|
3
3
|
const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline" }, G = { class: "text-c-1 whitespace-nowrap" }, H = { class: "text-c-1 overflow-hidden text-ellipsis" }, J = { class: "overflow-hidden text-ellipsis" }, P = { class: "flex h-4 w-4 items-center justify-center" }, Z = /* @__PURE__ */ T({
|
|
4
4
|
__name: "DataTableInputSelect",
|
|
5
5
|
props: {
|
|
6
|
-
modelValue: {},
|
|
6
|
+
modelValue: { type: [String, Number, Boolean] },
|
|
7
7
|
value: {},
|
|
8
|
-
default: {},
|
|
8
|
+
default: { type: [String, Number, Boolean] },
|
|
9
9
|
canAddCustomValue: { type: Boolean, default: !0 },
|
|
10
10
|
type: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const u =
|
|
15
|
-
|
|
13
|
+
setup(D, { emit: z }) {
|
|
14
|
+
const u = D, c = z, p = m(() => u.value ?? []), d = y(!1), r = y(""), x = y(null);
|
|
15
|
+
k(r, (e) => {
|
|
16
16
|
c("update:modelValue", e);
|
|
17
17
|
});
|
|
18
18
|
const g = (e) => {
|
|
@@ -21,40 +21,40 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
|
|
|
21
21
|
r.value.trim() && g(r.value);
|
|
22
22
|
}, A = () => {
|
|
23
23
|
r.value.trim() || c("update:modelValue", ""), d.value = !1;
|
|
24
|
-
},
|
|
25
|
-
|
|
24
|
+
}, N = (e) => u.modelValue.toString() === e;
|
|
25
|
+
k(d, (e) => {
|
|
26
26
|
e && E(() => {
|
|
27
27
|
x.value?.focus();
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const S = m(() => u.modelValue !== void 0 ? u.modelValue : u.default), w = m(() => {
|
|
31
31
|
const e = new Set(u.modelValue.toString().split(", "));
|
|
32
|
-
return p.value.filter((
|
|
33
|
-
}),
|
|
32
|
+
return p.value.filter((t) => e.has(t)).map((t) => ({ id: t, label: t, value: t }));
|
|
33
|
+
}), I = m(
|
|
34
34
|
() => p.value.map((e) => ({ id: e, label: e, value: e }))
|
|
35
35
|
), O = (e) => {
|
|
36
|
-
const
|
|
37
|
-
c("update:modelValue",
|
|
36
|
+
const t = e.map((l) => l.value);
|
|
37
|
+
c("update:modelValue", t.join(", "));
|
|
38
38
|
};
|
|
39
|
-
return (e,
|
|
39
|
+
return (e, t) => (o(), f("div", q, [
|
|
40
40
|
e.type === "array" ? (o(), v(a(F), {
|
|
41
41
|
key: 0,
|
|
42
42
|
modelValue: w.value,
|
|
43
|
-
options:
|
|
43
|
+
options: I.value,
|
|
44
44
|
"onUpdate:modelValue": O
|
|
45
45
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
46
|
+
default: n(() => [
|
|
47
|
+
s(a(b), {
|
|
48
48
|
class: "custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none",
|
|
49
49
|
fullWidth: "",
|
|
50
50
|
variant: "ghost"
|
|
51
51
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
i("span", G,
|
|
54
|
-
|
|
52
|
+
default: n(() => [
|
|
53
|
+
i("span", G, V(w.value.length > 0 ? w.value.map((l) => l.label).join(", ") : "Select a value"), 1),
|
|
54
|
+
s(a(h), {
|
|
55
|
+
class: "min-w-4",
|
|
55
56
|
icon: "ChevronDown",
|
|
56
|
-
size: "md"
|
|
57
|
-
class: "min-w-4"
|
|
57
|
+
size: "md"
|
|
58
58
|
})
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
@@ -65,7 +65,7 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
|
|
|
65
65
|
key: 1,
|
|
66
66
|
ref_key: "inputRef",
|
|
67
67
|
ref: x,
|
|
68
|
-
"onUpdate:modelValue":
|
|
68
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => r.value = l),
|
|
69
69
|
class: "text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none",
|
|
70
70
|
placeholder: "Value",
|
|
71
71
|
type: "text",
|
|
@@ -76,59 +76,59 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
|
|
|
76
76
|
]) : (o(), v(a(L), {
|
|
77
77
|
key: 2,
|
|
78
78
|
resize: "",
|
|
79
|
-
value:
|
|
79
|
+
value: S.value
|
|
80
80
|
}, {
|
|
81
|
-
items:
|
|
82
|
-
(o(!0), f(_, null, U(p.value, (
|
|
83
|
-
key:
|
|
81
|
+
items: n(() => [
|
|
82
|
+
(o(!0), f(_, null, U(p.value, (l) => (o(), v(a(B), {
|
|
83
|
+
key: l,
|
|
84
84
|
class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
85
|
-
value:
|
|
86
|
-
onClick: (Q) => g(
|
|
85
|
+
value: l,
|
|
86
|
+
onClick: (Q) => g(l)
|
|
87
87
|
}, {
|
|
88
|
-
default:
|
|
88
|
+
default: n(() => [
|
|
89
89
|
i("div", {
|
|
90
90
|
class: $([
|
|
91
91
|
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
92
|
-
|
|
92
|
+
N(l) ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
|
|
93
93
|
])
|
|
94
94
|
}, [
|
|
95
|
-
|
|
95
|
+
s(a(h), {
|
|
96
96
|
class: "size-2.5",
|
|
97
97
|
icon: "Checkmark",
|
|
98
98
|
thickness: "3"
|
|
99
99
|
})
|
|
100
100
|
], 2),
|
|
101
|
-
i("span", J,
|
|
101
|
+
i("span", J, V(l), 1)
|
|
102
102
|
]),
|
|
103
103
|
_: 2
|
|
104
104
|
}, 1032, ["value", "onClick"]))), 128)),
|
|
105
105
|
e.canAddCustomValue ? (o(), f(_, { key: 0 }, [
|
|
106
106
|
p.value.length ? (o(), v(a(W), { key: 0 })) : C("", !0),
|
|
107
|
-
|
|
107
|
+
s(a(B), {
|
|
108
108
|
class: "flex items-center gap-1.5",
|
|
109
|
-
onClick:
|
|
109
|
+
onClick: t[1] || (t[1] = (l) => d.value = !0)
|
|
110
110
|
}, {
|
|
111
|
-
default:
|
|
111
|
+
default: n(() => [
|
|
112
112
|
i("div", P, [
|
|
113
|
-
|
|
113
|
+
s(a(h), {
|
|
114
114
|
icon: "Add",
|
|
115
115
|
size: "sm"
|
|
116
116
|
})
|
|
117
117
|
]),
|
|
118
|
-
|
|
118
|
+
t[2] || (t[2] = i("span", null, "Add value", -1))
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
121
|
})
|
|
122
122
|
], 64)) : C("", !0)
|
|
123
123
|
]),
|
|
124
|
-
default:
|
|
125
|
-
|
|
124
|
+
default: n(() => [
|
|
125
|
+
s(a(b), {
|
|
126
126
|
class: "size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none",
|
|
127
127
|
variant: "ghost"
|
|
128
128
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
i("span", H,
|
|
131
|
-
|
|
129
|
+
default: n(() => [
|
|
130
|
+
i("span", H, V(S.value ?? "Select a value"), 1),
|
|
131
|
+
s(a(h), {
|
|
132
132
|
icon: "ChevronDown",
|
|
133
133
|
size: "md"
|
|
134
134
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/resize/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/resize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { type DraggingItem, type HoveredItem, type SidebarState } from '@scalar/
|
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
4
4
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
5
|
-
import type { Workspace } from '../../../v2/hooks/use-workspace-selector.js';
|
|
5
|
+
import type { Workspace } from '../../../v2/features/app/hooks/use-workspace-selector.js';
|
|
6
6
|
import type { ClientLayout } from '../../../v2/types/layout';
|
|
7
7
|
type __VLS_Props = {
|
|
8
8
|
/** All documents to display sidebar items for */
|
|
@@ -27,17 +27,22 @@ type __VLS_Props = {
|
|
|
27
27
|
type __VLS_Slots = {
|
|
28
28
|
/** Slot to add the workspace button */
|
|
29
29
|
workspaceButton?(): unknown;
|
|
30
|
+
/** Slot to add additional content to the decorator */
|
|
31
|
+
decorator?(props: {
|
|
32
|
+
item: TraversedEntry;
|
|
33
|
+
}): unknown;
|
|
30
34
|
/** Slot to add additional content to the footer */
|
|
31
35
|
footer?(): unknown;
|
|
36
|
+
/** Slot to add additional content to the empty folder */
|
|
37
|
+
empty?(props: {
|
|
38
|
+
item: TraversedEntry;
|
|
39
|
+
}): unknown;
|
|
32
40
|
};
|
|
33
41
|
type __VLS_PublicProps = __VLS_Props & {
|
|
34
|
-
/** Controls the visibility of the sidebar */
|
|
35
|
-
'isSidebarOpen': boolean;
|
|
36
42
|
/** Controls the width of the sidebar */
|
|
37
43
|
'sidebarWidth': number;
|
|
38
44
|
};
|
|
39
45
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
-
"update:isSidebarOpen": (value: boolean) => any;
|
|
41
46
|
"update:sidebarWidth": (value: number) => any;
|
|
42
47
|
} & {
|
|
43
48
|
"create:workspace": () => any;
|
|
@@ -49,7 +54,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
49
54
|
"onSelect:workspace"?: ((id?: string | undefined) => any) | undefined;
|
|
50
55
|
onSelectItem?: ((id: string) => any) | undefined;
|
|
51
56
|
onReorder?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
|
|
52
|
-
"onUpdate:isSidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
53
57
|
"onUpdate:sidebarWidth"?: ((value: number) => any) | undefined;
|
|
54
58
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
59
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAyJA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAIhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,qCAAqC;IACrC,eAAe,EAAE,SAAS,CAAA;IAC1B,2CAA2C;IAC3C,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,kEAAkE;IAClE,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAeF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,sDAAsD;IACtD,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IACpD,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;CACjD,CAAC;AAiBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAqNF,QAAA,MAAM,eAAe;;;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|