marko 6.0.0-next.3.38 → 6.0.0-next.3.39

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.
@@ -44,49 +44,6 @@ function forTo(to, from, step, cb) {
44
44
  }
45
45
  }
46
46
 
47
- // src/dom/schedule.ts
48
- var runTask;
49
- var port2 = /* @__PURE__ */ (() => {
50
- const { port1, port2: port22 } = new MessageChannel();
51
- port1.onmessage = () => {
52
- isScheduled = false;
53
- if (true) {
54
- const run2 = runTask;
55
- runTask = void 0;
56
- run2();
57
- } else {
58
- run();
59
- }
60
- };
61
- return port22;
62
- })();
63
- var isScheduled;
64
- function schedule() {
65
- if (!isScheduled) {
66
- if (true) {
67
- if (console.createTask) {
68
- const task = console.createTask("queue");
69
- runTask = () => task.run(run);
70
- } else {
71
- runTask = run;
72
- }
73
- }
74
- isScheduled = true;
75
- queueMicrotask(flushAndWaitFrame);
76
- }
77
- }
78
- function flushAndWaitFrame() {
79
- if (true) {
80
- runTask();
81
- } else {
82
- run();
83
- }
84
- requestAnimationFrame(triggerMacroTask);
85
- }
86
- function triggerMacroTask() {
87
- port2.postMessage(0);
88
- }
89
-
90
47
  // src/common/helpers.ts
91
48
  function classValue(value2) {
92
49
  return toDelimitedString(value2, " ", stringifyClassObject);
@@ -417,10 +374,6 @@ function init(runtimeId = DEFAULT_RUNTIME_ID) {
417
374
  });
418
375
  }
419
376
  }
420
- function registerSubscriber(id, signal) {
421
- register(id, signal.___subscribe);
422
- return signal;
423
- }
424
377
  function nodeRef(id, key) {
425
378
  return register(id, (scope) => () => scope[key]);
426
379
  }
