@octane-xplat/patches 0.12.0 → 0.14.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/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # @octane-xplat/patches
2
2
 
3
- This package carries the pnpm patch files used by freshly scaffolded
4
- Octane-xplat apps. It is installed as a pnpm `configDependencies` package so
5
- the patches are available before regular app dependencies are installed.
3
+ The pnpm patch files used by freshly scaffolded Octane-xplat apps. Apps do not
4
+ install this package directly — create templates declare it as a pnpm
5
+ `configDependencies` package so the patches are in place before regular app
6
+ dependencies install.
6
7
 
7
8
  The canonical patch files and their rationale live in
8
9
  `packages/cli/patches/manifest.json`. `pnpm sync:patches` generates this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octane-xplat/patches",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "pnpm config dependency carrying the framework patch files",
5
5
  "keywords": [
6
6
  "framework",
@@ -167,10 +167,124 @@ index 71574c48f655183af0c9601b020fd1febd63ccb3..0061d9c9e9fe9c6034576eae8449831d
167
167
  return code;
168
168
  }
169
169
  diff --git a/hmr/server/rewrite-imports.js b/hmr/server/rewrite-imports.js
170
- index 4a6575cb00a6aeecbbb7ac5ccac3268cb10d7f54..dc70055007e26117b76fbb9d2f4f17fabfd8db00 100644
170
+ index 4a6575cb00a6aeecbbb7ac5ccac3268cb10d7f54..ea97dfe6c895bb6b80b0c0403c86663046c65496 100644
171
171
  --- a/hmr/server/rewrite-imports.js
172
172
  +++ b/hmr/server/rewrite-imports.js
173
- @@ -253,11 +253,29 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
173
+ @@ -12,7 +12,93 @@ import { resolveAngularCoreHmrImportSource, rewriteAngularEntryRegisterOnly } fr
174
+ import { isNativeScriptCoreModule, isNativeScriptPluginModule, normalizeNativeScriptCoreSpecifier, normalizeNodeModulesSpecifier, resolveNodeModulesPackageBoundary, resolveVendorRouting, rewriteFsAbsoluteToNsM, shouldPreserveBareRuntimePluginSubpathImport } from './websocket-module-specifiers.js';
175
+ import { ensureDynamicHmrImportHelper } from './websocket-served-module-helpers.js';
176
+ import { collectMixedRuntimePluginHttpRootPackages, findDependencyFileName, getProjectRelativeImportPath, isApplicationImport, normalizeImportPath, stripToProjectRelative, toAppModuleBaseId, toNodeModulesHttpModuleId } from './device-transform-helpers.js';
177
+ +import { resolvePlatform } from '../../helpers/cli-flags.js';
178
+ const APP_ROOT_DIR = getProjectAppPath();
179
+ +// ── Package `imports` field (`#specifier`) resolution ─────────────────────
180
+ +// A `#`-prefixed specifier resolves through the `imports` field of the
181
+ +// importer's own package.json (Node "package imports" — e.g. octane's
182
+ +// `#octane/dist/signal-actions/graph`). Served node_modules files are raw-read
183
+ +// by the /ns/m route without Vite import analysis, and the bare-npm fallback
184
+ +// below rejects `#` outright (bareNpmRe requires an alphanumeric first char),
185
+ +// so the literal specifier reached the device loader as "Cannot find module".
186
+ +// Device-visible conditions: `import` (ESM), `native`, the active platform —
187
+ +// `node`, `require`, and build-time conditions like `octane-islands` are
188
+ +// intentionally absent.
189
+ +function resolveImportsConditionalTarget(value, conditions) {
190
+ + while (value !== null && typeof value === 'object' && !Array.isArray(value)) {
191
+ + let next;
192
+ + for (const condition of Object.keys(value)) {
193
+ + if (condition === 'default' || conditions.has(condition)) {
194
+ + next = value[condition];
195
+ + break;
196
+ + }
197
+ + }
198
+ + value = next;
199
+ + }
200
+ + return typeof value === 'string' ? value : null;
201
+ +}
202
+ +function resolvePackageImportsSpecifier(spec, importerPath, projectRoot, verbose) {
203
+ + let importerAbs;
204
+ + if (importerPath.startsWith('/@fs/')) {
205
+ + importerAbs = importerPath.slice('/@fs'.length);
206
+ + }
207
+ + else if (importerPath.startsWith('/')) {
208
+ + importerAbs = path.join(projectRoot, `.${importerPath}`);
209
+ + }
210
+ + else {
211
+ + return null;
212
+ + }
213
+ + try {
214
+ + importerAbs = importerAbs.replace(PAT.QUERY_PATTERN, '');
215
+ + let dir = path.dirname(importerAbs);
216
+ + // The `imports` field is scoped to the importer's nearest enclosing
217
+ + // package.json — the same lookup Node performs.
218
+ + for (;;) {
219
+ + const packageJsonPath = path.join(dir, 'package.json');
220
+ + if (existsSync(packageJsonPath)) {
221
+ + const pkgJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
222
+ + const importsField = pkgJson.imports;
223
+ + if (!importsField || typeof importsField !== 'object' || Array.isArray(importsField) || !pkgJson.name)
224
+ + return null;
225
+ + const conditions = new Set(['default', 'import', 'native', resolvePlatform()].filter(Boolean));
226
+ + const exactMatch = Object.hasOwn(importsField, spec);
227
+ + let target = exactMatch
228
+ + ? resolveImportsConditionalTarget(importsField[spec], conditions)
229
+ + : null;
230
+ + if (!exactMatch && target === null) {
231
+ + for (const key of Object.keys(importsField)) {
232
+ + const star = key.indexOf('*');
233
+ + if (star === -1)
234
+ + continue;
235
+ + const pre = key.slice(0, star);
236
+ + const post = key.slice(star + 1);
237
+ + if (spec.length < pre.length + post.length || !spec.startsWith(pre) || !spec.endsWith(post))
238
+ + continue;
239
+ + const matched = spec.slice(pre.length, spec.length - post.length);
240
+ + const patternTarget = resolveImportsConditionalTarget(importsField[key], conditions);
241
+ + target = typeof patternTarget === 'string' ? patternTarget.replaceAll('*', matched) : null;
242
+ + break;
243
+ + }
244
+ + }
245
+ + // Only `./`-relative targets can be expressed as a device URL
246
+ + // (bare-specifier targets are rare and keep falling through).
247
+ + if (typeof target !== 'string' || !target.startsWith('./'))
248
+ + return null;
249
+ + const out = `/ns/m/node_modules/${pkgJson.name}/${target.slice(2)}`;
250
+ + if (verbose)
251
+ + console.log(`[rewrite] imports-field specifier: ${spec} → ${out}`);
252
+ + return out;
253
+ + }
254
+ + const parent = path.dirname(dir);
255
+ + if (parent === dir)
256
+ + return null;
257
+ + dir = parent;
258
+ + }
259
+ + }
260
+ + catch {
261
+ + return null;
262
+ + }
263
+ +}
264
+ export function prepareAngularEntryForDevice(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose = false, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp = false) {
265
+ const rewrittenCode = rewriteImports(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp);
266
+ return rewriteAngularEntryRegisterOnly(rewrittenCode, resolveAngularCoreHmrImportSource(rewrittenCode, httpOrigin));
267
+ @@ -236,6 +322,19 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
268
+ }
269
+ return `${prefix}${stub}${suffix}`;
270
+ }
271
+ + // `#`-prefixed package-imports specifier (Node `imports` field, e.g.
272
+ + // octane's `#octane/dist/signal-actions/graph`). Resolved through the
273
+ + // importer's own package.json — the bare-npm branches below reject it.
274
+ + if (spec.startsWith('#')) {
275
+ + const importsOut = resolvePackageImportsSpecifier(spec, importerPath, projectRoot, verbose);
276
+ + if (importsOut) {
277
+ + if (httpOriginSafe) {
278
+ + return `${prefix}${httpOriginSafe}${importsOut}${suffix}`;
279
+ + }
280
+ + return `${prefix}${importsOut}${suffix}`;
281
+ + }
282
+ + return `${prefix}${spec}${suffix}`;
283
+ + }
284
+ spec = normalizeNativeScriptCoreSpecifier(spec);
285
+ // Pull `/@fs/<abs-path>` URLs back into the `/ns/m/` pipeline so they
286
+ // hit our CJS/UMD-wrapping handler. Vite emits `/@fs/...` for any
287
+ @@ -253,11 +352,29 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
174
288
  }
