octane 0.9.0 → 0.9.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.
- package/dist/behavior-form-submissions.js +2 -1
- package/dist/cjs/behavior-form-submissions.cjs +2 -1
- package/dist/cjs/runtime.cjs +141 -79
- package/dist/cjs/signals/computations.cjs +11 -2
- package/dist/cjs/signals/derived-facade.cjs +2 -2
- package/dist/cjs/signals/engine.cjs +26 -10
- package/dist/cjs/signals/facade.cjs +58 -15
- package/dist/cjs/signals/index.cjs +2 -0
- package/dist/cjs/signals/native-read-client.cjs +19 -1
- package/dist/cjs/signals/query-facade.cjs +2 -2
- package/dist/cjs/signals/read-protocol.cjs +2 -2
- package/dist/cjs/signals/redeclaration.cjs +19 -6
- package/dist/cjs/signals/scalar-computations.cjs +2 -2
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile.js +82 -20
- package/dist/compiler/signal-declarations.js +156 -53
- package/dist/node/behavior-form-submissions.js +2 -1
- package/dist/node/owner-kernel/hooks.js +48 -0
- package/dist/node/runtime.js +140 -79
- package/dist/node/signals/computations.js +11 -2
- package/dist/node/signals/derived-facade.js +2 -2
- package/dist/node/signals/engine.js +26 -10
- package/dist/node/signals/facade.js +58 -16
- package/dist/node/signals/index.js +2 -0
- package/dist/node/signals/native-read-client.js +19 -1
- package/dist/node/signals/query-facade.js +2 -2
- package/dist/node/signals/read-protocol.js +2 -2
- package/dist/node/signals/redeclaration.js +19 -6
- package/dist/node/signals/scalar-computations.js +2 -2
- package/dist/node/universal-core.js +8 -40
- package/dist/node/version.js +1 -1
- package/dist/owner-kernel/hooks.d.ts +128 -0
- package/dist/owner-kernel/hooks.js +48 -0
- package/dist/runtime.d.ts +23 -2
- package/dist/runtime.js +140 -79
- package/dist/signals/computations.d.ts +1 -1
- package/dist/signals/computations.js +11 -2
- package/dist/signals/derived-facade.js +2 -2
- package/dist/signals/engine.d.ts +6 -6
- package/dist/signals/engine.js +26 -10
- package/dist/signals/facade.d.ts +30 -1
- package/dist/signals/facade.js +58 -16
- package/dist/signals/index.d.ts +1 -1
- package/dist/signals/index.js +2 -0
- package/dist/signals/native-read-client.d.ts +9 -0
- package/dist/signals/native-read-client.js +19 -1
- package/dist/signals/query-facade.js +2 -2
- package/dist/signals/read-protocol.d.ts +7 -3
- package/dist/signals/read-protocol.js +2 -2
- package/dist/signals/redeclaration.d.ts +12 -3
- package/dist/signals/redeclaration.js +19 -6
- package/dist/signals/scalar-computations.d.ts +1 -1
- package/dist/signals/scalar-computations.js +2 -2
- package/dist/universal-core.js +8 -40
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -97,7 +97,8 @@ function createSubmissionController(root, mailbox, services) {
|
|
|
97
97
|
flush: () => mailbox.flush(),
|
|
98
98
|
skip: (owner, event) => enabledRoots.has(owner) && mailbox.has(event),
|
|
99
99
|
release: (entry) => {
|
|
100
|
-
if (enabledRoots.has(entry.root)
|
|
100
|
+
if (enabledRoots.has(entry.root) && entry.root.behaviors.has(entry))
|
|
101
|
+
releaseBehaviorSubmissions(entry, services);
|
|
101
102
|
},
|
|
102
103
|
dispose: (owner) => {
|
|
103
104
|
if (registry.roots.get(owner.container) !== owner) return;
|
|
@@ -100,7 +100,8 @@ function createSubmissionController(root, mailbox, services) {
|
|
|
100
100
|
flush: () => mailbox.flush(),
|
|
101
101
|
skip: (owner, event) => enabledRoots.has(owner) && mailbox.has(event),
|
|
102
102
|
release: (entry) => {
|
|
103
|
-
if (enabledRoots.has(entry.root)
|
|
103
|
+
if (enabledRoots.has(entry.root) && entry.root.behaviors.has(entry))
|
|
104
|
+
releaseBehaviorSubmissions(entry, services);
|
|
104
105
|
},
|
|
105
106
|
dispose: (owner) => {
|
|
106
107
|
if (registry.roots.get(owner.container) !== owner) return;
|
package/dist/cjs/runtime.cjs
CHANGED
|
@@ -198,6 +198,7 @@ __export(runtime_exports, {
|
|
|
198
198
|
nativeStyleBinding: () => nativeStyleBinding,
|
|
199
199
|
nativeWarmMemo: () => nativeWarmMemo,
|
|
200
200
|
normalizeClass: () => import_css.normalizeClass,
|
|
201
|
+
ownSlotAnchor: () => ownSlotAnchor,
|
|
201
202
|
portal: () => portal,
|
|
202
203
|
positionalChildren: () => positionalChildren,
|
|
203
204
|
preconnect: () => preconnect,
|
|
@@ -1005,11 +1006,12 @@ function scheduleNativeRead(target) {
|
|
|
1005
1006
|
if (retainPriority) TRANSITION_DEPTH--;
|
|
1006
1007
|
}
|
|
1007
1008
|
}
|
|
1008
|
-
function currentSignalDeclarationStage() {
|
|
1009
|
+
function currentSignalDeclarationStage(declaring) {
|
|
1009
1010
|
const block = CURRENT_BLOCK;
|
|
1010
|
-
const
|
|
1011
|
+
const declared = declaring === void 0 ? void 0 : NATIVE_READ_DRIVER?.enclosingInvocation(declaring);
|
|
1012
|
+
const capture = declared === void 0 ? WIP_CAPTURE : declared.capture;
|
|
1011
1013
|
if (block === null || capture === null || ROOT_RENDER_ROLLBACK) return void 0;
|
|
1012
|
-
const invocation = NATIVE_READ_DRIVER?.invocation(block);
|
|
1014
|
+
const invocation = declared ?? NATIVE_READ_DRIVER?.invocation(block);
|
|
1013
1015
|
const current = invocation?.invocationData;
|
|
1014
1016
|
if (current != null && !current.settled && current.capture === capture) return current;
|
|
1015
1017
|
const callbacks = [];
|
|
@@ -7365,6 +7367,7 @@ class LiteBlockImpl {
|
|
|
7365
7367
|
this.parentNode = parentNode;
|
|
7366
7368
|
this.endMarker = endMarker;
|
|
7367
7369
|
this.parentBlock = parentBlock;
|
|
7370
|
+
this.memoInChain = parentBlock.memoInChain;
|
|
7368
7371
|
this.$$ctxValues = null;
|
|
7369
7372
|
this.idState = parentBlock.idState;
|
|
7370
7373
|
this.signalInstanceParent = null;
|
|
@@ -10034,6 +10037,20 @@ function createHydrateSlot(props, scope, boundaryId, boundaryBody) {
|
|
|
10034
10037
|
}
|
|
10035
10038
|
return state;
|
|
10036
10039
|
}
|
|
10040
|
+
function resumeFreshHydrateSource(source) {
|
|
10041
|
+
const anchor = source.endMarker;
|
|
10042
|
+
const parent = source.parentNode;
|
|
10043
|
+
const before = anchor ? domNode(anchor).previousSibling : domNode(parent).lastChild;
|
|
10044
|
+
try {
|
|
10045
|
+
renderBlock(source);
|
|
10046
|
+
} finally {
|
|
10047
|
+
const first = before ? getNextSibling(before) : getFirstChild(parent);
|
|
10048
|
+
for (let arm = source.parentBlock; first !== anchor && arm?.kind === "control-flow" && !arm.mounted && arm.startMarker === null && arm.endMarker === anchor; arm = arm.parentBlock) {
|
|
10049
|
+
journalRootProperty(arm, "startMarker", null);
|
|
10050
|
+
arm.startMarker = first;
|
|
10051
|
+
}
|
|
10052
|
+
}
|
|
10053
|
+
}
|
|
10037
10054
|
function activateHydrateBoundary(state) {
|
|
10038
10055
|
if (state.start === null || state.end === null) return;
|
|
10039
10056
|
const block = state.block;
|
|
@@ -10084,7 +10101,7 @@ function activateHydrateBoundary(state) {
|
|
|
10084
10101
|
const source = preserved.source;
|
|
10085
10102
|
hydration.node = preserved.cursor;
|
|
10086
10103
|
try {
|
|
10087
|
-
if (preserved.fresh) hydration.suspend(() =>
|
|
10104
|
+
if (preserved.fresh) hydration.suspend(() => resumeFreshHydrateSource(source));
|
|
10088
10105
|
else hydration.renderSuspended(source);
|
|
10089
10106
|
} catch (error) {
|
|
10090
10107
|
if (!isSuspenseException(error)) throw error;
|
|
@@ -23943,25 +23960,14 @@ function ctxBailDepsClean(block) {
|
|
|
23943
23960
|
return true;
|
|
23944
23961
|
}
|
|
23945
23962
|
function refreshContextConsumers(block) {
|
|
23946
|
-
|
|
23947
|
-
|
|
23948
|
-
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
const items = s.items;
|
|
23953
|
-
for (const item of items.values()) refreshBlockForContext(item);
|
|
23954
|
-
if (s.emptyBlock) refreshBlockForContext(s.emptyBlock);
|
|
23955
|
-
} else if (s.block) {
|
|
23956
|
-
refreshBlockForContext(s.block);
|
|
23957
|
-
} else if (s.__kind === "childSlot" && s.forSlot) {
|
|
23958
|
-
const items = s.forSlot.items;
|
|
23959
|
-
for (const item of items.values()) refreshBlockForContext(item);
|
|
23960
|
-
} else if (s.__kind === "childSlot" && s.portal !== null && s.portal.block !== null) {
|
|
23961
|
-
refreshBlockForContext(s.portal.block);
|
|
23962
|
-
}
|
|
23963
|
-
}
|
|
23963
|
+
forEachSubtreeChild(block, refreshContextSubtree, false);
|
|
23964
|
+
}
|
|
23965
|
+
function refreshContextSubtree(scope) {
|
|
23966
|
+
if (scope.block === scope) {
|
|
23967
|
+
refreshBlockForContext(scope);
|
|
23968
|
+
return;
|
|
23964
23969
|
}
|
|
23970
|
+
forEachSubtreeChild(scope, refreshContextSubtree, false);
|
|
23965
23971
|
}
|
|
23966
23972
|
function tryMemoBail(block, comp, props) {
|
|
23967
23973
|
if (comp.__memo !== true) return false;
|
|
@@ -24717,6 +24723,7 @@ function renderPassthroughTry(state) {
|
|
|
24717
24723
|
}
|
|
24718
24724
|
}
|
|
24719
24725
|
function errorBlock(parentScope, slotKey, domParent, tryBody, catchBody, anchor, env) {
|
|
24726
|
+
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return noop;
|
|
24720
24727
|
const parentBlock = parentScope.block;
|
|
24721
24728
|
const hydration = activeHydration();
|
|
24722
24729
|
let state = parentScope.slots[slotKey];
|
|
@@ -24766,6 +24773,7 @@ function errorBlock(parentScope, slotKey, domParent, tryBody, catchBody, anchor,
|
|
|
24766
24773
|
registerSlot(parentScope, newState);
|
|
24767
24774
|
state = newState;
|
|
24768
24775
|
} else {
|
|
24776
|
+
if (state.env !== env) journalRootProperty(state, "env", state.env);
|
|
24769
24777
|
state.tryBody = tryBody;
|
|
24770
24778
|
state.catchBody = catchBody;
|
|
24771
24779
|
state.env = env;
|
|
@@ -24963,6 +24971,7 @@ function switchErrorToCatchInner(state, error, reportInline, adoptedStart, adopt
|
|
|
24963
24971
|
}
|
|
24964
24972
|
}
|
|
24965
24973
|
function tryBlock(parentScope, slotKey, domParent, tryBody, catchBody, pendingBody, anchor, env, propagateSuspense = false) {
|
|
24974
|
+
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return noop;
|
|
24966
24975
|
propagateSuspense ||= pendingBody === null;
|
|
24967
24976
|
if (pendingBody !== null) {
|
|
24968
24977
|
ensureTransitionSwapDriver();
|
|
@@ -25039,12 +25048,19 @@ function tryBlock(parentScope, slotKey, domParent, tryBody, catchBody, pendingBo
|
|
|
25039
25048
|
} else {
|
|
25040
25049
|
supersedesInputs = (state.branch === 2 || state.retrySignalOwners !== void 0) && (state.tryBody !== tryBody || state.env !== env && depsChanged(state.env, env));
|
|
25041
25050
|
if (supersedesInputs) supersedeSignalRetryOwners(state);
|
|
25051
|
+
if (state.tryBody !== tryBody) journalRootProperty(state, "tryBody", state.tryBody);
|
|
25052
|
+
if (state.catchBody !== catchBody) journalRootProperty(state, "catchBody", state.catchBody);
|
|
25053
|
+
if (state.pendingBody !== pendingBody)
|
|
25054
|
+
journalRootProperty(state, "pendingBody", state.pendingBody);
|
|
25042
25055
|
state.tryBody = tryBody;
|
|
25043
25056
|
state.catchBody = catchBody;
|
|
25044
25057
|
state.pendingBody = pendingBody;
|
|
25045
25058
|
state.propagateSuspense = propagateSuspense;
|
|
25046
|
-
if (
|
|
25047
|
-
|
|
25059
|
+
if (state.env !== env) {
|
|
25060
|
+
if (ACTIVE_TRANSITION_ATTEMPT !== null)
|
|
25061
|
+
TRANSITION_JOURNAL.push(JOURNAL_PROP, state, "env", state.env);
|
|
25062
|
+
else journalRootProperty(state, "env", state.env);
|
|
25063
|
+
}
|
|
25048
25064
|
state.env = env;
|
|
25049
25065
|
}
|
|
25050
25066
|
const s = state;
|
|
@@ -26158,6 +26174,14 @@ function attemptHiddenReveal(state, scheduledMode, reason = "update") {
|
|
|
26158
26174
|
if (hiddenActivity !== null) rehideActivityAfterDescendantRender(hiddenActivity);
|
|
26159
26175
|
}
|
|
26160
26176
|
}
|
|
26177
|
+
function journalRootReveal(state) {
|
|
26178
|
+
journalObjectOnce(state);
|
|
26179
|
+
const parked = HIDDEN_REVEAL_ACTIONS?.get(state);
|
|
26180
|
+
if (parked !== void 0)
|
|
26181
|
+
journalUndo(() => {
|
|
26182
|
+
HIDDEN_REVEAL_ACTIONS.set(state, parked);
|
|
26183
|
+
});
|
|
26184
|
+
}
|
|
26161
26185
|
function attemptHiddenRevealInner(state, scheduledMode, reason = "update") {
|
|
26162
26186
|
if (state.nativeTransition !== void 0 && NATIVE_TRANSITION_ATTEMPT === null) {
|
|
26163
26187
|
queueNativeTransition(state.nativeTransition);
|
|
@@ -26184,6 +26208,7 @@ function attemptHiddenRevealInner(state, scheduledMode, reason = "update") {
|
|
|
26184
26208
|
discardOffscreenCapture(supersededCapture);
|
|
26185
26209
|
deactivateScope(tryBlock2, false);
|
|
26186
26210
|
}
|
|
26211
|
+
if (ROOT_RENDER_TRANSACTION !== null && !ROOT_RENDER_ROLLBACK) journalRootReveal(state);
|
|
26187
26212
|
const effectDeps = snapshotSubtreeEffectDeps(tryBlock2);
|
|
26188
26213
|
if (reason === "parent" && !RESUME_REPLAY && !state.hasResolved) {
|
|
26189
26214
|
let uncommitted = true;
|
|
@@ -27035,6 +27060,16 @@ function handleResumeError(block, error) {
|
|
|
27035
27060
|
if (root.kind === "root" && !root.disposed) unmountBlock(root);
|
|
27036
27061
|
}
|
|
27037
27062
|
}
|
|
27063
|
+
function ownSlotAnchor(scope, slotKey, block) {
|
|
27064
|
+
const anchor = block.endMarker;
|
|
27065
|
+
const parent = block.parentNode;
|
|
27066
|
+
const hydration = activeHydration();
|
|
27067
|
+
if (scope.slots[slotKey] !== void 0 || hydration !== null && !hydration.inFreshRange(anchor, parent) || CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate)
|
|
27068
|
+
return anchor;
|
|
27069
|
+
const own = (STAGED_DOM?.view(document) ?? document).createComment("");
|
|
27070
|
+
(STAGED_DOM?.view(parent) ?? parent).insertBefore(own, anchor);
|
|
27071
|
+
return own;
|
|
27072
|
+
}
|
|
27038
27073
|
function preservesCommittedSuspense(block) {
|
|
27039
27074
|
for (let current = block; current !== null; current = current.parentBlock) {
|
|
27040
27075
|
const state = current.__trySlot;
|
|
@@ -27086,6 +27121,24 @@ function finalizeMarkerlessBranch(state, domParent, block, marker, before, after
|
|
|
27086
27121
|
state.end = first;
|
|
27087
27122
|
} else delimitMarkerlessBranch(state, domParent, block, marker, first, after, contentEnd);
|
|
27088
27123
|
}
|
|
27124
|
+
function pendingArmBefore(block, domParent) {
|
|
27125
|
+
const first = block.startMarker;
|
|
27126
|
+
const node = first !== null && domNode(first).parentNode === domParent ? first : block.endMarker;
|
|
27127
|
+
return node ? domNode(node).previousSibling : domNode(domParent).lastChild;
|
|
27128
|
+
}
|
|
27129
|
+
function renderMarkerlessArm(state, domParent, block, marker) {
|
|
27130
|
+
const after = block.endMarker;
|
|
27131
|
+
const before = pendingArmBefore(block, domParent);
|
|
27132
|
+
state.markerlessBefore = null;
|
|
27133
|
+
try {
|
|
27134
|
+
renderBlock(block);
|
|
27135
|
+
} catch (error) {
|
|
27136
|
+
if ((before ? getNextSibling(before) : getFirstChild(domParent)) !== after)
|
|
27137
|
+
finalizeMarkerlessBranch(state, domParent, block, marker, before, after);
|
|
27138
|
+
throw error;
|
|
27139
|
+
}
|
|
27140
|
+
finalizeMarkerlessBranch(state, domParent, block, marker, before, after);
|
|
27141
|
+
}
|
|
27089
27142
|
function delimitMarkerlessBranch(state, domParent, block, marker, first, after, contentEnd) {
|
|
27090
27143
|
const start = (STAGED_DOM?.view(document) ?? document).createComment(marker);
|
|
27091
27144
|
const end = (STAGED_DOM?.view(document) ?? document).createComment("/" + marker);
|
|
@@ -27113,14 +27166,18 @@ function sharesBlockBoundary(parent, start, end) {
|
|
|
27113
27166
|
return parent !== null && start !== null && end !== null && parent.startMarker === start && parent.endMarker === end;
|
|
27114
27167
|
}
|
|
27115
27168
|
function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, marker, env) {
|
|
27116
|
-
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
27117
27169
|
const parentBlock = parentScope.block;
|
|
27118
27170
|
const hydration = activeHydration();
|
|
27119
27171
|
if (next !== state.branch) {
|
|
27120
27172
|
if (ROOT_RENDER_TRANSACTION !== null && (state.branch !== -1 || hydration !== null)) {
|
|
27121
27173
|
const previousBlock = state.block;
|
|
27122
27174
|
if (state.markerlessBefore !== void 0 && previousBlock !== null) {
|
|
27123
|
-
journalRootSlot(
|
|
27175
|
+
journalRootSlot(
|
|
27176
|
+
state,
|
|
27177
|
+
domParent,
|
|
27178
|
+
state.markerlessBefore ?? pendingArmBefore(previousBlock, domParent),
|
|
27179
|
+
previousBlock.endMarker
|
|
27180
|
+
);
|
|
27124
27181
|
} else if (state.start !== null) {
|
|
27125
27182
|
journalRootSlot(
|
|
27126
27183
|
state,
|
|
@@ -27162,7 +27219,7 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
27162
27219
|
const pending = state.block;
|
|
27163
27220
|
const heldEnd = hydration?.heldBranchEnd(markerlessBefore, domParent, pending.endMarker);
|
|
27164
27221
|
provisionalAfter = heldEnd === void 0 ? pending.endMarker : heldEnd;
|
|
27165
|
-
let node = markerlessBefore ?
|
|
27222
|
+
let node = markerlessBefore === null ? pending.startMarker ?? provisionalAfter : getNextSibling(markerlessBefore);
|
|
27166
27223
|
state.block = null;
|
|
27167
27224
|
state.markerlessBefore = void 0;
|
|
27168
27225
|
unmountBlock(pending, false);
|
|
@@ -27426,9 +27483,7 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
27426
27483
|
removeRange(getNextSibling(state.start), state.end);
|
|
27427
27484
|
}
|
|
27428
27485
|
} else if (body) {
|
|
27429
|
-
const before = after ? (STAGED_DOM?.view(after) ?? after).previousSibling : (STAGED_DOM?.view(domParent) ?? domParent).lastChild;
|
|
27430
27486
|
const cursor = hydration !== null && !state.borrowed ? hydration.markerlessCursor(domParent, after) : null;
|
|
27431
|
-
const contentBefore = cursor === null ? before : domNode(cursor).previousSibling;
|
|
27432
27487
|
const b = createBlock(
|
|
27433
27488
|
"control-flow",
|
|
27434
27489
|
parentBlock,
|
|
@@ -27440,40 +27495,43 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
27440
27495
|
env
|
|
27441
27496
|
);
|
|
27442
27497
|
state.block = b;
|
|
27443
|
-
state
|
|
27444
|
-
|
|
27445
|
-
|
|
27446
|
-
|
|
27447
|
-
|
|
27448
|
-
|
|
27449
|
-
|
|
27450
|
-
|
|
27451
|
-
|
|
27452
|
-
|
|
27453
|
-
|
|
27454
|
-
|
|
27455
|
-
|
|
27456
|
-
|
|
27457
|
-
|
|
27458
|
-
|
|
27459
|
-
|
|
27460
|
-
|
|
27461
|
-
|
|
27462
|
-
hydration.
|
|
27463
|
-
|
|
27464
|
-
|
|
27465
|
-
|
|
27466
|
-
|
|
27467
|
-
|
|
27468
|
-
|
|
27469
|
-
|
|
27470
|
-
|
|
27471
|
-
|
|
27472
|
-
|
|
27473
|
-
|
|
27474
|
-
|
|
27498
|
+
if (cursor === null) renderMarkerlessArm(state, domParent, b, marker);
|
|
27499
|
+
else {
|
|
27500
|
+
const contentBefore = domNode(cursor).previousSibling;
|
|
27501
|
+
state.markerlessBefore = after ? domNode(after).previousSibling : domNode(domParent).lastChild;
|
|
27502
|
+
let contentEnd;
|
|
27503
|
+
try {
|
|
27504
|
+
contentEnd = hydration.renderMarkerless(b, cursor);
|
|
27505
|
+
} catch (error) {
|
|
27506
|
+
const rebuilt = hydration.freshAfter(contentBefore, domParent);
|
|
27507
|
+
if (rebuilt !== null && rebuilt !== cursor)
|
|
27508
|
+
finalizeMarkerlessBranch(
|
|
27509
|
+
state,
|
|
27510
|
+
domParent,
|
|
27511
|
+
b,
|
|
27512
|
+
marker,
|
|
27513
|
+
contentBefore,
|
|
27514
|
+
after,
|
|
27515
|
+
hydration.markerlessEnd(contentBefore, domParent, after)
|
|
27516
|
+
);
|
|
27517
|
+
else if (hydration.replaces(cursor)) {
|
|
27518
|
+
state.markerlessBefore = void 0;
|
|
27519
|
+
hydration.save(domParent);
|
|
27520
|
+
delimitMarkerlessBranch(
|
|
27521
|
+
state,
|
|
27522
|
+
domParent,
|
|
27523
|
+
b,
|
|
27524
|
+
marker,
|
|
27525
|
+
cursor,
|
|
27526
|
+
after,
|
|
27527
|
+
hydration.markerlessEnd(contentBefore, domParent, after)
|
|
27528
|
+
);
|
|
27529
|
+
} else
|
|
27530
|
+
hydration.holdMarkerlessBranch(state, domParent, marker, contentBefore, after, error);
|
|
27531
|
+
throw error;
|
|
27532
|
+
}
|
|
27533
|
+
finalizeMarkerlessBranch(state, domParent, b, marker, contentBefore, after, contentEnd);
|
|
27475
27534
|
}
|
|
27476
|
-
finalizeMarkerlessBranch(state, domParent, b, marker, contentBefore, after, contentEnd);
|
|
27477
27535
|
replaceSharedBlockBoundary(
|
|
27478
27536
|
parentBlock,
|
|
27479
27537
|
oldBlockStart,
|
|
@@ -27498,21 +27556,24 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
27498
27556
|
if (state.block.extra !== env) journalRootProperty(state.block, "extra", state.block.extra);
|
|
27499
27557
|
state.block.body = body;
|
|
27500
27558
|
state.block.extra = env;
|
|
27501
|
-
|
|
27502
|
-
|
|
27503
|
-
|
|
27504
|
-
const
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
27511
|
-
|
|
27512
|
-
|
|
27513
|
-
|
|
27514
|
-
|
|
27515
|
-
|
|
27559
|
+
if (state.markerlessBefore === null) renderMarkerlessArm(state, domParent, state.block, marker);
|
|
27560
|
+
else {
|
|
27561
|
+
renderBlock(state.block);
|
|
27562
|
+
const markerlessBefore = state.markerlessBefore;
|
|
27563
|
+
if (markerlessBefore !== void 0) {
|
|
27564
|
+
const after = state.block.endMarker;
|
|
27565
|
+
const end = hydration?.heldBranchEnd(markerlessBefore, domParent, after);
|
|
27566
|
+
finalizeMarkerlessBranch(
|
|
27567
|
+
state,
|
|
27568
|
+
domParent,
|
|
27569
|
+
state.block,
|
|
27570
|
+
marker,
|
|
27571
|
+
markerlessBefore,
|
|
27572
|
+
after,
|
|
27573
|
+
end === void 0 ? after : end
|
|
27574
|
+
);
|
|
27575
|
+
if (end !== void 0) hydration.dropHeldStart(markerlessBefore, domParent);
|
|
27576
|
+
}
|
|
27516
27577
|
}
|
|
27517
27578
|
}
|
|
27518
27579
|
if (hydration !== null && !state.borrowed && state.end !== null) {
|
|
@@ -27520,9 +27581,9 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
27520
27581
|
}
|
|
27521
27582
|
}
|
|
27522
27583
|
function ifBlock(parentScope, slotKey, domParent, cond, thenBody, elseBody, anchor, env) {
|
|
27584
|
+
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
27523
27585
|
let state = parentScope.slots[slotKey];
|
|
27524
27586
|
if (slotKey === 0 && parentScope !== RETURNED_OUTPUT_SCOPE && state?.returnedOutput === true) {
|
|
27525
|
-
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
27526
27587
|
if (state.__kind === "ifBlockSlot") {
|
|
27527
27588
|
setReturnedOutputOwner(state, false);
|
|
27528
27589
|
} else {
|
|
@@ -28155,9 +28216,9 @@ function deactivateScope(scope, disconnectPassive = true) {
|
|
|
28155
28216
|
forEachSubtreeChild(scope, (child2) => deactivateScope(child2, disconnectPassive));
|
|
28156
28217
|
}
|
|
28157
28218
|
function switchBlock(parentScope, slotKey, domParent, discriminant, cases, defaultBody, anchor, env) {
|
|
28219
|
+
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
28158
28220
|
let state = parentScope.slots[slotKey];
|
|
28159
28221
|
if (slotKey === 0 && parentScope !== RETURNED_OUTPUT_SCOPE && state?.returnedOutput === true) {
|
|
28160
|
-
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
28161
28222
|
if (state.__kind === "switchBlockSlot") {
|
|
28162
28223
|
setReturnedOutputOwner(state, false);
|
|
28163
28224
|
} else {
|
|
@@ -31484,6 +31545,7 @@ function scriptResource(attrs) {
|
|
|
31484
31545
|
nativeStyleBinding,
|
|
31485
31546
|
nativeWarmMemo,
|
|
31486
31547
|
normalizeClass,
|
|
31548
|
+
ownSlotAnchor,
|
|
31487
31549
|
portal,
|
|
31488
31550
|
positionalChildren,
|
|
31489
31551
|
preconnect,
|
|
@@ -30,9 +30,18 @@ var import_redeclaration = require("./redeclaration.cjs");
|
|
|
30
30
|
var import_transition_state = require("./transition-state.cjs");
|
|
31
31
|
var import_candidate_producers = require("./candidate-producers.cjs");
|
|
32
32
|
var import_types = require("./types.cjs");
|
|
33
|
-
function createDeclaredDerivedCell(owner, key, compute, options, sequence, captures) {
|
|
33
|
+
function createDeclaredDerivedCell(owner, key, compute, options, sequence, captures, declaring) {
|
|
34
34
|
(0, import_candidate_producers.installDerivedCandidates)();
|
|
35
|
-
return (0, import_engine.createDerivedCellWith)(
|
|
35
|
+
return (0, import_engine.createDerivedCellWith)(
|
|
36
|
+
owner,
|
|
37
|
+
key,
|
|
38
|
+
compute,
|
|
39
|
+
options,
|
|
40
|
+
DerivedBinding,
|
|
41
|
+
sequence,
|
|
42
|
+
captures,
|
|
43
|
+
declaring
|
|
44
|
+
);
|
|
36
45
|
}
|
|
37
46
|
function attempt(binding) {
|
|
38
47
|
let resolve;
|
|
@@ -37,9 +37,9 @@ function __derivedAt(site, compute, options, captures) {
|
|
|
37
37
|
site ??= explicit;
|
|
38
38
|
const key = (0, import_facade.declarationKey)(site, (0, import_facade.descriptorKey)(site, explicit));
|
|
39
39
|
const sequence = (0, import_engine.signalDeclarationSequence)(site);
|
|
40
|
-
return new import_facade.DerivedDescriptor(key, "derived", (owner) => {
|
|
40
|
+
return new import_facade.DerivedDescriptor(key, "derived", (owner, declaring) => {
|
|
41
41
|
const wrapped = compute.length ? (context) => (0, import_owner_context.runWithSignalOwner)(owner, () => compute(context)) : () => (0, import_owner_context.runWithSignalOwner)(owner, () => compute());
|
|
42
|
-
return (0, import_computations.createDeclaredDerivedCell)(owner, key, wrapped, options, sequence, captures);
|
|
42
|
+
return (0, import_computations.createDeclaredDerivedCell)(owner, key, wrapped, options, sequence, captures, declaring);
|
|
43
43
|
}, site);
|
|
44
44
|
}
|
|
45
45
|
function derived$(compute, options) {
|
|
@@ -263,21 +263,21 @@ class ScopeImpl {
|
|
|
263
263
|
this.consumeSeed(key);
|
|
264
264
|
return node;
|
|
265
265
|
}
|
|
266
|
-
createDerivedDeclaration(key, compute, options, Binding, sequence = 0, captures) {
|
|
266
|
+
createDerivedDeclaration(key, compute, options, Binding, sequence = 0, captures, declaring = 0) {
|
|
267
267
|
if (typeof compute !== "function") throw new TypeError((0, import_error_codes_client_generated.formatClientError)(122));
|
|
268
268
|
const [node, created] = this.declaredNode(key, "derived");
|
|
269
269
|
if (!created) {
|
|
270
270
|
const binding2 = this.derivedBindings?.get(node);
|
|
271
|
-
return binding2?.redeclare(compute, sequence, captures) ?? node;
|
|
271
|
+
return binding2?.redeclare(compute, sequence, captures, declaring) ?? node;
|
|
272
272
|
}
|
|
273
273
|
const binding = new Binding(this, node, compute, options);
|
|
274
|
-
binding.declared(sequence, captures);
|
|
274
|
+
binding.declared(sequence, captures, declaring);
|
|
275
275
|
(this.derivedBindings ??= /* @__PURE__ */ new Map()).set(node, binding);
|
|
276
276
|
this.initializeRetention(node);
|
|
277
277
|
this.consumeSeed(key);
|
|
278
278
|
return node;
|
|
279
279
|
}
|
|
280
|
-
createResourceDeclaration(key, describe, initialize, unique = false, sequence = 0, captures) {
|
|
280
|
+
createResourceDeclaration(key, describe, initialize, unique = false, sequence = 0, captures, declaring = 0) {
|
|
281
281
|
if (typeof describe !== "function") throw new TypeError((0, import_error_codes_client_generated.formatClientError)(137));
|
|
282
282
|
let node;
|
|
283
283
|
if (unique) node = this.createNode(key, "async");
|
|
@@ -285,7 +285,7 @@ class ScopeImpl {
|
|
|
285
285
|
const [declared, created] = this.declaredNode(key, "async");
|
|
286
286
|
if (!created) {
|
|
287
287
|
const binding = this.resources?.get(declared);
|
|
288
|
-
return binding?.redeclare(describe, sequence, captures) ?? declared;
|
|
288
|
+
return binding?.redeclare(describe, sequence, captures, declaring) ?? declared;
|
|
289
289
|
}
|
|
290
290
|
node = declared;
|
|
291
291
|
}
|
|
@@ -294,7 +294,7 @@ class ScopeImpl {
|
|
|
294
294
|
this.initializeRetention(node);
|
|
295
295
|
(0, import_graph.signalBatch)(() => {
|
|
296
296
|
const binding = initialize(this, node, describe, seed, retained);
|
|
297
|
-
binding.declared(sequence, captures);
|
|
297
|
+
binding.declared(sequence, captures, declaring);
|
|
298
298
|
(this.resources ??= /* @__PURE__ */ new Map()).set(node, binding);
|
|
299
299
|
(0, import_graph.refreshNode)(node);
|
|
300
300
|
this.streams?.flush(node, binding);
|
|
@@ -623,17 +623,33 @@ function createDeclaredSignalCell(owner, key, initial, preferInitial = false) {
|
|
|
623
623
|
if (!(owner instanceof ScopeImpl)) throw new TypeError((0, import_error_codes_client_generated.formatClientError)(148));
|
|
624
624
|
return owner.createSignalDeclaration(key, initial, preferInitial);
|
|
625
625
|
}
|
|
626
|
-
function createDerivedCellWith(owner, key, compute, options, Binding, sequence = 0, captures) {
|
|
626
|
+
function createDerivedCellWith(owner, key, compute, options, Binding, sequence = 0, captures, declaring = 0) {
|
|
627
627
|
if (!(owner instanceof ScopeImpl)) throw new TypeError((0, import_error_codes_client_generated.formatClientError)(149));
|
|
628
|
-
return owner.createDerivedDeclaration(
|
|
628
|
+
return owner.createDerivedDeclaration(
|
|
629
|
+
key,
|
|
630
|
+
compute,
|
|
631
|
+
options,
|
|
632
|
+
Binding,
|
|
633
|
+
sequence,
|
|
634
|
+
captures,
|
|
635
|
+
declaring
|
|
636
|
+
);
|
|
629
637
|
}
|
|
630
638
|
let declarationSequence = 0;
|
|
631
639
|
function signalDeclarationSequence(site) {
|
|
632
640
|
return site?.startsWith("i:") ? ++declarationSequence : 0;
|
|
633
641
|
}
|
|
634
|
-
function createResourceCellWith(owner, key, describe, initialize, unique = false, sequence = 0, captures) {
|
|
642
|
+
function createResourceCellWith(owner, key, describe, initialize, unique = false, sequence = 0, captures, declaring = 0) {
|
|
635
643
|
if (!(owner instanceof ScopeImpl)) throw new TypeError((0, import_error_codes_client_generated.formatClientError)(150));
|
|
636
|
-
return owner.createResourceDeclaration(
|
|
644
|
+
return owner.createResourceDeclaration(
|
|
645
|
+
key,
|
|
646
|
+
describe,
|
|
647
|
+
initialize,
|
|
648
|
+
unique,
|
|
649
|
+
sequence,
|
|
650
|
+
captures,
|
|
651
|
+
declaring
|
|
652
|
+
);
|
|
637
653
|
}
|
|
638
654
|
function adoptResourceValue(handle$, requestKey, value) {
|
|
639
655
|
if (!(handle$ instanceof import_graph.ScopedNode) || !(handle$.owner instanceof ScopeImpl)) return false;
|