marko 6.0.2 → 6.0.4
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 +7 -2
- package/dist/debug/dom.mjs +7 -2
- package/dist/debug/html.js +239 -212
- package/dist/debug/html.mjs +239 -212
- package/dist/dom.js +2 -2
- package/dist/dom.mjs +2 -2
- package/dist/html/dynamic-tag.d.ts +1 -1
- package/dist/html/writer.d.ts +9 -8
- package/dist/html.js +135 -129
- package/dist/html.mjs +135 -129
- package/dist/translator/index.js +104 -81
- package/dist/translator/util/references.d.ts +1 -0
- package/dist/translator/visitors/program/html.d.ts +1 -1
- package/package.json +2 -2
package/dist/html.mjs
CHANGED
@@ -96,6 +96,17 @@ function forTo(to, from, step, cb) {
|
|
96
96
|
cb(start + i * delta);
|
97
97
|
}
|
98
98
|
|
99
|
+
// src/html/for.ts
|
100
|
+
function forOfBy(by, item, index) {
|
101
|
+
return by ? typeof by == "string" ? item[by] : by(item, index) : index;
|
102
|
+
}
|
103
|
+
function forInBy(by, name, value) {
|
104
|
+
return by ? by(name, value) : name;
|
105
|
+
}
|
106
|
+
function forToBy(by, index) {
|
107
|
+
return by ? by(index) : index;
|
108
|
+
}
|
109
|
+
|
99
110
|
// src/html/inlined-runtimes.ts
|
100
111
|
var WALKER_RUNTIME_CODE = '(e=>(self[e]=(l,t=e+l,d=t.length,f={},s=[],x=document,a=x.createTreeWalker(x,129))=>self[e][l]={i:t,d:x,l:f,v:s,x(){},w(e,l,x){for(;e=a.nextNode();)this.x(l=(l=e.data)&&!l.indexOf(t)&&(f[x=l.slice(d+1)]=e,l[d]),x,e),l>"#"&&s.push(e)}},self[e]))', REORDER_RUNTIME_CODE = '(e=>{let i,l,t,r={},c=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,o,n,a,g)=>{"#"==d?(r[o]=l).i++:n==t&&i(),"T"==n.tagName&&(o=n.getAttribute(e.i))&&((a=e.l["^"+o])&&(r[o]={i:1,c(i=e.l[o]||n){for(;(t=i.previousSibling||a).remove(),a!=t;);c(i,n)}}),t=n.nextSibling,l=r[o],i=()=>{a||c(e.l[o],n),--l.i||l.c()},(d=e.j[o])&&(g=l.c,l.c=()=>g()+d(e.r)))}})';
|
101
112
|
|
@@ -1088,161 +1099,166 @@ var branchIdKey = Symbol();
|
|
1088
1099
|
function withBranchId(branchId, cb) {
|
1089
1100
|
return withContext(branchIdKey, branchId, cb);
|
1090
1101
|
}
|
1091
|
-
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch) {
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1102
|
+
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1103
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1104
|
+
if (resumeBranch) {
|
1105
|
+
let loopScopes = /* @__PURE__ */ new Map();
|
1106
|
+
forOf(list, (item, index) => {
|
1107
|
+
let branchId = peekNextScopeId();
|
1108
|
+
resumeMarker && $chunk.writeHTML(
|
1109
|
+
$chunk.boundary.state.mark(
|
1110
|
+
"[" /* BranchStart */,
|
1111
|
+
branchId + (index ? " " : "")
|
1112
|
+
)
|
1113
|
+
), withBranchId(branchId, () => {
|
1114
|
+
cb(item, index), loopScopes.set(forOfBy(by, item, index), writeScope(branchId, {}));
|
1115
|
+
});
|
1116
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1117
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1104
1118
|
});
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
|
1119
|
+
} else
|
1120
|
+
forOf(list, cb);
|
1121
|
+
resumeMarker && $chunk.writeHTML(
|
1108
1122
|
$chunk.boundary.state.mark(
|
1109
1123
|
"]" /* BranchEnd */,
|
1110
1124
|
scopeId + " " + accessor
|
1111
1125
|
)
|
1112
1126
|
);
|
1113
1127
|
}
|
1114
|
-
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, onlyChildInParent) {
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1128
|
+
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, onlyChildInParent) {
|
1129
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1130
|
+
if (resumeBranch) {
|
1131
|
+
let loopScopes = /* @__PURE__ */ new Map();
|
1132
|
+
forOf(list, (item, index) => {
|
1133
|
+
let branchId = peekNextScopeId();
|
1134
|
+
resumeMarker && (branchIds = " " + branchId + branchIds), withBranchId(branchId, () => {
|
1135
|
+
cb(item, index), loopScopes.set(forOfBy(by, item, index), writeScope(branchId, {}));
|
1136
|
+
});
|
1137
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1138
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1122
1139
|
});
|
1123
|
-
}
|
1124
|
-
|
1125
|
-
|
1140
|
+
} else
|
1141
|
+
forOf(list, cb);
|
1142
|
+
resumeMarker && $chunk.writeHTML(
|
1126
1143
|
$chunk.boundary.state.mark(
|
1127
1144
|
onlyChildInParent ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1128
1145
|
scopeId + " " + accessor + branchIds
|
1129
1146
|
)
|
1130
1147
|
);
|
1131
1148
|
}
|
1132
|
-
function
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
),
|
1144
|
-
|
1149
|
+
function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1150
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1151
|
+
if (resumeBranch) {
|
1152
|
+
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
1153
|
+
forIn(obj, (key, value) => {
|
1154
|
+
let branchId = peekNextScopeId();
|
1155
|
+
resumeMarker && ($chunk.writeHTML(
|
1156
|
+
$chunk.boundary.state.mark("[" /* BranchStart */, branchId + sep)
|
1157
|
+
), sep = " "), withBranchId(branchId, () => {
|
1158
|
+
cb(key, value), loopScopes.set(forInBy(by, key, value), writeScope(branchId, {}));
|
1159
|
+
});
|
1160
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1161
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1145
1162
|
});
|
1146
|
-
}
|
1147
|
-
|
1148
|
-
|
1163
|
+
} else
|
1164
|
+
forIn(obj, cb);
|
1165
|
+
resumeMarker && $chunk.writeHTML(
|
1149
1166
|
$chunk.boundary.state.mark(
|
1150
1167
|
"]" /* BranchEnd */,
|
1151
1168
|
scopeId + " " + accessor
|
1152
1169
|
)
|
1153
1170
|
);
|
1154
1171
|
}
|
1155
|
-
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch,
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1172
|
+
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, onlyChildInParent) {
|
1173
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1174
|
+
if (resumeBranch) {
|
1175
|
+
let loopScopes = /* @__PURE__ */ new Map();
|
1176
|
+
forIn(obj, (key, value) => {
|
1177
|
+
let branchId = peekNextScopeId();
|
1178
|
+
resumeMarker && (branchIds = " " + branchId + branchIds), withBranchId(branchId, () => {
|
1179
|
+
cb(key, value), loopScopes.set(forInBy(by, key, value), writeScope(branchId, {}));
|
1180
|
+
});
|
1181
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1182
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1163
1183
|
});
|
1164
|
-
}
|
1165
|
-
|
1166
|
-
|
1184
|
+
} else
|
1185
|
+
forIn(obj, cb);
|
1186
|
+
resumeMarker && $chunk.writeHTML(
|
1167
1187
|
$chunk.boundary.state.mark(
|
1168
|
-
|
1188
|
+
onlyChildInParent ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1169
1189
|
scopeId + " " + accessor + branchIds
|
1170
1190
|
)
|
1171
1191
|
);
|
1172
1192
|
}
|
1173
|
-
function
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
),
|
1185
|
-
|
1193
|
+
function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1194
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1195
|
+
if (resumeBranch) {
|
1196
|
+
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
1197
|
+
forTo(to, from, step, (i) => {
|
1198
|
+
let branchId = peekNextScopeId();
|
1199
|
+
resumeMarker && ($chunk.writeHTML(
|
1200
|
+
$chunk.boundary.state.mark("[" /* BranchStart */, branchId + sep)
|
1201
|
+
), sep = " "), withBranchId(branchId, () => {
|
1202
|
+
cb(i), loopScopes.set(forToBy(by, i), writeScope(branchId, {}));
|
1203
|
+
});
|
1204
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1205
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1186
1206
|
});
|
1187
|
-
}
|
1188
|
-
|
1189
|
-
|
1207
|
+
} else
|
1208
|
+
forTo(to, from, step, cb);
|
1209
|
+
resumeMarker && $chunk.writeHTML(
|
1190
1210
|
$chunk.boundary.state.mark(
|
1191
1211
|
"]" /* BranchEnd */,
|
1192
1212
|
scopeId + " " + accessor
|
1193
1213
|
)
|
1194
1214
|
);
|
1195
1215
|
}
|
1196
|
-
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch,
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1216
|
+
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, onlyChildInParent) {
|
1217
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1218
|
+
if (resumeBranch) {
|
1219
|
+
let loopScopes = /* @__PURE__ */ new Map();
|
1220
|
+
forTo(to, from, step, (i) => {
|
1221
|
+
let branchId = peekNextScopeId();
|
1222
|
+
resumeMarker && (branchIds = " " + branchId + branchIds), withBranchId(branchId, () => {
|
1223
|
+
cb(i), loopScopes.set(forToBy(by, i), writeScope(branchId, {}));
|
1224
|
+
});
|
1225
|
+
}), loopScopes.size && writeScope(scopeId, {
|
1226
|
+
["m" /* LoopScopeMap */ + accessor]: loopScopes
|
1204
1227
|
});
|
1205
|
-
}
|
1206
|
-
|
1207
|
-
|
1228
|
+
} else
|
1229
|
+
forTo(to, from, step, cb);
|
1230
|
+
resumeMarker && $chunk.writeHTML(
|
1208
1231
|
$chunk.boundary.state.mark(
|
1209
|
-
|
1232
|
+
onlyChildInParent ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1210
1233
|
scopeId + " " + accessor + branchIds
|
1211
1234
|
)
|
1212
1235
|
);
|
1213
1236
|
}
|
1214
|
-
function forToBy(by, index) {
|
1215
|
-
return by ? by(index) : index;
|
1216
|
-
}
|
1217
1237
|
function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker) {
|
1218
|
-
|
1219
|
-
|
1220
|
-
let branchId = peekNextScopeId();
|
1221
|
-
serializeMarker && $chunk.writeHTML(
|
1238
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId();
|
1239
|
+
resumeMarker && resumeBranch && $chunk.writeHTML(
|
1222
1240
|
$chunk.boundary.state.mark("[" /* BranchStart */, branchId + "")
|
1223
1241
|
);
|
1224
|
-
let branchIndex = withBranchId(branchId, cb);
|
1225
|
-
branchIndex !== void 0
|
1226
|
-
["c" /* ConditionalRenderer */ + accessor]:
|
1242
|
+
let branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb();
|
1243
|
+
resumeBranch && branchIndex !== void 0 && writeScope(scopeId, {
|
1244
|
+
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1227
1245
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1228
|
-
})
|
1246
|
+
}), resumeMarker && $chunk.writeHTML(
|
1229
1247
|
$chunk.boundary.state.mark(
|
1230
1248
|
"]" /* BranchEnd */,
|
1231
1249
|
scopeId + " " + accessor
|
1232
1250
|
)
|
1233
1251
|
);
|
1234
1252
|
}
|
1235
|
-
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker,
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
rendered ? writeScope(scopeId, {
|
1240
|
-
["c" /* ConditionalRenderer */ + accessor]: serializeMarker ? branchIndex : void 0,
|
1253
|
+
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, onlyChildInParent) {
|
1254
|
+
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId(), branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
1255
|
+
shouldWriteBranch && writeScope(scopeId, {
|
1256
|
+
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1241
1257
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1242
|
-
})
|
1258
|
+
}), resumeMarker && $chunk.writeHTML(
|
1243
1259
|
$chunk.boundary.state.mark(
|
1244
|
-
|
1245
|
-
scopeId + " " + accessor + (
|
1260
|
+
onlyChildInParent ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1261
|
+
scopeId + " " + accessor + (shouldWriteBranch ? " " + branchId : "")
|
1246
1262
|
)
|
1247
1263
|
);
|
1248
1264
|
}
|
@@ -1350,7 +1366,7 @@ function tryCatch(content, catchContent) {
|
|
1350
1366
|
let cur = body, writeMarker = !0;
|
1351
1367
|
do {
|
1352
1368
|
let next = cur.next;
|
1353
|
-
cur.boundary !== catchBoundary && cur.boundary.abort(catchBoundary.signal.reason), writeMarker && !cur.consumed && (writeMarker = !1, cur.async = !1, cur.next = bodyNext, cur.html = endMarker, cur.scripts = cur.effects = "", cur.placeholderBody = cur.placeholderRender = cur.reorderId = null), cur = next;
|
1369
|
+
cur.boundary !== catchBoundary && cur.boundary.abort(catchBoundary.signal.reason), writeMarker && !cur.consumed && (writeMarker = !1, cur.async = !1, cur.next = bodyNext, cur.html = endMarker, cur.scripts = cur.effects = cur.lastEffect = "", cur.placeholderBody = cur.placeholderRender = cur.reorderId = null), cur = next;
|
1354
1370
|
} while (cur !== bodyNext);
|
1355
1371
|
}
|
1356
1372
|
let catchChunk = new Chunk(boundary, null, chunk.context);
|
@@ -1431,6 +1447,7 @@ var State2 = class {
|
|
1431
1447
|
html = "";
|
1432
1448
|
scripts = "";
|
1433
1449
|
effects = "";
|
1450
|
+
lastEffect = "";
|
1434
1451
|
async = !1;
|
1435
1452
|
consumed = !1;
|
1436
1453
|
reorderId = null;
|
@@ -1440,16 +1457,16 @@ var State2 = class {
|
|
1440
1457
|
this.html += html;
|
1441
1458
|
}
|
1442
1459
|
writeEffect(scopeId, registryId) {
|
1443
|
-
this.effects = concatEffects(
|
1460
|
+
this.lastEffect === registryId ? this.effects += "," + scopeId : this.effects = concatEffects(
|
1444
1461
|
this.effects,
|
1445
|
-
|
1446
|
-
);
|
1462
|
+
'"' + registryId + '",' + scopeId
|
1463
|
+
), this.lastEffect = registryId;
|
1447
1464
|
}
|
1448
1465
|
writeScript(script) {
|
1449
1466
|
this.scripts = concatScripts(this.scripts, script);
|
1450
1467
|
}
|
1451
1468
|
append(chunk) {
|
1452
|
-
this.html += chunk.html, this.effects = concatEffects(this.effects, chunk.effects), this.scripts = concatScripts(this.scripts, chunk.scripts);
|
1469
|
+
this.html += chunk.html, this.effects = concatEffects(this.effects, chunk.effects), this.scripts = concatScripts(this.scripts, chunk.scripts), this.lastEffect = chunk.lastEffect || this.lastEffect;
|
1453
1470
|
}
|
1454
1471
|
flushPlaceholder() {
|
1455
1472
|
if (this.placeholderBody) {
|
@@ -1469,11 +1486,11 @@ var State2 = class {
|
|
1469
1486
|
consume() {
|
1470
1487
|
let cur = this;
|
1471
1488
|
if (cur.next && !cur.async) {
|
1472
|
-
let html = "", effects = "", scripts = "";
|
1489
|
+
let html = "", effects = "", scripts = "", lastEffect = "";
|
1473
1490
|
do
|
1474
|
-
cur.flushPlaceholder(), html += cur.html, effects = concatEffects(effects, cur.effects), scripts = concatScripts(scripts, cur.scripts), cur.consumed = !0, cur = cur.next;
|
1491
|
+
cur.flushPlaceholder(), html += cur.html, effects = concatEffects(effects, cur.effects), scripts = concatScripts(scripts, cur.scripts), lastEffect = cur.lastEffect || lastEffect, cur.consumed = !0, cur = cur.next;
|
1475
1492
|
while (cur.next && !cur.async);
|
1476
|
-
cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts);
|
1493
|
+
cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect = lastEffect;
|
1477
1494
|
}
|
1478
1495
|
return cur;
|
1479
1496
|
}
|
@@ -1513,7 +1530,7 @@ var State2 = class {
|
|
1513
1530
|
if (cur.consumed = !0, reorderHTML += cur.html, reorderEffects = concatEffects(reorderEffects, cur.effects), reorderScripts = concatScripts(reorderScripts, cur.scripts), cur.async && (reorderHTML += state.mark(
|
1514
1531
|
"#" /* ReorderMarker */,
|
1515
1532
|
cur.reorderId = state.nextReorderId()
|
1516
|
-
), cur.html = cur.effects = cur.scripts = "", cur.next = null), next)
|
1533
|
+
), cur.html = cur.effects = cur.scripts = cur.lastEffect = "", cur.next = null), next)
|
1517
1534
|
cur = next;
|
1518
1535
|
else
|
1519
1536
|
break;
|
@@ -1942,8 +1959,8 @@ function NOOP2() {
|
|
1942
1959
|
}
|
1943
1960
|
|
1944
1961
|
// src/html/dynamic-tag.ts
|
1945
|
-
var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/, dynamicTag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs,
|
1946
|
-
let renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = peekNextScopeId(), result;
|
1962
|
+
var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/, dynamicTag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, serializeReason) => {
|
1963
|
+
let shouldResume = serializeReason !== 0, renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = peekNextScopeId(), result;
|
1947
1964
|
if (typeof renderer == "string") {
|
1948
1965
|
let input = (inputIsArgs ? inputOrArgs[0] : inputOrArgs) || {};
|
1949
1966
|
if (nextScopeId(), write(`<${renderer}${attrs(input, accessor, scopeId, renderer)}>`), !voidElementsReg.test(renderer)) {
|
@@ -1979,7 +1996,7 @@ var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|p
|
|
1979
1996
|
let input = inputIsArgs ? inputOrArgs[0] : inputOrArgs;
|
1980
1997
|
return renderer(
|
1981
1998
|
content ? { ...input, content } : input,
|
1982
|
-
shouldResume
|
1999
|
+
shouldResume ? 1 : 0
|
1983
2000
|
);
|
1984
2001
|
}
|
1985
2002
|
return inputIsArgs ? renderer(...inputOrArgs) : renderer(
|
@@ -2088,17 +2105,6 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
2088
2105
|
register(RENDER_BODY_ID, fn);
|
2089
2106
|
}
|
2090
2107
|
};
|
2091
|
-
|
2092
|
-
// src/html/for.ts
|
2093
|
-
function forOfBy2(by, item, index) {
|
2094
|
-
return by ? typeof by == "string" ? item[by] : by(item, index) : index;
|
2095
|
-
}
|
2096
|
-
function forInBy2(by, name, value) {
|
2097
|
-
return by ? by(name, value) : name;
|
2098
|
-
}
|
2099
|
-
function forToBy2(by, index) {
|
2100
|
-
return by ? by(index) : index;
|
2101
|
-
}
|
2102
2108
|
export {
|
2103
2109
|
$global,
|
2104
2110
|
attr,
|
@@ -2122,11 +2128,11 @@ export {
|
|
2122
2128
|
escapeStyle,
|
2123
2129
|
escapeXML,
|
2124
2130
|
forIn,
|
2125
|
-
|
2131
|
+
forInBy,
|
2126
2132
|
forOf,
|
2127
|
-
|
2133
|
+
forOfBy,
|
2128
2134
|
forTo,
|
2129
|
-
|
2135
|
+
forToBy,
|
2130
2136
|
fork,
|
2131
2137
|
getScopeById,
|
2132
2138
|
hoist,
|