@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
|
@@ -1,8 +1,640 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import "../../../HttpMethod-rnWEgC3T.js";
|
|
2
|
+
import { t as ModalClientContainer_default } from "../../../ModalClientContainer-qHsZi4wQ.js";
|
|
3
|
+
import "../../../CodeInput-C-igR77V.js";
|
|
4
|
+
import "../../../Server-DnA_BzPS.js";
|
|
5
|
+
import "../../../AddressBar-B4xnl66I.js";
|
|
6
|
+
import "../../../components-ChixwQhN.js";
|
|
7
|
+
import "../../../Sidebar-C6AdX6-N.js";
|
|
8
|
+
import "../../../DataTableInput-yaU5g-kP.js";
|
|
9
|
+
import { i as mapHiddenClientsConfig, n as Operation_default } from "../../../operation-block-BnMIKAOh.js";
|
|
10
|
+
import "../../../operation-code-sample-ZUTueV3v.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 { t as mergeSecurity } from "../../../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
|
+
import "../../../resize-D2IYvVdh.js";
|
|
21
|
+
import { n as Sidebar_default, t as SidebarToggle_default } from "../../../sidebar-ceSbYmnt.js";
|
|
22
|
+
import { t as getActiveEnvironment } from "../../../get-active-environment-CkxyQ1dM.js";
|
|
23
|
+
import { n as initializeWorkspaceEventHandlers, t as useGlobalHotKeys } from "../../../use-global-hot-keys-D8Ai8Qbm.js";
|
|
24
|
+
import { computed, createApp, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, onBeforeUnmount, openBlock, reactive, ref, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
|
|
25
|
+
import { useModal } from "@scalar/components";
|
|
26
|
+
import { ScalarToasts } from "@scalar/use-toasts";
|
|
27
|
+
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
28
|
+
import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
|
|
29
|
+
import { unpackProxyObject } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
30
|
+
import { createSidebarState, generateReverseIndex, getChildEntry } from "@scalar/sidebar";
|
|
31
|
+
import { getOperationEntries, getParentEntry } from "@scalar/workspace-store/navigation";
|
|
32
|
+
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
33
|
+
//#region src/v2/features/modal/helpers/resolve-route-parameters.ts
|
|
34
|
+
/** Type guard to check if an entry is an example. */
|
|
35
|
+
var isExample = (entry) => entry.type === "example";
|
|
36
|
+
/**
|
|
37
|
+
* Gets the document from the workspace store.
|
|
38
|
+
* Returns undefined if the document slug is not provided or the document does not exist.
|
|
39
|
+
*/
|
|
40
|
+
var getDocument = (ctx) => ctx.store.workspace.documents[ctx.documentSlug ?? ""];
|
|
41
|
+
/**
|
|
42
|
+
* Resolves the document slug from a raw input value.
|
|
43
|
+
*
|
|
44
|
+
* When "default" is specified and no document exists with that slug,
|
|
45
|
+
* we fall back to the active document or the first available document.
|
|
46
|
+
* This ensures a valid document is selected even when the caller does not know which documents exist.
|
|
47
|
+
*/
|
|
48
|
+
var resolveDocumentSlug = (store, slug) => {
|
|
49
|
+
if (slug !== "default" || store.workspace.documents[slug] !== void 0) return slug;
|
|
50
|
+
return store.workspace["x-scalar-active-document"] || Object.keys(store.workspace.documents)[0];
|
|
8
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Resolves the path from a raw input value.
|
|
54
|
+
*
|
|
55
|
+
* When "default" is specified, returns the first available path in the document.
|
|
56
|
+
* This is useful for initial navigation when no specific path is requested.
|
|
57
|
+
*/
|
|
58
|
+
var resolvePath = (ctx, path) => {
|
|
59
|
+
const document = getDocument(ctx);
|
|
60
|
+
if (!document) return;
|
|
61
|
+
if (path === "default") return Object.keys(document.paths ?? {})[0];
|
|
62
|
+
return path;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Resolves the HTTP method from a raw input value.
|
|
66
|
+
*
|
|
67
|
+
* When "default" is specified, returns the first valid HTTP method for the given path.
|
|
68
|
+
* This ensures we select a real method rather than metadata keys like "parameters" or "summary".
|
|
69
|
+
*/
|
|
70
|
+
var resolveMethod = (ctx, path, method) => {
|
|
71
|
+
const document = getDocument(ctx);
|
|
72
|
+
if (!document || !path) return;
|
|
73
|
+
if (method === "default") return Object.keys(document.paths?.[path] ?? {}).find(isHttpMethod);
|
|
74
|
+
return isHttpMethod(method) ? method : void 0;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Resolves the example name from a raw input value.
|
|
78
|
+
*
|
|
79
|
+
* When "default" is specified, returns the first available example name.
|
|
80
|
+
* Falls back to "default" when no examples exist, which signals to use the default request body.
|
|
81
|
+
*/
|
|
82
|
+
var resolveExampleName = (ctx, operation, exampleKey) => {
|
|
83
|
+
if (!getDocument(ctx) || operation?.type !== "operation") return "default";
|
|
84
|
+
const examples = operation.children?.filter(isExample) ?? [];
|
|
85
|
+
const matchingExample = examples.find((child) => child.name === exampleKey);
|
|
86
|
+
if (matchingExample) return matchingExample.name;
|
|
87
|
+
if (exampleKey === "default") return examples[0]?.name ?? "default";
|
|
88
|
+
return "default";
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Resolves all route parameters from raw input values to their actual values.
|
|
92
|
+
*
|
|
93
|
+
* This function handles "default" placeholders by looking up actual values from the workspace store.
|
|
94
|
+
* It ensures the modal can be opened even when the caller does not know specific paths, methods, or examples.
|
|
95
|
+
*/
|
|
96
|
+
var resolveRouteParameters = (store, params) => {
|
|
97
|
+
const documentSlug = resolveDocumentSlug(store, params.documentSlug);
|
|
98
|
+
const ctx = {
|
|
99
|
+
store,
|
|
100
|
+
documentSlug
|
|
101
|
+
};
|
|
102
|
+
const path = resolvePath(ctx, params.path);
|
|
103
|
+
const method = resolveMethod(ctx, path, params.method);
|
|
104
|
+
const traversedDocument = getDocument(ctx)?.["x-scalar-navigation"];
|
|
105
|
+
if (!traversedDocument) return {
|
|
106
|
+
documentSlug,
|
|
107
|
+
path,
|
|
108
|
+
method,
|
|
109
|
+
example: "default"
|
|
110
|
+
};
|
|
111
|
+
const operation = getOperationEntries(traversedDocument).get(`${path}|${method}`)?.find((entry) => entry.type === "operation");
|
|
112
|
+
return {
|
|
113
|
+
documentSlug,
|
|
114
|
+
path,
|
|
115
|
+
method,
|
|
116
|
+
example: resolveExampleName(ctx, operation, params.example)
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/v2/features/modal/helpers/restore-workspace-state.ts
|
|
121
|
+
/**
|
|
122
|
+
* Restores the state of a workspace document by reverting its state
|
|
123
|
+
* to the specified import, while preserving certain live properties
|
|
124
|
+
* such as servers, security schemes, and selected server.
|
|
125
|
+
*/
|
|
126
|
+
var restoreWorkspaceState = ({ workspaceStore, workspaceState, name }) => {
|
|
127
|
+
if (!workspaceStore) return {
|
|
128
|
+
ok: false,
|
|
129
|
+
error: "Workspace store is not available"
|
|
130
|
+
};
|
|
131
|
+
const currentDocument = unpackProxyObject(workspaceStore.workspace.documents[name]);
|
|
132
|
+
if (!currentDocument) return {
|
|
133
|
+
ok: false,
|
|
134
|
+
error: "Current document not found in workspace store"
|
|
135
|
+
};
|
|
136
|
+
const importingDocument = workspaceState.documents[name];
|
|
137
|
+
if (!importingDocument) return {
|
|
138
|
+
ok: false,
|
|
139
|
+
error: "Importing document not found in workspace state"
|
|
140
|
+
};
|
|
141
|
+
const persistedProperties = {
|
|
142
|
+
selectedServer: currentDocument["x-scalar-selected-server"],
|
|
143
|
+
securitySchemes: currentDocument.components?.securitySchemes,
|
|
144
|
+
servers: currentDocument.servers
|
|
145
|
+
};
|
|
146
|
+
workspaceStore.loadWorkspace({
|
|
147
|
+
meta: {},
|
|
148
|
+
documents: { [name]: importingDocument },
|
|
149
|
+
intermediateDocuments: {},
|
|
150
|
+
originalDocuments: {},
|
|
151
|
+
overrides: {},
|
|
152
|
+
history: {},
|
|
153
|
+
auth: {}
|
|
154
|
+
});
|
|
155
|
+
const newDocument = unpackProxyObject(workspaceStore.workspace.documents[name]);
|
|
156
|
+
if (!newDocument) return {
|
|
157
|
+
ok: false,
|
|
158
|
+
error: "New document not found in workspace store"
|
|
159
|
+
};
|
|
160
|
+
newDocument["x-scalar-selected-server"] = persistedProperties.selectedServer;
|
|
161
|
+
newDocument.servers = persistedProperties.servers;
|
|
162
|
+
newDocument.components ??= {};
|
|
163
|
+
newDocument.components.securitySchemes = persistedProperties.securitySchemes;
|
|
164
|
+
return { ok: true };
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/v2/helpers/generate-location-id.ts
|
|
168
|
+
/**
|
|
169
|
+
* Generates a unique string ID for an API location, based on the document, path, method, and example.
|
|
170
|
+
* Filters out undefined values and serializes the composite array into a stable string.
|
|
171
|
+
*
|
|
172
|
+
* @param params - An object containing document, path, method, and optional example name.
|
|
173
|
+
* @returns A stringified array representing the unique location identifier.
|
|
174
|
+
*
|
|
175
|
+
* Example:
|
|
176
|
+
* generateLocationId({ document: 'mydoc', path: '/users', method: 'get', example: 'default' })
|
|
177
|
+
* // => '["mydoc","/users","get","default"]'
|
|
178
|
+
*/
|
|
179
|
+
var generateLocationId = ({ document, path, method, example }) => {
|
|
180
|
+
return JSON.stringify([
|
|
181
|
+
document,
|
|
182
|
+
path,
|
|
183
|
+
method,
|
|
184
|
+
example
|
|
185
|
+
].filter(isDefined));
|
|
186
|
+
};
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/v2/features/modal/hooks/use-modal-sidebar.ts
|
|
189
|
+
/**
|
|
190
|
+
* useSidebarState - Custom hook to manage the sidebar state and navigation logic in the Scalar API client
|
|
191
|
+
*
|
|
192
|
+
* This composable manages the sidebar structure, synchronizes selection state
|
|
193
|
+
* with the current route, and provides a handler for selecting sidebar items.
|
|
194
|
+
*
|
|
195
|
+
* Example usage:
|
|
196
|
+
*
|
|
197
|
+
* const { handleSelectItem, sidebarState } = useSidebarState({
|
|
198
|
+
* workspaceStore,
|
|
199
|
+
* workspaceSlug,
|
|
200
|
+
* documentSlug,
|
|
201
|
+
* path,
|
|
202
|
+
* method,
|
|
203
|
+
* exampleName,
|
|
204
|
+
* })
|
|
205
|
+
*/
|
|
206
|
+
var useModalSidebar = ({ workspaceStore, documentSlug, path, method, exampleName, route }) => {
|
|
207
|
+
const entries = computed(() => workspaceStore?.workspace.documents[toValue(documentSlug) ?? ""]?.["x-scalar-navigation"]?.children ?? []);
|
|
208
|
+
const state = createSidebarState(entries);
|
|
209
|
+
/**
|
|
210
|
+
* Computed index for fast lookup of sidebar nodes by their unique API location.
|
|
211
|
+
*
|
|
212
|
+
* - Only indexes nodes of type 'operation', or 'example'.
|
|
213
|
+
* - The lookup key is a serialized array of: [operationPath, operationMethod, exampleName?].
|
|
214
|
+
* - Supports precise resolution of sidebar entries given an API "location".
|
|
215
|
+
*/
|
|
216
|
+
const locationIndex = computed(() => generateReverseIndex({
|
|
217
|
+
items: entries.value,
|
|
218
|
+
nestedKey: "children",
|
|
219
|
+
filter: (node) => node.type === "operation" || node.type === "example",
|
|
220
|
+
getId: (node) => {
|
|
221
|
+
const operation = getParentEntry("operation", node);
|
|
222
|
+
return generateLocationId({
|
|
223
|
+
document: toValue(documentSlug) ?? "",
|
|
224
|
+
path: operation?.path,
|
|
225
|
+
method: operation?.method,
|
|
226
|
+
example: node.type === "example" ? node.name : void 0
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}));
|
|
230
|
+
/**
|
|
231
|
+
* Looks up a sidebar entry by its unique API location.
|
|
232
|
+
* - First tries to find an entry matching all provided properties (including example).
|
|
233
|
+
* - If not found, falls back to matching only the operation (ignores example field).
|
|
234
|
+
* This allows resolving either examples, operations, or documents as appropriate.
|
|
235
|
+
*
|
|
236
|
+
* @param location - Object specifying the document name, path, method, and optional example name.
|
|
237
|
+
* @returns The matching sidebar entry, or undefined if none found.
|
|
238
|
+
*
|
|
239
|
+
* Example:
|
|
240
|
+
* const entry = getEntryByLocation({
|
|
241
|
+
* document: 'pets',
|
|
242
|
+
* path: '/pets',
|
|
243
|
+
* method: 'get',
|
|
244
|
+
* example: 'default',
|
|
245
|
+
* })
|
|
246
|
+
*/
|
|
247
|
+
const getEntryByLocation = (location) => {
|
|
248
|
+
const entryWithExample = locationIndex.value.get(generateLocationId({
|
|
249
|
+
document: location.document,
|
|
250
|
+
path: location.path,
|
|
251
|
+
method: location.method,
|
|
252
|
+
example: location.example
|
|
253
|
+
}));
|
|
254
|
+
if (entryWithExample) return entryWithExample;
|
|
255
|
+
return locationIndex.value.get(generateLocationId({
|
|
256
|
+
document: location.document,
|
|
257
|
+
path: location.path,
|
|
258
|
+
method: location.method
|
|
259
|
+
}));
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Handles item selection from the sidebar and routes navigation accordingly.
|
|
263
|
+
*
|
|
264
|
+
* Example:
|
|
265
|
+
* handleSelectItem('id-of-entry')
|
|
266
|
+
*/
|
|
267
|
+
const handleSelectItem = (id) => {
|
|
268
|
+
const entry = state.getEntryById(id);
|
|
269
|
+
if (!entry) {
|
|
270
|
+
console.warn(`Could not find sidebar entry with id ${id} to select`);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (entry.type === "operation" || entry.type === "example") {
|
|
274
|
+
if (state.isSelected(id)) {
|
|
275
|
+
state.setExpanded(id, !state.isExpanded(id));
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const operation = getParentEntry("operation", entry);
|
|
279
|
+
const example = getChildEntry("example", entry);
|
|
280
|
+
if (example) {
|
|
281
|
+
state.setSelected(example.id);
|
|
282
|
+
state.setExpanded(example.id, true);
|
|
283
|
+
} else state.setSelected(id);
|
|
284
|
+
if (!operation) return;
|
|
285
|
+
return route({
|
|
286
|
+
documentSlug: toValue(documentSlug),
|
|
287
|
+
path: operation.path,
|
|
288
|
+
method: operation.method,
|
|
289
|
+
example: example?.name ?? "default"
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
state.setExpanded(id, !state.isExpanded(id));
|
|
293
|
+
};
|
|
294
|
+
/** Keep the sidebar state in sync with the modal parameters */
|
|
295
|
+
watch([
|
|
296
|
+
documentSlug,
|
|
297
|
+
path,
|
|
298
|
+
method,
|
|
299
|
+
exampleName
|
|
300
|
+
], ([newDocument, newPath, newMethod, newExample]) => {
|
|
301
|
+
if (!newDocument) {
|
|
302
|
+
state.setSelected(null);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
const entry = getEntryByLocation({
|
|
306
|
+
document: newDocument,
|
|
307
|
+
path: newPath,
|
|
308
|
+
method: newMethod,
|
|
309
|
+
example: newExample
|
|
310
|
+
});
|
|
311
|
+
if (entry) {
|
|
312
|
+
state.setSelected(entry.id);
|
|
313
|
+
state.setExpanded(entry.id, true);
|
|
314
|
+
}
|
|
315
|
+
}, { immediate: true });
|
|
316
|
+
return {
|
|
317
|
+
handleSelectItem,
|
|
318
|
+
state,
|
|
319
|
+
getEntryByLocation
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/v2/features/modal/modal-events.ts
|
|
324
|
+
function initializeModalEvents({ eventBus, isSidebarOpen, sidebarState, modalState, store }) {
|
|
325
|
+
/** Initialize workspace event handlers */
|
|
326
|
+
initializeWorkspaceEventHandlers({
|
|
327
|
+
eventBus,
|
|
328
|
+
store: ref(store),
|
|
329
|
+
hooks: {}
|
|
330
|
+
});
|
|
331
|
+
eventBus.on("scroll-to:nav-item", ({ id }) => sidebarState.handleSelectItem(id));
|
|
332
|
+
eventBus.on("ui:toggle:sidebar", () => isSidebarOpen.value = !isSidebarOpen.value);
|
|
333
|
+
eventBus.on("ui:close:client-modal", () => modalState.hide());
|
|
334
|
+
eventBus.on("ui:open:client-modal", (payload) => {
|
|
335
|
+
if (!payload) {
|
|
336
|
+
modalState.show();
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
if ("id" in payload && payload.id) {
|
|
340
|
+
let targetId = payload.id;
|
|
341
|
+
if ("exampleName" in payload && payload.exampleName) {
|
|
342
|
+
const operationEntry = sidebarState.state.getEntryById(payload.id);
|
|
343
|
+
if (operationEntry && "children" in operationEntry && operationEntry.children) {
|
|
344
|
+
const exampleEntry = operationEntry.children.find((child) => child.type === "example" && child.name === payload.exampleName);
|
|
345
|
+
if (exampleEntry) targetId = exampleEntry.id;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
sidebarState.handleSelectItem(targetId);
|
|
349
|
+
} else if ("method" in payload && "path" in payload) sidebarState.handleSelectItem(sidebarState.getEntryByLocation({
|
|
350
|
+
document: store.workspace.activeDocument?.["x-scalar-navigation"]?.id ?? "",
|
|
351
|
+
path: payload.path,
|
|
352
|
+
method: payload.method,
|
|
353
|
+
example: payload.exampleName
|
|
354
|
+
})?.id ?? "");
|
|
355
|
+
modalState.show();
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/v2/hooks/use-scroll-lock.ts
|
|
360
|
+
/**
|
|
361
|
+
* useScrollLock - A Vue composition function to lock and unlock scrolling on a specific element.
|
|
362
|
+
*
|
|
363
|
+
* This hook provides a computed ref that allows you to enable or disable scrolling on a given HTMLElement.
|
|
364
|
+
* Locking sets the element's `overflow` style to `'hidden'`.
|
|
365
|
+
* Unlocking restores the original `overflow` value.
|
|
366
|
+
*
|
|
367
|
+
* The lock state will be automatically cleaned up (unlocked) when the component is unmounted.
|
|
368
|
+
*
|
|
369
|
+
* @param element - MaybeRefOrGetter for the HTMLElement to lock scrolling on. Can be a ref or a function.
|
|
370
|
+
* @returns A computed ref: assign `true` to lock, `false` to unlock, read for current state.
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```ts
|
|
374
|
+
* // In your setup():
|
|
375
|
+
* const container = ref<HTMLElement | null>(null)
|
|
376
|
+
* const scrollLock = useScrollLock(container)
|
|
377
|
+
*
|
|
378
|
+
* // To lock scrolling:
|
|
379
|
+
* scrollLock.value = true
|
|
380
|
+
*
|
|
381
|
+
* // To unlock scrolling:
|
|
382
|
+
* scrollLock.value = false
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
var useScrollLock = (element) => {
|
|
386
|
+
const initialValue = ref("");
|
|
387
|
+
const isLocked = ref(false);
|
|
388
|
+
const lock = () => {
|
|
389
|
+
const el = toValue(element);
|
|
390
|
+
if (!el) return;
|
|
391
|
+
initialValue.value = el.style.overflow;
|
|
392
|
+
el.style.overflow = "hidden";
|
|
393
|
+
};
|
|
394
|
+
const unlock = () => {
|
|
395
|
+
const el = toValue(element);
|
|
396
|
+
if (!el) return;
|
|
397
|
+
if (initialValue.value !== "") el.style.overflow = initialValue.value;
|
|
398
|
+
else el.style.removeProperty("overflow");
|
|
399
|
+
};
|
|
400
|
+
const state = computed({
|
|
401
|
+
get: () => isLocked.value,
|
|
402
|
+
set: (value) => {
|
|
403
|
+
isLocked.value = value;
|
|
404
|
+
value ? lock() : unlock();
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
onBeforeUnmount(() => {
|
|
408
|
+
if (isLocked.value) unlock();
|
|
409
|
+
});
|
|
410
|
+
return state;
|
|
411
|
+
};
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/v2/features/modal/Modal.vue?vue&type=script&setup=true&lang.ts
|
|
414
|
+
var _hoisted_1 = {
|
|
415
|
+
key: 0,
|
|
416
|
+
class: "relative flex h-full min-h-0 w-full flex-1"
|
|
417
|
+
};
|
|
418
|
+
var _hoisted_2 = {
|
|
419
|
+
key: 1,
|
|
420
|
+
class: "flex h-full w-full items-center justify-center"
|
|
421
|
+
};
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/v2/features/modal/Modal.vue
|
|
424
|
+
var Modal_default = /* @__PURE__ */ defineComponent({
|
|
425
|
+
__name: "Modal",
|
|
426
|
+
props: {
|
|
427
|
+
workspaceStore: {},
|
|
428
|
+
document: {},
|
|
429
|
+
path: {},
|
|
430
|
+
eventBus: {},
|
|
431
|
+
method: {},
|
|
432
|
+
exampleName: {},
|
|
433
|
+
modalState: {},
|
|
434
|
+
sidebarState: {},
|
|
435
|
+
plugins: {},
|
|
436
|
+
options: {}
|
|
437
|
+
},
|
|
438
|
+
setup(__props, { expose: __expose }) {
|
|
439
|
+
const activeWorkspace = {
|
|
440
|
+
label: "default",
|
|
441
|
+
id: "default"
|
|
442
|
+
};
|
|
443
|
+
/** Controls the visibility of the sidebar. */
|
|
444
|
+
const isSidebarOpen = ref(false);
|
|
445
|
+
/** Initialize modal events */
|
|
446
|
+
initializeModalEvents({
|
|
447
|
+
eventBus: __props.eventBus,
|
|
448
|
+
isSidebarOpen,
|
|
449
|
+
sidebarState: __props.sidebarState,
|
|
450
|
+
modalState: __props.modalState,
|
|
451
|
+
store: __props.workspaceStore
|
|
452
|
+
});
|
|
453
|
+
/** Register global hotkeys for the app, passing the workspace event bus and layout state */
|
|
454
|
+
useGlobalHotKeys(__props.eventBus, "modal", () => !__props.modalState.open);
|
|
455
|
+
/** Clean up on close */
|
|
456
|
+
const cleanUp = () => {
|
|
457
|
+
__props.eventBus.emit("operation:cancel:request");
|
|
458
|
+
};
|
|
459
|
+
const isLocked = useScrollLock(() => {
|
|
460
|
+
if (typeof window !== "undefined") return window.document.body;
|
|
461
|
+
return null;
|
|
462
|
+
});
|
|
463
|
+
watch(() => __props.modalState.open, (open) => {
|
|
464
|
+
isLocked.value = open;
|
|
465
|
+
if (!open) cleanUp();
|
|
466
|
+
});
|
|
467
|
+
onBeforeUnmount(() => cleanUp());
|
|
468
|
+
/** Default sidebar width in pixels. */
|
|
469
|
+
const DEFAULT_SIDEBAR_WIDTH = 288;
|
|
470
|
+
/** Width of the sidebar, with fallback to default. */
|
|
471
|
+
const sidebarWidth = computed(() => __props.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? DEFAULT_SIDEBAR_WIDTH);
|
|
472
|
+
/** Handler for sidebar width changes. */
|
|
473
|
+
const handleSidebarWidthUpdate = (width) => __props.workspaceStore?.update("x-scalar-sidebar-width", width);
|
|
474
|
+
/**
|
|
475
|
+
* Merged environment variables from workspace and document levels.
|
|
476
|
+
* Variables from both sources are combined, with document variables
|
|
477
|
+
* taking precedence in case of naming conflicts.
|
|
478
|
+
*/
|
|
479
|
+
const environment = computed(() => getActiveEnvironment(__props.workspaceStore, __props.document.value));
|
|
480
|
+
/** Merge authentication config with the document security schemes */
|
|
481
|
+
const securitySchemes = computed(() => mergeSecurity(__props.document.value?.components?.securitySchemes, toValue(__props.options)?.authentication?.securitySchemes, __props.workspaceStore.auth, __props.document.value?.["x-scalar-navigation"]?.name ?? ""));
|
|
482
|
+
__expose({
|
|
483
|
+
sidebarWidth,
|
|
484
|
+
environment
|
|
485
|
+
});
|
|
486
|
+
return (_ctx, _cache) => {
|
|
487
|
+
return openBlock(), createBlock(ModalClientContainer_default, { modalState: __props.modalState }, {
|
|
488
|
+
default: withCtx(() => [createVNode(unref(ScalarToasts)), __props.document.value && __props.path?.value && __props.method?.value ? (openBlock(), createElementBlock("main", _hoisted_1, [
|
|
489
|
+
createVNode(unref(SidebarToggle_default), {
|
|
490
|
+
modelValue: isSidebarOpen.value,
|
|
491
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isSidebarOpen.value = $event),
|
|
492
|
+
class: "absolute top-2 left-3 z-2"
|
|
493
|
+
}, null, 8, ["modelValue"]),
|
|
494
|
+
withDirectives(createVNode(unref(Sidebar_default), {
|
|
495
|
+
sidebarWidth: sidebarWidth.value,
|
|
496
|
+
"onUpdate:sidebarWidth": [_cache[1] || (_cache[1] = ($event) => sidebarWidth.value = $event), handleSidebarWidthUpdate],
|
|
497
|
+
activeWorkspace,
|
|
498
|
+
class: "h-full max-md:absolute! max-md:w-full!",
|
|
499
|
+
documents: [__props.document.value],
|
|
500
|
+
eventBus: __props.eventBus,
|
|
501
|
+
isDroppable: () => false,
|
|
502
|
+
layout: "modal",
|
|
503
|
+
sidebarState: __props.sidebarState.state,
|
|
504
|
+
workspaces: [],
|
|
505
|
+
onSelectItem: __props.sidebarState.handleSelectItem
|
|
506
|
+
}, null, 8, [
|
|
507
|
+
"sidebarWidth",
|
|
508
|
+
"documents",
|
|
509
|
+
"eventBus",
|
|
510
|
+
"sidebarState",
|
|
511
|
+
"onSelectItem"
|
|
512
|
+
]), [[vShow, isSidebarOpen.value]]),
|
|
513
|
+
createVNode(Operation_default, {
|
|
514
|
+
activeWorkspace,
|
|
515
|
+
class: "flex-1",
|
|
516
|
+
document: __props.document.value,
|
|
517
|
+
documentSlug: __props.document.value["x-scalar-navigation"]?.id ?? "",
|
|
518
|
+
environment: environment.value,
|
|
519
|
+
eventBus: __props.eventBus,
|
|
520
|
+
exampleName: __props.exampleName?.value,
|
|
521
|
+
layout: "modal",
|
|
522
|
+
method: __props.method?.value,
|
|
523
|
+
options: __props.options,
|
|
524
|
+
path: __props.path?.value,
|
|
525
|
+
plugins: __props.plugins,
|
|
526
|
+
securitySchemes: securitySchemes.value,
|
|
527
|
+
workspaceStore: __props.workspaceStore
|
|
528
|
+
}, null, 8, [
|
|
529
|
+
"document",
|
|
530
|
+
"documentSlug",
|
|
531
|
+
"environment",
|
|
532
|
+
"eventBus",
|
|
533
|
+
"exampleName",
|
|
534
|
+
"method",
|
|
535
|
+
"options",
|
|
536
|
+
"path",
|
|
537
|
+
"plugins",
|
|
538
|
+
"securitySchemes",
|
|
539
|
+
"workspaceStore"
|
|
540
|
+
])
|
|
541
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "text-c-3" }, "No document selected", -1)])]))]),
|
|
542
|
+
_: 1
|
|
543
|
+
}, 8, ["modalState"]);
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region src/v2/features/modal/helpers/create-api-client-modal.ts
|
|
549
|
+
/**
|
|
550
|
+
* Creates the API Client Modal.
|
|
551
|
+
*
|
|
552
|
+
* The modal does not require a router. Instead, navigation is handled by setting
|
|
553
|
+
* active entities directly through the returned `route` function.
|
|
554
|
+
*/
|
|
555
|
+
var createApiClientModal = ({ el, eventBus = createWorkspaceEventBus({ debug: false }), mountOnInitialize = true, plugins = [], workspaceStore, options = {} }) => {
|
|
556
|
+
const defaultEntities = {
|
|
557
|
+
path: "default",
|
|
558
|
+
method: "default",
|
|
559
|
+
example: "default",
|
|
560
|
+
documentSlug: workspaceStore.workspace["x-scalar-active-document"] || "default"
|
|
561
|
+
};
|
|
562
|
+
const workspaceStoreSnapshot = ref(null);
|
|
563
|
+
const parameters = reactive({ ...defaultEntities });
|
|
564
|
+
/** Navigate to the specified path, method, and example. */
|
|
565
|
+
const route = (payload) => {
|
|
566
|
+
Object.assign(parameters, defaultEntities, payload);
|
|
567
|
+
};
|
|
568
|
+
/** Resolved parameters from the workspace store. */
|
|
569
|
+
const resolvedParameters = computed(() => resolveRouteParameters(workspaceStore, parameters));
|
|
570
|
+
const documentSlug = computed(() => resolvedParameters.value.documentSlug);
|
|
571
|
+
const path = computed(() => resolvedParameters.value.path);
|
|
572
|
+
const method = computed(() => resolvedParameters.value.method);
|
|
573
|
+
const exampleName = computed(() => resolvedParameters.value.example);
|
|
574
|
+
/** The document from the workspace store. */
|
|
575
|
+
const document = computed(() => workspaceStore.workspace.documents[documentSlug.value ?? ""] ?? null);
|
|
576
|
+
/** Sidebar state and selection handling. */
|
|
577
|
+
const sidebarState = useModalSidebar({
|
|
578
|
+
workspaceStore,
|
|
579
|
+
documentSlug,
|
|
580
|
+
path,
|
|
581
|
+
method,
|
|
582
|
+
exampleName,
|
|
583
|
+
route
|
|
584
|
+
});
|
|
585
|
+
const modalState = useModal();
|
|
586
|
+
const app = createApp(Modal_default, {
|
|
587
|
+
document,
|
|
588
|
+
eventBus,
|
|
589
|
+
exampleName,
|
|
590
|
+
method,
|
|
591
|
+
modalState,
|
|
592
|
+
path,
|
|
593
|
+
plugins,
|
|
594
|
+
sidebarState,
|
|
595
|
+
workspaceStore,
|
|
596
|
+
options
|
|
597
|
+
});
|
|
598
|
+
/** Snapshot the workspace store when the modal is opened. */
|
|
599
|
+
const handleModalOpen = () => {
|
|
600
|
+
workspaceStoreSnapshot.value = window.structuredClone(workspaceStore.exportWorkspace());
|
|
601
|
+
};
|
|
602
|
+
/** Restore the workspace store when the modal is closed. */
|
|
603
|
+
const handleModalClose = () => {
|
|
604
|
+
if (!workspaceStoreSnapshot.value) {
|
|
605
|
+
console.warn("No workspace store snapshot to restore");
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
const result = restoreWorkspaceState({
|
|
609
|
+
workspaceStore,
|
|
610
|
+
workspaceState: workspaceStoreSnapshot.value,
|
|
611
|
+
name: documentSlug.value ?? ""
|
|
612
|
+
});
|
|
613
|
+
if (!result.ok) console.error("Failed to restore workspace state", result.error);
|
|
614
|
+
};
|
|
615
|
+
watch(() => modalState.open, (open) => open ? handleModalOpen() : handleModalClose());
|
|
616
|
+
app.config.idPrefix = "scalar-client";
|
|
617
|
+
/** Mount the modal to a given element. */
|
|
618
|
+
const mount = (mountingEl = el) => {
|
|
619
|
+
if (!mountingEl) {
|
|
620
|
+
console.error("[@scalar/api-client] Could not create the API client Modal.", "Invalid HTML element provided.", "Read more: https://github.com/scalar/scalar/tree/main/packages/api-client");
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
app.mount(mountingEl);
|
|
624
|
+
};
|
|
625
|
+
if (mountOnInitialize) mount();
|
|
626
|
+
return {
|
|
627
|
+
app,
|
|
628
|
+
open: (payload) => {
|
|
629
|
+
modalState.open = true;
|
|
630
|
+
if (payload) route(payload);
|
|
631
|
+
},
|
|
632
|
+
mount,
|
|
633
|
+
route,
|
|
634
|
+
modalState
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
//#endregion
|
|
638
|
+
export { createApiClientModal, initializeModalEvents, mapHiddenClientsConfig };
|
|
639
|
+
|
|
640
|
+
//# sourceMappingURL=index.js.map
|