@voltro/web 0.61.0 → 0.62.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/CHANGELOG.md +18 -0
- package/dist/frameworkBoot-CfNLGgAC.js +621 -0
- package/dist/frameworkBoot.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mount.js +1 -1
- package/package.json +3 -3
- package/dist/frameworkBoot-BfJpdpZp.js +0 -541
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,24 @@ _Changes staged for the next release accumulate here (rolled up from
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## [0.62.0] — 2026-09-01
|
|
43
|
+
|
|
44
|
+
### ⚠ BREAKING
|
|
45
|
+
|
|
46
|
+
- **@voltro/workflow, @voltro/cli, @voltro/voltro** — `timeouts.finish` now filters running rows by the declared workflow, durably cancels each run before notification, and emits `onFailure` only for the successful terminal transition. Finish-timeout reports carry the run's stable `runId`, `executionId`, and original payload; handler-start logs expose the returned status instead of unconditionally claiming a new start.
|
|
47
|
+
|
|
48
|
+
Low-level adapters that construct `AdmissionDrainDeps` must update `cancelRun` to accept the run object and return whether it made the terminal transition, and return the run identity, workflow name, and payload from `listRunningRuns`. Ordinary workflow declarations need no source change; `voltro update` prints the adapter migration only when the project references this low-level surface.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **@voltro/ai** — `streamText` and `resumableStreamText` now accept an opt-in `smooth` configuration for word- or line-based text and reasoning chunks. Smoothing runs before resumable journaling, preserves provider-native behavior when omitted, and shares the stream abort signal so cancellation also stops a pending smoothing delay.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **@voltro/web** — Production `framework_debug` now enables local framework diagnostics without opening browser-to-inspect HTTP or SSE transports. Development log relays are single-flight and rate-limited, classify permanent response failures, back off transient failures, expose dropped-log counts, and open a page-scoped circuit after repeated failure; the SSE relay also probes the endpoint before creating an `EventSource` and closes failed sources before retrying.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
42
60
|
## [0.61.0] — 2026-08-31
|
|
43
61
|
|
|
44
62
|
### ⚠ BREAKING
|
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { t as e } from "./globalContext-AuflFFmy.js";
|
|
2
|
+
import { AppClientsContext as t } from "./hooks.js";
|
|
3
|
+
import { c as n, l as r, r as i, s as a, u as o } from "./defaultFallbacks-SQ45vAhz.js";
|
|
4
|
+
import { useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
|
|
5
|
+
import { FrameworkRuntimesProvider as m, buildApiRuntime as h, ssrClientProxy as g, ssrStubHandle as _, startApiSupervisor as v, subscribeClientTraces as y, wireAuthRefresh as b } from "@voltro/client";
|
|
6
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
7
|
+
//#region src/reconnect.ts
|
|
8
|
+
var w = e("reconnect", null), T = () => c(w) ?? (() => {}), E = 150, D = 220, ee = () => {
|
|
9
|
+
let e = p(o, n, n).some((e) => e.kind === "loading" || e.kind === "reconnecting"), [t, r] = f(!1);
|
|
10
|
+
return l(() => {
|
|
11
|
+
if (!e) {
|
|
12
|
+
r(!1);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
let t = setTimeout(() => r(!0), E);
|
|
16
|
+
return () => clearTimeout(t);
|
|
17
|
+
}, [e]), /* @__PURE__ */ C("div", {
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
"data-voltro-nav-indicator": "",
|
|
20
|
+
style: {
|
|
21
|
+
position: "fixed",
|
|
22
|
+
right: 18,
|
|
23
|
+
bottom: 18,
|
|
24
|
+
zIndex: 2147483646,
|
|
25
|
+
pointerEvents: "none",
|
|
26
|
+
opacity: +!!t,
|
|
27
|
+
transform: t ? "translateY(0) scale(1)" : "translateY(4px) scale(0.96)",
|
|
28
|
+
transition: `opacity ${D}ms ease, transform ${D}ms ease`,
|
|
29
|
+
display: "grid",
|
|
30
|
+
placeItems: "center",
|
|
31
|
+
width: 34,
|
|
32
|
+
height: 34,
|
|
33
|
+
borderRadius: 999,
|
|
34
|
+
background: "color-mix(in oklch, canvas 78%, transparent)",
|
|
35
|
+
backdropFilter: "blur(6px)",
|
|
36
|
+
WebkitBackdropFilter: "blur(6px)",
|
|
37
|
+
border: "1px solid color-mix(in oklch, canvastext 12%, transparent)",
|
|
38
|
+
boxShadow: "0 4px 14px color-mix(in oklch, canvastext 16%, transparent)"
|
|
39
|
+
},
|
|
40
|
+
children: [/* @__PURE__ */ S("span", { "data-voltro-nav-spinner": "" }), /* @__PURE__ */ S("style", { children: O })]
|
|
41
|
+
});
|
|
42
|
+
}, O = "\n@keyframes voltroNavSpin { to { transform: rotate(360deg); } }\n[data-voltro-nav-spinner] {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 2px solid color-mix(in oklch, canvastext 22%, transparent);\n border-top-color: color-mix(in oklch, canvastext 78%, transparent);\n animation: voltroNavSpin 0.7s linear infinite;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-voltro-nav-spinner] { animation-duration: 1.6s; }\n}\n", k = 2e3, A = () => typeof window < "u" && !1, j = () => typeof window > "u" ? null : `${window.location.origin}/`, M = 2e4, N = "voltro:wedge-reload-at", te = () => {
|
|
43
|
+
try {
|
|
44
|
+
let e = Number(window.sessionStorage.getItem(N) ?? "0"), t = Date.now();
|
|
45
|
+
if (t - e < M) return;
|
|
46
|
+
window.sessionStorage.setItem(N, String(t));
|
|
47
|
+
} catch {}
|
|
48
|
+
window.location.reload();
|
|
49
|
+
}, ne = () => {
|
|
50
|
+
if (A()) return {
|
|
51
|
+
afterFailures: 2,
|
|
52
|
+
arm: () => {
|
|
53
|
+
let e = j();
|
|
54
|
+
if (e === null) return () => {};
|
|
55
|
+
let t = setInterval(() => {
|
|
56
|
+
fetch(e, {
|
|
57
|
+
method: "GET",
|
|
58
|
+
cache: "no-store",
|
|
59
|
+
signal: AbortSignal.timeout(k)
|
|
60
|
+
}).then((e) => {
|
|
61
|
+
e.status < 500 && te();
|
|
62
|
+
}).catch(() => {});
|
|
63
|
+
}, k);
|
|
64
|
+
return () => clearInterval(t);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}, P = {
|
|
68
|
+
log: console.log.bind(console),
|
|
69
|
+
info: console.info.bind(console),
|
|
70
|
+
warn: console.warn.bind(console),
|
|
71
|
+
error: console.error.bind(console),
|
|
72
|
+
debug: console.debug.bind(console)
|
|
73
|
+
}, re = 200, ie = 400, ae = 20, F = 1e3, oe = 250, I = 5e3, se = 500, ce = 8e3, L = 5, le = 3e4, R = (e) => Math.min(ce, se * 2 ** Math.max(0, e - 1)), ue = (e) => e >= 400 && e < 500 && e !== 408 && e !== 429, z = (e) => {
|
|
74
|
+
if (typeof e == "string") return e;
|
|
75
|
+
if (e === void 0) return "undefined";
|
|
76
|
+
if (e === null) return "null";
|
|
77
|
+
if (e instanceof Error) return e.stack ?? e.message;
|
|
78
|
+
if (typeof e == "object") try {
|
|
79
|
+
return JSON.stringify(e, de());
|
|
80
|
+
} catch {
|
|
81
|
+
return Object.prototype.toString.call(e);
|
|
82
|
+
}
|
|
83
|
+
return String(e);
|
|
84
|
+
}, de = () => {
|
|
85
|
+
let e = /* @__PURE__ */ new WeakSet();
|
|
86
|
+
return (t, n) => {
|
|
87
|
+
if (typeof n == "object" && n) {
|
|
88
|
+
if (e.has(n)) return "[Circular]";
|
|
89
|
+
e.add(n);
|
|
90
|
+
}
|
|
91
|
+
return n;
|
|
92
|
+
};
|
|
93
|
+
}, B = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, V = /%[sdifoOc]/g, H = (e) => {
|
|
94
|
+
if (e.length === 0) return {
|
|
95
|
+
message: "",
|
|
96
|
+
rest: []
|
|
97
|
+
};
|
|
98
|
+
let t = e[0];
|
|
99
|
+
if (typeof t != "string" || !V.test(t)) return {
|
|
100
|
+
message: z(t),
|
|
101
|
+
rest: e.slice(1)
|
|
102
|
+
};
|
|
103
|
+
V.lastIndex = 0;
|
|
104
|
+
let n = 1;
|
|
105
|
+
return {
|
|
106
|
+
message: t.replace(V, (t) => {
|
|
107
|
+
if (t === "%c") return n++, "";
|
|
108
|
+
if (n >= e.length) return t;
|
|
109
|
+
let r = e[n++];
|
|
110
|
+
switch (t) {
|
|
111
|
+
case "%s": return r === void 0 ? "undefined" : r === null ? "null" : String(r);
|
|
112
|
+
case "%d":
|
|
113
|
+
case "%i": {
|
|
114
|
+
let e = typeof r == "number" ? Math.trunc(r) : parseInt(String(r), 10);
|
|
115
|
+
return Number.isFinite(e) ? String(e) : "NaN";
|
|
116
|
+
}
|
|
117
|
+
case "%f": {
|
|
118
|
+
let e = typeof r == "number" ? r : parseFloat(String(r));
|
|
119
|
+
return Number.isFinite(e) ? String(e) : "NaN";
|
|
120
|
+
}
|
|
121
|
+
case "%o":
|
|
122
|
+
case "%O": return z(r);
|
|
123
|
+
default: return t;
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
rest: e.slice(n)
|
|
127
|
+
};
|
|
128
|
+
}, U = (e) => {
|
|
129
|
+
let t = e.flushAfterMs ?? ie, n = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/clientLog`, r = [], i = null, a = !1, o = !1, s = !1, c = !1, l = 0, u = 0, d = 0, f = null, p = (e) => {
|
|
130
|
+
o || (o = !0, i !== null && (clearTimeout(i), i = null), r = [], s || (s = !0, P.warn(`[voltro] client log forwarding disabled for this page: ${e}`)));
|
|
131
|
+
}, m = (e = t) => {
|
|
132
|
+
if (a || o || c || i !== null || r.length === 0 && u === 0) return;
|
|
133
|
+
let n = Math.max(0, d - Date.now());
|
|
134
|
+
i = setTimeout(() => {
|
|
135
|
+
i = null, h();
|
|
136
|
+
}, Math.max(e, n));
|
|
137
|
+
}, h = async (t = !1) => {
|
|
138
|
+
if (i !== null && (clearTimeout(i), i = null), o || c || r.length === 0 && u === 0) return;
|
|
139
|
+
let s = Math.max(0, d - Date.now());
|
|
140
|
+
if (!t && s > 0) {
|
|
141
|
+
m(s);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
let h = u;
|
|
145
|
+
u = 0;
|
|
146
|
+
let g = re - +(h > 0), _ = r.splice(0, g), v = h > 0 ? [{
|
|
147
|
+
ts: Date.now(),
|
|
148
|
+
level: "warn",
|
|
149
|
+
message: `[voltro] client log forwarder dropped: ${h}`
|
|
150
|
+
}, ..._] : _, y = {
|
|
151
|
+
app: e.appName,
|
|
152
|
+
page: typeof window < "u" ? window.location.pathname : void 0,
|
|
153
|
+
ua: typeof navigator < "u" ? B(navigator.userAgent, 200) : void 0,
|
|
154
|
+
entries: v
|
|
155
|
+
};
|
|
156
|
+
c = !0, d = Date.now() + oe;
|
|
157
|
+
let b = new AbortController();
|
|
158
|
+
f = b;
|
|
159
|
+
let x = setTimeout(() => b.abort(), I), S = null;
|
|
160
|
+
try {
|
|
161
|
+
let e = await fetch(n, {
|
|
162
|
+
method: "POST",
|
|
163
|
+
headers: { "content-type": "application/json" },
|
|
164
|
+
body: JSON.stringify(y),
|
|
165
|
+
keepalive: !0,
|
|
166
|
+
credentials: "omit",
|
|
167
|
+
signal: b.signal
|
|
168
|
+
});
|
|
169
|
+
e.ok ? l = 0 : ue(e.status) ? p(`inspect endpoint returned HTTP ${e.status}`) : (u += _.length + h, l++, l >= L ? p(`circuit opened after ${l} consecutive failures (last HTTP ${e.status})`) : S = R(l));
|
|
170
|
+
} catch {
|
|
171
|
+
u += _.length + h, l++, !a && l >= L ? p(`circuit opened after ${l} consecutive network failures`) : a || (S = R(l));
|
|
172
|
+
} finally {
|
|
173
|
+
clearTimeout(x), f === b && (f = null), c = !1, !a && !o && (r.length > 0 || u > 0) && m(S ?? 0);
|
|
174
|
+
}
|
|
175
|
+
}, g = (e, t) => {
|
|
176
|
+
if (a || o) return;
|
|
177
|
+
r.length >= re && (r.shift(), u++);
|
|
178
|
+
let n = t.find((e) => e instanceof Error), i = t.find((e) => typeof e == "object" && !!e && "componentStack" in e), s = typeof i?.componentStack == "string" ? i.componentStack : void 0, c = t[0] instanceof Error ? {
|
|
179
|
+
message: t[0].message,
|
|
180
|
+
rest: t.slice(1)
|
|
181
|
+
} : H(t), l = B(c.message, F), d = c.rest.filter((e) => e !== n && e !== i).map((e) => B(z(e), F)), f;
|
|
182
|
+
n ? (f = n.stack ?? n.message, s && (f += `\n\nComponent stack:${s}`)) : e === "error" && (f = (/* @__PURE__ */ Error()).stack);
|
|
183
|
+
let p = {
|
|
184
|
+
ts: Date.now(),
|
|
185
|
+
level: e,
|
|
186
|
+
message: l,
|
|
187
|
+
...d.length > 0 ? { args: d } : {},
|
|
188
|
+
...f === void 0 ? {} : { stack: f }
|
|
189
|
+
};
|
|
190
|
+
r.push(p), r.length >= ae ? h() : m();
|
|
191
|
+
}, _ = (e) => (...t) => {
|
|
192
|
+
P[e](...t), g(e, t);
|
|
193
|
+
};
|
|
194
|
+
console.log = _("log"), console.info = _("info"), console.warn = _("warn"), console.error = _("error"), console.debug = _("debug");
|
|
195
|
+
let v = () => {
|
|
196
|
+
h(!0);
|
|
197
|
+
};
|
|
198
|
+
return typeof window < "u" && (window.addEventListener("beforeunload", v), window.addEventListener("pagehide", v)), { dispose: () => {
|
|
199
|
+
a || (c ? f?.abort() : h(!0), a = !0, i !== null && (clearTimeout(i), i = null), console.log = P.log, console.info = P.info, console.warn = P.warn, console.error = P.error, console.debug = P.debug, typeof window < "u" && (window.removeEventListener("beforeunload", v), window.removeEventListener("pagehide", v)));
|
|
200
|
+
} };
|
|
201
|
+
}, fe = 500, W = /* @__PURE__ */ new Set(), G = (e) => {
|
|
202
|
+
if (!W.has(e) && (W.add(e), W.size > fe)) {
|
|
203
|
+
let e = W.values().next().value;
|
|
204
|
+
e !== void 0 && W.delete(e);
|
|
205
|
+
}
|
|
206
|
+
}, K = /* @__PURE__ */ new Set(), q = (e) => (K.add(e), () => {
|
|
207
|
+
K.delete(e);
|
|
208
|
+
}), pe = (e) => {
|
|
209
|
+
for (let t of K) try {
|
|
210
|
+
t(e);
|
|
211
|
+
} catch {}
|
|
212
|
+
}, me = {
|
|
213
|
+
log: "log",
|
|
214
|
+
info: "info",
|
|
215
|
+
warn: "warn",
|
|
216
|
+
error: "error",
|
|
217
|
+
debug: "debug"
|
|
218
|
+
}, J = {
|
|
219
|
+
log: "color: #888;",
|
|
220
|
+
info: "color: #2563eb;",
|
|
221
|
+
warn: "color: #c2410c;",
|
|
222
|
+
error: "color: #b91c1c; font-weight: 600;",
|
|
223
|
+
debug: "color: #6b7280;"
|
|
224
|
+
}, Y = (e) => {
|
|
225
|
+
if (typeof EventSource > "u") return { dispose: () => {} };
|
|
226
|
+
let t = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/stream?live=1`, n = null, r = !1, i = !1, a = !1, o = 0, s = null, c = null, l = null, u = !1, d = () => {
|
|
227
|
+
c !== null && (clearTimeout(c), c = null), n?.close(), n = null;
|
|
228
|
+
}, f = (t) => {
|
|
229
|
+
i || (i = !0, s !== null && (clearTimeout(s), s = null), l?.abort(), d(), a || (a = !0, P.warn(`[voltro] server log relay disabled for ${e.originLabel}: ${t}`)));
|
|
230
|
+
}, p = (e) => {
|
|
231
|
+
if (!(r || i || s !== null)) {
|
|
232
|
+
if (o++, o >= L) {
|
|
233
|
+
f(`circuit opened after ${o} consecutive failures (${e})`);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
s = setTimeout(() => {
|
|
237
|
+
s = null, h();
|
|
238
|
+
}, R(o));
|
|
239
|
+
}
|
|
240
|
+
}, m = () => {
|
|
241
|
+
if (r || i) return;
|
|
242
|
+
let a;
|
|
243
|
+
try {
|
|
244
|
+
a = new EventSource(t);
|
|
245
|
+
} catch {
|
|
246
|
+
p("EventSource construction failed");
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
n = a, a.addEventListener("open", () => {
|
|
250
|
+
n === a && (c !== null && clearTimeout(c), c = setTimeout(() => {
|
|
251
|
+
c = null, n === a && (o = 0);
|
|
252
|
+
}, le));
|
|
253
|
+
}), a.addEventListener("log", (t) => {
|
|
254
|
+
try {
|
|
255
|
+
let n = JSON.parse(t.data).payload;
|
|
256
|
+
if (!n || typeof n.message != "string" || n.scope === "client") return;
|
|
257
|
+
let r = n.level === void 0 ? "log" : me[n.level], i = n.scope ? ` ${n.scope}` : "";
|
|
258
|
+
P[r](`%c[server ${e.originLabel}${i}]%c ${n.message}`, J[r], "", ...n.fields ? [n.fields] : []);
|
|
259
|
+
} catch {}
|
|
260
|
+
}), a.addEventListener("trace", (t) => {
|
|
261
|
+
try {
|
|
262
|
+
let n = JSON.parse(t.data).payload;
|
|
263
|
+
if (!n || n.status !== "error" || typeof n.traceId != "string" || !W.has(n.traceId)) return;
|
|
264
|
+
let r = n.name ?? "span", i = n.statusMessage && n.statusMessage.length > 0 ? n.statusMessage : `${r} failed`;
|
|
265
|
+
pe({
|
|
266
|
+
traceId: n.traceId,
|
|
267
|
+
spanName: r,
|
|
268
|
+
api: e.originLabel,
|
|
269
|
+
message: i,
|
|
270
|
+
ts: Date.now()
|
|
271
|
+
}), P.error(`%c[trace ${e.originLabel}]%c ${r} failed — ${i} (trace ${n.traceId})`, J.error, "");
|
|
272
|
+
} catch {}
|
|
273
|
+
}), a.addEventListener("error", () => {
|
|
274
|
+
n === a && (d(), p("stream disconnected"));
|
|
275
|
+
});
|
|
276
|
+
}, h = async () => {
|
|
277
|
+
if (r || i || u || n !== null) return;
|
|
278
|
+
u = !0;
|
|
279
|
+
let e = new AbortController();
|
|
280
|
+
l = e;
|
|
281
|
+
let a = setTimeout(() => e.abort(), I);
|
|
282
|
+
try {
|
|
283
|
+
let n = await fetch(t, {
|
|
284
|
+
method: "GET",
|
|
285
|
+
headers: { accept: "text/event-stream" },
|
|
286
|
+
credentials: "same-origin",
|
|
287
|
+
cache: "no-store",
|
|
288
|
+
signal: e.signal
|
|
289
|
+
});
|
|
290
|
+
if (n.body?.cancel().catch(() => void 0), ue(n.status)) {
|
|
291
|
+
f(`inspect stream returned HTTP ${n.status}`);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (!n.ok) {
|
|
295
|
+
p(`probe returned HTTP ${n.status}`);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
let r = n.headers.get("content-type")?.toLowerCase() ?? "";
|
|
299
|
+
if (!r.includes("text/event-stream")) {
|
|
300
|
+
f(`inspect stream returned ${r || "no content type"} instead of text/event-stream`);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
m();
|
|
304
|
+
} catch {
|
|
305
|
+
!r && !i && p("probe failed");
|
|
306
|
+
} finally {
|
|
307
|
+
clearTimeout(a), l === e && (l = null), u = !1;
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
return h(), { dispose: () => {
|
|
311
|
+
r || (r = !0, s !== null && (clearTimeout(s), s = null), c !== null && (clearTimeout(c), c = null), l?.abort(), l = null, d());
|
|
312
|
+
} };
|
|
313
|
+
}, X = {
|
|
314
|
+
card: "oklch(0.21 0.006 285)",
|
|
315
|
+
cardRaised: "oklch(0.25 0.007 285)",
|
|
316
|
+
border: "oklch(1 0 0 / 14%)",
|
|
317
|
+
fg: "oklch(0.98 0.005 285)",
|
|
318
|
+
muted: "oklch(0.65 0.012 285)",
|
|
319
|
+
danger: "oklch(0.7 0.21 22)",
|
|
320
|
+
dangerDim: "oklch(0.5 0.18 22 / 25%)"
|
|
321
|
+
}, Z = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace", he = "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", ge = 0, _e = () => {
|
|
322
|
+
let [e, t] = f([]);
|
|
323
|
+
if (l(() => q((e) => {
|
|
324
|
+
t((t) => {
|
|
325
|
+
if (t.some((t) => t.traceId === e.traceId && t.spanName === e.spanName)) return t;
|
|
326
|
+
let n = [...t, {
|
|
327
|
+
...e,
|
|
328
|
+
id: ++ge
|
|
329
|
+
}];
|
|
330
|
+
return n.length > 4 ? n.slice(n.length - 4) : n;
|
|
331
|
+
});
|
|
332
|
+
}), []), e.length === 0) return null;
|
|
333
|
+
let n = (e) => t((t) => t.filter((t) => t.id !== e));
|
|
334
|
+
return /* @__PURE__ */ S("div", {
|
|
335
|
+
style: {
|
|
336
|
+
position: "fixed",
|
|
337
|
+
right: 16,
|
|
338
|
+
bottom: 16,
|
|
339
|
+
zIndex: 2147483646,
|
|
340
|
+
display: "flex",
|
|
341
|
+
flexDirection: "column",
|
|
342
|
+
gap: 10,
|
|
343
|
+
maxWidth: 380,
|
|
344
|
+
fontFamily: he,
|
|
345
|
+
pointerEvents: "none"
|
|
346
|
+
},
|
|
347
|
+
children: e.map((e) => /* @__PURE__ */ S(ve, {
|
|
348
|
+
toast: e,
|
|
349
|
+
onDismiss: () => n(e.id)
|
|
350
|
+
}, e.id))
|
|
351
|
+
});
|
|
352
|
+
}, ve = ({ toast: e, onDismiss: t }) => {
|
|
353
|
+
let [n, r] = f(!1), a = `voltro logs --trace ${e.traceId}`;
|
|
354
|
+
return /* @__PURE__ */ C("div", {
|
|
355
|
+
style: {
|
|
356
|
+
pointerEvents: "auto",
|
|
357
|
+
background: X.card,
|
|
358
|
+
border: `1px solid ${X.danger}`,
|
|
359
|
+
borderLeft: `3px solid ${X.danger}`,
|
|
360
|
+
borderRadius: 10,
|
|
361
|
+
padding: "12px 14px",
|
|
362
|
+
boxShadow: "0 8px 28px rgba(0,0,0,0.45)",
|
|
363
|
+
color: X.fg,
|
|
364
|
+
fontSize: 13,
|
|
365
|
+
lineHeight: 1.45
|
|
366
|
+
},
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ C("div", {
|
|
369
|
+
style: {
|
|
370
|
+
display: "flex",
|
|
371
|
+
alignItems: "center",
|
|
372
|
+
justifyContent: "space-between",
|
|
373
|
+
gap: 8
|
|
374
|
+
},
|
|
375
|
+
children: [/* @__PURE__ */ S("span", {
|
|
376
|
+
style: {
|
|
377
|
+
color: X.danger,
|
|
378
|
+
fontWeight: 600,
|
|
379
|
+
fontSize: 12,
|
|
380
|
+
letterSpacing: .3
|
|
381
|
+
},
|
|
382
|
+
children: "⚠ Backend error"
|
|
383
|
+
}), /* @__PURE__ */ S("button", {
|
|
384
|
+
onClick: t,
|
|
385
|
+
"aria-label": "Dismiss",
|
|
386
|
+
style: {
|
|
387
|
+
background: "transparent",
|
|
388
|
+
border: "none",
|
|
389
|
+
color: X.muted,
|
|
390
|
+
cursor: "pointer",
|
|
391
|
+
fontSize: 16,
|
|
392
|
+
lineHeight: 1,
|
|
393
|
+
padding: 0
|
|
394
|
+
},
|
|
395
|
+
children: "×"
|
|
396
|
+
})]
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ C("div", {
|
|
399
|
+
style: {
|
|
400
|
+
marginTop: 6,
|
|
401
|
+
color: X.muted,
|
|
402
|
+
fontSize: 11.5
|
|
403
|
+
},
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ S("span", {
|
|
406
|
+
style: {
|
|
407
|
+
fontFamily: Z,
|
|
408
|
+
color: X.fg
|
|
409
|
+
},
|
|
410
|
+
children: e.api
|
|
411
|
+
}),
|
|
412
|
+
" · ",
|
|
413
|
+
/* @__PURE__ */ S("span", {
|
|
414
|
+
style: { fontFamily: Z },
|
|
415
|
+
children: e.spanName
|
|
416
|
+
})
|
|
417
|
+
]
|
|
418
|
+
}),
|
|
419
|
+
/* @__PURE__ */ S("div", {
|
|
420
|
+
style: {
|
|
421
|
+
marginTop: 4,
|
|
422
|
+
color: X.fg,
|
|
423
|
+
wordBreak: "break-word"
|
|
424
|
+
},
|
|
425
|
+
children: e.message
|
|
426
|
+
}),
|
|
427
|
+
/* @__PURE__ */ S("button", {
|
|
428
|
+
onClick: () => {
|
|
429
|
+
i(a).then((e) => {
|
|
430
|
+
e !== "failed" && (r(!0), setTimeout(() => r(!1), 1500));
|
|
431
|
+
});
|
|
432
|
+
},
|
|
433
|
+
title: "Copy command",
|
|
434
|
+
style: {
|
|
435
|
+
marginTop: 10,
|
|
436
|
+
display: "block",
|
|
437
|
+
width: "100%",
|
|
438
|
+
textAlign: "left",
|
|
439
|
+
background: X.cardRaised,
|
|
440
|
+
border: `1px solid ${X.border}`,
|
|
441
|
+
borderRadius: 6,
|
|
442
|
+
padding: "6px 8px",
|
|
443
|
+
color: X.muted,
|
|
444
|
+
fontFamily: Z,
|
|
445
|
+
fontSize: 11,
|
|
446
|
+
cursor: "pointer"
|
|
447
|
+
},
|
|
448
|
+
children: n ? "✓ copied" : a
|
|
449
|
+
})
|
|
450
|
+
]
|
|
451
|
+
});
|
|
452
|
+
}, ye = (e, t) => ({
|
|
453
|
+
verboseConsole: e || t,
|
|
454
|
+
diagnosticTransports: e
|
|
455
|
+
}), be = (e) => {
|
|
456
|
+
try {
|
|
457
|
+
let t = new URL(e);
|
|
458
|
+
return `${t.protocol === "wss:" ? "https:" : "http:"}//${t.host}`;
|
|
459
|
+
} catch {
|
|
460
|
+
return "";
|
|
461
|
+
}
|
|
462
|
+
}, xe = (e, t) => /^wss?:\/\//i.test(e) || /^https?:\/\//i.test(e) ? be(e) : `/_voltro/api/${t}`, Se = typeof performance < "u" ? performance.now() : Date.now(), Q = () => {
|
|
463
|
+
if (typeof window > "u") return ye(!1, !1);
|
|
464
|
+
let e = !1;
|
|
465
|
+
try {
|
|
466
|
+
e = window.localStorage?.getItem("framework_debug") === "1";
|
|
467
|
+
} catch {}
|
|
468
|
+
return ye(!1, e);
|
|
469
|
+
}, Ce = () => Q().verboseConsole, $ = (e, ...t) => {
|
|
470
|
+
if (!Ce()) return;
|
|
471
|
+
let n = ((typeof performance < "u" ? performance.now() : Date.now()) - Se).toFixed(0).padStart(6, " ");
|
|
472
|
+
console.log(`[fw ${e} +${n}ms]`, ...t);
|
|
473
|
+
}, we = 3e3, Te = 0, Ee = (e, t, n, r) => (i, a) => {
|
|
474
|
+
let o = ++Te;
|
|
475
|
+
$(e, `ws#${o} create gen=${t} url=${i}`);
|
|
476
|
+
let s = new globalThis.WebSocket(i, a), c = !1, l = !1, u = (e) => {
|
|
477
|
+
l || (l = !0, r(e));
|
|
478
|
+
}, d = (t) => (n) => {
|
|
479
|
+
let r = t === "close" ? `code=${n.code}` : "type=error";
|
|
480
|
+
$(e, `ws#${o} ${t} opened=${c} issued=${l} ${r}`), u(t);
|
|
481
|
+
};
|
|
482
|
+
return s.addEventListener("open", () => {
|
|
483
|
+
c = !0, $(e, `ws#${o} open gen=${t}`), n();
|
|
484
|
+
}), s.addEventListener("close", d("close")), s.addEventListener("error", d("error")), setTimeout(() => {
|
|
485
|
+
if (!c && !l) {
|
|
486
|
+
$(e, `ws#${o} connect-timeout gen=${t} (no open within ${we}ms)`), u("connect-timeout");
|
|
487
|
+
try {
|
|
488
|
+
s.close();
|
|
489
|
+
} catch {}
|
|
490
|
+
}
|
|
491
|
+
}, we), s;
|
|
492
|
+
}, De = async (e, t, n, r) => {
|
|
493
|
+
$(e.name, `build gen=${t}: making runtime`);
|
|
494
|
+
try {
|
|
495
|
+
let i = await h({
|
|
496
|
+
name: e.name,
|
|
497
|
+
wsUrl: e.wsUrl,
|
|
498
|
+
group: e.group,
|
|
499
|
+
headers: e.headers,
|
|
500
|
+
webSocketConstructor: Ee(e.name, t, n, r)
|
|
501
|
+
});
|
|
502
|
+
return $(e.name, `build gen=${t}: runtime resolved`), i;
|
|
503
|
+
} catch (n) {
|
|
504
|
+
throw $(e.name, `build gen=${t}: runtime FAILED, disposing`, n.message ?? n), n;
|
|
505
|
+
}
|
|
506
|
+
}, Oe = ({ apis: e, children: n, chrome: i, connect: o = "eager" }) => {
|
|
507
|
+
let [c, p] = f(() => ({
|
|
508
|
+
initialized: e.length === 0,
|
|
509
|
+
clients: /* @__PURE__ */ new Map()
|
|
510
|
+
})), h = d(null), T = s(() => {
|
|
511
|
+
h.current?.reconnect();
|
|
512
|
+
}, []), [E, D] = f(!1);
|
|
513
|
+
l(() => {
|
|
514
|
+
D(!0);
|
|
515
|
+
}, []), l(() => {
|
|
516
|
+
let e = [...c.clients.values()].map((e) => b(e.errorBus, () => {
|
|
517
|
+
h.current?.refreshAuth();
|
|
518
|
+
}));
|
|
519
|
+
return () => {
|
|
520
|
+
for (let t of e) t.dispose();
|
|
521
|
+
};
|
|
522
|
+
}, [c.clients]);
|
|
523
|
+
let [O, k] = f(() => new Set(o === "eager" ? e.map((e) => e.name) : [])), A = s((e) => {
|
|
524
|
+
k((t) => t.has(e) ? t : /* @__PURE__ */ new Set([...t, e]));
|
|
525
|
+
}, []);
|
|
526
|
+
l(() => {
|
|
527
|
+
o === "eager" && k((t) => {
|
|
528
|
+
let n = new Set(t), r = !1;
|
|
529
|
+
for (let t of e) n.has(t.name) || (n.add(t.name), r = !0);
|
|
530
|
+
return r ? n : t;
|
|
531
|
+
});
|
|
532
|
+
}, [e, o]);
|
|
533
|
+
let j = u(() => e.filter((e) => O.has(e.name)), [e, O]);
|
|
534
|
+
l(() => {
|
|
535
|
+
if (j.length === 0) {
|
|
536
|
+
p({
|
|
537
|
+
clients: /* @__PURE__ */ new Map(),
|
|
538
|
+
initialized: !0
|
|
539
|
+
});
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
let e = ne(), t = v({
|
|
543
|
+
apis: j,
|
|
544
|
+
buildClient: De,
|
|
545
|
+
onChange: (e, t) => {
|
|
546
|
+
p({
|
|
547
|
+
clients: e,
|
|
548
|
+
initialized: t
|
|
549
|
+
});
|
|
550
|
+
},
|
|
551
|
+
onReconnecting: (e) => r({
|
|
552
|
+
id: `voltro:supervisor:${e}`,
|
|
553
|
+
kind: "reconnecting",
|
|
554
|
+
label: "Reconnecting…"
|
|
555
|
+
}),
|
|
556
|
+
...e ? { wedgeBackstop: e } : {}
|
|
557
|
+
});
|
|
558
|
+
return h.current = t, () => {
|
|
559
|
+
t.dispose(), h.current === t && (h.current = null);
|
|
560
|
+
};
|
|
561
|
+
}, [j]), l(() => {
|
|
562
|
+
if (!Q().diagnosticTransports || typeof window > "u") return;
|
|
563
|
+
let t = [], n = [], r = e[0]?.name ?? "web";
|
|
564
|
+
t.push(U({
|
|
565
|
+
baseUrl: window.location.origin,
|
|
566
|
+
appName: r
|
|
567
|
+
}));
|
|
568
|
+
for (let t of e) {
|
|
569
|
+
let e = xe(t.wsUrl, t.name);
|
|
570
|
+
e.length !== 0 && n.push(Y({
|
|
571
|
+
baseUrl: e,
|
|
572
|
+
originLabel: t.name
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
let i = y((e) => G(e.traceId));
|
|
576
|
+
return () => {
|
|
577
|
+
for (let e of t) e.dispose();
|
|
578
|
+
for (let e of n) e.dispose();
|
|
579
|
+
i();
|
|
580
|
+
};
|
|
581
|
+
}, [e]);
|
|
582
|
+
let M = new Map(e.map((e) => [e.name, c.clients.get(e.name)?.client ?? g])), N = new Map(e.map((e) => {
|
|
583
|
+
let t = c.clients.get(e.name);
|
|
584
|
+
return t ? [e.name, {
|
|
585
|
+
runtime: t.runtime,
|
|
586
|
+
cache: t.cache,
|
|
587
|
+
client: t.client,
|
|
588
|
+
descriptors: e.descriptors,
|
|
589
|
+
inspectBaseUrl: xe(e.wsUrl, e.name),
|
|
590
|
+
errorBus: t.errorBus
|
|
591
|
+
}] : [e.name, {
|
|
592
|
+
..._,
|
|
593
|
+
descriptors: e.descriptors
|
|
594
|
+
}];
|
|
595
|
+
}));
|
|
596
|
+
return /* @__PURE__ */ S(w.Provider, {
|
|
597
|
+
value: T,
|
|
598
|
+
children: /* @__PURE__ */ S(m, {
|
|
599
|
+
apis: N,
|
|
600
|
+
...o === "lazy" ? { demand: A } : {},
|
|
601
|
+
children: /* @__PURE__ */ S(t.Provider, {
|
|
602
|
+
value: M,
|
|
603
|
+
children: /* @__PURE__ */ S(a, {
|
|
604
|
+
chrome: E ? /* @__PURE__ */ C(x, { children: [
|
|
605
|
+
/* @__PURE__ */ S(ee, {}),
|
|
606
|
+
i,
|
|
607
|
+
Q().diagnosticTransports ? /* @__PURE__ */ S(_e, {}) : null
|
|
608
|
+
] }) : null,
|
|
609
|
+
children: n
|
|
610
|
+
})
|
|
611
|
+
})
|
|
612
|
+
})
|
|
613
|
+
});
|
|
614
|
+
}, ke = ({ App: e, apis: t, Devtools: n, connect: r }) => /* @__PURE__ */ S(Oe, {
|
|
615
|
+
apis: t,
|
|
616
|
+
chrome: n ? /* @__PURE__ */ S(n, {}) : null,
|
|
617
|
+
...r ? { connect: r } : {},
|
|
618
|
+
children: /* @__PURE__ */ S(e, {})
|
|
619
|
+
});
|
|
620
|
+
//#endregion
|
|
621
|
+
export { Y as a, ee as c, U as i, w as l, Oe as n, G as o, H as r, q as s, ke as t, T as u };
|
package/dist/frameworkBoot.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./frameworkBoot-
|
|
1
|
+
import { n as e, t } from "./frameworkBoot-CfNLGgAC.js";
|
|
2
2
|
export { t as FrameworkBoot, e as VoltroRuntimeProvider };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./globalContext-AuflFFmy.js";
|
|
2
2
|
import { AppClientsContext as t, useAppClient as n } from "./hooks.js";
|
|
3
|
-
import { a as r, c as i, i as a, l as o, o as s, r as c, s as l, u } from "./frameworkBoot-
|
|
3
|
+
import { a as r, c as i, i as a, l as o, o as s, r as c, s as l, u } from "./frameworkBoot-CfNLGgAC.js";
|
|
4
4
|
import { a as d, c as f, i as p, l as m, o as h, u as g } from "./defaultFallbacks-SQ45vAhz.js";
|
|
5
5
|
import { getIslandComponent as _, hydrateIslandsOnPage as v, island as y } from "./islands.js";
|
|
6
6
|
import { c as b, d as x, f as S, g as C, l as w, m as T } from "./routerState-Cr6fTbka.js";
|
package/dist/mount.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./frameworkBoot-
|
|
1
|
+
import { t as e } from "./frameworkBoot-CfNLGgAC.js";
|
|
2
2
|
import { hydrateIslandsOnPage as t } from "./islands.js";
|
|
3
3
|
import { o as n, r, t as i } from "./routerState-Cr6fTbka.js";
|
|
4
4
|
import { StrictMode as a } from "react";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"description": "The Voltro web framework — file-based routing, render modes (SSR / SSG / islands), the page-export contract, data hooks, and the browser mount.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"node": ">=24.0.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@voltro/client": "0.
|
|
67
|
-
"@voltro/ui": "0.
|
|
66
|
+
"@voltro/client": "0.62.0",
|
|
67
|
+
"@voltro/ui": "0.62.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@effect/platform": "^0.97.0",
|
|
@@ -1,541 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./globalContext-AuflFFmy.js";
|
|
2
|
-
import { AppClientsContext as t } from "./hooks.js";
|
|
3
|
-
import { c as n, l as r, r as i, s as a, u as o } from "./defaultFallbacks-SQ45vAhz.js";
|
|
4
|
-
import { useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
|
|
5
|
-
import { FrameworkRuntimesProvider as ee, buildApiRuntime as m, ssrClientProxy as te, ssrStubHandle as ne, startApiSupervisor as re, subscribeClientTraces as ie, wireAuthRefresh as ae } from "@voltro/client";
|
|
6
|
-
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
-
//#region src/reconnect.ts
|
|
8
|
-
var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S = () => {
|
|
9
|
-
let e = p(o, n, n).some((e) => e.kind === "loading" || e.kind === "reconnecting"), [t, r] = f(!1);
|
|
10
|
-
return l(() => {
|
|
11
|
-
if (!e) {
|
|
12
|
-
r(!1);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
let t = setTimeout(() => r(!0), b);
|
|
16
|
-
return () => clearTimeout(t);
|
|
17
|
-
}, [e]), /* @__PURE__ */ _("div", {
|
|
18
|
-
"aria-hidden": "true",
|
|
19
|
-
"data-voltro-nav-indicator": "",
|
|
20
|
-
style: {
|
|
21
|
-
position: "fixed",
|
|
22
|
-
right: 18,
|
|
23
|
-
bottom: 18,
|
|
24
|
-
zIndex: 2147483646,
|
|
25
|
-
pointerEvents: "none",
|
|
26
|
-
opacity: +!!t,
|
|
27
|
-
transform: t ? "translateY(0) scale(1)" : "translateY(4px) scale(0.96)",
|
|
28
|
-
transition: `opacity ${x}ms ease, transform ${x}ms ease`,
|
|
29
|
-
display: "grid",
|
|
30
|
-
placeItems: "center",
|
|
31
|
-
width: 34,
|
|
32
|
-
height: 34,
|
|
33
|
-
borderRadius: 999,
|
|
34
|
-
background: "color-mix(in oklch, canvas 78%, transparent)",
|
|
35
|
-
backdropFilter: "blur(6px)",
|
|
36
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
37
|
-
border: "1px solid color-mix(in oklch, canvastext 12%, transparent)",
|
|
38
|
-
boxShadow: "0 4px 14px color-mix(in oklch, canvastext 16%, transparent)"
|
|
39
|
-
},
|
|
40
|
-
children: [/* @__PURE__ */ g("span", { "data-voltro-nav-spinner": "" }), /* @__PURE__ */ g("style", { children: C })]
|
|
41
|
-
});
|
|
42
|
-
}, C = "\n@keyframes voltroNavSpin { to { transform: rotate(360deg); } }\n[data-voltro-nav-spinner] {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 2px solid color-mix(in oklch, canvastext 22%, transparent);\n border-top-color: color-mix(in oklch, canvastext 78%, transparent);\n animation: voltroNavSpin 0.7s linear infinite;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-voltro-nav-spinner] { animation-duration: 1.6s; }\n}\n", w = 2e3, T = () => typeof window < "u" && !1, E = () => typeof window > "u" ? null : `${window.location.origin}/`, D = 2e4, O = "voltro:wedge-reload-at", k = () => {
|
|
43
|
-
try {
|
|
44
|
-
let e = Number(window.sessionStorage.getItem(O) ?? "0"), t = Date.now();
|
|
45
|
-
if (t - e < D) return;
|
|
46
|
-
window.sessionStorage.setItem(O, String(t));
|
|
47
|
-
} catch {}
|
|
48
|
-
window.location.reload();
|
|
49
|
-
}, A = () => {
|
|
50
|
-
if (T()) return {
|
|
51
|
-
afterFailures: 2,
|
|
52
|
-
arm: () => {
|
|
53
|
-
let e = E();
|
|
54
|
-
if (e === null) return () => {};
|
|
55
|
-
let t = setInterval(() => {
|
|
56
|
-
fetch(e, {
|
|
57
|
-
method: "GET",
|
|
58
|
-
cache: "no-store",
|
|
59
|
-
signal: AbortSignal.timeout(w)
|
|
60
|
-
}).then((e) => {
|
|
61
|
-
e.status < 500 && k();
|
|
62
|
-
}).catch(() => {});
|
|
63
|
-
}, w);
|
|
64
|
-
return () => clearInterval(t);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}, j = {
|
|
68
|
-
log: console.log.bind(console),
|
|
69
|
-
info: console.info.bind(console),
|
|
70
|
-
warn: console.warn.bind(console),
|
|
71
|
-
error: console.error.bind(console),
|
|
72
|
-
debug: console.debug.bind(console)
|
|
73
|
-
}, M = 200, oe = 400, se = 20, N = 1e3, P = (e) => {
|
|
74
|
-
if (typeof e == "string") return e;
|
|
75
|
-
if (e === void 0) return "undefined";
|
|
76
|
-
if (e === null) return "null";
|
|
77
|
-
if (e instanceof Error) return e.stack ?? e.message;
|
|
78
|
-
if (typeof e == "object") try {
|
|
79
|
-
return JSON.stringify(e, ce());
|
|
80
|
-
} catch {
|
|
81
|
-
return Object.prototype.toString.call(e);
|
|
82
|
-
}
|
|
83
|
-
return String(e);
|
|
84
|
-
}, ce = () => {
|
|
85
|
-
let e = /* @__PURE__ */ new WeakSet();
|
|
86
|
-
return (t, n) => {
|
|
87
|
-
if (typeof n == "object" && n) {
|
|
88
|
-
if (e.has(n)) return "[Circular]";
|
|
89
|
-
e.add(n);
|
|
90
|
-
}
|
|
91
|
-
return n;
|
|
92
|
-
};
|
|
93
|
-
}, F = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, I = /%[sdifoOc]/g, L = (e) => {
|
|
94
|
-
if (e.length === 0) return {
|
|
95
|
-
message: "",
|
|
96
|
-
rest: []
|
|
97
|
-
};
|
|
98
|
-
let t = e[0];
|
|
99
|
-
if (typeof t != "string" || !I.test(t)) return {
|
|
100
|
-
message: P(t),
|
|
101
|
-
rest: e.slice(1)
|
|
102
|
-
};
|
|
103
|
-
I.lastIndex = 0;
|
|
104
|
-
let n = 1;
|
|
105
|
-
return {
|
|
106
|
-
message: t.replace(I, (t) => {
|
|
107
|
-
if (t === "%c") return n++, "";
|
|
108
|
-
if (n >= e.length) return t;
|
|
109
|
-
let r = e[n++];
|
|
110
|
-
switch (t) {
|
|
111
|
-
case "%s": return r === void 0 ? "undefined" : r === null ? "null" : String(r);
|
|
112
|
-
case "%d":
|
|
113
|
-
case "%i": {
|
|
114
|
-
let e = typeof r == "number" ? Math.trunc(r) : parseInt(String(r), 10);
|
|
115
|
-
return Number.isFinite(e) ? String(e) : "NaN";
|
|
116
|
-
}
|
|
117
|
-
case "%f": {
|
|
118
|
-
let e = typeof r == "number" ? r : parseFloat(String(r));
|
|
119
|
-
return Number.isFinite(e) ? String(e) : "NaN";
|
|
120
|
-
}
|
|
121
|
-
case "%o":
|
|
122
|
-
case "%O": return P(r);
|
|
123
|
-
default: return t;
|
|
124
|
-
}
|
|
125
|
-
}),
|
|
126
|
-
rest: e.slice(n)
|
|
127
|
-
};
|
|
128
|
-
}, R = (e) => {
|
|
129
|
-
let t = e.flushAfterMs ?? oe, n = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/clientLog`, r = [], i = null, a = !1, o = () => {
|
|
130
|
-
if (i !== null && (clearTimeout(i), i = null), r.length === 0) return;
|
|
131
|
-
let t = r;
|
|
132
|
-
r = [];
|
|
133
|
-
let a = {
|
|
134
|
-
app: e.appName,
|
|
135
|
-
page: typeof window < "u" ? window.location.pathname : void 0,
|
|
136
|
-
ua: typeof navigator < "u" ? F(navigator.userAgent, 200) : void 0,
|
|
137
|
-
entries: t
|
|
138
|
-
};
|
|
139
|
-
try {
|
|
140
|
-
fetch(n, {
|
|
141
|
-
method: "POST",
|
|
142
|
-
headers: { "content-type": "application/json" },
|
|
143
|
-
body: JSON.stringify(a),
|
|
144
|
-
keepalive: !0,
|
|
145
|
-
credentials: "omit"
|
|
146
|
-
}).catch(() => {});
|
|
147
|
-
} catch {}
|
|
148
|
-
}, s = () => {
|
|
149
|
-
i === null && (i = setTimeout(o, t));
|
|
150
|
-
}, c = (e, t) => {
|
|
151
|
-
if (a) return;
|
|
152
|
-
r.length >= M && r.shift();
|
|
153
|
-
let n = t.find((e) => e instanceof Error), i = t.find((e) => typeof e == "object" && !!e && "componentStack" in e), c = typeof i?.componentStack == "string" ? i.componentStack : void 0, l = t[0] instanceof Error ? {
|
|
154
|
-
message: t[0].message,
|
|
155
|
-
rest: t.slice(1)
|
|
156
|
-
} : L(t), u = F(l.message, N), d = l.rest.filter((e) => e !== n && e !== i).map((e) => F(P(e), N)), f;
|
|
157
|
-
n ? (f = n.stack ?? n.message, c && (f += `\n\nComponent stack:${c}`)) : e === "error" && (f = (/* @__PURE__ */ Error()).stack);
|
|
158
|
-
let p = {
|
|
159
|
-
ts: Date.now(),
|
|
160
|
-
level: e,
|
|
161
|
-
message: u,
|
|
162
|
-
...d.length > 0 ? { args: d } : {},
|
|
163
|
-
...f === void 0 ? {} : { stack: f }
|
|
164
|
-
};
|
|
165
|
-
r.push(p), r.length >= se ? o() : s();
|
|
166
|
-
}, l = (e) => (...t) => {
|
|
167
|
-
j[e](...t), c(e, t);
|
|
168
|
-
};
|
|
169
|
-
console.log = l("log"), console.info = l("info"), console.warn = l("warn"), console.error = l("error"), console.debug = l("debug");
|
|
170
|
-
let u = () => {
|
|
171
|
-
o();
|
|
172
|
-
};
|
|
173
|
-
return typeof window < "u" && (window.addEventListener("beforeunload", u), window.addEventListener("pagehide", u)), { dispose: () => {
|
|
174
|
-
a = !0, o(), i !== null && (clearTimeout(i), i = null), console.log = j.log, console.info = j.info, console.warn = j.warn, console.error = j.error, console.debug = j.debug, typeof window < "u" && (window.removeEventListener("beforeunload", u), window.removeEventListener("pagehide", u));
|
|
175
|
-
} };
|
|
176
|
-
}, le = 500, z = /* @__PURE__ */ new Set(), B = (e) => {
|
|
177
|
-
if (!z.has(e) && (z.add(e), z.size > le)) {
|
|
178
|
-
let e = z.values().next().value;
|
|
179
|
-
e !== void 0 && z.delete(e);
|
|
180
|
-
}
|
|
181
|
-
}, V = /* @__PURE__ */ new Set(), H = (e) => (V.add(e), () => {
|
|
182
|
-
V.delete(e);
|
|
183
|
-
}), U = (e) => {
|
|
184
|
-
for (let t of V) try {
|
|
185
|
-
t(e);
|
|
186
|
-
} catch {}
|
|
187
|
-
}, ue = {
|
|
188
|
-
log: "log",
|
|
189
|
-
info: "info",
|
|
190
|
-
warn: "warn",
|
|
191
|
-
error: "error",
|
|
192
|
-
debug: "debug"
|
|
193
|
-
}, W = {
|
|
194
|
-
log: "color: #888;",
|
|
195
|
-
info: "color: #2563eb;",
|
|
196
|
-
warn: "color: #c2410c;",
|
|
197
|
-
error: "color: #b91c1c; font-weight: 600;",
|
|
198
|
-
debug: "color: #6b7280;"
|
|
199
|
-
}, G = (e) => {
|
|
200
|
-
if (typeof EventSource > "u") return { dispose: () => {} };
|
|
201
|
-
let t = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/stream?live=1`, n = null, r = !1, i = null, a = () => {
|
|
202
|
-
r || (n = new EventSource(t), n.addEventListener("log", (t) => {
|
|
203
|
-
try {
|
|
204
|
-
let n = JSON.parse(t.data).payload;
|
|
205
|
-
if (!n || typeof n.message != "string" || n.scope === "client") return;
|
|
206
|
-
let r = n.level === void 0 ? "log" : ue[n.level], i = n.scope ? ` ${n.scope}` : "";
|
|
207
|
-
j[r](`%c[server ${e.originLabel}${i}]%c ${n.message}`, W[r], "", ...n.fields ? [n.fields] : []);
|
|
208
|
-
} catch {}
|
|
209
|
-
}), n.addEventListener("trace", (t) => {
|
|
210
|
-
try {
|
|
211
|
-
let n = JSON.parse(t.data).payload;
|
|
212
|
-
if (!n || n.status !== "error" || typeof n.traceId != "string" || !z.has(n.traceId)) return;
|
|
213
|
-
let r = n.name ?? "span", i = n.statusMessage && n.statusMessage.length > 0 ? n.statusMessage : `${r} failed`;
|
|
214
|
-
U({
|
|
215
|
-
traceId: n.traceId,
|
|
216
|
-
spanName: r,
|
|
217
|
-
api: e.originLabel,
|
|
218
|
-
message: i,
|
|
219
|
-
ts: Date.now()
|
|
220
|
-
}), j.error(`%c[trace ${e.originLabel}]%c ${r} failed — ${i} (trace ${n.traceId})`, W.error, "");
|
|
221
|
-
} catch {}
|
|
222
|
-
}), n.addEventListener("error", () => {
|
|
223
|
-
n && n.readyState === EventSource.CLOSED && (n = null, !r && i === null && (i = setTimeout(() => {
|
|
224
|
-
i = null, a();
|
|
225
|
-
}, 2e3)));
|
|
226
|
-
}));
|
|
227
|
-
};
|
|
228
|
-
return a(), { dispose: () => {
|
|
229
|
-
r = !0, i !== null && (clearTimeout(i), i = null), n?.close(), n = null;
|
|
230
|
-
} };
|
|
231
|
-
}, K = {
|
|
232
|
-
card: "oklch(0.21 0.006 285)",
|
|
233
|
-
cardRaised: "oklch(0.25 0.007 285)",
|
|
234
|
-
border: "oklch(1 0 0 / 14%)",
|
|
235
|
-
fg: "oklch(0.98 0.005 285)",
|
|
236
|
-
muted: "oklch(0.65 0.012 285)",
|
|
237
|
-
danger: "oklch(0.7 0.21 22)",
|
|
238
|
-
dangerDim: "oklch(0.5 0.18 22 / 25%)"
|
|
239
|
-
}, q = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace", de = "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fe = 0, pe = () => {
|
|
240
|
-
let [e, t] = f([]);
|
|
241
|
-
if (l(() => H((e) => {
|
|
242
|
-
t((t) => {
|
|
243
|
-
if (t.some((t) => t.traceId === e.traceId && t.spanName === e.spanName)) return t;
|
|
244
|
-
let n = [...t, {
|
|
245
|
-
...e,
|
|
246
|
-
id: ++fe
|
|
247
|
-
}];
|
|
248
|
-
return n.length > 4 ? n.slice(n.length - 4) : n;
|
|
249
|
-
});
|
|
250
|
-
}), []), e.length === 0) return null;
|
|
251
|
-
let n = (e) => t((t) => t.filter((t) => t.id !== e));
|
|
252
|
-
return /* @__PURE__ */ g("div", {
|
|
253
|
-
style: {
|
|
254
|
-
position: "fixed",
|
|
255
|
-
right: 16,
|
|
256
|
-
bottom: 16,
|
|
257
|
-
zIndex: 2147483646,
|
|
258
|
-
display: "flex",
|
|
259
|
-
flexDirection: "column",
|
|
260
|
-
gap: 10,
|
|
261
|
-
maxWidth: 380,
|
|
262
|
-
fontFamily: de,
|
|
263
|
-
pointerEvents: "none"
|
|
264
|
-
},
|
|
265
|
-
children: e.map((e) => /* @__PURE__ */ g(me, {
|
|
266
|
-
toast: e,
|
|
267
|
-
onDismiss: () => n(e.id)
|
|
268
|
-
}, e.id))
|
|
269
|
-
});
|
|
270
|
-
}, me = ({ toast: e, onDismiss: t }) => {
|
|
271
|
-
let [n, r] = f(!1), a = `voltro logs --trace ${e.traceId}`;
|
|
272
|
-
return /* @__PURE__ */ _("div", {
|
|
273
|
-
style: {
|
|
274
|
-
pointerEvents: "auto",
|
|
275
|
-
background: K.card,
|
|
276
|
-
border: `1px solid ${K.danger}`,
|
|
277
|
-
borderLeft: `3px solid ${K.danger}`,
|
|
278
|
-
borderRadius: 10,
|
|
279
|
-
padding: "12px 14px",
|
|
280
|
-
boxShadow: "0 8px 28px rgba(0,0,0,0.45)",
|
|
281
|
-
color: K.fg,
|
|
282
|
-
fontSize: 13,
|
|
283
|
-
lineHeight: 1.45
|
|
284
|
-
},
|
|
285
|
-
children: [
|
|
286
|
-
/* @__PURE__ */ _("div", {
|
|
287
|
-
style: {
|
|
288
|
-
display: "flex",
|
|
289
|
-
alignItems: "center",
|
|
290
|
-
justifyContent: "space-between",
|
|
291
|
-
gap: 8
|
|
292
|
-
},
|
|
293
|
-
children: [/* @__PURE__ */ g("span", {
|
|
294
|
-
style: {
|
|
295
|
-
color: K.danger,
|
|
296
|
-
fontWeight: 600,
|
|
297
|
-
fontSize: 12,
|
|
298
|
-
letterSpacing: .3
|
|
299
|
-
},
|
|
300
|
-
children: "⚠ Backend error"
|
|
301
|
-
}), /* @__PURE__ */ g("button", {
|
|
302
|
-
onClick: t,
|
|
303
|
-
"aria-label": "Dismiss",
|
|
304
|
-
style: {
|
|
305
|
-
background: "transparent",
|
|
306
|
-
border: "none",
|
|
307
|
-
color: K.muted,
|
|
308
|
-
cursor: "pointer",
|
|
309
|
-
fontSize: 16,
|
|
310
|
-
lineHeight: 1,
|
|
311
|
-
padding: 0
|
|
312
|
-
},
|
|
313
|
-
children: "×"
|
|
314
|
-
})]
|
|
315
|
-
}),
|
|
316
|
-
/* @__PURE__ */ _("div", {
|
|
317
|
-
style: {
|
|
318
|
-
marginTop: 6,
|
|
319
|
-
color: K.muted,
|
|
320
|
-
fontSize: 11.5
|
|
321
|
-
},
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ g("span", {
|
|
324
|
-
style: {
|
|
325
|
-
fontFamily: q,
|
|
326
|
-
color: K.fg
|
|
327
|
-
},
|
|
328
|
-
children: e.api
|
|
329
|
-
}),
|
|
330
|
-
" · ",
|
|
331
|
-
/* @__PURE__ */ g("span", {
|
|
332
|
-
style: { fontFamily: q },
|
|
333
|
-
children: e.spanName
|
|
334
|
-
})
|
|
335
|
-
]
|
|
336
|
-
}),
|
|
337
|
-
/* @__PURE__ */ g("div", {
|
|
338
|
-
style: {
|
|
339
|
-
marginTop: 4,
|
|
340
|
-
color: K.fg,
|
|
341
|
-
wordBreak: "break-word"
|
|
342
|
-
},
|
|
343
|
-
children: e.message
|
|
344
|
-
}),
|
|
345
|
-
/* @__PURE__ */ g("button", {
|
|
346
|
-
onClick: () => {
|
|
347
|
-
i(a).then((e) => {
|
|
348
|
-
e !== "failed" && (r(!0), setTimeout(() => r(!1), 1500));
|
|
349
|
-
});
|
|
350
|
-
},
|
|
351
|
-
title: "Copy command",
|
|
352
|
-
style: {
|
|
353
|
-
marginTop: 10,
|
|
354
|
-
display: "block",
|
|
355
|
-
width: "100%",
|
|
356
|
-
textAlign: "left",
|
|
357
|
-
background: K.cardRaised,
|
|
358
|
-
border: `1px solid ${K.border}`,
|
|
359
|
-
borderRadius: 6,
|
|
360
|
-
padding: "6px 8px",
|
|
361
|
-
color: K.muted,
|
|
362
|
-
fontFamily: q,
|
|
363
|
-
fontSize: 11,
|
|
364
|
-
cursor: "pointer"
|
|
365
|
-
},
|
|
366
|
-
children: n ? "✓ copied" : a
|
|
367
|
-
})
|
|
368
|
-
]
|
|
369
|
-
});
|
|
370
|
-
}, he = (e) => {
|
|
371
|
-
try {
|
|
372
|
-
let t = new URL(e);
|
|
373
|
-
return `${t.protocol === "wss:" ? "https:" : "http:"}//${t.host}`;
|
|
374
|
-
} catch {
|
|
375
|
-
return "";
|
|
376
|
-
}
|
|
377
|
-
}, J = (e, t) => /^wss?:\/\//i.test(e) || /^https?:\/\//i.test(e) ? he(e) : `/_voltro/api/${t}`, ge = typeof performance < "u" ? performance.now() : Date.now(), Y = () => {
|
|
378
|
-
if (typeof window > "u") return !1;
|
|
379
|
-
try {
|
|
380
|
-
if (window.localStorage?.getItem("framework_debug") === "1") return !0;
|
|
381
|
-
} catch {}
|
|
382
|
-
return {
|
|
383
|
-
BASE_URL: "/",
|
|
384
|
-
DEV: !1,
|
|
385
|
-
MODE: "production",
|
|
386
|
-
PROD: !0,
|
|
387
|
-
SSR: !1
|
|
388
|
-
}.DEV === !0;
|
|
389
|
-
}, X = (e, ...t) => {
|
|
390
|
-
if (!Y()) return;
|
|
391
|
-
let n = ((typeof performance < "u" ? performance.now() : Date.now()) - ge).toFixed(0).padStart(6, " ");
|
|
392
|
-
console.log(`[fw ${e} +${n}ms]`, ...t);
|
|
393
|
-
}, Z = 3e3, _e = 0, Q = (e, t, n, r) => (i, a) => {
|
|
394
|
-
let o = ++_e;
|
|
395
|
-
X(e, `ws#${o} create gen=${t} url=${i}`);
|
|
396
|
-
let s = new globalThis.WebSocket(i, a), c = !1, l = !1, u = (e) => {
|
|
397
|
-
l || (l = !0, r(e));
|
|
398
|
-
}, d = (t) => (n) => {
|
|
399
|
-
let r = t === "close" ? `code=${n.code}` : "type=error";
|
|
400
|
-
X(e, `ws#${o} ${t} opened=${c} issued=${l} ${r}`), u(t);
|
|
401
|
-
};
|
|
402
|
-
return s.addEventListener("open", () => {
|
|
403
|
-
c = !0, X(e, `ws#${o} open gen=${t}`), n();
|
|
404
|
-
}), s.addEventListener("close", d("close")), s.addEventListener("error", d("error")), setTimeout(() => {
|
|
405
|
-
if (!c && !l) {
|
|
406
|
-
X(e, `ws#${o} connect-timeout gen=${t} (no open within ${Z}ms)`), u("connect-timeout");
|
|
407
|
-
try {
|
|
408
|
-
s.close();
|
|
409
|
-
} catch {}
|
|
410
|
-
}
|
|
411
|
-
}, Z), s;
|
|
412
|
-
}, ve = async (e, t, n, r) => {
|
|
413
|
-
X(e.name, `build gen=${t}: making runtime`);
|
|
414
|
-
try {
|
|
415
|
-
let i = await m({
|
|
416
|
-
name: e.name,
|
|
417
|
-
wsUrl: e.wsUrl,
|
|
418
|
-
group: e.group,
|
|
419
|
-
headers: e.headers,
|
|
420
|
-
webSocketConstructor: Q(e.name, t, n, r)
|
|
421
|
-
});
|
|
422
|
-
return X(e.name, `build gen=${t}: runtime resolved`), i;
|
|
423
|
-
} catch (n) {
|
|
424
|
-
throw X(e.name, `build gen=${t}: runtime FAILED, disposing`, n.message ?? n), n;
|
|
425
|
-
}
|
|
426
|
-
}, $ = ({ apis: e, children: n, chrome: i, connect: o = "eager" }) => {
|
|
427
|
-
let [c, p] = f(() => ({
|
|
428
|
-
initialized: e.length === 0,
|
|
429
|
-
clients: /* @__PURE__ */ new Map()
|
|
430
|
-
})), m = d(null), y = s(() => {
|
|
431
|
-
m.current?.reconnect();
|
|
432
|
-
}, []), [b, x] = f(!1);
|
|
433
|
-
l(() => {
|
|
434
|
-
x(!0);
|
|
435
|
-
}, []), l(() => {
|
|
436
|
-
let e = [...c.clients.values()].map((e) => ae(e.errorBus, () => {
|
|
437
|
-
m.current?.refreshAuth();
|
|
438
|
-
}));
|
|
439
|
-
return () => {
|
|
440
|
-
for (let t of e) t.dispose();
|
|
441
|
-
};
|
|
442
|
-
}, [c.clients]);
|
|
443
|
-
let [C, w] = f(() => new Set(o === "eager" ? e.map((e) => e.name) : [])), T = s((e) => {
|
|
444
|
-
w((t) => t.has(e) ? t : /* @__PURE__ */ new Set([...t, e]));
|
|
445
|
-
}, []);
|
|
446
|
-
l(() => {
|
|
447
|
-
o === "eager" && w((t) => {
|
|
448
|
-
let n = new Set(t), r = !1;
|
|
449
|
-
for (let t of e) n.has(t.name) || (n.add(t.name), r = !0);
|
|
450
|
-
return r ? n : t;
|
|
451
|
-
});
|
|
452
|
-
}, [e, o]);
|
|
453
|
-
let E = u(() => e.filter((e) => C.has(e.name)), [e, C]);
|
|
454
|
-
l(() => {
|
|
455
|
-
if (E.length === 0) {
|
|
456
|
-
p({
|
|
457
|
-
clients: /* @__PURE__ */ new Map(),
|
|
458
|
-
initialized: !0
|
|
459
|
-
});
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
let e = A(), t = re({
|
|
463
|
-
apis: E,
|
|
464
|
-
buildClient: ve,
|
|
465
|
-
onChange: (e, t) => {
|
|
466
|
-
p({
|
|
467
|
-
clients: e,
|
|
468
|
-
initialized: t
|
|
469
|
-
});
|
|
470
|
-
},
|
|
471
|
-
onReconnecting: (e) => r({
|
|
472
|
-
id: `voltro:supervisor:${e}`,
|
|
473
|
-
kind: "reconnecting",
|
|
474
|
-
label: "Reconnecting…"
|
|
475
|
-
}),
|
|
476
|
-
...e ? { wedgeBackstop: e } : {}
|
|
477
|
-
});
|
|
478
|
-
return m.current = t, () => {
|
|
479
|
-
t.dispose(), m.current === t && (m.current = null);
|
|
480
|
-
};
|
|
481
|
-
}, [E]), l(() => {
|
|
482
|
-
if (!Y() || typeof window > "u") return;
|
|
483
|
-
let t = [], n = [], r = e[0]?.name ?? "web";
|
|
484
|
-
t.push(R({
|
|
485
|
-
baseUrl: window.location.origin,
|
|
486
|
-
appName: r
|
|
487
|
-
}));
|
|
488
|
-
for (let t of e) {
|
|
489
|
-
let e = J(t.wsUrl, t.name);
|
|
490
|
-
e.length !== 0 && n.push(G({
|
|
491
|
-
baseUrl: e,
|
|
492
|
-
originLabel: t.name
|
|
493
|
-
}));
|
|
494
|
-
}
|
|
495
|
-
let i = ie((e) => B(e.traceId));
|
|
496
|
-
return () => {
|
|
497
|
-
for (let e of t) e.dispose();
|
|
498
|
-
for (let e of n) e.dispose();
|
|
499
|
-
i();
|
|
500
|
-
};
|
|
501
|
-
}, [e]);
|
|
502
|
-
let D = new Map(e.map((e) => [e.name, c.clients.get(e.name)?.client ?? te])), O = new Map(e.map((e) => {
|
|
503
|
-
let t = c.clients.get(e.name);
|
|
504
|
-
return t ? [e.name, {
|
|
505
|
-
runtime: t.runtime,
|
|
506
|
-
cache: t.cache,
|
|
507
|
-
client: t.client,
|
|
508
|
-
descriptors: e.descriptors,
|
|
509
|
-
inspectBaseUrl: J(e.wsUrl, e.name),
|
|
510
|
-
errorBus: t.errorBus
|
|
511
|
-
}] : [e.name, {
|
|
512
|
-
...ne,
|
|
513
|
-
descriptors: e.descriptors
|
|
514
|
-
}];
|
|
515
|
-
}));
|
|
516
|
-
return /* @__PURE__ */ g(v.Provider, {
|
|
517
|
-
value: y,
|
|
518
|
-
children: /* @__PURE__ */ g(ee, {
|
|
519
|
-
apis: O,
|
|
520
|
-
...o === "lazy" ? { demand: T } : {},
|
|
521
|
-
children: /* @__PURE__ */ g(t.Provider, {
|
|
522
|
-
value: D,
|
|
523
|
-
children: /* @__PURE__ */ g(a, {
|
|
524
|
-
chrome: b ? /* @__PURE__ */ _(h, { children: [
|
|
525
|
-
/* @__PURE__ */ g(S, {}),
|
|
526
|
-
i,
|
|
527
|
-
Y() ? /* @__PURE__ */ g(pe, {}) : null
|
|
528
|
-
] }) : null,
|
|
529
|
-
children: n
|
|
530
|
-
})
|
|
531
|
-
})
|
|
532
|
-
})
|
|
533
|
-
});
|
|
534
|
-
}, ye = ({ App: e, apis: t, Devtools: n, connect: r }) => /* @__PURE__ */ g($, {
|
|
535
|
-
apis: t,
|
|
536
|
-
chrome: n ? /* @__PURE__ */ g(n, {}) : null,
|
|
537
|
-
...r ? { connect: r } : {},
|
|
538
|
-
children: /* @__PURE__ */ g(e, {})
|
|
539
|
-
});
|
|
540
|
-
//#endregion
|
|
541
|
-
export { G as a, S as c, R as i, v as l, $ as n, B as o, L as r, H as s, ye as t, y as u };
|