@octane-xplat/patches 0.16.1 → 0.17.1

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.
@@ -1,34 +1,35 @@
1
- diff --git a/dist/cjs/runtime.cjs b/dist/cjs/runtime.cjs
2
- index a035f05..e1c9ca1 100644
3
- --- a/dist/cjs/runtime.cjs
4
- +++ b/dist/cjs/runtime.cjs
5
- @@ -365,6 +365,7 @@ var import_stream_protocol = require("./stream-protocol.cjs");
6
- var import_renderer_bridge = require("./renderer-bridge.cjs");
7
- var import_context_identity = require("./context-identity.cjs");
8
- var import_native_read_client = require("./signals/native-read-client.cjs");
9
- +var import_local_hook = require("./signals/local-hook.cjs");
10
- var import_native_read_collector = require("./signals/native-read-collector.cjs");
11
- var import_native_read_retry = require("./signals/native-read-retry.cjs");
12
- var import_transition_state = require("./signals/transition-state.cjs");
13
- @@ -8525,6 +8526,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
1
+ diff --git a/dist/cjs/runtime/hooks.cjs b/dist/cjs/runtime/hooks.cjs
2
+ index ee8fd631679c2d614a44fe185ac8d38c83a478ec..9026e119cb1569b7e717878b72d8b28c08556669 100644
3
+ --- a/dist/cjs/runtime/hooks.cjs
4
+ +++ b/dist/cjs/runtime/hooks.cjs
5
+ @@ -1,4 +1,5 @@
6
+ "use strict";
7
+ +var import_local_hook = require("../signals/local-hook.cjs");
8
+ var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __getOwnPropNames = Object.getOwnPropertyNames;
11
+ @@ -156,6 +157,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
14
12
  }
15
13
  return cell.nativeValue;
16
14
  }
17
- +(0, import_local_hook.registerLocalSignalHook)(() => CURRENT_SCOPE === null ? null : nativeLocalHook);
18
- function useState(initial, slot) {
19
- const s = readStateHook(initial, slot, arguments.length === 1);
20
- return [s.value, s.setter];
21
- @@ -9659,6 +9661,8 @@ function renderClientContextProvider(context, props, renderScope) {
22
- ensureHooks(scope).set(CHILDREN_DIALECT_SLOT, dialect);
23
- }
24
- renderSharedBody(childrenAsBody(children), void 0, scope, void 0);
25
- + } else {
26
- + resetScopeChildren(scope);
27
- }
15
+ +(0, import_local_hook.registerLocalSignalHook)(() => import_render.CURRENT_SCOPE === null ? null : nativeLocalHook);
16
+ function applyHookUpdate(state, action, reducer) {
17
+ return reducer !== null ? reducer(state, action) : typeof action === "function" ? action(state) : action;
18
+ }
19
+ diff --git a/dist/cjs/runtime/templates.cjs b/dist/cjs/runtime/templates.cjs
20
+ index 94e2ab9bf9f7cd756e19cd8b7053d797668b8f04..e51a764a80ba9c707efa54b382fe5d23046cf7ed 100644
21
+ --- a/dist/cjs/runtime/templates.cjs
22
+ +++ b/dist/cjs/runtime/templates.cjs
23
+ @@ -440,6 +440,7 @@ function bag16(s, r, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, $ = 0, next
24
+ return commitBag(s, r, { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, __journalWindow: 0, $, next, [import_commit.BINDING_BAG_ARITY]: 16 });
28
25
  }
