@scalar/api-client 2.18.1 → 2.18.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 +61 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
- package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
- package/dist/components/DataTable/DataTable.vue.js +17 -17
- package/dist/components/DataTable/DataTableCell.vue.js +9 -9
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
- package/dist/components/DataTable/DataTableText.vue.js +10 -10
- package/dist/components/Form/Form.vue.js +32 -32
- package/dist/components/Form/LabelInput.vue2.js +15 -15
- package/dist/components/HelpfulLink.vue.js +7 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
- package/dist/components/IconSelector.vue.js +16 -16
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
- package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
- package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +16 -16
- package/dist/components/SectionFilter.vue2.js +21 -21
- package/dist/components/SectionFilterButton.vue.js +7 -7
- package/dist/components/Server/ServerDropdown.vue.js +32 -32
- package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
- package/dist/components/Server/ServerSelector.vue.js +27 -27
- package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
- package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
- package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
- package/dist/components/Server/types.d.ts +2 -1
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +18 -18
- package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
- package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
- package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
- package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
- package/dist/data/httpHeaders.d.ts +2 -1
- package/dist/data/httpHeaders.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js +4 -4
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +5 -5
- package/dist/plugins/plugin-manager.d.ts +0 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/routes.d.ts +0 -10
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +0 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
- 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-body.js +40 -32
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
- package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +69 -69
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +29 -29
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +75 -75
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
- package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
- package/dist/v2/components/data-table/DataTable.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
- package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
- package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
- package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
- package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
- package/dist/v2/components/resize/Resize.vue2.js +11 -11
- package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
- package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
- package/dist/v2/features/app/App.vue.js +25 -25
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +55 -61
- package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
- package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
- package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
- package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
- package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
- package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
- package/dist/v2/features/collection/components/Environment.vue.js +10 -10
- package/dist/v2/features/collection/components/Form.vue.js +21 -21
- package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
- package/dist/v2/features/collection/components/Servers.vue.js +37 -37
- package/dist/v2/features/collection/components/Settings.vue.js +22 -22
- package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
- package/dist/v2/features/command-palette/types.d.ts +11 -10
- package/dist/v2/features/command-palette/types.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
- package/dist/v2/features/environments/components/Environment.vue.js +16 -16
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
- package/dist/v2/features/modal/Modal.vue2.js +56 -56
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
- package/dist/v2/features/operation/Operation.vue.js +34 -34
- package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
- package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
- package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
- package/dist/v2/features/search/types.d.ts +5 -4
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
- package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
- package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +0 -2
- package/dist/v2/helpers/plugins.d.ts +2 -2
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
- package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
- package/dist/views/Cookies/CookieModal.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
- package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
- package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
- package/dist/views/Request/Request.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
- package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
- package/dist/views/Request/RequestSection/index.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
- package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
- package/package.json +23 -23
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
- package/dist/components/ScreenReader.vue.d.ts +0 -20
- package/dist/components/ScreenReader.vue.d.ts.map +0 -1
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as c, createBlock as r, openBlock as e, unref as f, withCtx as t, createElementBlock as s, Fragment as i, renderList as u, createVNode as a, createTextVNode as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as c, createBlock as r, openBlock as e, unref as f, withCtx as t, createElementBlock as s, Fragment as i, renderList as u, createVNode as a, createTextVNode as k } from "vue";
|
|
2
|
+
import x from "../../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import d from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
4
4
|
import m from "../../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import p from "../../../components/layout/CollapsibleSection.vue.js";
|
|
6
|
+
const _ = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
|
|
9
9
|
}, N = /* @__PURE__ */ c({
|
|
@@ -11,23 +11,23 @@ const x = {
|
|
|
11
11
|
props: {
|
|
12
12
|
cookies: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
return (
|
|
14
|
+
setup(o) {
|
|
15
|
+
return (C, l) => (e(), r(f(p), {
|
|
16
16
|
defaultOpen: !1,
|
|
17
17
|
itemCount: o.cookies.length
|
|
18
18
|
}, {
|
|
19
19
|
title: t(() => [...l[0] || (l[0] = [
|
|
20
|
-
|
|
20
|
+
k("Cookies", -1)
|
|
21
21
|
])]),
|
|
22
22
|
default: t(() => [
|
|
23
23
|
(e(), s(i, { key: 0 }, [
|
|
24
|
-
o.cookies.length ? (e(), r(
|
|
24
|
+
o.cookies.length ? (e(), r(x, {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "flex-1",
|
|
27
27
|
columns: ["", ""]
|
|
28
28
|
}, {
|
|
29
29
|
default: t(() => [
|
|
30
|
-
(e(!0), s(i, null, u(o.cookies, (n) => (e(), r(
|
|
30
|
+
(e(!0), s(i, null, u(o.cookies, (n) => (e(), r(d, {
|
|
31
31
|
key: n.name
|
|
32
32
|
}, {
|
|
33
33
|
default: t(() => [
|
|
@@ -42,7 +42,7 @@ const x = {
|
|
|
42
42
|
}, 1024))), 128))
|
|
43
43
|
]),
|
|
44
44
|
_: 1
|
|
45
|
-
})) : (e(), s("div",
|
|
45
|
+
})) : (e(), s("div", _, " No cookies "))
|
|
46
46
|
], 64))
|
|
47
47
|
]),
|
|
48
48
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, onMounted as k, onBeforeUnmount as v, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as r, normalizeClass as y, createVNode as l, createTextVNode as i, toDisplayString as b, unref as m } from "vue";
|
|
2
2
|
import { ScalarHotkey as d } from "@scalar/components";
|
|
3
3
|
import R from "../../../../assets/computer.ascii.js";
|
|
4
4
|
import g from "../../../../components/EmptyState.vue.js";
|
|
@@ -6,7 +6,7 @@ import q from "../../../../components/ScalarAsciiArt.vue.js";
|
|
|
6
6
|
const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, S = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "scalar-version-number"
|
|
9
|
-
}, w = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */
|
|
9
|
+
}, w = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */ x({
|
|
10
10
|
__name: "ResponseEmpty",
|
|
11
11
|
props: {
|
|
12
12
|
layout: {},
|
|
@@ -15,25 +15,25 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
15
15
|
events: {}
|
|
16
16
|
},
|
|
17
17
|
emits: ["addRequest", "sendRequest", "openCommandPalette"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
setup(t, { emit: p }) {
|
|
19
|
+
const n = p, u = (f) => {
|
|
20
|
+
f?.createNew && n("addRequest");
|
|
21
21
|
};
|
|
22
|
-
return
|
|
22
|
+
return k(() => t.events.hotKeys.on(u)), v(() => t.events.hotKeys.off(u)), (f, e) => (a(), s("div", C, [
|
|
23
23
|
o("div", {
|
|
24
24
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
25
25
|
"hidden opacity-0": t.totalPerformedRequests < 1 && t.layout !== "modal"
|
|
26
26
|
}])
|
|
27
27
|
}, [
|
|
28
28
|
t.layout !== "modal" ? (a(), s("div", S, [
|
|
29
|
-
i(" Scalar App V" +
|
|
29
|
+
i(" Scalar App V" + b(t.appVersion) + " Beta ", 1),
|
|
30
30
|
e[3] || (e[3] = o("div", { class: "mt-2" }, [
|
|
31
31
|
o("a", {
|
|
32
32
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
33
33
|
target: "_blank"
|
|
34
34
|
}, " Roadmap ")
|
|
35
35
|
], -1))
|
|
36
|
-
])) :
|
|
36
|
+
])) : r("", !0),
|
|
37
37
|
e[4] || (e[4] = o("a", {
|
|
38
38
|
class: "gitbook-show scalar-version-number",
|
|
39
39
|
href: "https://www.scalar.com",
|
|
@@ -51,33 +51,33 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
51
51
|
}])
|
|
52
52
|
}, [
|
|
53
53
|
l(g)
|
|
54
|
-
], 2)) :
|
|
54
|
+
], 2)) : r("", !0),
|
|
55
55
|
o("div", w, [
|
|
56
56
|
t.layout !== "modal" ? (a(), s("button", {
|
|
57
57
|
key: 0,
|
|
58
58
|
class: "flex items-center gap-1.5",
|
|
59
59
|
type: "button",
|
|
60
|
-
onClick: e[0] || (e[0] = (
|
|
60
|
+
onClick: e[0] || (e[0] = (c) => n("openCommandPalette"))
|
|
61
61
|
}, [
|
|
62
62
|
e[5] || (e[5] = i(" Get Started ", -1)),
|
|
63
63
|
l(m(d), {
|
|
64
64
|
hotkey: "p",
|
|
65
65
|
modifier: ["default", "Shift"]
|
|
66
66
|
})
|
|
67
|
-
])) :
|
|
67
|
+
])) : r("", !0),
|
|
68
68
|
t.layout === "desktop" ? (a(), s("button", {
|
|
69
69
|
key: 1,
|
|
70
70
|
class: "flex items-center gap-1.5",
|
|
71
71
|
type: "button",
|
|
72
|
-
onClick: e[1] || (e[1] = (
|
|
72
|
+
onClick: e[1] || (e[1] = (c) => n("addRequest"))
|
|
73
73
|
}, [
|
|
74
74
|
e[6] || (e[6] = i(" New Request ", -1)),
|
|
75
75
|
l(m(d), { hotkey: "N" })
|
|
76
|
-
])) :
|
|
76
|
+
])) : r("", !0),
|
|
77
77
|
o("button", {
|
|
78
78
|
class: "flex items-center gap-1.5",
|
|
79
79
|
type: "button",
|
|
80
|
-
onClick: e[2] || (e[2] = (
|
|
80
|
+
onClick: e[2] || (e[2] = (c) => n("sendRequest"))
|
|
81
81
|
}, [
|
|
82
82
|
e[7] || (e[7] = i(" Send Request ", -1)),
|
|
83
83
|
l(m(d), { hotkey: "↵" })
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as c, ref as u, createBlock as d, openBlock as s, Transition as m, withCtx as
|
|
1
|
+
import { defineComponent as c, ref as u, createBlock as d, openBlock as s, Transition as m, withCtx as r, createElementBlock as f, createCommentVNode as v, unref as a, createVNode as i, createTextVNode as p } from "vue";
|
|
2
2
|
import { useLoadingState as x, ScalarLoading as g, ScalarButton as k } from "@scalar/components";
|
|
3
3
|
const y = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
6
|
-
},
|
|
6
|
+
}, T = /* @__PURE__ */ c({
|
|
7
7
|
__name: "ResponseLoadingOverlay",
|
|
8
8
|
props: {
|
|
9
9
|
events: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
11
|
+
setup(n) {
|
|
12
12
|
const e = x(), o = u();
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
}), (
|
|
16
|
-
default:
|
|
13
|
+
return n.events.requestStatus.on(async (l) => {
|
|
14
|
+
l === "start" ? o.value = setTimeout(() => e.start(), 1e3) : (clearTimeout(o.value), o.value = void 0, await e.clear());
|
|
15
|
+
}), (l, t) => (s(), d(m, null, {
|
|
16
|
+
default: r(() => [
|
|
17
17
|
a(e).isActive ? (s(), f("div", y, [
|
|
18
|
-
|
|
18
|
+
i(a(g), {
|
|
19
19
|
class: "text-c-3",
|
|
20
20
|
loader: a(e),
|
|
21
21
|
size: "3xl"
|
|
22
22
|
}, null, 8, ["loader"]),
|
|
23
|
-
|
|
23
|
+
i(a(k), {
|
|
24
24
|
variant: "ghost",
|
|
25
25
|
onClick: t[0] || (t[0] = (C) => n.events.cancelRequest.emit())
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
27
|
+
default: r(() => [...t[1] || (t[1] = [
|
|
28
28
|
p(" Cancel ", -1)
|
|
29
29
|
])]),
|
|
30
30
|
_: 1
|
|
@@ -36,5 +36,5 @@ const y = {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
T as default
|
|
40
40
|
};
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { defineComponent as C, ref as d, computed as g, createElementBlock as
|
|
2
|
-
import { httpStatusCodes as
|
|
1
|
+
import { defineComponent as C, ref as d, computed as g, createElementBlock as a, openBlock as s, toDisplayString as n, unref as c, Fragment as p, createElementVNode as l, createCommentVNode as v, createTextVNode as m, createBlock as h, withCtx as x, normalizeStyle as f } from "vue";
|
|
2
|
+
import { httpStatusCodes as S } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import y from "pretty-ms";
|
|
4
|
-
import
|
|
4
|
+
import I from "../../../../components/HelpfulLink.vue.js";
|
|
5
5
|
import { getContentLength as k } from "../helpers/get-content-length.js";
|
|
6
|
-
const
|
|
6
|
+
const b = { class: "text-c-1 flex gap-1.5" }, w = { key: 0 }, B = { key: 0 }, N = { key: 1 }, R = /* @__PURE__ */ C({
|
|
7
7
|
__name: "ResponseMetaInformation",
|
|
8
8
|
props: {
|
|
9
9
|
response: {},
|
|
10
10
|
events: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
setup(e) {
|
|
13
|
+
const u = d(), i = d(0);
|
|
14
|
+
e.events.requestStatus.on((r) => {
|
|
15
|
+
r === "start" ? u.value = setInterval(() => i.value += 1e3, 1e3) : (clearInterval(u.value), u.value = void 0, i.value = 0);
|
|
16
16
|
});
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
17
|
+
const t = g(() => {
|
|
18
|
+
const r = e.response.status;
|
|
19
|
+
if (r)
|
|
20
|
+
return S[r] ?? void 0;
|
|
21
21
|
});
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
return (r, o) => (s(), a("div", b, [
|
|
23
|
+
u.value && i.value ? (s(), a("span", w, n(c(y)(i.value)), 1)) : (s(), a(p, { key: 1 }, [
|
|
24
|
+
l("span", null, [
|
|
25
|
+
o[0] || (o[0] = l("span", { class: "sr-only" }, "Response Information, Duration:", -1)),
|
|
26
|
+
m(" " + n(c(y)(e.response.duration)), 1)
|
|
27
27
|
]),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
c(k)(e.response) ? (s(), a("span", B, [
|
|
29
|
+
o[1] || (o[1] = l("span", { class: "sr-only" }, ", Size:", -1)),
|
|
30
|
+
m(" " + n(c(k)(e.response)), 1)
|
|
31
31
|
])) : v("", !0),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
t.value ? (s(), a(p, { key: 1 }, [
|
|
33
|
+
o[2] || (o[2] = l("span", { class: "sr-only" }, ", Status:", -1)),
|
|
34
|
+
t.value.url ? (s(), h(I, {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "flex items-center gap-1.5",
|
|
37
|
-
href:
|
|
37
|
+
href: t.value.url
|
|
38
38
|
}, {
|
|
39
|
-
default:
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
default: x(() => [
|
|
40
|
+
m(n(e.response.status) + " " + n(t.value.name) + " ", 1),
|
|
41
|
+
l("span", {
|
|
42
42
|
class: "block h-1.5 w-1.5 rounded-full",
|
|
43
|
-
style: f({ backgroundColor:
|
|
43
|
+
style: f({ backgroundColor: t.value.color })
|
|
44
44
|
}, null, 4)
|
|
45
45
|
]),
|
|
46
46
|
_: 1
|
|
47
|
-
}, 8, ["href"])) : (
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
}, 8, ["href"])) : (s(), a("span", N, [
|
|
48
|
+
m(n(e.response.status) + " " + n(t.value.name) + " ", 1),
|
|
49
|
+
l("span", {
|
|
50
50
|
class: "block h-1.5 w-1.5 rounded-full",
|
|
51
|
-
style: f({ backgroundColor:
|
|
51
|
+
style: f({ backgroundColor: t.value.color })
|
|
52
52
|
}, null, 4)
|
|
53
53
|
]))
|
|
54
54
|
], 64)) : v("", !0)
|
|
@@ -57,5 +57,5 @@ const w = { class: "text-c-1 flex gap-1.5" }, _ = { key: 0 }, B = { key: 0 }, N
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
R as default
|
|
61
61
|
};
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import type { CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type MediaPreview = 'object' | 'image' | 'video' | 'audio';
|
|
3
|
+
type MediaConfig = {
|
|
4
4
|
preview?: MediaPreview;
|
|
5
5
|
alpha?: boolean;
|
|
6
6
|
raw?: boolean;
|
|
7
7
|
language?: CodeMirrorLanguage;
|
|
8
8
|
extension: string;
|
|
9
9
|
};
|
|
10
|
-
/** Media Type (MIME Type) Definitions */
|
|
11
|
-
export declare const mediaTypes: {
|
|
12
|
-
[type: string]: MediaConfig | undefined;
|
|
13
|
-
};
|
|
14
10
|
/** Media Types (MIME Types) that can be displayed as raw text */
|
|
15
11
|
export declare const textMediaTypes: string[];
|
|
16
12
|
/** Get the config for a media type */
|
|
17
13
|
export declare function getMediaTypeConfig(type: string): MediaConfig | undefined;
|
|
18
14
|
/** Check if a media type that can be displayed as raw text */
|
|
19
15
|
export declare function isTextMediaType(type: string): boolean;
|
|
16
|
+
export {};
|
|
20
17
|
//# sourceMappingURL=media-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,
|
|
1
|
+
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,KAAK,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE1D,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAmHD,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA;AAExB,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBxE;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, useId as D, computed as S, ref as U, useTemplateRef as V, onMounted as F, onBeforeUnmount as H, createElementBlock as z, openBlock as
|
|
1
|
+
import { defineComponent as W, useId as D, computed as S, ref as U, useTemplateRef as V, onMounted as F, onBeforeUnmount as H, createElementBlock as z, openBlock as x, unref as l, createElementVNode as o, normalizeClass as P, createVNode as a, createCommentVNode as E, normalizeStyle as O, createBlock as K, withCtx as R, createTextVNode as b, toDisplayString as m } from "vue";
|
|
2
2
|
import { ScalarButton as $, ScalarWrappingText as Q, ScalarIcon as j } from "@scalar/components";
|
|
3
3
|
import { REQUEST_METHODS as G } from "@scalar/helpers/http/http-info";
|
|
4
4
|
import { replaceVariables as J } from "@scalar/helpers/regex/replace-variables";
|
|
@@ -7,18 +7,18 @@ import { ScalarIconCopy as Y, ScalarIconWarningCircle as Z } from "@scalar/icons
|
|
|
7
7
|
import { useClipboard as _ } from "@scalar/use-hooks/useClipboard";
|
|
8
8
|
import { getEnvironmentVariables as ee } from "../../operation-block/helpers/get-environment-variables.js";
|
|
9
9
|
import { getServerUrl as te } from "../../operation-block/helpers/get-server-url.js";
|
|
10
|
-
import { useLoadingAnimation as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
10
|
+
import { useLoadingAnimation as ne } from "../hooks/use-loading-animation.js";
|
|
11
|
+
import oe from "./AddressBarHistory.vue.js";
|
|
12
|
+
import le from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
13
|
+
import se from "../../../components/server/ServerDropdown.vue.js";
|
|
14
|
+
import ae from "../../../components/code-input/CodeInput.vue.js";
|
|
15
|
+
const re = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, de = { class: "z-context-plus flex gap-1" }, ue = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, me = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
|
|
18
|
-
},
|
|
18
|
+
}, ce = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, fe = { class: "min-w-0 flex-1" }, ve = {
|
|
19
19
|
"aria-hidden": "true",
|
|
20
20
|
class: "inline-flex items-center gap-1"
|
|
21
|
-
},
|
|
21
|
+
}, he = { class: "sr-only" }, Re = /* @__PURE__ */ W({
|
|
22
22
|
__name: "AddressBar",
|
|
23
23
|
props: {
|
|
24
24
|
path: {},
|
|
@@ -31,83 +31,83 @@ const ae = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 bloc
|
|
|
31
31
|
environment: {}
|
|
32
32
|
},
|
|
33
33
|
emits: ["execute", "update:servers"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
backgroundColor: `color-mix(in srgb, transparent 90%, ${G[
|
|
34
|
+
setup(e, { expose: q, emit: T }) {
|
|
35
|
+
const c = T, f = D(), { percentage: g, startLoading: y, stopLoading: v } = ne(), I = S(() => ({
|
|
36
|
+
backgroundColor: `color-mix(in srgb, transparent 90%, ${G[e.method].colorVar})`,
|
|
37
37
|
transform: `translate3d(-${g.value}%,0,0)`
|
|
38
|
-
})), i = U(null),
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
})), i = U(null), r = U(null), B = S(() => r.value || i.value), p = (n, t, s) => {
|
|
39
|
+
const h = d.value?.cursorPosition();
|
|
40
|
+
e.eventBus.emit(
|
|
41
41
|
"operation:update:pathMethod",
|
|
42
42
|
{
|
|
43
|
-
meta: { method:
|
|
44
|
-
payload: { method:
|
|
43
|
+
meta: { method: e.method, path: e.path },
|
|
44
|
+
payload: { method: n, path: t },
|
|
45
45
|
callback: (u) => {
|
|
46
|
-
(u === "success" || u === "no-change") && (
|
|
46
|
+
(u === "success" || u === "no-change") && (r.value = null, i.value = null), u === "success" ? e.eventBus.emit("ui:focus:address-bar", { position: h }) : u === "conflict" && (n !== e.method && (r.value = n), t !== e.path && (i.value = t));
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
s
|
|
50
50
|
);
|
|
51
|
-
}, L = (
|
|
52
|
-
const t =
|
|
53
|
-
|
|
54
|
-
debounceKey: `operation:update:pathMethod-${
|
|
51
|
+
}, L = (n) => p(n, i.value ?? e.path), A = (n) => {
|
|
52
|
+
const t = n.startsWith("/") ? n : `/${n}`;
|
|
53
|
+
p(r.value ?? e.method, t, {
|
|
54
|
+
debounceKey: `operation:update:pathMethod-${e.path}-${e.method}`
|
|
55
55
|
});
|
|
56
|
-
}, C = V("sendButtonRef"), d = V("addressBarRef"), k = () => C.value?.$el?.focus(), w = (
|
|
57
|
-
if (d.value?.isFocused &&
|
|
56
|
+
}, C = V("sendButtonRef"), d = V("addressBarRef"), k = () => C.value?.$el?.focus(), w = (n) => {
|
|
57
|
+
if (d.value?.isFocused && e.layout !== "desktop")
|
|
58
58
|
return;
|
|
59
|
-
const t =
|
|
60
|
-
d.value?.focus(t),
|
|
59
|
+
const t = n && "position" in n ? n.position : "end";
|
|
60
|
+
d.value?.focus(t), n && "event" in n && n.event.preventDefault();
|
|
61
61
|
};
|
|
62
62
|
F(() => {
|
|
63
|
-
|
|
63
|
+
e.eventBus.on("ui:focus:address-bar", w), e.eventBus.on("ui:focus:send-button", k), e.eventBus.on("hooks:on:request:sent", y), e.eventBus.on("hooks:on:request:complete", v);
|
|
64
64
|
}), H(() => {
|
|
65
|
-
|
|
65
|
+
e.eventBus.off("ui:focus:address-bar", w), e.eventBus.off("ui:focus:send-button", k), e.eventBus.off("hooks:on:request:sent", y), e.eventBus.off("hooks:on:request:complete", v), v();
|
|
66
66
|
});
|
|
67
67
|
const { copyToClipboard: M } = _(), N = async () => {
|
|
68
|
-
const
|
|
69
|
-
await M(
|
|
68
|
+
const n = ee(e.environment), t = te(e.server, n), s = J(e.path, n), h = X(t, s);
|
|
69
|
+
await M(h);
|
|
70
70
|
};
|
|
71
71
|
return q({
|
|
72
|
-
methodConflict:
|
|
72
|
+
methodConflict: r,
|
|
73
73
|
pathConflict: i
|
|
74
|
-
}), (
|
|
75
|
-
id:
|
|
74
|
+
}), (n, t) => (x(), z("div", {
|
|
75
|
+
id: l(f),
|
|
76
76
|
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
o("div", {
|
|
79
79
|
class: P(["address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]", {
|
|
80
|
-
"outline-c-danger outline":
|
|
80
|
+
"outline-c-danger outline": B.value
|
|
81
81
|
}])
|
|
82
82
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
o("div", ie, [
|
|
84
|
+
o("div", {
|
|
85
85
|
class: "absolute top-0 left-0 z-[1002] h-full w-full",
|
|
86
86
|
style: O(I.value)
|
|
87
87
|
}, null, 4)
|
|
88
88
|
]),
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
o("div", de, [
|
|
90
|
+
a(l(le), {
|
|
91
91
|
isEditable: e.layout !== "modal",
|
|
92
92
|
isSquare: "",
|
|
93
|
-
method:
|
|
93
|
+
method: r.value ?? e.method,
|
|
94
94
|
teleport: "",
|
|
95
95
|
onChange: L
|
|
96
96
|
}, null, 8, ["isEditable", "method"])
|
|
97
97
|
]),
|
|
98
|
-
|
|
99
|
-
e.servers.length ? (
|
|
98
|
+
o("div", ue, [
|
|
99
|
+
e.servers.length ? (x(), K(l(se), {
|
|
100
100
|
key: 0,
|
|
101
101
|
layout: e.layout,
|
|
102
102
|
server: e.server,
|
|
103
103
|
servers: e.servers,
|
|
104
|
-
target:
|
|
105
|
-
"onUpdate:selectedServer": t[0] || (t[0] = (
|
|
106
|
-
"onUpdate:servers": t[1] || (t[1] = (
|
|
107
|
-
"onUpdate:variable": t[2] || (t[2] = (
|
|
104
|
+
target: l(f),
|
|
105
|
+
"onUpdate:selectedServer": t[0] || (t[0] = (s) => e.eventBus.emit("server:update:selected", s)),
|
|
106
|
+
"onUpdate:servers": t[1] || (t[1] = (s) => c("update:servers")),
|
|
107
|
+
"onUpdate:variable": t[2] || (t[2] = (s) => e.eventBus.emit("server:update:variables", s))
|
|
108
108
|
}, null, 8, ["layout", "server", "servers", "target"])) : E("", !0),
|
|
109
|
-
t[6] || (t[6] =
|
|
110
|
-
|
|
109
|
+
t[6] || (t[6] = o("div", { class: "fade-left" }, null, -1)),
|
|
110
|
+
a(l(ae), {
|
|
111
111
|
ref_key: "addressBarRef",
|
|
112
112
|
ref: d,
|
|
113
113
|
alwaysEmitChange: "",
|
|
@@ -124,69 +124,69 @@ const ae = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 bloc
|
|
|
124
124
|
modelValue: e.path,
|
|
125
125
|
placeholder: e.server ? "" : "Enter a URL or cURL command",
|
|
126
126
|
server: "",
|
|
127
|
-
onCurl: t[3] || (t[3] = (
|
|
127
|
+
onCurl: t[3] || (t[3] = (s) => e.eventBus.emit("ui:open:command-palette", {
|
|
128
128
|
action: "import-curl-command",
|
|
129
129
|
payload: {
|
|
130
|
-
curl:
|
|
130
|
+
curl: s
|
|
131
131
|
}
|
|
132
132
|
})),
|
|
133
|
-
onSubmit: t[4] || (t[4] = (
|
|
133
|
+
onSubmit: t[4] || (t[4] = (s) => c("execute")),
|
|
134
134
|
"onUpdate:modelValue": A
|
|
135
135
|
}, null, 8, ["disabled", "environment", "layout", "modelValue", "placeholder"]),
|
|
136
|
-
t[7] || (t[7] =
|
|
136
|
+
t[7] || (t[7] = o("div", { class: "fade-right" }, null, -1))
|
|
137
137
|
]),
|
|
138
|
-
|
|
138
|
+
a(l($), {
|
|
139
139
|
class: "hover:bg-b-3 mx-1",
|
|
140
140
|
size: "xs",
|
|
141
141
|
variant: "ghost",
|
|
142
142
|
onClick: N
|
|
143
143
|
}, {
|
|
144
144
|
default: R(() => [
|
|
145
|
-
|
|
146
|
-
t[8] || (t[8] =
|
|
145
|
+
a(l(Y)),
|
|
146
|
+
t[8] || (t[8] = o("span", { class: "sr-only" }, "Copy URL", -1))
|
|
147
147
|
]),
|
|
148
148
|
_: 1
|
|
149
149
|
}),
|
|
150
|
-
|
|
150
|
+
a(oe, {
|
|
151
151
|
history: e.history,
|
|
152
|
-
target:
|
|
152
|
+
target: l(f)
|
|
153
153
|
}, null, 8, ["history", "target"]),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
B.value ? (x(), z("div", me, [
|
|
155
|
+
o("div", ce, [
|
|
156
|
+
a(l(Z), { size: "sm" }),
|
|
157
|
+
o("div", fe, [
|
|
158
158
|
t[9] || (t[9] = b(" A ", -1)),
|
|
159
|
-
|
|
159
|
+
o("em", null, m(r.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
|
|
160
160
|
t[10] || (t[10] = b(" request to ", -1)),
|
|
161
|
-
|
|
161
|
+
a(l(Q), {
|
|
162
162
|
text: i.value ?? e.path
|
|
163
163
|
}, null, 8, ["text"]),
|
|
164
164
|
t[11] || (t[11] = b(" already exists in this document ", -1))
|
|
165
165
|
])
|
|
166
166
|
])
|
|
167
167
|
])) : E("", !0),
|
|
168
|
-
|
|
168
|
+
a(l($), {
|
|
169
169
|
ref_key: "sendButtonRef",
|
|
170
170
|
ref: C,
|
|
171
171
|
class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
|
|
172
|
-
disabled:
|
|
173
|
-
onClick: t[5] || (t[5] = (
|
|
172
|
+
disabled: l(g) < 100,
|
|
173
|
+
onClick: t[5] || (t[5] = (s) => c("execute"))
|
|
174
174
|
}, {
|
|
175
175
|
default: R(() => [
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
o("span", ve, [
|
|
177
|
+
a(l(j), {
|
|
178
178
|
class: "relative shrink-0 fill-current",
|
|
179
179
|
icon: "Play",
|
|
180
180
|
size: "xs"
|
|
181
181
|
}),
|
|
182
|
-
t[12] || (t[12] =
|
|
182
|
+
t[12] || (t[12] = o("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
183
183
|
]),
|
|
184
|
-
|
|
184
|
+
o("span", he, " Send " + m(e.method) + " request to " + m(e.server?.url ?? "") + m(e.path), 1)
|
|
185
185
|
]),
|
|
186
186
|
_: 1
|
|
187
187
|
}, 8, ["disabled"])
|
|
188
188
|
], 2)
|
|
189
|
-
], 8,
|
|
189
|
+
], 8, re));
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as h, createBlock as n, openBlock as a, unref as t, withCtx as o, createVNode as r, createSlots as g, createCommentVNode as
|
|
1
|
+
import { defineComponent as h, createBlock as n, openBlock as a, unref as t, withCtx as o, createVNode as r, createSlots as g, createCommentVNode as x, createElementVNode as s, normalizeStyle as v, createElementBlock as y, Fragment as _, renderList as k, toDisplayString as l, normalizeClass as C } from "vue";
|
|
2
2
|
import { Menu as S, MenuButton as b, MenuItems as B, MenuItem as H } from "@headlessui/vue";
|
|
3
3
|
import { ScalarFloating as M, ScalarIcon as z, ScalarFloatingBackdrop as I } from "@scalar/components";
|
|
4
4
|
import { httpStatusCodes as w } from "@scalar/oas-utils/helpers";
|
|
@@ -12,10 +12,10 @@ const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, O =
|
|
|
12
12
|
history: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["selectHistoryItem"],
|
|
15
|
-
setup(
|
|
15
|
+
setup(i, { emit: m }) {
|
|
16
16
|
const u = m;
|
|
17
|
-
return (
|
|
18
|
-
default: o(({ open:
|
|
17
|
+
return (A, c) => (a(), n(t(S), { as: "div" }, {
|
|
18
|
+
default: o(({ open: f }) => [
|
|
19
19
|
r(t(M), {
|
|
20
20
|
offset: 0,
|
|
21
21
|
resize: "",
|
|
@@ -35,20 +35,20 @@ const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, O =
|
|
|
35
35
|
c[0] || (c[0] = s("span", { class: "sr-only" }, "Request History", -1))
|
|
36
36
|
]),
|
|
37
37
|
_: 1
|
|
38
|
-
})) :
|
|
38
|
+
})) : x("", !0)
|
|
39
39
|
]),
|
|
40
40
|
_: 2
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
f ? {
|
|
43
43
|
name: "floating",
|
|
44
|
-
fn: o(({ width:
|
|
44
|
+
fn: o(({ width: p }) => [
|
|
45
45
|
r(t(B), {
|
|
46
46
|
class: "custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75",
|
|
47
47
|
static: "",
|
|
48
|
-
style: v({ width:
|
|
48
|
+
style: v({ width: p })
|
|
49
49
|
}, {
|
|
50
50
|
default: o(() => [
|
|
51
|
-
(a(!0),
|
|
51
|
+
(a(!0), y(_, null, k(i.history, (e, d) => (a(), n(t(H), {
|
|
52
52
|
key: e.id,
|
|
53
53
|
as: "button",
|
|
54
54
|
class: "font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r",
|