@marko/runtime-tags 0.3.44 → 0.3.45

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 CHANGED
@@ -1730,12 +1730,12 @@ function createCloneableHTML(html2, ns) {
1730
1730
  // src/dom/control-flow.ts
1731
1731
  function conditional(nodeAccessor, ...branches) {
1732
1732
  const branchAccessor = nodeAccessor + "(" /* ConditionalRenderer */;
1733
- return (scope, newBranchIndexOrOp) => {
1734
- if (newBranchIndexOrOp !== scope[branchAccessor] && newBranchIndexOrOp !== DIRTY && newBranchIndexOrOp !== MARK && newBranchIndexOrOp !== CLEAN) {
1733
+ return (scope, newBranch) => {
1734
+ if (newBranch !== scope[branchAccessor]) {
1735
1735
  setConditionalRenderer(
1736
1736
  scope,
1737
1737
  nodeAccessor,
1738
- branches[scope[branchAccessor] = newBranchIndexOrOp],
1738
+ branches[scope[branchAccessor] = newBranch],
1739
1739
  createBranchScopeWithRenderer
1740
1740
  );
1741
1741
  }
@@ -1645,12 +1645,12 @@ function createCloneableHTML(html2, ns) {
1645
1645
  // src/dom/control-flow.ts
1646
1646
  function conditional(nodeAccessor, ...branches) {
1647
1647
  const branchAccessor = nodeAccessor + "(" /* ConditionalRenderer */;
1648
- return (scope, newBranchIndexOrOp) => {
1649
- if (newBranchIndexOrOp !== scope[branchAccessor] && newBranchIndexOrOp !== DIRTY && newBranchIndexOrOp !== MARK && newBranchIndexOrOp !== CLEAN) {
1648
+ return (scope, newBranch) => {
1649
+ if (newBranch !== scope[branchAccessor]) {
1650
1650
  setConditionalRenderer(
1651
1651
  scope,
1652
1652
  nodeAccessor,
1653
- branches[scope[branchAccessor] = newBranchIndexOrOp],
1653
+ branches[scope[branchAccessor] = newBranch],
1654
1654
  createBranchScopeWithRenderer
1655
1655
  );
1656
1656
  }
@@ -1,7 +1,7 @@
1
1
  import { type Accessor, type BranchScope, type Scope } from "../common/types";
2
2
  import { type Renderer } from "./renderer";
3
3
  import { type Signal, type SignalOp } from "./signals";
4
- export declare function conditional(nodeAccessor: Accessor, ...branches: Renderer[]): Signal<number>;
4
+ export declare function conditional(nodeAccessor: Accessor, ...branches: Renderer[]): (scope: Scope, newBranch: number) => void;
5
5
  export declare function patchDynamicTag(fn: <T extends typeof dynamicTag>(cond: T) => T): void;
6
6
  export declare let dynamicTag: (nodeAccessor: Accessor, getContent?: ((scope: Scope) => Renderer) | 0, getTagVar?: (() => Signal<unknown>) | 0, inputIsArgs?: 1) => Signal<Renderer | string | undefined>;
7
7
  export declare function setConditionalRenderer<T>(scope: Scope, nodeAccessor: Accessor, newRenderer: T, createBranch: (renderer: NonNullable<T>, $global: Scope["$global"], parentScope: Scope, parentNode: ParentNode) => BranchScope): void;
package/dist/dom.js CHANGED
@@ -1141,11 +1141,11 @@ function createCloneableHTML(html2, ns) {
1141
1141
  // src/dom/control-flow.ts
1142
1142
  function conditional(nodeAccessor, ...branches) {
1143
1143
  let branchAccessor = nodeAccessor + "(" /* ConditionalRenderer */;
1144
- return (scope, newBranchIndexOrOp) => {
1145
- newBranchIndexOrOp !== scope[branchAccessor] && newBranchIndexOrOp !== DIRTY && newBranchIndexOrOp !== MARK && newBranchIndexOrOp !== CLEAN && setConditionalRenderer(
1144
+ return (scope, newBranch) => {
1145
+ newBranch !== scope[branchAccessor] && setConditionalRenderer(
1146
1146
  scope,
1147
1147
  nodeAccessor,
1148
- branches[scope[branchAccessor] = newBranchIndexOrOp],
1148
+ branches[scope[branchAccessor] = newBranch],
1149
1149
  createBranchScopeWithRenderer
1150
1150
  );
1151
1151
  };
package/dist/dom.mjs CHANGED
@@ -1059,11 +1059,11 @@ function createCloneableHTML(html2, ns) {
1059
1059
  // src/dom/control-flow.ts
1060
1060
  function conditional(nodeAccessor, ...branches) {
1061
1061
  let branchAccessor = nodeAccessor + "(" /* ConditionalRenderer */;
1062
- return (scope, newBranchIndexOrOp) => {
1063
- newBranchIndexOrOp !== scope[branchAccessor] && newBranchIndexOrOp !== DIRTY && newBranchIndexOrOp !== MARK && newBranchIndexOrOp !== CLEAN && setConditionalRenderer(
1062
+ return (scope, newBranch) => {
1063
+ newBranch !== scope[branchAccessor] && setConditionalRenderer(
1064
1064
  scope,
1065
1065
  nodeAccessor,
1066
- branches[scope[branchAccessor] = newBranchIndexOrOp],
1066
+ branches[scope[branchAccessor] = newBranch],
1067
1067
  createBranchScopeWithRenderer
1068
1068
  );
1069
1069
  };
@@ -5331,9 +5331,6 @@ var for_default = {
5331
5331
  };
5332
5332
  const params = node.body.params;
5333
5333
  signal.hasDownstreamIntersections = () => {
5334
- if (bodySection.closures) {
5335
- return true;
5336
- }
5337
5334
  for (const param of params) {
5338
5335
  const binding = param.extra?.binding;
5339
5336
  if (binding) {
@@ -7222,7 +7219,6 @@ var IfTag = {
7222
7219
  ...rendererIdentifiers.reverse()
7223
7220
  );
7224
7221
  };
7225
- signal.hasDownstreamIntersections = () => branches.some(([, bodySection]) => bodySection?.closures);
7226
7222
  addValue(section, rootExtra.referencedBindings, signal, expr);
7227
7223
  }
7228
7224
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "0.3.44",
3
+ "version": "0.3.45",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",