@scalar/api-client 2.0.21 → 2.0.24
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 +28 -0
- package/README.md +14 -17
- package/dist/Modal/api-client-modal.js +6 -6
- 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/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +36 -29
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue2.js +18 -17
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
- package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchButton.vue.js +7 -6
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +17 -15
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
- 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 +0 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +9 -10
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +36 -35
- package/dist/router.d.ts +20 -3
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +100 -68
- package/dist/store/workspace.d.ts +32 -32
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +49 -53
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +4 -3
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +68 -60
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +19 -19
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -5
- package/package.json +5 -5
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -136
- package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
- package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
|
@@ -95,9 +95,9 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
95
95
|
onClick: o[1] || (o[1] = (t) => e(L).hide())
|
|
96
96
|
}, [
|
|
97
97
|
r(e(y), {
|
|
98
|
-
class: "stroke-[1.75]",
|
|
99
98
|
icon: "Close",
|
|
100
|
-
size: "lg"
|
|
99
|
+
size: "lg",
|
|
100
|
+
thickness: "1.75"
|
|
101
101
|
})
|
|
102
102
|
])) : _("", !0)
|
|
103
103
|
])
|
|
@@ -131,7 +131,7 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
131
131
|
}, {
|
|
132
132
|
leftIcon: m(() => [
|
|
133
133
|
r(e(y), {
|
|
134
|
-
class: "text-sidebar-c-2
|
|
134
|
+
class: "text-sidebar-c-2 text-sm group-hover:hidden",
|
|
135
135
|
icon: "CodeFolder",
|
|
136
136
|
size: "sm"
|
|
137
137
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAwcS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAmxBlB,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"}
|
|
@@ -215,9 +215,9 @@ const ae = {
|
|
|
215
215
|
return [
|
|
216
216
|
y("span", null, k((o = g.value) == null ? void 0 : o.label), 1),
|
|
217
217
|
d(i(q), {
|
|
218
|
-
class: "stroke-[1]",
|
|
219
218
|
icon: "ChevronDown",
|
|
220
|
-
size: "xs"
|
|
219
|
+
size: "xs",
|
|
220
|
+
thickness: "2.5"
|
|
221
221
|
})
|
|
222
222
|
];
|
|
223
223
|
}),
|
|
@@ -260,9 +260,10 @@ const ae = {
|
|
|
260
260
|
default: u(() => [
|
|
261
261
|
de,
|
|
262
262
|
d(i(q), {
|
|
263
|
-
class: "ml-1
|
|
263
|
+
class: "ml-1",
|
|
264
264
|
icon: "UploadSimple",
|
|
265
|
-
size: "xs"
|
|
265
|
+
size: "xs",
|
|
266
|
+
thickness: "2.5"
|
|
266
267
|
})
|
|
267
268
|
]),
|
|
268
269
|
_: 1
|
|
@@ -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":";AA8WA,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 q, withCtx as _, createVNode as l, unref as n, createElementVNode as r, createTextVNode as k, 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";
|
|
@@ -26,17 +26,17 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
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(), q(C, null, {
|
|
30
30
|
title: _(() => {
|
|
31
31
|
var s;
|
|
32
32
|
return [
|
|
33
33
|
l(n(O), {
|
|
34
|
-
class: "text-c-3 mr-2
|
|
34
|
+
class: "text-c-3 mr-2",
|
|
35
35
|
icon: "ExternalLink",
|
|
36
36
|
size: "sm"
|
|
37
37
|
}),
|
|
38
38
|
r("div", P, [
|
|
39
|
-
|
|
39
|
+
k(" Request "),
|
|
40
40
|
r("span", T, B((s = n(i)) == null ? void 0 : s.summary), 1)
|
|
41
41
|
])
|
|
42
42
|
];
|
|
@@ -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":"AAgMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AA8b9B,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
|
-
import
|
|
1
|
+
import o from "./RequestTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a27b706c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
|
6
6
|
import D from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarButton as H, ScalarIcon as z } from "@scalar/components";
|
|
8
8
|
import A from "./RequestTableTooltip.vue.js";
|
|
9
|
-
const M = (s) => (E("data-v-
|
|
9
|
+
const M = (s) => (E("data-v-a27b706c"), s = s(), T(), s), O = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, j = ["onClick"], K = /* @__PURE__ */ M(() => /* @__PURE__ */ p("span", null, "File", -1)), Z = /* @__PURE__ */ F({
|
|
10
10
|
__name: "RequestTable",
|
|
11
11
|
props: {
|
|
12
12
|
items: {},
|
|
@@ -123,9 +123,10 @@ const M = (s) => (E("data-v-fe74a9ea"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
123
123
|
default: r(() => [
|
|
124
124
|
K,
|
|
125
125
|
i(m(z), {
|
|
126
|
-
class: "ml-1
|
|
126
|
+
class: "ml-1",
|
|
127
127
|
icon: "UploadSimple",
|
|
128
|
-
size: "xs"
|
|
128
|
+
size: "xs",
|
|
129
|
+
thickness: "2.5"
|
|
129
130
|
})
|
|
130
131
|
]),
|
|
131
132
|
_: 2
|
|
@@ -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":"AAkPA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,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;AAsHlD,iBAAS,cAAc;gBAnFT,IAAI;;gBAAJ,IAAI;EAuWjB;AACD,QAAA,MAAM,eAAe;IAlYjB;;;;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;MA8XvB,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"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-304b5123"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
import { Draggable as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useSidebar as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as V, useCssVars as j, computed as l, resolveComponent as F, openBlock as n, createElementBlock as p, normalizeClass as u, unref as t, createVNode as f, withCtx as k, createBlock as b, createElementVNode as o, toDisplayString as w, createCommentVNode as g, createTextVNode as q, renderSlot as L, withDirectives as T, Fragment as W, renderList as K, vShow as A } from "vue";
|
|
2
|
+
import { useWorkspace as G } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarIcon as H } from "@scalar/components";
|
|
4
|
+
import { Draggable as J } from "@scalar/draggable";
|
|
5
|
+
import { useRouter as M, RouterLink as P } from "vue-router";
|
|
6
|
+
import Q from "./RequestSidebarItemMenu.vue.js";
|
|
7
|
+
import X from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
8
|
+
import { useSidebar as Y } from "../../hooks/useSidebar.js";
|
|
9
|
+
const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" }, _ = { class: "relative" }, ee = { class: "flex" }, te = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, ie = { class: "z-10 font-medium" }, re = { key: 2 }, $ = "hover:bg-sidebar-active-b indent-padding-left", me = /* @__PURE__ */ V({
|
|
10
10
|
__name: "RequestSidebarItem",
|
|
11
11
|
props: {
|
|
12
12
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -15,67 +15,75 @@ const Y = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
15
15
|
item: {}
|
|
16
16
|
},
|
|
17
17
|
emits: ["onDragEnd"],
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
18
|
+
setup(C) {
|
|
19
|
+
j((e) => ({
|
|
20
|
+
"0e609a18": z.value,
|
|
21
|
+
e3e1f6b4: I.value
|
|
22
22
|
}));
|
|
23
|
-
const i =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const i = C, {
|
|
24
|
+
activeRequest: c,
|
|
25
|
+
activeWorkspace: h,
|
|
26
|
+
folders: S,
|
|
27
|
+
isReadOnly: a,
|
|
28
|
+
requests: v,
|
|
29
|
+
requestExamples: x
|
|
30
|
+
} = G(), { collapsedSidebarFolders: D, toggleSidebarFolder: E } = Y(), R = M(), U = l(() => "childUids" in i.item), z = l(() => i.parentUids.length ? a.value ? `${(i.parentUids.length - 1) * 12}px` : `${i.parentUids.length * 12}px` : "12px"), I = l(() => i.parentUids.length ? a.value ? `${(i.parentUids.length - 1) * 12}px` : `${i.parentUids.length * 12}px` : "0px"), B = (e, r) => {
|
|
31
|
+
const d = `/workspace/${h.value.uid}/request/${r}`;
|
|
32
|
+
e.metaKey ? window.open(d, "_blank") : R.push(d);
|
|
33
|
+
}, y = (e) => {
|
|
34
|
+
var r;
|
|
35
|
+
return "spec" in e ? (r = e.spec.info) == null ? void 0 : r.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
36
|
+
}, N = l(() => ("requestUid" in i.item ? v[i.item.requestUid] : i.item).method), O = l(
|
|
29
37
|
() => {
|
|
30
38
|
var e;
|
|
31
|
-
return
|
|
39
|
+
return D[i.item.uid] || ((e = c.value) == null ? void 0 : e.uid) === i.item.uid && i.item.childUids.length > 1;
|
|
32
40
|
}
|
|
33
41
|
);
|
|
34
|
-
return (e,
|
|
35
|
-
const
|
|
36
|
-
return n(),
|
|
37
|
-
class:
|
|
38
|
-
|
|
42
|
+
return (e, r) => {
|
|
43
|
+
const d = F("RequestSidebarItem", !0);
|
|
44
|
+
return n(), p("div", {
|
|
45
|
+
class: u(["relative flex flex-row", [
|
|
46
|
+
t(a) && e.parentUids.length > 1 || !t(a) && e.parentUids.length ? "before:bg-b-3 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 indent-border-line-offset" : ""
|
|
39
47
|
]])
|
|
40
48
|
}, [
|
|
41
|
-
|
|
49
|
+
f(t(J), {
|
|
42
50
|
id: e.item.uid,
|
|
43
|
-
ceiling:
|
|
51
|
+
ceiling: U.value ? 0.8 : 0.5,
|
|
44
52
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
45
|
-
floor:
|
|
53
|
+
floor: U.value ? 0.2 : 0.5,
|
|
46
54
|
isDraggable: e.parentUids.length > 0 && e.isDraggable,
|
|
47
55
|
isDroppable: e.isDroppable,
|
|
48
56
|
parentIds: e.parentUids,
|
|
49
|
-
onOnDragEnd:
|
|
57
|
+
onOnDragEnd: r[3] || (r[3] = (...s) => e.$emit("onDragEnd", ...s))
|
|
50
58
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
"summary" in e.item || "requestUid" in e.item ? (n(),
|
|
59
|
+
default: k(() => [
|
|
60
|
+
"summary" in e.item || "requestUid" in e.item ? (n(), b(t(P), {
|
|
53
61
|
key: 0,
|
|
54
62
|
custom: "",
|
|
55
|
-
to: `/request/${e.item.uid}`
|
|
63
|
+
to: `/workspace/${t(h).uid}/request/${e.item.uid}`
|
|
56
64
|
}, {
|
|
57
|
-
default:
|
|
65
|
+
default: k(() => {
|
|
58
66
|
var s;
|
|
59
67
|
return [
|
|
60
68
|
o("div", {
|
|
61
|
-
class:
|
|
62
|
-
|
|
63
|
-
((s =
|
|
69
|
+
class: u(["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", [
|
|
70
|
+
$,
|
|
71
|
+
((s = t(c)) == null ? void 0 : s.uid) === e.item.uid ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
64
72
|
]]),
|
|
65
73
|
tabindex: "0",
|
|
66
|
-
onClick:
|
|
74
|
+
onClick: r[0] || (r[0] = (m) => B(m, e.item.uid))
|
|
67
75
|
}, [
|
|
68
|
-
o("span",
|
|
69
|
-
o("div",
|
|
70
|
-
|
|
76
|
+
o("span", Z, w(y(e.item)), 1),
|
|
77
|
+
o("div", _, [
|
|
78
|
+
t(a) ? g("", !0) : (n(), b(Q, {
|
|
71
79
|
key: 0,
|
|
72
80
|
item: e.item
|
|
73
81
|
}, null, 8, ["item"])),
|
|
74
|
-
o("span",
|
|
82
|
+
o("span", ee, [
|
|
75
83
|
q(" "),
|
|
76
|
-
|
|
84
|
+
f(t(X), {
|
|
77
85
|
class: "font-bold",
|
|
78
|
-
method:
|
|
86
|
+
method: N.value
|
|
79
87
|
}, null, 8, ["method"])
|
|
80
88
|
])
|
|
81
89
|
])
|
|
@@ -83,20 +91,20 @@ const Y = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
83
91
|
];
|
|
84
92
|
}),
|
|
85
93
|
_: 1
|
|
86
|
-
}, 8, ["to"])) : !
|
|
94
|
+
}, 8, ["to"])) : !t(a) || e.parentUids.length ? (n(), p("button", {
|
|
87
95
|
key: 1,
|
|
88
|
-
class:
|
|
96
|
+
class: u(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", $]),
|
|
89
97
|
type: "button",
|
|
90
|
-
onClick:
|
|
98
|
+
onClick: r[1] || (r[1] = (s) => t(E)(e.item.uid))
|
|
91
99
|
}, [
|
|
92
|
-
o("span",
|
|
93
|
-
|
|
100
|
+
o("span", te, [
|
|
101
|
+
L(e.$slots, "leftIcon", {}, () => [
|
|
94
102
|
o("div", {
|
|
95
|
-
class:
|
|
96
|
-
"rotate-90":
|
|
103
|
+
class: u({
|
|
104
|
+
"rotate-90": t(D)[e.item.uid]
|
|
97
105
|
})
|
|
98
106
|
}, [
|
|
99
|
-
|
|
107
|
+
f(t(H), {
|
|
100
108
|
class: "text-c-3 text-sm",
|
|
101
109
|
icon: "ChevronRight",
|
|
102
110
|
size: "sm"
|
|
@@ -105,20 +113,20 @@ const Y = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
105
113
|
], !0),
|
|
106
114
|
q(" ")
|
|
107
115
|
]),
|
|
108
|
-
o("span",
|
|
109
|
-
])) :
|
|
110
|
-
"childUids" in e.item ?
|
|
111
|
-
(n(!0),
|
|
116
|
+
o("span", ie, w(y(e.item)), 1)
|
|
117
|
+
])) : g("", !0),
|
|
118
|
+
"childUids" in e.item ? T((n(), p("div", re, [
|
|
119
|
+
(n(!0), p(W, null, K(e.item.childUids, (s) => (n(), b(d, {
|
|
112
120
|
key: s,
|
|
113
121
|
isDraggable: e.isDraggable,
|
|
114
122
|
isDroppable: e.isDroppable,
|
|
115
|
-
item:
|
|
123
|
+
item: t(S)[s] || t(v)[s] || t(x)[s],
|
|
116
124
|
parentUids: [...e.parentUids, e.item.uid],
|
|
117
|
-
onOnDragEnd:
|
|
125
|
+
onOnDragEnd: r[2] || (r[2] = (...m) => e.$emit("onDragEnd", ...m))
|
|
118
126
|
}, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
|
|
119
127
|
], 512)), [
|
|
120
|
-
[
|
|
121
|
-
]) :
|
|
128
|
+
[A, O.value]
|
|
129
|
+
]) : g("", !0)
|
|
122
130
|
]),
|
|
123
131
|
_: 3
|
|
124
132
|
}, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
|
|
@@ -127,5 +135,5 @@ const Y = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
127
135
|
}
|
|
128
136
|
});
|
|
129
137
|
export {
|
|
130
|
-
|
|
138
|
+
me as default
|
|
131
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;;UAM1C,OAAO,GAAG,cAAc;;UAAxB,OAAO,GAAG,cAAc;;
|
|
1
|
+
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;;UAM1C,OAAO,GAAG,cAAc;;UAAxB,OAAO,GAAG,cAAc;;AA+RhC,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"}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as _, computed as h, openBlock as c, createBlock as m, unref as e, withCtx as s, createVNode as t, createCommentVNode as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarDropdown as
|
|
4
|
-
const v = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as _, computed as h, openBlock as c, createBlock as m, unref as e, withCtx as s, createVNode as t, createCommentVNode as g, withModifiers as z, createElementVNode as n } from "vue";
|
|
2
|
+
import { useWorkspace as D } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarDropdown as k, ScalarDropdownItem as a, ScalarIcon as i, ScalarDropdownDivider as E, ScalarButton as S } from "@scalar/components";
|
|
4
|
+
const v = /* @__PURE__ */ n("span", null, "Add Example", -1), w = /* @__PURE__ */ n("span", null, "Rename", -1), C = /* @__PURE__ */ n("span", null, "Duplicate", -1), b = /* @__PURE__ */ n("span", null, "Delete", -1), B = /* @__PURE__ */ _({
|
|
5
5
|
__name: "RequestSidebarItemMenu",
|
|
6
6
|
props: {
|
|
7
7
|
item: {}
|
|
8
8
|
},
|
|
9
9
|
setup(d) {
|
|
10
|
-
const l = d, { createExampleFromRequest: u, requestMutators: p } =
|
|
10
|
+
const l = d, { createExampleFromRequest: u, requestMutators: p } = D(), f = () => {
|
|
11
11
|
if (!("summary" in l.item)) return;
|
|
12
|
-
const
|
|
12
|
+
const o = u(l.item);
|
|
13
13
|
p.edit(l.item.uid, "childUids", [
|
|
14
14
|
...l.item.childUids,
|
|
15
|
-
|
|
15
|
+
o.uid
|
|
16
16
|
]);
|
|
17
17
|
}, x = h(() => "summary" in l.item);
|
|
18
|
-
return (
|
|
18
|
+
return (o, r) => (c(), m(e(k), { teleport: "#scalar-client" }, {
|
|
19
19
|
items: s(() => [
|
|
20
|
-
x.value ? (c(), m(e(
|
|
20
|
+
x.value ? (c(), m(e(a), {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "flex !gap-2",
|
|
23
23
|
onClick: f
|
|
24
24
|
}, {
|
|
25
25
|
default: s(() => [
|
|
26
26
|
t(e(i), {
|
|
27
|
-
class: "inline-flex
|
|
28
|
-
icon: "
|
|
27
|
+
class: "inline-flex",
|
|
28
|
+
icon: "Add",
|
|
29
29
|
size: "sm"
|
|
30
30
|
}),
|
|
31
31
|
v
|
|
32
32
|
]),
|
|
33
33
|
_: 1
|
|
34
|
-
})) :
|
|
35
|
-
t(e(
|
|
34
|
+
})) : g("", !0),
|
|
35
|
+
t(e(a), { class: "flex !gap-2" }, {
|
|
36
36
|
default: s(() => [
|
|
37
37
|
t(e(i), {
|
|
38
|
-
class: "inline-flex
|
|
38
|
+
class: "inline-flex",
|
|
39
39
|
icon: "Edit",
|
|
40
40
|
size: "sm"
|
|
41
41
|
}),
|
|
@@ -43,10 +43,10 @@ const v = /* @__PURE__ */ a("span", null, "Add Example", -1), w = /* @__PURE__ *
|
|
|
43
43
|
]),
|
|
44
44
|
_: 1
|
|
45
45
|
}),
|
|
46
|
-
t(e(
|
|
46
|
+
t(e(a), { class: "flex !gap-2" }, {
|
|
47
47
|
default: s(() => [
|
|
48
48
|
t(e(i), {
|
|
49
|
-
class: "inline-flex
|
|
49
|
+
class: "inline-flex",
|
|
50
50
|
icon: "Duplicate",
|
|
51
51
|
size: "sm"
|
|
52
52
|
}),
|
|
@@ -55,10 +55,10 @@ const v = /* @__PURE__ */ a("span", null, "Add Example", -1), w = /* @__PURE__ *
|
|
|
55
55
|
_: 1
|
|
56
56
|
}),
|
|
57
57
|
t(e(E)),
|
|
58
|
-
t(e(
|
|
58
|
+
t(e(a), { class: "flex !gap-2" }, {
|
|
59
59
|
default: s(() => [
|
|
60
60
|
t(e(i), {
|
|
61
|
-
class: "inline-flex
|
|
61
|
+
class: "inline-flex",
|
|
62
62
|
icon: "Trash",
|
|
63
63
|
size: "sm"
|
|
64
64
|
}),
|
|
@@ -72,7 +72,7 @@ const v = /* @__PURE__ */ a("span", null, "Add Example", -1), w = /* @__PURE__ *
|
|
|
72
72
|
class: "z-10 hover:bg-b-3 transition-none p-1 group-hover:flex ui-open:flex absolute left-0 hidden -translate-x-full -ml-1",
|
|
73
73
|
size: "sm",
|
|
74
74
|
variant: "ghost",
|
|
75
|
-
onClick: r[0] || (r[0] =
|
|
75
|
+
onClick: r[0] || (r[0] = z(() => {
|
|
76
76
|
}, ["stop"]))
|
|
77
77
|
}, {
|
|
78
78
|
default: s(() => [
|
|
@@ -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;;AA+NxC,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,15 +35,15 @@ 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
|
+
}), _ = 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
|
+
}), k = ["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-2 rotate-180
|
|
46
|
+
class: "text-c-3 mr-2 rotate-180",
|
|
47
47
|
icon: "ExternalLink",
|
|
48
48
|
size: "sm"
|
|
49
49
|
}),
|
|
@@ -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: k,
|
|
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: _.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.24",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -111,16 +111,16 @@
|
|
|
111
111
|
"nanoid": "^5.0.7",
|
|
112
112
|
"pretty-bytes": "^6.1.1",
|
|
113
113
|
"pretty-ms": "^8.0.0",
|
|
114
|
-
"vue": "^3.4.
|
|
114
|
+
"vue": "^3.4.29",
|
|
115
115
|
"vue-router": "^4.3.0",
|
|
116
116
|
"zod": "^3.22.4",
|
|
117
|
-
"@scalar/components": "0.12.
|
|
117
|
+
"@scalar/components": "0.12.15",
|
|
118
118
|
"@scalar/object-utils": "1.1.4",
|
|
119
|
+
"@scalar/themes": "0.9.14",
|
|
119
120
|
"@scalar/draggable": "0.1.3",
|
|
120
|
-
"@scalar/oas-utils": "0.2.13",
|
|
121
|
-
"@scalar/themes": "0.9.13",
|
|
122
121
|
"@scalar/use-codemirror": "0.11.6",
|
|
123
122
|
"@scalar/use-toasts": "0.7.4",
|
|
123
|
+
"@scalar/oas-utils": "0.2.14",
|
|
124
124
|
"@scalar/use-tooltip": "1.0.2"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|