marko 6.4.2 → 6.4.3

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.
Files changed (63) hide show
  1. package/dist/common/constants/accessor-prop.d.ts +1 -0
  2. package/dist/common/constants/accessor-prop.debug.d.ts +1 -0
  3. package/dist/common/types.d.ts +1 -0
  4. package/dist/debug/dom/catch.feat.js +1 -1
  5. package/dist/debug/dom/catch.feat.mjs +1 -1
  6. package/dist/debug/dom/controllable-input.feat.js +1 -1
  7. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  8. package/dist/debug/dom/controllable-open.feat.js +1 -1
  9. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  10. package/dist/debug/dom/controllable-select.feat.js +1 -1
  11. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  12. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  13. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  14. package/dist/debug/dom/controllable.feat.js +1 -1
  15. package/dist/debug/dom/controllable.feat.mjs +1 -1
  16. package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
  17. package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
  18. package/dist/debug/dom/dynamic-tag-var.feat.js +6 -2
  19. package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -2
  20. package/dist/debug/dom/lazy.feat.js +1 -1
  21. package/dist/debug/dom/lazy.feat.mjs +1 -1
  22. package/dist/debug/dom/placeholder.feat.js +1 -1
  23. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  24. package/dist/debug/{dom-BLbR0hEx.js → dom-C7F3yZTh.js} +89 -24
  25. package/dist/debug/{dom-Cii0IA92.mjs → dom-uEY0J_H9.mjs} +60 -25
  26. package/dist/debug/dom.js +10 -1
  27. package/dist/debug/dom.mjs +10 -2
  28. package/dist/debug/html.js +13 -7
  29. package/dist/debug/html.mjs +13 -7
  30. package/dist/dom/catch.feat.js +4 -4
  31. package/dist/dom/catch.feat.mjs +1 -1
  32. package/dist/dom/control-flow.d.ts +2 -2
  33. package/dist/dom/controllable-input.feat.js +2 -2
  34. package/dist/dom/controllable-input.feat.mjs +1 -1
  35. package/dist/dom/controllable-open.feat.js +2 -2
  36. package/dist/dom/controllable-open.feat.mjs +1 -1
  37. package/dist/dom/controllable-select.feat.js +2 -2
  38. package/dist/dom/controllable-select.feat.mjs +1 -1
  39. package/dist/dom/controllable-textarea.feat.js +2 -2
  40. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  41. package/dist/dom/controllable.feat.js +2 -2
  42. package/dist/dom/controllable.feat.mjs +1 -1
  43. package/dist/dom/dynamic-tag-script.feat.js +2 -2
  44. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  45. package/dist/dom/dynamic-tag-var.feat.js +4 -2
  46. package/dist/dom/dynamic-tag-var.feat.mjs +4 -3
  47. package/dist/dom/lazy.feat.js +1 -1
  48. package/dist/dom/lazy.feat.mjs +1 -1
  49. package/dist/dom/load.d.ts +1 -0
  50. package/dist/dom/placeholder.feat.js +3 -3
  51. package/dist/dom/placeholder.feat.mjs +1 -1
  52. package/dist/dom/queue.d.ts +4 -1
  53. package/dist/{dom-B8UEYzOz.js → dom-CtIT8Mpr.js} +184 -140
  54. package/dist/{dom-BPjLe6YU.mjs → dom-DHg9YChM.mjs} +51 -27
  55. package/dist/dom.d.ts +1 -1
  56. package/dist/dom.js +39 -33
  57. package/dist/dom.mjs +8 -2
  58. package/dist/html/writer.d.ts +1 -1
  59. package/dist/html.js +18 -8
  60. package/dist/html.mjs +18 -8
  61. package/dist/translator/index.js +28 -23
  62. package/package.json +2 -2
  63. package/tags-html.d.ts +6 -5
@@ -4,6 +4,7 @@ export declare const AbortControllers = "A";
4
4
  export declare const AbortScopes = "B";
5
5
  export declare const AwaitCounter = "O";
6
6
  export declare const BranchAccessor = "C";
7
+ export declare const BranchRenders = "BR";
7
8
  export declare const BranchScopes = "D";
8
9
  export declare const CatchContent = "E";
9
10
  export declare const ClosestBranch = "F";
@@ -4,6 +4,7 @@ export declare const AbortControllers = "#AbortControllers";
4
4
  export declare const AbortScopes = "#AbortScopes";
