marko 6.0.87 → 6.0.88
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 +6 -4
- package/dist/debug/dom.mjs +6 -4
- package/dist/debug/html.js +66 -57
- package/dist/debug/html.mjs +66 -57
- package/dist/dom/queue.d.ts +1 -1
- package/dist/dom.js +5 -3
- package/dist/dom.mjs +5 -3
- package/dist/html/writer.d.ts +1 -0
- package/dist/html.js +14 -12
- package/dist/html.mjs +14 -12
- package/dist/translator/index.js +6 -3
- package/package.json +1 -1
package/dist/debug/dom.js
CHANGED
|
@@ -1754,8 +1754,10 @@ function _await(nodeAccessor, renderer) {
|
|
|
1754
1754
|
);
|
|
1755
1755
|
removeAndDestroyBranch(placeholderBranch);
|
|
1756
1756
|
}
|
|
1757
|
-
|
|
1758
|
-
|
|
1757
|
+
const pendingEffects2 = tryWithPlaceholder.___effects;
|
|
1758
|
+
if (pendingEffects2) {
|
|
1759
|
+
tryWithPlaceholder.___effects = [];
|
|
1760
|
+
runEffects(pendingEffects2, true);
|
|
1759
1761
|
}
|
|
1760
1762
|
}
|
|
1761
1763
|
}
|
|
@@ -2100,14 +2102,14 @@ function prepareEffects(fn) {
|
|
|
2100
2102
|
}
|
|
2101
2103
|
return preparedEffects;
|
|
2102
2104
|
}
|
|
2103
|
-
var runEffects = (effects) => {
|
|
2105
|
+
var runEffects = ((effects) => {
|
|
2104
2106
|
for (let i = 0, scope; i < effects.length; ) {
|
|
2105
2107
|
effects[i++](
|
|
2106
2108
|
scope = effects[i++],
|
|
2107
2109
|
scope
|
|
2108
2110
|
);
|
|
2109
2111
|
}
|
|
2110
|
-
};
|
|
2112
|
+
});
|
|
2111
2113
|
function runRenders() {
|
|
2112
2114
|
while (pendingRenders.length) {
|
|
2113
2115
|
const render = pendingRenders[0];
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1654,8 +1654,10 @@ function _await(nodeAccessor, renderer) {
|
|
|
1654
1654
|
);
|
|
1655
1655
|
removeAndDestroyBranch(placeholderBranch);
|
|
1656
1656
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1657
|
+
const pendingEffects2 = tryWithPlaceholder.___effects;
|
|
1658
|
+
if (pendingEffects2) {
|
|
1659
|
+
tryWithPlaceholder.___effects = [];
|
|
1660
|
+
runEffects(pendingEffects2, true);
|
|
1659
1661
|
}
|
|
1660
1662
|
}
|
|
1661
1663
|
}
|
|
@@ -2000,14 +2002,14 @@ function prepareEffects(fn) {
|
|
|
2000
2002
|
}
|
|
2001
2003
|
return preparedEffects;
|
|
2002
2004
|
}
|
|
2003
|
-
var runEffects = (effects) => {
|
|
2005
|
+
var runEffects = ((effects) => {
|
|
2004
2006
|
for (let i = 0, scope; i < effects.length; ) {
|
|
2005
2007
|
effects[i++](
|
|
2006
2008
|
scope = effects[i++],
|
|
2007
2009
|
scope
|
|
2008
2010
|
);
|
|
2009
2011
|
}
|
|
2010
|
-
};
|
|
2012
|
+
});
|
|
2011
2013
|
function runRenders() {
|
|
2012
2014
|
while (pendingRenders.length) {
|
|
2013
2015
|
const render = pendingRenders[0];
|
package/dist/debug/html.js
CHANGED
|
@@ -285,65 +285,64 @@ var WALKER_RUNTIME_CODE = true ? (
|
|
|
285
285
|
},
|
|
286
286
|
})
|
|
287
287
|
), self[runtimeId]))`
|
|
288
|
-
) : `(e=>(self[e]||(self[e]=(l,
|
|
288
|
+
) : `(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))`;
|
|
289
289
|
var REORDER_RUNTIME_CODE = true ? (
|
|
290
290
|
/* js */
|
|
291
291
|
`((runtime) => {
|
|
292
|
-
if (runtime.j) return;
|
|
293
|
-
let onNextSibling,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
runtime.
|
|
302
|
-
runtime.
|
|
303
|
-
)
|
|
304
|
-
|
|
305
|
-
runtime.x = (op, id, node, start, placeholderCallback) => {
|
|
306
|
-
if (op == "#") {
|
|
307
|
-
(placeholders[id] = placeholder).i++;
|
|
308
|
-
} else if (node == nextSibling) {
|
|
309
|
-
onNextSibling();
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
if (node.tagName == "T" && (id = node.getAttribute(runtime.i))) {
|
|
313
|
-
start = runtime.l["^" + id];
|
|
314
|
-
|
|
315
|
-
if (start) {
|
|
316
|
-
placeholders[id] = {
|
|
317
|
-
i: 1,
|
|
318
|
-
c(end = runtime.l[id] || node) {
|
|
319
|
-
for (
|
|
320
|
-
;
|
|
321
|
-
(nextSibling = end.previousSibling || start).remove(),
|
|
322
|
-
start != nextSibling;
|
|
323
|
-
);
|
|
324
|
-
replace(end, node);
|
|
325
|
-
},
|
|
326
|
-
};
|
|
292
|
+
if (runtime.j) return;
|
|
293
|
+
let onNextSibling,
|
|
294
|
+
placeholder,
|
|
295
|
+
nextSibling,
|
|
296
|
+
placeholders = {},
|
|
297
|
+
replace = (id, container) => runtime.l[id].replaceWith(...container.childNodes);
|
|
298
|
+
runtime.d.head.append(
|
|
299
|
+
runtime.d.querySelector("style[" + runtime.i + "]") || ""
|
|
300
|
+
);
|
|
301
|
+
runtime.j = {};
|
|
302
|
+
runtime.x = (op, id, node, placeholderRoot, placeholderCb) => {
|
|
303
|
+
if (node == nextSibling) {
|
|
304
|
+
onNextSibling();
|
|
327
305
|
}
|
|
328
306
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
placeholder.c();
|
|
307
|
+
if (op == "#") {
|
|
308
|
+
(placeholders[id] = placeholder).i++;
|
|
309
|
+
} else if (op == "!") {
|
|
310
|
+
if (runtime.l[id] && placeholders[id]) {
|
|
311
|
+
placeholders[id].c();
|
|
335
312
|
}
|
|
336
|
-
}
|
|
313
|
+
} else if (node.tagName == "T" && (id = node.getAttribute(runtime.i))) {
|
|
314
|
+
nextSibling = node.nextSibling;
|
|
315
|
+
onNextSibling = () => {
|
|
316
|
+
node.remove();
|
|
317
|
+
placeholderRoot || replace(id, node);
|
|
318
|
+
placeholder.c();
|
|
319
|
+
};
|
|
320
|
+
placeholder =
|
|
321
|
+
placeholders[id] ||
|
|
322
|
+
(placeholderRoot = placeholders[id] =
|
|
323
|
+
{
|
|
324
|
+
i: runtime.l[id] ? 1 : 2,
|
|
325
|
+
c(start = runtime.l["^" + id]) {
|
|
326
|
+
if (--placeholderRoot.i) return 1;
|
|
327
|
+
for (
|
|
328
|
+
;
|
|
329
|
+
(nextSibling =
|
|
330
|
+
runtime.l[id].previousSibling || start).remove(),
|
|
331
|
+
start != nextSibling;
|
|
337
332
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
);
|
|
334
|
+
replace(id, node);
|
|
335
|
+
},
|
|
336
|
+
});
|
|
337
|
+
// repurpose "op" for callbacks ...carefully
|
|
338
|
+
if ((op = runtime.j[id])) {
|
|
339
|
+
placeholderCb = placeholder.c;
|
|
340
|
+
placeholder.c = () => placeholderCb() || op(runtime.r);
|
|
341
|
+
}
|
|
342
342
|
}
|
|
343
|
-
}
|
|
344
|
-
};
|
|
343
|
+
};
|
|
345
344
|
})`
|
|
346
|
-
) : `(e=>{if(e.j)return;let i,
|
|
345
|
+
) : `(e=>{if(e.j)return;let i,r,l,t={},c=(i,r)=>e.l[i].replaceWith(...r.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(a,d,n,o,u)=>{n==l&&i(),"#"==a?(t[d]=r).i++:"!"==a?e.l[d]&&t[d]&&t[d].c():"T"==n.tagName&&(d=n.getAttribute(e.i))&&(l=n.nextSibling,i=()=>{n.remove(),o||c(d,n),r.c()},r=t[d]||(o=t[d]={i:e.l[d]?1:2,c(i=e.l["^"+d]){if(--o.i)return 1;for(;(l=e.l[d].previousSibling||i).remove(),i!=l;);c(d,n)}}),(a=e.j[d])&&(u=r.c,r.c=()=>u()||a(e.r)))}})`;
|
|
347
346
|
|
|
348
347
|
// src/html/serializer.ts
|
|
349
348
|
var kTouchedIterator = Symbol();
|
|
@@ -2260,6 +2259,7 @@ function tryCatch(content, catchContent) {
|
|
|
2260
2259
|
writeMarker = false;
|
|
2261
2260
|
cur.async = false;
|
|
2262
2261
|
cur.next = bodyNext;
|
|
2262
|
+
cur.needsWalk = true;
|
|
2263
2263
|
cur.html = endMarker;
|
|
2264
2264
|
cur.scripts = cur.effects = cur.lastEffect = "";
|
|
2265
2265
|
cur.placeholderBody = cur.placeholderRender = cur.reorderId = null;
|
|
@@ -2390,6 +2390,7 @@ var Chunk = class {
|
|
|
2390
2390
|
lastEffect = "";
|
|
2391
2391
|
async = false;
|
|
2392
2392
|
consumed = false;
|
|
2393
|
+
needsWalk = false;
|
|
2393
2394
|
reorderId = null;
|
|
2394
2395
|
placeholderBody = null;
|
|
2395
2396
|
placeholderRender = null;
|
|
@@ -2440,6 +2441,7 @@ var Chunk = class {
|
|
|
2440
2441
|
}
|
|
2441
2442
|
consume() {
|
|
2442
2443
|
let cur = this;
|
|
2444
|
+
let needsWalk = cur.needsWalk;
|
|
2443
2445
|
if (cur.next && !cur.async) {
|
|
2444
2446
|
let html = "";
|
|
2445
2447
|
let effects = "";
|
|
@@ -2447,6 +2449,7 @@ var Chunk = class {
|
|
|
2447
2449
|
let lastEffect = "";
|
|
2448
2450
|
do {
|
|
2449
2451
|
cur.flushPlaceholder();
|
|
2452
|
+
needsWalk ||= cur.needsWalk;
|
|
2450
2453
|
html += cur.html;
|
|
2451
2454
|
effects = concatEffects(effects, cur.effects);
|
|
2452
2455
|
scripts = concatScripts(scripts, cur.scripts);
|
|
@@ -2454,6 +2457,7 @@ var Chunk = class {
|
|
|
2454
2457
|
cur.consumed = true;
|
|
2455
2458
|
cur = cur.next;
|
|
2456
2459
|
} while (cur.next && !cur.async);
|
|
2460
|
+
cur.needsWalk = needsWalk;
|
|
2457
2461
|
cur.html = html + cur.html;
|
|
2458
2462
|
cur.effects = concatEffects(effects, cur.effects);
|
|
2459
2463
|
cur.scripts = concatScripts(scripts, cur.scripts);
|
|
@@ -2479,8 +2483,8 @@ var Chunk = class {
|
|
|
2479
2483
|
const { state } = boundary;
|
|
2480
2484
|
const { $global: $global2, runtimePrefix, nonceAttr } = state;
|
|
2481
2485
|
let { html, scripts } = this;
|
|
2482
|
-
let
|
|
2483
|
-
if (
|
|
2486
|
+
let needsWalk = state.walkOnNextFlush;
|
|
2487
|
+
if (needsWalk) state.walkOnNextFlush = false;
|
|
2484
2488
|
if (state.needsMainRuntime && !state.hasMainRuntime) {
|
|
2485
2489
|
state.hasMainRuntime = true;
|
|
2486
2490
|
scripts = concatScripts(
|
|
@@ -2489,7 +2493,7 @@ var Chunk = class {
|
|
|
2489
2493
|
);
|
|
2490
2494
|
}
|
|
2491
2495
|
if (effects) {
|
|
2492
|
-
|
|
2496
|
+
needsWalk = true;
|
|
2493
2497
|
state.resumes = state.resumes ? state.resumes + "," + effects : effects;
|
|
2494
2498
|
}
|
|
2495
2499
|
if (state.resumes) {
|
|
@@ -2507,7 +2511,7 @@ var Chunk = class {
|
|
|
2507
2511
|
}
|
|
2508
2512
|
}
|
|
2509
2513
|
if (state.writeReorders) {
|
|
2510
|
-
|
|
2514
|
+
needsWalk = true;
|
|
2511
2515
|
if (!state.hasReorderRuntime) {
|
|
2512
2516
|
state.hasReorderRuntime = true;
|
|
2513
2517
|
html += "<style " + state.commentPrefix + nonceAttr + ">t{display:none}</style>";
|
|
@@ -2565,7 +2569,7 @@ var Chunk = class {
|
|
|
2565
2569
|
}
|
|
2566
2570
|
state.writeReorders = null;
|
|
2567
2571
|
}
|
|
2568
|
-
if (
|
|
2572
|
+
if (needsWalk) {
|
|
2569
2573
|
scripts = concatScripts(scripts, runtimePrefix + ".w()");
|
|
2570
2574
|
}
|
|
2571
2575
|
this.html = html;
|
|
@@ -2574,9 +2578,14 @@ var Chunk = class {
|
|
|
2574
2578
|
return this;
|
|
2575
2579
|
}
|
|
2576
2580
|
flushHTML() {
|
|
2577
|
-
this
|
|
2578
|
-
const { boundary, scripts } = this;
|
|
2581
|
+
const { boundary } = this;
|
|
2579
2582
|
const { state } = boundary;
|
|
2583
|
+
if (this.needsWalk) {
|
|
2584
|
+
this.needsWalk = false;
|
|
2585
|
+
state.walkOnNextFlush = true;
|
|
2586
|
+
}
|
|
2587
|
+
this.flushScript();
|
|
2588
|
+
const { scripts } = this;
|
|
2580
2589
|
const { $global: $global2, nonceAttr } = state;
|
|
2581
2590
|
const { __flush__ } = $global2;
|
|
2582
2591
|
let { html } = this;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -196,65 +196,64 @@ var WALKER_RUNTIME_CODE = true ? (
|
|
|
196
196
|
},
|
|
197
197
|
})
|
|
198
198
|
), self[runtimeId]))`
|
|
199
|
-
) : `(e=>(self[e]||(self[e]=(l,
|
|
199
|
+
) : `(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))`;
|
|
200
200
|
var REORDER_RUNTIME_CODE = true ? (
|
|
201
201
|
/* js */
|
|
202
202
|
`((runtime) => {
|
|
203
|
-
if (runtime.j) return;
|
|
204
|
-
let onNextSibling,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
runtime.
|
|
213
|
-
runtime.
|
|
214
|
-
)
|
|
215
|
-
|
|
216
|
-
runtime.x = (op, id, node, start, placeholderCallback) => {
|
|
217
|
-
if (op == "#") {
|
|
218
|
-
(placeholders[id] = placeholder).i++;
|
|
219
|
-
} else if (node == nextSibling) {
|
|
220
|
-
onNextSibling();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (node.tagName == "T" && (id = node.getAttribute(runtime.i))) {
|
|
224
|
-
start = runtime.l["^" + id];
|
|
225
|
-
|
|
226
|
-
if (start) {
|
|
227
|
-
placeholders[id] = {
|
|
228
|
-
i: 1,
|
|
229
|
-
c(end = runtime.l[id] || node) {
|
|
230
|
-
for (
|
|
231
|
-
;
|
|
232
|
-
(nextSibling = end.previousSibling || start).remove(),
|
|
233
|
-
start != nextSibling;
|
|
234
|
-
);
|
|
235
|
-
replace(end, node);
|
|
236
|
-
},
|
|
237
|
-
};
|
|
203
|
+
if (runtime.j) return;
|
|
204
|
+
let onNextSibling,
|
|
205
|
+
placeholder,
|
|
206
|
+
nextSibling,
|
|
207
|
+
placeholders = {},
|
|
208
|
+
replace = (id, container) => runtime.l[id].replaceWith(...container.childNodes);
|
|
209
|
+
runtime.d.head.append(
|
|
210
|
+
runtime.d.querySelector("style[" + runtime.i + "]") || ""
|
|
211
|
+
);
|
|
212
|
+
runtime.j = {};
|
|
213
|
+
runtime.x = (op, id, node, placeholderRoot, placeholderCb) => {
|
|
214
|
+
if (node == nextSibling) {
|
|
215
|
+
onNextSibling();
|
|
238
216
|
}
|
|
239
217
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
placeholder.c();
|
|
218
|
+
if (op == "#") {
|
|
219
|
+
(placeholders[id] = placeholder).i++;
|
|
220
|
+
} else if (op == "!") {
|
|
221
|
+
if (runtime.l[id] && placeholders[id]) {
|
|
222
|
+
placeholders[id].c();
|
|
246
223
|
}
|
|
247
|
-
}
|
|
224
|
+
} else if (node.tagName == "T" && (id = node.getAttribute(runtime.i))) {
|
|
225
|
+
nextSibling = node.nextSibling;
|
|
226
|
+
onNextSibling = () => {
|
|
227
|
+
node.remove();
|
|
228
|
+
placeholderRoot || replace(id, node);
|
|
229
|
+
placeholder.c();
|
|
230
|
+
};
|
|
231
|
+
placeholder =
|
|
232
|
+
placeholders[id] ||
|
|
233
|
+
(placeholderRoot = placeholders[id] =
|
|
234
|
+
{
|
|
235
|
+
i: runtime.l[id] ? 1 : 2,
|
|
236
|
+
c(start = runtime.l["^" + id]) {
|
|
237
|
+
if (--placeholderRoot.i) return 1;
|
|
238
|
+
for (
|
|
239
|
+
;
|
|
240
|
+
(nextSibling =
|
|
241
|
+
runtime.l[id].previousSibling || start).remove(),
|
|
242
|
+
start != nextSibling;
|
|
248
243
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
);
|
|
245
|
+
replace(id, node);
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
// repurpose "op" for callbacks ...carefully
|
|
249
|
+
if ((op = runtime.j[id])) {
|
|
250
|
+
placeholderCb = placeholder.c;
|
|
251
|
+
placeholder.c = () => placeholderCb() || op(runtime.r);
|
|
252
|
+
}
|
|
253
253
|
}
|
|
254
|
-
}
|
|
255
|
-
};
|
|
254
|
+
};
|
|
256
255
|
})`
|
|
257
|
-
) : `(e=>{if(e.j)return;let i,
|
|
256
|
+
) : `(e=>{if(e.j)return;let i,r,l,t={},c=(i,r)=>e.l[i].replaceWith(...r.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(a,d,n,o,u)=>{n==l&&i(),"#"==a?(t[d]=r).i++:"!"==a?e.l[d]&&t[d]&&t[d].c():"T"==n.tagName&&(d=n.getAttribute(e.i))&&(l=n.nextSibling,i=()=>{n.remove(),o||c(d,n),r.c()},r=t[d]||(o=t[d]={i:e.l[d]?1:2,c(i=e.l["^"+d]){if(--o.i)return 1;for(;(l=e.l[d].previousSibling||i).remove(),i!=l;);c(d,n)}}),(a=e.j[d])&&(u=r.c,r.c=()=>u()||a(e.r)))}})`;
|
|
258
257
|
|
|
259
258
|
// src/html/serializer.ts
|
|
260
259
|
var kTouchedIterator = Symbol();
|
|
@@ -2171,6 +2170,7 @@ function tryCatch(content, catchContent) {
|
|
|
2171
2170
|
writeMarker = false;
|
|
2172
2171
|
cur.async = false;
|
|
2173
2172
|
cur.next = bodyNext;
|
|
2173
|
+
cur.needsWalk = true;
|
|
2174
2174
|
cur.html = endMarker;
|
|
2175
2175
|
cur.scripts = cur.effects = cur.lastEffect = "";
|
|
2176
2176
|
cur.placeholderBody = cur.placeholderRender = cur.reorderId = null;
|
|
@@ -2301,6 +2301,7 @@ var Chunk = class {
|
|
|
2301
2301
|
lastEffect = "";
|
|
2302
2302
|
async = false;
|
|
2303
2303
|
consumed = false;
|
|
2304
|
+
needsWalk = false;
|
|
2304
2305
|
reorderId = null;
|
|
2305
2306
|
placeholderBody = null;
|
|
2306
2307
|
placeholderRender = null;
|
|
@@ -2351,6 +2352,7 @@ var Chunk = class {
|
|
|
2351
2352
|
}
|
|
2352
2353
|
consume() {
|
|
2353
2354
|
let cur = this;
|
|
2355
|
+
let needsWalk = cur.needsWalk;
|
|
2354
2356
|
if (cur.next && !cur.async) {
|
|
2355
2357
|
let html = "";
|
|
2356
2358
|
let effects = "";
|
|
@@ -2358,6 +2360,7 @@ var Chunk = class {
|
|
|
2358
2360
|
let lastEffect = "";
|
|
2359
2361
|
do {
|
|
2360
2362
|
cur.flushPlaceholder();
|
|
2363
|
+
needsWalk ||= cur.needsWalk;
|
|
2361
2364
|
html += cur.html;
|
|
2362
2365
|
effects = concatEffects(effects, cur.effects);
|
|
2363
2366
|
scripts = concatScripts(scripts, cur.scripts);
|
|
@@ -2365,6 +2368,7 @@ var Chunk = class {
|
|
|
2365
2368
|
cur.consumed = true;
|
|
2366
2369
|
cur = cur.next;
|
|
2367
2370
|
} while (cur.next && !cur.async);
|
|
2371
|
+
cur.needsWalk = needsWalk;
|
|
2368
2372
|
cur.html = html + cur.html;
|
|
2369
2373
|
cur.effects = concatEffects(effects, cur.effects);
|
|
2370
2374
|
cur.scripts = concatScripts(scripts, cur.scripts);
|
|
@@ -2390,8 +2394,8 @@ var Chunk = class {
|
|
|
2390
2394
|
const { state } = boundary;
|
|
2391
2395
|
const { $global: $global2, runtimePrefix, nonceAttr } = state;
|
|
2392
2396
|
let { html, scripts } = this;
|
|
2393
|
-
let
|
|
2394
|
-
if (
|
|
2397
|
+
let needsWalk = state.walkOnNextFlush;
|
|
2398
|
+
if (needsWalk) state.walkOnNextFlush = false;
|
|
2395
2399
|
if (state.needsMainRuntime && !state.hasMainRuntime) {
|
|
2396
2400
|
state.hasMainRuntime = true;
|
|
2397
2401
|
scripts = concatScripts(
|
|
@@ -2400,7 +2404,7 @@ var Chunk = class {
|
|
|
2400
2404
|
);
|
|
2401
2405
|
}
|
|
2402
2406
|
if (effects) {
|
|
2403
|
-
|
|
2407
|
+
needsWalk = true;
|
|
2404
2408
|
state.resumes = state.resumes ? state.resumes + "," + effects : effects;
|
|
2405
2409
|
}
|
|
2406
2410
|
if (state.resumes) {
|
|
@@ -2418,7 +2422,7 @@ var Chunk = class {
|
|
|
2418
2422
|
}
|
|
2419
2423
|
}
|
|
2420
2424
|
if (state.writeReorders) {
|
|
2421
|
-
|
|
2425
|
+
needsWalk = true;
|
|
2422
2426
|
if (!state.hasReorderRuntime) {
|
|
2423
2427
|
state.hasReorderRuntime = true;
|
|
2424
2428
|
html += "<style " + state.commentPrefix + nonceAttr + ">t{display:none}</style>";
|
|
@@ -2476,7 +2480,7 @@ var Chunk = class {
|
|
|
2476
2480
|
}
|
|
2477
2481
|
state.writeReorders = null;
|
|
2478
2482
|
}
|
|
2479
|
-
if (
|
|
2483
|
+
if (needsWalk) {
|
|
2480
2484
|
scripts = concatScripts(scripts, runtimePrefix + ".w()");
|
|
2481
2485
|
}
|
|
2482
2486
|
this.html = html;
|
|
@@ -2485,9 +2489,14 @@ var Chunk = class {
|
|
|
2485
2489
|
return this;
|
|
2486
2490
|
}
|
|
2487
2491
|
flushHTML() {
|
|
2488
|
-
this
|
|
2489
|
-
const { boundary, scripts } = this;
|
|
2492
|
+
const { boundary } = this;
|
|
2490
2493
|
const { state } = boundary;
|
|
2494
|
+
if (this.needsWalk) {
|
|
2495
|
+
this.needsWalk = false;
|
|
2496
|
+
state.walkOnNextFlush = true;
|
|
2497
|
+
}
|
|
2498
|
+
this.flushScript();
|
|
2499
|
+
const { scripts } = this;
|
|
2491
2500
|
const { $global: $global2, nonceAttr } = state;
|
|
2492
2501
|
const { __flush__ } = $global2;
|
|
2493
2502
|
let { html } = this;
|
package/dist/dom/queue.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare function queueRender<T>(scope: Scope, signal: Signal<T>, signalKe
|
|
|
10
10
|
export declare function queueEffect<S extends Scope, T extends ExecFn<S>>(scope: S, fn: T): void;
|
|
11
11
|
export declare function run(): void;
|
|
12
12
|
export declare function prepareEffects(fn: () => void): unknown[];
|
|
13
|
-
export declare let runEffects: (effects: unknown[]) => void;
|
|
13
|
+
export declare let runEffects: (effects: unknown[], checkPending?: boolean) => void;
|
|
14
14
|
export declare let _enable_catch: () => void;
|
|
15
15
|
export {};
|
package/dist/dom.js
CHANGED
|
@@ -1142,7 +1142,9 @@ function _await(nodeAccessor, renderer) {
|
|
|
1142
1142
|
tryWithPlaceholder.c = 0, placeholderBranch && (placeholderBranch.h.parentNode.insertBefore(
|
|
1143
1143
|
tryWithPlaceholder.h.parentNode,
|
|
1144
1144
|
placeholderBranch.h
|
|
1145
|
-
), removeAndDestroyBranch(placeholderBranch))
|
|
1145
|
+
), removeAndDestroyBranch(placeholderBranch));
|
|
1146
|
+
let pendingEffects2 = tryWithPlaceholder.H;
|
|
1147
|
+
pendingEffects2 && (tryWithPlaceholder.H = [], runEffects(pendingEffects2, !0));
|
|
1146
1148
|
}
|
|
1147
1149
|
},
|
|
1148
1150
|
-1
|
|
@@ -1372,13 +1374,13 @@ function prepareEffects(fn) {
|
|
|
1372
1374
|
}
|
|
1373
1375
|
return preparedEffects;
|
|
1374
1376
|
}
|
|
1375
|
-
var runEffects = (effects) => {
|
|
1377
|
+
var runEffects = ((effects) => {
|
|
1376
1378
|
for (let i = 0, scope; i < effects.length; )
|
|
1377
1379
|
effects[i++](
|
|
1378
1380
|
scope = effects[i++],
|
|
1379
1381
|
scope
|
|
1380
1382
|
);
|
|
1381
|
-
};
|
|
1383
|
+
});
|
|
1382
1384
|
function runRenders() {
|
|
1383
1385
|
for (; pendingRenders.length; ) {
|
|
1384
1386
|
let render = pendingRenders[0], item = pendingRenders.pop();
|
package/dist/dom.mjs
CHANGED
|
@@ -1045,7 +1045,9 @@ function _await(nodeAccessor, renderer) {
|
|
|
1045
1045
|
tryWithPlaceholder.c = 0, placeholderBranch && (placeholderBranch.h.parentNode.insertBefore(
|
|
1046
1046
|
tryWithPlaceholder.h.parentNode,
|
|
1047
1047
|
placeholderBranch.h
|
|
1048
|
-
), removeAndDestroyBranch(placeholderBranch))
|
|
1048
|
+
), removeAndDestroyBranch(placeholderBranch));
|
|
1049
|
+
let pendingEffects2 = tryWithPlaceholder.H;
|
|
1050
|
+
pendingEffects2 && (tryWithPlaceholder.H = [], runEffects(pendingEffects2, !0));
|
|
1049
1051
|
}
|
|
1050
1052
|
},
|
|
1051
1053
|
-1
|
|
@@ -1275,13 +1277,13 @@ function prepareEffects(fn) {
|
|
|
1275
1277
|
}
|
|
1276
1278
|
return preparedEffects;
|
|
1277
1279
|
}
|
|
1278
|
-
var runEffects = (effects) => {
|
|
1280
|
+
var runEffects = ((effects) => {
|
|
1279
1281
|
for (let i = 0, scope; i < effects.length; )
|
|
1280
1282
|
effects[i++](
|
|
1281
1283
|
scope = effects[i++],
|
|
1282
1284
|
scope
|
|
1283
1285
|
);
|
|
1284
|
-
};
|
|
1286
|
+
});
|
|
1285
1287
|
function runRenders() {
|
|
1286
1288
|
for (; pendingRenders.length; ) {
|
|
1287
1289
|
let render = pendingRenders[0], item = pendingRenders.pop();
|
package/dist/html/writer.d.ts
CHANGED
package/dist/html.js
CHANGED
|
@@ -195,7 +195,7 @@ function forStepBy(by, index) {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// src/html/inlined-runtimes.ts
|
|
198
|
-
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,
|
|
198
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,r,l,t={},c=(i,r)=>e.l[i].replaceWith(...r.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(a,d,n,o,u)=>{n==l&&i(),"#"==a?(t[d]=r).i++:"!"==a?e.l[d]&&t[d]&&t[d].c():"T"==n.tagName&&(d=n.getAttribute(e.i))&&(l=n.nextSibling,i=()=>{n.remove(),o||c(d,n),r.c()},r=t[d]||(o=t[d]={i:e.l[d]?1:2,c(i=e.l["^"+d]){if(--o.i)return 1;for(;(l=e.l[d].previousSibling||i).remove(),i!=l;);c(d,n)}}),(a=e.j[d])&&(u=r.c,r.c=()=>u()||a(e.r)))}})';
|
|
199
199
|
|
|
200
200
|
// src/html/serializer.ts
|
|
201
201
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
@@ -1461,7 +1461,7 @@ function tryCatch(content, catchContent) {
|
|
|
1461
1461
|
let cur = body, writeMarker = !0;
|
|
1462
1462
|
do {
|
|
1463
1463
|
let next = cur.next;
|
|
1464
|
-
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;
|
|
1464
|
+
cur.boundary !== catchBoundary && cur.boundary.abort(catchBoundary.signal.reason), writeMarker && !cur.consumed && (writeMarker = !1, cur.async = !1, cur.next = bodyNext, cur.needsWalk = !0, cur.html = endMarker, cur.scripts = cur.effects = cur.lastEffect = "", cur.placeholderBody = cur.placeholderRender = cur.reorderId = null), cur = next;
|
|
1465
1465
|
} while (cur !== bodyNext);
|
|
1466
1466
|
}
|
|
1467
1467
|
let catchChunk = new Chunk(boundary, null, chunk.context);
|
|
@@ -1546,6 +1546,7 @@ var State2 = class {
|
|
|
1546
1546
|
lastEffect = "";
|
|
1547
1547
|
async = !1;
|
|
1548
1548
|
consumed = !1;
|
|
1549
|
+
needsWalk = !1;
|
|
1549
1550
|
reorderId = null;
|
|
1550
1551
|
placeholderBody = null;
|
|
1551
1552
|
placeholderRender = null;
|
|
@@ -1580,13 +1581,13 @@ var State2 = class {
|
|
|
1580
1581
|
}
|
|
1581
1582
|
}
|
|
1582
1583
|
consume() {
|
|
1583
|
-
let cur = this;
|
|
1584
|
+
let cur = this, needsWalk = cur.needsWalk;
|
|
1584
1585
|
if (cur.next && !cur.async) {
|
|
1585
1586
|
let html = "", effects = "", scripts = "", lastEffect = "";
|
|
1586
1587
|
do
|
|
1587
|
-
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;
|
|
1588
|
+
cur.flushPlaceholder(), needsWalk ||= cur.needsWalk, html += cur.html, effects = concatEffects(effects, cur.effects), scripts = concatScripts(scripts, cur.scripts), lastEffect = cur.lastEffect || lastEffect, cur.consumed = !0, cur = cur.next;
|
|
1588
1589
|
while (cur.next && !cur.async);
|
|
1589
|
-
cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect = lastEffect;
|
|
1590
|
+
cur.needsWalk = needsWalk, cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect = lastEffect;
|
|
1590
1591
|
}
|
|
1591
1592
|
return cur;
|
|
1592
1593
|
}
|
|
@@ -1602,18 +1603,18 @@ var State2 = class {
|
|
|
1602
1603
|
}
|
|
1603
1604
|
}
|
|
1604
1605
|
flushScript() {
|
|
1605
|
-
let { boundary, effects } = this, { state } = boundary, { $global: $global2, runtimePrefix, nonceAttr } = state, { html, scripts } = this,
|
|
1606
|
-
if (
|
|
1606
|
+
let { boundary, effects } = this, { state } = boundary, { $global: $global2, runtimePrefix, nonceAttr } = state, { html, scripts } = this, needsWalk = state.walkOnNextFlush;
|
|
1607
|
+
if (needsWalk && (state.walkOnNextFlush = !1), state.needsMainRuntime && !state.hasMainRuntime && (state.hasMainRuntime = !0, scripts = concatScripts(
|
|
1607
1608
|
scripts,
|
|
1608
1609
|
WALKER_RUNTIME_CODE + '("' + $global2.runtimeId + '")("' + $global2.renderId + '")'
|
|
1609
|
-
)), effects && (
|
|
1610
|
+
)), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + "," + effects : effects), state.resumes && (state.hasWrittenResume ? scripts = concatScripts(
|
|
1610
1611
|
scripts,
|
|
1611
1612
|
runtimePrefix + ".r.push(" + state.resumes + ")"
|
|
1612
1613
|
) : (state.hasWrittenResume = !0, scripts = concatScripts(
|
|
1613
1614
|
scripts,
|
|
1614
1615
|
runtimePrefix + ".r=[" + state.resumes + "]"
|
|
1615
1616
|
))), state.writeReorders) {
|
|
1616
|
-
|
|
1617
|
+
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, html += "<style " + state.commentPrefix + nonceAttr + ">t{display:none}</style>", scripts = concatScripts(
|
|
1617
1618
|
scripts,
|
|
1618
1619
|
REORDER_RUNTIME_CODE + "(" + runtimePrefix + ")"
|
|
1619
1620
|
));
|
|
@@ -1643,11 +1644,12 @@ var State2 = class {
|
|
|
1643
1644
|
}
|
|
1644
1645
|
state.writeReorders = null;
|
|
1645
1646
|
}
|
|
1646
|
-
return
|
|
1647
|
+
return needsWalk && (scripts = concatScripts(scripts, runtimePrefix + ".w()")), this.html = html, this.scripts = scripts, this.effects = this.lastEffect = state.resumes = "", this;
|
|
1647
1648
|
}
|
|
1648
1649
|
flushHTML() {
|
|
1649
|
-
this
|
|
1650
|
-
|
|
1650
|
+
let { boundary } = this, { state } = boundary;
|
|
1651
|
+
this.needsWalk && (this.needsWalk = !1, state.walkOnNextFlush = !0), this.flushScript();
|
|
1652
|
+
let { scripts } = this, { $global: $global2, nonceAttr } = state, { __flush__ } = $global2, { html } = this;
|
|
1651
1653
|
return this.html = this.scripts = "", scripts && (html += "<script" + nonceAttr + ">" + scripts + "</script>"), __flush__ && ($global2.__flush__ = void 0, html = __flush__($global2, html)), boundary.count || (html += state.trailerHTML), html;
|
|
1652
1654
|
}
|
|
1653
1655
|
};
|
package/dist/html.mjs
CHANGED
|
@@ -109,7 +109,7 @@ function forStepBy(by, index) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// src/html/inlined-runtimes.ts
|
|
112
|
-
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,
|
|
112
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,r,l,t={},c=(i,r)=>e.l[i].replaceWith(...r.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(a,d,n,o,u)=>{n==l&&i(),"#"==a?(t[d]=r).i++:"!"==a?e.l[d]&&t[d]&&t[d].c():"T"==n.tagName&&(d=n.getAttribute(e.i))&&(l=n.nextSibling,i=()=>{n.remove(),o||c(d,n),r.c()},r=t[d]||(o=t[d]={i:e.l[d]?1:2,c(i=e.l["^"+d]){if(--o.i)return 1;for(;(l=e.l[d].previousSibling||i).remove(),i!=l;);c(d,n)}}),(a=e.j[d])&&(u=r.c,r.c=()=>u()||a(e.r)))}})';
|
|
113
113
|
|
|
114
114
|
// src/html/serializer.ts
|
|
115
115
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
@@ -1375,7 +1375,7 @@ function tryCatch(content, catchContent) {
|
|
|
1375
1375
|
let cur = body, writeMarker = !0;
|
|
1376
1376
|
do {
|
|
1377
1377
|
let next = cur.next;
|
|
1378
|
-
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;
|
|
1378
|
+
cur.boundary !== catchBoundary && cur.boundary.abort(catchBoundary.signal.reason), writeMarker && !cur.consumed && (writeMarker = !1, cur.async = !1, cur.next = bodyNext, cur.needsWalk = !0, cur.html = endMarker, cur.scripts = cur.effects = cur.lastEffect = "", cur.placeholderBody = cur.placeholderRender = cur.reorderId = null), cur = next;
|
|
1379
1379
|
} while (cur !== bodyNext);
|
|
1380
1380
|
}
|
|
1381
1381
|
let catchChunk = new Chunk(boundary, null, chunk.context);
|
|
@@ -1460,6 +1460,7 @@ var State2 = class {
|
|
|
1460
1460
|
lastEffect = "";
|
|
1461
1461
|
async = !1;
|
|
1462
1462
|
consumed = !1;
|
|
1463
|
+
needsWalk = !1;
|
|
1463
1464
|
reorderId = null;
|
|
1464
1465
|
placeholderBody = null;
|
|
1465
1466
|
placeholderRender = null;
|
|
@@ -1494,13 +1495,13 @@ var State2 = class {
|
|
|
1494
1495
|
}
|
|
1495
1496
|
}
|
|
1496
1497
|
consume() {
|
|
1497
|
-
let cur = this;
|
|
1498
|
+
let cur = this, needsWalk = cur.needsWalk;
|
|
1498
1499
|
if (cur.next && !cur.async) {
|
|
1499
1500
|
let html = "", effects = "", scripts = "", lastEffect = "";
|
|
1500
1501
|
do
|
|
1501
|
-
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;
|
|
1502
|
+
cur.flushPlaceholder(), needsWalk ||= cur.needsWalk, html += cur.html, effects = concatEffects(effects, cur.effects), scripts = concatScripts(scripts, cur.scripts), lastEffect = cur.lastEffect || lastEffect, cur.consumed = !0, cur = cur.next;
|
|
1502
1503
|
while (cur.next && !cur.async);
|
|
1503
|
-
cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect = lastEffect;
|
|
1504
|
+
cur.needsWalk = needsWalk, cur.html = html + cur.html, cur.effects = concatEffects(effects, cur.effects), cur.scripts = concatScripts(scripts, cur.scripts), cur.lastEffect = lastEffect;
|
|
1504
1505
|
}
|
|
1505
1506
|
return cur;
|
|
1506
1507
|
}
|
|
@@ -1516,18 +1517,18 @@ var State2 = class {
|
|
|
1516
1517
|
}
|
|
1517
1518
|
}
|
|
1518
1519
|
flushScript() {
|
|
1519
|
-
let { boundary, effects } = this, { state } = boundary, { $global: $global2, runtimePrefix, nonceAttr } = state, { html, scripts } = this,
|
|
1520
|
-
if (
|
|
1520
|
+
let { boundary, effects } = this, { state } = boundary, { $global: $global2, runtimePrefix, nonceAttr } = state, { html, scripts } = this, needsWalk = state.walkOnNextFlush;
|
|
1521
|
+
if (needsWalk && (state.walkOnNextFlush = !1), state.needsMainRuntime && !state.hasMainRuntime && (state.hasMainRuntime = !0, scripts = concatScripts(
|
|
1521
1522
|
scripts,
|
|
1522
1523
|
WALKER_RUNTIME_CODE + '("' + $global2.runtimeId + '")("' + $global2.renderId + '")'
|
|
1523
|
-
)), effects && (
|
|
1524
|
+
)), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + "," + effects : effects), state.resumes && (state.hasWrittenResume ? scripts = concatScripts(
|
|
1524
1525
|
scripts,
|
|
1525
1526
|
runtimePrefix + ".r.push(" + state.resumes + ")"
|
|
1526
1527
|
) : (state.hasWrittenResume = !0, scripts = concatScripts(
|
|
1527
1528
|
scripts,
|
|
1528
1529
|
runtimePrefix + ".r=[" + state.resumes + "]"
|
|
1529
1530
|
))), state.writeReorders) {
|
|
1530
|
-
|
|
1531
|
+
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, html += "<style " + state.commentPrefix + nonceAttr + ">t{display:none}</style>", scripts = concatScripts(
|
|
1531
1532
|
scripts,
|
|
1532
1533
|
REORDER_RUNTIME_CODE + "(" + runtimePrefix + ")"
|
|
1533
1534
|
));
|
|
@@ -1557,11 +1558,12 @@ var State2 = class {
|
|
|
1557
1558
|
}
|
|
1558
1559
|
state.writeReorders = null;
|
|
1559
1560
|
}
|
|
1560
|
-
return
|
|
1561
|
+
return needsWalk && (scripts = concatScripts(scripts, runtimePrefix + ".w()")), this.html = html, this.scripts = scripts, this.effects = this.lastEffect = state.resumes = "", this;
|
|
1561
1562
|
}
|
|
1562
1563
|
flushHTML() {
|
|
1563
|
-
this
|
|
1564
|
-
|
|
1564
|
+
let { boundary } = this, { state } = boundary;
|
|
1565
|
+
this.needsWalk && (this.needsWalk = !1, state.walkOnNextFlush = !0), this.flushScript();
|
|
1566
|
+
let { scripts } = this, { $global: $global2, nonceAttr } = state, { __flush__ } = $global2, { html } = this;
|
|
1565
1567
|
return this.html = this.scripts = "", scripts && (html += "<script" + nonceAttr + ">" + scripts + "</script>"), __flush__ && ($global2.__flush__ = void 0, html = __flush__($global2, html)), boundary.count || (html += state.trailerHTML), html;
|
|
1566
1568
|
}
|
|
1567
1569
|
};
|
package/dist/translator/index.js
CHANGED
|
@@ -4674,9 +4674,11 @@ function preAnalyze(program) {
|
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
function normalizeBody(state, body) {
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4677
|
+
if (body?.length) {
|
|
4678
|
+
for (const child of body) {
|
|
4679
|
+
if (child.isMarkoTag()) {
|
|
4680
|
+
normalizeTag(state, child);
|
|
4681
|
+
}
|
|
4680
4682
|
}
|
|
4681
4683
|
}
|
|
4682
4684
|
}
|
|
@@ -4684,6 +4686,7 @@ function normalizeTag(state, tag) {
|
|
|
4684
4686
|
const { node } = tag;
|
|
4685
4687
|
const { name: name2, attributes } = node;
|
|
4686
4688
|
normalizeBody(state, tag.get("body").get("body"));
|
|
4689
|
+
normalizeBody(state, tag.get("attributeTags"));
|
|
4687
4690
|
if (node.var) {
|
|
4688
4691
|
const insertions = getAssignmentInsertions(node.var);
|
|
4689
4692
|
if (insertions) {
|