@scalar/api-client 2.1.31 → 2.1.32
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 +13 -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 +3 -3
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +104 -92
- package/dist/components/CodeInput/codeVariableWidget.js +3 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +110 -95
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- 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 -22
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +4 -4
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +37 -42
- package/dist/layouts/App/MainLayout.vue.d.ts +12 -0
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -0
- package/dist/layouts/App/MainLayout.vue.js +18 -0
- package/dist/layouts/App/MainLayout.vue2.js +4 -0
- package/dist/layouts/App/create-api-client-app.d.ts +6 -5
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +12 -10
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +26 -31
- package/dist/layouts/Web/create-api-client-web.d.ts +6 -5
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +6 -5
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +21 -18
- package/dist/store/store.d.ts +28 -13
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +112 -108
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +61 -48
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -384
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +384 -2
- package/dist/views/Request/RequestSection/RequestSection.vue.js +15 -15
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +90 -65
- package/package.json +7 -7
|
@@ -1,32 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as oe, ScalarIcon as
|
|
1
|
+
import { defineComponent as q, ref as i, computed as T, watch as F, onMounted as G, onBeforeUnmount as Q, openBlock as a, createBlock as z, unref as r, withCtx as y, createElementVNode as u, createVNode as p, createTextVNode as K, createElementBlock as m, withDirectives as M, withKeys as w, withModifiers as g, vModelText as j, Fragment as S, renderList as B, toDisplayString as N, vShow as J, normalizeClass as X, createCommentVNode as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as V } from "vue";
|
|
2
|
+
import { useModal as oe, ScalarIcon as A } from "@scalar/components";
|
|
3
3
|
import { Dialog as te, DialogPanel as ne, DialogTitle as ae } from "@headlessui/vue";
|
|
4
4
|
import { useRouter as le } from "vue-router";
|
|
5
|
-
import se from "
|
|
6
|
-
import re from "./
|
|
7
|
-
import me from "./
|
|
5
|
+
import { ROUTES as se } from "../../constants.js";
|
|
6
|
+
import re from "./CommandPaletteCollection.vue.js";
|
|
7
|
+
import me from "./CommandPaletteExample.vue.js";
|
|
8
|
+
import ce from "./CommandPaletteImport.vue.js";
|
|
8
9
|
import ie from "./CommandPaletteRequest.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import ue from "./CommandPaletteServer.vue.js";
|
|
11
|
+
import de from "./CommandPaletteTag.vue.js";
|
|
12
|
+
import pe from "./CommandPaletteWorkspace.vue.js";
|
|
12
13
|
import { useWorkspace as fe } from "../../store/store.js";
|
|
13
|
-
const
|
|
14
|
+
const ve = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "flex-1 min-h-0 p-1.5 custom-scroll rounded-lg"
|
|
17
|
+
}, Ce = { class: "bg-b-2 border border-transparent flex items-center rounded-md sticky top-0 pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:bg-b-1 focus-within:border-b-3" }, he = { for: "commandmenu" }, xe = ["onKeydown"], _e = ["onClick"], ke = {
|
|
14
18
|
key: 0,
|
|
15
19
|
class: "text-c-3 text-center text-sm p-2 pt-3"
|
|
16
|
-
}, xe = {
|
|
17
|
-
name: "TheCommandPalette"
|
|
18
20
|
}, be = {
|
|
19
|
-
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "flex-1 p-1.5"
|
|
23
|
+
}, ye = {
|
|
24
|
+
name: "TheCommandPalette"
|
|
25
|
+
}, we = {
|
|
26
|
+
"Import from OpenAPI/Swagger": ce,
|
|
20
27
|
"Create Request": ie,
|
|
21
|
-
"Create Workspace":
|
|
22
|
-
"Add Tag":
|
|
23
|
-
"Add Server":
|
|
24
|
-
"Create Collection":
|
|
25
|
-
"Add Example":
|
|
26
|
-
},
|
|
27
|
-
...
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
28
|
+
"Create Workspace": pe,
|
|
29
|
+
"Add Tag": de,
|
|
30
|
+
"Add Server": ue,
|
|
31
|
+
"Create Collection": re,
|
|
32
|
+
"Add Example": me
|
|
33
|
+
}, Be = /* @__PURE__ */ q({
|
|
34
|
+
...ye,
|
|
35
|
+
setup(ge) {
|
|
36
|
+
const P = [
|
|
30
37
|
{
|
|
31
38
|
label: "",
|
|
32
39
|
commands: [
|
|
@@ -74,118 +81,126 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
|
|
|
74
81
|
path: "/cookies"
|
|
75
82
|
}
|
|
76
83
|
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "Pages",
|
|
87
|
+
commands: se.map((e) => ({
|
|
88
|
+
name: e.prettyName,
|
|
89
|
+
icon: e.icon,
|
|
90
|
+
path: `/${e.name}`
|
|
91
|
+
}))
|
|
77
92
|
}
|
|
78
|
-
], d = oe(), { push:
|
|
79
|
-
() =>
|
|
80
|
-
const t =
|
|
93
|
+
], d = oe(), { push: W } = le(), { activeWorkspace: H, events: f } = fe(), x = i(), l = i(""), s = i(null), c = i(-1), $ = i([]), v = T(
|
|
94
|
+
() => P.reduce((e, o) => {
|
|
95
|
+
const t = o.commands.filter(
|
|
81
96
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
82
97
|
);
|
|
83
|
-
return [...
|
|
98
|
+
return [...e, ...t];
|
|
84
99
|
}, [])
|
|
85
|
-
),
|
|
86
|
-
d.hide(), l.value = "", s.value = null,
|
|
87
|
-
},
|
|
88
|
-
l.value !== "" && (
|
|
89
|
-
var
|
|
90
|
-
return (
|
|
100
|
+
), C = () => {
|
|
101
|
+
d.hide(), l.value = "", s.value = null, c.value = -1;
|
|
102
|
+
}, O = (e) => {
|
|
103
|
+
l.value !== "" && (e == null || e.preventDefault()), s.value = null, V(() => {
|
|
104
|
+
var o;
|
|
105
|
+
return (o = _.value) == null ? void 0 : o.focus();
|
|
91
106
|
});
|
|
92
|
-
},
|
|
93
|
-
"path" in
|
|
94
|
-
},
|
|
95
|
-
commandName:
|
|
96
|
-
metaData:
|
|
107
|
+
}, D = (e) => {
|
|
108
|
+
"path" in e ? (W(`/workspace/${H.value.uid}${e.path}`), C()) : s.value = e.name;
|
|
109
|
+
}, _ = i(), I = ({
|
|
110
|
+
commandName: e,
|
|
111
|
+
metaData: o
|
|
97
112
|
} = {}) => {
|
|
98
|
-
s.value =
|
|
113
|
+
s.value = e ?? null, x.value = o, d.show(), V(() => {
|
|
99
114
|
var t;
|
|
100
|
-
return (t =
|
|
115
|
+
return (t = _.value) == null ? void 0 : t.focus();
|
|
101
116
|
});
|
|
102
117
|
};
|
|
103
|
-
|
|
104
|
-
|
|
118
|
+
F(l, (e) => {
|
|
119
|
+
e && v.value.length > 0 && (c.value = 0);
|
|
105
120
|
});
|
|
106
|
-
const
|
|
107
|
-
var
|
|
121
|
+
const R = (e, o) => {
|
|
122
|
+
var h;
|
|
108
123
|
if (!d.open) return;
|
|
109
|
-
|
|
110
|
-
const t =
|
|
111
|
-
|
|
124
|
+
o.preventDefault();
|
|
125
|
+
const t = e === "up" ? -1 : 1, n = v.value.length;
|
|
126
|
+
c.value = (c.value + t + n) % n, (h = $.value[c.value]) == null || h.scrollIntoView({
|
|
112
127
|
behavior: "smooth",
|
|
113
128
|
block: "nearest"
|
|
114
129
|
});
|
|
115
|
-
},
|
|
116
|
-
() =>
|
|
117
|
-
),
|
|
118
|
-
!
|
|
119
|
-
},
|
|
120
|
-
d.open &&
|
|
130
|
+
}, k = T(
|
|
131
|
+
() => v.value[c.value]
|
|
132
|
+
), U = (e) => {
|
|
133
|
+
!k.value || s.value || (e.preventDefault(), e.stopPropagation(), D(k.value));
|
|
134
|
+
}, L = (e) => {
|
|
135
|
+
d.open && e != null && e.closeModal && C();
|
|
121
136
|
};
|
|
122
137
|
return G(() => {
|
|
123
|
-
|
|
138
|
+
f.commandPalette.on(I), f.hotKeys.on(L);
|
|
124
139
|
}), Q(() => {
|
|
125
|
-
|
|
126
|
-
}), (
|
|
140
|
+
f.commandPalette.off(I), f.hotKeys.off(L);
|
|
141
|
+
}), (e, o) => (a(), z(r(te), {
|
|
127
142
|
open: r(d).open,
|
|
128
|
-
onClose:
|
|
143
|
+
onClose: o[5] || (o[5] = (t) => C())
|
|
129
144
|
}, {
|
|
130
|
-
default:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
default:
|
|
134
|
-
|
|
135
|
-
default:
|
|
136
|
-
|
|
145
|
+
default: y(() => [
|
|
146
|
+
o[7] || (o[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
|
|
147
|
+
p(r(ne), { class: "commandmenu z-overlay flex flex-co" }, {
|
|
148
|
+
default: y(() => [
|
|
149
|
+
p(r(ae), { class: "sr-only" }, {
|
|
150
|
+
default: y(() => o[6] || (o[6] = [
|
|
151
|
+
K("API Client Command Menu")
|
|
137
152
|
])),
|
|
138
153
|
_: 1
|
|
139
154
|
}),
|
|
140
|
-
s.value ? (a(), m(
|
|
155
|
+
s.value ? (a(), m("div", be, [
|
|
141
156
|
u("button", {
|
|
142
157
|
class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
|
|
143
158
|
type: "button",
|
|
144
|
-
onClick:
|
|
159
|
+
onClick: o[3] || (o[3] = (t) => s.value = null)
|
|
145
160
|
}, [
|
|
146
|
-
|
|
161
|
+
p(r(A), {
|
|
147
162
|
icon: "ChevronLeft",
|
|
148
163
|
size: "md",
|
|
149
164
|
thickness: "1.5"
|
|
150
165
|
})
|
|
151
166
|
]),
|
|
152
|
-
(a(),
|
|
153
|
-
onBack:
|
|
154
|
-
onClose:
|
|
167
|
+
(a(), z(Z(we[s.value]), ee(x.value ? { metaData: x.value } : {}, {
|
|
168
|
+
onBack: o[4] || (o[4] = (t) => O(t)),
|
|
169
|
+
onClose: C
|
|
155
170
|
}), null, 16))
|
|
156
|
-
]
|
|
157
|
-
u("div",
|
|
158
|
-
u("label",
|
|
159
|
-
|
|
171
|
+
])) : (a(), m("div", ve, [
|
|
172
|
+
u("div", Ce, [
|
|
173
|
+
u("label", he, [
|
|
174
|
+
p(r(A), {
|
|
160
175
|
class: "text-c-2 mr-2.5",
|
|
161
176
|
icon: "Search",
|
|
162
177
|
size: "md",
|
|
163
178
|
thickness: "1.5"
|
|
164
179
|
})
|
|
165
180
|
]),
|
|
166
|
-
|
|
181
|
+
M(u("input", {
|
|
167
182
|
id: "commandmenu",
|
|
168
183
|
ref_key: "commandInputRef",
|
|
169
|
-
ref:
|
|
170
|
-
"onUpdate:modelValue":
|
|
184
|
+
ref: _,
|
|
185
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => l.value = t),
|
|
171
186
|
autocomplete: "off",
|
|
172
187
|
autofocus: "",
|
|
173
188
|
class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
|
|
174
189
|
placeholder: "Search commands...",
|
|
175
190
|
type: "text",
|
|
176
191
|
onKeydown: [
|
|
177
|
-
|
|
178
|
-
g(
|
|
179
|
-
|
|
192
|
+
o[1] || (o[1] = w(g((t) => R("down", t), ["stop"]), ["down"])),
|
|
193
|
+
w(g(U, ["stop"]), ["enter"]),
|
|
194
|
+
o[2] || (o[2] = w(g((t) => R("up", t), ["stop"]), ["up"]))
|
|
180
195
|
]
|
|
181
|
-
}, null, 40,
|
|
196
|
+
}, null, 40, xe), [
|
|
182
197
|
[j, l.value]
|
|
183
198
|
])
|
|
184
199
|
]),
|
|
185
|
-
(a(), m(
|
|
200
|
+
(a(), m(S, null, B(P, (t) => (a(), m(S, {
|
|
186
201
|
key: t.label
|
|
187
202
|
}, [
|
|
188
|
-
|
|
203
|
+
M(u("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, N(t.label), 513), [
|
|
189
204
|
[
|
|
190
205
|
J,
|
|
191
206
|
t.commands.filter(
|
|
@@ -193,33 +208,33 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
|
|
|
193
208
|
).length > 0
|
|
194
209
|
]
|
|
195
210
|
]),
|
|
196
|
-
(a(!0), m(
|
|
211
|
+
(a(!0), m(S, null, B(t.commands.filter(
|
|
197
212
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
198
|
-
), (n,
|
|
199
|
-
var
|
|
213
|
+
), (n, h) => {
|
|
214
|
+
var E;
|
|
200
215
|
return a(), m("div", {
|
|
201
216
|
key: n.name,
|
|
202
217
|
ref_for: !0,
|
|
203
|
-
ref: (
|
|
204
|
-
|
|
218
|
+
ref: (b) => {
|
|
219
|
+
b && ($.value[h] = b);
|
|
205
220
|
},
|
|
206
221
|
class: X(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
|
|
207
|
-
"bg-b-2": n.name === ((
|
|
222
|
+
"bg-b-2": n.name === ((E = k.value) == null ? void 0 : E.name)
|
|
208
223
|
}]),
|
|
209
|
-
onClick: (
|
|
224
|
+
onClick: (b) => D(n)
|
|
210
225
|
}, [
|
|
211
|
-
|
|
226
|
+
p(r(A), {
|
|
212
227
|
class: "text-c-2 mr-2.5",
|
|
213
228
|
icon: n.icon,
|
|
214
229
|
size: "md",
|
|
215
230
|
thickness: "1.5"
|
|
216
231
|
}, null, 8, ["icon"]),
|
|
217
|
-
|
|
218
|
-
], 10,
|
|
232
|
+
K(" " + N(n.name), 1)
|
|
233
|
+
], 10, _e);
|
|
219
234
|
}), 128))
|
|
220
235
|
], 64))), 64)),
|
|
221
|
-
|
|
222
|
-
]
|
|
236
|
+
v.value.length ? Y("", !0) : (a(), m("div", ke, " No commands found "))
|
|
237
|
+
]))
|
|
223
238
|
]),
|
|
224
239
|
_: 1
|
|
225
240
|
})
|
|
@@ -229,6 +244,6 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
|
|
|
229
244
|
}
|
|
230
245
|
});
|
|
231
246
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
247
|
+
we as PaletteComponents,
|
|
248
|
+
Be as default
|
|
234
249
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;qBAsCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;SAnEZ,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;QAAlB,MAAM,GAAG,SAAS;6EA0EzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as r, openBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as r, openBlock as t, createBlock as o, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ r({
|
|
3
3
|
__name: "DataTableCell",
|
|
4
4
|
props: {
|
|
5
5
|
is: { default: "td" }
|
|
6
6
|
},
|
|
7
7
|
setup(s) {
|
|
8
|
-
return (e, d) => (
|
|
9
|
-
class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative
|
|
8
|
+
return (e, d) => (t(), o(l(e.is), {
|
|
9
|
+
class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative",
|
|
10
10
|
role: "cell"
|
|
11
11
|
}, {
|
|
12
12
|
default: a(() => [
|
|
@@ -17,5 +17,5 @@ const i = /* @__PURE__ */ r({
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
m as default
|
|
21
21
|
};
|
|
@@ -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":";AA+KA,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-b96e8d60"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ROUTES as
|
|
3
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as d, openBlock as n, createElementBlock as r, createElementVNode as e, Fragment as u, renderList as x, unref as o, createVNode as i, withCtx as m, createTextVNode as f, toDisplayString as v } from "vue";
|
|
2
|
+
import { ROUTES as y } from "../../constants.js";
|
|
3
|
+
import { useRouter as N } from "vue-router";
|
|
4
4
|
import h from "./SideHelp.vue.js";
|
|
5
5
|
import _ from "./SideNavLink.vue.js";
|
|
6
|
-
const
|
|
7
|
-
"aria-label": "
|
|
8
|
-
class: "text-c-2 w-
|
|
6
|
+
const S = {
|
|
7
|
+
"aria-label": "App Navigation",
|
|
8
|
+
class: "text-c-2 sm:w-13 flex sm:flex-col justify-center items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1 border-t-1/2",
|
|
9
9
|
role: "navigation"
|
|
10
|
-
}, b = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" },
|
|
10
|
+
}, b = { class: "flex sm:flex-col gap-1.5" }, k = { class: "mt-auto flex sm:flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, A = /* @__PURE__ */ d({
|
|
11
11
|
__name: "SideNav",
|
|
12
12
|
setup(V) {
|
|
13
|
-
const { currentRoute:
|
|
14
|
-
return (w, l) => (
|
|
13
|
+
const { currentRoute: a } = N();
|
|
14
|
+
return (w, l) => (n(), r("nav", S, [
|
|
15
15
|
e("ul", b, [
|
|
16
|
-
(
|
|
16
|
+
(n(!0), r(u, null, x(o(y).filter(
|
|
17
17
|
(t) => t.name !== "settings"
|
|
18
|
-
), ({ icon: t, name:
|
|
18
|
+
), ({ icon: t, name: s, prettyName: g }, p) => {
|
|
19
19
|
var c;
|
|
20
|
-
return
|
|
21
|
-
key:
|
|
20
|
+
return n(), r("li", {
|
|
21
|
+
key: p,
|
|
22
22
|
class: "no-drag-region"
|
|
23
23
|
}, [
|
|
24
|
-
|
|
25
|
-
active: (c =
|
|
24
|
+
i(_, {
|
|
25
|
+
active: (c = o(a).name) == null ? void 0 : c.startsWith(s),
|
|
26
26
|
icon: t,
|
|
27
|
-
name:
|
|
28
|
-
prettyName:
|
|
27
|
+
name: s,
|
|
28
|
+
prettyName: g
|
|
29
29
|
}, {
|
|
30
30
|
default: m(() => [
|
|
31
|
-
f(v(
|
|
31
|
+
f(v(s), 1)
|
|
32
32
|
]),
|
|
33
33
|
_: 2
|
|
34
34
|
}, 1032, ["active", "icon", "name", "prettyName"])
|
|
@@ -37,8 +37,8 @@ const y = {
|
|
|
37
37
|
]),
|
|
38
38
|
e("ul", k, [
|
|
39
39
|
e("li", E, [
|
|
40
|
-
|
|
41
|
-
active:
|
|
40
|
+
i(_, {
|
|
41
|
+
active: o(a).name === "settings",
|
|
42
42
|
icon: "Settings",
|
|
43
43
|
name: "settings",
|
|
44
44
|
prettyName: "Settings"
|
|
@@ -50,12 +50,12 @@ const y = {
|
|
|
50
50
|
}, 8, ["active"])
|
|
51
51
|
]),
|
|
52
52
|
e("li", R, [
|
|
53
|
-
|
|
53
|
+
i(h)
|
|
54
54
|
])
|
|
55
55
|
])
|
|
56
56
|
]));
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
A as default
|
|
61
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA2BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
|
|
2
2
|
import l from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return o(), r("div",
|
|
3
|
+
const d = {}, n = { class: "flex flex-col min-h-0 flex-1 *:border-t-1/2 first:*:border-t-0 md:*:border-t-0 xl:overflow-hidden md:flex-row leading-3" };
|
|
4
|
+
function c(e, f) {
|
|
5
|
+
return o(), r("div", n, [
|
|
6
6
|
t(e.$slots, "default")
|
|
7
7
|
]);
|
|
8
8
|
}
|
|
9
|
-
const a = /* @__PURE__ */ l(
|
|
9
|
+
const a = /* @__PURE__ */ l(d, [["render", c]]);
|
|
10
10
|
export {
|
|
11
11
|
a as default
|
|
12
12
|
};
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const e = [
|
|
2
2
|
{ prettyName: "Request", name: "request", icon: "ExternalLink" },
|
|
3
3
|
{ prettyName: "Cookies", name: "cookies", icon: "Cookie" },
|
|
4
|
-
{ prettyName: "
|
|
4
|
+
{ prettyName: "Environment", name: "environment", icon: "Brackets" },
|
|
5
5
|
{ prettyName: "Settings", name: "settings", icon: "Settings" }
|
|
6
6
|
// { prettyName: 'Servers', name: 'servers', icon: 'Server' },
|
|
7
7
|
// { label: 'Git Sync', icon: 'Branch', path: '/git-sync' },
|
|
@@ -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":";;cA8R8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
|
|
@@ -1,57 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { addScalarClassesToHeadless as
|
|
5
|
-
import { getThemeStyles as
|
|
6
|
-
import { ScalarToasts as
|
|
7
|
-
import { RouterView as
|
|
8
|
-
import { APP_HOTKEYS as
|
|
9
|
-
import { useDarkModeState as
|
|
10
|
-
import V from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
1
|
+
import { defineComponent as v, ref as w, onBeforeMount as T, onMounted as _, onBeforeUnmount as k, computed as y, openBlock as t, createElementBlock as h, Fragment as N, createElementVNode as S, createVNode as n, unref as r, createBlock as a, withCtx as c, KeepAlive as E, resolveDynamicComponent as K, createCommentVNode as b } from "vue";
|
|
2
|
+
import C from "../../components/TopNav/TopNav.vue.js";
|
|
3
|
+
import H from "./MainLayout.vue.js";
|
|
4
|
+
import { addScalarClassesToHeadless as A } from "@scalar/components";
|
|
5
|
+
import { getThemeStyles as B } from "@scalar/themes";
|
|
6
|
+
import { ScalarToasts as D } from "@scalar/use-toasts";
|
|
7
|
+
import { RouterView as L } from "vue-router";
|
|
8
|
+
import { APP_HOTKEYS as M } from "./hotkeys.js";
|
|
9
|
+
import { useDarkModeState as V } from "../../hooks/useDarkModeState.js";
|
|
11
10
|
import { DEFAULT_HOTKEYS as W, handleHotKeyDown as g } from "../../libs/hot-keys.js";
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
const F = ["innerHTML"],
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "flex min-h-0 flex-1"
|
|
16
|
-
}, U = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, te = /* @__PURE__ */ w({
|
|
11
|
+
import { useWorkspace as x } from "../../store/store.js";
|
|
12
|
+
const F = ["innerHTML"], X = /* @__PURE__ */ v({
|
|
17
13
|
__name: "ApiClientApp",
|
|
18
14
|
emits: ["newTab"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
15
|
+
setup(O) {
|
|
16
|
+
const i = { ...W, ...M }, m = w(null), p = (o) => {
|
|
17
|
+
m.value = o;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
() =>
|
|
19
|
+
V();
|
|
20
|
+
const e = x(), { events: u } = e;
|
|
21
|
+
T(() => A());
|
|
22
|
+
const s = (o) => g(o, u.hotKeys, { hotKeys: i });
|
|
23
|
+
_(() => window.addEventListener("keydown", s)), k(() => window.removeEventListener("keydown", s));
|
|
24
|
+
const d = y(
|
|
25
|
+
() => e.activeWorkspace.value && `<style>${B(e.activeWorkspace.value.themeId)}</style>`
|
|
30
26
|
);
|
|
31
|
-
return (
|
|
32
|
-
var
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(n(), c(b, null, [
|
|
43
|
-
(n(), c(x(v)))
|
|
27
|
+
return (o, P) => {
|
|
28
|
+
var l;
|
|
29
|
+
return t(), h(N, null, [
|
|
30
|
+
S("div", { innerHTML: d.value }, null, 8, F),
|
|
31
|
+
n(C, { openNewTab: m.value }, null, 8, ["openNewTab"]),
|
|
32
|
+
(l = r(e).activeWorkspace.value) != null && l.uid ? (t(), a(H, { key: 0 }, {
|
|
33
|
+
default: c(() => [
|
|
34
|
+
n(r(L), { onNewTab: p }, {
|
|
35
|
+
default: c(({ Component: f }) => [
|
|
36
|
+
(t(), a(E, null, [
|
|
37
|
+
(t(), a(K(f)))
|
|
44
38
|
], 1024))
|
|
45
39
|
]),
|
|
46
40
|
_: 1
|
|
47
41
|
})
|
|
48
|
-
])
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
})) : b("", !0),
|
|
45
|
+
n(r(D))
|
|
51
46
|
], 64);
|
|
52
47
|
};
|
|
53
48
|
}
|
|
54
49
|
});
|
|
55
50
|
export {
|
|
56
|
-
|
|
51
|
+
X as default
|
|
57
52
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=MainLayout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA6BA,iBAAS,cAAc;qBAmDO,GAAG;EAehC;AACD,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as t, createElementBlock as l, createVNode as e, unref as n, createElementVNode as s, renderSlot as a } from "vue";
|
|
2
|
+
import m from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
+
import c from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
4
|
+
const d = { class: "flex flex-col sm:flex-row min-h-0 flex-1" }, f = { class: "flex flex-1 flex-col min-w-0 min-h-0 border-l-1/2 border-t-1/2" }, h = /* @__PURE__ */ r({
|
|
5
|
+
__name: "MainLayout",
|
|
6
|
+
setup(i) {
|
|
7
|
+
return (o, _) => (t(), l("main", d, [
|
|
8
|
+
e(m, { class: "order-last sm:order-none" }),
|
|
9
|
+
e(n(c)),
|
|
10
|
+
s("div", f, [
|
|
11
|
+
a(o.$slots, "default")
|
|
12
|
+
])
|
|
13
|
+
]));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
h as default
|
|
18
|
+
};
|