5
5
  export declare const AwaitCounter = "#AwaitCounter";
6
6
  export declare const BranchAccessor = "#BranchAccessor";
7
+ export declare const BranchRenders = "#BranchRenders";
7
8
  export declare const BranchScopes = "#BranchScopes";
8
9
  export declare const CatchContent = "#CatchContent";
9
10
  export declare const ClosestBranch = "#ClosestBranch";
@@ -21,6 +21,7 @@ export interface BranchScope extends Scope {
21
21
  [AccessorProp.PlaceholderBranch]: BranchScope | undefined | 0;
22
22
  [AccessorProp.TryBranch]: BranchScope | undefined;
23
23
  [AccessorProp.PendingRenders]: PendingRender[] | 0 | undefined;
24
+ [AccessorProp.BranchRenders]: PendingRender | undefined;
24
25
  [AccessorProp.DetachedAwait]: Renderer | 0 | undefined;
25
26
  [AccessorProp.PendingScopes]: Scope[] | void;
26
27
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/catch.feat.ts
4
4
  const handlePendingTry = (fn, scope, branch) => {
5
5
  while (branch) {
@@ -1,4 +1,4 @@
1
- import { In as ParentBranch, Ln as PendingEffectScopes, On as Pending, Rn as PendingEffects, b as runPendingEffects, cn as queueAsyncRender, jn as ClosestBranch, kn as Scope, ln as queueEffect, on as installCatch, y as renderCatch, zn as PendingRenders } from "../dom-Cii0IA92.mjs";
1
+ import { Hn as PendingEffectScopes, In as ClosestBranch, Mn as Pending, Nn as Scope, Un as PendingEffects, Vn as ParentBranch, Wn as PendingRenders, b as renderCatch, fn as queueAsyncRender, pn as queueEffect, un as installCatch, x as runPendingEffects } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/catch.feat.ts
3
3
  const handlePendingTry = (fn, scope, branch) => {
4
4
  while (branch) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/controllable-input.feat.ts
4
4
  require_control_flow.controllableScripts[0] = require_control_flow._attr_input_checked_script;
5
5
  require_control_flow.controllableScripts[1] = require_control_flow._attr_input_checkedValue_script;
@@ -1,4 +1,4 @@
1
- import { D as _attr_input_checkedValue_script, P as _attr_input_value_script, U as controllableScripts, k as _attr_input_checked_script } from "../dom-Cii0IA92.mjs";
1
+ import { A as _attr_input_checked_script, F as _attr_input_value_script, O as _attr_input_checkedValue_script, W as controllableScripts } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/controllable-input.feat.ts
3
3
  controllableScripts[0] = _attr_input_checked_script;
4
4
  controllableScripts[1] = _attr_input_checkedValue_script;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/controllable-open.feat.ts
4
4
  require_control_flow.controllableScripts[4] = require_control_flow._attr_details_or_dialog_open_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { C as _attr_details_or_dialog_open_script, U as controllableScripts } from "../dom-Cii0IA92.mjs";
1
+ import { W as controllableScripts, w as _attr_details_or_dialog_open_script } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/controllable-open.feat.ts
3
3
  controllableScripts[4] = _attr_details_or_dialog_open_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/controllable-select.feat.ts
4
4
  require_control_flow.controllableScripts[3] = require_control_flow._attr_select_value_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { L as _attr_select_value_script, U as controllableScripts } from "../dom-Cii0IA92.mjs";
1
+ import { R as _attr_select_value_script, W as controllableScripts } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/controllable-select.feat.ts
3
3
  controllableScripts[3] = _attr_select_value_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/controllable-textarea.feat.ts
4
4
  require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { P as _attr_input_value_script, U as controllableScripts } from "../dom-Cii0IA92.mjs";
1
+ import { F as _attr_input_value_script, W as controllableScripts } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/controllable-textarea.feat.ts
3
3
  controllableScripts[2] = _attr_input_value_script;
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  require("./controllable-input.feat.js");
4
4
  require("./controllable-open.feat.js");
5
5
  require("./controllable-select.feat.js");
@@ -1,4 +1,4 @@
1
- import { B as _controllable_select, H as controllableRenders, R as _controllable_input, V as _controllable_textarea, z as _controllable_open } from "../dom-Cii0IA92.mjs";
1
+ import { B as _controllable_open, H as _controllable_textarea, U as controllableRenders, V as _controllable_select, z as _controllable_input } from "../dom-uEY0J_H9.mjs";
2
2
  import "./controllable-input.feat.mjs";
3
3
  import "./controllable-open.feat.mjs";
4
4
  import "./controllable-select.feat.mjs";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/dynamic-tag-script.feat.ts
4
4
  require_control_flow._resumed[require_control_flow.DYNAMIC_TAG_SCRIPT_REGISTER_ID] = require_control_flow.withBranches(require_control_flow.dynamicTagScript);
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { Cn as withBranches, St as _resumed, g as dynamicTagScript, tn as DYNAMIC_TAG_SCRIPT_REGISTER_ID } from "../dom-Cii0IA92.mjs";
1
+ import { Dn as withBranches, _ as dynamicTagScript, rn as DYNAMIC_TAG_SCRIPT_REGISTER_ID, wt as _resumed } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/dynamic-tag-script.feat.ts
3
3
  _resumed[DYNAMIC_TAG_SCRIPT_REGISTER_ID] = withBranches(dynamicTagScript);
4
4
  //#endregion
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/dynamic-tag-var.feat.ts
4
- require_control_flow.installDynamicTagVar((branch) => branch[require_control_flow.TagVariable](() => require_control_flow._el_read(branch[require_control_flow.StartNode])));
4
+ require_control_flow.installBranchRenders();
5
+ require_control_flow.installDynamicTagVar((scope, branch, scopeKey, renderer) => {
6
+ branch[require_control_flow.BranchRenders] = require_control_flow.createBranchRenders(scope, scopeKey);
7
+ if (typeof renderer === "string") branch[require_control_flow.TagVariable](() => require_control_flow._el_read(branch[require_control_flow.StartNode]));
8
+ });
5
9
  //#endregion
@@ -1,4 +1,8 @@
1
- import { Hn as TagVariable, Pt as _el_read, Vn as StartNode, _ as installDynamicTagVar } from "../dom-Cii0IA92.mjs";
1
+ import { Fn as BranchRenders, It as _el_read, Kn as StartNode, cn as createBranchRenders, ln as installBranchRenders, qn as TagVariable, v as installDynamicTagVar } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/dynamic-tag-var.feat.ts
3
- installDynamicTagVar((branch) => branch[TagVariable](() => _el_read(branch[StartNode])));
3
+ installBranchRenders();
4
+ installDynamicTagVar((scope, branch, scopeKey, renderer) => {
5
+ branch[BranchRenders] = createBranchRenders(scope, scopeKey);
6
+ if (typeof renderer === "string") branch[TagVariable](() => _el_read(branch[StartNode]));
7
+ });
4
8
  //#endregion
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  //#region src/dom/lazy.feat.ts
3
- require("../dom-BLbR0hEx.js").withLazy();
3
+ require("../dom-C7F3yZTh.js").withLazy();
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { kt as withLazy } from "../dom-Cii0IA92.mjs";
1
+ import { jt as withLazy } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/lazy.feat.ts
3
3
  withLazy();
4
4
  //#endregion
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-BLbR0hEx.js");
2
+ const require_control_flow = require("../dom-C7F3yZTh.js");
3
3
  //#region src/dom/placeholder.feat.ts
4
4
  require_control_flow._resumed[require_control_flow.PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
5
5
  if (tryBranch["#PlaceholderBranch"]) {
@@ -1,4 +1,4 @@
1
- import { Bn as PlaceholderBranch, St as _resumed, Zt as destroyBranch, nn as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-Cii0IA92.mjs";
1
+ import { $t as destroyBranch, Gn as PlaceholderBranch, in as PLACEHOLDER_DISMISS_REGISTER_ID, wt as _resumed } from "../dom-uEY0J_H9.mjs";
2
2
  //#region src/dom/placeholder.feat.ts
3
3
  _resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
4
4
  if (tryBranch["#PlaceholderBranch"]) {
@@ -23,6 +23,7 @@ const AbortControllers = "#AbortControllers";
23
23
  const AbortScopes = "#AbortScopes";
24
24
  const AwaitCounter = "#AwaitCounter";
25
25
  const BranchAccessor = "#BranchAccessor";
26
+ const BranchRenders = "#BranchRenders";
26
27
  const BranchScopes = "#BranchScopes";
27
28
  const CatchContent = "#CatchContent";
28
29
  const ClosestBranch = "#ClosestBranch";
@@ -342,16 +343,19 @@ let rendering;
342
343
  let runId = 2;
343
344
  let pendingEffects = [];
344
345
  let pendingRenders = [];
345
- const scopeKeyOffset = 1e6;
346
+ const ranRenders = /*@__PURE__*/ new WeakMap();
346
347
  function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
347
348
  let render;
348
349
  if (signalKey >= 0 && (render = scope[signalKey])) {
349
350
  render[Value] = value;
350
- if (render["gen"] === runId || catchEnabled && render["pending"]) return;
351
+ if (render["gen"] === runId || catchEnabled && render["pending"]) {
352
+ if (!render["pending"] && ranRenders.get(render) === runId) console.error("A render was queued again after it ran in this update, so its latest value is dropped. This is a bug in Marko.");
353
+ return;
354
+ }
351
355
  render["gen"] = runId;
352
356
  } else {
353
357
  render = {
354
- ["key"]: scopeKey * scopeKeyOffset + signalKey,
358
+ ["key"]: scopeKey * 1e6 + signalKey,
355
359
  [Scope]: scope,
356
360
  [Signal]: signal,
357
361
  [Value]: value,
@@ -361,7 +365,7 @@ function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
361
365
  }
362
366
  queuePendingRender(render);
363
367
  }
364
- function queuePendingRender(render) {
368
+ let queuePendingRender = (render) => {
365
369
  let i = pendingRenders.push(render) - 1;
366
370
  while (i) {
367
371
  const parentIndex = i - 1 >> 1;
@@ -371,6 +375,34 @@ function queuePendingRender(render) {
371
375
  i = parentIndex;
372
376
  }
373
377
  pendingRenders[i] = render;
378
+ };
379
+ function createBranchRenders(scope, scopeKey) {
380
+ return {
381
+ ["key"]: scopeKey * 1e6 - 1,
382
+ [Scope]: scope,
383
+ [Signal]: runBranchRenders,
384
+ [Value]: [],
385
+ ["gen"]: 0
386
+ };
387
+ }
388
+ function installBranchRenders() {
389
+ const queue = queuePendingRender;
390
+ queuePendingRender = (render) => {
391
+ const branchRenders = render[Scope][ClosestBranch]?.[BranchRenders];
392
+ if (branchRenders) {
393
+ if (branchRenders["gen"] !== runId && !branchRenders["pending"]) branchRenders[Value] = [];
394
+ branchRenders["gen"] = runId;
395
+ const renders = branchRenders[Value];
396
+ if (!renders.length) queuePendingRender(branchRenders);
397
+ const prev = pendingRenders;
398
+ pendingRenders = renders;
399
+ queue(render);
400
+ pendingRenders = prev;
401
+ } else queue(render);
402
+ };
403
+ }
404
+ function runBranchRenders(_scope, renders) {
405
+ runRenders(renders);
374
406
  }
375
407
  function queueEffect(scope, fn) {
376
408
  pendingEffects.push(fn, scope);
@@ -422,26 +454,27 @@ function installCatch(catchEffects, wrapRender) {
422
454
  runEffects = catchEffects;
423
455
  runRender = wrapRender(runRender);
424
456
  }
425
- function runRenders() {
426
- while (pendingRenders.length) {
427
- const render = pendingRenders[0];
428
- const item = pendingRenders.pop();
457
+ function runRenders(renders = pendingRenders) {
458
+ while (renders.length) {
459
+ const render = renders[0];
460
+ const item = renders.pop();
429
461
  if (render !== item) {
430
462
  let i = 0;
431
- const mid = pendingRenders.length >> 1;
432
- const key = (pendingRenders[0] = item)["key"];
463
+ const mid = renders.length >> 1;
464
+ const key = (renders[0] = item)["key"];
433
465
  while (i < mid) {
434
466
  let bestChild = (i << 1) + 1;
435
467
  const right = bestChild + 1;
436
- if (right < pendingRenders.length && pendingRenders[right]["key"] - pendingRenders[bestChild]["key"] < 0) bestChild = right;
437
- if (pendingRenders[bestChild]["key"] - key >= 0) break;
468
+ if (right < renders.length && renders[right]["key"] - renders[bestChild]["key"] < 0) bestChild = right;
469
+ if (renders[bestChild]["key"] - key >= 0) break;
438
470
  else {
439
- pendingRenders[i] = pendingRenders[bestChild];
471
+ renders[i] = renders[bestChild];
440
472
  i = bestChild;
441
473
  }
442
474
  }
443
- pendingRenders[i] = item;
475
+ renders[i] = item;
444
476
  }
477
+ ranRenders.set(render, runId);
445
478
  runRender(render);
446
479
  }
447
480
  }
@@ -685,9 +718,9 @@ function _for_closure(ownerLoopNodeAccessor, fn) {
685
718
  const scopeAccessor = BranchScopes$1 + ownerLoopNodeAccessor;
686
719
  const ownerSignal = (ownerScope) => {
687
720
  const scopes = toArray(ownerScope[scopeAccessor]);
688
- if (scopes.length) queueRender(ownerScope, () => {
721
+ queueRender(ownerScope, () => {
689
722
  for (const scope of scopes) if (scope["#Gen"] > 0 && scope["#Gen"] < runId) fn(scope);
690
- }, -1, 0, scopes[0]["#Id"]);
723
+ }, -1);
691
724
  };
692
725
  ownerSignal._ = fn;
693
726
  return ownerSignal;
@@ -697,8 +730,7 @@ function _for_selector(ownerLoopNodeAccessor, ownerValueAccessor, keyValueAccess
697
730
  const mapAccessor = KeyedScopes + ownerLoopNodeAccessor;
698
731
  const prevKeyProp = `${PreviousKey}${ownerValueAccessor}`;
699
732
  const ownerSignal = (ownerScope) => {
700
- const scopes = toArray(ownerScope[scopeAccessor]);
701
- if (ownerScope["#Gen"] < runId && scopes.length) {
733
+ if (ownerScope["#Gen"] < runId) {
702
734
  const nextKey = ownerScope[ownerValueAccessor];
703
735
  queueRender(ownerScope, () => {
704
736
  const map = keyedScopes(ownerScope, scopeAccessor, mapAccessor, keyValueAccessor);
@@ -711,7 +743,7 @@ function _for_selector(ownerLoopNodeAccessor, ownerValueAccessor, keyValueAccess
711
743
  }
712
744
  } else for (const scope of toArray(ownerScope[scopeAccessor])) runLiveBranch(scope, fn);
713
745
  if (map) map[prevKeyProp] = nextKey;
714
- }, -1, 0, scopes[0]["#Id"]);
746
+ }, -1);
715
747
  }
716
748
  };
717
749
  ownerSignal._ = fn;
@@ -1993,6 +2025,7 @@ function patchDynamicTag(fn) {
1993
2025
  _dynamic_tag = fn(_dynamic_tag);
1994
2026
  }
1995
2027
  let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagVar, inputIsArgs) => {
2028
+ const scopeOffsetAccessor = getTagVar && getDebugKey(+nodeAccessor.slice(nodeAccessor.lastIndexOf("/") + 1) + 1, "#scopeOffset");
1996
2029
  const childScopeAccessor = BranchScopes$1 + nodeAccessor;
1997
2030
  const rendererAccessor = ConditionalRenderer + nodeAccessor;
1998
2031
  return (scope, newRenderer, getInput) => {
@@ -2003,7 +2036,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
2003
2036
  if (getTagVar) {
2004
2037
  if (scope[childScopeAccessor]) {
2005
2038
  scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
2006
- if (typeof normalizedRenderer === "string") bindNativeTagVar?.(scope[childScopeAccessor]);
2039
+ bindTagVar(scope, scope[childScopeAccessor], scope[scopeOffsetAccessor], normalizedRenderer);
2007
2040
  } else getTagVar()(scope, void 0);
2008
2041
  }
2009
2042
  if (typeof renderer === "string") {
@@ -2012,7 +2045,10 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
2012
2045
  setConditionalRenderer(scope[childScopeAccessor], `#${renderer.toLowerCase()}/0`, content, createAndSetupBranch);
2013
2046
  if (content["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[childScopeAccessor][`BranchScopes:#${renderer.toLowerCase()}/0`]);
2014
2047
  }
2015
- } else if (renderer?.["accessor"]) subscribeToScopeSet(renderer[Owner], renderer[Accessor], scope[childScopeAccessor]);
2048
+ } else if (renderer) {
2049
+ setupBranch(renderer, scope[childScopeAccessor]);
2050
+ if (renderer["accessor"]) subscribeToScopeSet(renderer[Owner], renderer[Accessor], scope[childScopeAccessor]);
2051
+ }
2016
2052
  }
2017
2053
  if (normalizedRenderer) {
2018
2054
  const childScope = scope[childScopeAccessor];
@@ -2048,9 +2084,9 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
2048
2084
  renderer?.[LocalClosures]?.(scope[childScopeAccessor]);
2049
2085
  };
2050
2086
  });
2051
- let bindNativeTagVar;
2087
+ let bindTagVar;
2052
2088
  function installDynamicTagVar(bind) {
2053
- bindNativeTagVar = bind;
2089
+ bindTagVar = bind;
2054
2090
  }
2055
2091
  function dynamicTagScript(branch) {
2056
2092
  _attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
@@ -2203,7 +2239,6 @@ function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentSco
2203
2239
  if (typeof tagNameOrRenderer === "string") assertValidTagName(tagNameOrRenderer);
2204
2240
  const branch = createBranch($global, tagNameOrRenderer, parentScope, parentNode);
2205
2241
  if (typeof tagNameOrRenderer === "string") branch[`#${tagNameOrRenderer.toLowerCase()}/0`] = branch[StartNode] = branch[EndNode] = document.createElementNS(tagNameOrRenderer === "svg" ? "http://www.w3.org/2000/svg" : tagNameOrRenderer === "math" ? "http://www.w3.org/1998/Math/MathML" : parentNode.namespaceURI, tagNameOrRenderer);
2206
- else setupBranch(tagNameOrRenderer, branch);
2207
2242
  return branch;
2208
2243
  }
2209
2244
  function bySecondArg(_item, index) {
@@ -2231,6 +2266,12 @@ Object.defineProperty(exports, "AwaitCounter", {
2231
2266
  return AwaitCounter;
2232
2267
  }
2233
2268
  });
2269
+ Object.defineProperty(exports, "BranchRenders", {
2270
+ enumerable: true,
2271
+ get: function() {
2272
+ return BranchRenders;
2273
+ }
2274
+ });
2234
2275
  Object.defineProperty(exports, "Clone", {
2235
2276
  enumerable: true,
2236
2277
  get: function() {
@@ -2897,6 +2938,12 @@ Object.defineProperty(exports, "addAwaitCounter", {
2897
2938
  return addAwaitCounter;
2898
2939
  }
2899
2940
  });
2941
+ Object.defineProperty(exports, "bindTagVar", {
2942
+ enumerable: true,
2943
+ get: function() {
2944
+ return bindTagVar;
2945
+ }
2946
+ });
2900
2947
  Object.defineProperty(exports, "controllableRenders", {
2901
2948
  enumerable: true,
2902
2949
  get: function() {
@@ -2921,6 +2968,12 @@ Object.defineProperty(exports, "createBranch", {
2921
2968
  return createBranch;
2922
2969
  }
2923
2970
  });
2971
+ Object.defineProperty(exports, "createBranchRenders", {
2972
+ enumerable: true,
2973
+ get: function() {
2974
+ return createBranchRenders;
2975
+ }
2976
+ });
2924
2977
  Object.defineProperty(exports, "destroyBranch", {
2925
2978
  enumerable: true,
2926
2979
  get: function() {
@@ -2987,6 +3040,12 @@ Object.defineProperty(exports, "insertChildNodes", {
2987
3040
  return insertChildNodes;
2988
3041
  }
2989
3042
  });
3043
+ Object.defineProperty(exports, "installBranchRenders", {
3044
+ enumerable: true,
3045
+ get: function() {
3046
+ return installBranchRenders;
3047
+ }
3048
+ });
2990
3049
  Object.defineProperty(exports, "installCatch", {
2991
3050
  enumerable: true,
2992
3051
  get: function() {
@@ -3083,6 +3142,12 @@ Object.defineProperty(exports, "runPendingEffects", {
3083
3142
  return runPendingEffects;
3084
3143
  }
3085
3144
  });
3145
+ Object.defineProperty(exports, "setParentBranch", {
3146
+ enumerable: true,
3147
+ get: function() {
3148
+ return setParentBranch;
3149
+ }
3150
+ });
3086
3151
  Object.defineProperty(exports, "setupBranch", {
3087
3152
  enumerable: true,
3088
3153
  get: function() {