@voltro/web 0.39.1 → 0.40.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 CHANGED
@@ -39,6 +39,164 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.40.0] — 2026-08-16
43
+
44
+ ### ⚠ BREAKING
45
+
46
+ - **@voltro/client, @voltro/web** — A subscription whose COLD START failed is its own state — `failed: true`, `loading: false` — so "it is loading" is a true statement again.
47
+
48
+ The old shape left `loading: true` for a subscription where nothing was in flight and nothing more was coming. The type's own comment predicted the consequence:
49
+
50
+ > A cold-start failure leaves `loading` TRUE … so a component that branches on > `loading` alone renders a skeleton forever. Check `error` to break out of it.
51
+
52
+ A consumer quoted that back with the right conclusion: **a comment that predicts the misbehaviour of its own field is an API resting on discipline.** `loading` means "something is coming" everywhere else; here it meant "something is coming OR never again", and the escape hatch was a second field that the natural shape of a wrapper — pass `{ data, loading }` through — silently drops. They had three such wrappers. The framework had six, in `useWorkflow.ts`, and the compiler named all six the moment the state existed.
53
+
54
+ `failed` is a positive discriminant, so the check reads as one:
55
+
56
+ ```tsx
57
+ if (s.loading) return <Skeleton/>
58
+ if (s.failed) return <RetryPanel error={s.error}/>
59
+ return <Table rows={s.data}/>
60
+ ```
61
+
62
+ **BREAKING**: `!loading` no longer proves `data` is present, so every call site that reads `data` after a bare `loading` check is a type error naming file and line. Nothing fails silently. The codemod is `manual` on purpose — a transform could add `|| s.failed` everywhere and would be wrong about half of them, since an infinite skeleton is precisely what this removes.
63
+
64
+ **Measured blast radius**, because the estimate was worse than the reality: 20 errors inside `@voltro/client` (mostly its own `useWorkflow` wrapper and the type-tests) and **zero** in `@voltro/web`, `devtools-ui`, the devtools app, the cloud app, and all 45 templates. Most consumers were already using a `fallback` or a wrapper, which is what made the original defect so quiet.
65
+
66
+ Unchanged: a failure AFTER the first snapshot still leaves good data on screen with `error` set — only the cold start is `failed`. A `fallback` subscription still has `data` always present, so `failed` reports there rather than gating. `idle` stays opt-in by overload; `failed` is not opt-in, because any subscription's cold start can fail. And the state is terminal for one TRANSPORT: a reconnect discards the error and re-subscribes.
67
+ - **@voltro/protocol, @voltro/runtime, @voltro/voltro** — A guard refusing a caller whose credential was REJECTED now answers `Unauthenticated`, not `ScopeError`.
68
+
69
+ Measured by a consumer: a user's tab outlived their IdP's token lifetime. The strategy logged it plainly —
70
+
71
+ ```
72
+ WARN auth strategy "supabase" rejected request: supabase jwt expired
73
+ WARN mutation.tasks.update failed: missing required scope 'task:u:o'
74
+ ```
75
+
76
+ — and the wire said the caller lacked a scope. Technically true (an anonymous caller holds none) and it sends everyone who reads it into the permissions system while the problem is an expired session. They did that round; the subject was their administrator, and the same call with a fresh token worked.
77
+
78
+ **The obvious fix would have broken more than it fixed**, which is why this shape and not that one. Failing hard when a strategy rejects would break every `openAccess` procedure for anyone holding a stale cookie — a public page that needs no session at all would start refusing. So the FACT travels instead: a rejected credential stamps `credentialRejected` on the anonymous subject it falls back to, and only a guard that actually refuses spends it. `openAccess` never reaches that point and is untouched.
79
+
80
+ Three details worth knowing if you touch it:
81
+
82
+ - **The stamp happens AFTER the app's `fallback`.** That callback builds its own anonymous subject and knows nothing about the rejection; stamping before it would be silently discarded — the shape of every "wired on one path" defect in this codebase. - **ONE conversion point** (`asRefusal`), at the exit rather than at each `return`. Every branch builds the `ScopeError` it always built; one place decides what it MEANS. - **`Unauthenticated` is merged into the wire union** for guarded procedures AND guarded events, beside `ScopeError`. Without that it would be a tagged error the descriptor cannot represent, and the server would collapse it to `InternalError` — the defect another consumer reported the same week.
83
+
84
+ A caller who presented NO credential still gets `ScopeError`. Collapsing both would send a genuinely under-privileged user to the login page.
85
+
86
+ **Why this is BREAKING although nothing was removed.** Three published results gained a union member:
87
+
88
+ ```ts
89
+ checkGuards(…) // ScopeError | Unauthenticated | null (was ScopeError | null)
90
+ checkGuardsEffect(…) // Effect<ScopeError | Unauthenticated | null>
91
+ bindEvent(…) // Stream<…, ScopeError | Unauthenticated, …>
92
+ ```
93
+
94
+ The test for breaking is not "did a symbol disappear", it is whether code that COMPILED can stop compiling — and a widened return does that wherever the old union is named (`const refusal: ScopeError | null = checkGuards(…)`), or narrowed exhaustively. It was filed as `Added` first; the golden diff is what showed otherwise, and the rule is worth more than the classification that felt right. `anonymousSubject`'s new second parameter is OPTIONAL and breaks nothing.
95
+
96
+ `voltro update` carries you across it — codemod `0.40.0/02_rejected-credential-widens-guard-results`, a written note. A transform would widen each annotation, which compiles and keeps the reported behaviour: the decision at each site is what an expired session should do that a missing permission should not.
97
+
98
+ ### Added
99
+
100
+ - **@voltro/client, @voltro/web** — The client re-resolves `authHeaders` when the server says the credential was rejected — and `client.refreshAuth()` for an app that knows earlier.
101
+
102
+ `authHeaders` is resolved once per CONNECTION and attached per frame, so a tab open longer than the IdP's token lifetime keeps presenting a dead token until something reconnects. A consumer measured it: dragging a card on a board failed, their ADMINISTRATOR's token had simply expired while the page stood, and nothing in `@voltro/client` could force the re-resolve.
103
+
104
+ The trigger is the `Unauthenticated` error — which only became distinguishable from `ScopeError` in this same release. Before that the client could not have told "your session died" from "you lack a permission", and reconnecting on the second would have been wrong.
105
+
106
+ `refreshAuth()` is a SAME-SUBJECT rebuild, and the difference from `reconnect()` is one flag and a security boundary: `reconnect()` exists for a login / logout / tenant switch, where the next subject may be entitled to strictly LESS, so the cache must not be seeded from the old one. A token refresh is the same person with a fresh credential, so seeding is correct and the screen keeps its rows instead of blanking for the round trip. Getting that backwards is silent in both directions — seed on a subject change and you paint one user's rows into another's; refuse to seed on a refresh and every open screen blinks on every rotation.
107
+
108
+ The policy lives in ONE function (`wireAuthRefresh`) that every host wires, because "when do we reconnect on an auth error" is exactly the kind of decision this repo has watched drift when it was written twice. Two guards, answering different questions: a **rate** ceiling (one rebuild per window — a rejected mutation arrives alongside every rejected subscription on the page) and a **total** ceiling (stop after N refreshes with no successful call between, because at that point the credential is not stale, it is refused, and the answer is a sign-in screen rather than another socket).
109
+ - **@voltro/cli** — `middleware.ts` — a web app's one server-only hook, for renewing a credential before the SSR render uses it.
110
+
111
+ Reported: a consumer's SSR detail pages arrived empty on the first request of every day. Their cookie token had outlived the IdP's lifetime, the api resolved the caller to anonymous, and every `preload` on the page failed. They could not fix it in the app, and the reason is structural: `ctx.query` and every `preload` entry are bound from ONE cookie string **before any loader runs**, so a layout loader that renews the session cannot reach them — and a `type: 'web'` app has no auth middleware.
112
+
113
+ ```ts
114
+ // middleware.ts — web app root, server-only
115
+ export default async (req) => {
116
+ const fresh = await refreshSession(req.cookies['sb-session'])
117
+ if (!fresh) return
118
+ return {
119
+ headers: { authorization: `Bearer ${fresh.accessToken}` },
120
+ setCookies: [{ name: 'sb-session', value: fresh.cookie, maxAge: 3600 }],
121
+ }
122
+ }
123
+ ```
124
+
125
+ **Why not `app.config.ts`.** That file is imported into the CLIENT bundle, verbatim, the moment any api declares `authHeaders` — the thunk is a function, so it cannot be serialised. A hook that renews a session reaches for an IdP SDK by definition, so putting it there drags the server graph into the browser. The consumer proposed exactly that shape (`serverAuthHeaders` beside `authHeaders`) and it is the one place it cannot go.
126
+
127
+ **Why `setCookies` is not optional.** We asked whether writing cookies back was in scope, expecting the answer to be about a round trip. It was about correctness: Supabase ROTATES refresh tokens and detects reuse, so a hook that renews server-side and does not write the result back leaves the browser holding a consumed token. Without it the hook is not "slower but correct" — it can destroy the session.
128
+
129
+ **Deliberately not a general middleware.** It can replace credentials and set cookies. It cannot redirect, return a response, or rewrite a route — because authorization belongs on the API, which is the only thing that sees the data, and a web-side hook that can refuse a request becomes a second authorization layer beside the real one. A hook that cannot refuse also cannot be mistaken for a guard. For a login redirect, a loader already throws `RedirectError`.
130
+
131
+ Details worth knowing: only auth-shaped headers (`authorization`, `x-tenant`, `x-voltro-*`) are forwarded to the api, so a returned `host` or `content-length` cannot produce a failure that looks like anything but a header copy; cookies default to `HttpOnly` + `Path=/` + `SameSite=lax`; multiple cookies are written as separate header lines, never comma-joined (a cookie's `Expires` contains a comma); the file is loaded ONCE per boot; a failure to IMPORT is fatal rather than degrading to "no middleware", and a middleware that THROWS fails the request — the render must not proceed on the credential it was told to replace.
132
+
133
+ Wired on BOTH SSR boot paths (`voltro dev` and `voltro start`), with the cookies written on every response arm — streamed, buffered, redirect and 404. A partial application would renew a rotating token and drop it.
134
+ - **@voltro/testing** — `makeTestContext` supplies `ctx.events`, so an executor that publishes can be unit-tested at all.
135
+
136
+ `ctx.events` is a field PRODUCTION puts on every `AppContext`, and the test harness did not — so any handler containing `ctx.events.publish(...)` died on `Cannot read properties of undefined (reading 'publish')` the moment it ran under test.
137
+
138
+ **The shipped `api-durable` template demonstrates exactly that pattern** (publish inside the mutation's transaction, so it fires on COMMIT and not on rollback), and its own test passed anyway — because it called the executor with `await` instead of running it. An executor written in the Effect style RETURNS an Effect, and awaiting a non-thenable hands the object straight back, unrun. The assertion then failed on `row.status` being `undefined` and pointed at the assertion rather than at the call. Two defects propping each other up: the harness could not have run that handler, and the test never asked it to.
139
+
140
+ It is the REAL `makeEventPublisher` over a real `EventBus`, not a stub. A fake would re-implement the payload validation and the tenant stamping and would be wrong the first time either gains a case — the lesson `plugin-broadcast` paid for twice. `ctx.eventBus` is the read side:
141
+
142
+ ```ts
143
+ const seen = ctx.eventBus.subscribe(orderPlaced, { orderId })
144
+ await invoke(placeOrder, executor, input, ctx)
145
+ expect(seen.received).toHaveLength(1)
146
+ ```
147
+
148
+ One bus for the whole harness so a `withSubject` / `withTenant` re-scope still publishes where the test is listening; the PUBLISHER is per-subject, because the tenant it stamps is the caller's.
149
+
150
+ ### Fixed
151
+
152
+ - **@voltro/cli** — `voltro agents-md --force` no longer exits 0 when it wrote nothing.
153
+
154
+ Reported: a consumer's `agent-docs/` is owned by the pod (root). They ran the command as `admin`, and it **overwrote nothing, said nothing, and exited 0**. They read the unchanged file as "the framework has not fixed this yet" — it had — and lost a full round to it.
155
+
156
+ The cause was three `orElseSucceed`s in the agent-docs copy. `makeDirectory`, `readDirectory` and every `copyFile` degraded to success, so a destination the process could not write produced an empty run that reported itself as done. An unreadable source directory came back as `[]` and did the same.
157
+
158
+ Failures are collected and reported now, and the command **exits 1** when the seed is incomplete:
159
+
160
+ ```
161
+ agents-md: 12 file(s) could NOT be written — the seed is INCOMPLETE.
162
+ The commonest cause is ownership: a container wrote these as root and you are
163
+ running as someone else.
164
+ ```
165
+
166
+ `--force` is an explicit instruction to overwrite, so silently not overwriting is the one outcome that must never be reported as done. `stat` is the single remaining silent degrade, deliberately: a source entry that vanished mid-walk is not a write failure and must not fail the run.
167
+
168
+ Pinned in both directions — a real unwritable directory yields failures, a clean copy yields none, and a source guard asserts that `stat` is the ONLY call on that path allowed to swallow. Red-verified by restoring the original `orElseSucceed`.
169
+ - **@voltro/cli** — Every server-side loader context is now checked by the compiler, and the static prerender stopped handing loaders a context missing `search` and `headers`.
170
+
171
+ `ctx.isServer` shipped with a source-reading guard, and that guard had the defect it exists to prevent: it matched context literals by shape (`loader({` / `ctx: {`) and therefore found ONE of the two in `build.ts`, missing the one built as a typed arrow return. Its tripwire — "at least 5 sites" — passed, because a floor cannot tell 5-of-8 from 5-of-5. The gap was found by a parallel report, not by the guard.
172
+
173
+ The invariant moved from "the literal mentions `isServer`" to "the literal is CHECKED BY THE COMPILER": every server loader context is now `satisfies SegmentLoaderContext`, whose `isServer` is required. A site that forgets it is a type error naming the file and line — strictly stronger than any regex over shapes, and verified by removing one.
174
+
175
+ **It caught a second defect immediately.** The static prerender built its page loader context with only `params`, `pathname`, `signal` — no `search`, no `headers`, no `query` — while `LoaderContext.search` is declared `string`. A static page's loader reading `ctx.search` got `undefined` where the type promised a value. The segment context twenty lines above it in the same file already passed `search: ''` with a comment explaining why.
176
+
177
+ Two smaller things worth knowing if you touch the guard: the closing brace is part of its pattern because the bare phrase also appears in the comment explaining the rule (the first version counted its own documentation), and the CLI's `SegmentLoaderContext` mirror keeping `isServer` non-optional is what the whole enforcement rests on — `isServer?:` would make every `satisfies` pass while a forgetful site reports itself as the browser.
178
+ - **@voltro/protocol, @voltro/cli** — A guard's `ScopeError` reaches the client as `ScopeError` on a mutation, not as `InternalError`.
179
+
180
+ Measured by a consumer over the wire, same session, same foreign team:
181
+
182
+ | kind | declared `error:` | denial arrived as | |---|---|---| | query `webhooks.list` | `AccessDeniedError` | `_tag: 'ScopeError'` ✓ | | mutation `…updateReferenceLabels` | `AccessDeniedError` | `InternalError` ✗ | | the same mutation, after adding `ScopeError` to its union | | `_tag: 'ScopeError'` ✓ |
183
+
184
+ Their client maps `ScopeError` to *forbidden* and `InternalError` to *something went wrong*, so a permissions refusal looked like a crash — on every relationship-guarded write in the app.
185
+
186
+ **Their observation was exact; the mechanism was not, and the difference is where the fix goes.** They diagnosed it as "the merge only happens on the streaming path". `withGuardError` is called by every lifter, so the wire union carries `ScopeError` on both. What differs is a SECOND reader: the server refuses to ship a tagged error the descriptor cannot represent, collapsing it to `InternalError` rather than emitting a raw defect tree — and it was handed `descriptor.error`, the RAW declaration, while the union it protects is the WIDENED one. It judged against a narrower set than it had advertised. A query never reaches that check (it is delivered through `wireErrorFromCause`, which preserves the tag), which is exactly why the split fell along query/mutation.
187
+
188
+ `wireErrorUnion(descriptor, kind)` is now the single owner of "what can this procedure put on the wire", used by the lifters AND by both bind sites.
189
+
190
+ **Two more error classes were collapsed the same way, and neither was reported:**
191
+
192
+ - **`BusinessRuleViolation`** — unconditional for mutations. `withRuleError`'s own comment says it MUST be in the union "or the violation crosses the wire as an untyped defect". It was in the union, and collapsed before it got there. - **The `requiresApproval` refusals** — `ApprovalRequired` / `ApprovalExpired` / `ApprovalUnavailable`, so "parked for approval" was indistinguishable from "the server broke".
193
+
194
+ `openAccess:` still merges nothing: a procedure advertising a denial it cannot produce is what makes an error union stop meaning anything.
195
+
196
+ If you worked around this by declaring `ScopeError` yourself, the declaration is now redundant rather than wrong — the union is the same either way, and you can delete it whenever you like.
197
+
198
+ ---
199
+
42
200
  ## [0.39.1] — 2026-08-16
43
201
 
44
202
  ### Fixed
@@ -2,19 +2,19 @@ import { t as e } from "./globalContext-d4A-ugDg.js";
2
2
  import { AppClientsContext as t } from "./hooks.js";
3
3
  import { c as n, l as r, r as i, s as a, u as o } from "./defaultFallbacks-B4Ak-R6R.js";
4
4
  import { useCallback as s, useContext as c, useEffect as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
5
- import { FrameworkRuntimesProvider as p, buildApiRuntime as m, ssrClientProxy as ee, ssrStubHandle as te, startApiSupervisor as h, subscribeClientTraces as ne } from "@voltro/client";
6
- import { Fragment as re, jsx as g, jsxs as _ } from "react/jsx-runtime";
5
+ import { FrameworkRuntimesProvider as p, buildApiRuntime as m, ssrClientProxy as h, ssrStubHandle as ee, startApiSupervisor as g, subscribeClientTraces as te, wireAuthRefresh as ne } from "@voltro/client";
6
+ import { Fragment as re, jsx as _, jsxs as v } from "react/jsx-runtime";
7
7
  //#region src/reconnect.ts
8
- var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S = () => {
8
+ var y = e("reconnect", null), b = () => c(y) ?? (() => {}), x = 150, S = 220, C = () => {
9
9
  let e = f(o, n, n).some((e) => e.kind === "loading" || e.kind === "reconnecting"), [t, r] = d(!1);
10
10
  return l(() => {
11
11
  if (!e) {
12
12
  r(!1);
13
13
  return;
14
14
  }
15
- let t = setTimeout(() => r(!0), b);
15
+ let t = setTimeout(() => r(!0), x);
16
16
  return () => clearTimeout(t);
17
- }, [e]), /* @__PURE__ */ _("div", {
17
+ }, [e]), /* @__PURE__ */ v("div", {
18
18
  "aria-hidden": "true",
19
19
  "data-voltro-nav-indicator": "",
20
20
  style: {
@@ -25,7 +25,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
25
25
  pointerEvents: "none",
26
26
  opacity: +!!t,
27
27
  transform: t ? "translateY(0) scale(1)" : "translateY(4px) scale(0.96)",
28
- transition: `opacity ${x}ms ease, transform ${x}ms ease`,
28
+ transition: `opacity ${S}ms ease, transform ${S}ms ease`,
29
29
  display: "grid",
30
30
  placeItems: "center",
31
31
  width: 34,
@@ -37,30 +37,30 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
37
37
  border: "1px solid color-mix(in oklch, canvastext 12%, transparent)",
38
38
  boxShadow: "0 4px 14px color-mix(in oklch, canvastext 16%, transparent)"
39
39
  },
40
- children: [/* @__PURE__ */ g("span", { "data-voltro-nav-spinner": "" }), /* @__PURE__ */ g("style", { children: C })]
40
+ children: [/* @__PURE__ */ _("span", { "data-voltro-nav-spinner": "" }), /* @__PURE__ */ _("style", { children: w })]
41
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, ie = () => typeof window > "u" ? null : `${window.location.origin}/`, E = 2e4, D = "voltro:wedge-reload-at", ae = () => {
42
+ }, w = "\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", T = 2e3, ie = () => typeof window < "u" && !1, ae = () => typeof window > "u" ? null : `${window.location.origin}/`, oe = 2e4, E = "voltro:wedge-reload-at", se = () => {
43
43
  try {
44
- let e = Number(window.sessionStorage.getItem(D) ?? "0"), t = Date.now();
45
- if (t - e < E) return;
46
- window.sessionStorage.setItem(D, String(t));
44
+ let e = Number(window.sessionStorage.getItem(E) ?? "0"), t = Date.now();
45
+ if (t - e < oe) return;
46
+ window.sessionStorage.setItem(E, String(t));
47
47
  } catch {}
48
48
  window.location.reload();
49
- }, oe = () => {
50
- if (T()) return {
49
+ }, D = () => {
50
+ if (ie()) return {
51
51
  afterFailures: 2,
52
52
  arm: () => {
53
- let e = ie();
53
+ let e = ae();
54
54
  if (e === null) return () => {};
55
55
  let t = setInterval(() => {
56
56
  fetch(e, {
57
57
  method: "GET",
58
58
  cache: "no-store",
59
- signal: AbortSignal.timeout(w)
59
+ signal: AbortSignal.timeout(T)
60
60
  }).then((e) => {
61
- e.status < 500 && ae();
61
+ e.status < 500 && se();
62
62
  }).catch(() => {});
63
- }, w);
63
+ }, T);
64
64
  return () => clearInterval(t);
65
65
  }
66
66
  };
@@ -70,18 +70,18 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
70
70
  warn: console.warn.bind(console),
71
71
  error: console.error.bind(console),
72
72
  debug: console.debug.bind(console)
73
- }, k = 200, A = 400, j = 20, M = 1e3, N = (e) => {
73
+ }, k = 200, A = 400, ce = 20, j = 1e3, M = (e) => {
74
74
  if (typeof e == "string") return e;
75
75
  if (e === void 0) return "undefined";
76
76
  if (e === null) return "null";
77
77
  if (e instanceof Error) return e.stack ?? e.message;
78
78
  if (typeof e == "object") try {
79
- return JSON.stringify(e, se());
79
+ return JSON.stringify(e, le());
80
80
  } catch {
81
81
  return Object.prototype.toString.call(e);
82
82
  }
83
83
  return String(e);
84
- }, se = () => {
84
+ }, le = () => {
85
85
  let e = /* @__PURE__ */ new WeakSet();
86
86
  return (t, n) => {
87
87
  if (typeof n == "object" && n) {
@@ -90,20 +90,20 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
90
90
  }
91
91
  return n;
92
92
  };
93
- }, P = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, F = /%[sdifoOc]/g, I = (e) => {
93
+ }, N = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, P = /%[sdifoOc]/g, F = (e) => {
94
94
  if (e.length === 0) return {
95
95
  message: "",
96
96
  rest: []
97
97
  };
98
98
  let t = e[0];
99
- if (typeof t != "string" || !F.test(t)) return {
100
- message: N(t),
99
+ if (typeof t != "string" || !P.test(t)) return {
100
+ message: M(t),
101
101
  rest: e.slice(1)
102
102
  };
103
- F.lastIndex = 0;
103
+ P.lastIndex = 0;
104
104
  let n = 1;
105
105
  return {
106
- message: t.replace(F, (t) => {
106
+ message: t.replace(P, (t) => {
107
107
  if (t === "%c") return n++, "";
108
108
  if (n >= e.length) return t;
109
109
  let r = e[n++];
@@ -119,13 +119,13 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
119
119
  return Number.isFinite(e) ? String(e) : "NaN";
120
120
  }
121
121
  case "%o":
122
- case "%O": return N(r);
122
+ case "%O": return M(r);
123
123
  default: return t;
124
124
  }
125
125
  }),
126
126
  rest: e.slice(n)
127
127
  };
128
- }, L = (e) => {
128
+ }, I = (e) => {
129
129
  let t = e.flushAfterMs ?? A, n = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/clientLog`, r = [], i = null, a = !1, o = () => {
130
130
  if (i !== null && (clearTimeout(i), i = null), r.length === 0) return;
131
131
  let t = r;
@@ -133,7 +133,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
133
133
  let a = {
134
134
  app: e.appName,
135
135
  page: typeof window < "u" ? window.location.pathname : void 0,
136
- ua: typeof navigator < "u" ? P(navigator.userAgent, 200) : void 0,
136
+ ua: typeof navigator < "u" ? N(navigator.userAgent, 200) : void 0,
137
137
  entries: t
138
138
  };
139
139
  try {
@@ -153,7 +153,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
153
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
154
  message: t[0].message,
155
155
  rest: t.slice(1)
156
- } : I(t), u = P(l.message, M), d = l.rest.filter((e) => e !== n && e !== i).map((e) => P(N(e), M)), f;
156
+ } : F(t), u = N(l.message, j), d = l.rest.filter((e) => e !== n && e !== i).map((e) => N(M(e), j)), f;
157
157
  n ? (f = n.stack ?? n.message, c && (f += `\n\nComponent stack:${c}`)) : e === "error" && (f = (/* @__PURE__ */ Error()).stack);
158
158
  let p = {
159
159
  ts: Date.now(),
@@ -162,7 +162,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
162
162
  ...d.length > 0 ? { args: d } : {},
163
163
  ...f === void 0 ? {} : { stack: f }
164
164
  };
165
- r.push(p), r.length >= j ? o() : s();
165
+ r.push(p), r.length >= ce ? o() : s();
166
166
  }, l = (e) => (...t) => {
167
167
  O[e](...t), c(e, t);
168
168
  };
@@ -173,51 +173,51 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
173
173
  return typeof window < "u" && (window.addEventListener("beforeunload", u), window.addEventListener("pagehide", u)), { dispose: () => {
174
174
  a = !0, o(), i !== null && (clearTimeout(i), i = null), console.log = O.log, console.info = O.info, console.warn = O.warn, console.error = O.error, console.debug = O.debug, typeof window < "u" && (window.removeEventListener("beforeunload", u), window.removeEventListener("pagehide", u));
175
175
  } };
176
- }, R = 500, z = /* @__PURE__ */ new Set(), B = (e) => {
177
- if (!z.has(e) && (z.add(e), z.size > R)) {
178
- let e = z.values().next().value;
179
- e !== void 0 && z.delete(e);
176
+ }, L = 500, R = /* @__PURE__ */ new Set(), z = (e) => {
177
+ if (!R.has(e) && (R.add(e), R.size > L)) {
178
+ let e = R.values().next().value;
179
+ e !== void 0 && R.delete(e);
180
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 {
181
+ }, B = /* @__PURE__ */ new Set(), V = (e) => (B.add(e), () => {
182
+ B.delete(e);
183
+ }), H = (e) => {
184
+ for (let t of B) try {
185
185
  t(e);
186
186
  } catch {}
187
- }, W = {
187
+ }, U = {
188
188
  log: "log",
189
189
  info: "info",
190
190
  warn: "warn",
191
191
  error: "error",
192
192
  debug: "debug"
193
- }, G = {
193
+ }, W = {
194
194
  log: "color: #888;",
195
195
  info: "color: #2563eb;",
196
196
  warn: "color: #c2410c;",
197
197
  error: "color: #b91c1c; font-weight: 600;",
198
198
  debug: "color: #6b7280;"
199
- }, K = (e) => {
199
+ }, G = (e) => {
200
200
  if (typeof EventSource > "u") return { dispose: () => {} };
201
201
  let t = `${e.baseUrl.replace(/\/+$/, "")}/_voltro/inspect/stream?live=1`, n = null, r = !1, i = null, a = () => {
202
202
  r || (n = new EventSource(t), n.addEventListener("log", (t) => {
203
203
  try {
204
204
  let n = JSON.parse(t.data).payload;
205
205
  if (!n || typeof n.message != "string" || n.scope === "client") return;
206
- let r = n.level === void 0 ? "log" : W[n.level], i = n.scope ? ` ${n.scope}` : "";
207
- O[r](`%c[server ${e.originLabel}${i}]%c ${n.message}`, G[r], "", ...n.fields ? [n.fields] : []);
206
+ let r = n.level === void 0 ? "log" : U[n.level], i = n.scope ? ` ${n.scope}` : "";
207
+ O[r](`%c[server ${e.originLabel}${i}]%c ${n.message}`, W[r], "", ...n.fields ? [n.fields] : []);
208
208
  } catch {}
209
209
  }), n.addEventListener("trace", (t) => {
210
210
  try {
211
211
  let n = JSON.parse(t.data).payload;
212
- if (!n || n.status !== "error" || typeof n.traceId != "string" || !z.has(n.traceId)) return;
212
+ if (!n || n.status !== "error" || typeof n.traceId != "string" || !R.has(n.traceId)) return;
213
213
  let r = n.name ?? "span", i = n.statusMessage && n.statusMessage.length > 0 ? n.statusMessage : `${r} failed`;
214
- U({
214
+ H({
215
215
  traceId: n.traceId,
216
216
  spanName: r,
217
217
  api: e.originLabel,
218
218
  message: i,
219
219
  ts: Date.now()
220
- }), O.error(`%c[trace ${e.originLabel}]%c ${r} failed — ${i} (trace ${n.traceId})`, G.error, "");
220
+ }), O.error(`%c[trace ${e.originLabel}]%c ${r} failed — ${i} (trace ${n.traceId})`, W.error, "");
221
221
  } catch {}
222
222
  }), n.addEventListener("error", () => {
223
223
  n && n.readyState === EventSource.CLOSED && (n = null, !r && i === null && (i = setTimeout(() => {
@@ -228,7 +228,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
228
228
  return a(), { dispose: () => {
229
229
  r = !0, i !== null && (clearTimeout(i), i = null), n?.close(), n = null;
230
230
  } };
231
- }, q = {
231
+ }, K = {
232
232
  card: "oklch(0.21 0.006 285)",
233
233
  cardRaised: "oklch(0.25 0.007 285)",
234
234
  border: "oklch(1 0 0 / 14%)",
@@ -236,20 +236,20 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
236
236
  muted: "oklch(0.65 0.012 285)",
237
237
  danger: "oklch(0.7 0.21 22)",
238
238
  dangerDim: "oklch(0.5 0.18 22 / 25%)"
239
- }, J = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace", ce = "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", le = 0, ue = () => {
239
+ }, q = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace", ue = "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", de = 0, fe = () => {
240
240
  let [e, t] = d([]);
241
- if (l(() => H((e) => {
241
+ if (l(() => V((e) => {
242
242
  t((t) => {
243
243
  if (t.some((t) => t.traceId === e.traceId && t.spanName === e.spanName)) return t;
244
244
  let n = [...t, {
245
245
  ...e,
246
- id: ++le
246
+ id: ++de
247
247
  }];
248
248
  return n.length > 4 ? n.slice(n.length - 4) : n;
249
249
  });
250
250
  }), []), e.length === 0) return null;
251
251
  let n = (e) => t((t) => t.filter((t) => t.id !== e));
252
- return /* @__PURE__ */ g("div", {
252
+ return /* @__PURE__ */ _("div", {
253
253
  style: {
254
254
  position: "fixed",
255
255
  right: 16,
@@ -259,52 +259,52 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
259
259
  flexDirection: "column",
260
260
  gap: 10,
261
261
  maxWidth: 380,
262
- fontFamily: ce,
262
+ fontFamily: ue,
263
263
  pointerEvents: "none"
264
264
  },
265
- children: e.map((e) => /* @__PURE__ */ g(de, {
265
+ children: e.map((e) => /* @__PURE__ */ _(pe, {
266
266
  toast: e,
267
267
  onDismiss: () => n(e.id)
268
268
  }, e.id))
269
269
  });
270
- }, de = ({ toast: e, onDismiss: t }) => {
270
+ }, pe = ({ toast: e, onDismiss: t }) => {
271
271
  let [n, r] = d(!1), a = `voltro logs --trace ${e.traceId}`;
272
- return /* @__PURE__ */ _("div", {
272
+ return /* @__PURE__ */ v("div", {
273
273
  style: {
274
274
  pointerEvents: "auto",
275
- background: q.card,
276
- border: `1px solid ${q.danger}`,
277
- borderLeft: `3px solid ${q.danger}`,
275
+ background: K.card,
276
+ border: `1px solid ${K.danger}`,
277
+ borderLeft: `3px solid ${K.danger}`,
278
278
  borderRadius: 10,
279
279
  padding: "12px 14px",
280
280
  boxShadow: "0 8px 28px rgba(0,0,0,0.45)",
281
- color: q.fg,
281
+ color: K.fg,
282
282
  fontSize: 13,
283
283
  lineHeight: 1.45
284
284
  },
285
285
  children: [
286
- /* @__PURE__ */ _("div", {
286
+ /* @__PURE__ */ v("div", {
287
287
  style: {
288
288
  display: "flex",
289
289
  alignItems: "center",
290
290
  justifyContent: "space-between",
291
291
  gap: 8
292
292
  },
293
- children: [/* @__PURE__ */ g("span", {
293
+ children: [/* @__PURE__ */ _("span", {
294
294
  style: {
295
- color: q.danger,
295
+ color: K.danger,
296
296
  fontWeight: 600,
297
297
  fontSize: 12,
298
298
  letterSpacing: .3
299
299
  },
300
300
  children: "⚠ Backend error"
301
- }), /* @__PURE__ */ g("button", {
301
+ }), /* @__PURE__ */ _("button", {
302
302
  onClick: t,
303
303
  "aria-label": "Dismiss",
304
304
  style: {
305
305
  background: "transparent",
306
306
  border: "none",
307
- color: q.muted,
307
+ color: K.muted,
308
308
  cursor: "pointer",
309
309
  fontSize: 16,
310
310
  lineHeight: 1,
@@ -313,36 +313,36 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
313
313
  children: "×"
314
314
  })]
315
315
  }),
316
- /* @__PURE__ */ _("div", {
316
+ /* @__PURE__ */ v("div", {
317
317
  style: {
318
318
  marginTop: 6,
319
- color: q.muted,
319
+ color: K.muted,
320
320
  fontSize: 11.5
321
321
  },
322
322
  children: [
323
- /* @__PURE__ */ g("span", {
323
+ /* @__PURE__ */ _("span", {
324
324
  style: {
325
- fontFamily: J,
326
- color: q.fg
325
+ fontFamily: q,
326
+ color: K.fg
327
327
  },
328
328
  children: e.api
329
329
  }),
330
330
  " · ",
331
- /* @__PURE__ */ g("span", {
332
- style: { fontFamily: J },
331
+ /* @__PURE__ */ _("span", {
332
+ style: { fontFamily: q },
333
333
  children: e.spanName
334
334
  })
335
335
  ]
336
336
  }),
337
- /* @__PURE__ */ g("div", {
337
+ /* @__PURE__ */ _("div", {
338
338
  style: {
339
339
  marginTop: 4,
340
- color: q.fg,
340
+ color: K.fg,
341
341
  wordBreak: "break-word"
342
342
  },
343
343
  children: e.message
344
344
  }),
345
- /* @__PURE__ */ g("button", {
345
+ /* @__PURE__ */ _("button", {
346
346
  onClick: () => {
347
347
  i(a).then((e) => {
348
348
  e !== "failed" && (r(!0), setTimeout(() => r(!1), 1500));
@@ -354,12 +354,12 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
354
354
  display: "block",
355
355
  width: "100%",
356
356
  textAlign: "left",
357
- background: q.cardRaised,
358
- border: `1px solid ${q.border}`,
357
+ background: K.cardRaised,
358
+ border: `1px solid ${K.border}`,
359
359
  borderRadius: 6,
360
360
  padding: "6px 8px",
361
- color: q.muted,
362
- fontFamily: J,
361
+ color: K.muted,
362
+ fontFamily: q,
363
363
  fontSize: 11,
364
364
  cursor: "pointer"
365
365
  },
@@ -367,14 +367,14 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
367
367
  })
368
368
  ]
369
369
  });
370
- }, fe = (e) => {
370
+ }, J = (e) => {
371
371
  try {
372
372
  let t = new URL(e);
373
373
  return `${t.protocol === "wss:" ? "https:" : "http:"}//${t.host}`;
374
374
  } catch {
375
375
  return "";
376
376
  }
377
- }, Y = (e, t) => /^wss?:\/\//i.test(e) || /^https?:\/\//i.test(e) ? fe(e) : `/_voltro/api/${t}`, pe = typeof performance < "u" ? performance.now() : Date.now(), X = () => {
377
+ }, Y = (e, t) => /^wss?:\/\//i.test(e) || /^https?:\/\//i.test(e) ? J(e) : `/_voltro/api/${t}`, me = typeof performance < "u" ? performance.now() : Date.now(), X = () => {
378
378
  if (typeof window > "u") return !1;
379
379
  try {
380
380
  if (window.localStorage?.getItem("framework_debug") === "1") return !0;
@@ -388,10 +388,10 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
388
388
  }.DEV === !0;
389
389
  }, Z = (e, ...t) => {
390
390
  if (!X()) return;
391
- let n = ((typeof performance < "u" ? performance.now() : Date.now()) - pe).toFixed(0).padStart(6, " ");
391
+ let n = ((typeof performance < "u" ? performance.now() : Date.now()) - me).toFixed(0).padStart(6, " ");
392
392
  console.log(`[fw ${e} +${n}ms]`, ...t);
393
- }, Q = 3e3, me = 0, he = (e, t, n, r) => (i, a) => {
394
- let o = ++me;
393
+ }, Q = 3e3, he = 0, ge = (e, t, n, r) => (i, a) => {
394
+ let o = ++he;
395
395
  Z(e, `ws#${o} create gen=${t} url=${i}`);
396
396
  let s = new globalThis.WebSocket(i, a), c = !1, l = !1, u = (e) => {
397
397
  l || (l = !0, r(e));
@@ -409,7 +409,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
409
409
  } catch {}
410
410
  }
411
411
  }, Q), s;
412
- }, ge = async (e, t, n, r) => {
412
+ }, _e = async (e, t, n, r) => {
413
413
  Z(e.name, `build gen=${t}: making runtime`);
414
414
  try {
415
415
  let i = await m({
@@ -417,7 +417,7 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
417
417
  wsUrl: e.wsUrl,
418
418
  group: e.group,
419
419
  headers: e.headers,
420
- webSocketConstructor: he(e.name, t, n, r)
420
+ webSocketConstructor: ge(e.name, t, n, r)
421
421
  });
422
422
  return Z(e.name, `build gen=${t}: runtime resolved`), i;
423
423
  } catch (n) {
@@ -429,13 +429,20 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
429
429
  clients: /* @__PURE__ */ new Map()
430
430
  })), f = u(null), m = s(() => {
431
431
  f.current?.reconnect();
432
- }, []), [y, b] = d(!1);
432
+ }, []), [b, x] = d(!1);
433
433
  l(() => {
434
- b(!0);
434
+ x(!0);
435
435
  }, []), l(() => {
436
- let t = oe(), n = h({
436
+ let e = [...o.clients.values()].map((e) => ne(e.errorBus, () => {
437
+ f.current?.refreshAuth();
438
+ }));
439
+ return () => {
440
+ for (let t of e) t.dispose();
441
+ };
442
+ }, [o.clients]), l(() => {
443
+ let t = D(), n = g({
437
444
  apis: e,
438
- buildClient: ge,
445
+ buildClient: _e,
439
446
  onChange: (e, t) => {
440
447
  c({
441
448
  clients: e,
@@ -455,25 +462,25 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
455
462
  }, [e]), l(() => {
456
463
  if (!X() || typeof window > "u") return;
457
464
  let t = [], n = [], r = e[0]?.name ?? "web";
458
- t.push(L({
465
+ t.push(I({
459
466
  baseUrl: window.location.origin,
460
467
  appName: r
461
468
  }));
462
469
  for (let t of e) {
463
470
  let e = Y(t.wsUrl, t.name);
464
- e.length !== 0 && n.push(K({
471
+ e.length !== 0 && n.push(G({
465
472
  baseUrl: e,
466
473
  originLabel: t.name
467
474
  }));
468
475
  }
469
- let i = ne((e) => B(e.traceId));
476
+ let i = te((e) => z(e.traceId));
470
477
  return () => {
471
478
  for (let e of t) e.dispose();
472
479
  for (let e of n) e.dispose();
473
480
  i();
474
481
  };
475
482
  }, [e]);
476
- let x = new Map(e.map((e) => [e.name, o.clients.get(e.name)?.client ?? ee])), C = new Map(e.map((e) => {
483
+ let S = new Map(e.map((e) => [e.name, o.clients.get(e.name)?.client ?? h])), w = new Map(e.map((e) => {
477
484
  let t = o.clients.get(e.name);
478
485
  return t ? [e.name, {
479
486
  runtime: t.runtime,
@@ -483,31 +490,31 @@ var v = e("reconnect", null), y = () => c(v) ?? (() => {}), b = 150, x = 220, S
483
490
  inspectBaseUrl: Y(e.wsUrl, e.name),
484
491
  errorBus: t.errorBus
485
492
  }] : [e.name, {
486
- ...te,
493
+ ...ee,
487
494
  descriptors: e.descriptors
488
495
  }];
489
496
  }));
490
- return /* @__PURE__ */ g(v.Provider, {
497
+ return /* @__PURE__ */ _(y.Provider, {
491
498
  value: m,
492
- children: /* @__PURE__ */ g(p, {
493
- apis: C,
494
- children: /* @__PURE__ */ g(t.Provider, {
495
- value: x,
496
- children: /* @__PURE__ */ g(a, {
497
- chrome: y ? /* @__PURE__ */ _(re, { children: [
498
- /* @__PURE__ */ g(S, {}),
499
+ children: /* @__PURE__ */ _(p, {
500
+ apis: w,
501
+ children: /* @__PURE__ */ _(t.Provider, {
502
+ value: S,
503
+ children: /* @__PURE__ */ _(a, {
504
+ chrome: b ? /* @__PURE__ */ v(re, { children: [
505
+ /* @__PURE__ */ _(C, {}),
499
506
  i,
500
- X() ? /* @__PURE__ */ g(ue, {}) : null
507
+ X() ? /* @__PURE__ */ _(fe, {}) : null
501
508
  ] }) : null,
502
509
  children: n
503
510
  })
504
511
  })
505
512
  })
506
513
  });
507
- }, _e = ({ App: e, apis: t, Devtools: n }) => /* @__PURE__ */ g($, {
514
+ }, ve = ({ App: e, apis: t, Devtools: n }) => /* @__PURE__ */ _($, {
508
515
  apis: t,
509
- chrome: n ? /* @__PURE__ */ g(n, {}) : null,
510
- children: /* @__PURE__ */ g(e, {})
516
+ chrome: n ? /* @__PURE__ */ _(n, {}) : null,
517
+ children: /* @__PURE__ */ _(e, {})
511
518
  });
512
519
  //#endregion
513
- export { K as a, S as c, L as i, v as l, $ as n, B as o, I as r, H as s, _e as t, y as u };
520
+ export { G as a, C as c, I as i, y as l, $ as n, z as o, F as r, V as s, ve as t, b as u };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./frameworkBoot-Tso-IjA7.js";
1
+ import { n as e, t } from "./frameworkBoot-CV_o2tIk.js";
2
2
  export { t as FrameworkBoot, e as VoltroRuntimeProvider };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./globalContext-d4A-ugDg.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-Tso-IjA7.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-CV_o2tIk.js";
4
4
  import { a as d, c as f, i as p, l as m, o as h, u as g } from "./defaultFallbacks-B4Ak-R6R.js";
5
- import { a as _, i as ee, n as te, r as ne, t as re } from "./mount-BTAQ-8Vl.js";
5
+ import { a as _, i as ee, n as te, r as ne, t as re } from "./mount-nudb4UCl.js";
6
6
  import { c as ie, d as ae, h as oe, l as se, p as ce, u as le } from "./routerState-DAT472IC.js";
7
7
  import { A as ue, B as de, C as fe, D as pe, E as me, F as he, G as ge, H as _e, I as v, K as y, L as b, M as x, N as S, O as C, P as w, R as T, S as E, T as D, U as O, V as k, W as A, _ as j, a as M, b as N, c as P, d as F, f as I, g as ve, h as ye, i as be, j as xe, k as Se, l as Ce, m as we, n as Te, o as Ee, p as De, q as Oe, r as ke, s as Ae, t as je, u as Me, v as Ne, w as Pe, x as Fe, y as Ie, z as Le } from "./serverContext-38JTbYPa.js";
8
8
  import { Component as Re, Suspense as ze, createElement as L, use as Be, useCallback as Ve, useContext as He, useSyncExternalStore as Ue } from "react";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./frameworkBoot-Tso-IjA7.js";
1
+ import { t as e } from "./frameworkBoot-CV_o2tIk.js";
2
2
  import { o as t, r as n, t as r } from "./routerState-DAT472IC.js";
3
3
  import { StrictMode as i, createElement as a } from "react";
4
4
  import { createRoot as o, hydrateRoot as s } from "react-dom/client";
package/dist/mount.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./mount-BTAQ-8Vl.js";
1
+ import { n as e, t } from "./mount-nudb4UCl.js";
2
2
  export { t as mount, e as noticeIslandsShipTheFullBundle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/web",
3
- "version": "0.39.1",
3
+ "version": "0.40.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",
@@ -53,8 +53,8 @@
53
53
  "node": ">=24.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@voltro/client": "0.39.1",
57
- "@voltro/ui": "0.39.1"
56
+ "@voltro/client": "0.40.0",
57
+ "@voltro/ui": "0.40.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@effect/platform": "^0.97.0",