@scalar/api-client 2.38.1 → 2.38.3
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 +17 -0
- package/dist/AddressBar-CX8xiYoe.js +302 -0
- package/dist/AddressBar-CX8xiYoe.js.map +1 -0
- package/dist/App-BpNPKHmM.js +533 -0
- package/dist/App-BpNPKHmM.js.map +1 -0
- package/dist/App-Ckirvnv1.js +2510 -0
- package/dist/App-Ckirvnv1.js.map +1 -0
- package/dist/CodeInput-BN7uw3Bh.js +694 -0
- package/dist/CodeInput-BN7uw3Bh.js.map +1 -0
- package/dist/CodeSnippet-D7Heh1nd.js +218 -0
- package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
- package/dist/Collection-ChAxs3rz.js +219 -0
- package/dist/Collection-ChAxs3rz.js.map +1 -0
- package/dist/CollectionAuthentication-BDpvv8cA.js +56 -0
- package/dist/CollectionAuthentication-BDpvv8cA.js.map +1 -0
- package/dist/CollectionCookies-DyjPPMdt.js +19 -0
- package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
- package/dist/CollectionEnvironment-dwisJ-h5.js +514 -0
- package/dist/CollectionEnvironment-dwisJ-h5.js.map +1 -0
- package/dist/CollectionOverview-CJ9-Vmei.js +131 -0
- package/dist/CollectionOverview-CJ9-Vmei.js.map +1 -0
- package/dist/CollectionScripts-CMNlBlby.js +19 -0
- package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
- package/dist/CollectionServers-BWkIGwz4.js +168 -0
- package/dist/CollectionServers-BWkIGwz4.js.map +1 -0
- package/dist/CollectionSettings-CqUUYOym.js +87 -0
- package/dist/CollectionSettings-CqUUYOym.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-BiA0IgO8.js +964 -0
- package/dist/CommandPalette-BiA0IgO8.js.map +1 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
- package/dist/Cookies-CNRSxP8J.js +284 -0
- package/dist/Cookies-CNRSxP8J.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-SkIUPlrB.js +166 -0
- package/dist/DataTableInput-SkIUPlrB.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-D_CbZk0A.js +416 -0
- package/dist/Environment-D_CbZk0A.js.map +1 -0
- package/dist/EnvironmentModal-CcyqnPc2.js +288 -0
- package/dist/EnvironmentModal-CcyqnPc2.js.map +1 -0
- package/dist/Form-bA4bV_oA.js +83 -0
- package/dist/Form-bA4bV_oA.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-BIYMxB9Q.js +804 -0
- package/dist/ImportCollection-BIYMxB9Q.js.map +1 -0
- package/dist/IntegrationLogo-B9EDW8db.js +51 -0
- package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
- package/dist/MainLayout-oMIJ5QXF.js +281 -0
- package/dist/MainLayout-oMIJ5QXF.js.map +1 -0
- package/dist/Modal-DkOa_KK0.js +67 -0
- package/dist/Modal-DkOa_KK0.js.map +1 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
- package/dist/Request-BWfYWyBa.js +212 -0
- package/dist/Request-BWfYWyBa.js.map +1 -0
- package/dist/RequestAuth-BU6ubH-c.js +989 -0
- package/dist/RequestAuth-BU6ubH-c.js.map +1 -0
- package/dist/RequestRoot-7xhK5_qr.js +1611 -0
- package/dist/RequestRoot-7xhK5_qr.js.map +1 -0
- package/dist/RequestSection-Bx8UHW-k.js +1582 -0
- package/dist/RequestSection-Bx8UHW-k.js.map +1 -0
- package/dist/ResponseSection-CLrgLMN_.js +949 -0
- package/dist/ResponseSection-CLrgLMN_.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-BS4zjUdO.js +303 -0
- package/dist/Server-BS4zjUdO.js.map +1 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
- package/dist/Settings-BuLKHzRY.js +347 -0
- package/dist/Settings-BuLKHzRY.js.map +1 -0
- package/dist/Sidebar-Xl9_nFXX.js +73 -0
- package/dist/Sidebar-Xl9_nFXX.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-ChixwQhN.js +61 -0
- package/dist/components-ChixwQhN.js.map +1 -0
- package/dist/components-DfJHvSLM.js +183 -0
- package/dist/components-DfJHvSLM.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-SybDPV0U.js +85 -0
- package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
- package/dist/get-server-url-UVN-dx79.js +32 -0
- package/dist/get-server-url-UVN-dx79.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-DE-hoO03.js +1674 -0
- package/dist/operation-block-DE-hoO03.js.map +1 -0
- package/dist/operation-code-sample-xgx4qi2H.js +1738 -0
- package/dist/operation-code-sample-xgx4qi2H.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-N7dPFyrG.js +1466 -0
- package/dist/request-block-N7dPFyrG.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-BbysOhkE.js +425 -0
- package/dist/scalar-address-bar-block-BbysOhkE.js.map +1 -0
- package/dist/scalar-auth-selector-block-Bs79QOMA.js +1889 -0
- package/dist/scalar-auth-selector-block-Bs79QOMA.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-DaPoVtIS.js +1512 -0
- package/dist/store-DaPoVtIS.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/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/index.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-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.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/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.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/constants.d.ts +3 -0
- package/dist/v2/constants.d.ts.map +1 -0
- 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/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/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/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/features/operation/index.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,232 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
|
|
2
|
+
import { t as DeleteSidebarListElement_default } from "./DeleteSidebarListElement-C-p87d03.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, resolveComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
|
+
import { ScalarIcon, ScalarModal, useModal } from "@scalar/components";
|
|
5
|
+
import { useRouter } from "vue-router";
|
|
6
|
+
import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
7
|
+
import { Draggable } from "@scalar/draggable";
|
|
8
|
+
//#region src/components/Sidebar/SidebarList.vue
|
|
9
|
+
var _sfc_main = {};
|
|
10
|
+
var _hoisted_1$2 = { class: "gap-1/2 flex flex-col px-3 pb-[75px]" };
|
|
11
|
+
function _sfc_render(_ctx, _cache) {
|
|
12
|
+
return openBlock(), createElementBlock("ul", _hoisted_1$2, [renderSlot(_ctx.$slots, "default")]);
|
|
13
|
+
}
|
|
14
|
+
var SidebarList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/Sidebar/SidebarListElementActions.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
+
var _hoisted_1$1 = { class: "absolute right-1 flex opacity-0 group-hover:opacity-100" };
|
|
18
|
+
var ModalAction = /* @__PURE__ */ function(ModalAction) {
|
|
19
|
+
ModalAction["Delete"] = "Delete";
|
|
20
|
+
ModalAction["None"] = "None";
|
|
21
|
+
return ModalAction;
|
|
22
|
+
}(ModalAction || {});
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/Sidebar/SidebarListElementActions.vue
|
|
25
|
+
var SidebarListElementActions_default = /* @__PURE__ */ defineComponent({
|
|
26
|
+
__name: "SidebarListElementActions",
|
|
27
|
+
props: {
|
|
28
|
+
variable: {},
|
|
29
|
+
warningMessage: {},
|
|
30
|
+
isCopyable: { type: Boolean },
|
|
31
|
+
isDeletable: { type: Boolean },
|
|
32
|
+
isRenameable: { type: Boolean }
|
|
33
|
+
},
|
|
34
|
+
emits: ["delete", "rename"],
|
|
35
|
+
setup(__props, { emit: __emit }) {
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const currentAction = ref({
|
|
38
|
+
action: ModalAction.None,
|
|
39
|
+
name: ""
|
|
40
|
+
});
|
|
41
|
+
const modalState = useModal();
|
|
42
|
+
const { copyToClipboard } = useClipboard();
|
|
43
|
+
function startActionFlow(action) {
|
|
44
|
+
currentAction.value = {
|
|
45
|
+
action,
|
|
46
|
+
name: __props.variable.name
|
|
47
|
+
};
|
|
48
|
+
modalState.show();
|
|
49
|
+
}
|
|
50
|
+
function handleModalClose() {
|
|
51
|
+
modalState.hide();
|
|
52
|
+
currentAction.value = {
|
|
53
|
+
action: ModalAction.None,
|
|
54
|
+
name: ""
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function handleDelete(id) {
|
|
58
|
+
emit("delete", id);
|
|
59
|
+
handleModalClose();
|
|
60
|
+
}
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1$1, [
|
|
63
|
+
__props.isCopyable ? (openBlock(), createElementBlock("button", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(__props.variable.name))
|
|
68
|
+
}, [createVNode(unref(ScalarIcon), {
|
|
69
|
+
class: "h-3 w-3",
|
|
70
|
+
icon: "Clipboard"
|
|
71
|
+
})])) : createCommentVNode("", true),
|
|
72
|
+
__props.isRenameable ? (openBlock(), createElementBlock("button", {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("rename", __props.variable.uid))
|
|
77
|
+
}, [createVNode(unref(ScalarIcon), {
|
|
78
|
+
class: "h-3 w-3",
|
|
79
|
+
icon: "Edit"
|
|
80
|
+
})])) : createCommentVNode("", true),
|
|
81
|
+
!__props.variable.isDefault && __props.isDeletable ? (openBlock(), createElementBlock("button", {
|
|
82
|
+
key: 2,
|
|
83
|
+
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => startActionFlow(ModalAction.Delete), ["prevent"]))
|
|
86
|
+
}, [createVNode(unref(ScalarIcon), {
|
|
87
|
+
class: "h-3.5 w-3.5",
|
|
88
|
+
icon: "Close"
|
|
89
|
+
})])) : createCommentVNode("", true)
|
|
90
|
+
]), createVNode(unref(ScalarModal), {
|
|
91
|
+
size: "sm",
|
|
92
|
+
state: unref(modalState),
|
|
93
|
+
title: `${currentAction.value.action} ${currentAction.value.name}`
|
|
94
|
+
}, {
|
|
95
|
+
default: withCtx(() => [currentAction.value.action === ModalAction.Delete ? (openBlock(), createBlock(DeleteSidebarListElement_default, {
|
|
96
|
+
key: 0,
|
|
97
|
+
variableName: currentAction.value.name,
|
|
98
|
+
warningMessage: __props.warningMessage,
|
|
99
|
+
onClose: handleModalClose,
|
|
100
|
+
onDelete: _cache[3] || (_cache[3] = ($event) => handleDelete(__props.variable.uid))
|
|
101
|
+
}, null, 8, ["variableName", "warningMessage"])) : createCommentVNode("", true)]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["state", "title"])], 64);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/components/Sidebar/SidebarListElement.vue?vue&type=script&setup=true&lang.ts
|
|
109
|
+
var _hoisted_1 = { class: "empty-variable-name line-clamp-1 text-sm break-all group-hover:pr-5" };
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/Sidebar/SidebarListElement.vue
|
|
112
|
+
var SidebarListElement_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
113
|
+
__name: "SidebarListElement",
|
|
114
|
+
props: {
|
|
115
|
+
variable: {},
|
|
116
|
+
warningMessage: {},
|
|
117
|
+
to: {},
|
|
118
|
+
isDeletable: { type: Boolean },
|
|
119
|
+
isCopyable: { type: Boolean },
|
|
120
|
+
isRenameable: { type: Boolean },
|
|
121
|
+
isDraggable: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
125
|
+
isDroppable: {
|
|
126
|
+
type: [Boolean, Function],
|
|
127
|
+
default: false
|
|
128
|
+
},
|
|
129
|
+
collectionId: {}
|
|
130
|
+
},
|
|
131
|
+
emits: [
|
|
132
|
+
"delete",
|
|
133
|
+
"colorModal",
|
|
134
|
+
"rename",
|
|
135
|
+
"onDragEnd"
|
|
136
|
+
],
|
|
137
|
+
setup(__props, { emit: __emit }) {
|
|
138
|
+
const emit = __emit;
|
|
139
|
+
const router = useRouter();
|
|
140
|
+
const handleNavigation = (event) => {
|
|
141
|
+
if (event.metaKey) window.open(router.resolve(__props.to).href, "_blank");
|
|
142
|
+
else router.push(__props.to);
|
|
143
|
+
};
|
|
144
|
+
const handleDelete = (id) => {
|
|
145
|
+
emit("delete", id);
|
|
146
|
+
};
|
|
147
|
+
const handleColorClick = (uid) => {
|
|
148
|
+
emit("colorModal", uid);
|
|
149
|
+
};
|
|
150
|
+
const handleRename = (id) => {
|
|
151
|
+
emit("rename", id);
|
|
152
|
+
};
|
|
153
|
+
/** The draggable component (bound in template via ref="_draggableRef") */
|
|
154
|
+
const _draggableRef = ref(null);
|
|
155
|
+
/** Calculate offsets for drag and drop */
|
|
156
|
+
const getDraggableOffsets = computed(() => ({
|
|
157
|
+
ceiling: .5,
|
|
158
|
+
floor: .5
|
|
159
|
+
}));
|
|
160
|
+
return (_ctx, _cache) => {
|
|
161
|
+
const _component_router_link = resolveComponent("router-link");
|
|
162
|
+
return openBlock(), createElementBlock("li", null, [createVNode(unref(Draggable), {
|
|
163
|
+
id: __props.variable.uid,
|
|
164
|
+
ref_key: "_draggableRef",
|
|
165
|
+
ref: _draggableRef,
|
|
166
|
+
ceiling: getDraggableOffsets.value.ceiling,
|
|
167
|
+
floor: getDraggableOffsets.value.floor,
|
|
168
|
+
isDraggable: __props.isDraggable,
|
|
169
|
+
isDroppable: __props.isDroppable,
|
|
170
|
+
parentIds: __props.collectionId ? [__props.collectionId] : [],
|
|
171
|
+
onOnDragEnd: _cache[2] || (_cache[2] = (...args) => _ctx.$emit("onDragEnd", ...args))
|
|
172
|
+
}, {
|
|
173
|
+
default: withCtx(() => [createVNode(_component_router_link, {
|
|
174
|
+
class: normalizeClass(["text-c-2 hover:bg-b-2 group relative flex h-8 items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline", [__props.variable.color ? "pl-5" : "pl-1.5"]]),
|
|
175
|
+
exactActiveClass: "bg-b-2 !text-c-1",
|
|
176
|
+
role: "button",
|
|
177
|
+
to: __props.to,
|
|
178
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => handleNavigation($event), ["prevent"]))
|
|
179
|
+
}, {
|
|
180
|
+
default: withCtx(() => [
|
|
181
|
+
__props.variable.color ? (openBlock(), createElementBlock("button", {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: "hover:bg-b-3 rounded p-1.5",
|
|
184
|
+
type: "button",
|
|
185
|
+
onClick: _cache[0] || (_cache[0] = ($event) => handleColorClick(__props.variable.uid))
|
|
186
|
+
}, [createElementVNode("div", {
|
|
187
|
+
class: "h-2.5 w-2.5 rounded-xl",
|
|
188
|
+
style: normalizeStyle({ backgroundColor: __props.variable.color })
|
|
189
|
+
}, null, 4)])) : createCommentVNode("", true),
|
|
190
|
+
__props.variable.icon ? (openBlock(), createBlock(unref(ScalarIcon), {
|
|
191
|
+
key: 1,
|
|
192
|
+
class: "text-sidebar-c-2 size-3.5 stroke-[2.25]",
|
|
193
|
+
icon: __props.variable.icon
|
|
194
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
195
|
+
createElementVNode("span", _hoisted_1, toDisplayString(__props.variable.name), 1),
|
|
196
|
+
createVNode(SidebarListElementActions_default, {
|
|
197
|
+
isCopyable: Boolean(__props.isCopyable),
|
|
198
|
+
isDeletable: Boolean(__props.isDeletable),
|
|
199
|
+
isRenameable: Boolean(__props.isRenameable),
|
|
200
|
+
variable: {
|
|
201
|
+
...__props.variable,
|
|
202
|
+
isDefault: __props.variable.isDefault ?? false
|
|
203
|
+
},
|
|
204
|
+
warningMessage: __props.warningMessage,
|
|
205
|
+
onDelete: handleDelete,
|
|
206
|
+
onRename: handleRename
|
|
207
|
+
}, null, 8, [
|
|
208
|
+
"isCopyable",
|
|
209
|
+
"isDeletable",
|
|
210
|
+
"isRenameable",
|
|
211
|
+
"variable",
|
|
212
|
+
"warningMessage"
|
|
213
|
+
])
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["class", "to"])]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 8, [
|
|
219
|
+
"id",
|
|
220
|
+
"ceiling",
|
|
221
|
+
"floor",
|
|
222
|
+
"isDraggable",
|
|
223
|
+
"isDroppable",
|
|
224
|
+
"parentIds"
|
|
225
|
+
])]);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}), [["__scopeId", "data-v-298ba76d"]]);
|
|
229
|
+
//#endregion
|
|
230
|
+
export { SidebarList_default as n, SidebarListElement_default as t };
|
|
231
|
+
|
|
232
|
+
//# sourceMappingURL=SidebarListElement-BfTPiihc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarListElement-BfTPiihc.js","names":["$emit"],"sources":["../src/components/Sidebar/SidebarList.vue","../src/components/Sidebar/SidebarListElementActions.vue","../src/components/Sidebar/SidebarListElementActions.vue","../src/components/Sidebar/SidebarListElement.vue","../src/components/Sidebar/SidebarListElement.vue"],"sourcesContent":["<template>\n <ul class=\"gap-1/2 flex flex-col px-3 pb-[75px]\">\n <slot />\n </ul>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIcon, ScalarModal, useModal } from '@scalar/components'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { ref } from 'vue'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\n\nconst { variable } = defineProps<{\n variable: {\n uid: string\n name: string\n isDefault: boolean\n }\n warningMessage: string | undefined\n isCopyable?: boolean\n isDeletable?: boolean\n isRenameable?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'delete', id: string): void\n (e: 'rename', id: string): void\n}>()\n\nenum ModalAction {\n Delete = 'Delete',\n None = 'None',\n}\n\nconst currentAction = ref({ action: ModalAction.None, name: '' })\n\nconst modalState = useModal()\nconst { copyToClipboard } = useClipboard()\n\nfunction startActionFlow(action: ModalAction) {\n currentAction.value = { action, name: variable.name }\n modalState.show()\n}\n\nfunction handleModalClose() {\n modalState.hide()\n currentAction.value = { action: ModalAction.None, name: '' }\n}\n\nfunction handleDelete(id: string) {\n emit('delete', id)\n handleModalClose()\n}\n</script>\n<template>\n <div class=\"absolute right-1 flex opacity-0 group-hover:opacity-100\">\n <button\n v-if=\"isCopyable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]\"\n type=\"button\"\n @click=\"copyToClipboard(variable.name)\">\n <ScalarIcon\n class=\"h-3 w-3\"\n icon=\"Clipboard\" />\n </button>\n <button\n v-if=\"isRenameable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]\"\n type=\"button\"\n @click=\"emit('rename', variable.uid)\">\n <ScalarIcon\n class=\"h-3 w-3\"\n icon=\"Edit\" />\n </button>\n <button\n v-if=\"!variable.isDefault && isDeletable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1\"\n type=\"button\"\n @click.prevent=\"startActionFlow(ModalAction.Delete)\">\n <ScalarIcon\n class=\"h-3.5 w-3.5\"\n icon=\"Close\" />\n </button>\n </div>\n <ScalarModal\n size=\"sm\"\n :state=\"modalState\"\n :title=\"`${currentAction.action} ${currentAction.name}`\">\n <DeleteSidebarListElement\n v-if=\"currentAction.action === ModalAction.Delete\"\n :variableName=\"currentAction.name\"\n :warningMessage=\"warningMessage\"\n @close=\"handleModalClose\"\n @delete=\"handleDelete(variable.uid)\" />\n </ScalarModal>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIcon, ScalarModal, useModal } from '@scalar/components'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { ref } from 'vue'\n\nimport DeleteSidebarListElement from '@/components/Sidebar/Actions/DeleteSidebarListElement.vue'\n\nconst { variable } = defineProps<{\n variable: {\n uid: string\n name: string\n isDefault: boolean\n }\n warningMessage: string | undefined\n isCopyable?: boolean\n isDeletable?: boolean\n isRenameable?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'delete', id: string): void\n (e: 'rename', id: string): void\n}>()\n\nenum ModalAction {\n Delete = 'Delete',\n None = 'None',\n}\n\nconst currentAction = ref({ action: ModalAction.None, name: '' })\n\nconst modalState = useModal()\nconst { copyToClipboard } = useClipboard()\n\nfunction startActionFlow(action: ModalAction) {\n currentAction.value = { action, name: variable.name }\n modalState.show()\n}\n\nfunction handleModalClose() {\n modalState.hide()\n currentAction.value = { action: ModalAction.None, name: '' }\n}\n\nfunction handleDelete(id: string) {\n emit('delete', id)\n handleModalClose()\n}\n</script>\n<template>\n <div class=\"absolute right-1 flex opacity-0 group-hover:opacity-100\">\n <button\n v-if=\"isCopyable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]\"\n type=\"button\"\n @click=\"copyToClipboard(variable.name)\">\n <ScalarIcon\n class=\"h-3 w-3\"\n icon=\"Clipboard\" />\n </button>\n <button\n v-if=\"isRenameable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]\"\n type=\"button\"\n @click=\"emit('rename', variable.uid)\">\n <ScalarIcon\n class=\"h-3 w-3\"\n icon=\"Edit\" />\n </button>\n <button\n v-if=\"!variable.isDefault && isDeletable\"\n class=\"text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1\"\n type=\"button\"\n @click.prevent=\"startActionFlow(ModalAction.Delete)\">\n <ScalarIcon\n class=\"h-3.5 w-3.5\"\n icon=\"Close\" />\n </button>\n </div>\n <ScalarModal\n size=\"sm\"\n :state=\"modalState\"\n :title=\"`${currentAction.action} ${currentAction.name}`\">\n <DeleteSidebarListElement\n v-if=\"currentAction.action === ModalAction.Delete\"\n :variableName=\"currentAction.name\"\n :warningMessage=\"warningMessage\"\n @close=\"handleModalClose\"\n @delete=\"handleDelete(variable.uid)\" />\n </ScalarModal>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIcon, type Icon } from '@scalar/components'\nimport {\n Draggable,\n type DraggableProps,\n type DraggingItem,\n type HoveredItem,\n} from '@scalar/draggable'\nimport { computed, ref } from 'vue'\nimport { useRouter, type RouteLocationRaw } from 'vue-router'\n\nimport SidebarListElementActions from '@/components/Sidebar/SidebarListElementActions.vue'\n\nconst {\n isDraggable = false,\n isDroppable = false,\n to,\n} = defineProps<{\n variable: {\n uid: string\n name: string\n color?: string\n icon?: Icon\n isDefault?: boolean\n }\n warningMessage?: string\n to: RouteLocationRaw\n isDeletable?: boolean\n isCopyable?: boolean\n isRenameable?: boolean\n /**\n * Toggle dragging on and off\n *\n * @default false\n */\n isDraggable?: boolean\n /**\n * Prevents items from being hovered and dropped into\n *\n * @default false\n */\n isDroppable?: DraggableProps['isDroppable']\n collectionId?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'delete', id: string): void\n (e: 'colorModal', id: string): void\n (e: 'rename', id: string): void\n (e: 'onDragEnd', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n}>()\n\nconst router = useRouter()\n\nconst handleNavigation = (event: MouseEvent) => {\n if (event.metaKey) {\n window.open(router.resolve(to).href, '_blank')\n } else {\n router.push(to)\n }\n}\n\nconst handleDelete = (id: string) => {\n emit('delete', id)\n}\n\nconst handleColorClick = (uid: string) => {\n emit('colorModal', uid)\n}\n\nconst handleRename = (id: string) => {\n emit('rename', id)\n}\n\n/** The draggable component (bound in template via ref=\"_draggableRef\") */\nconst _draggableRef = ref<{\n draggingItem: DraggingItem\n hoveredItem: HoveredItem\n} | null>(null)\nvoid _draggableRef\n\n/** Calculate offsets for drag and drop */\nconst getDraggableOffsets = computed(() => ({\n ceiling: 0.5,\n floor: 0.5,\n}))\n</script>\n\n<template>\n <li>\n <Draggable\n :id=\"variable.uid\"\n ref=\"_draggableRef\"\n :ceiling=\"getDraggableOffsets.ceiling\"\n :floor=\"getDraggableOffsets.floor\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :parentIds=\"collectionId ? [collectionId] : []\"\n @onDragEnd=\"(...args) => $emit('onDragEnd', ...args)\">\n <router-link\n class=\"text-c-2 hover:bg-b-2 group relative flex h-8 items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline\"\n :class=\"[variable.color ? 'pl-5' : 'pl-1.5']\"\n exactActiveClass=\"bg-b-2 !text-c-1\"\n role=\"button\"\n :to=\"to\"\n @click.prevent=\"handleNavigation($event)\">\n <button\n v-if=\"variable.color\"\n class=\"hover:bg-b-3 rounded p-1.5\"\n type=\"button\"\n @click=\"handleColorClick(variable.uid)\">\n <div\n class=\"h-2.5 w-2.5 rounded-xl\"\n :style=\"{ backgroundColor: variable.color }\"></div>\n </button>\n <ScalarIcon\n v-if=\"variable.icon\"\n class=\"text-sidebar-c-2 size-3.5 stroke-[2.25]\"\n :icon=\"variable.icon\" />\n <span\n class=\"empty-variable-name line-clamp-1 text-sm break-all group-hover:pr-5\">\n {{ variable.name }}\n </span>\n <SidebarListElementActions\n :isCopyable=\"Boolean(isCopyable)\"\n :isDeletable=\"Boolean(isDeletable)\"\n :isRenameable=\"Boolean(isRenameable)\"\n :variable=\"{ ...variable, isDefault: variable.isDefault ?? false }\"\n :warningMessage=\"warningMessage\"\n @delete=\"handleDelete\"\n @rename=\"handleRename\" />\n </router-link>\n </Draggable>\n </li>\n</template>\n\n<style>\n@import '@scalar/draggable/style.css';\n</style>\n\n<style scoped>\n.empty-variable-name:empty:before {\n content: 'Untitled';\n color: var(--scalar-color-3);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIcon, type Icon } from '@scalar/components'\nimport {\n Draggable,\n type DraggableProps,\n type DraggingItem,\n type HoveredItem,\n} from '@scalar/draggable'\nimport { computed, ref } from 'vue'\nimport { useRouter, type RouteLocationRaw } from 'vue-router'\n\nimport SidebarListElementActions from '@/components/Sidebar/SidebarListElementActions.vue'\n\nconst {\n isDraggable = false,\n isDroppable = false,\n to,\n} = defineProps<{\n variable: {\n uid: string\n name: string\n color?: string\n icon?: Icon\n isDefault?: boolean\n }\n warningMessage?: string\n to: RouteLocationRaw\n isDeletable?: boolean\n isCopyable?: boolean\n isRenameable?: boolean\n /**\n * Toggle dragging on and off\n *\n * @default false\n */\n isDraggable?: boolean\n /**\n * Prevents items from being hovered and dropped into\n *\n * @default false\n */\n isDroppable?: DraggableProps['isDroppable']\n collectionId?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'delete', id: string): void\n (e: 'colorModal', id: string): void\n (e: 'rename', id: string): void\n (e: 'onDragEnd', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n}>()\n\nconst router = useRouter()\n\nconst handleNavigation = (event: MouseEvent) => {\n if (event.metaKey) {\n window.open(router.resolve(to).href, '_blank')\n } else {\n router.push(to)\n }\n}\n\nconst handleDelete = (id: string) => {\n emit('delete', id)\n}\n\nconst handleColorClick = (uid: string) => {\n emit('colorModal', uid)\n}\n\nconst handleRename = (id: string) => {\n emit('rename', id)\n}\n\n/** The draggable component (bound in template via ref=\"_draggableRef\") */\nconst _draggableRef = ref<{\n draggingItem: DraggingItem\n hoveredItem: HoveredItem\n} | null>(null)\nvoid _draggableRef\n\n/** Calculate offsets for drag and drop */\nconst getDraggableOffsets = computed(() => ({\n ceiling: 0.5,\n floor: 0.5,\n}))\n</script>\n\n<template>\n <li>\n <Draggable\n :id=\"variable.uid\"\n ref=\"_draggableRef\"\n :ceiling=\"getDraggableOffsets.ceiling\"\n :floor=\"getDraggableOffsets.floor\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :parentIds=\"collectionId ? [collectionId] : []\"\n @onDragEnd=\"(...args) => $emit('onDragEnd', ...args)\">\n <router-link\n class=\"text-c-2 hover:bg-b-2 group relative flex h-8 items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline\"\n :class=\"[variable.color ? 'pl-5' : 'pl-1.5']\"\n exactActiveClass=\"bg-b-2 !text-c-1\"\n role=\"button\"\n :to=\"to\"\n @click.prevent=\"handleNavigation($event)\">\n <button\n v-if=\"variable.color\"\n class=\"hover:bg-b-3 rounded p-1.5\"\n type=\"button\"\n @click=\"handleColorClick(variable.uid)\">\n <div\n class=\"h-2.5 w-2.5 rounded-xl\"\n :style=\"{ backgroundColor: variable.color }\"></div>\n </button>\n <ScalarIcon\n v-if=\"variable.icon\"\n class=\"text-sidebar-c-2 size-3.5 stroke-[2.25]\"\n :icon=\"variable.icon\" />\n <span\n class=\"empty-variable-name line-clamp-1 text-sm break-all group-hover:pr-5\">\n {{ variable.name }}\n </span>\n <SidebarListElementActions\n :isCopyable=\"Boolean(isCopyable)\"\n :isDeletable=\"Boolean(isDeletable)\"\n :isRenameable=\"Boolean(isRenameable)\"\n :variable=\"{ ...variable, isDefault: variable.isDefault ?? false }\"\n :warningMessage=\"warningMessage\"\n @delete=\"handleDelete\"\n @rename=\"handleRename\" />\n </router-link>\n </Draggable>\n </li>\n</template>\n\n<style>\n@import '@scalar/draggable/style.css';\n</style>\n\n<style scoped>\n.empty-variable-name:empty:before {\n content: 'Untitled';\n color: var(--scalar-color-3);\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, onBeforeMount, onBeforeUnmount, openBlock, ref, renderList, resolveDynamicComponent, toDisplayString, unref, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
|
+
import { useRouter } from "vue-router";
|
|
4
|
+
import { Dialog, DialogPanel, DialogTitle } from "@headlessui/vue";
|
|
5
|
+
import { ScalarIconCaretLeft, ScalarIconMagnifyingGlass } from "@scalar/icons";
|
|
6
|
+
//#region src/v2/helpers/slugify.ts
|
|
7
|
+
/**
|
|
8
|
+
* Converts a string into a URL-friendly "slug" by
|
|
9
|
+
* lowercasing and replacing whitespace with hyphens.
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* slugify('Hello World Example') // returns 'hello-world-example'
|
|
13
|
+
*/
|
|
14
|
+
var slugify = (value) => {
|
|
15
|
+
return value.toLowerCase().replace(/\s+/g, "-");
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/v2/features/command-palette/TheCommandPalette.vue?vue&type=script&setup=true&lang.ts
|
|
19
|
+
var _hoisted_1 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
|
|
22
|
+
};
|
|
23
|
+
var _hoisted_2 = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" };
|
|
24
|
+
var _hoisted_3 = { for: "commandmenu" };
|
|
25
|
+
var _hoisted_4 = ["value", "onKeydown"];
|
|
26
|
+
var _hoisted_5 = ["id", "onClick"];
|
|
27
|
+
var _hoisted_6 = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "text-c-3 p-2 pt-3 text-center text-sm"
|
|
30
|
+
};
|
|
31
|
+
var _hoisted_7 = {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "flex-1 p-1.5"
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/v2/features/command-palette/TheCommandPalette.vue
|
|
37
|
+
var TheCommandPalette_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
38
|
+
__name: "TheCommandPalette",
|
|
39
|
+
props: {
|
|
40
|
+
paletteState: {},
|
|
41
|
+
workspaceStore: {},
|
|
42
|
+
eventBus: {}
|
|
43
|
+
},
|
|
44
|
+
setup(__props) {
|
|
45
|
+
/** Starting index when no search result is selected */
|
|
46
|
+
const NO_SELECTION_INDEX = -1;
|
|
47
|
+
const router = useRouter();
|
|
48
|
+
const selectedSearchResult = ref(NO_SELECTION_INDEX);
|
|
49
|
+
const commandInputRef = ref(null);
|
|
50
|
+
/**
|
|
51
|
+
* Flattens the filtered commands into a single array for keyboard navigation.
|
|
52
|
+
* Makes it easier to track the selected index across all groups.
|
|
53
|
+
*/
|
|
54
|
+
const flattenedCommands = computed(() => __props.paletteState.filteredCommands.value.flatMap((group) => group.commands));
|
|
55
|
+
/** The currently selected command based on keyboard navigation */
|
|
56
|
+
const selectedCommand = computed(() => flattenedCommands.value[selectedSearchResult.value]);
|
|
57
|
+
/**
|
|
58
|
+
* Watch for search query changes and auto-select first result.
|
|
59
|
+
* Resets selection when query is cleared.
|
|
60
|
+
*/
|
|
61
|
+
watch(() => __props.paletteState.filterQuery.value, (newQuery) => {
|
|
62
|
+
selectedSearchResult.value = newQuery && flattenedCommands.value.length > 0 ? 0 : NO_SELECTION_INDEX;
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Handle input changes in the search field.
|
|
66
|
+
* Updates the filter query and redirects to cURL import if detected.
|
|
67
|
+
*/
|
|
68
|
+
const handleInput = (value) => {
|
|
69
|
+
__props.paletteState.setFilterQuery(value);
|
|
70
|
+
if (value.trim().toLowerCase().startsWith("curl")) __props.paletteState.open("import-curl-command", { inputValue: value });
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Handle arrow key navigation in the command list.
|
|
74
|
+
* Loops around to the beginning or end when reaching boundaries.
|
|
75
|
+
*/
|
|
76
|
+
const handleArrowKey = (direction, event) => {
|
|
77
|
+
if (!__props.paletteState.isOpen.value) return;
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
const offset = direction === "up" ? -1 : 1;
|
|
80
|
+
const length = flattenedCommands.value.length;
|
|
81
|
+
selectedSearchResult.value = (selectedSearchResult.value + offset + length) % length;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Handle enter key to execute the selected command.
|
|
85
|
+
* Only works when a command is selected and no active command is open.
|
|
86
|
+
*/
|
|
87
|
+
const handleSelect = (event) => {
|
|
88
|
+
if (!selectedCommand.value || __props.paletteState.activeCommand.value) return;
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
event.stopPropagation();
|
|
91
|
+
handleCommandClick(selectedCommand.value);
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Handle command selection (via click or enter key).
|
|
95
|
+
* Routes to navigation commands or opens folder commands.
|
|
96
|
+
*/
|
|
97
|
+
const handleCommandClick = (command) => {
|
|
98
|
+
/** Navigate to route commands and close palette */
|
|
99
|
+
if ("to" in command) {
|
|
100
|
+
router.push(command.to);
|
|
101
|
+
closeHandler();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
__props.paletteState.open(command.id, {});
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Handle back navigation from active command.
|
|
108
|
+
* Returns to the main command list and refocuses the search input.
|
|
109
|
+
*/
|
|
110
|
+
const handleBackEvent = () => {
|
|
111
|
+
__props.paletteState.reset();
|
|
112
|
+
nextTick(() => commandInputRef.value?.focus());
|
|
113
|
+
};
|
|
114
|
+
/** Handle close event from active command components */
|
|
115
|
+
const handleCloseEvent = () => {
|
|
116
|
+
__props.paletteState.close();
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Close the command palette and reset state.
|
|
120
|
+
* Resets search results and closes the dialog.
|
|
121
|
+
*/
|
|
122
|
+
const closeHandler = () => {
|
|
123
|
+
__props.paletteState.close();
|
|
124
|
+
selectedSearchResult.value = NO_SELECTION_INDEX;
|
|
125
|
+
};
|
|
126
|
+
const paletteProps = computed(() => ({
|
|
127
|
+
workspaceStore: __props.workspaceStore,
|
|
128
|
+
eventBus: __props.eventBus,
|
|
129
|
+
...__props.paletteState.activeCommandProps.value
|
|
130
|
+
}));
|
|
131
|
+
const onOpen = (payload) => {
|
|
132
|
+
if (payload?.event) payload.event.preventDefault();
|
|
133
|
+
if (payload && "action" in payload) __props.paletteState.open(payload.action, payload.payload);
|
|
134
|
+
else __props.paletteState.open();
|
|
135
|
+
};
|
|
136
|
+
onBeforeMount(() => __props.eventBus.on("ui:open:command-palette", onOpen));
|
|
137
|
+
onBeforeUnmount(() => __props.eventBus.off("ui:open:command-palette", onOpen));
|
|
138
|
+
return (_ctx, _cache) => {
|
|
139
|
+
return openBlock(), createBlock(unref(Dialog), {
|
|
140
|
+
open: __props.paletteState.isOpen.value,
|
|
141
|
+
onClose: closeHandler
|
|
142
|
+
}, {
|
|
143
|
+
default: withCtx(() => [_cache[4] || (_cache[4] = createElementVNode("div", { class: "commandmenu-overlay z-overlay" }, null, -1)), createVNode(unref(DialogPanel), { class: "commandmenu z-overlay flex flex-col" }, {
|
|
144
|
+
default: withCtx(() => [createVNode(unref(DialogTitle), { class: "sr-only" }, {
|
|
145
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("API Client Command Menu", -1)])]),
|
|
146
|
+
_: 1
|
|
147
|
+
}), !__props.paletteState.activeCommand.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
148
|
+
createElementVNode("div", _hoisted_2, [createElementVNode("label", _hoisted_3, [createVNode(unref(ScalarIconMagnifyingGlass), {
|
|
149
|
+
class: "text-c-2 mr-2.5",
|
|
150
|
+
size: "md",
|
|
151
|
+
thickness: "1.5"
|
|
152
|
+
})]), createElementVNode("input", {
|
|
153
|
+
id: "commandmenu",
|
|
154
|
+
ref_key: "commandInputRef",
|
|
155
|
+
ref: commandInputRef,
|
|
156
|
+
autocomplete: "off",
|
|
157
|
+
autofocus: "",
|
|
158
|
+
class: "w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none",
|
|
159
|
+
placeholder: "Search commands...",
|
|
160
|
+
type: "text",
|
|
161
|
+
value: __props.paletteState.filterQuery.value,
|
|
162
|
+
onInput: _cache[0] || (_cache[0] = ($event) => handleInput($event.target.value)),
|
|
163
|
+
onKeydown: [
|
|
164
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => handleArrowKey("down", $event), ["stop"]), ["down"])),
|
|
165
|
+
withKeys(withModifiers(handleSelect, ["stop"]), ["enter"]),
|
|
166
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => handleArrowKey("up", $event), ["stop"]), ["up"]))
|
|
167
|
+
]
|
|
168
|
+
}, null, 40, _hoisted_4)]),
|
|
169
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.paletteState.filteredCommands.value, (group) => {
|
|
170
|
+
return openBlock(), createElementBlock(Fragment, { key: group.label || "100" }, [withDirectives(createElementVNode("div", { class: "text-c-3 mt-2 mb-1 px-2 text-xs font-medium" }, toDisplayString(group.label), 513), [[vShow, group.commands.length > 0]]), (openBlock(true), createElementBlock(Fragment, null, renderList(group.commands, (command) => {
|
|
171
|
+
return openBlock(), createElementBlock("button", {
|
|
172
|
+
id: command.id,
|
|
173
|
+
key: command.id,
|
|
174
|
+
class: normalizeClass(["commandmenu-item hover:bg-b-2 flex w-full cursor-pointer items-center rounded px-2 py-1.5 text-left text-sm", { "bg-b-2": command.id === selectedCommand.value?.id }]),
|
|
175
|
+
type: "button",
|
|
176
|
+
onClick: ($event) => handleCommandClick(command)
|
|
177
|
+
}, ["icon" in command ? (openBlock(), createBlock(resolveDynamicComponent(command.icon), {
|
|
178
|
+
key: 0,
|
|
179
|
+
class: "text-c-2 mr-2.5",
|
|
180
|
+
size: "md",
|
|
181
|
+
thickness: "1.5"
|
|
182
|
+
})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(command.name), 1)], 10, _hoisted_5);
|
|
183
|
+
}), 128))], 64);
|
|
184
|
+
}), 128)),
|
|
185
|
+
!__props.paletteState.filteredCommands.value.flatMap((p) => p.commands).length ? (openBlock(), createElementBlock("div", _hoisted_6, " No commands found ")) : createCommentVNode("", true)
|
|
186
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_7, [createElementVNode("button", {
|
|
187
|
+
class: "hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5",
|
|
188
|
+
type: "button",
|
|
189
|
+
onClick: handleBackEvent
|
|
190
|
+
}, [createVNode(unref(ScalarIconCaretLeft), { size: "md" })]), __props.paletteState.activeCommand.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.paletteState.activeCommand.value.component), mergeProps({ key: 0 }, paletteProps.value, {
|
|
191
|
+
onBack: handleBackEvent,
|
|
192
|
+
onClose: handleCloseEvent
|
|
193
|
+
}), null, 16)) : createCommentVNode("", true)]))]),
|
|
194
|
+
_: 1
|
|
195
|
+
})]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["open"]);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}), [["__scopeId", "data-v-2fe57517"]]);
|
|
201
|
+
//#endregion
|
|
202
|
+
export { slugify as n, TheCommandPalette_default as t };
|
|
203
|
+
|
|
204
|
+
//# sourceMappingURL=TheCommandPalette-Dl9TAeke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TheCommandPalette-Dl9TAeke.js","names":[],"sources":["../src/v2/helpers/slugify.ts","../src/v2/features/command-palette/TheCommandPalette.vue","../src/v2/features/command-palette/TheCommandPalette.vue"],"sourcesContent":["/**\n * Converts a string into a URL-friendly \"slug\" by\n * lowercasing and replacing whitespace with hyphens.\n *\n * Example:\n * slugify('Hello World Example') // returns 'hello-world-example'\n */\nexport const slugify = (value: string) => {\n return value.toLowerCase().replace(/\\s+/g, '-')\n}\n","<script lang=\"ts\">\n/**\n * The Command Palette Component\n *\n * A keyboard-driven command menu for quick access to common actions like:\n * - Creating documents, requests, tags, and examples\n * - Importing from OpenAPI, Swagger, Postman, or cURL\n * - Navigating to different routes\n *\n * Supports:\n * - Fuzzy search filtering\n * - Keyboard navigation (arrow keys, enter, escape)\n * - Command grouping and organization\n * - Dynamic command components with props\n *\n * @example\n * <TheCommandPalette\n * :paletteState=\"paletteState\"\n * :workspaceStore=\"workspaceStore\"\n * :eventBus=\"eventBus\"\n * />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Dialog, DialogPanel, DialogTitle } from '@headlessui/vue'\nimport { ScalarIconCaretLeft, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type {\n CommandPaletteAction,\n CommandPalettePayload,\n KeyboardEventPayload,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n computed,\n nextTick,\n onBeforeMount,\n onBeforeUnmount,\n ref,\n watch,\n} from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport type {\n CommandPaletteEntry,\n CommandPaletteState,\n} from './hooks/use-command-palette-state'\n\nconst { paletteState, workspaceStore, eventBus } = defineProps<{\n /** The command palette state management hook */\n paletteState: CommandPaletteState\n /** The workspace store for accessing documents and operations */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting workspace events */\n eventBus: WorkspaceEventBus\n}>()\n\n/** Starting index when no search result is selected */\nconst NO_SELECTION_INDEX = -1\n\nconst router = useRouter()\n\nconst selectedSearchResult = ref<number>(NO_SELECTION_INDEX)\nconst commandInputRef = ref<HTMLInputElement | null>(null)\n\n/**\n * Flattens the filtered commands into a single array for keyboard navigation.\n * Makes it easier to track the selected index across all groups.\n */\nconst flattenedCommands = computed<CommandPaletteEntry[]>(() =>\n paletteState.filteredCommands.value.flatMap((group) => group.commands),\n)\n\n/** The currently selected command based on keyboard navigation */\nconst selectedCommand = computed<CommandPaletteEntry | undefined>(\n () => flattenedCommands.value[selectedSearchResult.value],\n)\n\n/**\n * Watch for search query changes and auto-select first result.\n * Resets selection when query is cleared.\n */\nwatch(\n () => paletteState.filterQuery.value,\n (newQuery: string) => {\n selectedSearchResult.value =\n newQuery && flattenedCommands.value.length > 0 ? 0 : NO_SELECTION_INDEX\n },\n)\n\n/**\n * Handle input changes in the search field.\n * Updates the filter query and redirects to cURL import if detected.\n */\nconst handleInput = (value: string): void => {\n paletteState.setFilterQuery(value)\n\n if (value.trim().toLowerCase().startsWith('curl')) {\n paletteState.open('import-curl-command', { inputValue: value })\n }\n}\n\n/**\n * Handle arrow key navigation in the command list.\n * Loops around to the beginning or end when reaching boundaries.\n */\nconst handleArrowKey = (\n direction: 'up' | 'down',\n event: KeyboardEvent,\n): void => {\n if (!paletteState.isOpen.value) {\n return\n }\n event.preventDefault()\n\n const offset = direction === 'up' ? -1 : 1\n const length = flattenedCommands.value.length\n\n selectedSearchResult.value =\n (selectedSearchResult.value + offset + length) % length\n}\n\n/**\n * Handle enter key to execute the selected command.\n * Only works when a command is selected and no active command is open.\n */\nconst handleSelect = (event: KeyboardEvent): void => {\n if (!selectedCommand.value || paletteState.activeCommand.value) {\n return\n }\n event.preventDefault()\n event.stopPropagation()\n handleCommandClick(selectedCommand.value)\n}\n\n/**\n * Handle command selection (via click or enter key).\n * Routes to navigation commands or opens folder commands.\n */\nconst handleCommandClick = (command: CommandPaletteEntry): void => {\n /** Navigate to route commands and close palette */\n if ('to' in command) {\n router.push(command.to)\n closeHandler()\n return\n }\n\n // We are sure that the ids are of type FolderCommandIds because of the type assertion\n paletteState.open(command.id as keyof CommandPalettePayload, {})\n}\n\n/**\n * Handle back navigation from active command.\n * Returns to the main command list and refocuses the search input.\n */\nconst handleBackEvent = (): void => {\n paletteState.reset()\n nextTick(() => commandInputRef.value?.focus())\n}\n\n/** Handle close event from active command components */\nconst handleCloseEvent = (): void => {\n paletteState.close()\n}\n/**\n * Close the command palette and reset state.\n * Resets search results and closes the dialog.\n */\nconst closeHandler = (): void => {\n paletteState.close()\n selectedSearchResult.value = NO_SELECTION_INDEX\n}\n\nconst paletteProps = computed(() => ({\n workspaceStore,\n eventBus,\n ...paletteState.activeCommandProps.value,\n}))\n\nconst onOpen = (\n payload: CommandPaletteAction | KeyboardEventPayload | undefined,\n) => {\n // We want to disable the default behaviour\n if (payload?.event) {\n payload.event.preventDefault()\n }\n\n if (payload && 'action' in payload) {\n paletteState.open(payload.action, payload.payload)\n } else {\n paletteState.open()\n }\n}\n\nonBeforeMount(() => eventBus.on('ui:open:command-palette', onOpen))\nonBeforeUnmount(() => eventBus.off('ui:open:command-palette', onOpen))\n</script>\n<template>\n <Dialog\n :open=\"paletteState.isOpen.value\"\n @close=\"closeHandler\">\n <!-- Backdrop overlay -->\n <div class=\"commandmenu-overlay z-overlay\" />\n\n <DialogPanel class=\"commandmenu z-overlay flex flex-col\">\n <DialogTitle class=\"sr-only\">API Client Command Menu</DialogTitle>\n\n <!-- Main command list view -->\n <div\n v-if=\"!paletteState.activeCommand.value\"\n class=\"custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5\">\n <!-- Search input with icon -->\n <div\n class=\"bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)\">\n <label for=\"commandmenu\">\n <ScalarIconMagnifyingGlass\n class=\"text-c-2 mr-2.5\"\n size=\"md\"\n thickness=\"1.5\" />\n </label>\n <input\n id=\"commandmenu\"\n ref=\"commandInputRef\"\n autocomplete=\"off\"\n autofocus\n class=\"w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none\"\n placeholder=\"Search commands...\"\n type=\"text\"\n :value=\"paletteState.filterQuery.value\"\n @input=\"handleInput(($event.target as HTMLInputElement).value)\"\n @keydown.down.stop=\"handleArrowKey('down', $event)\"\n @keydown.enter.stop=\"handleSelect\"\n @keydown.up.stop=\"handleArrowKey('up', $event)\" />\n </div>\n\n <!-- Command groups and items -->\n <template\n v-for=\"group in paletteState.filteredCommands.value\"\n :key=\"group.label || '100'\">\n <!-- Group label -->\n <div\n v-show=\"group.commands.length > 0\"\n class=\"text-c-3 mt-2 mb-1 px-2 text-xs font-medium\">\n {{ group.label }}\n </div>\n\n <!-- Command items in the group -->\n <button\n v-for=\"command in group.commands\"\n :id=\"command.id\"\n :key=\"command.id\"\n class=\"commandmenu-item hover:bg-b-2 flex w-full cursor-pointer items-center rounded px-2 py-1.5 text-left text-sm\"\n :class=\"{\n 'bg-b-2': command.id === selectedCommand?.id,\n }\"\n type=\"button\"\n @click=\"handleCommandClick(command)\">\n <component\n :is=\"command.icon\"\n v-if=\"'icon' in command\"\n class=\"text-c-2 mr-2.5\"\n size=\"md\"\n thickness=\"1.5\" />\n {{ command.name }}\n </button>\n </template>\n\n <!-- Empty state when no commands match search -->\n <div\n v-if=\"\n !paletteState.filteredCommands.value.flatMap((p) => p.commands)\n .length\n \"\n class=\"text-c-3 p-2 pt-3 text-center text-sm\">\n No commands found\n </div>\n </div>\n\n <!-- Active command view (specific action form) -->\n <div\n v-else\n class=\"flex-1 p-1.5\">\n <!-- Back button to return to command list -->\n <button\n class=\"hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5\"\n type=\"button\"\n @click=\"handleBackEvent\">\n <ScalarIconCaretLeft size=\"md\" />\n </button>\n\n <!-- Dynamic command component -->\n <component\n :is=\"paletteState.activeCommand.value.component\"\n v-if=\"paletteState.activeCommand.value\"\n v-bind=\"paletteProps\"\n @back=\"handleBackEvent\"\n @close=\"handleCloseEvent\" />\n </div>\n </DialogPanel>\n </Dialog>\n</template>\n<style scoped>\n/**\n * Command Palette Styles\n * Centered dialog with fade-in animation and backdrop overlay\n */\n\n/** Main command menu dialog */\n.commandmenu {\n box-shadow: var(--scalar-shadow-2);\n border-radius: var(--scalar-radius-lg);\n background-color: var(--scalar-background-1);\n max-height: 60dvh;\n width: 100%;\n max-width: 580px;\n margin: 12px;\n position: fixed;\n left: 50%;\n top: 150px;\n opacity: 0;\n transform: translate3d(-50%, 10px, 0);\n animation: fadeincommandmenu ease-in-out 0.3s forwards;\n animation-delay: 0.1s;\n}\n\n/** Backdrop overlay with fade-in */\n.commandmenu-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.2);\n animation: fadeincommand ease-in-out 0.3s forwards;\n cursor: pointer;\n}\n\n/** Fade-in animation for overlay */\n@keyframes fadeincommand {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/** Fade-in and slide-up animation for command menu */\n@keyframes fadeincommandmenu {\n 0% {\n opacity: 0;\n transform: translate3d(-50%, 10px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(-50%, 0, 0);\n }\n}\n</style>\n","<script lang=\"ts\">\n/**\n * The Command Palette Component\n *\n * A keyboard-driven command menu for quick access to common actions like:\n * - Creating documents, requests, tags, and examples\n * - Importing from OpenAPI, Swagger, Postman, or cURL\n * - Navigating to different routes\n *\n * Supports:\n * - Fuzzy search filtering\n * - Keyboard navigation (arrow keys, enter, escape)\n * - Command grouping and organization\n * - Dynamic command components with props\n *\n * @example\n * <TheCommandPalette\n * :paletteState=\"paletteState\"\n * :workspaceStore=\"workspaceStore\"\n * :eventBus=\"eventBus\"\n * />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Dialog, DialogPanel, DialogTitle } from '@headlessui/vue'\nimport { ScalarIconCaretLeft, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type {\n CommandPaletteAction,\n CommandPalettePayload,\n KeyboardEventPayload,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n computed,\n nextTick,\n onBeforeMount,\n onBeforeUnmount,\n ref,\n watch,\n} from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport type {\n CommandPaletteEntry,\n CommandPaletteState,\n} from './hooks/use-command-palette-state'\n\nconst { paletteState, workspaceStore, eventBus } = defineProps<{\n /** The command palette state management hook */\n paletteState: CommandPaletteState\n /** The workspace store for accessing documents and operations */\n workspaceStore: WorkspaceStore\n /** Event bus for emitting workspace events */\n eventBus: WorkspaceEventBus\n}>()\n\n/** Starting index when no search result is selected */\nconst NO_SELECTION_INDEX = -1\n\nconst router = useRouter()\n\nconst selectedSearchResult = ref<number>(NO_SELECTION_INDEX)\nconst commandInputRef = ref<HTMLInputElement | null>(null)\n\n/**\n * Flattens the filtered commands into a single array for keyboard navigation.\n * Makes it easier to track the selected index across all groups.\n */\nconst flattenedCommands = computed<CommandPaletteEntry[]>(() =>\n paletteState.filteredCommands.value.flatMap((group) => group.commands),\n)\n\n/** The currently selected command based on keyboard navigation */\nconst selectedCommand = computed<CommandPaletteEntry | undefined>(\n () => flattenedCommands.value[selectedSearchResult.value],\n)\n\n/**\n * Watch for search query changes and auto-select first result.\n * Resets selection when query is cleared.\n */\nwatch(\n () => paletteState.filterQuery.value,\n (newQuery: string) => {\n selectedSearchResult.value =\n newQuery && flattenedCommands.value.length > 0 ? 0 : NO_SELECTION_INDEX\n },\n)\n\n/**\n * Handle input changes in the search field.\n * Updates the filter query and redirects to cURL import if detected.\n */\nconst handleInput = (value: string): void => {\n paletteState.setFilterQuery(value)\n\n if (value.trim().toLowerCase().startsWith('curl')) {\n paletteState.open('import-curl-command', { inputValue: value })\n }\n}\n\n/**\n * Handle arrow key navigation in the command list.\n * Loops around to the beginning or end when reaching boundaries.\n */\nconst handleArrowKey = (\n direction: 'up' | 'down',\n event: KeyboardEvent,\n): void => {\n if (!paletteState.isOpen.value) {\n return\n }\n event.preventDefault()\n\n const offset = direction === 'up' ? -1 : 1\n const length = flattenedCommands.value.length\n\n selectedSearchResult.value =\n (selectedSearchResult.value + offset + length) % length\n}\n\n/**\n * Handle enter key to execute the selected command.\n * Only works when a command is selected and no active command is open.\n */\nconst handleSelect = (event: KeyboardEvent): void => {\n if (!selectedCommand.value || paletteState.activeCommand.value) {\n return\n }\n event.preventDefault()\n event.stopPropagation()\n handleCommandClick(selectedCommand.value)\n}\n\n/**\n * Handle command selection (via click or enter key).\n * Routes to navigation commands or opens folder commands.\n */\nconst handleCommandClick = (command: CommandPaletteEntry): void => {\n /** Navigate to route commands and close palette */\n if ('to' in command) {\n router.push(command.to)\n closeHandler()\n return\n }\n\n // We are sure that the ids are of type FolderCommandIds because of the type assertion\n paletteState.open(command.id as keyof CommandPalettePayload, {})\n}\n\n/**\n * Handle back navigation from active command.\n * Returns to the main command list and refocuses the search input.\n */\nconst handleBackEvent = (): void => {\n paletteState.reset()\n nextTick(() => commandInputRef.value?.focus())\n}\n\n/** Handle close event from active command components */\nconst handleCloseEvent = (): void => {\n paletteState.close()\n}\n/**\n * Close the command palette and reset state.\n * Resets search results and closes the dialog.\n */\nconst closeHandler = (): void => {\n paletteState.close()\n selectedSearchResult.value = NO_SELECTION_INDEX\n}\n\nconst paletteProps = computed(() => ({\n workspaceStore,\n eventBus,\n ...paletteState.activeCommandProps.value,\n}))\n\nconst onOpen = (\n payload: CommandPaletteAction | KeyboardEventPayload | undefined,\n) => {\n // We want to disable the default behaviour\n if (payload?.event) {\n payload.event.preventDefault()\n }\n\n if (payload && 'action' in payload) {\n paletteState.open(payload.action, payload.payload)\n } else {\n paletteState.open()\n }\n}\n\nonBeforeMount(() => eventBus.on('ui:open:command-palette', onOpen))\nonBeforeUnmount(() => eventBus.off('ui:open:command-palette', onOpen))\n</script>\n<template>\n <Dialog\n :open=\"paletteState.isOpen.value\"\n @close=\"closeHandler\">\n <!-- Backdrop overlay -->\n <div class=\"commandmenu-overlay z-overlay\" />\n\n <DialogPanel class=\"commandmenu z-overlay flex flex-col\">\n <DialogTitle class=\"sr-only\">API Client Command Menu</DialogTitle>\n\n <!-- Main command list view -->\n <div\n v-if=\"!paletteState.activeCommand.value\"\n class=\"custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5\">\n <!-- Search input with icon -->\n <div\n class=\"bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)\">\n <label for=\"commandmenu\">\n <ScalarIconMagnifyingGlass\n class=\"text-c-2 mr-2.5\"\n size=\"md\"\n thickness=\"1.5\" />\n </label>\n <input\n id=\"commandmenu\"\n ref=\"commandInputRef\"\n autocomplete=\"off\"\n autofocus\n class=\"w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none\"\n placeholder=\"Search commands...\"\n type=\"text\"\n :value=\"paletteState.filterQuery.value\"\n @input=\"handleInput(($event.target as HTMLInputElement).value)\"\n @keydown.down.stop=\"handleArrowKey('down', $event)\"\n @keydown.enter.stop=\"handleSelect\"\n @keydown.up.stop=\"handleArrowKey('up', $event)\" />\n </div>\n\n <!-- Command groups and items -->\n <template\n v-for=\"group in paletteState.filteredCommands.value\"\n :key=\"group.label || '100'\">\n <!-- Group label -->\n <div\n v-show=\"group.commands.length > 0\"\n class=\"text-c-3 mt-2 mb-1 px-2 text-xs font-medium\">\n {{ group.label }}\n </div>\n\n <!-- Command items in the group -->\n <button\n v-for=\"command in group.commands\"\n :id=\"command.id\"\n :key=\"command.id\"\n class=\"commandmenu-item hover:bg-b-2 flex w-full cursor-pointer items-center rounded px-2 py-1.5 text-left text-sm\"\n :class=\"{\n 'bg-b-2': command.id === selectedCommand?.id,\n }\"\n type=\"button\"\n @click=\"handleCommandClick(command)\">\n <component\n :is=\"command.icon\"\n v-if=\"'icon' in command\"\n class=\"text-c-2 mr-2.5\"\n size=\"md\"\n thickness=\"1.5\" />\n {{ command.name }}\n </button>\n </template>\n\n <!-- Empty state when no commands match search -->\n <div\n v-if=\"\n !paletteState.filteredCommands.value.flatMap((p) => p.commands)\n .length\n \"\n class=\"text-c-3 p-2 pt-3 text-center text-sm\">\n No commands found\n </div>\n </div>\n\n <!-- Active command view (specific action form) -->\n <div\n v-else\n class=\"flex-1 p-1.5\">\n <!-- Back button to return to command list -->\n <button\n class=\"hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5\"\n type=\"button\"\n @click=\"handleBackEvent\">\n <ScalarIconCaretLeft size=\"md\" />\n </button>\n\n <!-- Dynamic command component -->\n <component\n :is=\"paletteState.activeCommand.value.component\"\n v-if=\"paletteState.activeCommand.value\"\n v-bind=\"paletteProps\"\n @back=\"handleBackEvent\"\n @close=\"handleCloseEvent\" />\n </div>\n </DialogPanel>\n </Dialog>\n</template>\n<style scoped>\n/**\n * Command Palette Styles\n * Centered dialog with fade-in animation and backdrop overlay\n */\n\n/** Main command menu dialog */\n.commandmenu {\n box-shadow: var(--scalar-shadow-2);\n border-radius: var(--scalar-radius-lg);\n background-color: var(--scalar-background-1);\n max-height: 60dvh;\n width: 100%;\n max-width: 580px;\n margin: 12px;\n position: fixed;\n left: 50%;\n top: 150px;\n opacity: 0;\n transform: translate3d(-50%, 10px, 0);\n animation: fadeincommandmenu ease-in-out 0.3s forwards;\n animation-delay: 0.1s;\n}\n\n/** Backdrop overlay with fade-in */\n.commandmenu-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.2);\n animation: fadeincommand ease-in-out 0.3s forwards;\n cursor: pointer;\n}\n\n/** Fade-in animation for overlay */\n@keyframes fadeincommand {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/** Fade-in and slide-up animation for command menu */\n@keyframes fadeincommandmenu {\n 0% {\n opacity: 0;\n transform: translate3d(-50%, 10px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(-50%, 0, 0);\n }\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent, onBeforeUnmount, watch } from "vue";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region src/v2/components/layout/ValueEmitter.vue
|
|
4
|
+
var ValueEmitter_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "ValueEmitter",
|
|
6
|
+
props: { value: {} },
|
|
7
|
+
emits: ["change", "unmount"],
|
|
8
|
+
setup(__props, { emit: __emit }) {
|
|
9
|
+
const emit = __emit;
|
|
10
|
+
watch(() => __props.value, (newValue) => emit("change", newValue), { immediate: true });
|
|
11
|
+
onBeforeUnmount(() => emit("unmount"));
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return null;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ValueEmitter_default as t };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=ValueEmitter-QYkZ9Hdc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueEmitter-QYkZ9Hdc.js","names":[],"sources":["../src/v2/components/layout/ValueEmitter.vue","../src/v2/components/layout/ValueEmitter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * This component takes in any value and emits it back\n *\n * This is useful when we need to catch the open state of a disclosure from its v-slot\n */\nexport default {\n name: 'ValueEmitter',\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { onBeforeUnmount, watch } from 'vue'\n\nconst { value } = defineProps<{ value: T }>()\nconst emit = defineEmits<{\n (e: 'change', value: T): void\n (e: 'unmount'): void\n}>()\n\nwatch(\n () => value,\n (newValue) => emit('change', newValue),\n { immediate: true },\n)\n\nonBeforeUnmount(() => emit('unmount'))\n</script>\n\n<!-- eslint-disable-next-line vue/valid-template-root -->\n<template>\n <!-- We use this hack to emit the slot value back to the parent -->\n</template>\n","<script lang=\"ts\">\n/**\n * This component takes in any value and emits it back\n *\n * This is useful when we need to catch the open state of a disclosure from its v-slot\n */\nexport default {\n name: 'ValueEmitter',\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { onBeforeUnmount, watch } from 'vue'\n\nconst { value } = defineProps<{ value: T }>()\nconst emit = defineEmits<{\n (e: 'change', value: T): void\n (e: 'unmount'): void\n}>()\n\nwatch(\n () => value,\n (newValue) => emit('change', newValue),\n { immediate: true },\n)\n\nonBeforeUnmount(() => emit('unmount'))\n</script>\n\n<!-- eslint-disable-next-line vue/valid-template-root -->\n<template>\n <!-- We use this hack to emit the slot value back to the parent -->\n</template>\n"],"mappings":";;;;CCOE,MAAM;;;;EAQR,MAAM,OAAO;AAKb,cACQ,QAAA,QACL,aAAa,KAAK,UAAU,SAAS,EACtC,EAAE,WAAW,MAAM,CACrB;AAEA,wBAAsB,KAAK,UAAU,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
|
|
2
|
+
import { useBindCx } from "@scalar/components";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/components/ViewLayout/ViewLayout.vue
|
|
5
|
+
var ViewLayout_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "ViewLayout",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const { cx } = useBindCx();
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)("flex flex-col min-h-0 flex-1 *:border-t first:*:border-t-0 md:*:border-t-0 xl:overflow-hidden md:flex-row leading-5"))), [renderSlot(_ctx.$slots, "default")], 16);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ViewLayout_default as t };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=ViewLayout-BOXN0IYo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewLayout-BOXN0IYo.js","names":[],"sources":["../src/components/ViewLayout/ViewLayout.vue","../src/components/ViewLayout/ViewLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/components'\n\nconst { cx } = useBindCx()\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'flex flex-col min-h-0 flex-1 *:border-t first:*:border-t-0 md:*:border-t-0 xl:overflow-hidden md:flex-row leading-5',\n )\n \">\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/components'\n\nconst { cx } = useBindCx()\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'flex flex-col min-h-0 flex-1 *:border-t first:*:border-t-0 md:*:border-t-0 xl:overflow-hidden md:flex-row leading-5',\n )\n \">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;ECGA,MAAM,EAAE,OAAO,WAAU;;uBAIvB,mBAOM,OAAA,eAAA,mBANW,MAAA,GAAE,CAAA,sHAAA,CAAA,CAAA,EAAA,CAKjB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
|