fix: partially revert 2380 (#2383)

This commit is contained in:
Dylan Piercey 2024-11-25 10:26:41 -07:00 committed by GitHub
parent 4e5827f727
commit 133b562c19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
134 changed files with 483 additions and 458 deletions

View File

@ -0,0 +1,8 @@
---
"@marko/translator-tags": patch
"@marko/babel-utils": patch
"@marko/compiler": patch
"marko": patch
---
Partially revert #2380 which was causing non idempotent builds.

View File

@ -14,22 +14,22 @@
{
"name": "counter",
"user": {
"min": 208,
"brotli": 146
"min": 209,
"brotli": 147
},
"runtime": {
"min": 3737,
"brotli": 1580
},
"total": {
"min": 3945,
"brotli": 1726
"min": 3946,
"brotli": 1727
}
},
{
"name": "counter 💧",
"user": {
"min": 130,
"min": 131,
"brotli": 125
},
"runtime": {
@ -37,14 +37,14 @@
"brotli": 1416
},
"total": {
"min": 3267,
"min": 3268,
"brotli": 1541
}
},
{
"name": "comments",
"user": {
"min": 1000,
"min": 1003,
"brotli": 491
},
"runtime": {
@ -52,23 +52,23 @@
"brotli": 3141
},
"total": {
"min": 8744,
"min": 8747,
"brotli": 3632
}
},
{
"name": "comments 💧",
"user": {
"min": 851,
"brotli": 449
"min": 854,
"brotli": 451
},
"runtime": {
"min": 8751,
"brotli": 3547
},
"total": {
"min": 9602,
"brotli": 3996
"min": 9605,
"brotli": 3998
}
}
]

View File

