marko 6.3.35 → 6.3.37

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 (51) hide show
  1. package/dist/common/meta.d.ts +1 -0
  2. package/dist/debug/dom/catch.feat.js +1 -1
  3. package/dist/debug/dom/catch.feat.mjs +1 -1
  4. package/dist/debug/dom/controllable-input.feat.js +1 -1
  5. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  6. package/dist/debug/dom/controllable-open.feat.js +1 -1
  7. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  8. package/dist/debug/dom/controllable-select.feat.js +1 -1
  9. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  10. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  11. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  12. package/dist/debug/dom/controllable.feat.js +1 -1
  13. package/dist/debug/dom/controllable.feat.mjs +1 -1
  14. package/dist/debug/dom/dynamic-tag-var.feat.js +7 -0
  15. package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -0
  16. package/dist/debug/{dom-Bt4OoZ-j.js → dom-BkYlHM4b.js} +46 -12
  17. package/dist/debug/{dom-B57LrRnX.mjs → dom-woc_wRhN.mjs} +29 -13
  18. package/dist/debug/dom.js +7 -7
  19. package/dist/debug/dom.mjs +7 -7
  20. package/dist/debug/html.js +6 -4
  21. package/dist/debug/html.mjs +6 -4
  22. package/dist/dom/abort-signal.d.ts +2 -0
  23. package/dist/dom/catch.feat.js +4 -4
  24. package/dist/dom/catch.feat.mjs +1 -1
  25. package/dist/dom/control-flow.d.ts +2 -0
  26. package/dist/dom/controllable-input.feat.js +2 -2
  27. package/dist/dom/controllable-input.feat.mjs +1 -1
  28. package/dist/dom/controllable-open.feat.js +2 -2
  29. package/dist/dom/controllable-open.feat.mjs +1 -1
  30. package/dist/dom/controllable-select.feat.js +2 -2
  31. package/dist/dom/controllable-select.feat.mjs +1 -1
  32. package/dist/dom/controllable-textarea.feat.js +2 -2
  33. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  34. package/dist/dom/controllable.feat.js +2 -2
  35. package/dist/dom/controllable.feat.mjs +1 -1
  36. package/dist/dom/dynamic-tag-var.feat.d.ts +1 -0
  37. package/dist/dom/dynamic-tag-var.feat.js +3 -0
  38. package/dist/dom/dynamic-tag-var.feat.mjs +4 -0
  39. package/dist/dom/load.d.ts +3 -3
  40. package/dist/dom/resume.d.ts +1 -0
  41. package/dist/{dom-BeF9xIzO.js → dom-B15s3PHD.js} +132 -120
  42. package/dist/{dom-BP2XSglG.mjs → dom-CPUybM_C.mjs} +19 -17
  43. package/dist/dom.js +57 -60
  44. package/dist/dom.mjs +28 -31
  45. package/dist/html.js +4 -4
  46. package/dist/html.mjs +4 -4
  47. package/dist/translator/index.js +177 -43
  48. package/dist/translator/util/references.d.ts +1 -0
  49. package/dist/translator/util/runtime.d.ts +1 -1
  50. package/dist/translator/util/traverse.d.ts +2 -0
  51. package/package.json +4 -4
@@ -1,3 +1,4 @@
1
1
  export declare const DEFAULT_RUNTIME_ID = "M";
2
2
  export declare const DEFAULT_RENDER_ID = "_";
3
3
  export declare const DYNAMIC_TAG_SCRIPT_REGISTER_ID: string;