@@ -971,9 +924,10 @@ function toInsertNode(startNode, endNode) {
971
924
  // src/dom/scope.ts
972
925
  var pendingScopes = [];
973
926
  var debugID = 0;
974
- function createScope($global) {
927
+ function createScope($global, closestBranch) {
975
928
  const scope = {
976
929
  ___pending: 1,
930
+ ___closestBranch: closestBranch,
977
931
  $global
978
932
  };
979
933
  if (true) {
@@ -1195,10 +1149,10 @@ function trimWalkString(walkString) {
1195
1149
  }
1196
1150
  function walk(startNode, walkCodes, branch) {
1197
1151
  walker.currentNode = startNode;
1198
- walkInternal(walkCodes, branch, 0);
1152
+ walkInternal(0, walkCodes, branch);
1199
1153
  walker.currentNode = document;
1200
1154
  }
1201
- function walkInternal(walkCodes, scope, currentWalkIndex) {
1155
+ function walkInternal(currentWalkIndex, walkCodes, scope) {
1202
1156
  let value2;
1203
1157
  let storedMultiplier = 0;
1204
1158
  let currentMultiplier = 0;
@@ -1225,9 +1179,11 @@ function walkInternal(walkCodes, scope, currentWalkIndex) {
1225
1179
  walker.nextNode();
1226
1180
  }
1227
1181
  } else if (value2 === 47 /* BeginChild */) {
1228
- const childScope = scope[true ? getDebugKey(currentScopeIndex++, "#childScope") : currentScopeIndex++] = createScope(scope.$global);
1229
- childScope.___closestBranch = scope.___closestBranch;
1230
- currentWalkIndex = walkInternal(walkCodes, childScope, currentWalkIndex);
1182
+ currentWalkIndex = walkInternal(
1183
+ currentWalkIndex,
1184
+ walkCodes,
1185
+ scope[true ? getDebugKey(currentScopeIndex++, "#childScope") : currentScopeIndex++] = createScope(scope.$global, scope.___closestBranch)
1186
+ );
1231
1187
  } else if (value2 === 38 /* EndChild */) {
1232
1188
  return currentWalkIndex;
1233
1189
  } else if (value2 === 32 /* Get */) {
@@ -1304,9 +1260,14 @@ function createBranch($global, ownerScope, parentScope) {
1304
1260
  function initBranch(renderer, branch, parentNode) {
1305
1261
  const clone = renderer.___clone(parentNode.namespaceURI);
1306
1262
  const cloneParent = clone.parentNode;
1307
- walk(cloneParent?.firstChild || clone, renderer.___walks, branch);
1308
- branch.___startNode = cloneParent?.firstChild || clone;
1309
- branch.___endNode = cloneParent?.lastChild || clone;
1263
+ if (cloneParent) {
1264
+ walk(cloneParent.firstChild, renderer.___walks, branch);
1265
+ branch.___startNode = cloneParent.firstChild;
1266
+ branch.___endNode = cloneParent.lastChild;
1267
+ } else {
1268
+ walk(clone, renderer.___walks, branch);
1269
+ branch.___startNode = branch.___endNode = clone;
1270
+ }
1310
1271
  if (renderer.___setup) {
1311
1272
  queueRender(branch, renderer.___setup);
1312
1273
  }
@@ -1579,6 +1540,49 @@ function isDifferentRenderer(a, b) {
1579
1540
  return a !== b && (a?.___id || 0) !== b?.___id;
1580
1541
  }
1581
1542
 
1543
+ // src/dom/schedule.ts
1544
+ var runTask;
1545
+ var port2 = /* @__PURE__ */ (() => {
1546
+ const { port1, port2: port22 } = new MessageChannel();
1547
+ port1.onmessage = () => {
1548
+ isScheduled = false;
1549
+ if (true) {
1550
+ const run2 = runTask;
1551
+ runTask = void 0;
1552
+ run2();
1553
+ } else {
1554
+ run();
1555
+ }
1556
+ };
1557
+ return port22;
1558
+ })();
1559
+ var isScheduled;
1560
+ function schedule() {
1561
+ if (!isScheduled) {
1562
+ if (true) {
1563
+ if (console.createTask) {
1564
+ const task = console.createTask("queue");
1565
+ runTask = () => task.run(run);
1566
+ } else {
1567
+ runTask = run;
1568
+ }
1569
+ }
1570
+ isScheduled = true;
1571
+ queueMicrotask(flushAndWaitFrame);
1572
+ }
1573
+ }
1574
+ function flushAndWaitFrame() {
1575
+ if (true) {
1576
+ runTask();
1577
+ } else {
1578
+ run();
1579
+ }
1580
+ requestAnimationFrame(triggerMacroTask);
1581
+ }
1582
+ function triggerMacroTask() {
1583
+ port2.postMessage(0);
1584
+ }
1585
+
1582
1586
  // src/dom/signals.ts
1583
1587
  var MARK = true ? Symbol("mark") : {};
1584
1588
  var CLEAN = true ? Symbol("clean") : {};
@@ -1597,6 +1601,7 @@ function state(valueAccessor, fn, getIntersection) {
1597
1601
  } else if (scope[valueChangeAccessor]) {
1598
1602
  scope[valueChangeAccessor](valueOrOp);
1599
1603
  } else {
1604
+ schedule();
1600
1605
  queueSource(scope, valueSignal, valueOrOp);
1601
1606
  }
1602
1607
  return valueOrOp;
@@ -1604,21 +1609,21 @@ function state(valueAccessor, fn, getIntersection) {
1604
1609
  }
1605
1610
  function value(valueAccessor, fn, getIntersection) {
1606
1611
  const markAccessor = valueAccessor + "#" /* Mark */;
1607
- let intersection2 = getIntersection && ((scope, op) => (intersection2 = getIntersection())(scope, op));
1612
+ let intersection2;
1608
1613
  return (scope, valueOrOp) => {
1609
1614
  if (valueOrOp === MARK) {
1610
1615
  if ((scope[markAccessor] = (scope[markAccessor] ?? 0) + 1) === 1) {
1611
- intersection2?.(scope, MARK);
1616
+ getIntersection && (intersection2 ||= getIntersection())(scope, MARK);
1612
1617
  }
1613
1618
  } else if (valueOrOp !== DIRTY) {
1614
1619
  const existing = scope[markAccessor] !== void 0;
1615
1620
  if ((scope[markAccessor] ||= 1) === 1) {
1616
1621
  if (valueOrOp === CLEAN || existing && scope[valueAccessor] === valueOrOp) {
1617
- intersection2?.(scope, CLEAN);
1622
+ getIntersection && (intersection2 ||= getIntersection())(scope, CLEAN);
1618
1623
  } else {
1619
1624
  scope[valueAccessor] = valueOrOp;
1620
1625
  fn && fn(scope, valueOrOp);
1621
- intersection2?.(scope, DIRTY);
1626
+ getIntersection && (intersection2 ||= getIntersection())(scope, DIRTY);
1622
1627
  }
1623
1628
  }
1624
1629
  scope[markAccessor]--;
@@ -1629,11 +1634,11 @@ var accessorId = 0;
1629
1634
  function intersection(count, fn, getIntersection) {
1630
1635
  const dirtyAccessor = "?" /* Dynamic */ + accessorId++;
1631
1636
  const markAccessor = dirtyAccessor + "#" /* Mark */;
1632
- let intersection2 = getIntersection && ((scope, op) => (intersection2 = getIntersection())(scope, op));
1637
+ let intersection2;
1633
1638
  return (scope, op) => {
1634
1639
  if (op === MARK) {
1635
1640
  if ((scope[markAccessor] = (scope[markAccessor] ?? 0) + 1) === 1) {
1636
- intersection2?.(scope, MARK);
1641
+ getIntersection && (intersection2 ||= getIntersection())(scope, MARK);
1637
1642
  }
1638
1643
  } else if (scope[markAccessor] === void 0) {
1639
1644
  scope[markAccessor] = count - 1;
@@ -1641,84 +1646,101 @@ function intersection(count, fn, getIntersection) {
1641
1646
  } else if (--scope[markAccessor] === 0) {
1642
1647
  if (op === DIRTY || scope[dirtyAccessor]) {
1643
1648
  scope[dirtyAccessor] = false;
1644
- fn(scope, 0);
1645
- intersection2?.(scope, DIRTY);
1649
+ fn(scope);
1650
+ getIntersection && (intersection2 ||= getIntersection())(scope, DIRTY);
1646
1651
  } else {
1647
- intersection2?.(scope, CLEAN);
1652
+ getIntersection && (intersection2 ||= getIntersection())(scope, CLEAN);
1648
1653
  }
1649
1654
  } else {
1650
1655
  scope[dirtyAccessor] ||= op === DIRTY;
1651
1656
  }
1652
1657
  };
1653
1658
  }
1654
- function closure(fn, getIntersection) {
1655
- let intersection2 = getIntersection && ((scope, op) => (intersection2 = getIntersection())(scope, op));
1656
- return (scope, valueOrOp) => {
1657
- if (valueOrOp === MARK) {
1658
- intersection2?.(scope, MARK);
1659
- } else {
1660
- fn && fn(scope, valueOrOp);
1661
- intersection2?.(scope, DIRTY);
1662
- }
1663
- };
1664
- }
1665
- function loopClosure(ownerLoopNodeAccessor, fn, getIntersection) {
1666
- const signal = closure(fn, getIntersection);
1659
+ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn, getIntersection) {
1660
+ const childSignal = closure(valueAccessor, fn, getIntersection);
1667
1661
  const loopScopeAccessor = ownerLoopNodeAccessor + "!" /* LoopScopeArray */;
1668
1662
  const loopScopeMapAccessor = ownerLoopNodeAccessor + "(" /* LoopScopeMap */;
1669
- const helperSignal = (ownerScope, value2) => {
1663
+ const ownerSignal = (ownerScope) => {
1670
1664
  const loopScopes = ownerScope[loopScopeAccessor] ?? ownerScope[loopScopeMapAccessor]?.values() ?? [];
1671
1665
  if (loopScopes !== emptyMarkerArray) {
1672
1666
  for (const scope of loopScopes) {
1673
1667
  if (!scope.___pending) {
1674
- queueSource(scope, signal, value2);
1668
+ queueSource(scope, childSignal);
1675
1669
  }
1676
1670
  }
1677
1671
  }
1678
1672
  };
1679
- helperSignal._ = signal;
1680
- return helperSignal;
1673
+ ownerSignal._ = childSignal;
1674
+ return ownerSignal;
1681
1675
  }
1682
- function conditionalClosure(ownerConditionalNodeAccessor, branch, fn, getIntersection) {
1683
- const signal = closure(fn, getIntersection);
1676
+ function conditionalClosure(valueAccessor, ownerConditionalNodeAccessor, branch, fn, getIntersection) {
1677
+ const childSignal = closure(valueAccessor, fn, getIntersection);
1684
1678
  const scopeAccessor = ownerConditionalNodeAccessor + "!" /* ConditionalScope */;
1685
1679
  const branchAccessor = ownerConditionalNodeAccessor + "(" /* ConditionalRenderer */;
1686
- const helperSignal = (scope, value2) => {
1680
+ const ownerSignal = (scope) => {
1687
1681
  const ifScope = scope[scopeAccessor];
1688
1682
  if (ifScope && !ifScope.___pending && scope[branchAccessor] === branch) {
1689
- queueSource(ifScope, signal, value2);
1683
+ queueSource(ifScope, childSignal);
1690
1684
  }
1691
1685
  };
1692
- helperSignal._ = signal;
1693
- return helperSignal;
1694
- }
1695
- var defaultGetOwnerScope = (scope) => scope._;
1696
- function dynamicClosure(fn, getOwnerScope = defaultGetOwnerScope, getIntersection) {
1697
- const ownerSubscribersAccessor = "?" /* Dynamic */ + accessorId++;
1698
- const _signal = closure(fn, getIntersection);
1699
- const helperSignal = (ownerScope, value2) => {
1700
- const subscribers = ownerScope[ownerSubscribersAccessor];
1686
+ ownerSignal._ = childSignal;
1687
+ return ownerSignal;
1688
+ }
1689
+ function dynamicClosure(valueAccessor, fn, getIntersection, getOwnerScope) {
1690
+ const subscribersAccessor = "?" /* Dynamic */ + accessorId++;
1691
+ const childSignal = closure(
1692
+ valueAccessor,
1693
+ fn,
1694
+ getIntersection,
1695
+ getOwnerScope
1696
+ );
1697
+ const ownerSignal = (ownerScope) => {
1698
+ const subscribers = ownerScope[subscribersAccessor];
1701
1699
  if (subscribers) {
1702
1700
  for (const subscriber of subscribers) {
1703
1701
  if (!subscriber.___pending) {
1704
- queueSource(subscriber, _signal, value2);
1702
+ queueSource(subscriber, childSignal);
1705
1703
  }
1706
1704
  }
1707
1705
  }
1708
1706
  };
1709
- const setupSignal = (scope, value2) => {
1710
- _signal(scope, value2);
1707
+ const subscribe = (scope) => {
1708
+ const owner = getOwnerScope ? getOwnerScope(scope) : scope._;
1709
+ const subscribers = owner[subscribersAccessor] ||= /* @__PURE__ */ new Set();
1710
+ if (!subscribers.has(scope)) {
1711
+ subscribers.add(scope);
1712
+ getAbortSignal(scope, -1).addEventListener(
1713
+ "abort",
1714
+ () => owner[subscribersAccessor].delete(scope)
1715
+ );
1716
+ }
1717
+ };
1718
+ ownerSignal.___subscribe = subscribe;
1719
+ ownerSignal._ = (scope) => {
1720
+ childSignal(scope);
1711
1721
  subscribe(scope);
1712
1722
  };
1713
- const subscribe = (scope) => {
1714
- (getOwnerScope(scope)[ownerSubscribersAccessor] ||= /* @__PURE__ */ new Set()).add(scope);
1715
- getAbortSignal(scope, -1).addEventListener("abort", () => {
1716
- getOwnerScope(scope)[ownerSubscribersAccessor].delete(scope);
1717
- });
1723
+ return ownerSignal;
1724
+ }
1725
+ function registerDynamicClosure(id, valueAccessor, fn, getIntersection, getOwnerScope) {
1726
+ const signal = dynamicClosure(
1727
+ valueAccessor,
1728
+ fn,
1729
+ getIntersection,
1730
+ getOwnerScope
1731
+ );
1732
+ register(id, signal.___subscribe);
1733
+ return signal;
1734
+ }
1735
+ function closure(valueAccessor, fn, getIntersection, getOwnerScope) {
1736
+ let intersection2;
1737
+ return (scope, op) => {
1738
+ op || fn && fn(
1739
+ scope,
1740
+ (getOwnerScope ? getOwnerScope(scope) : scope._)[valueAccessor]
1741
+ );
1742
+ getIntersection && (intersection2 ||= getIntersection())(scope, op ? MARK : DIRTY);
1718
1743
  };
1719
- helperSignal._ = setupSignal;
1720
- helperSignal.___subscribe = subscribe;
1721
- return helperSignal;
1722
1744
  }
1723
1745
  function setTagVar(scope, childAccessor, tagVarSignal2) {
1724
1746
  scope[childAccessor]["/" /* TagVariable */] = (valueOrOp) => tagVarSignal2(scope, valueOrOp);
@@ -1758,13 +1780,11 @@ var pendingRenders = [];
1758
1780
  var pendingEffects = [];
1759
1781
  var rendering = false;
1760
1782
  function queueSource(scope, signal, value2) {
1761
- schedule();
1762
1783
  const prevRendering = rendering;
1763
1784
  rendering = true;
1764
1785
  signal(scope, MARK);
1765
1786
  rendering = prevRendering;
1766
1787
  queueRender(scope, signal, value2);
1767
- return value2;
1768
1788
  }
1769
1789
  function queueRender(scope, signal, value2) {
1770
1790
  let i = pendingRenders.length;
@@ -1772,6 +1792,7 @@ function queueRender(scope, signal, value2) {
1772
1792
  ___scope: scope,
1773
1793
  ___signal: signal,
1774
1794
  ___value: value2,
1795
+ ___depth: scope.___closestBranch?.___branchDepth || 0,
1775
1796
  ___index: i
1776
1797
  };
1777
1798
  pendingRenders.push(render);
@@ -1815,7 +1836,7 @@ function prepareEffects(fn) {
1815
1836
  }
1816
1837
  return preparedEffects;
1817
1838
  }
1818
- function runEffects(effects = pendingEffects) {
1839
+ function runEffects(effects) {
1819
1840
  for (let i = 0; i < effects.length; i += 2 /* Total */) {
1820
1841
  const scope = effects[i];
1821
1842
  const fn = effects[i + 1];
@@ -1855,10 +1876,7 @@ function runRenders() {
1855
1876
  finishPendingScopes();
1856
1877
  }
1857
1878
  function comparePendingRenders(a, b) {
1858
- return getBranchDepth(a) - getBranchDepth(b) || a.___index - b.___index;
1859
- }
1860
- function getBranchDepth(render) {
1861
- return render.___scope.___closestBranch?.___branchDepth || 0;
1879
+ return a.___depth - b.___depth || a.___index - b.___index;
1862
1880
  }
1863
1881
 
1864
1882
  // src/dom/abort-signal.ts
@@ -2033,7 +2051,7 @@ function mount(input = {}, reference, position) {
2033
2051
  );
2034
2052
  runEffects(effects);
2035
2053
  return {
2036
- update: (newInput) => {
2054
+ update(newInput) {
2037
2055
  if (args) {
2038
2056
  runEffects(
2039
2057
  prepareEffects(() => {
@@ -2043,7 +2061,7 @@ function mount(input = {}, reference, position) {
2043
2061
  );
2044
2062
  }
2045
2063
  },
2046
- destroy: () => {
2064
+ destroy() {
2047
2065
  removeAndDestroyBranch(branch);
2048
2066
  }
2049
2067
  };
@@ -2099,7 +2117,7 @@ export {
2099
2117
  props,
2100
2118
  register,
2101
2119
  registerBoundSignal,
2102
- registerSubscriber,
2120
+ registerDynamicClosure,
2103
2121
  resetAbortSignal,
2104
2122
  run,
2105
2123
  setTagVar,
@@ -3,10 +3,10 @@ import { type Signal } from "./signals";
3
3
  type ExecFn<S extends Scope = Scope> = (scope: S, arg?: any) => void;
4
4
  export declare let pendingEffects: unknown[];
5
5
  export declare let rendering: boolean;
6
- export declare function queueSource<T>(scope: Scope, signal: Signal<T>, value: T): T;
6
+ export declare function queueSource<T>(scope: Scope, signal: Signal<T>, value?: T): void;
7
7
  export declare function queueRender(scope: Scope, signal: Signal<any>, value?: unknown): void;
8
8
  export declare function queueEffect<S extends Scope, T extends ExecFn<S>>(scope: S, fn: T): void;
9
9
  export declare function run(): void;
10
10
  export declare function prepareEffects(fn: () => void): unknown[];
11
- export declare function runEffects(effects?: unknown[]): void;
11
+ export declare function runEffects(effects: unknown[]): void;
12
12
  export {};
@@ -5,5 +5,4 @@ export declare function register<T>(id: string, obj: T): T;
5
5
  export declare function registerBoundSignal<T extends Signal<unknown>>(id: string, signal: T): T;
6
6
  export declare function getRegisteredWithScope(id: string, scope?: Scope): unknown;
7
7
  export declare function init(runtimeId?: string): void;
8
- export declare function registerSubscriber(id: string, signal: Signal<never>): Signal<never>;
9
8
  export declare function nodeRef(id: string, key: string): (scope: Scope) => () => any;
@@ -1,5 +1,5 @@
1
1
  import type { BranchScope, Scope } from "../common/types";
2
- export declare function createScope($global: Scope["$global"]): Scope;
2
+ export declare function createScope($global: Scope["$global"], closestBranch?: BranchScope): Scope;
3
3
  export declare function finishPendingScopes(): void;
4
4
  export declare function getEmptyBranch(marker: Comment): BranchScope;
5
5
  export declare function destroyBranch(branch: BranchScope): void;
@@ -7,13 +7,21 @@ export type SignalFn<T> = (scope: Scope, value: T) => void;
7
7
  export type Signal<T> = ((scope: Scope, value: T | SignalOp) => void) & {
8
8
  ___subscribe?(scope: Scope): void;
9
9
  };
10
- export declare function state<T>(valueAccessor: Accessor, fn: Signal<T>, getIntersection?: () => Signal<never>): (scope: Scope, valueOrOp: T | SignalOp, valueChange?: (v: T) => void) => SignalOp | T;
11
- export declare function value<T>(valueAccessor: Accessor, fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): Signal<T>;
10
+ export declare function state<T>(valueAccessor: Accessor, fn: 0 | undefined | Signal<T>, getIntersection?: () => Signal<never>): (scope: Scope, valueOrOp: T | SignalOp, valueChange?: (v: T) => void) => SignalOp | T;
11
+ export declare function value<T>(valueAccessor: Accessor, fn: 0 | undefined | SignalFn<T>, getIntersection?: () => Signal<never>): Signal<T>;
12
12
  export declare function intersection(count: number, fn: SignalFn<never>, getIntersection?: () => Signal<never>): Signal<never>;
13
- export declare function closure<T>(fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): Signal<T>;
14
- export declare function loopClosure<T>(ownerLoopNodeAccessor: Accessor, fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): SignalFn<T>;
15
- export declare function conditionalClosure<T>(ownerConditionalNodeAccessor: Accessor, branch: number, fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): SignalFn<T>;
16
- export declare function dynamicClosure<T>(fn: Signal<T> | 0, getOwnerScope?: (scope: Scope) => Scope, getIntersection?: () => Signal<never>): SignalFn<T>;
13
+ export declare function loopClosure<T>(valueAccessor: Accessor, ownerLoopNodeAccessor: Accessor, fn: 0 | SignalFn<T>, getIntersection?: 0 | (() => Signal<never>)): SignalFn<T>;
14
+ export declare function conditionalClosure<T>(valueAccessor: Accessor, ownerConditionalNodeAccessor: Accessor, branch: number, fn: 0 | SignalFn<T>, getIntersection?: 0 | (() => Signal<never>)): SignalFn<T>;
15
+ export declare function dynamicClosure<T>(valueAccessor: Accessor, fn: 0 | Signal<T>, getIntersection?: 0 | (() => Signal<never>), getOwnerScope?: (scope: Scope) => Scope): {
16
+ (ownerScope: Scope): void;
17
+ ___subscribe: (scope: Scope) => void;
18
+ _(scope: Scope): void;
19
+ };
20
+ export declare function registerDynamicClosure<T>(id: string, valueAccessor: Accessor, fn: 0 | Signal<T>, getIntersection?: 0 | (() => Signal<never>), getOwnerScope?: (scope: Scope) => Scope): {
21
+ (ownerScope: Scope): void;
22
+ ___subscribe: (scope: Scope) => void;
23
+ _(scope: Scope): void;
24
+ };
17
25
  export declare function setTagVar(scope: Scope, childAccessor: Accessor, tagVarSignal: Signal<unknown>): void;
18
26
  export declare const tagVarSignal: (scope: Scope, valueOrOp: unknown | SignalOp) => any;
19
27
  export declare function setTagVarChange(scope: Scope, changeHandler: (value: unknown) => void): void;
package/dist/dom.d.ts CHANGED
@@ -8,6 +8,6 @@ export { attr, attrs, attrsEvents, classAttr, data, html, lifecycle, partialAttr
8
8
  export { on } from "./dom/event";
9
9
  export { run } from "./dom/queue";
10
10
  export { createRenderer, createRendererWithOwner, dynamicTagAttrs, } from "./dom/renderer";
11
- export { init, nodeRef, register, registerBoundSignal, registerSubscriber, } from "./dom/resume";
12
- export { conditionalClosure, dynamicClosure, effect, inChild, intersection, intersections, loopClosure, nextTagId, setTagVar, setTagVarChange, state, tagVarSignal, tagVarSignalChange, value, } from "./dom/signals";
11
+ export { init, nodeRef, register, registerBoundSignal } from "./dom/resume";
12
+ export { conditionalClosure, dynamicClosure, effect, inChild, intersection, intersections, loopClosure, nextTagId, registerDynamicClosure, setTagVar, setTagVarChange, state, tagVarSignal, tagVarSignalChange, value, } from "./dom/signals";
13
13
  export { createTemplate } from "./dom/template";