@vielzeug/ore 26.11.6 → 26.11.7

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/ore.js CHANGED
@@ -857,9 +857,9 @@ var L = "default", normalizeSlotName = (e) => e || L, createSlots = (e) => {
857
857
  i.insertBefore(e, t), r.push(e);
858
858
  }
859
859
  return r;
860
- }, applyHtmlBinding = (e, t) => {
861
- let { anchor: n, signal: i } = e, a = createReplaceableSlot(), s = r(() => {
862
- let e = i.value;
860
+ }, toHtmlValues = (e) => Array.isArray(e) ? e : [e], applyHtmlBinding = (e, t) => {
861
+ let { anchor: n, source: i } = e, a = createReplaceableSlot(), s = r(() => {
862
+ let e = toHtmlValues(typeof i == "function" ? i() : i.value);
863
863
  a.clear(), e != null && e.length !== 0 && o(() => {
864
864
  a.setNodes(insertHtmlValues(e, n, a.registerCleanup));
865
865
  });
@@ -1041,7 +1041,7 @@ var L = "default", normalizeSlotName = (e) => e || L, createSlots = (e) => {
1041
1041
  let n = e;
1042
1042
  for (let e of t) n = n.childNodes[e];
1043
1043
  return n;
1044
- }, Z = "html`...`: node-slot comment anchor has no parent node", toHtmlValues = (e) => Array.isArray(e) ? e : [e], embedStaticResult = (e, t, n) => {
1044
+ }, Z = "html`...`: node-slot comment anchor has no parent node", embedStaticResult = (e, t, n) => {
1045
1045
  let r = t.parentNode;
1046
1046
  for (invariant(r, Z); e.fragment.firstChild;) r.insertBefore(e.fragment.firstChild, t);
1047
1047
  n.push(e.apply.bind(e));
@@ -1064,38 +1064,37 @@ var L = "default", normalizeSlotName = (e) => e || L, createSlots = (e) => {
1064
1064
  };
1065
1065
  });
1066
1066
  for (let { comment: e, el: n, slot: r, value: a } of l) if (r.kind === z.NODE) {
1067
- let n = e;
1068
- if (invariant(n, "compiled template produced a node slot without a comment anchor"), E(a)) {
1067
+ let t = e;
1068
+ if (invariant(t, "compiled template produced a node slot without a comment anchor"), E(a)) {
1069
1069
  o.push({
1070
- anchor: n,
1070
+ anchor: t,
1071
1071
  directive: a,
1072
1072
  type: "directive"
1073
1073
  });
1074
1074
  continue;
1075
1075
  }
1076
1076
  if (O(a)) {
1077
- embedStaticResult(a, n, c), n.remove();
1077
+ embedStaticResult(a, t, c), t.remove();
1078
1078
  continue;
1079
1079
  }
1080
1080
  if (typeof a == "function" || i(a)) {
1081
- let e = t(typeof a == "function" ? () => toHtmlValues(a()) : () => toHtmlValues(a.value));
1082
1081
  o.push({
1083
- anchor: n,
1084
- signal: e,
1082
+ anchor: t,
1083
+ source: a,
1085
1084
  type: "html"
1086
1085
  });
1087
1086
  continue;
1088
1087
  }
1089
1088
  if (Array.isArray(a)) {
1090
- for (let e of a) if (O(e)) embedStaticResult(e, n, c);
1089
+ for (let e of a) if (O(e)) embedStaticResult(e, t, c);
1091
1090
  else {
1092
- let t = n.parentNode;
1093
- invariant(t, Z), t.insertBefore(document.createTextNode(resolveStaticText(e)), n);
1091
+ let n = t.parentNode;
1092
+ invariant(n, Z), n.insertBefore(document.createTextNode(resolveStaticText(e)), t);
1094
1093
  }
1095
- n.remove();
1094
+ t.remove();
1096
1095
  continue;
1097
1096
  }
1098
- n.replaceWith(document.createTextNode(resolveStaticText(a)));
1097
+ t.replaceWith(document.createTextNode(resolveStaticText(a)));
1099
1098
  } else if (invariant(n, "compiled template produced an element slot without an element"), r.kind === z.EVENT) {
1100
1099
  let e = r.name;
1101
1100
  if (invariant(e, "compiled template produced an event slot without an event name"), typeof a == "function") o.push({