4
+ export declare const DYNAMIC_TAG_VAR_REGISTER_ID: string;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_control_flow = require("../dom-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { Cn as PendingRenders, Jt as caughtError, Sn as PendingEffects, Xt as placeholderShown, Yt as installCatch, gn as ClosestBranch, h as renderCatch, mn as Scope, pn as Pending, xn as ParentBranch } from "../dom-B57LrRnX.mjs";
1
+ import { $t as placeholderShown, En as PendingRenders, Qt as installCatch, Tn as PendingEffects, Zt as caughtError, _n as Scope, g as renderCatch, gn as Pending, wn as ParentBranch, yn as ClosestBranch } from "../dom-woc_wRhN.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-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { R as controllableScripts, S as _attr_input_checkedValue_script, k as _attr_input_value_script, w as _attr_input_checked_script } from "../dom-B57LrRnX.mjs";
1
+ import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-woc_wRhN.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-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { R as controllableScripts, v as _attr_details_or_dialog_open_script } from "../dom-B57LrRnX.mjs";
1
+ import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-woc_wRhN.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-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { M as _attr_select_value_script, R as controllableScripts } from "../dom-B57LrRnX.mjs";
1
+ import { N as _attr_select_value_script, z as controllableScripts } from "../dom-woc_wRhN.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-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { R as controllableScripts, k as _attr_input_value_script } from "../dom-B57LrRnX.mjs";
1
+ import { A as _attr_input_value_script, z as controllableScripts } from "../dom-woc_wRhN.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-Bt4OoZ-j.js");
2
+ const require_control_flow = require("../dom-BkYlHM4b.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 { F as _controllable_select, I as _controllable_textarea, L as controllableRenders, N as _controllable_input, P as _controllable_open } from "../dom-B57LrRnX.mjs";
1
+ import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-woc_wRhN.mjs";
2
2
  import "./controllable-input.feat.mjs";
3
3
  import "./controllable-open.feat.mjs";
4
4
  import "./controllable-select.feat.mjs";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ const require_control_flow = require("../dom-BkYlHM4b.js");
3
+ //#region src/dom/dynamic-tag-var.feat.ts
4
+ const elementGetter = (branch) => () => require_control_flow._el_read(branch[require_control_flow.StartNode]);
5
+ require_control_flow.installDynamicTagVar((branch) => branch[require_control_flow.TagVariable](elementGetter(branch)));
6
+ require_control_flow._resume(require_control_flow.DYNAMIC_TAG_VAR_REGISTER_ID, elementGetter);
7
+ //#endregion
@@ -0,0 +1,6 @@
1
+ import { Dn as StartNode, Dt as _el_read, Jt as DYNAMIC_TAG_VAR_REGISTER_ID, On as TagVariable, gt as _resume, m as installDynamicTagVar } from "../dom-woc_wRhN.mjs";
2
+ //#region src/dom/dynamic-tag-var.feat.ts
3
+ const elementGetter = (branch) => () => _el_read(branch[StartNode]);
4
+ installDynamicTagVar((branch) => branch[TagVariable](elementGetter(branch)));
5
+ _resume(DYNAMIC_TAG_VAR_REGISTER_ID, elementGetter);
6
+ //#endregion
@@ -364,8 +364,8 @@ function run() {
364
364
  runEffects(effects);
365
365
  }
366
366
  function queueAsyncRender(scope, signal, value) {
367
+ if (!pendingRenders.length) queueMicrotask(run);
367
368
  queueRender(scope, signal, -1, value);
368
- queueMicrotask(run);
369
369
  }
370
370
  function prepareEffects(fn) {
371
371
  const prevRenders = pendingRenders;
@@ -431,6 +431,7 @@ function $signalReset(scope, id) {
431
431
  }
432
432
  }
433
433
  function $signal(scope, id) {
434
+ abortsEnabled = 1;
434
435
  trackCleanup(scope);
435
436
  return ((scope[AbortControllers] ||= {})[id] ||= new AbortController()).signal;
436
437
  }
@@ -438,14 +439,20 @@ function $signal(scope, id) {
438
439
  function trackCleanup(scope, subscribers) {
439
440
  const branch = scope[ClosestBranch];
440
441
  if (branch) (branch[AbortScopes] ||= /* @__PURE__ */ new Set()).add(scope);
441
- if (subscribers) (scope[Subscriptions] ||= []).push(subscribers);
442
+ if (subscribers) {
443
+ subscriptionsEnabled = 1;
444
+ (scope[Subscriptions] ||= []).push(subscribers);
445
+ }
442
446
  }
447
+ let abortsEnabled;
448
+ let subscriptionsEnabled;
443
449
  function abort(ctrl) {
444
450
  ctrl.abort();
445
451
  }
446
452
  //#endregion
447
453
  //#region src/common/meta.ts
448
454
  const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
455
+ const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
449
456
  //#endregion
450
457
  //#region src/common/opt.ts
451
458
  function toArray(opt) {
@@ -544,8 +551,8 @@ const destroyNestedScopes = function destroyNestedScopes(scope) {
544
551
  scope[AbortScopes]?.forEach(cleanupScope);
545
552
  };
546
553
  function cleanupScope(scope) {
547
- scope[Subscriptions]?.forEach(unsubscribe, scope);
548
- for (const id in scope[AbortControllers]) $signalReset(scope, id);
554
+ if (subscriptionsEnabled) scope[Subscriptions]?.forEach(unsubscribe, scope);
555
+ if (abortsEnabled) for (const id in scope[AbortControllers]) $signalReset(scope, id);
549
556
  }
550
557
  function unsubscribe(subscribers) {
551
558
  subscribers.delete(this);
@@ -848,10 +855,15 @@ const registeredValues = {};
848
855
  let curRenders;
849
856
  let embedRenders;
850
857
  let readyIds;
858
+ let lazyEnabled;
851
859
  function ready(readyId) {
852
860
  (readyIds ||= /* @__PURE__ */ new Set()).add(readyId);
853
861
  for (const renderId in curRenders) runResumeEffects(curRenders[renderId]);
854
862
  }
863
+ function withLazy(runtime) {
864
+ lazyEnabled = 1;
865
+ return runtime;
866
+ }
855
867
  function initEmbedded(readyId, runtimeId) {
856
868
  if (!embedRenders) {
857
869
  embedRenders = /* @__PURE__ */ new Map();
@@ -1010,7 +1022,7 @@ function init(runtimeId = "M") {
1010
1022
  const prev = visit.previousSibling;
1011
1023
  visitScope[nextToken()] = prev && (prev.nodeType < 8 || prev.data) ? prev : visit.parentNode.insertBefore(new Text(), visit);
1012
1024
  } else if (branchesEnabled) (visitBranches ||= createVisitBranches())();
1013
- else if (render.b) visits[retained++] = visit;
1025
+ else if (lazyEnabled && render.b) visits[retained++] = visit;
1014
1026
  }
1015
1027
  if (embedRenders && !embedAnchor && visit) embedRenders.set(embedAnchor = visit.parentNode.insertBefore(new Text(), visit.nextSibling), [renderId, scopeLookup]);
1016
1028
  visits.length = retained;
@@ -1161,7 +1173,7 @@ function _style_shell(scope, nodeAccessor) {
1161
1173
  const element = scope[nodeAccessor];
1162
1174
  const id = _id(scope);
1163
1175
  _attr_nonce(scope, nodeAccessor);
1164
- element.className = id;
1176
+ _attr(element, "class", id);
1165
1177
  _text_content(element, "." + id + "~*{}");
1166
1178
  }
1167
1179
  function _style_rule_item(element, name, value) {
@@ -1565,6 +1577,7 @@ function observeOnce(scope, nodeAccessor, init, callback) {
1565
1577
  }
1566
1578
  function syncControllableFormInput(el, hasChanged, onChange) {
1567
1579
  el._ = onChange;
1580
+ el.c = hasChanged;
1568
1581
  delegate("input", handleChange);
1569
1582
  if (el.form) delegate("reset", handleFormReset);
1570
1583
  if (isResuming && hasChanged(el)) queueMicrotask(onChange);
@@ -1574,7 +1587,7 @@ function handleChange(ev) {
1574
1587
  }
1575
1588
  function handleFormReset(ev) {
1576
1589
  const handlers = [];
1577
- for (const el of ev.target.elements) if (el._ && hasFormElementChanged(el)) handlers.push(el._);
1590
+ for (const el of ev.target.elements) if (el._ && el.c(el)) handlers.push(el._);
1578
1591
  requestAnimationFrame(() => {
1579
1592
  if (!ev.defaultPrevented) for (const change of handlers) change();
1580
1593
  });
@@ -1588,9 +1601,6 @@ function hasCheckboxChanged(el) {
1588
1601
  function hasSelectChanged(el) {
1589
1602
  for (const opt of el.options) if (opt.selected !== opt.defaultSelected) return true;
1590
1603
  }
1591
- function hasFormElementChanged(el) {
1592
- return el.options ? hasSelectChanged(el) : hasValueChanged(el) || hasCheckboxChanged(el);
1593
- }
1594
1604
  function normalizeStrProp(value) {
1595
1605
  return normalizeAttrValue(value) || "";
1596
1606
  }
@@ -1861,8 +1871,10 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
1861
1871
  const normalizedRenderer = normalizeDynamicRenderer(newRenderer);
1862
1872
  if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(normalizedRenderer)) || getContent && !(normalizedRenderer || scope[childScopeAccessor])) {
1863
1873
  setConditionalRenderer(scope, nodeAccessor, normalizedRenderer || (getContent ? getContent(scope) : void 0), createBranchWithTagNameOrRenderer);
1864
- if (getTagVar) if (scope[childScopeAccessor]) scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
1865
- else getTagVar()(scope, void 0);
1874
+ if (getTagVar) if (scope[childScopeAccessor]) {
1875
+ scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
1876
+ if (typeof normalizedRenderer === "string") bindNativeTagVar?.(scope[childScopeAccessor]);
1877
+ } else getTagVar()(scope, void 0);
1866
1878
  if (typeof normalizedRenderer === "string") {
1867
1879
  if (getContent) {
1868
1880
  const content = getContent(scope);
@@ -1903,6 +1915,10 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
1903
1915
  if (renderer) for (const accessor in renderer[LocalClosures]) renderer[LocalClosures][accessor](scope[childScopeAccessor], renderer[LocalClosureValues][accessor]);
1904
1916
  };
1905
1917
  });
1918
+ let bindNativeTagVar;
1919
+ function installDynamicTagVar(bind) {
1920
+ bindNativeTagVar = bind;
1921
+ }
1906
1922
  const _resume_dynamic_tag = /*@__PURE__*/ withBranches(() => _resume(DYNAMIC_TAG_SCRIPT_REGISTER_ID, dynamicTagScript));
1907
1923
  function dynamicTagScript(branch) {
1908
1924
  _attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
@@ -2087,6 +2103,12 @@ Object.defineProperty(exports, "ClosestBranch", {
2087
2103
  return ClosestBranch;
2088
2104
  }
2089
2105
  });
2106
+ Object.defineProperty(exports, "DYNAMIC_TAG_VAR_REGISTER_ID", {
2107
+ enumerable: true,
2108
+ get: function() {
2109
+ return DYNAMIC_TAG_VAR_REGISTER_ID;
2110
+ }
2111
+ });
2090
2112
  Object.defineProperty(exports, "EndNode", {
2091
2113
  enumerable: true,
2092
2114
  get: function() {
@@ -2771,6 +2793,12 @@ Object.defineProperty(exports, "installCatch", {
2771
2793
  return installCatch;
2772
2794
  }
2773
2795
  });
2796
+ Object.defineProperty(exports, "installDynamicTagVar", {
2797
+ enumerable: true,
2798
+ get: function() {
2799
+ return installDynamicTagVar;
2800
+ }
2801
+ });
2774
2802
  Object.defineProperty(exports, "patchDynamicTag", {
2775
2803
  enumerable: true,
2776
2804
  get: function() {
@@ -2855,3 +2883,9 @@ Object.defineProperty(exports, "toInsertNode", {
2855
2883
  return toInsertNode;
2856
2884
  }
2857
2885
  });
2886
+ Object.defineProperty(exports, "withLazy", {
2887
+ enumerable: true,
2888
+ get: function() {
2889
+ return withLazy;
2890
+ }
2891
+ });
@@ -363,8 +363,8 @@ function run() {
363
363
  runEffects(effects);
364
364
  }
365
365
  function queueAsyncRender(scope, signal, value) {
366
+ if (!pendingRenders.length) queueMicrotask(run);
366
367
  queueRender(scope, signal, -1, value);
367
- queueMicrotask(run);
368
368
  }
369
369
  function prepareEffects(fn) {
370
370
  const prevRenders = pendingRenders;
@@ -430,6 +430,7 @@ function $signalReset(scope, id) {
430
430
  }
431
431
  }
432
432
  function $signal(scope, id) {
433
+ abortsEnabled = 1;
433
434
  trackCleanup(scope);
434
435
  return ((scope[AbortControllers] ||= {})[id] ||= new AbortController()).signal;
435
436
  }
@@ -437,14 +438,20 @@ function $signal(scope, id) {
437
438
  function trackCleanup(scope, subscribers) {
438
439
  const branch = scope[ClosestBranch];
439
440
  if (branch) (branch[AbortScopes] ||= /* @__PURE__ */ new Set()).add(scope);
440
- if (subscribers) (scope[Subscriptions] ||= []).push(subscribers);
441
+ if (subscribers) {
442
+ subscriptionsEnabled = 1;
443
+ (scope[Subscriptions] ||= []).push(subscribers);
444
+ }
441
445
  }
446
+ let abortsEnabled;
447
+ let subscriptionsEnabled;
442
448
  function abort(ctrl) {
443
449
  ctrl.abort();
444
450
  }
445
451
  //#endregion
446
452
  //#region src/common/meta.ts
447
453
  const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
454
+ const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
448
455
  //#endregion
449
456
  //#region src/common/opt.ts
450
457
  function toArray(opt) {
@@ -543,8 +550,8 @@ const destroyNestedScopes = function destroyNestedScopes(scope) {
543
550
  scope[AbortScopes]?.forEach(cleanupScope);
544
551
  };
545
552
  function cleanupScope(scope) {
546
- scope[Subscriptions]?.forEach(unsubscribe, scope);
547
- for (const id in scope[AbortControllers]) $signalReset(scope, id);
553
+ if (subscriptionsEnabled) scope[Subscriptions]?.forEach(unsubscribe, scope);
554
+ if (abortsEnabled) for (const id in scope[AbortControllers]) $signalReset(scope, id);
548
555
  }
549
556
  function unsubscribe(subscribers) {
550
557
  subscribers.delete(this);
@@ -847,10 +854,15 @@ const registeredValues = {};
847
854
  let curRenders;
848
855
  let embedRenders;
849
856
  let readyIds;
857
+ let lazyEnabled;
850
858
  function ready(readyId) {
851
859
  (readyIds ||= /* @__PURE__ */ new Set()).add(readyId);
852
860
  for (const renderId in curRenders) runResumeEffects(curRenders[renderId]);
853
861
  }
862
+ function withLazy(runtime) {
863
+ lazyEnabled = 1;
864
+ return runtime;
865
+ }
854
866
  function initEmbedded(readyId, runtimeId) {
855
867
  if (!embedRenders) {
856
868
  embedRenders = /* @__PURE__ */ new Map();
@@ -1009,7 +1021,7 @@ function init(runtimeId = "M") {
1009
1021
  const prev = visit.previousSibling;
1010
1022
  visitScope[nextToken()] = prev && (prev.nodeType < 8 || prev.data) ? prev : visit.parentNode.insertBefore(new Text(), visit);
1011
1023
  } else if (branchesEnabled) (visitBranches ||= createVisitBranches())();
1012
- else if (render.b) visits[retained++] = visit;
1024
+ else if (lazyEnabled && render.b) visits[retained++] = visit;
1013
1025
  }
1014
1026
  if (embedRenders && !embedAnchor && visit) embedRenders.set(embedAnchor = visit.parentNode.insertBefore(new Text(), visit.nextSibling), [renderId, scopeLookup]);
1015
1027
  visits.length = retained;
@@ -1160,7 +1172,7 @@ function _style_shell(scope, nodeAccessor) {
1160
1172
  const element = scope[nodeAccessor];
1161
1173
  const id = _id(scope);
1162
1174
  _attr_nonce(scope, nodeAccessor);
1163
- element.className = id;
1175
+ _attr(element, "class", id);
1164
1176
  _text_content(element, "." + id + "~*{}");
1165
1177
  }
1166
1178
  function _style_rule_item(element, name, value) {
@@ -1564,6 +1576,7 @@ function observeOnce(scope, nodeAccessor, init, callback) {
1564
1576
  }
1565
1577
  function syncControllableFormInput(el, hasChanged, onChange) {
1566
1578
  el._ = onChange;
1579
+ el.c = hasChanged;
1567
1580
  delegate("input", handleChange);
1568
1581
  if (el.form) delegate("reset", handleFormReset);
1569
1582
  if (isResuming && hasChanged(el)) queueMicrotask(onChange);
@@ -1573,7 +1586,7 @@ function handleChange(ev) {
1573
1586
  }
1574
1587
  function handleFormReset(ev) {
1575
1588
  const handlers = [];
1576
- for (const el of ev.target.elements) if (el._ && hasFormElementChanged(el)) handlers.push(el._);
1589
+ for (const el of ev.target.elements) if (el._ && el.c(el)) handlers.push(el._);
1577
1590
  requestAnimationFrame(() => {
1578
1591
  if (!ev.defaultPrevented) for (const change of handlers) change();
1579
1592
  });
@@ -1587,9 +1600,6 @@ function hasCheckboxChanged(el) {
1587
1600
  function hasSelectChanged(el) {
1588
1601
  for (const opt of el.options) if (opt.selected !== opt.defaultSelected) return true;
1589
1602
  }
1590
- function hasFormElementChanged(el) {
1591
- return el.options ? hasSelectChanged(el) : hasValueChanged(el) || hasCheckboxChanged(el);
1592
- }
1593
1603
  function normalizeStrProp(value) {
1594
1604
  return normalizeAttrValue(value) || "";
1595
1605
  }
@@ -1860,8 +1870,10 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
1860
1870
  const normalizedRenderer = normalizeDynamicRenderer(newRenderer);
1861
1871
  if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(normalizedRenderer)) || getContent && !(normalizedRenderer || scope[childScopeAccessor])) {
1862
1872
  setConditionalRenderer(scope, nodeAccessor, normalizedRenderer || (getContent ? getContent(scope) : void 0), createBranchWithTagNameOrRenderer);
1863
- if (getTagVar) if (scope[childScopeAccessor]) scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
1864
- else getTagVar()(scope, void 0);
1873
+ if (getTagVar) if (scope[childScopeAccessor]) {
1874
+ scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
1875
+ if (typeof normalizedRenderer === "string") bindNativeTagVar?.(scope[childScopeAccessor]);
1876
+ } else getTagVar()(scope, void 0);
1865
1877
  if (typeof normalizedRenderer === "string") {
1866
1878
  if (getContent) {
1867
1879
  const content = getContent(scope);
@@ -1902,6 +1914,10 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
1902
1914
  if (renderer) for (const accessor in renderer[LocalClosures]) renderer[LocalClosures][accessor](scope[childScopeAccessor], renderer[LocalClosureValues][accessor]);
1903
1915
  };
1904
1916
  });
1917
+ let bindNativeTagVar;
1918
+ function installDynamicTagVar(bind) {
1919
+ bindNativeTagVar = bind;
1920
+ }
1905
1921
  const _resume_dynamic_tag = /*@__PURE__*/ withBranches(() => _resume(DYNAMIC_TAG_SCRIPT_REGISTER_ID, dynamicTagScript));
1906
1922
  function dynamicTagScript(branch) {
1907
1923
  _attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
@@ -2056,4 +2072,4 @@ function byFirstArg(name) {
2056
2072
  return name;
2057
2073
  }
2058
2074
  //#endregion
2059
- export { _html as $, queueEffect as $t, _attr_select_value as A, _id as At, _attr_class as B, _assert_init as Bt, _attr_input_checked_default as C, PendingRenders as Cn, _closure_get as Ct, _attr_input_value_default as D, _for_selector as Dt, _attr_input_value_attribute_default as E, _for_closure as Et, _controllable_select as F, _return as Ft, _attr_style as G, _on as Gt, _attr_class_items as H, insertBranchBefore as Ht, _controllable_textarea as I, _return_change as It, _attrs as J, caughtError as Jt, _attr_style_item as K, $signal as Kt, controllableRenders as L, _script as Lt, _attr_select_value_script as M, _let as Mt, _controllable_input as N, _let_change as Nt, _attr_input_value_dynamic_default as O, _hoist as Ot, _controllable_open as P, _or as Pt, _attrs_script as Q, queueAsyncRender as Qt, controllableScripts as R, _var as Rt, _attr_input_checkedValue_script as S, PendingEffects as Sn, _closure as St, _attr_input_value as T, TagVariable as Tn, _el_read as Tt, _attr_content as U, removeAndDestroyBranch as Ut, _attr_class_item as V, destroyBranch as Vt, _attr_nonce as W, syncGen as Wt, _attrs_partial as X, placeholderShown as Xt, _attrs_content as Y, installCatch as Yt, _attrs_partial_content as Z, prepareEffects as Zt, _attr_details_or_dialog_open_default as _, EndNode as _n, getRegisteredWithScope as _t, _for_in as a, forTo as an, _to_text as at, _attr_input_checkedValue as b, Load as bn, ready as bt, _for_until as c, _call as cn, _content as ct, _show as d, Params as dn, createAndSetupBranch as dt, run as en, _lifecycle as et, _try as f, Setup as fn, createBranch as ft, _attr_details_or_dialog_open as g, ClosestBranch as gn, _var_resume as gt, renderCatch as h, AwaitCounter as hn, _resume as ht, _dynamic_tag_content as i, forOf as in, _text_content as it, _attr_select_value_default as j, _if_closure as jt, _attr_input_value_script as k, _hoist_resume as kt, _if as l, Clone as ln, _content_closures as lt, patchDynamicTag as m, Scope as mn, _el as mt, _await_promise as n, runId as nn, _style_shell as nt, _for_of as o, forUntil as on, insertChildNodes as ot, addAwaitCounter as p, Pending as pn, setupBranch as pt, _attr_style_items as q, $signalReset as qt, _dynamic_tag as r, forIn as rn, _text as rt, _for_to as s, _assert_hoist as sn, toInsertNode as st, _await_content as t, runEffects as tn, _style_rule_item as tt, _resume_dynamic_tag as u, Owner as un, _content_resume as ut, _attr_details_or_dialog_open_script as v, Gen$1 as vn, init as vt, _attr_input_checked_script as w, StartNode as wn, _const as wt, _attr_input_checkedValue_default as x, ParentBranch as xn, _child_setup as xt, _attr_input_checked as y, Global as yn, initEmbedded as yt, _attr as z, _var_change as zt };
2075
+ export { _attrs_script as $, placeholderShown as $t, _attr_input_value_script as A, _hoist as At, _attr as B, _var as Bt, _attr_input_checkedValue_script as C, Load as Cn, _child_setup as Ct, _attr_input_value_attribute_default as D, StartNode as Dn, _el_read as Dt, _attr_input_value as E, PendingRenders as En, _const as Et, _controllable_open as F, _let_change as Ft, _attr_nonce as G, removeAndDestroyBranch as Gt, _attr_class_item as H, _assert_init as Ht, _controllable_select as I, _or as It, _attr_style_items as J, DYNAMIC_TAG_VAR_REGISTER_ID as Jt, _attr_style as K, syncGen as Kt, _controllable_textarea as L, _return as Lt, _attr_select_value_default as M, _id as Mt, _attr_select_value_script as N, _if_closure as Nt, _attr_input_value_default as O, TagVariable as On, _for_closure as Ot, _controllable_input as P, _let as Pt, _attrs_partial_content as Q, installCatch as Qt, controllableRenders as R, _return_change as Rt, _attr_input_checkedValue_default as S, Global as Sn, withLazy as St, _attr_input_checked_script as T, PendingEffects as Tn, _closure_get as Tt, _attr_class_items as U, destroyBranch as Ut, _attr_class as V, _var_change as Vt, _attr_content as W, insertBranchBefore as Wt, _attrs_content as X, $signalReset as Xt, _attrs as Y, $signal as Yt, _attrs_partial as Z, caughtError as Zt, _attr_details_or_dialog_open as _, Scope as _n, _var_resume as _t, _for_in as a, runId as an, _text_content as at, _attr_input_checked as b, EndNode as bn, initEmbedded as bt, _for_until as c, forTo as cn, toInsertNode as ct, _show as d, _call as dn, _content_resume as dt, prepareEffects as en, _html as et, _try as f, Clone as fn, createAndSetupBranch as ft, renderCatch as g, Pending as gn, _resume as gt, patchDynamicTag as h, Setup as hn, _el as ht, _dynamic_tag_content as i, runEffects as in, _text as it, _attr_select_value as j, _hoist_resume as jt, _attr_input_value_dynamic_default as k, _for_selector as kt, _if as l, forUntil as ln, _content as lt, installDynamicTagVar as m, Params as mn, setupBranch as mt, _await_promise as n, queueEffect as nn, _style_rule_item as nt, _for_of as o, forIn as on, _to_text as ot, addAwaitCounter as p, Owner as pn, createBranch as pt, _attr_style_item as q, _on as qt, _dynamic_tag as r, run as rn, _style_shell as rt, _for_to as s, forOf as sn, insertChildNodes as st, _await_content as t, queueAsyncRender as tn, _lifecycle as tt, _resume_dynamic_tag as u, _assert_hoist as un, _content_closures as ut, _attr_details_or_dialog_open_default as v, AwaitCounter as vn, getRegisteredWithScope as vt, _attr_input_checked_default as w, ParentBranch as wn, _closure as wt, _attr_input_checkedValue as x, Gen$1 as xn, ready as xt, _attr_details_or_dialog_open_script as y, ClosestBranch as yn, init as yt, controllableScripts as z, _script as zt };
package/dist/debug/dom.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_control_flow = require("./dom-Bt4OoZ-j.js");
3
+ const require_control_flow = require("./dom-BkYlHM4b.js");
4
4
  //#region src/common/attr-tag.ts
5
5
  const empty = [];
6
6
  const rest = Symbol("Attribute Tag");
@@ -195,7 +195,7 @@ function mount(input = {}, reference, position) {
195
195
  }
196
196
  //#endregion
197
197
  //#region src/dom/load.ts
198
- function _load_template(id, load) {
198
+ const _load_template = /*@__PURE__*/ require_control_flow.withLazy((id, load) => {
199
199
  let pending;
200
200
  const lazyTemplate = _template(id, 0, 0, (branch) => {
201
201
  const awaitCounter = require_control_flow.addAwaitCounter(branch);
@@ -206,8 +206,8 @@ function _load_template(id, load) {
206
206
  }, loadFailed(branch, awaitCounter));
207
207
  }, _load_signal(() => (pending ||= load()).then((r) => ({ _: r[require_control_flow.Params] }))));
208
208
  return lazyTemplate;
209
- }
210
- function _load_setup(nodeAccessor, childScopeAccessor, load) {
209
+ });
210
+ const _load_setup = /*@__PURE__*/ require_control_flow.withLazy((nodeAccessor, childScopeAccessor, load) => {
211
211
  let pending;
212
212
  let renderer;
213
213
  return (owner) => {
@@ -222,7 +222,7 @@ function _load_setup(nodeAccessor, childScopeAccessor, load) {
222
222
  }, loadFailed(child, awaitCounter));
223
223
  }
224
224
  };
225
- }
225
+ });
226
226
  function insertLoaded(renderer, branch, marker, awaitCounter) {
227
227
  const parent = marker.parentNode, values = branch[require_control_flow.Load], insert = () => {
228
228
  require_control_flow.insertBranchBefore(branch, parent, marker);
@@ -256,7 +256,7 @@ function loadFailed(scope, awaitCounter) {
256
256
  require_control_flow.queueAsyncRender(scope, require_control_flow.renderCatch, error);
257
257
  };
258
258
  }
259
- function _load_signal(load) {
259
+ const _load_signal = /*@__PURE__*/ require_control_flow.withLazy((load) => {
260
260
  let pending;
261
261
  let signal;
262
262
  return (scope, value) => {
@@ -265,7 +265,7 @@ function _load_signal(load) {
265
265
  else if (signal) signal(scope, value);
266
266
  else pending.then((mod) => require_control_flow.queueAsyncRender(scope, signal = mod._, value), () => 0);
267
267
  };
268
- }
268
+ });
269
269
  function _load_visible_trigger(selector, options) {
270
270
  let pending;
271
271
  let el;
@@ -1,4 +1,4 @@
1
- import { $ as _html, $t as queueEffect, A as _attr_select_value, At as _id, B as _attr_class, Bt as _assert_init, C as _attr_input_checked_default, Ct as _closure_get, D as _attr_input_value_default, Dt as _for_selector, E as _attr_input_value_attribute_default, Et as _for_closure, F as _controllable_select, Ft as _return, G as _attr_style, Gt as _on, H as _attr_class_items, Ht as insertBranchBefore, I as _controllable_textarea, It as _return_change, J as _attrs, K as _attr_style_item, Kt as $signal, Lt as _script, M as _attr_select_value_script, Mt as _let, N as _controllable_input, Nt as _let_change, O as _attr_input_value_dynamic_default, Ot as _hoist, P as _controllable_open, Pt as _or, Q as _attrs_script, Qt as queueAsyncRender, Rt as _var, S as _attr_input_checkedValue_script, St as _closure, T as _attr_input_value, Tn as TagVariable, Tt as _el_read, U as _attr_content, Ut as removeAndDestroyBranch, V as _attr_class_item, Vt as destroyBranch, W as _attr_nonce, Wt as syncGen, X as _attrs_partial, Y as _attrs_content, Z as _attrs_partial_content, Zt as prepareEffects, _ as _attr_details_or_dialog_open_default, _n as EndNode, _t as getRegisteredWithScope, a as _for_in, an as forTo, at as _to_text, b as _attr_input_checkedValue, bn as Load, bt as ready, c as _for_until, cn as _call, ct as _content, d as _show, dn as Params, dt as createAndSetupBranch, en as run, et as _lifecycle, f as _try, fn as Setup, ft as createBranch, g as _attr_details_or_dialog_open, gt as _var_resume, h as renderCatch, ht as _resume, i as _dynamic_tag_content, in as forOf, it as _text_content, j as _attr_select_value_default, jt as _if_closure, k as _attr_input_value_script, kt as _hoist_resume, l as _if, ln as Clone, lt as _content_closures, m as patchDynamicTag, mt as _el, n as _await_promise, nn as runId, nt as _style_shell, o as _for_of, on as forUntil, ot as insertChildNodes, p as addAwaitCounter, pt as setupBranch, q as _attr_style_items, qt as $signalReset, r as _dynamic_tag, rn as forIn, rt as _text, s as _for_to, sn as _assert_hoist, st as toInsertNode, t as _await_content, tn as runEffects, tt as _style_rule_item, u as _resume_dynamic_tag, un as Owner, ut as _content_resume, v as _attr_details_or_dialog_open_script, vt as init, w as _attr_input_checked_script, wn as StartNode, wt as _const, x as _attr_input_checkedValue_default, xt as _child_setup, y as _attr_input_checked, yn as Global, yt as initEmbedded, z as _attr, zt as _var_change } from "./dom-B57LrRnX.mjs";
1
+ import { $ as _attrs_script, A as _attr_input_value_script, At as _hoist, B as _attr, Bt as _var, C as _attr_input_checkedValue_script, Cn as Load, Ct as _child_setup, D as _attr_input_value_attribute_default, Dn as StartNode, Dt as _el_read, E as _attr_input_value, Et as _const, F as _controllable_open, Ft as _let_change, G as _attr_nonce, Gt as removeAndDestroyBranch, H as _attr_class_item, Ht as _assert_init, I as _controllable_select, It as _or, J as _attr_style_items, K as _attr_style, Kt as syncGen, L as _controllable_textarea, Lt as _return, M as _attr_select_value_default, Mt as _id, N as _attr_select_value_script, Nt as _if_closure, O as _attr_input_value_default, On as TagVariable, Ot as _for_closure, P as _controllable_input, Pt as _let, Q as _attrs_partial_content, Rt as _return_change, S as _attr_input_checkedValue_default, Sn as Global, St as withLazy, T as _attr_input_checked_script, Tt as _closure_get, U as _attr_class_items, Ut as destroyBranch, V as _attr_class, Vt as _var_change, W as _attr_content, Wt as insertBranchBefore, X as _attrs_content, Xt as $signalReset, Y as _attrs, Yt as $signal, Z as _attrs_partial, _ as _attr_details_or_dialog_open, _t as _var_resume, a as _for_in, an as runId, at as _text_content, b as _attr_input_checked, bn as EndNode, bt as initEmbedded, c as _for_until, cn as forTo, ct as toInsertNode, d as _show, dn as _call, dt as _content_resume, en as prepareEffects, et as _html, f as _try, fn as Clone, ft as createAndSetupBranch, g as renderCatch, gt as _resume, h as patchDynamicTag, hn as Setup, ht as _el, i as _dynamic_tag_content, in as runEffects, it as _text, j as _attr_select_value, jt as _hoist_resume, k as _attr_input_value_dynamic_default, kt as _for_selector, l as _if, ln as forUntil, lt as _content, mn as Params, mt as setupBranch, n as _await_promise, nn as queueEffect, nt as _style_rule_item, o as _for_of, on as forIn, ot as _to_text, p as addAwaitCounter, pn as Owner, pt as createBranch, q as _attr_style_item, qt as _on, r as _dynamic_tag, rn as run, rt as _style_shell, s as _for_to, sn as forOf, st as insertChildNodes, t as _await_content, tn as queueAsyncRender, tt as _lifecycle, u as _resume_dynamic_tag, un as _assert_hoist, ut as _content_closures, v as _attr_details_or_dialog_open_default, vt as getRegisteredWithScope, w as _attr_input_checked_default, wt as _closure, x as _attr_input_checkedValue, xt as ready, y as _attr_details_or_dialog_open_script, yt as init, zt as _script } from "./dom-woc_wRhN.mjs";
2
2
  //#region src/common/attr-tag.ts
3
3
  const empty = [];
4
4
  const rest = Symbol("Attribute Tag");
@@ -193,7 +193,7 @@ function mount(input = {}, reference, position) {
193
193
  }
194
194
  //#endregion
195
195
  //#region src/dom/load.ts
196
- function _load_template(id, load) {
196
+ const _load_template = /*@__PURE__*/ withLazy((id, load) => {
197
197
  let pending;
198
198
  const lazyTemplate = _template(id, 0, 0, (branch) => {
199
199
  const awaitCounter = addAwaitCounter(branch);
@@ -204,8 +204,8 @@ function _load_template(id, load) {
204
204
  }, loadFailed(branch, awaitCounter));
205
205
  }, _load_signal(() => (pending ||= load()).then((r) => ({ _: r[Params] }))));
206
206
  return lazyTemplate;
207
- }
208
- function _load_setup(nodeAccessor, childScopeAccessor, load) {
207
+ });
208
+ const _load_setup = /*@__PURE__*/ withLazy((nodeAccessor, childScopeAccessor, load) => {
209
209
  let pending;
210
210
  let renderer;
211
211
  return (owner) => {
@@ -220,7 +220,7 @@ function _load_setup(nodeAccessor, childScopeAccessor, load) {
220
220
  }, loadFailed(child, awaitCounter));
221
221
  }
222
222
  };
223
- }
223
+ });
224
224
  function insertLoaded(renderer, branch, marker, awaitCounter) {
225
225
  const parent = marker.parentNode, values = branch[Load], insert = () => {
226
226
  insertBranchBefore(branch, parent, marker);
@@ -254,7 +254,7 @@ function loadFailed(scope, awaitCounter) {
254
254
  queueAsyncRender(scope, renderCatch, error);
255
255
  };
256
256
  }
257
- function _load_signal(load) {
257
+ const _load_signal = /*@__PURE__*/ withLazy((load) => {
258
258
  let pending;
259
259
  let signal;
260
260
  return (scope, value) => {
@@ -263,7 +263,7 @@ function _load_signal(load) {
263
263
  else if (signal) signal(scope, value);
264
264
  else pending.then((mod) => queueAsyncRender(scope, signal = mod._, value), () => 0);
265
265
  };
266
- }
266
+ });
267
267
  function _load_visible_trigger(selector, options) {
268
268
  let pending;
269
269
  let el;
@@ -255,6 +255,7 @@ function joinWithAnd(a) {
255
255
  //#endregion
256
256
  //#region src/common/meta.ts
257
257
  const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
258
+ const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
258
259
  //#endregion
259
260
  //#region src/html/content.ts
260
261
  function _to_text(val) {
@@ -3077,10 +3078,10 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
3077
3078
  if (renderer === "textarea") {
3078
3079
  if (renderContent) throw new Error("A dynamic tag rendering a `<textarea>` cannot have `content` and must use the `value` attribute instead.");
3079
3080
  _html(_attr_textarea_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, 1));
3080
- } else if (renderContent) {
3081
- if (typeof renderContent !== "function") throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
3082
- if (renderer === "select" && ("value" in input || "valueChange" in input)) _attr_select_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, renderContent, 1);
3083
- else _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason);
3081
+ } else {
3082
+ if (renderContent && typeof renderContent !== "function") throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
3083
+ if (renderer === "select" && ("value" in input || "valueChange" in input)) _attr_select_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, renderContent ? () => _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason) : void 0, 1);
3084
+ else if (renderContent) _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason);
3084
3085
  }
3085
3086
  _html(`</${renderer}>`);
3086
3087
  } else if (content) throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
@@ -3093,6 +3094,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
3093
3094
  if (shouldResume || needsScript) _html(state.mark("'", scopeId + " " + accessor + " " + branchId));
3094
3095
  };
3095
3096
  renderNative();
3097
+ result = _el(branchId, DYNAMIC_TAG_VAR_REGISTER_ID);
3096
3098
  } else {
3097
3099
  const chunk = getChunk();
3098
3100
  const beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0;
@@ -253,6 +253,7 @@ function joinWithAnd(a) {
253
253
  //#endregion
254
254
  //#region src/common/meta.ts
255
255
  const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
256
+ const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
256
257
  //#endregion
257
258
  //#region src/html/content.ts
258
259
  function _to_text(val) {
@@ -3075,10 +3076,10 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
3075
3076
  if (renderer === "textarea") {
3076
3077
  if (renderContent) throw new Error("A dynamic tag rendering a `<textarea>` cannot have `content` and must use the `value` attribute instead.");
3077
3078
  _html(_attr_textarea_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, 1));
3078
- } else if (renderContent) {
3079
- if (typeof renderContent !== "function") throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
3080
- if (renderer === "select" && ("value" in input || "valueChange" in input)) _attr_select_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, renderContent, 1);
3081
- else _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason);
3079
+ } else {
3080
+ if (renderContent && typeof renderContent !== "function") throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
3081
+ if (renderer === "select" && ("value" in input || "valueChange" in input)) _attr_select_value(branchId, `#${renderer.toLowerCase()}/0`, input.value, input.valueChange, renderContent ? () => _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason) : void 0, 1);
3082
+ else if (renderContent) _dynamic_tag(branchId, `#${renderer.toLowerCase()}/0`, renderContent, void 0, 0, void 0, serializeReason);
3082
3083
  }
3083
3084
  _html(`</${renderer}>`);
3084
3085
  } else if (content) throw new Error(`Body content is not supported for the \`<${renderer}>\` tag.`);
@@ -3091,6 +3092,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
3091
3092
  if (shouldResume || needsScript) _html(state.mark("'", scopeId + " " + accessor + " " + branchId));
3092
3093
  };
3093
3094
  renderNative();
3095
+ result = _el(branchId, DYNAMIC_TAG_VAR_REGISTER_ID);
3094
3096
  } else {
3095
3097
  const chunk = getChunk();
3096
3098
  const beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0;
@@ -3,3 +3,5 @@ export declare function $signalReset(scope: Scope, id: string | number): void;
3
3
  export declare function $signal(scope: Scope, id: string | number): AbortSignal;
4
4
  /** Enrols `scope` with its branch so destroying the branch cleans it up. */
5
5
  export declare function trackCleanup(scope: Scope, subscribers?: Set<Scope>): void;
6
+ export declare let abortsEnabled: undefined | 1;
7
+ export declare let subscriptionsEnabled: undefined | 1;