@marko/runtime-tags 6.0.110 → 6.0.111
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 +21 -36
- package/dist/debug/dom.mjs +21 -36
- package/dist/dom.js +33 -42
- package/dist/dom.mjs +33 -42
- package/package.json +1 -1
package/dist/debug/dom.js
CHANGED
|
@@ -535,19 +535,20 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
535
535
|
const serializeContext = {
|
|
536
536
|
_: registeredValues
|
|
537
537
|
};
|
|
538
|
-
const visitBranches = branchesEnabled && /* @__PURE__ */ (() => {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
538
|
+
const visitBranches = branchesEnabled && /* @__PURE__ */ ((branchScopesStack = [], branchStarts = [], orphanBranches = [], curBranchScopes) => {
|
|
539
|
+
return (branchId, branch, childBranch, endedBranches, accessor, singleNode, parent = visit.parentNode, startVisit = visit, i = orphanBranches.length) => {
|
|
540
|
+
if (visitType !== "[" /* BranchStart */) {
|
|
541
|
+
visitScope["Getter:" /* Getter */ + nextToken(
|
|
542
|
+
/* read accessor */
|
|
543
|
+
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
544
|
+
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? parent : visit
|
|
545
|
+
);
|
|
546
|
+
accessor = "BranchScopes:" /* BranchScopes */ + lastToken;
|
|
547
|
+
singleNode = visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */;
|
|
548
|
+
nextToken(
|
|
549
|
+
/* read optional first branchId */
|
|
550
|
+
);
|
|
551
|
+
}
|
|
551
552
|
while (branchId = +lastToken) {
|
|
552
553
|
(endedBranches ||= []).push(
|
|
553
554
|
branch = scopeLookup[branchId] ||= {
|
|
@@ -592,33 +593,16 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
592
593
|
visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0];
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
|
-
};
|
|
596
|
-
return () => {
|
|
597
596
|
if (visitType === "[" /* BranchStart */) {
|
|
598
|
-
if (
|
|
599
|
-
endBranch();
|
|
600
|
-
} else {
|
|
597
|
+
if (!endedBranches) {
|
|
601
598
|
branchScopesStack.push(curBranchScopes);
|
|
602
599
|
curBranchScopes = void 0;
|
|
603
600
|
}
|
|
604
601
|
branchStarts.push(visit);
|
|
605
|
-
} else {
|
|
606
|
-
visitScope["Getter:" /* Getter */ + nextToken(
|
|
607
|
-
/* read accessor */
|
|
608
|
-
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
609
|
-
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit
|
|
610
|
-
);
|
|
611
|
-
endBranch(
|
|
612
|
-
"BranchScopes:" /* BranchScopes */ + lastToken,
|
|
613
|
-
(nextToken(
|
|
614
|
-
/* read optional first branchId */
|
|
615
|
-
), visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */)
|
|
616
|
-
);
|
|
617
602
|
}
|
|
618
603
|
};
|
|
619
604
|
})();
|
|
620
605
|
let $global;
|
|
621
|
-
let lastScopeId = 0;
|
|
622
606
|
let lastEffect;
|
|
623
607
|
let visits;
|
|
624
608
|
let resumes;
|
|
@@ -628,12 +612,13 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
628
612
|
let visitScope;
|
|
629
613
|
let lastToken;
|
|
630
614
|
let lastTokenIndex;
|
|
615
|
+
let lastScopeId = 0;
|
|
631
616
|
const nextToken = () => lastToken = visitText.slice(
|
|
632
617
|
lastTokenIndex,
|
|
633
618
|
// eslint-disable-next-line no-cond-assign
|
|
634
619
|
(lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1) ? lastTokenIndex - 1 : visitText.length
|
|
635
620
|
);
|
|
636
|
-
render.w = () => {
|
|
621
|
+
render.w = (effects = []) => {
|
|
637
622
|
try {
|
|
638
623
|
walk2();
|
|
639
624
|
isResuming = 1;
|
|
@@ -641,11 +626,11 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
641
626
|
if (typeof serialized === "string") {
|
|
642
627
|
lastEffect = serialized;
|
|
643
628
|
} else if (typeof serialized === "number") {
|
|
644
|
-
|
|
629
|
+
effects.push(
|
|
630
|
+
registeredValues[lastEffect],
|
|
645
631
|
scopeLookup[serialized] ||= {
|
|
646
632
|
["#Id" /* Id */]: serialized
|
|
647
|
-
}
|
|
648
|
-
registeredValues[lastEffect]
|
|
633
|
+
}
|
|
649
634
|
);
|
|
650
635
|
} else {
|
|
651
636
|
for (const scope of serialized(serializeContext)) {
|
|
@@ -680,7 +665,7 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
680
665
|
visitBranches();
|
|
681
666
|
}
|
|
682
667
|
}
|
|
683
|
-
|
|
668
|
+
runEffects(effects);
|
|
684
669
|
} finally {
|
|
685
670
|
isResuming = visits.length = resumes.length = 0;
|
|
686
671
|
}
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -432,19 +432,20 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
432
432
|
const serializeContext = {
|
|
433
433
|
_: registeredValues
|
|
434
434
|
};
|
|
435
|
-
const visitBranches = branchesEnabled && /* @__PURE__ */ (() => {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
435
|
+
const visitBranches = branchesEnabled && /* @__PURE__ */ ((branchScopesStack = [], branchStarts = [], orphanBranches = [], curBranchScopes) => {
|
|
436
|
+
return (branchId, branch, childBranch, endedBranches, accessor, singleNode, parent = visit.parentNode, startVisit = visit, i = orphanBranches.length) => {
|
|
437
|
+
if (visitType !== "[" /* BranchStart */) {
|
|
438
|
+
visitScope["Getter:" /* Getter */ + nextToken(
|
|
439
|
+
/* read accessor */
|
|
440
|
+
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
441
|
+
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? parent : visit
|
|
442
|
+
);
|
|
443
|
+
accessor = "BranchScopes:" /* BranchScopes */ + lastToken;
|
|
444
|
+
singleNode = visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */;
|
|
445
|
+
nextToken(
|
|
446
|
+
/* read optional first branchId */
|
|
447
|
+
);
|
|
448
|
+
}
|
|
448
449
|
while (branchId = +lastToken) {
|
|
449
450
|
(endedBranches ||= []).push(
|
|
450
451
|
branch = scopeLookup[branchId] ||= {
|
|
@@ -489,33 +490,16 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
489
490
|
visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0];
|
|
490
491
|
}
|
|
491
492
|
}
|
|
492
|
-
};
|
|
493
|
-
return () => {
|
|
494
493
|
if (visitType === "[" /* BranchStart */) {
|
|
495
|
-
if (
|
|
496
|
-
endBranch();
|
|
497
|
-
} else {
|
|
494
|
+
if (!endedBranches) {
|
|
498
495
|
branchScopesStack.push(curBranchScopes);
|
|
499
496
|
curBranchScopes = void 0;
|
|
500
497
|
}
|
|
501
498
|
branchStarts.push(visit);
|
|
502
|
-
} else {
|
|
503
|
-
visitScope["Getter:" /* Getter */ + nextToken(
|
|
504
|
-
/* read accessor */
|
|
505
|
-
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
506
|
-
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit
|
|
507
|
-
);
|
|
508
|
-
endBranch(
|
|
509
|
-
"BranchScopes:" /* BranchScopes */ + lastToken,
|
|
510
|
-
(nextToken(
|
|
511
|
-
/* read optional first branchId */
|
|
512
|
-
), visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */)
|
|
513
|
-
);
|
|
514
499
|
}
|
|
515
500
|
};
|
|
516
501
|
})();
|
|
517
502
|
let $global;
|
|
518
|
-
let lastScopeId = 0;
|
|
519
503
|
let lastEffect;
|
|
520
504
|
let visits;
|
|
521
505
|
let resumes;
|
|
@@ -525,12 +509,13 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
525
509
|
let visitScope;
|
|
526
510
|
let lastToken;
|
|
527
511
|
let lastTokenIndex;
|
|
512
|
+
let lastScopeId = 0;
|
|
528
513
|
const nextToken = () => lastToken = visitText.slice(
|
|
529
514
|
lastTokenIndex,
|
|
530
515
|
// eslint-disable-next-line no-cond-assign
|
|
531
516
|
(lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1) ? lastTokenIndex - 1 : visitText.length
|
|
532
517
|
);
|
|
533
|
-
render.w = () => {
|
|
518
|
+
render.w = (effects = []) => {
|
|
534
519
|
try {
|
|
535
520
|
walk2();
|
|
536
521
|
isResuming = 1;
|
|
@@ -538,11 +523,11 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
538
523
|
if (typeof serialized === "string") {
|
|
539
524
|
lastEffect = serialized;
|
|
540
525
|
} else if (typeof serialized === "number") {
|
|
541
|
-
|
|
526
|
+
effects.push(
|
|
527
|
+
registeredValues[lastEffect],
|
|
542
528
|
scopeLookup[serialized] ||= {
|
|
543
529
|
["#Id" /* Id */]: serialized
|
|
544
|
-
}
|
|
545
|
-
registeredValues[lastEffect]
|
|
530
|
+
}
|
|
546
531
|
);
|
|
547
532
|
} else {
|
|
548
533
|
for (const scope of serialized(serializeContext)) {
|
|
@@ -577,7 +562,7 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
|
|
|
577
562
|
visitBranches();
|
|
578
563
|
}
|
|
579
564
|
}
|
|
580
|
-
|
|
565
|
+
runEffects(effects);
|
|
581
566
|
} finally {
|
|
582
567
|
isResuming = visits.length = resumes.length = 0;
|
|
583
568
|
}
|
package/dist/dom.js
CHANGED
|
@@ -342,60 +342,51 @@ function init(runtimeId = "M") {
|
|
|
342
342
|
value: resumeRender = ((renderId) => {
|
|
343
343
|
let render = resumeRender[renderId] = renders2[renderId] || renders2(renderId), walk2 = render.w, scopeLookup = render.s = {}, serializeContext = {
|
|
344
344
|
_: registeredValues
|
|
345
|
-
}, visitBranches = branchesEnabled && /* @__PURE__ */ (() => {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
345
|
+
}, visitBranches = branchesEnabled && /* @__PURE__ */ ((branchScopesStack = [], branchStarts = [], orphanBranches = [], curBranchScopes) => (branchId, branch, childBranch, endedBranches, accessor, singleNode, parent = visit.parentNode, startVisit = visit, i = orphanBranches.length) => {
|
|
346
|
+
for (visitType !== "[" /* BranchStart */ && (visitScope["J" /* Getter */ + nextToken(
|
|
347
|
+
/* read accessor */
|
|
348
|
+
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
349
|
+
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? parent : visit
|
|
350
|
+
), accessor = "A" /* BranchScopes */ + lastToken, singleNode = visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */, nextToken(
|
|
351
|
+
/* read optional first branchId */
|
|
352
|
+
)); branchId = +lastToken; ) {
|
|
353
|
+
if ((endedBranches ||= []).push(
|
|
354
|
+
branch = scopeLookup[branchId] ||= {
|
|
355
|
+
L: branchId
|
|
356
|
+
}
|
|
357
|
+
), branch.F = branch, singleNode) {
|
|
358
|
+
for (; startVisit.previousSibling && ~visits.indexOf(
|
|
359
|
+
startVisit = startVisit.previousSibling
|
|
360
|
+
); ) ;
|
|
361
|
+
branch.K = branch.S = startVisit, visitType === "'" /* BranchEndNativeTag */ && (branch.a = startVisit);
|
|
362
|
+
} else
|
|
363
|
+
curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
|
|
364
|
+
for (; i && orphanBranches[--i].L > branchId; )
|
|
365
|
+
(childBranch = orphanBranches.pop()).N = branch, (branch.D ||= /* @__PURE__ */ new Set()).add(
|
|
366
|
+
childBranch
|
|
366
367
|
);
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
374
|
-
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit
|
|
375
|
-
), endBranch(
|
|
376
|
-
"A" /* BranchScopes */ + lastToken,
|
|
377
|
-
(nextToken(
|
|
378
|
-
/* read optional first branchId */
|
|
379
|
-
), visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */)
|
|
380
|
-
));
|
|
381
|
-
};
|
|
382
|
-
})(), $global, lastScopeId = 0, lastEffect, visits, resumes, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, nextToken = () => lastToken = visitText.slice(
|
|
368
|
+
nextToken(
|
|
369
|
+
/* read optional next branchId */
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
endedBranches && (orphanBranches.push(...endedBranches), singleNode && (visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0])), visitType === "[" /* BranchStart */ && (endedBranches || (branchScopesStack.push(curBranchScopes), curBranchScopes = void 0), branchStarts.push(visit));
|
|
373
|
+
})(), $global, lastEffect, visits, resumes, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, lastScopeId = 0, nextToken = () => lastToken = visitText.slice(
|
|
383
374
|
lastTokenIndex,
|
|
384
375
|
// eslint-disable-next-line no-cond-assign
|
|
385
376
|
(lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1) ? lastTokenIndex - 1 : visitText.length
|
|
386
377
|
);
|
|
387
|
-
return render.w = () => {
|
|
378
|
+
return render.w = (effects = []) => {
|
|
388
379
|
try {
|
|
389
380
|
walk2(), isResuming = 1;
|
|
390
381
|
for (let serialized of resumes = render.r || [])
|
|
391
382
|
if (typeof serialized == "string")
|
|
392
383
|
lastEffect = serialized;
|
|
393
384
|
else if (typeof serialized == "number")
|
|
394
|
-
|
|
385
|
+
effects.push(
|
|
386
|
+
registeredValues[lastEffect],
|
|
395
387
|
scopeLookup[serialized] ||= {
|
|
396
388
|
L: serialized
|
|
397
|
-
}
|
|
398
|
-
registeredValues[lastEffect]
|
|
389
|
+
}
|
|
399
390
|
);
|
|
400
391
|
else
|
|
401
392
|
for (let scope of serialized(serializeContext))
|
|
@@ -406,7 +397,7 @@ function init(runtimeId = "M") {
|
|
|
406
397
|
)] ||= {
|
|
407
398
|
L: +lastToken
|
|
408
399
|
}, visitType === "*" /* Node */ ? visitScope["J" /* Getter */ + nextToken()] = /* @__PURE__ */ ((node) => () => node)(visitScope[lastToken] = visit.previousSibling) : branchesEnabled && visitBranches();
|
|
409
|
-
|
|
400
|
+
runEffects(effects);
|
|
410
401
|
} finally {
|
|
411
402
|
isResuming = visits.length = resumes.length = 0;
|
|
412
403
|
}
|
package/dist/dom.mjs
CHANGED
|
@@ -242,60 +242,51 @@ function init(runtimeId = "M") {
|
|
|
242
242
|
value: resumeRender = ((renderId) => {
|
|
243
243
|
let render = resumeRender[renderId] = renders2[renderId] || renders2(renderId), walk2 = render.w, scopeLookup = render.s = {}, serializeContext = {
|
|
244
244
|
_: registeredValues
|
|
245
|
-
}, visitBranches = branchesEnabled && /* @__PURE__ */ (() => {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
245
|
+
}, visitBranches = branchesEnabled && /* @__PURE__ */ ((branchScopesStack = [], branchStarts = [], orphanBranches = [], curBranchScopes) => (branchId, branch, childBranch, endedBranches, accessor, singleNode, parent = visit.parentNode, startVisit = visit, i = orphanBranches.length) => {
|
|
246
|
+
for (visitType !== "[" /* BranchStart */ && (visitScope["J" /* Getter */ + nextToken(
|
|
247
|
+
/* read accessor */
|
|
248
|
+
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
249
|
+
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? parent : visit
|
|
250
|
+
), accessor = "A" /* BranchScopes */ + lastToken, singleNode = visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */, nextToken(
|
|
251
|
+
/* read optional first branchId */
|
|
252
|
+
)); branchId = +lastToken; ) {
|
|
253
|
+
if ((endedBranches ||= []).push(
|
|
254
|
+
branch = scopeLookup[branchId] ||= {
|
|
255
|
+
L: branchId
|
|
256
|
+
}
|
|
257
|
+
), branch.F = branch, singleNode) {
|
|
258
|
+
for (; startVisit.previousSibling && ~visits.indexOf(
|
|
259
|
+
startVisit = startVisit.previousSibling
|
|
260
|
+
); ) ;
|
|
261
|
+
branch.K = branch.S = startVisit, visitType === "'" /* BranchEndNativeTag */ && (branch.a = startVisit);
|
|
262
|
+
} else
|
|
263
|
+
curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
|
|
264
|
+
for (; i && orphanBranches[--i].L > branchId; )
|
|
265
|
+
(childBranch = orphanBranches.pop()).N = branch, (branch.D ||= /* @__PURE__ */ new Set()).add(
|
|
266
|
+
childBranch
|
|
266
267
|
);
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
)] = /* @__PURE__ */ ((node) => () => node)(
|
|
274
|
-
visitScope[lastToken] = visitType === ")" /* BranchEndOnlyChildInParent */ || visitType === "}" /* BranchEndSingleNodeOnlyChildInParent */ ? visit.parentNode : visit
|
|
275
|
-
), endBranch(
|
|
276
|
-
"A" /* BranchScopes */ + lastToken,
|
|
277
|
-
(nextToken(
|
|
278
|
-
/* read optional first branchId */
|
|
279
|
-
), visitType !== "]" /* BranchEnd */ && visitType !== ")" /* BranchEndOnlyChildInParent */)
|
|
280
|
-
));
|
|
281
|
-
};
|
|
282
|
-
})(), $global, lastScopeId = 0, lastEffect, visits, resumes, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, nextToken = () => lastToken = visitText.slice(
|
|
268
|
+
nextToken(
|
|
269
|
+
/* read optional next branchId */
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
endedBranches && (orphanBranches.push(...endedBranches), singleNode && (visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0])), visitType === "[" /* BranchStart */ && (endedBranches || (branchScopesStack.push(curBranchScopes), curBranchScopes = void 0), branchStarts.push(visit));
|
|
273
|
+
})(), $global, lastEffect, visits, resumes, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, lastScopeId = 0, nextToken = () => lastToken = visitText.slice(
|
|
283
274
|
lastTokenIndex,
|
|
284
275
|
// eslint-disable-next-line no-cond-assign
|
|
285
276
|
(lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1) ? lastTokenIndex - 1 : visitText.length
|
|
286
277
|
);
|
|
287
|
-
return render.w = () => {
|
|
278
|
+
return render.w = (effects = []) => {
|
|
288
279
|
try {
|
|
289
280
|
walk2(), isResuming = 1;
|
|
290
281
|
for (let serialized of resumes = render.r || [])
|
|
291
282
|
if (typeof serialized == "string")
|
|
292
283
|
lastEffect = serialized;
|
|
293
284
|
else if (typeof serialized == "number")
|
|
294
|
-
|
|
285
|
+
effects.push(
|
|
286
|
+
registeredValues[lastEffect],
|
|
295
287
|
scopeLookup[serialized] ||= {
|
|
296
288
|
L: serialized
|
|
297
|
-
}
|
|
298
|
-
registeredValues[lastEffect]
|
|
289
|
+
}
|
|
299
290
|
);
|
|
300
291
|
else
|
|
301
292
|
for (let scope of serialized(serializeContext))
|
|
@@ -306,7 +297,7 @@ function init(runtimeId = "M") {
|
|
|
306
297
|
)] ||= {
|
|
307
298
|
L: +lastToken
|
|
308
299
|
}, visitType === "*" /* Node */ ? visitScope["J" /* Getter */ + nextToken()] = /* @__PURE__ */ ((node) => () => node)(visitScope[lastToken] = visit.previousSibling) : branchesEnabled && visitBranches();
|
|
309
|
-
|
|
300
|
+
runEffects(effects);
|
|
310
301
|
} finally {
|
|
311
302
|
isResuming = visits.length = resumes.length = 0;
|
|
312
303
|
}
|