@marko/runtime-tags 6.1.1 → 6.1.2

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
@@ -970,8 +970,7 @@ function setAttribute(element, name, value) {
970
970
  else element.setAttribute(name, value);
971
971
  }
972
972
  function _attr_class(element, value) {
973
- value = typeof value === "string" ? value : toDelimitedString(value, " ", stringifyClassObject);
974
- if (value !== element.className) element.className = value;
973
+ setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassObject) || void 0);
975
974
  }
976
975
  function _attr_class_items(element, items) {
977
976
  for (const key in items) _attr_class_item(element, key, items[key]);
@@ -968,8 +968,7 @@ function setAttribute(element, name, value) {
968
968
  else element.setAttribute(name, value);
969
969
  }
970
970
  function _attr_class(element, value) {
971
- value = typeof value === "string" ? value : toDelimitedString(value, " ", stringifyClassObject);
972
- if (value !== element.className) element.className = value;
971
+ setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassObject) || void 0);
973
972
  }
974
973
  function _attr_class_items(element, items) {
975
974
  for (const key in items) _attr_class_item(element, key, items[key]);
package/dist/dom.js CHANGED
@@ -667,7 +667,7 @@ function setAttribute(element, name, value) {
667
667
  element.getAttribute(name) != value && (value === void 0 ? element.removeAttribute(name) : element.setAttribute(name, value));
668
668
  }
669
669
  function _attr_class(element, value) {
670
- value = typeof value == "string" ? value : toDelimitedString(value, " ", stringifyClassObject), value !== element.className && (element.className = value);
670
+ setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassObject) || void 0);
671
671
  }
672
672
  function _attr_class_items(element, items) {
673
673
  for (let key in items) _attr_class_item(element, key, items[key]);
package/dist/dom.mjs CHANGED
@@ -666,7 +666,7 @@ function setAttribute(element, name, value) {
666
666
  element.getAttribute(name) != value && (value === void 0 ? element.removeAttribute(name) : element.setAttribute(name, value));
667
667
  }
668
668
  function _attr_class(element, value) {
669
- value = typeof value == "string" ? value : toDelimitedString(value, " ", stringifyClassObject), value !== element.className && (element.className = value);
669
+ setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassObject) || void 0);
670
670
  }
671
671
  function _attr_class_items(element, items) {
672
672
  for (let key in items) _attr_class_item(element, key, items[key]);
@@ -1538,7 +1538,7 @@ function getSectionRegisterReasons(section) {
1538
1538
  if (downstreamBinding) {
1539
1539
  const downstreamReasons = getAllSerializeReasonsForBinding(downstreamBinding.binding, downstreamBinding.properties);
1540
1540
  if (!downstreamReasons) return false;
1541
- if (downstreamReasons !== true && !section.serializeReason && !section.serializeReasons.size && !section.parent?.serializeReason && !section.parent?.serializeReasons.size) return false;
1541
+ if (isReasonDynamic(downstreamReasons) && !section.serializeReason && !section.serializeReasons.size && !section.parent?.serializeReason && !section.parent?.serializeReasons.size) return false;
1542
1542
  return downstreamReasons;
1543
1543
  } else if (downstreamBinding === false) return false;
1544
1544
  return true;
@@ -75,7 +75,7 @@ export declare const getBranchRendererArgs: (section: Section) => [template?: t.
75
75
  export declare function forEachSection(fn: (section: Section) => void): void;
76
76
  export declare function forEachSectionReverse(fn: (section: Section) => void): void;
77
77
  export declare function getNodeContentType(path: t.NodePath<t.Statement>, extraMember: "startType" | "endType", contentInfo?: Section["content"]): ContentType | null;
78
- export declare function getSectionRegisterReasons(section: Section): boolean | Sources;
78
+ export declare function getSectionRegisterReasons(section: Section): false | SerializeReason;
79
79
  export declare function isImmediateOwner(section: Section, binding: Binding): boolean;
80
80
  export declare function isDirectClosure(section: Section, closure: Binding): boolean;
81
81
  export declare function isDynamicClosure(section: Section, closure: Binding): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",