@ -1,4 +1,4 @@
// size: 1000 (min) 491 (brotli)
// size: 1003 (min) 491 (brotli)
const _expr_comment_id$ifBody = intersection(
2,
(_scope) => {
@ -12,7 +12,7 @@ const _expr_comment_id$ifBody = intersection(
_id$ifBody = closure(8, 0, void 0, () => _expr_comment_id$ifBody),
_comment$ifBody = closure(6, 0, void 0, () => _expr_comment_id$ifBody),
_ifBody = register(
"c",
"a0",
createRenderer(
"<ul></ul>",
"/ b&",
@ -34,7 +34,7 @@ const _expr_comment_id$ifBody = intersection(
() => _id$forBody,
),
_if$forBody = conditional(4),
_open$forBody_effect = effect("d", (_scope) =>
_open$forBody_effect = effect("a1", (_scope) =>
on(
_scope[2],
"click",
@ -76,7 +76,7 @@ const _expr_comment_id$ifBody = intersection(
_for = loopOf(
0,
register(
"e",
"a2",
createRenderer(
"<li><span> </span><button> </button><!></li>",
" E l D l%",
@ -107,7 +107,7 @@ function _setup_(_scope) {
_scope[0];
}
createTemplate(
"a",
"b",
"<ul></ul>",
"/ b&",
_setup_,

View File

@ -1,4 +1,4 @@
// size: 851 (min) 449 (brotli)
// size: 854 (min) 451 (brotli)
const _expr_comment_id$ifBody = intersection(
2,
(_scope) => {
@ -12,7 +12,7 @@ const _expr_comment_id$ifBody = intersection(
_id$ifBody = closure(8, 0, void 0, () => _expr_comment_id$ifBody),
_comment$ifBody = closure(6, 0, void 0, () => _expr_comment_id$ifBody),
_ifBody = register(
"c",
"a0",
createRenderer(
"<ul></ul>",
"/ b&",
@ -34,7 +34,7 @@ const _expr_comment_id$ifBody = intersection(
() => _id$forBody,
),
_if$forBody = conditional(4),
_open$forBody_effect = effect("d", (_scope) =>
_open$forBody_effect = effect("a1", (_scope) =>
on(
_scope[2],
"click",
@ -76,7 +76,7 @@ const _expr_comment_id$ifBody = intersection(
_for = loopOf(
0,
register(
"e",
"a2",
createRenderer(
"<li><span> </span><button> </button><!></li>",
" E l D l%",

View File

@ -1,5 +1,5 @@
// size: 208 (min) 146 (brotli)
const _clickCount_effect = effect("b", (_scope) =>
// size: 209 (min) 147 (brotli)
const _clickCount_effect = effect("a0", (_scope) =>
on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 130 (min) 125 (brotli)
const _clickCount_effect = effect("b", (_scope) =>
// size: 131 (min) 125 (brotli)
const _clickCount_effect = effect("a0", (_scope) =>
on(
_scope[0],
"click",

View File

@ -323,14 +323,33 @@ export function getTemplateId(opts, request, child) {
const optimize = typeof opts === "object" ? opts.optimize : opts;
if (optimize) {
const optimizeRegistryId =
typeof opts === "object" && opts.optimizeRegistryId;
if (optimizeRegistryId) {
const result = optimizeRegistryId(
child ? request + "_" + child : request,
);
return typeof result === "number" ? encodeTemplateId(result) : result;
const optimizeKnownTemplates =
typeof opts === "object" && opts.optimizeKnownTemplates;
const knownTemplatesSize = optimizeKnownTemplates?.length || 0;
if (knownTemplatesSize) {
let lookup = idCache.get(optimizeKnownTemplates);
if (!lookup) {
lookup = new Map();
idCache.set(optimizeKnownTemplates, lookup);
for (let i = 0; i < knownTemplatesSize; i++) {
lookup.set(optimizeKnownTemplates[i], {
id: encodeTemplateId(i),
children: new Map(),
});
}
}
let registered = lookup.get(request);
if (registered) {
if (child) {
let childId = registered.children.get(child);
if (childId === undefined) {
childId = registered.children.size;
registered.children.set(child, childId);
}
return registered.id + childId;
}
return registered.id;
}
}
const hash = createHash("shake256", templateIdHashOpts).update(id);

View File

@ -24,7 +24,7 @@ declare const Config: {
hydrateIncludeImports?: RegExp | ((request: string) => boolean);
hydrateInit?: boolean;
optimize?: boolean;
optimizeRegistryId?: (request: string) => string | number;
optimizeKnownTemplates?: string[];
cache?: Map<unknown, unknown>;
hot?: boolean;
/** @deprecated */

View File

@ -114,10 +114,11 @@ const config = {
optimize: undefined,
/**
* If `optimize` is enabled this function will be called to resolve the "template id" used for Marko's
* hydration registry.
* If `optimize` is enabled you can provide an array of template paths which the compiler will
* use to generate shorter registry/template ids using incrementing ids. This can only be used
* if the same `optimizeKnownTemplates` are used for both server and client compilations.
*/
optimizeRegistryId: undefined,
optimizeKnownTemplates: undefined,
/**
* This option should be set if `hydrate` output is specified.

View File

@ -206,17 +206,12 @@ Default: [environment based](https://github.com/marko-js/marko/blob/0f212897d2d3
Enables production mode optimizations.
#### `optimizeRegistryId`
#### `optimizeKnownTemplates`
Type: `(request: string) => string | number`<br>
Type: `string[]`<br>
Default: `undefined`
If `optimize` is enabled this function will be called with each "template id" / "registry id" that Marko uses for hydration.
The function must return a number (which will be encoded) or a string which is used verbatim.
It is _required_ that when a template is compiled for the server it is given the same id when it is compiled for the browser.
Without this function Marko will use a generic hash of the raw `request` id.
If `optimize` is enabled you can provide an array of template paths which the compiler will use to generate shorter registry/template ids using incrementing ids. This can only be used if the same `optimizeKnownTemplates` are used for both server and client compilations.
#### `resolveVirtualDependency`

View File

@ -1,8 +1,8 @@
// size: 189 (min) 129 (brotli)
// size: 190 (min) 126 (brotli)
const _lastClickCount = _$.state(4, (_scope, lastClickCount) =>
_$.data(_scope[2], lastClickCount),
),
_clickCount_effect = _$.effect("b", (_scope) =>
_clickCount_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,4 +1,4 @@
// size: 131 (min) 84 (brotli)
// size: 133 (min) 82 (brotli)
_$.dynamicTagAttrs(0),
_$.register("c", _$.createRendererWithOwner("Goodbye", "")),
_$.register("d", _$.createRendererWithOwner("Hello", ""));
_$.register("b0", _$.createRendererWithOwner("Goodbye", "")),
_$.register("b1", _$.createRendererWithOwner("Hello", ""));

View File

@ -1,2 +1,3 @@
// size: 74 (min) 70 (brotli)
_$.dynamicTagAttrs(0), _$.register("c", _$.createRendererWithOwner("Foo!", ""));
// size: 75 (min) 70 (brotli)
_$.dynamicTagAttrs(0),
_$.register("b0", _$.createRendererWithOwner("Foo!", ""));

View File

@ -1,5 +1,5 @@
// size: 189 (min) 135 (brotli)
const _disabled_effect = _$.effect("b", (_scope) =>
// size: 190 (min) 135 (brotli)
const _disabled_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,11 +1,11 @@
// size: 299 (min) 179 (brotli)
// size: 301 (min) 178 (brotli)
const _text_ = _$.value(5, (_scope, text) => _$.data(_scope[1], text)),
_onClick__effect = _$.effect("d", (_scope) => {
_onClick__effect = _$.effect("a0", (_scope) => {
const { 4: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(4, (_scope, onClick) => _onClick__effect(_scope)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);

View File

@ -1,11 +1,11 @@
// size: 299 (min) 181 (brotli)
const _onClick__effect = _$.effect("d", (_scope) => {
// size: 301 (min) 183 (brotli)
const _onClick__effect = _$.effect("a0", (_scope) => {
const { 5: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(5, (_scope, onClick) => _onClick__effect(_scope)),
_text_ = _$.value(4, (_scope, text) => _$.data(_scope[1], text)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);

View File

@ -1,4 +1,4 @@
// size: 492 (min) 231 (brotli)
// size: 495 (min) 228 (brotli)
const _text_ = _$.value(7, (_scope, text) => {
_$.data(_scope[1], text),
((_scope, textAlias) => {
@ -8,18 +8,18 @@ const _text_ = _$.value(7, (_scope, text) => {
_pattern__ = _$.value(6, (_scope, _pattern_) =>
_text_(_scope, _pattern_.text),
),
_onClick__effect = _$.effect("e", (_scope) => {
_onClick__effect = _$.effect("a0", (_scope) => {
const { 5: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(5, (_scope, onClick) => _onClick__effect(_scope)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 2: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);
};
}),
_onClick2 = _$.register("d", (_scope) => {
_onClick2 = _$.register("b1", (_scope) => {
const { 2: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);

View File

@ -1,16 +1,16 @@
// size: 332 (min) 188 (brotli)
// size: 334 (min) 189 (brotli)
const _text_ = _$.value(6, (_scope, text) => {
_$.data(_scope[1], text),
((_scope, textAlias) => {
_$.data(_scope[2], textAlias);
})(_scope, text);
}),
_onClick__effect = _$.effect("d", (_scope) => {
_onClick__effect = _$.effect("a0", (_scope) => {
const { 5: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(5, (_scope, onClick) => _onClick__effect(_scope)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);

View File

@ -1,11 +1,11 @@
// size: 299 (min) 179 (brotli)
// size: 301 (min) 178 (brotli)
const _text_ = _$.value(5, (_scope, text) => _$.data(_scope[1], text)),
_onClick__effect = _$.effect("d", (_scope) => {
_onClick__effect = _$.effect("a0", (_scope) => {
const { 4: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(4, (_scope, onClick) => _onClick__effect(_scope)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);

View File

@ -1,24 +1,24 @@
// size: 426 (min) 247 (brotli)
// size: 430 (min) 241 (brotli)
_$.dynamicTagAttrs(1);
const _onClick__effect = _$.effect("f", (_scope) => {
const _onClick__effect = _$.effect("a0", (_scope) => {
const { 4: onClick } = _scope;
_$.on(_scope[0], "click", onClick);
}),
_onClick_ = _$.value(4, (_scope, onClick) => _onClick__effect(_scope)),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);
};
}),
_clickCount$myButtonBody = _$.registerSubscriber(
"d",
"b1",
_$.dynamicClosure(1, (_scope, clickCount) =>
_$.data(_scope[0], clickCount),
),
);
_$.register(
"e",
"b2",
_$.createRendererWithOwner(" ", " ", void 0, () => [
_clickCount$myButtonBody,
]),

View File

@ -1,5 +1,5 @@
// size: 145 (min) 108 (brotli)
const _clickCount_effect = _$.effect("c", (_scope) =>
// size: 146 (min) 127 (brotli)
const _clickCount_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,13 +1,13 @@
// size: 438 (min) 225 (brotli)
// size: 441 (min) 228 (brotli)
const _count$ifBody = _$.closure(4, (_scope, count) =>
_$.data(_scope[0], count),
),
_ifBody = _$.register(
"b",
"a0",
_$.createRenderer("The count is <!>", "b%", void 0, () => [_count$ifBody]),
),
_if = _$.conditional(2, 0),
_count_effect = _$.effect("c", (_scope) =>
_count_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",
@ -24,7 +24,7 @@ const _count$ifBody = _$.closure(4, (_scope, count) =>
(_scope, count) => _count_effect(_scope),
() => _$.inConditionalScope(_count$ifBody, 2),
),
_show_effect = _$.effect("d", (_scope) =>
_show_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,13 +1,13 @@
// size: 436 (min) 222 (brotli)
// size: 439 (min) 224 (brotli)
const _count$ifBody = _$.closure(4, (_scope, count) =>
_$.data(_scope[0], count),
),
_ifBody = _$.register(
"b",
"a0",
_$.createRenderer("<span> </span>", "D ", void 0, () => [_count$ifBody]),
),
_if = _$.conditional(2, 0),
_count_effect = _$.effect("c", (_scope) =>
_count_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",
@ -24,7 +24,7 @@ const _count$ifBody = _$.closure(4, (_scope, count) =>
(_scope, count) => _count_effect(_scope),
() => _$.inConditionalScope(_count$ifBody, 2),
),
_show_effect = _$.effect("d", (_scope) =>
_show_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,11 +1,11 @@
// size: 209 (min) 143 (brotli)
const _increment = _$.register("b", (_scope) => {
// size: 211 (min) 142 (brotli)
const _increment = _$.register("a0", (_scope) => {
const { 2: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);
};
}),
_increment2_effect = _$.effect("c", (_scope) => {
_increment2_effect = _$.effect("a1", (_scope) => {
const { 3: increment } = _scope;
_$.on(_scope[0], "click", increment);
}),

View File

@ -1,4 +1,4 @@
// size: 369 (min) 189 (brotli)
// size: 371 (min) 190 (brotli)
const _expr_count_multiplier = _$.intersection(2, (_scope) => {
const { 4: count, 5: multiplier } = _scope;
_multipliedCount(_scope, count * multiplier);
@ -6,7 +6,7 @@ const _expr_count_multiplier = _$.intersection(2, (_scope) => {
_multipliedCount = _$.value(6, (_scope, multipliedCount) =>
_$.data(_scope[3], multipliedCount),
),
_multiplier_effect = _$.effect("b", (_scope) =>
_multiplier_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -25,7 +25,7 @@ const _expr_count_multiplier = _$.intersection(2, (_scope) => {
},
() => _expr_count_multiplier,
),
_count_effect = _$.effect("c", (_scope) =>
_count_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[2],
"click",

View File

@ -1,5 +1,5 @@
// size: 145 (min) 109 (brotli)
const _clickCount_effect = _$.effect("b", (_scope) =>
// size: 146 (min) 127 (brotli)
const _clickCount_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,6 +1,6 @@
// size: 91 (min) 79 (brotli)
// size: 92 (min) 74 (brotli)
const _tagNameBody = _$.register(
"b",
"a0",
_$.createRendererWithOwner("Hello World", ""),
);
_$.dynamicTagAttrs(0, _tagNameBody);

View File

@ -1,2 +1,2 @@
// size: 57 (min) 61 (brotli)
_$.effect("b", (_scope) => (document.body.className = "no-deps")), init();
// size: 58 (min) 47 (brotli)
_$.effect("a0", (_scope) => (document.body.className = "no-deps")), init();

View File

@ -1,9 +1,9 @@
// size: 297 (min) 183 (brotli)
// size: 299 (min) 191 (brotli)
const _message$ifBody = _$.closure(2, (_scope, message) =>
_$.data(_scope[0], message.text),
),
_ifBody = _$.register(
"b",
"a0",
_$.createRenderer(" ", " ", void 0, () => [_message$ifBody]),
),
_if = _$.conditional(1, 0),
@ -13,7 +13,7 @@ const _message$ifBody = _$.closure(2, (_scope, message) =>
() => _if,
),
_message = _$.state(2, 0, () => _$.inConditionalScope(_message$ifBody, 1));
_$.effect("c", (_scope) =>
_$.effect("a1", (_scope) =>
_$.on(_scope[0], "click", function () {
_message(_scope, null), _show(_scope, !1);
}),

View File

@ -1,5 +1,5 @@
// size: 145 (min) 109 (brotli)
const _count_effect = _$.effect("b", (_scope) =>
// size: 146 (min) 127 (brotli)
const _count_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 229 (min) 155 (brotli)
const _expr_a_b_effect = _$.effect("b", (_scope) =>
// size: 230 (min) 156 (brotli)
const _expr_a_b_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,6 +1,6 @@
// size: 106 (min) 87 (brotli)
// size: 107 (min) 89 (brotli)
const _data = _$.state(2, (_scope, data) => _$.data(_scope[1], data));
_$.effect("b", (_scope) =>
_$.effect("a0", (_scope) =>
_$.on(_scope[0], "click", function () {
_data(_scope, 1);
}),

View File

@ -1,4 +1,4 @@
// size: 1090 (min) 508 (brotli)
// size: 1093 (min) 508 (brotli)
const _expr_comment_id$ifBody = _$.intersection(
2,
(_scope) => {
@ -15,7 +15,7 @@ const _expr_comment_id$ifBody = _$.intersection(
_scope[0];
},
_ifBody = _$.register(
"c",
"a0",
_$.createRenderer("<ul></ul>", "/ b&", _setup$ifBody, () => [
_id$ifBody,
_comment$ifBody,
@ -33,7 +33,7 @@ const _expr_comment_id$ifBody = _$.intersection(
() => _id$forBody,
),
_if$forBody = _$.conditional(4, 0),
_open$forBody_effect = _$.effect("d", (_scope) =>
_open$forBody_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[2],
"click",
@ -80,7 +80,7 @@ const _expr_comment_id$ifBody = _$.intersection(
_open$forBody(_scope, !0);
},
_forBody = _$.register(
"e",
"a2",
_$.createRenderer(
"<li><span> </span><button> </button><!></li>",
" E l D l%",

View File

@ -1,11 +1,11 @@
// size: 186 (min) 135 (brotli)
// size: 188 (min) 129 (brotli)
_$.dynamicTagAttrs(0);
const _name$layoutBody = _$.registerSubscriber(
"c",
"b0",
_$.dynamicClosure(3, (_scope, name) => _$.data(_scope[0], name)),
);
_$.register(
"d",
"b1",
_$.createRendererWithOwner("<h1>Hello <!></h1>", "Db%", void 0, () => [
_name$layoutBody,
]),

View File

@ -1,4 +1,4 @@
// size: 748 (min) 367 (brotli)
// size: 751 (min) 367 (brotli)
const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
_expr_outer_inner$forBody = _$.intersection(
2,
@ -22,7 +22,7 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
_scope[0];
},
_forBody2 = _$.register(
"c",
"b0",
_$.createRenderer(
"<div> </div>",
"/D l&",
@ -45,7 +45,7 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
() => _outer$forBody2,
),
_forBody = _$.register(
"d",
"b1",
_$.createRenderer(
"<!><!><!>",
"D%D",
@ -55,7 +55,7 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
),
),
_for = _$.loopOf(1, _forBody),
_items_effect = _$.effect("e", (_scope) =>
_items_effect = _$.effect("b2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,4 +1,4 @@
// size: 872 (min) 390 (brotli)
// size: 877 (min) 389 (brotli)
const _renderBody_input = _$.dynamicTagAttrs(0),
_expr_Text_value = _$.intersection(
2,
@ -17,14 +17,14 @@ const _renderBody_input = _$.dynamicTagAttrs(0),
),
_inner$childBody = _$.value(3, (_scope, inner) => _$.data(_scope[1], inner)),
_outer$childBody = _$.registerSubscriber(
"c",
"b0",
_$.dynamicClosure(2, (_scope, outer) => _$.data(_scope[0], outer)),
),
_params_3$childBody = _$.value(2, (_scope, _params_3) =>
_inner$childBody(_scope, _params_3[0]),
),
_childBody2 = _$.register(
"d",
"b1",
_$.createRendererWithOwner(
"<div><!>.<!></div>",
"D%c%",
@ -34,7 +34,7 @@ const _renderBody_input = _$.dynamicTagAttrs(0),
),
),
_y$childBody = _$.registerSubscriber(
"e",
"b2",
_$.dynamicClosure(
3,
(_scope, y) => _value_(_scope[0], y),
@ -52,7 +52,7 @@ const _renderBody_input = _$.dynamicTagAttrs(0),
_scope[0], _renderBody_(_scope[0], _childBody2(_scope));
};
_$.register(
"f",
"b3",
_$.createRendererWithOwner(
"<div><!></div>",
"/D%l&",
@ -61,7 +61,7 @@ _$.register(
() => _params_2$childBody,
),
);
const _x_effect = _$.effect("g", (_scope) =>
const _x_effect = _$.effect("b4", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,6 +1,6 @@
// size: 345 (min) 215 (brotli)
// size: 348 (min) 216 (brotli)
_$.dynamicTagAttrs(0);
const _count$childBody_effect = _$.effect("c", (_scope) =>
const _count$childBody_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -15,13 +15,13 @@ const _count$childBody_effect = _$.effect("c", (_scope) =>
),
),
_count$childBody = _$.registerSubscriber(
"d",
"b1",
_$.dynamicClosure(1, (_scope, count) => {
_$.data(_scope[1], count), _count$childBody_effect(_scope);
}),
);
_$.register(
"e",
"b2",
_$.createRendererWithOwner("<button> </button>", " D ", void 0, () => [
_count$childBody,
]),

View File

@ -1,6 +1,6 @@
// size: 370 (min) 221 (brotli)
// size: 373 (min) 222 (brotli)
_$.dynamicTagAttrs(0);
const _count$falseChildBody_effect = _$.effect("b", (_scope) =>
const _count$falseChildBody_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -15,13 +15,13 @@ const _count$falseChildBody_effect = _$.effect("b", (_scope) =>
),
),
_count$falseChildBody = _$.registerSubscriber(
"c",
"b1",
_$.dynamicClosure(1, (_scope, count) => {
_$.data(_scope[1], count), _count$falseChildBody_effect(_scope);
}),
),
_falseChildBody = _$.register(
"d",
"b2",
_$.createRendererWithOwner("<button> </button>", " D ", void 0, () => [
_count$falseChildBody,
]),

View File

@ -1,4 +1,4 @@
// size: 296 (min) 193 (brotli)
// size: 297 (min) 193 (brotli)
const _expr_selected_num$forBody = _$.intersection(2, (_scope) => {
const {
_: { 1: selected },
@ -7,7 +7,7 @@ const _expr_selected_num$forBody = _$.intersection(2, (_scope) => {
_$.attr(_scope[0], "data-selected", selected === num),
_$.attr(_scope[0], "data-multiple", num % selected == 0);
});
_$.effect("b", (_scope) =>
_$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,9 +1,9 @@
// size: 515 (min) 270 (brotli)
// size: 518 (min) 272 (brotli)
const _clickCount$elseBody = _$.closure(1, (_scope, clickCount) =>
_$.data(_scope[0], clickCount),
),
_elseBody = _$.register(
"b",
"a0",
_$.createRenderer(
"<span>The button was clicked <!> times.</span>",
"Db%",
@ -11,7 +11,7 @@ const _clickCount$elseBody = _$.closure(1, (_scope, clickCount) =>
() => [_clickCount$elseBody],
),
),
_clickCount$ifBody_effect = _$.effect("c", (_scope) =>
_clickCount$ifBody_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",
@ -29,7 +29,7 @@ const _clickCount$elseBody = _$.closure(1, (_scope, clickCount) =>
_$.data(_scope[1], clickCount), _clickCount$ifBody_effect(_scope);
}),
_ifBody = _$.register(
"d",
"a2",
_$.createRenderer("<button> </button>", " D ", void 0, () => [
_clickCount$ifBody,
]),

View File

@ -1,13 +1,13 @@
// size: 482 (min) 249 (brotli)
// size: 485 (min) 250 (brotli)
const _item$forBody = _$.value(2, (_scope, item) => _$.data(_scope[0], item)),
_params_2$forBody = _$.value(1, (_scope, _params_2) =>
_item$forBody(_scope, _params_2[0]),
),
_forBody = _$.register(
"b",
"a0",
_$.createRenderer(" ", " ", void 0, void 0, () => _params_2$forBody),
),
_expr_id_items_effect = _$.effect("c", (_scope) =>
_expr_id_items_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[1],
"click",
@ -24,7 +24,7 @@ const _item$forBody = _$.value(2, (_scope, item) => _$.data(_scope[0], item)),
_expr_id_items_effect(_scope);
}),
_for = _$.loopOf(0, _forBody),
_items_effect = _$.effect("d", (_scope) =>
_items_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[2],
"click",

View File

@ -1,10 +1,10 @@
// size: 485 (min) 247 (brotli)
// size: 488 (min) 250 (brotli)
const _x$forBody = _$.value(2, (_scope, x) => _$.data(_scope[0], x)),
_params_2$forBody = _$.value(1, (_scope, _params_2) =>
_x$forBody(_scope, _params_2[0]),
),
_forBody = _$.register(
"b",
"a0",
_$.createRenderer(
"<li> </li>",
"D ",
@ -14,7 +14,7 @@ const _x$forBody = _$.value(2, (_scope, x) => _$.data(_scope[0], x)),
),
),
_for = _$.loopOf(0, _forBody),
_list_effect = _$.effect("c", (_scope) =>
_list_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[2],
"click",
@ -35,7 +35,7 @@ const _x$forBody = _$.value(2, (_scope, x) => _$.data(_scope[0], x)),
},
]);
}),
_open_effect = _$.effect("d", (_scope) =>
_open_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,7 +1,7 @@
// size: 212 (min) 144 (brotli)
const _ifBody = _$.register("b", _$.createRenderer("Hello!", "")),
// size: 214 (min) 146 (brotli)
const _ifBody = _$.register("a0", _$.createRenderer("Hello!", "")),
_if = _$.conditional(0, 0),
_show_effect = _$.effect("c", (_scope) =>
_show_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,5 +1,5 @@
// size: 145 (min) 109 (brotli)
const _clickCount_effect = _$.effect("b", (_scope) =>
// size: 146 (min) 127 (brotli)
const _clickCount_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,14 +1,14 @@
// size: 344 (min) 213 (brotli)
// size: 346 (min) 217 (brotli)
const _message$ifBody = _$.closure(3, (_scope, message) =>
_$.data(_scope[0], message),
),
_ifBody = _$.register(
"b",
"a0",
_$.createRenderer("<span> </span>", "D ", void 0, () => [_message$ifBody]),
),
_if = _$.conditional(1, 0),
_message = _$.state(3, 0, () => _$.inConditionalScope(_message$ifBody, 1)),
_show_effect = _$.effect("c", (_scope) =>
_show_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 226 (min) 145 (brotli)
const _expr_a_b_effect = _$.effect("b", (_scope) =>
// size: 227 (min) 146 (brotli)
const _expr_a_b_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,11 +1,11 @@
// size: 579 (min) 329 (brotli)
// size: 583 (min) 311 (brotli)
const _renderBody_input = _$.dynamicTagAttrs(1),
_dynamicTagName = _$.conditional(
1,
(_scope) => _renderBody_input(_scope, () => ({})),
() => _renderBody_input,
),
_attrs__effect = _$.effect("f", (_scope) => {
_attrs__effect = _$.effect("a0", (_scope) => {
_$.attrsEvents(_scope, 0);
}),
_renderBody_ = _$.value(
@ -23,20 +23,20 @@ const _renderBody_input = _$.dynamicTagAttrs(1),
},
() => _renderBody_,
),
_onClick = _$.register("c", (_scope) => {
_onClick = _$.register("b0", (_scope) => {
const { 1: clickCount } = _scope;
return function () {
_clickCount(_scope, clickCount + 1);
};
}),
_clickCount$FancyButtonBody = _$.registerSubscriber(
"d",
"b1",
_$.dynamicClosure(1, (_scope, clickCount) =>
_$.data(_scope[0], clickCount),
),
),
_FancyButtonBody = _$.register(
"e",
"b2",
_$.createRendererWithOwner(" ", " ", void 0, () => [
_clickCount$FancyButtonBody,
]),

View File

@ -1,5 +1,5 @@
// size: 830 (min) 415 (brotli)
const _expr_name_write_effect = _$.effect("f", (_scope) => {
// size: 834 (min) 421 (brotli)
const _expr_name_write_effect = _$.effect("a0", (_scope) => {
const { 5: name, 6: write } = _scope;
write(`mounted ${name}`),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -23,7 +23,7 @@ const _expr_name_write_effect = _$.effect("f", (_scope) => {
() => _expr_name_write,
);
_$.register(
"c",
"b0",
(_scope) =>
function (msg) {
_scope[1].innerHTML += "\n" + msg;
@ -49,7 +49,7 @@ const _write$forBody = _$.closure(
_scope[0];
},
_forBody = _$.register(
"d",
"b1",
_$.createRenderer(
"<div> </div><span> </span><p> </p>",
"/D lD lD l&",
@ -59,7 +59,7 @@ const _write$forBody = _$.closure(
),
),
_for = _$.loopOf(2, _forBody),
_items_effect = _$.effect("e", (_scope) =>
_items_effect = _$.effect("b2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,6 +1,6 @@
// size: 1608 (min) 568 (brotli)
// size: 1617 (min) 571 (brotli)
const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
_expr_name_write_effect = _$.effect("k", (_scope) => {
_expr_name_write_effect = _$.effect("a0", (_scope) => {
const { 5: name, 6: write } = _scope;
write(`${name} mounted`),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -24,7 +24,7 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
() => _expr_name_write,
);
_$.register(
"c",
"b0",
(_scope) =>
function (msg) {
_scope[3].innerHTML += "\n" + msg;
@ -40,7 +40,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Inner");
},
_ifBody3 = _$.register(
"d",
"b1",
_$.createRenderer(`${_template_}`, "/D%lD%lD%l&", _setup$ifBody3, () => [
_write$ifBody3,
]),
@ -53,7 +53,7 @@ const _write$ifBody3 = _$.dynamicClosure(
() => _$.inChild(0, _write_),
),
_showInner$ifBody = _$.registerSubscriber(
"e",
"b2",
_$.dynamicClosure(
7,
(_scope, showInner) => _if$ifBody(_scope, showInner ? _ifBody3 : null),
@ -65,7 +65,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Middle");
},
_ifBody2 = _$.register(
"f",
"b3",
_$.createRenderer(
`<div>${_template_}<!></div>`,
"D/D%lD%lD%l&%",
@ -90,7 +90,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Outer");
},
_ifBody = _$.register(
"g",
"b4",
_$.createRenderer(
`<div>${_template_}<!></div>`,
"D/D%lD%lD%l&%",
@ -99,7 +99,7 @@ const _write$ifBody3 = _$.dynamicClosure(
),
),
_if = _$.conditional(4, 0),
_showInner_effect = _$.effect("h", (_scope) =>
_showInner_effect = _$.effect("b5", (_scope) =>
_$.on(
_scope[2],
"click",
@ -116,7 +116,7 @@ const _write$ifBody3 = _$.dynamicClosure(
(_scope, showInner) => _showInner_effect(_scope),
() => _$.dynamicSubscribers(7),
),
_showMiddle_effect = _$.effect("i", (_scope) =>
_showMiddle_effect = _$.effect("b6", (_scope) =>
_$.on(
_scope[1],
"click",
@ -133,7 +133,7 @@ const _write$ifBody3 = _$.dynamicClosure(
(_scope, showMiddle) => _showMiddle_effect(_scope),
() => _$.inConditionalScope(_showMiddle$ifBody, 4),
),
_showOuter_effect = _$.effect("j", (_scope) =>
_showOuter_effect = _$.effect("b7", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 399 (min) 238 (brotli)
const _setup$ifBody_effect = _$.effect("b", (_scope) => {
// size: 402 (min) 240 (brotli)
const _setup$ifBody_effect = _$.effect("a0", (_scope) => {
(_scope._[1].innerHTML += "\nmounted"),
(_$.getAbortSignal(_scope, 0).onabort = () => {
_scope._[1].innerHTML += "\ndestroyed";
@ -9,11 +9,11 @@ const _setup$ifBody_effect = _$.effect("b", (_scope) => {
_$.resetAbortSignal(_scope, 0), _setup$ifBody_effect(_scope);
},
_ifBody = _$.register(
"c",
"a1",
_$.createRenderer("<div>a</div><span>b</span><p>c</p>", "", _setup$ifBody),
),
_if = _$.conditional(2, 0),
_show_effect = _$.effect("d", (_scope) =>
_show_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 527 (min) 291 (brotli)
const _input__effect = _$.effect("f", (_scope) => {
// size: 531 (min) 293 (brotli)
const _input__effect = _$.effect("a0", (_scope) => {
const { 1: input } = _scope;
input.write("mounted"),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -13,7 +13,7 @@ const _input__effect = _$.effect("f", (_scope) => {
_$.resetAbortSignal(_scope, 0), _input__effect(_scope);
}),
_write = _$.register(
"c",
"b0",
(_scope) =>
function (state) {
_scope._[1].innerHTML = state;
@ -23,7 +23,7 @@ const _input__effect = _$.effect("f", (_scope) => {
_scope[0], _input_(_scope[0], { write: _write(_scope) });
},
_ifBody = _$.register(
"d",
"b1",
_$.createRenderer(
"<div>a</div><span>b</span><p>c</p>",
"/d&",
@ -31,7 +31,7 @@ const _input__effect = _$.effect("f", (_scope) => {
),
),
_if = _$.conditional(2, 0),
_show_effect = _$.effect("e", (_scope) =>
_show_effect = _$.effect("b2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 1260 (min) 532 (brotli)
const _expr_name_write_effect = _$.effect("g", (_scope) => {
// size: 1265 (min) 528 (brotli)
const _expr_name_write_effect = _$.effect("a0", (_scope) => {
_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
const { 3: name, 4: write } = _scope;
return () => {
@ -17,7 +17,7 @@ const _expr_name_write_effect = _$.effect("g", (_scope) => {
() => _expr_name_write,
);
_$.register(
"b",
"b0",
(_scope) =>
function (msg) {
_scope[1].innerHTML += "\n" + msg;
@ -60,7 +60,7 @@ const _expr_outerItem_middleItem$forBody = _$.intersection(
_scope[0];
},
_forBody2 = _$.register(
"d",
"b1",
_$.createRenderer(
"<div><div> </div></div>",
"D/D l&",
@ -100,7 +100,7 @@ const _expr_outerItem_middleItem$forBody = _$.intersection(
_scope[0];
},
_forBody = _$.register(
"e",
"b2",
_$.createRenderer(
"<div><div> </div><!></div>",
"D/D l&%",
@ -110,7 +110,7 @@ const _expr_outerItem_middleItem$forBody = _$.intersection(
),
),
_for = _$.loopOf(2, _forBody),
_items_effect = _$.effect("f", (_scope) =>
_items_effect = _$.effect("b3", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 770 (min) 399 (brotli)
const _expr_name_write_effect = _$.effect("f", (_scope) => {
// size: 774 (min) 395 (brotli)
const _expr_name_write_effect = _$.effect("a0", (_scope) => {
const { 3: name, 4: write } = _scope;
write(`mounted ${name}`),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -19,7 +19,7 @@ const _expr_name_write_effect = _$.effect("f", (_scope) => {
() => _expr_name_write,
);
_$.register(
"c",
"b0",
(_scope) =>
function (msg) {
_scope[1].innerHTML += "\n" + msg;
@ -45,7 +45,7 @@ const _write$forBody = _$.closure(
_scope[0];
},
_forBody = _$.register(
"d",
"b1",
_$.createRenderer(
"<div> </div>",
"/D l&",
@ -55,7 +55,7 @@ const _write$forBody = _$.closure(
),
),
_for = _$.loopOf(2, _forBody),
_items_effect = _$.effect("e", (_scope) =>
_items_effect = _$.effect("b2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 1519 (min) 547 (brotli)
const _expr_name_write_effect = _$.effect("k", (_scope) => {
// size: 1528 (min) 542 (brotli)
const _expr_name_write_effect = _$.effect("a0", (_scope) => {
const { 3: name, 4: write } = _scope;
write(`${name} mounted`),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -19,7 +19,7 @@ const _expr_name_write_effect = _$.effect("k", (_scope) => {
() => _expr_name_write,
);
_$.register(
"c",
"b0",
(_scope) =>
function (msg) {
_scope[3].innerHTML += "\n" + msg;
@ -35,7 +35,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Inner");
},
_ifBody3 = _$.register(
"d",
"b1",
_$.createRenderer("<p> </p>", "/D l&", _setup$ifBody3, () => [
_write$ifBody3,
]),
@ -48,7 +48,7 @@ const _write$ifBody3 = _$.dynamicClosure(
() => _$.inChild(0, _write_),
),
_showInner$ifBody = _$.registerSubscriber(
"e",
"b2",
_$.dynamicClosure(
7,
(_scope, showInner) => _if$ifBody(_scope, showInner ? _ifBody3 : null),
@ -60,7 +60,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Middle");
},
_ifBody2 = _$.register(
"f",
"b3",
_$.createRenderer(
"<div><p> </p><!></div>",
"D/D l&%",
@ -85,7 +85,7 @@ const _write$ifBody3 = _$.dynamicClosure(
_scope[0], _name_(_scope[0], "Outer");
},
_ifBody = _$.register(
"g",
"b4",
_$.createRenderer(
"<div><p> </p><!></div>",
"D/D l&%",
@ -94,7 +94,7 @@ const _write$ifBody3 = _$.dynamicClosure(
),
),
_if = _$.conditional(4, 0),
_showInner_effect = _$.effect("h", (_scope) =>
_showInner_effect = _$.effect("b5", (_scope) =>
_$.on(
_scope[2],
"click",
@ -111,7 +111,7 @@ const _write$ifBody3 = _$.dynamicClosure(
(_scope, showInner) => _showInner_effect(_scope),
() => _$.dynamicSubscribers(7),
),
_showMiddle_effect = _$.effect("i", (_scope) =>
_showMiddle_effect = _$.effect("b6", (_scope) =>
_$.on(
_scope[1],
"click",
@ -128,7 +128,7 @@ const _write$ifBody3 = _$.dynamicClosure(
(_scope, showMiddle) => _showMiddle_effect(_scope),
() => _$.inConditionalScope(_showMiddle$ifBody, 4),
),
_showOuter_effect = _$.effect("j", (_scope) =>
_showOuter_effect = _$.effect("b7", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 381 (min) 223 (brotli)
const _setup$ifBody_effect = _$.effect("b", (_scope) => {
// size: 384 (min) 224 (brotli)
const _setup$ifBody_effect = _$.effect("a0", (_scope) => {
(_scope._[1].innerHTML += "\nmounted"),
(_$.getAbortSignal(_scope, 0).onabort = () => {
_scope._[1].innerHTML += "\ndestroyed";
@ -9,11 +9,11 @@ const _setup$ifBody_effect = _$.effect("b", (_scope) => {
_$.resetAbortSignal(_scope, 0), _setup$ifBody_effect(_scope);
},
_ifBody = _$.register(
"c",
"a1",
_$.createRenderer("<div>child</div>", "", _setup$ifBody),
),
_if = _$.conditional(2, 0),
_show_effect = _$.effect("d", (_scope) =>
_show_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 509 (min) 277 (brotli)
const _input__effect = _$.effect("f", (_scope) => {
// size: 513 (min) 285 (brotli)
const _input__effect = _$.effect("a0", (_scope) => {
const { 1: input } = _scope;
input.write("mounted"),
(_$.getAbortSignal(_scope, 0).onabort = ((_scope) => {
@ -13,7 +13,7 @@ const _input__effect = _$.effect("f", (_scope) => {
_$.resetAbortSignal(_scope, 0), _input__effect(_scope);
}),
_write = _$.register(
"c",
"b0",
(_scope) =>
function (state) {
_scope._[1].innerHTML = state;
@ -23,11 +23,11 @@ const _input__effect = _$.effect("f", (_scope) => {
_scope[0], _input_(_scope[0], { write: _write(_scope) });
},
_ifBody = _$.register(
"d",
"b1",
_$.createRenderer("<div>child</div>", "/b&", _setup$ifBody),
),
_if = _$.conditional(2, 0),
_show_effect = _$.effect("e", (_scope) =>
_show_effect = _$.effect("b2", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,10 +1,10 @@
// size: 243 (min) 167 (brotli)
// size: 244 (min) 161 (brotli)
const _expr_value_dummy = _$.intersection(2, (_scope) => {
const { 3: value, 4: dummy } = _scope;
_$.data(_scope[0], value);
}),
_value_ = _$.value(3, 0, () => _expr_value_dummy),
_count_effect = _$.effect("c", (_scope) =>
_count_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,9 +1,9 @@
// size: 297 (min) 183 (brotli)
// size: 300 (min) 185 (brotli)
const _expr_input_count = _$.intersection(2, (_scope) => {
const { 3: input, 4: count } = _scope;
_$.data(_scope[1], input.format(count));
}),
_count_effect = _$.effect("e", (_scope) =>
_count_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -20,8 +20,8 @@ const _expr_input_count = _$.intersection(2, (_scope) => {
(_scope, count) => _count_effect(_scope),
() => _expr_input_count,
);
_$.register("d", function (n) {
_$.register("b1", function (n) {
return "$" + n.toFixed(2);
}),
_$.register("c", (n) => "$" + n.toFixed(2)),
_$.register("b0", (n) => "$" + n.toFixed(2)),
init();

View File

@ -1,10 +1,10 @@
// size: 265 (min) 187 (brotli)
const _input__effect = _$.effect("d", (_scope) => _$.attrsEvents(_scope, 0)),
// size: 267 (min) 173 (brotli)
const _input__effect = _$.effect("a0", (_scope) => _$.attrsEvents(_scope, 0)),
_input_ = _$.value(2, (_scope, input) => {
_$.attrs(_scope, 0, { type: "checkbox", ...input }), _input__effect(_scope);
}),
_checkedChange = _$.register(
"c",
"b0",
(_scope) =>
function (_new_checked) {
_checked(_scope, _new_checked);

View File

@ -1,20 +1,20 @@
// size: 487 (min) 153 (brotli)
// size: 491 (min) 154 (brotli)
const _checkedValueChange = _$.register(
"b",
"a0",
(_scope) =>
function (_new_checkedValue) {
_checkedValue(_scope, _new_checkedValue);
},
),
_checkedValueChange2 = _$.register(
"c",
"a1",
(_scope) =>
function (_new_checkedValue2) {
_checkedValue(_scope, _new_checkedValue2);
},
),
_checkedValueChange3 = _$.register(
"c",
"a1",
(_scope) =>
function (_new_checkedValue3) {
_checkedValue(_scope, _new_checkedValue3);
@ -44,7 +44,7 @@ const _checkedValueChange = _$.register(
),
_$.data(_scope[3], checkedValue);
});
_$.effect("d", (_scope) => {
_$.effect("a2", (_scope) => {
_$.controllable_input_checkedValue_effect(_scope, 0),
_$.controllable_input_checkedValue_effect(_scope, 1),
_$.controllable_input_checkedValue_effect(_scope, 2);

View File

@ -1,24 +1,24 @@
// size: 530 (min) 221 (brotli)
const _input__effect = _$.effect("e", (_scope) => _$.attrsEvents(_scope, 0)),
// size: 534 (min) 214 (brotli)
const _input__effect = _$.effect("a0", (_scope) => _$.attrsEvents(_scope, 0)),
_input_ = _$.value(2, (_scope, input) => {
_$.attrs(_scope, 0, { type: "checkbox", ...input }), _input__effect(_scope);
}),
_checkedValueChange = _$.register(
"c",
"b0",
(_scope) =>
function (_new_checkedValue) {
_checkedValue(_scope, _new_checkedValue);
},
),
_checkedValueChange2 = _$.register(
"d",
"b1",
(_scope) =>
function (_new_checkedValue2) {
_checkedValue(_scope, _new_checkedValue2);
},
),
_checkedValueChange3 = _$.register(
"d",
"b1",
(_scope) =>
function (_new_checkedValue3) {
_checkedValue(_scope, _new_checkedValue3);

View File

@ -1,20 +1,20 @@
// size: 487 (min) 153 (brotli)
// size: 491 (min) 154 (brotli)
const _checkedValueChange = _$.register(
"b",
"a0",
(_scope) =>
function (_new_checkedValue) {
_checkedValue(_scope, _new_checkedValue);
},
),
_checkedValueChange2 = _$.register(
"c",
"a1",
(_scope) =>
function (_new_checkedValue2) {
_checkedValue(_scope, _new_checkedValue2);
},
),
_checkedValueChange3 = _$.register(
"c",
"a1",
(_scope) =>
function (_new_checkedValue3) {
_checkedValue(_scope, _new_checkedValue3);
@ -44,7 +44,7 @@ const _checkedValueChange = _$.register(
),
_$.data(_scope[3], checkedValue);
});
_$.effect("d", (_scope) => {
_$.effect("a2", (_scope) => {
_$.controllable_input_checkedValue_effect(_scope, 0),
_$.controllable_input_checkedValue_effect(_scope, 1),
_$.controllable_input_checkedValue_effect(_scope, 2);

View File

@ -1,6 +1,6 @@
// size: 201 (min) 123 (brotli)
// size: 203 (min) 138 (brotli)
const _checkedChange = _$.register(
"b",
"a0",
(_scope) =>
function (_new_checked) {
_checked(_scope, _new_checked);
@ -10,5 +10,5 @@ const _checkedChange = _$.register(
_$.controllable_input_checked(_scope, 0, checked, _checkedChange(_scope)),
_$.data(_scope[1], String(checked));
});
_$.effect("c", (_scope) => _$.controllable_input_checked_effect(_scope, 0)),
_$.effect("a1", (_scope) => _$.controllable_input_checked_effect(_scope, 0)),
init();

View File

@ -1,6 +1,6 @@
// size: 189 (min) 125 (brotli)
// size: 191 (min) 134 (brotli)
const _valueChange = _$.register(
"b",
"a0",
(_scope) =>
function (_new_value) {
_value(_scope, _new_value);
@ -10,5 +10,5 @@ const _valueChange = _$.register(
_$.controllable_input_value(_scope, 0, value, _valueChange(_scope)),
_$.data(_scope[1], value);
});
_$.effect("c", (_scope) => _$.controllable_input_value_effect(_scope, 0)),
_$.effect("a1", (_scope) => _$.controllable_input_value_effect(_scope, 0)),
init();

View File

@ -1,5 +1,5 @@
// size: 312 (min) 156 (brotli)
const _setup$tagSelectBody_effect = _$.effect("b", (_scope) => {
// size: 314 (min) 165 (brotli)
const _setup$tagSelectBody_effect = _$.effect("a0", (_scope) => {
_$.attrsEvents(_scope, 0),
_$.attrsEvents(_scope, 1),
_$.attrsEvents(_scope, 2);
@ -11,7 +11,7 @@ const _setup$tagSelectBody_effect = _$.effect("b", (_scope) => {
_setup$tagSelectBody_effect(_scope);
},
_tagSelectBody = _$.register(
"c",
"a1",
_$.createRendererWithOwner(
"<option>A</option><option>B</option><option>C</option>",
" b b ",

View File

@ -1,6 +1,6 @@
// size: 191 (min) 120 (brotli)
// size: 193 (min) 125 (brotli)
const _valueChange = _$.register(
"b",
"a0",
(_scope) =>
function (v) {
_value(_scope, v);
@ -10,5 +10,5 @@ const _valueChange = _$.register(
_$.controllable_select_value(_scope, 0, value, _valueChange(_scope)),
_$.data(_scope[1], value);
});
_$.effect("c", (_scope) => _$.controllable_select_value_effect(_scope, 0)),
_$.effect("a1", (_scope) => _$.controllable_select_value_effect(_scope, 0)),
init();

View File

@ -1,6 +1,6 @@
// size: 195 (min) 118 (brotli)
// size: 197 (min) 119 (brotli)
const _valueChange = _$.register(
"b",
"a0",
(_scope) =>
function (_new_value) {
_value(_scope, _new_value);
@ -10,5 +10,5 @@ const _valueChange = _$.register(
_$.controllable_textarea_value(_scope, 0, value, _valueChange(_scope)),
_$.data(_scope[1], value);
});
_$.effect("c", (_scope) => _$.controllable_textarea_value_effect(_scope, 0)),
_$.effect("a1", (_scope) => _$.controllable_textarea_value_effect(_scope, 0)),
init();

View File

@ -1,4 +1,4 @@
// size: 263 (min) 162 (brotli)
// size: 264 (min) 148 (brotli)
const _expr_a_b = _$.intersection(2, (_scope) => {
const { 5: a, 6: b } = _scope;
_$.data(_scope[4], a + b);
@ -13,7 +13,7 @@ const _expr_a_b = _$.intersection(2, (_scope) => {
(_scope, a) => _$.data(_scope[1], a),
() => _expr_a_b,
);
_$.effect("b", (_scope) => {
_$.effect("a0", (_scope) => {
_$.on(_scope[0], "click", function () {
_a(_scope, 10);
}),

View File

@ -1,9 +1,9 @@
// size: 143 (min) 108 (brotli)
// size: 144 (min) 123 (brotli)
const _n$forBody = _$.value(2, (_scope, n) => _$.data(_scope[0], n)),
_params_2$forBody = _$.value(1, (_scope, _params_2) =>
_n$forBody(_scope, _params_2[0]),
);
_$.register(
"b",
"a0",
_$.createRenderer("<!>, ", "%", void 0, void 0, () => _params_2$forBody),
);

View File

@ -1,10 +1,10 @@
// size: 352 (min) 165 (brotli)
// size: 354 (min) 156 (brotli)
const _key$forBody2 = _$.value(2, (_scope, key) => _$.data(_scope[0], key)),
_params_3$forBody = _$.value(1, (_scope, _params_3) =>
_key$forBody2(_scope, _params_3[0]),
);
_$.register(
"b",
"a0",
_$.createRenderer("<p> </p>", "D ", void 0, void 0, () => _params_3$forBody),
);
const _text$forBody = _$.value(4, (_scope, text) => _$.data(_scope[1], text)),
@ -13,7 +13,7 @@ const _text$forBody = _$.value(4, (_scope, text) => _$.data(_scope[1], text)),
_key$forBody(_scope, _params_2[0]), _text$forBody(_scope, _params_2[1]);
});
_$.register(
"c",
"a1",
_$.createRenderer(
"<p><!>: <!></p>",
"D%c%",

View File

@ -1,4 +1,4 @@
// size: 599 (min) 290 (brotli)
// size: 601 (min) 301 (brotli)
const _inputRenderBody_input = _$.dynamicTagAttrs(3, void 0, 1),
_expr_Text_x_y = _$.intersection(
3,
@ -8,7 +8,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(3, void 0, 1),
},
() => _inputRenderBody_input,
),
_expr_x_y_effect = _$.effect("d", (_scope) =>
_expr_x_y_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -44,7 +44,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(3, void 0, 1),
_count2$customTagBody(_scope, _params_2[1]);
});
_$.register(
"c",
"b0",
_$.createRendererWithOwner(
"<div>Counts: <!>,<!></div>",
"Db%c%",

View File

@ -1,4 +1,4 @@
// size: 521 (min) 310 (brotli)
// size: 523 (min) 296 (brotli)
const _inputRenderBody_input = _$.dynamicTagAttrs(2),
_expr_Text_input_x = _$.intersection(
3,
@ -8,7 +8,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(2),
},
() => _inputRenderBody_input,
),
_x_effect = _$.effect("d", (_scope) =>
_x_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -39,7 +39,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(2),
_pattern_$customTagBody(_scope, _params_2[0]),
);
_$.register(
"c",
"b0",
_$.createRendererWithOwner(
"<div>Count (<!>): <!></div>",
"Db%c%",

View File

@ -1,4 +1,4 @@
// size: 401 (min) 248 (brotli)
// size: 403 (min) 248 (brotli)
const _inputRenderBody_input = _$.dynamicTagAttrs(2),
_expr_Text_x = _$.intersection(
2,
@ -8,7 +8,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(2),
},
() => _inputRenderBody_input,
),
_x_effect = _$.effect("d", (_scope) =>
_x_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -34,7 +34,7 @@ const _inputRenderBody_input = _$.dynamicTagAttrs(2),
_count$customTagBody(_scope, _params_2[0]),
);
_$.register(
"c",
"b0",
_$.createRendererWithOwner(
"<div>Count: <!></div>",
"Db%",

View File

@ -1,3 +1,3 @@
// size: 94 (min) 72 (brotli)
// size: 95 (min) 73 (brotli)
_$.dynamicTagAttrs(1),
_$.register("c", _$.createRendererWithOwner("This is the body content", ""));
_$.register("b0", _$.createRendererWithOwner("This is the body content", ""));

View File

@ -1,12 +1,12 @@
// size: 347 (min) 183 (brotli)
// size: 351 (min) 182 (brotli)
_$.register(
"c",
"a0",
(_scope) =>
function (_new_x) {
_x(_scope, _new_x);
},
);
const _x_effect = _$.effect("f", (_scope) =>
const _x_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",
@ -25,8 +25,8 @@ const _x_effect = _$.effect("f", (_scope) =>
},
() => _$.tagVarSignal,
);
_$.registerBoundSignal("d", (_scope, count) => {}),
_$.effect("e", (_scope) =>
_$.registerBoundSignal("b0", (_scope, count) => {}),
_$.effect("b1", (_scope) =>
_$.on(_scope[1], "click", function () {
_$.tagVarSignalChange(_scope[0], 0);
}),

View File

@ -1,5 +1,5 @@
// size: 62 (min) 66 (brotli)
// size: 63 (min) 67 (brotli)
_$.registerBoundSignal(
"c",
"b0",
_$.value(2, (_scope, data) => _$.data(_scope[1], data)),
);

View File

@ -1,5 +1,5 @@
// size: 62 (min) 66 (brotli)
// size: 63 (min) 67 (brotli)
_$.registerBoundSignal(
"c",
"b0",
_$.value(2, (_scope, data) => _$.data(_scope[1], data)),
);

View File

@ -1,5 +1,5 @@
// size: 248 (min) 153 (brotli)
const _x_effect = _$.effect("d", (_scope) =>
// size: 250 (min) 155 (brotli)
const _x_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -19,7 +19,7 @@ const _x_effect = _$.effect("d", (_scope) =>
() => _$.tagVarSignal,
);
_$.registerBoundSignal(
"c",
"b0",
_$.value(2, (_scope, data) => _$.data(_scope[1], data)),
),
init();

View File

@ -1,4 +1,4 @@
// size: 478 (min) 275 (brotli)
// size: 480 (min) 275 (brotli)
const _inputThingRenderBody_input = _$.dynamicTagAttrs(1),
_dynamicTagName = _$.conditional(
1,
@ -14,7 +14,7 @@ const _inputThingRenderBody_input = _$.dynamicTagAttrs(1),
() => _dynamicTagName,
),
_defineBody = _$.register(
"c",
"b0",
_$.createRendererWithOwner("<span>The thing</span>", ""),
),
_myThing = _$.value(
@ -22,7 +22,7 @@ const _inputThingRenderBody_input = _$.dynamicTagAttrs(1),
(_scope, myThing) => _input_(_scope[0], { thing: myThing }),
() => _$.inChild(0, _input_),
),
_selected_effect = _$.effect("d", (_scope) =>
_selected_effect = _$.effect("b1", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,8 +1,8 @@
// size: 219 (min) 152 (brotli)
// size: 220 (min) 154 (brotli)
const _myObj = _$.value(4, (_scope, myObj) =>
_$.data(_scope[0], JSON.stringify(myObj)),
),
_x_effect = _$.effect("b", (_scope) =>
_x_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,5 +1,5 @@
// size: 415 (min) 248 (brotli)
const _y$defineBody_effect = _$.effect("b", (_scope) =>
// size: 417 (min) 250 (brotli)
const _y$defineBody_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[2],
"click",
@ -25,7 +25,7 @@ const _y$defineBody_effect = _$.effect("b", (_scope) =>
_y$defineBody(_scope, 1);
};
_$.register(
"c",
"a1",
_$.createRendererWithOwner(
"<div>Hello <!> <!></div><button> </button>",
"Db%c%l D ",

View File

@ -1,9 +1,9 @@
// size: 193 (min) 115 (brotli)
_$.register("c", function () {
// size: 196 (min) 119 (brotli)
_$.register("a1", function () {
log.static += "rendered";
}),
_$.register(
"b",
"a0",
(_scope) =>
function () {
log.const += "rendered";
@ -12,4 +12,4 @@ _$.register("c", function () {
const _logOutput = _$.state(3, (_scope, logOutput) =>
_$.data(_scope[0], logOutput),
);
_$.effect("d", (_scope) => _logOutput(_scope, JSON.stringify(log))), init();
_$.effect("a2", (_scope) => _logOutput(_scope, JSON.stringify(log))), init();

View File

@ -1,21 +1,21 @@
// size: 396 (min) 216 (brotli)
// size: 399 (min) 215 (brotli)
const _setup$ifBody2 = (_scope) => {
_$.data(_scope[0], _scope.$global.x);
},
_ifBody2 = _$.register(
"b",
"a0",
_$.createRenderer("<span class=hidden> </span>", "D ", _setup$ifBody2),
),
_setup$ifBody = (_scope) => {
_$.data(_scope[0], _scope.$global.x);
},
_ifBody = _$.register(
"c",
"a1",
_$.createRenderer("<span> </span>", "D ", _setup$ifBody),
),
_if2 = _$.conditional(1, 0),
_if = _$.conditional(0, 0),
_show_effect = _$.effect("d", (_scope) =>
_show_effect = _$.effect("a2", (_scope) =>
_$.on(
_scope[2],
"click",

View File

@ -1,7 +1,7 @@
// size: 441 (min) 217 (brotli)
// size: 445 (min) 212 (brotli)
_$.dynamicTagAttrs(0);
_$.registerSubscriber(
"c",
"b0",
_$.dynamicClosure(
4,
(_scope, c) => _$.data(_scope[2], c),
@ -9,7 +9,7 @@ _$.registerSubscriber(
),
);
const _c$customTagBody = _$.registerSubscriber(
"d",
"b1",
_$.dynamicClosure(4, (_scope, c) => _$.data(_scope[2], c)),
),
_b$customTagBody = _$.dynamicClosure(3, (_scope, b) => _$.data(_scope[1], b)),
@ -17,7 +17,7 @@ const _c$customTagBody = _$.registerSubscriber(
_$.data(_scope[0], 1);
};
_$.register(
"e",
"b2",
_$.createRendererWithOwner(
"<!> <!> <!>",
"%c%c%",
@ -26,7 +26,7 @@ _$.register(
),
);
const _c = _$.state(4, 0, () => _$.dynamicSubscribers(4));
_$.effect("f", (_scope) =>
_$.effect("b3", (_scope) =>
_$.on(_scope[0], "click", function () {
_c(_scope, 4);
}),

View File

@ -1,5 +1,5 @@
// size: 159 (min) 121 (brotli)
const _clickCount_effect = _$.effect("b", (_scope) => {
// size: 160 (min) 122 (brotli)
const _clickCount_effect = _$.effect("a0", (_scope) => {
const { 2: clickCount } = _scope;
_$.on(
_scope[0],

View File

@ -1,6 +1,6 @@
// size: 359 (min) 221 (brotli)
// size: 361 (min) 228 (brotli)
const _tagNameBody = _$.register(
"b",
"a0",
_$.createRendererWithOwner("body content", ""),
),
_tagName_input = _$.dynamicTagAttrs(0, _tagNameBody),
@ -13,7 +13,7 @@ const _tagNameBody = _$.register(
() => _tagName_input,
),
_dynamicTagName = _$.conditional(0, 0, () => _expr_Text_className),
_tagName_effect = _$.effect("c", (_scope) =>
_tagName_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,4 +1,4 @@
// size: 305 (min) 182 (brotli)
// size: 307 (min) 189 (brotli)
const _tags0_input = _$.dynamicTagAttrs(2),
_expr_Text_x = _$.intersection(
2,
@ -9,10 +9,10 @@ const _tags0_input = _$.dynamicTagAttrs(2),
() => _tags0_input,
);
_$.registerBoundSignal(
"b",
"b0",
_$.value(5, (_scope, y) => _$.data(_scope[3], y)),
);
const _x_effect = _$.effect("c", (_scope) =>
const _x_effect = _$.effect("b1", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,4 +1,4 @@
// size: 254 (min) 176 (brotli)
// size: 255 (min) 174 (brotli)
const _tags0_input = _$.dynamicTagAttrs(2, void 0, 1),
_expr_Text_x = _$.intersection(
2,
@ -8,7 +8,7 @@ const _tags0_input = _$.dynamicTagAttrs(2, void 0, 1),
},
() => _tags0_input,
),
_x_effect = _$.effect("b", (_scope) =>
_x_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,5 +1,5 @@
// size: 162 (min) 143 (brotli)
const _className_effect = _$.effect("b", (_scope) =>
// size: 163 (min) 125 (brotli)
const _className_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,10 +1,10 @@
// size: 429 (min) 280 (brotli)
// size: 430 (min) 258 (brotli)
const _setup_ = () => {},
_id_ = _$.value(3, (_scope, id) => _$.data(_scope[0], id)),
_input_ = _$.value(2, (_scope, input) => _id_(_scope, input.id)),
_params__ = _$.value(1, (_scope, _params_) => _input_(_scope, _params_[0]));
var child = _$.createTemplate(
"c",
"a",
"<div>Id is <!></div>",
"Db%l",
_setup_,
@ -17,7 +17,7 @@ const _tagName_input = _$.dynamicTagAttrs(1),
(_scope) => _tagName_input(_scope, () => ({ id: "dynamic" })),
() => _tagName_input,
),
_tagName_effect = _$.effect("b", (_scope) =>
_tagName_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,4 +1,4 @@
// size: 674 (min) 290 (brotli)
// size: 675 (min) 293 (brotli)
const _setup_$1 = () => {},
_value_$1 = _$.value(3, (_scope, value) => _$.data(_scope[0], value)),
_input_$1 = _$.value(2, (_scope, input) => _value_$1(_scope, input.value)),
@ -6,7 +6,7 @@ const _setup_$1 = () => {},
_input_$1(_scope, _params_[0]),
);
var child1 = _$.createTemplate(
"c",
"a",
"<div>Child 1 has <!></div>",
"Db%l",
_setup_$1,
@ -18,7 +18,7 @@ const _setup_ = () => {},
_input_ = _$.value(2, (_scope, input) => _value_(_scope, input.value)),
_params__ = _$.value(1, (_scope, _params_) => _input_(_scope, _params_[0]));
var child2 = _$.createTemplate(
"d",
"b",
"<div>Child 2 has <!></div>",
"Db%l",
_setup_,
@ -35,7 +35,7 @@ const _tagName_input = _$.dynamicTagAttrs(0),
() => _tagName_input,
),
_dynamicTagName = _$.conditional(0, 0, () => _expr_Text_val),
_tagName_effect = _$.effect("b", (_scope) =>
_tagName_effect = _$.effect("c0", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,4 +1,4 @@
// size: 237 (min) 160 (brotli)
// size: 238 (min) 161 (brotli)
const _tags0_input = _$.dynamicTagAttrs(2),
_expr_Text_x = _$.intersection(
2,
@ -8,7 +8,7 @@ const _tags0_input = _$.dynamicTagAttrs(2),
},
() => _tags0_input,
),
_x_effect = _$.effect("b", (_scope) =>
_x_effect = _$.effect("b0", (_scope) =>
_$.on(
_scope[0],
"click",

View File

@ -1,12 +1,15 @@
// size: 296 (min) 203 (brotli)
const _xBody = _$.register("b", _$.createRendererWithOwner("Body Content", "")),
// size: 298 (min) 210 (brotli)
const _xBody = _$.register(
"a0",
_$.createRendererWithOwner("Body Content", ""),
),
_x_input = _$.dynamicTagAttrs(0, _xBody),
_dynamicTagName = _$.conditional(
0,
(_scope) => _x_input(_scope, () => ({})),
() => _x_input,
),
_x_effect = _$.effect("c", (_scope) =>
_x_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,12 +1,12 @@
// size: 527 (min) 271 (brotli)
// size: 532 (min) 295 (brotli)
const _valueChange = _$.register(
"f",
"a0",
(_scope) =>
function (_new_x) {
_x(_scope, _new_x);
},
),
_x_effect = _$.effect("g", (_scope) =>
_x_effect = _$.effect("a1", (_scope) =>
_$.on(
_scope[0],
"click",
@ -29,17 +29,17 @@ function _setup_(_scope) {
_x(_scope, 1), _$.setTagVarChange(_scope, _valueChange(_scope));
}
var Counter = _$.createTemplate(
"e",
"a",
"<button class=inc> </button>",
" D l",
_setup_,
);
_$.register("b", function () {
_$.register("b0", function () {
return Counter;
}),
_$.dynamicTagAttrs(0),
_$.registerBoundSignal("c", (_scope, count) => {}),
_$.effect("d", (_scope) =>
_$.registerBoundSignal("b1", (_scope, count) => {}),
_$.effect("b2", (_scope) =>
_$.on(_scope[1], "click", function () {
_$.tagVarSignalChange(_scope["0!"], 0);
}),

View File

@ -1,5 +1,5 @@
// size: 499 (min) 289 (brotli)
const _count_effect = _$.effect("e", (_scope) =>
// size: 502 (min) 268 (brotli)
const _count_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -20,7 +20,7 @@ const _setup$tagNameBody = (_scope) => {
})(_scope[0]);
},
_tagNameBody = _$.register(
"c",
"b0",
_$.createRendererWithOwner(
"<button id=count> </button>",
"/ D l&",
@ -33,7 +33,7 @@ const _setup$tagNameBody = (_scope) => {
(_scope) => _tagName_input(_scope, () => ({})),
() => _tagName_input,
),
_tagName_effect = _$.effect("d", (_scope) =>
_tagName_effect = _$.effect("b1", (_scope) =>
_$.on(
_scope[1],
"click",

View File

@ -1,5 +1,5 @@
// size: 191 (min) 118 (brotli)
const _clickCount_effect = _$.effect("b", (_scope) => {
// size: 192 (min) 120 (brotli)
const _clickCount_effect = _$.effect("a0", (_scope) => {
const { 1: clickCount } = _scope;
(document.getElementById("button").textContent = clickCount),
_$.on(

View File

@ -1,5 +1,5 @@
// size: 119 (min) 93 (brotli)
_$.effect("b", (_scope) => {
// size: 120 (min) 83 (brotli)
_$.effect("a0", (_scope) => {
((_scope) => {
const { 0: promise } = _scope;
return async () => {

View File

@ -1,5 +1,5 @@
// size: 83 (min) 63 (brotli)
_$.effect("b", (_scope) => {
// size: 84 (min) 66 (brotli)
_$.effect("a0", (_scope) => {
const { 0: x } = _scope;
document.getElementById("ref").textContent = x;
}),

View File

@ -1,4 +1,4 @@
// size: 542 (min) 263 (brotli)
// size: 544 (min) 268 (brotli)
const _description$forBody = _$.value(5, (_scope, description) =>
_$.data(_scope[1], description),
),
@ -11,7 +11,7 @@ const _description$forBody = _$.value(5, (_scope, description) =>
_pattern_$forBody(_scope, _params_2[0]),
),
_forBody = _$.register(
"b",
"a0",
_$.createRenderer(
"<div><!>: <!></div>",
"D%c%",
@ -21,7 +21,7 @@ const _description$forBody = _$.value(5, (_scope, description) =>
),
),
_for = _$.loopOf(0, _forBody),
_items_effect = _$.effect("c", (_scope) => {
_items_effect = _$.effect("a1", (_scope) => {
_$.on(
_scope[1],
"click",

View File

@ -1,9 +1,9 @@
// size: 390 (min) 233 (brotli)
// size: 392 (min) 229 (brotli)
const _i$forBody = _$.value(3, (_scope, i) => _$.data(_scope[1], i)),
_params_2$forBody = _$.value(2, (_scope, _params_2) =>
_i$forBody(_scope, _params_2[0]),
),
_num$forBody_effect = _$.effect("b", (_scope) =>
_num$forBody_effect = _$.effect("a0", (_scope) =>
_$.on(
_scope[0],
"click",
@ -19,7 +19,7 @@ const _i$forBody = _$.value(3, (_scope, i) => _$.data(_scope[1], i)),
),
_num$forBody = _$.closure(1, (_scope, num) => _num$forBody_effect(_scope)),
_forBody = _$.register(
"c",
"a1",
_$.createRenderer(
"<button> </button>",
" D ",

Some files were not shown because too many files have changed in this diff Show More