@scalar/api-client 2.0.56 → 2.0.58
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 +30 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +61 -58
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +31 -25
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +51 -45
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +47 -41
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -40
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +67 -61
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +30 -30
- package/dist/components/TopNav/TopNav.vue.d.ts +20 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +64 -49
- package/dist/layouts/App/ApiClientApp.vue.d.ts +11 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +53 -49
- package/dist/libs/event-busses/cancel-request-bus.d.ts +2 -0
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/cancel-request-bus.js +5 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +1 -0
- package/dist/libs/event-busses/index.d.ts +2 -1
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +11 -8
- package/dist/libs/index.js +21 -18
- package/dist/libs/local-storage.js +1 -1
- package/dist/libs/sendRequest.d.ts +2 -2
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +22 -21
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +100 -103
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +11 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +3 -3
- package/dist/views/Request/Request.vue2.js +184 -174
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -0
- 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 +140 -132
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +3 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +39 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -30
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +23 -21
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +20 -21
- package/package.json +5 -5
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as _, computed as
|
|
1
|
+
import { defineComponent as _, computed as p, ref as h, openBlock as r, createBlock as n, withCtx as u, createVNode as c, unref as x, createElementVNode as d, createTextVNode as y, createCommentVNode as l, createElementBlock as C, Fragment as A } from "vue";
|
|
2
2
|
import B from "../../../components/ContextBar.vue.js";
|
|
3
3
|
import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import $ from "./ResponseBody.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import g from "./ResponseEmpty.vue.js";
|
|
6
|
+
import E from "./ResponseLoadingOverlay.vue.js";
|
|
6
7
|
import N from "./ResponseMetaInformation.vue.js";
|
|
7
|
-
import { ScalarIcon as
|
|
8
|
-
import
|
|
8
|
+
import { ScalarIcon as R } from "@scalar/components";
|
|
9
|
+
import V from "./ResponseCookies.vue.js";
|
|
9
10
|
import H from "./ResponseHeaders.vue.js";
|
|
10
|
-
const
|
|
11
|
+
const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, D = /* @__PURE__ */ _({
|
|
11
12
|
__name: "ResponseSection",
|
|
12
13
|
props: {
|
|
13
14
|
response: {}
|
|
14
15
|
},
|
|
15
16
|
setup(f) {
|
|
16
|
-
const
|
|
17
|
+
const i = f, m = p(() => {
|
|
17
18
|
var s;
|
|
18
|
-
const e = (s =
|
|
19
|
+
const e = (s = i.response) == null ? void 0 : s.headers;
|
|
19
20
|
return e ? Object.keys(e).map((o) => ({
|
|
20
21
|
name: o,
|
|
21
22
|
value: e[o],
|
|
@@ -26,9 +27,9 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
26
27
|
"X-API-Client-Content-Length"
|
|
27
28
|
].includes(o.name)
|
|
28
29
|
) : [];
|
|
29
|
-
}), v =
|
|
30
|
+
}), v = p(() => {
|
|
30
31
|
var s, o;
|
|
31
|
-
const e = (o = (s =
|
|
32
|
+
const e = (o = (s = i.response) == null ? void 0 : s.headers) == null ? void 0 : o.cookies;
|
|
32
33
|
return e ? Object.keys(e).map((a) => ({
|
|
33
34
|
name: a,
|
|
34
35
|
value: e[a],
|
|
@@ -36,14 +37,14 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
36
37
|
})) : [];
|
|
37
38
|
}), k = ["All", "Body", "Headers", "Cookies"], t = h("All");
|
|
38
39
|
return (e, s) => (r(), n(S, null, {
|
|
39
|
-
title:
|
|
40
|
-
|
|
40
|
+
title: u(() => [
|
|
41
|
+
c(x(R), {
|
|
41
42
|
class: "text-c-3 mr-2 rotate-180",
|
|
42
43
|
icon: "ExternalLink",
|
|
43
44
|
size: "sm",
|
|
44
45
|
thickness: "2.5"
|
|
45
46
|
}),
|
|
46
|
-
d("div",
|
|
47
|
+
d("div", L, [
|
|
47
48
|
y(" Response "),
|
|
48
49
|
e.response ? (r(), n(N, {
|
|
49
50
|
key: 0,
|
|
@@ -51,32 +52,33 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
51
52
|
}, null, 8, ["response"])) : l("", !0)
|
|
52
53
|
])
|
|
53
54
|
]),
|
|
54
|
-
default:
|
|
55
|
+
default: u(() => {
|
|
55
56
|
var o;
|
|
56
57
|
return [
|
|
57
|
-
d("div",
|
|
58
|
+
d("div", O, [
|
|
58
59
|
e.response ? (r(), C(A, { key: 1 }, [
|
|
59
|
-
|
|
60
|
+
c(B, {
|
|
60
61
|
activeSection: t.value,
|
|
61
62
|
sections: k,
|
|
62
63
|
onSetActiveSection: s[0] || (s[0] = (a) => t.value = a)
|
|
63
64
|
}, null, 8, ["activeSection"]),
|
|
64
|
-
t.value === "All" || t.value === "Cookies" ? (r(), n(
|
|
65
|
+
t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
|
|
65
66
|
key: 0,
|
|
66
67
|
cookies: v.value
|
|
67
68
|
}, null, 8, ["cookies"])) : l("", !0),
|
|
68
69
|
t.value === "All" || t.value === "Headers" ? (r(), n(H, {
|
|
69
70
|
key: 1,
|
|
70
|
-
headers:
|
|
71
|
+
headers: m.value
|
|
71
72
|
}, null, 8, ["headers"])) : l("", !0),
|
|
72
73
|
t.value === "All" || t.value === "Body" ? (r(), n($, {
|
|
73
74
|
key: 2,
|
|
74
75
|
active: !0,
|
|
75
|
-
data: (o =
|
|
76
|
-
headers:
|
|
76
|
+
data: (o = i.response) == null ? void 0 : o.data,
|
|
77
|
+
headers: m.value,
|
|
77
78
|
title: "Body"
|
|
78
79
|
}, null, 8, ["data", "headers"])) : l("", !0)
|
|
79
|
-
], 64)) : (r(), n(
|
|
80
|
+
], 64)) : (r(), n(g, { key: 0 })),
|
|
81
|
+
c(E)
|
|
80
82
|
])
|
|
81
83
|
];
|
|
82
84
|
}),
|
|
@@ -85,5 +87,5 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
D as default
|
|
89
91
|
};
|
|
@@ -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":";AAq7BA,wBAKG"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as
|
|
1
|
+
import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as n, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as w, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
|
|
2
2
|
import I from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
3
|
import { useWorkspace as L } from "../../../store/workspace.js";
|
|
4
4
|
import { useModal as $, ScalarDropdown as N, ScalarContextMenu as P, ScalarDropdownItem as m, ScalarIcon as c, ScalarTooltip as q, ScalarDropdownDivider as G, ScalarButton as _, ScalarModal as V, ScalarTextField as H } from "@scalar/components";
|
|
5
5
|
import { useRouter as J } from "vue-router";
|
|
6
6
|
import { commandPaletteBus as Q } from "../../../libs/event-busses/command-palette-bus.js";
|
|
7
|
-
const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm" }, Y = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Z = /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
7
|
+
const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm" }, Y = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Z = /* @__PURE__ */ n("span", null, "Rename", -1), ee = /* @__PURE__ */ n("span", null, "Delete", -1), te = /* @__PURE__ */ n("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
8
|
+
/* @__PURE__ */ n("div", { class: "flex items-center text-c-2" }, [
|
|
9
|
+
/* @__PURE__ */ n("span", null, "Only workspace cannot be deleted.")
|
|
10
10
|
])
|
|
11
|
-
], -1), se = /* @__PURE__ */
|
|
11
|
+
], -1), se = /* @__PURE__ */ n("span", null, "Delete", -1), ne = { class: "flex items-center justify-center h-4 w-4" }, ae = /* @__PURE__ */ n("span", null, "Create new workspace", -1), le = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
|
|
12
12
|
__name: "WorkspaceDropdown",
|
|
13
13
|
setup(oe) {
|
|
14
|
-
const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (
|
|
15
|
-
|
|
16
|
-
}, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), r = W(""), v = $(), h = $(), R = (
|
|
17
|
-
o.value = d[
|
|
14
|
+
const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (a) => {
|
|
15
|
+
a !== f.value.uid && b(`/workspace/${a}`);
|
|
16
|
+
}, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), r = W(""), v = $(), h = $(), R = (a) => {
|
|
17
|
+
o.value = d[a].name, r.value = a, v.show();
|
|
18
18
|
}, C = () => {
|
|
19
19
|
o.value.trim() && (g.rename(r.value, o.value.trim()), v.hide());
|
|
20
|
-
}, T = (
|
|
21
|
-
o.value = d[
|
|
20
|
+
}, T = (a) => {
|
|
21
|
+
o.value = d[a].name, r.value = a, h.show();
|
|
22
22
|
}, E = async () => {
|
|
23
23
|
if (!y.value) {
|
|
24
|
-
const
|
|
25
|
-
if (delete l[r.value], g.delete(r.value),
|
|
24
|
+
const a = f.value.uid === r.value, l = { ...d };
|
|
25
|
+
if (delete l[r.value], g.delete(r.value), a) {
|
|
26
26
|
const i = Object.keys(l)[0];
|
|
27
27
|
await b(`/workspace/${i}/`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
h.hide();
|
|
31
31
|
};
|
|
32
|
-
return (
|
|
33
|
-
|
|
32
|
+
return (a, l) => (p(), D(S, null, [
|
|
33
|
+
n("div", X, [
|
|
34
34
|
t(e(N), null, {
|
|
35
35
|
items: s(() => [
|
|
36
36
|
(p(!0), D(S, null, U(e(d), (i, u) => (p(), x(e(P), { key: u }, {
|
|
@@ -40,7 +40,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
|
|
|
40
40
|
onClick: w((M) => j(u), ["stop"])
|
|
41
41
|
}, {
|
|
42
42
|
default: s(() => [
|
|
43
|
-
|
|
43
|
+
n("div", {
|
|
44
44
|
class: A([
|
|
45
45
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
46
46
|
e(f).uid === u ? "bg-blue text-b-1" : "text-transparent"
|
|
@@ -131,14 +131,14 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
|
|
|
131
131
|
onClick: B
|
|
132
132
|
}, {
|
|
133
133
|
default: s(() => [
|
|
134
|
-
|
|
134
|
+
n("div", ne, [
|
|
135
135
|
t(e(c), {
|
|
136
136
|
class: "h-2.5",
|
|
137
137
|
icon: "Add",
|
|
138
138
|
thickness: "3"
|
|
139
139
|
})
|
|
140
140
|
]),
|
|
141
|
-
|
|
141
|
+
ae
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
})
|
|
@@ -150,7 +150,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
|
|
|
150
150
|
variant: "ghost"
|
|
151
151
|
}, {
|
|
152
152
|
default: s(() => [
|
|
153
|
-
|
|
153
|
+
n("h2", Y, [
|
|
154
154
|
k(z(e(f).name) + " ", 1),
|
|
155
155
|
t(e(c), {
|
|
156
156
|
class: "size-2.5",
|
|
@@ -189,10 +189,9 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
|
|
|
189
189
|
modelValue: o.value,
|
|
190
190
|
"onUpdate:modelValue": l[2] || (l[2] = (i) => o.value = i),
|
|
191
191
|
label: "Workspace",
|
|
192
|
-
labelShadowColor: "var(--scalar-background-1)",
|
|
193
192
|
onKeydown: F(w(C, ["prevent"]), ["enter"])
|
|
194
193
|
}, null, 8, ["modelValue", "onKeydown"]),
|
|
195
|
-
|
|
194
|
+
n("div", le, [
|
|
196
195
|
t(e(_), {
|
|
197
196
|
class: "flex-1",
|
|
198
197
|
variant: "outlined",
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.58",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
"vue-router": "^4.3.0",
|
|
128
128
|
"whatwg-mimetype": "^4.0.0",
|
|
129
129
|
"zod": "^3.22.4",
|
|
130
|
-
"@scalar/components": "0.12.
|
|
130
|
+
"@scalar/components": "0.12.39",
|
|
131
131
|
"@scalar/draggable": "0.1.4",
|
|
132
|
-
"@scalar/oas-utils": "0.2.36",
|
|
133
132
|
"@scalar/object-utils": "1.1.7",
|
|
133
|
+
"@scalar/oas-utils": "0.2.38",
|
|
134
|
+
"@scalar/themes": "0.9.27",
|
|
134
135
|
"@scalar/use-codemirror": "0.11.10",
|
|
135
|
-
"@scalar/types": "0.0.
|
|
136
|
+
"@scalar/types": "0.0.4",
|
|
136
137
|
"@scalar/use-toasts": "0.7.5",
|
|
137
|
-
"@scalar/themes": "0.9.25",
|
|
138
138
|
"@scalar/use-tooltip": "1.0.2"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|