@scalar/api-client 2.38.1 → 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 +9 -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/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 +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/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/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/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/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/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 -347
- 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 -184
- 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 -52
- 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 -210
- 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
|
@@ -0,0 +1,804 @@
|
|
|
1
|
+
import { m as isUrl$1, r as useWorkspace, w as useActiveEntities } from "./store-DpSUVhjp.js";
|
|
2
|
+
import { t as WatchModeToggle_default } from "./WatchModeToggle-D_eAiTWJ.js";
|
|
3
|
+
import { t as IntegrationLogo_default } from "./IntegrationLogo-B9EDW8db.js";
|
|
4
|
+
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onBeforeUnmount, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, toDisplayString, unref, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
5
|
+
import { ScalarButton, ScalarDropdown, ScalarDropdownDivider, ScalarDropdownItem, ScalarIcon, ScalarModal, useModal } from "@scalar/components";
|
|
6
|
+
import { getThemeStyles, themeIds } from "@scalar/themes";
|
|
7
|
+
import { useColorMode } from "@scalar/use-hooks/useColorMode";
|
|
8
|
+
import { useToasts } from "@scalar/use-toasts";
|
|
9
|
+
import { useRouter } from "vue-router";
|
|
10
|
+
import { fetchWithProxyFallback, isLocalUrl } from "@scalar/oas-utils/helpers";
|
|
11
|
+
import { redirectToProxy } from "@scalar/helpers/url/redirect-to-proxy";
|
|
12
|
+
import { normalize } from "@scalar/openapi-parser";
|
|
13
|
+
import { resolve } from "@scalar/import";
|
|
14
|
+
import { parse } from "yaml";
|
|
15
|
+
//#region src/components/ImportCollection/utils/workspace-store-is-empty.ts
|
|
16
|
+
/**
|
|
17
|
+
* Checks whether the store is empty.
|
|
18
|
+
*/
|
|
19
|
+
function workspaceStoreIsEmpty(store) {
|
|
20
|
+
const hasSingleWorkspace = Object.keys(store.workspaces).length === 1;
|
|
21
|
+
const hasSingleCollection = Object.keys(store.collections).length === 1;
|
|
22
|
+
return hasSingleWorkspace && hasSingleCollection;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/ImportCollection/DropEventListener.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
+
var _hoisted_1$3 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "bg-b-2 fixed right-1/2 bottom-1/2 z-50 h-64 w-64 translate-x-1/2 translate-y-1/2 rounded-xl border transition-opacity duration-200 md:right-10 md:bottom-10 md:translate-x-0 md:translate-y-0"
|
|
29
|
+
};
|
|
30
|
+
var _hoisted_2$3 = { class: "flex h-full flex-col items-center justify-center" };
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/ImportCollection/DropEventListener.vue
|
|
33
|
+
var DropEventListener_default = /* @__PURE__ */ defineComponent({
|
|
34
|
+
__name: "DropEventListener",
|
|
35
|
+
emits: ["input"],
|
|
36
|
+
setup(__props, { emit: __emit }) {
|
|
37
|
+
const emit = __emit;
|
|
38
|
+
const isDragging = ref(false);
|
|
39
|
+
let dragCounter = 0;
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
document.addEventListener("dragenter", handleDragEnter);
|
|
42
|
+
document.addEventListener("dragleave", handleDragLeave);
|
|
43
|
+
document.addEventListener("dragover", handleDragOver);
|
|
44
|
+
document.addEventListener("drop", handleDrop);
|
|
45
|
+
});
|
|
46
|
+
onBeforeUnmount(() => {
|
|
47
|
+
document.removeEventListener("dragenter", handleDragEnter);
|
|
48
|
+
document.removeEventListener("dragover", handleDragOver);
|
|
49
|
+
document.removeEventListener("dragleave", handleDragLeave);
|
|
50
|
+
document.removeEventListener("drop", handleDrop);
|
|
51
|
+
});
|
|
52
|
+
function isFromApp(event) {
|
|
53
|
+
return event.dataTransfer?.types.includes("text/html") ?? false;
|
|
54
|
+
}
|
|
55
|
+
function handleDrop(event) {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
isDragging.value = false;
|
|
58
|
+
dragCounter = 0;
|
|
59
|
+
if (isFromApp(event)) return;
|
|
60
|
+
if (event.dataTransfer) {
|
|
61
|
+
const droppedText = event.dataTransfer.getData("text").replace(/^blob:/, "");
|
|
62
|
+
if (droppedText) emit("input", droppedText, null, "drop");
|
|
63
|
+
else if (event.dataTransfer.files.length > 0) {
|
|
64
|
+
const file = event.dataTransfer.files[0];
|
|
65
|
+
if (!file) return;
|
|
66
|
+
const reader = new FileReader();
|
|
67
|
+
reader.onload = (e) => {
|
|
68
|
+
if (e.target && typeof e.target.result === "string") emit("input", e.target.result, null, "drop");
|
|
69
|
+
};
|
|
70
|
+
reader.readAsText(file);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function handleDragOver(event) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
}
|
|
77
|
+
function handleDragLeave(event) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
dragCounter--;
|
|
80
|
+
if (dragCounter === 0) isDragging.value = false;
|
|
81
|
+
}
|
|
82
|
+
function handleDragEnter(event) {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
dragCounter++;
|
|
85
|
+
if (isFromApp(event)) return;
|
|
86
|
+
if (event.dataTransfer) {
|
|
87
|
+
const items = event.dataTransfer.items;
|
|
88
|
+
for (const item of items) if (item?.kind === "string" || item?.type?.includes("json") || item?.type?.includes("yml") || item?.type?.includes("yaml")) {
|
|
89
|
+
isDragging.value = true;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
isDragging.value = false;
|
|
94
|
+
}
|
|
95
|
+
return (_ctx, _cache) => {
|
|
96
|
+
return openBlock(), createBlock(Transition, {
|
|
97
|
+
enterActiveClass: "transition-opacity duration-200",
|
|
98
|
+
enterFromClass: "opacity-0",
|
|
99
|
+
leaveActiveClass: "transition-opacity duration-200",
|
|
100
|
+
leaveToClass: "opacity-0"
|
|
101
|
+
}, {
|
|
102
|
+
default: withCtx(() => [isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", _hoisted_2$3, [createElementVNode("div", null, [createVNode(unref(ScalarIcon), {
|
|
103
|
+
icon: "Download",
|
|
104
|
+
size: "xl",
|
|
105
|
+
thickness: "2"
|
|
106
|
+
})]), _cache[0] || (_cache[0] = createElementVNode("div", { class: "text-c-1 m-4 text-center" }, " Drop your OpenAPI document here ", -1))])])) : createCommentVNode("", true)]),
|
|
107
|
+
_: 1
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/ImportCollection/hooks/useUrlPrefetcher.ts
|
|
114
|
+
/**
|
|
115
|
+
* Vue composable for URL prefetching
|
|
116
|
+
*/
|
|
117
|
+
function useUrlPrefetcher() {
|
|
118
|
+
const prefetchResult = reactive({
|
|
119
|
+
state: "idle",
|
|
120
|
+
content: null,
|
|
121
|
+
url: null,
|
|
122
|
+
input: null,
|
|
123
|
+
error: null
|
|
124
|
+
});
|
|
125
|
+
function resetPrefetchResult() {
|
|
126
|
+
Object.assign(prefetchResult, {
|
|
127
|
+
state: "idle",
|
|
128
|
+
content: null,
|
|
129
|
+
url: null,
|
|
130
|
+
input: null,
|
|
131
|
+
error: null
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async function prefetchUrl(input, proxyUrl) {
|
|
135
|
+
if (!input) return {
|
|
136
|
+
state: "idle",
|
|
137
|
+
content: null,
|
|
138
|
+
url: null,
|
|
139
|
+
input,
|
|
140
|
+
error: null
|
|
141
|
+
};
|
|
142
|
+
try {
|
|
143
|
+
const urlOrDocument = await resolve(input, { fetch: (url) => {
|
|
144
|
+
return fetch(proxyUrl ? redirectToProxy(proxyUrl, url) : url, { cache: "no-cache" });
|
|
145
|
+
} });
|
|
146
|
+
if (typeof urlOrDocument === "object" && urlOrDocument !== null) return {
|
|
147
|
+
state: "idle",
|
|
148
|
+
content: JSON.stringify(urlOrDocument, null, 2),
|
|
149
|
+
url: null,
|
|
150
|
+
error: null
|
|
151
|
+
};
|
|
152
|
+
if (urlOrDocument === void 0) return {
|
|
153
|
+
state: "idle",
|
|
154
|
+
content: null,
|
|
155
|
+
url: null,
|
|
156
|
+
input,
|
|
157
|
+
error: `Could not find an OpenAPI document in ${input}`
|
|
158
|
+
};
|
|
159
|
+
if (!isUrl$1(urlOrDocument)) return {
|
|
160
|
+
state: "idle",
|
|
161
|
+
content: null,
|
|
162
|
+
url: null,
|
|
163
|
+
input,
|
|
164
|
+
error: "Oops, we got invalid content for the given URL."
|
|
165
|
+
};
|
|
166
|
+
const url = urlOrDocument;
|
|
167
|
+
const result = await fetchWithProxyFallback(url, {
|
|
168
|
+
proxyUrl,
|
|
169
|
+
cache: "no-cache"
|
|
170
|
+
});
|
|
171
|
+
if (!result.ok) return {
|
|
172
|
+
state: "idle",
|
|
173
|
+
content: null,
|
|
174
|
+
url: null,
|
|
175
|
+
input,
|
|
176
|
+
error: `Couldn't fetch ${url}, got error ${[result.status, result.statusText].join(" ").trim()}.`
|
|
177
|
+
};
|
|
178
|
+
return {
|
|
179
|
+
state: "idle",
|
|
180
|
+
content: await result.text(),
|
|
181
|
+
url,
|
|
182
|
+
error: null
|
|
183
|
+
};
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.error("[prefetchDocument]", error);
|
|
186
|
+
return {
|
|
187
|
+
state: "idle",
|
|
188
|
+
content: null,
|
|
189
|
+
url: null,
|
|
190
|
+
input,
|
|
191
|
+
error: error.message
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
async function prefetchUrlAndUpdateState(input, proxyUrl) {
|
|
196
|
+
Object.assign(prefetchResult, {
|
|
197
|
+
state: "loading",
|
|
198
|
+
content: null,
|
|
199
|
+
url: null,
|
|
200
|
+
input,
|
|
201
|
+
error: null
|
|
202
|
+
});
|
|
203
|
+
const result = await prefetchUrl(input, proxyUrl);
|
|
204
|
+
Object.assign(prefetchResult, result);
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
prefetchResult,
|
|
209
|
+
prefetchUrl: prefetchUrlAndUpdateState,
|
|
210
|
+
resetPrefetchResult
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/components/ImportCollection/utils/is-url.ts
|
|
215
|
+
/**
|
|
216
|
+
* Checks whether the given string is an URL
|
|
217
|
+
**/
|
|
218
|
+
function isUrl(input) {
|
|
219
|
+
if (!input) return false;
|
|
220
|
+
const trimmed = input.trim();
|
|
221
|
+
if (!trimmed.startsWith("http://") && !trimmed.startsWith("https://")) return false;
|
|
222
|
+
return trimmed.replace(/^https?:\/\//, "").length > 0;
|
|
223
|
+
}
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/components/ImportCollection/utils/import-collection.ts
|
|
226
|
+
async function importCollection({ store, workspace, source, watchMode, onSuccess, onError }) {
|
|
227
|
+
try {
|
|
228
|
+
if (source && workspace) {
|
|
229
|
+
if (isUrl(source)) {
|
|
230
|
+
const [error, entities] = await store.importSpecFromUrl(source, workspace.uid, {
|
|
231
|
+
proxyUrl: workspace.proxyUrl,
|
|
232
|
+
watchMode
|
|
233
|
+
});
|
|
234
|
+
if (!error) onSuccess(entities?.collection);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
onSuccess((await store.importSpecFile(source, workspace.uid))?.collection);
|
|
238
|
+
}
|
|
239
|
+
} catch (error) {
|
|
240
|
+
onError(error);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/components/ImportCollection/ImportNowButton.vue
|
|
245
|
+
var ImportNowButton_default = /* @__PURE__ */ defineComponent({
|
|
246
|
+
__name: "ImportNowButton",
|
|
247
|
+
props: {
|
|
248
|
+
source: {},
|
|
249
|
+
variant: {},
|
|
250
|
+
watchMode: {
|
|
251
|
+
type: Boolean,
|
|
252
|
+
default: true
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
emits: ["importFinished"],
|
|
256
|
+
setup(__props, { emit: __emit }) {
|
|
257
|
+
const emit = __emit;
|
|
258
|
+
const router = useRouter();
|
|
259
|
+
const store = useWorkspace();
|
|
260
|
+
const { activeWorkspace } = useActiveEntities();
|
|
261
|
+
const { toast } = useToasts();
|
|
262
|
+
function handleImportCollection() {
|
|
263
|
+
importCollection({
|
|
264
|
+
store,
|
|
265
|
+
workspace: activeWorkspace.value,
|
|
266
|
+
source: __props.source,
|
|
267
|
+
watchMode: __props.watchMode,
|
|
268
|
+
onSuccess(collection) {
|
|
269
|
+
if (collection) {
|
|
270
|
+
redirectToFirstRequestInCollection(collection);
|
|
271
|
+
toast("Import successful", "info");
|
|
272
|
+
emit("importFinished");
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
onError(error) {
|
|
276
|
+
console.error("[importCollection]", error);
|
|
277
|
+
toast(`Import failed: ${error?.message || "Unknown error"}`, "error");
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
function redirectToFirstRequestInCollection(collection) {
|
|
282
|
+
if (!collection) return;
|
|
283
|
+
router.push({
|
|
284
|
+
name: "request",
|
|
285
|
+
params: {
|
|
286
|
+
workspace: activeWorkspace.value?.uid,
|
|
287
|
+
request: collection?.requests[0]
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
return (_ctx, _cache) => {
|
|
292
|
+
return __props.source ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.variant === "button" ? (openBlock(), createBlock(unref(ScalarButton), {
|
|
293
|
+
key: 0,
|
|
294
|
+
class: "mt-3 h-fit w-full rounded-lg px-6 py-2.5 font-bold",
|
|
295
|
+
size: "md",
|
|
296
|
+
type: "button",
|
|
297
|
+
onClick: handleImportCollection
|
|
298
|
+
}, {
|
|
299
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Import Collection ", -1)])]),
|
|
300
|
+
_: 1
|
|
301
|
+
})) : (openBlock(), createBlock(unref(ScalarButton), {
|
|
302
|
+
key: 1,
|
|
303
|
+
class: "h-fit rounded-lg px-6 py-2.5 text-[21px] font-bold",
|
|
304
|
+
size: "md",
|
|
305
|
+
type: "button",
|
|
306
|
+
variant: "ghost",
|
|
307
|
+
onClick: handleImportCollection
|
|
308
|
+
}, {
|
|
309
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Try it in the browser ", -1)])]),
|
|
310
|
+
_: 1
|
|
311
|
+
}))], 64)) : createCommentVNode("", true);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/components/ImportCollection/PrefetchError.vue?vue&type=script&setup=true&lang.ts
|
|
317
|
+
var _hoisted_1$2 = { class: "w-full text-center text-sm font-medium break-words" };
|
|
318
|
+
var _hoisted_2$2 = ["href"];
|
|
319
|
+
var _hoisted_3$2 = {
|
|
320
|
+
key: 1,
|
|
321
|
+
textContent: "OpenAPI document manually"
|
|
322
|
+
};
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/components/ImportCollection/PrefetchError.vue
|
|
325
|
+
var PrefetchError_default = /* @__PURE__ */ defineComponent({
|
|
326
|
+
__name: "PrefetchError",
|
|
327
|
+
props: { url: {} },
|
|
328
|
+
setup(__props) {
|
|
329
|
+
return (_ctx, _cache) => {
|
|
330
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
331
|
+
_cache[0] || (_cache[0] = createTextVNode(" We couldn't find an OpenAPI document at the provided URL. Please download and import the ", -1)),
|
|
332
|
+
__props.url && unref(isUrl$1)(__props.url) ? (openBlock(), createElementBlock("a", {
|
|
333
|
+
key: 0,
|
|
334
|
+
href: __props.url,
|
|
335
|
+
rel: "noopener nofollow",
|
|
336
|
+
target: "_blank",
|
|
337
|
+
textContent: "OpenAPI document manually"
|
|
338
|
+
}, null, 8, _hoisted_2$2)) : (openBlock(), createElementBlock("span", _hoisted_3$2)),
|
|
339
|
+
_cache[1] || (_cache[1] = createTextVNode(". ", -1))
|
|
340
|
+
]);
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/components/ImportCollection/utils/is-document.ts
|
|
346
|
+
/** Checks whether the given string could be an OpenAPI document */
|
|
347
|
+
function isDocument(input) {
|
|
348
|
+
if (!input || input.trim().length === 0) return false;
|
|
349
|
+
const trimmed = input.trim();
|
|
350
|
+
if (trimmed.startsWith("http://") || trimmed.startsWith("https://")) return false;
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/components/ImportCollection/utils/get-openapi-version.ts
|
|
355
|
+
/**
|
|
356
|
+
* Get the Swagger/OpenAPI version and format from the given string
|
|
357
|
+
*/
|
|
358
|
+
function getOpenApiVersion(input) {
|
|
359
|
+
if (!isDocument(input)) return false;
|
|
360
|
+
try {
|
|
361
|
+
const result = JSON.parse(input ?? "");
|
|
362
|
+
if (typeof result?.openapi === "string") return `OpenAPI ${result.openapi} JSON`;
|
|
363
|
+
if (typeof result?.swagger === "string") return `Swagger ${result.swagger} JSON`;
|
|
364
|
+
return false;
|
|
365
|
+
} catch {}
|
|
366
|
+
try {
|
|
367
|
+
const result = parse(input ?? "");
|
|
368
|
+
if (typeof result?.openapi === "string") return `OpenAPI ${result.openapi} YAML`;
|
|
369
|
+
if (typeof result?.swagger === "string") return `Swagger ${result.swagger} YAML`;
|
|
370
|
+
return false;
|
|
371
|
+
} catch {}
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region src/components/ImportCollection/WorkspaceSelector.vue?vue&type=script&setup=true&lang.ts
|
|
376
|
+
var _hoisted_1$1 = { class: "flex w-[inherit] items-center text-base" };
|
|
377
|
+
var _hoisted_2$1 = { class: "m-0 flex items-center gap-1 text-sm font-medium" };
|
|
378
|
+
var _hoisted_3$1 = { class: "line-clamp-1 w-[calc(100%-10px)] text-left text-xs" };
|
|
379
|
+
var _hoisted_4$1 = { class: "overflow-hidden text-ellipsis" };
|
|
380
|
+
var _hoisted_5$1 = { class: "flex h-4 w-4 items-center justify-center" };
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/components/ImportCollection/WorkspaceSelector.vue
|
|
383
|
+
var WorkspaceSelector_default = /* @__PURE__ */ defineComponent({
|
|
384
|
+
__name: "WorkspaceSelector",
|
|
385
|
+
setup(__props) {
|
|
386
|
+
const { activeWorkspace } = useActiveEntities();
|
|
387
|
+
const { workspaces, workspaceMutators } = useWorkspace();
|
|
388
|
+
const { push } = useRouter();
|
|
389
|
+
const modal = useModal();
|
|
390
|
+
const { toast } = useToasts();
|
|
391
|
+
const workspaceName = ref("");
|
|
392
|
+
const updateSelected = (uid) => {
|
|
393
|
+
if (uid === activeWorkspace.value?.uid) return;
|
|
394
|
+
push({
|
|
395
|
+
name: "workspace",
|
|
396
|
+
params: { workspace: uid }
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
const handleCreateWorkspace = () => {
|
|
400
|
+
if (!workspaceName.value.trim()) {
|
|
401
|
+
toast("Please enter a name before creating a workspace.", "error");
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
const newWorkspace = workspaceMutators.add({ name: workspaceName.value });
|
|
405
|
+
toast(`Created new workspace '${newWorkspace.name}'`);
|
|
406
|
+
push({
|
|
407
|
+
name: "workspace",
|
|
408
|
+
params: { workspace: newWorkspace.uid }
|
|
409
|
+
});
|
|
410
|
+
workspaceName.value = "";
|
|
411
|
+
modal.hide();
|
|
412
|
+
};
|
|
413
|
+
return (_ctx, _cache) => {
|
|
414
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1$1, [createVNode(unref(ScalarDropdown), null, {
|
|
415
|
+
items: withCtx(() => [
|
|
416
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(workspaces), (workspace, uid) => {
|
|
417
|
+
return openBlock(), createBlock(unref(ScalarDropdownItem), {
|
|
418
|
+
key: uid,
|
|
419
|
+
class: "group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
420
|
+
onClick: withModifiers(($event) => updateSelected(uid), ["stop"])
|
|
421
|
+
}, {
|
|
422
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["flex h-4 w-4 items-center justify-center rounded-full p-[3px]", unref(activeWorkspace)?.uid === uid ? "bg-c-accent text-b-1" : "shadow-border text-transparent"]) }, [createVNode(unref(ScalarIcon), {
|
|
423
|
+
class: "size-2.5",
|
|
424
|
+
icon: "Checkmark",
|
|
425
|
+
thickness: "3"
|
|
426
|
+
})], 2), createElementVNode("span", _hoisted_4$1, toDisplayString(workspace.name), 1)]),
|
|
427
|
+
_: 2
|
|
428
|
+
}, 1032, ["onClick"]);
|
|
429
|
+
}), 128)),
|
|
430
|
+
createVNode(unref(ScalarDropdownDivider)),
|
|
431
|
+
createVNode(unref(ScalarDropdownItem), {
|
|
432
|
+
class: "flex items-center gap-1.5",
|
|
433
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(modal).show())
|
|
434
|
+
}, {
|
|
435
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5$1, [createVNode(unref(ScalarIcon), {
|
|
436
|
+
icon: "Add",
|
|
437
|
+
size: "sm"
|
|
438
|
+
})]), _cache[2] || (_cache[2] = createElementVNode("span", null, "New Workspace", -1))]),
|
|
439
|
+
_: 1
|
|
440
|
+
})
|
|
441
|
+
]),
|
|
442
|
+
default: withCtx(() => [createVNode(unref(ScalarButton), {
|
|
443
|
+
class: "hover:bg-b-2 text-c-3 line-clamp-1 h-full w-fit justify-start px-1.5 py-1 font-normal",
|
|
444
|
+
variant: "ghost"
|
|
445
|
+
}, {
|
|
446
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createElementVNode("h2", _hoisted_3$1, toDisplayString(unref(activeWorkspace)?.name), 1), createVNode(unref(ScalarIcon), {
|
|
447
|
+
icon: "ChevronDown",
|
|
448
|
+
size: "md"
|
|
449
|
+
})])]),
|
|
450
|
+
_: 1
|
|
451
|
+
})]),
|
|
452
|
+
_: 1
|
|
453
|
+
})]), createVNode(unref(ScalarModal), {
|
|
454
|
+
bodyClass: "m-0 p-1 rounded-lg border-t-0",
|
|
455
|
+
class: "z-overlay absolute",
|
|
456
|
+
size: "xxs",
|
|
457
|
+
state: unref(modal),
|
|
458
|
+
variant: "form"
|
|
459
|
+
}, {
|
|
460
|
+
default: withCtx(() => [createElementVNode("form", {
|
|
461
|
+
class: "flex gap-1",
|
|
462
|
+
onSubmit: withModifiers(handleCreateWorkspace, ["prevent"])
|
|
463
|
+
}, [withDirectives(createElementVNode("input", {
|
|
464
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => workspaceName.value = $event),
|
|
465
|
+
class: "min-h-8 w-full flex-1 border-none p-1.5 text-sm outline-none",
|
|
466
|
+
placeholder: "New Workspace",
|
|
467
|
+
type: "text"
|
|
468
|
+
}, null, 512), [[vModelText, workspaceName.value]]), createVNode(unref(ScalarButton), {
|
|
469
|
+
class: "max-h-8 p-0 px-3 text-xs",
|
|
470
|
+
disabled: !workspaceName.value.trim(),
|
|
471
|
+
type: "submit"
|
|
472
|
+
}, {
|
|
473
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Continue ", -1)])]),
|
|
474
|
+
_: 1
|
|
475
|
+
}, 8, ["disabled"])], 32)]),
|
|
476
|
+
_: 1
|
|
477
|
+
}, 8, ["state"])], 64);
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/components/ImportCollection/ImportCollectionModal.vue?vue&type=script&setup=true&lang.ts
|
|
483
|
+
var _hoisted_1 = ["innerHTML"];
|
|
484
|
+
var _hoisted_2 = { class: "relative flex h-screen flex-col justify-center overflow-hidden px-6 md:px-0" };
|
|
485
|
+
var _hoisted_3 = {
|
|
486
|
+
key: 0,
|
|
487
|
+
class: "mb-2 flex items-center justify-center p-1"
|
|
488
|
+
};
|
|
489
|
+
var _hoisted_4 = { class: "size-10 rounded-xl" };
|
|
490
|
+
var _hoisted_5 = ["src"];
|
|
491
|
+
var _hoisted_6 = {
|
|
492
|
+
key: 2,
|
|
493
|
+
class: "text-md mb-2 line-clamp-1 text-center font-bold"
|
|
494
|
+
};
|
|
495
|
+
var _hoisted_7 = { class: "z-10 inline-flex w-full flex-col items-center gap-2" };
|
|
496
|
+
var _hoisted_8 = { class: "flex justify-center" };
|
|
497
|
+
var _hoisted_9 = { class: "text-c-3 inline-flex items-center px-4 py-1 text-xs font-medium" };
|
|
498
|
+
var _hoisted_10 = {
|
|
499
|
+
key: 0,
|
|
500
|
+
class: "mt-5 overflow-hidden border-t pt-4 text-sm"
|
|
501
|
+
};
|
|
502
|
+
var _hoisted_11 = { class: "flex items-center justify-center" };
|
|
503
|
+
var _hoisted_12 = { class: "flex flex-col items-center justify-center pb-8" };
|
|
504
|
+
var _hoisted_13 = { class: "flex flex-col items-center text-center" };
|
|
505
|
+
var _hoisted_14 = { class: "mb-2 flex h-10 w-10 items-center justify-center rounded-[10px] border" };
|
|
506
|
+
var _hoisted_15 = {
|
|
507
|
+
href: "https://scalar.com/download",
|
|
508
|
+
target: "_blank"
|
|
509
|
+
};
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region src/components/ImportCollection/ImportCollectionModal.vue
|
|
512
|
+
var ImportCollectionModal_default = /* @__PURE__ */ defineComponent({
|
|
513
|
+
__name: "ImportCollectionModal",
|
|
514
|
+
props: {
|
|
515
|
+
source: {},
|
|
516
|
+
integration: {},
|
|
517
|
+
eventType: {}
|
|
518
|
+
},
|
|
519
|
+
emits: ["importFinished"],
|
|
520
|
+
setup(__props, { emit: __emit }) {
|
|
521
|
+
const props = __props;
|
|
522
|
+
const emits = __emit;
|
|
523
|
+
const { activeWorkspace } = useActiveEntities();
|
|
524
|
+
const { workspaceMutators, events } = useWorkspace();
|
|
525
|
+
const { prefetchResult, prefetchUrl, resetPrefetchResult } = useUrlPrefetcher();
|
|
526
|
+
const modalState = useModal();
|
|
527
|
+
const watchMode = ref(true);
|
|
528
|
+
/** Close modal when a keyboard shortcut is pressed */
|
|
529
|
+
events.hotKeys.on(() => modalState.hide());
|
|
530
|
+
/** Try to make the retrieved content an OpenAPI document */
|
|
531
|
+
const openApiDocument = computed(() => {
|
|
532
|
+
try {
|
|
533
|
+
return normalize(prefetchResult.content || props.source || "");
|
|
534
|
+
} catch {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
/** Title from the OpenAPI document */
|
|
539
|
+
const title = computed(() => openApiDocument.value?.info?.title);
|
|
540
|
+
/** The OpenAPI/Swagger version */
|
|
541
|
+
const version = computed(() => getOpenApiVersion(prefetchResult.content || props.source || ""));
|
|
542
|
+
const { darkLightMode } = useColorMode();
|
|
543
|
+
const { currentRoute } = useRouter();
|
|
544
|
+
/** Grab light and dark logos from the url query params */
|
|
545
|
+
const companyLogo = computed(() => {
|
|
546
|
+
try {
|
|
547
|
+
const query = currentRoute.value.query;
|
|
548
|
+
const logo = darkLightMode.value === "dark" ? query.dark_logo : query.light_logo;
|
|
549
|
+
if (logo) return decodeURIComponent(logo);
|
|
550
|
+
} catch {}
|
|
551
|
+
return null;
|
|
552
|
+
});
|
|
553
|
+
/** Open/close modal on events */
|
|
554
|
+
watch(() => props.source, async (value) => {
|
|
555
|
+
resetPrefetchResult();
|
|
556
|
+
if (isUrl(value)) {
|
|
557
|
+
if (props.eventType && ["paste", "drop"].includes(props.eventType)) {
|
|
558
|
+
const { error } = await prefetchUrl(value, activeWorkspace.value?.proxyUrl);
|
|
559
|
+
if (error) modalState.hide();
|
|
560
|
+
else modalState.show();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
prefetchUrl(value, activeWorkspace.value?.proxyUrl);
|
|
564
|
+
modalState.show();
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (!value) modalState.hide();
|
|
568
|
+
else if (isDocument(value) && getOpenApiVersion(value)) modalState.show();
|
|
569
|
+
else modalState.hide();
|
|
570
|
+
});
|
|
571
|
+
const hasUrl = computed(() => !!props.source && isUrl(props.source));
|
|
572
|
+
const hasContent = computed(() => !!props.source && isDocument(props.source));
|
|
573
|
+
/** Show the integration icon only for local URLs */
|
|
574
|
+
const shouldShowIntegrationIcon = computed(() => {
|
|
575
|
+
return prefetchResult.url && isLocalUrl(prefetchResult.url);
|
|
576
|
+
});
|
|
577
|
+
const toggleBodyClass = (add) => {
|
|
578
|
+
document.body.classList.remove("has-no-import-url");
|
|
579
|
+
if (add && (hasUrl.value || hasContent.value) && modalState.open) document.body.classList.add("has-import-url");
|
|
580
|
+
else document.body.classList.remove("has-import-url");
|
|
581
|
+
};
|
|
582
|
+
/** Toggles the 'has-import-url' class on the body element */
|
|
583
|
+
const closeModal = () => {
|
|
584
|
+
document.body.classList.remove("has-import-url");
|
|
585
|
+
document.body.classList.add("has-no-import-url");
|
|
586
|
+
};
|
|
587
|
+
watch(() => modalState.open, (isOpen) => {
|
|
588
|
+
if (isOpen) toggleBodyClass(true);
|
|
589
|
+
else closeModal();
|
|
590
|
+
});
|
|
591
|
+
watch(() => props.source, () => {
|
|
592
|
+
toggleBodyClass(true);
|
|
593
|
+
});
|
|
594
|
+
onMounted(() => {
|
|
595
|
+
toggleBodyClass(true);
|
|
596
|
+
});
|
|
597
|
+
onUnmounted(() => {
|
|
598
|
+
document.body.classList.remove("has-import-url");
|
|
599
|
+
document.body.classList.remove("has-no-import-url");
|
|
600
|
+
});
|
|
601
|
+
const themeStyleTag = computed(() => activeWorkspace.value && shouldShowIntegrationIcon.value && props.integration && `<style>${getThemeStyles(props.integration)}</style>`);
|
|
602
|
+
function handleImportFinished() {
|
|
603
|
+
const isIntegrationThemeId = (value) => themeIds.includes(value);
|
|
604
|
+
const integrationThemeId = props.integration && isIntegrationThemeId(props.integration) ? props.integration : "default";
|
|
605
|
+
if (shouldShowIntegrationIcon.value) workspaceMutators.edit(activeWorkspace.value?.uid, "themeId", integrationThemeId);
|
|
606
|
+
emits("importFinished");
|
|
607
|
+
}
|
|
608
|
+
return (_ctx, _cache) => {
|
|
609
|
+
return openBlock(), createBlock(unref(ScalarModal), {
|
|
610
|
+
size: "full",
|
|
611
|
+
state: unref(modalState)
|
|
612
|
+
}, {
|
|
613
|
+
default: withCtx(() => [themeStyleTag.value ? (openBlock(), createElementBlock("div", {
|
|
614
|
+
key: 0,
|
|
615
|
+
innerHTML: themeStyleTag.value
|
|
616
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true), createElementVNode("div", _hoisted_2, [
|
|
617
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "section-flare" }, [
|
|
618
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
619
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
620
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
621
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
622
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
623
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
624
|
+
createElementVNode("div", { class: "section-flare-item" }),
|
|
625
|
+
createElementVNode("div", { class: "section-flare-item" })
|
|
626
|
+
], -1)),
|
|
627
|
+
createElementVNode("div", { class: normalizeClass(["m-auto flex w-full max-w-[380px] flex-col items-center rounded-xl border px-8 py-8 transition-opacity", { "opacity-0": unref(prefetchResult).state === "loading" }]) }, [unref(prefetchResult).error && unref(prefetchResult).state === "idle" && !version.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "text-md mb-2 line-clamp-1 text-center font-bold" }, " No OpenAPI document found ", -1)), createVNode(PrefetchError_default, { url: unref(prefetchResult)?.input || props.source }, null, 8, ["url"])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
628
|
+
shouldShowIntegrationIcon.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [createVNode(IntegrationLogo_default, { integration: __props.integration }, null, 8, ["integration"])])])) : companyLogo.value ? (openBlock(), createElementBlock("img", {
|
|
629
|
+
key: 1,
|
|
630
|
+
alt: "Logo",
|
|
631
|
+
class: "mb-2 w-full object-contain",
|
|
632
|
+
src: companyLogo.value
|
|
633
|
+
}, null, 8, _hoisted_5)) : createCommentVNode("", true),
|
|
634
|
+
!companyLogo.value ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(title.value || "Untitled Collection"), 1)) : createCommentVNode("", true),
|
|
635
|
+
_cache[4] || (_cache[4] = createElementVNode("div", { class: "text-c-1 text-center text-sm font-medium text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
|
|
636
|
+
version.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
637
|
+
createElementVNode("div", _hoisted_7, [createVNode(ImportNowButton_default, {
|
|
638
|
+
source: unref(prefetchResult)?.url ?? unref(prefetchResult)?.content ?? __props.source,
|
|
639
|
+
variant: "button",
|
|
640
|
+
watchMode: watchMode.value,
|
|
641
|
+
onImportFinished: handleImportFinished
|
|
642
|
+
}, null, 8, ["source", "watchMode"])]),
|
|
643
|
+
createElementVNode("div", _hoisted_8, [createElementVNode("div", _hoisted_9, [_cache[2] || (_cache[2] = createTextVNode(" Import to: ", -1)), createVNode(WorkspaceSelector_default)])]),
|
|
644
|
+
unref(prefetchResult)?.url ? (openBlock(), createElementBlock("div", _hoisted_10, [createElementVNode("div", _hoisted_11, [createVNode(WatchModeToggle_default, {
|
|
645
|
+
modelValue: watchMode.value,
|
|
646
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => watchMode.value = $event),
|
|
647
|
+
disableToolTip: true
|
|
648
|
+
}, null, 8, ["modelValue"])]), _cache[3] || (_cache[3] = createElementVNode("div", { class: "text-c-3 pt-0 text-center text-xs font-medium text-balance" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))])) : createCommentVNode("", true)
|
|
649
|
+
], 64)) : createCommentVNode("", true)
|
|
650
|
+
], 64))], 2),
|
|
651
|
+
createElementVNode("div", _hoisted_12, [createElementVNode("div", _hoisted_13, [createElementVNode("div", _hoisted_14, [createElementVNode("a", _hoisted_15, [createVNode(unref(ScalarIcon), {
|
|
652
|
+
icon: "Logo",
|
|
653
|
+
size: "xl"
|
|
654
|
+
})])]), _cache[5] || (_cache[5] = createElementVNode("span", { class: "text-c-2 text-sm leading-snug font-medium" }, [
|
|
655
|
+
createElementVNode("a", {
|
|
656
|
+
class: "hover:text-c-1 mb-1 inline-block underline-offset-2",
|
|
657
|
+
href: "https://scalar.com/download",
|
|
658
|
+
target: "_blank"
|
|
659
|
+
}, " Download Desktop App "),
|
|
660
|
+
createElementVNode("br"),
|
|
661
|
+
createTextVNode(" free · open-source · offline first ")
|
|
662
|
+
], -1))])])
|
|
663
|
+
])]),
|
|
664
|
+
_: 1
|
|
665
|
+
}, 8, ["state"]);
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region src/components/ImportCollection/PasteEventListener.vue
|
|
671
|
+
var PasteEventListener_default = /* @__PURE__ */ defineComponent({
|
|
672
|
+
__name: "PasteEventListener",
|
|
673
|
+
emits: ["input"],
|
|
674
|
+
setup(__props, { emit: __emit }) {
|
|
675
|
+
const emit = __emit;
|
|
676
|
+
onMounted(() => {
|
|
677
|
+
document.addEventListener("paste", handlePaste);
|
|
678
|
+
});
|
|
679
|
+
onBeforeUnmount(() => {
|
|
680
|
+
document.removeEventListener("paste", handlePaste);
|
|
681
|
+
});
|
|
682
|
+
function handlePaste(event) {
|
|
683
|
+
const target = event.target;
|
|
684
|
+
const isCodeMirror = Boolean(document.activeElement?.classList.contains("cm-content"));
|
|
685
|
+
if (target && (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable || isCodeMirror)) return;
|
|
686
|
+
if (event.clipboardData) {
|
|
687
|
+
const pastedText = event.clipboardData.getData("text");
|
|
688
|
+
if (pastedText) emit("input", pastedText, null, "paste");
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
return (_ctx, _cache) => {
|
|
692
|
+
return null;
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region src/components/ImportCollection/UrlQueryParameterChecker.vue
|
|
698
|
+
var UrlQueryParameterChecker_default = /* @__PURE__ */ defineComponent({
|
|
699
|
+
__name: "UrlQueryParameterChecker",
|
|
700
|
+
emits: ["input"],
|
|
701
|
+
setup(__props, { emit: __emit }) {
|
|
702
|
+
const emit = __emit;
|
|
703
|
+
onMounted(() => {
|
|
704
|
+
const queryParameters = new URLSearchParams(window.location.search);
|
|
705
|
+
const urlQueryParameter = queryParameters.get("url");
|
|
706
|
+
if (urlQueryParameter) emit("input", urlQueryParameter, queryParameters.get("integration"), "query");
|
|
707
|
+
});
|
|
708
|
+
return (_ctx, _cache) => {
|
|
709
|
+
return null;
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region src/components/ImportCollection/ImportCollectionListener.vue
|
|
715
|
+
var ImportCollectionListener_default = /* @__PURE__ */ defineComponent({
|
|
716
|
+
__name: "ImportCollectionListener",
|
|
717
|
+
setup(__props) {
|
|
718
|
+
const store = useWorkspace();
|
|
719
|
+
/** Source to import from */
|
|
720
|
+
const source = ref(null);
|
|
721
|
+
const integration = ref(null);
|
|
722
|
+
const eventType = ref(null);
|
|
723
|
+
/** Reset the data when the modal was closed */
|
|
724
|
+
async function resetData() {
|
|
725
|
+
source.value = null;
|
|
726
|
+
integration.value = null;
|
|
727
|
+
eventType.value = null;
|
|
728
|
+
await nextTick();
|
|
729
|
+
}
|
|
730
|
+
/** Receive data from the paste event listener */
|
|
731
|
+
async function handleInput(newSource, newIntegration = null, newEventType) {
|
|
732
|
+
await resetData();
|
|
733
|
+
if (workspaceStoreIsEmpty(store)) {
|
|
734
|
+
console.info("Workspace store is empty, directly importing:", newSource);
|
|
735
|
+
if (await handleImportCollection(newSource)) return;
|
|
736
|
+
console.warn("Failed to import the collection from:", newSource);
|
|
737
|
+
}
|
|
738
|
+
source.value = newSource;
|
|
739
|
+
integration.value = newIntegration;
|
|
740
|
+
eventType.value = newEventType;
|
|
741
|
+
}
|
|
742
|
+
const router = useRouter();
|
|
743
|
+
const { activeWorkspace } = useActiveEntities();
|
|
744
|
+
const { toast } = useToasts();
|
|
745
|
+
function handleImportCollection(source) {
|
|
746
|
+
if (!source) return Promise.resolve(false);
|
|
747
|
+
return new Promise((resolve) => {
|
|
748
|
+
importCollection({
|
|
749
|
+
store,
|
|
750
|
+
workspace: activeWorkspace.value,
|
|
751
|
+
source,
|
|
752
|
+
watchMode: true,
|
|
753
|
+
onSuccess(collection) {
|
|
754
|
+
if (collection) {
|
|
755
|
+
redirectToFirstRequestInCollection(collection);
|
|
756
|
+
toast("Import successful", "info");
|
|
757
|
+
resolve(true);
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
toast("Import failed: No collection was created", "error");
|
|
761
|
+
resolve(false);
|
|
762
|
+
},
|
|
763
|
+
onError(error) {
|
|
764
|
+
console.error("[importCollection]", error);
|
|
765
|
+
toast(`Import failed: ${error?.message || "Unknown error"}`, "error");
|
|
766
|
+
resolve(false);
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
function redirectToFirstRequestInCollection(collection) {
|
|
772
|
+
if (!collection) return;
|
|
773
|
+
router.push({
|
|
774
|
+
name: "request",
|
|
775
|
+
params: {
|
|
776
|
+
workspace: activeWorkspace.value?.uid,
|
|
777
|
+
request: collection?.requests[0]
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
return (_ctx, _cache) => {
|
|
782
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
783
|
+
createVNode(ImportCollectionModal_default, {
|
|
784
|
+
eventType: eventType.value,
|
|
785
|
+
integration: integration.value,
|
|
786
|
+
source: source.value,
|
|
787
|
+
onImportFinished: resetData
|
|
788
|
+
}, null, 8, [
|
|
789
|
+
"eventType",
|
|
790
|
+
"integration",
|
|
791
|
+
"source"
|
|
792
|
+
]),
|
|
793
|
+
createVNode(PasteEventListener_default, { onInput: handleInput }),
|
|
794
|
+
createVNode(DropEventListener_default, { onInput: handleInput }),
|
|
795
|
+
createVNode(UrlQueryParameterChecker_default, { onInput: handleInput }),
|
|
796
|
+
renderSlot(_ctx.$slots, "default")
|
|
797
|
+
], 64);
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
//#endregion
|
|
802
|
+
export { ImportCollectionListener_default as t };
|
|
803
|
+
|
|
804
|
+
//# sourceMappingURL=ImportCollection-DfX1UQ5u.js.map
|