@scalar/api-client 2.38.0 → 2.38.2
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 +33 -0
- package/dist/AddressBar-B4xnl66I.js +302 -0
- package/dist/AddressBar-B4xnl66I.js.map +1 -0
- package/dist/App-BVH4lIe8.js +533 -0
- package/dist/App-BVH4lIe8.js.map +1 -0
- package/dist/App-CvClwSlM.js +2510 -0
- package/dist/App-CvClwSlM.js.map +1 -0
- package/dist/CodeInput-C-igR77V.js +694 -0
- package/dist/CodeInput-C-igR77V.js.map +1 -0
- package/dist/CodeSnippet-D7Heh1nd.js +218 -0
- package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
- package/dist/Collection-4MT9WmDD.js +219 -0
- package/dist/Collection-4MT9WmDD.js.map +1 -0
- package/dist/CollectionAuthentication-MHWQpw74.js +56 -0
- package/dist/CollectionAuthentication-MHWQpw74.js.map +1 -0
- package/dist/CollectionCookies-DyjPPMdt.js +19 -0
- package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
- package/dist/CollectionEnvironment-Dw35vIqo.js +514 -0
- package/dist/CollectionEnvironment-Dw35vIqo.js.map +1 -0
- package/dist/CollectionOverview-TUdDIu5f.js +131 -0
- package/dist/CollectionOverview-TUdDIu5f.js.map +1 -0
- package/dist/CollectionScripts-CMNlBlby.js +19 -0
- package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
- package/dist/CollectionServers-BrjTCfDe.js +168 -0
- package/dist/CollectionServers-BrjTCfDe.js.map +1 -0
- package/dist/CollectionSettings-HVSlp2Gv.js +87 -0
- package/dist/CollectionSettings-HVSlp2Gv.js.map +1 -0
- package/dist/CollectionSync-CAflc5yW.js +19 -0
- package/dist/CollectionSync-CAflc5yW.js.map +1 -0
- package/dist/CommandActionInput-TkcAx6E8.js +97 -0
- package/dist/CommandActionInput-TkcAx6E8.js.map +1 -0
- package/dist/CommandPalette-CL8k4CoN.js +964 -0
- package/dist/CommandPalette-CL8k4CoN.js.map +1 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
- package/dist/Cookies-DbOKTi1f.js +284 -0
- package/dist/Cookies-DbOKTi1f.js.map +1 -0
- package/dist/DataTable-BqbZKW3K.js +62 -0
- package/dist/DataTable-BqbZKW3K.js.map +1 -0
- package/dist/DataTableHeader-DJVB0jCZ.js +21 -0
- package/dist/DataTableHeader-DJVB0jCZ.js.map +1 -0
- package/dist/DataTableInput-yaU5g-kP.js +166 -0
- package/dist/DataTableInput-yaU5g-kP.js.map +1 -0
- package/dist/DataTableRow-c3XveEUO.js +57 -0
- package/dist/DataTableRow-c3XveEUO.js.map +1 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js +78 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js.map +1 -0
- package/dist/EditSidebarListElement-CodWPnM6.js +32 -0
- package/dist/EditSidebarListElement-CodWPnM6.js.map +1 -0
- package/dist/Editor-BomsGWHx.js +909 -0
- package/dist/Editor-BomsGWHx.js.map +1 -0
- package/dist/EmptyState-Cnm7hGW5.js +46 -0
- package/dist/EmptyState-Cnm7hGW5.js.map +1 -0
- package/dist/Environment-DJatRQIg.js +416 -0
- package/dist/Environment-DJatRQIg.js.map +1 -0
- package/dist/EnvironmentModal-DBEJ4Kzj.js +288 -0
- package/dist/EnvironmentModal-DBEJ4Kzj.js.map +1 -0
- package/dist/Form-CSKzyHGO.js +83 -0
- package/dist/Form-CSKzyHGO.js.map +1 -0
- package/dist/HttpMethod-rnWEgC3T.js +78 -0
- package/dist/HttpMethod-rnWEgC3T.js.map +1 -0
- package/dist/IconSelector-BDC_GQXv.js +67 -0
- package/dist/IconSelector-BDC_GQXv.js.map +1 -0
- package/dist/ImportCollection-DfX1UQ5u.js +804 -0
- package/dist/ImportCollection-DfX1UQ5u.js.map +1 -0
- package/dist/IntegrationLogo-B9EDW8db.js +51 -0
- package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
- package/dist/MainLayout-BEFMl1ud.js +281 -0
- package/dist/MainLayout-BEFMl1ud.js.map +1 -0
- package/dist/Modal-sQ9vH6MN.js +67 -0
- package/dist/Modal-sQ9vH6MN.js.map +1 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
- package/dist/Request-gscRsGQ8.js +212 -0
- package/dist/Request-gscRsGQ8.js.map +1 -0
- package/dist/RequestAuth-BzBfIysT.js +989 -0
- package/dist/RequestAuth-BzBfIysT.js.map +1 -0
- package/dist/RequestRoot-3Bj8JZD-.js +1611 -0
- package/dist/RequestRoot-3Bj8JZD-.js.map +1 -0
- package/dist/RequestSection-HhdJj9hW.js +1582 -0
- package/dist/RequestSection-HhdJj9hW.js.map +1 -0
- package/dist/ResponseSection-DMJ0tw8E.js +949 -0
- package/dist/ResponseSection-DMJ0tw8E.js.map +1 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js +45 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js.map +1 -0
- package/dist/SectionFilter-hrtoRLwj.js +99 -0
- package/dist/SectionFilter-hrtoRLwj.js.map +1 -0
- package/dist/Server-DnA_BzPS.js +303 -0
- package/dist/Server-DnA_BzPS.js.map +1 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
- package/dist/Settings-CYZzdJPO.js +347 -0
- package/dist/Settings-CYZzdJPO.js.map +1 -0
- package/dist/Sidebar-C6AdX6-N.js +73 -0
- package/dist/Sidebar-C6AdX6-N.js.map +1 -0
- package/dist/SidebarButton-BAagdMDe.js +37 -0
- package/dist/SidebarButton-BAagdMDe.js.map +1 -0
- package/dist/SidebarListElement-BfTPiihc.js +232 -0
- package/dist/SidebarListElement-BfTPiihc.js.map +1 -0
- package/dist/TheCommandPalette-Dl9TAeke.js +204 -0
- package/dist/TheCommandPalette-Dl9TAeke.js.map +1 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js +20 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js.map +1 -0
- package/dist/ViewLayout-BOXN0IYo.js +17 -0
- package/dist/ViewLayout-BOXN0IYo.js.map +1 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js +86 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +1 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js +13 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js.map +1 -0
- package/dist/ViewLayoutSection-mUqKbQry.js +23 -0
- package/dist/ViewLayoutSection-mUqKbQry.js.map +1 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js +41 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js.map +1 -0
- package/dist/_plugin-vue_export-helper-BmmBcIzD.js +8 -0
- package/dist/analytics-BZimCWcw.js +7 -0
- package/dist/analytics-BZimCWcw.js.map +1 -0
- package/dist/build-request-security-BQjNr2MD.js +41 -0
- package/dist/build-request-security-BQjNr2MD.js.map +1 -0
- package/dist/code-input-iq-moLxi.js +775 -0
- package/dist/code-input-iq-moLxi.js.map +1 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/AddressBar/index.js +5 -4
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CodeInput/index.js +2 -4
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.js +3 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/DataTable/index.js +6 -18
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/HttpMethod/index.js +2 -4
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +2 -4
- 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.d.ts +3 -3
- package/dist/components/Server/index.js +3 -8
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.js +2 -4
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/ViewLayout/index.js +2 -4
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +7 -8
- package/dist/components-CSxJTn6F.js +183 -0
- package/dist/components-CSxJTn6F.js.map +1 -0
- package/dist/components-ChixwQhN.js +61 -0
- package/dist/components-ChixwQhN.js.map +1 -0
- package/dist/computer-D7VW3Ruy.js +562 -0
- package/dist/computer-D7VW3Ruy.js.map +1 -0
- package/dist/consts-CyGRb9dl.js +318 -0
- package/dist/consts-CyGRb9dl.js.map +1 -0
- package/dist/curl-nbw1OxbV.js +54 -0
- package/dist/curl-nbw1OxbV.js.map +1 -0
- package/dist/data-table-PL7e8NRO.js +282 -0
- package/dist/data-table-PL7e8NRO.js.map +1 -0
- package/dist/editor-BZ_J0eze.js +466 -0
- package/dist/editor-BZ_J0eze.js.map +1 -0
- package/dist/environments-ByLK9lnC.js +592 -0
- package/dist/environments-ByLK9lnC.js.map +1 -0
- package/dist/formatters-DOGXZq9R.js +36 -0
- package/dist/formatters-DOGXZq9R.js.map +1 -0
- package/dist/forms-CZX6cFDS.js +42 -0
- package/dist/forms-CZX6cFDS.js.map +1 -0
- package/dist/get-active-environment-CkxyQ1dM.js +19 -0
- package/dist/get-active-environment-CkxyQ1dM.js.map +1 -0
- package/dist/get-resolved-url-BUCwrBzc.js +30 -0
- package/dist/get-resolved-url-BUCwrBzc.js.map +1 -0
- package/dist/get-server-url-o3On8CEr.js +32 -0
- package/dist/get-server-url-o3On8CEr.js.map +1 -0
- package/dist/get-servers-B_WNlQWB.js +106 -0
- package/dist/get-servers-B_WNlQWB.js.map +1 -0
- package/dist/get-snippet-DBRUSfZ2.js +39 -0
- package/dist/get-snippet-DBRUSfZ2.js.map +1 -0
- package/dist/global-cookies-D3ZS9ON3.js +184 -0
- package/dist/global-cookies-D3ZS9ON3.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +3 -11
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks-BvZxH4XB.js +80 -0
- package/dist/hooks-BvZxH4XB.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -12
- package/dist/layout-BWiL7dfb.js +81 -0
- package/dist/layout-BWiL7dfb.js.map +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +5 -7
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Modal/index.js +3 -4
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +101 -6
- package/dist/layouts/Web/index.js.map +1 -0
- package/dist/libs/create-client.d.ts +9 -9
- package/dist/libs/create-client.d.ts.map +1 -1
- 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/importers/index.d.ts +1 -1
- package/dist/libs/importers/index.js +2 -4
- package/dist/libs/index.d.ts +15 -15
- package/dist/libs/index.js +6 -45
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/libs/send-request/index.js +3 -8
- package/dist/libs-spbv4P0g.js +249 -0
- package/dist/libs-spbv4P0g.js.map +1 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +8 -8
- package/dist/monacoeditorwork/yaml.worker.bundle.js +151 -151
- package/dist/operation-block-BnMIKAOh.js +1624 -0
- package/dist/operation-block-BnMIKAOh.js.map +1 -0
- package/dist/operation-code-sample-ZUTueV3v.js +1726 -0
- package/dist/operation-code-sample-ZUTueV3v.js.map +1 -0
- package/dist/parse-curl-BtypQT3D.js +106 -0
- package/dist/parse-curl-BtypQT3D.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.js +2 -7
- package/dist/plugins/plugin-manager.d.ts +10 -4
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins-B52hCIyZ.js +50 -0
- package/dist/plugins-B52hCIyZ.js.map +1 -0
- package/dist/rabbitjump-CMZXAR6d.js +9 -0
- package/dist/rabbitjump-CMZXAR6d.js.map +1 -0
- package/dist/request-block-DwsGy64Q.js +1466 -0
- package/dist/request-block-DwsGy64Q.js.map +1 -0
- package/dist/resize-D2IYvVdh.js +114 -0
- package/dist/resize-D2IYvVdh.js.map +1 -0
- package/dist/response-block-DmkaDZYs.js +1188 -0
- package/dist/response-block-DmkaDZYs.js.map +1 -0
- package/dist/scalar-address-bar-block--Vs6IBU1.js +425 -0
- package/dist/scalar-address-bar-block--Vs6IBU1.js.map +1 -0
- package/dist/scalar-auth-selector-block-DI3DLag9.js +1886 -0
- package/dist/scalar-auth-selector-block-DI3DLag9.js.map +1 -0
- package/dist/search-CmsQQkjn.js +151 -0
- package/dist/search-CmsQQkjn.js.map +1 -0
- package/dist/send-request-BsTfRiBC.js +348 -0
- package/dist/send-request-BsTfRiBC.js.map +1 -0
- package/dist/server-tcI-OCyx.js +140 -0
- package/dist/server-tcI-OCyx.js.map +1 -0
- package/dist/set-request-cookies-BJJhsU4A.js +88 -0
- package/dist/set-request-cookies-BJJhsU4A.js.map +1 -0
- package/dist/settings-BKk_1lcH.js +455 -0
- package/dist/settings-BKk_1lcH.js.map +1 -0
- package/dist/sidebar-ceSbYmnt.js +217 -0
- package/dist/sidebar-ceSbYmnt.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.d.ts +2 -2
- package/dist/store/index.js +2 -10
- 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 +1512 -0
- package/dist/store-DpSUVhjp.js.map +1 -0
- package/dist/string-template-sS5PtY6T.js +64 -0
- package/dist/string-template-sS5PtY6T.js.map +1 -0
- package/dist/style.css +10372 -1
- package/dist/types/index.js +0 -1
- package/dist/use-global-hot-keys-D8Ai8Qbm.js +274 -0
- package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +1 -0
- package/dist/useSidebar-DLTwHDI-.js +45 -0
- package/dist/useSidebar-DLTwHDI-.js.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- 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/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.d.ts +4 -4
- package/dist/v2/blocks/operation-block/index.js +20 -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 +2 -2
- 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 +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.d.ts +6 -6
- package/dist/v2/blocks/operation-code-sample/index.js +2 -16
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.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 +3 -2
- 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.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +9 -4
- 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.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +6 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.js +5 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +5 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/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/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/openid-discovery-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +6 -8
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/code-input/index.d.ts +1 -1
- package/dist/v2/components/code-input/index.js +2 -4
- 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/data-table/index.d.ts +8 -8
- package/dist/v2/components/data-table/index.js +3 -18
- package/dist/v2/components/forms/index.d.ts +1 -1
- package/dist/v2/components/forms/index.js +2 -4
- package/dist/v2/components/layout/index.d.ts +1 -1
- package/dist/v2/components/layout/index.js +2 -4
- package/dist/v2/components/modals/index.d.ts +1 -1
- package/dist/v2/components/modals/index.js +37 -3
- package/dist/v2/components/modals/index.js.map +1 -0
- package/dist/v2/components/resize/index.d.ts +2 -2
- package/dist/v2/components/resize/index.js +2 -6
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/index.d.ts +1 -1
- package/dist/v2/components/server/index.js +2 -4
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/index.d.ts +3 -3
- package/dist/v2/components/sidebar/index.js +3 -8
- package/dist/v2/features/app/App.vue.d.ts +4 -4
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/index.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +10 -5
- 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 +5 -5
- package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
- package/dist/v2/features/app/index.d.ts +8 -8
- package/dist/v2/features/app/index.js +3161 -19
- package/dist/v2/features/app/index.js.map +1 -0
- 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/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/Editor/index.d.ts +1 -1
- package/dist/v2/features/collection/components/Editor/index.js +2 -4
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Form.vue.d.ts +1 -0
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
- 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/Servers.vue.d.ts.map +1 -1
- 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/TheCommandPalette.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +10 -45
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.d.ts +2 -2
- package/dist/v2/features/command-palette/index.js +3 -6
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.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/editor/index.d.ts +4 -4
- package/dist/v2/features/editor/index.js +2 -10
- package/dist/v2/features/environments/index.d.ts +1 -1
- package/dist/v2/features/environments/index.js +4 -4
- package/dist/v2/features/global-cookies/index.d.ts +1 -1
- package/dist/v2/features/global-cookies/index.js +4 -4
- 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.d.ts +3 -3
- package/dist/v2/features/modal/index.js +639 -7
- package/dist/v2/features/modal/index.js.map +1 -0
- 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/index.d.ts +5 -5
- package/dist/v2/features/operation/index.js +19 -12
- 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/features/search/index.d.ts +1 -1
- package/dist/v2/features/search/index.js +2 -4
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/index.d.ts +2 -2
- package/dist/v2/features/settings/index.js +2 -6
- 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/helpers/index.d.ts +2 -2
- package/dist/v2/helpers/index.js +3 -6
- 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/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Components/CodeSnippet/index.js +3 -10
- 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.d.ts +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -8
- 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.d.ts +2 -2
- package/dist/views/Request/RequestSection/index.js +42 -5
- package/dist/views/Request/RequestSection/index.js.map +1 -0
- 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.d.ts +2 -2
- package/dist/views/Request/ResponseSection/index.js +7 -6
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/components/index.js +2 -4
- package/dist/views/Request/consts/index.d.ts +2 -2
- package/dist/views/Request/consts/index.js +2 -10
- 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/index.d.ts +3 -3
- package/dist/views/Request/libs/index.js +3 -22
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/types/index.js +0 -1
- package/dist/watch-mode-Dbaqd9bG.js +375 -0
- package/dist/watch-mode-Dbaqd9bG.js.map +1 -0
- package/package.json +29 -33
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/analytics.js +0 -9
- package/dist/assets/computer.ascii.js +0 -34
- package/dist/assets/keycap.ascii.js +0 -25
- package/dist/assets/rabbit.ascii.js +0 -11
- package/dist/assets/rabbitjump.ascii.js +0 -11
- package/dist/components/AddressBar/AddressBar.vue.js +0 -7
- package/dist/components/AddressBar/AddressBar.vue2.js +0 -160
- package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -7
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +0 -98
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -38
- package/dist/components/CodeInput/CodeInput.vue.js +0 -8
- package/dist/components/CodeInput/CodeInput.vue2.js +0 -209
- package/dist/components/CodeInput/codeVariableWidget.js +0 -111
- package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -44
- package/dist/components/CommandPalette/CommandActionForm.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -52
- package/dist/components/CommandPalette/CommandActionInput.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -80
- package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -116
- package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -217
- package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +0 -136
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -123
- package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -84
- package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -48
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -305
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -39
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +0 -4
- package/dist/components/DataTable/DataTable.vue.js +0 -38
- package/dist/components/DataTable/DataTable.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCell.vue.js +0 -26
- package/dist/components/DataTable/DataTableCell.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -53
- package/dist/components/DataTable/DataTableCheckbox.vue2.js +0 -4
- package/dist/components/DataTable/DataTableHeader.vue.js +0 -18
- package/dist/components/DataTable/DataTableHeader.vue2.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue.js +0 -7
- package/dist/components/DataTable/DataTableInput.vue2.js +0 -124
- package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -146
- package/dist/components/DataTable/DataTableInputSelect.vue2.js +0 -4
- package/dist/components/DataTable/DataTableRow.vue.js +0 -12
- package/dist/components/DataTable/DataTableText.vue.js +0 -23
- package/dist/components/DataTable/DataTableText.vue2.js +0 -4
- package/dist/components/EmptyState.vue.js +0 -7
- package/dist/components/EmptyState.vue2.js +0 -42
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -113
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +0 -4
- package/dist/components/Form/Form.vue.js +0 -83
- package/dist/components/Form/Form.vue2.js +0 -4
- package/dist/components/Form/LabelInput.vue.js +0 -7
- package/dist/components/Form/LabelInput.vue2.js +0 -42
- package/dist/components/HelpfulLink.vue.js +0 -20
- package/dist/components/HelpfulLink.vue2.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue.js +0 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -62
- package/dist/components/IconSelector.vue.js +0 -75
- package/dist/components/IconSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/DropEventListener.vue.js +0 -81
- package/dist/components/ImportCollection/DropEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -77
- package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -208
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +0 -5
- package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -73
- package/dist/components/ImportCollection/ImportNowButton.vue2.js +0 -4
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -44
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +0 -4
- package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -24
- package/dist/components/ImportCollection/PasteEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/PrefetchError.vue.js +0 -27
- package/dist/components/ImportCollection/PrefetchError.vue2.js +0 -4
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -20
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +0 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -134
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -106
- package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -20
- package/dist/components/ImportCollection/utils/import-collection.js +0 -29
- package/dist/components/ImportCollection/utils/is-document.js +0 -9
- package/dist/components/ImportCollection/utils/is-url.js +0 -9
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -7
- package/dist/components/OpenApiClientButton.vue.js +0 -7
- package/dist/components/OpenApiClientButton.vue2.js +0 -48
- package/dist/components/ScalarAsciiArt.vue.js +0 -7
- package/dist/components/ScalarAsciiArt.vue2.js +0 -37
- package/dist/components/Search/useSearch.js +0 -78
- package/dist/components/SectionFilter.vue.js +0 -7
- package/dist/components/SectionFilter.vue2.js +0 -64
- package/dist/components/SectionFilterButton.vue.js +0 -23
- package/dist/components/SectionFilterButton.vue2.js +0 -4
- package/dist/components/Server/ServerDropdown.vue.js +0 -132
- package/dist/components/Server/ServerDropdown.vue2.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue.js +0 -7
- package/dist/components/Server/ServerDropdownItem.vue2.js +0 -84
- package/dist/components/Server/ServerSelector.vue.js +0 -82
- package/dist/components/Server/ServerSelector.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesForm.vue.js +0 -49
- package/dist/components/Server/ServerVariablesForm.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesSelect.vue.js +0 -54
- package/dist/components/Server/ServerVariablesSelect.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesTextbox.vue.js +0 -29
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue.js +0 -7
- package/dist/components/SideNav/DownloadAppButton.vue2.js +0 -33
- package/dist/components/SideNav/SideHelp.vue.js +0 -127
- package/dist/components/SideNav/SideHelp.vue2.js +0 -4
- package/dist/components/SideNav/SideNav.vue.js +0 -96
- package/dist/components/SideNav/SideNav.vue2.js +0 -4
- package/dist/components/SideNav/SideNavGroup.vue.js +0 -16
- package/dist/components/SideNav/SideNavGroup.vue2.js +0 -4
- package/dist/components/SideNav/SideNavLink.vue.js +0 -39
- package/dist/components/SideNav/SideNavLink.vue2.js +0 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -27
- package/dist/components/SideNav/SideNavRouterLink.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +0 -30
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -58
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -29
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +0 -46
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue.js +0 -7
- package/dist/components/Sidebar/Sidebar.vue2.js +0 -63
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -33
- package/dist/components/Sidebar/SidebarButton.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarList.vue.js +0 -12
- package/dist/components/Sidebar/SidebarListElement.vue.js +0 -8
- package/dist/components/Sidebar/SidebarListElement.vue2.js +0 -94
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -86
- package/dist/components/Sidebar/SidebarListElementActions.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarToggle.vue.js +0 -49
- package/dist/components/Sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/components/TopNav/TopNav.vue.js +0 -210
- package/dist/components/TopNav/TopNav.vue2.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue.js +0 -7
- package/dist/components/TopNav/TopNavItem.vue2.js +0 -138
- package/dist/components/ViewLayout/ViewLayout.vue.js +0 -18
- package/dist/components/ViewLayout/ViewLayout.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -92
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +0 -12
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +0 -23
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
- package/dist/constants.js +0 -40
- package/dist/data/httpHeaders.js +0 -537
- package/dist/hooks/useAnalytics.js +0 -11
- package/dist/hooks/useClientConfig.js +0 -7
- package/dist/hooks/useFileDialog.js +0 -21
- package/dist/hooks/useLayout.js +0 -8
- package/dist/hooks/useResponseBody.js +0 -20
- package/dist/hooks/useSidebar.js +0 -28
- package/dist/layouts/App/ApiClientApp.vue.js +0 -70
- package/dist/layouts/App/ApiClientApp.vue3.js +0 -5
- package/dist/layouts/App/MainLayout.vue.js +0 -26
- package/dist/layouts/App/MainLayout.vue2.js +0 -4
- package/dist/layouts/App/create-api-client-app.js +0 -35
- package/dist/layouts/App/hotkeys.js +0 -21
- package/dist/layouts/Modal/ApiClientModal.vue.js +0 -30
- package/dist/layouts/Modal/ApiClientModal.vue2.js +0 -4
- package/dist/layouts/Modal/create-api-client-modal.js +0 -32
- package/dist/layouts/Web/ApiClientWeb.vue.js +0 -64
- package/dist/layouts/Web/ApiClientWeb.vue3.js +0 -5
- package/dist/layouts/Web/create-api-client-web.js +0 -32
- package/dist/libs/create-client.js +0 -189
- package/dist/libs/electron.js +0 -4
- package/dist/libs/env-helpers.js +0 -6
- package/dist/libs/environment-parser.js +0 -18
- package/dist/libs/errors.js +0 -16
- package/dist/libs/event-bus.js +0 -32
- package/dist/libs/extractAttachmentFilename.js +0 -18
- package/dist/libs/find-request.js +0 -23
- package/dist/libs/formatters.js +0 -10
- package/dist/libs/get-request-uid-by-path-method.js +0 -18
- package/dist/libs/getOpenApiDocumentDetails.js +0 -40
- package/dist/libs/hot-keys.js +0 -44
- package/dist/libs/importers/curl.js +0 -53
- package/dist/libs/isUrl.js +0 -7
- package/dist/libs/local-storage.js +0 -41
- package/dist/libs/normalize-headers.js +0 -27
- package/dist/libs/parse-curl.js +0 -59
- package/dist/libs/postman.js +0 -37
- package/dist/libs/send-request/build-request-security.js +0 -35
- package/dist/libs/send-request/create-fetch-body.js +0 -25
- package/dist/libs/send-request/create-fetch-headers.js +0 -11
- package/dist/libs/send-request/create-fetch-query-params.js +0 -33
- package/dist/libs/send-request/create-request-operation.js +0 -140
- package/dist/libs/send-request/decode-buffer.js +0 -9
- package/dist/libs/send-request/set-request-cookies.js +0 -58
- package/dist/libs/string-template.js +0 -42
- package/dist/libs/validate-parameters.js +0 -16
- package/dist/plugins/hooks/usePluginManager.js +0 -10
- package/dist/plugins/plugin-manager.js +0 -26
- package/dist/routes.js +0 -210
- package/dist/store/active-entities.js +0 -118
- package/dist/store/collections.js +0 -73
- package/dist/store/cookies.js +0 -13
- package/dist/store/environment.js +0 -32
- package/dist/store/events.js +0 -35
- package/dist/store/import-spec.js +0 -55
- package/dist/store/request-example.js +0 -43
- package/dist/store/requests.js +0 -97
- package/dist/store/router-params.js +0 -22
- package/dist/store/security-schemes.js +0 -55
- package/dist/store/servers.js +0 -39
- package/dist/store/store.js +0 -144
- package/dist/store/tags.js +0 -45
- package/dist/store/workspace.js +0 -52
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +0 -242
- package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +0 -4
- package/dist/v2/blocks/operation-block/components/Header.vue.js +0 -7
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +0 -100
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -40
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -107
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -46
- package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -70
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -25
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +0 -9
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -14
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -7
- package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -36
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -17
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +0 -43
- package/dist/v2/blocks/operation-block/helpers/response-cache.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/send-request.js +0 -122
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -49
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +0 -17
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +0 -56
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +0 -30
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +0 -7
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +0 -227
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +0 -22
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +0 -27
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +0 -40
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +0 -20
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +0 -4
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -302
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +0 -28
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +0 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +0 -67
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +0 -66
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -172
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +0 -55
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +0 -18
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +0 -7
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +0 -344
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +0 -191
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +0 -84
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +0 -135
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +0 -78
- package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +0 -74
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +0 -204
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +0 -63
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +0 -55
- package/dist/v2/blocks/request-block/helpers/files.js +0 -7
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -26
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +0 -29
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +0 -9
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +0 -6
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -16
- package/dist/v2/blocks/request-block/helpers/group-by.js +0 -10
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +0 -7
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js +0 -32
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +0 -7
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +0 -180
- package/dist/v2/blocks/response-block/components/Headers.vue.js +0 -96
- package/dist/v2/blocks/response-block/components/Headers.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +0 -87
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +0 -36
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +0 -14
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +0 -63
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +0 -41
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +0 -94
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +0 -25
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +0 -52
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +0 -54
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +0 -79
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +0 -46
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +0 -67
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue2.js +0 -4
- package/dist/v2/blocks/response-block/helpers/extract-filename.js +0 -18
- package/dist/v2/blocks/response-block/helpers/get-content-length.js +0 -12
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -126
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +0 -12
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +0 -16
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +0 -208
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +0 -95
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +0 -145
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -38
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +0 -25
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -182
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -51
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -330
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +0 -76
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -165
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +0 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +0 -91
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -83
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -244
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +0 -97
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -135
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +0 -35
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -23
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +0 -139
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +0 -27
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +0 -64
- package/dist/v2/components/callout/Callout.vue.js +0 -7
- package/dist/v2/components/callout/Callout.vue2.js +0 -43
- package/dist/v2/components/code-input/CodeInput.vue.js +0 -8
- package/dist/v2/components/code-input/CodeInput.vue2.js +0 -213
- package/dist/v2/components/code-input/code-variable-widget.js +0 -106
- package/dist/v2/components/data-table/DataTable.vue.js +0 -38
- package/dist/v2/components/data-table/DataTable.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCell.vue.js +0 -26
- package/dist/v2/components/data-table/DataTableCell.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +0 -53
- package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableHeader.vue.js +0 -18
- package/dist/v2/components/data-table/DataTableHeader.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableInput.vue.js +0 -7
- package/dist/v2/components/data-table/DataTableInput.vue2.js +0 -121
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +0 -149
- package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableRow.vue.js +0 -12
- package/dist/v2/components/data-table/DataTableText.vue.js +0 -23
- package/dist/v2/components/data-table/DataTableText.vue2.js +0 -4
- package/dist/v2/components/forms/ConfirmationForm.vue.js +0 -45
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +0 -4
- package/dist/v2/components/layout/CollapsibleSection.vue.js +0 -89
- package/dist/v2/components/layout/CollapsibleSection.vue2.js +0 -4
- package/dist/v2/components/layout/ValueEmitter.vue.js +0 -21
- package/dist/v2/components/layout/ValueEmitter.vue2.js +0 -4
- package/dist/v2/components/modals/DeleteModal.vue.js +0 -31
- package/dist/v2/components/modals/DeleteModal.vue2.js +0 -4
- package/dist/v2/components/modals/ModalClientContainer.vue.js +0 -7
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +0 -60
- package/dist/v2/components/resize/Resize.vue.js +0 -8
- package/dist/v2/components/resize/Resize.vue2.js +0 -36
- package/dist/v2/components/resize/use-split-resize.js +0 -57
- package/dist/v2/components/server/ServerDropdown.vue.js +0 -91
- package/dist/v2/components/server/ServerDropdown.vue2.js +0 -4
- package/dist/v2/components/server/ServerDropdownItem.vue.js +0 -7
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +0 -49
- package/dist/v2/components/sidebar/Sidebar.vue.js +0 -115
- package/dist/v2/components/sidebar/Sidebar.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +0 -50
- package/dist/v2/components/sidebar/SidebarMenu.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +0 -52
- package/dist/v2/components/sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/v2/features/app/App.vue.js +0 -152
- package/dist/v2/features/app/App.vue3.js +0 -5
- package/dist/v2/features/app/app-events.js +0 -251
- package/dist/v2/features/app/app-state.js +0 -415
- package/dist/v2/features/app/components/AppSidebar.vue.js +0 -7
- package/dist/v2/features/app/components/AppSidebar.vue2.js +0 -304
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -56
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +0 -4
- package/dist/v2/features/app/components/DesktopTab.vue.js +0 -7
- package/dist/v2/features/app/components/DesktopTab.vue2.js +0 -134
- package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -56
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +0 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +0 -7
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +0 -19
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -185
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +0 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +0 -7
- package/dist/v2/features/app/components/SplashScreen.vue2.js +0 -18
- package/dist/v2/features/app/helpers/create-api-client-app.js +0 -36
- package/dist/v2/features/app/helpers/filter-workspaces.js +0 -5
- package/dist/v2/features/app/helpers/get-route-param.js +0 -9
- package/dist/v2/features/app/helpers/group-workspaces.js +0 -23
- package/dist/v2/features/app/helpers/routes.js +0 -157
- package/dist/v2/features/app/hooks/use-document-watcher.js +0 -66
- package/dist/v2/features/app/hooks/use-theme.js +0 -48
- package/dist/v2/features/collection/DocumentCollection.vue.js +0 -336
- package/dist/v2/features/collection/DocumentCollection.vue3.js +0 -5
- package/dist/v2/features/collection/OperationCollection.vue.js +0 -86
- package/dist/v2/features/collection/OperationCollection.vue2.js +0 -4
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -68
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +0 -4
- package/dist/v2/features/collection/components/Authentication.vue.js +0 -7
- package/dist/v2/features/collection/components/Authentication.vue2.js +0 -154
- package/dist/v2/features/collection/components/Cookies.vue.js +0 -52
- package/dist/v2/features/collection/components/Cookies.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/Editor.vue2.js +0 -344
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -78
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -83
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -21
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -5
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -25
- package/dist/v2/features/collection/components/Environment.vue.js +0 -54
- package/dist/v2/features/collection/components/Environment.vue2.js +0 -4
- package/dist/v2/features/collection/components/Form.vue.js +0 -78
- package/dist/v2/features/collection/components/Form.vue2.js +0 -4
- package/dist/v2/features/collection/components/LabelInput.vue.js +0 -7
- package/dist/v2/features/collection/components/LabelInput.vue2.js +0 -35
- package/dist/v2/features/collection/components/Overview.vue.js +0 -7
- package/dist/v2/features/collection/components/Overview.vue2.js +0 -208
- package/dist/v2/features/collection/components/Servers.vue.js +0 -209
- package/dist/v2/features/collection/components/Servers.vue2.js +0 -4
- package/dist/v2/features/collection/components/Settings.vue.js +0 -61
- package/dist/v2/features/collection/components/Settings.vue2.js +0 -4
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +0 -7
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +0 -136
- package/dist/v2/features/collection/components/Tabs.vue.js +0 -44
- package/dist/v2/features/collection/components/Tabs.vue2.js +0 -4
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -13
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -7
- package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +0 -152
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +0 -48
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +0 -52
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -211
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -182
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +0 -115
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -78
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -221
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -114
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -40
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +0 -4
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -31
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -76
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -18
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -33
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +0 -11
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -52
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -139
- package/dist/v2/features/editor/config.js +0 -16
- package/dist/v2/features/editor/helpers/configure-language-support.js +0 -39
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -20
- package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -19
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -9
- package/dist/v2/features/editor/helpers/json/json-ast.js +0 -24
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -72
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -21
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -8
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -56
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -21
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -19
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -50
- package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -34
- package/dist/v2/features/editor/hooks/use-editor.js +0 -107
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -27
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -316
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -25
- package/dist/v2/features/environments/EnvironmentsList.vue.js +0 -68
- package/dist/v2/features/environments/EnvironmentsList.vue2.js +0 -4
- package/dist/v2/features/environments/components/Environment.vue.js +0 -66
- package/dist/v2/features/environments/components/Environment.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +0 -121
- package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +0 -85
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +0 -53
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +0 -109
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +0 -7
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +0 -136
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -7
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +0 -189
- package/dist/v2/features/modal/Modal.vue.js +0 -122
- package/dist/v2/features/modal/Modal.vue2.js +0 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +0 -89
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +0 -36
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +0 -29
- package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -36
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +0 -93
- package/dist/v2/features/modal/modal-events.js +0 -44
- package/dist/v2/features/operation/Operation.vue.js +0 -126
- package/dist/v2/features/operation/Operation.vue2.js +0 -4
- package/dist/v2/features/operation/helpers/combine-params.js +0 -14
- package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -4
- package/dist/v2/features/operation/helpers/get-selected-security.js +0 -18
- package/dist/v2/features/operation/helpers/get-selected-server.js +0 -4
- package/dist/v2/features/search/helpers/create-fuse-instance.js +0 -43
- package/dist/v2/features/search/helpers/create-search-index.js +0 -63
- package/dist/v2/features/search/hooks/use-search-index.js +0 -18
- package/dist/v2/features/settings/CollectionSettings.vue.js +0 -275
- package/dist/v2/features/settings/CollectionSettings.vue2.js +0 -4
- package/dist/v2/features/settings/DocumentSettings.vue.js +0 -115
- package/dist/v2/features/settings/DocumentSettings.vue2.js +0 -4
- package/dist/v2/features/settings/components/Appearance.vue.js +0 -88
- package/dist/v2/features/settings/components/Appearance.vue2.js +0 -4
- package/dist/v2/features/settings/components/Section.vue.js +0 -35
- package/dist/v2/features/settings/components/Section.vue2.js +0 -4
- package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -16
- package/dist/v2/helpers/drag-handle-factory.js +0 -120
- package/dist/v2/helpers/generate-location-id.js +0 -10
- package/dist/v2/helpers/get-active-environment.js +0 -22
- package/dist/v2/helpers/get-active-proxy-url.js +0 -5
- package/dist/v2/helpers/get-servers.js +0 -66
- package/dist/v2/helpers/get-tab-details.js +0 -34
- package/dist/v2/helpers/handle-hotkeys.js +0 -54
- package/dist/v2/helpers/is-url.js +0 -5
- package/dist/v2/helpers/slugify.js +0 -4
- package/dist/v2/helpers/storage.js +0 -16
- package/dist/v2/hooks/use-color-mode.js +0 -24
- package/dist/v2/hooks/use-global-hot-keys.js +0 -11
- package/dist/v2/hooks/use-scroll-lock.js +0 -21
- package/dist/v2/workspace-events.js +0 -252
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -49
- package/dist/views/Collection/CollectionAuthentication.vue.js +0 -7
- package/dist/views/Collection/CollectionAuthentication.vue2.js +0 -56
- package/dist/views/Collection/CollectionCookies.vue.js +0 -4
- package/dist/views/Collection/CollectionCookies.vue2.js +0 -16
- package/dist/views/Collection/CollectionEnvironment.vue.js +0 -5
- package/dist/views/Collection/CollectionEnvironment.vue2.js +0 -229
- package/dist/views/Collection/CollectionInfoForm.vue.js +0 -7
- package/dist/views/Collection/CollectionInfoForm.vue2.js +0 -63
- package/dist/views/Collection/CollectionNavigation.vue.js +0 -133
- package/dist/views/Collection/CollectionNavigation.vue2.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue2.js +0 -34
- package/dist/views/Collection/CollectionScripts.vue.js +0 -4
- package/dist/views/Collection/CollectionScripts.vue2.js +0 -16
- package/dist/views/Collection/CollectionServerForm.vue.js +0 -75
- package/dist/views/Collection/CollectionServerForm.vue2.js +0 -4
- package/dist/views/Collection/CollectionServers.vue.js +0 -4
- package/dist/views/Collection/CollectionServers.vue2.js +0 -94
- package/dist/views/Collection/CollectionSettings.vue.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue2.js +0 -118
- package/dist/views/Collection/CollectionSync.vue.js +0 -4
- package/dist/views/Collection/CollectionSync.vue2.js +0 -16
- package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -7
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +0 -270
- package/dist/views/Collection/components/MarkdownInput.vue.js +0 -7
- package/dist/views/Collection/components/MarkdownInput.vue2.js +0 -100
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -50
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +0 -4
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -62
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -82
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +0 -30
- package/dist/views/Cookies/CookieForm.vue.js +0 -34
- package/dist/views/Cookies/CookieForm.vue2.js +0 -4
- package/dist/views/Cookies/CookieModal.vue.js +0 -7
- package/dist/views/Cookies/CookieModal.vue2.js +0 -88
- package/dist/views/Cookies/Cookies.vue.js +0 -4
- package/dist/views/Cookies/Cookies.vue2.js +0 -162
- package/dist/views/Environment/Environment.vue.js +0 -4
- package/dist/views/Environment/Environment.vue2.js +0 -402
- package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -42
- package/dist/views/Environment/EnvironmentColorModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentColors.vue.js +0 -118
- package/dist/views/Environment/EnvironmentColors.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentModal.vue.js +0 -131
- package/dist/views/Environment/EnvironmentModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -129
- package/dist/views/Environment/EnvironmentVariableDropdown.vue2.js +0 -4
- package/dist/views/Environment/handle-drag.js +0 -32
- package/dist/views/Request/Request.vue.js +0 -7
- package/dist/views/Request/Request.vue2.js +0 -105
- package/dist/views/Request/RequestRoot.vue.js +0 -7
- package/dist/views/Request/RequestRoot.vue2.js +0 -123
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -52
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -246
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -135
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +0 -209
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +0 -116
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -50
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -219
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -28
- package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -451
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +0 -170
- package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -162
- package/dist/views/Request/RequestSection/RequestParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +0 -247
- package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +0 -227
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +0 -61
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -29
- package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -13
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -16
- package/dist/views/Request/RequestSidebar.vue.js +0 -7
- package/dist/views/Request/RequestSidebar.vue2.js +0 -341
- package/dist/views/Request/RequestSidebarItem.vue.js +0 -8
- package/dist/views/Request/RequestSidebarItem.vue2.js +0 -464
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -7
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +0 -236
- package/dist/views/Request/RequestSubpageHeader.vue.js +0 -7
- package/dist/views/Request/RequestSubpageHeader.vue2.js +0 -79
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +0 -83
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -36
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -63
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +0 -42
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -74
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -25
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -50
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -51
- package/dist/views/Request/ResponseSection/ResponseCookies.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +0 -103
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +0 -38
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -67
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +0 -189
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -182
- package/dist/views/Request/components/WorkspaceDropdown.vue2.js +0 -4
- package/dist/views/Request/consts/mediaTypes.js +0 -131
- package/dist/views/Request/consts/new-auth-options.js +0 -100
- package/dist/views/Request/handle-drag.js +0 -42
- package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -57
- package/dist/views/Request/libs/auth.js +0 -52
- package/dist/views/Request/libs/oauth2.js +0 -127
- package/dist/views/Request/libs/request.js +0 -40
- package/dist/views/Request/libs/watch-mode.js +0 -337
- package/dist/views/Settings/Settings.vue.js +0 -4
- package/dist/views/Settings/Settings.vue2.js +0 -29
- package/dist/views/Settings/SettingsGeneral.vue.js +0 -286
- package/dist/views/Settings/SettingsGeneral.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -85
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsSection.vue.js +0 -24
- package/dist/views/Settings/components/SettingsSection.vue2.js +0 -4
package/dist/types/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { computed, onBeforeUnmount, onMounted, toValue } from "vue";
|
|
2
|
+
import { isMacOS } from "@scalar/helpers/general/is-mac-os";
|
|
3
|
+
import { generateClientMutators } from "@scalar/workspace-store/mutators";
|
|
4
|
+
//#region src/v2/workspace-events.ts
|
|
5
|
+
/**
|
|
6
|
+
* Wraps a given function with optional before/after execution hooks for a specific event.
|
|
7
|
+
* - Calls onBeforeExecute hook before executing the main function.
|
|
8
|
+
* - Calls onAfterExecute hook after executing the main function.
|
|
9
|
+
*
|
|
10
|
+
* @template T The event key from ApiReferenceEvents
|
|
11
|
+
* @param event The event name
|
|
12
|
+
* @param fn The main function to execute
|
|
13
|
+
* @param hooks The hooks object containing before/after hooks for events
|
|
14
|
+
* @returns An async function that runs hooks around the main function
|
|
15
|
+
*/
|
|
16
|
+
var withHook = (event, fn, hooks) => {
|
|
17
|
+
return async (args) => {
|
|
18
|
+
const result = await hooks[event]?.onBeforeExecute?.(args) ?? args;
|
|
19
|
+
await fn(result);
|
|
20
|
+
await hooks[event]?.onAfterExecute?.(result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Initializes all Workspace Event Handlers by subscribing eventBus listeners
|
|
26
|
+
* to each relevant mutator operation. Hooks are used for before/after execution.
|
|
27
|
+
*
|
|
28
|
+
* @param eventBus The WorkspaceEventBus to subscribe to
|
|
29
|
+
* @param store The WorkspaceStore instance
|
|
30
|
+
* @param hooks Object containing optional before/after hooks for each event
|
|
31
|
+
*/
|
|
32
|
+
function initializeWorkspaceEventHandlers({ eventBus, store, hooks }) {
|
|
33
|
+
const mutators = computed(() => generateClientMutators(store.value));
|
|
34
|
+
/**
|
|
35
|
+
* Returns the appropriate mutators depending on the collectionType.
|
|
36
|
+
* If collectionType is 'document', gets the active document mutator,
|
|
37
|
+
* otherwise, gets the workspace mutator.
|
|
38
|
+
*/
|
|
39
|
+
const getMutators = ({ collectionType }) => {
|
|
40
|
+
if (collectionType === "document") return mutators.value.active();
|
|
41
|
+
return mutators.value.workspace();
|
|
42
|
+
};
|
|
43
|
+
eventBus.on("workspace:update:active-proxy", (payload) => withHook("workspace:update:active-proxy", mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload));
|
|
44
|
+
eventBus.on("workspace:update:color-mode", (payload) => withHook("workspace:update:color-mode", mutators.value.workspace().workspace.updateColorMode, hooks)(payload));
|
|
45
|
+
eventBus.on("workspace:update:theme", (payload) => withHook("workspace:update:theme", mutators.value.workspace().workspace.updateTheme, hooks)(payload));
|
|
46
|
+
eventBus.on("workspace:update:selected-client", (payload) => withHook("workspace:update:selected-client", mutators.value.workspace().workspace.updateSelectedClient, hooks)(payload));
|
|
47
|
+
eventBus.on("workspace:update:active-environment", (payload) => withHook("workspace:update:active-environment", mutators.value.workspace().workspace.updateActiveEnvironment, hooks)(payload));
|
|
48
|
+
eventBus.on("document:update:icon", (payload) => withHook("document:update:icon", mutators.value.active().document.updateDocumentIcon, hooks)(payload));
|
|
49
|
+
eventBus.on("document:update:info", (payload) => withHook("document:update:info", mutators.value.active().document.updateDocumentInfo, hooks)(payload));
|
|
50
|
+
eventBus.on("document:update:watch-mode", (payload) => withHook("document:update:watch-mode", mutators.value.active().document.updateWatchMode, hooks)(payload));
|
|
51
|
+
eventBus.on("document:create:empty-document", (payload) => withHook("document:create:empty-document", mutators.value.active().document.createEmptyDocument, hooks)(payload));
|
|
52
|
+
eventBus.on("document:delete:document", (payload) => withHook("document:delete:document", mutators.value.active().document.deleteDocument, hooks)(payload));
|
|
53
|
+
eventBus.on("environment:upsert:environment", (payload) => withHook("environment:upsert:environment", getMutators(payload).environment.upsertEnvironment, hooks)(payload));
|
|
54
|
+
eventBus.on("environment:delete:environment", (payload) => withHook("environment:delete:environment", getMutators(payload).environment.deleteEnvironment, hooks)(payload));
|
|
55
|
+
eventBus.on("environment:upsert:environment-variable", (payload) => withHook("environment:upsert:environment-variable", getMutators(payload).environment.upsertEnvironmentVariable, hooks)(payload));
|
|
56
|
+
eventBus.on("environment:delete:environment-variable", (payload) => withHook("environment:delete:environment-variable", getMutators(payload).environment.deleteEnvironmentVariable, hooks)(payload));
|
|
57
|
+
eventBus.on("cookie:upsert:cookie", async (payload) => {
|
|
58
|
+
await withHook("cookie:upsert:cookie", getMutators(payload).cookie.upsertCookie, hooks)(payload);
|
|
59
|
+
});
|
|
60
|
+
eventBus.on("cookie:delete:cookie", async (payload) => {
|
|
61
|
+
await withHook("cookie:delete:cookie", getMutators(payload).cookie.deleteCookie, hooks)(payload);
|
|
62
|
+
});
|
|
63
|
+
eventBus.on("auth:delete:security-scheme", (payload) => withHook("auth:delete:security-scheme", mutators.value.active().auth.deleteSecurityScheme, hooks)(payload));
|
|
64
|
+
eventBus.on("auth:update:active-index", (payload) => withHook("auth:update:active-index", mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload));
|
|
65
|
+
eventBus.on("auth:update:security-scheme", (payload) => withHook("auth:update:security-scheme", mutators.value.active().auth.updateSecurityScheme, hooks)(payload));
|
|
66
|
+
eventBus.on("auth:update:selected-scopes", (payload) => withHook("auth:update:selected-scopes", mutators.value.active().auth.updateSelectedScopes, hooks)(payload));
|
|
67
|
+
eventBus.on("auth:update:selected-security-schemes", (payload) => withHook("auth:update:selected-security-schemes", mutators.value.active().auth.updateSelectedSecuritySchemes, hooks)(payload));
|
|
68
|
+
eventBus.on("auth:clear:selected-security-schemes", (payload) => withHook("auth:clear:selected-security-schemes", mutators.value.active().auth.clearSelectedSecuritySchemes, hooks)(payload));
|
|
69
|
+
eventBus.on("auth:update:security-scheme-secrets", (payload) => withHook("auth:update:security-scheme-secrets", mutators.value.active().auth.updateSecuritySchemeSecrets, hooks)(payload));
|
|
70
|
+
eventBus.on("auth:clear:security-scheme-secrets", (payload) => withHook("auth:clear:security-scheme-secrets", mutators.value.active().auth.clearSecuritySchemeSecrets, hooks)(payload));
|
|
71
|
+
eventBus.on("server:initialize:servers", (payload) => withHook("server:initialize:servers", mutators.value.active().server.initializeServers, hooks)(payload));
|
|
72
|
+
eventBus.on("server:add:server", (payload) => withHook("server:add:server", mutators.value.active().server.addServer, hooks)(payload));
|
|
73
|
+
eventBus.on("server:update:server", (payload) => withHook("server:update:server", mutators.value.active().server.updateServer, hooks)(payload));
|
|
74
|
+
eventBus.on("server:delete:server", (payload) => withHook("server:delete:server", mutators.value.active().server.deleteServer, hooks)(payload));
|
|
75
|
+
eventBus.on("server:clear:servers", (payload) => withHook("server:clear:servers", mutators.value.active().server.clearServers, hooks)(payload));
|
|
76
|
+
eventBus.on("server:update:variables", (payload) => withHook("server:update:variables", mutators.value.active().server.updateServerVariables, hooks)(payload));
|
|
77
|
+
eventBus.on("server:update:selected", (payload) => withHook("server:update:selected", mutators.value.active().server.updateSelectedServer, hooks)(payload));
|
|
78
|
+
eventBus.on("operation:create:operation", (payload) => withHook("operation:create:operation", mutators.value.active().operation.createOperation, hooks)(payload));
|
|
79
|
+
eventBus.on("operation:update:pathMethod", (payload) => withHook("operation:update:pathMethod", mutators.value.active().operation.updateOperationPathMethod, hooks)(payload));
|
|
80
|
+
eventBus.on("operation:update:meta", (payload) => withHook("operation:update:meta", mutators.value.active().operation.updateOperationMeta, hooks)(payload));
|
|
81
|
+
eventBus.on("operation:delete:operation", (payload) => withHook("operation:delete:operation", mutators.value.active().operation.deleteOperation, hooks)(payload));
|
|
82
|
+
eventBus.on("operation:create:draft-example", (payload) => withHook("operation:create:draft-example", mutators.value.active().operation.createOperationDraftExample, hooks)(payload));
|
|
83
|
+
eventBus.on("operation:delete:example", (payload) => withHook("operation:delete:example", mutators.value.active().operation.deleteOperationExample, hooks)(payload));
|
|
84
|
+
eventBus.on("operation:rename:example", (payload) => withHook("operation:rename:example", mutators.value.active().operation.renameOperationExample, hooks)(payload));
|
|
85
|
+
eventBus.on("operation:upsert:parameter", (payload) => withHook("operation:upsert:parameter", mutators.value.active().operation.upsertOperationParameter, hooks)(payload));
|
|
86
|
+
eventBus.on("operation:update:extra-parameters", (payload) => withHook("operation:update:extra-parameters", mutators.value.active().operation.updateOperationExtraParameters, hooks)(payload));
|
|
87
|
+
eventBus.on("operation:delete:parameter", (payload) => withHook("operation:delete:parameter", mutators.value.active().operation.deleteOperationParameter, hooks)(payload));
|
|
88
|
+
eventBus.on("operation:delete-all:parameters", (payload) => withHook("operation:delete-all:parameters", mutators.value.active().operation.deleteAllOperationParameters, hooks)(payload));
|
|
89
|
+
eventBus.on("operation:update:extension", (payload) => withHook("operation:update:extension", mutators.value.active().operation.updateOperationExtension, hooks)(payload));
|
|
90
|
+
eventBus.on("operation:update:requestBody:contentType", (payload) => withHook("operation:update:requestBody:contentType", mutators.value.active().operation.updateOperationRequestBodyContentType, hooks)(payload));
|
|
91
|
+
eventBus.on("operation:update:requestBody:value", (payload) => withHook("operation:update:requestBody:value", mutators.value.active().operation.updateOperationRequestBodyExample, hooks)(payload));
|
|
92
|
+
eventBus.on("operation:update:requestBody:formValue", (payload) => withHook("operation:update:requestBody:formValue", mutators.value.active().operation.updateOperationRequestBodyFormValue, hooks)(payload));
|
|
93
|
+
eventBus.on("operation:reload:history", (payload) => withHook("operation:reload:history", mutators.value.active().operation.reloadOperationHistory, hooks)(payload));
|
|
94
|
+
eventBus.on("tag:create:tag", (payload) => withHook("tag:create:tag", mutators.value.active().tag.createTag, hooks)(payload));
|
|
95
|
+
eventBus.on("tag:edit:tag", (payload) => withHook("tag:edit:tag", mutators.value.active().tag.editTag, hooks)(payload));
|
|
96
|
+
eventBus.on("tag:delete:tag", (payload) => withHook("tag:delete:tag", mutators.value.active().tag.deleteTag, hooks)(payload));
|
|
97
|
+
eventBus.on("tabs:add:tab", (payload) => withHook("tabs:add:tab", mutators.value.workspace().tabs.addTab, hooks)(payload));
|
|
98
|
+
eventBus.on("tabs:close:tab", (payload) => withHook("tabs:close:tab", mutators.value.workspace().tabs.closeTab, hooks)(payload));
|
|
99
|
+
eventBus.on("tabs:close:other-tabs", (payload) => withHook("tabs:close:other-tabs", mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload));
|
|
100
|
+
eventBus.on("tabs:focus:tab", (payload) => withHook("tabs:focus:tab", mutators.value.workspace().tabs.focusTab, hooks)(payload));
|
|
101
|
+
eventBus.on("tabs:focus:tab-last", (payload) => withHook("tabs:focus:tab-last", mutators.value.workspace().tabs.focusLastTab, hooks)(payload));
|
|
102
|
+
eventBus.on("tabs:navigate:previous", (payload) => withHook("tabs:navigate:previous", mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload));
|
|
103
|
+
eventBus.on("tabs:navigate:next", (payload) => withHook("tabs:navigate:next", mutators.value.workspace().tabs.navigateNextTab, hooks)(payload));
|
|
104
|
+
eventBus.on("tabs:update:tabs", (payload) => withHook("tabs:update:tabs", mutators.value.workspace().tabs.updateTabs, hooks)(payload));
|
|
105
|
+
eventBus.on("hooks:on:request:complete", (payload) => withHook("hooks:on:request:complete", mutators.value.active().operation.addResponseToHistory, hooks)(payload));
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/v2/helpers/handle-hotkeys.ts
|
|
109
|
+
/** Default hotkeys available in most contexts */
|
|
110
|
+
var DEFAULT_HOTKEYS = {
|
|
111
|
+
Enter: {
|
|
112
|
+
event: "operation:send:request:hotkey",
|
|
113
|
+
modifiers: ["default"]
|
|
114
|
+
},
|
|
115
|
+
b: {
|
|
116
|
+
event: "ui:toggle:sidebar",
|
|
117
|
+
modifiers: ["default"]
|
|
118
|
+
},
|
|
119
|
+
k: {
|
|
120
|
+
event: "ui:open:command-palette",
|
|
121
|
+
modifiers: ["default"]
|
|
122
|
+
},
|
|
123
|
+
l: {
|
|
124
|
+
event: "ui:focus:address-bar",
|
|
125
|
+
modifiers: ["default"]
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
/** Hotkey map by layout, we can allow the user to override this later */
|
|
129
|
+
var HOTKEYS = {
|
|
130
|
+
web: DEFAULT_HOTKEYS,
|
|
131
|
+
modal: {
|
|
132
|
+
...DEFAULT_HOTKEYS,
|
|
133
|
+
Escape: {
|
|
134
|
+
event: "ui:close:client-modal",
|
|
135
|
+
modifiers: []
|
|
136
|
+
},
|
|
137
|
+
l: {
|
|
138
|
+
event: "ui:focus:send-button",
|
|
139
|
+
modifiers: ["default"]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
desktop: {
|
|
143
|
+
...DEFAULT_HOTKEYS,
|
|
144
|
+
f: {
|
|
145
|
+
event: "ui:focus:search",
|
|
146
|
+
modifiers: ["default"]
|
|
147
|
+
},
|
|
148
|
+
n: {
|
|
149
|
+
event: "ui:open:command-palette",
|
|
150
|
+
modifiers: ["default"]
|
|
151
|
+
},
|
|
152
|
+
t: {
|
|
153
|
+
event: "tabs:add:tab",
|
|
154
|
+
modifiers: ["default"]
|
|
155
|
+
},
|
|
156
|
+
w: {
|
|
157
|
+
event: "tabs:close:tab",
|
|
158
|
+
modifiers: ["default"]
|
|
159
|
+
},
|
|
160
|
+
ArrowLeft: {
|
|
161
|
+
event: "tabs:navigate:previous",
|
|
162
|
+
modifiers: ["default", "altKey"]
|
|
163
|
+
},
|
|
164
|
+
ArrowRight: {
|
|
165
|
+
event: "tabs:navigate:next",
|
|
166
|
+
modifiers: ["default", "altKey"]
|
|
167
|
+
},
|
|
168
|
+
1: {
|
|
169
|
+
event: "tabs:focus:tab",
|
|
170
|
+
modifiers: ["default"]
|
|
171
|
+
},
|
|
172
|
+
2: {
|
|
173
|
+
event: "tabs:focus:tab",
|
|
174
|
+
modifiers: ["default"]
|
|
175
|
+
},
|
|
176
|
+
3: {
|
|
177
|
+
event: "tabs:focus:tab",
|
|
178
|
+
modifiers: ["default"]
|
|
179
|
+
},
|
|
180
|
+
4: {
|
|
181
|
+
event: "tabs:focus:tab",
|
|
182
|
+
modifiers: ["default"]
|
|
183
|
+
},
|
|
184
|
+
5: {
|
|
185
|
+
event: "tabs:focus:tab",
|
|
186
|
+
modifiers: ["default"]
|
|
187
|
+
},
|
|
188
|
+
6: {
|
|
189
|
+
event: "tabs:focus:tab",
|
|
190
|
+
modifiers: ["default"]
|
|
191
|
+
},
|
|
192
|
+
7: {
|
|
193
|
+
event: "tabs:focus:tab",
|
|
194
|
+
modifiers: ["default"]
|
|
195
|
+
},
|
|
196
|
+
8: {
|
|
197
|
+
event: "tabs:focus:tab",
|
|
198
|
+
modifiers: ["default"]
|
|
199
|
+
},
|
|
200
|
+
9: {
|
|
201
|
+
event: "tabs:focus:tab-last",
|
|
202
|
+
modifiers: ["default"]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
/** Keys that should work in input fields when the modifier is pressed */
|
|
207
|
+
var INPUT_ALLOWED_KEYS = new Set([
|
|
208
|
+
"Escape",
|
|
209
|
+
"ArrowDown",
|
|
210
|
+
"ArrowUp",
|
|
211
|
+
"Enter"
|
|
212
|
+
]);
|
|
213
|
+
/**
|
|
214
|
+
* Checks if all required modifiers are pressed.
|
|
215
|
+
* Resolves 'default' to metaKey (macOS) or ctrlKey (Windows/Linux).
|
|
216
|
+
*/
|
|
217
|
+
var areModifiersPressed = (event, modifiers) => modifiers.length > 0 && modifiers.map((modifier) => modifier === "default" ? isMacOS() ? "metaKey" : "ctrlKey" : modifier).every((key) => event[key] === true);
|
|
218
|
+
/**
|
|
219
|
+
* Determines if the event target is an editable element where hotkeys should be blocked.
|
|
220
|
+
* Returns true if we should block the hotkey, false otherwise.
|
|
221
|
+
*/
|
|
222
|
+
var isEditableElement = (event, key) => {
|
|
223
|
+
if (!(event.target instanceof HTMLElement)) return false;
|
|
224
|
+
const target = event.target;
|
|
225
|
+
if (target.tagName === "INPUT") return !INPUT_ALLOWED_KEYS.has(key);
|
|
226
|
+
return target.tagName === "TEXTAREA" || target.contentEditable === "true" || target.hasAttribute("contenteditable");
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Handles global keyboard shortcuts.
|
|
230
|
+
* Checks modifier keys and input context before emitting events.
|
|
231
|
+
*
|
|
232
|
+
* @param event - the keyboard event
|
|
233
|
+
* @param eventBus - event bus for emitting hotkey actions
|
|
234
|
+
* @param layout - client layout
|
|
235
|
+
*/
|
|
236
|
+
var handleHotkeys = (event, eventBus, layout) => {
|
|
237
|
+
/** Special case for space */
|
|
238
|
+
const key = event.key === " " ? "Space" : event.key;
|
|
239
|
+
/** Get the discriminated hotkey event with payload */
|
|
240
|
+
const hotkeyEvent = HOTKEYS[layout][key];
|
|
241
|
+
if (!hotkeyEvent) return;
|
|
242
|
+
const payload = { event };
|
|
243
|
+
if (key === "Escape") {
|
|
244
|
+
eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true });
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (areModifiersPressed(event, hotkeyEvent.modifiers)) {
|
|
248
|
+
eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true });
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (hotkeyEvent.modifiers.length > 0) return;
|
|
252
|
+
if (!isEditableElement(event, key)) eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true });
|
|
253
|
+
};
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/v2/hooks/use-global-hot-keys.ts
|
|
256
|
+
/**
|
|
257
|
+
* Global hotkey handler for the app (web + desktop)
|
|
258
|
+
*
|
|
259
|
+
* @param eventBus - workspace event bus
|
|
260
|
+
* @param layout - client layout
|
|
261
|
+
* @param disableListeners - whether to disable the listeners
|
|
262
|
+
*/
|
|
263
|
+
var useGlobalHotKeys = (eventBus, layout, disableListeners) => {
|
|
264
|
+
const handleKeyDown = (ev) => {
|
|
265
|
+
if (toValue(disableListeners)) return;
|
|
266
|
+
handleHotkeys(ev, eventBus, layout);
|
|
267
|
+
};
|
|
268
|
+
onMounted(() => window.addEventListener("keydown", handleKeyDown));
|
|
269
|
+
onBeforeUnmount(() => window.removeEventListener("keydown", handleKeyDown));
|
|
270
|
+
};
|
|
271
|
+
//#endregion
|
|
272
|
+
export { initializeWorkspaceEventHandlers as n, useGlobalHotKeys as t };
|
|
273
|
+
|
|
274
|
+
//# sourceMappingURL=use-global-hot-keys-D8Ai8Qbm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-global-hot-keys-D8Ai8Qbm.js","names":[],"sources":["../src/v2/workspace-events.ts","../src/v2/helpers/handle-hotkeys.ts","../src/v2/hooks/use-global-hot-keys.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { ApiReferenceEvents, CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { generateClientMutators } from '@scalar/workspace-store/mutators'\nimport { type Ref, computed } from 'vue'\n\ntype Hook<T extends keyof ApiReferenceEvents> = Partial<{\n onBeforeExecute: (\n payload: ApiReferenceEvents[T],\n ) => void | Promise<void> | ApiReferenceEvents[T] | Promise<ApiReferenceEvents[T]>\n onAfterExecute: (payload: ApiReferenceEvents[T]) => void | Promise<void>\n}>\n\ntype Hooks = {\n [key in keyof ApiReferenceEvents]?: Hook<key>\n}\n\n/**\n * Wraps a given function with optional before/after execution hooks for a specific event.\n * - Calls onBeforeExecute hook before executing the main function.\n * - Calls onAfterExecute hook after executing the main function.\n *\n * @template T The event key from ApiReferenceEvents\n * @param event The event name\n * @param fn The main function to execute\n * @param hooks The hooks object containing before/after hooks for events\n * @returns An async function that runs hooks around the main function\n */\nconst withHook = <T extends keyof ApiReferenceEvents>(\n event: T,\n fn: (args: ApiReferenceEvents[T]) => unknown | Promise<unknown>,\n hooks: Hooks,\n) => {\n return async (args: ApiReferenceEvents[T]) => {\n // Call the before execution hook for this event, if any\n const result = (await hooks[event]?.onBeforeExecute?.(args)) ?? args\n // Execute the main function\n await fn(result)\n // Call the after execution hook for this event, if any\n await hooks[event]?.onAfterExecute?.(result)\n return result\n }\n}\n\n/**\n * Initializes all Workspace Event Handlers by subscribing eventBus listeners\n * to each relevant mutator operation. Hooks are used for before/after execution.\n *\n * @param eventBus The WorkspaceEventBus to subscribe to\n * @param store The WorkspaceStore instance\n * @param hooks Object containing optional before/after hooks for each event\n */\nexport function initializeWorkspaceEventHandlers({\n eventBus,\n store,\n hooks,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n}) {\n // Generate all client mutators for the current workspace store\n const mutators = computed(() => generateClientMutators(store.value))\n\n /**\n * Returns the appropriate mutators depending on the collectionType.\n * If collectionType is 'document', gets the active document mutator,\n * otherwise, gets the workspace mutator.\n */\n const getMutators = ({ collectionType }: CollectionType) => {\n if (collectionType === 'document') {\n return mutators.value.active()\n }\n return mutators.value.workspace()\n }\n\n //------------------------------------------------------------------------------------\n // Workspace Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('workspace:update:active-proxy', (payload) =>\n withHook('workspace:update:active-proxy', mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload),\n )\n eventBus.on('workspace:update:color-mode', (payload) =>\n withHook('workspace:update:color-mode', mutators.value.workspace().workspace.updateColorMode, hooks)(payload),\n )\n eventBus.on('workspace:update:theme', (payload) =>\n withHook('workspace:update:theme', mutators.value.workspace().workspace.updateTheme, hooks)(payload),\n )\n eventBus.on('workspace:update:selected-client', (payload) =>\n withHook(\n 'workspace:update:selected-client',\n mutators.value.workspace().workspace.updateSelectedClient,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:active-environment', (payload) =>\n withHook(\n 'workspace:update:active-environment',\n mutators.value.workspace().workspace.updateActiveEnvironment,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Document Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('document:update:icon', (payload) =>\n withHook('document:update:icon', mutators.value.active().document.updateDocumentIcon, hooks)(payload),\n )\n eventBus.on('document:update:info', (payload) =>\n withHook('document:update:info', mutators.value.active().document.updateDocumentInfo, hooks)(payload),\n )\n eventBus.on('document:update:watch-mode', (payload) =>\n withHook('document:update:watch-mode', mutators.value.active().document.updateWatchMode, hooks)(payload),\n )\n eventBus.on('document:create:empty-document', (payload) =>\n withHook('document:create:empty-document', mutators.value.active().document.createEmptyDocument, hooks)(payload),\n )\n eventBus.on('document:delete:document', (payload) =>\n withHook('document:delete:document', mutators.value.active().document.deleteDocument, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Environment Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('environment:upsert:environment', (payload) =>\n withHook('environment:upsert:environment', getMutators(payload).environment.upsertEnvironment, hooks)(payload),\n )\n eventBus.on('environment:delete:environment', (payload) =>\n withHook('environment:delete:environment', getMutators(payload).environment.deleteEnvironment, hooks)(payload),\n )\n eventBus.on('environment:upsert:environment-variable', (payload) =>\n withHook(\n 'environment:upsert:environment-variable',\n getMutators(payload).environment.upsertEnvironmentVariable,\n hooks,\n )(payload),\n )\n eventBus.on('environment:delete:environment-variable', (payload) =>\n withHook(\n 'environment:delete:environment-variable',\n getMutators(payload).environment.deleteEnvironmentVariable,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Cookie Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('cookie:upsert:cookie', async (payload) => {\n await withHook('cookie:upsert:cookie', getMutators(payload).cookie.upsertCookie, hooks)(payload)\n })\n eventBus.on('cookie:delete:cookie', async (payload) => {\n await withHook('cookie:delete:cookie', getMutators(payload).cookie.deleteCookie, hooks)(payload)\n })\n\n //------------------------------------------------------------------------------------\n // Auth Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('auth:delete:security-scheme', (payload) =>\n withHook('auth:delete:security-scheme', mutators.value.active().auth.deleteSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:active-index', (payload) =>\n withHook('auth:update:active-index', mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload),\n )\n eventBus.on('auth:update:security-scheme', (payload) =>\n withHook('auth:update:security-scheme', mutators.value.active().auth.updateSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:selected-scopes', (payload) =>\n withHook('auth:update:selected-scopes', mutators.value.active().auth.updateSelectedScopes, hooks)(payload),\n )\n eventBus.on('auth:update:selected-security-schemes', (payload) =>\n withHook(\n 'auth:update:selected-security-schemes',\n mutators.value.active().auth.updateSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:selected-security-schemes', (payload) =>\n withHook(\n 'auth:clear:selected-security-schemes',\n mutators.value.active().auth.clearSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:update:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:update:security-scheme-secrets',\n mutators.value.active().auth.updateSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:clear:security-scheme-secrets',\n mutators.value.active().auth.clearSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Server Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('server:initialize:servers', (payload) =>\n withHook('server:initialize:servers', mutators.value.active().server.initializeServers, hooks)(payload),\n )\n eventBus.on('server:add:server', (payload) =>\n withHook('server:add:server', mutators.value.active().server.addServer, hooks)(payload),\n )\n eventBus.on('server:update:server', (payload) =>\n withHook('server:update:server', mutators.value.active().server.updateServer, hooks)(payload),\n )\n eventBus.on('server:delete:server', (payload) =>\n withHook('server:delete:server', mutators.value.active().server.deleteServer, hooks)(payload),\n )\n eventBus.on('server:clear:servers', (payload) =>\n withHook('server:clear:servers', mutators.value.active().server.clearServers, hooks)(payload),\n )\n eventBus.on('server:update:variables', (payload) =>\n withHook('server:update:variables', mutators.value.active().server.updateServerVariables, hooks)(payload),\n )\n eventBus.on('server:update:selected', (payload) =>\n withHook('server:update:selected', mutators.value.active().server.updateSelectedServer, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:create:operation', (payload) =>\n withHook('operation:create:operation', mutators.value.active().operation.createOperation, hooks)(payload),\n )\n eventBus.on('operation:update:pathMethod', (payload) =>\n withHook(\n 'operation:update:pathMethod',\n mutators.value.active().operation.updateOperationPathMethod,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:meta', (payload) =>\n withHook('operation:update:meta', mutators.value.active().operation.updateOperationMeta, hooks)(payload),\n )\n eventBus.on('operation:delete:operation', (payload) =>\n withHook('operation:delete:operation', mutators.value.active().operation.deleteOperation, hooks)(payload),\n )\n eventBus.on('operation:create:draft-example', (payload) =>\n withHook(\n 'operation:create:draft-example',\n mutators.value.active().operation.createOperationDraftExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:example', (payload) =>\n withHook('operation:delete:example', mutators.value.active().operation.deleteOperationExample, hooks)(payload),\n )\n eventBus.on('operation:rename:example', (payload) =>\n withHook('operation:rename:example', mutators.value.active().operation.renameOperationExample, hooks)(payload),\n )\n eventBus.on('operation:upsert:parameter', (payload) =>\n withHook('operation:upsert:parameter', mutators.value.active().operation.upsertOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:update:extra-parameters', (payload) =>\n withHook(\n 'operation:update:extra-parameters',\n mutators.value.active().operation.updateOperationExtraParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:parameter', (payload) =>\n withHook('operation:delete:parameter', mutators.value.active().operation.deleteOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:delete-all:parameters', (payload) =>\n withHook(\n 'operation:delete-all:parameters',\n mutators.value.active().operation.deleteAllOperationParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:extension', (payload) =>\n withHook('operation:update:extension', mutators.value.active().operation.updateOperationExtension, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:update:requestBody:contentType', (payload) =>\n withHook(\n 'operation:update:requestBody:contentType',\n mutators.value.active().operation.updateOperationRequestBodyContentType,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:value', (payload) =>\n withHook(\n 'operation:update:requestBody:value',\n mutators.value.active().operation.updateOperationRequestBodyExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:formValue', (payload) =>\n withHook(\n 'operation:update:requestBody:formValue',\n mutators.value.active().operation.updateOperationRequestBodyFormValue,\n hooks,\n )(payload),\n )\n eventBus.on('operation:reload:history', (payload) =>\n withHook('operation:reload:history', mutators.value.active().operation.reloadOperationHistory, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tag Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tag:create:tag', (payload) =>\n withHook('tag:create:tag', mutators.value.active().tag.createTag, hooks)(payload),\n )\n eventBus.on('tag:edit:tag', (payload) =>\n withHook('tag:edit:tag', mutators.value.active().tag.editTag, hooks)(payload),\n )\n eventBus.on('tag:delete:tag', (payload) =>\n withHook('tag:delete:tag', mutators.value.active().tag.deleteTag, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:add:tab', (payload) =>\n withHook('tabs:add:tab', mutators.value.workspace().tabs.addTab, hooks)(payload),\n )\n eventBus.on('tabs:close:tab', (payload) =>\n withHook('tabs:close:tab', mutators.value.workspace().tabs.closeTab, hooks)(payload),\n )\n eventBus.on('tabs:close:other-tabs', (payload) =>\n withHook('tabs:close:other-tabs', mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab', (payload) =>\n withHook('tabs:focus:tab', mutators.value.workspace().tabs.focusTab, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab-last', (payload) =>\n withHook('tabs:focus:tab-last', mutators.value.workspace().tabs.focusLastTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:previous', (payload) =>\n withHook('tabs:navigate:previous', mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:next', (payload) =>\n withHook('tabs:navigate:next', mutators.value.workspace().tabs.navigateNextTab, hooks)(payload),\n )\n eventBus.on('tabs:update:tabs', (payload) =>\n withHook('tabs:update:tabs', mutators.value.workspace().tabs.updateTabs, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Hooks Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('hooks:on:request:complete', (payload) =>\n withHook('hooks:on:request:complete', mutators.value.active().operation.addResponseToHistory, hooks)(payload),\n )\n}\n","import { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport type { ApiReferenceEvents, WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport type { ClientLayout } from '@/v2/types/layout'\n\ntype HotKeyModifiers = ('altKey' | 'ctrlKey' | 'shiftKey' | 'metaKey' | 'default')[]\n\n/** Hotkey configuration */\ntype HotKeyConfig = Record<string | number, { event: keyof ApiReferenceEvents; modifiers: HotKeyModifiers }>\n\n/** Default hotkeys available in most contexts */\nconst DEFAULT_HOTKEYS: HotKeyConfig = {\n Enter: { event: 'operation:send:request:hotkey', modifiers: ['default'] },\n b: { event: 'ui:toggle:sidebar', modifiers: ['default'] },\n k: { event: 'ui:open:command-palette', modifiers: ['default'] },\n l: { event: 'ui:focus:address-bar', modifiers: ['default'] },\n}\n\n/** Hotkey map by layout, we can allow the user to override this later */\nconst HOTKEYS: Record<ClientLayout, HotKeyConfig> = {\n web: DEFAULT_HOTKEYS,\n\n modal: {\n ...DEFAULT_HOTKEYS,\n Escape: { event: 'ui:close:client-modal', modifiers: [] },\n l: { event: 'ui:focus:send-button', modifiers: ['default'] },\n },\n\n desktop: {\n ...DEFAULT_HOTKEYS,\n f: { event: 'ui:focus:search', modifiers: ['default'] },\n n: { event: 'ui:open:command-palette', modifiers: ['default'] },\n t: { event: 'tabs:add:tab', modifiers: ['default'] },\n w: { event: 'tabs:close:tab', modifiers: ['default'] },\n ArrowLeft: { event: 'tabs:navigate:previous', modifiers: ['default', 'altKey'] },\n ArrowRight: { event: 'tabs:navigate:next', modifiers: ['default', 'altKey'] },\n 1: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 2: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 3: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 4: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 5: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 6: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 7: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 8: { event: 'tabs:focus:tab', modifiers: ['default'] },\n 9: { event: 'tabs:focus:tab-last', modifiers: ['default'] },\n },\n}\n\n/** Keys that should work in input fields when the modifier is pressed */\nconst INPUT_ALLOWED_KEYS = new Set(['Escape', 'ArrowDown', 'ArrowUp', 'Enter'])\n\n/**\n * Checks if all required modifiers are pressed.\n * Resolves 'default' to metaKey (macOS) or ctrlKey (Windows/Linux).\n */\nconst areModifiersPressed = (event: KeyboardEvent, modifiers: HotKeyModifiers): boolean =>\n modifiers.length > 0 &&\n modifiers\n .map((modifier) => (modifier === 'default' ? (isMacOS() ? 'metaKey' : 'ctrlKey') : modifier))\n .every((key) => event[key] === true)\n\n/**\n * Determines if the event target is an editable element where hotkeys should be blocked.\n * Returns true if we should block the hotkey, false otherwise.\n */\nconst isEditableElement = (event: KeyboardEvent, key: string): boolean => {\n if (!(event.target instanceof HTMLElement)) {\n return false\n }\n\n const target = event.target\n\n // Allow certain functional keys in INPUT fields\n if (target.tagName === 'INPUT') {\n return !INPUT_ALLOWED_KEYS.has(key)\n }\n\n // Block all hotkeys in textareas and contenteditable elements\n return target.tagName === 'TEXTAREA' || target.contentEditable === 'true' || target.hasAttribute('contenteditable')\n}\n\n/**\n * Handles global keyboard shortcuts.\n * Checks modifier keys and input context before emitting events.\n *\n * @param event - the keyboard event\n * @param eventBus - event bus for emitting hotkey actions\n * @param layout - client layout\n */\nexport const handleHotkeys = (event: KeyboardEvent, eventBus: WorkspaceEventBus, layout: ClientLayout): void => {\n /** Special case for space */\n const key = event.key === ' ' ? 'Space' : event.key\n /** Get the discriminated hotkey event with payload */\n const hotkeyEvent = HOTKEYS[layout][key]\n\n if (!hotkeyEvent) {\n return\n }\n\n // Default to sending the keyboard event as the payload\n const payload = { event }\n\n // Escape always fires, regardless of context\n if (key === 'Escape') {\n eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true })\n return\n }\n\n // If modifiers are pressed, fire the hotkey (even in input fields)\n if (areModifiersPressed(event, hotkeyEvent.modifiers)) {\n eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true })\n return\n }\n\n // If modifiers are required but missing, do not fire the hotkey.\n if (hotkeyEvent.modifiers.length > 0) {\n return\n }\n\n // Without modifiers, only fire if not in an editable element\n if (!isEditableElement(event, key)) {\n eventBus.emit(hotkeyEvent.event, payload, { skipUnpackProxy: true })\n }\n}\n","import type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { type MaybeRefOrGetter, onBeforeUnmount, onMounted, toValue } from 'vue'\n\nimport { handleHotkeys } from '@/v2/helpers/handle-hotkeys'\nimport type { ClientLayout } from '@/v2/types/layout'\n\n/**\n * Global hotkey handler for the app (web + desktop)\n *\n * @param eventBus - workspace event bus\n * @param layout - client layout\n * @param disableListeners - whether to disable the listeners\n */\nexport const useGlobalHotKeys = (\n eventBus: WorkspaceEventBus,\n layout: ClientLayout,\n disableListeners?: MaybeRefOrGetter<boolean>,\n): void => {\n const handleKeyDown = (ev: KeyboardEvent) => {\n if (toValue(disableListeners)) {\n return\n }\n\n handleHotkeys(ev, eventBus, layout)\n }\n\n // Enable the listeners\n onMounted(() => window.addEventListener('keydown', handleKeyDown))\n onBeforeUnmount(() => window.removeEventListener('keydown', handleKeyDown))\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2BA,IAAM,YACJ,OACA,IACA,UACG;AACH,QAAO,OAAO,SAAgC;EAE5C,MAAM,SAAU,MAAM,MAAM,QAAQ,kBAAkB,KAAK,IAAK;AAEhE,QAAM,GAAG,OAAO;AAEhB,QAAM,MAAM,QAAQ,iBAAiB,OAAO;AAC5C,SAAO;;;;;;;;;;;AAYX,SAAgB,iCAAiC,EAC/C,UACA,OACA,SAKC;CAED,MAAM,WAAW,eAAe,uBAAuB,MAAM,MAAM,CAAC;;;;;;CAOpE,MAAM,eAAe,EAAE,qBAAqC;AAC1D,MAAI,mBAAmB,WACrB,QAAO,SAAS,MAAM,QAAQ;AAEhC,SAAO,SAAS,MAAM,WAAW;;AAMnC,UAAS,GAAG,kCAAkC,YAC5C,SAAS,iCAAiC,SAAS,MAAM,WAAW,CAAC,UAAU,mBAAmB,MAAM,CAAC,QAAQ,CAClH;AACD,UAAS,GAAG,gCAAgC,YAC1C,SAAS,+BAA+B,SAAS,MAAM,WAAW,CAAC,UAAU,iBAAiB,MAAM,CAAC,QAAQ,CAC9G;AACD,UAAS,GAAG,2BAA2B,YACrC,SAAS,0BAA0B,SAAS,MAAM,WAAW,CAAC,UAAU,aAAa,MAAM,CAAC,QAAQ,CACrG;AACD,UAAS,GAAG,qCAAqC,YAC/C,SACE,oCACA,SAAS,MAAM,WAAW,CAAC,UAAU,sBACrC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,wCAAwC,YAClD,SACE,uCACA,SAAS,MAAM,WAAW,CAAC,UAAU,yBACrC,MACD,CAAC,QAAQ,CACX;AAKD,UAAS,GAAG,yBAAyB,YACnC,SAAS,wBAAwB,SAAS,MAAM,QAAQ,CAAC,SAAS,oBAAoB,MAAM,CAAC,QAAQ,CACtG;AACD,UAAS,GAAG,yBAAyB,YACnC,SAAS,wBAAwB,SAAS,MAAM,QAAQ,CAAC,SAAS,oBAAoB,MAAM,CAAC,QAAQ,CACtG;AACD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,SAAS,iBAAiB,MAAM,CAAC,QAAQ,CACzG;AACD,UAAS,GAAG,mCAAmC,YAC7C,SAAS,kCAAkC,SAAS,MAAM,QAAQ,CAAC,SAAS,qBAAqB,MAAM,CAAC,QAAQ,CACjH;AACD,UAAS,GAAG,6BAA6B,YACvC,SAAS,4BAA4B,SAAS,MAAM,QAAQ,CAAC,SAAS,gBAAgB,MAAM,CAAC,QAAQ,CACtG;AAKD,UAAS,GAAG,mCAAmC,YAC7C,SAAS,kCAAkC,YAAY,QAAQ,CAAC,YAAY,mBAAmB,MAAM,CAAC,QAAQ,CAC/G;AACD,UAAS,GAAG,mCAAmC,YAC7C,SAAS,kCAAkC,YAAY,QAAQ,CAAC,YAAY,mBAAmB,MAAM,CAAC,QAAQ,CAC/G;AACD,UAAS,GAAG,4CAA4C,YACtD,SACE,2CACA,YAAY,QAAQ,CAAC,YAAY,2BACjC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,4CAA4C,YACtD,SACE,2CACA,YAAY,QAAQ,CAAC,YAAY,2BACjC,MACD,CAAC,QAAQ,CACX;AAKD,UAAS,GAAG,wBAAwB,OAAO,YAAY;AACrD,QAAM,SAAS,wBAAwB,YAAY,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ;GAChG;AACF,UAAS,GAAG,wBAAwB,OAAO,YAAY;AACrD,QAAM,SAAS,wBAAwB,YAAY,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ;GAChG;AAKF,UAAS,GAAG,gCAAgC,YAC1C,SAAS,+BAA+B,SAAS,MAAM,QAAQ,CAAC,KAAK,sBAAsB,MAAM,CAAC,QAAQ,CAC3G;AACD,UAAS,GAAG,6BAA6B,YACvC,SAAS,4BAA4B,SAAS,MAAM,QAAQ,CAAC,KAAK,uBAAuB,MAAM,CAAC,QAAQ,CACzG;AACD,UAAS,GAAG,gCAAgC,YAC1C,SAAS,+BAA+B,SAAS,MAAM,QAAQ,CAAC,KAAK,sBAAsB,MAAM,CAAC,QAAQ,CAC3G;AACD,UAAS,GAAG,gCAAgC,YAC1C,SAAS,+BAA+B,SAAS,MAAM,QAAQ,CAAC,KAAK,sBAAsB,MAAM,CAAC,QAAQ,CAC3G;AACD,UAAS,GAAG,0CAA0C,YACpD,SACE,yCACA,SAAS,MAAM,QAAQ,CAAC,KAAK,+BAC7B,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,yCAAyC,YACnD,SACE,wCACA,SAAS,MAAM,QAAQ,CAAC,KAAK,8BAC7B,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,wCAAwC,YAClD,SACE,uCACA,SAAS,MAAM,QAAQ,CAAC,KAAK,6BAC7B,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,uCAAuC,YACjD,SACE,sCACA,SAAS,MAAM,QAAQ,CAAC,KAAK,4BAC7B,MACD,CAAC,QAAQ,CACX;AAKD,UAAS,GAAG,8BAA8B,YACxC,SAAS,6BAA6B,SAAS,MAAM,QAAQ,CAAC,OAAO,mBAAmB,MAAM,CAAC,QAAQ,CACxG;AACD,UAAS,GAAG,sBAAsB,YAChC,SAAS,qBAAqB,SAAS,MAAM,QAAQ,CAAC,OAAO,WAAW,MAAM,CAAC,QAAQ,CACxF;AACD,UAAS,GAAG,yBAAyB,YACnC,SAAS,wBAAwB,SAAS,MAAM,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ,CAC9F;AACD,UAAS,GAAG,yBAAyB,YACnC,SAAS,wBAAwB,SAAS,MAAM,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ,CAC9F;AACD,UAAS,GAAG,yBAAyB,YACnC,SAAS,wBAAwB,SAAS,MAAM,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ,CAC9F;AACD,UAAS,GAAG,4BAA4B,YACtC,SAAS,2BAA2B,SAAS,MAAM,QAAQ,CAAC,OAAO,uBAAuB,MAAM,CAAC,QAAQ,CAC1G;AACD,UAAS,GAAG,2BAA2B,YACrC,SAAS,0BAA0B,SAAS,MAAM,QAAQ,CAAC,OAAO,sBAAsB,MAAM,CAAC,QAAQ,CACxG;AAKD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,UAAU,iBAAiB,MAAM,CAAC,QAAQ,CAC1G;AACD,UAAS,GAAG,gCAAgC,YAC1C,SACE,+BACA,SAAS,MAAM,QAAQ,CAAC,UAAU,2BAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,0BAA0B,YACpC,SAAS,yBAAyB,SAAS,MAAM,QAAQ,CAAC,UAAU,qBAAqB,MAAM,CAAC,QAAQ,CACzG;AACD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,UAAU,iBAAiB,MAAM,CAAC,QAAQ,CAC1G;AACD,UAAS,GAAG,mCAAmC,YAC7C,SACE,kCACA,SAAS,MAAM,QAAQ,CAAC,UAAU,6BAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,6BAA6B,YACvC,SAAS,4BAA4B,SAAS,MAAM,QAAQ,CAAC,UAAU,wBAAwB,MAAM,CAAC,QAAQ,CAC/G;AACD,UAAS,GAAG,6BAA6B,YACvC,SAAS,4BAA4B,SAAS,MAAM,QAAQ,CAAC,UAAU,wBAAwB,MAAM,CAAC,QAAQ,CAC/G;AACD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,UAAU,0BAA0B,MAAM,CAAC,QAAQ,CACnH;AACD,UAAS,GAAG,sCAAsC,YAChD,SACE,qCACA,SAAS,MAAM,QAAQ,CAAC,UAAU,gCAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,UAAU,0BAA0B,MAAM,CAAC,QAAQ,CACnH;AACD,UAAS,GAAG,oCAAoC,YAC9C,SACE,mCACA,SAAS,MAAM,QAAQ,CAAC,UAAU,8BAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,+BAA+B,YACzC,SAAS,8BAA8B,SAAS,MAAM,QAAQ,CAAC,UAAU,0BAA0B,MAAM,CAAC,QAAQ,CACnH;AAKD,UAAS,GAAG,6CAA6C,YACvD,SACE,4CACA,SAAS,MAAM,QAAQ,CAAC,UAAU,uCAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,uCAAuC,YACjD,SACE,sCACA,SAAS,MAAM,QAAQ,CAAC,UAAU,mCAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,2CAA2C,YACrD,SACE,0CACA,SAAS,MAAM,QAAQ,CAAC,UAAU,qCAClC,MACD,CAAC,QAAQ,CACX;AACD,UAAS,GAAG,6BAA6B,YACvC,SAAS,4BAA4B,SAAS,MAAM,QAAQ,CAAC,UAAU,wBAAwB,MAAM,CAAC,QAAQ,CAC/G;AAKD,UAAS,GAAG,mBAAmB,YAC7B,SAAS,kBAAkB,SAAS,MAAM,QAAQ,CAAC,IAAI,WAAW,MAAM,CAAC,QAAQ,CAClF;AACD,UAAS,GAAG,iBAAiB,YAC3B,SAAS,gBAAgB,SAAS,MAAM,QAAQ,CAAC,IAAI,SAAS,MAAM,CAAC,QAAQ,CAC9E;AACD,UAAS,GAAG,mBAAmB,YAC7B,SAAS,kBAAkB,SAAS,MAAM,QAAQ,CAAC,IAAI,WAAW,MAAM,CAAC,QAAQ,CAClF;AAKD,UAAS,GAAG,iBAAiB,YAC3B,SAAS,gBAAgB,SAAS,MAAM,WAAW,CAAC,KAAK,QAAQ,MAAM,CAAC,QAAQ,CACjF;AACD,UAAS,GAAG,mBAAmB,YAC7B,SAAS,kBAAkB,SAAS,MAAM,WAAW,CAAC,KAAK,UAAU,MAAM,CAAC,QAAQ,CACrF;AACD,UAAS,GAAG,0BAA0B,YACpC,SAAS,yBAAyB,SAAS,MAAM,WAAW,CAAC,KAAK,gBAAgB,MAAM,CAAC,QAAQ,CAClG;AACD,UAAS,GAAG,mBAAmB,YAC7B,SAAS,kBAAkB,SAAS,MAAM,WAAW,CAAC,KAAK,UAAU,MAAM,CAAC,QAAQ,CACrF;AACD,UAAS,GAAG,wBAAwB,YAClC,SAAS,uBAAuB,SAAS,MAAM,WAAW,CAAC,KAAK,cAAc,MAAM,CAAC,QAAQ,CAC9F;AACD,UAAS,GAAG,2BAA2B,YACrC,SAAS,0BAA0B,SAAS,MAAM,WAAW,CAAC,KAAK,qBAAqB,MAAM,CAAC,QAAQ,CACxG;AACD,UAAS,GAAG,uBAAuB,YACjC,SAAS,sBAAsB,SAAS,MAAM,WAAW,CAAC,KAAK,iBAAiB,MAAM,CAAC,QAAQ,CAChG;AACD,UAAS,GAAG,qBAAqB,YAC/B,SAAS,oBAAoB,SAAS,MAAM,WAAW,CAAC,KAAK,YAAY,MAAM,CAAC,QAAQ,CACzF;AAKD,UAAS,GAAG,8BAA8B,YACxC,SAAS,6BAA6B,SAAS,MAAM,QAAQ,CAAC,UAAU,sBAAsB,MAAM,CAAC,QAAQ,CAC9G;;;;;ACvVH,IAAM,kBAAgC;CACpC,OAAO;EAAE,OAAO;EAAiC,WAAW,CAAC,UAAU;EAAE;CACzE,GAAG;EAAE,OAAO;EAAqB,WAAW,CAAC,UAAU;EAAE;CACzD,GAAG;EAAE,OAAO;EAA2B,WAAW,CAAC,UAAU;EAAE;CAC/D,GAAG;EAAE,OAAO;EAAwB,WAAW,CAAC,UAAU;EAAE;CAC7D;;AAGD,IAAM,UAA8C;CAClD,KAAK;CAEL,OAAO;EACL,GAAG;EACH,QAAQ;GAAE,OAAO;GAAyB,WAAW,EAAE;GAAE;EACzD,GAAG;GAAE,OAAO;GAAwB,WAAW,CAAC,UAAU;GAAE;EAC7D;CAED,SAAS;EACP,GAAG;EACH,GAAG;GAAE,OAAO;GAAmB,WAAW,CAAC,UAAU;GAAE;EACvD,GAAG;GAAE,OAAO;GAA2B,WAAW,CAAC,UAAU;GAAE;EAC/D,GAAG;GAAE,OAAO;GAAgB,WAAW,CAAC,UAAU;GAAE;EACpD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,WAAW;GAAE,OAAO;GAA0B,WAAW,CAAC,WAAW,SAAS;GAAE;EAChF,YAAY;GAAE,OAAO;GAAsB,WAAW,CAAC,WAAW,SAAS;GAAE;EAC7E,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAkB,WAAW,CAAC,UAAU;GAAE;EACtD,GAAG;GAAE,OAAO;GAAuB,WAAW,CAAC,UAAU;GAAE;EAC5D;CACF;;AAGD,IAAM,qBAAqB,IAAI,IAAI;CAAC;CAAU;CAAa;CAAW;CAAQ,CAAC;;;;;AAM/E,IAAM,uBAAuB,OAAsB,cACjD,UAAU,SAAS,KACnB,UACG,KAAK,aAAc,aAAa,YAAa,SAAS,GAAG,YAAY,YAAa,SAAU,CAC5F,OAAO,QAAQ,MAAM,SAAS,KAAK;;;;;AAMxC,IAAM,qBAAqB,OAAsB,QAAyB;AACxE,KAAI,EAAE,MAAM,kBAAkB,aAC5B,QAAO;CAGT,MAAM,SAAS,MAAM;AAGrB,KAAI,OAAO,YAAY,QACrB,QAAO,CAAC,mBAAmB,IAAI,IAAI;AAIrC,QAAO,OAAO,YAAY,cAAc,OAAO,oBAAoB,UAAU,OAAO,aAAa,kBAAkB;;;;;;;;;;AAWrH,IAAa,iBAAiB,OAAsB,UAA6B,WAA+B;;CAE9G,MAAM,MAAM,MAAM,QAAQ,MAAM,UAAU,MAAM;;CAEhD,MAAM,cAAc,QAAQ,QAAQ;AAEpC,KAAI,CAAC,YACH;CAIF,MAAM,UAAU,EAAE,OAAO;AAGzB,KAAI,QAAQ,UAAU;AACpB,WAAS,KAAK,YAAY,OAAO,SAAS,EAAE,iBAAiB,MAAM,CAAC;AACpE;;AAIF,KAAI,oBAAoB,OAAO,YAAY,UAAU,EAAE;AACrD,WAAS,KAAK,YAAY,OAAO,SAAS,EAAE,iBAAiB,MAAM,CAAC;AACpE;;AAIF,KAAI,YAAY,UAAU,SAAS,EACjC;AAIF,KAAI,CAAC,kBAAkB,OAAO,IAAI,CAChC,UAAS,KAAK,YAAY,OAAO,SAAS,EAAE,iBAAiB,MAAM,CAAC;;;;;;;;;;;AC5GxE,IAAa,oBACX,UACA,QACA,qBACS;CACT,MAAM,iBAAiB,OAAsB;AAC3C,MAAI,QAAQ,iBAAiB,CAC3B;AAGF,gBAAc,IAAI,UAAU,OAAO;;AAIrC,iBAAgB,OAAO,iBAAiB,WAAW,cAAc,CAAC;AAClE,uBAAsB,OAAO,oBAAoB,WAAW,cAAc,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { inject, reactive, readonly, ref } from "vue";
|
|
2
|
+
//#region src/hooks/useLayout.ts
|
|
3
|
+
var LAYOUT_SYMBOL = Symbol();
|
|
4
|
+
/**
|
|
5
|
+
* Get the current client layout
|
|
6
|
+
*
|
|
7
|
+
* @see {@link createApiClient}
|
|
8
|
+
*/
|
|
9
|
+
var useLayout = () => ({ layout: inject(LAYOUT_SYMBOL, "desktop") });
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/hooks/useSidebar.ts
|
|
12
|
+
/** Creates the sidebar state so that it can be unique across instances of the client */
|
|
13
|
+
var createSidebarState = ({ layout }) => {
|
|
14
|
+
return {
|
|
15
|
+
collapsedSidebarFolders: reactive({}),
|
|
16
|
+
isSidebarOpen: ref(layout !== "modal")
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
var SIDEBAR_SYMBOL = Symbol();
|
|
20
|
+
/** Handles any logic related to sidebar */
|
|
21
|
+
var useSidebar = () => {
|
|
22
|
+
const sidebarState = inject(SIDEBAR_SYMBOL);
|
|
23
|
+
if (!sidebarState) throw new Error("useSidebar must have injected SIDEBAR_SYMBOL");
|
|
24
|
+
const { collapsedSidebarFolders, isSidebarOpen } = sidebarState;
|
|
25
|
+
/** Open or close a sidebar folder directly */
|
|
26
|
+
const setCollapsedSidebarFolder = (uid, value) => collapsedSidebarFolders[uid] = value;
|
|
27
|
+
/** Toggle a sidebar folder open/closed */
|
|
28
|
+
const toggleSidebarFolder = (key) => collapsedSidebarFolders[key] = !collapsedSidebarFolders[key];
|
|
29
|
+
/** Set the sidebar open/closed */
|
|
30
|
+
const setSidebarOpen = (value) => isSidebarOpen.value = value;
|
|
31
|
+
/** Toggle the sidebar open/closed */
|
|
32
|
+
const toggleSidebarOpen = () => isSidebarOpen.value = !isSidebarOpen.value;
|
|
33
|
+
return {
|
|
34
|
+
collapsedSidebarFolders: readonly(collapsedSidebarFolders),
|
|
35
|
+
isSidebarOpen: readonly(isSidebarOpen),
|
|
36
|
+
setCollapsedSidebarFolder,
|
|
37
|
+
toggleSidebarFolder,
|
|
38
|
+
setSidebarOpen,
|
|
39
|
+
toggleSidebarOpen
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { useLayout as a, LAYOUT_SYMBOL as i, createSidebarState as n, useSidebar as r, SIDEBAR_SYMBOL as t };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=useSidebar-DLTwHDI-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidebar-DLTwHDI-.js","names":[],"sources":["../src/hooks/useLayout.ts","../src/hooks/useSidebar.ts"],"sourcesContent":["import { type InjectionKey, inject } from 'vue'\n\n/**\n * The layout of the client\n *\n * @default 'desktop'\n */\nexport type ClientLayout = 'modal' | 'web' | 'desktop'\nexport const LAYOUT_SYMBOL = Symbol() as InjectionKey<ClientLayout>\n\n/**\n * Get the current client layout\n *\n * @see {@link createApiClient}\n */\nexport const useLayout = () => ({\n layout: inject(LAYOUT_SYMBOL, 'desktop'),\n})\n","import { type InjectionKey, inject, reactive, readonly, ref } from 'vue'\n\nimport type { ClientLayout } from '@/hooks/useLayout'\n\ntype CollapsedSidebarFolders = Record<string, boolean>\n\n/** Creates the sidebar state so that it can be unique across instances of the client */\nexport const createSidebarState = ({ layout }: { layout: ClientLayout }) => {\n const collapsedSidebarFolders = reactive<CollapsedSidebarFolders>({})\n const isSidebarOpen = ref(layout !== 'modal')\n\n return {\n collapsedSidebarFolders,\n isSidebarOpen,\n }\n}\nexport const SIDEBAR_SYMBOL = Symbol() as InjectionKey<ReturnType<typeof createSidebarState>>\n\n/** Handles any logic related to sidebar */\nexport const useSidebar = () => {\n const sidebarState = inject(SIDEBAR_SYMBOL)\n if (!sidebarState) {\n throw new Error('useSidebar must have injected SIDEBAR_SYMBOL')\n }\n\n const { collapsedSidebarFolders, isSidebarOpen } = sidebarState\n\n /** Open or close a sidebar folder directly */\n const setCollapsedSidebarFolder = (uid: string, value: boolean) => (collapsedSidebarFolders[uid] = value)\n\n /** Toggle a sidebar folder open/closed */\n const toggleSidebarFolder = (key: string) => (collapsedSidebarFolders[key] = !collapsedSidebarFolders[key])\n\n /** Set the sidebar open/closed */\n const setSidebarOpen = (value: boolean) => (isSidebarOpen.value = value)\n\n /** Toggle the sidebar open/closed */\n const toggleSidebarOpen = () => (isSidebarOpen.value = !isSidebarOpen.value)\n\n return {\n /** State */\n collapsedSidebarFolders: readonly(collapsedSidebarFolders),\n isSidebarOpen: readonly(isSidebarOpen),\n\n /** Actions */\n setCollapsedSidebarFolder,\n toggleSidebarFolder,\n setSidebarOpen,\n toggleSidebarOpen,\n }\n}\n"],"mappings":";;AAQA,IAAa,gBAAgB,QAAQ;;;;;;AAOrC,IAAa,mBAAmB,EAC9B,QAAQ,OAAO,eAAe,UAAU,EACzC;;;;ACVD,IAAa,sBAAsB,EAAE,aAAuC;AAI1E,QAAO;EACL,yBAJ8B,SAAkC,EAAE,CAAC;EAKnE,eAJoB,IAAI,WAAW,QAAQ;EAK5C;;AAEH,IAAa,iBAAiB,QAAQ;;AAGtC,IAAa,mBAAmB;CAC9B,MAAM,eAAe,OAAO,eAAe;AAC3C,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,+CAA+C;CAGjE,MAAM,EAAE,yBAAyB,kBAAkB;;CAGnD,MAAM,6BAA6B,KAAa,UAAoB,wBAAwB,OAAO;;CAGnG,MAAM,uBAAuB,QAAiB,wBAAwB,OAAO,CAAC,wBAAwB;;CAGtG,MAAM,kBAAkB,UAAoB,cAAc,QAAQ;;CAGlE,MAAM,0BAA2B,cAAc,QAAQ,CAAC,cAAc;AAEtE,QAAO;EAEL,yBAAyB,SAAS,wBAAwB;EAC1D,eAAe,SAAS,cAAc;EAGtC;EACA;EACA;EACA;EACD"}
|
|
@@ -8,9 +8,9 @@ import type { AuthMeta, ServerMeta, WorkspaceEventBus } from '@scalar/workspace-
|
|
|
8
8
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
9
9
|
import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
10
10
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
11
|
-
import type { ClientLayout } from '
|
|
12
|
-
import type { ExtendedScalarCookie } from '
|
|
13
|
-
import type { MergedSecuritySchemes } from '
|
|
11
|
+
import type { ClientLayout } from '@/hooks';
|
|
12
|
+
import type { ExtendedScalarCookie } from '@/v2/blocks/request-block/RequestBlock.vue';
|
|
13
|
+
import type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security';
|
|
14
14
|
/**
|
|
15
15
|
* OperationBlock
|
|
16
16
|
*
|
|
@@ -2,8 +2,8 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
|
2
2
|
import type { ServerMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
|
-
import type { ClientLayout } from '
|
|
6
|
-
import { type History } from '
|
|
5
|
+
import type { ClientLayout } from '@/hooks';
|
|
6
|
+
import { type History } from '@/v2/blocks/scalar-address-bar-block';
|
|
7
7
|
/**
|
|
8
8
|
Operation block header: address bar, environment selector, and modal controls.
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
2
2
|
import type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { MergedSecuritySchemes } from '
|
|
4
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
3
|
+
import type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security';
|
|
4
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
5
5
|
/**
|
|
6
6
|
* Get the selected security schemes from security requirements.
|
|
7
7
|
* Takes security requirement objects and resolves them to actual security scheme objects.
|
|
@@ -3,8 +3,8 @@ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensi
|
|
|
3
3
|
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
4
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
5
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
6
|
-
import { type ErrorResponse } from '
|
|
7
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
6
|
+
import { type ErrorResponse } from '@/libs/errors';
|
|
7
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
8
8
|
/**
|
|
9
9
|
* Builds a fully configured Request object ready for execution.
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAG5F,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAI1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAO7G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,iHAU1B;IACD,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,mCAAmC;IACnC,aAAa,EAAE,aAAa,EAAE,CAAA;IAC9B,uCAAuC;IACvC,MAAM,EAAE,UAAU,CAAA;IAClB,2BAA2B;IAC3B,SAAS,EAAE,eAAe,CAAA;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,8DAA8D;IAC9D,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;CACtD,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,OAAO,CAAA;CACtB,
|
|
1
|
+
{"version":3,"file":"build-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAG5F,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAI1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAO7G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,iHAU1B;IACD,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,mCAAmC;IACnC,aAAa,EAAE,aAAa,EAAE,CAAA;IAC9B,uCAAuC;IACvC,MAAM,EAAE,UAAU,CAAA;IAClB,2BAA2B;IAC3B,SAAS,EAAE,eAAe,CAAA;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,8DAA8D;IAC9D,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;CACtD,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,OAAO,CAAA;CACtB,CAoGA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { HarResponse } from '@scalar/snippetz';
|
|
3
|
-
import type { ResponseInstance } from '
|
|
3
|
+
import type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request';
|
|
4
4
|
type HarToFetchResponseProps = {
|
|
5
5
|
/** The HAR Response object to convert */
|
|
6
6
|
harResponse: HarResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import { type ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
3
3
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
|
-
import { type ErrorResponse } from '
|
|
4
|
+
import { type ErrorResponse } from '@/libs/errors';
|
|
5
5
|
/** A single set of populated values for a sent request */
|
|
6
6
|
export type ResponseInstance = Omit<Response, 'headers'> & {
|
|
7
7
|
/** Store headers as an object to match what we had with axios */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { buildRequestSecurity, getSecuritySchemes } from './helpers/build-request-security
|
|
2
|
-
export { getExample } from './helpers/get-example
|
|
3
|
-
export { getResolvedUrl } from './helpers/get-resolved-url
|
|
4
|
-
export { default as OperationBlock } from './OperationBlock.vue
|
|
1
|
+
export { buildRequestSecurity, getSecuritySchemes } from './helpers/build-request-security';
|
|
2
|
+
export { getExample } from './helpers/get-example';
|
|
3
|
+
export { getResolvedUrl } from './helpers/get-resolved-url';
|
|
4
|
+
export { default as OperationBlock } from './OperationBlock.vue';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import "../../../HttpMethod-rnWEgC3T.js";
|
|
2
|
+
import "../../../CodeInput-C-igR77V.js";
|
|
3
|
+
import "../../../Server-DnA_BzPS.js";
|
|
4
|
+
import "../../../AddressBar-B4xnl66I.js";
|
|
5
|
+
import "../../../components-ChixwQhN.js";
|
|
6
|
+
import "../../../Sidebar-C6AdX6-N.js";
|
|
7
|
+
import "../../../DataTableInput-yaU5g-kP.js";
|
|
8
|
+
import { l as buildRequestSecurity, t as OperationBlock_default, u as getSecuritySchemes } from "../../../operation-block-BnMIKAOh.js";
|
|
9
|
+
import { w as getExample } from "../../../operation-code-sample-ZUTueV3v.js";
|
|
10
|
+
import { t as getResolvedUrl } from "../../../get-resolved-url-BUCwrBzc.js";
|
|
11
|
+
import "../../../request-block-DwsGy64Q.js";
|
|
12
|
+
import "../../../SectionFilter-hrtoRLwj.js";
|
|
13
|
+
import "../../../code-input-iq-moLxi.js";
|
|
14
|
+
import "../../../data-table-PL7e8NRO.js";
|
|
15
|
+
import "../../../scalar-auth-selector-block-DI3DLag9.js";
|
|
16
|
+
import "../../../response-block-DmkaDZYs.js";
|
|
17
|
+
import "../../../ScalarAsciiArt-BjuSnj8e.js";
|
|
18
|
+
import "../../../scalar-address-bar-block--Vs6IBU1.js";
|
|
19
|
+
import "../../../server-tcI-OCyx.js";
|
|
20
|
+
export { OperationBlock_default as OperationBlock, buildRequestSecurity, getExample, getResolvedUrl, getSecuritySchemes };
|
|
@@ -3,8 +3,8 @@ import { type AvailableClients } from '@scalar/snippetz';
|
|
|
3
3
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
4
|
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
5
5
|
import type { OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
-
import type { ClientOptionGroup } from '
|
|
7
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
6
|
+
import type { ClientOptionGroup } from '@/v2/blocks/operation-code-sample/types';
|
|
7
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
8
8
|
export type OperationCodeSampleProps = {
|
|
9
9
|
/**
|
|
10
10
|
* Integration type: determines if the code sample is displayed in a client environment
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AvailableClients } from '@scalar/snippetz';
|
|
2
|
-
import type { ClientOption, CustomClientOption, CustomClientOptionGroup } from '
|
|
2
|
+
import type { ClientOption, CustomClientOption, CustomClientOptionGroup } from '@/v2/blocks/operation-code-sample/types';
|
|
3
3
|
export declare const DEFAULT_CLIENT = "shell/curl";
|
|
4
4
|
/** Type guard to check if a string is a valid client id */
|
|
5
5
|
export declare const isClient: (id: any) => id is AvailableClients[number];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AvailableClients } from '@scalar/snippetz';
|
|
2
2
|
import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation';
|
|
3
|
-
import type { ClientOptionGroup } from '
|
|
3
|
+
import type { ClientOptionGroup } from '@/v2/blocks/operation-code-sample/types';
|
|
4
4
|
/** Type of custom code sample IDs */
|
|
5
5
|
export type CustomCodeSampleId = `custom/${string}`;
|
|
6
6
|
/** Helper to generate an ID for custom code samples */
|
|
@@ -3,8 +3,8 @@ import type { AvailableClient } from '@scalar/snippetz';
|
|
|
3
3
|
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
4
4
|
import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation';
|
|
5
5
|
import type { OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
7
|
-
import { type CustomCodeSampleId } from './generate-client-options
|
|
6
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
7
|
+
import { type CustomCodeSampleId } from './generate-client-options';
|
|
8
8
|
type GenerateCodeSnippetProps = {
|
|
9
9
|
/** The selected client/language for code generation (e.g., 'node/fetch') or a custom code sample ID. */
|
|
10
10
|
clientId: AvailableClient | CustomCodeSampleId | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation';
|
|
2
|
-
import type { ClientOptionGroup } from '
|
|
3
|
-
import type { CustomClientOptionGroup } from '
|
|
2
|
+
import type { ClientOptionGroup } from '@/v2/blocks/operation-code-sample';
|
|
3
|
+
import type { CustomClientOptionGroup } from '@/v2/blocks/operation-code-sample/types';
|
|
4
4
|
/**
|
|
5
5
|
* Merges custom code samples with the client options
|
|
6
6
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
1
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
2
2
|
/** Extract secrets from security schemes */
|
|
3
3
|
export declare const getSecrets: (securitySchemes: SecuritySchemeObjectSecret[]) => string[];
|
|
4
4
|
//# sourceMappingURL=get-secrets.d.ts.map
|
|
@@ -2,7 +2,7 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
|
2
2
|
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
3
3
|
import type { OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
4
|
import type { Request as HarRequest } from 'har-format';
|
|
5
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
5
|
+
import type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
6
6
|
export type OperationToHarProps = {
|
|
7
7
|
/** OpenAPI Operation object */
|
|
8
8
|
operation: OperationObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
import type { PostData } from 'har-format';
|
|
3
|
-
import type { OperationToHarProps } from './operation-to-har
|
|
3
|
+
import type { OperationToHarProps } from './operation-to-har';
|
|
4
4
|
type ProcessBodyProps = Pick<OperationToHarProps, 'contentType' | 'example'> & {
|
|
5
5
|
requestBody: RequestBodyObject;
|
|
6
6
|
};
|