@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
|
@@ -23,6 +23,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
workspaceStore: WorkspaceStore;
|
|
24
24
|
/** Event bus for emitting operation creation events */
|
|
25
25
|
eventBus: WorkspaceEventBus;
|
|
26
|
+
/** Preselected document id to create the request in */
|
|
27
|
+
documentId?: string;
|
|
28
|
+
/** Preselected tag id to add the request to (optional) */
|
|
29
|
+
tagId?: string;
|
|
26
30
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
31
|
close: () => any;
|
|
28
32
|
back: (keyboardEvent: KeyboardEvent) => any;
|
|
@@ -31,6 +35,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
35
|
workspaceStore: WorkspaceStore;
|
|
32
36
|
/** Event bus for emitting operation creation events */
|
|
33
37
|
eventBus: WorkspaceEventBus;
|
|
38
|
+
/** Preselected document id to create the request in */
|
|
39
|
+
documentId?: string;
|
|
40
|
+
/** Preselected tag id to add the request to (optional) */
|
|
41
|
+
tagId?: string;
|
|
34
42
|
}> & Readonly<{
|
|
35
43
|
onClose?: (() => any) | undefined;
|
|
36
44
|
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteRequest.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteRequest.vue"],"names":[],"mappings":"AA8WA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAUvE;;;;;;;;;;;;;;;;;GAiBG;;IAGD,iEAAiE;oBACjD,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,uDAAuD;iBAC1C,MAAM;IACnB,0DAA0D;YAClD,MAAM;;;;;IAPd,iEAAiE;oBACjD,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,uDAAuD;iBAC1C,MAAM;IACnB,0DAA0D;YAClD,MAAM;;;;;AAThB,wBAmkBC"}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { HTTP_METHODS as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as U, ref as p, computed as v, watch as O, createBlock as h, openBlock as m, withCtx as o, createVNode as s, createTextVNode as H, createElementVNode as r, unref as n, normalizeClass as T, toDisplayString as w, createCommentVNode as L, createElementBlock as V, Fragment as _, renderList as I } from "vue";
|
|
2
|
+
import { ScalarListbox as W, ScalarButton as k, ScalarIcon as S, ScalarDropdown as y, ScalarDropdownItem as z } from "@scalar/components";
|
|
3
|
+
import { HTTP_METHODS as F } from "@scalar/helpers/http/http-methods";
|
|
4
|
+
import { useRouter as A } from "vue-router";
|
|
5
|
+
import B from "../../../blocks/operation-code-sample/components/HttpMethod.vue.js";
|
|
6
|
+
import G from "./CommandActionForm.vue.js";
|
|
7
|
+
import J from "./CommandActionInput.vue.js";
|
|
8
|
+
const K = { class: "flex flex-1 gap-1" }, Q = { class: "flex items-center gap-2" }, X = { class: "custom-scroll max-h-40" }, Y = { class: "custom-scroll max-h-40" }, Z = { class: "truncate" }, ee = {
|
|
9
9
|
name: "CommandPaletteRequest"
|
|
10
|
-
},
|
|
11
|
-
...
|
|
10
|
+
}, ce = /* @__PURE__ */ U({
|
|
11
|
+
...ee,
|
|
12
12
|
props: {
|
|
13
13
|
workspaceStore: {},
|
|
14
|
-
eventBus: {}
|
|
14
|
+
eventBus: {},
|
|
15
|
+
documentId: {},
|
|
16
|
+
tagId: {}
|
|
15
17
|
},
|
|
16
18
|
emits: ["close", "back"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
() => Object.entries(
|
|
19
|
+
setup(u, { emit: N }) {
|
|
20
|
+
const g = N, $ = A(), b = p("/"), c = v(() => b.value.trim()), x = v(
|
|
21
|
+
() => Object.entries(u.workspaceStore.workspace.documents).map(
|
|
20
22
|
([e, a]) => ({
|
|
21
23
|
id: e,
|
|
22
24
|
label: a.info.title || e
|
|
23
25
|
})
|
|
24
26
|
)
|
|
25
|
-
),
|
|
27
|
+
), C = F.map((e) => ({
|
|
26
28
|
id: e,
|
|
27
29
|
label: e.toUpperCase(),
|
|
28
30
|
method: e
|
|
29
31
|
})), t = p(
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
|
|
33
|
-
),
|
|
32
|
+
u.documentId ? x.value.find((e) => e.id === u.documentId) : x.value[0] ?? void 0
|
|
33
|
+
), i = p(
|
|
34
|
+
C.find((e) => e.method === "get")
|
|
35
|
+
), f = v(() => {
|
|
34
36
|
if (!t.value)
|
|
35
37
|
return [];
|
|
36
|
-
const e =
|
|
38
|
+
const e = u.workspaceStore.workspace.documents[t.value.id];
|
|
37
39
|
return e ? [
|
|
38
40
|
{ id: "", label: "No Tag" },
|
|
39
41
|
...e.tags?.map((a) => ({
|
|
@@ -41,63 +43,69 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
41
43
|
label: a.name
|
|
42
44
|
})) ?? []
|
|
43
45
|
] : [];
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
+
}), d = p(
|
|
47
|
+
u.tagId ? f.value.find((e) => e.id === u.tagId) : void 0
|
|
48
|
+
);
|
|
49
|
+
O(t, () => {
|
|
50
|
+
d.value = f.value.find((e) => e.id === "");
|
|
51
|
+
});
|
|
52
|
+
const P = v(() => {
|
|
53
|
+
if (!t.value || !i.value || !c.value)
|
|
46
54
|
return !1;
|
|
47
|
-
const e =
|
|
48
|
-
return !!e?.paths?.[a]?.[
|
|
49
|
-
}),
|
|
50
|
-
e && (
|
|
51
|
-
},
|
|
55
|
+
const e = u.workspaceStore.workspace.documents[t.value.id], a = c.value.startsWith("/") ? c.value : `/${c.value}`;
|
|
56
|
+
return !!e?.paths?.[a]?.[i.value.method];
|
|
57
|
+
}), D = v(() => !!(!c.value || !t.value || !i.value || P.value)), j = (e) => {
|
|
58
|
+
e && (i.value = e);
|
|
59
|
+
}, q = (e) => {
|
|
52
60
|
e && (d.value = e);
|
|
53
|
-
},
|
|
54
|
-
|
|
61
|
+
}, E = () => {
|
|
62
|
+
D.value || !t.value || !i.value || !u.workspaceStore.workspace.documents[t.value.id] || (u.eventBus.emit("operation:create:operation", {
|
|
55
63
|
documentName: t.value.id,
|
|
56
|
-
path:
|
|
57
|
-
method:
|
|
64
|
+
path: c.value,
|
|
65
|
+
method: i.value.method,
|
|
58
66
|
operation: {
|
|
59
67
|
tags: d.value?.id ? [d.value.id] : void 0
|
|
60
68
|
},
|
|
61
69
|
callback: (a) => {
|
|
62
70
|
if (a) {
|
|
63
|
-
|
|
64
|
-
const l =
|
|
65
|
-
|
|
71
|
+
u.workspaceStore.buildSidebar(t.value?.id ?? "");
|
|
72
|
+
const l = c.value.startsWith("/") ? c.value : `/${c.value}`;
|
|
73
|
+
$.push({
|
|
66
74
|
name: "example",
|
|
67
75
|
params: {
|
|
68
76
|
documentSlug: t.value?.id,
|
|
69
77
|
pathEncoded: encodeURIComponent(l),
|
|
70
|
-
method:
|
|
78
|
+
method: i.value?.method,
|
|
71
79
|
exampleName: "default"
|
|
72
80
|
}
|
|
73
81
|
});
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
|
|
84
|
+
}), g("close"));
|
|
85
|
+
}, R = (e) => {
|
|
86
|
+
g("back", e);
|
|
79
87
|
};
|
|
80
|
-
return (e, a) => (m(),
|
|
81
|
-
disabled:
|
|
82
|
-
onSubmit:
|
|
88
|
+
return (e, a) => (m(), h(G, {
|
|
89
|
+
disabled: D.value,
|
|
90
|
+
onSubmit: E
|
|
83
91
|
}, {
|
|
84
92
|
options: o(() => [
|
|
85
|
-
r("div",
|
|
86
|
-
n(
|
|
93
|
+
r("div", K, [
|
|
94
|
+
s(n(W), {
|
|
87
95
|
modelValue: t.value,
|
|
88
96
|
"onUpdate:modelValue": a[1] || (a[1] = (l) => t.value = l),
|
|
89
|
-
options:
|
|
97
|
+
options: x.value
|
|
90
98
|
}, {
|
|
91
99
|
default: o(() => [
|
|
92
|
-
n(
|
|
100
|
+
s(n(k), {
|
|
93
101
|
class: "hover:bg-b-2 max-h-8 w-[150px] min-w-[150px] justify-between gap-1 p-2 text-xs",
|
|
94
102
|
variant: "outlined"
|
|
95
103
|
}, {
|
|
96
104
|
default: o(() => [
|
|
97
105
|
r("span", {
|
|
98
|
-
class:
|
|
99
|
-
},
|
|
100
|
-
n(
|
|
106
|
+
class: T(t.value ? "text-c-1 truncate" : "text-c-3")
|
|
107
|
+
}, w(t.value ? t.value.label : "Select Document"), 3),
|
|
108
|
+
s(n(S), {
|
|
101
109
|
class: "text-c-3",
|
|
102
110
|
icon: "ChevronDown",
|
|
103
111
|
size: "md"
|
|
@@ -108,19 +116,19 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
108
116
|
]),
|
|
109
117
|
_: 1
|
|
110
118
|
}, 8, ["modelValue", "options"]),
|
|
111
|
-
n(
|
|
119
|
+
s(n(y), {
|
|
112
120
|
placement: "bottom",
|
|
113
121
|
resize: ""
|
|
114
122
|
}, {
|
|
115
123
|
items: o(() => [
|
|
116
|
-
r("div",
|
|
117
|
-
(m(!0),
|
|
124
|
+
r("div", X, [
|
|
125
|
+
(m(!0), V(_, null, I(n(C), (l) => (m(), h(n(z), {
|
|
118
126
|
key: l.id,
|
|
119
127
|
class: "flex h-7 w-full items-center justify-center px-1",
|
|
120
|
-
onClick: (
|
|
128
|
+
onClick: (M) => j(l)
|
|
121
129
|
}, {
|
|
122
130
|
default: o(() => [
|
|
123
|
-
|
|
131
|
+
s(B, {
|
|
124
132
|
method: l.method
|
|
125
133
|
}, null, 8, ["method"])
|
|
126
134
|
]),
|
|
@@ -129,17 +137,17 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
129
137
|
])
|
|
130
138
|
]),
|
|
131
139
|
default: o(() => [
|
|
132
|
-
n(
|
|
140
|
+
s(n(k), {
|
|
133
141
|
class: "hover:bg-b-2 max-h-8 w-[100px] min-w-[100px] justify-between gap-1 p-2 text-xs",
|
|
134
142
|
variant: "outlined"
|
|
135
143
|
}, {
|
|
136
144
|
default: o(() => [
|
|
137
|
-
r("div",
|
|
138
|
-
|
|
145
|
+
r("div", Q, [
|
|
146
|
+
i.value ? (m(), h(B, {
|
|
139
147
|
key: 0,
|
|
140
|
-
method:
|
|
141
|
-
}, null, 8, ["method"])) :
|
|
142
|
-
n(
|
|
148
|
+
method: i.value.method
|
|
149
|
+
}, null, 8, ["method"])) : L("", !0),
|
|
150
|
+
s(n(S), {
|
|
143
151
|
class: "text-c-3",
|
|
144
152
|
icon: "ChevronDown",
|
|
145
153
|
size: "md"
|
|
@@ -151,35 +159,35 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
151
159
|
]),
|
|
152
160
|
_: 1
|
|
153
161
|
}),
|
|
154
|
-
n(
|
|
162
|
+
s(n(y), {
|
|
155
163
|
placement: "bottom",
|
|
156
164
|
resize: ""
|
|
157
165
|
}, {
|
|
158
166
|
items: o(() => [
|
|
159
|
-
r("div",
|
|
160
|
-
(m(!0),
|
|
167
|
+
r("div", Y, [
|
|
168
|
+
(m(!0), V(_, null, I(f.value, (l) => (m(), h(n(z), {
|
|
161
169
|
key: l.id,
|
|
162
170
|
class: "flex h-7 w-full items-center px-1",
|
|
163
|
-
onClick: (
|
|
171
|
+
onClick: (M) => q(l)
|
|
164
172
|
}, {
|
|
165
173
|
default: o(() => [
|
|
166
|
-
r("span",
|
|
174
|
+
r("span", Z, w(l.label), 1)
|
|
167
175
|
]),
|
|
168
176
|
_: 2
|
|
169
177
|
}, 1032, ["onClick"]))), 128))
|
|
170
178
|
])
|
|
171
179
|
]),
|
|
172
180
|
default: o(() => [
|
|
173
|
-
n(
|
|
181
|
+
s(n(k), {
|
|
174
182
|
class: "hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
|
|
175
|
-
disabled: !
|
|
183
|
+
disabled: !f.value.length,
|
|
176
184
|
variant: "outlined"
|
|
177
185
|
}, {
|
|
178
186
|
default: o(() => [
|
|
179
187
|
r("span", {
|
|
180
|
-
class:
|
|
181
|
-
},
|
|
182
|
-
n(
|
|
188
|
+
class: T(d.value ? "text-c-1 truncate" : "text-c-3")
|
|
189
|
+
}, w(d.value ? d.value.label : "Select Tag (Optional)"), 3),
|
|
190
|
+
s(n(S), {
|
|
183
191
|
class: "text-c-3",
|
|
184
192
|
icon: "ChevronDown",
|
|
185
193
|
size: "md"
|
|
@@ -193,15 +201,15 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
193
201
|
])
|
|
194
202
|
]),
|
|
195
203
|
submit: o(() => [...a[2] || (a[2] = [
|
|
196
|
-
|
|
204
|
+
H("Create Request", -1)
|
|
197
205
|
])]),
|
|
198
206
|
default: o(() => [
|
|
199
|
-
|
|
200
|
-
modelValue:
|
|
201
|
-
"onUpdate:modelValue": a[0] || (a[0] = (l) =>
|
|
207
|
+
s(J, {
|
|
208
|
+
modelValue: b.value,
|
|
209
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => b.value = l),
|
|
202
210
|
label: "Request Path",
|
|
203
211
|
placeholder: "/users",
|
|
204
|
-
onDelete:
|
|
212
|
+
onDelete: R
|
|
205
213
|
}, null, 8, ["modelValue"])
|
|
206
214
|
]),
|
|
207
215
|
_: 1
|
|
@@ -209,5 +217,5 @@ const J = { class: "flex flex-1 gap-1" }, K = { class: "flex items-center gap-2"
|
|
|
209
217
|
}
|
|
210
218
|
});
|
|
211
219
|
export {
|
|
212
|
-
|
|
220
|
+
ce as default
|
|
213
221
|
};
|
|
@@ -22,6 +22,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
workspaceStore: WorkspaceStore;
|
|
23
23
|
/** Event bus for emitting tag creation events */
|
|
24
24
|
eventBus: WorkspaceEventBus;
|
|
25
|
+
/** Preselected document id to create the tag in */
|
|
26
|
+
documentId?: string;
|
|
25
27
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
26
28
|
close: () => any;
|
|
27
29
|
back: (keyboardEvent: KeyboardEvent) => any;
|
|
@@ -30,6 +32,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
32
|
workspaceStore: WorkspaceStore;
|
|
31
33
|
/** Event bus for emitting tag creation events */
|
|
32
34
|
eventBus: WorkspaceEventBus;
|
|
35
|
+
/** Preselected document id to create the tag in */
|
|
36
|
+
documentId?: string;
|
|
33
37
|
}> & Readonly<{
|
|
34
38
|
onClose?: (() => any) | undefined;
|
|
35
39
|
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteTag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteTag.vue"],"names":[],"mappings":"AA2JA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAOvE;;;;;;;;;;;;;;;;GAgBG;;IAGD,2DAA2D;oBAC3C,cAAc;IAC9B,iDAAiD;cACvC,iBAAiB;IAC3B,mDAAmD;iBACtC,MAAM;;;;;IALnB,2DAA2D;oBAC3C,cAAc;IAC9B,iDAAiD;cACvC,iBAAiB;IAC3B,mDAAmD;iBACtC,MAAM;;;;;AAPrB,wBA6OC"}
|
|
@@ -1,62 +1,60 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as f, computed as i, createBlock as k, openBlock as S, withCtx as l, createVNode as n, createTextVNode as w, unref as c, createElementVNode as V, normalizeClass as C, toDisplayString as B } from "vue";
|
|
2
2
|
import { ScalarListbox as D, ScalarButton as N, ScalarIcon as T } from "@scalar/components";
|
|
3
|
-
import
|
|
3
|
+
import I from "./CommandActionForm.vue.js";
|
|
4
4
|
import h from "./CommandActionInput.vue.js";
|
|
5
5
|
const j = {
|
|
6
6
|
name: "CommandPaletteTag"
|
|
7
|
-
}, E = /* @__PURE__ */
|
|
7
|
+
}, E = /* @__PURE__ */ g({
|
|
8
8
|
...j,
|
|
9
9
|
props: {
|
|
10
10
|
workspaceStore: {},
|
|
11
|
-
eventBus: {}
|
|
11
|
+
eventBus: {},
|
|
12
|
+
documentId: {}
|
|
12
13
|
},
|
|
13
14
|
emits: ["close", "back"],
|
|
14
15
|
setup(o, { emit: p }) {
|
|
15
|
-
const
|
|
16
|
+
const d = p, u = f(""), m = i(() => u.value.trim()), s = i(
|
|
16
17
|
() => Object.entries(o.workspaceStore.workspace.documents).map(
|
|
17
|
-
([
|
|
18
|
-
id:
|
|
19
|
-
label:
|
|
18
|
+
([e, t]) => ({
|
|
19
|
+
id: e,
|
|
20
|
+
label: t.info.title || e
|
|
20
21
|
})
|
|
21
22
|
)
|
|
22
|
-
),
|
|
23
|
-
|
|
23
|
+
), a = f(
|
|
24
|
+
o.documentId ? s.value.find((e) => e.id === o.documentId) : s.value[0] ?? void 0
|
|
24
25
|
), v = i(() => {
|
|
25
|
-
if (!
|
|
26
|
+
if (!m.value || !a.value)
|
|
26
27
|
return !0;
|
|
27
|
-
const
|
|
28
|
-
return !!(!
|
|
28
|
+
const e = o.workspaceStore.workspace.documents[a.value.id];
|
|
29
|
+
return !!(!e || e.tags?.some((t) => t.name === m.value));
|
|
29
30
|
}), b = () => {
|
|
30
|
-
v.value || !
|
|
31
|
-
name:
|
|
32
|
-
documentName:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}), c("close"));
|
|
37
|
-
}, k = (t) => {
|
|
38
|
-
c("back", t);
|
|
31
|
+
v.value || !a.value || (o.eventBus.emit("tag:create:tag", {
|
|
32
|
+
name: m.value,
|
|
33
|
+
documentName: a.value.id
|
|
34
|
+
}), d("close"));
|
|
35
|
+
}, x = (e) => {
|
|
36
|
+
d("back", e);
|
|
39
37
|
};
|
|
40
|
-
return (
|
|
38
|
+
return (e, t) => (S(), k(I, {
|
|
41
39
|
disabled: v.value,
|
|
42
40
|
onSubmit: b
|
|
43
41
|
}, {
|
|
44
42
|
options: l(() => [
|
|
45
|
-
n(
|
|
46
|
-
modelValue:
|
|
47
|
-
"onUpdate:modelValue":
|
|
48
|
-
options:
|
|
43
|
+
n(c(D), {
|
|
44
|
+
modelValue: a.value,
|
|
45
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => a.value = r),
|
|
46
|
+
options: s.value
|
|
49
47
|
}, {
|
|
50
48
|
default: l(() => [
|
|
51
|
-
n(
|
|
49
|
+
n(c(N), {
|
|
52
50
|
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
53
51
|
variant: "outlined"
|
|
54
52
|
}, {
|
|
55
53
|
default: l(() => [
|
|
56
54
|
V("span", {
|
|
57
|
-
class: C(
|
|
58
|
-
}, B(
|
|
59
|
-
n(
|
|
55
|
+
class: C(a.value ? "text-c-1" : "text-c-3")
|
|
56
|
+
}, B(a.value ? a.value.label : "Select Collection"), 3),
|
|
57
|
+
n(c(T), {
|
|
60
58
|
class: "text-c-3",
|
|
61
59
|
icon: "ChevronDown",
|
|
62
60
|
size: "md"
|
|
@@ -68,16 +66,16 @@ const j = {
|
|
|
68
66
|
_: 1
|
|
69
67
|
}, 8, ["modelValue", "options"])
|
|
70
68
|
]),
|
|
71
|
-
submit: l(() => [...
|
|
69
|
+
submit: l(() => [...t[2] || (t[2] = [
|
|
72
70
|
w("Create Tag", -1)
|
|
73
71
|
])]),
|
|
74
72
|
default: l(() => [
|
|
75
73
|
n(h, {
|
|
76
74
|
modelValue: u.value,
|
|
77
|
-
"onUpdate:modelValue":
|
|
75
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
|
|
78
76
|
label: "Tag Name",
|
|
79
77
|
placeholder: "Tag Name",
|
|
80
|
-
onDelete:
|
|
78
|
+
onDelete: x
|
|
81
79
|
}, null, 8, ["modelValue"])
|
|
82
80
|
]),
|
|
83
81
|
_: 1
|
|
@@ -60,16 +60,32 @@ export declare const commands: [{
|
|
|
60
60
|
readonly id: "add-tag";
|
|
61
61
|
readonly name: "Add Tag";
|
|
62
62
|
readonly icon: "Folder";
|
|
63
|
+
readonly props: {
|
|
64
|
+
/** Document id to add the tag to */
|
|
65
|
+
documentId?: string;
|
|
66
|
+
};
|
|
63
67
|
}, {
|
|
64
68
|
readonly type: "folder";
|
|
65
69
|
readonly id: "create-request";
|
|
66
70
|
readonly name: "Create Request";
|
|
67
71
|
readonly icon: "ExternalLink";
|
|
72
|
+
readonly props: {
|
|
73
|
+
/** The id of the document to create the request in */
|
|
74
|
+
documentId?: string;
|
|
75
|
+
/** Tag id to add the request to (optional) */
|
|
76
|
+
tagId?: string;
|
|
77
|
+
};
|
|
68
78
|
}, {
|
|
69
79
|
readonly type: "folder";
|
|
70
80
|
readonly id: "add-example";
|
|
71
81
|
readonly name: "Add Example";
|
|
72
82
|
readonly icon: "Example";
|
|
83
|
+
readonly props: {
|
|
84
|
+
/** Document id to add the example to */
|
|
85
|
+
documentId?: string;
|
|
86
|
+
/** Operation id to add the example to */
|
|
87
|
+
operationId?: string;
|
|
88
|
+
};
|
|
73
89
|
}, {
|
|
74
90
|
readonly type: "hidden-folder";
|
|
75
91
|
readonly id: "import-curl-command";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAiB,MAAM,KAAK,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQlD,6DAA6D;AAC7D,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,aAAa,GAAG,WAAW,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,KAAK,mBAAmB,GAAG,WAAW,GAAG;IACvC,IAAI,EAAE,eAAe,CAAA;IACrB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,KAAK,YAAY,GAAG,WAAW,GAAG;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,gBAAgB,CAAA;IACpB,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,YAAY,GAAG,mBAAmB,CAAA;AAExE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,qCAAqC;IACrC,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useModal as
|
|
2
|
-
import { ref as
|
|
3
|
-
const
|
|
1
|
+
import { useModal as g } from "@scalar/components";
|
|
2
|
+
import { ref as s, computed as c } from "vue";
|
|
3
|
+
const n = () => null, v = [
|
|
4
4
|
{
|
|
5
5
|
label: "",
|
|
6
6
|
commands: [
|
|
@@ -20,26 +20,29 @@ const g = () => null, v = [
|
|
|
20
20
|
type: "folder",
|
|
21
21
|
id: "add-tag",
|
|
22
22
|
name: "Add Tag",
|
|
23
|
-
icon: "Folder"
|
|
23
|
+
icon: "Folder",
|
|
24
|
+
props: n()
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
type: "folder",
|
|
27
28
|
id: "create-request",
|
|
28
29
|
name: "Create Request",
|
|
29
|
-
icon: "ExternalLink"
|
|
30
|
+
icon: "ExternalLink",
|
|
31
|
+
props: n()
|
|
30
32
|
},
|
|
31
33
|
{
|
|
32
34
|
type: "folder",
|
|
33
35
|
id: "add-example",
|
|
34
36
|
name: "Add Example",
|
|
35
|
-
icon: "Example"
|
|
37
|
+
icon: "Example",
|
|
38
|
+
props: n()
|
|
36
39
|
},
|
|
37
40
|
/** Hidden commands accessible programmatically but not shown in UI */
|
|
38
41
|
{
|
|
39
42
|
type: "hidden-folder",
|
|
40
43
|
id: "import-curl-command",
|
|
41
44
|
name: "Import cURL Command",
|
|
42
|
-
props:
|
|
45
|
+
props: n()
|
|
43
46
|
}
|
|
44
47
|
]
|
|
45
48
|
},
|
|
@@ -76,30 +79,30 @@ const g = () => null, v = [
|
|
|
76
79
|
]
|
|
77
80
|
}
|
|
78
81
|
], w = () => {
|
|
79
|
-
const
|
|
82
|
+
const r = g(), t = s(""), a = s(null), m = s(null), d = c(() => r.open), p = c(() => {
|
|
80
83
|
const e = t.value.toLowerCase().trim();
|
|
81
84
|
return v.map((o) => ({
|
|
82
85
|
label: o.label,
|
|
83
|
-
commands: o.commands.filter((
|
|
86
|
+
commands: o.commands.filter((i) => i.type === "hidden-folder" ? !1 : e ? i.name.toLowerCase().includes(e) : !0)
|
|
84
87
|
})).filter((o) => o.commands.length > 0);
|
|
85
|
-
}),
|
|
86
|
-
e && (a.value = e,
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
88
|
+
}), u = (e, ...o) => {
|
|
89
|
+
e && (a.value = e, m.value = o[0] ?? null), r.show();
|
|
90
|
+
}, f = () => {
|
|
91
|
+
r.hide(), l();
|
|
92
|
+
}, y = (e) => {
|
|
90
93
|
t.value = e;
|
|
91
94
|
}, l = () => {
|
|
92
|
-
t.value = "", a.value = null,
|
|
95
|
+
t.value = "", a.value = null, m.value = null;
|
|
93
96
|
};
|
|
94
97
|
return {
|
|
95
|
-
isOpen:
|
|
98
|
+
isOpen: d,
|
|
96
99
|
activeCommand: a,
|
|
97
|
-
activeCommandProps:
|
|
100
|
+
activeCommandProps: m,
|
|
98
101
|
filterQuery: t,
|
|
99
|
-
filteredCommands:
|
|
100
|
-
open:
|
|
101
|
-
close:
|
|
102
|
-
setFilterQuery:
|
|
102
|
+
filteredCommands: p,
|
|
103
|
+
open: u,
|
|
104
|
+
close: f,
|
|
105
|
+
setFilterQuery: y,
|
|
103
106
|
reset: l
|
|
104
107
|
};
|
|
105
108
|
};
|
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components';
|
|
2
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
|
+
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
5
|
+
import { type ComputedRef } from 'vue';
|
|
6
|
+
import { type UseModalSidebarReturn } from '../../../v2/features/modal/hooks/use-modal-sidebar.js';
|
|
7
|
+
import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
3
8
|
export type ModalProps = {
|
|
9
|
+
/** The workspace store must be initialized and passed in */
|
|
4
10
|
workspaceStore: WorkspaceStore;
|
|
11
|
+
/** The document must be initialized and passed in */
|
|
12
|
+
document: ComputedRef<WorkspaceDocument | null>;
|
|
13
|
+
/** The path must be initialized and passed in */
|
|
14
|
+
path: ComputedRef<string | undefined>;
|
|
15
|
+
/** The method must be initialized and passed in */
|
|
16
|
+
method: ComputedRef<HttpMethod | undefined>;
|
|
17
|
+
/** The example name must be initialized and passed in */
|
|
18
|
+
exampleName: ComputedRef<string | undefined>;
|
|
19
|
+
/** Controls the visibility of the modal */
|
|
5
20
|
modalState: ModalState;
|
|
21
|
+
/** The sidebar state must be initialized and passed in */
|
|
22
|
+
sidebarState: UseModalSidebarReturn;
|
|
23
|
+
/** Api client plugins to include in the modal */
|
|
24
|
+
plugins?: ClientPlugin[];
|
|
6
25
|
};
|
|
7
26
|
/**
|
|
8
27
|
* Scalar Api Client Modal
|
|
9
28
|
*
|
|
10
29
|
* This component is used to render the API Client Modal
|
|
11
30
|
*/
|
|
12
|
-
declare const _default: import("vue").DefineComponent<ModalProps, {
|
|
31
|
+
declare const _default: import("vue").DefineComponent<ModalProps, {
|
|
32
|
+
sidebarWidth: ComputedRef<number>;
|
|
33
|
+
environment: ComputedRef<import("@scalar/workspace-store/schemas/extensions/document/x-scalar-environments").XScalarEnvironment>;
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
35
|
export default _default;
|
|
14
36
|
//# sourceMappingURL=Modal.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AAyXA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAExE,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAGxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAQxD,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;;;GAIG;;;;;AACH,wBAgWC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3209f6ba"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|