@vielzeug/ore 26.11.6 → 26.11.8
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.cjs +1 -1
- package/dist/ore.cjs.map +1 -1
- package/dist/ore.iife.js +1 -1
- package/dist/ore.iife.js.map +1 -1
- package/dist/ore.js +15 -16
- package/dist/ore.js.map +1 -1
- package/dist/template/binding-types.d.ts +10 -1
- package/dist/template/binding-types.d.ts.map +1 -1
- package/dist/template/bindings.cjs +1 -1
- package/dist/template/bindings.cjs.map +1 -1
- package/dist/template/bindings.d.ts.map +1 -1
- package/dist/template/bindings.js +1 -1
- package/dist/template/bindings.js.map +1 -1
- package/dist/template/instantiator.cjs +1 -1
- package/dist/template/instantiator.cjs.map +1 -1
- package/dist/template/instantiator.d.ts.map +1 -1
- package/dist/template/instantiator.js +1 -1
- package/dist/template/instantiator.js.map +1 -1
- package/package.json +5 -5
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,
|
|
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",
|
|
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
|
|
1068
|
-
if (invariant(
|
|
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:
|
|
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,
|
|
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:
|
|
1084
|
-
|
|
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,
|
|
1089
|
+
for (let e of a) if (O(e)) embedStaticResult(e, t, c);
|
|
1091
1090
|
else {
|
|
1092
|
-
let
|
|
1093
|
-
invariant(
|
|
1091
|
+
let n = t.parentNode;
|
|
1092
|
+
invariant(n, Z), n.insertBefore(document.createTextNode(resolveStaticText(e)), t);
|
|
1094
1093
|
}
|
|
1095
|
-
|
|
1094
|
+
t.remove();
|
|
1096
1095
|
continue;
|
|
1097
1096
|
}
|
|
1098
|
-
|
|
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({
|