@scalar/api-client 2.0.4 → 2.0.6
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/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +15 -15
- package/dist/Modal/ApiClientModal.vue.d.ts +1 -1
- package/dist/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/Modal/ApiClientModal.vue.js +1 -1
- package/dist/Modal/ApiClientModal.vue2.js +16 -15
- package/dist/Modal/api-client-modal.d.ts +1 -1
- package/dist/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/Modal/api-client-modal.js +43 -43
- 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 +2 -2
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +8 -8
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +44 -37
- package/dist/components/DataTable/DataTableInputEnumSelect.vue.d.ts +22 -0
- package/dist/components/DataTable/DataTableInputEnumSelect.vue.d.ts.map +1 -0
- package/dist/components/DataTable/DataTableInputEnumSelect.vue.js +102 -0
- package/dist/components/DataTable/DataTableInputEnumSelect.vue2.js +4 -0
- package/dist/components/SideNav/SideNavLink.vue.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/store/workspace.d.ts +75 -12
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +113 -109
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +13 -11
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +33 -30
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +10 -10
- 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 +24 -23
- 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 +12 -11
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +6 -6
- package/package.json +8 -8
|
@@ -1,65 +1,68 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as $, computed as k, openBlock as l, createBlock as f, withCtx as v, createTextVNode as y, toDisplayString as C, createElementBlock as E, createElementVNode as K } from "vue";
|
|
2
|
+
import q from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import { useWorkspace as w } from "../../../store/workspace.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import P from "./RequestTable.vue.js";
|
|
5
|
+
const U = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
8
|
-
},
|
|
8
|
+
}, B = /* @__PURE__ */ K("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1), j = /* @__PURE__ */ $({
|
|
9
9
|
__name: "RequestPathParams",
|
|
10
10
|
props: {
|
|
11
11
|
title: {},
|
|
12
12
|
paramKey: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const o =
|
|
14
|
+
setup(_) {
|
|
15
|
+
const o = _, {
|
|
16
16
|
activeRequest: t,
|
|
17
17
|
activeExample: a,
|
|
18
|
-
requestMutators:
|
|
18
|
+
requestMutators: m,
|
|
19
19
|
requestExampleMutators: x
|
|
20
|
-
} = w(), n =
|
|
20
|
+
} = w(), n = k(
|
|
21
21
|
() => {
|
|
22
22
|
var e;
|
|
23
23
|
return ((e = a.value) == null ? void 0 : e.parameters[o.paramKey]) ?? [];
|
|
24
24
|
}
|
|
25
|
-
),
|
|
26
|
-
var d;
|
|
25
|
+
), g = (e, r, s) => {
|
|
26
|
+
var d, h;
|
|
27
27
|
if (!t.value || !a.value) return;
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
const c = a.value.parameters[o.paramKey], u = (d = c[e]) == null ? void 0 : d.key;
|
|
29
|
+
if (r === "key") {
|
|
30
|
+
if ((h = c[e]) != null && h.required)
|
|
31
|
+
return;
|
|
32
|
+
if (s) {
|
|
33
|
+
const p = encodeURIComponent(u), i = encodeURIComponent(s), R = new RegExp(`(?<=/):${p}(?=[/?#]|$)`, "g"), b = t.value.path.replace(
|
|
34
|
+
R,
|
|
35
|
+
`:${i}`
|
|
34
36
|
);
|
|
35
|
-
|
|
37
|
+
m.edit(t.value.uid, "path", b);
|
|
36
38
|
} else {
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
39
|
+
c.splice(e, 1);
|
|
40
|
+
const p = new RegExp(`/:${encodeURIComponent(u)}(?=[/?#]|$)`, "g"), i = t.value.path.replace(p, "");
|
|
41
|
+
m.edit(t.value.uid, "path", i);
|
|
40
42
|
}
|
|
43
|
+
}
|
|
41
44
|
x.edit(
|
|
42
45
|
a.value.uid,
|
|
43
|
-
`parameters.${o.paramKey}.${e}.${
|
|
44
|
-
|
|
46
|
+
`parameters.${o.paramKey}.${e}.${r}`,
|
|
47
|
+
s
|
|
45
48
|
);
|
|
46
49
|
};
|
|
47
|
-
return (e,
|
|
50
|
+
return (e, r) => (l(), f(q, {
|
|
48
51
|
itemCount: n.value.length
|
|
49
52
|
}, {
|
|
50
53
|
title: v(() => [
|
|
51
|
-
y(
|
|
54
|
+
y(C(e.title), 1)
|
|
52
55
|
]),
|
|
53
56
|
default: v(() => [
|
|
54
|
-
n.value.length ? (l(),
|
|
57
|
+
n.value.length ? (l(), f(P, {
|
|
55
58
|
key: 0,
|
|
56
59
|
class: "flex-1",
|
|
57
60
|
isEnabledHidden: "",
|
|
58
61
|
items: n.value,
|
|
59
|
-
onUpdateRow:
|
|
60
|
-
}, null, 8, ["items"])) : (l(),
|
|
62
|
+
onUpdateRow: g
|
|
63
|
+
}, null, 8, ["items"])) : (l(), E("div", U, [
|
|
61
64
|
y(" You can use variables in your path: "),
|
|
62
|
-
|
|
65
|
+
B
|
|
63
66
|
]))
|
|
64
67
|
]),
|
|
65
68
|
_: 1
|
|
@@ -67,5 +70,5 @@ const P = {
|
|
|
67
70
|
}
|
|
68
71
|
});
|
|
69
72
|
export {
|
|
70
|
-
|
|
73
|
+
j as default
|
|
71
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AA+WA,wBAKG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as y, computed as v, ref as x, watch as A, openBlock as S, createBlock as
|
|
1
|
+
import { defineComponent as y, computed as v, ref as x, watch as A, openBlock as S, createBlock as k, withCtx as _, createVNode as l, unref as n, createElementVNode as r, createTextVNode as q, toDisplayString as B, withDirectives as o, vShow as a } from "vue";
|
|
2
2
|
import R from "../../../components/ContextBar.vue.js";
|
|
3
3
|
import C from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import { useWorkspace as E } from "../../../store/workspace.js";
|
|
@@ -10,7 +10,7 @@ import { ScalarIcon as O } from "@scalar/components";
|
|
|
10
10
|
const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, M = /* @__PURE__ */ y({
|
|
11
11
|
__name: "RequestSection",
|
|
12
12
|
setup(K) {
|
|
13
|
-
const { activeRequest: i, activeExample: m, activeSecurityRequirements:
|
|
13
|
+
const { activeRequest: i, activeExample: m, activeSecurityRequirements: d } = E(), c = ["POST", "PUT", "PATCH", "DELETE"], h = v(() => {
|
|
14
14
|
const t = [
|
|
15
15
|
"All",
|
|
16
16
|
"Auth",
|
|
@@ -20,23 +20,23 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
20
20
|
"Query",
|
|
21
21
|
"Body"
|
|
22
22
|
];
|
|
23
|
-
return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1),
|
|
24
|
-
}),
|
|
25
|
-
() =>
|
|
23
|
+
return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), p.value && t.splice(t.indexOf("Auth"), 1), t;
|
|
24
|
+
}), p = v(
|
|
25
|
+
() => d.value.length === 0 || JSON.stringify(d.value) === "[{}]"
|
|
26
26
|
), e = x("All");
|
|
27
27
|
return A(i, (t) => {
|
|
28
28
|
e.value === "Body" && !c.includes(t.method) && (e.value = "All");
|
|
29
|
-
}), (t, f) => (S(),
|
|
29
|
+
}), (t, f) => (S(), k(C, null, {
|
|
30
30
|
title: _(() => {
|
|
31
31
|
var s;
|
|
32
32
|
return [
|
|
33
33
|
l(n(O), {
|
|
34
|
-
class: "text-c-3 mr-1.5",
|
|
34
|
+
class: "text-c-3 mr-1.5 stroke-2",
|
|
35
35
|
icon: "ExternalLink",
|
|
36
|
-
size: "
|
|
36
|
+
size: "md"
|
|
37
37
|
}),
|
|
38
38
|
r("div", P, [
|
|
39
|
-
|
|
39
|
+
q(" Request "),
|
|
40
40
|
r("span", T, B((s = n(i)) == null ? void 0 : s.summary), 1)
|
|
41
41
|
])
|
|
42
42
|
];
|
|
@@ -51,7 +51,7 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
51
51
|
o(l($, { title: "Authentication" }, null, 512), [
|
|
52
52
|
[
|
|
53
53
|
a,
|
|
54
|
-
!
|
|
54
|
+
!p.value && (e.value === "All" || e.value === "Auth")
|
|
55
55
|
]
|
|
56
56
|
]),
|
|
57
57
|
o(l(H, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAyIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAK5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AAqa9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c04c82dd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as s, createBlock as r, unref as p, withCtx as i, createElementBlock as f, Fragment as v, renderList as F, createCommentVNode as b, createVNode as c, createSlots as R, createElementVNode as
|
|
1
|
+
import { defineComponent as S, openBlock as s, createBlock as r, unref as p, withCtx as i, createElementBlock as f, Fragment as v, renderList as F, createCommentVNode as b, createVNode as c, createSlots as R, createElementVNode as u, toDisplayString as w, pushScopeId as $, popScopeId as x } from "vue";
|
|
2
2
|
import I from "../../../components/DataTable/DataTable.vue.js";
|
|
3
3
|
import U from "../../../components/DataTable/DataTableCell.vue.js";
|
|
4
4
|
import C from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
5
5
|
import V from "../../../components/DataTable/DataTableInput.vue.js";
|
|
6
6
|
import z from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarIcon as y, ScalarButton as E } from "@scalar/components";
|
|
8
|
-
const q = (
|
|
8
|
+
const q = (d) => ($("data-v-c04c82dd"), d = d(), x(), d), D = { class: "relative group/info flex items-center pr-2" }, H = { class: "absolute pointer-events-none w-40 shadow-lg rounded bg-b-1 z-100 p-1.5 text-xxs leading-5 -translate-x-full translate-y-[24px] opacity-0 group-hover/info:opacity-100 z-10 text-c-1" }, N = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, T = ["onClick"], j = /* @__PURE__ */ q(() => /* @__PURE__ */ u("span", null, "File", -1)), P = /* @__PURE__ */ S({
|
|
9
9
|
__name: "RequestTable",
|
|
10
10
|
props: {
|
|
11
11
|
items: {},
|
|
@@ -13,58 +13,59 @@ const q = (u) => ($("data-v-5d101842"), u = u(), x(), u), D = { class: "relative
|
|
|
13
13
|
showUploadButton: { type: Boolean, default: !1 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
|
|
16
|
-
setup(
|
|
17
|
-
const k =
|
|
18
|
-
o("updateRow", t,
|
|
16
|
+
setup(d, { emit: g }) {
|
|
17
|
+
const k = d, o = g, h = k.isEnabledHidden ? ["", ""] : ["", "", "36px"], m = (t, n, l) => {
|
|
18
|
+
o("updateRow", t, n, l);
|
|
19
19
|
}, _ = (t) => {
|
|
20
20
|
o("uploadFile", t);
|
|
21
21
|
};
|
|
22
|
-
return (t,
|
|
22
|
+
return (t, n) => (s(), r(I, {
|
|
23
23
|
class: "flex-1",
|
|
24
24
|
columns: p(h)
|
|
25
25
|
}, {
|
|
26
26
|
default: i(() => [
|
|
27
|
-
(s(!0), f(v, null, F(t.items, (
|
|
27
|
+
(s(!0), f(v, null, F(t.items, (l, a) => (s(), r(z, { key: a }, {
|
|
28
28
|
default: i(() => [
|
|
29
29
|
t.isEnabledHidden ? b("", !0) : (s(), r(C, {
|
|
30
30
|
key: 0,
|
|
31
|
-
modelValue:
|
|
31
|
+
modelValue: l.enabled,
|
|
32
32
|
"onUpdate:modelValue": (e) => o("toggleRow", a, e)
|
|
33
33
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
34
34
|
c(V, {
|
|
35
|
-
modelValue:
|
|
35
|
+
modelValue: l.key,
|
|
36
36
|
placeholder: "Key",
|
|
37
|
-
required:
|
|
38
|
-
onBlur:
|
|
39
|
-
onFocus:
|
|
37
|
+
required: l.required,
|
|
38
|
+
onBlur: n[0] || (n[0] = (e) => o("inputBlur")),
|
|
39
|
+
onFocus: n[1] || (n[1] = (e) => o("inputFocus")),
|
|
40
40
|
onInput: (e) => t.items && a === t.items.length - 1 && o("addRow"),
|
|
41
41
|
onSelectVariable: (e) => m(a, "key", e),
|
|
42
42
|
"onUpdate:modelValue": (e) => o("updateRow", a, "key", e)
|
|
43
43
|
}, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
|
|
44
44
|
c(V, {
|
|
45
|
-
|
|
45
|
+
enum: l.enum,
|
|
46
|
+
modelValue: l.value,
|
|
46
47
|
placeholder: "Value",
|
|
47
|
-
onBlur:
|
|
48
|
-
onFocus:
|
|
48
|
+
onBlur: n[2] || (n[2] = (e) => o("inputBlur")),
|
|
49
|
+
onFocus: n[3] || (n[3] = (e) => o("inputFocus")),
|
|
49
50
|
onInput: (e) => t.items && a === t.items.length - 1 && o("addRow"),
|
|
50
51
|
onSelectVariable: (e) => m(a, "value", e),
|
|
51
52
|
"onUpdate:modelValue": (e) => o("updateRow", a, "value", e)
|
|
52
53
|
}, R({ _: 2 }, [
|
|
53
|
-
|
|
54
|
+
l.description ? {
|
|
54
55
|
name: "icon",
|
|
55
56
|
fn: i(() => [
|
|
56
|
-
|
|
57
|
+
u("div", D, [
|
|
57
58
|
c(p(y), {
|
|
58
59
|
class: "ml-1 text-c-3 group-hover/info:text-c-1",
|
|
59
60
|
icon: "Info",
|
|
60
61
|
size: "sm"
|
|
61
62
|
}),
|
|
62
|
-
|
|
63
|
+
u("span", H, w(l.description), 1)
|
|
63
64
|
])
|
|
64
65
|
]),
|
|
65
66
|
key: "0"
|
|
66
67
|
} : void 0
|
|
67
|
-
]), 1032, ["modelValue", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
|
|
68
|
+
]), 1032, ["enum", "modelValue", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
|
|
68
69
|
t.showUploadButton ? (s(), r(U, {
|
|
69
70
|
key: 1,
|
|
70
71
|
class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
|
|
@@ -72,11 +73,11 @@ const q = (u) => ($("data-v-5d101842"), u = u(), x(), u), D = { class: "relative
|
|
|
72
73
|
default: i(() => {
|
|
73
74
|
var e;
|
|
74
75
|
return [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
l.file ? (s(), f(v, { key: 0 }, [
|
|
77
|
+
u("div", N, [
|
|
78
|
+
u("span", null, w((e = l.file) == null ? void 0 : e.name), 1)
|
|
78
79
|
]),
|
|
79
|
-
|
|
80
|
+
u("button", {
|
|
80
81
|
class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
|
|
81
82
|
type: "button",
|
|
82
83
|
onClick: (B) => o("removeFile", a)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAiOA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AA0GlD,iBAAS,cAAc;gBAvET,IAAI;;gBAAJ,IAAI;EAwVjB;AACD,QAAA,MAAM,eAAe;IAnXjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;iBATtC,OAAO;iBAMP,OAAO;MA+WvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestSidebarItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3cdb431d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, useCssVars as V, computed as a, resolveComponent as
|
|
1
|
+
import { defineComponent as N, useCssVars as V, computed as a, resolveComponent as x, openBlock as o, createElementBlock as d, normalizeClass as p, unref as r, createVNode as f, withCtx as y, createBlock as b, createElementVNode as n, toDisplayString as U, createCommentVNode as g, createTextVNode as k, renderSlot as j, withDirectives as F, Fragment as L, renderList as T, vShow as K } from "vue";
|
|
2
2
|
import { useWorkspace as W } from "../../store/workspace.js";
|
|
3
3
|
import { ScalarIcon as A } from "@scalar/components";
|
|
4
4
|
import { Draggable as G } from "@scalar/draggable";
|
|
@@ -18,21 +18,21 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
18
18
|
emits: ["onDragEnd"],
|
|
19
19
|
setup(w) {
|
|
20
20
|
V((e) => ({
|
|
21
|
-
"
|
|
21
|
+
"426379e0": E.value
|
|
22
22
|
}));
|
|
23
|
-
const s = w, { activeRequest: c, folders: C, requests: h, requestExamples: R, workspace: l } = W(), { collapsedSidebarFolders: v, toggleSidebarFolder: $ } = Q(), S = H(), m = a(() => "childUids" in s.item), E = a(() => s.parentUids.length ? m.value ? `-${s.parentUids.length * 16}px` : `-${s.parentUids.length * 16}px` : "0px"),
|
|
23
|
+
const s = w, { activeRequest: c, folders: C, requests: h, requestExamples: R, workspace: l } = W(), { collapsedSidebarFolders: v, toggleSidebarFolder: $ } = Q(), S = H(), m = a(() => "childUids" in s.item), E = a(() => s.parentUids.length ? m.value ? `-${s.parentUids.length * 16}px` : `-${s.parentUids.length * 16}px` : "0px"), z = (e, t) => {
|
|
24
24
|
e.metaKey ? window.open(`/request/${t}`, "_blank") : S.push(`/request/${t}`);
|
|
25
25
|
}, D = (e) => {
|
|
26
26
|
var t;
|
|
27
27
|
return "spec" in e ? (t = e.spec.info) == null ? void 0 : t.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
28
|
-
},
|
|
28
|
+
}, I = a(() => ("requestUid" in s.item ? h[s.item.requestUid] : s.item).method), O = a(
|
|
29
29
|
() => {
|
|
30
30
|
var e;
|
|
31
31
|
return v[s.item.uid] || ((e = c.value) == null ? void 0 : e.uid) === s.item.uid && s.item.childUids.length > 1;
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
return (e, t) => {
|
|
35
|
-
const B =
|
|
35
|
+
const B = x("RequestSidebarItem", !0);
|
|
36
36
|
return o(), d("div", {
|
|
37
37
|
class: p(["relative flex flex-row", [
|
|
38
38
|
r(l).isReadOnly && e.parentUids.length > 1 || !r(l).isReadOnly && e.parentUids.length ? "before:bg-b-3 pl-4 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-px mb-[.5px] last:mb-0" : ""
|
|
@@ -58,12 +58,13 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
58
58
|
var i;
|
|
59
59
|
return [
|
|
60
60
|
n("div", {
|
|
61
|
-
class: p(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 editable-sidebar-hover", [
|
|
61
|
+
class: p(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover", [
|
|
62
62
|
q,
|
|
63
63
|
((i = r(c)) == null ? void 0 : i.uid) === e.item.uid ? "before:bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2",
|
|
64
64
|
(e.isDroppable, "pl-3")
|
|
65
65
|
]]),
|
|
66
|
-
|
|
66
|
+
tabindex: "0",
|
|
67
|
+
onClick: t[0] || (t[0] = (u) => z(u, e.item.uid))
|
|
67
68
|
}, [
|
|
68
69
|
n("span", X, U(D(e.item)), 1),
|
|
69
70
|
n("div", Y, [
|
|
@@ -75,7 +76,7 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
75
76
|
k(" "),
|
|
76
77
|
f(r(P), {
|
|
77
78
|
class: "font-bold",
|
|
78
|
-
method:
|
|
79
|
+
method: I.value
|
|
79
80
|
}, null, 8, ["method"])
|
|
80
81
|
])
|
|
81
82
|
])
|
|
@@ -85,12 +86,12 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
85
86
|
_: 1
|
|
86
87
|
}, 8, ["to"])) : !r(l).isReadOnly || e.parentUids.length ? (o(), d("button", {
|
|
87
88
|
key: 1,
|
|
88
|
-
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5", q]),
|
|
89
|
+
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", q]),
|
|
89
90
|
type: "button",
|
|
90
91
|
onClick: t[1] || (t[1] = (i) => r($)(e.item.uid))
|
|
91
92
|
}, [
|
|
92
93
|
n("span", _, [
|
|
93
|
-
|
|
94
|
+
j(e.$slots, "leftIcon", {}, () => [
|
|
94
95
|
n("div", {
|
|
95
96
|
class: p({
|
|
96
97
|
"rotate-90": r(v)[e.item.uid]
|
|
@@ -117,7 +118,7 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
117
118
|
onOnDragEnd: t[2] || (t[2] = (...u) => e.$emit("onDragEnd", ...u))
|
|
118
119
|
}, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
|
|
119
120
|
], 512)), [
|
|
120
|
-
[K,
|
|
121
|
+
[K, O.value]
|
|
121
122
|
]) : g("", !0)
|
|
122
123
|
]),
|
|
123
124
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAUrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAUrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAgOxC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -35,17 +35,17 @@ const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll fle
|
|
|
35
35
|
value: e[m],
|
|
36
36
|
required: !1
|
|
37
37
|
})) : [];
|
|
38
|
-
}),
|
|
38
|
+
}), k = i(() => {
|
|
39
39
|
var o;
|
|
40
40
|
const e = (o = a.response) == null ? void 0 : o.data;
|
|
41
41
|
return e && V(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof h(e) == "object" ? JSON.stringify(e, null, 2) : e;
|
|
42
|
-
}),
|
|
42
|
+
}), _ = ["All", "Body", "Headers", "Cookies"], s = x("All");
|
|
43
43
|
return (e, o) => (r(), n(g, null, {
|
|
44
44
|
title: u(() => [
|
|
45
45
|
p(S(R), {
|
|
46
|
-
class: "text-c-3 mr-1.5 rotate-180",
|
|
46
|
+
class: "text-c-3 mr-1.5 rotate-180 stroke-2",
|
|
47
47
|
icon: "ExternalLink",
|
|
48
|
-
size: "
|
|
48
|
+
size: "md"
|
|
49
49
|
}),
|
|
50
50
|
f("div", E, [
|
|
51
51
|
C(" Response "),
|
|
@@ -60,7 +60,7 @@ const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll fle
|
|
|
60
60
|
e.response ? (r(), A(B, { key: 1 }, [
|
|
61
61
|
p(N, {
|
|
62
62
|
activeSection: s.value,
|
|
63
|
-
sections:
|
|
63
|
+
sections: _,
|
|
64
64
|
onSetActiveSection: o[0] || (o[0] = (t) => s.value = t)
|
|
65
65
|
}, null, 8, ["activeSection"]),
|
|
66
66
|
s.value === "All" || s.value === "Cookies" ? (r(), n(b, {
|
|
@@ -74,7 +74,7 @@ const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll fle
|
|
|
74
74
|
s.value === "All" || s.value === "Body" ? (r(), n($, {
|
|
75
75
|
key: 2,
|
|
76
76
|
active: !0,
|
|
77
|
-
data:
|
|
77
|
+
data: k.value,
|
|
78
78
|
headers: c.value,
|
|
79
79
|
title: "Body"
|
|
80
80
|
}, null, 8, ["data", "headers"])) : l("", !0)
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.6",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"@vueuse/core": "^10.10.0",
|
|
103
103
|
"axios": "^1.6.8",
|
|
104
104
|
"cva": "1.0.0-beta.1",
|
|
105
|
+
"fuse.js": "^7.0.0",
|
|
105
106
|
"js-cookie": "^3.0.5",
|
|
106
107
|
"nanoid": "^5.0.7",
|
|
107
108
|
"pretty-bytes": "^6.1.1",
|
|
@@ -109,11 +110,13 @@
|
|
|
109
110
|
"vue": "^3.4.22",
|
|
110
111
|
"vue-router": "^4.3.0",
|
|
111
112
|
"zod": "^3.22.4",
|
|
112
|
-
"@scalar/components": "0.12.
|
|
113
|
+
"@scalar/components": "0.12.8",
|
|
113
114
|
"@scalar/draggable": "0.1.3",
|
|
114
|
-
"@scalar/
|
|
115
|
-
"@scalar/
|
|
115
|
+
"@scalar/object-utils": "1.1.3",
|
|
116
|
+
"@scalar/oas-utils": "0.2.9",
|
|
117
|
+
"@scalar/use-codemirror": "0.11.4",
|
|
116
118
|
"@scalar/use-toasts": "0.7.4",
|
|
119
|
+
"@scalar/themes": "0.9.10",
|
|
117
120
|
"@scalar/use-tooltip": "1.0.2"
|
|
118
121
|
},
|
|
119
122
|
"devDependencies": {
|
|
@@ -121,7 +124,6 @@
|
|
|
121
124
|
"@types/js-cookie": "^3.0.6",
|
|
122
125
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
123
126
|
"autoprefixer": "^10.4.19",
|
|
124
|
-
"fuse.js": "^7.0.0",
|
|
125
127
|
"jsdom": "^22.1.0",
|
|
126
128
|
"postcss": "^8.4.38",
|
|
127
129
|
"tailwindcss": "^3.4.4",
|
|
@@ -132,9 +134,7 @@
|
|
|
132
134
|
"vite-svg-loader": "^5.1.0",
|
|
133
135
|
"vitest": "^1.6.0",
|
|
134
136
|
"vue-tsc": "^2.0.13",
|
|
135
|
-
"@scalar/build-tooling": "0.1.8"
|
|
136
|
-
"@scalar/use-codemirror": "0.11.4",
|
|
137
|
-
"@scalar/themes": "0.9.9"
|
|
137
|
+
"@scalar/build-tooling": "0.1.8"
|
|
138
138
|
},
|
|
139
139
|
"scripts": {
|
|
140
140
|
"build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
|