175
289
  return `${prefix}${rewritten}${suffix}`;
176
290
  }
@@ -1,8 +1,8 @@
1
1
  diff --git a/dist/cjs/runtime.cjs b/dist/cjs/runtime.cjs
2
- index ea7eb4c079294af879830a9490a29d6e9544426c..585ec412ec6c0cca419e031411df605721e4b155 100644
2
+ index a035f05..9912e51 100644
3
3
  --- a/dist/cjs/runtime.cjs
4
4
  +++ b/dist/cjs/runtime.cjs
5
- @@ -364,6 +364,7 @@ var import_stream_protocol = require("./stream-protocol.cjs");
5
+ @@ -365,6 +365,7 @@ var import_stream_protocol = require("./stream-protocol.cjs");
6
6
  var import_renderer_bridge = require("./renderer-bridge.cjs");
7
7
  var import_context_identity = require("./context-identity.cjs");
8
8
  var import_native_read_client = require("./signals/native-read-client.cjs");
@@ -10,7 +10,7 @@ index ea7eb4c079294af879830a9490a29d6e9544426c..585ec412ec6c0cca419e031411df6057
10
10
  var import_native_read_collector = require("./signals/native-read-collector.cjs");
11
11
  var import_native_read_retry = require("./signals/native-read-retry.cjs");
12
12
  var import_transition_state = require("./signals/transition-state.cjs");
13
- @@ -8099,6 +8100,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
13
+ @@ -8525,6 +8526,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
14
14
  }
15
15
  return cell.nativeValue;
16
16
  }
@@ -19,7 +19,7 @@ index ea7eb4c079294af879830a9490a29d6e9544426c..585ec412ec6c0cca419e031411df6057
19
19
  const s = readStateHook(initial, slot, arguments.length === 1);
20
20
  return [s.value, s.setter];
21
21
  diff --git a/dist/cjs/signals/client.cjs b/dist/cjs/signals/client.cjs
22
- index 28e28444192dee7af64351cfe02d5dde96658832..af40518defca21eb88707eb76bb6fe10c1d266e7 100644
22
+ index 28e2844..af40518 100644
23
23
  --- a/dist/cjs/signals/client.cjs
24
24
  +++ b/dist/cjs/signals/client.cjs
