marko 6.0.0-next.3.57 → 6.0.0-next.3.59
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/debug/dom.js +181 -188
- package/dist/debug/dom.mjs +181 -188
- package/dist/debug/html.js +0 -3
- package/dist/debug/html.mjs +0 -3
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom.js +153 -150
- package/dist/dom.mjs +153 -150
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/index.js +29 -61
- package/dist/translator/util/signals.d.ts +1 -0
- package/package.json +1 -1
package/dist/dom.js
CHANGED
@@ -203,95 +203,114 @@ function stripSpacesAndPunctuation(str) {
|
|
203
203
|
var DEFAULT_RUNTIME_ID = "M", DEFAULT_RENDER_ID = "_";
|
204
204
|
|
205
205
|
// src/dom/resume.ts
|
206
|
-
var registeredValues = {}
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
this.r = [];
|
264
|
-
let len = resumes.length, i = 0;
|
265
|
-
try {
|
266
|
-
for (isResuming = !0; i < len; ) {
|
267
|
-
let resumeData = resumes[i++];
|
268
|
-
if (typeof resumeData == "function") {
|
269
|
-
let scopes = resumeData(serializeContext), { $global } = scopeLookup;
|
270
|
-
$global || (scopeLookup.$global = $global = scopes.$ || {}, $global.runtimeId = this.G, $global.renderId = this.t, $global.g = 1e6);
|
271
|
-
for (let scopeId in scopes)
|
272
|
-
if (scopeId !== "$") {
|
273
|
-
let scope = scopes[scopeId], prevScope = scopeLookup[scopeId];
|
274
|
-
scope.$global = $global, scope.d = +scopeId, prevScope !== scope && (scopeLookup[scopeId] = Object.assign(
|
275
|
-
scope,
|
276
|
-
prevScope
|
277
|
-
));
|
278
|
-
let parentBranchId = parentBranchIds.get(scopeId);
|
279
|
-
if (parentBranchId && (scope.c = scopes[parentBranchId]), branchIds.has(scopeId)) {
|
280
|
-
let branch = scope, parentBranch = branch.c;
|
281
|
-
scope.c = branch, parentBranch && (branch.x = parentBranch, (parentBranch.n ||= /* @__PURE__ */ new Set()).add(branch));
|
206
|
+
var registeredValues = {};
|
207
|
+
function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
208
|
+
let renders = window[runtimeId], defineRuntime = (desc) => Object.defineProperty(window, runtimeId, desc), resumeRender, initRuntime = (renders2) => {
|
209
|
+
defineRuntime({
|
210
|
+
value: resumeRender = (renderId) => {
|
211
|
+
let render = resumeRender[renderId] = renders2[renderId] || renders2(renderId), walk2 = render.w, commentPrefixLen = render.i.length, scopeStack = [], scopeLookup = render.s = {}, serializeContext = {
|
212
|
+
_: registeredValues
|
213
|
+
}, branchIds = /* @__PURE__ */ new Set(), parentBranchIds = /* @__PURE__ */ new Map(), closestBranchMarkers = /* @__PURE__ */ new Map(), currentScopeId;
|
214
|
+
return render.w = () => {
|
215
|
+
walk2.call(render);
|
216
|
+
let visits = render.v, resumes = render.r;
|
217
|
+
if (visits.length) {
|
218
|
+
let visitNodes = new Set(visits), lastEndNode;
|
219
|
+
render.v = [];
|
220
|
+
let branchEnd = (branchId, visit, reference) => {
|
221
|
+
let branch = scopeLookup[branchId] ||= {}, endNode = reference;
|
222
|
+
for (; visitNodes.has(endNode = endNode.previousSibling); ) ;
|
223
|
+
endNode === lastEndNode && (endNode = reference.parentNode.insertBefore(
|
224
|
+
new Text(),
|
225
|
+
reference
|
226
|
+
)), branch.b = lastEndNode = endNode, branch.a ||= endNode;
|
227
|
+
for (let [markerScopeId, markerNode] of closestBranchMarkers)
|
228
|
+
branch.a.compareDocumentPosition(markerNode) & 4 && reference.compareDocumentPosition(markerNode) & 2 && (parentBranchIds.set(markerScopeId, branchId), closestBranchMarkers.delete(markerScopeId));
|
229
|
+
return branchIds.add(branchId), closestBranchMarkers.set(branchId, visit), branch;
|
230
|
+
};
|
231
|
+
for (let visit of visits) {
|
232
|
+
let commentText = visit.data, dataIndex = commentText.indexOf(" ") + 1, scopeId = commentText.slice(
|
233
|
+
commentPrefixLen + 1,
|
234
|
+
dataIndex ? dataIndex - 1 : commentText.length
|
235
|
+
), scope = scopeLookup[scopeId] ||= {
|
236
|
+
d: +scopeId
|
237
|
+
}, data2 = dataIndex ? commentText.slice(dataIndex) : "", token = commentText[commentPrefixLen];
|
238
|
+
if (token === "*" /* Node */) {
|
239
|
+
let node = scope[data2] = visit.previousSibling;
|
240
|
+
scope[data2 + ">" /* Getter */] = () => node;
|
241
|
+
} else if (token === "$" /* ClosestBranch */)
|
242
|
+
closestBranchMarkers.set(scopeId, visit);
|
243
|
+
else if (token === "[" /* BranchStart */)
|
244
|
+
currentScopeId && (dataIndex && branchEnd(currentScopeId, visit, visit), scopeStack.push(currentScopeId)), currentScopeId = scopeId, scope.a = visit;
|
245
|
+
else if (token === "]" /* BranchEnd */) {
|
246
|
+
scope[data2] = visit;
|
247
|
+
let curParent = visit.parentNode, startNode = branchEnd(
|
248
|
+
currentScopeId,
|
249
|
+
visit,
|
250
|
+
visit
|
251
|
+
).a;
|
252
|
+
curParent !== startNode.parentNode && curParent.prepend(startNode), currentScopeId = scopeStack.pop();
|
253
|
+
} else if (token === "|" /* BranchSingleNode */ || token === "=" /* BranchSingleNodeOnlyChildInParent */) {
|
254
|
+
let next = data2.indexOf(" "), curNode = visit;
|
255
|
+
for (scope[~next ? data2.slice(0, next) : data2] = token === "=" /* BranchSingleNodeOnlyChildInParent */ ? visit.parentNode : visit; ~next; ) {
|
256
|
+
let start = next + 1;
|
257
|
+
next = data2.indexOf(" ", start);
|
258
|
+
let childScopeId = data2.slice(
|
259
|
+
start,
|
260
|
+
~next ? next : data2.length
|
261
|
+
);
|
262
|
+
curNode = branchEnd(childScopeId, visit, curNode).b;
|
282
263
|
}
|
283
264
|
}
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
265
|
+
}
|
266
|
+
}
|
267
|
+
if (resumes)
|
268
|
+
try {
|
269
|
+
render.r = [], isResuming = !0;
|
270
|
+
for (let i = 0; i < resumes.length; i++) {
|
271
|
+
let serialized = resumes[i];
|
272
|
+
if (typeof serialized == "function") {
|
273
|
+
let scopes = serialized(serializeContext), { $global } = scopeLookup;
|
274
|
+
$global || (scopeLookup.$global = $global = scopes.$ || {}, $global.runtimeId = runtimeId, $global.renderId = renderId, $global.f = 1e6);
|
275
|
+
for (let scopeId in scopes)
|
276
|
+
if (scopeId !== "$") {
|
277
|
+
let scope = scopes[scopeId], prevScope = scopeLookup[scopeId];
|
278
|
+
scope.$global = $global, scope.d = +scopeId, prevScope !== scope && (scopeLookup[scopeId] = Object.assign(
|
279
|
+
scope,
|
280
|
+
prevScope
|
281
|
+
));
|
282
|
+
let parentBranchId = parentBranchIds.get(scopeId);
|
283
|
+
if (parentBranchId && (scope.c = scopes[parentBranchId]), branchIds.has(scopeId)) {
|
284
|
+
let branch = scope, parentBranch = branch.c;
|
285
|
+
scope.c = branch, parentBranch && (branch.p = parentBranch, (parentBranch.m ||= /* @__PURE__ */ new Set()).add(
|
286
|
+
branch
|
287
|
+
));
|
288
|
+
}
|
289
|
+
}
|
290
|
+
} else
|
291
|
+
registeredValues[resumes[++i]](
|
292
|
+
scopeLookup[serialized],
|
293
|
+
scopeLookup[serialized]
|
294
|
+
);
|
295
|
+
}
|
296
|
+
} finally {
|
297
|
+
isResuming = !1;
|
298
|
+
}
|
299
|
+
}, render;
|
291
300
|
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
|
301
|
+
});
|
302
|
+
};
|
303
|
+
if (renders) {
|
304
|
+
initRuntime(renders);
|
305
|
+
for (let renderId in renders)
|
306
|
+
resumeRender(renderId).w();
|
307
|
+
} else
|
308
|
+
defineRuntime({
|
309
|
+
configurable: !0,
|
310
|
+
set: initRuntime
|
311
|
+
});
|
312
|
+
}
|
313
|
+
var isResuming = !1;
|
295
314
|
function register(id, obj) {
|
296
315
|
return registeredValues[id] = obj, obj;
|
297
316
|
}
|
@@ -302,22 +321,6 @@ function getRegisteredWithScope(id, scope) {
|
|
302
321
|
let val = registeredValues[id];
|
303
322
|
return scope ? val(scope) : val;
|
304
323
|
}
|
305
|
-
function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
306
|
-
let resumeRender = (renderId) => resumeRender[renderId] = renders[renderId] = new Render(renders, runtimeId, renderId), renders;
|
307
|
-
window[runtimeId] ? setRenders(window[runtimeId]) : Object.defineProperty(window, runtimeId, {
|
308
|
-
configurable: !0,
|
309
|
-
set: setRenders
|
310
|
-
});
|
311
|
-
function setRenders(v) {
|
312
|
-
renders = v;
|
313
|
-
for (let renderId in v)
|
314
|
-
resumeRender(renderId);
|
315
|
-
Object.defineProperty(window, runtimeId, {
|
316
|
-
configurable: !0,
|
317
|
-
value: resumeRender
|
318
|
-
});
|
319
|
-
}
|
320
|
-
}
|
321
324
|
function nodeRef(id, key) {
|
322
325
|
return register(id, (scope) => () => scope[key]());
|
323
326
|
}
|
@@ -712,28 +715,28 @@ function toInsertNode(startNode, endNode) {
|
|
712
715
|
var pendingScopes = [];
|
713
716
|
function createScope($global, closestBranch) {
|
714
717
|
let scope = {
|
715
|
-
d: $global.
|
716
|
-
|
718
|
+
d: $global.f++,
|
719
|
+
g: 1,
|
717
720
|
c: closestBranch,
|
718
721
|
$global
|
719
722
|
};
|
720
723
|
return pendingScopes.push(scope), scope;
|
721
724
|
}
|
722
725
|
function skipScope(scope) {
|
723
|
-
return scope.$global.
|
726
|
+
return scope.$global.f++;
|
724
727
|
}
|
725
728
|
function finishPendingScopes() {
|
726
729
|
for (let scope of pendingScopes)
|
727
|
-
scope.
|
730
|
+
scope.g = 0;
|
728
731
|
pendingScopes = [];
|
729
732
|
}
|
730
733
|
function destroyBranch(branch) {
|
731
|
-
branch.
|
734
|
+
branch.p?.m?.delete(branch), destroyNestedBranches(branch);
|
732
735
|
}
|
733
736
|
function destroyNestedBranches(branch) {
|
734
|
-
branch.
|
735
|
-
for (let id in scope.
|
736
|
-
scope.
|
737
|
+
branch.q = 1, branch.m?.forEach(destroyNestedBranches), branch.A?.forEach((scope) => {
|
738
|
+
for (let id in scope.j)
|
739
|
+
scope.j[id]?.abort();
|
737
740
|
});
|
738
741
|
}
|
739
742
|
function removeAndDestroyBranch(branch) {
|
@@ -753,17 +756,17 @@ var pendingRenders = [], pendingRendersLookup = /* @__PURE__ */ new Map(), pendi
|
|
753
756
|
function queueRender(scope, signal, signalKey, value2, scopeKey = scope.d) {
|
754
757
|
let key = scopeKey * scopeKeyOffset + signalKey, existingRender = signalKey >= 0 && pendingRendersLookup.get(key);
|
755
758
|
if (existingRender)
|
756
|
-
existingRender.
|
759
|
+
existingRender.t = value2;
|
757
760
|
else {
|
758
761
|
let render = {
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
762
|
+
h: key,
|
763
|
+
u: scope,
|
764
|
+
B: signal,
|
765
|
+
t: value2
|
763
766
|
}, i = pendingRenders.push(render) - 1;
|
764
767
|
for (; i; ) {
|
765
768
|
let parentIndex = i - 1 >> 1, parent = pendingRenders[parentIndex];
|
766
|
-
if (key - parent.
|
769
|
+
if (key - parent.h >= 0) break;
|
767
770
|
pendingRenders[i] = parent, i = parentIndex;
|
768
771
|
}
|
769
772
|
signalKey >= 0 && pendingRendersLookup.set(key, render), pendingRenders[i] = render;
|
@@ -802,27 +805,27 @@ function runRenders() {
|
|
802
805
|
for (; pendingRenders.length; ) {
|
803
806
|
let render = pendingRenders[0], item = pendingRenders.pop();
|
804
807
|
if (render !== item) {
|
805
|
-
let i = 0, mid = pendingRenders.length >> 1, key = (pendingRenders[0] = item).
|
808
|
+
let i = 0, mid = pendingRenders.length >> 1, key = (pendingRenders[0] = item).h;
|
806
809
|
for (; i < mid; ) {
|
807
810
|
let bestChild = (i << 1) + 1, right = bestChild + 1;
|
808
|
-
if (right < pendingRenders.length && pendingRenders[right].
|
811
|
+
if (right < pendingRenders.length && pendingRenders[right].h - pendingRenders[bestChild].h < 0 && (bestChild = right), pendingRenders[bestChild].h - key >= 0)
|
809
812
|
break;
|
810
813
|
pendingRenders[i] = pendingRenders[bestChild], i = bestChild;
|
811
814
|
}
|
812
815
|
pendingRenders[i] = item;
|
813
816
|
}
|
814
|
-
render.
|
817
|
+
render.u.c?.q || render.B(render.u, render.t);
|
815
818
|
}
|
816
819
|
finishPendingScopes();
|
817
820
|
}
|
818
821
|
|
819
822
|
// src/dom/abort-signal.ts
|
820
823
|
function resetAbortSignal(scope, id) {
|
821
|
-
let ctrl = scope.
|
822
|
-
ctrl && (queueEffect(ctrl, abort), scope.
|
824
|
+
let ctrl = scope.j?.[id];
|
825
|
+
ctrl && (queueEffect(ctrl, abort), scope.j[id] = void 0);
|
823
826
|
}
|
824
827
|
function getAbortSignal(scope, id) {
|
825
|
-
return scope.c && (scope.c.
|
828
|
+
return scope.c && (scope.c.A ||= /* @__PURE__ */ new Set()).add(scope), ((scope.j ||= {})[id] ||= new AbortController()).signal;
|
826
829
|
}
|
827
830
|
function abort(ctrl) {
|
828
831
|
ctrl.abort();
|
@@ -948,7 +951,7 @@ function walkInternal(currentWalkIndex, walkCodes, scope) {
|
|
948
951
|
// src/dom/renderer.ts
|
949
952
|
function createBranch($global, renderer, parentScope, parentNode) {
|
950
953
|
let branch = createScope($global), parentBranch = parentScope?.c;
|
951
|
-
return branch._ = renderer.
|
954
|
+
return branch._ = renderer.k || parentScope, branch.c = branch, parentBranch && (branch.p = parentBranch, (parentBranch.m ||= /* @__PURE__ */ new Set()).add(branch)), renderer.n?.(
|
952
955
|
branch,
|
953
956
|
parentNode.namespaceURI
|
954
957
|
), branch;
|
@@ -960,10 +963,10 @@ function createAndSetupBranch($global, renderer, parentScope, parentNode) {
|
|
960
963
|
);
|
961
964
|
}
|
962
965
|
function setupBranch(renderer, branch) {
|
963
|
-
return (renderer.
|
966
|
+
return (renderer.o || renderer.x) && queueRender(
|
964
967
|
branch,
|
965
968
|
(branch2) => {
|
966
|
-
renderer.
|
969
|
+
renderer.o?.(branch2), renderer.x?.(branch2);
|
967
970
|
},
|
968
971
|
-1
|
969
972
|
), branch;
|
@@ -984,12 +987,12 @@ function createContent(id, template, walks, setup, params, closures, dynamicScop
|
|
984
987
|
};
|
985
988
|
return (owner) => ({
|
986
989
|
d: id,
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
+
n: clone,
|
991
|
+
k: owner,
|
992
|
+
o: setup,
|
990
993
|
e: params,
|
991
|
-
|
992
|
-
|
994
|
+
x: closures,
|
995
|
+
l: dynamicScopesAccessor
|
993
996
|
});
|
994
997
|
}
|
995
998
|
function registerContent(id, template, walks, setup, params, closures, dynamicScopesAccessor) {
|
@@ -1063,7 +1066,7 @@ function value(valueAccessor, fn = () => {
|
|
1063
1066
|
}
|
1064
1067
|
function intersection(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__ */ "d") {
|
1065
1068
|
return (scope) => {
|
1066
|
-
scope.
|
1069
|
+
scope.g ? scope[id] === void 0 ? scope[id] = defaultPending : --scope[id] || fn(scope) : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
|
1067
1070
|
};
|
1068
1071
|
}
|
1069
1072
|
function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
@@ -1073,7 +1076,7 @@ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
|
1073
1076
|
ownerScope,
|
1074
1077
|
() => {
|
1075
1078
|
for (let scope of scopes)
|
1076
|
-
!scope.
|
1079
|
+
!scope.g && !scope.q && childSignal(scope);
|
1077
1080
|
},
|
1078
1081
|
-1,
|
1079
1082
|
0,
|
@@ -1085,7 +1088,7 @@ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
|
1085
1088
|
function conditionalClosure(valueAccessor, ownerConditionalNodeAccessor, branch, fn) {
|
1086
1089
|
let childSignal = closure(valueAccessor, fn), scopeAccessor = ownerConditionalNodeAccessor + "!" /* ConditionalScope */, branchAccessor = ownerConditionalNodeAccessor + "(" /* ConditionalRenderer */, ownerSignal = (scope) => {
|
1087
1090
|
let ifScope = scope[scopeAccessor];
|
1088
|
-
ifScope && !ifScope.
|
1091
|
+
ifScope && !ifScope.g && scope[branchAccessor] === branch && queueRender(ifScope, childSignal, -1);
|
1089
1092
|
};
|
1090
1093
|
return ownerSignal._ = childSignal, ownerSignal;
|
1091
1094
|
}
|
@@ -1097,13 +1100,13 @@ function subscribeToScopeSet(ownerScope, accessor, scope) {
|
|
1097
1100
|
));
|
1098
1101
|
}
|
1099
1102
|
function dynamicClosure(...closureSignals) {
|
1100
|
-
let [{
|
1103
|
+
let [{ y: ___scopeInstancesAccessor, z: ___signalIndexAccessor }] = closureSignals;
|
1101
1104
|
for (let i = closureSignals.length; i--; )
|
1102
|
-
closureSignals[i].
|
1105
|
+
closureSignals[i].C = i;
|
1103
1106
|
return (scope) => {
|
1104
1107
|
if (scope[___scopeInstancesAccessor])
|
1105
1108
|
for (let childScope of scope[___scopeInstancesAccessor])
|
1106
|
-
childScope.
|
1109
|
+
childScope.g || queueRender(
|
1107
1110
|
childScope,
|
1108
1111
|
closureSignals[childScope[___signalIndexAccessor]],
|
1109
1112
|
-1
|
@@ -1112,13 +1115,13 @@ function dynamicClosure(...closureSignals) {
|
|
1112
1115
|
}
|
1113
1116
|
function dynamicClosureRead(valueAccessor, fn, getOwnerScope) {
|
1114
1117
|
let childSignal = closure(valueAccessor, fn, getOwnerScope), closureSignal = (scope) => {
|
1115
|
-
scope[closureSignal.
|
1118
|
+
scope[closureSignal.z] = closureSignal.C, childSignal(scope), subscribeToScopeSet(
|
1116
1119
|
getOwnerScope ? getOwnerScope(scope) : scope._,
|
1117
|
-
closureSignal.
|
1120
|
+
closureSignal.y,
|
1118
1121
|
scope
|
1119
1122
|
);
|
1120
1123
|
};
|
1121
|
-
return closureSignal.
|
1124
|
+
return closureSignal.y = valueAccessor + "!" /* ClosureScopes */, closureSignal.z = valueAccessor + "(" /* ClosureSignalIndex */, closureSignal;
|
1122
1125
|
}
|
1123
1126
|
function closure(valueAccessor, fn, getOwnerScope) {
|
1124
1127
|
return (scope) => {
|
@@ -1189,15 +1192,15 @@ var dynamicTag = function(nodeAccessor, getContent, getTagVar, inputIsArgs) {
|
|
1189
1192
|
0,
|
1190
1193
|
content,
|
1191
1194
|
createAndSetupBranch
|
1192
|
-
), content.
|
1195
|
+
), content.l && subscribeToScopeSet(
|
1196
|
+
content.k,
|
1193
1197
|
content.l,
|
1194
|
-
content.m,
|
1195
1198
|
scope[childScopeAccessor][0 + "!" /* ConditionalScope */]
|
1196
1199
|
);
|
1197
1200
|
}
|
1198
|
-
} else normalizedRenderer?.
|
1201
|
+
} else normalizedRenderer?.l && subscribeToScopeSet(
|
1202
|
+
normalizedRenderer.k,
|
1199
1203
|
normalizedRenderer.l,
|
1200
|
-
normalizedRenderer.m,
|
1201
1204
|
scope[childScopeAccessor]
|
1202
1205
|
);
|
1203
1206
|
if (normalizedRenderer) {
|
@@ -1303,7 +1306,7 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
|
|
1303
1306
|
register(RENDERER_REGISTER_ID, fn);
|
1304
1307
|
},
|
1305
1308
|
isRenderer(renderer) {
|
1306
|
-
return renderer.
|
1309
|
+
return renderer.n;
|
1307
1310
|
},
|
1308
1311
|
getStartNode(branch) {
|
1309
1312
|
return branch.a;
|
@@ -1328,7 +1331,7 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
|
|
1328
1331
|
},
|
1329
1332
|
createRenderer(params, clone) {
|
1330
1333
|
let renderer = createRenderer(0, 0, 0, params);
|
1331
|
-
return renderer.
|
1334
|
+
return renderer.n = (branch) => {
|
1332
1335
|
let cloned = clone();
|
1333
1336
|
branch.a = cloned.startNode, branch.b = cloned.endNode;
|
1334
1337
|
}, renderer;
|
@@ -1343,10 +1346,10 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
|
|
1343
1346
|
normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
1344
1347
|
}
|
1345
1348
|
if (component.effects = prepareEffects(() => {
|
1346
|
-
branch ? existing = !0 : (out.global.
|
1349
|
+
branch ? existing = !0 : (out.global.f ||= 0, branch = component.scope = createAndSetupBranch(
|
1347
1350
|
out.global,
|
1348
1351
|
renderer,
|
1349
|
-
renderer.
|
1352
|
+
renderer.k,
|
1350
1353
|
document.body
|
1351
1354
|
)), renderer.e?.(branch, renderer._ ? args[0] : args);
|
1352
1355
|
}), !existing)
|
@@ -1368,12 +1371,12 @@ var createTemplate = (id, template, walks, setup, inputSignal) => {
|
|
1368
1371
|
function mount(input = {}, reference, position) {
|
1369
1372
|
let branch, parentNode = reference, nextSibling = null, { $global } = input;
|
1370
1373
|
switch ($global ? ({ $global, ...input } = input, $global = {
|
1371
|
-
|
1374
|
+
f: 0,
|
1372
1375
|
runtimeId: DEFAULT_RUNTIME_ID,
|
1373
1376
|
renderId: DEFAULT_RENDER_ID,
|
1374
1377
|
...$global
|
1375
1378
|
}) : $global = {
|
1376
|
-
|
1379
|
+
f: 0,
|
1377
1380
|
runtimeId: DEFAULT_RUNTIME_ID,
|
1378
1381
|
renderId: DEFAULT_RENDER_ID
|
1379
1382
|
}, position) {
|
@@ -1393,7 +1396,7 @@ function mount(input = {}, reference, position) {
|
|
1393
1396
|
this,
|
1394
1397
|
void 0,
|
1395
1398
|
parentNode
|
1396
|
-
), this.
|
1399
|
+
), this.o?.(branch), args?.(branch, input);
|
1397
1400
|
});
|
1398
1401
|
return insertChildNodes(
|
1399
1402
|
parentNode,
|