@scalar/api-client 3.6.1 → 3.8.1
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 +157 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/index.js +2 -0
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.d.ts.map +1 -0
- package/dist/components/{ScalarAsciiArt.vue.js → ScalarAsciiArt/ScalarAsciiArt.vue.js} +3 -3
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -0
- package/dist/components/{ScalarAsciiArt.vue.script.js → ScalarAsciiArt/ScalarAsciiArt.vue.script.js} +1 -1
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js.map +1 -0
- package/dist/components/ScalarAsciiArt/index.d.ts +2 -0
- package/dist/components/ScalarAsciiArt/index.d.ts.map +1 -0
- package/dist/components/ScalarAsciiArt/index.js +2 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/ViewLayout/index.d.ts +4 -0
- package/dist/components/ViewLayout/index.d.ts.map +1 -0
- package/dist/components/ViewLayout/index.js +4 -0
- package/dist/plugins/posthog/index.d.ts.map +1 -1
- package/dist/plugins/posthog/index.js +21 -12
- package/dist/plugins/posthog/index.js.map +1 -1
- package/dist/plugins/posthog/sanitize-event-payload.d.ts +25 -0
- package/dist/plugins/posthog/sanitize-event-payload.d.ts.map +1 -0
- package/dist/plugins/posthog/sanitize-event-payload.js +136 -0
- package/dist/plugins/posthog/sanitize-event-payload.js.map +1 -0
- package/dist/style.css +214 -1651
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +72 -32
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +2 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +15 -9
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +2 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +30 -17
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +43 -10
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +4 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +4 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +42 -13
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts +14 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +136 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +12 -10
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +2 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +17 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts +3 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +21 -9
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +1 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +14 -7
- package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.d.ts +6 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js +22 -0
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +124 -91
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +30 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +43 -21
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts +15 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +74 -28
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +30 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +190 -72
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +7 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +26 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +25 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +12 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInput.vue.script.js +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +2 -2
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -3
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/index.d.ts +0 -2
- package/dist/v2/features/command-palette/index.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.js +1 -3
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +2 -2
- package/dist/v2/features/modal/Modal.vue.d.ts +5 -7
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js +3 -3
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +8 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +5 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +15 -4
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +5 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
- package/dist/v2/features/modal/index.js +1 -1
- package/dist/v2/features/modal/modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/modal-events.js +10 -6
- package/dist/v2/features/modal/modal-events.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +35 -3
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js +1 -9
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +4 -0
- package/dist/v2/helpers/handle-hotkeys.js.map +1 -1
- package/dist/v2/helpers/test-utils.d.ts +2 -0
- package/dist/v2/helpers/test-utils.d.ts.map +1 -1
- package/dist/v2/helpers/test-utils.js +18 -0
- package/dist/v2/helpers/test-utils.js.map +1 -0
- package/dist/v2/hooks/index.d.ts +2 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.js +2 -0
- package/dist/v2/types/options.d.ts +1 -1
- package/dist/v2/types/options.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +2 -0
- package/dist/v2/workspace-events.js.map +1 -1
- package/dist/vue-styles.css +108 -658
- package/package.json +68 -97
- package/dist/components/IconSelector.vue.d.ts +0 -27
- package/dist/components/IconSelector.vue.d.ts.map +0 -1
- package/dist/components/IconSelector.vue.js +0 -7
- package/dist/components/IconSelector.vue.js.map +0 -1
- package/dist/components/IconSelector.vue.script.js +0 -65
- package/dist/components/IconSelector.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +0 -7
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -7
- package/dist/components/ImportCollection/IntegrationLogo.vue.js.map +0 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js +0 -50
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.js.map +0 -1
- package/dist/components/ScalarAsciiArt.vue.script.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/monacoeditorwork/editor.worker.bundle.js +0 -14319
- package/dist/monacoeditorwork/json.worker.bundle.js +0 -22098
- package/dist/monacoeditorwork/yaml.worker.bundle.js +0 -38414
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +0 -42
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -61
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js.map +0 -1
- package/dist/v2/features/app/App.vue.d.ts +0 -75
- package/dist/v2/features/app/App.vue.d.ts.map +0 -1
- package/dist/v2/features/app/App.vue.js +0 -8
- package/dist/v2/features/app/App.vue.js.map +0 -1
- package/dist/v2/features/app/App.vue.script.js +0 -284
- package/dist/v2/features/app/App.vue.script.js.map +0 -1
- package/dist/v2/features/app/app-events.d.ts +0 -20
- package/dist/v2/features/app/app-events.d.ts.map +0 -1
- package/dist/v2/features/app/app-events.js +0 -254
- package/dist/v2/features/app/app-events.js.map +0 -1
- package/dist/v2/features/app/app-state.d.ts +0 -156
- package/dist/v2/features/app/app-state.d.ts.map +0 -1
- package/dist/v2/features/app/app-state.js +0 -717
- package/dist/v2/features/app/app-state.js.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.d.ts +0 -43
- package/dist/v2/features/app/components/AppHeader.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.js +0 -7
- package/dist/v2/features/app/components/AppHeader.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppHeader.vue.script.js +0 -53
- package/dist/v2/features/app/components/AppHeader.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts +0 -32
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.js +0 -7
- package/dist/v2/features/app/components/AppHeaderActions.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js +0 -172
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -37
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +0 -9
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +0 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +0 -466
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts +0 -28
- package/dist/v2/features/app/components/CreateVersionModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.js +0 -7
- package/dist/v2/features/app/components/CreateVersionModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/CreateVersionModal.vue.script.js +0 -84
- package/dist/v2/features/app/components/CreateVersionModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts +0 -16
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -7
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js +0 -58
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +0 -27
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js +0 -9
- package/dist/v2/features/app/components/DesktopTab.vue.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTab.vue.script.js +0 -121
- package/dist/v2/features/app/components/DesktopTab.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +0 -14
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -7
- package/dist/v2/features/app/components/DesktopTabs.vue.js.map +0 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js +0 -75
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts +0 -25
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js +0 -9
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js.map +0 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js +0 -345
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts +0 -16
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts +0 -77
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js +0 -7
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js.map +0 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js +0 -209
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.d.ts +0 -45
- package/dist/v2/features/app/components/SidebarDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.js +0 -7
- package/dist/v2/features/app/components/SidebarDocument.vue.js.map +0 -1
- package/dist/v2/features/app/components/SidebarDocument.vue.script.js +0 -137
- package/dist/v2/features/app/components/SidebarDocument.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts +0 -26
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -7
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js.map +0 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js +0 -175
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.d.ts +0 -4
- package/dist/v2/features/app/components/SplashScreen.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.js +0 -9
- package/dist/v2/features/app/components/SplashScreen.vue.js.map +0 -1
- package/dist/v2/features/app/components/SplashScreen.vue.script.js +0 -20
- package/dist/v2/features/app/components/SplashScreen.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.d.ts +0 -18
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.js +0 -9
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.js.map +0 -1
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.script.js +0 -136
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.script.js.map +0 -1
- package/dist/v2/features/app/components/index.d.ts +0 -2
- package/dist/v2/features/app/components/index.d.ts.map +0 -1
- package/dist/v2/features/app/components/index.js +0 -2
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts +0 -54
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/check-version-conflict.js +0 -82
- package/dist/v2/features/app/helpers/check-version-conflict.js.map +0 -1
- package/dist/v2/features/app/helpers/compute-version-status.d.ts +0 -45
- package/dist/v2/features/app/helpers/compute-version-status.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/compute-version-status.js +0 -18
- package/dist/v2/features/app/helpers/compute-version-status.js.map +0 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +0 -59
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +0 -55
- package/dist/v2/features/app/helpers/create-api-client-app.js.map +0 -1
- package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts +0 -39
- package/dist/v2/features/app/helpers/create-draft-registry-document.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-draft-registry-document.js +0 -64
- package/dist/v2/features/app/helpers/create-draft-registry-document.js.map +0 -1
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts +0 -14
- package/dist/v2/features/app/helpers/create-temp-operation.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/create-temp-operation.js +0 -52
- package/dist/v2/features/app/helpers/create-temp-operation.js.map +0 -1
- package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts +0 -26
- package/dist/v2/features/app/helpers/detect-document-conflicts.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/detect-document-conflicts.js +0 -27
- package/dist/v2/features/app/helpers/detect-document-conflicts.js.map +0 -1
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts +0 -49
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/filter-workspaces.js +0 -55
- package/dist/v2/features/app/helpers/filter-workspaces.js.map +0 -1
- package/dist/v2/features/app/helpers/get-route-param.d.ts +0 -7
- package/dist/v2/features/app/helpers/get-route-param.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/get-route-param.js +0 -12
- package/dist/v2/features/app/helpers/get-route-param.js.map +0 -1
- package/dist/v2/features/app/helpers/group-workspaces.d.ts +0 -44
- package/dist/v2/features/app/helpers/group-workspaces.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/group-workspaces.js +0 -53
- package/dist/v2/features/app/helpers/group-workspaces.js.map +0 -1
- package/dist/v2/features/app/helpers/load-registry-document.d.ts +0 -24
- package/dist/v2/features/app/helpers/load-registry-document.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/load-registry-document.js +0 -47
- package/dist/v2/features/app/helpers/load-registry-document.js.map +0 -1
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts +0 -23
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/registry-error-messages.js +0 -63
- package/dist/v2/features/app/helpers/registry-error-messages.js.map +0 -1
- package/dist/v2/features/app/helpers/routes.d.ts +0 -184
- package/dist/v2/features/app/helpers/routes.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/routes.js +0 -153
- package/dist/v2/features/app/helpers/routes.js.map +0 -1
- package/dist/v2/features/app/helpers/version-status-presentation.d.ts +0 -24
- package/dist/v2/features/app/helpers/version-status-presentation.d.ts.map +0 -1
- package/dist/v2/features/app/helpers/version-status-presentation.js +0 -43
- package/dist/v2/features/app/helpers/version-status-presentation.js.map +0 -1
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts +0 -42
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-active-document-version.js +0 -60
- package/dist/v2/features/app/hooks/use-active-document-version.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-filter.d.ts +0 -38
- package/dist/v2/features/app/hooks/use-document-filter.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-filter.js +0 -63
- package/dist/v2/features/app/hooks/use-document-filter.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-sync.d.ts +0 -126
- package/dist/v2/features/app/hooks/use-document-sync.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-sync.js +0 -448
- package/dist/v2/features/app/hooks/use-document-sync.js.map +0 -1
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts +0 -30
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-document-watcher.js +0 -168
- package/dist/v2/features/app/hooks/use-document-watcher.js.map +0 -1
- package/dist/v2/features/app/hooks/use-network-status.d.ts +0 -29
- package/dist/v2/features/app/hooks/use-network-status.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-network-status.js +0 -58
- package/dist/v2/features/app/hooks/use-network-status.js.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.d.ts +0 -17258
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.js +0 -107
- package/dist/v2/features/app/hooks/use-sidebar-context-menu.js.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts +0 -119
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-sidebar-documents.js +0 -219
- package/dist/v2/features/app/hooks/use-sidebar-documents.js.map +0 -1
- package/dist/v2/features/app/hooks/use-theme.d.ts +0 -56
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-theme.js +0 -94
- package/dist/v2/features/app/hooks/use-theme.js.map +0 -1
- package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts +0 -35
- package/dist/v2/features/app/hooks/use-version-conflict-check.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-version-conflict-check.js +0 -62
- package/dist/v2/features/app/hooks/use-version-conflict-check.js.map +0 -1
- package/dist/v2/features/app/index.d.ts +0 -10
- package/dist/v2/features/app/index.d.ts.map +0 -1
- package/dist/v2/features/app/index.js +0 -8
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +0 -13
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +0 -8
- package/dist/v2/features/collection/DocumentCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +0 -112
- package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +0 -6
- package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.js +0 -7
- package/dist/v2/features/collection/OperationCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js +0 -95
- package/dist/v2/features/collection/OperationCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +0 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -7
- package/dist/v2/features/collection/WorkspaceCollection.vue.js.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +0 -74
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +0 -9
- package/dist/v2/features/collection/components/Authentication.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Authentication.vue.script.js +0 -174
- package/dist/v2/features/collection/components/Authentication.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +0 -7
- package/dist/v2/features/collection/components/Cookies.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.script.js +0 -58
- package/dist/v2/features/collection/components/Cookies.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.d.ts +0 -12
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.js +0 -9
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.js.map +0 -1
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.script.js +0 -174
- package/dist/v2/features/collection/components/DocumentScriptsEditors.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -9
- package/dist/v2/features/collection/components/Editor/Editor.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +0 -361
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js +0 -69
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js +0 -91
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts +0 -12
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -22
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts +0 -11
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -17
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts +0 -7
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -17
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -34
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -18
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts +0 -15
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -36
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js.map +0 -1
- package/dist/v2/features/collection/components/Editor/index.d.ts +0 -2
- package/dist/v2/features/collection/components/Editor/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/index.js +0 -2
- package/dist/v2/features/collection/components/Environment.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Environment.vue.js +0 -7
- package/dist/v2/features/collection/components/Environment.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Environment.vue.script.js +0 -61
- package/dist/v2/features/collection/components/Environment.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.d.ts +0 -29
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.js +0 -7
- package/dist/v2/features/collection/components/Form.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Form.vue.script.js +0 -78
- package/dist/v2/features/collection/components/Form.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.d.ts +0 -21
- package/dist/v2/features/collection/components/GetStarted.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.js +0 -7
- package/dist/v2/features/collection/components/GetStarted.vue.js.map +0 -1
- package/dist/v2/features/collection/components/GetStarted.vue.script.js +0 -144
- package/dist/v2/features/collection/components/GetStarted.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +0 -18
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +0 -9
- package/dist/v2/features/collection/components/LabelInput.vue.js.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.vue.script.js +0 -38
- package/dist/v2/features/collection/components/LabelInput.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.js +0 -9
- package/dist/v2/features/collection/components/Overview.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Overview.vue.script.js +0 -204
- package/dist/v2/features/collection/components/Overview.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +0 -223
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts +0 -20
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js +0 -45
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js +0 -73
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js +0 -124
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts +0 -17
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js +0 -126
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts +0 -18
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js +0 -180
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts +0 -14
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js +0 -44
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts +0 -19
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js +0 -53
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts +0 -23
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js +0 -7
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js +0 -75
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts +0 -3
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts +0 -75
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +0 -191
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts +0 -46
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js +0 -114
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js.map +0 -1
- package/dist/v2/features/collection/components/Runner/index.d.ts +0 -2
- package/dist/v2/features/collection/components/Runner/index.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Scripts.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.js +0 -7
- package/dist/v2/features/collection/components/Scripts.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Scripts.vue.script.js +0 -49
- package/dist/v2/features/collection/components/Scripts.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.js +0 -7
- package/dist/v2/features/collection/components/Servers.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Servers.vue.script.js +0 -219
- package/dist/v2/features/collection/components/Servers.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.d.ts +0 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.js +0 -7
- package/dist/v2/features/collection/components/Settings.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Settings.vue.script.js +0 -81
- package/dist/v2/features/collection/components/Settings.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +0 -8
- package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.js +0 -7
- package/dist/v2/features/collection/components/Tabs.vue.js.map +0 -1
- package/dist/v2/features/collection/components/Tabs.vue.script.js +0 -55
- package/dist/v2/features/collection/components/Tabs.vue.script.js.map +0 -1
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts +0 -12
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts.map +0 -1
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -19
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +0 -42
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -9
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js.map +0 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js +0 -189
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +0 -49
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js +0 -225
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +0 -53
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +0 -227
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +0 -44
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -9
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js +0 -137
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts +0 -30
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js +0 -156
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts +0 -37
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +0 -105
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +0 -48
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js +0 -228
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +0 -65
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js +0 -142
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts +0 -58
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js +0 -9
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js +0 -142
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts +0 -23
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js +0 -9
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js +0 -138
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +0 -34
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -7
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js.map +0 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js +0 -39
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.d.ts +0 -20
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -33
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts +0 -11
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-merge-key.js +0 -32
- package/dist/v2/features/command-palette/helpers/get-merge-key.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +0 -24
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -56
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +0 -24
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -22
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +0 -26
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -119
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.d.ts +0 -14
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.js +0 -19
- package/dist/v2/features/command-palette/helpers/get-postman-convert-options.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +0 -28
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -36
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.d.ts +0 -30
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -70
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +0 -20
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -72
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts +0 -14
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.js +0 -106
- package/dist/v2/features/command-palette/helpers/parse-curl.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts +0 -11
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js +0 -35
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts +0 -41
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts.map +0 -1
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js +0 -139
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js.map +0 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +0 -426
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +0 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -207
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js.map +0 -1
- package/dist/v2/features/editor/config.d.ts +0 -16
- package/dist/v2/features/editor/config.d.ts.map +0 -1
- package/dist/v2/features/editor/config.js +0 -19
- package/dist/v2/features/editor/config.js.map +0 -1
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts +0 -13
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/configure-language-support.js +0 -48
- package/dist/v2/features/editor/helpers/configure-language-support.js.map +0 -1
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.d.ts +0 -6
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -21
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +0 -12
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -31
- package/dist/v2/features/editor/helpers/json/create-json-model.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +0 -14
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -22
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts +0 -12
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js +0 -32
- package/dist/v2/features/editor/helpers/json/json-ast.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-links.d.ts +0 -15
- package/dist/v2/features/editor/helpers/json/json-pointer-links.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -104
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +0 -7
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -27
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js.map +0 -1
- package/dist/v2/features/editor/helpers/model.d.ts +0 -9
- package/dist/v2/features/editor/helpers/model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts +0 -14
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -27
- package/dist/v2/features/editor/helpers/range-to-whole-line.js.map +0 -1
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.d.ts +0 -16
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -84
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js.map +0 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts +0 -36
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -117
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +0 -13
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -32
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +0 -19
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts.map +0 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -70
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts +0 -152
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -37
- package/dist/v2/features/editor/hooks/use-editor-markers.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +0 -39
- package/dist/v2/features/editor/hooks/use-editor.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-editor.js +0 -133
- package/dist/v2/features/editor/hooks/use-editor.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +0 -16
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -45
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js.map +0 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts +0 -77
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts.map +0 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -396
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js.map +0 -1
- package/dist/v2/features/editor/index.d.ts +0 -5
- package/dist/v2/features/editor/index.d.ts.map +0 -1
- package/dist/v2/features/editor/index.js +0 -5
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -51
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts +0 -10
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -9
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js +0 -188
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js.map +0 -1
- package/dist/v2/features/global-cookies/index.d.ts +0 -2
- package/dist/v2/features/global-cookies/index.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/index.js +0 -2
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -28
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +0 -7
- package/dist/v2/features/settings/CollectionSettings.vue.js.map +0 -1
- package/dist/v2/features/settings/CollectionSettings.vue.script.js +0 -229
- package/dist/v2/features/settings/CollectionSettings.vue.script.js.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts +0 -20
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +0 -7
- package/dist/v2/features/settings/DocumentSettings.vue.js.map +0 -1
- package/dist/v2/features/settings/DocumentSettings.vue.script.js +0 -92
- package/dist/v2/features/settings/DocumentSettings.vue.script.js.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.d.ts +0 -11
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.js +0 -7
- package/dist/v2/features/settings/components/Appearance.vue.js.map +0 -1
- package/dist/v2/features/settings/components/Appearance.vue.script.js +0 -63
- package/dist/v2/features/settings/components/Appearance.vue.script.js.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts +0 -16
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.js +0 -7
- package/dist/v2/features/settings/components/Section.vue.js.map +0 -1
- package/dist/v2/features/settings/components/Section.vue.script.js +0 -30
- package/dist/v2/features/settings/components/Section.vue.script.js.map +0 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +0 -10
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +0 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -68
- package/dist/v2/features/settings/helpers/get-theme-colors.js.map +0 -1
- package/dist/v2/features/settings/index.d.ts +0 -3
- package/dist/v2/features/settings/index.d.ts.map +0 -1
- package/dist/v2/features/settings/index.js +0 -3
- package/dist/v2/helpers/download-document.d.ts +0 -2
- package/dist/v2/helpers/download-document.d.ts.map +0 -1
- package/dist/v2/helpers/download-document.js +0 -42
- package/dist/v2/helpers/download-document.js.map +0 -1
- package/dist/v2/helpers/drag-handle-factory.d.ts +0 -16
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +0 -1
- package/dist/v2/helpers/drag-handle-factory.js +0 -258
- package/dist/v2/helpers/drag-handle-factory.js.map +0 -1
- package/dist/v2/helpers/get-tab-details.d.ts +0 -43
- package/dist/v2/helpers/get-tab-details.d.ts.map +0 -1
- package/dist/v2/helpers/get-tab-details.js +0 -54
- package/dist/v2/helpers/get-tab-details.js.map +0 -1
- package/dist/v2/helpers/is-url.d.ts +0 -2
- package/dist/v2/helpers/is-url.d.ts.map +0 -1
- package/dist/v2/helpers/is-url.js +0 -10
- package/dist/v2/helpers/is-url.js.map +0 -1
- package/dist/v2/helpers/safe-run.d.ts +0 -34
- package/dist/v2/helpers/safe-run.d.ts.map +0 -1
- package/dist/v2/helpers/safe-run.js +0 -43
- package/dist/v2/helpers/safe-run.js.map +0 -1
- package/dist/v2/helpers/storage.d.ts +0 -31
- package/dist/v2/helpers/storage.d.ts.map +0 -1
- package/dist/v2/helpers/storage.js +0 -37
- package/dist/v2/helpers/storage.js.map +0 -1
- package/dist/v2/hooks/use-color-mode.d.ts +0 -20
- package/dist/v2/hooks/use-color-mode.d.ts.map +0 -1
- package/dist/v2/hooks/use-color-mode.js +0 -72
- package/dist/v2/hooks/use-color-mode.js.map +0 -1
- package/dist/v2/types/configuration.d.ts +0 -278
- package/dist/v2/types/configuration.d.ts.map +0 -1
- /package/dist/components/{ScalarAsciiArt.vue.d.ts → ScalarAsciiArt/ScalarAsciiArt.vue.d.ts} +0 -0
- /package/dist/{index.js → types/index.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { replaceEnvVariables, replacePathVariables } from '@scalar/helpers/regex/replace-variables'\nimport { isRelativePath } from '@scalar/helpers/url/is-relative-path'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example'\nimport { getServerVariables } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode, fromUint8Array } from 'js-base64'\n\nimport { getOAuthCallbackData } from './oauth-callback'\n\n/** Oauth2 security schemes which are not implicit */\ntype NonImplicitFlows = Omit<OAuthFlowsObjectSecret, 'implicit'>\n\ntype PKCEState = {\n codeVerifier: string\n codeChallenge: string\n codeChallengeMethod: string\n}\n\ntype ActiveServerBase = { basePath: string } | { baseUrl: string } | Record<string, never>\n\nexport type OAuth2Tokens = {\n accessToken: string\n refreshToken?: string\n}\n\n/** Flow types that support token refresh (all except implicit) */\ntype RefreshableFlows = Exclude<keyof OAuthFlowsObjectSecret, 'implicit'>\n\n/**\n * Resolves the active server URL using OpenAPI server variables first, then\n * Scalar environment variables.\n */\nexport const getServerUrl = (\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): string =>\n replaceEnvVariables(\n replacePathVariables(activeServer?.url ?? '', getServerVariables(activeServer)),\n environmentVariables,\n )\n\n/**\n * Builds the base option used when OAuth URLs are relative to the active server.\n *\n * Relative server URLs become browser-only base paths because they need the\n * current window location to resolve correctly.\n */\nexport const getActiveServerBase = (\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): ActiveServerBase => {\n const serverUrl = getServerUrl(activeServer, environmentVariables)\n if (!serverUrl) {\n return {}\n }\n\n if (isRelativePath(serverUrl)) {\n return typeof window === 'undefined' ? {} : { basePath: serverUrl }\n }\n\n return { baseUrl: serverUrl }\n}\n\n/**\n * Generates a random string for PKCE code verifier\n *\n * @see https://www.rfc-editor.org/rfc/rfc7636#page-8\n */\nconst generateCodeVerifier = (): string => {\n // Generate 32 random bytes\n const buffer = new Uint8Array(32)\n crypto.getRandomValues(buffer)\n\n // Base64URL encode the bytes\n return fromUint8Array(buffer, true)\n}\n\n/**\n * Creates a code challenge from the code verifier\n */\nconst generateCodeChallenge = async (verifier: string, encoding: 'SHA-256' | 'plain'): Promise<string> => {\n if (encoding === 'plain') {\n return verifier\n }\n\n // If crypto.subtle.digest is not a function, we cannot use SHA-256\n if (typeof crypto?.subtle?.digest !== 'function') {\n console.warn('SHA-256 is only supported when using https, using a plain text code challenge instead.')\n return verifier\n }\n\n // ASCII encoding is just taking the lower 8 bits of each character\n const encoder = new TextEncoder()\n const data = encoder.encode(verifier)\n const digest = await crypto.subtle.digest('SHA-256', data)\n\n // Base64URL encode the bytes\n return fromUint8Array(new Uint8Array(digest), true)\n}\n\n/**\n * Authorize oauth2 flow\n *\n * @returns the resolved oauth2 tokens\n */\nexport const authorizeOauth2 = async (\n flows: OAuthFlowsObjectSecret,\n type: keyof OAuthFlowsObjectSecret,\n selectedScopes: string[],\n /** We use the active server to set a base for relative redirect uris */\n activeServer: ServerObject | null,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** Flattened environment variables used to resolve server URL templates like `{protocol}` */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n try {\n if (!flow) {\n return [new Error('Flow not found'), null]\n }\n\n const scopes = selectedScopes.join(' ')\n\n // Client Credentials or Password Flow\n if (type === 'clientCredentials' || type === 'password') {\n return authorizeServers(\n flows,\n type,\n scopes,\n {\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n }\n\n // Generate a random state string with the length of 8 characters\n const state = (Math.random() + 1).toString(36).substring(2, 10)\n\n const authorizationUrl = makeUrlAbsolute(\n flows[type]!['x-scalar-secret-auth-url'] ?? flows[type]!.authorizationUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n\n const url = new URL(authorizationUrl)\n\n /** Special PKCE state */\n let pkce: PKCEState | null = null\n\n // Params unique to the flows\n if (type === 'implicit') {\n url.searchParams.set('response_type', 'token')\n } else if (type === 'authorizationCode') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n url.searchParams.set('response_type', 'code')\n\n // PKCE\n if (typedFlow['x-usePkce'] !== 'no') {\n const codeVerifier = generateCodeVerifier()\n const codeChallenge = await generateCodeChallenge(codeVerifier, typedFlow['x-usePkce'])\n\n // Set state for later verification\n pkce = {\n codeVerifier,\n codeChallenge,\n codeChallengeMethod: typedFlow['x-usePkce'] === 'SHA-256' ? 'S256' : 'plain',\n }\n\n // Set the code challenge and method on the url\n url.searchParams.set('code_challenge', codeChallenge)\n url.searchParams.set('code_challenge_method', pkce.codeChallengeMethod)\n }\n }\n\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n // Handle relative redirect uris\n if (typedFlow['x-scalar-secret-redirect-uri'].startsWith('/')) {\n const baseUrl =\n getServerUrl(activeServer, environmentVariables) || window.location.origin + window.location.pathname\n const redirectUri = new URL(typedFlow['x-scalar-secret-redirect-uri'], baseUrl).toString()\n\n url.searchParams.set('redirect_uri', redirectUri)\n } else {\n url.searchParams.set('redirect_uri', typedFlow['x-scalar-secret-redirect-uri'])\n }\n\n if (flow['x-scalar-security-query']) {\n Object.keys(flow['x-scalar-security-query']).forEach((key: string): void => {\n const value = flow['x-scalar-security-query']?.[key]\n if (!value) {\n return\n }\n url.searchParams.set(key, value)\n })\n }\n\n // Common to all flows\n url.searchParams.set('client_id', flow['x-scalar-secret-client-id'])\n url.searchParams.set('state', state)\n if (scopes) {\n url.searchParams.set('scope', scopes)\n }\n\n const windowFeatures = 'left=100,top=100,width=800,height=600'\n const authWindow = window.open(url, 'openAuth2Window', windowFeatures)\n\n // Open up a window and poll until closed or we have the data we want\n if (authWindow) {\n // We need to return a promise here due to the setInterval\n return new Promise<ErrorResponse<OAuth2Tokens>>((resolve) => {\n const checkWindowClosed = setInterval(() => {\n const { accessToken, accessTokenParams, code, codeParams, error, errorDescription, refreshToken } =\n getOAuthCallbackData(() => authWindow.location.href, flow['x-tokenName'] || 'access_token')\n\n // The window has closed OR we have what we are looking for so we stop polling\n if (authWindow.closed || accessToken || code || error) {\n clearInterval(checkWindowClosed)\n authWindow.close()\n\n if (error) {\n resolve([new Error(`OAuth error: ${error}${errorDescription ? ` (${errorDescription})` : ''}`), null])\n return\n }\n\n // Implicit Flow\n if (accessToken) {\n const _state = accessTokenParams?.get('state') ?? null\n\n if (_state === state) {\n resolve([null, { accessToken, ...(refreshToken ? { refreshToken } : {}) }])\n } else {\n resolve([new Error('State mismatch'), null])\n }\n return\n }\n\n // Authorization Code Server Flow\n if (code && type === 'authorizationCode') {\n const _state = codeParams?.get('state') ?? null\n\n if (_state === state) {\n void authorizeServers(\n flows,\n type,\n scopes,\n {\n code,\n pkce,\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n .then(resolve)\n .catch((error: unknown) => {\n resolve([\n error instanceof Error ? error : new Error('Failed to get an access token', { cause: error }),\n null,\n ])\n })\n } else {\n resolve([new Error('State mismatch'), null])\n }\n return\n }\n\n // User closed window without authorizing\n resolve([new Error('Window was closed without granting authorization'), null])\n }\n }, 200)\n })\n }\n return [new Error('Failed to open auth window'), null]\n } catch (error) {\n return [error instanceof Error ? error : new Error('Failed to authorize oauth2 flow', { cause: error }), null]\n }\n}\n\n/**\n * Makes the BE authorization call to grab the token server to server\n * Used for clientCredentials and authorizationCode\n */\nconst authorizeServers = async (\n flows: NonImplicitFlows,\n type: keyof NonImplicitFlows,\n scopes: string,\n {\n code,\n pkce,\n proxyUrl,\n }: {\n code?: string\n pkce?: PKCEState | null\n proxyUrl?: string\n } = {},\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const formData = new URLSearchParams()\n\n // Only client credentials and password flows support scopes in the token request\n if (scopes && (type === 'clientCredentials' || type === 'password')) {\n formData.set('scope', scopes)\n }\n\n /** Where to add the credentials */\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret'])\n /**\n * Public authorization-code clients still need client_id in the token body.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n if ('x-scalar-secret-redirect-uri' in flow && flow['x-scalar-secret-redirect-uri']) {\n formData.set('redirect_uri', flow['x-scalar-secret-redirect-uri'])\n }\n\n // Authorization Code\n if (code) {\n formData.set('code', code)\n formData.set('grant_type', 'authorization_code')\n\n // PKCE\n if (pkce) {\n formData.set('code_verifier', pkce.codeVerifier)\n }\n }\n // Password\n else if (type === 'password') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n formData.set('grant_type', 'password')\n formData.set('username', typedFlow['x-scalar-secret-username'])\n formData.set('password', typedFlow['x-scalar-secret-password'])\n }\n // Client Credentials\n else {\n formData.set('grant_type', 'client_credentials')\n }\n\n // Additional request body parameters\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n // Add client id + secret to headers for confidential clients.\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n // Check if we should use the proxy\n const tokenUrl = makeUrlAbsolute(\n flow['x-scalar-secret-token-url'] ?? flow.tokenUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n const url = shouldUseProxy(proxyUrl, tokenUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', tokenUrl]]).toString()}`\n : tokenUrl\n\n // Make the call\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n // Use custom token name if specified, otherwise default to access_token\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const refreshToken = responseData.refresh_token\n\n if (!accessToken) {\n return [new Error(responseData.error_description ?? responseData.error ?? 'Failed to get an access token'), null]\n }\n\n return [null, { accessToken, ...(typeof refreshToken === 'string' ? { refreshToken } : {}) }]\n } catch (error) {\n return [\n error instanceof Error\n ? error\n : new Error('Failed to get an access token. Please check your credentials.', { cause: error }),\n null,\n ]\n }\n}\n\n/**\n * Exchange a refresh token for a new access token using the `grant_type=refresh_token` flow.\n *\n * Uses the stored refresh token, client credentials, and the token URL (or refreshUrl when available)\n * to request fresh tokens from the authorization server per RFC 6749 Section 6.\n */\nexport const refreshOauth2Token = async (\n flows: OAuthFlowsObjectSecret,\n type: RefreshableFlows,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** We use the active server to set a base for relative URLs */\n activeServer: ServerObject | null,\n /** Flattened environment variables used to resolve server URL templates */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const refreshToken = flow['x-scalar-secret-refresh-token']\n if (!refreshToken) {\n return [new Error('No refresh token available'), null]\n }\n\n const formData = new URLSearchParams()\n formData.set('grant_type', 'refresh_token')\n formData.set('refresh_token', refreshToken)\n\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret'])\n /**\n * Public authorization-code clients still need client_id in the refresh body per RFC 6749 Section 6.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n const refreshUrl = flow.refreshUrl || flow['x-scalar-secret-token-url'] || flow.tokenUrl\n const absoluteRefreshUrl = makeUrlAbsolute(refreshUrl, getActiveServerBase(activeServer, environmentVariables))\n const url = shouldUseProxy(proxyUrl, absoluteRefreshUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', absoluteRefreshUrl]]).toString()}`\n : absoluteRefreshUrl\n\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const newRefreshToken = responseData.refresh_token\n\n if (!accessToken) {\n return [new Error(responseData.error_description ?? responseData.error ?? 'Token refresh failed'), null]\n }\n\n return [\n null,\n {\n accessToken,\n ...(typeof newRefreshToken === 'string' ? { refreshToken: newRefreshToken } : { refreshToken }),\n },\n ]\n } catch (error) {\n return [\n error instanceof Error\n ? error\n : new Error('Failed to refresh the access token. Please re-authorize.', { cause: error }),\n null,\n ]\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,IAAa,gBACX,cACA,uBAA+C,EAAE,KAEjD,oBACE,qBAAqB,cAAc,OAAO,IAAI,mBAAmB,aAAa,CAAC,EAC/E,qBACD;;;;;;;AAQH,IAAa,uBACX,cACA,uBAA+C,EAAE,KAC5B;CACrB,MAAM,YAAY,aAAa,cAAc,qBAAqB;AAClE,KAAI,CAAC,UACH,QAAO,EAAE;AAGX,KAAI,eAAe,UAAU,CAC3B,QAAO,OAAO,WAAW,cAAc,EAAE,GAAG,EAAE,UAAU,WAAW;AAGrE,QAAO,EAAE,SAAS,WAAW;;;;;;;AAQ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BAAoB,cAAc,qBAAqB,CAAC;EAC/G,MAAM,MAAM,eAAe,UAAU,mBAAmB,GACpD,GAAG,SAAS,GAAG,IAAI,gBAAgB,CAAC,CAAC,cAAc,mBAAmB,CAAC,CAAC,CAAC,UAAU,KACnF;EAOJ,MAAM,eAAe,OALR,MAAM,MAAM,KAAK;GAC5B,QAAQ;GACR;GACA,MAAM;GACP,CAAC,EAC8B,MAAM;EAGtC,MAAM,cAAc,aADF,KAAK,kBAAkB;EAEzC,MAAM,kBAAkB,aAAa;AAErC,MAAI,CAAC,YACH,QAAO,CAAC,IAAI,MAAM,aAAa,qBAAqB,aAAa,SAAS,uBAAuB,EAAE,KAAK;AAG1G,SAAO,CACL,MACA;GACE;GACA,GAAI,OAAO,oBAAoB,WAAW,EAAE,cAAc,iBAAiB,GAAG,EAAE,cAAc;GAC/F,CACF;UACM,OAAO;AACd,SAAO,CACL,iBAAiB,QACb,QACA,IAAI,MAAM,4DAA4D,EAAE,OAAO,OAAO,CAAC,EAC3F,KACD"}
|
|
1
|
+
{"version":3,"file":"oauth.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { replaceEnvVariables, replacePathVariables } from '@scalar/helpers/regex/replace-variables'\nimport { isRelativePath } from '@scalar/helpers/url/is-relative-path'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example'\nimport { getServerVariables } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode, fromUint8Array } from 'js-base64'\n\nimport { getOAuthCallbackData } from './oauth-callback'\n\n/** Oauth2 security schemes which are not implicit */\ntype NonImplicitFlows = Omit<OAuthFlowsObjectSecret, 'implicit'>\n\nconst authorizationCodeUsesPkcePublicClient = (\n flowType: keyof NonImplicitFlows,\n flow: NonImplicitFlows[keyof NonImplicitFlows],\n): boolean => {\n if (flowType !== 'authorizationCode') {\n return false\n }\n const authCode = flow as OAuthFlowsObjectSecret['authorizationCode']\n if (!authCode) {\n return false\n }\n const pkceMode = authCode['x-usePkce']\n return pkceMode === 'SHA-256' || pkceMode === 'plain'\n}\n\ntype PKCEState = {\n codeVerifier: string\n codeChallenge: string\n codeChallengeMethod: string\n}\n\ntype ActiveServerBase = { basePath: string } | { baseUrl: string } | Record<string, never>\n\nexport type OAuth2Tokens = {\n accessToken: string\n refreshToken?: string\n}\n\n/** Flow types that support token refresh (all except implicit) */\ntype RefreshableFlows = Exclude<keyof OAuthFlowsObjectSecret, 'implicit'>\n\n/**\n * Resolves the active server URL using OpenAPI server variables first, then\n * Scalar environment variables.\n */\nexport const getServerUrl = (\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): string =>\n replaceEnvVariables(\n replacePathVariables(activeServer?.url ?? '', getServerVariables(activeServer)),\n environmentVariables,\n )\n\n/**\n * Builds the base option used when OAuth URLs are relative to the active server.\n *\n * Relative server URLs become browser-only base paths because they need the\n * current window location to resolve correctly.\n */\nexport const getActiveServerBase = (\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): ActiveServerBase => {\n const serverUrl = getServerUrl(activeServer, environmentVariables)\n if (!serverUrl) {\n return {}\n }\n\n if (isRelativePath(serverUrl)) {\n return typeof window === 'undefined' ? {} : { basePath: serverUrl }\n }\n\n return { baseUrl: serverUrl }\n}\n\n/**\n * Generates a random string for PKCE code verifier\n *\n * @see https://www.rfc-editor.org/rfc/rfc7636#page-8\n */\nconst generateCodeVerifier = (): string => {\n // Generate 32 random bytes\n const buffer = new Uint8Array(32)\n crypto.getRandomValues(buffer)\n\n // Base64URL encode the bytes\n return fromUint8Array(buffer, true)\n}\n\n/**\n * Creates a code challenge from the code verifier\n */\nconst generateCodeChallenge = async (verifier: string, encoding: 'SHA-256' | 'plain'): Promise<string> => {\n if (encoding === 'plain') {\n return verifier\n }\n\n // If crypto.subtle.digest is not a function, we cannot use SHA-256\n if (typeof crypto?.subtle?.digest !== 'function') {\n console.warn('SHA-256 is only supported when using https, using a plain text code challenge instead.')\n return verifier\n }\n\n // ASCII encoding is just taking the lower 8 bits of each character\n const encoder = new TextEncoder()\n const data = encoder.encode(verifier)\n const digest = await crypto.subtle.digest('SHA-256', data)\n\n // Base64URL encode the bytes\n return fromUint8Array(new Uint8Array(digest), true)\n}\n\n/**\n * Authorize oauth2 flow\n *\n * @returns the resolved oauth2 tokens\n */\nexport const authorizeOauth2 = async (\n flows: OAuthFlowsObjectSecret,\n type: keyof OAuthFlowsObjectSecret,\n selectedScopes: string[],\n /** We use the active server to set a base for relative redirect uris */\n activeServer: ServerObject | null,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** Flattened environment variables used to resolve server URL templates like `{protocol}` */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n try {\n if (!flow) {\n return [new Error('Flow not found'), null]\n }\n\n const scopes = selectedScopes.join(' ')\n\n // Client Credentials or Password Flow\n if (type === 'clientCredentials' || type === 'password') {\n return authorizeServers(\n flows,\n type,\n scopes,\n {\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n }\n\n // Generate a random state string with the length of 8 characters\n const state = (Math.random() + 1).toString(36).substring(2, 10)\n\n const authorizationUrl = makeUrlAbsolute(\n flows[type]!['x-scalar-secret-auth-url'] ?? flows[type]!.authorizationUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n\n const url = new URL(authorizationUrl)\n\n /** Special PKCE state */\n let pkce: PKCEState | null = null\n\n // Params unique to the flows\n if (type === 'implicit') {\n url.searchParams.set('response_type', 'token')\n } else if (type === 'authorizationCode') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n url.searchParams.set('response_type', 'code')\n\n // PKCE\n if (typedFlow['x-usePkce'] !== 'no') {\n const codeVerifier = generateCodeVerifier()\n const codeChallenge = await generateCodeChallenge(codeVerifier, typedFlow['x-usePkce'])\n\n // Set state for later verification\n pkce = {\n codeVerifier,\n codeChallenge,\n codeChallengeMethod: typedFlow['x-usePkce'] === 'SHA-256' ? 'S256' : 'plain',\n }\n\n // Set the code challenge and method on the url\n url.searchParams.set('code_challenge', codeChallenge)\n url.searchParams.set('code_challenge_method', pkce.codeChallengeMethod)\n }\n }\n\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n // Handle relative redirect uris\n if (typedFlow['x-scalar-secret-redirect-uri'].startsWith('/')) {\n const baseUrl =\n getServerUrl(activeServer, environmentVariables) || window.location.origin + window.location.pathname\n const redirectUri = new URL(typedFlow['x-scalar-secret-redirect-uri'], baseUrl).toString()\n\n url.searchParams.set('redirect_uri', redirectUri)\n } else {\n url.searchParams.set('redirect_uri', typedFlow['x-scalar-secret-redirect-uri'])\n }\n\n if (flow['x-scalar-security-query']) {\n Object.keys(flow['x-scalar-security-query']).forEach((key: string): void => {\n const value = flow['x-scalar-security-query']?.[key]\n if (!value) {\n return\n }\n url.searchParams.set(key, value)\n })\n }\n\n // Common to all flows\n url.searchParams.set('client_id', flow['x-scalar-secret-client-id'])\n url.searchParams.set('state', state)\n if (scopes) {\n url.searchParams.set('scope', scopes)\n }\n\n const windowFeatures = 'left=100,top=100,width=800,height=600'\n const authWindow = window.open(url, 'openAuth2Window', windowFeatures)\n\n // Open up a window and poll until closed or we have the data we want\n if (authWindow) {\n // We need to return a promise here due to the setInterval\n return new Promise<ErrorResponse<OAuth2Tokens>>((resolve) => {\n const checkWindowClosed = setInterval(() => {\n const { accessToken, accessTokenParams, code, codeParams, error, errorDescription, refreshToken } =\n getOAuthCallbackData(() => authWindow.location.href, flow['x-tokenName'] || 'access_token')\n\n // The window has closed OR we have what we are looking for so we stop polling\n if (authWindow.closed || accessToken || code || error) {\n clearInterval(checkWindowClosed)\n authWindow.close()\n\n if (error) {\n resolve([new Error(`OAuth error: ${error}${errorDescription ? ` (${errorDescription})` : ''}`), null])\n return\n }\n\n // Implicit Flow\n if (accessToken) {\n const _state = accessTokenParams?.get('state') ?? null\n\n if (_state === state) {\n resolve([null, { accessToken, ...(refreshToken ? { refreshToken } : {}) }])\n } else {\n resolve([new Error('State mismatch'), null])\n }\n return\n }\n\n // Authorization Code Server Flow\n if (code && type === 'authorizationCode') {\n const _state = codeParams?.get('state') ?? null\n\n if (_state === state) {\n void authorizeServers(\n flows,\n type,\n scopes,\n {\n code,\n pkce,\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n .then(resolve)\n .catch((error: unknown) => {\n resolve([\n error instanceof Error ? error : new Error('Failed to get an access token', { cause: error }),\n null,\n ])\n })\n } else {\n resolve([new Error('State mismatch'), null])\n }\n return\n }\n\n // User closed window without authorizing\n resolve([new Error('Window was closed without granting authorization'), null])\n }\n }, 200)\n })\n }\n return [new Error('Failed to open auth window'), null]\n } catch (error) {\n return [error instanceof Error ? error : new Error('Failed to authorize oauth2 flow', { cause: error }), null]\n }\n}\n\n/**\n * Makes the BE authorization call to grab the token server to server\n * Used for clientCredentials and authorizationCode\n */\nconst authorizeServers = async (\n flows: NonImplicitFlows,\n type: keyof NonImplicitFlows,\n scopes: string,\n {\n code,\n pkce,\n proxyUrl,\n }: {\n code?: string\n pkce?: PKCEState | null\n proxyUrl?: string\n } = {},\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const formData = new URLSearchParams()\n\n // Only client credentials and password flows support scopes in the token request\n if (scopes && (type === 'clientCredentials' || type === 'password')) {\n formData.set('scope', scopes)\n }\n\n /** Where to add the credentials */\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const pkcePublicClient = authorizationCodeUsesPkcePublicClient(type, flow)\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret']) && !pkcePublicClient\n /**\n * Public authorization-code clients still need client_id in the token body.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n if ('x-scalar-secret-redirect-uri' in flow && flow['x-scalar-secret-redirect-uri']) {\n formData.set('redirect_uri', flow['x-scalar-secret-redirect-uri'])\n }\n\n // Authorization Code\n if (code) {\n formData.set('code', code)\n formData.set('grant_type', 'authorization_code')\n\n // PKCE\n if (pkce) {\n formData.set('code_verifier', pkce.codeVerifier)\n }\n }\n // Password\n else if (type === 'password') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n formData.set('grant_type', 'password')\n formData.set('username', typedFlow['x-scalar-secret-username'])\n formData.set('password', typedFlow['x-scalar-secret-password'])\n }\n // Client Credentials\n else {\n formData.set('grant_type', 'client_credentials')\n }\n\n // Additional request body parameters\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n // Add client id + secret to headers for confidential clients.\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n // Check if we should use the proxy\n const tokenUrl = makeUrlAbsolute(\n flow['x-scalar-secret-token-url'] ?? flow.tokenUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n const url = shouldUseProxy(proxyUrl, tokenUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', tokenUrl]]).toString()}`\n : tokenUrl\n\n // Make the call\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n // Use custom token name if specified, otherwise default to access_token\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const refreshToken = responseData.refresh_token\n\n if (!accessToken) {\n return [new Error(responseData.error_description ?? responseData.error ?? 'Failed to get an access token'), null]\n }\n\n return [null, { accessToken, ...(typeof refreshToken === 'string' ? { refreshToken } : {}) }]\n } catch (error) {\n return [\n error instanceof Error\n ? error\n : new Error('Failed to get an access token. Please check your credentials.', { cause: error }),\n null,\n ]\n }\n}\n\n/**\n * Exchange a refresh token for a new access token using the `grant_type=refresh_token` flow.\n *\n * Uses the stored refresh token, client credentials, and the token URL (or refreshUrl when available)\n * to request fresh tokens from the authorization server per RFC 6749 Section 6.\n */\nexport const refreshOauth2Token = async (\n flows: OAuthFlowsObjectSecret,\n type: RefreshableFlows,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** We use the active server to set a base for relative URLs */\n activeServer: ServerObject | null,\n /** Flattened environment variables used to resolve server URL templates */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const refreshToken = flow['x-scalar-secret-refresh-token']\n if (!refreshToken) {\n return [new Error('No refresh token available'), null]\n }\n\n const formData = new URLSearchParams()\n formData.set('grant_type', 'refresh_token')\n formData.set('refresh_token', refreshToken)\n\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const pkcePublicClient = authorizationCodeUsesPkcePublicClient(type, flow)\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret']) && !pkcePublicClient\n /**\n * Public authorization-code clients still need client_id in the refresh body per RFC 6749 Section 6.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n const refreshUrl = flow.refreshUrl || flow['x-scalar-secret-token-url'] || flow.tokenUrl\n const absoluteRefreshUrl = makeUrlAbsolute(refreshUrl, getActiveServerBase(activeServer, environmentVariables))\n const url = shouldUseProxy(proxyUrl, absoluteRefreshUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', absoluteRefreshUrl]]).toString()}`\n : absoluteRefreshUrl\n\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const newRefreshToken = responseData.refresh_token\n\n if (!accessToken) {\n return [new Error(responseData.error_description ?? responseData.error ?? 'Token refresh failed'), null]\n }\n\n return [\n null,\n {\n accessToken,\n ...(typeof newRefreshToken === 'string' ? { refreshToken: newRefreshToken } : { refreshToken }),\n },\n ]\n } catch (error) {\n return [\n error instanceof Error\n ? error\n : new Error('Failed to refresh the access token. Please re-authorize.', { cause: error }),\n null,\n ]\n }\n}\n"],"mappings":";;;;;;;;AAeA,IAAM,yCACJ,UACA,SACY;AACZ,KAAI,aAAa,oBACf,QAAO;CAET,MAAM,WAAW;AACjB,KAAI,CAAC,SACH,QAAO;CAET,MAAM,WAAW,SAAS;AAC1B,QAAO,aAAa,aAAa,aAAa;;;;;;AAuBhD,IAAa,gBACX,cACA,uBAA+C,EAAE,KAEjD,oB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,CAAA;AACvE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-auth-selector-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -105,9 +105,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
105
105
|
cursorPosition: () => number | undefined;
|
|
106
106
|
serializeValue: (value: CodeInputModelValue) => string;
|
|
107
107
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
108
|
-
|
|
109
|
-
submit: (value: string, event: FocusEvent | KeyboardEvent) => any;
|
|
108
|
+
submit: (value: string, event: KeyboardEvent | FocusEvent) => any;
|
|
110
109
|
"update:modelValue": (value: string) => any;
|
|
110
|
+
blur: (value: string, event: FocusEvent) => any;
|
|
111
111
|
navigate: (route: {
|
|
112
112
|
page: "document";
|
|
113
113
|
path: "environment";
|
|
@@ -169,9 +169,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
169
169
|
/** Put a linethrough on the input text */
|
|
170
170
|
linethrough?: boolean;
|
|
171
171
|
}> & Readonly<{
|
|
172
|
-
|
|
173
|
-
onSubmit?: ((value: string, event: FocusEvent | KeyboardEvent) => any) | undefined;
|
|
172
|
+
onSubmit?: ((value: string, event: KeyboardEvent | FocusEvent) => any) | undefined;
|
|
174
173
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
174
|
+
onBlur?: ((value: string, event: FocusEvent) => any) | undefined;
|
|
175
175
|
onNavigate?: ((route: {
|
|
176
176
|
page: "document";
|
|
177
177
|
path: "environment";
|
|
@@ -2,9 +2,9 @@ import DataTableInputSelect_default from "../data-table/DataTableInputSelect.vue
|
|
|
2
2
|
import EnvironmentVariablesDropdown_default from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
|
|
3
3
|
import { backspaceCommand, pillPlugin } from "./code-variable-widget.js";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, toDisplayString, toRef, unref, useAttrs, watch, withKeys, withModifiers } from "vue";
|
|
5
|
-
import { CONTEXT_FUNCTION_NAMES, getContextFunctionComment, isContextFunctionName } from "@scalar/workspace-store/request-example";
|
|
6
5
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
7
6
|
import { colorPicker, useCodeMirror, useDropdown } from "@scalar/use-codemirror";
|
|
7
|
+
import { CONTEXT_FUNCTION_NAMES, getContextFunctionComment, isContextFunctionName } from "@scalar/workspace-store/request-example";
|
|
8
8
|
import { nanoid } from "nanoid";
|
|
9
9
|
//#region src/v2/components/code-input/CodeInput.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = { class: "whitespace-nowrap" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PillTooltipHost_default from "./PillTooltipHost.vue.js";
|
|
2
2
|
import { createApp } from "vue";
|
|
3
|
+
import { Decoration, EditorView, RangeSetBuilder, ViewPlugin, WidgetType } from "@scalar/use-codemirror";
|
|
3
4
|
import { getContextFunctionComment } from "@scalar/workspace-store/request-example";
|
|
4
5
|
import { REGEX } from "@scalar/helpers/regex/regex-helpers";
|
|
5
|
-
import { Decoration, EditorView, RangeSetBuilder, ViewPlugin, WidgetType } from "@scalar/use-codemirror";
|
|
6
6
|
//#region src/v2/components/code-input/code-variable-widget.ts
|
|
7
7
|
/**
|
|
8
8
|
* Displays `{{name}}` as a pill: environment variables show the resolved value;
|
|
@@ -9,11 +9,11 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_1) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
-
cancel: () => any;
|
|
13
12
|
submit: () => any;
|
|
13
|
+
cancel: () => any;
|
|
14
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
-
onCancel?: (() => any) | undefined;
|
|
16
15
|
onSubmit?: (() => any) | undefined;
|
|
16
|
+
onCancel?: (() => any) | undefined;
|
|
17
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,11 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
warningMessage?: string | undefined;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
-
close: () => any;
|
|
9
8
|
delete: () => any;
|
|
9
|
+
close: () => any;
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onClose?: (() => any) | undefined;
|
|
12
11
|
onDelete?: (() => any) | undefined;
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
export default _default;
|
|
@@ -20,7 +20,6 @@ export type ServerDropdownProps = {
|
|
|
20
20
|
layout: ClientLayout;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_export: import("vue").DefineComponent<ServerDropdownProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
23
|
-
"update:open": (value: boolean) => any;
|
|
24
23
|
"update:variable": (payload: {
|
|
25
24
|
index: number;
|
|
26
25
|
key: string;
|
|
@@ -32,8 +31,8 @@ declare const __VLS_export: import("vue").DefineComponent<ServerDropdownProps, {
|
|
|
32
31
|
meta: ServerMeta;
|
|
33
32
|
}) => any;
|
|
34
33
|
"update:servers": () => any;
|
|
34
|
+
"update:open": (value: boolean) => any;
|
|
35
35
|
}, string, import("vue").PublicProps, Readonly<ServerDropdownProps> & Readonly<{
|
|
36
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
36
|
"onUpdate:variable"?: ((payload: {
|
|
38
37
|
index: number;
|
|
39
38
|
key: string;
|
|
@@ -45,5 +44,6 @@ declare const __VLS_export: import("vue").DefineComponent<ServerDropdownProps, {
|
|
|
45
44
|
meta: ServerMeta;
|
|
46
45
|
}) => any) | undefined;
|
|
47
46
|
"onUpdate:servers"?: (() => any) | undefined;
|
|
47
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
48
48
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
49
|
//# sourceMappingURL=ServerDropdown.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDropdown.vue.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2
|
|
1
|
+
{"version":3,"file":"ServerDropdown.vue.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75\"\n variant=\"ghost\">\n <template v-if=\"server\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIconPlus class=\"size-3\" />\n </template>\n </ScalarButton>\n\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"(serverOption, index) in requestServerOptions\"\n :key=\"serverOption.id\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:selectedServer=\"\n emit('update:selectedServer', { url: serverOption.id, meta })\n \"\n @update:variable=\"\n (key, value) => emit('update:variable', { index, key, value, meta })\n \" />\n\n <!-- Add Server -->\n <template v-if=\"layout !== 'modal'\">\n <button\n class=\"text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75\"\n type=\"button\"\n @click=\"emit('update:servers')\">\n <div class=\"flex items-center justify-center\">\n <ScalarIconPencilSimple class=\"size-4\" />\n </div>\n <span>Update Servers</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop=\"{ open }\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emit('update:open', value)\"\n @unmount=\"emit('update:open', false)\" />\n\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-lg\" />\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -78,7 +78,7 @@ var ServerDropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
78
78
|
onUnmount: _cache[2] || (_cache[2] = ($event) => emit("update:open", false))
|
|
79
79
|
}, null, 8, ["value"]), createVNode(unref(ScalarFloatingBackdrop), { class: "inset-x-px rounded-none rounded-b-lg" })]),
|
|
80
80
|
default: withCtx(() => [createVNode(unref(ScalarButton), {
|
|
81
|
-
class: "hover:bg-b-2 font-code text-c-2
|
|
81
|
+
class: "hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75",
|
|
82
82
|
variant: "ghost"
|
|
83
83
|
}, {
|
|
84
84
|
default: withCtx(() => [__props.server ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "sr-only" }, "Server:", -1)), createTextVNode(" " + toDisplayString(serverUrlWithoutTrailingSlash.value), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "sr-only" }, "Add Server", -1)), createVNode(unref(ScalarIconPlus), { class: "size-3" })], 64))]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDropdown.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2
|
|
1
|
+
{"version":3,"file":"ServerDropdown.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75\"\n variant=\"ghost\">\n <template v-if=\"server\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIconPlus class=\"size-3\" />\n </template>\n </ScalarButton>\n\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"(serverOption, index) in requestServerOptions\"\n :key=\"serverOption.id\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:selectedServer=\"\n emit('update:selectedServer', { url: serverOption.id, meta })\n \"\n @update:variable=\"\n (key, value) => emit('update:variable', { index, key, value, meta })\n \" />\n\n <!-- Add Server -->\n <template v-if=\"layout !== 'modal'\">\n <button\n class=\"text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75\"\n type=\"button\"\n @click=\"emit('update:servers')\">\n <div class=\"flex items-center justify-center\">\n <ScalarIconPencilSimple class=\"size-4\" />\n </div>\n <span>Update Servers</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop=\"{ open }\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emit('update:open', value)\"\n @unmount=\"emit('update:open', false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c,GAAA,EAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA;IAKjB,UAAQ,SAKyB,EALrB,WAAI,CAEzB,YAG0C,sBAAA;KAFvC,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,eAAgB,MAAK;KAC5C,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,eAAA,MAAA;4BAEhB,YAAuE,MAAA,uBAAA,EAAA,EAA/C,OAAM,wCAAsC,CAAA,CAAA,CAAA;2BAzCvD,CAXf,YAWe,MAAA,aAAA,EAAA;KAVb,OAAM;KACN,SAAQ;;4BAIG,CAHK,QAAA,UAAA,WAAA,EAAhB,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAAA,gBAAO,MACpC,gBAAG,8BAAA,MAA6B,EAAA,EAAA,CAAA,EAAA,GAAA,KAAA,WAAA,EAElC,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAuC,QAAA,EAAjC,OAAM,WAAS,EAAC,cAAU,GAAA,GAChC,YAAiC,MAAA,eAAA,EAAA,EAAjB,OAAM,UAAQ,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAmNA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iB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Ac,EAAE,MAAM,CAAC;CACtB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA8TxD,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIconButton,\n ScalarSidebarSearchInput,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\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 wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(()
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIconButton,\n ScalarSidebarSearchInput,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\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 wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(() =>\n documents.filter(isOpenApiDocument),\n)\n\n/** We show either the search results or the sidebar items */\nconst items = computed(() => results.value ?? sidebarState.items.value)\n\n/** Select an item and clear the search query */\nconst handleSelectItem = (id: string) => {\n emit('selectItem', id)\n query.value = ''\n isSearchVisible.value = false\n}\n</script>\n<template>\n <Resize\n v-model:width=\"sidebarWidth\"\n class=\"flex flex-col\">\n <template #default>\n <ScalarSidebar\n class=\"flex w-auto flex-1\"\n :indent=\"20\"\n :isDraggable=\"layout !== 'modal'\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items\n layout=\"client\"\n :options=\"{ hideOperationDefaultExamples: layout === 'modal' }\"\n @reorder=\"\n (draggingItem, hoveredItem) =>\n emit('reorder', draggingItem, hoveredItem)\n \"\n @selectItem=\"handleSelectItem\">\n <template #header>\n <!-- drag region (macos) -->\n <div class=\"mac:h-12 mac:app-drag-region h-2\"></div>\n <div\n class=\"bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5\"\n :class=\"{\n 'max-md:pt-12': layout === 'desktop',\n 'max-md:pt-2 max-md:pl-4!': layout === 'modal',\n 'pt-1 max-md:pt-2 max-md:pl-14': layout === 'web',\n }\">\n <div\n v-if=\"layout !== 'web'\"\n class=\"flex items-center justify-between\"\n :class=\"{ 'max-md:pl-10': layout === 'desktop' }\">\n <!-- Desktop gets the workspace menu here -->\n <SidebarMenu\n v-if=\"layout !== 'modal'\"\n :activeWorkspace=\"activeWorkspace\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"emit('navigate:to:settings')\"\n @select:workspace=\"(id) => emit('select:workspace', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n </SidebarMenu>\n\n <!-- Placeholder for the sidebar toggle in modal layout -->\n <div v-else-if=\"layout === 'modal'\"></div>\n\n <!-- Toggle search, always visible on web -->\n <ScalarIconButton\n class=\"hover:bg-b-2 active:text-c-1 size-8 rounded p-2\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n size=\"sm\"\n @click=\"isSearchVisible = !isSearchVisible\" />\n </div>\n\n <ScalarSidebarSearchInput\n v-if=\"isSearchVisible || layout === 'web'\"\n v-model=\"query\"\n :autofocus=\"layout !== 'web'\" />\n </div>\n </template>\n\n <template #spacer>\n <div class=\"flex-1\"></div>\n </template>\n\n <template\n v-if=\"slots.decorator\"\n #decorator=\"decoratorProps\">\n <slot\n v-bind=\"decoratorProps\"\n name=\"decorator\" />\n </template>\n\n <template #icon=\"iconProps\">\n <template v-if=\"slots.icon || isDraft(iconProps.item)\">\n <ScalarIconFileDashed v-if=\"isDraft(iconProps.item)\" />\n <slot\n v-bind=\"iconProps\"\n name=\"icon\" />\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template\n v-if=\"slots.empty\"\n #empty=\"emptyProps\">\n <slot\n v-bind=\"emptyProps\"\n name=\"empty\" />\n </template>\n\n <template #before>\n <slot name=\"workspaceButton\" />\n </template>\n\n <template #footer>\n <slot name=\"footer\" />\n </template>\n </ScalarSidebar>\n </template>\n </Resize>\n</template>\n"],"mappings":""}
|
|
@@ -4,7 +4,8 @@ import SidebarMenu_default from "./SidebarMenu.vue.js";
|
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, isRef, mergeModels, normalizeClass, normalizeProps, openBlock, ref, renderSlot, unref, useModel, useSlots, withCtx } from "vue";
|
|
5
5
|
import { ScalarIconButton, ScalarSidebarSearchInput } from "@scalar/components";
|
|
6
6
|
import { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from "@scalar/icons";
|
|
7
|
-
import { ScalarSidebar
|
|
7
|
+
import { ScalarSidebar } from "@scalar/sidebar";
|
|
8
|
+
import { isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
|
|
8
9
|
//#region src/v2/components/sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
9
10
|
var _hoisted_1 = { key: 1 };
|
|
10
11
|
var Sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -41,7 +42,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
41
42
|
return item.type === "example" && item.title === "draft";
|
|
42
43
|
};
|
|
43
44
|
/** We handle search results out here so we can show them in the sidebar */
|
|
44
|
-
const { query, results } = useSearchIndex(() => __props.documents);
|
|
45
|
+
const { query, results } = useSearchIndex(() => __props.documents.filter(isOpenApiDocument));
|
|
45
46
|
/** We show either the search results or the sidebar items */
|
|
46
47
|
const items = computed(() => results.value ?? __props.sidebarState.items.value);
|
|
47
48
|
/** Select an item and clear the search query */
|
|
@@ -56,7 +57,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
56
57
|
"onUpdate:width": _cache[6] || (_cache[6] = ($event) => sidebarWidth.value = $event),
|
|
57
58
|
class: "flex flex-col"
|
|
58
59
|
}, {
|
|
59
|
-
default: withCtx(() => [createVNode(unref(ScalarSidebar
|
|
60
|
+
default: withCtx(() => [createVNode(unref(ScalarSidebar), {
|
|
60
61
|
class: "flex w-auto flex-1",
|
|
61
62
|
indent: 20,
|
|
62
63
|
isDraggable: __props.layout !== "modal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIconButton,\n ScalarSidebarSearchInput,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\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 wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(()
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIconButton,\n ScalarSidebarSearchInput,\n type WorkspaceGroup,\n} from '@scalar/components'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\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 wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(() =>\n documents.filter(isOpenApiDocument),\n)\n\n/** We show either the search results or the sidebar items */\nconst items = computed(() => results.value ?? sidebarState.items.value)\n\n/** Select an item and clear the search query */\nconst handleSelectItem = (id: string) => {\n emit('selectItem', id)\n query.value = ''\n isSearchVisible.value = false\n}\n</script>\n<template>\n <Resize\n v-model:width=\"sidebarWidth\"\n class=\"flex flex-col\">\n <template #default>\n <ScalarSidebar\n class=\"flex w-auto flex-1\"\n :indent=\"20\"\n :isDraggable=\"layout !== 'modal'\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items\n layout=\"client\"\n :options=\"{ hideOperationDefaultExamples: layout === 'modal' }\"\n @reorder=\"\n (draggingItem, hoveredItem) =>\n emit('reorder', draggingItem, hoveredItem)\n \"\n @selectItem=\"handleSelectItem\">\n <template #header>\n <!-- drag region (macos) -->\n <div class=\"mac:h-12 mac:app-drag-region h-2\"></div>\n <div\n class=\"bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5\"\n :class=\"{\n 'max-md:pt-12': layout === 'desktop',\n 'max-md:pt-2 max-md:pl-4!': layout === 'modal',\n 'pt-1 max-md:pt-2 max-md:pl-14': layout === 'web',\n }\">\n <div\n v-if=\"layout !== 'web'\"\n class=\"flex items-center justify-between\"\n :class=\"{ 'max-md:pl-10': layout === 'desktop' }\">\n <!-- Desktop gets the workspace menu here -->\n <SidebarMenu\n v-if=\"layout !== 'modal'\"\n :activeWorkspace=\"activeWorkspace\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"emit('navigate:to:settings')\"\n @select:workspace=\"(id) => emit('select:workspace', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n </SidebarMenu>\n\n <!-- Placeholder for the sidebar toggle in modal layout -->\n <div v-else-if=\"layout === 'modal'\"></div>\n\n <!-- Toggle search, always visible on web -->\n <ScalarIconButton\n class=\"hover:bg-b-2 active:text-c-1 size-8 rounded p-2\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n size=\"sm\"\n @click=\"isSearchVisible = !isSearchVisible\" />\n </div>\n\n <ScalarSidebarSearchInput\n v-if=\"isSearchVisible || layout === 'web'\"\n v-model=\"query\"\n :autofocus=\"layout !== 'web'\" />\n </div>\n </template>\n\n <template #spacer>\n <div class=\"flex-1\"></div>\n </template>\n\n <template\n v-if=\"slots.decorator\"\n #decorator=\"decoratorProps\">\n <slot\n v-bind=\"decoratorProps\"\n name=\"decorator\" />\n </template>\n\n <template #icon=\"iconProps\">\n <template v-if=\"slots.icon || isDraft(iconProps.item)\">\n <ScalarIconFileDashed v-if=\"isDraft(iconProps.item)\" />\n <slot\n v-bind=\"iconProps\"\n name=\"icon\" />\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template\n v-if=\"slots.empty\"\n #empty=\"emptyProps\">\n <slot\n v-bind=\"emptyProps\"\n name=\"empty\" />\n </template>\n\n <template #before>\n <slot name=\"workspaceButton\" />\n </template>\n\n <template #footer>\n <slot name=\"footer\" />\n </template>\n </ScalarSidebar>\n </template>\n </Resize>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,OAAO;EAab,MAAM,QAAQ,UAAA;;EAgBd,MAAM,kBAAkB,IAAI,MAAK;;EAGjC,MAAM,eAAe,SAAmB,SAAC,eAGxC;EAED,MAAM,WAAW,SAAyB;AACxC,UAAO,KAAK,SAAS,aAAa,KAAK,UAAU;;;EAInD,MAAM,EAAE,OAAO,YAAY,qBACzB,QAAA,UAAU,OAAO,kBAAkB,CACrC;;EAGA,MAAM,QAAQ,eAAe,QAAQ,SAAS,QAAA,aAAa,MAAM,MAAK;;EAGtE,MAAM,oBAAoB,OAAe;AACvC,QAAK,cAAc,GAAE;AACrB,SAAM,QAAQ;AACd,mBAAgB,QAAQ;;;uBAIxB,YAwGS,MAAA,eAAA,EAAA;IAvGC,OAAO,aAAA;yEAAY,QAAA;IAC3B,OAAM;;IACK,SAAO,cAmGA,CAlGhB,YAkGgB,MAAA,cAAA,EAAA;KAjGd,OAAM;KACL,QAAQ;KACR,aAAa,QAAA,WAAM;KACnB,aAAa,QAAA;KACb,YAAY,QAAA,aAAa;KACzB,YAAY,QAAA,aAAa;KACzB,OAAA,MAAA;KACD,QAAO;KACN,SAAO,EAAA,8BAAkC,QAAA,WAAM,SAAA;KAC/C,WAAO,OAAA,OAAA,OAAA,MAAc,cAAc,gBAA4B,KAAI,WAAY,cAAc,YAAW;KAIxG,cAAY;;KACF,QAAM,cAEqC,CAAA,OAAA,OAAA,OAAA,KAApD,mBAAoD,OAAA,EAA/C,OAAM,oCAAkC,EAAA,MAAA,GAAA,GAC7C,mBAwCM,OAAA,EAvCJ,OAAK,eAAA,CAAC,wDAAsD;sBACpB,QAAA,WAAM;kCAA0D,QAAA,WAAM;uCAA6D,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gB,KAAA,QAAA,QAAA,eAAA,mBADN,UAAS,CAAA,CAAA,CAAA,EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;KAcZ,QAAM,cACgB,CAA/B,WAA+B,KAAA,QAAA,kBAAA,CAAA,CAAA;KAGtB,QAAM,cACO,CAAtB,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA;;QA9BhB,MAAM,YAAA;WACX;kBAAW,mBAAc,CAC1B,WAEqB,KAAA,QAAA,aAAA,eAAA,mBADX,eAAc,CAAA,CAAA,CAAA,CAAA;;gBAelB,MAAM,QAAA;WACX;kBAAO,eAAU,CAClB,WAEiB,KAAA,QAAA,SAAA,eAAA,mBADP,WAAU,CAAA,CAAA,CAAA,CAAA"}
|
package/dist/v2/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/v2/constants.ts
|
|
2
2
|
/** The version number taken from the package.json. Consumers can override at build time via define (e.g. OVERRIDE_PACKAGE_VERSION: JSON.stringify('1.2.3')). */
|
|
3
|
-
var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "3.
|
|
3
|
+
var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "3.8.1";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { APP_VERSION };
|
|
6
6
|
|
|
@@ -34,8 +34,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
34
34
|
/** Whether the form and submit button are disabled */
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
37
|
-
cancel: () => any;
|
|
38
37
|
submit: () => any;
|
|
38
|
+
cancel: () => any;
|
|
39
39
|
back: (e: KeyboardEvent) => any;
|
|
40
40
|
}, string, import("vue").PublicProps, Readonly<{
|
|
41
41
|
/** Loading state from useLoadingState composable to show spinner on submit button */
|
|
@@ -43,8 +43,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
43
43
|
/** Whether the form and submit button are disabled */
|
|
44
44
|
disabled?: boolean;
|
|
45
45
|
}> & Readonly<{
|
|
46
|
-
onCancel?: (() => any) | undefined;
|
|
47
46
|
onSubmit?: (() => any) | undefined;
|
|
47
|
+
onCancel?: (() => any) | undefined;
|
|
48
48
|
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
49
49
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
50
50
|
/** Main content area for form inputs */
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
24
24
|
/** Whether to automatically focus the input when mounted */
|
|
25
25
|
autofocus?: boolean;
|
|
26
26
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
|
-
delete: (keyboardEvent: KeyboardEvent) => any;
|
|
28
27
|
"update:modelValue": (value: string) => any;
|
|
28
|
+
delete: (keyboardEvent: KeyboardEvent) => any;
|
|
29
29
|
}, string, import("vue").PublicProps, Readonly<{
|
|
30
30
|
/** Current value of the input */
|
|
31
31
|
modelValue?: string;
|
|
@@ -34,7 +34,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
34
34
|
/** Whether to automatically focus the input when mounted */
|
|
35
35
|
autofocus?: boolean;
|
|
36
36
|
}> & Readonly<{
|
|
37
|
-
onDelete?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
38
37
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
38
|
+
onDelete?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
//# sourceMappingURL=CommandActionInput.vue.d.ts.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { default as CommandActionForm } from './components/CommandActionForm.vue.js';
|
|
2
2
|
export { default as CommandActionInput } from './components/CommandActionInput.vue.js';
|
|
3
|
-
export { default as CommandPaletteImport } from './components/CommandPaletteImport.vue.js';
|
|
4
|
-
export { default as TheCommandPalette } from './TheCommandPalette.vue.js';
|
|
5
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/command-palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/command-palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import CommandActionForm_default from "./components/CommandActionForm.vue.js";
|
|
2
2
|
import CommandActionInput_default from "./components/CommandActionInput.vue.js";
|
|
3
|
-
|
|
4
|
-
import TheCommandPalette_default from "./TheCommandPalette.vue.js";
|
|
5
|
-
export { CommandActionForm_default as CommandActionForm, CommandActionInput_default as CommandActionInput, CommandPaletteImport_default as CommandPaletteImport, TheCommandPalette_default as TheCommandPalette };
|
|
3
|
+
export { CommandActionForm_default as CommandActionForm, CommandActionInput_default as CommandActionInput };
|
|
@@ -4,11 +4,11 @@ type __VLS_Props = {
|
|
|
4
4
|
name: string | null;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
cancel: () => any;
|
|
8
7
|
submit: () => any;
|
|
8
|
+
cancel: () => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onCancel?: (() => any) | undefined;
|
|
11
10
|
onSubmit?: (() => any) | undefined;
|
|
11
|
+
onCancel?: (() => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
@@ -3,17 +3,15 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
|
3
3
|
import type { ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
4
4
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
5
5
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
6
|
-
import type {
|
|
7
|
-
import { type ComputedRef, type Ref } from 'vue';
|
|
6
|
+
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
7
|
+
import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
|
|
8
8
|
import { type UseModalSidebarReturn } from '../../../v2/features/modal/hooks/use-modal-sidebar.js';
|
|
9
|
-
import type { ApiClientOptionsRef } from '../../../v2/types/options';
|
|
10
|
-
import type { MaybeRefOrGetter } from 'vue';
|
|
11
|
-
import type { ApiClientOptions } from '../../../v2/types/options';
|
|
9
|
+
import type { ApiClientOptions, ApiClientOptionsRef } from '../../../v2/types/options';
|
|
12
10
|
export type ModalProps = {
|
|
13
11
|
/** The workspace store must be initialized and passed in */
|
|
14
12
|
workspaceStore: WorkspaceStore;
|
|
15
|
-
/** The document must be initialized and passed in */
|
|
16
|
-
document: ComputedRef<
|
|
13
|
+
/** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */
|
|
14
|
+
document: ComputedRef<OpenApiDocument | null>;
|
|
17
15
|
/** The path must be initialized and passed in */
|
|
18
16
|
path: ComputedRef<string | undefined>;
|
|
19
17
|
/** The event bus for handling all events */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA4MA,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,oBAAoB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACT,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAKxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG/E,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qGAAqG;IACrG,QAAQ,EAAE,WAAW,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IAC7C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,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