Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/for-branch-list-owners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/runtime-tags": patch
---

Link `<for>` branch owners from the parent's serialized branch list instead of serializing `_` per iteration: the list serializes through an owner-assigning wrapper (`_.o`), and the per-branch owner prop is elided when markers are statically off, or guarded by the marker condition when it is runtime-dependent.
20 changes: 10 additions & 10 deletions .sizes.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{
"name": "*",
"total": {
"min": 25857,
"brotli": 9518
"min": 25909,
"brotli": 9529
}
},
{
Expand All @@ -33,12 +33,12 @@
"brotli": 80
},
"runtime": {
"min": 2463,
"brotli": 1239
"min": 2585,
"brotli": 1279
},
"total": {
"min": 2543,
"brotli": 1319
"min": 2665,
"brotli": 1359
}
},
{
Expand All @@ -63,12 +63,12 @@
"brotli": 101
},
"runtime": {
"min": 2668,
"brotli": 1309
"min": 2790,
"brotli": 1352
},
"total": {
"min": 2783,
"brotli": 1410
"min": 2905,
"brotli": 1453
}
}
]
Expand Down
16 changes: 15 additions & 1 deletion .sizes/comments.ssr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// size: 2668 (min) 1309 (brotli)
// size: 2790 (min) 1352 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
Expand All @@ -21,6 +21,11 @@ let decodeAccessor = (num) =>
function isNotVoid(value) {
return value != null && value !== !1;
}
function forEach(opt, cb) {
if (opt)
if (Array.isArray(opt)) for (let item of opt) cb(item);
else cb(opt);
}
function _on(element, type, handler) {
(element["$" + type] === void 0 && delegate(type, handleDelegated),
(element["$" + type] = handler || null));
Expand Down Expand Up @@ -146,6 +151,15 @@ function init(runtimeId = "M") {
lastTokenIndex;
return (
(serializeContext._ = registeredValues),
(serializeContext.o = (ownerId, scopes) => {
let owner = getScope(ownerId);
return (
forEach(scopes, (scope) => {
scope._ ??= owner;
}),
scopes
);
}),
(render.m = (effects) => {
if ((processResumes(render.r, effects), readyIds));
let retained = 0;
Expand Down
16 changes: 15 additions & 1 deletion .sizes/counter.ssr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// size: 2463 (min) 1239 (brotli)
// size: 2585 (min) 1279 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
Expand All @@ -18,6 +18,11 @@ let decodeAccessor = (num) =>
},
runRender = (render) => render.c(render.b, render.d),
catchEnabled;
function forEach(opt, cb) {
if (opt)
if (Array.isArray(opt)) for (let item of opt) cb(item);
else cb(opt);
}
function _on(element, type, handler) {
(element["$" + type] === void 0 && delegate(type, handleDelegated),
(element["$" + type] = handler || null));
Expand Down Expand Up @@ -143,6 +148,15 @@ function init(runtimeId = "M") {
lastTokenIndex;
return (
(serializeContext._ = registeredValues),
(serializeContext.o = (ownerId, scopes) => {
let owner = getScope(ownerId);
return (
forEach(scopes, (scope) => {
scope._ ??= owner;
}),
scopes
);
}),
(render.m = (effects) => {
if ((processResumes(render.r, effects), readyIds));
let retained = 0;
Expand Down
11 changes: 10 additions & 1 deletion .sizes/dom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// size: 25857 (min) 9518 (brotli)
// size: 25909 (min) 9529 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let empty = [],
rest = Symbol(),
Expand Down Expand Up @@ -1038,6 +1038,15 @@ function init(runtimeId = "M") {
embedAnchor;
return (
(serializeContext._ = registeredValues),
(serializeContext.o = (ownerId, scopes) => {
let owner = getScope(ownerId);
return (
forEach(scopes, (scope) => {
scope._ ??= owner;
}),
scopes
);
}),
(render.m = (effects) => {
if ((processResumes(render.r, effects), readyIds && render.b))
for (let progress = 1; progress;) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67437,
"brotli": 20862
"min": 67488,
"brotli": 20851
},
"files": {
"components/class-counter.marko": 1028,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 3160,
"brotli": 1544
"min": 3282,
"brotli": 1590
},
"files": {
"template.marko": 236,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67429,
"brotli": 20817
"min": 67480,
"brotli": 20840
},
"files": {
"components/inline-button.marko": 1094,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67548,
"brotli": 20902
"min": 67599,
"brotli": 20885
},
"files": {
"components/split-button/component-browser.js": 373,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67737,
"brotli": 21009
"min": 67788,
"brotli": 21065
},
"files": {
"components/my-button.marko": 1048,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67371,
"brotli": 20782
"min": 67422,
"brotli": 20802
},
"files": {
"components/class-counter.marko": 1043,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67437,
"brotli": 20867
"min": 67488,
"brotli": 20862
},
"files": {
"components/class-counter.marko": 1028,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67882,
"brotli": 21060
"min": 67933,
"brotli": 21041
},
"files": {
"components/class-layout.marko": 1227,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67379,
"brotli": 20851
"min": 67430,
"brotli": 20907
},
"files": {
"components/split-display/component-browser.js": 182,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67049,
"brotli": 20714
"min": 67100,
"brotli": 20771
},
"files": {
"components/class-display.marko": 856,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67545,
"brotli": 20905
"min": 67596,
"brotli": 20874
},
"files": {
"components/split-counter/component-browser.js": 228,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 67152,
"brotli": 20719
"min": 67203,
"brotli": 20712
},
"files": {
"components/my-button/component-browser.js": 457,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 68241,
"brotli": 21215
"min": 68292,
"brotli": 21248
},
"files": {
"components/class-layout.marko": 1245,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 3150,
"brotli": 1540
"min": 3272,
"brotli": 1586
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 1791,
"brotli": 941
"min": 1913,
"brotli": 984
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2739,
"brotli": 1367
"min": 2861,
"brotli": 1421
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2841,
"brotli": 1417
"min": 2963,
"brotli": 1467
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"dom": {
"template.marko.page.mjs": {
"total": {
"min": 2544,
"brotli": 1290
"min": 2666,
"brotli": 1324
},
"files": {
"tags/child.marko": 323,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2655,
"brotli": 1334
"min": 2777,
"brotli": 1391
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2633,
"brotli": 1331
"min": 2755,
"brotli": 1379
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2636,
"brotli": 1341
"min": 2758,
"brotli": 1386
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2823,
"brotli": 1396
"min": 2945,
"brotli": 1447
}
},
"html": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dom": {
"template.marko.page.mjs": {
"min": 2974,
"brotli": 1478
"min": 3096,
"brotli": 1540
}
},
"html": {
Expand Down
Loading
Loading