@websublime/vite-plugin-open-api-devtools 0.7.0 → 0.8.0
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/dist/{ModelsPage-CSuUHUuV.js → ModelsPage-DEKnJYaY.js} +5 -5
- package/dist/{ModelsPage-CSuUHUuV.js.map → ModelsPage-DEKnJYaY.js.map} +1 -1
- package/dist/{RoutesPage-D3FSr2Y6.js → RoutesPage-DJQFqkO5.js} +4 -4
- package/dist/{RoutesPage-D3FSr2Y6.js.map → RoutesPage-DJQFqkO5.js.map} +1 -1
- package/dist/{SimulatorPage-CzJrwWzc.js → SimulatorPage-DAwHHeu0.js} +4 -4
- package/dist/{SimulatorPage-CzJrwWzc.js.map → SimulatorPage-DAwHHeu0.js.map} +1 -1
- package/dist/{TimelinePage-HGh13pF3.js → TimelinePage-DdznQBTd.js} +7 -7
- package/dist/{TimelinePage-HGh13pF3.js.map → TimelinePage-DdznQBTd.js.map} +1 -1
- package/dist/{check-BLIoatWd.js → check-CZ-YsL8n.js} +2 -2
- package/dist/{check-BLIoatWd.js.map → check-CZ-YsL8n.js.map} +1 -1
- package/dist/devtools.css +1 -1
- package/dist/devtools.js +1 -1
- package/dist/devtools.umd.cjs +2 -2
- package/dist/devtools.umd.cjs.map +1 -1
- package/dist/{format-lBEBG5Y6.js → format-xvYNYz8d.js} +2 -2
- package/dist/{format-lBEBG5Y6.js.map → format-xvYNYz8d.js.map} +1 -1
- package/dist/{main-DKt7pJsx.js → main-C-2gO_cM.js} +250 -250
- package/dist/main-C-2gO_cM.js.map +1 -0
- package/dist/spa/assets/{ModelsPage-DqYHHuAQ.js → ModelsPage-Dlw4slrw.js} +3 -3
- package/dist/spa/assets/{ModelsPage-DqYHHuAQ.js.map → ModelsPage-Dlw4slrw.js.map} +1 -1
- package/dist/spa/assets/RoutesPage-DVkEOssu.js +2 -0
- package/dist/spa/assets/{RoutesPage-Bhnu6w5-.js.map → RoutesPage-DVkEOssu.js.map} +1 -1
- package/dist/spa/assets/SimulatorPage-C2EEtkx8.js +2 -0
- package/dist/spa/assets/{SimulatorPage-ROKoAmUT.js.map → SimulatorPage-C2EEtkx8.js.map} +1 -1
- package/dist/spa/assets/TimelinePage-C_LK2wKS.js +2 -0
- package/dist/spa/assets/{TimelinePage-CwR-Coxj.js.map → TimelinePage-C_LK2wKS.js.map} +1 -1
- package/dist/spa/assets/check-B_DaLrgB.js +2 -0
- package/dist/spa/assets/{check-DxJBRQqh.js.map → check-B_DaLrgB.js.map} +1 -1
- package/dist/spa/assets/{format-B1udViy3.js → format-r8dlo_ab.js} +2 -2
- package/dist/spa/assets/{format-B1udViy3.js.map → format-r8dlo_ab.js.map} +1 -1
- package/dist/spa/assets/index-CFIFFTBf.css +1 -0
- package/dist/spa/assets/index-Dff2RvrN.js +3 -0
- package/dist/spa/assets/index-Dff2RvrN.js.map +1 -0
- package/dist/spa/assets/{registry-Z11QUkpV.js → registry-DjJcdO1T.js} +2 -2
- package/dist/spa/assets/{registry-Z11QUkpV.js.map → registry-DjJcdO1T.js.map} +1 -1
- package/dist/spa/assets/{trash-2-CDyKV6GB.js → trash-2-6KJWHoOC.js} +2 -2
- package/dist/spa/assets/{trash-2-CDyKV6GB.js.map → trash-2-6KJWHoOC.js.map} +1 -1
- package/dist/spa/assets/{triangle-alert-CAGaIjAo.js → triangle-alert-Dx8lMHrF.js} +2 -2
- package/dist/spa/assets/{triangle-alert-CAGaIjAo.js.map → triangle-alert-Dx8lMHrF.js.map} +1 -1
- package/dist/spa/assets/{vue-vendor-CtA47il-.js → vue-vendor-Bkktf9yg.js} +2 -2
- package/dist/spa/assets/{vue-vendor-CtA47il-.js.map → vue-vendor-Bkktf9yg.js.map} +1 -1
- package/dist/spa/assets/x-B6bG8oob.js +2 -0
- package/dist/spa/assets/{x-zxrccEon.js.map → x-B6bG8oob.js.map} +1 -1
- package/dist/spa/index.html +3 -3
- package/dist/{trash-2-RxS9jzWT.js → trash-2-BiCAm7lq.js} +2 -2
- package/dist/{trash-2-RxS9jzWT.js.map → trash-2-BiCAm7lq.js.map} +1 -1
- package/dist/{triangle-alert-gLhIcFT5.js → triangle-alert-C8PD5_Zo.js} +2 -2
- package/dist/{triangle-alert-gLhIcFT5.js.map → triangle-alert-C8PD5_Zo.js.map} +1 -1
- package/dist/{x-UqfnjULc.js → x-Boe7tiDp.js} +2 -2
- package/dist/{x-UqfnjULc.js.map → x-Boe7tiDp.js.map} +1 -1
- package/package.json +12 -12
- package/dist/main-DKt7pJsx.js.map +0 -1
- package/dist/spa/assets/RoutesPage-Bhnu6w5-.js +0 -2
- package/dist/spa/assets/SimulatorPage-ROKoAmUT.js +0 -2
- package/dist/spa/assets/TimelinePage-CwR-Coxj.js +0 -2
- package/dist/spa/assets/check-DxJBRQqh.js +0 -2
- package/dist/spa/assets/index-9_6u4UTF.css +0 -1
- package/dist/spa/assets/index-GQ9qRqEi.js +0 -3
- package/dist/spa/assets/index-GQ9qRqEi.js.map +0 -1
- package/dist/spa/assets/useWebSocket-C2ttWF5T.js +0 -2
- package/dist/spa/assets/useWebSocket-C2ttWF5T.js.map +0 -1
- package/dist/spa/assets/x-zxrccEon.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPinia as ce } from "pinia";
|
|
2
|
-
import { h as $,
|
|
2
|
+
import { h as $, computed as i, ref as T, onMounted as Y, getCurrentInstance as X, defineComponent as se, resolveComponent as re, createElementBlock as A, openBlock as g, createElementVNode as d, createVNode as O, unref as w, Fragment as le, renderList as ie, normalizeClass as U, createBlock as W, resolveDynamicComponent as N, toDisplayString as F, withCtx as j, Transition as ue, watch as de, onUnmounted as pe, createApp as fe } from "vue";
|
|
3
3
|
import { createRouter as me, createWebHashHistory as he, useRoute as ve, useRouter as ke } from "vue-router";
|
|
4
4
|
const Z = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ye = (e) => e.replace(
|
|
5
5
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
@@ -8,7 +8,7 @@ const Z = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ye = (e
|
|
|
8
8
|
const t = ye(e);
|
|
9
9
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
10
10
|
}, ge = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
|
|
11
|
-
var
|
|
11
|
+
var M = {
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
width: 24,
|
|
14
14
|
height: 24,
|
|
@@ -19,23 +19,23 @@ var T = {
|
|
|
19
19
|
"stroke-linecap": "round",
|
|
20
20
|
"stroke-linejoin": "round"
|
|
21
21
|
};
|
|
22
|
-
const we = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: a, iconNode: s, name:
|
|
22
|
+
const we = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: a, iconNode: s, name: l, class: v, ...k }, { slots: m }) => $(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
25
|
-
...
|
|
26
|
-
width: e ||
|
|
27
|
-
height: e ||
|
|
28
|
-
stroke: a ||
|
|
25
|
+
...M,
|
|
26
|
+
width: e || M.width,
|
|
27
|
+
height: e || M.height,
|
|
28
|
+
stroke: a || M.stroke,
|
|
29
29
|
"stroke-width": n ? Number(t) * 24 / Number(e) : t,
|
|
30
30
|
class: ge(
|
|
31
31
|
"lucide",
|
|
32
|
-
...
|
|
32
|
+
...l ? [`lucide-${Z(_e(l))}-icon`, `lucide-${Z(l)}`] : ["lucide-icon"]
|
|
33
33
|
),
|
|
34
34
|
...k
|
|
35
35
|
},
|
|
36
36
|
[...s.map((o) => $(...o)), ...m.default ? [m.default()] : []]
|
|
37
37
|
);
|
|
38
|
-
const
|
|
38
|
+
const S = (e, t) => (n, { slots: a }) => $(
|
|
39
39
|
we,
|
|
40
40
|
{
|
|
41
41
|
...n,
|
|
@@ -44,21 +44,21 @@ const b = (e, t) => (n, { slots: a }) => $(
|
|
|
44
44
|
},
|
|
45
45
|
a
|
|
46
46
|
);
|
|
47
|
-
const be =
|
|
47
|
+
const be = S("clock", [
|
|
48
48
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
49
49
|
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
|
|
50
50
|
]);
|
|
51
|
-
const Se =
|
|
51
|
+
const Se = S("database", [
|
|
52
52
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
53
53
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
54
54
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
55
55
|
]);
|
|
56
|
-
const G =
|
|
56
|
+
const G = S("route", [
|
|
57
57
|
["circle", { cx: "6", cy: "19", r: "3", key: "1kj8tv" }],
|
|
58
58
|
["path", { d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15", key: "1d8sl" }],
|
|
59
59
|
["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }]
|
|
60
60
|
]);
|
|
61
|
-
const Ce =
|
|
61
|
+
const Ce = S("wifi-off", [
|
|
62
62
|
["path", { d: "M12 20h.01", key: "zekei9" }],
|
|
63
63
|
["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
|
|
64
64
|
["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
|
|
@@ -67,13 +67,13 @@ const Ce = b("wifi-off", [
|
|
|
67
67
|
["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
|
|
68
68
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
69
69
|
]);
|
|
70
|
-
const Te =
|
|
70
|
+
const Te = S("wifi", [
|
|
71
71
|
["path", { d: "M12 20h.01", key: "zekei9" }],
|
|
72
72
|
["path", { d: "M2 8.82a15 15 0 0 1 20 0", key: "dnpr2z" }],
|
|
73
73
|
["path", { d: "M5 12.859a10 10 0 0 1 14 0", key: "1x1e6c" }],
|
|
74
74
|
["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }]
|
|
75
75
|
]);
|
|
76
|
-
const Q =
|
|
76
|
+
const Q = S("zap", [
|
|
77
77
|
[
|
|
78
78
|
"path",
|
|
79
79
|
{
|
|
@@ -81,7 +81,181 @@ const Q = b("zap", [
|
|
|
81
81
|
key: "1xq2db"
|
|
82
82
|
}
|
|
83
83
|
]
|
|
84
|
-
]),
|
|
84
|
+
]), H = {
|
|
85
|
+
path: "/_ws",
|
|
86
|
+
reconnectDelay: 2e3,
|
|
87
|
+
maxReconnectAttempts: Number.POSITIVE_INFINITY,
|
|
88
|
+
autoConnect: !0
|
|
89
|
+
}, r = T("disconnected"), P = T(null), C = T(0);
|
|
90
|
+
let c = null, x = null, b = { ...H }, L = !1;
|
|
91
|
+
const p = /* @__PURE__ */ new Map();
|
|
92
|
+
function ee() {
|
|
93
|
+
return typeof window < "u" && typeof WebSocket < "u";
|
|
94
|
+
}
|
|
95
|
+
function Me() {
|
|
96
|
+
return X() !== null;
|
|
97
|
+
}
|
|
98
|
+
function De(e) {
|
|
99
|
+
return ee() ? `${window.location.protocol === "https:" ? "wss:" : "ws:"}//${window.location.host}${e}` : `ws://localhost${e}`;
|
|
100
|
+
}
|
|
101
|
+
function te() {
|
|
102
|
+
x !== null && (clearTimeout(x), x = null);
|
|
103
|
+
}
|
|
104
|
+
function Ee(e, t) {
|
|
105
|
+
const n = p.get(e);
|
|
106
|
+
if (n)
|
|
107
|
+
for (const s of n)
|
|
108
|
+
try {
|
|
109
|
+
s(t);
|
|
110
|
+
} catch (l) {
|
|
111
|
+
console.error(`[DevTools WebSocket] Error in event handler for '${e}':`, l);
|
|
112
|
+
}
|
|
113
|
+
const a = p.get("*");
|
|
114
|
+
if (a)
|
|
115
|
+
for (const s of a)
|
|
116
|
+
try {
|
|
117
|
+
s({ type: e, data: t });
|
|
118
|
+
} catch (l) {
|
|
119
|
+
console.error("[DevTools WebSocket] Error in wildcard event handler:", l);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function Ie() {
|
|
123
|
+
r.value = "connected", C.value = 0, te();
|
|
124
|
+
}
|
|
125
|
+
function xe(e) {
|
|
126
|
+
try {
|
|
127
|
+
const t = JSON.parse(e.data);
|
|
128
|
+
if (t.type === "connected") {
|
|
129
|
+
const n = t.data;
|
|
130
|
+
P.value = n.serverVersion;
|
|
131
|
+
}
|
|
132
|
+
Ee(t.type, t.data);
|
|
133
|
+
} catch (t) {
|
|
134
|
+
console.error("[DevTools WebSocket] Failed to parse message:", t);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function Ae() {
|
|
138
|
+
r.value, r.value = "disconnected", c = null, C.value < b.maxReconnectAttempts && (r.value = "reconnecting", C.value++, x = setTimeout(() => {
|
|
139
|
+
R();
|
|
140
|
+
}, b.reconnectDelay));
|
|
141
|
+
}
|
|
142
|
+
function Oe(e) {
|
|
143
|
+
console.error("[DevTools WebSocket] Error:", e);
|
|
144
|
+
}
|
|
145
|
+
function R() {
|
|
146
|
+
if (!ee() || r.value === "connecting" || r.value === "connected" || c && (c.readyState === WebSocket.CONNECTING || c.readyState === WebSocket.OPEN))
|
|
147
|
+
return;
|
|
148
|
+
ne(), r.value = "connecting";
|
|
149
|
+
const e = De(b.path);
|
|
150
|
+
try {
|
|
151
|
+
c = new WebSocket(e), c.onopen = Ie, c.onmessage = xe, c.onclose = Ae, c.onerror = Oe;
|
|
152
|
+
} catch (t) {
|
|
153
|
+
console.error("[DevTools WebSocket] Failed to create WebSocket:", t), r.value = "disconnected";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function ne() {
|
|
157
|
+
c && (c.onopen = null, c.onmessage = null, c.onclose = null, c.onerror = null, (c.readyState === WebSocket.OPEN || c.readyState === WebSocket.CONNECTING) && c.close(), c = null);
|
|
158
|
+
}
|
|
159
|
+
function oe() {
|
|
160
|
+
te(), ne(), r.value = "disconnected", C.value = 0;
|
|
161
|
+
}
|
|
162
|
+
function We(e) {
|
|
163
|
+
if (!c || c.readyState !== WebSocket.OPEN)
|
|
164
|
+
return !1;
|
|
165
|
+
try {
|
|
166
|
+
return c.send(JSON.stringify(e)), !0;
|
|
167
|
+
} catch (t) {
|
|
168
|
+
return console.error("[DevTools WebSocket] Failed to send command:", t), !1;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function B(e, t) {
|
|
172
|
+
p.has(e) || p.set(e, /* @__PURE__ */ new Set());
|
|
173
|
+
const n = p.get(e);
|
|
174
|
+
return n && n.add(t), () => {
|
|
175
|
+
const a = p.get(e);
|
|
176
|
+
a && (a.delete(t), a.size === 0 && p.delete(e));
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function V(e, t) {
|
|
180
|
+
const n = p.get(e);
|
|
181
|
+
n && (n.delete(t), n.size === 0 && p.delete(e));
|
|
182
|
+
}
|
|
183
|
+
function Ne(e, t) {
|
|
184
|
+
const n = (a) => {
|
|
185
|
+
V(e, n), t(a);
|
|
186
|
+
};
|
|
187
|
+
return B(e, n);
|
|
188
|
+
}
|
|
189
|
+
function ze(e, t) {
|
|
190
|
+
const n = (a) => {
|
|
191
|
+
t(a) === !0 && V(e, n);
|
|
192
|
+
};
|
|
193
|
+
return B(e, n);
|
|
194
|
+
}
|
|
195
|
+
function $e() {
|
|
196
|
+
oe(), P.value = null, p.clear(), b = { ...H }, L = !1;
|
|
197
|
+
}
|
|
198
|
+
function Le(e = {}) {
|
|
199
|
+
(!L || r.value === "disconnected") && (b = { ...H, ...e }, L = !0);
|
|
200
|
+
const t = i(() => r.value === "connected"), n = i(() => r.value === "reconnecting");
|
|
201
|
+
return Me() && Y(() => {
|
|
202
|
+
b.autoConnect && R();
|
|
203
|
+
}), {
|
|
204
|
+
/**
|
|
205
|
+
* Current connection state
|
|
206
|
+
*/
|
|
207
|
+
connectionState: i(() => r.value),
|
|
208
|
+
/**
|
|
209
|
+
* Whether the WebSocket is connected
|
|
210
|
+
*/
|
|
211
|
+
connected: t,
|
|
212
|
+
/**
|
|
213
|
+
* Whether the WebSocket is attempting to reconnect
|
|
214
|
+
*/
|
|
215
|
+
isReconnecting: n,
|
|
216
|
+
/**
|
|
217
|
+
* Server version received on connection
|
|
218
|
+
*/
|
|
219
|
+
serverVersion: i(() => P.value),
|
|
220
|
+
/**
|
|
221
|
+
* Number of reconnection attempts made
|
|
222
|
+
*/
|
|
223
|
+
reconnectAttempts: i(() => C.value),
|
|
224
|
+
/**
|
|
225
|
+
* Connect to the WebSocket server
|
|
226
|
+
*/
|
|
227
|
+
connect: R,
|
|
228
|
+
/**
|
|
229
|
+
* Disconnect from the WebSocket server
|
|
230
|
+
*/
|
|
231
|
+
disconnect: oe,
|
|
232
|
+
/**
|
|
233
|
+
* Send a command to the server
|
|
234
|
+
*/
|
|
235
|
+
send: We,
|
|
236
|
+
/**
|
|
237
|
+
* Subscribe to a server event
|
|
238
|
+
*/
|
|
239
|
+
on: B,
|
|
240
|
+
/**
|
|
241
|
+
* Unsubscribe from a server event
|
|
242
|
+
*/
|
|
243
|
+
off: V,
|
|
244
|
+
/**
|
|
245
|
+
* Subscribe to an event once (one-shot, auto-unsubscribes after first call)
|
|
246
|
+
*/
|
|
247
|
+
once: Ne,
|
|
248
|
+
/**
|
|
249
|
+
* Subscribe to an event until handler returns true
|
|
250
|
+
*/
|
|
251
|
+
onUntil: ze,
|
|
252
|
+
/**
|
|
253
|
+
* Reset the composable state (useful for testing)
|
|
254
|
+
*/
|
|
255
|
+
resetState: $e
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
const ae = [
|
|
85
259
|
{
|
|
86
260
|
path: "/",
|
|
87
261
|
redirect: "/routes"
|
|
@@ -89,7 +263,7 @@ const Q = b("zap", [
|
|
|
89
263
|
{
|
|
90
264
|
path: "/routes",
|
|
91
265
|
name: "routes",
|
|
92
|
-
component: () => import("./RoutesPage-
|
|
266
|
+
component: () => import("./RoutesPage-DJQFqkO5.js"),
|
|
93
267
|
meta: {
|
|
94
268
|
title: "Routes",
|
|
95
269
|
icon: "route"
|
|
@@ -98,7 +272,7 @@ const Q = b("zap", [
|
|
|
98
272
|
{
|
|
99
273
|
path: "/timeline",
|
|
100
274
|
name: "timeline",
|
|
101
|
-
component: () => import("./TimelinePage-
|
|
275
|
+
component: () => import("./TimelinePage-DdznQBTd.js"),
|
|
102
276
|
meta: {
|
|
103
277
|
title: "Timeline",
|
|
104
278
|
icon: "clock"
|
|
@@ -107,7 +281,7 @@ const Q = b("zap", [
|
|
|
107
281
|
{
|
|
108
282
|
path: "/models",
|
|
109
283
|
name: "models",
|
|
110
|
-
component: () => import("./ModelsPage-
|
|
284
|
+
component: () => import("./ModelsPage-DEKnJYaY.js"),
|
|
111
285
|
meta: {
|
|
112
286
|
title: "Models",
|
|
113
287
|
icon: "database"
|
|
@@ -116,7 +290,7 @@ const Q = b("zap", [
|
|
|
116
290
|
{
|
|
117
291
|
path: "/simulator",
|
|
118
292
|
name: "simulator",
|
|
119
|
-
component: () => import("./SimulatorPage-
|
|
293
|
+
component: () => import("./SimulatorPage-DAwHHeu0.js"),
|
|
120
294
|
meta: {
|
|
121
295
|
title: "Simulator",
|
|
122
296
|
icon: "zap"
|
|
@@ -128,25 +302,25 @@ const Q = b("zap", [
|
|
|
128
302
|
name: "not-found",
|
|
129
303
|
redirect: "/routes"
|
|
130
304
|
}
|
|
131
|
-
],
|
|
305
|
+
], Re = me({
|
|
132
306
|
history: he(),
|
|
133
|
-
routes:
|
|
134
|
-
}),
|
|
307
|
+
routes: ae
|
|
308
|
+
}), He = { class: "app" }, Pe = { class: "app-header" }, Be = { class: "app-header__brand" }, Ve = {
|
|
135
309
|
class: "app-nav",
|
|
136
310
|
role: "tablist",
|
|
137
311
|
"aria-label": "DevTools navigation"
|
|
138
|
-
},
|
|
312
|
+
}, Ue = ["aria-selected", "aria-current", "aria-controls", "onClick"], Fe = { class: "app-nav__label" }, je = { class: "app-header__status" }, Ze = { class: "connection-status" }, Ge = { class: "connection-status__text" }, Qe = { class: "app-main" }, qe = /* @__PURE__ */ se({
|
|
139
313
|
__name: "App",
|
|
140
314
|
setup(e) {
|
|
141
|
-
const t = ve(), n = ke(), a =
|
|
142
|
-
() =>
|
|
315
|
+
const t = ve(), n = ke(), a = i(
|
|
316
|
+
() => ae.filter((o) => o.name && o.meta?.title).map((o) => ({
|
|
143
317
|
name: o.name,
|
|
144
318
|
path: o.path,
|
|
145
319
|
title: o.meta?.title,
|
|
146
320
|
icon: o.meta?.icon
|
|
147
321
|
}))
|
|
148
|
-
), s =
|
|
149
|
-
function
|
|
322
|
+
), s = i(() => t.name);
|
|
323
|
+
function l(o) {
|
|
150
324
|
n.push(o);
|
|
151
325
|
}
|
|
152
326
|
const v = {
|
|
@@ -158,20 +332,20 @@ const Q = b("zap", [
|
|
|
158
332
|
function k(o) {
|
|
159
333
|
return v[o] ?? G;
|
|
160
334
|
}
|
|
161
|
-
const m =
|
|
335
|
+
const { connected: m } = Le();
|
|
162
336
|
return (o, y) => {
|
|
163
337
|
const _ = re("router-view");
|
|
164
|
-
return g(),
|
|
165
|
-
d("header",
|
|
166
|
-
d("div",
|
|
167
|
-
|
|
338
|
+
return g(), A("div", He, [
|
|
339
|
+
d("header", Pe, [
|
|
340
|
+
d("div", Be, [
|
|
341
|
+
O(w(Q), {
|
|
168
342
|
class: "app-header__logo",
|
|
169
343
|
size: 20
|
|
170
344
|
}),
|
|
171
345
|
y[0] || (y[0] = d("span", { class: "app-header__title" }, "OpenAPI DevTools", -1))
|
|
172
346
|
]),
|
|
173
|
-
d("nav",
|
|
174
|
-
(g(!0),
|
|
347
|
+
d("nav", Ve, [
|
|
348
|
+
(g(!0), A(le, null, ie(a.value, (u) => (g(), A("button", {
|
|
175
349
|
key: u.name,
|
|
176
350
|
role: "tab",
|
|
177
351
|
"aria-selected": s.value === u.name,
|
|
@@ -182,35 +356,35 @@ const Q = b("zap", [
|
|
|
182
356
|
"app-nav__tab",
|
|
183
357
|
{ "app-nav__tab--active": s.value === u.name }
|
|
184
358
|
]),
|
|
185
|
-
onClick: (
|
|
359
|
+
onClick: (tt) => l(u.path)
|
|
186
360
|
}, [
|
|
187
361
|
(g(), W(N(k(u.icon)), {
|
|
188
362
|
size: 16,
|
|
189
363
|
class: "app-nav__icon"
|
|
190
364
|
})),
|
|
191
|
-
d("span",
|
|
192
|
-
], 10,
|
|
365
|
+
d("span", Fe, F(u.title), 1)
|
|
366
|
+
], 10, Ue))), 128))
|
|
193
367
|
]),
|
|
194
|
-
d("div",
|
|
195
|
-
d("div",
|
|
368
|
+
d("div", je, [
|
|
369
|
+
d("div", Ze, [
|
|
196
370
|
d("span", {
|
|
197
371
|
class: U([
|
|
198
372
|
"connection-status__dot",
|
|
199
|
-
m
|
|
373
|
+
w(m) ? "connection-status__dot--connected" : "connection-status__dot--disconnected"
|
|
200
374
|
])
|
|
201
375
|
}, null, 2),
|
|
202
|
-
d("span",
|
|
203
|
-
(g(), W(N(m
|
|
376
|
+
d("span", Ge, F(w(m) ? "Connected" : "Disconnected"), 1),
|
|
377
|
+
(g(), W(N(w(m) ? w(Te) : w(Ce)), {
|
|
204
378
|
size: 14,
|
|
205
379
|
class: "connection-status__icon"
|
|
206
380
|
}))
|
|
207
381
|
])
|
|
208
382
|
])
|
|
209
383
|
]),
|
|
210
|
-
d("main",
|
|
211
|
-
|
|
384
|
+
d("main", Qe, [
|
|
385
|
+
O(_, null, {
|
|
212
386
|
default: j(({ Component: u }) => [
|
|
213
|
-
|
|
387
|
+
O(ue, {
|
|
214
388
|
name: "fade",
|
|
215
389
|
mode: "out-in"
|
|
216
390
|
}, {
|
|
@@ -226,27 +400,27 @@ const Q = b("zap", [
|
|
|
226
400
|
]);
|
|
227
401
|
};
|
|
228
402
|
}
|
|
229
|
-
}),
|
|
403
|
+
}), Je = (e, t) => {
|
|
230
404
|
const n = e.__vccOpts || e;
|
|
231
405
|
for (const [a, s] of t)
|
|
232
406
|
n[a] = s;
|
|
233
407
|
return n;
|
|
234
|
-
},
|
|
408
|
+
}, Ke = /* @__PURE__ */ Je(qe, [["__scopeId", "data-v-3e2d3900"]]), Ye = ["light", "dark", "system"];
|
|
235
409
|
function q(e) {
|
|
236
|
-
return typeof e == "string" &&
|
|
410
|
+
return typeof e == "string" && Ye.includes(e);
|
|
237
411
|
}
|
|
238
|
-
const z = "openapi-devtools-theme", f =
|
|
239
|
-
let
|
|
240
|
-
function
|
|
412
|
+
const z = "openapi-devtools-theme", f = T("system"), h = T(!1);
|
|
413
|
+
let D = null, E = null;
|
|
414
|
+
function I() {
|
|
241
415
|
return typeof window < "u" && typeof document < "u";
|
|
242
416
|
}
|
|
243
|
-
function
|
|
417
|
+
function Xe() {
|
|
244
418
|
return X() !== null;
|
|
245
419
|
}
|
|
246
|
-
function
|
|
247
|
-
const e =
|
|
420
|
+
function ct() {
|
|
421
|
+
const e = i(() => f.value === "system" ? h.value ? "dark" : "light" : f.value), t = i(() => e.value === "dark");
|
|
248
422
|
function n() {
|
|
249
|
-
if (!
|
|
423
|
+
if (!I()) return;
|
|
250
424
|
const o = document.documentElement;
|
|
251
425
|
e.value === "dark" ? (o.classList.add("dark"), o.classList.remove("light")) : (o.classList.add("light"), o.classList.remove("dark"));
|
|
252
426
|
}
|
|
@@ -255,7 +429,7 @@ function at() {
|
|
|
255
429
|
console.warn(`[DevTools] Invalid theme mode: ${o}`);
|
|
256
430
|
return;
|
|
257
431
|
}
|
|
258
|
-
if (f.value = o,
|
|
432
|
+
if (f.value = o, I())
|
|
259
433
|
try {
|
|
260
434
|
localStorage.setItem(z, o);
|
|
261
435
|
} catch {
|
|
@@ -265,21 +439,21 @@ function at() {
|
|
|
265
439
|
function s() {
|
|
266
440
|
f.value === "system" ? a(h.value ? "light" : "dark") : a(f.value === "dark" ? "light" : "dark");
|
|
267
441
|
}
|
|
268
|
-
function
|
|
442
|
+
function l() {
|
|
269
443
|
a("system");
|
|
270
444
|
}
|
|
271
445
|
function v() {
|
|
272
|
-
|
|
446
|
+
D && E && (D.removeEventListener("change", E), D = null, E = null);
|
|
273
447
|
}
|
|
274
448
|
function k() {
|
|
275
|
-
if (!
|
|
449
|
+
if (!I()) return;
|
|
276
450
|
v();
|
|
277
451
|
const o = window.matchMedia("(prefers-color-scheme: dark)");
|
|
278
452
|
h.value = o.matches;
|
|
279
453
|
const y = (_) => {
|
|
280
454
|
h.value = _.matches;
|
|
281
455
|
};
|
|
282
|
-
o.addEventListener("change", y),
|
|
456
|
+
o.addEventListener("change", y), D = o, E = y;
|
|
283
457
|
try {
|
|
284
458
|
const _ = localStorage.getItem(z);
|
|
285
459
|
q(_) && (f.value = _);
|
|
@@ -288,7 +462,7 @@ function at() {
|
|
|
288
462
|
n();
|
|
289
463
|
}
|
|
290
464
|
function m() {
|
|
291
|
-
if (v(), f.value = "system", h.value = !1,
|
|
465
|
+
if (v(), f.value = "system", h.value = !1, I()) {
|
|
292
466
|
document.documentElement.classList.remove("dark", "light");
|
|
293
467
|
try {
|
|
294
468
|
localStorage.removeItem(z);
|
|
@@ -298,7 +472,7 @@ function at() {
|
|
|
298
472
|
}
|
|
299
473
|
return de([f, h], () => {
|
|
300
474
|
n();
|
|
301
|
-
}),
|
|
475
|
+
}), Xe() && (Y(() => {
|
|
302
476
|
k();
|
|
303
477
|
}), pe(() => {
|
|
304
478
|
v();
|
|
@@ -306,7 +480,7 @@ function at() {
|
|
|
306
480
|
/**
|
|
307
481
|
* Current theme mode setting ('light', 'dark', or 'system')
|
|
308
482
|
*/
|
|
309
|
-
themeMode:
|
|
483
|
+
themeMode: i(() => f.value),
|
|
310
484
|
/**
|
|
311
485
|
* The effective theme after resolving 'system' mode
|
|
312
486
|
*/
|
|
@@ -318,7 +492,7 @@ function at() {
|
|
|
318
492
|
/**
|
|
319
493
|
* Whether the system prefers dark mode
|
|
320
494
|
*/
|
|
321
|
-
systemPrefersDark:
|
|
495
|
+
systemPrefersDark: i(() => h.value),
|
|
322
496
|
/**
|
|
323
497
|
* Set the theme mode
|
|
324
498
|
*/
|
|
@@ -330,7 +504,7 @@ function at() {
|
|
|
330
504
|
/**
|
|
331
505
|
* Reset to system preference
|
|
332
506
|
*/
|
|
333
|
-
resetToSystem:
|
|
507
|
+
resetToSystem: l,
|
|
334
508
|
/**
|
|
335
509
|
* Manually initialize theme (useful for SSR hydration)
|
|
336
510
|
*/
|
|
@@ -341,197 +515,23 @@ function at() {
|
|
|
341
515
|
resetState: m
|
|
342
516
|
};
|
|
343
517
|
}
|
|
344
|
-
const H = {
|
|
345
|
-
path: "/_ws",
|
|
346
|
-
reconnectDelay: 2e3,
|
|
347
|
-
maxReconnectAttempts: Number.POSITIVE_INFINITY,
|
|
348
|
-
autoConnect: !0
|
|
349
|
-
}, r = C("disconnected"), P = C(null), S = C(0);
|
|
350
|
-
let c = null, I = null, w = { ...H }, L = !1;
|
|
351
|
-
const p = /* @__PURE__ */ new Map();
|
|
352
|
-
function te() {
|
|
353
|
-
return typeof window < "u" && typeof WebSocket < "u";
|
|
354
|
-
}
|
|
355
|
-
function Ve() {
|
|
356
|
-
return X() !== null;
|
|
357
|
-
}
|
|
358
|
-
function Ue(e) {
|
|
359
|
-
return te() ? `${window.location.protocol === "https:" ? "wss:" : "ws:"}//${window.location.host}${e}` : `ws://localhost${e}`;
|
|
360
|
-
}
|
|
361
|
-
function ne() {
|
|
362
|
-
I !== null && (clearTimeout(I), I = null);
|
|
363
|
-
}
|
|
364
|
-
function Fe(e, t) {
|
|
365
|
-
const n = p.get(e);
|
|
366
|
-
if (n)
|
|
367
|
-
for (const s of n)
|
|
368
|
-
try {
|
|
369
|
-
s(t);
|
|
370
|
-
} catch (i) {
|
|
371
|
-
console.error(`[DevTools WebSocket] Error in event handler for '${e}':`, i);
|
|
372
|
-
}
|
|
373
|
-
const a = p.get("*");
|
|
374
|
-
if (a)
|
|
375
|
-
for (const s of a)
|
|
376
|
-
try {
|
|
377
|
-
s({ type: e, data: t });
|
|
378
|
-
} catch (i) {
|
|
379
|
-
console.error("[DevTools WebSocket] Error in wildcard event handler:", i);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function je() {
|
|
383
|
-
r.value = "connected", S.value = 0, ne();
|
|
384
|
-
}
|
|
385
|
-
function Ze(e) {
|
|
386
|
-
try {
|
|
387
|
-
const t = JSON.parse(e.data);
|
|
388
|
-
if (t.type === "connected") {
|
|
389
|
-
const n = t.data;
|
|
390
|
-
P.value = n.serverVersion;
|
|
391
|
-
}
|
|
392
|
-
Fe(t.type, t.data);
|
|
393
|
-
} catch (t) {
|
|
394
|
-
console.error("[DevTools WebSocket] Failed to parse message:", t);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function Ge() {
|
|
398
|
-
r.value, r.value = "disconnected", c = null, S.value < w.maxReconnectAttempts && (r.value = "reconnecting", S.value++, I = setTimeout(() => {
|
|
399
|
-
R();
|
|
400
|
-
}, w.reconnectDelay));
|
|
401
|
-
}
|
|
402
|
-
function Qe(e) {
|
|
403
|
-
console.error("[DevTools WebSocket] Error:", e);
|
|
404
|
-
}
|
|
405
|
-
function R() {
|
|
406
|
-
if (!te() || r.value === "connecting" || r.value === "connected" || c && (c.readyState === WebSocket.CONNECTING || c.readyState === WebSocket.OPEN))
|
|
407
|
-
return;
|
|
408
|
-
oe(), r.value = "connecting";
|
|
409
|
-
const e = Ue(w.path);
|
|
410
|
-
try {
|
|
411
|
-
c = new WebSocket(e), c.onopen = je, c.onmessage = Ze, c.onclose = Ge, c.onerror = Qe;
|
|
412
|
-
} catch (t) {
|
|
413
|
-
console.error("[DevTools WebSocket] Failed to create WebSocket:", t), r.value = "disconnected";
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
function oe() {
|
|
417
|
-
c && (c.onopen = null, c.onmessage = null, c.onclose = null, c.onerror = null, (c.readyState === WebSocket.OPEN || c.readyState === WebSocket.CONNECTING) && c.close(), c = null);
|
|
418
|
-
}
|
|
419
|
-
function ae() {
|
|
420
|
-
ne(), oe(), r.value = "disconnected", S.value = 0;
|
|
421
|
-
}
|
|
422
|
-
function qe(e) {
|
|
423
|
-
if (!c || c.readyState !== WebSocket.OPEN)
|
|
424
|
-
return !1;
|
|
425
|
-
try {
|
|
426
|
-
return c.send(JSON.stringify(e)), !0;
|
|
427
|
-
} catch (t) {
|
|
428
|
-
return console.error("[DevTools WebSocket] Failed to send command:", t), !1;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
function B(e, t) {
|
|
432
|
-
p.has(e) || p.set(e, /* @__PURE__ */ new Set());
|
|
433
|
-
const n = p.get(e);
|
|
434
|
-
return n && n.add(t), () => {
|
|
435
|
-
const a = p.get(e);
|
|
436
|
-
a && (a.delete(t), a.size === 0 && p.delete(e));
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
function V(e, t) {
|
|
440
|
-
const n = p.get(e);
|
|
441
|
-
n && (n.delete(t), n.size === 0 && p.delete(e));
|
|
442
|
-
}
|
|
443
|
-
function Je(e, t) {
|
|
444
|
-
const n = (a) => {
|
|
445
|
-
V(e, n), t(a);
|
|
446
|
-
};
|
|
447
|
-
return B(e, n);
|
|
448
|
-
}
|
|
449
|
-
function Ke(e, t) {
|
|
450
|
-
const n = (a) => {
|
|
451
|
-
t(a) === !0 && V(e, n);
|
|
452
|
-
};
|
|
453
|
-
return B(e, n);
|
|
454
|
-
}
|
|
455
|
-
function Ye() {
|
|
456
|
-
ae(), P.value = null, p.clear(), w = { ...H }, L = !1;
|
|
457
|
-
}
|
|
458
|
-
function ct(e = {}) {
|
|
459
|
-
(!L || r.value === "disconnected") && (w = { ...H, ...e }, L = !0);
|
|
460
|
-
const t = l(() => r.value === "connected"), n = l(() => r.value === "reconnecting");
|
|
461
|
-
return Ve() && Y(() => {
|
|
462
|
-
w.autoConnect && R();
|
|
463
|
-
}), {
|
|
464
|
-
/**
|
|
465
|
-
* Current connection state
|
|
466
|
-
*/
|
|
467
|
-
connectionState: l(() => r.value),
|
|
468
|
-
/**
|
|
469
|
-
* Whether the WebSocket is connected
|
|
470
|
-
*/
|
|
471
|
-
connected: t,
|
|
472
|
-
/**
|
|
473
|
-
* Whether the WebSocket is attempting to reconnect
|
|
474
|
-
*/
|
|
475
|
-
isReconnecting: n,
|
|
476
|
-
/**
|
|
477
|
-
* Server version received on connection
|
|
478
|
-
*/
|
|
479
|
-
serverVersion: l(() => P.value),
|
|
480
|
-
/**
|
|
481
|
-
* Number of reconnection attempts made
|
|
482
|
-
*/
|
|
483
|
-
reconnectAttempts: l(() => S.value),
|
|
484
|
-
/**
|
|
485
|
-
* Connect to the WebSocket server
|
|
486
|
-
*/
|
|
487
|
-
connect: R,
|
|
488
|
-
/**
|
|
489
|
-
* Disconnect from the WebSocket server
|
|
490
|
-
*/
|
|
491
|
-
disconnect: ae,
|
|
492
|
-
/**
|
|
493
|
-
* Send a command to the server
|
|
494
|
-
*/
|
|
495
|
-
send: qe,
|
|
496
|
-
/**
|
|
497
|
-
* Subscribe to a server event
|
|
498
|
-
*/
|
|
499
|
-
on: B,
|
|
500
|
-
/**
|
|
501
|
-
* Unsubscribe from a server event
|
|
502
|
-
*/
|
|
503
|
-
off: V,
|
|
504
|
-
/**
|
|
505
|
-
* Subscribe to an event once (one-shot, auto-unsubscribes after first call)
|
|
506
|
-
*/
|
|
507
|
-
once: Je,
|
|
508
|
-
/**
|
|
509
|
-
* Subscribe to an event until handler returns true
|
|
510
|
-
*/
|
|
511
|
-
onUntil: Ke,
|
|
512
|
-
/**
|
|
513
|
-
* Reset the composable state (useful for testing)
|
|
514
|
-
*/
|
|
515
|
-
resetState: Ye
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
518
|
let J = !1, K = null;
|
|
519
|
-
function
|
|
519
|
+
function et() {
|
|
520
520
|
if (J)
|
|
521
521
|
return K;
|
|
522
|
-
const e = fe(
|
|
523
|
-
return e.use(t), e.use(
|
|
522
|
+
const e = fe(Ke), t = ce();
|
|
523
|
+
return e.use(t), e.use(Re), e.mount("#app"), J = !0, K = e, e;
|
|
524
524
|
}
|
|
525
|
-
typeof window < "u" && document.getElementById("app") &&
|
|
525
|
+
typeof window < "u" && document.getElementById("app") && et();
|
|
526
526
|
export {
|
|
527
527
|
be as C,
|
|
528
528
|
Se as D,
|
|
529
529
|
G as R,
|
|
530
530
|
Q as Z,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
531
|
+
Je as _,
|
|
532
|
+
ct as a,
|
|
533
|
+
et as b,
|
|
534
|
+
S as c,
|
|
535
|
+
Le as u
|
|
536
536
|
};
|
|
537
|
-
//# sourceMappingURL=main-
|
|
537
|
+
//# sourceMappingURL=main-C-2gO_cM.js.map
|