@scalar/api-client 3.6.1 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +150 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/index.js +2 -0
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.d.ts.map +1 -0
- package/dist/components/{ScalarAsciiArt.vue.js → ScalarAsciiArt/ScalarAsciiArt.vue.js} +3 -3
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -0
- package/dist/components/{ScalarAsciiArt.vue.script.js → ScalarAsciiArt/ScalarAsciiArt.vue.script.js} +1 -1
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js.map +1 -0
- package/dist/components/ScalarAsciiArt/index.d.ts +2 -0
- package/dist/components/ScalarAsciiArt/index.d.ts.map +1 -0
- package/dist/components/ScalarAsciiArt/index.js +2 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/ViewLayout/index.d.ts +4 -0
- package/dist/components/ViewLayout/index.d.ts.map +1 -0
- package/dist/components/ViewLayout/index.js +4 -0
- package/dist/plugins/posthog/index.d.ts.map +1 -1
- package/dist/plugins/posthog/index.js +21 -12
- package/dist/plugins/posthog/index.js.map +1 -1
- package/dist/plugins/posthog/sanitize-event-payload.d.ts +25 -0
- package/dist/plugins/posthog/sanitize-event-payload.d.ts.map +1 -0
- package/dist/plugins/posthog/sanitize-event-payload.js +136 -0
- package/dist/plugins/posthog/sanitize-event-payload.js.map +1 -0
- package/dist/style.css +214 -1651
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +72 -32
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +2 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- 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 +15 -9
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -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 +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +2 -1
- 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.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +30 -17
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- 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.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +43 -10
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +4 -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.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +4 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -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 +42 -13
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts +14 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +136 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +12 -10
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +2 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +17 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts +3 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +21 -9
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +1 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +14 -7
- package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.d.ts +6 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js +22 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +124 -91
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +30 -20
- 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/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +43 -21
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts +15 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +74 -28
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +30 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +190 -72
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +7 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +26 -10
- 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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +25 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +12 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInput.vue.script.js +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +2 -2
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -3
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/index.d.ts +0 -2
- package/dist/v2/features/command-palette/index.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.js +1 -3
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +2 -2
- package/dist/v2/features/modal/Modal.vue.d.ts +5 -7
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js +3 -3
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
- 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 +8 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +5 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +15 -4
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +5 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
- package/dist/v2/features/modal/index.js +1 -1
- package/dist/v2/features/modal/modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/modal-events.js +10 -6
- package/dist/v2/features/modal/modal-events.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +35 -3
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js +1 -9
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +4 -0
- package/dist/v2/helpers/handle-hotkeys.js.map +1 -1
- package/dist/v2/helpers/test-utils.d.ts +2 -0
- package/dist/v2/helpers/test-utils.d.ts.map +1 -1
- package/dist/v2/helpers/test-utils.js +18 -0
- package/dist/v2/helpers/test-utils.js.map +1 -0
- package/dist/v2/hooks/index.d.ts +2 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.js +2 -0
- package/dist/v2/types/options.d.ts +1 -1
- package/dist/v2/types/options.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +2 -0
- package/dist/v2/workspace-events.js.map +1 -1
- package/dist/vue-styles.css +108 -658
- package/package.json +67 -96
- package/dist/components/IconSelector.vue.d.ts +0 -27
- package/dist/components/IconSelector.vue.d.ts.map +0 -1
- package/dist/components/IconSelector.vue.js +0 -7
- package/dist/components/IconSelector.vue.js.map +0 -1
- package/dist/components/IconSelector.vue.script.js +0 -65
- package/dist/components/IconSelector.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +0 -7
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -7
- package/dist/components/ImportCollection/IntegrationLogo.vue.js.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js +0 -50
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.js.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.script.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/monacoeditorwork/editor.worker.bundle.js +0 -14319
- package/dist/monacoeditorwork/json.worker.bundle.js +0 -22098
- package/dist/monacoeditorwork/yaml.worker.bundle.js +0 -38414
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +0 -42
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -61
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js.map +0 -1
- package/dist/v2/features/app/App.vue.d.ts +0 -75
- package/dist/v2/features/app/App.vue.d.ts.map +0 -1
- package/dist/v2/features/app/App.vue.js +0 -8
- package/dist/v2/features/app/App.vue.js.map +0 -1
- package/dist/v2/features/app/App.vue.script.js +0 -284
- package/dist/v2/features/app/App.vue.script.js.map +0 -1
- package/dist/v2/features/app/app-events.d.ts +0 -20
- package/dist/v2/features/app/app-events.d.ts.map +0 -1
- package/dist/v2/features/app/app-events.js +0 -254
- package/dist/v2/features/app/app-events.js.map +0 -1
- package/dist/v2/features/app/app-state.d.ts +0 -156
- package/dist/v2/features/app/app-state.d.ts.map +0 -1
- package/dist/v2/features/app/app-state.js +0 -717
- package/dist/v2/features/app/app-state.js.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.d.ts +0 -43
- package/dist/v2/features/app/components/AppHeader.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.js +0 -7
- package/dist/v2/features/app/components/AppHeader.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.script.js +0 -53
- package/dist/v2/features/app/components/AppHeader.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts +0 -32
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.js +0 -7
- package/dist/v2/features/app/components/AppHeaderActions.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js +0 -172
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -37
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +0 -9
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +0 -466
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts +0 -28
- package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.js +0 -7
- package/dist/v2/features/app/components/CreateVersionModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.script.js +0 -84
- package/dist/v2/features/app/components/CreateVersionModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts +0 -16
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -7
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js +0 -58
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +0 -27
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js +0 -9
- package/dist/v2/features/app/components/DesktopTab.vue.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.script.js +0 -121
- package/dist/v2/features/app/components/DesktopTab.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +0 -14
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -7
- package/dist/v2/features/app/components/DesktopTabs.vue.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js +0 -75
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts +0 -25
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js +0 -9
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js +0 -345
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts +0 -16
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts +0 -77
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js +0 -7
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js +0 -209
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.d.ts +0 -45
- package/dist/v2/features/app/components/SidebarDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.js +0 -7
- package/dist/v2/features/app/components/SidebarDocument.vue.js.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.script.js +0 -137
- package/dist/v2/features/app/components/SidebarDocument.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts +0 -26
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -7
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js +0 -175
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.d.ts +0 -4
- package/dist/v2/features/app/components/SplashScreen.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.js +0 -9
- package/dist/v2/features/app/components/SplashScreen.vue.js.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.script.js +0 -20
- package/dist/v2/features/app/components/SplashScreen.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.d.ts +0 -18
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.js +0 -9
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.js.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.script.js +0 -136
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/index.d.ts +0 -2
- package/dist/v2/features/app/components/index.d.ts.map +0 -1
- package/dist/v2/features/app/components/index.js +0 -2
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts +0 -54
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/check-version-conflict.js +0 -82
- package/dist/v2/features/app/helpers/check-version-conflict.js.map +0 -1
- package/dist/v2/features/app/helpers/compute-version-status.d.ts +0 -45
- package/dist/v2/features/app/helpers/compute-version-status.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/compute-version-status.js +0 -18
- package/dist/v2/features/app/helpers/compute-version-status.js.map +0 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +0 -59
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +0 -55
- package/dist/v2/features/app/helpers/create-api-client-app.js.map +0 -1
- package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts +0 -39
- package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-draft-registry-document.js +0 -64
- package/dist/v2/features/app/helpers/create-draft-registry-document.js.map +0 -1
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts +0 -14
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-temp-operation.js +0 -52
- package/dist/v2/features/app/helpers/create-temp-operation.js.map +0 -1
- package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts +0 -26
- package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/detect-document-conflicts.js +0 -27
- package/dist/v2/features/app/helpers/detect-document-conflicts.js.map +0 -1
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts +0 -49
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/filter-workspaces.js +0 -55
- package/dist/v2/features/app/helpers/filter-workspaces.js.map +0 -1
- package/dist/v2/features/app/helpers/get-route-param.d.ts +0 -7
- package/dist/v2/features/app/helpers/get-route-param.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/get-route-param.js +0 -12
- package/dist/v2/features/app/helpers/get-route-param.js.map +0 -1
- package/dist/v2/features/app/helpers/group-workspaces.d.ts +0 -44
- package/dist/v2/features/app/helpers/group-workspaces.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/group-workspaces.js +0 -53
- package/dist/v2/features/app/helpers/group-workspaces.js.map +0 -1
- package/dist/v2/features/app/helpers/load-registry-document.d.ts +0 -24
- package/dist/v2/features/app/helpers/load-registry-document.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/load-registry-document.js +0 -47
- package/dist/v2/features/app/helpers/load-registry-document.js.map +0 -1
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts +0 -23
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/registry-error-messages.js +0 -63
- package/dist/v2/features/app/helpers/registry-error-messages.js.map +0 -1
- package/dist/v2/features/app/helpers/routes.d.ts +0 -184
- package/dist/v2/features/app/helpers/routes.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/routes.js +0 -153
- package/dist/v2/features/app/helpers/routes.js.map +0 -1
- package/dist/v2/features/app/helpers/version-status-presentation.d.ts +0 -24
- package/dist/v2/features/app/helpers/version-status-presentation.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/version-status-presentation.js +0 -43
- package/dist/v2/features/app/helpers/version-status-presentation.js.map +0 -1
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts +0 -42
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-active-document-version.js +0 -60
- package/dist/v2/features/app/hooks/use-active-document-version.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-filter.d.ts +0 -38
- package/dist/v2/features/app/hooks/use-document-filter.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-filter.js +0 -63
- package/dist/v2/features/app/hooks/use-document-filter.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-sync.d.ts +0 -126
- package/dist/v2/features/app/hooks/use-document-sync.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-sync.js +0 -448
- package/dist/v2/features/app/hooks/use-document-sync.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts +0 -30
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-watcher.js +0 -168
- package/dist/v2/features/app/hooks/use-document-watcher.js.map +0 -1
- package/dist/v2/features/app/hooks/use-network-status.d.ts +0 -29
- package/dist/v2/features/app/hooks/use-network-status.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-network-status.js +0 -58
- package/dist/v2/features/app/hooks/use-network-status.js.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.d.ts +0 -17258
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.js +0 -107
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.js.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts +0 -119
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-documents.js +0 -219
- package/dist/v2/features/app/hooks/use-sidebar-documents.js.map +0 -1
- package/dist/v2/features/app/hooks/use-theme.d.ts +0 -56
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-theme.js +0 -94
- package/dist/v2/features/app/hooks/use-theme.js.map +0 -1
- package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts +0 -35
- package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-version-conflict-check.js +0 -62
- package/dist/v2/features/app/hooks/use-version-conflict-check.js.map +0 -1
- package/dist/v2/features/app/index.d.ts +0 -10
- package/dist/v2/features/app/index.d.ts.map +0 -1
- package/dist/v2/features/app/index.js +0 -8
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +0 -13
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +0 -8
- package/dist/v2/features/collection/DocumentCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +0 -112
- package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +0 -6
- package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.js +0 -7
- package/dist/v2/features/collection/OperationCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js +0 -95
- package/dist/v2/features/collection/OperationCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +0 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -7
- package/dist/v2/features/collection/WorkspaceCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +0 -74
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +0 -9
- package/dist/v2/features/collection/components/Authentication.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.script.js +0 -174
- package/dist/v2/features/collection/components/Authentication.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +0 -7
- package/dist/v2/features/collection/components/Cookies.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.script.js +0 -58
- package/dist/v2/features/collection/components/Cookies.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.d.ts +0 -12
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.js +0 -9
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.js.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.script.js +0 -174
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -9
- package/dist/v2/features/collection/components/Editor/Editor.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +0 -361
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js +0 -69
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js +0 -91
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts +0 -12
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -22
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts +0 -11
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -17
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts +0 -7
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -17
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -34
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -18
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts +0 -15
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -36
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/index.d.ts +0 -2
- package/dist/v2/features/collection/components/Editor/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/index.js +0 -2
- package/dist/v2/features/collection/components/Environment.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Environment.vue.js +0 -7
- package/dist/v2/features/collection/components/Environment.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Environment.vue.script.js +0 -61
- package/dist/v2/features/collection/components/Environment.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.d.ts +0 -29
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.js +0 -7
- package/dist/v2/features/collection/components/Form.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.script.js +0 -78
- package/dist/v2/features/collection/components/Form.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/GetStarted.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.js +0 -7
- package/dist/v2/features/collection/components/GetStarted.vue.js.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.script.js +0 -144
- package/dist/v2/features/collection/components/GetStarted.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +0 -18
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +0 -9
- package/dist/v2/features/collection/components/LabelInput.vue.js.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.script.js +0 -38
- package/dist/v2/features/collection/components/LabelInput.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.js +0 -9
- package/dist/v2/features/collection/components/Overview.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.script.js +0 -204
- package/dist/v2/features/collection/components/Overview.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +0 -223
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts +0 -20
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js +0 -45
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js +0 -73
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js +0 -124
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts +0 -17
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js +0 -126
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts +0 -18
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js +0 -180
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts +0 -14
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js +0 -44
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js +0 -53
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts +0 -23
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js +0 -75
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts +0 -3
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts +0 -75
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +0 -191
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts +0 -46
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js +0 -114
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/index.d.ts +0 -2
- package/dist/v2/features/collection/components/Runner/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Scripts.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.js +0 -7
- package/dist/v2/features/collection/components/Scripts.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.script.js +0 -49
- package/dist/v2/features/collection/components/Scripts.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.js +0 -7
- package/dist/v2/features/collection/components/Servers.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.script.js +0 -219
- package/dist/v2/features/collection/components/Servers.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.js +0 -7
- package/dist/v2/features/collection/components/Settings.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.script.js +0 -81
- package/dist/v2/features/collection/components/Settings.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +0 -8
- package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.js +0 -7
- package/dist/v2/features/collection/components/Tabs.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.script.js +0 -55
- package/dist/v2/features/collection/components/Tabs.vue.script.js.map +0 -1
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts +0 -12
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts.map +0 -1
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -19
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +0 -42
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -9
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js +0 -189
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +0 -49
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js +0 -225
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +0 -53
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +0 -227
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +0 -44
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -9
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js +0 -137
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts +0 -30
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js +0 -156
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts +0 -37
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +0 -105
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +0 -48
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js +0 -228
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +0 -65
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js +0 -142
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts +0 -58
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js +0 -9
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js +0 -142
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts +0 -23
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js +0 -9
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js +0 -138
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +0 -34
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -7
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js +0 -39
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.d.ts +0 -20
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -33
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts +0 -11
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-merge-key.js +0 -32
- package/dist/v2/features/command-palette/helpers/get-merge-key.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +0 -24
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -56
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +0 -24
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -22
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +0 -26
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -119
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.d.ts +0 -14
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.js +0 -19
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +0 -28
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -36
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.d.ts +0 -30
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -70
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +0 -20
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -72
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts +0 -14
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.js +0 -106
- package/dist/v2/features/command-palette/helpers/parse-curl.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts +0 -11
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js +0 -35
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts +0 -41
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js +0 -139
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js.map +0 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +0 -426
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +0 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -207
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js.map +0 -1
- package/dist/v2/features/editor/config.d.ts +0 -16
- package/dist/v2/features/editor/config.d.ts.map +0 -1
- package/dist/v2/features/editor/config.js +0 -19
- package/dist/v2/features/editor/config.js.map +0 -1
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts +0 -13
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/configure-language-support.js +0 -48
- package/dist/v2/features/editor/helpers/configure-language-support.js.map +0 -1
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.d.ts +0 -6
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -21
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +0 -12
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -31
- package/dist/v2/features/editor/helpers/json/create-json-model.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +0 -14
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -22
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts +0 -12
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js +0 -32
- package/dist/v2/features/editor/helpers/json/json-ast.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-links.d.ts +0 -15
- package/dist/v2/features/editor/helpers/json/json-pointer-links.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -104
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +0 -7
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -27
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js.map +0 -1
- package/dist/v2/features/editor/helpers/model.d.ts +0 -9
- package/dist/v2/features/editor/helpers/model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts +0 -14
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -27
- package/dist/v2/features/editor/helpers/range-to-whole-line.js.map +0 -1
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.d.ts +0 -16
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -84
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js.map +0 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts +0 -36
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -117
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +0 -13
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -32
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +0 -19
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -70
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts +0 -152
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -37
- package/dist/v2/features/editor/hooks/use-editor-markers.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +0 -39
- package/dist/v2/features/editor/hooks/use-editor.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor.js +0 -133
- package/dist/v2/features/editor/hooks/use-editor.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +0 -16
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -45
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts +0 -77
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -396
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js.map +0 -1
- package/dist/v2/features/editor/index.d.ts +0 -5
- package/dist/v2/features/editor/index.d.ts.map +0 -1
- package/dist/v2/features/editor/index.js +0 -5
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -51
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts +0 -10
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -9
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js +0 -188
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js.map +0 -1
- package/dist/v2/features/global-cookies/index.d.ts +0 -2
- package/dist/v2/features/global-cookies/index.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/index.js +0 -2
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -28
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +0 -7
- package/dist/v2/features/settings/CollectionSettings.vue.js.map +0 -1
- package/dist/v2/features/settings/CollectionSettings.vue.script.js +0 -229
- package/dist/v2/features/settings/CollectionSettings.vue.script.js.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts +0 -20
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +0 -7
- package/dist/v2/features/settings/DocumentSettings.vue.js.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.script.js +0 -92
- package/dist/v2/features/settings/DocumentSettings.vue.script.js.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.d.ts +0 -11
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.js +0 -7
- package/dist/v2/features/settings/components/Appearance.vue.js.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.script.js +0 -63
- package/dist/v2/features/settings/components/Appearance.vue.script.js.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts +0 -16
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.js +0 -7
- package/dist/v2/features/settings/components/Section.vue.js.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.script.js +0 -30
- package/dist/v2/features/settings/components/Section.vue.script.js.map +0 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +0 -10
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +0 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -68
- package/dist/v2/features/settings/helpers/get-theme-colors.js.map +0 -1
- package/dist/v2/features/settings/index.d.ts +0 -3
- package/dist/v2/features/settings/index.d.ts.map +0 -1
- package/dist/v2/features/settings/index.js +0 -3
- package/dist/v2/helpers/download-document.d.ts +0 -2
- package/dist/v2/helpers/download-document.d.ts.map +0 -1
- package/dist/v2/helpers/download-document.js +0 -42
- package/dist/v2/helpers/download-document.js.map +0 -1
- package/dist/v2/helpers/drag-handle-factory.d.ts +0 -16
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +0 -1
- package/dist/v2/helpers/drag-handle-factory.js +0 -258
- package/dist/v2/helpers/drag-handle-factory.js.map +0 -1
- package/dist/v2/helpers/get-tab-details.d.ts +0 -43
- package/dist/v2/helpers/get-tab-details.d.ts.map +0 -1
- package/dist/v2/helpers/get-tab-details.js +0 -54
- package/dist/v2/helpers/get-tab-details.js.map +0 -1
- package/dist/v2/helpers/is-url.d.ts +0 -2
- package/dist/v2/helpers/is-url.d.ts.map +0 -1
- package/dist/v2/helpers/is-url.js +0 -10
- package/dist/v2/helpers/is-url.js.map +0 -1
- package/dist/v2/helpers/safe-run.d.ts +0 -34
- package/dist/v2/helpers/safe-run.d.ts.map +0 -1
- package/dist/v2/helpers/safe-run.js +0 -43
- package/dist/v2/helpers/safe-run.js.map +0 -1
- package/dist/v2/helpers/storage.d.ts +0 -31
- package/dist/v2/helpers/storage.d.ts.map +0 -1
- package/dist/v2/helpers/storage.js +0 -37
- package/dist/v2/helpers/storage.js.map +0 -1
- package/dist/v2/hooks/use-color-mode.d.ts +0 -20
- package/dist/v2/hooks/use-color-mode.d.ts.map +0 -1
- package/dist/v2/hooks/use-color-mode.js +0 -72
- package/dist/v2/hooks/use-color-mode.js.map +0 -1
- package/dist/v2/types/configuration.d.ts +0 -278
- package/dist/v2/types/configuration.d.ts.map +0 -1
- /package/dist/components/{ScalarAsciiArt.vue.d.ts → ScalarAsciiArt/ScalarAsciiArt.vue.d.ts} +0 -0
- /package/dist/{index.js → types/index.js} +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { LoaderPlugin } from '@scalar/json-magic/bundle';
|
|
2
|
-
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
|
-
/**
|
|
5
|
-
* Command Palette Import Component
|
|
6
|
-
*
|
|
7
|
-
* Provides a form for importing OpenAPI descriptions from URL, file, or pasted JSON/YAML.
|
|
8
|
-
* Postman collection JSON and Postman files open {@link CommandPaletteImportPostman}.
|
|
9
|
-
* cURL commands redirect to {@link CommandPaletteImportCurl}.
|
|
10
|
-
*
|
|
11
|
-
* Supports watch mode for URL imports to automatically update when content changes.
|
|
12
|
-
*/
|
|
13
|
-
declare const _default: typeof __VLS_export;
|
|
14
|
-
export default _default;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
16
|
-
/** The workspace store for adding documents */
|
|
17
|
-
workspaceStore: WorkspaceStore;
|
|
18
|
-
/** Event bus for emitting operation creation events */
|
|
19
|
-
eventBus: WorkspaceEventBus;
|
|
20
|
-
/** Loader plugin for file import */
|
|
21
|
-
fileLoader?: LoaderPlugin;
|
|
22
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
23
|
-
close: () => any;
|
|
24
|
-
back: (keyboardEvent: KeyboardEvent) => any;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
26
|
-
/** The workspace store for adding documents */
|
|
27
|
-
workspaceStore: WorkspaceStore;
|
|
28
|
-
/** Event bus for emitting operation creation events */
|
|
29
|
-
eventBus: WorkspaceEventBus;
|
|
30
|
-
/** Loader plugin for file import */
|
|
31
|
-
fileLoader?: LoaderPlugin;
|
|
32
|
-
}> & Readonly<{
|
|
33
|
-
onClose?: (() => any) | undefined;
|
|
34
|
-
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
35
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
36
|
-
/**
|
|
37
|
-
* Slot for custom file upload component that can trigger import.
|
|
38
|
-
*
|
|
39
|
-
* The provided `import` function automatically detects Postman collections
|
|
40
|
-
* and routes them to the Postman import modal, matching the behavior of the
|
|
41
|
-
* default file picker.
|
|
42
|
-
*/
|
|
43
|
-
fileUpload(props: {
|
|
44
|
-
/** Function to trigger import with source content and type */
|
|
45
|
-
import: (source: string, type: "file" | "raw") => Promise<void>;
|
|
46
|
-
}): void;
|
|
47
|
-
}>;
|
|
48
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
-
new (): {
|
|
50
|
-
$slots: S;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImport.vue"],"names":[],"mappings":"AA6ZA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAG7D,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAiBvE;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB,+CAA+C;oBAC/B,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,oCAAoC;iBACvB,YAAY;;;;;IALzB,+CAA+C;oBAC/B,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,oCAAoC;iBACvB,YAAY;;;;;IAczB;;;;;;OAMG;sBACe;QAChB,8DAA8D;QAC9D,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAChE,GAAG,IAAI;EA4gBN,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import CommandPaletteImport_vue_vue_type_script_setup_true_lang_default from "./CommandPaletteImport.vue.script.js";
|
|
2
|
-
//#region src/v2/features/command-palette/components/CommandPaletteImport.vue
|
|
3
|
-
var CommandPaletteImport_default = CommandPaletteImport_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { CommandPaletteImport_default as default };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=CommandPaletteImport.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImport.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Palette Import Component\n *\n * Provides a form for importing OpenAPI descriptions from URL, file, or pasted JSON/YAML.\n * Postman collection JSON and Postman files open {@link CommandPaletteImportPostman}.\n * cURL commands redirect to {@link CommandPaletteImportCurl}.\n *\n * Supports watch mode for URL imports to automatically update when content changes.\n */\nexport default {\n name: 'CommandPaletteImport',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarCodeBlock,\n ScalarIcon,\n ScalarTooltip,\n useLoadingState,\n} from '@scalar/components'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { LoaderPlugin } from '@scalar/json-magic/bundle'\nimport { isPostmanCollection } from '@scalar/postman-to-openapi'\nimport { useToasts } from '@scalar/use-toasts'\nimport {\n createWorkspaceStore,\n type WorkspaceStore,\n} from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, watch } from 'vue'\n\nimport { useFileDialog } from '@/hooks/use-file-dialog'\nimport { getOpenApiDocumentDetails } from '@/v2/features/command-palette/helpers/get-openapi-document-details'\nimport { importDocumentToWorkspace } from '@/v2/features/command-palette/helpers/import-document-to-workspace'\nimport {\n loadDocumentFromSource,\n type ImportEventData,\n} from '@/v2/features/command-palette/helpers/load-document-from-source'\nimport { isUrl } from '@/v2/helpers/is-url'\n\nimport CommandActionForm from './CommandActionForm.vue'\nimport CommandActionInput from './CommandActionInput.vue'\nimport WatchModeToggle from './WatchModeToggle.vue'\n\nconst { workspaceStore, eventBus, fileLoader } = defineProps<{\n /** The workspace store for adding documents */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting operation creation events */\n eventBus: WorkspaceEventBus\n /** Loader plugin for file import */\n fileLoader?: LoaderPlugin\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the import is complete or cancelled */\n (event: 'close'): void\n /** Emitted when user navigates back (e.g., backspace on empty input) */\n (event: 'back', keyboardEvent: KeyboardEvent): void\n}>()\n\ndefineSlots<{\n /**\n * Slot for custom file upload component that can trigger import.\n *\n * The provided `import` function automatically detects Postman collections\n * and routes them to the Postman import modal, matching the behavior of the\n * default file picker.\n */\n fileUpload(props: {\n /** Function to trigger import with source content and type */\n import: (source: string, type: 'file' | 'raw') => Promise<void>\n }): void\n}>()\n\nconst { toast } = useToasts()\n\nconst loader = useLoadingState()\n\nconst inputContent = ref('')\nconst watchMode = ref(false)\n\n/** Trim paste noise for URL checks without changing raw JSON/YAML content. */\nconst normalizedInputContent = computed<string>(() => inputContent.value.trim())\n\n/** Check if the input content is a URL */\nconst isUrlInput = computed<boolean>(() => isUrl(normalizedInputContent.value))\nconst isLocalUrlInput = computed<boolean>(\n () => isUrlInput.value && isLocalUrl(normalizedInputContent.value),\n)\n\nconst documentDetails = computed(() =>\n getOpenApiDocumentDetails(inputContent.value),\n)\n\n/** Get the document type for syntax highlighting */\nconst documentType = computed<string>(() =>\n documentDetails.value ? documentDetails.value.type : 'json',\n)\n\n/** Check if the form should be disabled (when input is empty) */\nconst isDisabled = computed<boolean>(() => {\n return !inputContent.value.trim()\n})\n\n/**\n * Toggle watchMode based on whether the input is a local URL.\n * Only enables watch mode for local URLs, not for files or pasted content.\n */\nwatch(isLocalUrlInput, (value: boolean) => {\n watchMode.value = value\n})\n\n/**\n * Handles errors during the import process.\n * Shows an error toast, invalidates the loader to show an error state,\n * and closes the command palette modal.\n *\n * @param errorMessage - The error message to display and log\n */\nconst handleImportError = async (errorMessage: string) => {\n // Log the error\n console.error(errorMessage)\n toast(errorMessage, 'error')\n\n // Invalidate the loader to show the error state\n await loader.invalidate()\n\n // Close the command palette\n emit('close')\n}\n\n/**\n * Directly imports a document into the workspace without showing the modal.\n * This is used when there is only one workspace and it is empty.\n */\nconst handleImport = async (\n newSource: string,\n type?: ImportEventData['type'],\n): Promise<void> => {\n loader.start()\n\n const TEMP_DOCUMENT_NAME = 'drafts'\n\n // First load the document into a draft store\n // This is to get the title of the document so we can generate a unique slug for store\n const draftStore = createWorkspaceStore({\n fileLoader,\n meta: {\n /** Ensure we use the active proxy to fetch documents */\n 'x-scalar-active-proxy':\n workspaceStore.workspace['x-scalar-active-proxy'],\n },\n })\n\n const eventType = (() => {\n if (type) {\n return type\n }\n\n if (isUrl(newSource.trim())) {\n return 'url'\n }\n\n return 'raw'\n })()\n\n const source = eventType === 'url' ? newSource.trim() : newSource\n\n const isSuccessfullyLoaded = await loadDocumentFromSource(\n draftStore,\n { source, type: eventType },\n TEMP_DOCUMENT_NAME,\n watchMode.value,\n )\n\n if (!isSuccessfullyLoaded) {\n return handleImportError('Failed to import document')\n }\n\n const importResult = await importDocumentToWorkspace({\n workspaceStore,\n workspaceState: draftStore.exportWorkspace(),\n name: TEMP_DOCUMENT_NAME,\n })\n\n if (!importResult.ok) {\n return handleImportError(importResult.error)\n }\n\n // Validate the loader to show the success state\n await loader.validate()\n\n // Navigate to the document overview page\n navigateToDocument(importResult.slug)\n\n // Close the command palette\n emit('close')\n}\n\n/** Navigate to the document overview page after successful import */\nconst navigateToDocument = (documentName: string): void => {\n eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'overview',\n documentSlug: documentName,\n })\n}\n\n/**\n * Import a file, routing Postman collections to the Postman import modal and\n * everything else through the OpenAPI import flow.\n *\n * Shared between the default file picker and the `fileUpload` slot so custom\n * path-based importers get the same Postman detection behavior.\n *\n * When `type` is `'file'` the `source` is a file path resolved through the\n * configured `fileLoader`; when `type` is `'raw'` the `source` is treated as\n * the file's text content directly.\n */\nconst handleFileImport: (\n source: string,\n type?: 'file' | 'raw',\n) => Promise<void> = async (source, type = 'raw') => {\n // Resolve the raw text content so we can sniff for a Postman collection.\n // For raw pastes / uploads the source already is the text. For path-based\n // imports we delegate to the file loader plugin, if one is configured.\n const rawContent = await (async (): Promise<string> => {\n if (type === 'raw') {\n return source\n }\n\n const result = await fileLoader?.exec(source)\n return result?.ok ? result.raw : ''\n })()\n\n if (isPostmanCollection(rawContent)) {\n eventBus.emit('ui:open:command-palette', {\n action: 'import-postman-collection',\n payload: {\n inputValue: rawContent,\n },\n })\n await loader.clear()\n return\n }\n\n await handleImport(source, type)\n}\n\n/**\n * Handle file selection and import from file dialog.\n * Reads the file as text and imports it as OpenAPI or Postman collection.\n * Shows loading state during the import process.\n */\nconst { open: openSpecFileDialog } = useFileDialog({\n onChange: (files) => {\n const [file] = files ?? []\n\n if (!file) {\n return\n }\n\n loader.start()\n\n const onLoad = async (event: ProgressEvent<FileReader>): Promise<void> => {\n const text = event.target?.result as string\n await handleFileImport(text, 'raw')\n }\n\n const reader = new FileReader()\n reader.onload = onLoad\n reader.readAsText(file)\n },\n multiple: false,\n accept: '.json,.yaml,.yml',\n})\n\n/**\n * Handle input changes.\n * Detects cURL commands and redirects to the cURL import command.\n */\nconst handleInput = (value: string): void => {\n const trimmed = value.trim()\n\n if (trimmed.toLowerCase().startsWith('curl')) {\n return eventBus.emit('ui:open:command-palette', {\n action: 'import-curl-command',\n payload: {\n inputValue: value,\n },\n })\n }\n\n if (isPostmanCollection(trimmed)) {\n return eventBus.emit('ui:open:command-palette', {\n action: 'import-postman-collection',\n payload: {\n inputValue: value,\n },\n })\n }\n\n inputContent.value = value\n}\n\n/** Handle back navigation when user presses backspace on empty input */\nconst handleBack = (event: KeyboardEvent): void => {\n emit('back', event)\n}\n</script>\n<template>\n <CommandActionForm\n :disabled=\"isDisabled\"\n :loader\n @submit=\"handleImport(inputContent)\">\n <!-- URL or cURL input mode -->\n <template v-if=\"!documentDetails || isUrlInput\">\n <CommandActionInput\n :modelValue=\"inputContent\"\n placeholder=\"OpenAPI/Swagger/Postman URL or cURL\"\n @delete=\"handleBack\"\n @update:modelValue=\"handleInput\" />\n </template>\n\n <!-- Preview mode for pasted content -->\n <template v-else>\n <!-- Preview header with clear button -->\n <div class=\"flex justify-between\">\n <div class=\"text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs\">\n Preview\n </div>\n <ScalarButton\n class=\"hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs\"\n variant=\"ghost\"\n @click=\"inputContent = ''\">\n Clear\n </ScalarButton>\n </div>\n\n <!-- Code preview with syntax highlighting -->\n <ScalarCodeBlock\n v-if=\"documentDetails && !isUrlInput\"\n class=\"bg-b-2 mt-1 max-h-[40dvh] rounded border px-2 py-1 text-sm\"\n :content=\"inputContent\"\n :copy=\"false\"\n :lang=\"documentType\" />\n </template>\n\n <!-- Actions: File upload and watch mode toggle -->\n <template #options>\n <div class=\"flex w-full flex-row items-center justify-between gap-3\">\n <!-- Custom file upload slot or default button -->\n <slot\n :import=\"handleFileImport\"\n name=\"fileUpload\">\n <!-- Default file upload button -->\n <ScalarButton\n class=\"hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs\"\n variant=\"outlined\"\n @click=\"openSpecFileDialog\">\n JSON, or YAML File\n <ScalarIcon\n class=\"text-c-3\"\n icon=\"Upload\"\n size=\"md\" />\n </ScalarButton>\n </slot>\n\n <!-- Watch mode toggle (only enabled for URL imports) -->\n <ScalarTooltip\n :content=\"\n isUrlInput\n ? 'Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date.'\n : 'Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.'\n \"\n placement=\"bottom\">\n <WatchModeToggle\n v-model=\"watchMode\"\n :disabled=\"!isUrlInput\" />\n </ScalarTooltip>\n </div>\n </template>\n\n <!-- Dynamic submit button text based on import type -->\n <template #submit>\n Import\n <template v-if=\"isUrlInput\">from URL</template>\n <template v-else-if=\"documentDetails && documentType\">\n <template v-if=\"documentDetails.title\">\n \"{{ documentDetails.title }}\"\n </template>\n <template v-else>\n {{ documentDetails.version }}\n </template>\n </template>\n <template v-else>Collection</template>\n </template>\n </CommandActionForm>\n</template>\n"],"mappings":""}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { useFileDialog } from "../../../../hooks/use-file-dialog.js";
|
|
2
|
-
import CommandActionForm_default from "./CommandActionForm.vue.js";
|
|
3
|
-
import CommandActionInput_default from "./CommandActionInput.vue.js";
|
|
4
|
-
import { isUrl } from "../../../helpers/is-url.js";
|
|
5
|
-
import { getOpenApiDocumentDetails } from "../helpers/get-openapi-document-details.js";
|
|
6
|
-
import { importDocumentToWorkspace } from "../helpers/import-document-to-workspace.js";
|
|
7
|
-
import { loadDocumentFromSource } from "../helpers/load-document-from-source.js";
|
|
8
|
-
import WatchModeToggle_default from "./WatchModeToggle.vue.js";
|
|
9
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
|
|
10
|
-
import { ScalarButton, ScalarCodeBlock, ScalarIcon, ScalarTooltip, useLoadingState } from "@scalar/components";
|
|
11
|
-
import { useToasts } from "@scalar/use-toasts";
|
|
12
|
-
import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
|
|
13
|
-
import { isPostmanCollection } from "@scalar/postman-to-openapi";
|
|
14
|
-
import { createWorkspaceStore } from "@scalar/workspace-store/client";
|
|
15
|
-
//#region src/v2/features/command-palette/components/CommandPaletteImport.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var _hoisted_1 = { class: "flex justify-between" };
|
|
17
|
-
var _hoisted_2 = { class: "flex w-full flex-row items-center justify-between gap-3" };
|
|
18
|
-
var CommandPaletteImport_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
19
|
-
name: "CommandPaletteImport",
|
|
20
|
-
props: {
|
|
21
|
-
workspaceStore: {},
|
|
22
|
-
eventBus: {},
|
|
23
|
-
fileLoader: {}
|
|
24
|
-
},
|
|
25
|
-
emits: ["close", "back"],
|
|
26
|
-
setup(__props, { emit: __emit }) {
|
|
27
|
-
const emit = __emit;
|
|
28
|
-
const { toast } = useToasts();
|
|
29
|
-
const loader = useLoadingState();
|
|
30
|
-
const inputContent = ref("");
|
|
31
|
-
const watchMode = ref(false);
|
|
32
|
-
/** Trim paste noise for URL checks without changing raw JSON/YAML content. */
|
|
33
|
-
const normalizedInputContent = computed(() => inputContent.value.trim());
|
|
34
|
-
/** Check if the input content is a URL */
|
|
35
|
-
const isUrlInput = computed(() => isUrl(normalizedInputContent.value));
|
|
36
|
-
const isLocalUrlInput = computed(() => isUrlInput.value && isLocalUrl(normalizedInputContent.value));
|
|
37
|
-
const documentDetails = computed(() => getOpenApiDocumentDetails(inputContent.value));
|
|
38
|
-
/** Get the document type for syntax highlighting */
|
|
39
|
-
const documentType = computed(() => documentDetails.value ? documentDetails.value.type : "json");
|
|
40
|
-
/** Check if the form should be disabled (when input is empty) */
|
|
41
|
-
const isDisabled = computed(() => {
|
|
42
|
-
return !inputContent.value.trim();
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* Toggle watchMode based on whether the input is a local URL.
|
|
46
|
-
* Only enables watch mode for local URLs, not for files or pasted content.
|
|
47
|
-
*/
|
|
48
|
-
watch(isLocalUrlInput, (value) => {
|
|
49
|
-
watchMode.value = value;
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* Handles errors during the import process.
|
|
53
|
-
* Shows an error toast, invalidates the loader to show an error state,
|
|
54
|
-
* and closes the command palette modal.
|
|
55
|
-
*
|
|
56
|
-
* @param errorMessage - The error message to display and log
|
|
57
|
-
*/
|
|
58
|
-
const handleImportError = async (errorMessage) => {
|
|
59
|
-
console.error(errorMessage);
|
|
60
|
-
toast(errorMessage, "error");
|
|
61
|
-
await loader.invalidate();
|
|
62
|
-
emit("close");
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Directly imports a document into the workspace without showing the modal.
|
|
66
|
-
* This is used when there is only one workspace and it is empty.
|
|
67
|
-
*/
|
|
68
|
-
const handleImport = async (newSource, type) => {
|
|
69
|
-
loader.start();
|
|
70
|
-
const TEMP_DOCUMENT_NAME = "drafts";
|
|
71
|
-
const draftStore = createWorkspaceStore({
|
|
72
|
-
fileLoader: __props.fileLoader,
|
|
73
|
-
meta: { "x-scalar-active-proxy": __props.workspaceStore.workspace["x-scalar-active-proxy"] }
|
|
74
|
-
});
|
|
75
|
-
const eventType = (() => {
|
|
76
|
-
if (type) return type;
|
|
77
|
-
if (isUrl(newSource.trim())) return "url";
|
|
78
|
-
return "raw";
|
|
79
|
-
})();
|
|
80
|
-
if (!await loadDocumentFromSource(draftStore, {
|
|
81
|
-
source: eventType === "url" ? newSource.trim() : newSource,
|
|
82
|
-
type: eventType
|
|
83
|
-
}, TEMP_DOCUMENT_NAME, watchMode.value)) return handleImportError("Failed to import document");
|
|
84
|
-
const importResult = await importDocumentToWorkspace({
|
|
85
|
-
workspaceStore: __props.workspaceStore,
|
|
86
|
-
workspaceState: draftStore.exportWorkspace(),
|
|
87
|
-
name: TEMP_DOCUMENT_NAME
|
|
88
|
-
});
|
|
89
|
-
if (!importResult.ok) return handleImportError(importResult.error);
|
|
90
|
-
await loader.validate();
|
|
91
|
-
navigateToDocument(importResult.slug);
|
|
92
|
-
emit("close");
|
|
93
|
-
};
|
|
94
|
-
/** Navigate to the document overview page after successful import */
|
|
95
|
-
const navigateToDocument = (documentName) => {
|
|
96
|
-
__props.eventBus.emit("ui:navigate", {
|
|
97
|
-
page: "document",
|
|
98
|
-
path: "overview",
|
|
99
|
-
documentSlug: documentName
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Import a file, routing Postman collections to the Postman import modal and
|
|
104
|
-
* everything else through the OpenAPI import flow.
|
|
105
|
-
*
|
|
106
|
-
* Shared between the default file picker and the `fileUpload` slot so custom
|
|
107
|
-
* path-based importers get the same Postman detection behavior.
|
|
108
|
-
*
|
|
109
|
-
* When `type` is `'file'` the `source` is a file path resolved through the
|
|
110
|
-
* configured `fileLoader`; when `type` is `'raw'` the `source` is treated as
|
|
111
|
-
* the file's text content directly.
|
|
112
|
-
*/
|
|
113
|
-
const handleFileImport = async (source, type = "raw") => {
|
|
114
|
-
const rawContent = await (async () => {
|
|
115
|
-
if (type === "raw") return source;
|
|
116
|
-
const result = await __props.fileLoader?.exec(source);
|
|
117
|
-
return result?.ok ? result.raw : "";
|
|
118
|
-
})();
|
|
119
|
-
if (isPostmanCollection(rawContent)) {
|
|
120
|
-
__props.eventBus.emit("ui:open:command-palette", {
|
|
121
|
-
action: "import-postman-collection",
|
|
122
|
-
payload: { inputValue: rawContent }
|
|
123
|
-
});
|
|
124
|
-
await loader.clear();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
await handleImport(source, type);
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Handle file selection and import from file dialog.
|
|
131
|
-
* Reads the file as text and imports it as OpenAPI or Postman collection.
|
|
132
|
-
* Shows loading state during the import process.
|
|
133
|
-
*/
|
|
134
|
-
const { open: openSpecFileDialog } = useFileDialog({
|
|
135
|
-
onChange: (files) => {
|
|
136
|
-
const [file] = files ?? [];
|
|
137
|
-
if (!file) return;
|
|
138
|
-
loader.start();
|
|
139
|
-
const onLoad = async (event) => {
|
|
140
|
-
const text = event.target?.result;
|
|
141
|
-
await handleFileImport(text, "raw");
|
|
142
|
-
};
|
|
143
|
-
const reader = new FileReader();
|
|
144
|
-
reader.onload = onLoad;
|
|
145
|
-
reader.readAsText(file);
|
|
146
|
-
},
|
|
147
|
-
multiple: false,
|
|
148
|
-
accept: ".json,.yaml,.yml"
|
|
149
|
-
});
|
|
150
|
-
/**
|
|
151
|
-
* Handle input changes.
|
|
152
|
-
* Detects cURL commands and redirects to the cURL import command.
|
|
153
|
-
*/
|
|
154
|
-
const handleInput = (value) => {
|
|
155
|
-
const trimmed = value.trim();
|
|
156
|
-
if (trimmed.toLowerCase().startsWith("curl")) return __props.eventBus.emit("ui:open:command-palette", {
|
|
157
|
-
action: "import-curl-command",
|
|
158
|
-
payload: { inputValue: value }
|
|
159
|
-
});
|
|
160
|
-
if (isPostmanCollection(trimmed)) return __props.eventBus.emit("ui:open:command-palette", {
|
|
161
|
-
action: "import-postman-collection",
|
|
162
|
-
payload: { inputValue: value }
|
|
163
|
-
});
|
|
164
|
-
inputContent.value = value;
|
|
165
|
-
};
|
|
166
|
-
/** Handle back navigation when user presses backspace on empty input */
|
|
167
|
-
const handleBack = (event) => {
|
|
168
|
-
emit("back", event);
|
|
169
|
-
};
|
|
170
|
-
return (_ctx, _cache) => {
|
|
171
|
-
return openBlock(), createBlock(CommandActionForm_default, {
|
|
172
|
-
disabled: isDisabled.value,
|
|
173
|
-
loader: unref(loader),
|
|
174
|
-
onSubmit: _cache[2] || (_cache[2] = ($event) => handleImport(inputContent.value))
|
|
175
|
-
}, {
|
|
176
|
-
options: withCtx(() => [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "fileUpload", { import: handleFileImport }, () => [createVNode(unref(ScalarButton), {
|
|
177
|
-
class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
|
|
178
|
-
variant: "outlined",
|
|
179
|
-
onClick: unref(openSpecFileDialog)
|
|
180
|
-
}, {
|
|
181
|
-
default: withCtx(() => [_cache[5] || (_cache[5] = createTextVNode(" JSON, or YAML File ", -1)), createVNode(unref(ScalarIcon), {
|
|
182
|
-
class: "text-c-3",
|
|
183
|
-
icon: "Upload",
|
|
184
|
-
size: "md"
|
|
185
|
-
})]),
|
|
186
|
-
_: 1
|
|
187
|
-
}, 8, ["onClick"])]), createVNode(unref(ScalarTooltip), {
|
|
188
|
-
content: isUrlInput.value ? "Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date." : "Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.",
|
|
189
|
-
placement: "bottom"
|
|
190
|
-
}, {
|
|
191
|
-
default: withCtx(() => [createVNode(WatchModeToggle_default, {
|
|
192
|
-
modelValue: watchMode.value,
|
|
193
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => watchMode.value = $event),
|
|
194
|
-
disabled: !isUrlInput.value
|
|
195
|
-
}, null, 8, ["modelValue", "disabled"])]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["content"])])]),
|
|
198
|
-
submit: withCtx(() => [_cache[6] || (_cache[6] = createTextVNode(" Import ", -1)), isUrlInput.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode("from URL")], 64)) : documentDetails.value && documentType.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [documentDetails.value.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" \"" + toDisplayString(documentDetails.value.title) + "\" ", 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(documentDetails.value.version), 1)], 64))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode("Collection")], 64))]),
|
|
199
|
-
default: withCtx(() => [!documentDetails.value || isUrlInput.value ? (openBlock(), createBlock(CommandActionInput_default, {
|
|
200
|
-
key: 0,
|
|
201
|
-
modelValue: inputContent.value,
|
|
202
|
-
placeholder: "OpenAPI/Swagger/Postman URL or cURL",
|
|
203
|
-
onDelete: handleBack,
|
|
204
|
-
"onUpdate:modelValue": handleInput
|
|
205
|
-
}, null, 8, ["modelValue"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("div", _hoisted_1, [_cache[4] || (_cache[4] = createElementVNode("div", { class: "text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs" }, " Preview ", -1)), createVNode(unref(ScalarButton), {
|
|
206
|
-
class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
|
|
207
|
-
variant: "ghost",
|
|
208
|
-
onClick: _cache[0] || (_cache[0] = ($event) => inputContent.value = "")
|
|
209
|
-
}, {
|
|
210
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Clear ", -1)])]),
|
|
211
|
-
_: 1
|
|
212
|
-
})]), documentDetails.value && !isUrlInput.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
|
|
213
|
-
key: 0,
|
|
214
|
-
class: "bg-b-2 mt-1 max-h-[40dvh] rounded border px-2 py-1 text-sm",
|
|
215
|
-
content: inputContent.value,
|
|
216
|
-
copy: false,
|
|
217
|
-
lang: documentType.value
|
|
218
|
-
}, null, 8, ["content", "lang"])) : createCommentVNode("", true)], 64))]),
|
|
219
|
-
_: 3
|
|
220
|
-
}, 8, ["disabled", "loader"]);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
//#endregion
|
|
225
|
-
export { CommandPaletteImport_vue_vue_type_script_setup_true_lang_default as default };
|
|
226
|
-
|
|
227
|
-
//# sourceMappingURL=CommandPaletteImport.vue.script.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.script.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImport.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Palette Import Component\n *\n * Provides a form for importing OpenAPI descriptions from URL, file, or pasted JSON/YAML.\n * Postman collection JSON and Postman files open {@link CommandPaletteImportPostman}.\n * cURL commands redirect to {@link CommandPaletteImportCurl}.\n *\n * Supports watch mode for URL imports to automatically update when content changes.\n */\nexport default {\n name: 'CommandPaletteImport',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarCodeBlock,\n ScalarIcon,\n ScalarTooltip,\n useLoadingState,\n} from '@scalar/components'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { LoaderPlugin } from '@scalar/json-magic/bundle'\nimport { isPostmanCollection } from '@scalar/postman-to-openapi'\nimport { useToasts } from '@scalar/use-toasts'\nimport {\n createWorkspaceStore,\n type WorkspaceStore,\n} from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, watch } from 'vue'\n\nimport { useFileDialog } from '@/hooks/use-file-dialog'\nimport { getOpenApiDocumentDetails } from '@/v2/features/command-palette/helpers/get-openapi-document-details'\nimport { importDocumentToWorkspace } from '@/v2/features/command-palette/helpers/import-document-to-workspace'\nimport {\n loadDocumentFromSource,\n type ImportEventData,\n} from '@/v2/features/command-palette/helpers/load-document-from-source'\nimport { isUrl } from '@/v2/helpers/is-url'\n\nimport CommandActionForm from './CommandActionForm.vue'\nimport CommandActionInput from './CommandActionInput.vue'\nimport WatchModeToggle from './WatchModeToggle.vue'\n\nconst { workspaceStore, eventBus, fileLoader } = defineProps<{\n /** The workspace store for adding documents */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting operation creation events */\n eventBus: WorkspaceEventBus\n /** Loader plugin for file import */\n fileLoader?: LoaderPlugin\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the import is complete or cancelled */\n (event: 'close'): void\n /** Emitted when user navigates back (e.g., backspace on empty input) */\n (event: 'back', keyboardEvent: KeyboardEvent): void\n}>()\n\ndefineSlots<{\n /**\n * Slot for custom file upload component that can trigger import.\n *\n * The provided `import` function automatically detects Postman collections\n * and routes them to the Postman import modal, matching the behavior of the\n * default file picker.\n */\n fileUpload(props: {\n /** Function to trigger import with source content and type */\n import: (source: string, type: 'file' | 'raw') => Promise<void>\n }): void\n}>()\n\nconst { toast } = useToasts()\n\nconst loader = useLoadingState()\n\nconst inputContent = ref('')\nconst watchMode = ref(false)\n\n/** Trim paste noise for URL checks without changing raw JSON/YAML content. */\nconst normalizedInputContent = computed<string>(() => inputContent.value.trim())\n\n/** Check if the input content is a URL */\nconst isUrlInput = computed<boolean>(() => isUrl(normalizedInputContent.value))\nconst isLocalUrlInput = computed<boolean>(\n () => isUrlInput.value && isLocalUrl(normalizedInputContent.value),\n)\n\nconst documentDetails = computed(() =>\n getOpenApiDocumentDetails(inputContent.value),\n)\n\n/** Get the document type for syntax highlighting */\nconst documentType = computed<string>(() =>\n documentDetails.value ? documentDetails.value.type : 'json',\n)\n\n/** Check if the form should be disabled (when input is empty) */\nconst isDisabled = computed<boolean>(() => {\n return !inputContent.value.trim()\n})\n\n/**\n * Toggle watchMode based on whether the input is a local URL.\n * Only enables watch mode for local URLs, not for files or pasted content.\n */\nwatch(isLocalUrlInput, (value: boolean) => {\n watchMode.value = value\n})\n\n/**\n * Handles errors during the import process.\n * Shows an error toast, invalidates the loader to show an error state,\n * and closes the command palette modal.\n *\n * @param errorMessage - The error message to display and log\n */\nconst handleImportError = async (errorMessage: string) => {\n // Log the error\n console.error(errorMessage)\n toast(errorMessage, 'error')\n\n // Invalidate the loader to show the error state\n await loader.invalidate()\n\n // Close the command palette\n emit('close')\n}\n\n/**\n * Directly imports a document into the workspace without showing the modal.\n * This is used when there is only one workspace and it is empty.\n */\nconst handleImport = async (\n newSource: string,\n type?: ImportEventData['type'],\n): Promise<void> => {\n loader.start()\n\n const TEMP_DOCUMENT_NAME = 'drafts'\n\n // First load the document into a draft store\n // This is to get the title of the document so we can generate a unique slug for store\n const draftStore = createWorkspaceStore({\n fileLoader,\n meta: {\n /** Ensure we use the active proxy to fetch documents */\n 'x-scalar-active-proxy':\n workspaceStore.workspace['x-scalar-active-proxy'],\n },\n })\n\n const eventType = (() => {\n if (type) {\n return type\n }\n\n if (isUrl(newSource.trim())) {\n return 'url'\n }\n\n return 'raw'\n })()\n\n const source = eventType === 'url' ? newSource.trim() : newSource\n\n const isSuccessfullyLoaded = await loadDocumentFromSource(\n draftStore,\n { source, type: eventType },\n TEMP_DOCUMENT_NAME,\n watchMode.value,\n )\n\n if (!isSuccessfullyLoaded) {\n return handleImportError('Failed to import document')\n }\n\n const importResult = await importDocumentToWorkspace({\n workspaceStore,\n workspaceState: draftStore.exportWorkspace(),\n name: TEMP_DOCUMENT_NAME,\n })\n\n if (!importResult.ok) {\n return handleImportError(importResult.error)\n }\n\n // Validate the loader to show the success state\n await loader.validate()\n\n // Navigate to the document overview page\n navigateToDocument(importResult.slug)\n\n // Close the command palette\n emit('close')\n}\n\n/** Navigate to the document overview page after successful import */\nconst navigateToDocument = (documentName: string): void => {\n eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'overview',\n documentSlug: documentName,\n })\n}\n\n/**\n * Import a file, routing Postman collections to the Postman import modal and\n * everything else through the OpenAPI import flow.\n *\n * Shared between the default file picker and the `fileUpload` slot so custom\n * path-based importers get the same Postman detection behavior.\n *\n * When `type` is `'file'` the `source` is a file path resolved through the\n * configured `fileLoader`; when `type` is `'raw'` the `source` is treated as\n * the file's text content directly.\n */\nconst handleFileImport: (\n source: string,\n type?: 'file' | 'raw',\n) => Promise<void> = async (source, type = 'raw') => {\n // Resolve the raw text content so we can sniff for a Postman collection.\n // For raw pastes / uploads the source already is the text. For path-based\n // imports we delegate to the file loader plugin, if one is configured.\n const rawContent = await (async (): Promise<string> => {\n if (type === 'raw') {\n return source\n }\n\n const result = await fileLoader?.exec(source)\n return result?.ok ? result.raw : ''\n })()\n\n if (isPostmanCollection(rawContent)) {\n eventBus.emit('ui:open:command-palette', {\n action: 'import-postman-collection',\n payload: {\n inputValue: rawContent,\n },\n })\n await loader.clear()\n return\n }\n\n await handleImport(source, type)\n}\n\n/**\n * Handle file selection and import from file dialog.\n * Reads the file as text and imports it as OpenAPI or Postman collection.\n * Shows loading state during the import process.\n */\nconst { open: openSpecFileDialog } = useFileDialog({\n onChange: (files) => {\n const [file] = files ?? []\n\n if (!file) {\n return\n }\n\n loader.start()\n\n const onLoad = async (event: ProgressEvent<FileReader>): Promise<void> => {\n const text = event.target?.result as string\n await handleFileImport(text, 'raw')\n }\n\n const reader = new FileReader()\n reader.onload = onLoad\n reader.readAsText(file)\n },\n multiple: false,\n accept: '.json,.yaml,.yml',\n})\n\n/**\n * Handle input changes.\n * Detects cURL commands and redirects to the cURL import command.\n */\nconst handleInput = (value: string): void => {\n const trimmed = value.trim()\n\n if (trimmed.toLowerCase().startsWith('curl')) {\n return eventBus.emit('ui:open:command-palette', {\n action: 'import-curl-command',\n payload: {\n inputValue: value,\n },\n })\n }\n\n if (isPostmanCollection(trimmed)) {\n return eventBus.emit('ui:open:command-palette', {\n action: 'import-postman-collection',\n payload: {\n inputValue: value,\n },\n })\n }\n\n inputContent.value = value\n}\n\n/** Handle back navigation when user presses backspace on empty input */\nconst handleBack = (event: KeyboardEvent): void => {\n emit('back', event)\n}\n</script>\n<template>\n <CommandActionForm\n :disabled=\"isDisabled\"\n :loader\n @submit=\"handleImport(inputContent)\">\n <!-- URL or cURL input mode -->\n <template v-if=\"!documentDetails || isUrlInput\">\n <CommandActionInput\n :modelValue=\"inputContent\"\n placeholder=\"OpenAPI/Swagger/Postman URL or cURL\"\n @delete=\"handleBack\"\n @update:modelValue=\"handleInput\" />\n </template>\n\n <!-- Preview mode for pasted content -->\n <template v-else>\n <!-- Preview header with clear button -->\n <div class=\"flex justify-between\">\n <div class=\"text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs\">\n Preview\n </div>\n <ScalarButton\n class=\"hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs\"\n variant=\"ghost\"\n @click=\"inputContent = ''\">\n Clear\n </ScalarButton>\n </div>\n\n <!-- Code preview with syntax highlighting -->\n <ScalarCodeBlock\n v-if=\"documentDetails && !isUrlInput\"\n class=\"bg-b-2 mt-1 max-h-[40dvh] rounded border px-2 py-1 text-sm\"\n :content=\"inputContent\"\n :copy=\"false\"\n :lang=\"documentType\" />\n </template>\n\n <!-- Actions: File upload and watch mode toggle -->\n <template #options>\n <div class=\"flex w-full flex-row items-center justify-between gap-3\">\n <!-- Custom file upload slot or default button -->\n <slot\n :import=\"handleFileImport\"\n name=\"fileUpload\">\n <!-- Default file upload button -->\n <ScalarButton\n class=\"hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs\"\n variant=\"outlined\"\n @click=\"openSpecFileDialog\">\n JSON, or YAML File\n <ScalarIcon\n class=\"text-c-3\"\n icon=\"Upload\"\n size=\"md\" />\n </ScalarButton>\n </slot>\n\n <!-- Watch mode toggle (only enabled for URL imports) -->\n <ScalarTooltip\n :content=\"\n isUrlInput\n ? 'Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date.'\n : 'Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.'\n \"\n placement=\"bottom\">\n <WatchModeToggle\n v-model=\"watchMode\"\n :disabled=\"!isUrlInput\" />\n </ScalarTooltip>\n </div>\n </template>\n\n <!-- Dynamic submit button text based on import type -->\n <template #submit>\n Import\n <template v-if=\"isUrlInput\">from URL</template>\n <template v-else-if=\"documentDetails && documentType\">\n <template v-if=\"documentDetails.title\">\n \"{{ documentDetails.title }}\"\n </template>\n <template v-else>\n {{ documentDetails.version }}\n </template>\n </template>\n <template v-else>Collection</template>\n </template>\n </CommandActionForm>\n</template>\n"],"mappings":"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"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
-
/**
|
|
4
|
-
* Command Palette Import cURL Component
|
|
5
|
-
*
|
|
6
|
-
* Provides a form for importing API requests from cURL commands.
|
|
7
|
-
* Parses the cURL command to extract the HTTP method, URL, path, headers,
|
|
8
|
-
* and body, then creates a new operation in the selected document.
|
|
9
|
-
*
|
|
10
|
-
* Validates that no conflicting operation exists at the same path/method.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* <CommandPaletteImportCurl
|
|
14
|
-
* :workspaceStore="workspaceStore"
|
|
15
|
-
* :eventBus="eventBus"
|
|
16
|
-
* :curl="curlCommand"
|
|
17
|
-
* @close="handleClose"
|
|
18
|
-
* @back="handleBack"
|
|
19
|
-
* />
|
|
20
|
-
*/
|
|
21
|
-
declare const _default: typeof __VLS_export;
|
|
22
|
-
export default _default;
|
|
23
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
24
|
-
/** The workspace store for accessing documents and operations */
|
|
25
|
-
workspaceStore: WorkspaceStore;
|
|
26
|
-
/** Event bus for emitting operation creation events */
|
|
27
|
-
eventBus: WorkspaceEventBus;
|
|
28
|
-
/** The cURL command string to parse and import */
|
|
29
|
-
inputValue: string;
|
|
30
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
|
-
close: () => any;
|
|
32
|
-
back: (keyboardEvent: KeyboardEvent) => any;
|
|
33
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
34
|
-
/** The workspace store for accessing documents and operations */
|
|
35
|
-
workspaceStore: WorkspaceStore;
|
|
36
|
-
/** Event bus for emitting operation creation events */
|
|
37
|
-
eventBus: WorkspaceEventBus;
|
|
38
|
-
/** The cURL command string to parse and import */
|
|
39
|
-
inputValue: string;
|
|
40
|
-
}> & Readonly<{
|
|
41
|
-
onClose?: (() => any) | undefined;
|
|
42
|
-
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
43
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
-
//# sourceMappingURL=CommandPaletteImportCurl.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImportCurl.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImportCurl.vue"],"names":[],"mappings":"AA0PA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AASvE;;;;;;;;;;;;;;;;;GAiBG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB,iEAAiE;oBACjD,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,kDAAkD;gBACtC,MAAM;;;;;IALlB,iEAAiE;oBACjD,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,kDAAkD;gBACtC,MAAM;;;;kFAsUhB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import CommandPaletteImportCurl_vue_vue_type_script_setup_true_lang_default from "./CommandPaletteImportCurl.vue.script.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
//#region src/v2/features/command-palette/components/CommandPaletteImportCurl.vue
|
|
5
|
-
var CommandPaletteImportCurl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(CommandPaletteImportCurl_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-311ac78f"]]);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { CommandPaletteImportCurl_default as default };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=CommandPaletteImportCurl.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImportCurl.vue.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImportCurl.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Palette Import cURL Component\n *\n * Provides a form for importing API requests from cURL commands.\n * Parses the cURL command to extract the HTTP method, URL, path, headers,\n * and body, then creates a new operation in the selected document.\n *\n * Validates that no conflicting operation exists at the same path/method.\n *\n * @example\n * <CommandPaletteImportCurl\n * :workspaceStore=\"workspaceStore\"\n * :eventBus=\"eventBus\"\n * :curl=\"curlCommand\"\n * @close=\"handleClose\"\n * @back=\"handleBack\"\n * />\n */\nexport default {\n name: 'CommandPaletteImportCurl',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarListbox,\n type ScalarComboboxOption,\n} from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, type ComputedRef } from 'vue'\n\nimport HttpMethod from '@/v2/blocks/operation-code-sample/components/HttpMethod.vue'\nimport CommandActionForm from '@/v2/features/command-palette/components/CommandActionForm.vue'\nimport CommandActionInput from '@/v2/features/command-palette/components/CommandActionInput.vue'\nimport { getOperationFromCurl } from '@/v2/features/command-palette/helpers/get-operation-from-curl'\n\nconst { workspaceStore, inputValue, eventBus } = defineProps<{\n /** The workspace store for accessing documents and operations */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting operation creation events */\n eventBus: WorkspaceEventBus\n /** The cURL command string to parse and import */\n inputValue: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the import is complete */\n (event: 'close'): void\n /** Emitted when user navigates back (e.g., backspace on empty input) */\n (event: 'back', keyboardEvent: KeyboardEvent): void\n}>()\n\nconst exampleKey = ref('')\n\n/** Trimmed version of the example key for validation and submission */\nconst exampleKeyTrimmed = computed<string>(() => exampleKey.value.trim())\n\n/** Parse the cURL command to extract path, method, and operation details */\nconst { path, method, operation } = getOperationFromCurl(inputValue)\n\n/** List of all available documents (collections) in the workspace */\nconst documents = computed(() =>\n Object.keys(workspaceStore.workspace.documents).map((document) => ({\n id: document,\n label: document,\n })),\n)\n\nconst selectedDocument = ref<ScalarComboboxOption | undefined>(\n documents.value[0],\n)\n\n/**\n * Validation message surfaced under the input.\n *\n * Resolves to `null` when the form is valid; otherwise to a human-readable\n * reason the user can act on. Empty input is the default state so we keep\n * the field free of error styling — `isDisabled` still blocks submission\n * there, matching the {@link CommandPaletteOpenApiDocument} pattern.\n */\nconst errorMessage: ComputedRef<string | null> = computed(() => {\n if (!exampleKeyTrimmed.value || !selectedDocument.value) {\n return null\n }\n\n const document = workspaceStore.workspace.documents[selectedDocument.value.id]\n\n if (document?.paths?.[path]?.[method]) {\n return `A ${method.toUpperCase()} operation at \"${path}\" already exists in \"${selectedDocument.value.label}\". Importing this cURL would conflict with it.`\n }\n\n return null\n})\n\n/**\n * Submit is blocked while required fields are missing or a duplicate exists.\n * The inline `errorMessage` makes the duplicate case explicit so the user\n * understands why import is unavailable rather than seeing a silent disable.\n */\nconst isDisabled = computed<boolean>(\n () =>\n !exampleKeyTrimmed.value ||\n !selectedDocument.value ||\n errorMessage.value !== null,\n)\n\n/**\n * Handle the import submission.\n * Creates a new operation in the selected document from the parsed cURL command.\n */\nconst handleImportClick = (): void => {\n const documentName = selectedDocument.value\n\n if (isDisabled.value || !documentName) {\n return\n }\n\n /** Re-parse with the example key to include it in the operation */\n const result = getOperationFromCurl(inputValue, exampleKeyTrimmed.value)\n\n eventBus.emit('operation:create:operation', {\n documentName: documentName.id,\n path: result.path,\n method: result.method,\n operation: result.operation,\n exampleKey: exampleKeyTrimmed.value,\n callback: (success) => {\n if (!success) {\n return\n }\n\n // build the sidebar\n workspaceStore.buildSidebar(documentName.id)\n\n const normalizedPath = result.path.startsWith('/')\n ? result.path\n : `/${result.path}`\n\n // Navigate to the new example via the event bus rather than the router\n eventBus.emit('ui:navigate', {\n page: 'example',\n documentSlug: documentName.id,\n path: normalizedPath,\n method: result.method,\n exampleName: exampleKeyTrimmed.value,\n })\n },\n })\n\n emit('close')\n}\n\n/** Handle back navigation when user presses backspace on empty input */\nconst handleBack = (event: KeyboardEvent): void => {\n emit('back', event)\n}\n</script>\n<template>\n <CommandActionForm\n :disabled=\"isDisabled\"\n @submit=\"handleImportClick\">\n <!-- Example key input -->\n <CommandActionInput\n v-model=\"exampleKey\"\n placeholder=\"Curl example key (e.g., example-1)\"\n @delete=\"handleBack\" />\n\n <p\n v-if=\"errorMessage\"\n class=\"text-red px-2 pb-1 text-xs\"\n data-testid=\"command-palette-import-curl-error\"\n role=\"alert\">\n {{ errorMessage }}\n </p>\n\n <!-- Preview of the parsed cURL request (method + URL + path) -->\n <div class=\"flex flex-1 flex-col gap-2\">\n <div\n class=\"flex h-9 flex-row items-center gap-2 rounded border p-[3px] text-sm\">\n <HttpMethod\n class=\"border-r-1 px-1\"\n :method=\"method\" />\n <span class=\"scroll-timeline-x whitespace-nowrap\">\n {{ operation.servers?.[0]?.url || '' }}{{ path }}\n </span>\n </div>\n </div>\n\n <!-- Document selector -->\n <template #options>\n <div class=\"flex items-center gap-2\">\n <ScalarListbox\n v-model=\"selectedDocument\"\n :options=\"documents\">\n <ScalarButton\n class=\"hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs\"\n variant=\"outlined\">\n <span\n class=\"whitespace-nowrap\"\n :class=\"selectedDocument ? 'text-c-1' : 'text-c-3'\">\n {{\n selectedDocument ? selectedDocument.label : 'Select Collection'\n }}\n </span>\n <ScalarIcon\n class=\"text-c-3\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarListbox>\n </div>\n </template>\n\n <template #submit>Import Request</template>\n </CommandActionForm>\n</template>\n<style scoped>\n/**\n * Custom horizontal scroll for the URL preview.\n * Hides scrollbar for a cleaner appearance while maintaining scroll functionality.\n */\n.scroll-timeline-x {\n overflow: auto;\n scroll-timeline: --scroll-timeline x;\n /* Firefox support */\n scroll-timeline: --scroll-timeline horizontal;\n /* Hide scrollbar in IE and Edge */\n -ms-overflow-style: none;\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n}\n\n/* Hide scrollbar in Chrome, Safari, and Opera */\n.scroll-timeline-x::-webkit-scrollbar {\n display: none;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import HttpMethod_default from "../../../blocks/operation-code-sample/components/HttpMethod.vue.js";
|
|
2
|
-
import CommandActionForm_default from "./CommandActionForm.vue.js";
|
|
3
|
-
import CommandActionInput_default from "./CommandActionInput.vue.js";
|
|
4
|
-
import { getOperationFromCurl } from "../helpers/get-operation-from-curl.js";
|
|
5
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
|
|
6
|
-
import { ScalarButton, ScalarIcon, ScalarListbox } from "@scalar/components";
|
|
7
|
-
//#region src/v2/features/command-palette/components/CommandPaletteImportCurl.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _hoisted_1 = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "text-red px-2 pb-1 text-xs",
|
|
11
|
-
"data-testid": "command-palette-import-curl-error",
|
|
12
|
-
role: "alert"
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_2 = { class: "flex flex-1 flex-col gap-2" };
|
|
15
|
-
var _hoisted_3 = { class: "flex h-9 flex-row items-center gap-2 rounded border p-[3px] text-sm" };
|
|
16
|
-
var _hoisted_4 = { class: "scroll-timeline-x whitespace-nowrap" };
|
|
17
|
-
var _hoisted_5 = { class: "flex items-center gap-2" };
|
|
18
|
-
var CommandPaletteImportCurl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
19
|
-
name: "CommandPaletteImportCurl",
|
|
20
|
-
props: {
|
|
21
|
-
workspaceStore: {},
|
|
22
|
-
eventBus: {},
|
|
23
|
-
inputValue: {}
|
|
24
|
-
},
|
|
25
|
-
emits: ["close", "back"],
|
|
26
|
-
setup(__props, { emit: __emit }) {
|
|
27
|
-
const emit = __emit;
|
|
28
|
-
const exampleKey = ref("");
|
|
29
|
-
/** Trimmed version of the example key for validation and submission */
|
|
30
|
-
const exampleKeyTrimmed = computed(() => exampleKey.value.trim());
|
|
31
|
-
/** Parse the cURL command to extract path, method, and operation details */
|
|
32
|
-
const { path, method, operation } = getOperationFromCurl(__props.inputValue);
|
|
33
|
-
/** List of all available documents (collections) in the workspace */
|
|
34
|
-
const documents = computed(() => Object.keys(__props.workspaceStore.workspace.documents).map((document) => ({
|
|
35
|
-
id: document,
|
|
36
|
-
label: document
|
|
37
|
-
})));
|
|
38
|
-
const selectedDocument = ref(documents.value[0]);
|
|
39
|
-
/**
|
|
40
|
-
* Validation message surfaced under the input.
|
|
41
|
-
*
|
|
42
|
-
* Resolves to `null` when the form is valid; otherwise to a human-readable
|
|
43
|
-
* reason the user can act on. Empty input is the default state so we keep
|
|
44
|
-
* the field free of error styling — `isDisabled` still blocks submission
|
|
45
|
-
* there, matching the {@link CommandPaletteOpenApiDocument} pattern.
|
|
46
|
-
*/
|
|
47
|
-
const errorMessage = computed(() => {
|
|
48
|
-
if (!exampleKeyTrimmed.value || !selectedDocument.value) return null;
|
|
49
|
-
if (__props.workspaceStore.workspace.documents[selectedDocument.value.id]?.paths?.[path]?.[method]) return `A ${method.toUpperCase()} operation at "${path}" already exists in "${selectedDocument.value.label}". Importing this cURL would conflict with it.`;
|
|
50
|
-
return null;
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Submit is blocked while required fields are missing or a duplicate exists.
|
|
54
|
-
* The inline `errorMessage` makes the duplicate case explicit so the user
|
|
55
|
-
* understands why import is unavailable rather than seeing a silent disable.
|
|
56
|
-
*/
|
|
57
|
-
const isDisabled = computed(() => !exampleKeyTrimmed.value || !selectedDocument.value || errorMessage.value !== null);
|
|
58
|
-
/**
|
|
59
|
-
* Handle the import submission.
|
|
60
|
-
* Creates a new operation in the selected document from the parsed cURL command.
|
|
61
|
-
*/
|
|
62
|
-
const handleImportClick = () => {
|
|
63
|
-
const documentName = selectedDocument.value;
|
|
64
|
-
if (isDisabled.value || !documentName) return;
|
|
65
|
-
/** Re-parse with the example key to include it in the operation */
|
|
66
|
-
const result = getOperationFromCurl(__props.inputValue, exampleKeyTrimmed.value);
|
|
67
|
-
__props.eventBus.emit("operation:create:operation", {
|
|
68
|
-
documentName: documentName.id,
|
|
69
|
-
path: result.path,
|
|
70
|
-
method: result.method,
|
|
71
|
-
operation: result.operation,
|
|
72
|
-
exampleKey: exampleKeyTrimmed.value,
|
|
73
|
-
callback: (success) => {
|
|
74
|
-
if (!success) return;
|
|
75
|
-
__props.workspaceStore.buildSidebar(documentName.id);
|
|
76
|
-
const normalizedPath = result.path.startsWith("/") ? result.path : `/${result.path}`;
|
|
77
|
-
__props.eventBus.emit("ui:navigate", {
|
|
78
|
-
page: "example",
|
|
79
|
-
documentSlug: documentName.id,
|
|
80
|
-
path: normalizedPath,
|
|
81
|
-
method: result.method,
|
|
82
|
-
exampleName: exampleKeyTrimmed.value
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
emit("close");
|
|
87
|
-
};
|
|
88
|
-
/** Handle back navigation when user presses backspace on empty input */
|
|
89
|
-
const handleBack = (event) => {
|
|
90
|
-
emit("back", event);
|
|
91
|
-
};
|
|
92
|
-
return (_ctx, _cache) => {
|
|
93
|
-
return openBlock(), createBlock(CommandActionForm_default, {
|
|
94
|
-
disabled: isDisabled.value,
|
|
95
|
-
onSubmit: handleImportClick
|
|
96
|
-
}, {
|
|
97
|
-
options: withCtx(() => [createElementVNode("div", _hoisted_5, [createVNode(unref(ScalarListbox), {
|
|
98
|
-
modelValue: selectedDocument.value,
|
|
99
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedDocument.value = $event),
|
|
100
|
-
options: documents.value
|
|
101
|
-
}, {
|
|
102
|
-
default: withCtx(() => [createVNode(unref(ScalarButton), {
|
|
103
|
-
class: "hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
|
|
104
|
-
variant: "outlined"
|
|
105
|
-
}, {
|
|
106
|
-
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(["whitespace-nowrap", selectedDocument.value ? "text-c-1" : "text-c-3"]) }, toDisplayString(selectedDocument.value ? selectedDocument.value.label : "Select Collection"), 3), createVNode(unref(ScalarIcon), {
|
|
107
|
-
class: "text-c-3",
|
|
108
|
-
icon: "ChevronDown",
|
|
109
|
-
size: "md"
|
|
110
|
-
})]),
|
|
111
|
-
_: 1
|
|
112
|
-
})]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["modelValue", "options"])])]),
|
|
115
|
-
submit: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode("Import Request", -1)])]),
|
|
116
|
-
default: withCtx(() => [
|
|
117
|
-
createVNode(CommandActionInput_default, {
|
|
118
|
-
modelValue: exampleKey.value,
|
|
119
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => exampleKey.value = $event),
|
|
120
|
-
placeholder: "Curl example key (e.g., example-1)",
|
|
121
|
-
onDelete: handleBack
|
|
122
|
-
}, null, 8, ["modelValue"]),
|
|
123
|
-
errorMessage.value ? (openBlock(), createElementBlock("p", _hoisted_1, toDisplayString(errorMessage.value), 1)) : createCommentVNode("", true),
|
|
124
|
-
createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createVNode(HttpMethod_default, {
|
|
125
|
-
class: "border-r-1 px-1",
|
|
126
|
-
method: unref(method)
|
|
127
|
-
}, null, 8, ["method"]), createElementVNode("span", _hoisted_4, toDisplayString(unref(operation).servers?.[0]?.url || "") + toDisplayString(unref(path)), 1)])])
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["disabled"]);
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
//#endregion
|
|
135
|
-
export { CommandPaletteImportCurl_vue_vue_type_script_setup_true_lang_default as default };
|
|
136
|
-
|
|
137
|
-
//# sourceMappingURL=CommandPaletteImportCurl.vue.script.js.map
|
package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImportCurl.vue.script.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImportCurl.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Palette Import cURL Component\n *\n * Provides a form for importing API requests from cURL commands.\n * Parses the cURL command to extract the HTTP method, URL, path, headers,\n * and body, then creates a new operation in the selected document.\n *\n * Validates that no conflicting operation exists at the same path/method.\n *\n * @example\n * <CommandPaletteImportCurl\n * :workspaceStore=\"workspaceStore\"\n * :eventBus=\"eventBus\"\n * :curl=\"curlCommand\"\n * @close=\"handleClose\"\n * @back=\"handleBack\"\n * />\n */\nexport default {\n name: 'CommandPaletteImportCurl',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarListbox,\n type ScalarComboboxOption,\n} from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, type ComputedRef } from 'vue'\n\nimport HttpMethod from '@/v2/blocks/operation-code-sample/components/HttpMethod.vue'\nimport CommandActionForm from '@/v2/features/command-palette/components/CommandActionForm.vue'\nimport CommandActionInput from '@/v2/features/command-palette/components/CommandActionInput.vue'\nimport { getOperationFromCurl } from '@/v2/features/command-palette/helpers/get-operation-from-curl'\n\nconst { workspaceStore, inputValue, eventBus } = defineProps<{\n /** The workspace store for accessing documents and operations */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting operation creation events */\n eventBus: WorkspaceEventBus\n /** The cURL command string to parse and import */\n inputValue: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the import is complete */\n (event: 'close'): void\n /** Emitted when user navigates back (e.g., backspace on empty input) */\n (event: 'back', keyboardEvent: KeyboardEvent): void\n}>()\n\nconst exampleKey = ref('')\n\n/** Trimmed version of the example key for validation and submission */\nconst exampleKeyTrimmed = computed<string>(() => exampleKey.value.trim())\n\n/** Parse the cURL command to extract path, method, and operation details */\nconst { path, method, operation } = getOperationFromCurl(inputValue)\n\n/** List of all available documents (collections) in the workspace */\nconst documents = computed(() =>\n Object.keys(workspaceStore.workspace.documents).map((document) => ({\n id: document,\n label: document,\n })),\n)\n\nconst selectedDocument = ref<ScalarComboboxOption | undefined>(\n documents.value[0],\n)\n\n/**\n * Validation message surfaced under the input.\n *\n * Resolves to `null` when the form is valid; otherwise to a human-readable\n * reason the user can act on. Empty input is the default state so we keep\n * the field free of error styling — `isDisabled` still blocks submission\n * there, matching the {@link CommandPaletteOpenApiDocument} pattern.\n */\nconst errorMessage: ComputedRef<string | null> = computed(() => {\n if (!exampleKeyTrimmed.value || !selectedDocument.value) {\n return null\n }\n\n const document = workspaceStore.workspace.documents[selectedDocument.value.id]\n\n if (document?.paths?.[path]?.[method]) {\n return `A ${method.toUpperCase()} operation at \"${path}\" already exists in \"${selectedDocument.value.label}\". Importing this cURL would conflict with it.`\n }\n\n return null\n})\n\n/**\n * Submit is blocked while required fields are missing or a duplicate exists.\n * The inline `errorMessage` makes the duplicate case explicit so the user\n * understands why import is unavailable rather than seeing a silent disable.\n */\nconst isDisabled = computed<boolean>(\n () =>\n !exampleKeyTrimmed.value ||\n !selectedDocument.value ||\n errorMessage.value !== null,\n)\n\n/**\n * Handle the import submission.\n * Creates a new operation in the selected document from the parsed cURL command.\n */\nconst handleImportClick = (): void => {\n const documentName = selectedDocument.value\n\n if (isDisabled.value || !documentName) {\n return\n }\n\n /** Re-parse with the example key to include it in the operation */\n const result = getOperationFromCurl(inputValue, exampleKeyTrimmed.value)\n\n eventBus.emit('operation:create:operation', {\n documentName: documentName.id,\n path: result.path,\n method: result.method,\n operation: result.operation,\n exampleKey: exampleKeyTrimmed.value,\n callback: (success) => {\n if (!success) {\n return\n }\n\n // build the sidebar\n workspaceStore.buildSidebar(documentName.id)\n\n const normalizedPath = result.path.startsWith('/')\n ? result.path\n : `/${result.path}`\n\n // Navigate to the new example via the event bus rather than the router\n eventBus.emit('ui:navigate', {\n page: 'example',\n documentSlug: documentName.id,\n path: normalizedPath,\n method: result.method,\n exampleName: exampleKeyTrimmed.value,\n })\n },\n })\n\n emit('close')\n}\n\n/** Handle back navigation when user presses backspace on empty input */\nconst handleBack = (event: KeyboardEvent): void => {\n emit('back', event)\n}\n</script>\n<template>\n <CommandActionForm\n :disabled=\"isDisabled\"\n @submit=\"handleImportClick\">\n <!-- Example key input -->\n <CommandActionInput\n v-model=\"exampleKey\"\n placeholder=\"Curl example key (e.g., example-1)\"\n @delete=\"handleBack\" />\n\n <p\n v-if=\"errorMessage\"\n class=\"text-red px-2 pb-1 text-xs\"\n data-testid=\"command-palette-import-curl-error\"\n role=\"alert\">\n {{ errorMessage }}\n </p>\n\n <!-- Preview of the parsed cURL request (method + URL + path) -->\n <div class=\"flex flex-1 flex-col gap-2\">\n <div\n class=\"flex h-9 flex-row items-center gap-2 rounded border p-[3px] text-sm\">\n <HttpMethod\n class=\"border-r-1 px-1\"\n :method=\"method\" />\n <span class=\"scroll-timeline-x whitespace-nowrap\">\n {{ operation.servers?.[0]?.url || '' }}{{ path }}\n </span>\n </div>\n </div>\n\n <!-- Document selector -->\n <template #options>\n <div class=\"flex items-center gap-2\">\n <ScalarListbox\n v-model=\"selectedDocument\"\n :options=\"documents\">\n <ScalarButton\n class=\"hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs\"\n variant=\"outlined\">\n <span\n class=\"whitespace-nowrap\"\n :class=\"selectedDocument ? 'text-c-1' : 'text-c-3'\">\n {{\n selectedDocument ? selectedDocument.label : 'Select Collection'\n }}\n </span>\n <ScalarIcon\n class=\"text-c-3\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarListbox>\n </div>\n </template>\n\n <template #submit>Import Request</template>\n </CommandActionForm>\n</template>\n<style scoped>\n/**\n * Custom horizontal scroll for the URL preview.\n * Hides scrollbar for a cleaner appearance while maintaining scroll functionality.\n */\n.scroll-timeline-x {\n overflow: auto;\n scroll-timeline: --scroll-timeline x;\n /* Firefox support */\n scroll-timeline: --scroll-timeline horizontal;\n /* Hide scrollbar in IE and Edge */\n -ms-overflow-style: none;\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n}\n\n/* Hide scrollbar in Chrome, Safari, and Opera */\n.scroll-timeline-x::-webkit-scrollbar {\n display: none;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;CAoBE,MAAM;;;;;;;;EA6BR,MAAM,OAAO;EAOb,MAAM,aAAa,IAAI,GAAE;;EAGzB,MAAM,oBAAoB,eAAuB,WAAW,MAAM,MAAM,CAAA;;EAGxE,MAAM,EAAE,MAAM,QAAQ,cAAc,qBAAqB,QAAA,WAAU;;EAGnE,MAAM,YAAY,eAChB,OAAO,KAAK,QAAA,eAAe,UAAU,UAAU,CAAC,KAAK,cAAc;GACjE,IAAI;GACJ,OAAO;GACR,EAAE,CACL;EAEA,MAAM,mBAAmB,IACvB,UAAU,MAAM,GAClB;;;;;;;;;EAUA,MAAM,eAA2C,eAAe;AAC9D,OAAI,CAAC,kBAAkB,SAAS,CAAC,iBAAiB,MAChD,QAAO;AAKT,OAFiB,QAAA,eAAe,UAAU,UAAU,iBAAiB,MAAM,KAE7D,QAAQ,QAAQ,QAC5B,QAAO,KAAK,OAAO,aAAa,CAAC,iBAAiB,KAAK,uBAAuB,iBAAiB,MAAM,MAAM;AAG7G,UAAO;IACR;;;;;;EAOD,MAAM,aAAa,eAEf,CAAC,kBAAkB,SACnB,CAAC,iBAAiB,SAClB,aAAa,UAAU,KAC3B;;;;;EAMA,MAAM,0BAAgC;GACpC,MAAM,eAAe,iBAAiB;AAEtC,OAAI,WAAW,SAAS,CAAC,aACvB;;GAIF,MAAM,SAAS,qBAAqB,QAAA,YAAY,kBAAkB,MAAK;AAEvE,WAAA,SAAS,KAAK,8BAA8B;IAC1C,cAAc,aAAa;IAC3B,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,WAAW,OAAO;IAClB,YAAY,kBAAkB;IAC9B,WAAW,YAAY;AACrB,SAAI,CAAC,QACH;AAIF,aAAA,eAAe,aAAa,aAAa,GAAE;KAE3C,MAAM,iBAAiB,OAAO,KAAK,WAAW,IAAG,GAC7C,OAAO,OACP,IAAI,OAAO;AAGf,aAAA,SAAS,KAAK,eAAe;MAC3B,MAAM;MACN,cAAc,aAAa;MAC3B,MAAM;MACN,QAAQ,OAAO;MACf,aAAa,kBAAkB;MAChC,CAAA;;IAEJ,CAAA;AAED,QAAK,QAAO;;;EAId,MAAM,cAAc,UAA+B;AACjD,QAAK,QAAQ,MAAK;;;uBAIlB,YAwDoB,2BAAA;IAvDjB,UAAU,WAAA;IACV,UAAQ;;IA6BE,SAAO,cAqBV,CApBN,mBAoBM,OApBN,YAoBM,CAnBJ,YAkBgB,MAAA,cAAA,EAAA;iBAjBL,iBAAA;mFAAgB,QAAA;KACxB,SAAS,UAAA;;4BAeK,CAdf,YAce,MAAA,aAAA,EAAA;MAbb,OAAM;MACN,SAAQ;;6BAOD,CANP,mBAMO,QAAA,EALL,OAAK,eAAA,CAAC,qBACE,iBAAA,QAAgB,aAAA,WAAA,CAAA,EAAA,EAAA,gBAEtB,iBAAA,QAAmB,iBAAA,MAAiB,QAAK,oBAAA,EAAA,EAAA,EAG7C,YAGc,MAAA,WAAA,EAAA;OAFZ,OAAM;OACN,MAAK;OACL,MAAK;;;;;;IAMJ,QAAM,cAAe,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAd,kBAAc,GAAA,CAAA,EAAA,CAAA;2BAhDP;KAHzB,YAGyB,4BAAA;kBAFd,WAAA;8EAAU,QAAA;MACnB,aAAY;MACX,UAAQ;;KAGH,aAAA,SAAA,WAAA,EADR,mBAMI,KANJ,YAMI,gBADC,aAAA,MAAY,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;KAIjB,mBAUM,OAVN,YAUM,CATJ,mBAQM,OARN,YAQM,CANJ,YAEqB,oBAAA;MADnB,OAAM;MACL,QAAQ,MAAA,OAAM;8BACjB,mBAEO,QAFP,YAEO,gBADF,MAAA,UAAS,CAAC,UAAO,IAAO,OAAG,GAAA,GAAA,gBAAY,MAAA,KAAI,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|