@scalar/api-client 2.1.16 → 2.1.17
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 +8 -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 +67 -66
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +11 -11
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +37 -38
- package/dist/layouts/App/hotkeys.d.ts +6 -0
- package/dist/layouts/App/hotkeys.d.ts.map +1 -0
- package/dist/layouts/App/hotkeys.js +21 -0
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts +3 -0
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -0
- package/dist/layouts/Web/ApiClientWeb.vue.js +57 -0
- package/dist/layouts/Web/ApiClientWeb.vue3.js +5 -0
- package/dist/layouts/Web/create-api-client-web.d.ts +3593 -0
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -0
- package/dist/layouts/Web/create-api-client-web.js +18 -0
- package/dist/layouts/Web/index.d.ts +3 -0
- package/dist/layouts/Web/index.d.ts.map +1 -0
- package/dist/layouts/Web/index.js +7 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +0 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +19 -35
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue2.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.1.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8396e92: style: updates overall alignments
|
|
8
|
+
- 6279c59: feat (api-client): remove tabs on client.scalar.com
|
|
9
|
+
- 5581a28: fix: displays address bar placeholder according to active server
|
|
10
|
+
|
|
3
11
|
## 2.1.16
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAouBA,wBAKG"}
|
|
@@ -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
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ef489963"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,112 +1,113 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { Listbox as
|
|
4
|
-
import { ScalarButton as
|
|
5
|
-
import { REQUEST_METHODS as
|
|
6
|
-
import { isMacOS as
|
|
7
|
-
import { useMagicKeys as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { executeRequestBus as
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
import { requestStatusBus as
|
|
14
|
-
import { hotKeyBus as
|
|
15
|
-
const v = (d) => (
|
|
1
|
+
import { defineComponent as L, ref as i, watch as O, onMounted as A, onBeforeUnmount as K, unref as l, openBlock as N, createElementBlock as T, createElementVNode as o, createVNode as s, withCtx as w, normalizeClass as B, normalizeStyle as $, createCommentVNode as D, pushScopeId as P, popScopeId as Q } from "vue";
|
|
2
|
+
import W from "../CodeInput/CodeInput.vue.js";
|
|
3
|
+
import { Listbox as j } from "@headlessui/vue";
|
|
4
|
+
import { ScalarButton as F, ScalarIcon as G } from "@scalar/components";
|
|
5
|
+
import { REQUEST_METHODS as J } from "@scalar/oas-utils/helpers";
|
|
6
|
+
import { isMacOS as X } from "@scalar/use-tooltip";
|
|
7
|
+
import { useMagicKeys as Y, whenever as Z } from "@vueuse/core";
|
|
8
|
+
import ee from "../HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
import te from "./AddressBarHistory.vue.js";
|
|
10
|
+
import le from "./AddressBarServer.vue.js";
|
|
11
|
+
import { executeRequestBus as S } from "../../libs/event-busses/execute-request-bus.js";
|
|
12
|
+
import { useWorkspace as oe } from "../../store/store.js";
|
|
13
|
+
import { requestStatusBus as ae } from "../../libs/event-busses/request-status-bus.js";
|
|
14
|
+
import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
|
|
15
|
+
const v = (d) => (P("data-v-ef489963"), d = d(), Q(), d), re = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "order-last lg:order-none lg:w-auto w-full"
|
|
18
|
-
},
|
|
18
|
+
}, se = { class: "m-auto flex flex-row items-center" }, ne = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ie = { class: "flex gap-1" }, ue = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, de = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), ce = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), fe = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), Ce = /* @__PURE__ */ L({
|
|
19
19
|
__name: "AddressBar",
|
|
20
20
|
setup(d) {
|
|
21
21
|
const {
|
|
22
22
|
activeRequest: t,
|
|
23
|
-
activeExample:
|
|
23
|
+
activeExample: y,
|
|
24
|
+
activeServer: q,
|
|
24
25
|
isReadOnly: m,
|
|
25
|
-
requestMutators:
|
|
26
|
-
requestHistory:
|
|
27
|
-
} =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
() =>
|
|
26
|
+
requestMutators: f,
|
|
27
|
+
requestHistory: C
|
|
28
|
+
} = oe(), p = i(C[0]), h = i(null), _ = Y();
|
|
29
|
+
Z(
|
|
30
|
+
X() ? _.meta_enter : _.ctrl_enter,
|
|
31
|
+
() => S.emit()
|
|
31
32
|
);
|
|
32
|
-
const
|
|
33
|
-
!t.value || t.value.path === e ||
|
|
33
|
+
const E = (e) => {
|
|
34
|
+
!t.value || t.value.path === e || f.edit(t.value.uid, "path", e);
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
O(
|
|
36
37
|
() => {
|
|
37
38
|
var e;
|
|
38
39
|
return (e = t.value) == null ? void 0 : e.path;
|
|
39
40
|
},
|
|
40
41
|
(e) => {
|
|
41
|
-
!t.value || !e ||
|
|
42
|
+
!t.value || !e || E(e);
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
const a = i(100), x = i(0), r = i(!1), n = i();
|
|
45
|
-
function E() {
|
|
46
|
-
r.value ? a.value -= (a.value - 15) / 60 : a.value -= x.value / 20, a.value <= 0 && (clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1);
|
|
47
|
-
}
|
|
48
46
|
function R() {
|
|
49
|
-
|
|
47
|
+
r.value ? a.value -= (a.value - 15) / 60 : a.value -= x.value / 20, a.value <= 0 && (clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1);
|
|
50
48
|
}
|
|
51
49
|
function I() {
|
|
52
|
-
|
|
50
|
+
n.value || (r.value = !0, n.value = setInterval(R, 20));
|
|
53
51
|
}
|
|
54
52
|
function V() {
|
|
53
|
+
x.value = a.value, r.value = !1;
|
|
54
|
+
}
|
|
55
|
+
function z() {
|
|
55
56
|
clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
e === "start" &&
|
|
58
|
+
ae.on((e) => {
|
|
59
|
+
e === "start" && I(), e === "stop" && V(), e === "abort" && z();
|
|
59
60
|
});
|
|
60
|
-
function
|
|
61
|
-
t.value &&
|
|
61
|
+
function M(e) {
|
|
62
|
+
t.value && f.edit(t.value.uid, "method", e);
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function H() {
|
|
64
65
|
if (!t.value) return;
|
|
65
66
|
const { method: e } = t.value;
|
|
66
|
-
return
|
|
67
|
+
return J[e].backgroundColor;
|
|
67
68
|
}
|
|
68
69
|
function b() {
|
|
69
|
-
r.value || (r.value = !0,
|
|
70
|
+
r.value || (r.value = !0, S.emit());
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
t.value &&
|
|
72
|
+
function U(e) {
|
|
73
|
+
t.value && f.edit(t.value.uid, "path", e);
|
|
73
74
|
}
|
|
74
75
|
function g(e) {
|
|
75
76
|
var u;
|
|
76
77
|
e.focusAddressBar && ((u = h.value) == null || u.focus());
|
|
77
78
|
}
|
|
78
|
-
return
|
|
79
|
-
o("div",
|
|
80
|
-
s(l(
|
|
79
|
+
return A(() => k.on(g)), K(() => k.off(g)), (e, u) => l(t) && l(y) ? (N(), T("div", re, [
|
|
80
|
+
o("div", se, [
|
|
81
|
+
s(l(j), {
|
|
81
82
|
modelValue: p.value,
|
|
82
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
83
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => p.value = c)
|
|
83
84
|
}, {
|
|
84
|
-
default: w(({ open:
|
|
85
|
+
default: w(({ open: c }) => [
|
|
85
86
|
o("div", {
|
|
86
87
|
class: B([
|
|
87
88
|
"addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last overflow-hidden lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
|
|
88
|
-
{ "border-transparent overflow-visible rounded-b-none":
|
|
89
|
+
{ "border-transparent overflow-visible rounded-b-none": c }
|
|
89
90
|
])
|
|
90
91
|
}, [
|
|
91
|
-
o("div",
|
|
92
|
+
o("div", ne, [
|
|
92
93
|
o("div", {
|
|
93
|
-
class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full",
|
|
94
|
-
style:
|
|
94
|
+
class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", H()]),
|
|
95
|
+
style: $({ transform: `translate3d(-${a.value}%,0,0)` })
|
|
95
96
|
}, null, 6)
|
|
96
97
|
]),
|
|
97
|
-
o("div",
|
|
98
|
-
s(
|
|
98
|
+
o("div", ie, [
|
|
99
|
+
s(ee, {
|
|
99
100
|
isEditable: !l(m),
|
|
100
101
|
isSquare: "",
|
|
101
102
|
method: l(t).method,
|
|
102
103
|
teleport: ".scalar-client",
|
|
103
|
-
onChange:
|
|
104
|
+
onChange: M
|
|
104
105
|
}, null, 8, ["isEditable", "method"])
|
|
105
106
|
]),
|
|
106
|
-
o("div",
|
|
107
|
-
|
|
108
|
-
s(
|
|
109
|
-
s(
|
|
107
|
+
o("div", ue, [
|
|
108
|
+
de,
|
|
109
|
+
s(le),
|
|
110
|
+
s(W, {
|
|
110
111
|
ref_key: "addressBarRef",
|
|
111
112
|
ref: h,
|
|
112
113
|
disableCloseBrackets: "",
|
|
@@ -115,21 +116,21 @@ const v = (d) => (D("data-v-1a9f572a"), d = d(), P(), d), ae = {
|
|
|
115
116
|
disableTabIndent: "",
|
|
116
117
|
emitOnBlur: !1,
|
|
117
118
|
modelValue: l(t).path,
|
|
118
|
-
placeholder: "Enter URL to get started",
|
|
119
|
+
placeholder: l(q) ? "" : "Enter URL to get started",
|
|
119
120
|
server: "",
|
|
120
121
|
onSubmit: b,
|
|
121
|
-
"onUpdate:modelValue":
|
|
122
|
-
}, null, 8, ["disabled", "modelValue"]),
|
|
123
|
-
|
|
122
|
+
"onUpdate:modelValue": U
|
|
123
|
+
}, null, 8, ["disabled", "modelValue", "placeholder"]),
|
|
124
|
+
ce
|
|
124
125
|
]),
|
|
125
|
-
s(
|
|
126
|
-
s(l(
|
|
126
|
+
s(te, { open: c }, null, 8, ["open"]),
|
|
127
|
+
s(l(F), {
|
|
127
128
|
class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1] font-bold",
|
|
128
129
|
disabled: r.value,
|
|
129
130
|
onClick: b
|
|
130
131
|
}, {
|
|
131
132
|
default: w(() => [
|
|
132
|
-
s(l(
|
|
133
|
+
s(l(G), {
|
|
133
134
|
class: "relative z-10 shrink-0 fill-current",
|
|
134
135
|
icon: "Play",
|
|
135
136
|
size: "xs"
|
|
@@ -143,9 +144,9 @@ const v = (d) => (D("data-v-1a9f572a"), d = d(), P(), d), ae = {
|
|
|
143
144
|
_: 1
|
|
144
145
|
}, 8, ["modelValue"])
|
|
145
146
|
])
|
|
146
|
-
])) :
|
|
147
|
+
])) : D("", !0);
|
|
147
148
|
}
|
|
148
149
|
});
|
|
149
150
|
export {
|
|
150
|
-
|
|
151
|
+
Ce as default
|
|
151
152
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ContextBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ba672e06"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -94,9 +94,9 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
|
|
|
94
94
|
r("h2", W, [
|
|
95
95
|
l(k(((t = e(_)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
|
|
96
96
|
n(e(c), {
|
|
97
|
-
class: "size-
|
|
97
|
+
class: "size-3",
|
|
98
98
|
icon: "ChevronDown",
|
|
99
|
-
thickness: "3
|
|
99
|
+
thickness: "3"
|
|
100
100
|
})
|
|
101
101
|
])
|
|
102
102
|
];
|
|
@@ -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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-985878af"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -8,7 +8,7 @@ const b = {
|
|
|
8
8
|
"aria-label": "Side Navigation",
|
|
9
9
|
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1 border-t-1/2",
|
|
10
10
|
role: "navigation"
|
|
11
|
-
}, S = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col py-
|
|
11
|
+
}, S = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, O = /* @__PURE__ */ _({
|
|
12
12
|
__name: "SideNav",
|
|
13
13
|
setup(V) {
|
|
14
14
|
const { currentRoute: s } = v();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a66e94b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as z, reactive as A, ref as B, computed as M, watch as y, onMounted as j, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as
|
|
1
|
+
import { defineComponent as z, reactive as A, ref as B, computed as M, watch as y, onMounted as j, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as C, Fragment as V, renderList as D, createBlock as q, pushScopeId as K, popScopeId as F } from "vue";
|
|
2
2
|
import H from "../ScalarHotkey.vue.js";
|
|
3
3
|
import { ROUTES as W } from "../../constants.js";
|
|
4
4
|
import { useClipboard as G } from "../../hooks/useClipboard.js";
|
|
5
|
-
import { ScalarContextMenu as J, ScalarIcon as
|
|
5
|
+
import { ScalarContextMenu as J, ScalarIcon as h, ScalarDropdown as P, ScalarDropdownItem as x } from "@scalar/components";
|
|
6
6
|
import { capitalize as Q } from "@scalar/oas-utils/helpers";
|
|
7
7
|
import X from "./TopNavItem.vue.js";
|
|
8
8
|
import { useWorkspace as Y } from "../../store/store.js";
|
|
9
9
|
import { hotKeyBus as I } from "../../libs/event-busses/hot-keys-bus.js";
|
|
10
|
-
const Z = (s) => (K("data-v-
|
|
10
|
+
const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-10 t-app__top-nav" }, te = /* @__PURE__ */ Z(() => /* @__PURE__ */ f("div", { class: "t-app__top-nav-draggable" }, null, -1)), oe = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-1 relative overflow-hidden" }, ae = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "h-full w-full overflow-hidden"
|
|
13
13
|
}, de = /* @__PURE__ */ z({
|
|
@@ -78,16 +78,16 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
|
|
|
78
78
|
{ immediate: !0 }
|
|
79
79
|
), j(() => I.on(w)), E(() => I.off(w)), (e, a) => (d(), g("nav", ee, [
|
|
80
80
|
te,
|
|
81
|
-
|
|
81
|
+
f("div", oe, [
|
|
82
82
|
t.length === 1 ? (d(), g("div", ae, [
|
|
83
83
|
n(l(J), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
84
84
|
trigger: u(() => [
|
|
85
|
-
n(l(
|
|
85
|
+
n(l(h), {
|
|
86
86
|
icon: t[0].icon,
|
|
87
87
|
size: "xs",
|
|
88
88
|
thickness: "2.5"
|
|
89
89
|
}, null, 8, ["icon"]),
|
|
90
|
-
|
|
90
|
+
f("span", null, O(t[0].label), 1)
|
|
91
91
|
]),
|
|
92
92
|
content: u(() => [
|
|
93
93
|
n(l(P), {
|
|
@@ -100,7 +100,7 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
|
|
|
100
100
|
onClick: m
|
|
101
101
|
}, {
|
|
102
102
|
default: u(() => [
|
|
103
|
-
n(l(
|
|
103
|
+
n(l(h), {
|
|
104
104
|
icon: "AddTab",
|
|
105
105
|
size: "sm",
|
|
106
106
|
thickness: "1.5"
|
|
@@ -118,7 +118,7 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
|
|
|
118
118
|
onClick: a[0] || (a[0] = (p) => N(T.value))
|
|
119
119
|
}, {
|
|
120
120
|
default: u(() => [
|
|
121
|
-
n(l(
|
|
121
|
+
n(l(h), {
|
|
122
122
|
icon: "Link",
|
|
123
123
|
size: "sm",
|
|
124
124
|
thickness: "1.5"
|
|
@@ -145,12 +145,12 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
|
|
|
145
145
|
onCopyUrl: (b) => N(c),
|
|
146
146
|
onNewTab: m
|
|
147
147
|
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
|
|
148
|
-
|
|
149
|
-
class: "text-c-3 hover:bg-b-3 p-1.5 rounded
|
|
148
|
+
f("button", {
|
|
149
|
+
class: "text-c-3 hover:bg-b-3 p-1.5 rounded webkit-app-no-drag",
|
|
150
150
|
type: "button",
|
|
151
151
|
onClick: m
|
|
152
152
|
}, [
|
|
153
|
-
n(l(
|
|
153
|
+
n(l(h), {
|
|
154
154
|
icon: "Add",
|
|
155
155
|
size: "xs",
|
|
156
156
|
thickness: "2.5"
|
|
@@ -20,7 +20,7 @@ const x = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, g = {
|
|
|
20
20
|
defaultOpen: e.defaultOpen
|
|
21
21
|
}, {
|
|
22
22
|
default: n(({ open: t }) => [
|
|
23
|
-
i(o(m), { class: "hover:text-c-1 group flex w-full items-center gap-
|
|
23
|
+
i(o(m), { class: "hover:text-c-1 group flex w-full items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1.5" }, {
|
|
24
24
|
default: n(() => [
|
|
25
25
|
i(o(b), {
|
|
26
26
|
class: "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0",
|
|
@@ -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":";;cA6I8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAuMjD,wBAMG"}
|
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as T, ref as _, onMounted as c, watchEffect as h, onBeforeMount as k, onBeforeUnmount as y, computed as b, openBlock as t, createElementBlock as i, Fragment as N, createElementVNode as d, createVNode as e, unref as n, withCtx as S, createBlock as p, KeepAlive as g, resolveDynamicComponent as x, createCommentVNode as E } from "vue";
|
|
2
|
+
import C from "../../components/SideNav/SideNav.vue.js";
|
|
3
3
|
import L from "../../components/TopNav/TopNav.vue.js";
|
|
4
|
-
import { addScalarClassesToHeadless as
|
|
5
|
-
import { getThemeStyles as
|
|
6
|
-
import { ScalarToasts as
|
|
7
|
-
import { RouterView as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
4
|
+
import { addScalarClassesToHeadless as D } from "@scalar/components";
|
|
5
|
+
import { getThemeStyles as H } from "@scalar/themes";
|
|
6
|
+
import { ScalarToasts as K } from "@scalar/use-toasts";
|
|
7
|
+
import { RouterView as A } from "vue-router";
|
|
8
|
+
import { APP_HOTKEYS as B } from "./hotkeys.js";
|
|
9
|
+
import M from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
10
|
+
import { DEFAULT_HOTKEYS as V, handleHotKeyDown as W } from "../../libs/event-busses/hot-keys-bus.js";
|
|
11
|
+
import { useDarkModeState as P } from "../../hooks/useDarkModeState.js";
|
|
12
|
+
import { useWorkspace as F } from "../../store/store.js";
|
|
13
|
+
const O = ["innerHTML"], U = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "flex min-h-0 flex-1 z-0"
|
|
15
|
-
},
|
|
16
|
+
}, Y = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, ne = /* @__PURE__ */ T({
|
|
16
17
|
__name: "ApiClientApp",
|
|
17
18
|
emits: ["newTab"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
setup(z) {
|
|
20
|
+
const u = { ...V, ...B }, a = _(null), f = (o) => {
|
|
21
|
+
a.value = o;
|
|
21
22
|
};
|
|
22
23
|
c(() => {
|
|
23
24
|
h(() => {
|
|
24
25
|
document.body.classList.toggle("dark-mode", l.value), document.body.classList.toggle("light-mode", !l.value);
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
|
-
const { isDark: l } =
|
|
28
|
-
k(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
() => a.activeWorkspace.value && `<style>
|
|
35
|
-
${D(a.activeWorkspace.value.themeId, {
|
|
28
|
+
const { isDark: l } = P(), r = F();
|
|
29
|
+
k(() => D());
|
|
30
|
+
const s = (o) => W(o, { hotKeys: u });
|
|
31
|
+
c(() => window.addEventListener("keydown", s)), y(() => window.removeEventListener("keydown", s));
|
|
32
|
+
const v = b(
|
|
33
|
+
() => r.activeWorkspace.value && `<style>
|
|
34
|
+
${H(r.activeWorkspace.value.themeId, {
|
|
36
35
|
fonts: !0
|
|
37
36
|
})}</style>`
|
|
38
37
|
);
|
|
39
|
-
return (o,
|
|
38
|
+
return (o, I) => {
|
|
40
39
|
var m;
|
|
41
|
-
return t(), i(
|
|
42
|
-
d("div", { innerHTML:
|
|
43
|
-
e(L, { openNewTab:
|
|
44
|
-
(m = n(
|
|
45
|
-
e(
|
|
46
|
-
e(n(
|
|
47
|
-
d("div",
|
|
48
|
-
e(n(
|
|
49
|
-
default:
|
|
40
|
+
return t(), i(N, null, [
|
|
41
|
+
d("div", { innerHTML: v.value }, null, 8, O),
|
|
42
|
+
e(L, { openNewTab: a.value }, null, 8, ["openNewTab"]),
|
|
43
|
+
(m = n(r).activeWorkspace.value) != null && m.uid ? (t(), i("main", U, [
|
|
44
|
+
e(C),
|
|
45
|
+
e(n(M)),
|
|
46
|
+
d("div", Y, [
|
|
47
|
+
e(n(A), { onNewTab: f }, {
|
|
48
|
+
default: S(({ Component: w }) => [
|
|
50
49
|
(t(), p(g, null, [
|
|
51
|
-
(t(), p(x(
|
|
50
|
+
(t(), p(x(w)))
|
|
52
51
|
], 1024))
|
|
53
52
|
]),
|
|
54
53
|
_: 1
|
|
55
54
|
})
|
|
56
55
|
])
|
|
57
|
-
])) :
|
|
58
|
-
e(n(
|
|
56
|
+
])) : E("", !0),
|
|
57
|
+
e(n(K))
|
|
59
58
|
], 64);
|
|
60
59
|
};
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
export {
|
|
64
|
-
|
|
63
|
+
ne as default
|
|
65
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/hotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAExE;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAiBzB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
t: { event: "addTopNav", modifiers: ["default"] },
|
|
3
|
+
w: { event: "closeTopNav", modifiers: ["default"] },
|
|
4
|
+
ArrowLeft: { event: "navigateTopNavLeft", modifiers: ["default", "Alt"] },
|
|
5
|
+
ArrowRight: { event: "navigateTopNavRight", modifiers: ["default", "Alt"] },
|
|
6
|
+
l: { event: "focusAddressBar", modifiers: ["default"] },
|
|
7
|
+
1: { event: "jumpToTab", modifiers: ["default"] },
|
|
8
|
+
2: { event: "jumpToTab", modifiers: ["default"] },
|
|
9
|
+
3: { event: "jumpToTab", modifiers: ["default"] },
|
|
10
|
+
4: { event: "jumpToTab", modifiers: ["default"] },
|
|
11
|
+
5: { event: "jumpToTab", modifiers: ["default"] },
|
|
12
|
+
6: { event: "jumpToTab", modifiers: ["default"] },
|
|
13
|
+
7: { event: "jumpToTab", modifiers: ["default"] },
|
|
14
|
+
8: { event: "jumpToTab", modifiers: ["default"] },
|
|
15
|
+
9: { event: "jumpToLastTab", modifiers: ["default"] },
|
|
16
|
+
f: { event: "focusRequestSearch", modifiers: ["default"] },
|
|
17
|
+
n: { event: "openCommandPaletteRequest", modifiers: ["default"] }
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as APP_HOTKEYS
|
|
21
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ApiClientWeb.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiClientWeb.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Web/ApiClientWeb.vue"],"names":[],"mappings":";AAmRA,wBAKG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as p, onMounted as m, watchEffect as v, onBeforeMount as _, onBeforeUnmount as k, computed as h, openBlock as e, createElementBlock as c, Fragment as w, createElementVNode as i, unref as o, createVNode as t, withCtx as y, createBlock as d, KeepAlive as g, resolveDynamicComponent as x, createCommentVNode as C } from "vue";
|
|
2
|
+
import S from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
+
import { addScalarClassesToHeadless as T } from "@scalar/components";
|
|
4
|
+
import { getThemeStyles as L } from "@scalar/themes";
|
|
5
|
+
import { ScalarToasts as b } from "@scalar/use-toasts";
|
|
6
|
+
import { RouterView as B } from "vue-router";
|
|
7
|
+
import D from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
8
|
+
import { useDarkModeState as E } from "../../hooks/useDarkModeState.js";
|
|
9
|
+
import { useWorkspace as M } from "../../store/store.js";
|
|
10
|
+
import { handleHotKeyDown as W } from "../../libs/event-busses/hot-keys-bus.js";
|
|
11
|
+
const H = ["innerHTML"], N = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "flex min-h-0 flex-1 z-0"
|
|
14
|
+
}, V = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, J = /* @__PURE__ */ p({
|
|
15
|
+
__name: "ApiClientWeb",
|
|
16
|
+
setup(K) {
|
|
17
|
+
m(() => {
|
|
18
|
+
v(() => {
|
|
19
|
+
document.body.classList.toggle("dark-mode", r.value), document.body.classList.toggle("light-mode", !r.value);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
const { isDark: r } = E(), n = M();
|
|
23
|
+
_(() => T());
|
|
24
|
+
const a = (l) => W(l);
|
|
25
|
+
m(() => window.addEventListener("keydown", a)), k(() => window.removeEventListener("keydown", a));
|
|
26
|
+
const u = h(
|
|
27
|
+
() => n.activeWorkspace.value && `<style>
|
|
28
|
+
${L(n.activeWorkspace.value.themeId, {
|
|
29
|
+
fonts: !0
|
|
30
|
+
})}</style>`
|
|
31
|
+
);
|
|
32
|
+
return (l, A) => {
|
|
33
|
+
var s;
|
|
34
|
+
return e(), c(w, null, [
|
|
35
|
+
i("div", { innerHTML: u.value }, null, 8, H),
|
|
36
|
+
(s = o(n).activeWorkspace.value) != null && s.uid ? (e(), c("main", N, [
|
|
37
|
+
t(S),
|
|
38
|
+
t(o(D)),
|
|
39
|
+
i("div", V, [
|
|
40
|
+
t(o(B), null, {
|
|
41
|
+
default: y(({ Component: f }) => [
|
|
42
|
+
(e(), d(g, null, [
|
|
43
|
+
(e(), d(x(f)))
|
|
44
|
+
], 1024))
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
})
|
|
48
|
+
])
|
|
49
|
+
])) : C("", !0),
|
|
50
|
+
t(o(b))
|
|
51
|
+
], 64);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
J as default
|
|
57
|
+
};
|