@scalar/api-client 2.0.45 → 2.0.47
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 +27 -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 +16 -16
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +24 -25
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +23 -23
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +6 -6
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +10 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +5 -67
- package/dist/components/HttpMethod/HttpMethod.vue2.js +61 -2
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +44 -42
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +22 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
- package/dist/components/SubpageHeader.vue.js +2 -2
- package/dist/components/SubpageHeader.vue2.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +46 -43
- package/dist/layouts/App/create-api-client-app.d.ts +158 -81
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +316 -162
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +159 -83
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +18 -19
- package/dist/libs/event-busses/command-palette.d.ts.map +1 -0
- package/dist/libs/{eventBusses/executeRequestBus.d.ts → event-busses/execute-requestBus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.d.ts +34 -0
- package/dist/libs/event-busses/hot-key.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.js +25 -0
- package/dist/libs/event-busses/index.d.ts +5 -0
- package/dist/libs/event-busses/index.d.ts.map +1 -0
- package/dist/libs/event-busses/index.js +12 -0
- package/dist/libs/{eventBusses/requestStatusBus.d.ts → event-busses/request-status-bus.d.ts} +1 -1
- package/dist/libs/event-busses/request-status-bus.d.ts.map +1 -0
- package/dist/libs/index.d.ts +1 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +19 -13
- package/dist/store/workspace.d.ts +316 -162
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -15
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +114 -55
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +21 -20
- 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 +118 -118
- 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 +20 -20
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +19 -19
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +13 -13
- package/package.json +10 -10
- package/dist/libs/eventBusses/command-palette.d.ts.map +0 -1
- package/dist/libs/eventBusses/executeRequestBus.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.d.ts +0 -3
- package/dist/libs/eventBusses/index.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.js +0 -6
- package/dist/libs/eventBusses/requestStatusBus.d.ts.map +0 -1
- /package/dist/libs/{eventBusses → event-busses}/command-palette.d.ts +0 -0
- /package/dist/libs/{eventBusses → event-busses}/command-palette.js +0 -0
- /package/dist/libs/{eventBusses/executeRequestBus.js → event-busses/execute-requestBus.js} +0 -0
- /package/dist/libs/{eventBusses/requestStatusBus.js → event-busses/request-status-bus.js} +0 -0
|
@@ -1,4 +1,63 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as S, computed as s, openBlock as p, createBlock as g, unref as t, withCtx as y, createElementVNode as l, normalizeClass as r, toDisplayString as c, createElementBlock as q } from "vue";
|
|
2
|
+
import { ScalarListbox as w } from "@scalar/components";
|
|
3
|
+
import { getRequest as k, REQUEST_METHODS as x } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { cva as B, cx as m } from "cva";
|
|
5
|
+
const O = /* @__PURE__ */ S({
|
|
6
|
+
__name: "HttpMethod",
|
|
7
|
+
props: {
|
|
8
|
+
isSquare: { type: Boolean, default: !1 },
|
|
9
|
+
method: {},
|
|
10
|
+
isEditable: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
emits: ["change"],
|
|
13
|
+
setup(f, { emit: b }) {
|
|
14
|
+
const i = f, h = b, o = s(() => k(i.method)), n = Object.entries(x).map(
|
|
15
|
+
([e, { short: a }]) => ({
|
|
16
|
+
id: e,
|
|
17
|
+
label: e.charAt(0) + e.toLowerCase().slice(1)
|
|
18
|
+
})
|
|
19
|
+
), d = s({
|
|
20
|
+
get: () => n.find(({ id: e }) => e === i.method),
|
|
21
|
+
set: (e) => (e == null ? void 0 : e.id) && h("change", e.id)
|
|
22
|
+
}), u = B({
|
|
23
|
+
base: "text-center font-code text-3xs justify-center items-center flex",
|
|
24
|
+
variants: {
|
|
25
|
+
isSquare: {
|
|
26
|
+
true: "px-2.5 whitespace-nowrap font-bold border-r h-fit m-auto",
|
|
27
|
+
false: "rounded-full"
|
|
28
|
+
},
|
|
29
|
+
isEditable: {
|
|
30
|
+
true: "px-0 http-bg-gradient rounded-md border-1/2 border-r-1/2",
|
|
31
|
+
false: "cusor-pointer"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}), v = s(() => o.value.short);
|
|
35
|
+
return (e, a) => e.isEditable ? (p(), g(t(w), {
|
|
36
|
+
key: 0,
|
|
37
|
+
modelValue: d.value,
|
|
38
|
+
"onUpdate:modelValue": a[0] || (a[0] = (E) => d.value = E),
|
|
39
|
+
options: t(n)
|
|
40
|
+
}, {
|
|
41
|
+
default: y(() => [
|
|
42
|
+
l("div", {
|
|
43
|
+
class: r(["h-full", { "pointer-events-none": !e.isEditable }])
|
|
44
|
+
}, [
|
|
45
|
+
l("button", {
|
|
46
|
+
class: r(["relative h-full", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
47
|
+
type: "button"
|
|
48
|
+
}, [
|
|
49
|
+
l("span", null, c(v.value), 1)
|
|
50
|
+
], 2)
|
|
51
|
+
], 2)
|
|
52
|
+
]),
|
|
53
|
+
_: 1
|
|
54
|
+
}, 8, ["modelValue", "options"])) : (p(), q("div", {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: r(["relative gap-1 whitespace-nowrap", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
57
|
+
type: "button"
|
|
58
|
+
}, c(o.value.short), 3));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
2
61
|
export {
|
|
3
|
-
|
|
62
|
+
O as default
|
|
4
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AA2PA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBAUb,UAAU;;gBAAV,UAAU;;AA4WxB,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,7 +1,7 @@
|
|
|
1
1
|
import o from "./SearchModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-905c8bd2"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarModal as
|
|
4
|
-
import { useMagicKeys as
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as A, ref as i, watch as M, computed as y, openBlock as w, createBlock as B, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as D, Fragment as N, renderList as T, createSlots as W, pushScopeId as L, popScopeId as U } from "vue";
|
|
2
|
+
import { useWorkspace as H } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarModal as K, ScalarSearchInput as P, ScalarSearchResultList as j, ScalarSearchResultItem as z } from "@scalar/components";
|
|
4
|
+
import { useMagicKeys as G, whenever as g } from "@vueuse/core";
|
|
5
|
+
import J from "fuse.js";
|
|
6
|
+
import { useRouter as O } from "vue-router";
|
|
7
|
+
import Q from "../HttpMethod/HttpMethod.vue.js";
|
|
8
|
+
const X = (u) => (L("data-v-905c8bd2"), u = u(), U(), u), Y = /* @__PURE__ */ X(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
|
|
9
9
|
/* @__PURE__ */ h("span", null, "↑↓ Navigate"),
|
|
10
10
|
/* @__PURE__ */ h("span", null, "⏎ Select")
|
|
11
|
-
], -1)),
|
|
11
|
+
], -1)), re = /* @__PURE__ */ A({
|
|
12
12
|
__name: "SearchModal",
|
|
13
13
|
props: {
|
|
14
14
|
modalState: {}
|
|
15
15
|
},
|
|
16
16
|
setup(u) {
|
|
17
|
-
const c = u,
|
|
17
|
+
const c = u, E = O(), { activeWorkspaceRequests: I } = H(), v = G(), l = i([]), f = i([]), o = i(0), s = i(""), V = i(null), S = new J(l.value, {
|
|
18
18
|
keys: ["title", "description", "body"]
|
|
19
|
-
}),
|
|
19
|
+
}), F = () => {
|
|
20
|
+
s.value = "", o.value = 0, f.value = [];
|
|
21
|
+
}, _ = (e) => {
|
|
22
|
+
l.value = e.map((a) => ({
|
|
23
|
+
id: a.uid,
|
|
24
|
+
title: a.summary ?? a.method,
|
|
25
|
+
description: a.description ?? "",
|
|
26
|
+
httpVerb: a.method,
|
|
27
|
+
path: a.path
|
|
28
|
+
})), S.setCollection(l.value);
|
|
29
|
+
}, $ = () => {
|
|
20
30
|
o.value = 0, f.value = S.search(s.value);
|
|
21
31
|
};
|
|
22
|
-
|
|
32
|
+
M(
|
|
23
33
|
() => c.modalState.open,
|
|
24
34
|
(e) => {
|
|
25
35
|
var a;
|
|
@@ -27,35 +37,27 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
27
37
|
l.value.length > 0 && (l.value = [], S.setCollection(l.value));
|
|
28
38
|
return;
|
|
29
39
|
}
|
|
30
|
-
(a =
|
|
40
|
+
(a = V.value) == null || a.focus(), F(), _(I.value);
|
|
31
41
|
}
|
|
32
|
-
),
|
|
33
|
-
|
|
42
|
+
), M(
|
|
43
|
+
I,
|
|
34
44
|
(e) => {
|
|
35
|
-
|
|
36
|
-
l.value.push({
|
|
37
|
-
id: a.uid,
|
|
38
|
-
title: a.summary ?? a.method,
|
|
39
|
-
description: a.description ?? "",
|
|
40
|
-
httpVerb: a.method,
|
|
41
|
-
path: a.path
|
|
42
|
-
});
|
|
43
|
-
}), S.setCollection(l.value);
|
|
45
|
+
_(e);
|
|
44
46
|
},
|
|
45
47
|
{ immediate: !0 }
|
|
46
48
|
);
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
+
function b(e) {
|
|
50
|
+
E.push(e.item.id), c.modalState.hide();
|
|
49
51
|
}
|
|
50
|
-
const k =
|
|
52
|
+
const k = y(
|
|
51
53
|
() => n.value[o.value]
|
|
52
|
-
), n =
|
|
54
|
+
), n = y(
|
|
53
55
|
() => s.value.length === 0 ? l.value.map((e) => ({
|
|
54
56
|
item: e
|
|
55
57
|
})) : f.value
|
|
56
58
|
);
|
|
57
59
|
return g(v.enter, () => {
|
|
58
|
-
c.modalState.open && window &&
|
|
60
|
+
c.modalState.open && window && b(k.value);
|
|
59
61
|
}), g(v.ArrowDown, () => {
|
|
60
62
|
var e;
|
|
61
63
|
c.modalState.open && window && (o.value < n.value.length - 1 ? o.value++ : o.value = 0, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
|
|
@@ -68,23 +70,23 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
68
70
|
behavior: "smooth",
|
|
69
71
|
block: "center"
|
|
70
72
|
}));
|
|
71
|
-
}), (e, a) => (w(),
|
|
73
|
+
}), (e, a) => (w(), B(d(K), {
|
|
72
74
|
state: e.modalState,
|
|
73
75
|
variant: "search"
|
|
74
76
|
}, {
|
|
75
77
|
default: r(() => [
|
|
76
78
|
h("div", {
|
|
77
79
|
ref_key: "searchModalRef",
|
|
78
|
-
ref:
|
|
80
|
+
ref: V,
|
|
79
81
|
class: "ref-search-container"
|
|
80
82
|
}, [
|
|
81
|
-
R(d(
|
|
83
|
+
R(d(P), {
|
|
82
84
|
modelValue: s.value,
|
|
83
85
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
|
|
84
|
-
onInput:
|
|
86
|
+
onInput: $
|
|
85
87
|
}, null, 8, ["modelValue"])
|
|
86
88
|
], 512),
|
|
87
|
-
R(d(
|
|
89
|
+
R(d(j), {
|
|
88
90
|
class: "ref-search-results custom-scroll",
|
|
89
91
|
noResults: !n.value.length
|
|
90
92
|
}, {
|
|
@@ -92,16 +94,16 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
92
94
|
m(p(s.value), 1)
|
|
93
95
|
]),
|
|
94
96
|
default: r(() => [
|
|
95
|
-
(w(!0),
|
|
97
|
+
(w(!0), D(N, null, T(n.value, (t, C) => (w(), B(d(z), {
|
|
96
98
|
id: `#search-modal-${t.item.id}`,
|
|
97
99
|
key: t.refIndex,
|
|
98
|
-
active: o.value ===
|
|
100
|
+
active: o.value === C,
|
|
99
101
|
icon: "Terminal",
|
|
100
|
-
onClick: (x) =>
|
|
101
|
-
onFocus: (x) => o.value =
|
|
102
|
-
},
|
|
102
|
+
onClick: (x) => b(t),
|
|
103
|
+
onFocus: (x) => o.value = C
|
|
104
|
+
}, W({
|
|
103
105
|
addon: r(() => [
|
|
104
|
-
R(d(
|
|
106
|
+
R(d(Q), {
|
|
105
107
|
method: t.item.httpVerb ?? "get"
|
|
106
108
|
}, null, 8, ["method"])
|
|
107
109
|
]),
|
|
@@ -127,12 +129,12 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
127
129
|
]),
|
|
128
130
|
_: 1
|
|
129
131
|
}, 8, ["noResults"]),
|
|
130
|
-
|
|
132
|
+
Y
|
|
131
133
|
]),
|
|
132
134
|
_: 1
|
|
133
135
|
}, 8, ["state"]));
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
138
|
export {
|
|
137
|
-
|
|
139
|
+
re as default
|
|
138
140
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAmLA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SideNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ed782b2b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { defineComponent as _, openBlock as r, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
import { ROUTES as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as _, openBlock as r, createElementBlock as a, createVNode as e, createElementVNode as t, Fragment as f, renderList as d, unref as n, withCtx as p, createTextVNode as u, toDisplayString as g } from "vue";
|
|
2
|
+
import x from "../DarkModeToggle/DarkModeIconToggle.vue.js";
|
|
3
|
+
import { ROUTES as h } from "../../constants.js";
|
|
4
|
+
import { useRouter as v } from "vue-router";
|
|
5
|
+
import N from "./SideHelp.vue.js";
|
|
6
6
|
import y from "./SideNavLink.vue.js";
|
|
7
7
|
import S from "./WorkspaceProfileIcon.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
const $ = {
|
|
10
10
|
"aria-label": "Side Navigation",
|
|
11
|
-
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative",
|
|
11
|
+
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region",
|
|
12
12
|
role: "navigation"
|
|
13
|
-
}, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center" }, V = { class: "flex items-center" }, j = /* @__PURE__ */ _({
|
|
13
|
+
}, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center no-drag-region" }, V = { class: "flex items-center no-drag-region" }, j = /* @__PURE__ */ _({
|
|
14
14
|
__name: "SideNav",
|
|
15
15
|
setup(w) {
|
|
16
|
-
const { currentRoute:
|
|
17
|
-
return (B, C) => (r(),
|
|
18
|
-
e(S),
|
|
16
|
+
const { currentRoute: s } = v();
|
|
17
|
+
return (B, C) => (r(), a("nav", $, [
|
|
18
|
+
e(S, { class: "no-drag-region" }),
|
|
19
19
|
t("ul", k, [
|
|
20
|
-
(r(!0),
|
|
21
|
-
var
|
|
22
|
-
return r(),
|
|
20
|
+
(r(!0), a(f, null, d(n(h), ({ icon: c, name: o, prettyName: l }, m) => {
|
|
21
|
+
var i;
|
|
22
|
+
return r(), a("li", {
|
|
23
|
+
key: m,
|
|
24
|
+
class: "no-drag-region"
|
|
25
|
+
}, [
|
|
23
26
|
e(y, {
|
|
24
|
-
active: (
|
|
25
|
-
icon:
|
|
27
|
+
active: (i = n(s).name) == null ? void 0 : i.startsWith(o),
|
|
28
|
+
icon: c,
|
|
26
29
|
name: o,
|
|
27
30
|
prettyName: l
|
|
28
31
|
}, {
|
|
29
|
-
default:
|
|
30
|
-
|
|
32
|
+
default: p(() => [
|
|
33
|
+
u(g(o), 1)
|
|
31
34
|
]),
|
|
32
35
|
_: 2
|
|
33
36
|
}, 1032, ["active", "icon", "name", "prettyName"])
|
|
@@ -36,10 +39,10 @@ const $ = {
|
|
|
36
39
|
]),
|
|
37
40
|
t("ul", E, [
|
|
38
41
|
t("li", R, [
|
|
39
|
-
e(
|
|
42
|
+
e(N)
|
|
40
43
|
]),
|
|
41
44
|
t("li", V, [
|
|
42
|
-
e(
|
|
45
|
+
e(x)
|
|
43
46
|
])
|
|
44
47
|
])
|
|
45
48
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":";cA4EY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;cANb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;AA0JzB,wBAOG;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,7 +1,7 @@
|
|
|
1
1
|
import t from "./SidebarListElement.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-e9dbd857"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -22,7 +22,7 @@ const C = {
|
|
|
22
22
|
const d = v("router-link");
|
|
23
23
|
return o(), n("li", null, [
|
|
24
24
|
t(d, {
|
|
25
|
-
class: l(["text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
|
|
25
|
+
class: l(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
|
|
26
26
|
exactActiveClass: "active-link",
|
|
27
27
|
to: `${e.variable.uid}`,
|
|
28
28
|
onClick: a[0] || (a[0] = f((b) => p(b, e.variable.uid), ["prevent"]))
|
|
@@ -4,6 +4,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
4
4
|
name: string;
|
|
5
5
|
isDefault: boolean;
|
|
6
6
|
};
|
|
7
|
+
warningMessage?: string;
|
|
7
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
9
|
delete: (id: string) => void;
|
|
9
10
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
@@ -12,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
13
|
name: string;
|
|
13
14
|
isDefault: boolean;
|
|
14
15
|
};
|
|
16
|
+
warningMessage?: string;
|
|
15
17
|
}>>> & {
|
|
16
18
|
onDelete?: ((id: string) => any) | undefined;
|
|
17
19
|
}, {}, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAsFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;cALb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;AA6LzB,wBAOG;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,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useClipboard as
|
|
5
|
-
const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
1
|
+
import { defineComponent as w, ref as M, openBlock as l, createElementBlock as c, Fragment as k, createElementVNode as m, unref as a, createVNode as i, withModifiers as y, createCommentVNode as u, withCtx as N, createBlock as $ } from "vue";
|
|
2
|
+
import x from "./Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { useModal as D, ScalarIcon as d, ScalarModal as S } from "@scalar/components";
|
|
4
|
+
import { useClipboard as A } from "../../hooks/useClipboard.js";
|
|
5
|
+
const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, I = /* @__PURE__ */ w({
|
|
6
6
|
__name: "SidebarListElementActions",
|
|
7
7
|
props: {
|
|
8
|
-
variable: {}
|
|
8
|
+
variable: {},
|
|
9
|
+
warningMessage: {}
|
|
9
10
|
},
|
|
10
11
|
emits: ["delete"],
|
|
11
12
|
setup(p, { emit: v }) {
|
|
12
|
-
const { variable: b } = p, f = v, t =
|
|
13
|
+
const { variable: b } = p, f = v, t = M({ action: "None", name: "" }), n = D(), { copyToClipboard: g } = A();
|
|
13
14
|
function C(e) {
|
|
14
15
|
t.value = { action: e, name: b.name }, n.show();
|
|
15
16
|
}
|
|
16
17
|
function r() {
|
|
17
18
|
n.hide(), t.value = { action: "None", name: "" };
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function h(e) {
|
|
20
21
|
f("delete", e), r();
|
|
21
22
|
}
|
|
22
|
-
return (e, o) => (l(), c(
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
return (e, o) => (l(), c(k, null, [
|
|
24
|
+
m("div", B, [
|
|
25
|
+
m("button", {
|
|
25
26
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
|
|
26
27
|
type: "button",
|
|
27
|
-
onClick: o[0] || (o[0] = (s) => a(
|
|
28
|
+
onClick: o[0] || (o[0] = (s) => a(g)(e.variable.name))
|
|
28
29
|
}, [
|
|
29
30
|
i(a(d), {
|
|
30
31
|
class: "h-3 w-3",
|
|
31
32
|
icon: "Clipboard"
|
|
32
33
|
})
|
|
33
34
|
]),
|
|
34
|
-
e.variable.isDefault ?
|
|
35
|
+
e.variable.isDefault ? u("", !0) : (l(), c("button", {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
|
|
37
38
|
type: "button",
|
|
38
|
-
onClick: o[1] || (o[1] =
|
|
39
|
+
onClick: o[1] || (o[1] = y((s) => C(
|
|
39
40
|
"Delete"
|
|
40
41
|
/* Delete */
|
|
41
42
|
), ["prevent"]))
|
|
@@ -46,19 +47,19 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
46
47
|
})
|
|
47
48
|
]))
|
|
48
49
|
]),
|
|
49
|
-
i(a(
|
|
50
|
+
i(a(S), {
|
|
50
51
|
size: "sm",
|
|
51
52
|
state: a(n),
|
|
52
53
|
title: `${t.value.action} ${t.value.name}`
|
|
53
54
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
t.value.action === "Delete" ? (l(), $(
|
|
55
|
+
default: N(() => [
|
|
56
|
+
t.value.action === "Delete" ? (l(), $(x, {
|
|
56
57
|
key: 0,
|
|
57
58
|
variableName: t.value.name,
|
|
58
|
-
warningMessage:
|
|
59
|
+
warningMessage: e.warningMessage,
|
|
59
60
|
onClose: r,
|
|
60
|
-
onDelete: o[2] || (o[2] = (s) =>
|
|
61
|
-
}, null, 8, ["variableName"])) :
|
|
61
|
+
onDelete: o[2] || (o[2] = (s) => h(e.variable.uid))
|
|
62
|
+
}, null, 8, ["variableName", "warningMessage"])) : u("", !0)
|
|
62
63
|
]),
|
|
63
64
|
_: 1
|
|
64
65
|
}, 8, ["state", "title"])
|
|
@@ -66,5 +67,5 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
I as default
|
|
70
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./SubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8a69ee40"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as a, resolveComponent as d, openBlock as l, createElementBlock as i, createElementVNode as r, createVNode as t, unref as o, withCtx as p, renderSlot as u, pushScopeId as m, popScopeId as f } from "vue";
|
|
2
2
|
import { ScalarIcon as _ } from "@scalar/components";
|
|
3
3
|
import { useRoute as h } from "vue-router";
|
|
4
|
-
const b = (e) => (m("data-v-
|
|
4
|
+
const b = (e) => (m("data-v-8a69ee40"), e = e(), f(), e), v = { class: "flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden" }, x = { class: "lg:min-h-header items-center w-full p-1 t-app__top-container flex items-center border-b-1/2" }, k = /* @__PURE__ */ b(() => /* @__PURE__ */ r("span", { class: "leading-none" }, "Back To Requests", -1)), I = /* @__PURE__ */ a({
|
|
5
5
|
__name: "SubpageHeader",
|
|
6
6
|
setup(e) {
|
|
7
7
|
const n = h();
|
|
@@ -10,7 +10,7 @@ const b = (e) => (m("data-v-a15baa95"), e = e(), f(), e), v = { class: "flex fle
|
|
|
10
10
|
return l(), i("div", v, [
|
|
11
11
|
r("div", x, [
|
|
12
12
|
t(c, {
|
|
13
|
-
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-
|
|
13
|
+
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-2 rounded cursor-pointer gap-0.5 active:text-c-1 no-underline dark:hover:bg-b-2",
|
|
14
14
|
to: `/workspace/${o(n).params.workspace}/request/default`
|
|
15
15
|
}, {
|
|
16
16
|
default: p(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";AAiVA,wBAKG"}
|
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import { addScalarClassesToHeadless as
|
|
6
|
-
import { LS_KEYS as
|
|
1
|
+
import { defineComponent as _, onMounted as i, watchEffect as v, onBeforeMount as y, onBeforeUnmount as h, computed as k, openBlock as l, createElementBlock as d, Fragment as g, createElementVNode as p, createVNode as a, unref as n, withCtx as w, createBlock as f, KeepAlive as S, resolveDynamicComponent as x, createCommentVNode as T } from "vue";
|
|
2
|
+
import C from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
+
import L from "../../components/TopNav/TopNav.vue.js";
|
|
4
|
+
import { useWorkspace as B } from "../../store/workspace.js";
|
|
5
|
+
import { addScalarClassesToHeadless as E } from "@scalar/components";
|
|
6
|
+
import { LS_KEYS as K } from "@scalar/object-utils/mutator-record";
|
|
7
7
|
import { getThemeStyles as M } from "@scalar/themes";
|
|
8
8
|
import { ScalarToasts as W } from "@scalar/use-toasts";
|
|
9
9
|
import { RouterView as A } from "vue-router";
|
|
10
|
-
import { loadAllResources as
|
|
11
|
-
import
|
|
12
|
-
import { useDarkModeState as
|
|
13
|
-
|
|
10
|
+
import { loadAllResources as D } from "../../libs/local-storage.js";
|
|
11
|
+
import N from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
12
|
+
import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
|
|
13
|
+
import { handleHotKeyDown as H } from "../../libs/event-busses/hot-key.js";
|
|
14
|
+
const V = ["innerHTML"], F = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "flex min-h-0 flex-1"
|
|
16
|
-
},
|
|
17
|
+
}, O = { class: "flex flex-1 flex-col min-w-0" }, ee = /* @__PURE__ */ _({
|
|
17
18
|
__name: "ApiClientApp",
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
document.body.classList.toggle("dark-mode",
|
|
19
|
+
setup(P) {
|
|
20
|
+
i(() => {
|
|
21
|
+
v(() => {
|
|
22
|
+
document.body.classList.toggle("dark-mode", c.value), document.body.classList.toggle("light-mode", !c.value);
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
|
-
const { isDark:
|
|
25
|
-
|
|
26
|
-
if (localStorage.getItem(
|
|
27
|
-
const
|
|
28
|
-
let
|
|
25
|
+
const { isDark: c } = b(), r = B();
|
|
26
|
+
y(async () => {
|
|
27
|
+
if (localStorage.getItem(K.WORKSPACE)) {
|
|
28
|
+
const o = {};
|
|
29
|
+
let s = 0, t = 0, e = "";
|
|
29
30
|
for (e in localStorage)
|
|
30
|
-
Object.prototype.hasOwnProperty.call(localStorage, e) && (
|
|
31
|
-
|
|
31
|
+
Object.prototype.hasOwnProperty.call(localStorage, e) && (t = (localStorage[e].length + e.length) * 2, s += t, o[e] = (t / 1024).toFixed(2) + " KB");
|
|
32
|
+
o.Total = (s / 1024).toFixed(2) + " KB", console.table(o), D(r);
|
|
32
33
|
} else
|
|
33
|
-
|
|
34
|
+
r.workspaceMutators.add({
|
|
34
35
|
uid: "default",
|
|
35
36
|
name: "Workspace",
|
|
36
37
|
proxyUrl: "https://proxy.scalar.com"
|
|
37
38
|
});
|
|
38
|
-
|
|
39
|
+
E();
|
|
39
40
|
});
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const m = (o) => H(o);
|
|
42
|
+
i(() => window.addEventListener("keydown", m)), h(() => window.removeEventListener("keydown", m));
|
|
43
|
+
const u = k(
|
|
44
|
+
() => r.activeWorkspace.value && `<style>
|
|
45
|
+
${M(r.activeWorkspace.value.themeId, {
|
|
43
46
|
fonts: !0
|
|
44
47
|
})}</style>`
|
|
45
48
|
);
|
|
46
|
-
return (
|
|
47
|
-
var
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
a(
|
|
51
|
-
(
|
|
52
|
-
a(
|
|
53
|
-
a(
|
|
54
|
-
|
|
55
|
-
a(
|
|
56
|
-
default:
|
|
57
|
-
(
|
|
58
|
-
(
|
|
49
|
+
return (o, s) => {
|
|
50
|
+
var t;
|
|
51
|
+
return l(), d(g, null, [
|
|
52
|
+
p("div", { innerHTML: u.value }, null, 8, V),
|
|
53
|
+
a(L),
|
|
54
|
+
(t = n(r).activeWorkspace.value) != null && t.uid ? (l(), d("main", F, [
|
|
55
|
+
a(C),
|
|
56
|
+
a(n(N)),
|
|
57
|
+
p("div", O, [
|
|
58
|
+
a(n(A), null, {
|
|
59
|
+
default: w(({ Component: e }) => [
|
|
60
|
+
(l(), f(S, null, [
|
|
61
|
+
(l(), f(x(e)))
|
|
59
62
|
], 1024))
|
|
60
63
|
]),
|
|
61
64
|
_: 1
|
|
62
65
|
})
|
|
63
66
|
])
|
|
64
|
-
])) :
|
|
65
|
-
a(
|
|
67
|
+
])) : T("", !0),
|
|
68
|
+
a(n(W))
|
|
66
69
|
], 64);
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
73
|
export {
|
|
71
|
-
|
|
74
|
+
ee as default
|
|
72
75
|
};
|