29
- let SHARED_BODY_SCOPE = null;
26
+ function bagOf(s, r, bag) {
27
+ + bag[import_commit.BINDING_BAG_ARITY] = -1;
28
+ return commitBag(s, r, bag);
29
+ }
30
+ function coerceText(value) {
30
31
  diff --git a/dist/cjs/signals/client.cjs b/dist/cjs/signals/client.cjs
31
- index 28e2844..af40518 100644
32
+ index 28e28444192dee7af64351cfe02d5dde96658832..af40518defca21eb88707eb76bb6fe10c1d266e7 100644
32
33
  --- a/dist/cjs/signals/client.cjs
33
34
  +++ b/dist/cjs/signals/client.cjs
34
35
  @@ -23,13 +23,13 @@ __export(client_exports, {
@@ -36,27 +37,22 @@ index 28e2844..af40518 100644
36
37
  module.exports = __toCommonJS(client_exports);
37
38
  __reExport(client_exports, require("./index.cjs"), module.exports);
38
39
  -var import_runtime = require("../runtime.cjs");
39
- -var import_engine = require("./engine.cjs");
40
- -function disposeLocalSignal(cell) {
41
- - cell.scope.dispose();
42
- -}
43
- -function useSignal$(initial, slot) {
44
- - const cell = (0, import_runtime.nativeLocalHook)(
45
- +var import_engine = require("./engine.cjs");
40
+ var import_engine = require("./engine.cjs");
46
41
  +var import_local_hook = require("./local-hook.cjs");
47
- +function disposeLocalSignal(cell) {
48
- + cell.scope.dispose();
49
- +}
50
- +function useSignal$(initial, slot) {
42
+ function disposeLocalSignal(cell) {
43
+ cell.scope.dispose();
44
+ }
45
+ function useSignal$(initial, slot) {
46
+ - const cell = (0, import_runtime.nativeLocalHook)(
51
47
  + const cell = (0, import_local_hook.localSignalHook)(
52
48
  "useSignal$",
53
49
  () => {
54
50
  const value = typeof initial === "function" ? initial() : initial;
55
51
  diff --git a/dist/cjs/signals/document-owner.cjs b/dist/cjs/signals/document-owner.cjs
56
- index dbfcce2..ec264d5 100644
52
+ index bfa55295a64fbcdbf872b2717b54a641cdfe6bd4..a106df17a03d9e50b47f68c774fa79e5f5ceae9b 100644
57
53
  --- a/dist/cjs/signals/document-owner.cjs
58
54
  +++ b/dist/cjs/signals/document-owner.cjs
59
- @@ -52,9 +52,9 @@ function enableSignalDocument(abi = 1) {
55
+ @@ -53,9 +53,9 @@ function enableSignalDocument(abi = 1) {
60
56
  if (defaultInstalled) return;
61
57
  defaultInstalled = true;
62
58
  signalOwnerFrame = { enter: import_owner_context.enterSynchronousSignalOwner, restore: import_owner_context.restoreSynchronousSignalOwner };
@@ -70,11 +66,11 @@ index dbfcce2..ec264d5 100644
70
66
  function installStreamedSignalOwnerActivator(activate) {
71
67
  if (streamedSignalOwnerActivator !== void 0) {
72
68
  diff --git a/dist/cjs/signals/facade.cjs b/dist/cjs/signals/facade.cjs
73
- index 6b6d10a..917422a 100644
69
+ index a425c5fd3a08dcf7c9ade5618e9aa883565cacbf..e81719a7493011577ea78c6306e32cfb1ccb832e 100644
74
70
  --- a/dist/cjs/signals/facade.cjs
75
71
  +++ b/dist/cjs/signals/facade.cjs
76
- @@ -338,7 +338,7 @@ class Descriptor {
77
- }
72
+ @@ -330,7 +330,7 @@ class Descriptor {
73
+ lexical;
78
74
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
79
75
  reader() {
80
76
  - return this.lexical === this ? this.owner : requireOwner();
@@ -83,7 +79,7 @@ index 6b6d10a..917422a 100644
83
79
  [import_types.SIGNAL_OWNER_RESOLVE](owner) {
84
80
  requireSite(this.site);
85
81
  diff --git a/dist/cjs/signals/index.cjs b/dist/cjs/signals/index.cjs
86
- index 4b2efde..a487b50 100644
82
+ index 4b2efde8f96aa222d3e4395bdda991f5509a0c94..a487b5027dcaac6e8d3222c8b747396d8f1237c7 100644
87
83
  --- a/dist/cjs/signals/index.cjs
88
84
  +++ b/dist/cjs/signals/index.cjs
89
85
  @@ -35,6 +35,7 @@ __export(signals_exports, {
@@ -112,7 +108,7 @@ index 4b2efde..a487b50 100644
112
108
  __signalAt,
113
109
  diff --git a/dist/cjs/signals/local-hook.cjs b/dist/cjs/signals/local-hook.cjs
114
110
  new file mode 100644
115
- index 0000000..4858595
111
+ index 0000000000000000000000000000000000000000..4858595ce50e97284f18daa94c3b5ce6ab041dd4
116
112
  --- /dev/null
117
113
  +++ b/dist/cjs/signals/local-hook.cjs
118
114
  @@ -0,0 +1,44 @@
@@ -162,7 +158,7 @@ index 0000000..4858595
162
158
  +});
163
159
  diff --git a/dist/cjs/signals/universal-owner.cjs b/dist/cjs/signals/universal-owner.cjs
164
160
  new file mode 100644
165
- index 0000000..00c323a
161
+ index 0000000000000000000000000000000000000000..00c323a8bd4453d566dbd002ab1222f03def2760
166
162
  --- /dev/null
167
163
  +++ b/dist/cjs/signals/universal-owner.cjs
168
164
  @@ -0,0 +1,46 @@
@@ -213,311 +209,219 @@ index 0000000..00c323a
213
209
  + universalSignalDocument
214
210
  +});
215
211
  diff --git a/dist/compiler/compile.js b/dist/compiler/compile.js
216
- index b891c6a..c736d3c 100644
212
+ index 4ef283f6bb72fcd9d61aeb356fea4967421096fd..d3f3e0acbdac4a429aacdc9f7d32011719111135 100644
217
213
  --- a/dist/compiler/compile.js
218
214
  +++ b/dist/compiler/compile.js
219
- @@ -2493,7 +2493,7 @@ function classifyViewTransitionOwnership(astBody, production, ownComponents) {
220
-
215
+ @@ -2599,7 +2599,7 @@ function classifyViewTransitionOwnership(astBody, production, ownComponents) {
216
+
221
217
  function hookRuntimeModulesForCompile(options, universalUnits = []) {
222
- - const modules = new Set(options?.__hookRuntimeModules || []);
218
+ const modules = new Set(options?.__hookRuntimeModules || []);
223
219
  - if (options?.nativeReads === true) {
224
- - modules.add('octane/signals/client');
225
- - modules.add('octane/signals/server');
226
- - }
227
- + const modules = new Set(options?.__hookRuntimeModules || []);
228
220
  + if (options?.nativeReads === true || options?.__universalSignalReads === true) {
229
- + modules.add('octane/signals/client');
230
- + modules.add('octane/signals/server');
231
- + }
232
- @@ -11087,6 +11087,11 @@ function compileInternal(
233
- - universalRuntime: undefined,
234
- - rendererBoundaries: undefined,
235
- - rendererRegistry: undefined,
236
- - __hookRuntimeModules: [...(options?.__hookRuntimeModules || []), renderer.module],
237
- - __runtimeImportRoutes: [
238
- - ...(options?.__runtimeImportRoutes ?? []),
239
- + universalRuntime: undefined,
240
- + rendererBoundaries: undefined,
241
- + rendererRegistry: undefined,
221
+ modules.add('octane/signals/client');
222
+ modules.add('octane/signals/server');
223
+ }
224
+ @@ -11633,6 +11633,11 @@ function compileInternal(
225
+ universalRuntime: undefined,
226
+ rendererBoundaries: undefined,
227
+ rendererRegistry: undefined,
242
228
  + // Universal owners observe reads at render time; the inner
243
229
  + // compile must not emit the DOM native-read runtime helpers,
244
230
  + // but signal hook classification still applies.
245
231
  + nativeReads: false,
246
232
  + __universalSignalReads: options.nativeReads === true,
247
- + __hookRuntimeModules: [...(options?.__hookRuntimeModules || []), renderer.module],
248
- + __runtimeImportRoutes: [
249
- + ...(options?.__runtimeImportRoutes ?? []),
250
- @@ -11346,6 +11351,7 @@ function compileInternal(
251
- - nativeReads: options?.nativeReads === true,
252
- - opaqueSignalHandles:
253
- - options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
254
- - nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
255
- - signalHookSites: domSignalTarget(options),
256
- - // A split Hydrate query module is invoked as the existing server-rendered
257
- + nativeReads: options?.nativeReads === true,
258
- + opaqueSignalHandles:
259
- + options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
233
+ __hookRuntimeModules: [...(options?.__hookRuntimeModules || []), renderer.module],
234
+ __runtimeImportRoutes: [
235
+ ...(options?.__runtimeImportRoutes ?? []),
236
+ @@ -11920,6 +11925,7 @@ function compileInternal(
237
+ nativeReads: options?.nativeReads === true,
238
+ opaqueSignalHandles:
239
+ options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
260
240
  + signalReads: options?.nativeReads === true || options?.__universalSignalReads === true,
261
- + nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
262
- + signalHookSites: domSignalTarget(options),
263
- + // A split Hydrate query module is invoked as the existing server-rendered
264
- @@ -12814,6 +12820,7 @@ function compileServer(
265
- - nativeReads: options?.nativeReads === true,
266
- - opaqueSignalHandles:
267
- - options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
268
- - nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
269
- - signalHookSites: domSignalTarget(options),
270
- - hmr: false, // SSR never hot-swaps in place; client/server production slot shapes stay aligned
271
- + nativeReads: options?.nativeReads === true,
272
- + opaqueSignalHandles:
273
- + options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
241
+ nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
242
+ signalHookSites: domSignalTarget(options),
243
+ // A split Hydrate query module is invoked as the existing server-rendered
244
+ @@ -13467,6 +13473,7 @@ function compileServer(
245
+ nativeReads: options?.nativeReads === true,
246
+ opaqueSignalHandles:
247
+ options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
274
248
  + signalReads: options?.nativeReads === true || options?.__universalSignalReads === true,
275
- + nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
276
- + signalHookSites: domSignalTarget(options),
277
- + hmr: false, // SSR never hot-swaps in place; client/server production slot shapes stay aligned
278
- @@ -20130,7 +20137,7 @@ function slotKeyedHookName(n, ctx) {
279
- - ctx.foreignImportLocals?.has(local) === true;
280
- - if (
281
- - imported !== undefined &&
249
+ nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
250
+ signalHookSites: domSignalTarget(options),
251
+ hmr: false, // SSR never hot-swaps in place; client/server production slot shapes stay aligned
252
+ @@ -21093,7 +21100,7 @@ function slotKeyedHookName(n, ctx) {
253
+ ctx.foreignImportLocals?.has(local) === true;
254
+ if (
255
+ imported !== undefined &&
282
256
  - (HOOK_NAMES.has(imported) || (ctx.nativeReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
283
- - )
284
- - return imported;
285
- - if (!shadowsImport && HOOK_NAMES.has(local)) return local;
286
- + ctx.foreignImportLocals?.has(local) === true;
287
- + if (
288
- + imported !== undefined &&
289
257
  + (HOOK_NAMES.has(imported) || (ctx.signalReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
290
- + )
291
- + return imported;
292
- + if (!shadowsImport && HOOK_NAMES.has(local)) return local;
293
- @@ -20140,7 +20147,7 @@ function slotKeyedHookName(n, ctx) {
294
- - const imported = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
295
- - if (
296
- - imported !== undefined &&
258
+ )
259
+ return imported;
260
+ if (!shadowsImport && HOOK_NAMES.has(local)) return local;
261
+ @@ -21103,7 +21110,7 @@ function slotKeyedHookName(n, ctx) {
262
+ const imported = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
263
+ if (
264
+ imported !== undefined &&
297
265
  - (HOOK_NAMES.has(imported) || (ctx.nativeReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
298
- - ) {
299
- - return imported;
300
- - }
301
- + const imported = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
302
- + if (
303
- + imported !== undefined &&
304
266
  + (HOOK_NAMES.has(imported) || (ctx.signalReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
305
- + ) {
306
- + return imported;
307
- + }
308
- @@ -20996,7 +21003,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
309
- - // enforced by rejectHookInJsLoop.
310
- - const isBuiltin =
311
- - (HOOK_NAMES.has(name) ||
267
+ ) {
268
+ return imported;
269
+ }
270
+ @@ -21966,7 +21973,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
271
+ // enforced by rejectHookInJsLoop.
272
+ const isBuiltin =
273
+ (HOOK_NAMES.has(name) ||
312
274
  - (ctx.nativeReads &&
313
- - hookRuntimeImportedName !== undefined &&
314
- - NATIVE_SIGNAL_HOOK_NAMES.has(name))) &&
315
- - (generated ||
316
- + // enforced by rejectHookInJsLoop.
317
- + const isBuiltin =
318
- + (HOOK_NAMES.has(name) ||
319
275
  + (ctx.signalReads &&
320
- + hookRuntimeImportedName !== undefined &&
321
- + NATIVE_SIGNAL_HOOK_NAMES.has(name))) &&
322
- + (generated ||
323
- @@ -21127,7 +21134,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
324
- - ) {
325
- - const name = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
326
- - const isBuiltin =
276
+ hookRuntimeImportedName !== undefined &&
277
+ NATIVE_SIGNAL_HOOK_NAMES.has(name))) &&
278
+ (generated ||
279
+ @@ -22097,7 +22104,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
280
+ ) {
281
+ const name = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
282
+ const isBuiltin =
327
283
  - HOOK_NAMES.has(name) || (ctx.nativeReads && NATIVE_SIGNAL_HOOK_NAMES.has(name));
328
- - const isServerUse = name === 'use' && ctx.mode === 'server';
329
- - if (isBuiltin || isServerUse) {
330
- - if (isBuiltin) {
331
- + ) {
332
- + const name = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
333
- + const isBuiltin =
334
284
  + HOOK_NAMES.has(name) || (ctx.signalReads && NATIVE_SIGNAL_HOOK_NAMES.has(name));
335
- + const isServerUse = name === 'use' && ctx.mode === 'server';
336
- + if (isBuiltin || isServerUse) {
337
- + if (isBuiltin) {
285
+ const isServerUse = name === 'use' && ctx.mode === 'server';
286
+ if (isBuiltin || isServerUse) {
287
+ if (isBuiltin) {
338
288
  diff --git a/dist/compiler/native-read-diagnostics.js b/dist/compiler/native-read-diagnostics.js
339
- index 89c9b5a..3baf9e9 100644
289
+ index 7b2acff601c49a8589ee395d22047493d8aff3d1..d3356b4d4c513c7df61ad861e9c227f9409447ae 100644
340
290
  --- a/dist/compiler/native-read-diagnostics.js
341
291
  +++ b/dist/compiler/native-read-diagnostics.js
342
- @@ -100,9 +100,12 @@ export function assertNativeReadOptions(options) {
343
- - if (
344
- - options?.nativeReads === true &&
345
- - options.renderer?.target != null &&
292
+ @@ -149,9 +149,12 @@ export function assertNativeReadOptions(options) {
293
+ if (
294
+ options?.nativeReads === true &&
295
+ options.renderer?.target != null &&
346
296
  - options.renderer.target !== 'dom'
347
- - ) {
348
- - throw new Error('Octane native signal reads support only the DOM client and server.');
349
- - }
350
- + if (
351
- + options?.nativeReads === true &&
352
- + options.renderer?.target != null &&
353
297
  + options.renderer.target !== 'dom' &&
354
298
  + options.renderer.target !== 'universal'
355
- + ) {
299
+ ) {
300
+ - throw new Error('Octane native signal reads support only the DOM client and server.');
356
301
  + throw new Error(
357
302
  + 'Octane native signal reads support only the DOM client, DOM server, and universal renderers.',
358
303
  + );
359
- + }
304
+ }
360
305
  }
361
-
362
- @@ -121,11 +124,11 @@ export function analyzeNativeReadDiagnostics(ast, source, filename, options = {}
363
- - filename,
364
- - rendererBoundaries: options.rendererBoundaries,
365
- - });
306
+
307
+ @@ -200,11 +203,11 @@ export function analyzeNativeReadDiagnostics(ast, source, filename, options = {}
308
+ filename,
309
+ rendererBoundaries: options.rendererBoundaries,
310
+ });
366
311
  - const unsupported = boundaries.find(
367
312
  - (boundary) =>
368
313
  - boundary.childRenderer !== 'dom' &&
369
314
  - options.rendererRegistry?.[boundary.childRenderer]?.target !== 'dom',
370
315
  - );
371
- - if (unsupported)
372
- - return [
373
- - nativeReadDiagnostic(
374
- + filename,
375
- + rendererBoundaries: options.rendererBoundaries,
376
- + });
377
316
  + const unsupported = boundaries.find((boundary) => {
378
317
  + if (boundary.childRenderer === 'dom') return false;
379
318
  + const target = options.rendererRegistry?.[boundary.childRenderer]?.target;
380
319
  + return target !== 'dom' && target !== 'universal';
381
320
  + });
382
- + if (unsupported)
383
- + return [
384
- + nativeReadDiagnostic(
321
+ if (unsupported)
322
+ return [
323
+ nativeReadDiagnostic(
385
324
  diff --git a/dist/compiler/slot-hooks.js b/dist/compiler/slot-hooks.js
386
- index 90848a6..474c2bb 100644
325
+ index e4c9bfbc6f46bb70bd8a84e0ff25f6024fc6f12e..7ca61123365265d394cf26b09012e716d3758296 100644
387
326
  --- a/dist/compiler/slot-hooks.js
388
327
  +++ b/dist/compiler/slot-hooks.js
389
- @@ -1034,12 +1034,12 @@ function walk(node, owner, st) {
390
- - }
391
- - const imported =
392
- - node._octaneImportedHook ??
328
+ @@ -1044,12 +1044,12 @@ function walk(node, owner, st) {
329
+ }
330
+ const imported =
331
+ node._octaneImportedHook ??
393
332
  - (st.nativeReads ? node._octaneHookRuntimeImportedHook : undefined);
394
- - collectStateGetterEdit(node, imported, st);
395
- - if (
396
- - !st.manualSlots &&
397
- - imported &&
398
- - (HOOK_NAMES.has(imported) || (st.nativeReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
399
- - ) {
400
- - const local =
401
- - node.callee?.type === 'Identifier'
402
- + }
403
- + const imported =
404
- + node._octaneImportedHook ??
405
333
  + (st.signalReads ? node._octaneHookRuntimeImportedHook : undefined);
406
- + collectStateGetterEdit(node, imported, st);
407
- + if (
408
- + !st.manualSlots &&
409
- + imported &&
334
+ collectStateGetterEdit(node, imported, st);
335
+ if (
336
+ !st.manualSlots &&
337
+ imported &&
338
+ - (HOOK_NAMES.has(imported) || (st.nativeReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
410
339
  + (HOOK_NAMES.has(imported) || (st.signalReads && NATIVE_SIGNAL_HOOK_NAMES.has(imported)))
411
- + ) {
412
- + const local =
413
- + node.callee?.type === 'Identifier'
414
- @@ -1255,7 +1255,9 @@ export function slotHooks(source, id, options) {
415
- - HOOK_NAMES.has(name),
416
- - );
417
- - const manualProviders = options?.manualSlots ? findManualHookProviders(ast) : new Map();
340
+ ) {
341
+ const local =
342
+ node.callee?.type === 'Identifier'
343
+ @@ -1265,7 +1265,9 @@ export function slotHooks(source, id, options) {
344
+ HOOK_NAMES.has(name),
345
+ );
346
+ const manualProviders = options?.manualSlots ? findManualHookProviders(ast) : new Map();
418
347
  - const nativeReadActivation = options?.nativeReads === true && importsNativeRenderer(ast);
419
- - // Native signal reads exist only for the DOM client and server renderers.
420
- - const signalHookSites =
421
- - (options?.renderer?.target ?? 'dom') === 'dom' && options?.universalRuntime == null;
422
- + HOOK_NAMES.has(name),
423
- + );
424
- + const manualProviders = options?.manualSlots ? findManualHookProviders(ast) : new Map();
425
348
  + const universalTarget = options?.renderer?.target === 'universal';
426
349
  + const nativeReadActivation =
427
350
  + options?.nativeReads === true && !universalTarget && importsNativeRenderer(ast);
428
- + // Native signal reads exist only for the DOM client and server renderers.
429
- + const signalHookSites =
430
- + (options?.renderer?.target ?? 'dom') === 'dom' && options?.universalRuntime == null;
431
- @@ -1350,7 +1352,8 @@ export function slotHooks(source, id, options) {
432
- - ]),
433
- - ),
434
- - manualSlots: options?.manualSlots === true,
351
+ // Native signal reads exist only for the DOM client and server renderers.
352
+ const signalHookSites =
353
+ (options?.renderer?.target ?? 'dom') === 'dom' && options?.universalRuntime == null;
354
+ @@ -1376,7 +1378,8 @@ export function slotHooks(source, id, options) {
355
+ ]),
356
+ ),
357
+ manualSlots: options?.manualSlots === true,
435
358
  - nativeReads: options?.nativeReads === true,
436
- - signalHookSites,
437
- - locals: importInfo.locals,
438
- - source,
439
- + ]),
440
- + ),
441
- + manualSlots: options?.manualSlots === true,
442
359
  + nativeReads: options?.nativeReads === true && !universalTarget,
443
360
  + signalReads: options?.nativeReads === true,
444
- + signalHookSites,
445
- + locals: importInfo.locals,
446
- + source,
447
- @@ -1459,7 +1462,9 @@ export function slotHooks(source, id, options) {
448
- - ? 'enableServerSignalBindings'
449
- - : nativeReadActivation
450
- - ? 'enableSignalBindings'
451
- - : '__enableSignalDocument';
452
- - const local = allocSlotName(st, `_$${imported}`);
453
- - let specifiers = signalHelperImports.get(request);
454
- - if (specifiers === undefined) signalHelperImports.set(request, (specifiers = []));
455
- + ? 'enableServerSignalBindings'
456
- + : nativeReadActivation
457
- + ? 'enableSignalBindings'
361
+ signalHookSites,
362
+ locals: importInfo.locals,
363
+ source,
364
+ @@ -1489,6 +1492,8 @@ export function slotHooks(source, id, options) {
365
+ ? 'enableServerSignalBindings'
366
+ : nativeReadActivation
367
+ ? 'enableSignalBindings'
458
368
  + : universalTarget
459
369
  + ? '__enableUniversalSignalDocument'
460
- + : '__enableSignalDocument';
461
- + const local = allocSlotName(st, `_$${imported}`);
462
- + let specifiers = signalHelperImports.get(request);
463
- + if (specifiers === undefined) signalHelperImports.set(request, (specifiers = []));
464
- diff --git a/dist/node/runtime.js b/dist/node/runtime.js
465
- index 927d060..d311ac9 100644
466
- --- a/dist/node/runtime.js
467
- +++ b/dist/node/runtime.js
468
- @@ -185,6 +185,7 @@ import {
469
- createNativeReadDriver,
470
- rebaseNativeRead
471
- } from "./signals/native-read-client.js";
472
- +import { registerLocalSignalHook } from "./signals/local-hook.js";
473
- import {
474
- validateNativeReadWitness
475
- } from "./signals/native-read-collector.js";
476
- @@ -8398,6 +8399,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
370
+ : '__enableSignalDocument';
371
+ const local = allocSlotName(st, `_$${imported}`);
372
+ let specifiers = signalHelperImports.get(request);
373
+ diff --git a/dist/node/runtime/hooks.js b/dist/node/runtime/hooks.js
374
+ index 76f5deb523f61530623d7abee92ea8bd22e1bb4d..96fd3ac9a6ede1cb2ea070fe722a3d688c3f179e 100644
375
+ --- a/dist/node/runtime/hooks.js
376
+ +++ b/dist/node/runtime/hooks.js
377
+ @@ -1,3 +1,4 @@
378
+ +import { registerLocalSignalHook } from "../signals/local-hook.js";
379
+ const __octaneDev = process.env.NODE_ENV !== "production";
380
+ import {} from "./view-transition.js";
381
+ import { resolveHookPath } from "../hook-slot-cache.js";
382
+ @@ -102,6 +103,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
477
383
  }
478
384
  return cell.nativeValue;
479
385
  }
480
386
  +registerLocalSignalHook(() => CURRENT_SCOPE === null ? null : nativeLocalHook);
481
- function useState(initial, slot) {
482
- const s = readStateHook(initial, slot, arguments.length === 1);
483
- return [s.value, s.setter];
484
- @@ -9532,6 +9534,8 @@ function renderClientContextProvider(context, props, renderScope) {
485
- ensureHooks(scope).set(CHILDREN_DIALECT_SLOT, dialect);
486
- }
487
- renderSharedBody(childrenAsBody(children), void 0, scope, void 0);
488
- + } else {
489
- + resetScopeChildren(scope);
490
- }
387
+ function applyHookUpdate(state, action, reducer) {
388
+ return reducer !== null ? reducer(state, action) : typeof action === "function" ? action(state) : action;
491
389
  }
492
- let SHARED_BODY_SCOPE = null;
390
+ diff --git a/dist/node/runtime/templates.js b/dist/node/runtime/templates.js
391
+ index 860aacd13857b348cf4258e9f12582c87dbcb16e..af91a29fe2b593eec33aeac19e83701c23aec635 100644
392
+ --- a/dist/node/runtime/templates.js
393
+ +++ b/dist/node/runtime/templates.js
394
+ @@ -388,6 +388,7 @@ function bag16(s, r, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, $ = 0, next
395
+ return commitBag(s, r, { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, __journalWindow: 0, $, next, [BINDING_BAG_ARITY]: 16 });
396
+ }
397
+ function bagOf(s, r, bag) {
398
+ + bag[BINDING_BAG_ARITY] = -1;
399
+ return commitBag(s, r, bag);
400
+ }
401
+ function coerceText(value) {
493
402
  diff --git a/dist/node/signals/client.js b/dist/node/signals/client.js
494
- index 21a39c3..3f85700 100644
403
+ index 21a39c3ce9a28d2095e276fd647fd795e939a0bf..3f85700b57cbc3084c2df776ab3e6b5365f091a8 100644
495
404
  --- a/dist/node/signals/client.js
496
405
  +++ b/dist/node/signals/client.js
497
406
  @@ -1,11 +1,11 @@
498
407
  export * from "./index.js";
499
408
  -import { nativeLocalHook } from "../runtime.js";
500
- -import { createLocalScope } from "./engine.js";
501
- -function disposeLocalSignal(cell) {
502
- - cell.scope.dispose();
503
- -}
504
- -function useSignal$(initial, slot) {
505
- - const cell = nativeLocalHook(
506
- +import { createLocalScope } from "./engine.js";
409
+ import { createLocalScope } from "./engine.js";
507
410
  +import { localSignalHook } from "./local-hook.js";
508
- +function disposeLocalSignal(cell) {
509
- + cell.scope.dispose();
510
- +}
511
- +function useSignal$(initial, slot) {
411
+ function disposeLocalSignal(cell) {
412
+ cell.scope.dispose();
413
+ }
414
+ function useSignal$(initial, slot) {
415
+ - const cell = nativeLocalHook(
512
416
  + const cell = localSignalHook(
513
417
  "useSignal$",
514
418
  () => {
515
419
  const value = typeof initial === "function" ? initial() : initial;
516
420
  diff --git a/dist/node/signals/document-owner.js b/dist/node/signals/document-owner.js
517
- index 35db8d5..aeeaabc 100644
421
+ index 3b50394eb46776d2f6de379670dfeec569c145ac..e80903037547814e3437d39c99cfa103f7b4057c 100644
518
422
  --- a/dist/node/signals/document-owner.js
519
423
  +++ b/dist/node/signals/document-owner.js
520
- @@ -28,9 +28,8 @@ function enableSignalDocument(abi = 1) {
424
+ @@ -30,9 +30,8 @@ function enableSignalDocument(abi = 1) {
521
425
  if (defaultInstalled) return;
522
426
  defaultInstalled = true;
523
427
  signalOwnerFrame = { enter: enterSynchronousSignalOwner, restore: restoreSynchronousSignalOwner };
@@ -530,11 +434,11 @@ index 35db8d5..aeeaabc 100644
530
434
  function installStreamedSignalOwnerActivator(activate) {
531
435
  if (streamedSignalOwnerActivator !== void 0) {
532
436
  diff --git a/dist/node/signals/facade.js b/dist/node/signals/facade.js
533
- index 11ec297..575233b 100644
437
+ index 5b5554ee296ea345f42c5291059d8ab2e71fe0d4..1deabb0f5ab62f7cd6534c4e7ed13b75126341db 100644
534
438
  --- a/dist/node/signals/facade.js
535
439
  +++ b/dist/node/signals/facade.js
536
440
  @@ -326,7 +326,7 @@ class Descriptor {
537
- }
441
+ lexical;
538
442
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
539
443
  reader() {
540
444
  - return this.lexical === this ? this.owner : requireOwner();
@@ -543,7 +447,7 @@ index 11ec297..575233b 100644
543
447
  [SIGNAL_OWNER_RESOLVE](owner) {
544
448
  requireSite(this.site);
545
449
  diff --git a/dist/node/signals/index.js b/dist/node/signals/index.js
546
- index d657064..01a81cf 100644
450
+ index d65706400fb00c9dd9caf5b35f50f8baacf77184..01a81cf177242b7aa1d3923095c7dd49adcf3612 100644
547
451
  --- a/dist/node/signals/index.js
548
452
  +++ b/dist/node/signals/index.js
549
453
  @@ -1,6 +1,7 @@
@@ -564,7 +468,7 @@ index d657064..01a81cf 100644
564
468
  __signalAt,
565
469
  diff --git a/dist/node/signals/local-hook.js b/dist/node/signals/local-hook.js
566
470
  new file mode 100644
567
- index 0000000..77c63f5
471
+ index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f09935f9ce
568
472
  --- /dev/null
569
473
  +++ b/dist/node/signals/local-hook.js
570
474
  @@ -0,0 +1,19 @@
@@ -589,7 +493,7 @@ index 0000000..77c63f5
589
493
  +};
590
494
  diff --git a/dist/node/signals/universal-owner.js b/dist/node/signals/universal-owner.js
591
495
  new file mode 100644
592
- index 0000000..ff5eb43
496
+ index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b389b4d99b
593
497
  --- /dev/null
594
498
  +++ b/dist/node/signals/universal-owner.js
595
499
  @@ -0,0 +1,20 @@
@@ -614,7 +518,7 @@ index 0000000..ff5eb43
614
518
  + universalSignalDocument
615
519
  +};
616
520
  diff --git a/dist/node/universal-core.js b/dist/node/universal-core.js
617
- index aa045ee..38d6b2b 100644
521
+ index 8c89dbddb47cc86cdb0b727d0d80fe4ff89c3ac0..bb9dd40f2b3c7775c24a828db72055b588cec8d8 100644
618
522
  --- a/dist/node/universal-core.js
619
523
  +++ b/dist/node/universal-core.js
620
524
  @@ -17,6 +17,10 @@ import {
@@ -628,7 +532,20 @@ index aa045ee..38d6b2b 100644
628
532
  import { resolveLazyDefaultProps } from "./shared-value-helpers.js";
629
533
  import {
630
534
  deactivateEffectEventCells,
631
- @@ -495,6 +499,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
535
+ @@ -364,7 +368,11 @@ function universalList(items, render, empty) {
536
+ }
537
+ function renderableKey(value) {
538
+ if (value?.$$kind === UNIVERSAL_VALUE) {
539
+ - return value.key;
540
+ + if (value.key !== null) return value.key;
541
+ + // A compiler-generated root slot is transparent to keyed ownership.
542
+ + // Do not look through ranges: authored fragment boundaries remain distinct.
543
+ + const node = value.plan.root;
544
+ + return node.kind === "slot" ? renderableKey(value.values[node.slot]) : null;
545
+ }
546
+ if (value?.$$kind === UNIVERSAL_KEYED) {
547
+ return value.key;
548
+ @@ -495,6 +503,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
632
549
  hasKey: key !== NO_KEY || normalized.hasKey
633
550
  };
634
551
  }
@@ -762,7 +679,7 @@ index aa045ee..38d6b2b 100644
762
679
  function universalChildren(renderer, render) {
763
680
  assertRendererId(renderer, "universalChildren renderer");
764
681
  if (typeof render !== "function") throw new TypeError("universalChildren expected a function.");
765
- @@ -863,6 +994,7 @@ function draftOwner(record, parent, replayPath) {
682
+ @@ -856,6 +991,7 @@ function draftOwner(record, parent, replayPath) {
766
683
  boundaryThenable: record.boundaryThenable,
767
684
  isBoundary: record.isBoundary,
768
685
  canHandleSuspense: record.canHandleSuspense,
@@ -770,7 +687,7 @@ index aa045ee..38d6b2b 100644
770
687
  visibility: parent?.visibility ?? record.visibility,
771
688
  contextStable: null
772
689
  };
773
- @@ -1033,6 +1165,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
690
+ @@ -1066,6 +1202,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
774
691
  owner.contextStable = null;
775
692
  owner.needsRender = false;
776
693
  owner.implicitSlot = 0;
@@ -778,33 +695,29 @@ index aa045ee..38d6b2b 100644
778
695
  const previousOwner = CURRENT_OWNER;
779
696
  const previousAttemptOwner = attempt.owner;
780
697
  CURRENT_OWNER = owner;
781
- @@ -1044,13 +1177,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
698
+ @@ -1077,13 +1214,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
782
699
  const profileFrame = typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ && component !== null ? __profileBeginRender(owner.record, component, owner.record.mounted) : null;
783
700
  let didThrow = false;
784
701
  let thrown;
785
- - try {
786
- - output = build();
787
- - } catch (error) {
788
- - didThrow = true;
789
- - thrown = error;
790
- - throw error;
791
- - } finally {
792
702
  + const signalOwner = universalSignalOwner(owner.record);
793
703
  + const previousReadObserver = setNativeReadObserver(observeUniversalSignalRead);
794
704
  + const writeGuard = beginNativeWriteGuard();
795
- + try {
705
+ try {
706
+ - output = build();
796
707
  + output = runWithSignalOwner(signalOwner, build);
797
- + } catch (error) {
798
- + didThrow = true;
708
+ } catch (error) {
709
+ didThrow = true;
710
+ - thrown = error;
711
+ - throw error;
799
712
  + thrown = isThenable(error) ? new UniversalSuspense(error) : error;
800
713
  + throw thrown;
801
- + } finally {
714
+ } finally {
802
715
  + endNativeWriteGuard(writeGuard);
803
716
  + setNativeReadObserver(previousReadObserver);
804
717
  if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) {
805
718
  __profileEndRender(profileFrame, didThrow, thrown);
806
719
  }
807
- @@ -1214,6 +1352,8 @@ function disposeUncommittedDraft(owner) {
720
+ @@ -1247,6 +1389,8 @@ function disposeUncommittedDraft(owner) {
808
721
  owner.record.componentProps = null;
809
722
  owner.record.range = null;
810
723
  owner.record.updates.clear();
@@ -813,7 +726,7 @@ index aa045ee..38d6b2b 100644
813
726
  for (const hook of owner.hooks.values()) {
814
727
  if (hook.kind === "effect-event") hook.cell.active = false;
815
728
  }
816
- @@ -3048,6 +3188,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
729
+ @@ -3081,6 +3225,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
817
730
  owner.componentProps = draftOwner2.componentProps;
818
731
  owner.componentRevision = draftOwner2.componentRevision;
819
732
  owner.hooks = draftOwner2.hooks;
@@ -821,7 +734,7 @@ index aa045ee..38d6b2b 100644
821
734
  for (const [slot, applied] of draftOwner2.appliedUpdates) {
822
735
  const queue = owner.updates.get(slot);
823
736
  if (queue !== applied.queue || applied.lane) continue;
824
- @@ -3514,6 +3655,86 @@ function scheduleOwner(owner, slot) {
737
+ @@ -3628,6 +3773,86 @@ function scheduleOwner(owner, slot) {
825
738
  }
826
739
  owner.root.scheduleOwned(owner);
827
740
  }
@@ -908,7 +821,7 @@ index aa045ee..38d6b2b 100644
908
821
  function currentDraftOwner() {
909
822
  currentAttempt();
910
823
  const owner = activateLazyLeafOwner();
911
- @@ -4628,15 +4849,35 @@ function use(usable) {
824
+ @@ -4742,15 +4967,35 @@ function use(usable) {
912
825
  function useImperativeHandle(ref, create, deps, slot) {
913
826
  useLayoutEffect(
914
827
  () => {
@@ -918,9 +831,6 @@ index aa045ee..38d6b2b 100644
918
831
  - return () => {
919
832
  - if (typeof ref === "function") ref(null);
920
833
  - else if (ref !== null) ref.current = null;
921
- - };
922
- - },
923
- - deps,
924
834
  + const cleanups = [];
925
835
  + let value;
926
836
  + let initialized = false;
@@ -941,32 +851,32 @@ index aa045ee..38d6b2b 100644
941
851
  + target.current = value;
942
852
  + cleanups.push(() => { target.current = null; });
943
853
  + }
944
- + };
854
+ };
945
855
  + try {
946
856
  + attach(ref);
947
857
  + } catch (error) {
948
858
  + try { runCommitTasks(cleanups); } finally { throw error; }
949
859
  + }
950
860
  + return () => runCommitTasks(cleanups);
951
- + },
861
+ },
862
+ - deps,
952
863
  + deps == null ? deps : [...deps, ref],
953
864
  slot
954
865
  );
955
866
  }
956
- @@ -5631,9 +5872,9 @@ class UniversalRootImpl {
867
+ @@ -5745,9 +5990,9 @@ class UniversalRootImpl {
957
868
  }
958
869
  let result;
959
870
  try {
960
871
  - result = event.handler(payload);
961
- - } catch (error) {
962
- - if (!routeUniversalOwnerError(event.owner, error)) throw error;
963
872
  + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
964
- + } catch (error) {
873
+ } catch (error) {
874
+ - if (!routeUniversalOwnerError(event.owner, error)) throw error;
965
875
  + if (!routeUniversalOwnerError(event.owner, error) && !reportUniversalUncaughtError(this, error)) throw error;
966
876
  }
967
877
  return result;
968
878
  }
969
- @@ -6204,6 +6445,8 @@ class UniversalRootImpl {
879
+ @@ -6318,6 +6563,8 @@ class UniversalRootImpl {
970
880
  draft.record.componentProps = null;
971
881
  draft.record.range = null;
972
882
  draft.record.updates.clear();
@@ -975,7 +885,7 @@ index aa045ee..38d6b2b 100644
975
885
  for (const hook of draft.hooks.values()) {
976
886
  if (hook.kind === "effect-event") hook.cell.active = false;
977
887
  }
978
- @@ -6721,6 +6964,7 @@ class UniversalRootImpl {
888
+ @@ -6836,6 +7083,7 @@ class UniversalRootImpl {
979
889
  record.componentRevision = draft.componentRevision;
980
890
  record.parent = draft.parent?.record ?? null;
981
891
  record.hooks = draft.hooks;
@@ -983,7 +893,7 @@ index aa045ee..38d6b2b 100644
983
893
  record.effectOrder = [...draft.seenEffects];
984
894
  for (let index = 0; index < draft.seenEffects.length; index++) {
985
895
  draft.seenEffects[index].previous = null;
986
- @@ -8369,6 +8613,8 @@ class UniversalRootImpl {
896
+ @@ -8484,6 +8732,8 @@ class UniversalRootImpl {
987
897
  owner.componentProps = null;
988
898
  owner.range = null;
989
899
  owner.updates.clear();
@@ -992,7 +902,7 @@ index aa045ee..38d6b2b 100644
992
902
  }
993
903
  for (const draft of draftOwnersParentFirst) {
994
904
  const record = draft.record;
995
- @@ -8378,6 +8624,7 @@ class UniversalRootImpl {
905
+ @@ -8493,6 +8743,7 @@ class UniversalRootImpl {
996
906
  record.parent = draft.parent?.record ?? null;
997
907
  }
998
908
  record.hooks = draft.hooks;
@@ -1000,7 +910,7 @@ index aa045ee..38d6b2b 100644
1000
910
  record.effectOrder = [...draft.seenEffects];
1001
911
  for (let index = 0; index < draft.seenEffects.length; index++) {
1002
912
  draft.seenEffects[index].previous = null;
1003
- @@ -8889,6 +9136,8 @@ class UniversalRootImpl {
913
+ @@ -9004,6 +9255,8 @@ class UniversalRootImpl {
1004
914
  owner.componentProps = null;
1005
915
  owner.range = null;
1006
916
  owner.updates.clear();
@@ -1009,7 +919,7 @@ index aa045ee..38d6b2b 100644
1009
919
  }
1010
920
  const deactivatedRegionCells = /* @__PURE__ */ new Set();
1011
921
  for (const bridge of regionBridges) {
1012
- @@ -10105,6 +10354,7 @@ function createObjectDriver(renderer = "object") {
922
+ @@ -10220,6 +10473,7 @@ function createObjectDriver(renderer = "object") {
1013
923
  };
1014
924
  }
1015
925
  export {
@@ -1018,27 +928,24 @@ index aa045ee..38d6b2b 100644
1018
928
  UNIVERSAL_HMR,
1019
929
  UNIVERSAL_TRANSPORT_PROTOCOL_VERSION,
1020
930
  diff --git a/dist/node/universal-native.js b/dist/node/universal-native.js
1021
- index 55ac9b6..399633e 100644
931
+ index 55ac9b640dc8bbfd977bb2cbe0b7993c8ddb425a..399633e4e8cc9d6b098ba819f443d94bc30999f1 100644
1022
932
  --- a/dist/node/universal-native.js
1023
933
  +++ b/dist/node/universal-native.js
1024
934
  @@ -6,9 +6,12 @@ import {
1025
935
  import {
1026
936
  universalContext
1027
937
  } from "./universal-core.js";
1028
- -import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1029
- -import { CONTEXT_TAG } from "./runtime-tags.js";
1030
- -import { registerContext } from "./context-identity.js";
1031
938
  +export { Children } from "./universal-core.js";
1032
939
  +import { enableUniversalSignalDocument } from "./signals/universal-owner.js";
1033
- +import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1034
- +import { CONTEXT_TAG } from "./runtime-tags.js";
1035
- +import { registerContext } from "./context-identity.js";
940
+ import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
941
+ import { CONTEXT_TAG } from "./runtime-tags.js";
942
+ import { registerContext } from "./context-identity.js";
1036
943
  +enableUniversalSignalDocument();
1037
944
  // @__NO_SIDE_EFFECTS__
1038
945
  function createContext(defaultValue) {
1039
946
  const context = ((props, scope) => scope === void 0 ? universalContext(context, props.value, props.children) : renderRendererContextProvider(context, props, scope));
1040
947
  diff --git a/dist/node/universal.js b/dist/node/universal.js
1041
- index 6427a01..8049b78 100644
948
+ index 6427a0190c072e7e4629c379e42bedc03669dc6e..8049b7880824de607157091004a46c9d33a23484 100644
1042
949
  --- a/dist/node/universal.js
1043
950
  +++ b/dist/node/universal.js
1044
951
  @@ -8,6 +8,9 @@ import {
@@ -1051,37 +958,37 @@ index 6427a01..8049b78 100644
1051
958
  export {
1052
959
  createContext,
1053
960
  createSubSlot,
1054
- diff --git a/dist/runtime.js b/dist/runtime.js
1055
- index 67ace09..afeb8ea 100644
1056
- --- a/dist/runtime.js
1057
- +++ b/dist/runtime.js
1058
- @@ -184,6 +184,7 @@ import {
1059
- createNativeReadDriver,
1060
- rebaseNativeRead
1061
- } from "./signals/native-read-client.js";
1062
- +import { registerLocalSignalHook } from "./signals/local-hook.js";
1063
- import {
1064
- validateNativeReadWitness
1065
- } from "./signals/native-read-collector.js";
1066
- @@ -8397,6 +8398,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
961
+ diff --git a/dist/runtime/hooks.js b/dist/runtime/hooks.js
962
+ index 3365680750d7e21c966c307ca87a05edee8e6474..b369f2d350b003904a37f7a944937e57bc7f628c 100644
963
+ --- a/dist/runtime/hooks.js
964
+ +++ b/dist/runtime/hooks.js
965
+ @@ -1,3 +1,4 @@
966
+ +import { registerLocalSignalHook } from "../signals/local-hook.js";
967
+ import {} from "./view-transition.js";
968
+ import { resolveHookPath } from "../hook-slot-cache.js";
969
+ import { __profileResolveHook, __profileSchedule, __profileCacheHit } from "../profiling.js";
970
+ @@ -101,6 +102,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
1067
971
  }
1068
972
  return cell.nativeValue;
1069
973
  }
1070
974
  +registerLocalSignalHook(() => CURRENT_SCOPE === null ? null : nativeLocalHook);
1071
- function useState(initial, slot) {
1072
- const s = readStateHook(initial, slot, arguments.length === 1);
1073
- return [s.value, s.setter];
1074
- @@ -9531,6 +9533,8 @@ function renderClientContextProvider(context, props, renderScope) {
1075
- ensureHooks(scope).set(CHILDREN_DIALECT_SLOT, dialect);
1076
- }
1077
- renderSharedBody(childrenAsBody(children), void 0, scope, void 0);
1078
- + } else {
1079
- + resetScopeChildren(scope);
1080
- }
975
+ function applyHookUpdate(state, action, reducer) {
976
+ return reducer !== null ? reducer(state, action) : typeof action === "function" ? action(state) : action;
1081
977
  }
1082
- let SHARED_BODY_SCOPE = null;
978
+ diff --git a/dist/runtime/templates.js b/dist/runtime/templates.js
979
+ index 5aa86e8dd741cf85aeb9c0efa6b74c82af1ac3e8..b700681bca250957de0df85e6255096274407490 100644
980
+ --- a/dist/runtime/templates.js
981
+ +++ b/dist/runtime/templates.js
982
+ @@ -387,6 +387,7 @@ function bag16(s, r, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, $ = 0, next
983
+ return commitBag(s, r, { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, __journalWindow: 0, $, next, [BINDING_BAG_ARITY]: 16 });
984
+ }
985
+ function bagOf(s, r, bag) {
986
+ + bag[BINDING_BAG_ARITY] = -1;
987
+ return commitBag(s, r, bag);
988
+ }
989
+ function coerceText(value) {
1083
990
  diff --git a/dist/signals/client.d.ts b/dist/signals/client.d.ts
1084
- index 6388c2f..f9e9862 100644
991
+ index 6388c2f98517884a13af720687fb81c1f18357be..f9e98624f159cccf02a379d79201751fc07694d8 100644
1085
992
  --- a/dist/signals/client.d.ts
1086
993
  +++ b/dist/signals/client.d.ts
1087
994
  @@ -1,4 +1,4 @@
@@ -1091,33 +998,28 @@ index 6388c2f..f9e9862 100644
1091
998
  import type { WritableSignal } from './types.js';
1092
999
  /** A writable signal owned by this compiler-assigned component hook slot. */
1093
1000
  diff --git a/dist/signals/client.js b/dist/signals/client.js
1094
- index 21a39c3..3f85700 100644
1001
+ index 21a39c3ce9a28d2095e276fd647fd795e939a0bf..3f85700b57cbc3084c2df776ab3e6b5365f091a8 100644
1095
1002
  --- a/dist/signals/client.js
1096
1003
  +++ b/dist/signals/client.js
1097
1004
  @@ -1,11 +1,11 @@
1098
1005
  export * from "./index.js";
1099
1006
  -import { nativeLocalHook } from "../runtime.js";
1100
- -import { createLocalScope } from "./engine.js";
1101
- -function disposeLocalSignal(cell) {
1102
- - cell.scope.dispose();
1103
- -}
1104
- -function useSignal$(initial, slot) {
1105
- - const cell = nativeLocalHook(
1106
- +import { createLocalScope } from "./engine.js";
1007
+ import { createLocalScope } from "./engine.js";
1107
1008
  +import { localSignalHook } from "./local-hook.js";
1108
- +function disposeLocalSignal(cell) {
1109
- + cell.scope.dispose();
1110
- +}
1111
- +function useSignal$(initial, slot) {
1009
+ function disposeLocalSignal(cell) {
1010
+ cell.scope.dispose();
1011
+ }
1012
+ function useSignal$(initial, slot) {
1013
+ - const cell = nativeLocalHook(
1112
1014
  + const cell = localSignalHook(
1113
1015
  "useSignal$",
1114
1016
  () => {
1115
1017
  const value = typeof initial === "function" ? initial() : initial;
1116
1018
  diff --git a/dist/signals/document-owner.js b/dist/signals/document-owner.js
1117
- index 4ad3aca..b2a5d0e 100644
1019
+ index 6f2891ffb1116f083478bfbe9cb007b6461a855f..557d6cc1406c4188257b290cf8a02a36df615dc1 100644
1118
1020
  --- a/dist/signals/document-owner.js
1119
1021
  +++ b/dist/signals/document-owner.js
1120
- @@ -27,9 +27,8 @@ function enableSignalDocument(abi = 1) {
1022
+ @@ -29,9 +29,8 @@ function enableSignalDocument(abi = 1) {
1121
1023
  if (defaultInstalled) return;
1122
1024
  defaultInstalled = true;
1123
1025
  signalOwnerFrame = { enter: enterSynchronousSignalOwner, restore: restoreSynchronousSignalOwner };
@@ -1130,11 +1032,11 @@ index 4ad3aca..b2a5d0e 100644
1130
1032
  function installStreamedSignalOwnerActivator(activate) {
1131
1033
  if (streamedSignalOwnerActivator !== void 0) {
1132
1034
  diff --git a/dist/signals/facade.js b/dist/signals/facade.js
1133
- index 478c29d..b6b18b4 100644
1035
+ index 808e4ec01428d4cf6e3938667642847f2590f1b8..0ab799afc337793f3270a02003e6fe6a4ff08f47 100644
1134
1036
  --- a/dist/signals/facade.js
1135
1037
  +++ b/dist/signals/facade.js
1136
1038
  @@ -325,7 +325,7 @@ class Descriptor {
1137
- }
1039
+ lexical;
1138
1040
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
1139
1041
  reader() {
1140
1042
  - return this.lexical === this ? this.owner : requireOwner();
@@ -1143,7 +1045,7 @@ index 478c29d..b6b18b4 100644
1143
1045
  [SIGNAL_OWNER_RESOLVE](owner) {
1144
1046
  requireSite(this.site);
1145
1047
  diff --git a/dist/signals/index.d.ts b/dist/signals/index.d.ts
1146
- index ed08619..acccb75 100644
1048
+ index ed086195a3e8e63de4a5b26d5bf6aaa392bd5d32..acccb752a2c46f14a97e07de3a00df0fa24d8cf7 100644
1147
1049
  --- a/dist/signals/index.d.ts
1148
1050
  +++ b/dist/signals/index.d.ts
1149
1051
  @@ -3,6 +3,7 @@ export { createScope } from './engine.js';
@@ -1155,7 +1057,7 @@ index ed08619..acccb75 100644
1155
1057
  export { ActionUncertainError, action$, isActionUncertain, optimistic$ } from './actions.js';
1156
1058
  export { __derivedAt, derived$ } from './derived-facade.js';
1157
1059
  diff --git a/dist/signals/index.js b/dist/signals/index.js
1158
- index d657064..01a81cf 100644
1060
+ index d65706400fb00c9dd9caf5b35f50f8baacf77184..01a81cf177242b7aa1d3923095c7dd49adcf3612 100644
1159
1061
  --- a/dist/signals/index.js
1160
1062
  +++ b/dist/signals/index.js
1161
1063
  @@ -1,6 +1,7 @@
@@ -1176,7 +1078,7 @@ index d657064..01a81cf 100644
1176
1078
  __signalAt,
1177
1079
  diff --git a/dist/signals/local-hook.d.ts b/dist/signals/local-hook.d.ts
1178
1080
  new file mode 100644
1179
- index 0000000..d6c1770
1081
+ index 0000000000000000000000000000000000000000..d6c1770fc22b738e0e107b6616f60eaf676d853e
1180
1082
  --- /dev/null
1181
1083
  +++ b/dist/signals/local-hook.d.ts
1182
1084
  @@ -0,0 +1,16 @@
@@ -1198,7 +1100,7 @@ index 0000000..d6c1770
1198
1100
  +export declare function localSignalHook<T>(name: string, initialize: () => T, dispose: (value: T) => void, slot?: symbol | number): T;
1199
1101
  diff --git a/dist/signals/local-hook.js b/dist/signals/local-hook.js
1200
1102
  new file mode 100644
1201
- index 0000000..77c63f5
1103
+ index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f09935f9ce
1202
1104
  --- /dev/null
1203
1105
  +++ b/dist/signals/local-hook.js
1204
1106
  @@ -0,0 +1,19 @@
@@ -1223,7 +1125,7 @@ index 0000000..77c63f5
1223
1125
  +};
1224
1126
  diff --git a/dist/signals/universal-owner.d.ts b/dist/signals/universal-owner.d.ts
1225
1127
  new file mode 100644
1226
- index 0000000..0e57f3a
1128
+ index 0000000000000000000000000000000000000000..0e57f3a79115c858355f863434c6e3423570067b
1227
1129
  --- /dev/null
1228
1130
  +++ b/dist/signals/universal-owner.d.ts
1229
1131
  @@ -0,0 +1,10 @@
@@ -1239,7 +1141,7 @@ index 0000000..0e57f3a
1239
1141
  +export declare function enableUniversalSignalDocument(abi?: number): void;
1240
1142
  diff --git a/dist/signals/universal-owner.js b/dist/signals/universal-owner.js
1241
1143
  new file mode 100644
1242
- index 0000000..ff5eb43
1144
+ index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b389b4d99b
1243
1145
  --- /dev/null
1244
1146
  +++ b/dist/signals/universal-owner.js
1245
1147
  @@ -0,0 +1,20 @@
@@ -1264,7 +1166,7 @@ index 0000000..ff5eb43
1264
1166
  + universalSignalDocument
1265
1167
  +};
1266
1168
  diff --git a/dist/universal-core.d.ts b/dist/universal-core.d.ts
1267
- index ddf95b3..3a6b744 100644
1169
+ index 15ecadf70593d2f1027bd872a376af79036396bc..716ac7ff5c68e090f9420a957f13250e53cc5678 100644
1268
1170
  --- a/dist/universal-core.d.ts
1269
1171
  +++ b/dist/universal-core.d.ts
1270
1172
  @@ -791,9 +791,8 @@ export declare function lazy<C extends UniversalComponent<any>>(load: () => Prom
@@ -1286,7 +1188,7 @@ index ddf95b3..3a6b744 100644
1286
1188
  +
1287
1189
  +export declare const Children: { toArray(children: UniversalRenderable): UniversalRenderable[]; map(children: UniversalRenderable, fn: (child: UniversalRenderable, index: number) => UniversalRenderable): UniversalRenderable[]; };
1288
1190
  diff --git a/dist/universal-core.js b/dist/universal-core.js
1289
- index aa045ee..38d6b2b 100644
1191
+ index 8c89dbddb47cc86cdb0b727d0d80fe4ff89c3ac0..bb9dd40f2b3c7775c24a828db72055b588cec8d8 100644
1290
1192
  --- a/dist/universal-core.js
1291
1193
  +++ b/dist/universal-core.js
1292
1194
  @@ -17,6 +17,10 @@ import {
@@ -1300,7 +1202,20 @@ index aa045ee..38d6b2b 100644
1300
1202
  import { resolveLazyDefaultProps } from "./shared-value-helpers.js";
1301
1203
  import {
1302
1204
  deactivateEffectEventCells,
1303
- @@ -495,6 +499,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
1205
+ @@ -364,7 +368,11 @@ function universalList(items, render, empty) {
1206
+ }
1207
+ function renderableKey(value) {
1208
+ if (value?.$$kind === UNIVERSAL_VALUE) {
1209
+ - return value.key;
1210
+ + if (value.key !== null) return value.key;
1211
+ + // A compiler-generated root slot is transparent to keyed ownership.
1212
+ + // Do not look through ranges: authored fragment boundaries remain distinct.
1213
+ + const node = value.plan.root;
1214
+ + return node.kind === "slot" ? renderableKey(value.values[node.slot]) : null;
1215
+ }
1216
+ if (value?.$$kind === UNIVERSAL_KEYED) {
1217
+ return value.key;
1218
+ @@ -495,6 +503,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
1304
1219
  hasKey: key !== NO_KEY || normalized.hasKey
1305
1220
  };
1306
1221
  }
@@ -1434,7 +1349,7 @@ index aa045ee..38d6b2b 100644
1434
1349
  function universalChildren(renderer, render) {
1435
1350
  assertRendererId(renderer, "universalChildren renderer");
1436
1351
  if (typeof render !== "function") throw new TypeError("universalChildren expected a function.");
1437
- @@ -863,6 +994,7 @@ function draftOwner(record, parent, replayPath) {
1352
+ @@ -856,6 +991,7 @@ function draftOwner(record, parent, replayPath) {
1438
1353
  boundaryThenable: record.boundaryThenable,
1439
1354
  isBoundary: record.isBoundary,
1440
1355
  canHandleSuspense: record.canHandleSuspense,
@@ -1442,7 +1357,7 @@ index aa045ee..38d6b2b 100644
1442
1357
  visibility: parent?.visibility ?? record.visibility,
1443
1358
  contextStable: null
1444
1359
  };
1445
- @@ -1033,6 +1165,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1360
+ @@ -1066,6 +1202,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1446
1361
  owner.contextStable = null;
1447
1362
  owner.needsRender = false;
1448
1363
  owner.implicitSlot = 0;
@@ -1450,33 +1365,29 @@ index aa045ee..38d6b2b 100644
1450
1365
  const previousOwner = CURRENT_OWNER;
1451
1366
  const previousAttemptOwner = attempt.owner;
1452
1367
  CURRENT_OWNER = owner;
1453
- @@ -1044,13 +1177,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1368
+ @@ -1077,13 +1214,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1454
1369
  const profileFrame = typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ && component !== null ? __profileBeginRender(owner.record, component, owner.record.mounted) : null;
1455
1370
  let didThrow = false;
1456
1371
  let thrown;
1457
- - try {
1458
- - output = build();
1459
- - } catch (error) {
1460
- - didThrow = true;
1461
- - thrown = error;
1462
- - throw error;
1463
- - } finally {
1464
1372
  + const signalOwner = universalSignalOwner(owner.record);
1465
1373
  + const previousReadObserver = setNativeReadObserver(observeUniversalSignalRead);
1466
1374
  + const writeGuard = beginNativeWriteGuard();
1467
- + try {
1375
+ try {
1376
+ - output = build();
1468
1377
  + output = runWithSignalOwner(signalOwner, build);
1469
- + } catch (error) {
1470
- + didThrow = true;
1378
+ } catch (error) {
1379
+ didThrow = true;
1380
+ - thrown = error;
1381
+ - throw error;
1471
1382
  + thrown = isThenable(error) ? new UniversalSuspense(error) : error;
1472
1383
  + throw thrown;
1473
- + } finally {
1384
+ } finally {
1474
1385
  + endNativeWriteGuard(writeGuard);
1475
1386
  + setNativeReadObserver(previousReadObserver);
1476
1387
  if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) {
1477
1388
  __profileEndRender(profileFrame, didThrow, thrown);
1478
1389
  }
1479
- @@ -1214,6 +1352,8 @@ function disposeUncommittedDraft(owner) {
1390
+ @@ -1247,6 +1389,8 @@ function disposeUncommittedDraft(owner) {
1480
1391
  owner.record.componentProps = null;
1481
1392
  owner.record.range = null;
1482
1393
  owner.record.updates.clear();
@@ -1485,7 +1396,7 @@ index aa045ee..38d6b2b 100644
1485
1396
  for (const hook of owner.hooks.values()) {
1486
1397
  if (hook.kind === "effect-event") hook.cell.active = false;
1487
1398
  }
1488
- @@ -3048,6 +3188,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
1399
+ @@ -3081,6 +3225,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
1489
1400
  owner.componentProps = draftOwner2.componentProps;
1490
1401
  owner.componentRevision = draftOwner2.componentRevision;
1491
1402
  owner.hooks = draftOwner2.hooks;
@@ -1493,7 +1404,7 @@ index aa045ee..38d6b2b 100644
1493
1404
  for (const [slot, applied] of draftOwner2.appliedUpdates) {
1494
1405
  const queue = owner.updates.get(slot);
1495
1406
  if (queue !== applied.queue || applied.lane) continue;
1496
- @@ -3514,6 +3655,86 @@ function scheduleOwner(owner, slot) {
1407
+ @@ -3628,6 +3773,86 @@ function scheduleOwner(owner, slot) {
1497
1408
  }
1498
1409
  owner.root.scheduleOwned(owner);
1499
1410
  }
@@ -1580,7 +1491,7 @@ index aa045ee..38d6b2b 100644
1580
1491
  function currentDraftOwner() {
1581
1492
  currentAttempt();
1582
1493
  const owner = activateLazyLeafOwner();
1583
- @@ -4628,15 +4849,35 @@ function use(usable) {
1494
+ @@ -4742,15 +4967,35 @@ function use(usable) {
1584
1495
  function useImperativeHandle(ref, create, deps, slot) {
1585
1496
  useLayoutEffect(
1586
1497
  () => {
@@ -1590,9 +1501,6 @@ index aa045ee..38d6b2b 100644
1590
1501
  - return () => {
1591
1502
  - if (typeof ref === "function") ref(null);
1592
1503
  - else if (ref !== null) ref.current = null;
1593
- - };
1594
- - },
1595
- - deps,
1596
1504
  + const cleanups = [];
1597
1505
  + let value;
1598
1506
  + let initialized = false;
@@ -1613,32 +1521,32 @@ index aa045ee..38d6b2b 100644
1613
1521
  + target.current = value;
1614
1522
  + cleanups.push(() => { target.current = null; });
1615
1523
  + }
1616
- + };
1524
+ };
1617
1525
  + try {
1618
1526
  + attach(ref);
1619
1527
  + } catch (error) {
1620
1528
  + try { runCommitTasks(cleanups); } finally { throw error; }
1621
1529
  + }
1622
1530
  + return () => runCommitTasks(cleanups);
1623
- + },
1531
+ },
1532
+ - deps,
1624
1533
  + deps == null ? deps : [...deps, ref],
1625
1534
  slot
1626
1535
  );
1627
1536
  }
1628
- @@ -5631,9 +5872,9 @@ class UniversalRootImpl {
1537
+ @@ -5745,9 +5990,9 @@ class UniversalRootImpl {
1629
1538
  }
1630
1539
  let result;
1631
1540
  try {
1632
1541
  - result = event.handler(payload);
1633
- - } catch (error) {
1634
- - if (!routeUniversalOwnerError(event.owner, error)) throw error;
1635
1542
  + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
1636
- + } catch (error) {
1543
+ } catch (error) {
1544
+ - if (!routeUniversalOwnerError(event.owner, error)) throw error;
1637
1545
  + if (!routeUniversalOwnerError(event.owner, error) && !reportUniversalUncaughtError(this, error)) throw error;
1638
1546
  }
1639
1547
  return result;
1640
1548
  }
1641
- @@ -6204,6 +6445,8 @@ class UniversalRootImpl {
1549
+ @@ -6318,6 +6563,8 @@ class UniversalRootImpl {
1642
1550
  draft.record.componentProps = null;
1643
1551
  draft.record.range = null;
1644
1552
  draft.record.updates.clear();
@@ -1647,7 +1555,7 @@ index aa045ee..38d6b2b 100644
1647
1555
  for (const hook of draft.hooks.values()) {
1648
1556
  if (hook.kind === "effect-event") hook.cell.active = false;
1649
1557
  }
1650
- @@ -6721,6 +6964,7 @@ class UniversalRootImpl {
1558
+ @@ -6836,6 +7083,7 @@ class UniversalRootImpl {
1651
1559
  record.componentRevision = draft.componentRevision;
1652
1560
  record.parent = draft.parent?.record ?? null;
1653
1561
  record.hooks = draft.hooks;
@@ -1655,7 +1563,7 @@ index aa045ee..38d6b2b 100644
1655
1563
  record.effectOrder = [...draft.seenEffects];
1656
1564
  for (let index = 0; index < draft.seenEffects.length; index++) {
1657
1565
  draft.seenEffects[index].previous = null;
1658
- @@ -8369,6 +8613,8 @@ class UniversalRootImpl {
1566
+ @@ -8484,6 +8732,8 @@ class UniversalRootImpl {
1659
1567
  owner.componentProps = null;
1660
1568
  owner.range = null;
1661
1569
  owner.updates.clear();
@@ -1664,7 +1572,7 @@ index aa045ee..38d6b2b 100644
1664
1572
  }
1665
1573
  for (const draft of draftOwnersParentFirst) {
1666
1574
  const record = draft.record;
1667
- @@ -8378,6 +8624,7 @@ class UniversalRootImpl {
1575
+ @@ -8493,6 +8743,7 @@ class UniversalRootImpl {
1668
1576
  record.parent = draft.parent?.record ?? null;
1669
1577
  }
1670
1578
  record.hooks = draft.hooks;
@@ -1672,7 +1580,7 @@ index aa045ee..38d6b2b 100644
1672
1580
  record.effectOrder = [...draft.seenEffects];
1673
1581
  for (let index = 0; index < draft.seenEffects.length; index++) {
1674
1582
  draft.seenEffects[index].previous = null;
1675
- @@ -8889,6 +9136,8 @@ class UniversalRootImpl {
1583
+ @@ -9004,6 +9255,8 @@ class UniversalRootImpl {
1676
1584
  owner.componentProps = null;
1677
1585
  owner.range = null;
1678
1586
  owner.updates.clear();
@@ -1681,7 +1589,7 @@ index aa045ee..38d6b2b 100644
1681
1589
  }
1682
1590
  const deactivatedRegionCells = /* @__PURE__ */ new Set();
1683
1591
  for (const bridge of regionBridges) {
1684
- @@ -10105,6 +10354,7 @@ function createObjectDriver(renderer = "object") {
1592
+ @@ -10220,6 +10473,7 @@ function createObjectDriver(renderer = "object") {
1685
1593
  };
1686
1594
  }
1687
1595
  export {
@@ -1690,27 +1598,24 @@ index aa045ee..38d6b2b 100644
1690
1598
  UNIVERSAL_HMR,
1691
1599
  UNIVERSAL_TRANSPORT_PROTOCOL_VERSION,
1692
1600
  diff --git a/dist/universal-native.js b/dist/universal-native.js
1693
- index 55ac9b6..399633e 100644
1601
+ index 55ac9b640dc8bbfd977bb2cbe0b7993c8ddb425a..399633e4e8cc9d6b098ba819f443d94bc30999f1 100644
1694
1602
  --- a/dist/universal-native.js
1695
1603
  +++ b/dist/universal-native.js
1696
1604
  @@ -6,9 +6,12 @@ import {
1697
1605
  import {
1698
1606
  universalContext
1699
1607
  } from "./universal-core.js";
1700
- -import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1701
- -import { CONTEXT_TAG } from "./runtime-tags.js";
1702
- -import { registerContext } from "./context-identity.js";
1703
1608
  +export { Children } from "./universal-core.js";
1704
1609
  +import { enableUniversalSignalDocument } from "./signals/universal-owner.js";
1705
- +import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1706
- +import { CONTEXT_TAG } from "./runtime-tags.js";
1707
- +import { registerContext } from "./context-identity.js";
1610
+ import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1611
+ import { CONTEXT_TAG } from "./runtime-tags.js";
1612
+ import { registerContext } from "./context-identity.js";
1708
1613
  +enableUniversalSignalDocument();
1709
1614
  // @__NO_SIDE_EFFECTS__
1710
1615
  function createContext(defaultValue) {
1711
1616
  const context = ((props, scope) => scope === void 0 ? universalContext(context, props.value, props.children) : renderRendererContextProvider(context, props, scope));
1712
1617
  diff --git a/dist/universal.js b/dist/universal.js
1713
- index 6427a01..8049b78 100644
1618
+ index 6427a0190c072e7e4629c379e42bedc03669dc6e..8049b7880824de607157091004a46c9d33a23484 100644
1714
1619
  --- a/dist/universal.js
1715
1620
  +++ b/dist/universal.js
1716
1621
  @@ -8,6 +8,9 @@ import {