Skip to content
Merged
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
  •  
  •  
  •  
32 changes: 16 additions & 16 deletions .sizes.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{
"name": "*",
"total": {
"min": 21132,
"brotli": 7918
"min": 22860,
"brotli": 8507
}
},
{
Expand All @@ -19,11 +19,11 @@
},
"runtime": {
"min": 4053,
"brotli": 1803
"brotli": 1802
},
"total": {
"min": 4216,
"brotli": 1923
"brotli": 1922
}
},
{
Expand All @@ -33,12 +33,12 @@
"brotli": 79
},
"runtime": {
"min": 2360,
"brotli": 1225
"min": 2327,
"brotli": 1206
},
"total": {
"min": 2449,
"brotli": 1304
"min": 2416,
"brotli": 1285
}
},
{
Expand All @@ -48,12 +48,12 @@
"brotli": 393
},
"runtime": {
"min": 6413,
"brotli": 2825
"min": 6415,
"brotli": 2813
},
"total": {
"min": 7095,
"brotli": 3218
"min": 7097,
"brotli": 3206
}
},
{
Expand All @@ -63,12 +63,12 @@
"brotli": 104
},
"runtime": {
"min": 2532,
"brotli": 1287
"min": 2499,
"brotli": 1255
},
"total": {
"min": 2654,
"brotli": 1391
"min": 2621,
"brotli": 1359
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions .sizes/comments.csr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// size: 6413 (min) 2825 (brotli)
// size: 6415 (min) 2813 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
Expand Down Expand Up @@ -144,7 +144,7 @@ function schedule() {
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
}
function flushAndWaitFrame() {
(run(), requestAnimationFrame(triggerMacroTask));
(requestAnimationFrame(triggerMacroTask), run());
}
function triggerMacroTask() {
(channel ||
Expand Down
71 changes: 33 additions & 38 deletions .sizes/comments.ssr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// size: 2532 (min) 1287 (brotli)
// size: 2499 (min) 1255 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
defaultDelegator = /* @__PURE__ */ createDelegator(),
isScheduled,
channel,
registeredValues = {},
curRuntimeId,
readyLookup = {},
curRenders,
pendingRenders = [],
pendingRendersLookup = {},
asyncRendersLookup,
Expand Down Expand Up @@ -41,7 +40,7 @@ function schedule() {
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
}
function flushAndWaitFrame() {
(run(), requestAnimationFrame(triggerMacroTask));
(requestAnimationFrame(triggerMacroTask), run());
}
function triggerMacroTask() {
(channel ||
Expand Down Expand Up @@ -77,15 +76,13 @@ function _script(id, fn) {
);
}
function init(runtimeId = "M") {
if (curRuntimeId) return;
curRuntimeId = runtimeId;
let resumeRender,
renders = self[runtimeId],
if (curRenders) return;
let renders = self[runtimeId],
defineRuntime = (desc) => Object.defineProperty(self, runtimeId, desc),
initRuntime = (renders) => {
defineRuntime({
value: (resumeRender = (renderId) => {
let render = (resumeRender[renderId] =
value: (curRenders = (renderId) => {
let render = (curRenders[renderId] =
renders[renderId] || renders(renderId)),
walk = render.w,
scopeLookup = (render.s = {}),
Expand All @@ -98,31 +95,9 @@ function init(runtimeId = "M") {
visitText.indexOf(" ", lastTokenIndex) + 1 ||
visitText.length + 1) - 1,
)),
$global,
lastEffect,
visits,
resumes,
visit,
visitText,
visitType,
visitScope,
lastToken,
lastTokenIndex,
lastScopeId = 0;
return (
(render.m = (effects = []) => {
if (readyLookup) {
for (let readyId in render.b)
if (readyLookup[readyId] !== 1)
return (
(readyLookup[readyId] = ((prev) => () => {
(runResumeEffects(render), prev?.());
})(readyLookup[readyId])),
effects
);
render.b = 0;
}
for (let serialized of (resumes = render.r || []))
processResumes = (resumes = [], effects) => {
let lastScopeId = resumes.c || 0;
for (let serialized of resumes)
if (typeof serialized == "string")
for (
lastTokenIndex = 0, visitText = serialized;
Expand All @@ -136,11 +111,31 @@ function init(runtimeId = "M") {
$global
? typeof scope == "number"
? (lastScopeId += scope)
: ((scopeLookup[(scope.L = ++lastScopeId)] = scope),
: ((scope.L = ++lastScopeId),
scopeLookup[lastScopeId]
? (scope = Object.assign(
scopeLookup[lastScopeId],
scope,
))
: (scopeLookup[lastScopeId] = scope),
(scope.$ = $global))
: (($global = scope || {}),
($global.runtimeId = runtimeId),
($global.renderId = renderId));
((resumes.c = lastScopeId), (resumes.length = 0));
},
$global,
lastEffect,
visits,
visit,
visitText,
visitType,
visitScope,
lastToken,
lastTokenIndex;
return (
(render.m = (effects = []) => {
processResumes(render.r, effects);
for (visit of (visits = render.v))
if (
((lastTokenIndex = render.i.length),
Expand All @@ -155,7 +150,7 @@ function init(runtimeId = "M") {
? prev
: visit.parentNode.insertBefore(new Text(), visit);
}
return ((visits.length = resumes.length = 0), effects);
return ((visits.length = 0), effects);
}),
(render.w = () => {
(walk(), runResumeEffects(render));
Expand All @@ -167,7 +162,7 @@ function init(runtimeId = "M") {
};
if (renders) {
initRuntime(renders);
for (let renderId in renders) runResumeEffects(resumeRender(renderId));
for (let renderId in renders) runResumeEffects(curRenders(renderId));
} else
defineRuntime({
configurable: !0,
Expand Down
4 changes: 2 additions & 2 deletions .sizes/counter.csr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// size: 4053 (min) 1803 (brotli)
// size: 4053 (min) 1802 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
Expand Down Expand Up @@ -127,7 +127,7 @@ function schedule() {
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
}
function flushAndWaitFrame() {
(run(), requestAnimationFrame(triggerMacroTask));
(requestAnimationFrame(triggerMacroTask), run());
}
function triggerMacroTask() {
(channel ||
Expand Down
71 changes: 33 additions & 38 deletions .sizes/counter.ssr/runtime.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// size: 2360 (min) 1225 (brotli)
// size: 2327 (min) 1206 (brotli)
//#region packages/runtime-tags/dist/dom.mjs
let decodeAccessor = (num) =>
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
defaultDelegator = /* @__PURE__ */ createDelegator(),
isScheduled,
channel,
registeredValues = {},
curRuntimeId,
readyLookup = {},
curRenders,
pendingRenders = [],
pendingRendersLookup = {},
asyncRendersLookup,
Expand Down Expand Up @@ -41,7 +40,7 @@ function schedule() {
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
}
function flushAndWaitFrame() {
(run(), requestAnimationFrame(triggerMacroTask));
(requestAnimationFrame(triggerMacroTask), run());
}
function triggerMacroTask() {
(channel ||
Expand Down Expand Up @@ -77,15 +76,13 @@ function _script(id, fn) {
);
}
function init(runtimeId = "M") {
if (curRuntimeId) return;
curRuntimeId = runtimeId;
let resumeRender,
renders = self[runtimeId],
if (curRenders) return;
let renders = self[runtimeId],
defineRuntime = (desc) => Object.defineProperty(self, runtimeId, desc),
initRuntime = (renders) => {
defineRuntime({
value: (resumeRender = (renderId) => {
let render = (resumeRender[renderId] =
value: (curRenders = (renderId) => {
let render = (curRenders[renderId] =
renders[renderId] || renders(renderId)),
walk = render.w,
scopeLookup = (render.s = {}),
Expand All @@ -98,31 +95,9 @@ function init(runtimeId = "M") {
visitText.indexOf(" ", lastTokenIndex) + 1 ||
visitText.length + 1) - 1,
)),
$global,
lastEffect,
visits,
resumes,
visit,
visitText,
visitType,
visitScope,
lastToken,
lastTokenIndex,
lastScopeId = 0;
return (
(render.m = (effects = []) => {
if (readyLookup) {
for (let readyId in render.b)
if (readyLookup[readyId] !== 1)
return (
(readyLookup[readyId] = ((prev) => () => {
(runResumeEffects(render), prev?.());
})(readyLookup[readyId])),
effects
);
render.b = 0;
}
for (let serialized of (resumes = render.r || []))
processResumes = (resumes = [], effects) => {
let lastScopeId = resumes.c || 0;
for (let serialized of resumes)
if (typeof serialized == "string")
for (
lastTokenIndex = 0, visitText = serialized;
Expand All @@ -136,11 +111,31 @@ function init(runtimeId = "M") {
$global
? typeof scope == "number"
? (lastScopeId += scope)
: ((scopeLookup[(scope.L = ++lastScopeId)] = scope),
: ((scope.L = ++lastScopeId),
scopeLookup[lastScopeId]
? (scope = Object.assign(
scopeLookup[lastScopeId],
scope,
))
: (scopeLookup[lastScopeId] = scope),
(scope.$ = $global))
: (($global = scope || {}),
($global.runtimeId = runtimeId),
($global.renderId = renderId));
((resumes.c = lastScopeId), (resumes.length = 0));
},
$global,
lastEffect,
visits,
visit,
visitText,
visitType,
visitScope,
lastToken,
lastTokenIndex;
return (
(render.m = (effects = []) => {
processResumes(render.r, effects);
for (visit of (visits = render.v))
if (
((lastTokenIndex = render.i.length),
Expand All @@ -155,7 +150,7 @@ function init(runtimeId = "M") {
? prev
: visit.parentNode.insertBefore(new Text(), visit);
}
return ((visits.length = resumes.length = 0), effects);
return ((visits.length = 0), effects);
}),
(render.w = () => {
(walk(), runResumeEffects(render));
Expand All @@ -167,7 +162,7 @@ function init(runtimeId = "M") {
};
if (renders) {
initRuntime(renders);
for (let renderId in renders) runResumeEffects(resumeRender(renderId));
for (let renderId in renders) runResumeEffects(curRenders(renderId));
} else
defineRuntime({
configurable: !0,
Expand Down
Loading
Loading