25
25
  @@ -23,13 +23,13 @@ __export(client_exports, {
@@ -27,26 +27,33 @@ index 28e28444192dee7af64351cfe02d5dde96658832..af40518defca21eb88707eb76bb6fe10
27
27
  module.exports = __toCommonJS(client_exports);
28
28
  __reExport(client_exports, require("./index.cjs"), module.exports);
29
29
  -var import_runtime = require("../runtime.cjs");
30
- var import_engine = require("./engine.cjs");
31
- +var import_local_hook = require("./local-hook.cjs");
32
- function disposeLocalSignal(cell) {
33
- cell.scope.dispose();
34
- }
35
- function useSignal$(initial, slot) {
30
+ -var import_engine = require("./engine.cjs");
31
+ -function disposeLocalSignal(cell) {
32
+ - cell.scope.dispose();
33
+ -}
34
+ -function useSignal$(initial, slot) {
36
35
  - const cell = (0, import_runtime.nativeLocalHook)(
36
+ +var import_engine = require("./engine.cjs");
37
+ +var import_local_hook = require("./local-hook.cjs");
38
+ +function disposeLocalSignal(cell) {
39
+ + cell.scope.dispose();
40
+ +}
41
+ +function useSignal$(initial, slot) {
37
42
  + const cell = (0, import_local_hook.localSignalHook)(
38
43
  "useSignal$",
39
44
  () => {
40
45
  const value = typeof initial === "function" ? initial() : initial;
41
46
  diff --git a/dist/cjs/signals/document-owner.cjs b/dist/cjs/signals/document-owner.cjs
42
- index b133523be49ca945a3f6e0f776fc0e08c4a3442f..035e04dd8e0125589143f46adcf41f0646103739 100644
47
+ index dbfcce2..ec264d5 100644
43
48
  --- a/dist/cjs/signals/document-owner.cjs
44
49
  +++ b/dist/cjs/signals/document-owner.cjs
45
- @@ -54,7 +54,9 @@ function enableSignalDocument(abi = 1) {
46
- if (defaultInstalled)
47
- return;
50
+ @@ -52,9 +52,9 @@ function enableSignalDocument(abi = 1) {
51
+ if (defaultInstalled) return;
48
52
  defaultInstalled = true;
49
- - (0, import_owner_context.installDefaultSignalOwner)(() => typeof document === "undefined" ? null : documentSignalOwner(document));
53
+ signalOwnerFrame = { enter: import_owner_context.enterSynchronousSignalOwner, restore: import_owner_context.restoreSynchronousSignalOwner };
54
+ - (0, import_owner_context.installDefaultSignalOwner)(
55
+ - () => typeof document === "undefined" ? null : documentSignalOwner(document)
56
+ - );
50
57
  + if (typeof document === "undefined")
51
58
  + return;
52
59
  + (0, import_owner_context.installDefaultSignalOwner)(() => documentSignalOwner(document));
@@ -54,10 +61,10 @@ index b133523be49ca945a3f6e0f776fc0e08c4a3442f..035e04dd8e0125589143f46adcf41f06
54
61
  function installStreamedSignalOwnerActivator(activate) {
55
62
  if (streamedSignalOwnerActivator !== void 0) {
56
63
  diff --git a/dist/cjs/signals/facade.cjs b/dist/cjs/signals/facade.cjs
57
- index 1c2d920240cb347656680620727c163c0140f3fd..aa9d0a319b3e5947a26fc6c0559ca41821eb7ebf 100644
64
+ index 6b6d10a..917422a 100644
58
65
  --- a/dist/cjs/signals/facade.cjs
59
66
  +++ b/dist/cjs/signals/facade.cjs
60
- @@ -370,7 +370,7 @@ class Descriptor {
67
+ @@ -338,7 +338,7 @@ class Descriptor {
61
68
  }
62
69
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
63
70
  reader() {
@@ -67,7 +74,7 @@ index 1c2d920240cb347656680620727c163c0140f3fd..aa9d0a319b3e5947a26fc6c0559ca418
67
74
  [import_types.SIGNAL_OWNER_RESOLVE](owner) {
68
75
  requireSite(this.site);
69
76
  diff --git a/dist/cjs/signals/index.cjs b/dist/cjs/signals/index.cjs
70
- index d8ae26b6cba9b90c2e9d28894776264b248c2646..25c4cbba1cc5138d98bf35de72847e53d7c30087 100644
77
+ index 4b2efde..a487b50 100644
71
78
  --- a/dist/cjs/signals/index.cjs
72
79
  +++ b/dist/cjs/signals/index.cjs
73
80
  @@ -35,6 +35,7 @@ __export(signals_exports, {
@@ -86,7 +93,7 @@ index d8ae26b6cba9b90c2e9d28894776264b248c2646..25c4cbba1cc5138d98bf35de72847e53
86
93
  var import_requests = require("./requests.cjs");
87
94
  var import_actions = require("./actions.cjs");
88
95
  var import_derived_facade = require("./derived-facade.cjs");
89
- @@ -96,6 +98,7 @@ var import_types = require("./types.cjs");
96
+ @@ -97,6 +99,7 @@ var import_types = require("./types.cjs");
90
97
  __derivedAt,
91
98
  __derivedScalarAt,
92
99
  __enableSignalDocument,
@@ -96,7 +103,7 @@ index d8ae26b6cba9b90c2e9d28894776264b248c2646..25c4cbba1cc5138d98bf35de72847e53
96
103
  __signalAt,
97
104
  diff --git a/dist/cjs/signals/local-hook.cjs b/dist/cjs/signals/local-hook.cjs
98
105
  new file mode 100644
99
- index 0000000000000000000000000000000000000000..4858595ce50e97284f18daa94c3b5ce6ab041dd4
106
+ index 0000000..4858595
100
107
  --- /dev/null
101
108
  +++ b/dist/cjs/signals/local-hook.cjs
102
109
  @@ -0,0 +1,44 @@
@@ -146,7 +153,7 @@ index 0000000000000000000000000000000000000000..4858595ce50e97284f18daa94c3b5ce6
146
153
  +});
147
154
  diff --git a/dist/cjs/signals/universal-owner.cjs b/dist/cjs/signals/universal-owner.cjs
148
155
  new file mode 100644
149
- index 0000000000000000000000000000000000000000..00c323a8bd4453d566dbd002ab1222f03def2760
156
+ index 0000000..00c323a
150
157
  --- /dev/null
151
158
  +++ b/dist/cjs/signals/universal-owner.cjs
152
159
  @@ -0,0 +1,46 @@
@@ -197,10 +204,10 @@ index 0000000000000000000000000000000000000000..00c323a8bd4453d566dbd002ab1222f0
197
204
  + universalSignalDocument
198
205
  +});
199
206
  diff --git a/dist/compiler/compile.js b/dist/compiler/compile.js
200
- index 536ce597..0d60ff8e 100644
207
+ index b891c6a..c736d3c 100644
201
208
  --- a/dist/compiler/compile.js
202
209
  +++ b/dist/compiler/compile.js
203
- @@ -2494,7 +2494,7 @@ function classifyViewTransitionOwnership(astBody, production, ownComponents) {
210
+ @@ -2493,7 +2493,7 @@ function classifyViewTransitionOwnership(astBody, production, ownComponents) {
204
211
 
205
212
  function hookRuntimeModulesForCompile(options, universalUnits = []) {
206
213
  - const modules = new Set(options?.__hookRuntimeModules || []);
@@ -213,7 +220,7 @@ index 536ce597..0d60ff8e 100644
213
220
  + modules.add('octane/signals/client');
214
221
  + modules.add('octane/signals/server');
215
222
  + }
216
- @@ -11051,6 +11051,11 @@ function compileInternal(
223
+ @@ -11087,6 +11087,11 @@ function compileInternal(
217
224
  - universalRuntime: undefined,
218
225
  - rendererBoundaries: undefined,
219
226
  - rendererRegistry: undefined,
@@ -231,7 +238,7 @@ index 536ce597..0d60ff8e 100644
231
238
  + __hookRuntimeModules: [...(options?.__hookRuntimeModules || []), renderer.module],
232
239
  + __runtimeImportRoutes: [
233
240
  + ...(options?.__runtimeImportRoutes ?? []),
234
- @@ -11310,6 +11315,7 @@ function compileInternal(
241
+ @@ -11346,6 +11351,7 @@ function compileInternal(
235
242
  - nativeReads: options?.nativeReads === true,
236
243
  - opaqueSignalHandles:
237
244
  - options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
@@ -245,7 +252,7 @@ index 536ce597..0d60ff8e 100644
245
252
  + nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
246
253
  + signalHookSites: domSignalTarget(options),
247
254
  + // A split Hydrate query module is invoked as the existing server-rendered
248
- @@ -12778,6 +12784,7 @@ function compileServer(
255
+ @@ -12814,6 +12820,7 @@ function compileServer(
249
256
  - nativeReads: options?.nativeReads === true,
250
257
  - opaqueSignalHandles:
251
258
  - options?.opaqueSignalHandles === true || options?.__signalModuleImport === true,
@@ -259,7 +266,7 @@ index 536ce597..0d60ff8e 100644
259
266
  + nativeModuleStyles: options?.nativeReads === true && hasModuleStyleMaps(ast.body),
260
267
  + signalHookSites: domSignalTarget(options),
261
268
  + hmr: false, // SSR never hot-swaps in place; client/server production slot shapes stay aligned
262
- @@ -20073,7 +20080,7 @@ function slotKeyedHookName(n, ctx) {
269
+ @@ -20130,7 +20137,7 @@ function slotKeyedHookName(n, ctx) {
263
270
  - ctx.foreignImportLocals?.has(local) === true;
264
271
  - if (
265
272
  - imported !== undefined &&
@@ -274,7 +281,7 @@ index 536ce597..0d60ff8e 100644
274
281
  + )
275
282
  + return imported;
276
283
  + if (!shadowsImport && HOOK_NAMES.has(local)) return local;
277
- @@ -20083,7 +20090,7 @@ function slotKeyedHookName(n, ctx) {
284
+ @@ -20140,7 +20147,7 @@ function slotKeyedHookName(n, ctx) {
278
285
  - const imported = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
279
286
  - if (
280
287
  - imported !== undefined &&
@@ -289,7 +296,7 @@ index 536ce597..0d60ff8e 100644
289
296
  + ) {
290
297
  + return imported;
291
298
  + }
292
- @@ -20939,7 +20946,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
299
+ @@ -20996,7 +21003,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
293
300
  - // enforced by rejectHookInJsLoop.
294
301
  - const isBuiltin =
295
302
  - (HOOK_NAMES.has(name) ||
@@ -304,7 +311,7 @@ index 536ce597..0d60ff8e 100644
304
311
  + hookRuntimeImportedName !== undefined &&
305
312
  + NATIVE_SIGNAL_HOOK_NAMES.has(name))) &&
306
313
  + (generated ||
307
- @@ -21070,7 +21077,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
314
+ @@ -21127,7 +21134,7 @@ function rewriteHookCalls(node, ctx, componentName, localRoot = false) {
308
315
  - ) {
309
316
  - const name = n._octaneImportedHook ?? n._octaneHookRuntimeImportedHook;
310
317
  - const isBuiltin =
@@ -320,7 +327,7 @@ index 536ce597..0d60ff8e 100644
320
327
  + if (isBuiltin || isServerUse) {
321
328
  + if (isBuiltin) {
322
329
  diff --git a/dist/compiler/native-read-diagnostics.js b/dist/compiler/native-read-diagnostics.js
323
- index f783b405..60c88e48 100644
330
+ index 89c9b5a..3baf9e9 100644
324
331
  --- a/dist/compiler/native-read-diagnostics.js
325
332
  +++ b/dist/compiler/native-read-diagnostics.js
326
333
  @@ -100,9 +100,12 @@ export function assertNativeReadOptions(options) {
@@ -367,7 +374,7 @@ index f783b405..60c88e48 100644
367
374
  + return [
368
375
  + nativeReadDiagnostic(
369
376
  diff --git a/dist/compiler/slot-hooks.js b/dist/compiler/slot-hooks.js
370
- index 90848a65..474c2bb5 100644
377
+ index 90848a6..474c2bb 100644
371
378
  --- a/dist/compiler/slot-hooks.js
372
379
  +++ b/dist/compiler/slot-hooks.js
373
380
  @@ -1034,12 +1034,12 @@ function walk(node, owner, st) {
@@ -446,18 +453,18 @@ index 90848a65..474c2bb5 100644
446
453
  + let specifiers = signalHelperImports.get(request);
447
454
  + if (specifiers === undefined) signalHelperImports.set(request, (specifiers = []));
448
455
  diff --git a/dist/node/runtime.js b/dist/node/runtime.js
449
- index 65a87a5f6f63e8fde886c3ed12d3057668b3a2f3..2fd59e94545f2b566234f3957e3bb89bbe7abf78 100644
456
+ index 927d060..cef6b5b 100644
450
457
  --- a/dist/node/runtime.js
451
458
  +++ b/dist/node/runtime.js
452
- @@ -171,6 +171,7 @@ import {
453
- import { isRendererContext, registerClientRendererBridge } from "./renderer-bridge.js";
454
- import { defineRemovedContextMembers, registerContext } from "./context-identity.js";
455
- import { createNativeReadDriver } from "./signals/native-read-client.js";
459
+ @@ -185,6 +185,7 @@ import {
460
+ createNativeReadDriver,
461
+ rebaseNativeRead
462
+ } from "./signals/native-read-client.js";
456
463
  +import { registerLocalSignalHook } from "./signals/local-hook.js";
457
464
  import {
458
465
  validateNativeReadWitness
459
466
  } from "./signals/native-read-collector.js";
460
- @@ -7956,6 +7957,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
467
+ @@ -8398,6 +8399,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
461
468
  }
462
469
  return cell.nativeValue;
463
470
  }
@@ -466,43 +473,49 @@ index 65a87a5f6f63e8fde886c3ed12d3057668b3a2f3..2fd59e94545f2b566234f3957e3bb89b
466
473
  const s = readStateHook(initial, slot, arguments.length === 1);
467
474
  return [s.value, s.setter];
468
475
  diff --git a/dist/node/signals/client.js b/dist/node/signals/client.js
469
- index 21a39c3ce9a28d2095e276fd647fd795e939a0bf..3f85700b57cbc3084c2df776ab3e6b5365f091a8 100644
476
+ index 21a39c3..3f85700 100644
470
477
  --- a/dist/node/signals/client.js
471
478
  +++ b/dist/node/signals/client.js
472
479
  @@ -1,11 +1,11 @@
473
480
  export * from "./index.js";
474
481
  -import { nativeLocalHook } from "../runtime.js";
475
- import { createLocalScope } from "./engine.js";
476
- +import { localSignalHook } from "./local-hook.js";
477
- function disposeLocalSignal(cell) {
478
- cell.scope.dispose();
479
- }
480
- function useSignal$(initial, slot) {
482
+ -import { createLocalScope } from "./engine.js";
483
+ -function disposeLocalSignal(cell) {
484
+ - cell.scope.dispose();
485
+ -}
486
+ -function useSignal$(initial, slot) {
481
487
  - const cell = nativeLocalHook(
488
+ +import { createLocalScope } from "./engine.js";
489
+ +import { localSignalHook } from "./local-hook.js";
490
+ +function disposeLocalSignal(cell) {
491
+ + cell.scope.dispose();
492
+ +}
493
+ +function useSignal$(initial, slot) {
482
494
  + const cell = localSignalHook(
483
495
  "useSignal$",
484
496
  () => {
485
497
  const value = typeof initial === "function" ? initial() : initial;
486
498
  diff --git a/dist/node/signals/document-owner.js b/dist/node/signals/document-owner.js
487
- index 6fae4a2b7042161c0d21452004cea4b0ee87d138..9df7c9c5e8539b797b95d562cf7bca5104b857d3 100644
499
+ index 35db8d5..aeeaabc 100644
488
500
  --- a/dist/node/signals/document-owner.js
489
501
  +++ b/dist/node/signals/document-owner.js
490
- @@ -27,7 +27,9 @@ function enableSignalDocument(abi = 1) {
491
- if (defaultInstalled)
492
- return;
502
+ @@ -28,9 +28,8 @@ function enableSignalDocument(abi = 1) {
503
+ if (defaultInstalled) return;
493
504
  defaultInstalled = true;
494
- - installDefaultSignalOwner(() => typeof document === "undefined" ? null : documentSignalOwner(document));
495
- + if (typeof document === "undefined")
496
- + return;
505
+ signalOwnerFrame = { enter: enterSynchronousSignalOwner, restore: restoreSynchronousSignalOwner };
506
+ - installDefaultSignalOwner(
507
+ - () => typeof document === "undefined" ? null : documentSignalOwner(document)
508
+ - );
509
+ + if (typeof document === "undefined") return;
497
510
  + installDefaultSignalOwner(() => documentSignalOwner(document));
498
511
  }
499
512
  function installStreamedSignalOwnerActivator(activate) {
500
513
  if (streamedSignalOwnerActivator !== void 0) {
501
514
  diff --git a/dist/node/signals/facade.js b/dist/node/signals/facade.js
502
- index d9786d6899e819ea40589116d9ef946a4c4df4a0..efb80b9186d590dc4ca29bd9f8a77eeb2508e2e6 100644
515
+ index 11ec297..575233b 100644
503
516
  --- a/dist/node/signals/facade.js
504
517
  +++ b/dist/node/signals/facade.js
505
- @@ -325,7 +325,7 @@ class Descriptor {
518
+ @@ -326,7 +326,7 @@ class Descriptor {
506
519
  }
507
520
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
508
521
  reader() {
@@ -512,7 +525,7 @@ index d9786d6899e819ea40589116d9ef946a4c4df4a0..efb80b9186d590dc4ca29bd9f8a77eeb
512
525
  [SIGNAL_OWNER_RESOLVE](owner) {
513
526
  requireSite(this.site);
514
527
  diff --git a/dist/node/signals/index.js b/dist/node/signals/index.js
515
- index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa13aec082c 100644
528
+ index d657064..01a81cf 100644
516
529
  --- a/dist/node/signals/index.js
517
530
  +++ b/dist/node/signals/index.js
518
531
  @@ -1,6 +1,7 @@
@@ -523,7 +536,7 @@ index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa1
523
536
  import { createResource, query } from "./requests.js";
524
537
  import { ActionUncertainError, action$, isActionUncertain, optimistic$ } from "./actions.js";
525
538
  import { __derivedAt, derived$ } from "./derived-facade.js";
526
- @@ -61,6 +62,7 @@ export {
539
+ @@ -60,6 +61,7 @@ export {
527
540
  __derivedAt,
528
541
  __derivedScalarAt,
529
542
  enableSignalDocument as __enableSignalDocument,
@@ -533,7 +546,7 @@ index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa1
533
546
  __signalAt,
534
547
  diff --git a/dist/node/signals/local-hook.js b/dist/node/signals/local-hook.js
535
548
  new file mode 100644
536
- index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f09935f9ce
549
+ index 0000000..77c63f5
537
550
  --- /dev/null
538
551
  +++ b/dist/node/signals/local-hook.js
539
552
  @@ -0,0 +1,19 @@
@@ -558,7 +571,7 @@ index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f0
558
571
  +};
559
572
  diff --git a/dist/node/signals/universal-owner.js b/dist/node/signals/universal-owner.js
560
573
  new file mode 100644
561
- index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b389b4d99b
574
+ index 0000000..ff5eb43
562
575
  --- /dev/null
563
576
  +++ b/dist/node/signals/universal-owner.js
564
577
  @@ -0,0 +1,20 @@
@@ -583,10 +596,10 @@ index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b3
583
596
  + universalSignalDocument
584
597
  +};
585
598
  diff --git a/dist/node/universal-core.js b/dist/node/universal-core.js
586
- index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb41857682f90fb66 100644
599
+ index aa045ee..38d6b2b 100644
587
600
  --- a/dist/node/universal-core.js
588
601
  +++ b/dist/node/universal-core.js
589
- @@ -16,6 +16,10 @@ import {
602
+ @@ -17,6 +17,10 @@ import {
590
603
  __profileTrackComponent
591
604
  } from "./profiling.js";
592
605
  import { getRendererHostFlusher } from "./renderer-bridge.js";
@@ -597,7 +610,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
597
610
  import { resolveLazyDefaultProps } from "./shared-value-helpers.js";
598
611
  import {
599
612
  deactivateEffectEventCells,
600
- @@ -488,6 +492,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
613
+ @@ -495,6 +499,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
601
614
  hasKey: key !== NO_KEY || normalized.hasKey
602
615
  };
603
616
  }
@@ -731,7 +744,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
731
744
  function universalChildren(renderer, render) {
732
745
  assertRendererId(renderer, "universalChildren renderer");
733
746
  if (typeof render !== "function") throw new TypeError("universalChildren expected a function.");
734
- @@ -856,6 +987,7 @@ function draftOwner(record, parent, replayPath) {
747
+ @@ -863,6 +994,7 @@ function draftOwner(record, parent, replayPath) {
735
748
  boundaryThenable: record.boundaryThenable,
736
749
  isBoundary: record.isBoundary,
737
750
  canHandleSuspense: record.canHandleSuspense,
@@ -739,7 +752,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
739
752
  visibility: parent?.visibility ?? record.visibility,
740
753
  contextStable: null
741
754
  };
742
- @@ -1026,6 +1158,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
755
+ @@ -1033,6 +1165,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
743
756
  owner.contextStable = null;
744
757
  owner.needsRender = false;
745
758
  owner.implicitSlot = 0;
@@ -747,29 +760,33 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
747
760
  const previousOwner = CURRENT_OWNER;
748
761
  const previousAttemptOwner = attempt.owner;
749
762
  CURRENT_OWNER = owner;
750
- @@ -1037,13 +1170,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
763
+ @@ -1044,13 +1177,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
751
764
  const profileFrame = typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ && component !== null ? __profileBeginRender(owner.record, component, owner.record.mounted) : null;
752
765
  let didThrow = false;
753
766
  let thrown;
767
+ - try {
768
+ - output = build();
769
+ - } catch (error) {
770
+ - didThrow = true;
771
+ - thrown = error;
772
+ - throw error;
773
+ - } finally {
754
774
  + const signalOwner = universalSignalOwner(owner.record);
755
775
  + const previousReadObserver = setNativeReadObserver(observeUniversalSignalRead);
756
776
  + const writeGuard = beginNativeWriteGuard();
757
- try {
758
- - output = build();
777
+ + try {
759
778
  + output = runWithSignalOwner(signalOwner, build);
760
- } catch (error) {
761
- didThrow = true;
762
- - thrown = error;
763
- - throw error;
779
+ + } catch (error) {
780
+ + didThrow = true;
764
781
  + thrown = isThenable(error) ? new UniversalSuspense(error) : error;
765
782
  + throw thrown;
766
- } finally {
783
+ + } finally {
767
784
  + endNativeWriteGuard(writeGuard);
768
785
  + setNativeReadObserver(previousReadObserver);
769
786
  if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) {
770
787
  __profileEndRender(profileFrame, didThrow, thrown);
771
788
  }
772
- @@ -1210,6 +1348,8 @@ function disposeUncommittedDraft(owner) {
789
+ @@ -1214,6 +1352,8 @@ function disposeUncommittedDraft(owner) {
773
790
  owner.record.componentProps = null;
774
791
  owner.record.range = null;
775
792
  owner.record.updates.clear();
@@ -778,7 +795,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
778
795
  for (const hook of owner.hooks.values()) {
779
796
  if (hook.kind === "effect-event") hook.cell.active = false;
780
797
  }
781
- @@ -3044,6 +3184,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
798
+ @@ -3048,6 +3188,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
782
799
  owner.componentProps = draftOwner2.componentProps;
783
800
  owner.componentRevision = draftOwner2.componentRevision;
784
801
  owner.hooks = draftOwner2.hooks;
@@ -786,7 +803,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
786
803
  for (const [slot, applied] of draftOwner2.appliedUpdates) {
787
804
  const queue = owner.updates.get(slot);
788
805
  if (queue !== applied.queue || applied.lane) continue;
789
- @@ -3510,6 +3651,86 @@ function scheduleOwner(owner, slot) {
806
+ @@ -3514,6 +3655,86 @@ function scheduleOwner(owner, slot) {
790
807
  }
791
808
  owner.root.scheduleOwned(owner);
792
809
  }
@@ -873,7 +890,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
873
890
  function currentDraftOwner() {
874
891
  currentAttempt();
875
892
  const owner = activateLazyLeafOwner();
876
- @@ -4624,15 +4845,35 @@ function use(usable) {
893
+ @@ -4628,15 +4849,35 @@ function use(usable) {
877
894
  function useImperativeHandle(ref, create, deps, slot) {
878
895
  useLayoutEffect(
879
896
  () => {
@@ -883,6 +900,9 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
883
900
  - return () => {
884
901
  - if (typeof ref === "function") ref(null);
885
902
  - else if (ref !== null) ref.current = null;
903
+ - };
904
+ - },
905
+ - deps,
886
906
  + const cleanups = [];
887
907
  + let value;
888
908
  + let initialized = false;
@@ -903,32 +923,32 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
903
923
  + target.current = value;
904
924
  + cleanups.push(() => { target.current = null; });
905
925
  + }
906
- };
926
+ + };
907
927
  + try {
908
928
  + attach(ref);
909
929
  + } catch (error) {
910
930
  + try { runCommitTasks(cleanups); } finally { throw error; }
911
931
  + }
912
932
  + return () => runCommitTasks(cleanups);
913
- },
914
- - deps,
933
+ + },
915
934
  + deps == null ? deps : [...deps, ref],
916
935
  slot
917
936
  );
918
937
  }
919
- @@ -5627,9 +5868,9 @@ class UniversalRootImpl {
938
+ @@ -5631,9 +5872,9 @@ class UniversalRootImpl {
920
939
  }
921
940
  let result;
922
941
  try {
923
942
  - result = event.handler(payload);
924
- + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
925
- } catch (error) {
943
+ - } catch (error) {
926
944
  - if (!routeUniversalOwnerError(event.owner, error)) throw error;
945
+ + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
946
+ + } catch (error) {
927
947
  + if (!routeUniversalOwnerError(event.owner, error) && !reportUniversalUncaughtError(this, error)) throw error;
928
948
  }
929
949
  return result;
930
950
  }
931
- @@ -6200,6 +6441,8 @@ class UniversalRootImpl {
951
+ @@ -6204,6 +6445,8 @@ class UniversalRootImpl {
932
952
  draft.record.componentProps = null;
933
953
  draft.record.range = null;
934
954
  draft.record.updates.clear();
@@ -937,7 +957,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
937
957
  for (const hook of draft.hooks.values()) {
938
958
  if (hook.kind === "effect-event") hook.cell.active = false;
939
959
  }
940
- @@ -6717,6 +6960,7 @@ class UniversalRootImpl {
960
+ @@ -6721,6 +6964,7 @@ class UniversalRootImpl {
941
961
  record.componentRevision = draft.componentRevision;
942
962
  record.parent = draft.parent?.record ?? null;
943
963
  record.hooks = draft.hooks;
@@ -945,7 +965,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
945
965
  record.effectOrder = [...draft.seenEffects];
946
966
  for (let index = 0; index < draft.seenEffects.length; index++) {
947
967
  draft.seenEffects[index].previous = null;
948
- @@ -8365,6 +8609,8 @@ class UniversalRootImpl {
968
+ @@ -8369,6 +8613,8 @@ class UniversalRootImpl {
949
969
  owner.componentProps = null;
950
970
  owner.range = null;
951
971
  owner.updates.clear();
@@ -954,7 +974,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
954
974
  }
955
975
  for (const draft of draftOwnersParentFirst) {
956
976
  const record = draft.record;
957
- @@ -8374,6 +8620,7 @@ class UniversalRootImpl {
977
+ @@ -8378,6 +8624,7 @@ class UniversalRootImpl {
958
978
  record.parent = draft.parent?.record ?? null;
959
979
  }
960
980
  record.hooks = draft.hooks;
@@ -962,7 +982,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
962
982
  record.effectOrder = [...draft.seenEffects];
963
983
  for (let index = 0; index < draft.seenEffects.length; index++) {
964
984
  draft.seenEffects[index].previous = null;
965
- @@ -8885,6 +9132,8 @@ class UniversalRootImpl {
985
+ @@ -8889,6 +9136,8 @@ class UniversalRootImpl {
966
986
  owner.componentProps = null;
967
987
  owner.range = null;
968
988
  owner.updates.clear();
@@ -971,7 +991,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
971
991
  }
972
992
  const deactivatedRegionCells = /* @__PURE__ */ new Set();
973
993
  for (const bridge of regionBridges) {
974
- @@ -10101,6 +10350,7 @@ function createObjectDriver(renderer = "object") {
994
+ @@ -10105,6 +10354,7 @@ function createObjectDriver(renderer = "object") {
975
995
  };
976
996
  }
977
997
  export {
@@ -980,24 +1000,27 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
980
1000
  UNIVERSAL_HMR,
981
1001
  UNIVERSAL_TRANSPORT_PROTOCOL_VERSION,
982
1002
  diff --git a/dist/node/universal-native.js b/dist/node/universal-native.js
983
- index 55ac9b640dc8bbfd977bb2cbe0b7993c8ddb425a..3ff9a5750fb59cd91b63299aec3a3e0c030b4579 100644
1003
+ index 55ac9b6..399633e 100644
984
1004
  --- a/dist/node/universal-native.js
985
1005
  +++ b/dist/node/universal-native.js
986
1006
  @@ -6,9 +6,12 @@ import {
987
1007
  import {
988
1008
  universalContext
989
1009
  } from "./universal-core.js";
1010
+ -import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1011
+ -import { CONTEXT_TAG } from "./runtime-tags.js";
1012
+ -import { registerContext } from "./context-identity.js";
990
1013
  +export { Children } from "./universal-core.js";
991
1014
  +import { enableUniversalSignalDocument } from "./signals/universal-owner.js";
992
- import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
993
- import { CONTEXT_TAG } from "./runtime-tags.js";
994
- import { registerContext } from "./context-identity.js";
1015
+ +import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1016
+ +import { CONTEXT_TAG } from "./runtime-tags.js";
1017
+ +import { registerContext } from "./context-identity.js";
995
1018
  +enableUniversalSignalDocument();
996
1019
  // @__NO_SIDE_EFFECTS__
997
1020
  function createContext(defaultValue) {
998
1021
  const context = ((props, scope) => scope === void 0 ? universalContext(context, props.value, props.children) : renderRendererContextProvider(context, props, scope));
999
1022
  diff --git a/dist/node/universal.js b/dist/node/universal.js
1000
- index 6427a0190c072e7e4629c379e42bedc03669dc6e..8049b7880824de607157091004a46c9d33a23484 100644
1023
+ index 6427a01..8049b78 100644
1001
1024
  --- a/dist/node/universal.js
1002
1025
  +++ b/dist/node/universal.js
1003
1026
  @@ -8,6 +8,9 @@ import {
@@ -1011,18 +1034,18 @@ index 6427a0190c072e7e4629c379e42bedc03669dc6e..8049b7880824de607157091004a46c9d
1011
1034
  createContext,
1012
1035
  createSubSlot,
1013
1036
  diff --git a/dist/runtime.js b/dist/runtime.js
1014
- index 614f28d71730aa84dc8dd2ae1d712f1b45e8a6f9..f9988db75999f905a389a3a8eea73573bcc15c84 100644
1037
+ index 67ace09..ef61a91 100644
1015
1038
  --- a/dist/runtime.js
1016
1039
  +++ b/dist/runtime.js
1017
- @@ -170,6 +170,7 @@ import {
1018
- import { isRendererContext, registerClientRendererBridge } from "./renderer-bridge.js";
1019
- import { defineRemovedContextMembers, registerContext } from "./context-identity.js";
1020
- import { createNativeReadDriver } from "./signals/native-read-client.js";
1040
+ @@ -184,6 +184,7 @@ import {
1041
+ createNativeReadDriver,
1042
+ rebaseNativeRead
1043
+ } from "./signals/native-read-client.js";
1021
1044
  +import { registerLocalSignalHook } from "./signals/local-hook.js";
1022
1045
  import {
1023
1046
  validateNativeReadWitness
1024
1047
  } from "./signals/native-read-collector.js";
1025
- @@ -7955,6 +7956,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
1048
+ @@ -8397,6 +8398,7 @@ function nativeLocalHook(name, initialize, dispose, slot) {
1026
1049
  }
1027
1050
  return cell.nativeValue;
1028
1051
  }
@@ -1031,7 +1054,7 @@ index 614f28d71730aa84dc8dd2ae1d712f1b45e8a6f9..f9988db75999f905a389a3a8eea73573
1031
1054
  const s = readStateHook(initial, slot, arguments.length === 1);
1032
1055
  return [s.value, s.setter];
1033
1056
  diff --git a/dist/signals/client.d.ts b/dist/signals/client.d.ts
1034
- index 6388c2f98517884a13af720687fb81c1f18357be..f9e98624f159cccf02a379d79201751fc07694d8 100644
1057
+ index 6388c2f..f9e9862 100644
1035
1058
  --- a/dist/signals/client.d.ts
1036
1059
  +++ b/dist/signals/client.d.ts
1037
1060
  @@ -1,4 +1,4 @@
@@ -1041,43 +1064,49 @@ index 6388c2f98517884a13af720687fb81c1f18357be..f9e98624f159cccf02a379d79201751f
1041
1064
  import type { WritableSignal } from './types.js';
1042
1065
  /** A writable signal owned by this compiler-assigned component hook slot. */
1043
1066
  diff --git a/dist/signals/client.js b/dist/signals/client.js
1044
- index 21a39c3ce9a28d2095e276fd647fd795e939a0bf..3f85700b57cbc3084c2df776ab3e6b5365f091a8 100644
1067
+ index 21a39c3..3f85700 100644
1045
1068
  --- a/dist/signals/client.js
1046
1069
  +++ b/dist/signals/client.js
1047
1070
  @@ -1,11 +1,11 @@
1048
1071
  export * from "./index.js";
1049
1072
  -import { nativeLocalHook } from "../runtime.js";
1050
- import { createLocalScope } from "./engine.js";
1051
- +import { localSignalHook } from "./local-hook.js";
1052
- function disposeLocalSignal(cell) {
1053
- cell.scope.dispose();
1054
- }
1055
- function useSignal$(initial, slot) {
1073
+ -import { createLocalScope } from "./engine.js";
1074
+ -function disposeLocalSignal(cell) {
1075
+ - cell.scope.dispose();
1076
+ -}
1077
+ -function useSignal$(initial, slot) {
1056
1078
  - const cell = nativeLocalHook(
1079
+ +import { createLocalScope } from "./engine.js";
1080
+ +import { localSignalHook } from "./local-hook.js";
1081
+ +function disposeLocalSignal(cell) {
1082
+ + cell.scope.dispose();
1083
+ +}
1084
+ +function useSignal$(initial, slot) {
1057
1085
  + const cell = localSignalHook(
1058
1086
  "useSignal$",
1059
1087
  () => {
1060
1088
  const value = typeof initial === "function" ? initial() : initial;
1061
1089
  diff --git a/dist/signals/document-owner.js b/dist/signals/document-owner.js
1062
- index 56a7ac2713e73cc136b846ce26849d27dca65485..0422e096c511a49f7fb3ffc73ed5a02218f45465 100644
1090
+ index 4ad3aca..b2a5d0e 100644
1063
1091
  --- a/dist/signals/document-owner.js
1064
1092
  +++ b/dist/signals/document-owner.js
1065
- @@ -26,7 +26,9 @@ function enableSignalDocument(abi = 1) {
1066
- if (defaultInstalled)
1067
- return;
1093
+ @@ -27,9 +27,8 @@ function enableSignalDocument(abi = 1) {
1094
+ if (defaultInstalled) return;
1068
1095
  defaultInstalled = true;
1069
- - installDefaultSignalOwner(() => typeof document === "undefined" ? null : documentSignalOwner(document));
1070
- + if (typeof document === "undefined")
1071
- + return;
1096
+ signalOwnerFrame = { enter: enterSynchronousSignalOwner, restore: restoreSynchronousSignalOwner };
1097
+ - installDefaultSignalOwner(
1098
+ - () => typeof document === "undefined" ? null : documentSignalOwner(document)
1099
+ - );
1100
+ + if (typeof document === "undefined") return;
1072
1101
  + installDefaultSignalOwner(() => documentSignalOwner(document));
1073
1102
  }
1074
1103
  function installStreamedSignalOwnerActivator(activate) {
1075
1104
  if (streamedSignalOwnerActivator !== void 0) {
1076
1105
  diff --git a/dist/signals/facade.js b/dist/signals/facade.js
1077
- index 56b8f6f00dc8c313ced91a6cc5abc6a01bbd0b66..6aace062ae8ad61fa4090fdedced994c44e814eb 100644
1106
+ index 478c29d..b6b18b4 100644
1078
1107
  --- a/dist/signals/facade.js
1079
1108
  +++ b/dist/signals/facade.js
1080
- @@ -324,7 +324,7 @@ class Descriptor {
1109
+ @@ -325,7 +325,7 @@ class Descriptor {
1081
1110
  }
1082
1111
  /** The owner a use resolves for: its reader, or for a lexical handle its declaring owner. */
1083
1112
  reader() {
@@ -1087,7 +1116,7 @@ index 56b8f6f00dc8c313ced91a6cc5abc6a01bbd0b66..6aace062ae8ad61fa4090fdedced994c
1087
1116
  [SIGNAL_OWNER_RESOLVE](owner) {
1088
1117
  requireSite(this.site);
1089
1118
  diff --git a/dist/signals/index.d.ts b/dist/signals/index.d.ts
1090
- index 69733ffb205a61929a2a004296192ab411722385..ce5647edd39f281161aa0f338ce82b86e139a126 100644
1119
+ index ed08619..acccb75 100644
1091
1120
  --- a/dist/signals/index.d.ts
1092
1121
  +++ b/dist/signals/index.d.ts
1093
1122
  @@ -3,6 +3,7 @@ export { createScope } from './engine.js';
@@ -1099,7 +1128,7 @@ index 69733ffb205a61929a2a004296192ab411722385..ce5647edd39f281161aa0f338ce82b86
1099
1128
  export { ActionUncertainError, action$, isActionUncertain, optimistic$ } from './actions.js';
1100
1129
  export { __derivedAt, derived$ } from './derived-facade.js';
1101
1130
  diff --git a/dist/signals/index.js b/dist/signals/index.js
1102
- index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa13aec082c 100644
1131
+ index d657064..01a81cf 100644
1103
1132
  --- a/dist/signals/index.js
1104
1133
  +++ b/dist/signals/index.js
1105
1134
  @@ -1,6 +1,7 @@
@@ -1110,7 +1139,7 @@ index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa1
1110
1139
  import { createResource, query } from "./requests.js";
1111
1140
  import { ActionUncertainError, action$, isActionUncertain, optimistic$ } from "./actions.js";
1112
1141
  import { __derivedAt, derived$ } from "./derived-facade.js";
1113
- @@ -61,6 +62,7 @@ export {
1142
+ @@ -60,6 +61,7 @@ export {
1114
1143
  __derivedAt,
1115
1144
  __derivedScalarAt,
1116
1145
  enableSignalDocument as __enableSignalDocument,
@@ -1120,7 +1149,7 @@ index 33efa85de5a5784b920e648e222e0831e3cfae90..fab07861bbacadbc429883ff8d48baa1
1120
1149
  __signalAt,
1121
1150
  diff --git a/dist/signals/local-hook.d.ts b/dist/signals/local-hook.d.ts
1122
1151
  new file mode 100644
1123
- index 0000000000000000000000000000000000000000..d6c1770fc22b738e0e107b6616f60eaf676d853e
1152
+ index 0000000..d6c1770
1124
1153
  --- /dev/null
1125
1154
  +++ b/dist/signals/local-hook.d.ts
1126
1155
  @@ -0,0 +1,16 @@
@@ -1142,7 +1171,7 @@ index 0000000000000000000000000000000000000000..d6c1770fc22b738e0e107b6616f60eaf
1142
1171
  +export declare function localSignalHook<T>(name: string, initialize: () => T, dispose: (value: T) => void, slot?: symbol | number): T;
1143
1172
  diff --git a/dist/signals/local-hook.js b/dist/signals/local-hook.js
1144
1173
  new file mode 100644
1145
- index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f09935f9ce
1174
+ index 0000000..77c63f5
1146
1175
  --- /dev/null
1147
1176
  +++ b/dist/signals/local-hook.js
1148
1177
  @@ -0,0 +1,19 @@
@@ -1167,7 +1196,7 @@ index 0000000000000000000000000000000000000000..77c63f5e2d931eb8dbd384ae027ee0f0
1167
1196
  +};
1168
1197
  diff --git a/dist/signals/universal-owner.d.ts b/dist/signals/universal-owner.d.ts
1169
1198
  new file mode 100644
1170
- index 0000000000000000000000000000000000000000..0e57f3a79115c858355f863434c6e3423570067b
1199
+ index 0000000..0e57f3a
1171
1200
  --- /dev/null
1172
1201
  +++ b/dist/signals/universal-owner.d.ts
1173
1202
  @@ -0,0 +1,10 @@
@@ -1183,7 +1212,7 @@ index 0000000000000000000000000000000000000000..0e57f3a79115c858355f863434c6e342
1183
1212
  +export declare function enableUniversalSignalDocument(abi?: number): void;
1184
1213
  diff --git a/dist/signals/universal-owner.js b/dist/signals/universal-owner.js
1185
1214
  new file mode 100644
1186
- index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b389b4d99b
1215
+ index 0000000..ff5eb43
1187
1216
  --- /dev/null
1188
1217
  +++ b/dist/signals/universal-owner.js
1189
1218
  @@ -0,0 +1,20 @@
@@ -1208,7 +1237,7 @@ index 0000000000000000000000000000000000000000..ff5eb43e8f0ddcadbcf8e861f42788b3
1208
1237
  + universalSignalDocument
1209
1238
  +};
1210
1239
  diff --git a/dist/universal-core.d.ts b/dist/universal-core.d.ts
1211
- index ddf95b3ee39836940dab20bc2ac2ae2761e4dd82..3a6b744f17a726062562db075b165b1089d23678 100644
1240
+ index ddf95b3..3a6b744 100644
1212
1241
  --- a/dist/universal-core.d.ts
1213
1242
  +++ b/dist/universal-core.d.ts
1214
1243
  @@ -791,9 +791,8 @@ export declare function lazy<C extends UniversalComponent<any>>(load: () => Prom
@@ -1230,10 +1259,10 @@ index ddf95b3ee39836940dab20bc2ac2ae2761e4dd82..3a6b744f17a726062562db075b165b10
1230
1259
  +
1231
1260
  +export declare const Children: { toArray(children: UniversalRenderable): UniversalRenderable[]; map(children: UniversalRenderable, fn: (child: UniversalRenderable, index: number) => UniversalRenderable): UniversalRenderable[]; };
1232
1261
  diff --git a/dist/universal-core.js b/dist/universal-core.js
1233
- index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb41857682f90fb66 100644
1262
+ index aa045ee..38d6b2b 100644
1234
1263
  --- a/dist/universal-core.js
1235
1264
  +++ b/dist/universal-core.js
1236
- @@ -16,6 +16,10 @@ import {
1265
+ @@ -17,6 +17,10 @@ import {
1237
1266
  __profileTrackComponent
1238
1267
  } from "./profiling.js";
1239
1268
  import { getRendererHostFlusher } from "./renderer-bridge.js";
@@ -1244,7 +1273,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1244
1273
  import { resolveLazyDefaultProps } from "./shared-value-helpers.js";
1245
1274
  import {
1246
1275
  deactivateEffectEventCells,
1247
- @@ -488,6 +492,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
1276
+ @@ -495,6 +499,133 @@ function universalComponent(renderer, component, props = null, key = NO_KEY) {
1248
1277
  hasKey: key !== NO_KEY || normalized.hasKey
1249
1278
  };
1250
1279
  }
@@ -1378,7 +1407,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1378
1407
  function universalChildren(renderer, render) {
1379
1408
  assertRendererId(renderer, "universalChildren renderer");
1380
1409
  if (typeof render !== "function") throw new TypeError("universalChildren expected a function.");
1381
- @@ -856,6 +987,7 @@ function draftOwner(record, parent, replayPath) {
1410
+ @@ -863,6 +994,7 @@ function draftOwner(record, parent, replayPath) {
1382
1411
  boundaryThenable: record.boundaryThenable,
1383
1412
  isBoundary: record.isBoundary,
1384
1413
  canHandleSuspense: record.canHandleSuspense,
@@ -1386,7 +1415,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1386
1415
  visibility: parent?.visibility ?? record.visibility,
1387
1416
  contextStable: null
1388
1417
  };
1389
- @@ -1026,6 +1158,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1418
+ @@ -1033,6 +1165,7 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1390
1419
  owner.contextStable = null;
1391
1420
  owner.needsRender = false;
1392
1421
  owner.implicitSlot = 0;
@@ -1394,29 +1423,33 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1394
1423
  const previousOwner = CURRENT_OWNER;
1395
1424
  const previousAttemptOwner = attempt.owner;
1396
1425
  CURRENT_OWNER = owner;
1397
- @@ -1037,13 +1170,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1426
+ @@ -1044,13 +1177,18 @@ function executeOwner(owner, build, initialRenderCount = 0) {
1398
1427
  const profileFrame = typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ && component !== null ? __profileBeginRender(owner.record, component, owner.record.mounted) : null;
1399
1428
  let didThrow = false;
1400
1429
  let thrown;
1430
+ - try {
1431
+ - output = build();
1432
+ - } catch (error) {
1433
+ - didThrow = true;
1434
+ - thrown = error;
1435
+ - throw error;
1436
+ - } finally {
1401
1437
  + const signalOwner = universalSignalOwner(owner.record);
1402
1438
  + const previousReadObserver = setNativeReadObserver(observeUniversalSignalRead);
1403
1439
  + const writeGuard = beginNativeWriteGuard();
1404
- try {
1405
- - output = build();
1440
+ + try {
1406
1441
  + output = runWithSignalOwner(signalOwner, build);
1407
- } catch (error) {
1408
- didThrow = true;
1409
- - thrown = error;
1410
- - throw error;
1442
+ + } catch (error) {
1443
+ + didThrow = true;
1411
1444
  + thrown = isThenable(error) ? new UniversalSuspense(error) : error;
1412
1445
  + throw thrown;
1413
- } finally {
1446
+ + } finally {
1414
1447
  + endNativeWriteGuard(writeGuard);
1415
1448
  + setNativeReadObserver(previousReadObserver);
1416
1449
  if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) {
1417
1450
  __profileEndRender(profileFrame, didThrow, thrown);
1418
1451
  }
1419
- @@ -1210,6 +1348,8 @@ function disposeUncommittedDraft(owner) {
1452
+ @@ -1214,6 +1352,8 @@ function disposeUncommittedDraft(owner) {
1420
1453
  owner.record.componentProps = null;
1421
1454
  owner.record.range = null;
1422
1455
  owner.record.updates.clear();
@@ -1425,7 +1458,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1425
1458
  for (const hook of owner.hooks.values()) {
1426
1459
  if (hook.kind === "effect-event") hook.cell.active = false;
1427
1460
  }
1428
- @@ -3044,6 +3184,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
1461
+ @@ -3048,6 +3188,7 @@ function tryCreateCompactTemplateUpdateTransaction(root, blueprint, attempt, com
1429
1462
  owner.componentProps = draftOwner2.componentProps;
1430
1463
  owner.componentRevision = draftOwner2.componentRevision;
1431
1464
  owner.hooks = draftOwner2.hooks;
@@ -1433,7 +1466,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1433
1466
  for (const [slot, applied] of draftOwner2.appliedUpdates) {
1434
1467
  const queue = owner.updates.get(slot);
1435
1468
  if (queue !== applied.queue || applied.lane) continue;
1436
- @@ -3510,6 +3651,86 @@ function scheduleOwner(owner, slot) {
1469
+ @@ -3514,6 +3655,86 @@ function scheduleOwner(owner, slot) {
1437
1470
  }
1438
1471
  owner.root.scheduleOwned(owner);
1439
1472
  }
@@ -1520,7 +1553,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1520
1553
  function currentDraftOwner() {
1521
1554
  currentAttempt();
1522
1555
  const owner = activateLazyLeafOwner();
1523
- @@ -4624,15 +4845,35 @@ function use(usable) {
1556
+ @@ -4628,15 +4849,35 @@ function use(usable) {
1524
1557
  function useImperativeHandle(ref, create, deps, slot) {
1525
1558
  useLayoutEffect(
1526
1559
  () => {
@@ -1530,6 +1563,9 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1530
1563
  - return () => {
1531
1564
  - if (typeof ref === "function") ref(null);
1532
1565
  - else if (ref !== null) ref.current = null;
1566
+ - };
1567
+ - },
1568
+ - deps,
1533
1569
  + const cleanups = [];
1534
1570
  + let value;
1535
1571
  + let initialized = false;
@@ -1550,32 +1586,32 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1550
1586
  + target.current = value;
1551
1587
  + cleanups.push(() => { target.current = null; });
1552
1588
  + }
1553
- };
1589
+ + };
1554
1590
  + try {
1555
1591
  + attach(ref);
1556
1592
  + } catch (error) {
1557
1593
  + try { runCommitTasks(cleanups); } finally { throw error; }
1558
1594
  + }
1559
1595
  + return () => runCommitTasks(cleanups);
1560
- },
1561
- - deps,
1596
+ + },
1562
1597
  + deps == null ? deps : [...deps, ref],
1563
1598
  slot
1564
1599
  );
1565
1600
  }
1566
- @@ -5627,9 +5868,9 @@ class UniversalRootImpl {
1601
+ @@ -5631,9 +5872,9 @@ class UniversalRootImpl {
1567
1602
  }
1568
1603
  let result;
1569
1604
  try {
1570
1605
  - result = event.handler(payload);
1571
- + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
1572
- } catch (error) {
1606
+ - } catch (error) {
1573
1607
  - if (!routeUniversalOwnerError(event.owner, error)) throw error;
1608
+ + result = runWithSignalOwner(universalSignalOwner(event.owner), () => event.handler(payload));
1609
+ + } catch (error) {
1574
1610
  + if (!routeUniversalOwnerError(event.owner, error) && !reportUniversalUncaughtError(this, error)) throw error;
1575
1611
  }
1576
1612
  return result;
1577
1613
  }
1578
- @@ -6200,6 +6441,8 @@ class UniversalRootImpl {
1614
+ @@ -6204,6 +6445,8 @@ class UniversalRootImpl {
1579
1615
  draft.record.componentProps = null;
1580
1616
  draft.record.range = null;
1581
1617
  draft.record.updates.clear();
@@ -1584,7 +1620,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1584
1620
  for (const hook of draft.hooks.values()) {
1585
1621
  if (hook.kind === "effect-event") hook.cell.active = false;
1586
1622
  }
1587
- @@ -6717,6 +6960,7 @@ class UniversalRootImpl {
1623
+ @@ -6721,6 +6964,7 @@ class UniversalRootImpl {
1588
1624
  record.componentRevision = draft.componentRevision;
1589
1625
  record.parent = draft.parent?.record ?? null;
1590
1626
  record.hooks = draft.hooks;
@@ -1592,7 +1628,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1592
1628
  record.effectOrder = [...draft.seenEffects];
1593
1629
  for (let index = 0; index < draft.seenEffects.length; index++) {
1594
1630
  draft.seenEffects[index].previous = null;
1595
- @@ -8365,6 +8609,8 @@ class UniversalRootImpl {
1631
+ @@ -8369,6 +8613,8 @@ class UniversalRootImpl {
1596
1632
  owner.componentProps = null;
1597
1633
  owner.range = null;
1598
1634
  owner.updates.clear();
@@ -1601,7 +1637,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1601
1637
  }
1602
1638
  for (const draft of draftOwnersParentFirst) {
1603
1639
  const record = draft.record;
1604
- @@ -8374,6 +8620,7 @@ class UniversalRootImpl {
1640
+ @@ -8378,6 +8624,7 @@ class UniversalRootImpl {
1605
1641
  record.parent = draft.parent?.record ?? null;
1606
1642
  }
1607
1643
  record.hooks = draft.hooks;
@@ -1609,7 +1645,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1609
1645
  record.effectOrder = [...draft.seenEffects];
1610
1646
  for (let index = 0; index < draft.seenEffects.length; index++) {
1611
1647
  draft.seenEffects[index].previous = null;
1612
- @@ -8885,6 +9132,8 @@ class UniversalRootImpl {
1648
+ @@ -8889,6 +9136,8 @@ class UniversalRootImpl {
1613
1649
  owner.componentProps = null;
1614
1650
  owner.range = null;
1615
1651
  owner.updates.clear();
@@ -1618,7 +1654,7 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1618
1654
  }
1619
1655
  const deactivatedRegionCells = /* @__PURE__ */ new Set();
1620
1656
  for (const bridge of regionBridges) {
1621
- @@ -10101,6 +10350,7 @@ function createObjectDriver(renderer = "object") {
1657
+ @@ -10105,6 +10354,7 @@ function createObjectDriver(renderer = "object") {
1622
1658
  };
1623
1659
  }
1624
1660
  export {
@@ -1627,24 +1663,27 @@ index 4bc0ddf5022daa883d35536af2db8d9b3d59b166..f7cc3726cf895383ded13e4bb4185768
1627
1663
  UNIVERSAL_HMR,
1628
1664
  UNIVERSAL_TRANSPORT_PROTOCOL_VERSION,
1629
1665
  diff --git a/dist/universal-native.js b/dist/universal-native.js
1630
- index 55ac9b640dc8bbfd977bb2cbe0b7993c8ddb425a..3ff9a5750fb59cd91b63299aec3a3e0c030b4579 100644
1666
+ index 55ac9b6..399633e 100644
1631
1667
  --- a/dist/universal-native.js
1632
1668
  +++ b/dist/universal-native.js
1633
1669
  @@ -6,9 +6,12 @@ import {
1634
1670
  import {
1635
1671
  universalContext
1636
1672
  } from "./universal-core.js";
1673
+ -import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1674
+ -import { CONTEXT_TAG } from "./runtime-tags.js";
1675
+ -import { registerContext } from "./context-identity.js";
1637
1676
  +export { Children } from "./universal-core.js";
1638
1677
  +import { enableUniversalSignalDocument } from "./signals/universal-owner.js";
1639
- import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1640
- import { CONTEXT_TAG } from "./runtime-tags.js";
1641
- import { registerContext } from "./context-identity.js";
1678
+ +import { registerRendererContext, renderRendererContextProvider } from "./renderer-bridge.js";
1679
+ +import { CONTEXT_TAG } from "./runtime-tags.js";
1680
+ +import { registerContext } from "./context-identity.js";
1642
1681
  +enableUniversalSignalDocument();
1643
1682
  // @__NO_SIDE_EFFECTS__
1644
1683
  function createContext(defaultValue) {
1645
1684
  const context = ((props, scope) => scope === void 0 ? universalContext(context, props.value, props.children) : renderRendererContextProvider(context, props, scope));
1646
1685
  diff --git a/dist/universal.js b/dist/universal.js
1647
- index 6427a0190c072e7e4629c379e42bedc03669dc6e..8049b7880824de607157091004a46c9d33a23484 100644
1686
+ index 6427a01..8049b78 100644
1648
1687
  --- a/dist/universal.js
1649
1688
  +++ b/dist/universal.js
1650
1689
  @@ -8,6 +8,9 @@ import {