@scalar/api-client 2.38.2 → 2.38.4
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 +14 -0
- package/dist/{AddressBar-B4xnl66I.js → AddressBar-BOZGKSoz.js} +4 -4
- package/dist/{AddressBar-B4xnl66I.js.map → AddressBar-BOZGKSoz.js.map} +1 -1
- package/dist/{App-CvClwSlM.js → App-Ckirvnv1.js} +2 -2
- package/dist/{App-CvClwSlM.js.map → App-Ckirvnv1.js.map} +1 -1
- package/dist/{App-BVH4lIe8.js → App-DHBmpWJI.js} +4 -4
- package/dist/{App-BVH4lIe8.js.map → App-DHBmpWJI.js.map} +1 -1
- package/dist/{CodeInput-C-igR77V.js → CodeInput-BTN8cC5h.js} +2 -2
- package/dist/{CodeInput-C-igR77V.js.map → CodeInput-BTN8cC5h.js.map} +1 -1
- package/dist/{Collection-4MT9WmDD.js → Collection-BsAG7ms5.js} +2 -2
- package/dist/{Collection-4MT9WmDD.js.map → Collection-BsAG7ms5.js.map} +1 -1
- package/dist/{CollectionAuthentication-MHWQpw74.js → CollectionAuthentication-BMGhRnpo.js} +5 -5
- package/dist/{CollectionAuthentication-MHWQpw74.js.map → CollectionAuthentication-BMGhRnpo.js.map} +1 -1
- package/dist/{CollectionEnvironment-Dw35vIqo.js → CollectionEnvironment-BY9Gcnln.js} +4 -4
- package/dist/{CollectionEnvironment-Dw35vIqo.js.map → CollectionEnvironment-BY9Gcnln.js.map} +1 -1
- package/dist/{CollectionOverview-TUdDIu5f.js → CollectionOverview-C3GvN8GY.js} +3 -3
- package/dist/{CollectionOverview-TUdDIu5f.js.map → CollectionOverview-C3GvN8GY.js.map} +1 -1
- package/dist/{CollectionServers-BrjTCfDe.js → CollectionServers-DuOLysNB.js} +5 -5
- package/dist/{CollectionServers-BrjTCfDe.js.map → CollectionServers-DuOLysNB.js.map} +1 -1
- package/dist/{CollectionSettings-HVSlp2Gv.js → CollectionSettings-FtXNetOh.js} +2 -2
- package/dist/{CollectionSettings-HVSlp2Gv.js.map → CollectionSettings-FtXNetOh.js.map} +1 -1
- package/dist/{CommandPalette-CL8k4CoN.js → CommandPalette-BxoEK8TY.js} +2 -2
- package/dist/{CommandPalette-CL8k4CoN.js.map → CommandPalette-BxoEK8TY.js.map} +1 -1
- package/dist/{Cookies-DbOKTi1f.js → Cookies-BYTv1YIA.js} +8 -8
- package/dist/{Cookies-DbOKTi1f.js.map → Cookies-BYTv1YIA.js.map} +1 -1
- package/dist/{DataTableInput-yaU5g-kP.js → DataTableInput-RydMDjn2.js} +2 -2
- package/dist/{DataTableInput-yaU5g-kP.js.map → DataTableInput-RydMDjn2.js.map} +1 -1
- package/dist/{Environment-DJatRQIg.js → Environment-BIxG7DaO.js} +5 -5
- package/dist/{Environment-DJatRQIg.js.map → Environment-BIxG7DaO.js.map} +1 -1
- package/dist/{EnvironmentModal-DBEJ4Kzj.js → EnvironmentModal-C0lYytkh.js} +2 -2
- package/dist/{EnvironmentModal-DBEJ4Kzj.js.map → EnvironmentModal-C0lYytkh.js.map} +1 -1
- package/dist/{Form-CSKzyHGO.js → Form-KFcdRQp1.js} +3 -3
- package/dist/{Form-CSKzyHGO.js.map → Form-KFcdRQp1.js.map} +1 -1
- package/dist/{ImportCollection-DfX1UQ5u.js → ImportCollection-CGjySEzP.js} +2 -2
- package/dist/{ImportCollection-DfX1UQ5u.js.map → ImportCollection-CGjySEzP.js.map} +1 -1
- package/dist/{MainLayout-BEFMl1ud.js → MainLayout-BnLwst16.js} +3 -3
- package/dist/{MainLayout-BEFMl1ud.js.map → MainLayout-BnLwst16.js.map} +1 -1
- package/dist/{Modal-sQ9vH6MN.js → Modal-CTZ8UNds.js} +2 -2
- package/dist/{Modal-sQ9vH6MN.js.map → Modal-CTZ8UNds.js.map} +1 -1
- package/dist/{Request-gscRsGQ8.js → Request-d0RY0ZhC.js} +10 -10
- package/dist/{Request-gscRsGQ8.js.map → Request-d0RY0ZhC.js.map} +1 -1
- package/dist/{RequestAuth-BzBfIysT.js → RequestAuth-1cRH3DDn.js} +3 -3
- package/dist/{RequestAuth-BzBfIysT.js.map → RequestAuth-1cRH3DDn.js.map} +1 -1
- package/dist/{RequestRoot-3Bj8JZD-.js → RequestRoot-pW0yXesG.js} +7 -7
- package/dist/{RequestRoot-3Bj8JZD-.js.map → RequestRoot-pW0yXesG.js.map} +1 -1
- package/dist/{RequestSection-HhdJj9hW.js → RequestSection-D2BLvDTr.js} +4 -4
- package/dist/{RequestSection-HhdJj9hW.js.map → RequestSection-D2BLvDTr.js.map} +1 -1
- package/dist/{ResponseSection-DMJ0tw8E.js → ResponseSection-B_YF7l_E.js} +3 -3
- package/dist/{ResponseSection-DMJ0tw8E.js.map → ResponseSection-B_YF7l_E.js.map} +1 -1
- package/dist/{Server-DnA_BzPS.js → Server-CEKGIEfE.js} +2 -2
- package/dist/{Server-DnA_BzPS.js.map → Server-CEKGIEfE.js.map} +1 -1
- package/dist/{Settings-CYZzdJPO.js → Settings-BaPvhJ8Y.js} +2 -2
- package/dist/{Settings-CYZzdJPO.js.map → Settings-BaPvhJ8Y.js.map} +1 -1
- package/dist/{Sidebar-C6AdX6-N.js → Sidebar-CRxdl38Y.js} +2 -2
- package/dist/{Sidebar-C6AdX6-N.js.map → Sidebar-CRxdl38Y.js.map} +1 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/index.js +3 -3
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.js +1 -1
- package/dist/components/CommandPalette/index.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/index.js +2 -2
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/index.js +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +4 -4
- package/dist/{components-CSxJTn6F.js → components-B0BwUDFw.js} +2 -2
- package/dist/{components-CSxJTn6F.js.map → components-B0BwUDFw.js.map} +1 -1
- package/dist/get-resolved-url-SybDPV0U.js +85 -0
- package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
- package/dist/{get-server-url-o3On8CEr.js → get-server-url-UVN-dx79.js} +1 -1
- package/dist/{get-server-url-o3On8CEr.js.map → get-server-url-UVN-dx79.js.map} +1 -1
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/index.js +3 -3
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts +1 -1
- package/dist/layouts/Modal/index.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/index.js +4 -4
- package/dist/libs/create-client.d.ts +3 -3
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/index.d.ts +1 -1
- package/dist/libs/index.js +1 -1
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/{operation-block-BnMIKAOh.js → operation-block-B1B3lJPx.js} +67 -17
- package/dist/operation-block-B1B3lJPx.js.map +1 -0
- package/dist/{operation-code-sample-ZUTueV3v.js → operation-code-sample-DOzAPxLQ.js} +22 -10
- package/dist/operation-code-sample-DOzAPxLQ.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/{request-block-DwsGy64Q.js → request-block-C1kLLMEd.js} +4 -4
- package/dist/{request-block-DwsGy64Q.js.map → request-block-C1kLLMEd.js.map} +1 -1
- package/dist/{scalar-address-bar-block--Vs6IBU1.js → scalar-address-bar-block-BbysOhkE.js} +2 -2
- package/dist/{scalar-address-bar-block--Vs6IBU1.js.map → scalar-address-bar-block-BbysOhkE.js.map} +1 -1
- package/dist/{scalar-auth-selector-block-DI3DLag9.js → scalar-auth-selector-block-Bs79QOMA.js} +12 -9
- package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +1 -0
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/store.d.ts +7 -7
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/workspace.d.ts +1 -1
- package/dist/{store-DpSUVhjp.js → store-DnlAQK5d.js} +15 -15
- package/dist/{store-DpSUVhjp.js.map → store-DnlAQK5d.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/index.js +11 -11
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +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/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +5 -5
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +3 -3
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/constants.d.ts +3 -0
- package/dist/v2/constants.d.ts.map +1 -0
- package/dist/v2/features/app/App.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +4 -4
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
- package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +3 -3
- package/dist/v2/features/app/index.d.ts +5 -5
- package/dist/v2/features/app/index.js +14 -14
- package/dist/v2/features/app/index.js.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +45 -10
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/index.js +10 -10
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/features/operation/index.js +10 -10
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
- package/dist/v2/helpers/get-tab-details.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.js +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.js +3 -3
- package/dist/views/Request/components/index.js +1 -1
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/package.json +12 -12
- package/dist/get-resolved-url-BUCwrBzc.js +0 -30
- package/dist/get-resolved-url-BUCwrBzc.js.map +0 -1
- package/dist/operation-block-BnMIKAOh.js.map +0 -1
- package/dist/operation-code-sample-ZUTueV3v.js.map +0 -1
- package/dist/scalar-auth-selector-block-DI3DLag9.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AddressBar } from './AddressBar';
|
|
1
|
+
export { AddressBar } from './AddressBar/index.js';
|
|
2
2
|
export { default as OpenApiClientButton } from './OpenApiClientButton.vue';
|
|
3
|
-
export { Sidebar } from './Sidebar';
|
|
3
|
+
export { Sidebar } from './Sidebar/index.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../HttpMethod-rnWEgC3T.js";
|
|
2
|
-
import "../CodeInput-
|
|
3
|
-
import "../Server-
|
|
4
|
-
import { t as AddressBar_default } from "../AddressBar-
|
|
2
|
+
import "../CodeInput-BTN8cC5h.js";
|
|
3
|
+
import "../Server-CEKGIEfE.js";
|
|
4
|
+
import { t as AddressBar_default } from "../AddressBar-BOZGKSoz.js";
|
|
5
5
|
import { t as OpenApiClientButton_default } from "../components-ChixwQhN.js";
|
|
6
|
-
import { t as Sidebar_default } from "../Sidebar-
|
|
6
|
+
import { t as Sidebar_default } from "../Sidebar-CRxdl38Y.js";
|
|
7
7
|
export { AddressBar_default as AddressBar, OpenApiClientButton_default as OpenApiClientButton, Sidebar_default as Sidebar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as useWorkspace, w as useActiveEntities } from "./store-
|
|
1
|
+
import { r as useWorkspace, w as useActiveEntities } from "./store-DnlAQK5d.js";
|
|
2
2
|
import { t as DeleteSidebarListElement_default } from "./DeleteSidebarListElement-C-p87d03.js";
|
|
3
3
|
import { t as EditSidebarListElement_default } from "./EditSidebarListElement-CodWPnM6.js";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, ref, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
@@ -180,4 +180,4 @@ var WorkspaceDropdown_default = /* @__PURE__ */ defineComponent({
|
|
|
180
180
|
//#endregion
|
|
181
181
|
export { WorkspaceDropdown_default as t };
|
|
182
182
|
|
|
183
|
-
//# sourceMappingURL=components-
|
|
183
|
+
//# sourceMappingURL=components-B0BwUDFw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-CSxJTn6F.js","names":[],"sources":["../src/views/Request/components/WorkspaceDropdown.vue","../src/views/Request/components/WorkspaceDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n ScalarListboxCheckbox,\n ScalarModal,\n useModal,\n} from '@scalar/components'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { computed, ref } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport EditSidebarListElement from '@/components/Sidebar/Actions/EditSidebarListElement.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { workspaces, workspaceMutators, events } = useWorkspace()\nconst { push } = useRouter()\n\nconst updateSelected = (uid: Workspace['uid']) => {\n if (uid === activeWorkspace.value?.uid) {\n return\n }\n\n push({\n name: 'workspace',\n params: {\n workspace: uid,\n },\n })\n}\n\nconst isLastWorkspace = computed(() => Object.keys(workspaces).length === 1)\n\nconst createNewWorkspace = () =>\n events.commandPalette.emit({ commandName: 'Create Workspace' })\n\nconst tempName = ref('')\nconst tempUid = ref('' as Workspace['uid'])\nconst editModal = useModal()\nconst deleteModal = useModal()\n\nconst openRenameModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n editModal.show()\n}\n\nconst handleWorkspaceEdit = (name: string) => {\n if (!name.trim()) {\n return\n }\n\n workspaceMutators.edit(tempUid.value, 'name', name.trim())\n editModal.hide()\n}\n\nconst openDeleteModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n deleteModal.show()\n}\n\nconst deleteWorkspace = async () => {\n if (!isLastWorkspace.value) {\n const deletedActiveWorkspace = activeWorkspace.value?.uid === tempUid.value\n const currentWorkspaces = { ...workspaces }\n delete currentWorkspaces[tempUid.value]\n\n workspaceMutators.delete(tempUid.value)\n\n // Switch to another workspace if the active one is deleted\n if (deletedActiveWorkspace) {\n const newWorkspaceUid = Object.keys(currentWorkspaces)[0]\n\n await push({\n name: 'workspace',\n params: {\n workspace: newWorkspaceUid,\n },\n })\n }\n }\n\n deleteModal.hide()\n}\n</script>\n\n<template>\n <div>\n <div class=\"flex w-[inherit] items-center text-base\">\n <ScalarDropdown>\n <ScalarButton\n class=\"text-c-1 hover:bg-b-2 line-clamp-1 h-full w-fit justify-start px-1.5 py-1.5 font-normal\"\n variant=\"ghost\">\n <div class=\"m-0 flex items-center gap-1.5 font-bold\">\n <h2 class=\"line-clamp-1 text-left\">\n {{ activeWorkspace?.name }}\n </h2>\n </div>\n </ScalarButton>\n\n <!-- Workspace list -->\n <template #items>\n <ScalarDropdownItem\n v-for=\"(workspace, uid) in workspaces\"\n :key=\"uid\"\n class=\"group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"updateSelected(workspace.uid)\">\n <ScalarListboxCheckbox :selected=\"activeWorkspace?.uid === uid\" />\n <span class=\"overflow-hidden text-ellipsis\">{{\n workspace.name\n }}</span>\n <ScalarDropdown\n placement=\"right-start\"\n teleport>\n <ScalarButton\n class=\"hover:bg-b-3 -mr-1 ml-auto aspect-square h-fit px-0.5 py-0 group-hover/item:flex\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\">\n <ScalarIcon\n icon=\"Ellipses\"\n size=\"sm\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n class=\"flex gap-2\"\n @mousedown=\"openRenameModal(workspace.uid)\"\n @touchend.prevent=\"openRenameModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Edit\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Rename</span>\n </ScalarDropdownItem>\n <ScalarDropdownItem\n v-if=\"!isLastWorkspace\"\n class=\"flex gap-2\"\n @mousedown.prevent=\"openDeleteModal(workspace.uid)\"\n @touchend.prevent=\"openDeleteModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Delete\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Delete</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </ScalarDropdownItem>\n <ScalarDropdownDivider />\n\n <!-- Add new workspace -->\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"createNewWorkspace\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Create Workspace</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </div>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"deleteModal\"\n title=\"Delete workspace\">\n <DeleteSidebarListElement\n :variableName=\"tempName\"\n warningMessage=\"This cannot be undone. You're about to delete the workspace and everything inside it.\"\n @close=\"deleteModal.hide()\"\n @delete=\"deleteWorkspace\" />\n </ScalarModal>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"editModal\"\n title=\"Rename Workspace\">\n <EditSidebarListElement\n :name=\"tempName\"\n @close=\"editModal.hide()\"\n @edit=\"handleWorkspaceEdit\" />\n </ScalarModal>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n ScalarListboxCheckbox,\n ScalarModal,\n useModal,\n} from '@scalar/components'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { computed, ref } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport EditSidebarListElement from '@/components/Sidebar/Actions/EditSidebarListElement.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { workspaces, workspaceMutators, events } = useWorkspace()\nconst { push } = useRouter()\n\nconst updateSelected = (uid: Workspace['uid']) => {\n if (uid === activeWorkspace.value?.uid) {\n return\n }\n\n push({\n name: 'workspace',\n params: {\n workspace: uid,\n },\n })\n}\n\nconst isLastWorkspace = computed(() => Object.keys(workspaces).length === 1)\n\nconst createNewWorkspace = () =>\n events.commandPalette.emit({ commandName: 'Create Workspace' })\n\nconst tempName = ref('')\nconst tempUid = ref('' as Workspace['uid'])\nconst editModal = useModal()\nconst deleteModal = useModal()\n\nconst openRenameModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n editModal.show()\n}\n\nconst handleWorkspaceEdit = (name: string) => {\n if (!name.trim()) {\n return\n }\n\n workspaceMutators.edit(tempUid.value, 'name', name.trim())\n editModal.hide()\n}\n\nconst openDeleteModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n deleteModal.show()\n}\n\nconst deleteWorkspace = async () => {\n if (!isLastWorkspace.value) {\n const deletedActiveWorkspace = activeWorkspace.value?.uid === tempUid.value\n const currentWorkspaces = { ...workspaces }\n delete currentWorkspaces[tempUid.value]\n\n workspaceMutators.delete(tempUid.value)\n\n // Switch to another workspace if the active one is deleted\n if (deletedActiveWorkspace) {\n const newWorkspaceUid = Object.keys(currentWorkspaces)[0]\n\n await push({\n name: 'workspace',\n params: {\n workspace: newWorkspaceUid,\n },\n })\n }\n }\n\n deleteModal.hide()\n}\n</script>\n\n<template>\n <div>\n <div class=\"flex w-[inherit] items-center text-base\">\n <ScalarDropdown>\n <ScalarButton\n class=\"text-c-1 hover:bg-b-2 line-clamp-1 h-full w-fit justify-start px-1.5 py-1.5 font-normal\"\n variant=\"ghost\">\n <div class=\"m-0 flex items-center gap-1.5 font-bold\">\n <h2 class=\"line-clamp-1 text-left\">\n {{ activeWorkspace?.name }}\n </h2>\n </div>\n </ScalarButton>\n\n <!-- Workspace list -->\n <template #items>\n <ScalarDropdownItem\n v-for=\"(workspace, uid) in workspaces\"\n :key=\"uid\"\n class=\"group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"updateSelected(workspace.uid)\">\n <ScalarListboxCheckbox :selected=\"activeWorkspace?.uid === uid\" />\n <span class=\"overflow-hidden text-ellipsis\">{{\n workspace.name\n }}</span>\n <ScalarDropdown\n placement=\"right-start\"\n teleport>\n <ScalarButton\n class=\"hover:bg-b-3 -mr-1 ml-auto aspect-square h-fit px-0.5 py-0 group-hover/item:flex\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\">\n <ScalarIcon\n icon=\"Ellipses\"\n size=\"sm\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n class=\"flex gap-2\"\n @mousedown=\"openRenameModal(workspace.uid)\"\n @touchend.prevent=\"openRenameModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Edit\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Rename</span>\n </ScalarDropdownItem>\n <ScalarDropdownItem\n v-if=\"!isLastWorkspace\"\n class=\"flex gap-2\"\n @mousedown.prevent=\"openDeleteModal(workspace.uid)\"\n @touchend.prevent=\"openDeleteModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Delete\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Delete</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </ScalarDropdownItem>\n <ScalarDropdownDivider />\n\n <!-- Add new workspace -->\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"createNewWorkspace\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Create Workspace</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </div>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"deleteModal\"\n title=\"Delete workspace\">\n <DeleteSidebarListElement\n :variableName=\"tempName\"\n warningMessage=\"This cannot be undone. You're about to delete the workspace and everything inside it.\"\n @close=\"deleteModal.hide()\"\n @delete=\"deleteWorkspace\" />\n </ScalarModal>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"editModal\"\n title=\"Rename Workspace\">\n <EditSidebarListElement\n :name=\"tempName\"\n @close=\"editModal.hide()\"\n @edit=\"handleWorkspaceEdit\" />\n </ScalarModal>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;ECoBA,MAAM,EAAE,oBAAoB,mBAAkB;EAC9C,MAAM,EAAE,YAAY,mBAAmB,WAAW,cAAa;EAC/D,MAAM,EAAE,SAAS,WAAU;EAE3B,MAAM,kBAAkB,QAA0B;AAChD,OAAI,QAAQ,gBAAgB,OAAO,IACjC;AAGF,QAAK;IACH,MAAM;IACN,QAAQ,EACN,WAAW,KACZ;IACF,CAAA;;EAGH,MAAM,kBAAkB,eAAe,OAAO,KAAK,WAAW,CAAC,WAAW,EAAC;EAE3E,MAAM,2BACJ,OAAO,eAAe,KAAK,EAAE,aAAa,oBAAoB,CAAA;EAEhE,MAAM,WAAW,IAAI,GAAE;EACvB,MAAM,UAAU,IAAI,GAAsB;EAC1C,MAAM,YAAY,UAAS;EAC3B,MAAM,cAAc,UAAS;EAE7B,MAAM,mBAAmB,QAA0B;GACjD,MAAM,YAAY,WAAW;AAC7B,OAAI,CAAC,UACH;AAGF,YAAS,QAAQ,UAAU;AAC3B,WAAQ,QAAQ;AAChB,aAAU,MAAK;;EAGjB,MAAM,uBAAuB,SAAiB;AAC5C,OAAI,CAAC,KAAK,MAAM,CACd;AAGF,qBAAkB,KAAK,QAAQ,OAAO,QAAQ,KAAK,MAAM,CAAA;AACzD,aAAU,MAAK;;EAGjB,MAAM,mBAAmB,QAA0B;GACjD,MAAM,YAAY,WAAW;AAC7B,OAAI,CAAC,UACH;AAGF,YAAS,QAAQ,UAAU;AAC3B,WAAQ,QAAQ;AAChB,eAAY,MAAK;;EAGnB,MAAM,kBAAkB,YAAY;AAClC,OAAI,CAAC,gBAAgB,OAAO;IAC1B,MAAM,yBAAyB,gBAAgB,OAAO,QAAQ,QAAQ;IACtE,MAAM,oBAAoB,EAAE,GAAG,YAAW;AAC1C,WAAO,kBAAkB,QAAQ;AAEjC,sBAAkB,OAAO,QAAQ,MAAK;AAGtC,QAAI,wBAAwB;KAC1B,MAAM,kBAAkB,OAAO,KAAK,kBAAkB,CAAC;AAEvD,WAAM,KAAK;MACT,MAAM;MACN,QAAQ,EACN,WAAW,iBACZ;MACF,CAAA;;;AAIL,eAAY,MAAK;;;uBAKjB,mBAkGM,OAAA,MAAA;IAjGJ,mBA6EM,OA7EN,YA6EM,CA5EJ,YA2EiB,MAAA,eAAA,EAAA,MAAA;KA/DJ,OAAK,cAE0B;wBADxC,mBA+CqB,UAAA,MAAA,WA9CQ,MAAA,WAAU,GAA7B,WAAW,QAAG;2BADxB,YA+CqB,MAAA,mBAAA,EAAA;QA7ClB,KAAK;QACN,OAAM;QACL,SAAK,eAAA,WAAO,eAAe,UAAU,IAAG,EAAA,CAAA,OAAA,CAAA;;+BACyB;SAAlE,YAAkE,MAAA,sBAAA,EAAA,EAA1C,UAAU,MAAA,gBAAe,EAAE,QAAQ,KAAA,EAAA,MAAA,GAAA,CAAA,WAAA,CAAA;SAC3D,mBAES,QAFT,YAES,gBADP,UAAU,KAAI,EAAA,EAAA;SAEhB,YAqCiB,MAAA,eAAA,EAAA;UApCf,WAAU;UACV,UAAA;;UAUW,OAAK,cAWO,CAVrB,YAUqB,MAAA,mBAAA,EAAA;WATnB,OAAM;WACL,cAAS,WAAE,gBAAgB,UAAU,IAAG;WACxC,YAAQ,eAAA,WAAU,gBAAgB,UAAU,IAAG,EAAA,CAAA,UAAA,CAAA;;kCAK5B,CAJpB,YAIoB,MAAA,WAAA,EAAA;YAHlB,OAAM;YACN,MAAK;YACL,MAAK;YACL,WAAU;yCACZ,mBAAmB,QAAA,MAAb,UAAM,GAAA,EAAA,CAAA;;iDAGL,gBAAA,SAAA,WAAA,EADT,YAWqB,MAAA,mBAAA,EAAA;;WATnB,OAAM;WACL,aAAS,eAAA,WAAU,gBAAgB,UAAU,IAAG,EAAA,CAAA,UAAA,CAAA;WAChD,YAAQ,eAAA,WAAU,gBAAgB,UAAU,IAAG,EAAA,CAAA,UAAA,CAAA;;kCAK5B,CAJpB,YAIoB,MAAA,WAAA,EAAA;YAHlB,OAAM;YACN,MAAK;YACL,MAAK;YACL,WAAU;yCACZ,mBAAmB,QAAA,MAAb,UAAM,GAAA,EAAA,CAAA;;;iCAvBD,CARf,YAQe,MAAA,aAAA,EAAA;WAPb,OAAM;WACN,MAAK;WACL,MAAK;WACL,SAAQ;;kCAGM,CAFd,YAEc,MAAA,WAAA,EAAA;YADZ,MAAK;YACL,MAAK;;;;;;;;;;MA6Bb,YAAyB,MAAA,sBAAA,CAAA;MAGzB,YASqB,MAAA,mBAAA,EAAA;OARnB,OAAM;OACL,SAAO;;8BAKF,CAJN,mBAIM,OAJN,YAIM,CAHJ,YAEc,MAAA,WAAA,EAAA;QADZ,MAAK;QACL,MAAK;uCAET,mBAA6B,QAAA,MAAvB,oBAAgB,GAAA,EAAA,CAAA;;;;4BA/DX,CARf,YAQe,MAAA,aAAA,EAAA;MAPb,OAAM;MACN,SAAQ;;6BAKF,CAJN,mBAIM,OAJN,YAIM,CAHJ,mBAEK,MAFL,YAEK,gBADA,MAAA,gBAAe,EAAE,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;;IAuElC,YASc,MAAA,YAAA,EAAA;KARX,MAAM;KACN,OAAO,MAAA,YAAW;KACnB,OAAM;;4BAKwB,CAJ9B,YAI8B,kCAAA;MAH3B,cAAc,SAAA;MACf,gBAAe;MACd,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,YAAW,CAAC,MAAI;MACvB,UAAQ;;;;IAEb,YAQc,MAAA,YAAA,EAAA;KAPX,MAAM;KACN,OAAO,MAAA,UAAS;KACjB,OAAM;;4BAI0B,CAHhC,YAGgC,gCAAA;MAF7B,MAAM,SAAA;MACN,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,UAAS,CAAC,MAAI;MACrB,QAAM"}
|
|
1
|
+
{"version":3,"file":"components-B0BwUDFw.js","names":[],"sources":["../src/views/Request/components/WorkspaceDropdown.vue","../src/views/Request/components/WorkspaceDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n ScalarListboxCheckbox,\n ScalarModal,\n useModal,\n} from '@scalar/components'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { computed, ref } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport EditSidebarListElement from '@/components/Sidebar/Actions/EditSidebarListElement.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { workspaces, workspaceMutators, events } = useWorkspace()\nconst { push } = useRouter()\n\nconst updateSelected = (uid: Workspace['uid']) => {\n if (uid === activeWorkspace.value?.uid) {\n return\n }\n\n push({\n name: 'workspace',\n params: {\n workspace: uid,\n },\n })\n}\n\nconst isLastWorkspace = computed(() => Object.keys(workspaces).length === 1)\n\nconst createNewWorkspace = () =>\n events.commandPalette.emit({ commandName: 'Create Workspace' })\n\nconst tempName = ref('')\nconst tempUid = ref('' as Workspace['uid'])\nconst editModal = useModal()\nconst deleteModal = useModal()\n\nconst openRenameModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n editModal.show()\n}\n\nconst handleWorkspaceEdit = (name: string) => {\n if (!name.trim()) {\n return\n }\n\n workspaceMutators.edit(tempUid.value, 'name', name.trim())\n editModal.hide()\n}\n\nconst openDeleteModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n deleteModal.show()\n}\n\nconst deleteWorkspace = async () => {\n if (!isLastWorkspace.value) {\n const deletedActiveWorkspace = activeWorkspace.value?.uid === tempUid.value\n const currentWorkspaces = { ...workspaces }\n delete currentWorkspaces[tempUid.value]\n\n workspaceMutators.delete(tempUid.value)\n\n // Switch to another workspace if the active one is deleted\n if (deletedActiveWorkspace) {\n const newWorkspaceUid = Object.keys(currentWorkspaces)[0]\n\n await push({\n name: 'workspace',\n params: {\n workspace: newWorkspaceUid,\n },\n })\n }\n }\n\n deleteModal.hide()\n}\n</script>\n\n<template>\n <div>\n <div class=\"flex w-[inherit] items-center text-base\">\n <ScalarDropdown>\n <ScalarButton\n class=\"text-c-1 hover:bg-b-2 line-clamp-1 h-full w-fit justify-start px-1.5 py-1.5 font-normal\"\n variant=\"ghost\">\n <div class=\"m-0 flex items-center gap-1.5 font-bold\">\n <h2 class=\"line-clamp-1 text-left\">\n {{ activeWorkspace?.name }}\n </h2>\n </div>\n </ScalarButton>\n\n <!-- Workspace list -->\n <template #items>\n <ScalarDropdownItem\n v-for=\"(workspace, uid) in workspaces\"\n :key=\"uid\"\n class=\"group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"updateSelected(workspace.uid)\">\n <ScalarListboxCheckbox :selected=\"activeWorkspace?.uid === uid\" />\n <span class=\"overflow-hidden text-ellipsis\">{{\n workspace.name\n }}</span>\n <ScalarDropdown\n placement=\"right-start\"\n teleport>\n <ScalarButton\n class=\"hover:bg-b-3 -mr-1 ml-auto aspect-square h-fit px-0.5 py-0 group-hover/item:flex\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\">\n <ScalarIcon\n icon=\"Ellipses\"\n size=\"sm\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n class=\"flex gap-2\"\n @mousedown=\"openRenameModal(workspace.uid)\"\n @touchend.prevent=\"openRenameModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Edit\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Rename</span>\n </ScalarDropdownItem>\n <ScalarDropdownItem\n v-if=\"!isLastWorkspace\"\n class=\"flex gap-2\"\n @mousedown.prevent=\"openDeleteModal(workspace.uid)\"\n @touchend.prevent=\"openDeleteModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Delete\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Delete</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </ScalarDropdownItem>\n <ScalarDropdownDivider />\n\n <!-- Add new workspace -->\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"createNewWorkspace\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Create Workspace</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </div>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"deleteModal\"\n title=\"Delete workspace\">\n <DeleteSidebarListElement\n :variableName=\"tempName\"\n warningMessage=\"This cannot be undone. You're about to delete the workspace and everything inside it.\"\n @close=\"deleteModal.hide()\"\n @delete=\"deleteWorkspace\" />\n </ScalarModal>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"editModal\"\n title=\"Rename Workspace\">\n <EditSidebarListElement\n :name=\"tempName\"\n @close=\"editModal.hide()\"\n @edit=\"handleWorkspaceEdit\" />\n </ScalarModal>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n ScalarListboxCheckbox,\n ScalarModal,\n useModal,\n} from '@scalar/components'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { computed, ref } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\nimport EditSidebarListElement from '@/components/Sidebar/Actions/EditSidebarListElement.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { workspaces, workspaceMutators, events } = useWorkspace()\nconst { push } = useRouter()\n\nconst updateSelected = (uid: Workspace['uid']) => {\n if (uid === activeWorkspace.value?.uid) {\n return\n }\n\n push({\n name: 'workspace',\n params: {\n workspace: uid,\n },\n })\n}\n\nconst isLastWorkspace = computed(() => Object.keys(workspaces).length === 1)\n\nconst createNewWorkspace = () =>\n events.commandPalette.emit({ commandName: 'Create Workspace' })\n\nconst tempName = ref('')\nconst tempUid = ref('' as Workspace['uid'])\nconst editModal = useModal()\nconst deleteModal = useModal()\n\nconst openRenameModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n editModal.show()\n}\n\nconst handleWorkspaceEdit = (name: string) => {\n if (!name.trim()) {\n return\n }\n\n workspaceMutators.edit(tempUid.value, 'name', name.trim())\n editModal.hide()\n}\n\nconst openDeleteModal = (uid: Workspace['uid']) => {\n const workspace = workspaces[uid]\n if (!workspace) {\n return\n }\n\n tempName.value = workspace.name\n tempUid.value = uid\n deleteModal.show()\n}\n\nconst deleteWorkspace = async () => {\n if (!isLastWorkspace.value) {\n const deletedActiveWorkspace = activeWorkspace.value?.uid === tempUid.value\n const currentWorkspaces = { ...workspaces }\n delete currentWorkspaces[tempUid.value]\n\n workspaceMutators.delete(tempUid.value)\n\n // Switch to another workspace if the active one is deleted\n if (deletedActiveWorkspace) {\n const newWorkspaceUid = Object.keys(currentWorkspaces)[0]\n\n await push({\n name: 'workspace',\n params: {\n workspace: newWorkspaceUid,\n },\n })\n }\n }\n\n deleteModal.hide()\n}\n</script>\n\n<template>\n <div>\n <div class=\"flex w-[inherit] items-center text-base\">\n <ScalarDropdown>\n <ScalarButton\n class=\"text-c-1 hover:bg-b-2 line-clamp-1 h-full w-fit justify-start px-1.5 py-1.5 font-normal\"\n variant=\"ghost\">\n <div class=\"m-0 flex items-center gap-1.5 font-bold\">\n <h2 class=\"line-clamp-1 text-left\">\n {{ activeWorkspace?.name }}\n </h2>\n </div>\n </ScalarButton>\n\n <!-- Workspace list -->\n <template #items>\n <ScalarDropdownItem\n v-for=\"(workspace, uid) in workspaces\"\n :key=\"uid\"\n class=\"group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"updateSelected(workspace.uid)\">\n <ScalarListboxCheckbox :selected=\"activeWorkspace?.uid === uid\" />\n <span class=\"overflow-hidden text-ellipsis\">{{\n workspace.name\n }}</span>\n <ScalarDropdown\n placement=\"right-start\"\n teleport>\n <ScalarButton\n class=\"hover:bg-b-3 -mr-1 ml-auto aspect-square h-fit px-0.5 py-0 group-hover/item:flex\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\">\n <ScalarIcon\n icon=\"Ellipses\"\n size=\"sm\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n class=\"flex gap-2\"\n @mousedown=\"openRenameModal(workspace.uid)\"\n @touchend.prevent=\"openRenameModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Edit\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Rename</span>\n </ScalarDropdownItem>\n <ScalarDropdownItem\n v-if=\"!isLastWorkspace\"\n class=\"flex gap-2\"\n @mousedown.prevent=\"openDeleteModal(workspace.uid)\"\n @touchend.prevent=\"openDeleteModal(workspace.uid)\">\n <ScalarIcon\n class=\"inline-flex\"\n icon=\"Delete\"\n size=\"md\"\n thickness=\"1.5\" />\n <span>Delete</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </ScalarDropdownItem>\n <ScalarDropdownDivider />\n\n <!-- Add new workspace -->\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"createNewWorkspace\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Create Workspace</span>\n </ScalarDropdownItem>\n </template>\n </ScalarDropdown>\n </div>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"deleteModal\"\n title=\"Delete workspace\">\n <DeleteSidebarListElement\n :variableName=\"tempName\"\n warningMessage=\"This cannot be undone. You're about to delete the workspace and everything inside it.\"\n @close=\"deleteModal.hide()\"\n @delete=\"deleteWorkspace\" />\n </ScalarModal>\n <ScalarModal\n :size=\"'xxs'\"\n :state=\"editModal\"\n title=\"Rename Workspace\">\n <EditSidebarListElement\n :name=\"tempName\"\n @close=\"editModal.hide()\"\n @edit=\"handleWorkspaceEdit\" />\n </ScalarModal>\n </div>\n</template>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { n as getEnvironmentVariables, t as getServerUrl } from "./get-server-url-UVN-dx79.js";
|
|
2
|
+
import { mergeUrls } from "@scalar/helpers/url/merge-urls";
|
|
3
|
+
import { replaceVariables } from "@scalar/helpers/regex/replace-variables";
|
|
4
|
+
//#region src/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reserved characters we can safely decode in query values when OpenAPI
|
|
7
|
+
* `allowReserved` is enabled.
|
|
8
|
+
*
|
|
9
|
+
* We intentionally keep percent-encodings for characters that can break query
|
|
10
|
+
* parsing (`#`, `&`, `=`, `?`, `[`, `]`) or change x-www-form-urlencoded
|
|
11
|
+
* semantics (`+`).
|
|
12
|
+
*
|
|
13
|
+
* @see https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-10
|
|
14
|
+
*/
|
|
15
|
+
var DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING = {
|
|
16
|
+
"21": "!",
|
|
17
|
+
"24": "$",
|
|
18
|
+
"27": "'",
|
|
19
|
+
"28": "(",
|
|
20
|
+
"29": ")",
|
|
21
|
+
"2A": "*",
|
|
22
|
+
"2C": ",",
|
|
23
|
+
"2F": "/",
|
|
24
|
+
"3A": ":",
|
|
25
|
+
"3B": ";",
|
|
26
|
+
"40": "@"
|
|
27
|
+
};
|
|
28
|
+
var decodeReservedCharacters = (value) => value.replace(/%([0-9A-Fa-f]{2})/g, (match, code) => DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING[code.toUpperCase()] ?? match);
|
|
29
|
+
var decodeQueryKey = (key) => {
|
|
30
|
+
try {
|
|
31
|
+
return decodeURIComponent(key.replaceAll("+", "%20"));
|
|
32
|
+
} catch {
|
|
33
|
+
return key;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Decodes reserved character percent-encodings only for query keys marked with
|
|
38
|
+
* OpenAPI's `allowReserved: true`.
|
|
39
|
+
*/
|
|
40
|
+
var applyAllowReservedToUrl = (url, allowReservedQueryParameters) => {
|
|
41
|
+
if (allowReservedQueryParameters.size === 0) return url;
|
|
42
|
+
const queryStart = url.indexOf("?");
|
|
43
|
+
if (queryStart === -1) return url;
|
|
44
|
+
const hashStart = url.indexOf("#", queryStart);
|
|
45
|
+
const urlPrefix = url.slice(0, queryStart + 1);
|
|
46
|
+
const query = hashStart === -1 ? url.slice(queryStart + 1) : url.slice(queryStart + 1, hashStart);
|
|
47
|
+
const hash = hashStart === -1 ? "" : url.slice(hashStart);
|
|
48
|
+
if (!query) return url;
|
|
49
|
+
return `${urlPrefix}${query.split("&").map((segment) => {
|
|
50
|
+
if (!segment) return segment;
|
|
51
|
+
const equalsIndex = segment.indexOf("=");
|
|
52
|
+
const rawKey = equalsIndex === -1 ? segment : segment.slice(0, equalsIndex);
|
|
53
|
+
const key = decodeQueryKey(rawKey);
|
|
54
|
+
if (!allowReservedQueryParameters.has(key) || equalsIndex === -1) return segment;
|
|
55
|
+
return `${rawKey}=${decodeReservedCharacters(segment.slice(equalsIndex + 1))}`;
|
|
56
|
+
}).join("&")}${hash}`;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/v2/blocks/operation-block/helpers/get-resolved-url.ts
|
|
60
|
+
/**
|
|
61
|
+
* Resolves and constructs the final request URL using the provided environment, server, path,
|
|
62
|
+
* path variables, and optional query parameters.
|
|
63
|
+
*
|
|
64
|
+
* - Environment variables and path variables are used to replace placeholders in the path string.
|
|
65
|
+
* - The server URL is dynamically resolved (may apply env variables).
|
|
66
|
+
* - urlParams are optionally appended as the query string.
|
|
67
|
+
*
|
|
68
|
+
* @param environment The current environment containing variable values.
|
|
69
|
+
* @param server The selected server object; can be null.
|
|
70
|
+
* @param path The raw path string from the OpenAPI document (may contain variables).
|
|
71
|
+
* @param pathVariables Map of path variable values (e.g., { petId: '5' }).
|
|
72
|
+
* @param urlParams Optional query parameters as URLSearchParams.
|
|
73
|
+
* @returns Fully resolved URL as a string.
|
|
74
|
+
*/
|
|
75
|
+
var getResolvedUrl = ({ environment, server, path, pathVariables, allowReservedQueryParameters, urlParams }) => {
|
|
76
|
+
const environmentVariables = getEnvironmentVariables(environment);
|
|
77
|
+
return applyAllowReservedToUrl(mergeUrls(getServerUrl(server, environmentVariables), replaceVariables(path, {
|
|
78
|
+
...environmentVariables,
|
|
79
|
+
...pathVariables
|
|
80
|
+
}), urlParams), allowReservedQueryParameters ?? /* @__PURE__ */ new Set());
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { getResolvedUrl as t };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=get-resolved-url-SybDPV0U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-resolved-url-SybDPV0U.js","names":[],"sources":["../src/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.ts","../src/v2/blocks/operation-block/helpers/get-resolved-url.ts"],"sourcesContent":["/**\n * Reserved characters we can safely decode in query values when OpenAPI\n * `allowReserved` is enabled.\n *\n * We intentionally keep percent-encodings for characters that can break query\n * parsing (`#`, `&`, `=`, `?`, `[`, `]`) or change x-www-form-urlencoded\n * semantics (`+`).\n *\n * @see https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-10\n */\nconst DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING: Record<string, string> = {\n '21': '!',\n '24': '$',\n '27': \"'\",\n '28': '(',\n '29': ')',\n '2A': '*',\n '2C': ',',\n '2F': '/',\n '3A': ':',\n '3B': ';',\n '40': '@',\n}\n\nconst decodeReservedCharacters = (value: string): string =>\n value.replace(\n /%([0-9A-Fa-f]{2})/g,\n (match, code: string) => DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING[code.toUpperCase()] ?? match,\n )\n\nconst decodeQueryKey = (key: string): string => {\n try {\n return decodeURIComponent(key.replaceAll('+', '%20'))\n } catch {\n return key\n }\n}\n\n/**\n * Decodes reserved character percent-encodings only for query keys marked with\n * OpenAPI's `allowReserved: true`.\n */\nexport const applyAllowReservedToUrl = (url: string, allowReservedQueryParameters: Set<string>): string => {\n if (allowReservedQueryParameters.size === 0) {\n return url\n }\n\n const queryStart = url.indexOf('?')\n if (queryStart === -1) {\n return url\n }\n\n const hashStart = url.indexOf('#', queryStart)\n const urlPrefix = url.slice(0, queryStart + 1)\n const query = hashStart === -1 ? url.slice(queryStart + 1) : url.slice(queryStart + 1, hashStart)\n const hash = hashStart === -1 ? '' : url.slice(hashStart)\n\n if (!query) {\n return url\n }\n\n const decodedQuery = query\n .split('&')\n .map((segment) => {\n if (!segment) {\n return segment\n }\n\n const equalsIndex = segment.indexOf('=')\n const rawKey = equalsIndex === -1 ? segment : segment.slice(0, equalsIndex)\n const key = decodeQueryKey(rawKey)\n\n if (!allowReservedQueryParameters.has(key) || equalsIndex === -1) {\n return segment\n }\n\n const rawValue = segment.slice(equalsIndex + 1)\n return `${rawKey}=${decodeReservedCharacters(rawValue)}`\n })\n .join('&')\n\n return `${urlPrefix}${decodedQuery}${hash}`\n}\n","import { replaceVariables } from '@scalar/helpers/regex/replace-variables'\nimport { mergeUrls } from '@scalar/helpers/url/merge-urls'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server'\n\nimport { applyAllowReservedToUrl } from '@/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url'\nimport { getEnvironmentVariables } from '@/v2/blocks/operation-block/helpers/get-environment-variables'\nimport { getServerUrl } from '@/v2/blocks/operation-block/helpers/get-server-url'\n\n/**\n * Resolves and constructs the final request URL using the provided environment, server, path,\n * path variables, and optional query parameters.\n *\n * - Environment variables and path variables are used to replace placeholders in the path string.\n * - The server URL is dynamically resolved (may apply env variables).\n * - urlParams are optionally appended as the query string.\n *\n * @param environment The current environment containing variable values.\n * @param server The selected server object; can be null.\n * @param path The raw path string from the OpenAPI document (may contain variables).\n * @param pathVariables Map of path variable values (e.g., { petId: '5' }).\n * @param urlParams Optional query parameters as URLSearchParams.\n * @returns Fully resolved URL as a string.\n */\nexport const getResolvedUrl = ({\n environment,\n server,\n path,\n pathVariables,\n allowReservedQueryParameters,\n urlParams,\n}: {\n environment: XScalarEnvironment\n server: ServerObject | null\n path: string\n pathVariables: Record<string, string>\n allowReservedQueryParameters?: Set<string>\n urlParams?: URLSearchParams\n}) => {\n const environmentVariables = getEnvironmentVariables(environment)\n const serverUrl = getServerUrl(server, environmentVariables)\n const pathWithVariables = replaceVariables(path, { ...environmentVariables, ...pathVariables })\n const mergedUrl = mergeUrls(serverUrl, pathWithVariables, urlParams)\n return applyAllowReservedToUrl(mergedUrl, allowReservedQueryParameters ?? new Set())\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,oDAA4E;CAChF,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP;AAED,IAAM,4BAA4B,UAChC,MAAM,QACJ,uBACC,OAAO,SAAiB,kDAAkD,KAAK,aAAa,KAAK,MACnG;AAEH,IAAM,kBAAkB,QAAwB;AAC9C,KAAI;AACF,SAAO,mBAAmB,IAAI,WAAW,KAAK,MAAM,CAAC;SAC/C;AACN,SAAO;;;;;;;AAQX,IAAa,2BAA2B,KAAa,iCAAsD;AACzG,KAAI,6BAA6B,SAAS,EACxC,QAAO;CAGT,MAAM,aAAa,IAAI,QAAQ,IAAI;AACnC,KAAI,eAAe,GACjB,QAAO;CAGT,MAAM,YAAY,IAAI,QAAQ,KAAK,WAAW;CAC9C,MAAM,YAAY,IAAI,MAAM,GAAG,aAAa,EAAE;CAC9C,MAAM,QAAQ,cAAc,KAAK,IAAI,MAAM,aAAa,EAAE,GAAG,IAAI,MAAM,aAAa,GAAG,UAAU;CACjG,MAAM,OAAO,cAAc,KAAK,KAAK,IAAI,MAAM,UAAU;AAEzD,KAAI,CAAC,MACH,QAAO;AAuBT,QAAO,GAAG,YApBW,MAClB,MAAM,IAAI,CACV,KAAK,YAAY;AAChB,MAAI,CAAC,QACH,QAAO;EAGT,MAAM,cAAc,QAAQ,QAAQ,IAAI;EACxC,MAAM,SAAS,gBAAgB,KAAK,UAAU,QAAQ,MAAM,GAAG,YAAY;EAC3E,MAAM,MAAM,eAAe,OAAO;AAElC,MAAI,CAAC,6BAA6B,IAAI,IAAI,IAAI,gBAAgB,GAC5D,QAAO;AAIT,SAAO,GAAG,OAAO,GAAG,yBADH,QAAQ,MAAM,cAAc,EAAE,CACO;GACtD,CACD,KAAK,IAAI,GAEyB;;;;;;;;;;;;;;;;;;;ACzDvC,IAAa,kBAAkB,EAC7B,aACA,QACA,MACA,eACA,8BACA,gBAQI;CACJ,MAAM,uBAAuB,wBAAwB,YAAY;AAIjE,QAAO,wBADW,UAFA,aAAa,QAAQ,qBAAqB,EAClC,iBAAiB,MAAM;EAAE,GAAG;EAAsB,GAAG;EAAe,CAAC,EACrC,UAAU,EAC1B,gDAAgC,IAAI,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-server-url-
|
|
1
|
+
{"version":3,"file":"get-server-url-UVN-dx79.js","names":[],"sources":["../src/v2/blocks/operation-block/helpers/get-environment-variables.ts","../src/v2/blocks/operation-block/helpers/get-server-url.ts"],"sourcesContent":["import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\n\n/**\n * Flattens the environment variables array into a key-value object.\n * If a variable value is a string, use it directly; otherwise, use its default value.\n *\n * @returns An object mapping variable names to their resolved values.\n */\nexport const getEnvironmentVariables = (environment: XScalarEnvironment) => {\n return environment.variables.reduce(\n (acc, curr) => {\n acc[curr.name] = typeof curr.value === 'string' ? curr.value : curr.value.default\n return acc\n },\n {} as Record<string, string>,\n )\n}\n","import { replaceVariables } from '@scalar/helpers/regex/replace-variables'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server'\nimport { objectEntries } from '@vueuse/core'\n\nexport const getServerUrl = (server: ServerObject | null, environmentVariables: Record<string, string>) => {\n /** Extract the server variables default values*/\n const serverVariables = objectEntries(server?.variables ?? {}).reduce(\n (acc, [name, variable]) => {\n if (variable.default) {\n acc[name] = variable.default\n }\n return acc\n },\n {} as Record<string, string>,\n )\n\n return replaceVariables(server?.url ?? '', { ...environmentVariables, ...serverVariables })\n}\n"],"mappings":";;;;;;;;;AAQA,IAAa,2BAA2B,gBAAoC;AAC1E,QAAO,YAAY,UAAU,QAC1B,KAAK,SAAS;AACb,MAAI,KAAK,QAAQ,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,KAAK,MAAM;AAC1E,SAAO;IAET,EAAE,CACH;;;;ACXH,IAAa,gBAAgB,QAA6B,yBAAiD;;CAEzG,MAAM,kBAAkB,cAAc,QAAQ,aAAa,EAAE,CAAC,CAAC,QAC5D,KAAK,CAAC,MAAM,cAAc;AACzB,MAAI,SAAS,QACX,KAAI,QAAQ,SAAS;AAEvB,SAAO;IAET,EAAE,CACH;AAED,QAAO,iBAAiB,QAAQ,OAAO,IAAI;EAAE,GAAG;EAAsB,GAAG;EAAiB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InjectionKey } from 'vue';
|
|
2
|
-
import type { ClientLayout } from '
|
|
2
|
+
import type { ClientLayout } from '../hooks/useLayout';
|
|
3
3
|
type CollapsedSidebarFolders = Record<string, boolean>;
|
|
4
4
|
/** Creates the sidebar state so that it can be unique across instances of the client */
|
|
5
5
|
export declare const createSidebarState: ({ layout }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
export { ApiClientApp, createApiClientApp } from './layouts/App';
|
|
3
|
-
export { type ApiClient, createApiClientModal } from './layouts/Modal';
|
|
2
|
+
export { ApiClientApp, createApiClientApp } from './layouts/App/index.js';
|
|
3
|
+
export { type ApiClient, createApiClientModal } from './layouts/Modal/index.js';
|
|
4
4
|
export { useWorkspace } from './store/store';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./CommandPalette-
|
|
2
|
-
import { r as useWorkspace } from "./store-
|
|
3
|
-
import { n as ApiClientApp_default, t as createApiClientApp } from "./App-
|
|
1
|
+
import "./CommandPalette-BxoEK8TY.js";
|
|
2
|
+
import { r as useWorkspace } from "./store-DnlAQK5d.js";
|
|
3
|
+
import { n as ApiClientApp_default, t as createApiClientApp } from "./App-DHBmpWJI.js";
|
|
4
4
|
import "./HttpMethod-rnWEgC3T.js";
|
|
5
|
-
import "./MainLayout-
|
|
5
|
+
import "./MainLayout-BnLwst16.js";
|
|
6
6
|
import "./ModalClientContainer-qHsZi4wQ.js";
|
|
7
|
-
import { t as createApiClientModal } from "./Modal-
|
|
7
|
+
import { t as createApiClientModal } from "./Modal-CTZ8UNds.js";
|
|
8
8
|
export { ApiClientApp_default as ApiClientApp, createApiClientApp, createApiClientModal, useWorkspace };
|
|
@@ -23,8 +23,8 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
23
23
|
propertyKey: P;
|
|
24
24
|
value: NonNullable<import("@scalar/object-utils/nested").PathValue<import("@scalar/types/entities").SecurityScheme, P>>;
|
|
25
25
|
}) => void;
|
|
26
|
-
route: (payload?: import("
|
|
27
|
-
open: (payload?: import("
|
|
26
|
+
route: (payload?: import("../../libs/index.js").OpenClientPayload) => void;
|
|
27
|
+
open: (payload?: import("../../libs/index.js").OpenClientPayload) => void;
|
|
28
28
|
mount: (mountingEl?: HTMLElement | null) => void;
|
|
29
29
|
modalState: {
|
|
30
30
|
open: boolean;
|
|
@@ -415,14 +415,14 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
415
415
|
hide: () => void;
|
|
416
416
|
};
|
|
417
417
|
events: {
|
|
418
|
-
executeRequest: import("
|
|
418
|
+
executeRequest: import("../../libs/index.js").EventBus<{
|
|
419
419
|
requestUid?: string;
|
|
420
420
|
}>;
|
|
421
|
-
focusAddressBar: import("
|
|
422
|
-
cancelRequest: import("
|
|
423
|
-
requestStatus: import("
|
|
424
|
-
commandPalette: import("
|
|
425
|
-
hotKeys: import("
|
|
421
|
+
focusAddressBar: import("../../libs/index.js").EventBus<any>;
|
|
422
|
+
cancelRequest: import("../../libs/index.js").EventBus<any>;
|
|
423
|
+
requestStatus: import("../../libs/index.js").EventBus<import("../../libs/index.js").RequestStatus>;
|
|
424
|
+
commandPalette: import("../../libs/index.js").EventBus<import("../../components/CommandPalette/TheCommandPalette.vue").CommandPaletteEvent>;
|
|
425
|
+
hotKeys: import("../../libs/index.js").EventBus<Partial<Record<"addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar", KeyboardEvent>>>;
|
|
426
426
|
};
|
|
427
427
|
sidebarWidth: import("vue").Ref<string, string>;
|
|
428
428
|
setSidebarWidth: (width: string) => void;
|
|
@@ -572,7 +572,7 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
572
572
|
shouldLoad?: boolean;
|
|
573
573
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers"> & {
|
|
574
574
|
dereferencedDocument?: import("@scalar/openapi-types").OpenAPIV3_1.Document;
|
|
575
|
-
}, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("
|
|
575
|
+
}, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("../../libs/index.js").ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any> | undefined, workspaceUid: string, options?: Pick<{
|
|
576
576
|
info: {
|
|
577
577
|
title: string;
|
|
578
578
|
version: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../CommandPalette-
|
|
2
|
-
import { n as ApiClientApp_default, t as createApiClientApp } from "../../App-
|
|
1
|
+
import "../../CommandPalette-BxoEK8TY.js";
|
|
2
|
+
import { n as ApiClientApp_default, t as createApiClientApp } from "../../App-DHBmpWJI.js";
|
|
3
3
|
import "../../HttpMethod-rnWEgC3T.js";
|
|
4
|
-
import "../../MainLayout-
|
|
4
|
+
import "../../MainLayout-BnLwst16.js";
|
|
5
5
|
export { ApiClientApp_default as ApiClientApp, createApiClientApp };
|
|
@@ -22,8 +22,8 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
22
22
|
propertyKey: P;
|
|
23
23
|
value: NonNullable<import("@scalar/object-utils/nested").PathValue<import("@scalar/types/entities").SecurityScheme, P>>;
|
|
24
24
|
}) => void;
|
|
25
|
-
route: (payload?: import("
|
|
26
|
-
open: (payload?: import("
|
|
25
|
+
route: (payload?: import("../../libs/index.js").OpenClientPayload) => void;
|
|
26
|
+
open: (payload?: import("../../libs/index.js").OpenClientPayload) => void;
|
|
27
27
|
mount: (mountingEl?: HTMLElement | null) => void;
|
|
28
28
|
modalState: {
|
|
29
29
|
open: boolean;
|
|
@@ -414,14 +414,14 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
414
414
|
hide: () => void;
|
|
415
415
|
};
|
|
416
416
|
events: {
|
|
417
|
-
executeRequest: import("
|
|
417
|
+
executeRequest: import("../../libs/index.js").EventBus<{
|
|
418
418
|
requestUid?: string;
|
|
419
419
|
}>;
|
|
420
|
-
focusAddressBar: import("
|
|
421
|
-
cancelRequest: import("
|
|
422
|
-
requestStatus: import("
|
|
423
|
-
commandPalette: import("
|
|
424
|
-
hotKeys: import("
|
|
420
|
+
focusAddressBar: import("../../libs/index.js").EventBus<any>;
|
|
421
|
+
cancelRequest: import("../../libs/index.js").EventBus<any>;
|
|
422
|
+
requestStatus: import("../../libs/index.js").EventBus<import("../../libs/index.js").RequestStatus>;
|
|
423
|
+
commandPalette: import("../../libs/index.js").EventBus<import("../../components/CommandPalette/TheCommandPalette.vue").CommandPaletteEvent>;
|
|
424
|
+
hotKeys: import("../../libs/index.js").EventBus<Partial<Record<"addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar", KeyboardEvent>>>;
|
|
425
425
|
};
|
|
426
426
|
sidebarWidth: import("vue").Ref<string, string>;
|
|
427
427
|
setSidebarWidth: (width: string) => void;
|
|
@@ -571,7 +571,7 @@ mountOnInitialize?: boolean) => Promise<{
|
|
|
571
571
|
shouldLoad?: boolean;
|
|
572
572
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers"> & {
|
|
573
573
|
dereferencedDocument?: import("@scalar/openapi-types").OpenAPIV3_1.Document;
|
|
574
|
-
}, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("
|
|
574
|
+
}, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("../../libs/index.js").ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any> | undefined, workspaceUid: string, options?: Pick<{
|
|
575
575
|
info: {
|
|
576
576
|
title: string;
|
|
577
577
|
version: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../CommandPalette-
|
|
2
|
-
import { D as routes, O as saveActiveWorkspace, _ as createApiClient, d as handleHotKeyDown, r as useWorkspace, w as useActiveEntities } from "../../store-
|
|
1
|
+
import "../../CommandPalette-BxoEK8TY.js";
|
|
2
|
+
import { D as routes, O as saveActiveWorkspace, _ as createApiClient, d as handleHotKeyDown, r as useWorkspace, w as useActiveEntities } from "../../store-DnlAQK5d.js";
|
|
3
3
|
import { r as useSidebar } from "../../useSidebar-DLTwHDI-.js";
|
|
4
4
|
import "../../HttpMethod-rnWEgC3T.js";
|
|
5
|
-
import { t as MainLayout_default } from "../../MainLayout-
|
|
5
|
+
import { t as MainLayout_default } from "../../MainLayout-BnLwst16.js";
|
|
6
6
|
import { t as analytics } from "../../analytics-BZimCWcw.js";
|
|
7
|
-
import { t as ImportCollectionListener_default } from "../../ImportCollection-
|
|
7
|
+
import { t as ImportCollectionListener_default } from "../../ImportCollection-CGjySEzP.js";
|
|
8
8
|
import { KeepAlive, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, onBeforeMount, onBeforeUnmount, onMounted, openBlock, resolveDynamicComponent, unref, watch, withCtx } from "vue";
|
|
9
9
|
import { ScalarTeleportRoot, addScalarClassesToHeadless } from "@scalar/components";
|
|
10
10
|
import { getThemeStyles } from "@scalar/themes";
|
|
@@ -5,8 +5,8 @@ import type { OpenAPI } from '@scalar/openapi-types';
|
|
|
5
5
|
import { type ApiClientConfiguration } from '@scalar/types/api-reference';
|
|
6
6
|
import { type Component } from 'vue';
|
|
7
7
|
import type { Router } from 'vue-router';
|
|
8
|
-
import { type ClientLayout } from '
|
|
9
|
-
import { type WorkspaceStore } from '
|
|
8
|
+
import { type ClientLayout } from '../hooks/useLayout';
|
|
9
|
+
import { type WorkspaceStore } from '../store/store';
|
|
10
10
|
export type OpenClientPayload = ({
|
|
11
11
|
path: string;
|
|
12
12
|
method: OpenAPI.HttpMethod | Uppercase<OpenAPI.HttpMethod>;
|
|
@@ -489,7 +489,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
489
489
|
}>;
|
|
490
490
|
focusAddressBar: import("./event-bus").EventBus<any>;
|
|
491
491
|
cancelRequest: import("./event-bus").EventBus<any>;
|
|
492
|
-
requestStatus: import("./event-bus").EventBus<import("./send-request").RequestStatus>;
|
|
492
|
+
requestStatus: import("./event-bus").EventBus<import("./send-request/index.js").RequestStatus>;
|
|
493
493
|
commandPalette: import("./event-bus").EventBus<import("../components/CommandPalette/TheCommandPalette.vue").CommandPaletteEvent>;
|
|
494
494
|
hotKeys: import("./event-bus").EventBus<Partial<Record<"addTopNav" | "closeModal" | "closeTopNav" | "createNew" | "executeRequest" | "focusAddressBar" | "focusRequestSearch" | "jumpToLastTab" | "jumpToTab" | "navigateSearchResultsDown" | "navigateSearchResultsUp" | "navigateTopNavLeft" | "navigateTopNavRight" | "openCommandPalette" | "selectSearchResult" | "toggleSidebar", KeyboardEvent>>>;
|
|
495
495
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnvVariables } from '
|
|
1
|
+
import type { EnvVariables } from '../libs/env-helpers';
|
|
2
2
|
/** Parses the active environment variables and extracts key-value pairs. */
|
|
3
3
|
export declare function parseEnvVariables(activeEnvVariables: EnvVariables): {
|
|
4
4
|
key: string;
|
package/dist/libs/hot-keys.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HotkeyEventName } from '@scalar/oas-utils/entities/hotkeys';
|
|
2
2
|
import type { HotKeyConfig, HotKeyModifiers } from '@scalar/oas-utils/entities/workspace';
|
|
3
|
-
import type { EventBus } from '
|
|
3
|
+
import type { EventBus } from '../libs/index.js';
|
|
4
4
|
export type HotKeyEvent = Partial<Record<HotkeyEventName, KeyboardEvent>>;
|
|
5
5
|
/**
|
|
6
6
|
* Default set of keybindings
|
package/dist/libs/index.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export { loadAllResources } from './local-storage';
|
|
|
12
12
|
export { formatHeaderKey, normalizeHeaders } from './normalize-headers';
|
|
13
13
|
export { parseCurlCommand } from './parse-curl';
|
|
14
14
|
export { convertPostmanToOpenApi, getPostmanDocumentDetails, isPostmanCollection } from './postman';
|
|
15
|
-
export { type RequestStatus, buildRequestSecurity, createRequestOperation, decodeBuffer } from './send-request';
|
|
15
|
+
export { type RequestStatus, buildRequestSecurity, createRequestOperation, decodeBuffer } from './send-request/index.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/libs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as createApiClient, c as isPostmanCollection, d as handleHotKeyDown, f as isInput, g as getEnvColor, h as parseEnvVariables, l as DEFAULT_HOTKEYS, m as isUrl, o as convertPostmanToOpenApi, p as getOpenApiDocumentDetails, s as getPostmanDocumentDetails, u as getModifiers, v as loadAllResources, x as createEventBus, y as findRequestByPathMethod } from "../store-
|
|
1
|
+
import { _ as createApiClient, c as isPostmanCollection, d as handleHotKeyDown, f as isInput, g as getEnvColor, h as parseEnvVariables, l as DEFAULT_HOTKEYS, m as isUrl, o as convertPostmanToOpenApi, p as getOpenApiDocumentDetails, s as getPostmanDocumentDetails, u as getModifiers, v as loadAllResources, x as createEventBus, y as findRequestByPathMethod } from "../store-DnlAQK5d.js";
|
|
2
2
|
import { a as ERRORS, i as normalizeHeaders, n as decodeBuffer, o as normalizeError, r as formatHeaderKey, s as prettyErrorMessage, t as createRequestOperation } from "../send-request-BsTfRiBC.js";
|
|
3
3
|
import { n as formatMs, t as formatBytes } from "../formatters-DOGXZq9R.js";
|
|
4
4
|
import { t as parseCurlCommand } from "../parse-curl-BtypQT3D.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '
|
|
1
|
+
import type { WorkspaceStore } from '../store/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Loads all resources from localStorage and applies any migrations, then loads into mutators
|
|
4
4
|
* We use the raw mutator.add here instead of the custom ones because we do NOT want any side effects
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Cookie } from '@scalar/oas-utils/entities/cookie';
|
|
2
2
|
import type { Operation, RequestExample, ResponseInstance, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
|
-
import { type ErrorResponse } from '
|
|
4
|
-
import type { EventBus } from '
|
|
5
|
-
import type { PluginManager } from '
|
|
3
|
+
import { type ErrorResponse } from '../../libs/errors';
|
|
4
|
+
import type { EventBus } from '../../libs/event-bus';
|
|
5
|
+
import type { PluginManager } from '../../plugins/index.js';
|
|
6
6
|
export type RequestStatus = 'start' | 'stop' | 'abort';
|
|
7
7
|
/** Response from sendRequest hoisted so we can use it as the return type for createRequestOperation */
|
|
8
8
|
type SendRequestResponse = ErrorResponse<{
|