@scalar/api-client 2.2.0 → 2.2.1
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 +19 -0
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
- package/dist/components/SideNav/SideNav.vue.js +4 -4
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +165 -5
- package/dist/components/TopNav/TopNav.vue2.js +2 -165
- 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 +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +39 -36
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/style.css +1 -1
- package/dist/tailwind/desktop-variants.d.ts +18 -0
- package/dist/tailwind/desktop-variants.d.ts.map +1 -0
- 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 +8 -8
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +6 -6
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5da67b2: style: enhances responsive alignment layout
|
|
8
|
+
- 6b0d817: style: updates response headers and copy button ui"
|
|
9
|
+
- 6b0d817: fix: pretty print response body content
|
|
10
|
+
- 6c843e6: feat(api-client): polish non-macos layouts
|
|
11
|
+
- 1b06f64: fix(api-reference): conflicting styles with bulma, galaxy bug on docs
|
|
12
|
+
- 8066c8c: fix: displays empty state new request button in desktop only
|
|
13
|
+
- Updated dependencies [324834d]
|
|
14
|
+
- Updated dependencies [1b06f64]
|
|
15
|
+
- Updated dependencies [6dd7eda]
|
|
16
|
+
- @scalar/components@0.12.74
|
|
17
|
+
- @scalar/themes@0.9.50
|
|
18
|
+
- @scalar/oas-utils@0.2.79
|
|
19
|
+
- @scalar/use-codemirror@0.11.41
|
|
20
|
+
- @scalar/use-hooks@0.1.3
|
|
21
|
+
|
|
3
22
|
## 2.2.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4d3290fc"]]);
|
|
5
5
|
export {
|
|
6
6
|
d as default
|
|
7
7
|
};
|
|
@@ -124,7 +124,7 @@ const te = {
|
|
|
124
124
|
]),
|
|
125
125
|
n(Y, { open: f }, null, 8, ["open"]),
|
|
126
126
|
n(a(Q), {
|
|
127
|
-
class: "relative h-auto shrink-0 overflow-hidden pl-2 pr-2.5 py-1 font-bold",
|
|
127
|
+
class: "relative h-auto shrink-0 overflow-hidden !pl-2 !pr-2.5 !py-1 font-bold",
|
|
128
128
|
disabled: s.value,
|
|
129
129
|
onClick: b
|
|
130
130
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as h, openBlock as o, createElementBlock as r, normalizeClass as p, unref as e, createVNode as t, withCtx as n, createElementVNode as i, Fragment as
|
|
1
|
+
import { defineComponent as h, openBlock as o, createElementBlock as r, normalizeClass as p, unref as e, createVNode as t, withCtx as n, createElementVNode as i, Fragment as v, renderList as w, createTextVNode as d, toDisplayString as y, createCommentVNode as b } from "vue";
|
|
2
2
|
import { ROUTES as k } from "../../constants.js";
|
|
3
3
|
import { ScalarIcon as N } from "@scalar/components";
|
|
4
4
|
import { useRouter as S } from "vue-router";
|
|
@@ -16,7 +16,7 @@ const B = { class: "flex items-center" }, E = { class: "flex items-center" }, L
|
|
|
16
16
|
const { currentRoute: m } = S(), { layout: s } = j();
|
|
17
17
|
return ($, l) => (o(), r("nav", {
|
|
18
18
|
"aria-label": "App Navigation",
|
|
19
|
-
class: p(["flex items-center justify-center sm:justify-between gap-1.5 app-drag-region", e(s) === "web" ? "border h-12" : "sm:flex-col px-2
|
|
19
|
+
class: p(["flex items-center justify-center sm:justify-between gap-1.5 app-drag-region", e(s) === "web" ? "border h-12" : "sm:flex-col px-2 pb-2"]),
|
|
20
20
|
role: "navigation"
|
|
21
21
|
}, [
|
|
22
22
|
t(u, { class: "app-no-drag-region" }, {
|
|
@@ -33,7 +33,7 @@ const B = { class: "flex items-center" }, E = { class: "flex items-center" }, L
|
|
|
33
33
|
size: "xl"
|
|
34
34
|
})
|
|
35
35
|
], 2),
|
|
36
|
-
(o(!0), r(
|
|
36
|
+
(o(!0), r(v, null, w(e(k).filter(
|
|
37
37
|
(a) => a.name !== "settings"
|
|
38
38
|
), ({ icon: a, name: c, prettyName: g }, x) => {
|
|
39
39
|
var f;
|
|
@@ -44,7 +44,7 @@ const B = { class: "flex items-center" }, E = { class: "flex items-center" }, L
|
|
|
44
44
|
name: c
|
|
45
45
|
}, {
|
|
46
46
|
default: n(() => [
|
|
47
|
-
d(
|
|
47
|
+
d(y(g), 1)
|
|
48
48
|
]),
|
|
49
49
|
_: 2
|
|
50
50
|
}, 1032, ["active", "icon", "name"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAsPA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAgaF,wBAOG"}
|
|
@@ -1,7 +1,167 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as $, reactive as z, ref as E, computed as M, watch as w, onMounted as j, onBeforeUnmount as B, openBlock as m, createElementBlock as b, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K } from "vue";
|
|
2
|
+
import q from "../ScalarHotkey.vue.js";
|
|
3
|
+
import { ROUTES as F } from "../../constants.js";
|
|
4
|
+
import { useActiveEntities as H } from "../../store/active-entities.js";
|
|
5
|
+
import { ScalarContextMenu as W, ScalarIcon as d, ScalarDropdown as G, ScalarDropdownItem as I } from "@scalar/components";
|
|
6
|
+
import { capitalize as J } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
|
|
8
|
+
import Q from "./TopNavItem.vue.js";
|
|
9
|
+
import { useWorkspace as X } from "../../store/store.js";
|
|
10
|
+
const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, ee = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "h-full w-full overflow-hidden"
|
|
13
|
+
}, ue = /* @__PURE__ */ $({
|
|
14
|
+
__name: "TopNav",
|
|
15
|
+
props: {
|
|
16
|
+
openNewTab: {}
|
|
17
|
+
},
|
|
18
|
+
setup(_) {
|
|
19
|
+
const L = _, { activeRequest: S, router: i } = H(), { events: g } = X(), { copyToClipboard: U } = P(), t = z([{ label: "", path: "", icon: "Add" }]), a = E(0), T = M(() => a.value);
|
|
20
|
+
function k() {
|
|
21
|
+
var o;
|
|
22
|
+
const e = F.find((c) => i.currentRoute.value.name == c.name);
|
|
23
|
+
e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
|
|
24
|
+
label: ((o = S.value) == null ? void 0 : o.summary) || "",
|
|
25
|
+
path: i.currentRoute.value.path,
|
|
26
|
+
icon: e.icon
|
|
27
|
+
} : t[a.value] = {
|
|
28
|
+
label: J(e == null ? void 0 : e.name) || "",
|
|
29
|
+
path: i.currentRoute.value.path,
|
|
30
|
+
icon: e.icon
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function v() {
|
|
34
|
+
i.push(t[a.value].path);
|
|
35
|
+
}
|
|
36
|
+
function p() {
|
|
37
|
+
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, k();
|
|
38
|
+
}
|
|
39
|
+
function r(e) {
|
|
40
|
+
a.value = e, v();
|
|
41
|
+
}
|
|
42
|
+
w(
|
|
43
|
+
() => i.currentRoute.value.path,
|
|
44
|
+
() => {
|
|
45
|
+
k();
|
|
46
|
+
},
|
|
47
|
+
{ immediate: !0 }
|
|
48
|
+
);
|
|
49
|
+
function N(e) {
|
|
50
|
+
t.splice(e, 1), a.value = Math.min(
|
|
51
|
+
a.value,
|
|
52
|
+
t.length - 1
|
|
53
|
+
), v();
|
|
54
|
+
}
|
|
55
|
+
const y = (e) => {
|
|
56
|
+
const o = new URL(window.location.href);
|
|
57
|
+
o.pathname = t[e].path, U(o.toString());
|
|
58
|
+
}, R = (e) => {
|
|
59
|
+
t.splice(0, e), t.splice(1), a.value = 0, v();
|
|
60
|
+
}, C = (e) => {
|
|
61
|
+
if (e) {
|
|
62
|
+
if (e.addTopNav && p(), e.closeTopNav && N(a.value), e.navigateTopNavLeft && r(Math.max(a.value - 1, 0)), e.navigateTopNavRight && r(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
|
|
63
|
+
const o = Number(e.jumpToTab.key) - 1;
|
|
64
|
+
o >= 0 && o < t.length && r(o);
|
|
65
|
+
}
|
|
66
|
+
e.jumpToLastTab && r(t.length - 1);
|
|
67
|
+
}
|
|
68
|
+
}, A = (e) => {
|
|
69
|
+
t.push({
|
|
70
|
+
label: e.name,
|
|
71
|
+
path: e.uid,
|
|
72
|
+
icon: "ExternalLink"
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return w(
|
|
76
|
+
() => L.openNewTab,
|
|
77
|
+
(e) => {
|
|
78
|
+
e && A(e);
|
|
79
|
+
},
|
|
80
|
+
{ immediate: !0 }
|
|
81
|
+
), j(() => g.hotKeys.on(C)), B(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", Y, [
|
|
82
|
+
o[3] || (o[3] = f("div", { class: "absolute inset-0 app-drag-region" }, null, -1)),
|
|
83
|
+
f("div", Z, [
|
|
84
|
+
t.length === 1 ? (m(), b("div", ee, [
|
|
85
|
+
n(l(W), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
86
|
+
trigger: u(() => [
|
|
87
|
+
n(l(d), {
|
|
88
|
+
icon: t[0].icon,
|
|
89
|
+
size: "xs",
|
|
90
|
+
thickness: "2.5"
|
|
91
|
+
}, null, 8, ["icon"]),
|
|
92
|
+
f("span", null, O(t[0].label), 1)
|
|
93
|
+
]),
|
|
94
|
+
content: u(() => [
|
|
95
|
+
n(l(G), {
|
|
96
|
+
class: "scalar-client",
|
|
97
|
+
static: ""
|
|
98
|
+
}, {
|
|
99
|
+
items: u(() => [
|
|
100
|
+
n(l(I), {
|
|
101
|
+
class: "flex items-center gap-1.5",
|
|
102
|
+
onClick: p
|
|
103
|
+
}, {
|
|
104
|
+
default: u(() => [
|
|
105
|
+
n(l(d), {
|
|
106
|
+
icon: "AddTab",
|
|
107
|
+
size: "sm",
|
|
108
|
+
thickness: "1.5"
|
|
109
|
+
}),
|
|
110
|
+
o[1] || (o[1] = x(" New Tab ")),
|
|
111
|
+
n(q, {
|
|
112
|
+
class: "bg-b-2 ml-auto",
|
|
113
|
+
hotkey: "T"
|
|
114
|
+
})
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
}),
|
|
118
|
+
n(l(I), {
|
|
119
|
+
class: "flex items-center gap-1.5",
|
|
120
|
+
onClick: o[0] || (o[0] = (c) => y(T.value))
|
|
121
|
+
}, {
|
|
122
|
+
default: u(() => [
|
|
123
|
+
n(l(d), {
|
|
124
|
+
icon: "Link",
|
|
125
|
+
size: "sm",
|
|
126
|
+
thickness: "1.5"
|
|
127
|
+
}),
|
|
128
|
+
o[2] || (o[2] = x(" Copy URL "))
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
})
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
})
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
})
|
|
138
|
+
])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(Q, {
|
|
139
|
+
key: s,
|
|
140
|
+
active: s === T.value,
|
|
141
|
+
hotkey: (s + 1).toString(),
|
|
142
|
+
icon: c.icon,
|
|
143
|
+
label: c.label,
|
|
144
|
+
onClick: (h) => r(s),
|
|
145
|
+
onClose: (h) => N(s),
|
|
146
|
+
onCloseOtherTabs: (h) => R(s),
|
|
147
|
+
onCopyUrl: (h) => y(s),
|
|
148
|
+
onNewTab: p
|
|
149
|
+
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
|
|
150
|
+
f("button", {
|
|
151
|
+
class: "text-c-3 hover:bg-b-3 p-1.5 rounded app-no-drag-region",
|
|
152
|
+
type: "button",
|
|
153
|
+
onClick: p
|
|
154
|
+
}, [
|
|
155
|
+
n(l(d), {
|
|
156
|
+
icon: "Add",
|
|
157
|
+
size: "xs",
|
|
158
|
+
thickness: "2.5"
|
|
159
|
+
})
|
|
160
|
+
])
|
|
161
|
+
])
|
|
162
|
+
]));
|
|
163
|
+
}
|
|
164
|
+
});
|
|
5
165
|
export {
|
|
6
|
-
|
|
166
|
+
ue as default
|
|
7
167
|
};
|
|
@@ -1,167 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import q from "../ScalarHotkey.vue.js";
|
|
3
|
-
import { ROUTES as F } from "../../constants.js";
|
|
4
|
-
import { useActiveEntities as H } from "../../store/active-entities.js";
|
|
5
|
-
import { ScalarContextMenu as W, ScalarIcon as d, ScalarDropdown as G, ScalarDropdownItem as _ } from "@scalar/components";
|
|
6
|
-
import { capitalize as J } from "@scalar/oas-utils/helpers";
|
|
7
|
-
import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
|
|
8
|
-
import Q from "./TopNavItem.vue.js";
|
|
9
|
-
import { useWorkspace as X } from "../../store/store.js";
|
|
10
|
-
const Y = { class: "flex h-10 t-app__top-nav" }, Z = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, ee = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "h-full w-full overflow-hidden"
|
|
13
|
-
}, ue = /* @__PURE__ */ $({
|
|
14
|
-
__name: "TopNav",
|
|
15
|
-
props: {
|
|
16
|
-
openNewTab: {}
|
|
17
|
-
},
|
|
18
|
-
setup(I) {
|
|
19
|
-
const L = I, { activeRequest: S, router: i } = H(), { events: g } = X(), { copyToClipboard: U } = P(), t = z([{ label: "", path: "", icon: "Add" }]), a = E(0), T = M(() => a.value);
|
|
20
|
-
function k() {
|
|
21
|
-
var o;
|
|
22
|
-
const e = F.find((c) => i.currentRoute.value.name == c.name);
|
|
23
|
-
e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
|
|
24
|
-
label: ((o = S.value) == null ? void 0 : o.summary) || "",
|
|
25
|
-
path: i.currentRoute.value.path,
|
|
26
|
-
icon: e.icon
|
|
27
|
-
} : t[a.value] = {
|
|
28
|
-
label: J(e == null ? void 0 : e.name) || "",
|
|
29
|
-
path: i.currentRoute.value.path,
|
|
30
|
-
icon: e.icon
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function v() {
|
|
34
|
-
i.push(t[a.value].path);
|
|
35
|
-
}
|
|
36
|
-
function p() {
|
|
37
|
-
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, k();
|
|
38
|
-
}
|
|
39
|
-
function r(e) {
|
|
40
|
-
a.value = e, v();
|
|
41
|
-
}
|
|
42
|
-
w(
|
|
43
|
-
() => i.currentRoute.value.path,
|
|
44
|
-
() => {
|
|
45
|
-
k();
|
|
46
|
-
},
|
|
47
|
-
{ immediate: !0 }
|
|
48
|
-
);
|
|
49
|
-
function N(e) {
|
|
50
|
-
t.splice(e, 1), a.value = Math.min(
|
|
51
|
-
a.value,
|
|
52
|
-
t.length - 1
|
|
53
|
-
), v();
|
|
54
|
-
}
|
|
55
|
-
const y = (e) => {
|
|
56
|
-
const o = new URL(window.location.href);
|
|
57
|
-
o.pathname = t[e].path, U(o.toString());
|
|
58
|
-
}, R = (e) => {
|
|
59
|
-
t.splice(0, e), t.splice(1), a.value = 0, v();
|
|
60
|
-
}, C = (e) => {
|
|
61
|
-
if (e) {
|
|
62
|
-
if (e.addTopNav && p(), e.closeTopNav && N(a.value), e.navigateTopNavLeft && r(Math.max(a.value - 1, 0)), e.navigateTopNavRight && r(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
|
|
63
|
-
const o = Number(e.jumpToTab.key) - 1;
|
|
64
|
-
o >= 0 && o < t.length && r(o);
|
|
65
|
-
}
|
|
66
|
-
e.jumpToLastTab && r(t.length - 1);
|
|
67
|
-
}
|
|
68
|
-
}, A = (e) => {
|
|
69
|
-
t.push({
|
|
70
|
-
label: e.name,
|
|
71
|
-
path: e.uid,
|
|
72
|
-
icon: "ExternalLink"
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
return w(
|
|
76
|
-
() => L.openNewTab,
|
|
77
|
-
(e) => {
|
|
78
|
-
e && A(e);
|
|
79
|
-
},
|
|
80
|
-
{ immediate: !0 }
|
|
81
|
-
), j(() => g.hotKeys.on(C)), B(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", Y, [
|
|
82
|
-
o[3] || (o[3] = f("div", { class: "t-app__top-nav-draggable" }, null, -1)),
|
|
83
|
-
f("div", Z, [
|
|
84
|
-
t.length === 1 ? (m(), b("div", ee, [
|
|
85
|
-
n(l(W), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
86
|
-
trigger: u(() => [
|
|
87
|
-
n(l(d), {
|
|
88
|
-
icon: t[0].icon,
|
|
89
|
-
size: "xs",
|
|
90
|
-
thickness: "2.5"
|
|
91
|
-
}, null, 8, ["icon"]),
|
|
92
|
-
f("span", null, O(t[0].label), 1)
|
|
93
|
-
]),
|
|
94
|
-
content: u(() => [
|
|
95
|
-
n(l(G), {
|
|
96
|
-
class: "scalar-client",
|
|
97
|
-
static: ""
|
|
98
|
-
}, {
|
|
99
|
-
items: u(() => [
|
|
100
|
-
n(l(_), {
|
|
101
|
-
class: "flex items-center gap-1.5",
|
|
102
|
-
onClick: p
|
|
103
|
-
}, {
|
|
104
|
-
default: u(() => [
|
|
105
|
-
n(l(d), {
|
|
106
|
-
icon: "AddTab",
|
|
107
|
-
size: "sm",
|
|
108
|
-
thickness: "1.5"
|
|
109
|
-
}),
|
|
110
|
-
o[1] || (o[1] = x(" New Tab ")),
|
|
111
|
-
n(q, {
|
|
112
|
-
class: "bg-b-2 ml-auto",
|
|
113
|
-
hotkey: "T"
|
|
114
|
-
})
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
}),
|
|
118
|
-
n(l(_), {
|
|
119
|
-
class: "flex items-center gap-1.5",
|
|
120
|
-
onClick: o[0] || (o[0] = (c) => y(T.value))
|
|
121
|
-
}, {
|
|
122
|
-
default: u(() => [
|
|
123
|
-
n(l(d), {
|
|
124
|
-
icon: "Link",
|
|
125
|
-
size: "sm",
|
|
126
|
-
thickness: "1.5"
|
|
127
|
-
}),
|
|
128
|
-
o[2] || (o[2] = x(" Copy URL "))
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
|
-
})
|
|
132
|
-
]),
|
|
133
|
-
_: 1
|
|
134
|
-
})
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(Q, {
|
|
139
|
-
key: s,
|
|
140
|
-
active: s === T.value,
|
|
141
|
-
hotkey: (s + 1).toString(),
|
|
142
|
-
icon: c.icon,
|
|
143
|
-
label: c.label,
|
|
144
|
-
onClick: (h) => r(s),
|
|
145
|
-
onClose: (h) => N(s),
|
|
146
|
-
onCloseOtherTabs: (h) => R(s),
|
|
147
|
-
onCopyUrl: (h) => y(s),
|
|
148
|
-
onNewTab: p
|
|
149
|
-
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
|
|
150
|
-
f("button", {
|
|
151
|
-
class: "text-c-3 hover:bg-b-3 p-1.5 rounded webkit-app-no-drag",
|
|
152
|
-
type: "button",
|
|
153
|
-
onClick: p
|
|
154
|
-
}, [
|
|
155
|
-
n(l(d), {
|
|
156
|
-
icon: "Add",
|
|
157
|
-
size: "xs",
|
|
158
|
-
thickness: "2.5"
|
|
159
|
-
})
|
|
160
|
-
])
|
|
161
|
-
])
|
|
162
|
-
]));
|
|
163
|
-
}
|
|
164
|
-
});
|
|
1
|
+
import f from "./TopNav.vue.js";
|
|
165
2
|
export {
|
|
166
|
-
|
|
3
|
+
f as default
|
|
167
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AAuMA,OAAO,EACL,KAAK,IAAI,EAOV,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;;;;;;;;;;;;;;AAiUF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9e263bd8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as k, openBlock as p, createBlock as d, unref as s, withCtx as i, createVNode as t, createElementVNode as a, normalizeClass as f, toDisplayString as u, createCommentVNode as b, createTextVNode as r } from "vue";
|
|
2
2
|
import c from "../ScalarHotkey.vue.js";
|
|
3
|
-
import { ScalarContextMenu as
|
|
3
|
+
import { ScalarContextMenu as g, ScalarTooltip as v, ScalarIcon as l, ScalarDropdown as C, ScalarDropdownItem as m, ScalarDropdownDivider as y } from "@scalar/components";
|
|
4
4
|
const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center gap-1.5" }, $ = { class: "custom-scroll nav-item-copy text-xs" }, D = /* @__PURE__ */ k({
|
|
5
5
|
__name: "TopNavItem",
|
|
6
6
|
props: {
|
|
@@ -11,9 +11,9 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["click", "close", "newTab", "copyUrl", "closeOtherTabs"],
|
|
13
13
|
setup(w) {
|
|
14
|
-
return (o, e) => (p(), d(s(
|
|
14
|
+
return (o, e) => (p(), d(s(g), { triggerClass: "overflow-hidden w-full" }, {
|
|
15
15
|
trigger: i(() => [
|
|
16
|
-
t(s(
|
|
16
|
+
t(s(v), {
|
|
17
17
|
class: "scalar-client",
|
|
18
18
|
delay: 500,
|
|
19
19
|
disableClosingTrigger: !0,
|
|
@@ -22,7 +22,7 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
22
22
|
}, {
|
|
23
23
|
trigger: i(() => [
|
|
24
24
|
a("div", {
|
|
25
|
-
class: f(["nav-item
|
|
25
|
+
class: f(["nav-item app-no-drag-region", { "nav-item__active": o.active }]),
|
|
26
26
|
onClick: e[1] || (e[1] = (n) => o.$emit("click"))
|
|
27
27
|
}, [
|
|
28
28
|
a("div", T, [
|
|
@@ -55,7 +55,7 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
55
55
|
})
|
|
56
56
|
]),
|
|
57
57
|
content: i(() => [
|
|
58
|
-
t(s(
|
|
58
|
+
t(s(C), {
|
|
59
59
|
class: "scalar-client",
|
|
60
60
|
static: ""
|
|
61
61
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WA2IT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAlLH,OAAO;eACT,MAAM;6EAyLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -21,7 +21,7 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
|
|
|
21
21
|
}, {
|
|
22
22
|
default: n(({ open: t }) => [
|
|
23
23
|
r("div", g, [
|
|
24
|
-
i(o(h), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-
|
|
24
|
+
i(o(h), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1 md:px-1.5 xl:px-2 outline-none" }, {
|
|
25
25
|
default: n(() => [
|
|
26
26
|
i(o(b), {
|
|
27
27
|
class: "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-[1px] outline-offset-2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as l, createElementVNode as n, renderSlot as t } from "vue";
|
|
2
2
|
import s from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const r = {}, c = { class: "flex xl:h-full xl:min-w-0
|
|
4
|
-
function m(e,
|
|
3
|
+
const r = {}, c = { class: "flex xl:h-full xl:min-w-0 flex-1 flex-col xl:custom-scroll bg-b-1" }, i = { class: "min-h-12 xl:min-h-header flex items-center border-b-1/2 px-3.5 py-1.5 md:px-4 md:py-2 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 xl:rounded-none z-1" };
|
|
4
|
+
function m(e, d) {
|
|
5
5
|
return o(), l("section", c, [
|
|
6
6
|
n("div", i, [
|
|
7
7
|
t(e.$slots, "title")
|
|
@@ -8,6 +8,6 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
8
8
|
name: string;
|
|
9
9
|
uid: string;
|
|
10
10
|
}) => any) | undefined;
|
|
11
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=ApiClientApp.vue.d.ts.map
|
|
@@ -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":";;cAoI8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAgLjD,wBAOG"}
|
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useActiveEntities as
|
|
5
|
-
import { addScalarClassesToHeadless as
|
|
6
|
-
import { getThemeStyles as
|
|
7
|
-
import { useColorMode as
|
|
8
|
-
import { ScalarToasts as
|
|
9
|
-
import { RouterView as
|
|
10
|
-
import { APP_HOTKEYS as
|
|
11
|
-
import { DEFAULT_HOTKEYS as x, handleHotKeyDown as
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as h, onBeforeMount as y, onMounted as T, onBeforeUnmount as v, computed as K, openBlock as t, createElementBlock as C, createElementVNode as k, createVNode as r, unref as a, createBlock as m, withCtx as d, KeepAlive as E, resolveDynamicComponent as H, createCommentVNode as N } from "vue";
|
|
2
|
+
import b from "../../components/TopNav/TopNav.vue.js";
|
|
3
|
+
import A from "./MainLayout.vue.js";
|
|
4
|
+
import { useActiveEntities as S } from "../../store/active-entities.js";
|
|
5
|
+
import { addScalarClassesToHeadless as B } from "@scalar/components";
|
|
6
|
+
import { getThemeStyles as D } from "@scalar/themes";
|
|
7
|
+
import { useColorMode as L } from "@scalar/use-hooks/useColorMode";
|
|
8
|
+
import { ScalarToasts as M } from "@scalar/use-toasts";
|
|
9
|
+
import { RouterView as P } from "vue-router";
|
|
10
|
+
import { APP_HOTKEYS as V } from "./hotkeys.js";
|
|
11
|
+
import { DEFAULT_HOTKEYS as x, handleHotKeyDown as $ } from "../../libs/hot-keys.js";
|
|
12
|
+
import { useWorkspace as g } from "../../store/store.js";
|
|
13
|
+
const O = {
|
|
14
|
+
id: "scalar-client-app",
|
|
15
|
+
class: "contents"
|
|
16
|
+
}, U = ["innerHTML"], oe = /* @__PURE__ */ w({
|
|
14
17
|
__name: "ApiClientApp",
|
|
15
18
|
emits: ["newTab"],
|
|
16
19
|
setup(W) {
|
|
17
|
-
const
|
|
18
|
-
|
|
20
|
+
const p = { ...x, ...V }, s = h(null), f = (e) => {
|
|
21
|
+
s.value = e;
|
|
19
22
|
};
|
|
20
|
-
|
|
21
|
-
const { activeWorkspace: n } =
|
|
22
|
-
y(() =>
|
|
23
|
-
const
|
|
23
|
+
L();
|
|
24
|
+
const { activeWorkspace: n } = S(), { events: o } = g();
|
|
25
|
+
y(() => B());
|
|
26
|
+
const l = (e) => $(e, o.hotKeys, { hotKeys: p }), i = (e) => {
|
|
24
27
|
e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
|
|
25
28
|
};
|
|
26
|
-
|
|
27
|
-
window.addEventListener("keydown",
|
|
29
|
+
T(() => {
|
|
30
|
+
window.addEventListener("keydown", l), o.hotKeys.on(i);
|
|
28
31
|
}), v(() => {
|
|
29
|
-
window.removeEventListener("keydown",
|
|
32
|
+
window.removeEventListener("keydown", l), o.hotKeys.off(i);
|
|
30
33
|
});
|
|
31
|
-
const
|
|
32
|
-
() => n.value && `<style>${
|
|
34
|
+
const u = K(
|
|
35
|
+
() => n.value && `<style>${D(n.value.themeId)}</style>`
|
|
33
36
|
);
|
|
34
37
|
return (e, Y) => {
|
|
35
38
|
var c;
|
|
36
|
-
return t(), C(
|
|
37
|
-
|
|
38
|
-
r(
|
|
39
|
-
(c = a(n)) != null && c.uid ? (t(), m(
|
|
40
|
-
default:
|
|
41
|
-
r(a(
|
|
42
|
-
default:
|
|
43
|
-
(t(), m(
|
|
44
|
-
(t(), m(H(
|
|
39
|
+
return t(), C("div", O, [
|
|
40
|
+
k("div", { innerHTML: u.value }, null, 8, U),
|
|
41
|
+
r(b, { openNewTab: s.value }, null, 8, ["openNewTab"]),
|
|
42
|
+
(c = a(n)) != null && c.uid ? (t(), m(A, { key: 0 }, {
|
|
43
|
+
default: d(() => [
|
|
44
|
+
r(a(P), { onNewTab: f }, {
|
|
45
|
+
default: d(({ Component: _ }) => [
|
|
46
|
+
(t(), m(E, null, [
|
|
47
|
+
(t(), m(H(_)))
|
|
45
48
|
], 1024))
|
|
46
49
|
]),
|
|
47
50
|
_: 1
|
|
48
51
|
})
|
|
49
52
|
]),
|
|
50
53
|
_: 1
|
|
51
|
-
})) :
|
|
52
|
-
r(a(
|
|
53
|
-
]
|
|
54
|
+
})) : N("", !0),
|
|
55
|
+
r(a(M))
|
|
56
|
+
]);
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
59
|
});
|
|
@@ -2,7 +2,7 @@ import o from "./ApiClientModal.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e68efb34"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|