@scalar/api-client 2.2.45 → 2.2.48
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 +82 -0
- package/README.md +1 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -2
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +35 -30
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -5
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +76 -70
- package/dist/components/CodeInput/codeVariableWidget.d.ts +5 -5
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +2 -3
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +4 -4
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +10 -10
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +46 -40
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -14
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +13 -13
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +1 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/ContextBar.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +22 -23
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +3 -3
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +48 -48
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +2 -2
- package/dist/components/EmptyState.vue2.js +13 -13
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +1 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +2 -2
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +3 -3
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Search/useSearch.d.ts +4 -2
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +63 -56
- package/dist/components/Search/useSearch.test.d.ts +2 -0
- package/dist/components/Search/useSearch.test.d.ts.map +1 -0
- package/dist/components/Server/ServerDropdown.test.d.ts +2 -0
- package/dist/components/Server/ServerDropdown.test.d.ts.map +1 -0
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +27 -28
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +9 -9
- package/dist/components/Server/index.d.ts +2 -2
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +19 -19
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +11 -11
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +19 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +3 -3
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +5 -5
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +3 -3
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -3
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +74 -73
- package/dist/components/TopNav/TopNavItem.vue.d.ts +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/hooks/index.d.ts +5 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useResponseBody.d.ts +18 -0
- package/dist/hooks/useResponseBody.d.ts.map +1 -0
- package/dist/hooks/useResponseBody.js +28 -0
- package/dist/hooks/useResponseBody.test.d.ts +2 -0
- package/dist/hooks/useResponseBody.test.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/layouts/App/ApiClientApp.vue.d.ts +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts +106 -66
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.test.d.ts +2 -0
- package/dist/layouts/App/create-api-client-app.test.d.ts.map +1 -0
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +215 -135
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts +2 -0
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +1 -0
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +106 -66
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.test.d.ts +2 -0
- package/dist/layouts/Web/create-api-client-web.test.d.ts.map +1 -0
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/libs/create-client.d.ts +106 -66
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +56 -57
- package/dist/libs/env-helpers.test.d.ts +2 -0
- package/dist/libs/env-helpers.test.d.ts.map +1 -0
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/event-bus.test.d.ts +2 -0
- package/dist/libs/event-bus.test.d.ts.map +1 -0
- package/dist/libs/extractAttachmentFilename.test.d.ts +2 -0
- package/dist/libs/extractAttachmentFilename.test.d.ts.map +1 -0
- package/dist/libs/find-request.test.d.ts +2 -0
- package/dist/libs/find-request.test.d.ts.map +1 -0
- package/dist/libs/getOpenApiDocumentDetails.d.ts +1 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/curl.js +1 -1
- package/dist/libs/importers/curl.test.d.ts +2 -0
- package/dist/libs/importers/curl.test.d.ts.map +1 -0
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/index.d.ts +16 -16
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/normalize-headers.test.d.ts +2 -0
- package/dist/libs/normalize-headers.test.d.ts.map +1 -0
- package/dist/libs/parse-curl.test.d.ts +2 -0
- package/dist/libs/parse-curl.test.d.ts.map +1 -0
- package/dist/libs/send-request/build-request-security.d.ts.map +1 -1
- package/dist/libs/send-request/build-request-security.js +13 -12
- package/dist/libs/send-request/build-request-security.test.d.ts +2 -0
- package/dist/libs/send-request/build-request-security.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-auth.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-body.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-headers.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts +4 -4
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +54 -54
- package/dist/libs/send-request/create-request-operation.test.d.ts +171 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -0
- package/dist/libs/send-request/decode-buffer.test.d.ts +2 -0
- package/dist/libs/send-request/decode-buffer.test.d.ts.map +1 -0
- package/dist/libs/send-request/index.d.ts +2 -2
- package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.test.d.ts +2 -0
- package/dist/libs/send-request/set-request-cookies.test.d.ts.map +1 -0
- package/dist/libs/string-template.test.d.ts +2 -0
- package/dist/libs/string-template.test.d.ts.map +1 -0
- package/dist/router.d.ts +1 -1
- package/dist/routes.d.ts +27 -27
- package/dist/routes.js +4 -4
- package/dist/routes.test.d.ts +2 -0
- package/dist/routes.test.d.ts.map +1 -0
- package/dist/store/active-entities.d.ts +10 -6
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +17 -14
- package/dist/store/collections.test.d.ts +2 -0
- package/dist/store/collections.test.d.ts.map +1 -0
- package/dist/store/events.d.ts +7 -7
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/store/request-example.d.ts +52 -52
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request.test.d.ts +2 -0
- package/dist/store/request.test.d.ts.map +1 -0
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/router-params.d.ts +1 -1
- package/dist/store/store.d.ts +103 -63
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +1 -1
- package/dist/store/workspace.d.ts +44 -4
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +13 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +46 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +4 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts +28 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +64 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +12 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +47 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +13 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +47 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/index.d.ts +5 -0
- package/dist/views/Components/CodeSnippet/index.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/index.js +10 -0
- package/dist/views/Cookies/CookieModal.vue.d.ts +3 -3
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +77 -70
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +131 -118
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +6 -6
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -2
- package/dist/views/Request/Request.vue.d.ts +2 -2
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +92 -86
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +4 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +20 -20
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +3 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +141 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +53 -59
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +71 -62
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +8 -8
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +59 -59
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts +6 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +20 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +6 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.js +17 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/index.d.ts +2 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +212 -194
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +18 -31
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +115 -116
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +120 -101
- package/dist/views/Request/RequestSubpageHeader.test.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +50 -64
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +3 -3
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +27 -27
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +6 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +38 -19
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +30 -28
- package/dist/views/Request/ResponseSection/index.d.ts +1 -1
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/consts/index.d.ts +3 -3
- 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/auth.test.d.ts +2 -0
- package/dist/views/Request/libs/auth.test.d.ts.map +1 -0
- package/dist/views/Request/libs/index.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +7 -7
- package/dist/views/Request/libs/oauth2.test.d.ts +2 -0
- package/dist/views/Request/libs/oauth2.test.d.ts.map +1 -0
- package/dist/views/Request/libs/request.test.d.ts +2 -0
- package/dist/views/Request/libs/request.test.d.ts.map +1 -0
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/libs/watch-mode.test.d.ts +2 -0
- package/dist/views/Request/libs/watch-mode.test.d.ts.map +1 -0
- package/dist/views/Request/types/sidebar-item.d.ts +2 -2
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +74 -65
- package/dist/views/Servers/index.d.ts +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
- package/package.json +27 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.2.48
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 453ed40: fix: preserve lowercase auth headers
|
|
8
|
+
- 54fdfcb: chore: remove spec wording
|
|
9
|
+
- 8671902: fix: sets overflow on input enum value
|
|
10
|
+
- 7ce8d4c: fix: updates sidebar icon hover state style
|
|
11
|
+
- 4dedb68: fix: updates disabled style based on layout
|
|
12
|
+
- Updated dependencies [54fdfcb]
|
|
13
|
+
- Updated dependencies [825bc40]
|
|
14
|
+
- Updated dependencies [fa6afe8]
|
|
15
|
+
- Updated dependencies [1223c1f]
|
|
16
|
+
- Updated dependencies [4d30a35]
|
|
17
|
+
- @scalar/oas-utils@0.2.105
|
|
18
|
+
- @scalar/import@0.2.25
|
|
19
|
+
- @scalar/types@0.0.33
|
|
20
|
+
- @scalar/components@0.13.24
|
|
21
|
+
- @scalar/postman-to-openapi@0.1.28
|
|
22
|
+
- @scalar/use-codemirror@0.11.69
|
|
23
|
+
- @scalar/object-utils@1.1.13
|
|
24
|
+
- @scalar/use-tooltip@1.0.6
|
|
25
|
+
- @scalar/use-toasts@0.7.9
|
|
26
|
+
- @scalar/draggable@0.1.10
|
|
27
|
+
- @scalar/use-hooks@0.1.21
|
|
28
|
+
- @scalar/snippetz@0.2.13
|
|
29
|
+
- @scalar/themes@0.9.67
|
|
30
|
+
- @scalar/icons@0.1.3
|
|
31
|
+
- @scalar/openapi-parser@0.10.7
|
|
32
|
+
- @scalar/openapi-types@0.1.7
|
|
33
|
+
|
|
34
|
+
## 2.2.47
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- d028579: fix: only send scopes during certain oauth2 auth calls
|
|
39
|
+
- c5e9597: feat: adds useRequestBody hook"
|
|
40
|
+
- bdddb12: fix: updates request sidebar height responsiveness
|
|
41
|
+
- f500435: chore: stricter TypeScript configuration
|
|
42
|
+
- c5e9597: feat: adds download button in virtual response
|
|
43
|
+
- f9a75af: fix: routing broken on servers and environment page
|
|
44
|
+
- a515167: fix: adds setting apparence button hover
|
|
45
|
+
- 82c8f39: Allow custom value in parameters
|
|
46
|
+
- b2a19ba: fix: updates empty state hotkey style
|
|
47
|
+
- fa59538: fix: make headers take priority over auth
|
|
48
|
+
- 34e6f52: feat: upgrade to stricter tsconfig
|
|
49
|
+
- bdddb12: fix: updates getting started state logic in request sidebar
|
|
50
|
+
- d2165a8: refactor: use more named routes
|
|
51
|
+
- 4de3124: fix: can’t import type array e.g. `['string', 'null']`
|
|
52
|
+
- Updated dependencies [4de3124]
|
|
53
|
+
- Updated dependencies [69da9e0]
|
|
54
|
+
- Updated dependencies [f500435]
|
|
55
|
+
- Updated dependencies [da5cf08]
|
|
56
|
+
- Updated dependencies [b5727ef]
|
|
57
|
+
- Updated dependencies [4de3124]
|
|
58
|
+
- Updated dependencies [f9eee3f]
|
|
59
|
+
- Updated dependencies [34e6f52]
|
|
60
|
+
- Updated dependencies [f2b082a]
|
|
61
|
+
- @scalar/openapi-parser@0.10.6
|
|
62
|
+
- @scalar/components@0.13.23
|
|
63
|
+
- @scalar/draggable@0.1.9
|
|
64
|
+
- @scalar/oas-utils@0.2.104
|
|
65
|
+
- @scalar/types@0.0.32
|
|
66
|
+
- @scalar/snippetz@0.2.12
|
|
67
|
+
- @scalar/import@0.2.24
|
|
68
|
+
- @scalar/use-codemirror@0.11.68
|
|
69
|
+
- @scalar/postman-to-openapi@0.1.27
|
|
70
|
+
- @scalar/themes@0.9.66
|
|
71
|
+
- @scalar/use-hooks@0.1.20
|
|
72
|
+
|
|
73
|
+
## 2.2.46
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- abc40ce: feat: adds request preview
|
|
78
|
+
- 0b18abe: fix: adds back request in search
|
|
79
|
+
- e4f11d8: fix: removes servers on collection deletion
|
|
80
|
+
- 2969dd0: fix: updates sidenav link active style for lightmode
|
|
81
|
+
- Updated dependencies [abc40ce]
|
|
82
|
+
- @scalar/components@0.13.22
|
|
83
|
+
- @scalar/use-codemirror@0.11.67
|
|
84
|
+
|
|
3
85
|
## 2.2.45
|
|
4
86
|
|
|
5
87
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ open()
|
|
|
100
100
|
```ts
|
|
101
101
|
/** Configuration options for the Scalar API client */
|
|
102
102
|
export type ClientConfiguration = {
|
|
103
|
-
/** The Swagger/OpenAPI
|
|
103
|
+
/** The Swagger/OpenAPI document to render */
|
|
104
104
|
spec: SpecConfiguration
|
|
105
105
|
/** Pass in a proxy to the API client */
|
|
106
106
|
proxyUrl?: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
2
|
importCurl: (value: string) => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onImportCurl?: (
|
|
4
|
+
onImportCurl?: (value: string) => any;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=AddressBar.vue.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f37ba3d4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -52,8 +52,7 @@ const ee = ["id"], te = { class: "m-auto flex flex-row items-center" }, le = { c
|
|
|
52
52
|
return F[e].backgroundColor;
|
|
53
53
|
}
|
|
54
54
|
function p() {
|
|
55
|
-
|
|
56
|
-
s.value || (s.value = !0, v.executeRequest.emit({ requestUid: (e = l.value) == null ? void 0 : e.uid }));
|
|
55
|
+
s.value || !l.value || (s.value = !0, v.executeRequest.emit({ requestUid: l.value.uid }));
|
|
57
56
|
}
|
|
58
57
|
v.hotKeys.on((e) => {
|
|
59
58
|
var a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AA0LA,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AA0QF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBarHistory.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3f107c93"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { formatMs as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import D from "
|
|
9
|
-
import
|
|
1
|
+
import { defineComponent as C, ref as y, computed as S, openBlock as n, createBlock as i, unref as e, withCtx as a, createVNode as d, createSlots as B, createElementVNode as l, createCommentVNode as h, normalizeStyle as H, createElementBlock as V, Fragment as w, renderList as z, toDisplayString as m, normalizeClass as L } from "vue";
|
|
2
|
+
import { formatMs as E } from "../../libs/formatters.js";
|
|
3
|
+
import { PathId as k } from "../../routes.js";
|
|
4
|
+
import { useActiveEntities as R } from "../../store/active-entities.js";
|
|
5
|
+
import { Listbox as U, ListboxButton as F, ListboxOptions as I, ListboxOption as M } from "@headlessui/vue";
|
|
6
|
+
import { ScalarFloating as N, ScalarIcon as A, ScalarFloatingBackdrop as O } from "@scalar/components";
|
|
7
|
+
import { httpStatusCodes as W } from "@scalar/oas-utils/helpers";
|
|
8
|
+
import { useRouter as D } from "vue-router";
|
|
9
|
+
import P from "../HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import { getStatusCodeColor as $ } from "./httpStatusCodeColors.js";
|
|
10
11
|
import { useWorkspace as j } from "../../store/store.js";
|
|
11
|
-
const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" },
|
|
12
|
+
const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, le = /* @__PURE__ */ C({
|
|
12
13
|
__name: "AddressBarHistory",
|
|
13
14
|
props: {
|
|
14
15
|
target: {}
|
|
15
16
|
},
|
|
16
17
|
setup(K) {
|
|
17
|
-
const { activeRequest: p } =
|
|
18
|
+
const { activeRequest: p } = R(), { requestHistory: f, requestExampleMutators: q } = j(), v = D(), x = y(f[0] ?? null), g = S(
|
|
18
19
|
() => f.filter((o) => {
|
|
19
20
|
var t;
|
|
20
21
|
return o.request.requestUid === ((t = p.value) == null ? void 0 : t.uid);
|
|
@@ -23,20 +24,24 @@ const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re =
|
|
|
23
24
|
function _(o) {
|
|
24
25
|
var r;
|
|
25
26
|
const t = v.currentRoute.value.params.workspace;
|
|
26
|
-
((r = p.value) == null ? void 0 : r.uid) !== o.request.requestUid && v.push(
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
((r = p.value) == null ? void 0 : r.uid) !== o.request.requestUid && v.push({
|
|
28
|
+
name: "request",
|
|
29
|
+
params: {
|
|
30
|
+
[k.Workspace]: t,
|
|
31
|
+
[k.Request]: o.request.requestUid
|
|
32
|
+
}
|
|
33
|
+
}), q.set({ ...o.request });
|
|
29
34
|
}
|
|
30
35
|
return (o, t) => (n(), i(e(U), {
|
|
31
36
|
modelValue: x.value,
|
|
32
37
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => x.value = r)
|
|
33
38
|
}, {
|
|
34
39
|
default: a(({ open: r }) => [
|
|
35
|
-
d(e(
|
|
40
|
+
d(e(N), {
|
|
36
41
|
offset: 0,
|
|
37
42
|
resize: "",
|
|
38
43
|
target: o.target
|
|
39
|
-
},
|
|
44
|
+
}, B({
|
|
40
45
|
default: a(() => {
|
|
41
46
|
var u;
|
|
42
47
|
return [
|
|
@@ -45,7 +50,7 @@ const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re =
|
|
|
45
50
|
class: "addressbar-history-button z-context-plus mr-1 rounded-lg p-1.5 text-c-3 focus:text-c-1"
|
|
46
51
|
}, {
|
|
47
52
|
default: a(() => [
|
|
48
|
-
d(e(
|
|
53
|
+
d(e(A), {
|
|
49
54
|
icon: "History",
|
|
50
55
|
size: "sm",
|
|
51
56
|
thickness: "2.25"
|
|
@@ -61,33 +66,33 @@ const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re =
|
|
|
61
66
|
r ? {
|
|
62
67
|
name: "floating",
|
|
63
68
|
fn: a(({ width: u }) => [
|
|
64
|
-
d(e(
|
|
69
|
+
d(e(I), {
|
|
65
70
|
class: "address-bg-states border-t custom-scroll max-h-[inherit] p-0.75 grid grid-cols-[44px,1fr,repeat(3,auto)] items-center",
|
|
66
|
-
style:
|
|
71
|
+
style: H({ width: u })
|
|
67
72
|
}, {
|
|
68
73
|
default: a(() => [
|
|
69
|
-
(n(!0),
|
|
74
|
+
(n(!0), V(w, null, z(g.value, (s, b) => (n(), i(e(M), {
|
|
70
75
|
key: s.timestamp,
|
|
71
76
|
class: "contents font-code text-sm *:rounded-none first:*:rounded-l last:*:rounded-r *:h-8 *:ui-active:bg-b-2 *:flex *:items-center *:cursor-pointer *:px-1.5 text-c-2 font-medium",
|
|
72
77
|
value: b,
|
|
73
|
-
onClick: (
|
|
78
|
+
onClick: (c) => _(s)
|
|
74
79
|
}, {
|
|
75
80
|
default: a(() => {
|
|
76
|
-
var
|
|
81
|
+
var c;
|
|
77
82
|
return [
|
|
78
|
-
s.response.method ? (n(), i(
|
|
83
|
+
s.response.method ? (n(), i(P, {
|
|
79
84
|
key: 0,
|
|
80
85
|
class: "text-[11px]",
|
|
81
86
|
method: s.response.method
|
|
82
87
|
}, null, 8, ["method"])) : h("", !0),
|
|
83
88
|
l("div", G, [
|
|
84
|
-
l("div", J,
|
|
89
|
+
l("div", J, m(s.response.path), 1)
|
|
85
90
|
]),
|
|
86
|
-
l("div", null,
|
|
91
|
+
l("div", null, m(e(E)(s.response.duration)), 1),
|
|
87
92
|
l("div", {
|
|
88
|
-
class:
|
|
89
|
-
},
|
|
90
|
-
l("div", null,
|
|
93
|
+
class: L([e($)(s.response.status).color])
|
|
94
|
+
}, m(s.response.status), 3),
|
|
95
|
+
l("div", null, m((c = e(W)[s.response.status]) == null ? void 0 : c.name), 1)
|
|
91
96
|
];
|
|
92
97
|
}),
|
|
93
98
|
_: 2
|
|
@@ -95,7 +100,7 @@ const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re =
|
|
|
95
100
|
]),
|
|
96
101
|
_: 2
|
|
97
102
|
}, 1032, ["style"]),
|
|
98
|
-
d(e(
|
|
103
|
+
d(e(O), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
|
|
99
104
|
]),
|
|
100
105
|
key: "0"
|
|
101
106
|
} : void 0
|
|
@@ -106,5 +111,5 @@ const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re =
|
|
|
106
111
|
}
|
|
107
112
|
});
|
|
108
113
|
export {
|
|
109
|
-
|
|
114
|
+
le as default
|
|
110
115
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as AddressBar } from './AddressBar.vue
|
|
1
|
+
export { default as AddressBar } from './AddressBar.vue';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -17,7 +17,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
17
17
|
disableCloseBrackets?: boolean;
|
|
18
18
|
enum?: string[];
|
|
19
19
|
examples?: string[];
|
|
20
|
-
type?: string;
|
|
20
|
+
type?: string | string[] | undefined;
|
|
21
21
|
nullable?: boolean;
|
|
22
22
|
withVariables?: boolean;
|
|
23
23
|
importCurl?: boolean;
|
|
@@ -47,16 +47,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
47
47
|
disableCloseBrackets?: boolean;
|
|
48
48
|
enum?: string[];
|
|
49
49
|
examples?: string[];
|
|
50
|
-
type?: string;
|
|
50
|
+
type?: string | string[] | undefined;
|
|
51
51
|
nullable?: boolean;
|
|
52
52
|
withVariables?: boolean;
|
|
53
53
|
importCurl?: boolean;
|
|
54
54
|
isCopyable?: boolean;
|
|
55
55
|
default?: string | number;
|
|
56
56
|
}> & Readonly<{
|
|
57
|
-
onSubmit?: (
|
|
58
|
-
"onUpdate:modelValue"?: (
|
|
59
|
-
onCurl?: (
|
|
57
|
+
onSubmit?: (v: string) => any;
|
|
58
|
+
"onUpdate:modelValue"?: (v: string) => any;
|
|
59
|
+
onCurl?: (v: string) => any;
|
|
60
60
|
}>, {
|
|
61
61
|
disabled: boolean;
|
|
62
62
|
emitOnBlur: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA6eA,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBAtBX,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;cArBd,OAAO;gBAGL,OAAO;iBAJN,OAAO;sBAOF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAInB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAgdM,GAAG;kBACN,GAAG;;AAze9B,wBAsiBC;AAeD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5ee3c100"]]);
|
|
6
6
|
export {
|
|
7
7
|
_ as default
|
|
8
8
|
};
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { pillPlugin as te, backspaceCommand as ne } from "./codeVariableWidget.js";
|
|
6
|
-
import ae from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
1
|
+
import { defineComponent as Q, useAttrs as G, ref as d, toRef as u, watch as H, computed as $, openBlock as n, createElementBlock as i, Fragment as X, normalizeClass as Y, unref as a, createElementVNode as V, toDisplayString as Z, createBlock as f, mergeProps as _, withKeys as g, withModifiers as q, createVNode as ee, createCommentVNode as c, renderSlot as A } from "vue";
|
|
2
|
+
import { ScalarIcon as oe } from "@scalar/components";
|
|
3
|
+
import { prettyPrintJson as le } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useCodeMirror as te, useDropdown as ne, colorPicker as ae } from "@scalar/use-codemirror";
|
|
7
5
|
import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, me = ["id"], fe = {
|
|
6
|
+
import { nanoid as ue } from "nanoid";
|
|
7
|
+
import { useActiveEntities as se } from "../../store/active-entities.js";
|
|
8
|
+
import de from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
9
|
+
import B from "../DataTable/DataTableInputSelect.vue.js";
|
|
10
|
+
import { pillPlugin as ie, backspaceCommand as pe } from "./codeVariableWidget.js";
|
|
11
|
+
import { useLayout as me } from "../../hooks/useLayout.js";
|
|
12
|
+
const fe = ["id"], ce = {
|
|
16
13
|
key: 0,
|
|
17
14
|
class: "scalar-code-copy z-context"
|
|
18
|
-
}, ce = {
|
|
19
|
-
key: 5,
|
|
20
|
-
class: "absolute centered-y right-7 text-orange text-xs"
|
|
21
15
|
}, ye = {
|
|
22
|
-
key:
|
|
23
|
-
class: "
|
|
16
|
+
key: 5,
|
|
17
|
+
class: "centered-y text-orange absolute right-7 text-xs"
|
|
24
18
|
}, be = {
|
|
19
|
+
key: 6,
|
|
20
|
+
class: "required centered-y text-xxs text-c-3 bg-b-1 pointer-events-none absolute right-0 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 peer-has-[.cm-focused]:opacity-0"
|
|
21
|
+
}, ve = {
|
|
25
22
|
inheritAttrs: !1
|
|
26
|
-
},
|
|
27
|
-
...
|
|
23
|
+
}, Fe = /* @__PURE__ */ Q({
|
|
24
|
+
...ve,
|
|
28
25
|
__name: "CodeInput",
|
|
29
26
|
props: {
|
|
30
27
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -54,8 +51,8 @@ const pe = {
|
|
|
54
51
|
emits: ["submit", "update:modelValue", "curl"],
|
|
55
52
|
setup(R, { expose: N, emit: O }) {
|
|
56
53
|
var F;
|
|
57
|
-
const o = R, s = O,
|
|
58
|
-
function
|
|
54
|
+
const o = R, s = O, C = G(), I = C.id || `id-${ue()}`, k = d(!1), y = d(!1), S = d(""), x = d({ left: 0, top: 0 }), m = d(null), { activeEnvVariables: P, activeEnvironment: b, activeWorkspace: K } = se(), { layout: v } = me(), { copyToClipboard: M } = re();
|
|
55
|
+
function T(e) {
|
|
59
56
|
var l;
|
|
60
57
|
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (s("curl", e), (l = r.value) == null || l.dispatch({
|
|
61
58
|
changes: {
|
|
@@ -65,28 +62,28 @@ const pe = {
|
|
|
65
62
|
}
|
|
66
63
|
}), null) : o.handleFieldChange ? o.handleFieldChange(e) : s("update:modelValue", e);
|
|
67
64
|
}
|
|
68
|
-
function
|
|
65
|
+
function z(e) {
|
|
69
66
|
return o.handleFieldSubmit ? o.handleFieldSubmit(e) : s("submit", e);
|
|
70
67
|
}
|
|
71
68
|
function U(e) {
|
|
72
|
-
k.value = !1, o.emitOnBlur && o.modelValue &&
|
|
69
|
+
k.value = !1, o.emitOnBlur && o.modelValue && z(e);
|
|
73
70
|
}
|
|
74
|
-
const
|
|
75
|
-
o.colorPicker &&
|
|
76
|
-
|
|
71
|
+
const h = [];
|
|
72
|
+
o.colorPicker && h.push(ae), h.push(
|
|
73
|
+
ie({
|
|
77
74
|
environment: b.value,
|
|
78
75
|
envVariables: P.value,
|
|
79
|
-
workspace:
|
|
80
|
-
isReadOnly:
|
|
76
|
+
workspace: K.value,
|
|
77
|
+
isReadOnly: v === "modal"
|
|
81
78
|
}),
|
|
82
|
-
|
|
79
|
+
pe
|
|
83
80
|
);
|
|
84
|
-
const D = d(null), { codeMirror: r } =
|
|
81
|
+
const D = d(null), { codeMirror: r } = te({
|
|
85
82
|
content: u(
|
|
86
83
|
() => o.modelValue !== void 0 ? String(o.modelValue) : ""
|
|
87
84
|
),
|
|
88
85
|
onChange: (e) => {
|
|
89
|
-
|
|
86
|
+
T(e), L();
|
|
90
87
|
},
|
|
91
88
|
onFocus: () => k.value = !0,
|
|
92
89
|
onBlur: (e) => U(e),
|
|
@@ -97,18 +94,18 @@ const pe = {
|
|
|
97
94
|
lineNumbers: u(() => o.lineNumbers),
|
|
98
95
|
language: u(() => o.language),
|
|
99
96
|
lint: u(() => o.lint),
|
|
100
|
-
extensions:
|
|
97
|
+
extensions: h,
|
|
101
98
|
placeholder: u(() => o.placeholder)
|
|
102
99
|
});
|
|
103
|
-
(F = r.value) == null || F.focus(),
|
|
104
|
-
r.value && Object.prototype.hasOwnProperty.call(
|
|
100
|
+
(F = r.value) == null || F.focus(), H(r, () => {
|
|
101
|
+
r.value && Object.prototype.hasOwnProperty.call(C, "autofocus") && r.value.focus();
|
|
105
102
|
});
|
|
106
|
-
const { handleDropdownSelect: j, updateDropdownVisibility:
|
|
103
|
+
const { handleDropdownSelect: j, updateDropdownVisibility: L } = ne({
|
|
107
104
|
codeMirror: r,
|
|
108
|
-
query:
|
|
105
|
+
query: S,
|
|
109
106
|
showDropdown: y,
|
|
110
|
-
dropdownPosition:
|
|
111
|
-
}),
|
|
107
|
+
dropdownPosition: x
|
|
108
|
+
}), W = $(() => {
|
|
112
109
|
var e;
|
|
113
110
|
return o.type === "boolean" || (e = o.type) != null && e.includes("boolean") || o.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
114
111
|
});
|
|
@@ -118,76 +115,85 @@ const pe = {
|
|
|
118
115
|
(e = r.value) == null || e.focus();
|
|
119
116
|
}
|
|
120
117
|
});
|
|
121
|
-
const
|
|
118
|
+
const w = (e, l) => {
|
|
122
119
|
var p, t, E;
|
|
123
120
|
y.value && (e === "down" ? (l.preventDefault(), (p = m.value) == null || p.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), (t = m.value) == null || t.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), (E = m.value) == null || E.handleSelect()));
|
|
124
|
-
}
|
|
121
|
+
}, J = $(() => Array.isArray(o.type) ? (
|
|
122
|
+
// Find the first type, that’s not 'null'
|
|
123
|
+
o.type.find((e) => e !== "null") ?? "string"
|
|
124
|
+
) : (
|
|
125
|
+
// If it’s not an array, just return the type
|
|
126
|
+
o.type
|
|
127
|
+
));
|
|
125
128
|
return (e, l) => {
|
|
126
129
|
var p;
|
|
127
|
-
return n(), i(
|
|
128
|
-
e.disabled ? (n(), i("div",
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
return n(), i(X, null, [
|
|
131
|
+
e.disabled ? (n(), i("div", {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: Y(["text-c-2 flex cursor-default items-center justify-center", a(v) === "modal" ? "font-code pl-1 pr-2 text-sm" : "px-2"])
|
|
134
|
+
}, [
|
|
135
|
+
V("span", null, Z(e.modelValue), 1)
|
|
136
|
+
], 2)) : o.enum && o.enum.length ? (n(), f(B, {
|
|
131
137
|
key: 1,
|
|
132
138
|
default: o.default,
|
|
133
139
|
modelValue: e.modelValue,
|
|
134
|
-
type:
|
|
140
|
+
type: J.value,
|
|
135
141
|
value: o.enum,
|
|
136
142
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => s("update:modelValue", t))
|
|
137
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (p = e.type) != null && p.includes("boolean") ? (n(), f(
|
|
143
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (p = e.type) != null && p.includes("boolean") ? (n(), f(B, {
|
|
138
144
|
key: 2,
|
|
139
145
|
default: o.default,
|
|
140
146
|
modelValue: e.modelValue,
|
|
141
|
-
value:
|
|
147
|
+
value: W.value,
|
|
142
148
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => s("update:modelValue", t))
|
|
143
|
-
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), f(
|
|
149
|
+
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), f(B, {
|
|
144
150
|
key: 3,
|
|
145
151
|
default: o.default,
|
|
146
152
|
modelValue: o.modelValue,
|
|
147
153
|
value: o.examples,
|
|
148
154
|
"onUpdate:modelValue": l[2] || (l[2] = (t) => s("update:modelValue", t))
|
|
149
|
-
}, null, 8, ["default", "modelValue", "value"])) : (n(), i("div",
|
|
155
|
+
}, null, 8, ["default", "modelValue", "value"])) : (n(), i("div", _({
|
|
150
156
|
key: 4,
|
|
151
|
-
id: a(
|
|
157
|
+
id: a(I)
|
|
152
158
|
}, e.$attrs, {
|
|
153
159
|
ref_key: "codeMirrorRef",
|
|
154
160
|
ref: D,
|
|
155
|
-
class: ["
|
|
161
|
+
class: ["font-code peer relative w-full overflow-hidden whitespace-nowrap text-xs leading-[1.44] -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
156
162
|
"flow-code-input--error": e.error
|
|
157
163
|
}],
|
|
158
164
|
onKeydown: [
|
|
159
|
-
l[4] || (l[4] =
|
|
160
|
-
l[5] || (l[5] =
|
|
161
|
-
l[6] || (l[6] =
|
|
165
|
+
l[4] || (l[4] = g(q((t) => w("down", t), ["stop"]), ["down"])),
|
|
166
|
+
l[5] || (l[5] = g((t) => w("enter", t), ["enter"])),
|
|
167
|
+
l[6] || (l[6] = g(q((t) => w("up", t), ["stop"]), ["up"]))
|
|
162
168
|
]
|
|
163
169
|
}), [
|
|
164
|
-
e.isCopyable ? (n(), i("div",
|
|
165
|
-
|
|
170
|
+
e.isCopyable ? (n(), i("div", ce, [
|
|
171
|
+
V("button", {
|
|
166
172
|
class: "copy-button",
|
|
167
173
|
type: "button",
|
|
168
|
-
onClick: l[3] || (l[3] = (t) => a(
|
|
174
|
+
onClick: l[3] || (l[3] = (t) => a(M)(a(le)(e.modelValue)))
|
|
169
175
|
}, [
|
|
170
|
-
l[7] || (l[7] =
|
|
171
|
-
|
|
176
|
+
l[7] || (l[7] = V("span", { class: "sr-only" }, "Copy content", -1)),
|
|
177
|
+
ee(a(oe), {
|
|
172
178
|
icon: "Clipboard",
|
|
173
179
|
size: "md"
|
|
174
180
|
})
|
|
175
181
|
])
|
|
176
182
|
])) : c("", !0)
|
|
177
|
-
], 16,
|
|
178
|
-
e.$slots.warning ? (n(), i("div",
|
|
179
|
-
|
|
183
|
+
], 16, fe)),
|
|
184
|
+
e.$slots.warning ? (n(), i("div", ye, [
|
|
185
|
+
A(e.$slots, "warning", {}, void 0, !0)
|
|
180
186
|
])) : c("", !0),
|
|
181
|
-
|
|
182
|
-
e.required ? (n(), i("div",
|
|
183
|
-
y.value && e.withVariables && a(
|
|
187
|
+
A(e.$slots, "icon", {}, void 0, !0),
|
|
188
|
+
e.required ? (n(), i("div", be, " Required ")) : c("", !0),
|
|
189
|
+
y.value && e.withVariables && a(v) !== "modal" && a(b) ? (n(), f(de, {
|
|
184
190
|
key: 7,
|
|
185
191
|
ref_key: "dropdownRef",
|
|
186
192
|
ref: m,
|
|
187
|
-
dropdownPosition:
|
|
193
|
+
dropdownPosition: x.value,
|
|
188
194
|
envVariables: a(P),
|
|
189
195
|
environment: a(b),
|
|
190
|
-
query:
|
|
196
|
+
query: S.value,
|
|
191
197
|
onSelect: a(j)
|
|
192
198
|
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : c("", !0)
|
|
193
199
|
], 64);
|
|
@@ -195,5 +201,5 @@ const pe = {
|
|
|
195
201
|
}
|
|
196
202
|
});
|
|
197
203
|
export {
|
|
198
|
-
|
|
204
|
+
Fe as default
|
|
199
205
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EnvVariables } from '../../libs/env-helpers
|
|
1
|
+
import { type EnvVariables } from '../../libs/env-helpers';
|
|
2
2
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
3
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
4
|
import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
@@ -6,10 +6,10 @@ import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate
|
|
|
6
6
|
* Styles the active environment variable pill
|
|
7
7
|
*/
|
|
8
8
|
export declare const pillPlugin: (props: {
|
|
9
|
-
environment
|
|
10
|
-
envVariables
|
|
11
|
-
workspace
|
|
12
|
-
isReadOnly
|
|
9
|
+
environment: Environment | undefined;
|
|
10
|
+
envVariables: EnvVariables | undefined;
|
|
11
|
+
workspace: Workspace | undefined;
|
|
12
|
+
isReadOnly: boolean | undefined;
|
|
13
13
|
}) => ViewPlugin<{
|
|
14
14
|
decorations: DecorationSet;
|
|
15
15
|
update(update: ViewUpdate): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAoI/B;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -15,7 +15,7 @@ class d extends k {
|
|
|
15
15
|
l(this, "envVariables");
|
|
16
16
|
l(this, "workspace");
|
|
17
17
|
l(this, "isReadOnly");
|
|
18
|
-
this.variableName = e, this.variableName = e, this.environment = o, this.envVariables = i, this.workspace = c, this.isReadOnly = a;
|
|
18
|
+
this.variableName = e, this.variableName = e, this.environment = o, this.envVariables = i, this.workspace = c, this.isReadOnly = a ?? !1;
|
|
19
19
|
}
|
|
20
20
|
toDOM() {
|
|
21
21
|
const e = document.createElement("span");
|
|
@@ -35,10 +35,9 @@ class d extends k {
|
|
|
35
35
|
{
|
|
36
36
|
class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
|
|
37
37
|
variant: "ghost",
|
|
38
|
-
// TODO: Use router instead
|
|
39
38
|
onClick: () => {
|
|
40
39
|
var r;
|
|
41
|
-
|
|
40
|
+
window.location.href = `/workspace/${(r = this.workspace) == null ? void 0 : r.uid}/environment`;
|
|
42
41
|
}
|
|
43
42
|
},
|
|
44
43
|
{
|