@scalar/api-client 2.2.48 → 2.2.50
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 +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +15 -3
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +102 -94
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -0
- 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 +54 -58
- package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +95 -93
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +1 -3
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -22
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +12 -12
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +54 -49
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +9 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -8
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -0
- 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 +36 -30
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -15
- package/dist/components/Form/Form.vue.d.ts +3 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +30 -25
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +41 -41
- package/dist/components/ImportCollection/ImportNowButton.vue.js +24 -24
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +13 -13
- 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 +19 -19
- package/dist/layouts/App/create-api-client-app.d.ts +387 -477
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +774 -954
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +387 -477
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +390 -479
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +3 -15
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +7 -7
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +3 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +11 -15
- package/dist/libs/hot-keys.test.d.ts +2 -0
- package/dist/libs/hot-keys.test.d.ts.map +1 -0
- package/dist/libs/index.js +27 -26
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/build-request-security.js +19 -16
- package/dist/libs/send-request/create-request-operation.test.d.ts +10 -10
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- 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.js +37 -34
- package/dist/store/active-entities.d.ts +58 -67
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +61 -74
- package/dist/store/collections.d.ts +90 -90
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -17
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +19 -18
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +2 -8
- package/dist/store/import-spec.d.ts +16 -106
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +9 -14
- package/dist/store/request-example.d.ts +25 -25
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +15 -20
- package/dist/store/requests.d.ts +84 -84
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +17 -40
- package/dist/store/router-params.d.ts +13 -11
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +5 -5
- package/dist/store/security-schemes.d.ts +58 -58
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +1 -3
- package/dist/store/servers.d.ts +17 -17
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +2 -9
- package/dist/store/store.d.ts +387 -477
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +2 -4
- package/dist/store/tags.d.ts +28 -28
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +19 -34
- package/dist/store/workspace.d.ts +36 -36
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +1 -5
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -18
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +24 -24
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +140 -132
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +15 -15
- 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 +160 -141
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +6 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +99 -95
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +4 -0
- 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/RequestAuth.vue2.js +70 -64
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +40 -34
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +32 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +93 -85
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +9 -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 +214 -244
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +10 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +77 -80
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +89 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +10 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +59 -66
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +11 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +176 -155
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +97 -100
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +31 -22
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +2 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +11 -13
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +50 -48
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +38 -44
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +10 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +77 -69
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +4 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +41 -39
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -0
- 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 +56 -52
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +68 -68
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +38 -55
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +28 -29
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -65
- package/dist/views/Request/libs/request.d.ts +5 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +37 -2
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +10 -34
- package/dist/views/Servers/ServerForm.vue.d.ts +1 -8
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +21 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +73 -81
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +118 -134
- package/package.json +14 -14
|
@@ -1,79 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, openBlock as r, createElementBlock as a, createElementVNode as i, unref as l, createBlock as u, normalizeClass as k, createCommentVNode as s, createVNode as m } from "vue";
|
|
2
2
|
import v from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const A = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, E = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-2 lg:flex-1 w-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-1/2" }, D = /* @__PURE__ */ V({
|
|
3
|
+
import V from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
4
|
+
import { ScalarIcon as d } from "@scalar/components";
|
|
5
|
+
import { useRouter as C } from "vue-router";
|
|
6
|
+
import y from "../../components/OpenApiClientButton.vue.js";
|
|
7
|
+
import { useWorkspace as w } from "../../store/store.js";
|
|
8
|
+
import { useLayout as h } from "../../hooks/useLayout.js";
|
|
9
|
+
const B = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, $ = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-2 lg:flex-1 w-1/2" }, S = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-1/2" }, E = /* @__PURE__ */ g({
|
|
11
10
|
__name: "RequestSubpageHeader",
|
|
12
11
|
props: {
|
|
12
|
+
collection: {},
|
|
13
|
+
operation: {},
|
|
14
|
+
server: {},
|
|
15
|
+
environment: {},
|
|
16
|
+
envVariables: {},
|
|
17
|
+
workspace: {},
|
|
13
18
|
modelValue: { type: Boolean }
|
|
14
19
|
},
|
|
15
20
|
emits: ["update:modelValue", "hideModal", "importCurl"],
|
|
16
|
-
setup(
|
|
17
|
-
const {
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
21
|
+
setup(z) {
|
|
22
|
+
const { hideClientButton: p, showSidebar: c, integration: f } = w(), { layout: t } = h(), { currentRoute: b } = C();
|
|
23
|
+
return (e, o) => (r(), a("div", B, [
|
|
24
|
+
i("div", $, [
|
|
25
|
+
l(c) ? (r(), u(V, {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: k(["ml-1", [
|
|
28
|
+
{ hidden: e.modelValue },
|
|
29
|
+
{ "xl:!flex": !e.modelValue },
|
|
30
|
+
{ "!flex": l(t) === "modal" },
|
|
31
|
+
{ "!hidden": l(t) === "modal" && e.modelValue }
|
|
32
|
+
]]),
|
|
33
|
+
modelValue: e.modelValue,
|
|
34
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => e.$emit("update:modelValue", n))
|
|
35
|
+
}, null, 8, ["class", "modelValue"])) : s("", !0)
|
|
36
|
+
]),
|
|
37
|
+
m(v, {
|
|
38
|
+
collection: e.collection,
|
|
39
|
+
envVariables: e.envVariables,
|
|
40
|
+
environment: e.environment,
|
|
41
|
+
operation: e.operation,
|
|
42
|
+
server: e.server,
|
|
43
|
+
workspace: e.workspace,
|
|
44
|
+
onImportCurl: o[1] || (o[1] = (n) => e.$emit("importCurl", n))
|
|
45
|
+
}, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
46
|
+
i("div", S, [
|
|
47
|
+
l(t) === "modal" && e.collection.documentUrl && !l(p) ? (r(), u(l(y), {
|
|
48
|
+
key: 0,
|
|
49
|
+
buttonSource: "modal",
|
|
50
|
+
class: "!w-fit lg:-mr-1",
|
|
51
|
+
integration: l(f) ?? e.collection.integration ?? null,
|
|
52
|
+
source: l(b).query.source === "gitbook" ? "gitbook" : "api-reference",
|
|
53
|
+
url: e.collection.documentUrl
|
|
54
|
+
}, null, 8, ["integration", "source", "url"])) : s("", !0),
|
|
55
|
+
l(t) === "modal" ? (r(), a("button", {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: "app-exit-button p-2 rounded-full fixed right-2 top-2 gitbook-hidden",
|
|
58
|
+
type: "button",
|
|
59
|
+
onClick: o[2] || (o[2] = (n) => e.$emit("hideModal"))
|
|
60
|
+
}, [
|
|
61
|
+
m(l(d), {
|
|
62
|
+
icon: "Close",
|
|
63
|
+
size: "lg",
|
|
64
|
+
thickness: "2"
|
|
65
|
+
}),
|
|
66
|
+
o[4] || (o[4] = i("span", { class: "sr-only" }, "Close Client", -1))
|
|
67
|
+
])) : s("", !0),
|
|
68
|
+
l(t) === "modal" ? (r(), a("button", {
|
|
69
|
+
key: 2,
|
|
70
|
+
class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5 gitbook-show",
|
|
71
|
+
type: "button",
|
|
72
|
+
onClick: o[3] || (o[3] = (n) => e.$emit("hideModal"))
|
|
73
|
+
}, [
|
|
74
|
+
m(l(d), {
|
|
75
|
+
icon: "Close",
|
|
76
|
+
size: "md",
|
|
77
|
+
thickness: "1.75"
|
|
78
|
+
}),
|
|
79
|
+
o[5] || (o[5] = i("span", { class: "sr-only" }, "Close Client", -1))
|
|
80
|
+
])) : s("", !0)
|
|
81
|
+
])
|
|
82
|
+
]));
|
|
75
83
|
}
|
|
76
84
|
});
|
|
77
85
|
export {
|
|
78
|
-
|
|
86
|
+
E as default
|
|
79
87
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, computed as c, openBlock as p, createBlock as f, createSlots as x, withCtx as r, createTextVNode as u, createElementVNode as h, createVNode as a, unref as e } from "vue";
|
|
2
2
|
import y from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import { useResponseBody as b } from "../../../hooks/useResponseBody.js";
|
|
4
4
|
import { ScalarVirtualText as g } from "@scalar/components";
|
|
5
5
|
import { formatJsonOrYamlString as _ } from "@scalar/oas-utils/helpers";
|
|
6
6
|
import v from "./ResponseBodyDownload.vue.js";
|
|
7
|
-
const N = /* @__PURE__ */
|
|
7
|
+
const N = /* @__PURE__ */ d({
|
|
8
8
|
__name: "ResponseBodyVirtual",
|
|
9
9
|
props: {
|
|
10
10
|
content: {},
|
|
@@ -12,18 +12,18 @@ const N = /* @__PURE__ */ m({
|
|
|
12
12
|
headers: {}
|
|
13
13
|
},
|
|
14
14
|
setup(s) {
|
|
15
|
-
const o = s, l = c(() => _(o.content)), { mimeType: i, attachmentFilename:
|
|
15
|
+
const o = s, l = c(() => _(o.content)), { mimeType: i, attachmentFilename: m, dataUrl: n } = b({
|
|
16
16
|
data: o.data,
|
|
17
17
|
headers: o.headers
|
|
18
18
|
});
|
|
19
|
-
return (k, t) => (p(), f(y, { class: "!max-h-100% overflow-x-auto response-body-virtual" },
|
|
19
|
+
return (k, t) => (p(), f(y, { class: "!max-h-100% overflow-x-auto response-body-virtual" }, x({
|
|
20
20
|
title: r(() => [
|
|
21
|
-
t[0] || (t[0] =
|
|
21
|
+
t[0] || (t[0] = u("Body"))
|
|
22
22
|
]),
|
|
23
23
|
default: r(() => [
|
|
24
24
|
t[1] || (t[1] = h("div", { class: "py-1.5 px-2.5 font-code text-xxs border-1/2 rounded-t border-b-0" }, " This response body is massive! Syntax highlighting won’t work here. ", -1)),
|
|
25
25
|
a(e(g), {
|
|
26
|
-
containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1",
|
|
26
|
+
containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1 max-h-screen",
|
|
27
27
|
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
28
28
|
lineHeight: 20,
|
|
29
29
|
text: l.value
|
|
@@ -35,7 +35,7 @@ const N = /* @__PURE__ */ m({
|
|
|
35
35
|
name: "actions",
|
|
36
36
|
fn: r(() => [
|
|
37
37
|
a(v, {
|
|
38
|
-
filename: e(
|
|
38
|
+
filename: e(m),
|
|
39
39
|
href: e(n),
|
|
40
40
|
type: e(i).essence
|
|
41
41
|
}, null, 8, ["filename", "href", "type"])
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
numWorkspaceRequests: number;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2
5
|
export default _default;
|
|
3
6
|
//# sourceMappingURL=ResponseEmpty.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAoJA,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AA0LF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-04a8f835"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as b, onMounted as g, onBeforeUnmount as R, openBlock as n, createElementBlock as m, createElementVNode as s, normalizeClass as f, unref as t, createTextVNode as i, toDisplayString as q, createCommentVNode as c, createVNode as l } from "vue";
|
|
2
|
+
import C from "../../../assets/computer.ascii.js";
|
|
3
|
+
import v from "../../../components/EmptyState.vue.js";
|
|
4
|
+
import w from "../../../components/ScalarAsciiArt.vue.js";
|
|
5
5
|
import p from "../../../components/ScalarHotkey.vue.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const B = { class: "border-t relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
|
|
6
|
+
import { useRoute as N } from "vue-router";
|
|
7
|
+
import { useWorkspace as h } from "../../../store/store.js";
|
|
8
|
+
import { useLayout as S } from "../../../hooks/useLayout.js";
|
|
9
|
+
const V = { class: "border-t relative col-1 flex-center gap-6 p-2 capitalize" }, _ = {
|
|
11
10
|
key: 0,
|
|
12
11
|
class: "scalar-version-number"
|
|
13
|
-
},
|
|
12
|
+
}, B = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, G = /* @__PURE__ */ b({
|
|
14
13
|
__name: "ResponseEmpty",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
o
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
props: {
|
|
15
|
+
numWorkspaceRequests: {}
|
|
16
|
+
},
|
|
17
|
+
setup(E) {
|
|
18
|
+
const { events: r } = h(), y = N(), { layout: a } = S(), u = () => {
|
|
19
|
+
r.commandPalette.emit({ commandName: "Create Request" });
|
|
20
|
+
}, d = (o) => {
|
|
21
|
+
o != null && o.createNew && y.name === "request" && u();
|
|
22
|
+
}, k = "2.2.50";
|
|
23
|
+
return g(() => r.hotKeys.on(d)), R(() => r.hotKeys.off(d)), (o, e) => (n(), m("div", V, [
|
|
24
|
+
s("div", {
|
|
25
|
+
class: f(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
26
|
+
"hidden opacity-0": o.numWorkspaceRequests <= 1 && t(a) !== "modal"
|
|
25
27
|
}])
|
|
26
28
|
}, [
|
|
27
|
-
t(
|
|
28
|
-
i(" Scalar App V" +
|
|
29
|
-
e[2] || (e[2] =
|
|
30
|
-
|
|
29
|
+
t(a) !== "modal" ? (n(), m("div", _, [
|
|
30
|
+
i(" Scalar App V" + q(t(k)) + " Beta ", 1),
|
|
31
|
+
e[2] || (e[2] = s("div", { class: "mt-2" }, [
|
|
32
|
+
s("a", {
|
|
31
33
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
32
34
|
target: "_blank"
|
|
33
35
|
}, " Roadmap ")
|
|
34
36
|
], -1))
|
|
35
37
|
])) : c("", !0),
|
|
36
|
-
e[3] || (e[3] =
|
|
38
|
+
e[3] || (e[3] = s("a", {
|
|
37
39
|
class: "gitbook-show scalar-version-number",
|
|
38
40
|
href: "https://www.scalar.com",
|
|
39
41
|
target: "_blank"
|
|
40
42
|
}, " Powered By Scalar.com ", -1)),
|
|
41
|
-
l(
|
|
42
|
-
art: t(
|
|
43
|
+
l(w, {
|
|
44
|
+
art: t(C),
|
|
43
45
|
class: "text-c-3"
|
|
44
46
|
}, null, 8, ["art"])
|
|
45
47
|
], 2),
|
|
46
|
-
t(
|
|
48
|
+
t(a) !== "modal" ? (n(), m("div", {
|
|
47
49
|
key: 0,
|
|
48
|
-
class:
|
|
49
|
-
"!flex opacity-100":
|
|
50
|
+
class: f(["h-[calc(100%_-_50px)] items-center justify-center hidden pb-5", {
|
|
51
|
+
"!flex opacity-100": o.numWorkspaceRequests == 1
|
|
50
52
|
}])
|
|
51
53
|
}, [
|
|
52
|
-
l(
|
|
54
|
+
l(v)
|
|
53
55
|
], 2)) : c("", !0),
|
|
54
|
-
|
|
55
|
-
t(
|
|
56
|
+
s("div", B, [
|
|
57
|
+
t(a) !== "modal" ? (n(), m("button", {
|
|
56
58
|
key: 0,
|
|
57
59
|
class: "flex items-center gap-1.5",
|
|
58
60
|
type: "button",
|
|
59
|
-
onClick: e[0] || (e[0] = (
|
|
61
|
+
onClick: e[0] || (e[0] = (x) => t(r).commandPalette.emit())
|
|
60
62
|
}, [
|
|
61
63
|
e[4] || (e[4] = i(" Get Started ")),
|
|
62
64
|
l(p, { hotkey: "k" })
|
|
63
65
|
])) : c("", !0),
|
|
64
|
-
t(
|
|
66
|
+
t(a) === "desktop" ? (n(), m("button", {
|
|
65
67
|
key: 1,
|
|
66
68
|
class: "flex items-center gap-1.5",
|
|
67
69
|
type: "button",
|
|
68
|
-
onClick:
|
|
70
|
+
onClick: u
|
|
69
71
|
}, [
|
|
70
72
|
e[5] || (e[5] = i(" New Request ")),
|
|
71
73
|
l(p, { hotkey: "N" })
|
|
72
74
|
])) : c("", !0),
|
|
73
|
-
|
|
75
|
+
s("button", {
|
|
74
76
|
class: "flex items-center gap-1.5",
|
|
75
77
|
type: "button",
|
|
76
|
-
onClick: e[1] || (e[1] = (
|
|
78
|
+
onClick: e[1] || (e[1] = (x) => t(r).executeRequest.emit())
|
|
77
79
|
}, [
|
|
78
80
|
e[6] || (e[6] = i(" Send Request ")),
|
|
79
81
|
l(p, { hotkey: "↵" })
|
|
@@ -83,5 +85,5 @@ const B = { class: "border-t relative col-1 flex-center gap-6 p-2 capitalize" },
|
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
export {
|
|
86
|
-
|
|
88
|
+
G as default
|
|
87
89
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
numWorkspaceRequests: number;
|
|
3
4
|
response: ResponseInstance | undefined;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAkNA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA2RF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ec732740"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as A, computed as u, ref as T, openBlock as a, createBlock as l, withCtx as d, createElementVNode as p, normalizeClass as f, createCommentVNode as c, createVNode as v, createElementBlock as y, Fragment as h } from "vue";
|
|
2
|
+
import g from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import j from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import S from "./ResponseBody.vue.js";
|
|
5
5
|
import b from "./ResponseEmpty.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import q from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import H from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import V from "./ResponseBodyVirtual.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
10
|
+
import w from "./ResponseCookies.vue.js";
|
|
11
|
+
import L from "./ResponseHeaders.vue.js";
|
|
12
|
+
const z = { class: "flex items-center flex-1 h-8" }, k = 2e5, U = /* @__PURE__ */ A({
|
|
13
13
|
__name: "ResponseSection",
|
|
14
14
|
props: {
|
|
15
|
+
numWorkspaceRequests: {},
|
|
15
16
|
response: {}
|
|
16
17
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
const e = (
|
|
18
|
+
setup(n) {
|
|
19
|
+
const m = u(() => {
|
|
20
|
+
var t;
|
|
21
|
+
const e = (t = n.response) == null ? void 0 : t.headers;
|
|
21
22
|
return e ? Object.keys(e).map((s) => ({
|
|
22
23
|
name: s,
|
|
23
24
|
value: e[s] ?? "",
|
|
@@ -28,24 +29,24 @@ const E = { class: "flex items-center flex-1 h-8" }, x = 2e5, X = /* @__PURE__ *
|
|
|
28
29
|
"X-API-Client-Content-Length"
|
|
29
30
|
].includes(s.name)
|
|
30
31
|
) : [];
|
|
31
|
-
}),
|
|
32
|
+
}), x = u(
|
|
32
33
|
() => {
|
|
33
34
|
var e;
|
|
34
|
-
return ((e =
|
|
35
|
-
var
|
|
36
|
-
const s = (
|
|
35
|
+
return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
|
|
36
|
+
var i, r;
|
|
37
|
+
const s = (r = (i = n.response) == null ? void 0 : i.headers) == null ? void 0 : r[t];
|
|
37
38
|
return s ? {
|
|
38
|
-
name:
|
|
39
|
+
name: t,
|
|
39
40
|
value: s,
|
|
40
41
|
required: !1
|
|
41
42
|
} : [];
|
|
42
43
|
})) ?? [];
|
|
43
44
|
}
|
|
44
|
-
),
|
|
45
|
-
var
|
|
46
|
-
if (!
|
|
47
|
-
const e = ((
|
|
48
|
-
return !e || (
|
|
45
|
+
), B = ["All", "Cookies", "Headers", "Body"], o = T("All"), R = u(() => {
|
|
46
|
+
var i, r;
|
|
47
|
+
if (!n.response) return !1;
|
|
48
|
+
const e = ((i = n.response.headers) == null ? void 0 : i["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
|
|
49
|
+
return !e || (n.response.size ?? 0) <= k || e.includes("text/html") ? !1 : [
|
|
49
50
|
// Text types
|
|
50
51
|
"text/",
|
|
51
52
|
// JSON types
|
|
@@ -72,62 +73,65 @@ const E = { class: "flex items-center flex-1 h-8" }, x = 2e5, X = /* @__PURE__ *
|
|
|
72
73
|
"application/x-java-source",
|
|
73
74
|
// Form data
|
|
74
75
|
"application/x-www-form-urlencoded"
|
|
75
|
-
].some((
|
|
76
|
+
].some((C) => e.includes(C)) && (n.response.size ?? 0) > k;
|
|
76
77
|
});
|
|
77
|
-
return (e,
|
|
78
|
-
title:
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
return (e, t) => (a(), l(j, { "aria-label": "Response" }, {
|
|
79
|
+
title: d(() => [
|
|
80
|
+
p("div", z, [
|
|
81
|
+
p("div", {
|
|
81
82
|
"aria-live": "polite",
|
|
82
83
|
class: f(["flex items-center", { "animate-response-heading": e.response }])
|
|
83
84
|
}, [
|
|
84
|
-
|
|
85
|
-
e.response ? (a(),
|
|
85
|
+
t[1] || (t[1] = p("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
|
|
86
|
+
e.response ? (a(), l(H, {
|
|
86
87
|
key: 0,
|
|
87
88
|
class: "animate-response-children",
|
|
88
89
|
response: e.response
|
|
89
90
|
}, null, 8, ["response"])) : c("", !0)
|
|
90
91
|
], 2),
|
|
91
|
-
v(
|
|
92
|
-
activeSection:
|
|
93
|
-
sections:
|
|
94
|
-
onSetActiveSection:
|
|
92
|
+
v(g, {
|
|
93
|
+
activeSection: o.value,
|
|
94
|
+
sections: B,
|
|
95
|
+
onSetActiveSection: t[0] || (t[0] = (s) => o.value = s)
|
|
95
96
|
}, null, 8, ["activeSection"])
|
|
96
97
|
])
|
|
97
98
|
]),
|
|
98
|
-
default:
|
|
99
|
-
var s,
|
|
99
|
+
default: d(() => {
|
|
100
|
+
var s, i, r;
|
|
100
101
|
return [
|
|
101
|
-
|
|
102
|
+
p("div", {
|
|
102
103
|
class: f(["custom-scroll h-full relative grid justify-stretch", {
|
|
103
104
|
"content-start": e.response
|
|
104
105
|
}])
|
|
105
106
|
}, [
|
|
106
107
|
e.response ? (a(), y(h, { key: 1 }, [
|
|
107
|
-
|
|
108
|
+
o.value === "All" || o.value === "Cookies" ? (a(), l(w, {
|
|
108
109
|
key: 0,
|
|
109
|
-
cookies:
|
|
110
|
+
cookies: x.value
|
|
110
111
|
}, null, 8, ["cookies"])) : c("", !0),
|
|
111
|
-
|
|
112
|
+
o.value === "All" || o.value === "Headers" ? (a(), l(L, {
|
|
112
113
|
key: 1,
|
|
113
|
-
headers:
|
|
114
|
+
headers: m.value
|
|
114
115
|
}, null, 8, ["headers"])) : c("", !0),
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
o.value === "All" || o.value === "Body" ? (a(), y(h, { key: 2 }, [
|
|
117
|
+
R.value && typeof ((s = e.response) == null ? void 0 : s.data) == "string" ? (a(), l(V, {
|
|
117
118
|
key: 0,
|
|
118
|
-
content:
|
|
119
|
-
data: (
|
|
120
|
-
headers:
|
|
121
|
-
}, null, 8, ["content", "data", "headers"])) : (a(),
|
|
119
|
+
content: e.response.data,
|
|
120
|
+
data: (i = e.response) == null ? void 0 : i.data,
|
|
121
|
+
headers: m.value
|
|
122
|
+
}, null, 8, ["content", "data", "headers"])) : (a(), l(S, {
|
|
122
123
|
key: 1,
|
|
123
124
|
active: !0,
|
|
124
|
-
data: (
|
|
125
|
-
headers:
|
|
125
|
+
data: (r = e.response) == null ? void 0 : r.data,
|
|
126
|
+
headers: m.value,
|
|
126
127
|
title: "Body"
|
|
127
128
|
}, null, 8, ["data", "headers"]))
|
|
128
129
|
], 64)) : c("", !0)
|
|
129
|
-
], 64)) : (a(),
|
|
130
|
-
|
|
130
|
+
], 64)) : (a(), l(b, {
|
|
131
|
+
key: 0,
|
|
132
|
+
numWorkspaceRequests: e.numWorkspaceRequests
|
|
133
|
+
}, null, 8, ["numWorkspaceRequests"])),
|
|
134
|
+
v(q)
|
|
131
135
|
], 2)
|
|
132
136
|
];
|
|
133
137
|
}),
|
|
@@ -136,5 +140,5 @@ const E = { class: "flex items-center flex-1 h-8" }, x = 2e5, X = /* @__PURE__ *
|
|
|
136
140
|
}
|
|
137
141
|
});
|
|
138
142
|
export {
|
|
139
|
-
|
|
143
|
+
U as default
|
|
140
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAgzBA,wBAMG"}
|