@scalar/api-client 2.42.0 → 3.0.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 +45 -0
- package/README.md +82 -74
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +3 -3
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +3 -2
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
- package/dist/components/IconSelector.vue.script.js +1 -1
- package/dist/components/Server/index.d.ts +0 -2
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +1 -3
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/hooks/{useFileDialog.d.ts → use-file-dialog.d.ts} +3 -2
- package/dist/hooks/use-file-dialog.d.ts.map +1 -0
- package/dist/hooks/{useFileDialog.js → use-file-dialog.js} +2 -2
- package/dist/hooks/use-file-dialog.js.map +1 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/dist/monacoeditorwork/editor.worker.bundle.js +222 -366
- package/dist/monacoeditorwork/json.worker.bundle.js +388 -501
- package/dist/monacoeditorwork/yaml.worker.bundle.js +14567 -22937
- package/dist/style.css +6059 -7674
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -1
- 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 +13 -10
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- 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 +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -0
- package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.js +3 -3
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -0
- package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.script.js +6 -7
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +3 -3
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +25 -4
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +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/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -1
- package/dist/{views/Components/CodeSnippet → v2/blocks/operation-code-sample}/helpers/get-snippet.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-snippet.d.ts.map +1 -0
- package/dist/{views/Components/CodeSnippet → v2/blocks/operation-code-sample}/helpers/get-snippet.js +2 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-snippet.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -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 +4 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.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 +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js +11 -13
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- 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.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +2 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +35 -12
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +3 -3
- 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.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.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 +10 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.d.ts +1 -2
- package/dist/v2/blocks/response-block/helpers/process-response-body.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
- 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 +16 -4
- 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.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +4 -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 +31 -6
- 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 +6 -8
- 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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -1
- 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 +5 -5
- 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.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +3 -3
- 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/OpenIDConnect.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -0
- 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 +6 -3
- 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/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +3 -0
- 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 +4 -1
- 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/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +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 +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.d.ts +11 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js +18 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -3
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.script.js +8 -0
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
- package/dist/{views/Collection/CollectionNavigation.vue.d.ts → v2/components/code-input/PillTooltipHost.vue.d.ts} +3 -2
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.js +7 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +40 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts +1 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +33 -20
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
- package/dist/v2/components/code-input/pill-context.d.ts +11 -0
- package/dist/v2/components/code-input/pill-context.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +3 -3
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js +5 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js.map +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 +10 -5
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/app/App.vue.script.js +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +8 -0
- package/dist/v2/features/app/app-events.js.map +1 -1
- package/dist/v2/features/app/app-state.js +6 -6
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +21 -12
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js.map +1 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js +4 -4
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +4 -4
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.script.js +2 -2
- package/dist/v2/features/app/components/DesktopTab.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts +3 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js +30 -30
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js.map +1 -1
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts +14 -0
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/create-temp-operation.js +52 -0
- package/dist/v2/features/app/helpers/create-temp-operation.js.map +1 -0
- package/dist/v2/features/app/helpers/routes.d.ts +2 -2
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -5
- package/dist/v2/features/app/helpers/routes.js.map +1 -1
- package/dist/v2/features/app/index.js +2 -2
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js +1 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +1 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts +16 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +220 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +1 -0
- package/dist/{components/Sidebar/SidebarButton.vue.d.ts → v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts} +8 -6
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js +45 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js.map +1 -0
- package/dist/{components/Form/LabelInput.vue.d.ts → v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts} +12 -8
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js +73 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js.map +1 -0
- package/dist/{components/AddressBar/AddressBarHistory.vue.d.ts → v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts} +11 -5
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js +124 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts +17 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js +126 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts +18 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js +180 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js.map +1 -0
- package/dist/{components/Sidebar/Actions/EditSidebarListElement.vue.d.ts → v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts} +6 -5
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js +44 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js.map +1 -0
- package/dist/{components/DataTable/DataTableText.vue.d.ts → v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts} +6 -4
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js +53 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts +23 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js +75 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts +3 -0
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts +73 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +190 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts +46 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js +114 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/index.d.ts +2 -0
- package/dist/v2/features/collection/components/Runner/index.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Tabs.vue.js.map +1 -1
- package/dist/v2/features/collection/components/Tabs.vue.script.js +3 -2
- package/dist/v2/features/collection/components/Tabs.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +1 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +1 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js.map +1 -1
- package/dist/{libs → v2/features/command-palette/helpers}/parse-curl.d.ts +2 -2
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts.map +1 -0
- package/dist/{libs → v2/features/command-palette/helpers}/parse-curl.js +1 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.js.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +1 -1
- package/dist/v2/features/command-palette/index.d.ts +2 -0
- package/dist/v2/features/command-palette/index.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.js +3 -1
- package/dist/v2/features/editor/helpers/configure-language-support.js +3 -3
- package/dist/v2/features/editor/helpers/configure-language-support.js.map +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js.map +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js.map +1 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +4 -4
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +5 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +70 -13
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +8 -3
- 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 +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +4 -3
- 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 +12 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
- package/dist/v2/features/modal/helpers/types.d.ts +8 -0
- package/dist/v2/features/modal/helpers/types.d.ts.map +1 -0
- package/dist/v2/features/modal/index.d.ts +1 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +3 -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 +3 -1
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.script.js +1 -1
- package/dist/v2/features/settings/components/Appearance.vue.d.ts +2 -2
- package/dist/v2/helpers/safe-run.d.ts +10 -0
- package/dist/v2/helpers/safe-run.d.ts.map +1 -0
- package/dist/v2/helpers/safe-run.js +19 -0
- package/dist/v2/helpers/safe-run.js.map +1 -0
- package/package.json +149 -170
- package/dist/assets/keycap.ascii.virtual.js +0 -6
- package/dist/assets/keycap.ascii.virtual.js.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts +0 -20
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.js +0 -9
- package/dist/components/AddressBar/AddressBar.vue.js.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.script.js +0 -204
- package/dist/components/AddressBar/AddressBar.vue.script.js.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -9
- package/dist/components/AddressBar/AddressBarHistory.vue.js.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js +0 -85
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +0 -1
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -22
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +0 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -20
- package/dist/components/AddressBar/httpStatusCodeColors.js.map +0 -1
- package/dist/components/AddressBar/index.d.ts +0 -2
- package/dist/components/AddressBar/index.d.ts.map +0 -1
- package/dist/components/AddressBar/index.js +0 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -101
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +0 -1
- package/dist/components/CodeInput/CodeInput.vue.js +0 -10
- package/dist/components/CodeInput/CodeInput.vue.js.map +0 -1
- package/dist/components/CodeInput/CodeInput.vue.script.js +0 -294
- package/dist/components/CodeInput/CodeInput.vue.script.js.map +0 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +0 -17
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +0 -1
- package/dist/components/CodeInput/codeVariableWidget.js +0 -135
- package/dist/components/CodeInput/codeVariableWidget.js.map +0 -1
- package/dist/components/CodeInput/index.d.ts +0 -2
- package/dist/components/CodeInput/index.d.ts.map +0 -1
- package/dist/components/CodeInput/index.js +0 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +0 -31
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -7
- package/dist/components/CommandPalette/CommandActionForm.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js +0 -42
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +0 -15
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -7
- package/dist/components/CommandPalette/CommandActionInput.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js +0 -55
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js +0 -78
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +0 -16
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js +0 -104
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js +0 -181
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts +0 -20
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -9
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js +0 -108
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +0 -16
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js +0 -108
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js +0 -70
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js +0 -49
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +0 -217
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.js.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js +0 -323
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +0 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -7
- package/dist/components/CommandPalette/WatchModeToggle.vue.js.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js +0 -40
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/index.d.ts +0 -2
- package/dist/components/CommandPalette/index.d.ts.map +0 -1
- package/dist/components/CommandPalette/index.js +0 -2
- package/dist/components/DataTable/DataTable.vue.d.ts +0 -23
- package/dist/components/DataTable/DataTable.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTable.vue.js +0 -7
- package/dist/components/DataTable/DataTable.vue.js.map +0 -1
- package/dist/components/DataTable/DataTable.vue.script.js +0 -30
- package/dist/components/DataTable/DataTable.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts +0 -20
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.js +0 -7
- package/dist/components/DataTable/DataTableCell.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.script.js +0 -21
- package/dist/components/DataTable/DataTableCell.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +0 -15
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -7
- package/dist/components/DataTable/DataTableCheckbox.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js +0 -43
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.d.ts +0 -14
- package/dist/components/DataTable/DataTableHeader.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.js +0 -7
- package/dist/components/DataTable/DataTableHeader.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.script.js +0 -20
- package/dist/components/DataTable/DataTableHeader.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +0 -54
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.js +0 -9
- package/dist/components/DataTable/DataTableInput.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.script.js +0 -164
- package/dist/components/DataTable/DataTableInput.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +0 -17
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -7
- package/dist/components/DataTable/DataTableInputSelect.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js +0 -150
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableRow.vue.d.ts +0 -14
- package/dist/components/DataTable/DataTableRow.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableRow.vue.js +0 -13
- package/dist/components/DataTable/DataTableRow.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.js +0 -7
- package/dist/components/DataTable/DataTableText.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.script.js +0 -20
- package/dist/components/DataTable/DataTableText.vue.script.js.map +0 -1
- package/dist/components/DataTable/index.d.ts +0 -9
- package/dist/components/DataTable/index.d.ts.map +0 -1
- package/dist/components/DataTable/index.js +0 -9
- package/dist/components/EmptyState.vue.d.ts +0 -4
- package/dist/components/EmptyState.vue.d.ts.map +0 -1
- package/dist/components/EmptyState.vue.js +0 -9
- package/dist/components/EmptyState.vue.js.map +0 -1
- package/dist/components/EmptyState.vue.script.js +0 -41
- package/dist/components/EmptyState.vue.script.js.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +0 -4
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -7
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js +0 -111
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js.map +0 -1
- package/dist/components/Form/Form.vue.d.ts +0 -26
- package/dist/components/Form/Form.vue.d.ts.map +0 -1
- package/dist/components/Form/Form.vue.js +0 -7
- package/dist/components/Form/Form.vue.js.map +0 -1
- package/dist/components/Form/Form.vue.script.js +0 -82
- package/dist/components/Form/Form.vue.script.js.map +0 -1
- package/dist/components/Form/LabelInput.vue.d.ts.map +0 -1
- package/dist/components/Form/LabelInput.vue.js +0 -9
- package/dist/components/Form/LabelInput.vue.js.map +0 -1
- package/dist/components/Form/LabelInput.vue.script.js +0 -39
- package/dist/components/Form/LabelInput.vue.script.js.map +0 -1
- package/dist/components/HttpMethod/index.js +0 -2
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +0 -8
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +0 -7
- package/dist/components/ImportCollection/DropEventListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/DropEventListener.vue.script.js +0 -91
- package/dist/components/ImportCollection/DropEventListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +0 -14
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -7
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js +0 -102
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +0 -13
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -8
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js +0 -206
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +0 -13
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -7
- package/dist/components/ImportCollection/ImportNowButton.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js +0 -82
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +0 -8
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -7
- package/dist/components/ImportCollection/PasteEventListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js +0 -31
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts +0 -7
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.js +0 -7
- package/dist/components/ImportCollection/PrefetchError.vue.js.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.script.js +0 -32
- package/dist/components/ImportCollection/PrefetchError.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +0 -8
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -7
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js +0 -21
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +0 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -7
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js +0 -114
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -39
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +0 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -109
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js.map +0 -1
- package/dist/components/ImportCollection/index.d.ts +0 -2
- package/dist/components/ImportCollection/index.d.ts.map +0 -1
- package/dist/components/ImportCollection/index.js +0 -2
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts +0 -5
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -26
- package/dist/components/ImportCollection/utils/get-openapi-version.js.map +0 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +0 -12
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/import-collection.js +0 -23
- package/dist/components/ImportCollection/utils/import-collection.js.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.d.ts +0 -3
- package/dist/components/ImportCollection/utils/is-document.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.js +0 -12
- package/dist/components/ImportCollection/utils/is-document.js.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.d.ts +0 -5
- package/dist/components/ImportCollection/utils/is-url.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.js +0 -14
- package/dist/components/ImportCollection/utils/is-url.js.map +0 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +0 -6
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -13
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js.map +0 -1
- package/dist/components/OpenApiClientButton.vue.d.ts.map +0 -1
- package/dist/components/OpenApiClientButton.vue.js.map +0 -1
- package/dist/components/OpenApiClientButton.vue.script.js.map +0 -1
- package/dist/components/Search/useSearch.d.ts +0 -33
- package/dist/components/Search/useSearch.d.ts.map +0 -1
- package/dist/components/Search/useSearch.js +0 -110
- package/dist/components/Search/useSearch.js.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts +0 -12
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.js +0 -7
- package/dist/components/Server/ServerDropdown.vue.js.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.script.js +0 -133
- package/dist/components/Server/ServerDropdown.vue.script.js.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +0 -19
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +0 -9
- package/dist/components/Server/ServerDropdownItem.vue.js.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.script.js +0 -90
- package/dist/components/Server/ServerDropdownItem.vue.script.js.map +0 -1
- package/dist/components/Server/ServerSelector.vue.d.ts +0 -17
- package/dist/components/Server/ServerSelector.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerSelector.vue.js +0 -7
- package/dist/components/Server/ServerSelector.vue.js.map +0 -1
- package/dist/components/Server/ServerSelector.vue.script.js +0 -87
- package/dist/components/Server/ServerSelector.vue.script.js.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.js +0 -9
- package/dist/components/SideNav/DownloadAppButton.vue.js.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.script.js +0 -31
- package/dist/components/SideNav/DownloadAppButton.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.d.ts +0 -4
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.js +0 -7
- package/dist/components/SideNav/SideHelp.vue.js.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.script.js +0 -102
- package/dist/components/SideNav/SideHelp.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNav.vue.d.ts +0 -4
- package/dist/components/SideNav/SideNav.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNav.vue.js +0 -7
- package/dist/components/SideNav/SideNav.vue.js.map +0 -1
- package/dist/components/SideNav/SideNav.vue.script.js +0 -80
- package/dist/components/SideNav/SideNav.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.d.ts +0 -14
- package/dist/components/SideNav/SideNavGroup.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.js +0 -7
- package/dist/components/SideNav/SideNavGroup.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.script.js +0 -16
- package/dist/components/SideNav/SideNavGroup.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -23
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.js +0 -7
- package/dist/components/SideNav/SideNavLink.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.script.js +0 -32
- package/dist/components/SideNav/SideNavLink.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +0 -21
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -7
- package/dist/components/SideNav/SideNavRouterLink.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js +0 -34
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +0 -14
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -7
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js +0 -56
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -7
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js +0 -31
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +0 -23
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.js +0 -9
- package/dist/components/Sidebar/Sidebar.vue.js.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.script.js +0 -71
- package/dist/components/Sidebar/Sidebar.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -7
- package/dist/components/Sidebar/SidebarButton.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.script.js +0 -36
- package/dist/components/Sidebar/SidebarButton.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarList.vue.d.ts +0 -14
- package/dist/components/Sidebar/SidebarList.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarList.vue.js +0 -13
- package/dist/components/Sidebar/SidebarList.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +0 -44
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +0 -10
- package/dist/components/Sidebar/SidebarListElement.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.script.js +0 -128
- package/dist/components/Sidebar/SidebarListElement.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +0 -21
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -7
- package/dist/components/Sidebar/SidebarListElementActions.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js +0 -97
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +0 -4
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +0 -7
- package/dist/components/Sidebar/SidebarToggle.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.script.js +0 -47
- package/dist/components/Sidebar/SidebarToggle.vue.script.js.map +0 -1
- package/dist/components/Sidebar/index.d.ts +0 -2
- package/dist/components/Sidebar/index.d.ts.map +0 -1
- package/dist/components/Sidebar/index.js +0 -2
- package/dist/components/TopNav/TopNav.vue.d.ts +0 -10
- package/dist/components/TopNav/TopNav.vue.d.ts.map +0 -1
- package/dist/components/TopNav/TopNav.vue.js +0 -7
- package/dist/components/TopNav/TopNav.vue.js.map +0 -1
- package/dist/components/TopNav/TopNav.vue.script.js +0 -232
- package/dist/components/TopNav/TopNav.vue.script.js.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts +0 -24
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.js +0 -9
- package/dist/components/TopNav/TopNavItem.vue.js.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.script.js +0 -129
- package/dist/components/TopNav/TopNavItem.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +0 -33
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js +0 -84
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/index.d.ts +0 -2
- package/dist/components/ViewLayout/index.d.ts.map +0 -1
- package/dist/components/ViewLayout/index.js +0 -2
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -4
- package/dist/constants.d.ts +0 -26
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -27
- package/dist/constants.js.map +0 -1
- package/dist/data/httpHeaders.d.ts +0 -7
- package/dist/data/httpHeaders.d.ts.map +0 -1
- package/dist/data/httpHeaders.js +0 -539
- package/dist/data/httpHeaders.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/useClientConfig.d.ts +0 -198
- package/dist/hooks/useClientConfig.d.ts.map +0 -1
- package/dist/hooks/useClientConfig.js +0 -23
- package/dist/hooks/useClientConfig.js.map +0 -1
- package/dist/hooks/useFileDialog.d.ts.map +0 -1
- package/dist/hooks/useFileDialog.js.map +0 -1
- package/dist/hooks/useLayout.d.ts +0 -17
- package/dist/hooks/useLayout.d.ts.map +0 -1
- package/dist/hooks/useLayout.js +0 -13
- package/dist/hooks/useLayout.js.map +0 -1
- package/dist/hooks/useResponseBody.d.ts +0 -19
- package/dist/hooks/useResponseBody.d.ts.map +0 -1
- package/dist/hooks/useResponseBody.js +0 -32
- package/dist/hooks/useResponseBody.js.map +0 -1
- package/dist/hooks/useSidebar.d.ts +0 -26
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -36
- package/dist/hooks/useSidebar.js.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts +0 -14
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.js +0 -8
- package/dist/layouts/App/ApiClientApp.vue.js.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.script.js +0 -80
- package/dist/layouts/App/ApiClientApp.vue.script.js.map +0 -1
- package/dist/layouts/App/MainLayout.vue.d.ts +0 -14
- package/dist/layouts/App/MainLayout.vue.d.ts.map +0 -1
- package/dist/layouts/App/MainLayout.vue.js +0 -7
- package/dist/layouts/App/MainLayout.vue.js.map +0 -1
- package/dist/layouts/App/MainLayout.vue.script.js +0 -22
- package/dist/layouts/App/MainLayout.vue.script.js.map +0 -1
- package/dist/layouts/App/create-api-client-app.d.ts +0 -4059
- package/dist/layouts/App/create-api-client-app.d.ts.map +0 -1
- package/dist/layouts/App/create-api-client-app.js +0 -36
- package/dist/layouts/App/create-api-client-app.js.map +0 -1
- package/dist/layouts/App/hotkeys.d.ts +0 -6
- package/dist/layouts/App/hotkeys.d.ts.map +0 -1
- package/dist/layouts/App/hotkeys.js +0 -74
- package/dist/layouts/App/hotkeys.js.map +0 -1
- package/dist/layouts/App/index.d.ts +0 -3
- package/dist/layouts/App/index.d.ts.map +0 -1
- package/dist/layouts/App/index.js +0 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +0 -7
- package/dist/layouts/Modal/ApiClientModal.vue.js.map +0 -1
- package/dist/layouts/Modal/ApiClientModal.vue.script.js +0 -41
- package/dist/layouts/Modal/ApiClientModal.vue.script.js.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +0 -12
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.js +0 -34
- package/dist/layouts/Modal/create-api-client-modal.js.map +0 -1
- package/dist/layouts/Modal/index.d.ts +0 -3
- package/dist/layouts/Modal/index.d.ts.map +0 -1
- package/dist/layouts/Modal/index.js +0 -2
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +0 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +0 -8
- package/dist/layouts/Web/ApiClientWeb.vue.js.map +0 -1
- package/dist/layouts/Web/ApiClientWeb.vue.script.js +0 -68
- package/dist/layouts/Web/ApiClientWeb.vue.script.js.map +0 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +0 -4056
- package/dist/layouts/Web/create-api-client-web.d.ts.map +0 -1
- package/dist/layouts/Web/create-api-client-web.js +0 -33
- package/dist/layouts/Web/create-api-client-web.js.map +0 -1
- package/dist/layouts/Web/index.d.ts +0 -3
- package/dist/layouts/Web/index.d.ts.map +0 -1
- package/dist/layouts/Web/index.js +0 -3
- package/dist/libs/create-client.d.ts +0 -4127
- package/dist/libs/create-client.d.ts.map +0 -1
- package/dist/libs/create-client.js +0 -178
- package/dist/libs/create-client.js.map +0 -1
- package/dist/libs/electron.d.ts +0 -5
- package/dist/libs/electron.d.ts.map +0 -1
- package/dist/libs/electron.js +0 -9
- package/dist/libs/electron.js.map +0 -1
- package/dist/libs/env-helpers.d.ts +0 -17
- package/dist/libs/env-helpers.d.ts.map +0 -1
- package/dist/libs/env-helpers.js +0 -9
- package/dist/libs/env-helpers.js.map +0 -1
- package/dist/libs/environment-parser.d.ts +0 -8
- package/dist/libs/environment-parser.d.ts.map +0 -1
- package/dist/libs/environment-parser.js +0 -19
- package/dist/libs/environment-parser.js.map +0 -1
- package/dist/libs/errors.d.ts +0 -23
- package/dist/libs/errors.d.ts.map +0 -1
- package/dist/libs/errors.js +0 -34
- package/dist/libs/errors.js.map +0 -1
- package/dist/libs/event-bus.d.ts +0 -41
- package/dist/libs/event-bus.d.ts.map +0 -1
- package/dist/libs/event-bus.js +0 -43
- package/dist/libs/event-bus.js.map +0 -1
- package/dist/libs/extractAttachmentFilename.d.ts +0 -5
- package/dist/libs/extractAttachmentFilename.d.ts.map +0 -1
- package/dist/libs/extractAttachmentFilename.js +0 -23
- package/dist/libs/extractAttachmentFilename.js.map +0 -1
- package/dist/libs/find-request.d.ts +0 -75
- package/dist/libs/find-request.d.ts.map +0 -1
- package/dist/libs/find-request.js +0 -40
- package/dist/libs/find-request.js.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +0 -7
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.js +0 -19
- package/dist/libs/get-request-uid-by-path-method.js.map +0 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts +0 -10
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +0 -1
- package/dist/libs/getOpenApiDocumentDetails.js +0 -45
- package/dist/libs/getOpenApiDocumentDetails.js.map +0 -1
- package/dist/libs/hot-keys.d.ts +0 -35
- package/dist/libs/hot-keys.d.ts.map +0 -1
- package/dist/libs/hot-keys.js +0 -92
- package/dist/libs/hot-keys.js.map +0 -1
- package/dist/libs/importers/curl.d.ts +0 -27
- package/dist/libs/importers/curl.d.ts.map +0 -1
- package/dist/libs/importers/curl.js +0 -54
- package/dist/libs/importers/curl.js.map +0 -1
- package/dist/libs/importers/index.d.ts +0 -2
- package/dist/libs/importers/index.d.ts.map +0 -1
- package/dist/libs/importers/index.js +0 -2
- package/dist/libs/index.d.ts +0 -15
- package/dist/libs/index.d.ts.map +0 -1
- package/dist/libs/index.js +0 -17
- package/dist/libs/isUrl.d.ts +0 -3
- package/dist/libs/isUrl.d.ts.map +0 -1
- package/dist/libs/isUrl.js +0 -12
- package/dist/libs/isUrl.js.map +0 -1
- package/dist/libs/local-storage.d.ts +0 -9
- package/dist/libs/local-storage.d.ts.map +0 -1
- package/dist/libs/local-storage.js +0 -40
- package/dist/libs/local-storage.js.map +0 -1
- package/dist/libs/normalize-headers.d.ts +0 -14
- package/dist/libs/normalize-headers.d.ts.map +0 -1
- package/dist/libs/normalize-headers.js +0 -55
- package/dist/libs/normalize-headers.js.map +0 -1
- package/dist/libs/parse-curl.d.ts.map +0 -1
- package/dist/libs/parse-curl.js.map +0 -1
- package/dist/libs/postman.d.ts +0 -11
- package/dist/libs/postman.d.ts.map +0 -1
- package/dist/libs/postman.js +0 -40
- package/dist/libs/postman.js.map +0 -1
- package/dist/libs/send-request/build-request-security.d.ts +0 -19
- package/dist/libs/send-request/build-request-security.d.ts.map +0 -1
- package/dist/libs/send-request/build-request-security.js +0 -41
- package/dist/libs/send-request/build-request-security.js.map +0 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +0 -18
- package/dist/libs/send-request/create-fetch-body.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-body.js +0 -44
- package/dist/libs/send-request/create-fetch-body.js.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.d.ts +0 -4
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.js +0 -15
- package/dist/libs/send-request/create-fetch-headers.js.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts +0 -11
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.js +0 -43
- package/dist/libs/send-request/create-fetch-query-params.js.map +0 -1
- package/dist/libs/send-request/create-request-operation.d.ts +0 -32
- package/dist/libs/send-request/create-request-operation.d.ts.map +0 -1
- package/dist/libs/send-request/create-request-operation.js +0 -172
- package/dist/libs/send-request/create-request-operation.js.map +0 -1
- package/dist/libs/send-request/decode-buffer.d.ts +0 -3
- package/dist/libs/send-request/decode-buffer.d.ts.map +0 -1
- package/dist/libs/send-request/decode-buffer.js +0 -13
- package/dist/libs/send-request/decode-buffer.js.map +0 -1
- package/dist/libs/send-request/index.d.ts +0 -4
- package/dist/libs/send-request/index.d.ts.map +0 -1
- package/dist/libs/send-request/index.js +0 -4
- package/dist/libs/send-request/set-request-cookies.d.ts +0 -27
- package/dist/libs/send-request/set-request-cookies.d.ts.map +0 -1
- package/dist/libs/send-request/set-request-cookies.js +0 -82
- package/dist/libs/send-request/set-request-cookies.js.map +0 -1
- package/dist/libs/string-template.d.ts +0 -21
- package/dist/libs/string-template.d.ts.map +0 -1
- package/dist/libs/string-template.js +0 -64
- package/dist/libs/string-template.js.map +0 -1
- package/dist/libs/validate-parameters.d.ts +0 -14
- package/dist/libs/validate-parameters.d.ts.map +0 -1
- package/dist/libs/validate-parameters.js +0 -35
- package/dist/libs/validate-parameters.js.map +0 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +0 -8
- package/dist/plugins/hooks/usePluginManager.d.ts.map +0 -1
- package/dist/plugins/hooks/usePluginManager.js +0 -16
- package/dist/plugins/hooks/usePluginManager.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -3
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -3
- package/dist/plugins/plugin-manager.d.ts +0 -34
- package/dist/plugins/plugin-manager.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.js +0 -38
- package/dist/plugins/plugin-manager.js.map +0 -1
- package/dist/routes.d.ts +0 -19
- package/dist/routes.d.ts.map +0 -1
- package/dist/routes.js +0 -225
- package/dist/routes.js.map +0 -1
- package/dist/store/active-entities.d.ts +0 -387
- package/dist/store/active-entities.d.ts.map +0 -1
- package/dist/store/active-entities.js +0 -139
- package/dist/store/active-entities.js.map +0 -1
- package/dist/store/collections.d.ts +0 -625
- package/dist/store/collections.d.ts.map +0 -1
- package/dist/store/collections.js +0 -76
- package/dist/store/collections.js.map +0 -1
- package/dist/store/cookies.d.ts +0 -69
- package/dist/store/cookies.d.ts.map +0 -1
- package/dist/store/cookies.js +0 -16
- package/dist/store/cookies.js.map +0 -1
- package/dist/store/environment.d.ts +0 -75
- package/dist/store/environment.d.ts.map +0 -1
- package/dist/store/environment.js +0 -38
- package/dist/store/environment.js.map +0 -1
- package/dist/store/events.d.ts +0 -35
- package/dist/store/events.d.ts.map +0 -1
- package/dist/store/events.js +0 -17
- package/dist/store/events.js.map +0 -1
- package/dist/store/import-spec.d.ts +0 -38
- package/dist/store/import-spec.d.ts.map +0 -1
- package/dist/store/import-spec.js +0 -56
- package/dist/store/import-spec.js.map +0 -1
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -3
- package/dist/store/request-example.d.ts +0 -1022
- package/dist/store/request-example.d.ts.map +0 -1
- package/dist/store/request-example.js +0 -43
- package/dist/store/request-example.js.map +0 -1
- package/dist/store/requests.d.ts +0 -675
- package/dist/store/requests.d.ts.map +0 -1
- package/dist/store/requests.js +0 -104
- package/dist/store/requests.js.map +0 -1
- package/dist/store/router-params.d.ts +0 -18
- package/dist/store/router-params.d.ts.map +0 -1
- package/dist/store/router-params.js +0 -27
- package/dist/store/router-params.js.map +0 -1
- package/dist/store/security-schemes.d.ts +0 -942
- package/dist/store/security-schemes.d.ts.map +0 -1
- package/dist/store/security-schemes.js +0 -45
- package/dist/store/security-schemes.js.map +0 -1
- package/dist/store/servers.d.ts +0 -122
- package/dist/store/servers.d.ts.map +0 -1
- package/dist/store/servers.js +0 -41
- package/dist/store/servers.js.map +0 -1
- package/dist/store/store-context.d.ts +0 -26
- package/dist/store/store-context.d.ts.map +0 -1
- package/dist/store/store.d.ts +0 -4055
- package/dist/store/store.d.ts.map +0 -1
- package/dist/store/store.js +0 -180
- package/dist/store/store.js.map +0 -1
- package/dist/store/tags.d.ts +0 -176
- package/dist/store/tags.d.ts.map +0 -1
- package/dist/store/tags.js +0 -54
- package/dist/store/tags.js.map +0 -1
- package/dist/store/workspace.d.ts +0 -232
- package/dist/store/workspace.d.ts.map +0 -1
- package/dist/store/workspace.js +0 -57
- package/dist/store/workspace.js.map +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -0
- package/dist/views/Collection/Collection.vue.d.ts +0 -4
- package/dist/views/Collection/Collection.vue.d.ts.map +0 -1
- package/dist/views/Collection/Collection.vue.js +0 -7
- package/dist/views/Collection/Collection.vue.js.map +0 -1
- package/dist/views/Collection/Collection.vue.script.js +0 -46
- package/dist/views/Collection/Collection.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +0 -9
- package/dist/views/Collection/CollectionAuthentication.vue.js.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.script.js +0 -52
- package/dist/views/Collection/CollectionAuthentication.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionCookies.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.js +0 -7
- package/dist/views/Collection/CollectionCookies.vue.js.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.script.js +0 -18
- package/dist/views/Collection/CollectionCookies.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.js +0 -8
- package/dist/views/Collection/CollectionEnvironment.vue.js.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.script.js +0 -238
- package/dist/views/Collection/CollectionEnvironment.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.js +0 -9
- package/dist/views/Collection/CollectionInfoForm.vue.js.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.script.js +0 -73
- package/dist/views/Collection/CollectionInfoForm.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +0 -7
- package/dist/views/Collection/CollectionNavigation.vue.js.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.script.js +0 -75
- package/dist/views/Collection/CollectionNavigation.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionOverview.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.js +0 -7
- package/dist/views/Collection/CollectionOverview.vue.js.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.script.js +0 -42
- package/dist/views/Collection/CollectionOverview.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionScripts.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.js +0 -7
- package/dist/views/Collection/CollectionScripts.vue.js.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.script.js +0 -18
- package/dist/views/Collection/CollectionScripts.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts +0 -11
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +0 -7
- package/dist/views/Collection/CollectionServerForm.vue.js.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.script.js +0 -76
- package/dist/views/Collection/CollectionServerForm.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.js +0 -7
- package/dist/views/Collection/CollectionServers.vue.js.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.script.js +0 -95
- package/dist/views/Collection/CollectionServers.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.js +0 -7
- package/dist/views/Collection/CollectionSettings.vue.js.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.script.js +0 -87
- package/dist/views/Collection/CollectionSettings.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionSync.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.js +0 -7
- package/dist/views/Collection/CollectionSync.vue.js.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.script.js +0 -18
- package/dist/views/Collection/CollectionSync.vue.script.js.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +0 -14
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -9
- package/dist/views/Collection/components/EnvironmentForm.vue.js.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js +0 -284
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +0 -17
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.js +0 -9
- package/dist/views/Collection/components/MarkdownInput.vue.js.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.script.js +0 -92
- package/dist/views/Collection/components/MarkdownInput.vue.script.js.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +0 -16
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -7
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js +0 -74
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts +0 -28
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -66
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +0 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -86
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js.map +0 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +0 -5
- package/dist/views/Components/CodeSnippet/index.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/index.js +0 -5
- package/dist/views/Cookies/CookieForm.vue.d.ts +0 -4
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +0 -1
- package/dist/views/Cookies/CookieForm.vue.js +0 -7
- package/dist/views/Cookies/CookieForm.vue.js.map +0 -1
- package/dist/views/Cookies/CookieForm.vue.script.js +0 -50
- package/dist/views/Cookies/CookieForm.vue.script.js.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.d.ts +0 -22
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.js +0 -9
- package/dist/views/Cookies/CookieModal.vue.js.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.script.js +0 -83
- package/dist/views/Cookies/CookieModal.vue.script.js.map +0 -1
- package/dist/views/Cookies/CookieRaw.vue.d.ts +0 -4
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +0 -1
- package/dist/views/Cookies/Cookies.vue.d.ts +0 -4
- package/dist/views/Cookies/Cookies.vue.d.ts.map +0 -1
- package/dist/views/Cookies/Cookies.vue.js +0 -7
- package/dist/views/Cookies/Cookies.vue.js.map +0 -1
- package/dist/views/Cookies/Cookies.vue.script.js +0 -156
- package/dist/views/Cookies/Cookies.vue.script.js.map +0 -1
- package/dist/views/Environment/Environment.vue.d.ts +0 -4
- package/dist/views/Environment/Environment.vue.d.ts.map +0 -1
- package/dist/views/Environment/Environment.vue.js +0 -7
- package/dist/views/Environment/Environment.vue.js.map +0 -1
- package/dist/views/Environment/Environment.vue.script.js +0 -384
- package/dist/views/Environment/Environment.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +0 -15
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -7
- package/dist/views/Environment/EnvironmentColorModal.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js +0 -47
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +0 -14
- package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.js +0 -7
- package/dist/views/Environment/EnvironmentColors.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.script.js +0 -126
- package/dist/views/Environment/EnvironmentColors.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +0 -27
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +0 -7
- package/dist/views/Environment/EnvironmentModal.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.script.js +0 -122
- package/dist/views/Environment/EnvironmentModal.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +0 -22
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -7
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js +0 -133
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js.map +0 -1
- package/dist/views/Environment/handle-drag.d.ts +0 -13
- package/dist/views/Environment/handle-drag.d.ts.map +0 -1
- package/dist/views/Environment/handle-drag.js +0 -38
- package/dist/views/Environment/handle-drag.js.map +0 -1
- package/dist/views/Request/Request.vue.d.ts +0 -21
- package/dist/views/Request/Request.vue.d.ts.map +0 -1
- package/dist/views/Request/Request.vue.js +0 -9
- package/dist/views/Request/Request.vue.js.map +0 -1
- package/dist/views/Request/Request.vue.script.js +0 -117
- package/dist/views/Request/Request.vue.script.js.map +0 -1
- package/dist/views/Request/RequestRoot.vue.d.ts +0 -14
- package/dist/views/Request/RequestRoot.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestRoot.vue.js +0 -9
- package/dist/views/Request/RequestRoot.vue.js.map +0 -1
- package/dist/views/Request/RequestRoot.vue.script.js +0 -158
- package/dist/views/Request/RequestRoot.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +0 -22
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js +0 -52
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +0 -31
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +0 -214
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +0 -10
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js +0 -106
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +0 -222
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js +0 -216
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +0 -220
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js +0 -116
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +0 -43
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js +0 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +0 -31
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js +0 -205
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -39
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestBody.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js +0 -477
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +0 -15
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js +0 -187
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +0 -25
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestParams.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js +0 -180
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +0 -18
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js +0 -115
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +0 -20
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestSection.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js +0 -297
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +0 -47
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestTable.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js +0 -266
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +0 -8
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js +0 -64
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts +0 -6
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -38
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +0 -6
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -17
- package/dist/views/Request/RequestSection/helpers/getting-started.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +0 -8
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -22
- package/dist/views/Request/RequestSection/helpers/update-scheme.js.map +0 -1
- package/dist/views/Request/RequestSection/index.d.ts +0 -3
- package/dist/views/Request/RequestSection/index.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/index.js +0 -3
- package/dist/views/Request/RequestSidebar.vue.d.ts +0 -16
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebar.vue.js +0 -9
- package/dist/views/Request/RequestSidebar.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebar.vue.script.js +0 -307
- package/dist/views/Request/RequestSidebar.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +0 -43
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +0 -10
- package/dist/views/Request/RequestSidebarItem.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.script.js +0 -475
- package/dist/views/Request/RequestSidebarItem.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +0 -16
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -9
- package/dist/views/Request/RequestSidebarItemMenu.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js +0 -222
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +0 -22
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +0 -9
- package/dist/views/Request/RequestSubpageHeader.vue.js.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.script.js +0 -92
- package/dist/views/Request/RequestSubpageHeader.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -7
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js +0 -77
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +0 -14
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js +0 -91
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js +0 -35
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js +0 -64
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js +0 -54
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.d.ts +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js +0 -85
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js +0 -25
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +0 -13
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -8
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js +0 -51
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js +0 -39
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +0 -98
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js +0 -77
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js +0 -44
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +0 -8
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +0 -64
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +0 -15
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js +0 -206
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/index.d.ts +0 -3
- package/dist/views/Request/ResponseSection/index.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/index.js +0 -3
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts +0 -4
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +0 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -7
- package/dist/views/Request/components/WorkspaceDropdown.vue.js.map +0 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js +0 -182
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js.map +0 -1
- package/dist/views/Request/components/index.d.ts +0 -2
- package/dist/views/Request/components/index.d.ts.map +0 -1
- package/dist/views/Request/components/index.js +0 -2
- package/dist/views/Request/consts/index.d.ts +0 -3
- package/dist/views/Request/consts/index.d.ts.map +0 -1
- package/dist/views/Request/consts/index.js +0 -3
- package/dist/views/Request/consts/mediaTypes.d.ts +0 -20
- package/dist/views/Request/consts/mediaTypes.d.ts.map +0 -1
- package/dist/views/Request/consts/mediaTypes.js +0 -231
- package/dist/views/Request/consts/mediaTypes.js.map +0 -1
- package/dist/views/Request/consts/new-auth-options.d.ts +0 -107
- package/dist/views/Request/consts/new-auth-options.d.ts.map +0 -1
- package/dist/views/Request/consts/new-auth-options.js +0 -90
- package/dist/views/Request/consts/new-auth-options.js.map +0 -1
- package/dist/views/Request/handle-drag.d.ts +0 -9
- package/dist/views/Request/handle-drag.d.ts.map +0 -1
- package/dist/views/Request/handle-drag.js +0 -51
- package/dist/views/Request/handle-drag.js.map +0 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts +0 -9
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +0 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -96
- package/dist/views/Request/hooks/useOpenApiWatcher.js.map +0 -1
- package/dist/views/Request/libs/auth.d.ts +0 -27
- package/dist/views/Request/libs/auth.d.ts.map +0 -1
- package/dist/views/Request/libs/auth.js +0 -74
- package/dist/views/Request/libs/auth.js.map +0 -1
- package/dist/views/Request/libs/index.d.ts +0 -4
- package/dist/views/Request/libs/index.d.ts.map +0 -1
- package/dist/views/Request/libs/index.js +0 -4
- package/dist/views/Request/libs/oauth2.d.ts +0 -43
- package/dist/views/Request/libs/oauth2.d.ts.map +0 -1
- package/dist/views/Request/libs/oauth2.js +0 -178
- package/dist/views/Request/libs/oauth2.js.map +0 -1
- package/dist/views/Request/libs/request.d.ts +0 -21
- package/dist/views/Request/libs/request.d.ts.map +0 -1
- package/dist/views/Request/libs/request.js +0 -46
- package/dist/views/Request/libs/request.js.map +0 -1
- package/dist/views/Request/libs/watch-mode.d.ts +0 -60
- package/dist/views/Request/libs/watch-mode.d.ts.map +0 -1
- package/dist/views/Request/libs/watch-mode.js +0 -375
- package/dist/views/Request/libs/watch-mode.js.map +0 -1
- package/dist/views/Request/types/index.d.ts +0 -2
- package/dist/views/Request/types/index.d.ts.map +0 -1
- package/dist/views/Request/types/index.js +0 -0
- package/dist/views/Request/types/sidebar-item.d.ts +0 -30
- package/dist/views/Request/types/sidebar-item.d.ts.map +0 -1
- package/dist/views/Settings/Settings.vue.d.ts +0 -5
- package/dist/views/Settings/Settings.vue.d.ts.map +0 -1
- package/dist/views/Settings/Settings.vue.js +0 -7
- package/dist/views/Settings/Settings.vue.js.map +0 -1
- package/dist/views/Settings/Settings.vue.script.js +0 -28
- package/dist/views/Settings/Settings.vue.script.js.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts +0 -4
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +0 -7
- package/dist/views/Settings/SettingsGeneral.vue.js.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.script.js +0 -241
- package/dist/views/Settings/SettingsGeneral.vue.script.js.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts +0 -4
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -7
- package/dist/views/Settings/components/SettingsAppearance.vue.js.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js +0 -62
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +0 -15
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.js +0 -7
- package/dist/views/Settings/components/SettingsSection.vue.js.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.script.js +0 -27
- package/dist/views/Settings/components/SettingsSection.vue.script.js.map +0 -1
- /package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-events.js","names":[],"sources":["../../../../src/v2/features/app/app-events.ts"],"sourcesContent":["import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { OperationExampleMeta, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { type ShallowRef, computed } from 'vue'\nimport { type NavigationFailure, NavigationFailureType, type Router } from 'vue-router'\n\nimport type { ScalarClientAppRouteParams } from '@/v2/features/app/helpers/routes'\nimport { initializeWorkspaceEventHandlers } from '@/v2/workspace-events'\n\nexport function initializeAppEventHandlers({\n eventBus,\n store,\n router,\n rebuildSidebar,\n navigateToCurrentTab,\n onSelectSidebarItem,\n onAfterExampleCreation,\n onCopyTabUrl,\n onToggleSidebar,\n closeSidebar,\n renameWorkspace,\n}: {\n eventBus: WorkspaceEventBus\n store: ShallowRef<WorkspaceStore | null>\n router: Router\n rebuildSidebar: (documentName?: string) => void\n navigateToCurrentTab: () => Promise<void>\n onSelectSidebarItem: (id: string) => void\n onAfterExampleCreation: (o: OperationExampleMeta & { documentName?: string }) => void\n onCopyTabUrl: (tabIndex: number) => void\n onToggleSidebar: () => void\n closeSidebar: () => void\n renameWorkspace: (name: string) => Promise<void>\n}) {\n const currentRoute = computed(() => router.currentRoute?.value)\n\n /**\n * Checks if the current route params match the specified operation meta.\n * Useful for determining if the sidebar or UI needs to be updated after changes to operations/examples.\n *\n * NOTE: It may be beneficial to compare to the active state instead of the router\n */\n const isRouteParamsMatch = ({\n documentName,\n path,\n method,\n exampleName,\n }: {\n documentName: string\n path?: string\n method?: HttpMethod\n exampleName?: string\n }) => {\n if (documentName !== undefined && documentName !== currentRoute.value?.params.documentSlug) {\n return false\n }\n if (path !== undefined && encodeURIComponent(path) !== currentRoute.value?.params.pathEncoded) {\n return false\n }\n if (method !== undefined && method !== currentRoute.value?.params.method) {\n return false\n }\n if (exampleName !== undefined && exampleName !== currentRoute.value?.params.exampleName) {\n return false\n }\n return true\n }\n\n initializeWorkspaceEventHandlers({\n eventBus,\n store,\n hooks: {\n //------------------------------------------------------------------------------------\n // Document Related Hooks\n //------------------------------------------------------------------------------------\n 'document:delete:document': {\n onAfterExecute: async (payload) => {\n // Redirect to the workspace environment page if the document was deleted\n if (currentRoute?.value?.params.documentSlug === payload.name) {\n await router.push({\n name: 'workspace.environment',\n })\n }\n },\n },\n //------------------------------------------------------------------------------------\n // Operation Related Hooks\n //------------------------------------------------------------------------------------\n 'operation:update:pathMethod': {\n onBeforeExecute: (payload) => ({\n ...payload,\n callback: async (status) => {\n // Redirect to the new example if the mutation was successful\n if (status === 'success') {\n // Rebuild the sidebar with the updated order\n rebuildSidebar(store.value?.workspace.activeDocument?.['x-scalar-navigation']?.name)\n\n // Now this redirect works for any example\n await router.replace({\n name: 'example',\n params: {\n method: payload.payload.method,\n pathEncoded: encodeURIComponent(payload.payload.path),\n exampleName: currentRoute.value?.params.exampleName,\n },\n })\n }\n\n payload.callback(status, payload.blurTargetSelector)\n },\n }),\n },\n 'operation:upsert:parameter': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:update:extra-parameters': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:reload:history': {\n onAfterExecute: (payload) => onAfterExampleCreation({ ...payload.meta, exampleKey: 'draft' }),\n },\n 'operation:delete:operation': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n const {\n documentName,\n meta: { path, method },\n } = payload\n // Navigate to the document overview page if the operation was deleted\n if (\n isRouteParamsMatch({\n documentName,\n path,\n method,\n })\n ) {\n await router.replace({\n name: 'document.overview',\n params: {\n documentSlug: documentName,\n },\n })\n }\n },\n },\n 'operation:create:draft-example': {\n onAfterExecute: async (payload) => {\n onAfterExampleCreation({ ...payload.meta, exampleKey: payload.exampleName })\n await router.push({\n name: 'example',\n params: {\n documentSlug: payload.documentName,\n pathEncoded: encodeURIComponent(payload.meta.path),\n method: payload.meta.method,\n exampleName: payload.exampleName,\n },\n })\n },\n },\n 'operation:delete:example': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n\n const {\n documentName,\n meta: { path, method, exampleKey },\n } = payload\n // Navigate to the default example if the example was deleted\n if (\n isRouteParamsMatch({\n documentName,\n path,\n method,\n exampleName: exampleKey,\n })\n ) {\n await router.replace({\n name: 'example',\n params: {\n pathEncoded: encodeURIComponent(path),\n method,\n documentSlug: documentName,\n exampleName: 'default',\n },\n })\n }\n },\n },\n 'operation:rename:example': {\n onAfterExecute: async ({ meta, payload, documentName }) => {\n // Refresh sidebar\n onAfterExampleCreation({ ...meta, exampleKey: payload.name, documentName })\n\n // Redirect to the new example if the mutation was successful and we are currently on the example\n if (\n isRouteParamsMatch({ documentName, path: meta.path, method: meta.method, exampleName: meta.exampleKey })\n ) {\n await router.replace({\n name: 'example',\n params: {\n documentSlug: documentName,\n pathEncoded: encodeURIComponent(meta.path),\n method: meta.method,\n exampleName: payload.name,\n },\n })\n }\n },\n },\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Hooks\n //------------------------------------------------------------------------------------\n 'operation:update:requestBody:value': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:update:requestBody:formValue': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n //------------------------------------------------------------------------------------\n // Tag Related Event Hooks\n //------------------------------------------------------------------------------------\n 'tag:create:tag': {\n onAfterExecute: (payload) => rebuildSidebar(payload.documentName),\n },\n 'tag:edit:tag': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n\n /**\n * If the currently viewed operation is a child of the renamed tag, redirect to\n * the same route so the sidebar and breadcrumbs reflect the new tag name\n */\n const isNestedUnderTag = payload.tag.children?.some(\n (child) =>\n child.type === 'operation' &&\n isRouteParamsMatch({\n documentName: payload.documentName,\n path: child.path,\n method: child.method,\n }),\n )\n\n if (isNestedUnderTag) {\n await router.replace({ ...currentRoute.value })\n }\n },\n },\n 'tag:delete:tag': {\n onAfterExecute: (payload) => rebuildSidebar(payload.documentName),\n },\n //------------------------------------------------------------------------------------\n // Tabs Related Event Hooks\n //------------------------------------------------------------------------------------\n 'tabs:add:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:close:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:focus:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:focus:tab-last': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:navigate:previous': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:navigate:next': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:update:tabs': {\n onAfterExecute: navigateToCurrentTab,\n },\n },\n })\n\n // Worksapce rename event handler\n eventBus.on('workspace:update:name', (payload) => renameWorkspace(payload))\n\n //------------------------------------------------------------------------------------\n // Navigation Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('scroll-to:nav-item', ({ id }) => onSelectSidebarItem(id))\n\n //------------------------------------------------------------------------------------\n // UI Related Event Handlers\n //------------------------------------------------------------------------------------\n // Note: Command palette handler is colocated with the command palette component\n\n eventBus.on('ui:toggle:sidebar', onToggleSidebar)\n\n /**\n * Bind the inernal navigation to a public api\n */\n eventBus.on('ui:navigate', async (payload) => {\n const { replace = false } = payload\n const fn = replace ? router.replace : router.push\n\n const execCallback = (result: NavigationFailure | void | undefined) => {\n if (!result) {\n // Close the sidebar if it is open\n closeSidebar()\n return payload.callback?.('success')\n }\n\n const navigationFailure: 16 = NavigationFailureType.duplicated\n\n if (result.type !== navigationFailure) {\n return payload.callback?.('error')\n }\n\n return payload.callback?.('success')\n }\n\n type ValidParams = Partial<Record<ScalarClientAppRouteParams, string>>\n\n if (payload.page === 'document') {\n const params = {\n documentSlug: payload.documentSlug,\n workspaceSlug: payload.workspaceSlug,\n namespace: payload.namespace,\n } satisfies ValidParams\n\n if (payload.path === 'overview') {\n return execCallback(await fn({ name: 'document.overview', params }))\n }\n if (payload.path === 'servers') {\n return execCallback(await fn({ name: 'document.servers', params }))\n }\n if (payload.path === 'environment') {\n return execCallback(await fn({ name: 'document.environment', params }))\n }\n if (payload.path === 'authentication') {\n return execCallback(await fn({ name: 'document.authentication', params }))\n }\n if (payload.path === 'cookies') {\n return execCallback(await fn({ name: 'document.cookies', params }))\n }\n if (payload.path === 'settings') {\n return execCallback(await fn({ name: 'document.settings', params }))\n }\n }\n\n if (payload.page === 'workspace') {\n const params = { workspaceSlug: payload.workspaceSlug, namespace: payload.namespace } satisfies ValidParams\n if (payload.path === 'environment') {\n return execCallback(await fn({ name: 'workspace.environment', params }))\n }\n if (payload.path === 'cookies') {\n return execCallback(await fn({ name: 'workspace.cookies', params }))\n }\n if (payload.path === 'settings') {\n return execCallback(await fn({ name: 'workspace.settings', params }))\n }\n }\n\n if (payload.page === 'example') {\n const params = {\n namespace: payload.namespace,\n workspaceSlug: payload.workspaceSlug,\n documentSlug: payload.documentSlug,\n pathEncoded: encodeURIComponent(payload.path),\n method: payload.method,\n exampleName: payload.exampleName,\n } satisfies ValidParams\n return execCallback(await fn({ name: 'example', params }))\n }\n\n if (payload.page === 'operation') {\n const params = {\n namespace: payload.namespace,\n workspaceSlug: payload.workspaceSlug,\n documentSlug: payload.documentSlug,\n pathEncoded: encodeURIComponent(payload.operationPath),\n method: payload.method,\n } satisfies ValidParams\n if (payload.path === 'overview') {\n return execCallback(await fn({ name: 'operation.overview', params }))\n }\n if (payload.path === 'servers') {\n return execCallback(await fn({ name: 'operation.servers', params }))\n }\n if (payload.path === 'authentication') {\n return execCallback(await fn({ name: 'operation.authentication', params }))\n }\n }\n })\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:copy:url', (payload) => onCopyTabUrl(payload.index))\n}\n"],"mappings":";;;;AASA,SAAgB,2BAA2B,EACzC,UACA,OACA,QACA,gBACA,sBACA,qBACA,wBACA,cACA,iBACA,cACA,mBAaC;CACD,MAAM,eAAe,eAAe,OAAO,cAAc,MAAM;;;;;;;CAQ/D,MAAM,sBAAsB,EAC1B,cACA,MACA,QACA,kBAMI;AACJ,MAAI,iBAAiB,KAAA,KAAa,iBAAiB,aAAa,OAAO,OAAO,aAC5E,QAAO;AAET,MAAI,SAAS,KAAA,KAAa,mBAAmB,KAAK,KAAK,aAAa,OAAO,OAAO,YAChF,QAAO;AAET,MAAI,WAAW,KAAA,KAAa,WAAW,aAAa,OAAO,OAAO,OAChE,QAAO;AAET,MAAI,gBAAgB,KAAA,KAAa,gBAAgB,aAAa,OAAO,OAAO,YAC1E,QAAO;AAET,SAAO;;AAGT,kCAAiC;EAC/B;EACA;EACA,OAAO;GAIL,4BAA4B,EAC1B,gBAAgB,OAAO,YAAY;AAEjC,QAAI,cAAc,OAAO,OAAO,iB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,CAAC"}
|
|
1
|
+
{"version":3,"file":"app-events.js","names":[],"sources":["../../../../src/v2/features/app/app-events.ts"],"sourcesContent":["import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { OperationExampleMeta, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { type ShallowRef, computed } from 'vue'\nimport { type NavigationFailure, NavigationFailureType, type Router } from 'vue-router'\n\nimport type { ScalarClientAppRouteParams } from '@/v2/features/app/helpers/routes'\nimport { initializeWorkspaceEventHandlers } from '@/v2/workspace-events'\n\nexport function initializeAppEventHandlers({\n eventBus,\n store,\n router,\n rebuildSidebar,\n navigateToCurrentTab,\n onSelectSidebarItem,\n onAfterExampleCreation,\n onCopyTabUrl,\n onToggleSidebar,\n closeSidebar,\n renameWorkspace,\n}: {\n eventBus: WorkspaceEventBus\n store: ShallowRef<WorkspaceStore | null>\n router: Router\n rebuildSidebar: (documentName?: string) => void\n navigateToCurrentTab: () => Promise<void>\n onSelectSidebarItem: (id: string) => void\n onAfterExampleCreation: (o: OperationExampleMeta & { documentName?: string }) => void\n onCopyTabUrl: (tabIndex: number) => void\n onToggleSidebar: () => void\n closeSidebar: () => void\n renameWorkspace: (name: string) => Promise<void>\n}) {\n const currentRoute = computed(() => router.currentRoute?.value)\n\n /**\n * Checks if the current route params match the specified operation meta.\n * Useful for determining if the sidebar or UI needs to be updated after changes to operations/examples.\n *\n * NOTE: It may be beneficial to compare to the active state instead of the router\n */\n const isRouteParamsMatch = ({\n documentName,\n path,\n method,\n exampleName,\n }: {\n documentName: string\n path?: string\n method?: HttpMethod\n exampleName?: string\n }) => {\n if (documentName !== undefined && documentName !== currentRoute.value?.params.documentSlug) {\n return false\n }\n if (path !== undefined && encodeURIComponent(path) !== currentRoute.value?.params.pathEncoded) {\n return false\n }\n if (method !== undefined && method !== currentRoute.value?.params.method) {\n return false\n }\n if (exampleName !== undefined && exampleName !== currentRoute.value?.params.exampleName) {\n return false\n }\n return true\n }\n\n initializeWorkspaceEventHandlers({\n eventBus,\n store,\n hooks: {\n //------------------------------------------------------------------------------------\n // Document Related Hooks\n //------------------------------------------------------------------------------------\n 'document:delete:document': {\n onAfterExecute: async (payload) => {\n // Redirect to the workspace environment page if the document was deleted\n if (currentRoute?.value?.params.documentSlug === payload.name) {\n await router.push({\n name: 'workspace.environment',\n })\n }\n },\n },\n //------------------------------------------------------------------------------------\n // Operation Related Hooks\n //------------------------------------------------------------------------------------\n 'operation:update:pathMethod': {\n onBeforeExecute: (payload) => ({\n ...payload,\n callback: async (status) => {\n // Redirect to the new example if the mutation was successful\n if (status === 'success') {\n // Rebuild the sidebar with the updated order\n rebuildSidebar(store.value?.workspace.activeDocument?.['x-scalar-navigation']?.name)\n\n // Now this redirect works for any example\n await router.replace({\n name: 'example',\n params: {\n method: payload.payload.method,\n pathEncoded: encodeURIComponent(payload.payload.path),\n exampleName: currentRoute.value?.params.exampleName,\n },\n })\n }\n\n payload.callback(status, payload.blurTargetSelector)\n },\n }),\n },\n 'operation:create:operation': {\n onAfterExecute: (payload) => {\n onAfterExampleCreation({\n path: payload.path,\n method: payload.method,\n exampleKey: 'default',\n documentName: payload.documentName,\n })\n },\n },\n 'operation:upsert:parameter': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:update:extra-parameters': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:reload:history': {\n onAfterExecute: (payload) => onAfterExampleCreation({ ...payload.meta, exampleKey: 'draft' }),\n },\n 'operation:delete:operation': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n const {\n documentName,\n meta: { path, method },\n } = payload\n // Navigate to the document overview page if the operation was deleted\n if (\n isRouteParamsMatch({\n documentName,\n path,\n method,\n })\n ) {\n await router.replace({\n name: 'document.overview',\n params: {\n documentSlug: documentName,\n },\n })\n }\n },\n },\n 'operation:create:draft-example': {\n onAfterExecute: async (payload) => {\n onAfterExampleCreation({ ...payload.meta, exampleKey: payload.exampleName })\n await router.push({\n name: 'example',\n params: {\n documentSlug: payload.documentName,\n pathEncoded: encodeURIComponent(payload.meta.path),\n method: payload.meta.method,\n exampleName: payload.exampleName,\n },\n })\n },\n },\n 'operation:delete:example': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n\n const {\n documentName,\n meta: { path, method, exampleKey },\n } = payload\n // Navigate to the default example if the example was deleted\n if (\n isRouteParamsMatch({\n documentName,\n path,\n method,\n exampleName: exampleKey,\n })\n ) {\n await router.replace({\n name: 'example',\n params: {\n pathEncoded: encodeURIComponent(path),\n method,\n documentSlug: documentName,\n exampleName: 'default',\n },\n })\n }\n },\n },\n 'operation:rename:example': {\n onAfterExecute: async ({ meta, payload, documentName }) => {\n // Refresh sidebar\n onAfterExampleCreation({ ...meta, exampleKey: payload.name, documentName })\n\n // Redirect to the new example if the mutation was successful and we are currently on the example\n if (\n isRouteParamsMatch({ documentName, path: meta.path, method: meta.method, exampleName: meta.exampleKey })\n ) {\n await router.replace({\n name: 'example',\n params: {\n documentSlug: documentName,\n pathEncoded: encodeURIComponent(meta.path),\n method: meta.method,\n exampleName: payload.name,\n },\n })\n }\n },\n },\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Hooks\n //------------------------------------------------------------------------------------\n 'operation:update:requestBody:value': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n 'operation:update:requestBody:formValue': {\n onAfterExecute: (payload) => onAfterExampleCreation(payload.meta),\n },\n //------------------------------------------------------------------------------------\n // Tag Related Event Hooks\n //------------------------------------------------------------------------------------\n 'tag:create:tag': {\n onAfterExecute: (payload) => rebuildSidebar(payload.documentName),\n },\n 'tag:edit:tag': {\n onAfterExecute: async (payload) => {\n rebuildSidebar(payload.documentName)\n\n /**\n * If the currently viewed operation is a child of the renamed tag, redirect to\n * the same route so the sidebar and breadcrumbs reflect the new tag name\n */\n const isNestedUnderTag = payload.tag.children?.some(\n (child) =>\n child.type === 'operation' &&\n isRouteParamsMatch({\n documentName: payload.documentName,\n path: child.path,\n method: child.method,\n }),\n )\n\n if (isNestedUnderTag) {\n await router.replace({ ...currentRoute.value })\n }\n },\n },\n 'tag:delete:tag': {\n onAfterExecute: (payload) => rebuildSidebar(payload.documentName),\n },\n //------------------------------------------------------------------------------------\n // Tabs Related Event Hooks\n //------------------------------------------------------------------------------------\n 'tabs:add:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:close:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:focus:tab': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:focus:tab-last': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:navigate:previous': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:navigate:next': {\n onAfterExecute: navigateToCurrentTab,\n },\n 'tabs:update:tabs': {\n onAfterExecute: navigateToCurrentTab,\n },\n },\n })\n\n // Worksapce rename event handler\n eventBus.on('workspace:update:name', (payload) => renameWorkspace(payload))\n\n //------------------------------------------------------------------------------------\n // Navigation Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('scroll-to:nav-item', ({ id }) => onSelectSidebarItem(id))\n\n //------------------------------------------------------------------------------------\n // UI Related Event Handlers\n //------------------------------------------------------------------------------------\n // Note: Command palette handler is colocated with the command palette component\n\n eventBus.on('ui:toggle:sidebar', onToggleSidebar)\n\n /**\n * Bind the inernal navigation to a public api\n */\n eventBus.on('ui:navigate', async (payload) => {\n const { replace = false } = payload\n const fn = replace ? router.replace : router.push\n\n const execCallback = (result: NavigationFailure | void | undefined) => {\n if (!result) {\n // Close the sidebar if it is open\n closeSidebar()\n return payload.callback?.('success')\n }\n\n const navigationFailure: 16 = NavigationFailureType.duplicated\n\n if (result.type !== navigationFailure) {\n return payload.callback?.('error')\n }\n\n return payload.callback?.('success')\n }\n\n type ValidParams = Partial<Record<ScalarClientAppRouteParams, string>>\n\n if (payload.page === 'document') {\n const params = {\n documentSlug: payload.documentSlug,\n workspaceSlug: payload.workspaceSlug,\n namespace: payload.namespace,\n } satisfies ValidParams\n\n if (payload.path === 'overview') {\n return execCallback(await fn({ name: 'document.overview', params }))\n }\n if (payload.path === 'servers') {\n return execCallback(await fn({ name: 'document.servers', params }))\n }\n if (payload.path === 'environment') {\n return execCallback(await fn({ name: 'document.environment', params }))\n }\n if (payload.path === 'authentication') {\n return execCallback(await fn({ name: 'document.authentication', params }))\n }\n if (payload.path === 'cookies') {\n return execCallback(await fn({ name: 'document.cookies', params }))\n }\n if (payload.path === 'settings') {\n return execCallback(await fn({ name: 'document.settings', params }))\n }\n }\n\n if (payload.page === 'workspace') {\n const params = { workspaceSlug: payload.workspaceSlug, namespace: payload.namespace } satisfies ValidParams\n if (payload.path === 'environment') {\n return execCallback(await fn({ name: 'workspace.environment', params }))\n }\n if (payload.path === 'cookies') {\n return execCallback(await fn({ name: 'workspace.cookies', params }))\n }\n if (payload.path === 'settings') {\n return execCallback(await fn({ name: 'workspace.settings', params }))\n }\n }\n\n if (payload.page === 'example') {\n const params = {\n namespace: payload.namespace,\n workspaceSlug: payload.workspaceSlug,\n documentSlug: payload.documentSlug,\n pathEncoded: encodeURIComponent(payload.path),\n method: payload.method,\n exampleName: payload.exampleName,\n } satisfies ValidParams\n return execCallback(await fn({ name: 'example', params }))\n }\n\n if (payload.page === 'operation') {\n const params = {\n namespace: payload.namespace,\n workspaceSlug: payload.workspaceSlug,\n documentSlug: payload.documentSlug,\n pathEncoded: encodeURIComponent(payload.operationPath),\n method: payload.method,\n } satisfies ValidParams\n if (payload.path === 'overview') {\n return execCallback(await fn({ name: 'operation.overview', params }))\n }\n if (payload.path === 'servers') {\n return execCallback(await fn({ name: 'operation.servers', params }))\n }\n if (payload.path === 'authentication') {\n return execCallback(await fn({ name: 'operation.authentication', params }))\n }\n }\n })\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:copy:url', (payload) => onCopyTabUrl(payload.index))\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AC,CAAC;;AAIzE,MAAI,QAAQ,SAAS,UASnB,QAAO,aAAa,MAAM,GAAG;GAAE,MAAM;GAAW,QARjC;IACb,WAAW,QAAQ;IACnB,eAAe,QAAQ;IACvB,cAAc,QAAQ;IACtB,aAAa,mBAAmB,QAAQ,KAAK;IAC7C,QAAQ,QAAQ;IAChB,aAAa,QAAQ;IACtB;GACuD,CAAC,CAAC;AAG5D,MAAI,QAAQ,SAAS,aAAa;GAChC,MAAM,SAAS;IACb,WAAW,QAAQ;IACnB,eAAe,QAAQ;IACvB,cAAc,QAAQ;IACtB,aAAa,mBAAmB,QAAQ,cAAc;IACtD,QAAQ,QAAQ;IACjB;AACD,OAAI,QAAQ,SAAS,WACnB,QAAO,aAAa,MAAM,GAAG;IAAE,MAAM;IAAsB;IAAQ,CAAC,CAAC;AAEvE,OAAI,QAAQ,SAAS,UACnB,QAAO,aAAa,MAAM,GAAG;IAAE,MAAM;IAAqB;IAAQ,CAAC,CAAC;AAEtE,OAAI,QAAQ,SAAS,iBACnB,QAAO,aAAa,MAAM,GAAG;IAAE,MAAM;IAA4B;IAAQ,CAAC,CAAC;;GAG/E;AAKF,UAAS,GAAG,kBAAkB,YAAY,aAAa,QAAQ,MAAM,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import { slugify } from "../../helpers/slugify.js";
|
|
1
2
|
import { getRouteParam } from "./helpers/get-route-param.js";
|
|
2
3
|
import { groupWorkspacesByTeam } from "./helpers/group-workspaces.js";
|
|
3
4
|
import { useTheme } from "./hooks/use-theme.js";
|
|
4
5
|
import { getTabDetails } from "../../helpers/get-tab-details.js";
|
|
5
|
-
import { slugify } from "../../helpers/slugify.js";
|
|
6
6
|
import { workspaceStorage } from "../../helpers/storage.js";
|
|
7
7
|
import { initializeAppEventHandlers } from "./app-events.js";
|
|
8
8
|
import { canLoadWorkspace, filterWorkspacesByTeam } from "./helpers/filter-workspaces.js";
|
|
9
9
|
import { computed, readonly, ref, shallowRef, watch } from "vue";
|
|
10
|
-
import { migrateLocalStorageToIndexDb } from "@scalar/oas-utils/migrations";
|
|
11
|
-
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
12
|
-
import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
|
|
13
10
|
import { getActiveEnvironment } from "@scalar/workspace-store/request-example";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
|
|
12
|
+
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
16
13
|
import { createWorkspaceStore } from "@scalar/workspace-store/client";
|
|
17
14
|
import { generateUniqueValue } from "@scalar/workspace-store/helpers/generate-unique-value";
|
|
15
|
+
import { createSidebarState, generateReverseIndex } from "@scalar/sidebar";
|
|
16
|
+
import { sortByOrder } from "@scalar/helpers/array/sort-by-order";
|
|
17
|
+
import { migrateLocalStorageToIndexDb } from "@scalar/oas-utils/migrations";
|
|
18
18
|
import { getParentEntry } from "@scalar/workspace-store/navigation";
|
|
19
19
|
import { createWorkspaceStorePersistence, getWorkspaceId } from "@scalar/workspace-store/persistence";
|
|
20
20
|
import { persistencePlugin } from "@scalar/workspace-store/plugins/client";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"names":[],"mappings":"AA6hBA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAQ3B,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAYnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,WAAW,GAAG;IACf;;OAEG;IACH,MAAM,EAAE,YAAY,CAAA;IAEpB;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAE1C;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B;;;OAGG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAiBJ,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA2MF,KAAK,gBAAgB,GAAG;IACxB,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAqpBxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import AppSidebar_vue_vue_type_script_setup_true_lang_default from "./AppSidebar.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/v2/features/app/components/AppSidebar.vue
|
|
5
|
-
var AppSidebar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AppSidebar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var AppSidebar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AppSidebar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-96a54993"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AppSidebar_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIconButton,\n ScalarModal,\n ScalarSidebarItem,\n useModal,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconDotsThree,\n ScalarIconGearSix,\n ScalarIconPlus,\n} from '@scalar/icons'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport type { DraggingItem, HoveredItem, SidebarState } from '@scalar/sidebar'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getParentEntry } from '@scalar/workspace-store/navigation'\nimport type {\n TraversedEntry,\n TraversedOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { capitalize, computed, nextTick, ref } from 'vue'\n\nimport Rabbit from '@/assets/rabbit.ascii?raw'\nimport RabbitJump from '@/assets/rabbitjump.ascii?raw'\nimport ScalarAsciiArt from '@/components/ScalarAsciiArt.vue'\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport { Sidebar } from '@/v2/components/sidebar'\nimport DownloadAppButton from '@/v2/features/app/components/DownloadAppButton.vue'\nimport SidebarItemMenu from '@/v2/features/app/components/SidebarItemMenu.vue'\nimport { dragHandleFactory } from '@/v2/helpers/drag-handle-factory'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { sidebarState, layout, activeWorkspace, workspaces, store, eventBus } =\n defineProps<{\n /**\n * The current layout of the app (e.g., 'desktop', 'web')\n */\n layout: ClientLayout\n\n /**\n * The sidebar state, holding navigation items and state\n */\n sidebarState: SidebarState<TraversedEntry>\n\n /**\n * Whether the workspace overview sidebar is currently open\n */\n isWorkspaceOpen?: boolean\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string; label: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n /**\n * The workspace event bus for handling workspace-level events.\n * Used for triggering and responding to workspace changes and actions.\n */\n eventBus: WorkspaceEventBus\n /**\n * The WorkspaceStore instance for managing workspace state and actions.\n * Provides methods and state for interacting with the current workspace.\n */\n store: WorkspaceStore\n }>()\n\nconst emit = defineEmits<{\n /** Emitted when the workspace button in the sidebar is clicked */\n (e: 'click:workspace'): void\n /** Emitted when a navigation or sidebar item is selected by ID */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user requests to create a new workspace */\n (e: 'create:workspace'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n\n/** The label for the workspace button in the sidebar */\nconst workspaceLabel = computed(() => capitalize(activeWorkspace.label))\n\n/** Controls the visibility of the sidebar */\nconst isSidebarOpen = defineModel<boolean>('isSidebarOpen', {\n required: true,\n})\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\n/** Calculate if we should show the getting started section */\nconst showGettingStarted = computed(() => sidebarState.items.value.length <= 1)\n\n/*\n * Setup drag and drop handlers for sidebar items.\n * The dragHandleFactory takes the current workspace store and sidebar state,\n * and returns the appropriate handlers for drag ending and droppability.\n *\n * We use computed to ensure the handlers are recreated when the store or sidebarState changes,\n * so they always have access to the latest values.\n */\nconst dragHandlers = computed(() =>\n dragHandleFactory({\n store,\n sidebarState,\n }),\n)\n\nconst handleDragEnd = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.handleDragEnd(draggingItem, hoveredItem)\n}\n\nconst isDroppable = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.isDroppable(draggingItem, hoveredItem)\n}\n\n/** The current target for the dropdown menu */\nconst menuTarget = ref<{\n /** The sidebar item that the menu is targeting */\n item: TraversedEntry\n /** A reference to the element that the menu is for */\n el: HTMLElement\n /** Whether or not to show the menu */\n showMenu: boolean\n} | null>(null)\n\nconst deleteModalState = useModal()\n\n/** Computes the message for the delete modal */\nconst deleteMessage = computed(() => {\n const item = menuTarget.value?.item\n\n if (item?.type === 'document') {\n return \"This cannot be undone. You're about to delete the document and all tags and operations inside it.\"\n }\n\n return `Are you sure you want to delete this ${item?.type ?? 'item'}? This action cannot be undone.`\n})\n\n/** Deletes an item from the sidebar by emitting the appropriate event */\nconst handleDelete = () => {\n const item = menuTarget.value?.item\n\n if (!item) {\n return\n }\n\n const result = sidebarState.getEntryById(item.id)\n\n const document = getParentEntry('document', result)\n const operation = getParentEntry('operation', result)\n\n if (!document) {\n return\n }\n\n if (item.type === 'document') {\n eventBus.emit('document:delete:document', { name: document.name })\n } else if (item.type === 'tag') {\n eventBus.emit('tag:delete:tag', {\n documentName: document.name,\n name: item.name,\n })\n } else if (item.type === 'operation') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:operation', {\n meta: {\n method: operation.method,\n path: operation.path,\n },\n documentName: document.name,\n })\n } else if (item.type === 'example') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:example', {\n meta: {\n method: operation.method,\n path: operation.path,\n exampleKey: item.name,\n },\n documentName: document.name,\n })\n }\n\n /** Clean up after deletion */\n deleteModalState.hide()\n menuTarget.value = null\n}\n\n/** Opens the dropdown menu for the given item */\nconst openMenu = async (\n event: MouseEvent | KeyboardEvent,\n item: TraversedEntry,\n) => {\n if (menuTarget.value?.showMenu) {\n return\n }\n\n const el = event.currentTarget as HTMLElement\n menuTarget.value = { item, el, showMenu: true }\n\n // Wait for the target to bind to the element\n await nextTick()\n\n // Re-dispatch the event on the target to open the menu\n const cloned =\n event instanceof MouseEvent\n ? new MouseEvent(event.type, event)\n : new KeyboardEvent(event.type, event)\n\n menuTarget.value?.el.dispatchEvent(cloned)\n}\n\n/** Closes the dropdown menu */\nconst closeMenu = () => {\n if (menuTarget.value) {\n menuTarget.value.showMenu = false\n }\n}\n\n/** Opens the command palette with the payload needed to create a request */\nconst handleAddEmptyFolder = (item: TraversedEntry) => {\n const itemWithParent = sidebarState.getEntryById(item.id)\n const documentEntry = getParentEntry('document', itemWithParent)\n const tag = getParentEntry('tag', itemWithParent)\n\n eventBus.emit('ui:open:command-palette', {\n action: 'create-request',\n payload: {\n documentName: documentEntry?.name,\n tagId: tag?.name,\n },\n })\n}\n\n/**\n * Navigates to the operations page for the provided operation item.\n * Emits a navigation event for the operation overview page.\n */\nconst navigateToOperationsPage = (item: TraversedOperation) => {\n const operationWithParent = sidebarState.getEntryById(item.id)\n const documentSlug = getParentEntry('document', operationWithParent)?.name\n\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: item.path,\n method: item.method,\n documentSlug: documentSlug,\n })\n}\n</script>\n\n<template>\n <div class=\"flex\">\n <Sidebar\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n :class=\"[\n 'max-md:inset-y-0 max-md:z-2 max-md:w-full!',\n isSidebarOpen ? 'max-md:fixed! max-md:flex!' : 'max-md:hidden!',\n ]\"\n :documents=\"Object.values(store.workspace.documents)\"\n :isDroppable=\"isDroppable\"\n :layout=\"layout\"\n :sidebarState=\"sidebarState\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"\n eventBus.emit('ui:navigate', { page: 'workspace', path: 'settings' })\n \"\n @reorder=\"\n (draggingItem, hoveredItem) => handleDragEnd(draggingItem, hoveredItem)\n \"\n @select:workspace=\"(id) => emit('select:workspace', id)\"\n @selectItem=\"(id) => emit('selectItem', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n <!-- Workspace Identifier -->\n <template #workspaceButton>\n <ScalarSidebarItem\n is=\"button\"\n :active=\"isWorkspaceOpen\"\n @click=\"emit('click:workspace')\">\n {{ workspaceLabel }}\n </ScalarSidebarItem>\n </template>\n\n <!-- Decorator dropdown menu -->\n <template #decorator=\"{ item }\">\n <div class=\"flex items-center gap-0.5\">\n <ScalarIconButton\n v-if=\"item.type === 'operation'\"\n :icon=\"ScalarIconGearSix\"\n label=\"Operation settings\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"navigateToOperationsPage(item)\"\n @keydown.enter.stop=\"navigateToOperationsPage(item)\"\n @keydown.space.stop=\"navigateToOperationsPage(item)\" />\n <ScalarIconButton\n aria-expanded=\"false\"\n aria-haspopup=\"menu\"\n :icon=\"ScalarIconDotsThree\"\n label=\"More options\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"(e: MouseEvent) => openMenu(e, item)\"\n @keydown.down.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.enter.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.space.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.up.stop=\"(e: KeyboardEvent) => openMenu(e, item)\" />\n </div>\n </template>\n\n <!-- Dirty document icon slot -->\n <template #icon=\"{ item }\">\n <template\n v-if=\"\n item.type === 'document' &&\n store.workspace.documents[item.name]?.['x-scalar-is-dirty'] === true\n \">\n <div class=\"relative flex items-center\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n <div\n class=\"bg-c-accent absolute -top-0.5 -right-0.5 size-1.5 rounded-full\">\n <span class=\"sr-only\">Unsaved changes</span>\n </div>\n </div>\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template #empty=\"{ item }\">\n <ScalarSidebarItem\n is=\"button\"\n @click=\"handleAddEmptyFolder(item)\">\n <template #icon>\n <ScalarIconPlus />\n </template>\n <template #default>Add operation</template>\n </ScalarSidebarItem>\n </template>\n\n <!-- Getting started section -->\n <template\n v-if=\"layout !== 'modal'\"\n #footer>\n <div\n :class=\"{\n 'empty-sidebar-item border-t': showGettingStarted,\n }\">\n <div\n v-if=\"showGettingStarted\"\n class=\"empty-sidebar-item-content overflow-hidden px-2.5 py-2.5\">\n <div class=\"rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]\">\n <ScalarAsciiArt\n :art=\"Rabbit\"\n class=\"rabbitsit font-bold\" />\n <ScalarAsciiArt\n :art=\"RabbitJump\"\n class=\"rabbitjump absolute top-0 left-0 font-bold\" />\n </div>\n <div class=\"mt-2 mb-2 text-center text-sm text-balance\">\n <b class=\"font-medium\">Let's Get Started</b>\n <p class=\"mt-2 leading-5\">\n Create request, folder, collection or import from\n OpenAPI/Postman\n </p>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1.5 p-2\">\n <ScalarButton\n v-if=\"showGettingStarted\"\n class=\"w-full\"\n size=\"sm\"\n @click=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'import-from-openapi-swagger-postman-curl',\n payload: undefined,\n })\n \">\n Import Collection\n </ScalarButton>\n\n <ScalarButton\n class=\"w-full\"\n hotkey=\"K\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"eventBus.emit('ui:open:command-palette')\">\n Add Item \n\n <span\n class=\"text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase\">\n <template v-if=\"isMacOS()\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n K\n </span>\n </ScalarButton>\n <DownloadAppButton v-if=\"layout === 'web'\" />\n </div>\n </div>\n </template>\n </Sidebar>\n <SidebarItemMenu\n v-if=\"menuTarget?.showMenu\"\n :eventBus=\"eventBus\"\n :item=\"menuTarget.item\"\n :sidebarState=\"sidebarState\"\n :target=\"menuTarget.el\"\n @closeMenu=\"closeMenu\"\n @showDeleteModal=\"deleteModalState.show()\" />\n\n <!-- Delete Modal -->\n <ScalarModal\n v-if=\"menuTarget\"\n size=\"xxs\"\n :state=\"deleteModalState\"\n :title=\"`Delete ${menuTarget.item.title}`\">\n <DeleteSidebarListElement\n :variableName=\"menuTarget.item.title\"\n :warningMessage=\"deleteMessage\"\n @close=\"deleteModalState.hide()\"\n @delete=\"handleDelete\" />\n </ScalarModal>\n </div>\n</template>\n\n<style scoped>\n.empty-sidebar-item-content {\n display: none;\n}\n.empty-sidebar-item .empty-sidebar-item-content {\n display: block;\n}\n.rabbitjump {\n opacity: 0;\n}\n.empty-sidebar-item:hover .rabbitjump {\n opacity: 1;\n animation: rabbitAnimation 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbitsit {\n opacity: 0;\n animation: rabbitAnimation2 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbit-ascii {\n animation: rabbitRun 8s infinite linear;\n}\n@keyframes rabbitRun {\n 0% {\n transform: translate3d(0, 0, 0);\n }\n 25% {\n transform: translate3d(250px, 0, 0);\n }\n 25.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 75% {\n transform: translate3d(250px, 0, 0);\n }\n 75.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rabbitAnimation {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n}\n@keyframes rabbitAnimation2 {\n 0%,\n 100% {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n transform: translate3d(0, -8px, 0);\n }\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"AppSidebar.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIconButton,\n ScalarModal,\n ScalarSidebarItem,\n useModal,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconDotsThree,\n ScalarIconGearSix,\n ScalarIconPlus,\n} from '@scalar/icons'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport type { DraggingItem, HoveredItem, SidebarState } from '@scalar/sidebar'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getParentEntry } from '@scalar/workspace-store/navigation'\nimport type {\n TraversedEntry,\n TraversedOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { capitalize, computed, nextTick, ref } from 'vue'\n\nimport Rabbit from '@/assets/rabbit.ascii?raw'\nimport RabbitJump from '@/assets/rabbitjump.ascii?raw'\nimport ScalarAsciiArt from '@/components/ScalarAsciiArt.vue'\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport { Sidebar } from '@/v2/components/sidebar'\nimport DownloadAppButton from '@/v2/features/app/components/DownloadAppButton.vue'\nimport SidebarItemMenu from '@/v2/features/app/components/SidebarItemMenu.vue'\nimport { createTempOperation } from '@/v2/features/app/helpers/create-temp-operation'\nimport { dragHandleFactory } from '@/v2/helpers/drag-handle-factory'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { sidebarState, layout, activeWorkspace, workspaces, store, eventBus } =\n defineProps<{\n /**\n * The current layout of the app (e.g., 'desktop', 'web')\n */\n layout: ClientLayout\n\n /**\n * The sidebar state, holding navigation items and state\n */\n sidebarState: SidebarState<TraversedEntry>\n\n /**\n * Whether the workspace overview sidebar is currently open\n */\n isWorkspaceOpen?: boolean\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string; label: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n /**\n * The workspace event bus for handling workspace-level events.\n * Used for triggering and responding to workspace changes and actions.\n */\n eventBus: WorkspaceEventBus\n /**\n * The WorkspaceStore instance for managing workspace state and actions.\n * Provides methods and state for interacting with the current workspace.\n */\n store: WorkspaceStore\n }>()\n\nconst emit = defineEmits<{\n /** Emitted when the workspace button in the sidebar is clicked */\n (e: 'click:workspace'): void\n /** Emitted when a navigation or sidebar item is selected by ID */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user requests to create a new workspace */\n (e: 'create:workspace'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n\n/** The label for the workspace button in the sidebar */\nconst workspaceLabel = computed(() => capitalize(activeWorkspace.label))\n\n/** Controls the visibility of the sidebar */\nconst isSidebarOpen = defineModel<boolean>('isSidebarOpen', {\n required: true,\n})\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\n/** Calculate if we should show the getting started section */\nconst showGettingStarted = computed(() => sidebarState.items.value.length <= 1)\n\n/*\n * Setup drag and drop handlers for sidebar items.\n * The dragHandleFactory takes the current workspace store and sidebar state,\n * and returns the appropriate handlers for drag ending and droppability.\n *\n * We use computed to ensure the handlers are recreated when the store or sidebarState changes,\n * so they always have access to the latest values.\n */\nconst dragHandlers = computed(() =>\n dragHandleFactory({\n store,\n sidebarState,\n }),\n)\n\nconst handleDragEnd = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.handleDragEnd(draggingItem, hoveredItem)\n}\n\nconst isDroppable = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.isDroppable(draggingItem, hoveredItem)\n}\n\n/** The current target for the dropdown menu */\nconst menuTarget = ref<{\n /** The sidebar item that the menu is targeting */\n item: TraversedEntry\n /** A reference to the element that the menu is for */\n el: HTMLElement\n /** Whether or not to show the menu */\n showMenu: boolean\n} | null>(null)\n\nconst deleteModalState = useModal()\n\n/** Computes the message for the delete modal */\nconst deleteMessage = computed(() => {\n const item = menuTarget.value?.item\n\n if (item?.type === 'document') {\n return \"This cannot be undone. You're about to delete the document and all tags and operations inside it.\"\n }\n\n return `Are you sure you want to delete this ${item?.type ?? 'item'}? This action cannot be undone.`\n})\n\n/** Deletes an item from the sidebar by emitting the appropriate event */\nconst handleDelete = () => {\n const item = menuTarget.value?.item\n\n if (!item) {\n return\n }\n\n const result = sidebarState.getEntryById(item.id)\n\n const document = getParentEntry('document', result)\n const operation = getParentEntry('operation', result)\n\n if (!document) {\n return\n }\n\n if (item.type === 'document') {\n eventBus.emit('document:delete:document', { name: document.name })\n } else if (item.type === 'tag') {\n eventBus.emit('tag:delete:tag', {\n documentName: document.name,\n name: item.name,\n })\n } else if (item.type === 'operation') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:operation', {\n meta: {\n method: operation.method,\n path: operation.path,\n },\n documentName: document.name,\n })\n } else if (item.type === 'example') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:example', {\n meta: {\n method: operation.method,\n path: operation.path,\n exampleKey: item.name,\n },\n documentName: document.name,\n })\n }\n\n /** Clean up after deletion */\n deleteModalState.hide()\n menuTarget.value = null\n}\n\n/** Opens the dropdown menu for the given item */\nconst openMenu = async (\n event: MouseEvent | KeyboardEvent,\n item: TraversedEntry,\n) => {\n if (menuTarget.value?.showMenu) {\n return\n }\n\n const el = event.currentTarget as HTMLElement\n menuTarget.value = { item, el, showMenu: true }\n\n // Wait for the target to bind to the element\n await nextTick()\n\n // Re-dispatch the event on the target to open the menu\n const cloned =\n event instanceof MouseEvent\n ? new MouseEvent(event.type, event)\n : new KeyboardEvent(event.type, event)\n\n menuTarget.value?.el.dispatchEvent(cloned)\n}\n\n/** Closes the dropdown menu */\nconst closeMenu = () => {\n if (menuTarget.value) {\n menuTarget.value.showMenu = false\n }\n}\n\n/**\n * Creates a new operation directly from the empty folder slot.\n * Uses a unique temporary path to avoid conflicts, then navigates to the operation,\n * updates the path to `/`, and focuses the address bar so the user can immediately start typing.\n */\nconst handleAddEmptyFolder = (item: TraversedEntry) => {\n const itemWithParent = sidebarState.getEntryById(item.id)\n const documentName = getParentEntry('document', itemWithParent)?.name\n const tagName = getParentEntry('tag', itemWithParent)?.name\n\n if (!documentName) {\n console.error('Document name not found')\n return\n }\n createTempOperation(documentName, {\n existingPaths: new Set(\n Object.keys(store.workspace.documents[documentName]?.paths ?? {}),\n ),\n eventBus,\n tags: tagName ? [tagName] : undefined,\n })\n}\n\n/**\n * Navigates to the operations page for the provided operation item.\n * Emits a navigation event for the operation overview page.\n */\nconst navigateToOperationsPage = (item: TraversedOperation) => {\n const operationWithParent = sidebarState.getEntryById(item.id)\n const documentSlug = getParentEntry('document', operationWithParent)?.name\n\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: item.path,\n method: item.method,\n documentSlug: documentSlug,\n })\n}\n</script>\n\n<template>\n <div class=\"flex\">\n <Sidebar\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n :class=\"[\n 'max-md:inset-y-0 max-md:z-2 max-md:w-full!',\n isSidebarOpen ? 'max-md:fixed! max-md:flex!' : 'max-md:hidden!',\n ]\"\n :documents=\"Object.values(store.workspace.documents)\"\n :isDroppable=\"isDroppable\"\n :layout=\"layout\"\n :sidebarState=\"sidebarState\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"\n eventBus.emit('ui:navigate', { page: 'workspace', path: 'settings' })\n \"\n @reorder=\"\n (draggingItem, hoveredItem) => handleDragEnd(draggingItem, hoveredItem)\n \"\n @select:workspace=\"(id) => emit('select:workspace', id)\"\n @selectItem=\"(id) => emit('selectItem', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n <!-- Workspace Identifier -->\n <template #workspaceButton>\n <ScalarSidebarItem\n is=\"button\"\n :active=\"isWorkspaceOpen\"\n @click=\"emit('click:workspace')\">\n {{ workspaceLabel }}\n </ScalarSidebarItem>\n </template>\n\n <!-- Decorator dropdown menu -->\n <template #decorator=\"{ item }\">\n <div class=\"flex items-center gap-0.5\">\n <ScalarIconButton\n v-if=\"item.type === 'operation'\"\n :icon=\"ScalarIconGearSix\"\n label=\"Operation settings\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"navigateToOperationsPage(item)\"\n @keydown.enter.stop=\"navigateToOperationsPage(item)\"\n @keydown.space.stop=\"navigateToOperationsPage(item)\" />\n <ScalarIconButton\n aria-expanded=\"false\"\n aria-haspopup=\"menu\"\n :icon=\"ScalarIconDotsThree\"\n label=\"More options\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"(e: MouseEvent) => openMenu(e, item)\"\n @keydown.down.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.enter.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.space.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.up.stop=\"(e: KeyboardEvent) => openMenu(e, item)\" />\n </div>\n </template>\n\n <!-- Dirty document icon slot -->\n <template #icon=\"{ item }\">\n <template\n v-if=\"\n item.type === 'document' &&\n store.workspace.documents[item.name]?.['x-scalar-is-dirty'] === true\n \">\n <div class=\"relative flex items-center\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n <div\n class=\"bg-c-accent absolute -top-0.5 -right-0.5 size-1.5 rounded-full\">\n <span class=\"sr-only\">Unsaved changes</span>\n </div>\n </div>\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template #empty=\"{ item }\">\n <ScalarSidebarItem\n is=\"button\"\n @click=\"handleAddEmptyFolder(item)\">\n <template #icon>\n <ScalarIconPlus />\n </template>\n <template #default>Add operation</template>\n </ScalarSidebarItem>\n </template>\n\n <!-- Getting started section -->\n <template\n v-if=\"layout !== 'modal'\"\n #footer>\n <div\n :class=\"{\n 'empty-sidebar-item border-t': showGettingStarted,\n }\">\n <div\n v-if=\"showGettingStarted\"\n class=\"empty-sidebar-item-content overflow-hidden px-2.5 py-2.5\">\n <div class=\"rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]\">\n <ScalarAsciiArt\n :art=\"Rabbit\"\n class=\"rabbitsit font-bold\" />\n <ScalarAsciiArt\n :art=\"RabbitJump\"\n class=\"rabbitjump absolute top-0 left-0 font-bold\" />\n </div>\n <div class=\"mt-2 mb-2 text-center text-sm text-balance\">\n <b class=\"font-medium\">Let's Get Started</b>\n <p class=\"mt-2 leading-5\">\n Create request, folder, collection or import from\n OpenAPI/Postman\n </p>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1.5 p-2\">\n <ScalarButton\n v-if=\"showGettingStarted\"\n class=\"w-full\"\n size=\"sm\"\n @click=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'import-from-openapi-swagger-postman-curl',\n payload: undefined,\n })\n \">\n Import Collection\n </ScalarButton>\n\n <ScalarButton\n class=\"w-full\"\n hotkey=\"K\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"eventBus.emit('ui:open:command-palette')\">\n Add Item \n\n <span\n class=\"text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase\">\n <template v-if=\"isMacOS()\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n K\n </span>\n </ScalarButton>\n <DownloadAppButton v-if=\"layout === 'web'\" />\n </div>\n </div>\n </template>\n </Sidebar>\n <SidebarItemMenu\n v-if=\"menuTarget?.showMenu\"\n :eventBus=\"eventBus\"\n :item=\"menuTarget.item\"\n :sidebarState=\"sidebarState\"\n :target=\"menuTarget.el\"\n :workspaceStore=\"store\"\n @closeMenu=\"closeMenu\"\n @showDeleteModal=\"deleteModalState.show()\" />\n\n <!-- Delete Modal -->\n <ScalarModal\n v-if=\"menuTarget\"\n size=\"xxs\"\n :state=\"deleteModalState\"\n :title=\"`Delete ${menuTarget.item.title}`\">\n <DeleteSidebarListElement\n :variableName=\"menuTarget.item.title\"\n :warningMessage=\"deleteMessage\"\n @close=\"deleteModalState.hide()\"\n @delete=\"handleDelete\" />\n </ScalarModal>\n </div>\n</template>\n\n<style scoped>\n.empty-sidebar-item-content {\n display: none;\n}\n.empty-sidebar-item .empty-sidebar-item-content {\n display: block;\n}\n.rabbitjump {\n opacity: 0;\n}\n.empty-sidebar-item:hover .rabbitjump {\n opacity: 1;\n animation: rabbitAnimation 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbitsit {\n opacity: 0;\n animation: rabbitAnimation2 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbit-ascii {\n animation: rabbitRun 8s infinite linear;\n}\n@keyframes rabbitRun {\n 0% {\n transform: translate3d(0, 0, 0);\n }\n 25% {\n transform: translate3d(250px, 0, 0);\n }\n 25.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 75% {\n transform: translate3d(250px, 0, 0);\n }\n 75.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rabbitAnimation {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n}\n@keyframes rabbitAnimation2 {\n 0%,\n 100% {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n transform: translate3d(0, -8px, 0);\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -4,14 +4,15 @@ import rabbit_default from "../../../../assets/rabbit.ascii.virtual.js";
|
|
|
4
4
|
import rabbitjump_default from "../../../../assets/rabbitjump.ascii.virtual.js";
|
|
5
5
|
import DeleteSidebarListElement_default from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
6
6
|
import DownloadAppButton_default from "./DownloadAppButton.vue.js";
|
|
7
|
+
import { createTempOperation } from "../helpers/create-temp-operation.js";
|
|
7
8
|
import SidebarItemMenu_default from "./SidebarItemMenu.vue.js";
|
|
8
9
|
import { dragHandleFactory } from "../../../helpers/drag-handle-factory.js";
|
|
9
10
|
import { Fragment, capitalize, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, useModel, withCtx, withKeys, withModifiers } from "vue";
|
|
10
11
|
import { ScalarButton, ScalarIconButton, ScalarModal, ScalarSidebarItem, useModal } from "@scalar/components";
|
|
11
|
-
import { LibraryIcon } from "@scalar/icons/library";
|
|
12
|
-
import { isMacOS } from "@scalar/helpers/general/is-mac-os";
|
|
13
12
|
import { ScalarIconDotsThree, ScalarIconGearSix, ScalarIconPlus } from "@scalar/icons";
|
|
14
13
|
import { getParentEntry } from "@scalar/workspace-store/navigation";
|
|
14
|
+
import { LibraryIcon } from "@scalar/icons/library";
|
|
15
|
+
import { isMacOS } from "@scalar/helpers/general/is-mac-os";
|
|
15
16
|
//#region src/v2/features/app/components/AppSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
16
17
|
var _hoisted_1 = { class: "flex" };
|
|
17
18
|
var _hoisted_2 = { class: "flex items-center gap-0.5" };
|
|
@@ -136,17 +137,23 @@ var AppSidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
136
137
|
const closeMenu = () => {
|
|
137
138
|
if (menuTarget.value) menuTarget.value.showMenu = false;
|
|
138
139
|
};
|
|
139
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Creates a new operation directly from the empty folder slot.
|
|
142
|
+
* Uses a unique temporary path to avoid conflicts, then navigates to the operation,
|
|
143
|
+
* updates the path to `/`, and focuses the address bar so the user can immediately start typing.
|
|
144
|
+
*/
|
|
140
145
|
const handleAddEmptyFolder = (item) => {
|
|
141
146
|
const itemWithParent = __props.sidebarState.getEntryById(item.id);
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
147
|
+
const documentName = getParentEntry("document", itemWithParent)?.name;
|
|
148
|
+
const tagName = getParentEntry("tag", itemWithParent)?.name;
|
|
149
|
+
if (!documentName) {
|
|
150
|
+
console.error("Document name not found");
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
createTempOperation(documentName, {
|
|
154
|
+
existingPaths: new Set(Object.keys(__props.store.workspace.documents[documentName]?.paths ?? {})),
|
|
155
|
+
eventBus: __props.eventBus,
|
|
156
|
+
tags: tagName ? [tagName] : void 0
|
|
150
157
|
});
|
|
151
158
|
};
|
|
152
159
|
/**
|
|
@@ -286,13 +293,15 @@ var AppSidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
286
293
|
item: menuTarget.value.item,
|
|
287
294
|
sidebarState: __props.sidebarState,
|
|
288
295
|
target: menuTarget.value.el,
|
|
296
|
+
workspaceStore: __props.store,
|
|
289
297
|
onCloseMenu: closeMenu,
|
|
290
298
|
onShowDeleteModal: _cache[9] || (_cache[9] = ($event) => unref(deleteModalState).show())
|
|
291
299
|
}, null, 8, [
|
|
292
300
|
"eventBus",
|
|
293
301
|
"item",
|
|
294
302
|
"sidebarState",
|
|
295
|
-
"target"
|
|
303
|
+
"target",
|
|
304
|
+
"workspaceStore"
|
|
296
305
|
])) : createCommentVNode("", true),
|
|
297
306
|
menuTarget.value ? (openBlock(), createBlock(unref(ScalarModal), {
|
|
298
307
|
key: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.vue.script.js","names":[],"sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIconButton,\n ScalarModal,\n ScalarSidebarItem,\n useModal,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconDotsThree,\n ScalarIconGearSix,\n ScalarIconPlus,\n} from '@scalar/icons'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport type { DraggingItem, HoveredItem, SidebarState } from '@scalar/sidebar'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getParentEntry } from '@scalar/workspace-store/navigation'\nimport type {\n TraversedEntry,\n TraversedOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { capitalize, computed, nextTick, ref } from 'vue'\n\nimport Rabbit from '@/assets/rabbit.ascii?raw'\nimport RabbitJump from '@/assets/rabbitjump.ascii?raw'\nimport ScalarAsciiArt from '@/components/ScalarAsciiArt.vue'\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport { Sidebar } from '@/v2/components/sidebar'\nimport DownloadAppButton from '@/v2/features/app/components/DownloadAppButton.vue'\nimport SidebarItemMenu from '@/v2/features/app/components/SidebarItemMenu.vue'\nimport { dragHandleFactory } from '@/v2/helpers/drag-handle-factory'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { sidebarState, layout, activeWorkspace, workspaces, store, eventBus } =\n defineProps<{\n /**\n * The current layout of the app (e.g., 'desktop', 'web')\n */\n layout: ClientLayout\n\n /**\n * The sidebar state, holding navigation items and state\n */\n sidebarState: SidebarState<TraversedEntry>\n\n /**\n * Whether the workspace overview sidebar is currently open\n */\n isWorkspaceOpen?: boolean\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string; label: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n /**\n * The workspace event bus for handling workspace-level events.\n * Used for triggering and responding to workspace changes and actions.\n */\n eventBus: WorkspaceEventBus\n /**\n * The WorkspaceStore instance for managing workspace state and actions.\n * Provides methods and state for interacting with the current workspace.\n */\n store: WorkspaceStore\n }>()\n\nconst emit = defineEmits<{\n /** Emitted when the workspace button in the sidebar is clicked */\n (e: 'click:workspace'): void\n /** Emitted when a navigation or sidebar item is selected by ID */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user requests to create a new workspace */\n (e: 'create:workspace'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n\n/** The label for the workspace button in the sidebar */\nconst workspaceLabel = computed(() => capitalize(activeWorkspace.label))\n\n/** Controls the visibility of the sidebar */\nconst isSidebarOpen = defineModel<boolean>('isSidebarOpen', {\n required: true,\n})\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\n/** Calculate if we should show the getting started section */\nconst showGettingStarted = computed(() => sidebarState.items.value.length <= 1)\n\n/*\n * Setup drag and drop handlers for sidebar items.\n * The dragHandleFactory takes the current workspace store and sidebar state,\n * and returns the appropriate handlers for drag ending and droppability.\n *\n * We use computed to ensure the handlers are recreated when the store or sidebarState changes,\n * so they always have access to the latest values.\n */\nconst dragHandlers = computed(() =>\n dragHandleFactory({\n store,\n sidebarState,\n }),\n)\n\nconst handleDragEnd = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.handleDragEnd(draggingItem, hoveredItem)\n}\n\nconst isDroppable = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.isDroppable(draggingItem, hoveredItem)\n}\n\n/** The current target for the dropdown menu */\nconst menuTarget = ref<{\n /** The sidebar item that the menu is targeting */\n item: TraversedEntry\n /** A reference to the element that the menu is for */\n el: HTMLElement\n /** Whether or not to show the menu */\n showMenu: boolean\n} | null>(null)\n\nconst deleteModalState = useModal()\n\n/** Computes the message for the delete modal */\nconst deleteMessage = computed(() => {\n const item = menuTarget.value?.item\n\n if (item?.type === 'document') {\n return \"This cannot be undone. You're about to delete the document and all tags and operations inside it.\"\n }\n\n return `Are you sure you want to delete this ${item?.type ?? 'item'}? This action cannot be undone.`\n})\n\n/** Deletes an item from the sidebar by emitting the appropriate event */\nconst handleDelete = () => {\n const item = menuTarget.value?.item\n\n if (!item) {\n return\n }\n\n const result = sidebarState.getEntryById(item.id)\n\n const document = getParentEntry('document', result)\n const operation = getParentEntry('operation', result)\n\n if (!document) {\n return\n }\n\n if (item.type === 'document') {\n eventBus.emit('document:delete:document', { name: document.name })\n } else if (item.type === 'tag') {\n eventBus.emit('tag:delete:tag', {\n documentName: document.name,\n name: item.name,\n })\n } else if (item.type === 'operation') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:operation', {\n meta: {\n method: operation.method,\n path: operation.path,\n },\n documentName: document.name,\n })\n } else if (item.type === 'example') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:example', {\n meta: {\n method: operation.method,\n path: operation.path,\n exampleKey: item.name,\n },\n documentName: document.name,\n })\n }\n\n /** Clean up after deletion */\n deleteModalState.hide()\n menuTarget.value = null\n}\n\n/** Opens the dropdown menu for the given item */\nconst openMenu = async (\n event: MouseEvent | KeyboardEvent,\n item: TraversedEntry,\n) => {\n if (menuTarget.value?.showMenu) {\n return\n }\n\n const el = event.currentTarget as HTMLElement\n menuTarget.value = { item, el, showMenu: true }\n\n // Wait for the target to bind to the element\n await nextTick()\n\n // Re-dispatch the event on the target to open the menu\n const cloned =\n event instanceof MouseEvent\n ? new MouseEvent(event.type, event)\n : new KeyboardEvent(event.type, event)\n\n menuTarget.value?.el.dispatchEvent(cloned)\n}\n\n/** Closes the dropdown menu */\nconst closeMenu = () => {\n if (menuTarget.value) {\n menuTarget.value.showMenu = false\n }\n}\n\n/** Opens the command palette with the payload needed to create a request */\nconst handleAddEmptyFolder = (item: TraversedEntry) => {\n const itemWithParent = sidebarState.getEntryById(item.id)\n const documentEntry = getParentEntry('document', itemWithParent)\n const tag = getParentEntry('tag', itemWithParent)\n\n eventBus.emit('ui:open:command-palette', {\n action: 'create-request',\n payload: {\n documentName: documentEntry?.name,\n tagId: tag?.name,\n },\n })\n}\n\n/**\n * Navigates to the operations page for the provided operation item.\n * Emits a navigation event for the operation overview page.\n */\nconst navigateToOperationsPage = (item: TraversedOperation) => {\n const operationWithParent = sidebarState.getEntryById(item.id)\n const documentSlug = getParentEntry('document', operationWithParent)?.name\n\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: item.path,\n method: item.method,\n documentSlug: documentSlug,\n })\n}\n</script>\n\n<template>\n <div class=\"flex\">\n <Sidebar\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n :class=\"[\n 'max-md:inset-y-0 max-md:z-2 max-md:w-full!',\n isSidebarOpen ? 'max-md:fixed! max-md:flex!' : 'max-md:hidden!',\n ]\"\n :documents=\"Object.values(store.workspace.documents)\"\n :isDroppable=\"isDroppable\"\n :layout=\"layout\"\n :sidebarState=\"sidebarState\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"\n eventBus.emit('ui:navigate', { page: 'workspace', path: 'settings' })\n \"\n @reorder=\"\n (draggingItem, hoveredItem) => handleDragEnd(draggingItem, hoveredItem)\n \"\n @select:workspace=\"(id) => emit('select:workspace', id)\"\n @selectItem=\"(id) => emit('selectItem', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n <!-- Workspace Identifier -->\n <template #workspaceButton>\n <ScalarSidebarItem\n is=\"button\"\n :active=\"isWorkspaceOpen\"\n @click=\"emit('click:workspace')\">\n {{ workspaceLabel }}\n </ScalarSidebarItem>\n </template>\n\n <!-- Decorator dropdown menu -->\n <template #decorator=\"{ item }\">\n <div class=\"flex items-center gap-0.5\">\n <ScalarIconButton\n v-if=\"item.type === 'operation'\"\n :icon=\"ScalarIconGearSix\"\n label=\"Operation settings\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"navigateToOperationsPage(item)\"\n @keydown.enter.stop=\"navigateToOperationsPage(item)\"\n @keydown.space.stop=\"navigateToOperationsPage(item)\" />\n <ScalarIconButton\n aria-expanded=\"false\"\n aria-haspopup=\"menu\"\n :icon=\"ScalarIconDotsThree\"\n label=\"More options\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"(e: MouseEvent) => openMenu(e, item)\"\n @keydown.down.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.enter.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.space.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.up.stop=\"(e: KeyboardEvent) => openMenu(e, item)\" />\n </div>\n </template>\n\n <!-- Dirty document icon slot -->\n <template #icon=\"{ item }\">\n <template\n v-if=\"\n item.type === 'document' &&\n store.workspace.documents[item.name]?.['x-scalar-is-dirty'] === true\n \">\n <div class=\"relative flex items-center\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n <div\n class=\"bg-c-accent absolute -top-0.5 -right-0.5 size-1.5 rounded-full\">\n <span class=\"sr-only\">Unsaved changes</span>\n </div>\n </div>\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template #empty=\"{ item }\">\n <ScalarSidebarItem\n is=\"button\"\n @click=\"handleAddEmptyFolder(item)\">\n <template #icon>\n <ScalarIconPlus />\n </template>\n <template #default>Add operation</template>\n </ScalarSidebarItem>\n </template>\n\n <!-- Getting started section -->\n <template\n v-if=\"layout !== 'modal'\"\n #footer>\n <div\n :class=\"{\n 'empty-sidebar-item border-t': showGettingStarted,\n }\">\n <div\n v-if=\"showGettingStarted\"\n class=\"empty-sidebar-item-content overflow-hidden px-2.5 py-2.5\">\n <div class=\"rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]\">\n <ScalarAsciiArt\n :art=\"Rabbit\"\n class=\"rabbitsit font-bold\" />\n <ScalarAsciiArt\n :art=\"RabbitJump\"\n class=\"rabbitjump absolute top-0 left-0 font-bold\" />\n </div>\n <div class=\"mt-2 mb-2 text-center text-sm text-balance\">\n <b class=\"font-medium\">Let's Get Started</b>\n <p class=\"mt-2 leading-5\">\n Create request, folder, collection or import from\n OpenAPI/Postman\n </p>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1.5 p-2\">\n <ScalarButton\n v-if=\"showGettingStarted\"\n class=\"w-full\"\n size=\"sm\"\n @click=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'import-from-openapi-swagger-postman-curl',\n payload: undefined,\n })\n \">\n Import Collection\n </ScalarButton>\n\n <ScalarButton\n class=\"w-full\"\n hotkey=\"K\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"eventBus.emit('ui:open:command-palette')\">\n Add Item \n\n <span\n class=\"text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase\">\n <template v-if=\"isMacOS()\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n K\n </span>\n </ScalarButton>\n <DownloadAppButton v-if=\"layout === 'web'\" />\n </div>\n </div>\n </template>\n </Sidebar>\n <SidebarItemMenu\n v-if=\"menuTarget?.showMenu\"\n :eventBus=\"eventBus\"\n :item=\"menuTarget.item\"\n :sidebarState=\"sidebarState\"\n :target=\"menuTarget.el\"\n @closeMenu=\"closeMenu\"\n @showDeleteModal=\"deleteModalState.show()\" />\n\n <!-- Delete Modal -->\n <ScalarModal\n v-if=\"menuTarget\"\n size=\"xxs\"\n :state=\"deleteModalState\"\n :title=\"`Delete ${menuTarget.item.title}`\">\n <DeleteSidebarListElement\n :variableName=\"menuTarget.item.title\"\n :warningMessage=\"deleteMessage\"\n @close=\"deleteModalState.hide()\"\n @delete=\"handleDelete\" />\n </ScalarModal>\n </div>\n</template>\n\n<style scoped>\n.empty-sidebar-item-content {\n display: none;\n}\n.empty-sidebar-item .empty-sidebar-item-content {\n display: block;\n}\n.rabbitjump {\n opacity: 0;\n}\n.empty-sidebar-item:hover .rabbitjump {\n opacity: 1;\n animation: rabbitAnimation 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbitsit {\n opacity: 0;\n animation: rabbitAnimation2 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbit-ascii {\n animation: rabbitRun 8s infinite linear;\n}\n@keyframes rabbitRun {\n 0% {\n transform: translate3d(0, 0, 0);\n }\n 25% {\n transform: translate3d(250px, 0, 0);\n }\n 25.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 75% {\n transform: translate3d(250px, 0, 0);\n }\n 75.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rabbitAnimation {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n}\n@keyframes rabbitAnimation2 {\n 0%,\n 100% {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n transform: translate3d(0, -8px, 0);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EA,MAAM,OAAO;;EAiBb,MAAM,iBAAiB,eAAe,WAAW,QAAA,gBAAgB,MAAM,CAAA;;EAGvE,MAAM,gBAAgB,SAAoB,SAAC,gBAE1C;;EAGD,MAAM,eAAe,SAAmB,SAAC,eAGxC;;EAGD,MAAM,qBAAqB,eAAe,QAAA,aAAa,MAAM,MAAM,UAAU,EAAC;EAU9E,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AC,KAAC,GAAA,EAAA,EAAA,GAAA,GAAA,OAAA,QAAA,OAAA,MAAA,gBACjB,OAEb,GAAA,EAAA,CAAA,CAAA,CAAA;;;MAEuB,QAAA,WAAM,SAAA,WAAA,EAA/B,YAA6C,2BAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;;;;;;;;;;;;IAM7C,WAAA,OAAY,YAAA,WAAA,EADpB,YAO+C,yBAAA;;KAL5C,UAAU,QAAA;KACV,MAAM,WAAA,MAAW;KACjB,cAAc,QAAA;KACd,QAAQ,WAAA,MAAW;KACnB,aAAW;KACX,mBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,iBAAgB,CAAC,MAAI;;;;;;;IAIjC,WAAA,SAAA,WAAA,EADR,YAUc,MAAA,YAAA,EAAA;;KARZ,MAAK;KACJ,OAAO,MAAA,iBAAgB;KACvB,OAAK,UAAY,WAAA,MAAW,KAAK;;4BAKP,CAJ3B,YAI2B,kCAAA;MAHxB,cAAc,WAAA,MAAW,KAAK;MAC9B,gBAAgB,cAAA;MAChB,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,MAAA,iBAAgB,CAAC,MAAI;MAC5B,UAAQ"}
|
|
1
|
+
{"version":3,"file":"AppSidebar.vue.script.js","names":[],"sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIconButton,\n ScalarModal,\n ScalarSidebarItem,\n useModal,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconDotsThree,\n ScalarIconGearSix,\n ScalarIconPlus,\n} from '@scalar/icons'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport type { DraggingItem, HoveredItem, SidebarState } from '@scalar/sidebar'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getParentEntry } from '@scalar/workspace-store/navigation'\nimport type {\n TraversedEntry,\n TraversedOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { capitalize, computed, nextTick, ref } from 'vue'\n\nimport Rabbit from '@/assets/rabbit.ascii?raw'\nimport RabbitJump from '@/assets/rabbitjump.ascii?raw'\nimport ScalarAsciiArt from '@/components/ScalarAsciiArt.vue'\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport { Sidebar } from '@/v2/components/sidebar'\nimport DownloadAppButton from '@/v2/features/app/components/DownloadAppButton.vue'\nimport SidebarItemMenu from '@/v2/features/app/components/SidebarItemMenu.vue'\nimport { createTempOperation } from '@/v2/features/app/helpers/create-temp-operation'\nimport { dragHandleFactory } from '@/v2/helpers/drag-handle-factory'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { sidebarState, layout, activeWorkspace, workspaces, store, eventBus } =\n defineProps<{\n /**\n * The current layout of the app (e.g., 'desktop', 'web')\n */\n layout: ClientLayout\n\n /**\n * The sidebar state, holding navigation items and state\n */\n sidebarState: SidebarState<TraversedEntry>\n\n /**\n * Whether the workspace overview sidebar is currently open\n */\n isWorkspaceOpen?: boolean\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string; label: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n /**\n * The workspace event bus for handling workspace-level events.\n * Used for triggering and responding to workspace changes and actions.\n */\n eventBus: WorkspaceEventBus\n /**\n * The WorkspaceStore instance for managing workspace state and actions.\n * Provides methods and state for interacting with the current workspace.\n */\n store: WorkspaceStore\n }>()\n\nconst emit = defineEmits<{\n /** Emitted when the workspace button in the sidebar is clicked */\n (e: 'click:workspace'): void\n /** Emitted when a navigation or sidebar item is selected by ID */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user requests to create a new workspace */\n (e: 'create:workspace'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n\n/** The label for the workspace button in the sidebar */\nconst workspaceLabel = computed(() => capitalize(activeWorkspace.label))\n\n/** Controls the visibility of the sidebar */\nconst isSidebarOpen = defineModel<boolean>('isSidebarOpen', {\n required: true,\n})\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\n/** Calculate if we should show the getting started section */\nconst showGettingStarted = computed(() => sidebarState.items.value.length <= 1)\n\n/*\n * Setup drag and drop handlers for sidebar items.\n * The dragHandleFactory takes the current workspace store and sidebar state,\n * and returns the appropriate handlers for drag ending and droppability.\n *\n * We use computed to ensure the handlers are recreated when the store or sidebarState changes,\n * so they always have access to the latest values.\n */\nconst dragHandlers = computed(() =>\n dragHandleFactory({\n store,\n sidebarState,\n }),\n)\n\nconst handleDragEnd = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.handleDragEnd(draggingItem, hoveredItem)\n}\n\nconst isDroppable = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n): boolean => {\n return dragHandlers.value.isDroppable(draggingItem, hoveredItem)\n}\n\n/** The current target for the dropdown menu */\nconst menuTarget = ref<{\n /** The sidebar item that the menu is targeting */\n item: TraversedEntry\n /** A reference to the element that the menu is for */\n el: HTMLElement\n /** Whether or not to show the menu */\n showMenu: boolean\n} | null>(null)\n\nconst deleteModalState = useModal()\n\n/** Computes the message for the delete modal */\nconst deleteMessage = computed(() => {\n const item = menuTarget.value?.item\n\n if (item?.type === 'document') {\n return \"This cannot be undone. You're about to delete the document and all tags and operations inside it.\"\n }\n\n return `Are you sure you want to delete this ${item?.type ?? 'item'}? This action cannot be undone.`\n})\n\n/** Deletes an item from the sidebar by emitting the appropriate event */\nconst handleDelete = () => {\n const item = menuTarget.value?.item\n\n if (!item) {\n return\n }\n\n const result = sidebarState.getEntryById(item.id)\n\n const document = getParentEntry('document', result)\n const operation = getParentEntry('operation', result)\n\n if (!document) {\n return\n }\n\n if (item.type === 'document') {\n eventBus.emit('document:delete:document', { name: document.name })\n } else if (item.type === 'tag') {\n eventBus.emit('tag:delete:tag', {\n documentName: document.name,\n name: item.name,\n })\n } else if (item.type === 'operation') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:operation', {\n meta: {\n method: operation.method,\n path: operation.path,\n },\n documentName: document.name,\n })\n } else if (item.type === 'example') {\n if (!operation) {\n return\n }\n\n eventBus.emit('operation:delete:example', {\n meta: {\n method: operation.method,\n path: operation.path,\n exampleKey: item.name,\n },\n documentName: document.name,\n })\n }\n\n /** Clean up after deletion */\n deleteModalState.hide()\n menuTarget.value = null\n}\n\n/** Opens the dropdown menu for the given item */\nconst openMenu = async (\n event: MouseEvent | KeyboardEvent,\n item: TraversedEntry,\n) => {\n if (menuTarget.value?.showMenu) {\n return\n }\n\n const el = event.currentTarget as HTMLElement\n menuTarget.value = { item, el, showMenu: true }\n\n // Wait for the target to bind to the element\n await nextTick()\n\n // Re-dispatch the event on the target to open the menu\n const cloned =\n event instanceof MouseEvent\n ? new MouseEvent(event.type, event)\n : new KeyboardEvent(event.type, event)\n\n menuTarget.value?.el.dispatchEvent(cloned)\n}\n\n/** Closes the dropdown menu */\nconst closeMenu = () => {\n if (menuTarget.value) {\n menuTarget.value.showMenu = false\n }\n}\n\n/**\n * Creates a new operation directly from the empty folder slot.\n * Uses a unique temporary path to avoid conflicts, then navigates to the operation,\n * updates the path to `/`, and focuses the address bar so the user can immediately start typing.\n */\nconst handleAddEmptyFolder = (item: TraversedEntry) => {\n const itemWithParent = sidebarState.getEntryById(item.id)\n const documentName = getParentEntry('document', itemWithParent)?.name\n const tagName = getParentEntry('tag', itemWithParent)?.name\n\n if (!documentName) {\n console.error('Document name not found')\n return\n }\n createTempOperation(documentName, {\n existingPaths: new Set(\n Object.keys(store.workspace.documents[documentName]?.paths ?? {}),\n ),\n eventBus,\n tags: tagName ? [tagName] : undefined,\n })\n}\n\n/**\n * Navigates to the operations page for the provided operation item.\n * Emits a navigation event for the operation overview page.\n */\nconst navigateToOperationsPage = (item: TraversedOperation) => {\n const operationWithParent = sidebarState.getEntryById(item.id)\n const documentSlug = getParentEntry('document', operationWithParent)?.name\n\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: item.path,\n method: item.method,\n documentSlug: documentSlug,\n })\n}\n</script>\n\n<template>\n <div class=\"flex\">\n <Sidebar\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n :class=\"[\n 'max-md:inset-y-0 max-md:z-2 max-md:w-full!',\n isSidebarOpen ? 'max-md:fixed! max-md:flex!' : 'max-md:hidden!',\n ]\"\n :documents=\"Object.values(store.workspace.documents)\"\n :isDroppable=\"isDroppable\"\n :layout=\"layout\"\n :sidebarState=\"sidebarState\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"\n eventBus.emit('ui:navigate', { page: 'workspace', path: 'settings' })\n \"\n @reorder=\"\n (draggingItem, hoveredItem) => handleDragEnd(draggingItem, hoveredItem)\n \"\n @select:workspace=\"(id) => emit('select:workspace', id)\"\n @selectItem=\"(id) => emit('selectItem', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n <!-- Workspace Identifier -->\n <template #workspaceButton>\n <ScalarSidebarItem\n is=\"button\"\n :active=\"isWorkspaceOpen\"\n @click=\"emit('click:workspace')\">\n {{ workspaceLabel }}\n </ScalarSidebarItem>\n </template>\n\n <!-- Decorator dropdown menu -->\n <template #decorator=\"{ item }\">\n <div class=\"flex items-center gap-0.5\">\n <ScalarIconButton\n v-if=\"item.type === 'operation'\"\n :icon=\"ScalarIconGearSix\"\n label=\"Operation settings\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"navigateToOperationsPage(item)\"\n @keydown.enter.stop=\"navigateToOperationsPage(item)\"\n @keydown.space.stop=\"navigateToOperationsPage(item)\" />\n <ScalarIconButton\n aria-expanded=\"false\"\n aria-haspopup=\"menu\"\n :icon=\"ScalarIconDotsThree\"\n label=\"More options\"\n size=\"sm\"\n weight=\"bold\"\n @click.stop=\"(e: MouseEvent) => openMenu(e, item)\"\n @keydown.down.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.enter.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.space.stop=\"(e: KeyboardEvent) => openMenu(e, item)\"\n @keydown.up.stop=\"(e: KeyboardEvent) => openMenu(e, item)\" />\n </div>\n </template>\n\n <!-- Dirty document icon slot -->\n <template #icon=\"{ item }\">\n <template\n v-if=\"\n item.type === 'document' &&\n store.workspace.documents[item.name]?.['x-scalar-is-dirty'] === true\n \">\n <div class=\"relative flex items-center\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n <div\n class=\"bg-c-accent absolute -top-0.5 -right-0.5 size-1.5 rounded-full\">\n <span class=\"sr-only\">Unsaved changes</span>\n </div>\n </div>\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template #empty=\"{ item }\">\n <ScalarSidebarItem\n is=\"button\"\n @click=\"handleAddEmptyFolder(item)\">\n <template #icon>\n <ScalarIconPlus />\n </template>\n <template #default>Add operation</template>\n </ScalarSidebarItem>\n </template>\n\n <!-- Getting started section -->\n <template\n v-if=\"layout !== 'modal'\"\n #footer>\n <div\n :class=\"{\n 'empty-sidebar-item border-t': showGettingStarted,\n }\">\n <div\n v-if=\"showGettingStarted\"\n class=\"empty-sidebar-item-content overflow-hidden px-2.5 py-2.5\">\n <div class=\"rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]\">\n <ScalarAsciiArt\n :art=\"Rabbit\"\n class=\"rabbitsit font-bold\" />\n <ScalarAsciiArt\n :art=\"RabbitJump\"\n class=\"rabbitjump absolute top-0 left-0 font-bold\" />\n </div>\n <div class=\"mt-2 mb-2 text-center text-sm text-balance\">\n <b class=\"font-medium\">Let's Get Started</b>\n <p class=\"mt-2 leading-5\">\n Create request, folder, collection or import from\n OpenAPI/Postman\n </p>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1.5 p-2\">\n <ScalarButton\n v-if=\"showGettingStarted\"\n class=\"w-full\"\n size=\"sm\"\n @click=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'import-from-openapi-swagger-postman-curl',\n payload: undefined,\n })\n \">\n Import Collection\n </ScalarButton>\n\n <ScalarButton\n class=\"w-full\"\n hotkey=\"K\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"eventBus.emit('ui:open:command-palette')\">\n Add Item \n\n <span\n class=\"text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase\">\n <template v-if=\"isMacOS()\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n K\n </span>\n </ScalarButton>\n <DownloadAppButton v-if=\"layout === 'web'\" />\n </div>\n </div>\n </template>\n </Sidebar>\n <SidebarItemMenu\n v-if=\"menuTarget?.showMenu\"\n :eventBus=\"eventBus\"\n :item=\"menuTarget.item\"\n :sidebarState=\"sidebarState\"\n :target=\"menuTarget.el\"\n :workspaceStore=\"store\"\n @closeMenu=\"closeMenu\"\n @showDeleteModal=\"deleteModalState.show()\" />\n\n <!-- Delete Modal -->\n <ScalarModal\n v-if=\"menuTarget\"\n size=\"xxs\"\n :state=\"deleteModalState\"\n :title=\"`Delete ${menuTarget.item.title}`\">\n <DeleteSidebarListElement\n :variableName=\"menuTarget.item.title\"\n :warningMessage=\"deleteMessage\"\n @close=\"deleteModalState.hide()\"\n @delete=\"handleDelete\" />\n </ScalarModal>\n </div>\n</template>\n\n<style scoped>\n.empty-sidebar-item-content {\n display: none;\n}\n.empty-sidebar-item .empty-sidebar-item-content {\n display: block;\n}\n.rabbitjump {\n opacity: 0;\n}\n.empty-sidebar-item:hover .rabbitjump {\n opacity: 1;\n animation: rabbitAnimation 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbitsit {\n opacity: 0;\n animation: rabbitAnimation2 0.5s steps(1) infinite;\n}\n.empty-sidebar-item:hover .rabbit-ascii {\n animation: rabbitRun 8s infinite linear;\n}\n@keyframes rabbitRun {\n 0% {\n transform: translate3d(0, 0, 0);\n }\n 25% {\n transform: translate3d(250px, 0, 0);\n }\n 25.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 75% {\n transform: translate3d(250px, 0, 0);\n }\n 75.01% {\n transform: translate3d(-250px, 0, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rabbitAnimation {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n}\n@keyframes rabbitAnimation2 {\n 0%,\n 100% {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n transform: translate3d(0, -8px, 0);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EA,MAAM,OAAO;;EAiBb,MAAM,iBAAiB,eAAe,WAAW,QAAA,gBAAgB,MAAM,CAAA;;EAGvE,MAAM,gBAAgB,SAAoB,SAAC,gBAE1C;;EAGD,MAAM,eAAe,SAAmB,SAAC,eAGxC;;EAGD,MAAM,qBAAqB,eAAe,QAAA,aAAa,MAAM,MAAM,UAAU,EAAC;EAU9E,MAAM,eAAe,eACnB,kBAAkB;GAChB,OAAI,QAAA;GACJ,cAAW,QAAA;GACZ,CAAC,CACJ;EAEA,MAAM,iBACJ,cACA,gBACY;AACZ,UAAO,aAAa,MAAM,cAAc,cAAc,YAAW;;EAGnE,MAAM,eACJ,cACA,gBACY;AACZ,UAAO,aAAa,MAAM,YAAY,cAAc,YAAW;;;EAIjE,MAAM,aAAa,IAOT,KAAI;EAEd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AA,WAAM,SAAA,WAAA,EAA/B,YAA6C,2BAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;;;;;;;;;;;;IAM7C,WAAA,OAAY,YAAA,WAAA,EADpB,YAQ+C,yBAAA;;KAN5C,UAAU,QAAA;KACV,MAAM,WAAA,MAAW;KACjB,cAAc,QAAA;KACd,QAAQ,WAAA,MAAW;KACnB,gBAAgB,QAAA;KAChB,aAAW;KACX,mBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,iBAAgB,CAAC,MAAI;;;;;;;;IAIjC,WAAA,SAAA,WAAA,EADR,YAUc,MAAA,YAAA,EAAA;;KARZ,MAAK;KACJ,OAAO,MAAA,iBAAgB;KACvB,OAAK,UAAY,WAAA,MAAW,KAAK;;4BAKP,CAJ3B,YAI2B,kCAAA;MAHxB,cAAc,WAAA,MAAW,KAAK;MAC9B,gBAAgB,cAAA;MAChB,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,MAAA,iBAAgB,CAAC,MAAI;MAC5B,UAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateWorkspaceModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CreateWorkspaceModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"names":[],"mappings":"AAAA,OA2EO,EAAe,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAQjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;CAClB,CAAC;AAsIF,QAAA,MAAM,YAAY;;cAjIyB,MAAM;;;;cAAN,MAAM;;kFAoI/C,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateWorkspaceModal.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components'\nimport { computed, ref, watch, type ComputedRef, type Ref } from 'vue'\n\nimport CommandActionForm
|
|
1
|
+
{"version":3,"file":"CreateWorkspaceModal.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components'\nimport { computed, ref, watch, type ComputedRef, type Ref } from 'vue'\n\nimport {\n CommandActionForm,\n CommandActionInput,\n} from '@/v2/features/command-palette'\n\nconst { state } = defineProps<{\n state: ModalState\n}>()\n\nconst emit = defineEmits<{\n (e: 'create:workspace', payload: { name: string }): void\n}>()\n\n/** Name input for the new workspace. Resets whenever the modal opens. */\nconst name: Ref<string> = ref('')\n\n/** Trimmed version of the name to avoid repeating .trim() in multiple places. */\nconst trimmedName: ComputedRef<string> = computed(() => name.value.trim())\n\n/** Disable submit when the name is empty after trimming. */\nconst isDisabled: ComputedRef<boolean> = computed(\n () => trimmedName.value.length === 0,\n)\n\n/**\n * Ensure the form is reset whenever the modal opens.\n * Avoids stale state if the modal is reopened.\n */\nwatch(\n () => state.open,\n (isOpen) => {\n if (isOpen) {\n name.value = ''\n }\n },\n)\n\n/** Emits an event to create the workspace with the provided name */\nconst handleSubmit = (): void => {\n if (!trimmedName.value) {\n return\n }\n\n emit('create:workspace', {\n name: trimmedName.value,\n })\n state.hide()\n}\n</script>\n\n<template>\n <ScalarModal\n bodyClass=\"border-t-0 rounded-t-lg\"\n size=\"xs\"\n :state=\"state\">\n <CommandActionForm\n :disabled=\"isDisabled\"\n @submit=\"handleSubmit\">\n <CommandActionInput\n v-model=\"name\"\n class=\"-mt-[.5px] !p-0\"\n placeholder=\"Workspace name\" />\n\n <!-- Submit button -->\n <template #submit>Add Workspace</template>\n </CommandActionForm>\n </ScalarModal>\n</template>\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CommandActionForm_default from "
|
|
2
|
-
import CommandActionInput_default from "
|
|
1
|
+
import CommandActionForm_default from "../../command-palette/components/CommandActionForm.vue.js";
|
|
2
|
+
import CommandActionInput_default from "../../command-palette/components/CommandActionInput.vue.js";
|
|
3
3
|
import { computed, createBlock, createTextVNode, createVNode, defineComponent, openBlock, ref, unref, watch, withCtx } from "vue";
|
|
4
4
|
import { ScalarModal } from "@scalar/components";
|
|
5
5
|
//#region src/v2/features/app/components/CreateWorkspaceModal.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -34,12 +34,12 @@ var CreateWorkspaceModal_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
34
34
|
size: "xs",
|
|
35
35
|
state: __props.state
|
|
36
36
|
}, {
|
|
37
|
-
default: withCtx(() => [createVNode(CommandActionForm_default, {
|
|
37
|
+
default: withCtx(() => [createVNode(unref(CommandActionForm_default), {
|
|
38
38
|
disabled: isDisabled.value,
|
|
39
39
|
onSubmit: handleSubmit
|
|
40
40
|
}, {
|
|
41
41
|
submit: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Add Workspace", -1)])]),
|
|
42
|
-
default: withCtx(() => [createVNode(CommandActionInput_default, {
|
|
42
|
+
default: withCtx(() => [createVNode(unref(CommandActionInput_default), {
|
|
43
43
|
modelValue: name.value,
|
|
44
44
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => name.value = $event),
|
|
45
45
|
class: "-mt-[.5px] !p-0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateWorkspaceModal.vue.script.js","names":[],"sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components'\nimport { computed, ref, watch, type ComputedRef, type Ref } from 'vue'\n\nimport CommandActionForm
|
|
1
|
+
{"version":3,"file":"CreateWorkspaceModal.vue.script.js","names":[],"sources":["../../../../../src/v2/features/app/components/CreateWorkspaceModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components'\nimport { computed, ref, watch, type ComputedRef, type Ref } from 'vue'\n\nimport {\n CommandActionForm,\n CommandActionInput,\n} from '@/v2/features/command-palette'\n\nconst { state } = defineProps<{\n state: ModalState\n}>()\n\nconst emit = defineEmits<{\n (e: 'create:workspace', payload: { name: string }): void\n}>()\n\n/** Name input for the new workspace. Resets whenever the modal opens. */\nconst name: Ref<string> = ref('')\n\n/** Trimmed version of the name to avoid repeating .trim() in multiple places. */\nconst trimmedName: ComputedRef<string> = computed(() => name.value.trim())\n\n/** Disable submit when the name is empty after trimming. */\nconst isDisabled: ComputedRef<boolean> = computed(\n () => trimmedName.value.length === 0,\n)\n\n/**\n * Ensure the form is reset whenever the modal opens.\n * Avoids stale state if the modal is reopened.\n */\nwatch(\n () => state.open,\n (isOpen) => {\n if (isOpen) {\n name.value = ''\n }\n },\n)\n\n/** Emits an event to create the workspace with the provided name */\nconst handleSubmit = (): void => {\n if (!trimmedName.value) {\n return\n }\n\n emit('create:workspace', {\n name: trimmedName.value,\n })\n state.hide()\n}\n</script>\n\n<template>\n <ScalarModal\n bodyClass=\"border-t-0 rounded-t-lg\"\n size=\"xs\"\n :state=\"state\">\n <CommandActionForm\n :disabled=\"isDisabled\"\n @submit=\"handleSubmit\">\n <CommandActionInput\n v-model=\"name\"\n class=\"-mt-[.5px] !p-0\"\n placeholder=\"Workspace name\" />\n\n <!-- Submit button -->\n <template #submit>Add Workspace</template>\n </CommandActionForm>\n </ScalarModal>\n</template>\n"],"mappings":";;;;;;;;;;EAaA,MAAM,OAAO;;EAKb,MAAM,OAAoB,IAAI,GAAE;;EAGhC,MAAM,cAAmC,eAAe,KAAK,MAAM,MAAM,CAAA;;EAGzE,MAAM,aAAmC,eACjC,YAAY,MAAM,WAAW,EACrC;;;;;AAMA,cACQ,QAAA,MAAM,OACX,WAAW;AACV,OAAI,OACF,MAAK,QAAQ;IAGnB;;EAGA,MAAM,qBAA2B;AAC/B,OAAI,CAAC,YAAY,MACf;AAGF,QAAK,oBAAoB,EACvB,MAAM,YAAY,OACnB,CAAA;AACD,WAAA,MAAM,MAAK;;;uBAKX,YAec,MAAA,YAAA,EAAA;IAdZ,WAAU;IACV,MAAK;IACJ,OAAO,QAAA;;2BAWY,CAVpB,YAUoB,MAAA,0BAAA,EAAA;KATjB,UAAU,WAAA;KACV,UAAQ;;KAOE,QAAM,cAAc,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAb,iBAAa,GAAA,CAAA,EAAA,CAAA;4BAHE,CAHjC,YAGiC,MAAA,2BAAA,EAAA;kBAFtB,KAAA;wEAAI,QAAA;MACb,OAAM;MACN,aAAY"}
|
|
@@ -10,16 +10,16 @@ type __VLS_Props = {
|
|
|
10
10
|
tab: Tab;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
click: () => any;
|
|
14
13
|
close: () => any;
|
|
15
|
-
|
|
14
|
+
click: () => any;
|
|
16
15
|
copyUrl: () => any;
|
|
16
|
+
newTab: () => any;
|
|
17
17
|
closeOtherTabs: () => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onClick?: (() => any) | undefined;
|
|
20
19
|
onClose?: (() => any) | undefined;
|
|
21
|
-
|
|
20
|
+
onClick?: (() => any) | undefined;
|
|
22
21
|
onCopyUrl?: (() => any) | undefined;
|
|
22
|
+
onNewTab?: (() => any) | undefined;
|
|
23
23
|
onCloseOtherTabs?: (() => any) | undefined;
|
|
24
24
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DesktopTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTab.vue"],"names":[],"mappings":"AA0TA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sDAAsD,CAAA;AAK/E,KAAK,WAAW,GAAG;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAA;IACf,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB;IACnB,GAAG,EAAE,GAAG,CAAA;CACT,CAAC;AAwZF,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import DesktopTab_vue_vue_type_script_setup_true_lang_default from "./DesktopTab.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/v2/features/app/components/DesktopTab.vue
|
|
5
|
-
var DesktopTab_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DesktopTab_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var DesktopTab_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DesktopTab_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-2d65f302"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DesktopTab_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTab.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/DesktopTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarDropdownButton,\n ScalarDropdownDivider,\n ScalarDropdownMenu,\n ScalarFloating,\n ScalarHotkey,\n ScalarTooltip,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconArrowUpRight,\n ScalarIconFolderSimple,\n ScalarIconLinkSimple,\n ScalarIconPlusSquare,\n ScalarIconTabs,\n ScalarIconX,\n ScalarIconXSquare,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport type { Tab } from '@scalar/workspace-store/schemas/extensions/workspace'\nimport { computed } from 'vue'\n\nimport { ContextMenu } from '@/v2/components/context-menu'\n\nconst {\n hotkey,\n active,\n tab,\n isSingleTab = false,\n} = defineProps<{\n /** Optional keyboard shortcut number for the tab */\n hotkey?: string\n /** Whether this tab is currently active */\n active: boolean\n /** Whether this is the only tab (changes styling to header-like appearance) */\n isSingleTab?: boolean\n /** The tab data */\n tab: Tab\n}>()\n\nconst emit = defineEmits<{\n /** Fired when the tab is clicked to activate it */\n (e: 'click'): void\n /** Fired when the close button is clicked */\n (e: 'close'): void\n /** Fired when \"New Tab\" is selected from context menu */\n (e: 'newTab'): void\n /** Fired when \"Copy URL\" is selected from context menu */\n (e: 'copyUrl'): void\n /** Fired when \"Close Other Tabs\" is selected from context menu */\n (e: 'closeOtherTabs'): void\n}>()\n\nconst ICONS: Record<NonNullable<Tab['icon']>, ScalarIconComponent> = {\n request: ScalarIconArrowUpRight,\n document: ScalarIconFolderSimple,\n}\n\n/** Display the appropriate modifier key based on the operating system */\nconst modifierKey = computed(() => (isMacOS() ? '⌘' : '^'))\n\n/** The tooltip content showing the keyboard shortcut */\nconst tooltipContent = computed(() =>\n hotkey ? `${modifierKey.value} ${hotkey}` : '',\n)\n\n/**\n * Handle the close button click.\n * We stop propagation to prevent triggering the tab activation click.\n */\nconst handleClose = (event: MouseEvent): void => {\n event.stopPropagation()\n emit('close')\n}\n</script>\n\n<template>\n <!-- Context menu wrapper provides right-click menu functionality -->\n <ContextMenu\n triggerClass=\"overflow-hidden w-full flex-1 select-none\n\">\n <!-- Tab button trigger with tooltip showing keyboard shortcut -->\n <template #trigger>\n <component\n :is=\"isSingleTab ? 'div' : ScalarTooltip\"\n :content=\"tooltipContent\"\n placement=\"bottom\">\n <!-- Main tab container - clickable area to activate the tab -->\n <div\n
|
|
1
|
+
{"version":3,"file":"DesktopTab.vue.js","names":[],"sources":["../../../../../src/v2/features/app/components/DesktopTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarDropdownButton,\n ScalarDropdownDivider,\n ScalarDropdownMenu,\n ScalarFloating,\n ScalarHotkey,\n ScalarTooltip,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport {\n ScalarIconArrowUpRight,\n ScalarIconFolderSimple,\n ScalarIconLinkSimple,\n ScalarIconPlusSquare,\n ScalarIconTabs,\n ScalarIconX,\n ScalarIconXSquare,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport type { Tab } from '@scalar/workspace-store/schemas/extensions/workspace'\nimport { computed } from 'vue'\n\nimport { ContextMenu } from '@/v2/components/context-menu'\n\nconst {\n hotkey,\n active,\n tab,\n isSingleTab = false,\n} = defineProps<{\n /** Optional keyboard shortcut number for the tab */\n hotkey?: string\n /** Whether this tab is currently active */\n active: boolean\n /** Whether this is the only tab (changes styling to header-like appearance) */\n isSingleTab?: boolean\n /** The tab data */\n tab: Tab\n}>()\n\nconst emit = defineEmits<{\n /** Fired when the tab is clicked to activate it */\n (e: 'click'): void\n /** Fired when the close button is clicked */\n (e: 'close'): void\n /** Fired when \"New Tab\" is selected from context menu */\n (e: 'newTab'): void\n /** Fired when \"Copy URL\" is selected from context menu */\n (e: 'copyUrl'): void\n /** Fired when \"Close Other Tabs\" is selected from context menu */\n (e: 'closeOtherTabs'): void\n}>()\n\nconst ICONS: Record<NonNullable<Tab['icon']>, ScalarIconComponent> = {\n request: ScalarIconArrowUpRight,\n document: ScalarIconFolderSimple,\n}\n\n/** Display the appropriate modifier key based on the operating system */\nconst modifierKey = computed(() => (isMacOS() ? '⌘' : '^'))\n\n/** The tooltip content showing the keyboard shortcut */\nconst tooltipContent = computed(() =>\n hotkey ? `${modifierKey.value} ${hotkey}` : '',\n)\n\n/**\n * Handle the close button click.\n * We stop propagation to prevent triggering the tab activation click.\n */\nconst handleClose = (event: MouseEvent): void => {\n event.stopPropagation()\n emit('close')\n}\n</script>\n\n<template>\n <!-- Context menu wrapper provides right-click menu functionality -->\n <ContextMenu\n triggerClass=\"overflow-hidden w-full flex-1 select-none\n\">\n <!-- Tab button trigger with tooltip showing keyboard shortcut -->\n <template #trigger>\n <component\n :is=\"isSingleTab ? 'div' : ScalarTooltip\"\n :content=\"tooltipContent\"\n placement=\"bottom\">\n <!-- Main tab container - clickable area to activate the tab -->\n <div\n :class=\"[\n isSingleTab\n ? 'nav-single-tab mac:app-drag-region'\n : 'nav-item app-no-drag-region',\n { 'nav-item__active': active && !isSingleTab },\n ]\"\n @click=\"!isSingleTab && emit('click')\">\n <!-- Icon and label container with gradient mask for text overflow -->\n <div\n :class=\"[\n 'flex items-center justify-center gap-1.5',\n isSingleTab\n ? 'custom-scroll h-full w-full whitespace-nowrap'\n : 'nav-item-icon-copy flex-1',\n ]\">\n <component\n :is=\"ICONS[tab.icon]\"\n v-if=\"tab.icon && ICONS[tab.icon]\" />\n <span\n :class=\"[\n isSingleTab ? '' : 'custom-scroll nav-item-copy',\n 'text-sm',\n ]\">\n {{ tab.title }}\n </span>\n </div>\n\n <!-- Close button - appears on hover, stops propagation to prevent tab activation -->\n <!-- Hidden for single tabs -->\n <button\n v-if=\"!isSingleTab\"\n class=\"nav-item-close\"\n type=\"button\"\n @click=\"handleClose\">\n <component :is=\"ScalarIconX\" />\n </button>\n </div>\n </component>\n </template>\n\n <!-- Context menu content shown on right-click -->\n <template #content>\n <ScalarFloating placement=\"right-start\">\n <template #floating>\n <ScalarDropdownMenu class=\"scalar-app scalar-client\">\n <!-- New Tab action (Cmd/Ctrl + T) -->\n <ScalarDropdownButton\n class=\"flex items-center gap-1.5\"\n @click=\"emit('newTab')\">\n <component :is=\"ScalarIconPlusSquare\" />\n New Tab\n <ScalarHotkey\n class=\"bg-b-2 ml-auto\"\n hotkey=\"T\" />\n </ScalarDropdownButton>\n\n <!-- Copy URL action -->\n <ScalarDropdownButton\n class=\"flex items-center gap-1.5\"\n @click=\"emit('copyUrl')\">\n <component :is=\"ScalarIconLinkSimple\" />\n Copy URL\n </ScalarDropdownButton>\n\n <template v-if=\"!isSingleTab\">\n <ScalarDropdownDivider />\n\n <!-- Close Tab action (Cmd/Ctrl + W) -->\n <!-- Hidden for single tabs -->\n <ScalarDropdownButton\n class=\"flex items-center gap-1.5\"\n @click=\"emit('close')\">\n <component :is=\"ScalarIconXSquare\" />\n Close Tab\n <ScalarHotkey\n class=\"bg-b-2 ml-auto\"\n hotkey=\"W\" />\n </ScalarDropdownButton>\n\n <!-- Close Other Tabs action -->\n <!-- Hidden for single tabs -->\n <ScalarDropdownButton\n class=\"flex items-center gap-1.5\"\n @click=\"emit('closeOtherTabs')\">\n <component :is=\"ScalarIconTabs\" />\n Close Other Tabs\n </ScalarDropdownButton>\n </template>\n </ScalarDropdownMenu>\n </template>\n </ScalarFloating>\n </template>\n </ContextMenu>\n</template>\n\n<style scoped>\n/** Single tab styling - appears as a header without tab-like appearance */\n.nav-single-tab {\n display: flex;\n height: 100%;\n width: 100%;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n color: var(--scalar-color-1);\n}\n\n/** Base tab styling with subtle background and border */\n.nav-item {\n padding: 4.5px 1rem;\n cursor: pointer;\n flex: 1;\n justify-content: center;\n align-items: center;\n display: flex;\n border-radius: var(--scalar-radius-lg);\n background: var(--scalar-background-3);\n border: var(--scalar-border-width) solid var(--scalar-background-2);\n color: var(--scalar-color-3);\n min-width: 0;\n overflow: hidden;\n position: relative;\n}\n\n.dark-mode .nav-item {\n background: color-mix(in srgb, var(--scalar-background-2), transparent);\n}\n\n/**\n * Container for the icon and label.\n * Uses a mask gradient to fade out text on the right side,\n * making room for the close button that appears on hover.\n */\n.nav-item-icon-copy {\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n mask-image: linear-gradient(\n to left,\n transparent 0,\n var(--scalar-background-2) 20px\n );\n}\n\n/** On hover, shift the gradient to make more room for the close button */\n.nav-item:hover .nav-item-icon-copy {\n mask-image: linear-gradient(\n to left,\n transparent 20px,\n var(--scalar-background-2) 40px\n );\n}\n\n/** Label text with constrained width to prevent overflow */\n.nav-item-copy {\n max-width: calc(100% - 20px);\n}\n\n.nav-item:hover {\n color: var(--scalar-color-1);\n}\n\n/** Active tab state with brighter background and border */\n.nav-item__active {\n background-color: var(--scalar-background-1);\n color: var(--scalar-color-1);\n border-color: var(--scalar-border-color);\n}\n\n.dark-mode .nav-item__active {\n background-color: var(--scalar-background-2);\n}\n\n/**\n * Close button positioned absolutely on the right.\n * Hidden by default, revealed on tab hover.\n */\n.nav-item-close {\n position: absolute;\n right: 3px;\n padding: 2px;\n border-radius: var(--scalar-radius);\n background: transparent;\n max-width: 20px;\n stroke-width: 1.5px;\n color: var(--scalar-color-3);\n margin-left: -20px;\n opacity: 0;\n}\n\n.nav-item:hover .nav-item-close {\n opacity: 1;\n}\n\n.nav-item-close:hover {\n background-color: var(--scalar-background-4);\n}\n\n.nav-item__active .nav-item-close:hover {\n background-color: var(--scalar-background-2);\n}\n</style>\n"],"mappings":""}
|