mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
refactor: convert closures to use controlflow sorted queue
This commit is contained in:
parent
f1b51ba936
commit
96dd7b212c
46
.sizes.json
46
.sizes.json
@ -7,23 +7,23 @@
|
||||
{
|
||||
"name": "*",
|
||||
"total": {
|
||||
"min": 18438,
|
||||
"brotli": 6702
|
||||
"min": 17930,
|
||||
"brotli": 6545
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counter",
|
||||
"user": {
|
||||
"min": 189,
|
||||
"brotli": 143
|
||||
"brotli": 144
|
||||
},
|
||||
"runtime": {
|
||||
"min": 4081,
|
||||
"brotli": 1737
|
||||
"min": 4152,
|
||||
"brotli": 1767
|
||||
},
|
||||
"total": {
|
||||
"min": 4270,
|
||||
"brotli": 1880
|
||||
"min": 4341,
|
||||
"brotli": 1911
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -33,42 +33,42 @@
|
||||
"brotli": 100
|
||||
},
|
||||
"runtime": {
|
||||
"min": 3419,
|
||||
"brotli": 1556
|
||||
"min": 3611,
|
||||
"brotli": 1631
|
||||
},
|
||||
"total": {
|
||||
"min": 3530,
|
||||
"brotli": 1656
|
||||
"min": 3722,
|
||||
"brotli": 1731
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "comments",
|
||||
"user": {
|
||||
"min": 1153,
|
||||
"brotli": 550
|
||||
"min": 1140,
|
||||
"brotli": 541
|
||||
},
|
||||
"runtime": {
|
||||
"min": 8085,
|
||||
"brotli": 3304
|
||||
"min": 7747,
|
||||
"brotli": 3155
|
||||
},
|
||||
"total": {
|
||||
"min": 9238,
|
||||
"brotli": 3854
|
||||
"min": 8887,
|
||||
"brotli": 3696
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "comments 💧",
|
||||
"user": {
|
||||
"min": 954,
|
||||
"brotli": 482
|
||||
"min": 948,
|
||||
"brotli": 478
|
||||
},
|
||||
"runtime": {
|
||||
"min": 9097,
|
||||
"brotli": 3718
|
||||
"min": 8759,
|
||||
"brotli": 3564
|
||||
},
|
||||
"total": {
|
||||
"min": 10051,
|
||||
"brotli": 4200
|
||||
"min": 9707,
|
||||
"brotli": 4042
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 1153 (min) 550 (brotli)
|
||||
// size: 1140 (min) 541 (brotli)
|
||||
const _expr_comment_comments_id$if_content = intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
@ -9,40 +9,33 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
},
|
||||
() => inChild(0, _input_$1),
|
||||
),
|
||||
_id$if_content = closure(
|
||||
10,
|
||||
_id$if_content = conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_comment_comments$if_content = closure(
|
||||
8,
|
||||
_comment_comments$if_content = conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_if_content = register(
|
||||
"a0",
|
||||
createRenderer(
|
||||
"<ul></ul>",
|
||||
"/ b&",
|
||||
(_scope) => {
|
||||
createRenderer("<ul></ul>", "/ b&", (_scope) => {
|
||||
_comment_comments$if_content._(_scope, _scope._[8]),
|
||||
_id$if_content._(_scope, _scope._[10]),
|
||||
_scope[0];
|
||||
},
|
||||
() => [_id$if_content, _comment_comments$if_content],
|
||||
),
|
||||
),
|
||||
_expr_input_path_i$for_content = intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
},
|
||||
() => _id$for_content,
|
||||
}),
|
||||
),
|
||||
_expr_input_path_i$for_content = intersection(2, (_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
}),
|
||||
_if$for_content = conditional(4),
|
||||
_open$for_content_effect = effect("a1", (_scope, { 11: open }) =>
|
||||
on(_scope[2], "click", function () {
|
||||
@ -54,21 +47,17 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
data(_scope[3], open ? "[-]" : "[+]"),
|
||||
_open$for_content_effect(_scope);
|
||||
}),
|
||||
_id$for_content = value(
|
||||
10,
|
||||
(_scope, id) => attr(_scope[0], "id", id),
|
||||
() => inConditionalScope(_id$if_content, 4),
|
||||
),
|
||||
_id$for_content = value(10, (_scope, id) => {
|
||||
attr(_scope[0], "id", id), _id$if_content(_scope, id);
|
||||
}),
|
||||
_i$for_content = value(9, 0, () => _expr_input_path_i$for_content),
|
||||
_comment_comments$for_content = value(
|
||||
8,
|
||||
(_scope, comment_comments) =>
|
||||
(_scope, comment_comments) => {
|
||||
_if$for_content(_scope, comment_comments ? _if_content : null),
|
||||
() =>
|
||||
intersections([
|
||||
_if$for_content,
|
||||
inConditionalScope(_comment_comments$if_content, 4),
|
||||
]),
|
||||
_comment_comments$if_content(_scope, comment_comments);
|
||||
},
|
||||
() => _if$for_content,
|
||||
),
|
||||
_comment_text$for_content = value(7, (_scope, comment_text) =>
|
||||
data(_scope[1], comment_text),
|
||||
@ -89,10 +78,9 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
},
|
||||
() => intersections([_comment$for_content, _i$for_content]),
|
||||
),
|
||||
_input_path$for_content = closure(
|
||||
4,
|
||||
_input_path$for_content = loopClosure(
|
||||
0,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_input_path_i$for_content,
|
||||
),
|
||||
_for = loopOf(
|
||||
@ -103,14 +91,16 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
"<li><span> </span><button> </button><!></li>",
|
||||
" E l D l%",
|
||||
(_scope) => {
|
||||
_open$for_content(_scope, !0);
|
||||
_input_path$for_content._(_scope, _scope._[4]),
|
||||
_open$for_content(_scope, !0);
|
||||
},
|
||||
() => [_input_path$for_content],
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
),
|
||||
),
|
||||
_input_path_ = value(4, 0, () => inLoopScope(_input_path$for_content, 0)),
|
||||
_input_path_ = value(4, (_scope, input_path) =>
|
||||
_input_path$for_content(_scope, input_path),
|
||||
),
|
||||
_input_comments_ = value(
|
||||
3,
|
||||
(_scope, input_comments) => _for(_scope, [input_comments]),
|
||||
@ -122,7 +112,7 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
_input_comments_(_scope, input.comments),
|
||||
_input_path_(_scope, input.path);
|
||||
},
|
||||
() => intersections([_input_comments_, _input_path_]),
|
||||
() => _input_comments_,
|
||||
),
|
||||
_input_ = value(
|
||||
2,
|
||||
@ -142,11 +132,4 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
function _setup_(_scope) {
|
||||
_scope[0];
|
||||
}
|
||||
createTemplate(
|
||||
"b",
|
||||
"<ul></ul>",
|
||||
"/ b&",
|
||||
_setup_,
|
||||
void 0,
|
||||
() => _params__,
|
||||
).mount();
|
||||
createTemplate("b", "<ul></ul>", "/ b&", _setup_, () => _params__).mount();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 954 (min) 482 (brotli)
|
||||
// size: 948 (min) 478 (brotli)
|
||||
const _expr_comment_comments_id$if_content = intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
@ -9,40 +9,33 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
},
|
||||
() => inChild(0, _input_),
|
||||
),
|
||||
_id$if_content = closure(
|
||||
10,
|
||||
_id$if_content = conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_comment_comments$if_content = closure(
|
||||
8,
|
||||
_comment_comments$if_content = conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_if_content = register(
|
||||
"a0",
|
||||
createRenderer(
|
||||
"<ul></ul>",
|
||||
"/ b&",
|
||||
(_scope) => {
|
||||
createRenderer("<ul></ul>", "/ b&", (_scope) => {
|
||||
_comment_comments$if_content._(_scope, _scope._[8]),
|
||||
_id$if_content._(_scope, _scope._[10]),
|
||||
_scope[0];
|
||||
},
|
||||
() => [_id$if_content, _comment_comments$if_content],
|
||||
),
|
||||
),
|
||||
_expr_input_path_i$for_content = intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
},
|
||||
() => _id$for_content,
|
||||
}),
|
||||
),
|
||||
_expr_input_path_i$for_content = intersection(2, (_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
}),
|
||||
_if$for_content = conditional(4),
|
||||
_open$for_content_effect = effect("a1", (_scope, { 11: open }) =>
|
||||
on(_scope[2], "click", function () {
|
||||
@ -54,21 +47,17 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
data(_scope[3], open ? "[-]" : "[+]"),
|
||||
_open$for_content_effect(_scope);
|
||||
}),
|
||||
_id$for_content = value(
|
||||
10,
|
||||
(_scope, id) => attr(_scope[0], "id", id),
|
||||
() => inConditionalScope(_id$if_content, 4),
|
||||
),
|
||||
_id$for_content = value(10, (_scope, id) => {
|
||||
attr(_scope[0], "id", id), _id$if_content(_scope, id);
|
||||
}),
|
||||
_i$for_content = value(9, 0, () => _expr_input_path_i$for_content),
|
||||
_comment_comments$for_content = value(
|
||||
8,
|
||||
(_scope, comment_comments) =>
|
||||
(_scope, comment_comments) => {
|
||||
_if$for_content(_scope, comment_comments ? _if_content : null),
|
||||
() =>
|
||||
intersections([
|
||||
_if$for_content,
|
||||
inConditionalScope(_comment_comments$if_content, 4),
|
||||
]),
|
||||
_comment_comments$if_content(_scope, comment_comments);
|
||||
},
|
||||
() => _if$for_content,
|
||||
),
|
||||
_comment_text$for_content = value(7, (_scope, comment_text) =>
|
||||
data(_scope[1], comment_text),
|
||||
@ -89,10 +78,9 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
},
|
||||
() => intersections([_comment$for_content, _i$for_content]),
|
||||
),
|
||||
_input_path$for_content = closure(
|
||||
4,
|
||||
_input_path$for_content = loopClosure(
|
||||
0,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_input_path_i$for_content,
|
||||
),
|
||||
_for = loopOf(
|
||||
@ -103,14 +91,16 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
"<li><span> </span><button> </button><!></li>",
|
||||
" E l D l%",
|
||||
(_scope) => {
|
||||
_open$for_content(_scope, !0);
|
||||
_input_path$for_content._(_scope, _scope._[4]),
|
||||
_open$for_content(_scope, !0);
|
||||
},
|
||||
() => [_input_path$for_content],
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
),
|
||||
),
|
||||
_input_path_ = value(4, 0, () => inLoopScope(_input_path$for_content, 0)),
|
||||
_input_path_ = value(4, (_scope, input_path) =>
|
||||
_input_path$for_content(_scope, input_path),
|
||||
),
|
||||
_input_comments_ = value(
|
||||
3,
|
||||
(_scope, input_comments) => _for(_scope, [input_comments]),
|
||||
@ -122,6 +112,6 @@ const _expr_comment_comments_id$if_content = intersection(
|
||||
_input_comments_(_scope, input.comments),
|
||||
_input_path_(_scope, input.path);
|
||||
},
|
||||
() => intersections([_input_comments_, _input_path_]),
|
||||
() => _input_comments_,
|
||||
);
|
||||
init();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 189 (min) 143 (brotli)
|
||||
// size: 189 (min) 144 (brotli)
|
||||
const _clickCount_effect = effect("a0", (_scope, { 2: clickCount }) =>
|
||||
on(_scope[0], "click", function () {
|
||||
_clickCount(_scope, clickCount + 1);
|
||||
|
||||
1168
.sizes/dom.js
1168
.sizes/dom.js
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"i","$forIn":"l","$forOf":"o","$forTo":"f","$isScheduled":"u","$port2":"a","$flushAndWaitFrame":"c","$triggerMacroTask":"s","$createScope":"d","$emptyScope":"h","$getEmptyScope":"g","$destroyScope":"p","$_destroyScope":"v","$onDestroy":"b","$removeAndDestroyScope":"m","$insertBefore":"y","$registeredValues":"k","$Render":"w","$isResuming":"C","$register":"A","$registerBoundSignal":"S","$init":"N","$registerSubscriber":"x","$nodeRef":"$","$MARK":"M","$CLEAN":"E","$DIRTY":"I","$state":"T","$value":"_","$accessorId":"O","$intersection":"B","$defaultGetOwnerScope":"V","$closure":"j","$dynamicClosure":"R","$childClosures":"q","$dynamicSubscribers":"D","$setTagVar":"P","$tagVarSignal":"W","$setTagVarChange":"L","$tagVarSignalChange":"z","$renderBodyClosures":"F","$tagIdsByGlobal":"U","$nextTagId":"G","$inChild":"J","$intersections":"X","$effect":"Z","$pendingSignals":"H","$pendingEffects":"K","$rendering":"Q","$queueEffect":"Y","$run":"ee","$prepareEffects":"te","$runEffects":"ne","$runSignals":"re","$resetAbortSignal":"ie","$getAbortSignal":"le","$stringifyClassObject":"oe","$NON_DIMENSIONAL":"fe","$stringifyStyleObject":"ue","$toDelimitedString":"ae","$isEventHandler":"ce","$getEventHandlerName":"se","$normalizeDynamicRenderer":"de","$elementHandlersByEvent":"he","$defaultDelegator":"ge","$on":"pe","$createDelegator":"ve","$handleDelegated":"be","$stripSpacesAndPunctuation":"me","$controllable_input_checked":"ye","$controllable_input_checked_effect":"ke","$controllable_input_checkedValue":"we","$controllable_input_checkedValue_effect":"Ce","$controllable_input_value":"Ae","$controllable_input_value_effect":"Se","$controllable_select_value":"Ne","$controllable_select_value_effect":"xe","$setSelectOptions":"$e","$controllable_detailsOrDialog_open":"Me","$controllable_detailsOrDialog_open_effect":"Ee","$inputType":"Ie","$setValueAndUpdateSelection":"Te","$setCheckboxValue":"_e","$delegateFormControl":"Oe","$formChangeHandlers":"Be","$syncControllable":"Ve","$onFormChange":"je","$onFormReset":"Re","$hasValueChanged":"qe","$hasCheckboxChanged":"De","$hasSelectChanged":"Pe","$hasFormElementChanged":"We","$normalizeStrProp":"Le","$normalizeBoolProp":"ze","$toValueProp":"Fe","$fallback":"Ue","$parser":"Ge","$parseHTML":"Je","$attr":"Xe","$setAttribute":"Ze","$classAttr":"He","$styleAttr":"Ke","$data":"Qe","$attrs":"Ye","$hasAttrAlias":"et","$partialAttrs":"tt","$attrsInternal":"nt","$attrsEvents":"rt","$html":"it","$props":"lt","$normalizeAttrValue":"ot","$lifecycle":"ft","$walker":"ut","$trimWalkString":"at","$walk":"ct","$walkInternal":"st","$createScopeWithRenderer":"dt","$createScopeWithTagNameOrRenderer":"ht","$initRenderer":"gt","$dynamicTagAttrs":"pt","$createRendererWithOwner":"vt","$createRenderer":"bt","$_clone":"mt","$conditional":"yt","$inConditionalScope":"kt","$conditionalOnlyChild":"wt","$setConditionalRendererOnlyChild":"Ct","$emptyMarkerMap":"At","$emptyMarkerArray":"St","$emptyMap":"Nt","$emptyArray":"xt","$loopOf":"$t","$loopIn":"Mt","$loopTo":"Et","$loop":"It","$inLoopScope":"Tt","$bySecondArg":"_t","$byFirstArg":"Ot","$isDifferentRenderer":"Bt","$classIdToScope":"Vt","$compat":"jt","$noop":"Rt","$createTemplate":"qt","$mount":"Dt","$parseHTMLOrSingleNode":"Wt","$marker":"Ft","$_clickCount_effect":"Qt","$_clickCount":"Yt","$_setup_":"zt","$_expr_comment_comments_id$ifBody":"ss","$_id$ifBody":"as","$_comment_comments$ifBody":"ts","$_ifBody":"ns","$_expr_input_path_i$forBody":"os","$_if$forBody":"cs","$_open$forBody_effect":"is","$_open$forBody":"ms","$_id$forBody":"ls","$_i$forBody":"us","$_comment_comments$forBody":"es","$_comment_text$forBody":"ds","$_comment$forBody":"rs","$_params_2$forBody":"bs","$_input_path$forBody":"ps","$_for":"hs","$_input_path_":"vs","$_input_comments_":"fs","$_input_$1":"js","$_input_":"ks","$_params__":"Ss","$noop2":"Pt","$textContent":"Lt","$normalizeString":"Ut","$contentClosures":"Gt","$_expr_comment_comments_id$if_content":"Zs","$_id$if_content":"$s","$_comment_comments$if_content":"_s","$_if_content":"gs","$_expr_input_path_i$for_content":"ws","$_if$for_content":"xs","$_open$for_content_effect":"Bs","$_open$for_content":"Ds","$_id$for_content":"Es","$_i$for_content":"Hs","$_comment_comments$for_content":"Xs","$_comment_text$for_content":"qs","$_comment$for_content":"ys","$_params_2$for_content":"zs","$_input_path$for_content":"As","$pendingSignal":"Ht","$scopeIsConnected":"Jt","$sortScopeByDOMPosition":"Xt","$ownerStartNode":"Zt"}}}
|
||||
{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"i","$forIn":"l","$forOf":"o","$forTo":"f","$isScheduled":"u","$port2":"a","$flushAndWaitFrame":"c","$triggerMacroTask":"s","$createScope":"d","$emptyScope":"h","$getEmptyScope":"g","$destroyScope":"p","$_destroyScope":"v","$onDestroy":"b","$removeAndDestroyScope":"m","$insertBefore":"y","$registeredValues":"k","$Render":"w","$isResuming":"C","$register":"A","$registerBoundSignal":"S","$init":"N","$registerSubscriber":"x","$nodeRef":"$","$MARK":"M","$CLEAN":"E","$DIRTY":"I","$state":"T","$value":"_","$accessorId":"O","$intersection":"B","$defaultGetOwnerScope":"V","$closure":"j","$dynamicClosure":"R","$childClosures":"q","$dynamicSubscribers":"D","$setTagVar":"P","$tagVarSignal":"W","$setTagVarChange":"L","$tagVarSignalChange":"z","$renderBodyClosures":"F","$tagIdsByGlobal":"U","$nextTagId":"G","$inChild":"J","$intersections":"X","$effect":"Z","$pendingSignals":"H","$pendingEffects":"K","$rendering":"Q","$queueEffect":"Y","$run":"ee","$prepareEffects":"te","$runEffects":"ne","$runSignals":"re","$resetAbortSignal":"ie","$getAbortSignal":"le","$stringifyClassObject":"oe","$NON_DIMENSIONAL":"fe","$stringifyStyleObject":"ue","$toDelimitedString":"ae","$isEventHandler":"ce","$getEventHandlerName":"se","$normalizeDynamicRenderer":"de","$elementHandlersByEvent":"he","$defaultDelegator":"ge","$on":"pe","$createDelegator":"ve","$handleDelegated":"be","$stripSpacesAndPunctuation":"me","$controllable_input_checked":"ye","$controllable_input_checked_effect":"ke","$controllable_input_checkedValue":"we","$controllable_input_checkedValue_effect":"Ce","$controllable_input_value":"Ae","$controllable_input_value_effect":"Se","$controllable_select_value":"Ne","$controllable_select_value_effect":"xe","$setSelectOptions":"$e","$controllable_detailsOrDialog_open":"Me","$controllable_detailsOrDialog_open_effect":"Ee","$inputType":"Ie","$setValueAndUpdateSelection":"Te","$setCheckboxValue":"_e","$delegateFormControl":"Oe","$formChangeHandlers":"Be","$syncControllable":"Ve","$onFormChange":"je","$onFormReset":"Re","$hasValueChanged":"qe","$hasCheckboxChanged":"De","$hasSelectChanged":"Pe","$hasFormElementChanged":"We","$normalizeStrProp":"Le","$normalizeBoolProp":"ze","$toValueProp":"Fe","$fallback":"Ue","$parser":"Ge","$parseHTML":"Je","$attr":"Xe","$setAttribute":"Ze","$classAttr":"He","$styleAttr":"Ke","$data":"Qe","$attrs":"Ye","$hasAttrAlias":"et","$partialAttrs":"tt","$attrsInternal":"nt","$attrsEvents":"rt","$html":"it","$props":"lt","$normalizeAttrValue":"ot","$lifecycle":"ft","$walker":"ut","$trimWalkString":"at","$walk":"ct","$walkInternal":"st","$createScopeWithRenderer":"dt","$createScopeWithTagNameOrRenderer":"ht","$initRenderer":"gt","$dynamicTagAttrs":"pt","$createRendererWithOwner":"vt","$createRenderer":"bt","$_clone":"mt","$conditional":"yt","$inConditionalScope":"kt","$conditionalOnlyChild":"wt","$setConditionalRendererOnlyChild":"Ct","$emptyMarkerMap":"At","$emptyMarkerArray":"St","$emptyMap":"Nt","$emptyArray":"xt","$loopOf":"$t","$loopIn":"Mt","$loopTo":"Et","$loop":"It","$inLoopScope":"Tt","$bySecondArg":"_t","$byFirstArg":"Ot","$isDifferentRenderer":"Bt","$classIdToScope":"Vt","$compat":"jt","$noop":"Rt","$createTemplate":"qt","$mount":"Dt","$parseHTMLOrSingleNode":"Wt","$marker":"Ft","$_clickCount_effect":"Qt","$_clickCount":"Yt","$_setup_":"zt","$_expr_comment_comments_id$ifBody":"ss","$_id$ifBody":"as","$_comment_comments$ifBody":"ts","$_ifBody":"ns","$_expr_input_path_i$forBody":"os","$_if$forBody":"cs","$_open$forBody_effect":"is","$_open$forBody":"ms","$_id$forBody":"ls","$_i$forBody":"us","$_comment_comments$forBody":"es","$_comment_text$forBody":"ds","$_comment$forBody":"rs","$_params_2$forBody":"bs","$_input_path$forBody":"ps","$_for":"hs","$_input_path_":"vs","$_input_comments_":"fs","$_input_$1":"js","$_input_":"ks","$_params__":"Ss","$noop2":"Pt","$textContent":"Lt","$normalizeString":"Ut","$contentClosures":"Gt","$_expr_comment_comments_id$if_content":"Zs","$_id$if_content":"$s","$_comment_comments$if_content":"_s","$_if_content":"gs","$_expr_input_path_i$for_content":"ws","$_if$for_content":"xs","$_open$for_content_effect":"Bs","$_open$for_content":"Ds","$_id$for_content":"Es","$_i$for_content":"Hs","$_comment_comments$for_content":"Xs","$_comment_text$for_content":"qs","$_comment$for_content":"ys","$_params_2$for_content":"zs","$_input_path$for_content":"As","$pendingSignal":"Ht","$scopeIsConnected":"Jt","$sortScopeByDOMPosition":"Xt","$ownerStartNode":"Zt","$queueSource":"Kt","$pendingScopes":"en","$loopClosure":"tn","$conditionalClosure":"nn","$queueRender":"rn","$abort":"on"}}}
|
||||
@ -12,4 +12,4 @@ export const _pattern__ = /* @__PURE__ */_$.value("_pattern_", (_scope, _pattern
|
||||
}, () => _content_);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _pattern__(_scope, input.thing), () => _pattern__);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag/index.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag/index.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -24,4 +24,4 @@ export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_)
|
||||
export function _setup_(_scope) {
|
||||
_customTag(_scope["#childScope/0"]);
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -7,4 +7,4 @@ const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _inpu
|
||||
export const _input_foo_ = /* @__PURE__ */_$.value("input_foo", (_scope, input_foo) => _dynamicTagName(_scope, input_foo), () => _dynamicTagName);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _input_foo_(_scope, input.foo), () => _input_foo_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/hello/index.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/hello/index.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -5,4 +5,4 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
export const _className_ = /* @__PURE__ */_$.value("className", (_scope, className) => _$.classAttr(_scope["#div/0"], className));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _className_(_scope, input.class));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -52,4 +52,4 @@ export function _setup_(_scope) {
|
||||
_customTag(_scope["#childScope/2"]);
|
||||
_customTag_input_class(_scope["#childScope/2"], ["a", false, "b"]);
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -19,4 +19,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_input_bar_(_scope, input.bar);
|
||||
}, () => _$.intersections([_input_foo_, _input_bar_]));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -5,4 +5,4 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
export const _style_ = /* @__PURE__ */_$.value("style", (_scope, style) => _$.styleAttr(_scope["#div/0"], style));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _style_(_scope, input.style));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -38,4 +38,4 @@ export function _setup_(_scope) {
|
||||
});
|
||||
_customTag_input_style(_scope["#childScope/3"], "color: green");
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -5,4 +5,4 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
export const _input_name_ = /* @__PURE__ */_$.value("input_name", (_scope, input_name) => _$.attr(_scope["#div/0"], "foo", `Hello ${input_name}`));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _input_name_(_scope, input.name));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -4,22 +4,36 @@ import { resolveAfter } from "../../utils/resolve";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _value$await_content3 = /* @__PURE__ */_$.value("value", (_scope, value) => _$.data(_scope["#text/0"], value));
|
||||
const _params_4$await_content = /* @__PURE__ */_$.value("_params_4", (_scope, _params_4) => _value$await_content3(_scope, _params_4[0]));
|
||||
const _count$await_content3 = /* @__PURE__ */_$.closure("count", (_scope, count) => _$.data(_scope["#text/1"], count));
|
||||
const _await_content3 = _$.register("__tests__/template.marko_3_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", void 0, () => [_count$await_content3], () => _params_4$await_content));
|
||||
const _count$await_content3 = _$.registerSubscriber("__tests__/template.marko_3_count/subscriber", /* @__PURE__ */_$.dynamicClosure("count", (_scope, count) => _$.data(_scope["#text/1"], count)));
|
||||
const _setup$await_content3 = _scope => {
|
||||
_count$await_content3._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _await_content3 = _$.register("__tests__/template.marko_3_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", _setup$await_content3, () => _params_4$await_content));
|
||||
const _value$await_content2 = /* @__PURE__ */_$.value("value", (_scope, value) => _$.data(_scope["#text/0"], value));
|
||||
const _params_3$await_content = /* @__PURE__ */_$.value("_params_3", (_scope, _params_3) => _value$await_content2(_scope, _params_3[0]));
|
||||
const _count$await_content2 = /* @__PURE__ */_$.closure("count", (_scope, count) => _$.data(_scope["#text/1"], count));
|
||||
const _await_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", void 0, () => [_count$await_content2], () => _params_3$await_content));
|
||||
const _count$await_content2 = _$.registerSubscriber("__tests__/template.marko_2_count/subscriber", /* @__PURE__ */_$.dynamicClosure("count", (_scope, count) => _$.data(_scope["#text/1"], count)));
|
||||
const _setup$await_content2 = _scope => {
|
||||
_count$await_content2._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _await_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", _setup$await_content2, () => _params_3$await_content));
|
||||
const _value$await_content = /* @__PURE__ */_$.value("value", (_scope, value) => _$.data(_scope["#text/0"], value));
|
||||
const _params_2$await_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _value$await_content(_scope, _params_2[0]));
|
||||
const _count$await_content = /* @__PURE__ */_$.closure("count", (_scope, count) => _$.data(_scope["#text/1"], count));
|
||||
const _await_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", void 0, () => [_count$await_content], () => _params_2$await_content));
|
||||
const _count$await_content = _$.registerSubscriber("__tests__/template.marko_1_count/subscriber", /* @__PURE__ */_$.dynamicClosure("count", (_scope, count) => _$.data(_scope["#text/1"], count)));
|
||||
const _setup$await_content = _scope => {
|
||||
_count$await_content._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _await_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", _setup$await_content, () => _params_2$await_content));
|
||||
const _count_effect = _$.effect("__tests__/template.marko_0_count", (_scope, {
|
||||
count
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
_count(_scope, count + 1), count;
|
||||
}));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => _count_effect(_scope), () => _$.intersections([_count$await_content, _count$await_content2, _count$await_content3]));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => {
|
||||
_count_effect(_scope);
|
||||
_count$await_content(_scope, count);
|
||||
_count$await_content2(_scope, count);
|
||||
_count$await_content3(_scope, count);
|
||||
});
|
||||
export function _setup_(_scope) {
|
||||
_count(_scope, 0);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
_$.fork(Promise.resolve("a"), value => {
|
||||
const _scope1_id = _$.nextScopeId();
|
||||
_$.write(`Got: ${_$.escapeXML(value)} <!>${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/1")}`);
|
||||
_$.writeEffect(_scope1_id, "__tests__/template.marko_1_count/subscriber");
|
||||
_$.writeScope(_scope1_id, {
|
||||
"_": _$.ensureScopeWithId(_scope0_id)
|
||||
});
|
||||
@ -15,6 +16,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
_$.fork(resolveAfter("b", 2), value => {
|
||||
const _scope2_id = _$.nextScopeId();
|
||||
_$.write(`Got: ${_$.escapeXML(value)} <!>${_$.escapeXML(count)}${_$.markResumeNode(_scope2_id, "#text/1")}`);
|
||||
_$.writeEffect(_scope2_id, "__tests__/template.marko_2_count/subscriber");
|
||||
_$.writeScope(_scope2_id, {
|
||||
"_": _$.ensureScopeWithId(_scope0_id)
|
||||
});
|
||||
@ -23,6 +25,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
_$.fork(resolveAfter("c", 1), value => {
|
||||
const _scope3_id = _$.nextScopeId();
|
||||
_$.write(`Got: ${_$.escapeXML(value)} <!>${_$.escapeXML(count)}${_$.markResumeNode(_scope3_id, "#text/1")}`);
|
||||
_$.writeEffect(_scope3_id, "__tests__/template.marko_3_count/subscriber");
|
||||
_$.writeScope(_scope3_id, {
|
||||
"_": _$.ensureScopeWithId(_scope0_id)
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Write
|
||||
<div>Got: a <!>0<!--M_*1 #text/1--><!--M_$1--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.b={0:_.a={count:0},1:{_:_.a}})]</script>
|
||||
<div>Got: a <!>0<!--M_*1 #text/1--><!--M_$1--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.b={0:_.a={count:0},1:{_:_.a}}),1,"__tests__/template.marko_1_count/subscriber"];M._.w()</script>
|
||||
|
||||
|
||||
# Write
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
# Write
|
||||
Got: b <!>0<!--M_*3 #text/1--><!--M_$3-->Got: c <!>0<!--M_*2 #text/1--><!--M_$2--><button>Inc</button><!--M_*0 #button/0--></div><!--M_$0--><script>M._.r.push(_=>(_.d={3:{_:_.a}}),0,"__tests__/template.marko_0_count",0);M._.w()</script>
|
||||
Got: b <!>0<!--M_*3 #text/1--><!--M_$3-->Got: c <!>0<!--M_*2 #text/1--><!--M_$2--><button>Inc</button><!--M_*0 #button/0--></div><!--M_$0--><script>M._.r.push(_=>(_.d={3:{_:_.a}}),3,"__tests__/template.marko_2_count/subscriber"2,"__tests__/template.marko_3_count/subscriber",0,"__tests__/template.marko_0_count",0);M._.w()</script>
|
||||
|
||||
|
||||
# Render "End"
|
||||
@ -22,7 +22,7 @@
|
||||
<!--M_*1 #text/1-->
|
||||
<!--M_$1-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.b={0:_.a={count:0},1:{_:_.a}})]
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.b={0:_.a={count:0},1:{_:_.a}}),1,"__tests__/template.marko_1_count/subscriber"];M._.w()
|
||||
</script>
|
||||
<script>
|
||||
M._.r.push(_=>(_.c={2:{_:_.a}}))
|
||||
@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
M._.r.push(_=>(_.d={3:{_:_.a}}),0,"__tests__/template.marko_0_count",0);M._.w()
|
||||
M._.r.push(_=>(_.d={3:{_:_.a}}),3,"__tests__/template.marko_2_count/subscriber"2,"__tests__/template.marko_3_count/subscriber",0,"__tests__/template.marko_0_count",0);M._.w()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -12,4 +12,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_text_(_scope, input.text);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -12,4 +12,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_onClick_(_scope, input.onClick);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -19,4 +19,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_pattern__(_scope, input.value);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -18,4 +18,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_text_(_scope, input.text);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -12,4 +12,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_text_(_scope, input.text);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -8,7 +8,8 @@
|
||||
"$_onClick": "n",
|
||||
"$_clickCount$myButtonBody": "s",
|
||||
"$_clickCount": "o",
|
||||
"$_clickCount$myButton_content": "a"
|
||||
"$_clickCount$myButton_content": "a",
|
||||
"$_setup$myButton_content": "m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,4 +14,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_content_(_scope, input.content);
|
||||
}, () => _content_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 425 (min) 241 (brotli)
|
||||
// size: 397 (min) 233 (brotli)
|
||||
_$.dynamicTagAttrs(1);
|
||||
const _onClick__effect = _$.effect("a0", (_scope, { 4: onClick }) =>
|
||||
_$.on(_scope[0], "click", onClick),
|
||||
@ -9,17 +9,21 @@ const _onClick__effect = _$.effect("a0", (_scope, { 4: onClick }) =>
|
||||
_$.dynamicClosure(1, (_scope, clickCount) =>
|
||||
_$.data(_scope[0], clickCount),
|
||||
),
|
||||
);
|
||||
),
|
||||
_setup$myButton_content = (_scope) => {
|
||||
_clickCount$myButton_content._(_scope, _scope._[1]);
|
||||
};
|
||||
_$.register(
|
||||
"b2",
|
||||
_$.createRendererWithOwner(" ", " ", void 0, () => [
|
||||
_clickCount$myButton_content,
|
||||
]),
|
||||
_$.createRendererWithOwner(" ", " ", _setup$myButton_content),
|
||||
);
|
||||
const _clickCount = _$.state(
|
||||
1,
|
||||
(_scope, clickCount) => _onClick_(_scope[0], _onClick(_scope)),
|
||||
() => _$.intersections([_$.inChild(0, _onClick_), _$.dynamicSubscribers(1)]),
|
||||
(_scope, clickCount) => {
|
||||
_onClick_(_scope[0], _onClick(_scope)),
|
||||
_clickCount$myButton_content(_scope, clickCount);
|
||||
},
|
||||
() => _$.inChild(0, _onClick_),
|
||||
);
|
||||
function _onClick(_scope, { 1: clickCount } = _scope) {
|
||||
return function () {
|
||||
|
||||
@ -3,8 +3,14 @@ export const _walks_ = /* beginChild, _myButton_walks, endChild */`/${_myButton_
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
import { _setup_ as _myButton, _content_ as _myButton_input_content, _onClick_ as _myButton_input_onClick, _template_ as _myButton_template, _walks_ as _myButton_walks } from "./tags/my-button.marko";
|
||||
const _clickCount$myButton_content = _$.registerSubscriber("__tests__/template.marko_1_clickCount/subscriber", /* @__PURE__ */_$.dynamicClosure("clickCount", (_scope, clickCount) => _$.data(_scope["#text/0"], clickCount)));
|
||||
const _myButton_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(" ", /* get */" ", void 0, () => [_clickCount$myButton_content]));
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => _myButton_input_onClick(_scope["#childScope/0"], _onClick(_scope)), () => _$.intersections([_$.inChild("#childScope/0", _myButton_input_onClick), _$.dynamicSubscribers("clickCount")]));
|
||||
const _setup$myButton_content = _scope => {
|
||||
_clickCount$myButton_content._(_scope, _scope._["clickCount"]);
|
||||
};
|
||||
const _myButton_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(" ", /* get */" ", _setup$myButton_content));
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => {
|
||||
_myButton_input_onClick(_scope["#childScope/0"], _onClick(_scope));
|
||||
_clickCount$myButton_content(_scope, clickCount);
|
||||
}, () => _$.inChild("#childScope/0", _myButton_input_onClick));
|
||||
export function _setup_(_scope) {
|
||||
_myButton(_scope["#childScope/0"]);
|
||||
_clickCount(_scope, 0);
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
"$_show_effect": "a",
|
||||
"$_show": "s",
|
||||
"$_count$if_content": "m",
|
||||
"$_if_content": "f"
|
||||
"$_if_content": "f",
|
||||
"$_setup$if_content": "l"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
// size: 401 (min) 220 (brotli)
|
||||
const _count$if_content = _$.closure(4, (_scope, count) =>
|
||||
_$.data(_scope[0], count),
|
||||
// size: 403 (min) 223 (brotli)
|
||||
const _count$if_content = _$.conditionalClosure(
|
||||
2,
|
||||
() => _if_content,
|
||||
(_scope, count) => _$.data(_scope[0], count),
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_count$if_content._(_scope, _scope._[4]);
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer("The count is <!>", "b%", void 0, () => [
|
||||
_count$if_content,
|
||||
]),
|
||||
_$.createRenderer("The count is <!>", "b%", _setup$if_content),
|
||||
),
|
||||
_if = _$.conditional(2, 0),
|
||||
_count_effect = _$.effect("a1", (_scope, { 4: count }) =>
|
||||
@ -14,11 +17,9 @@ const _count$if_content = _$.closure(4, (_scope, count) =>
|
||||
_count(_scope, count + 1);
|
||||
}),
|
||||
),
|
||||
_count = _$.state(
|
||||
4,
|
||||
(_scope, count) => _count_effect(_scope),
|
||||
() => _$.inConditionalScope(_count$if_content, 2),
|
||||
),
|
||||
_count = _$.state(4, (_scope, count) => {
|
||||
_count_effect(_scope), _count$if_content(_scope, count);
|
||||
}),
|
||||
_show_effect = _$.effect("a2", (_scope, { 3: show }) =>
|
||||
_$.on(_scope[1], "click", function () {
|
||||
_show(_scope, !show);
|
||||
|
||||
@ -1,15 +1,21 @@
|
||||
export const _template_ = "<button class=inc></button><button class=toggle></button><!><!>";
|
||||
export const _walks_ = /* get, over(1), get, over(1), replace, over(1) */" b b%bD";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _count$if_content = /* @__PURE__ */_$.closure("count", (_scope, count) => _$.data(_scope["#text/0"], count));
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("The count is <!>", /* over(1), replace */"b%", void 0, () => [_count$if_content]));
|
||||
const _count$if_content = /* @__PURE__ */_$.conditionalClosure("#text/2", () => _if_content, (_scope, count) => _$.data(_scope["#text/0"], count));
|
||||
const _setup$if_content = _scope => {
|
||||
_count$if_content._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("The count is <!>", /* over(1), replace */"b%", _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/2", 0);
|
||||
const _count_effect = _$.effect("__tests__/template.marko_0_count", (_scope, {
|
||||
count
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
_count(_scope, count + 1), count;
|
||||
}));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => _count_effect(_scope), () => _$.inConditionalScope(_count$if_content, "#text/2"));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => {
|
||||
_count_effect(_scope);
|
||||
_count$if_content(_scope, count);
|
||||
});
|
||||
const _show_effect = _$.effect("__tests__/template.marko_0_show", (_scope, {
|
||||
show
|
||||
}) => _$.on(_scope["#button/1"], "click", function () {
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
"$_show_effect": "i",
|
||||
"$_show": "s",
|
||||
"$_count$if_content": "m",
|
||||
"$_if_content": "f"
|
||||
"$_if_content": "f",
|
||||
"$_setup$if_content": "l"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
// size: 399 (min) 213 (brotli)
|
||||
const _count$if_content = _$.closure(4, (_scope, count) =>
|
||||
_$.data(_scope[0], count),
|
||||
// size: 401 (min) 227 (brotli)
|
||||
const _count$if_content = _$.conditionalClosure(
|
||||
2,
|
||||
() => _if_content,
|
||||
(_scope, count) => _$.data(_scope[0], count),
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_count$if_content._(_scope, _scope._[4]);
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer("<span> </span>", "D ", void 0, () => [
|
||||
_count$if_content,
|
||||
]),
|
||||
_$.createRenderer("<span> </span>", "D ", _setup$if_content),
|
||||
),
|
||||
_if = _$.conditional(2, 0),
|
||||
_count_effect = _$.effect("a1", (_scope, { 4: count }) =>
|
||||
@ -14,11 +17,9 @@ const _count$if_content = _$.closure(4, (_scope, count) =>
|
||||
_count(_scope, count + 1);
|
||||
}),
|
||||
),
|
||||
_count = _$.state(
|
||||
4,
|
||||
(_scope, count) => _count_effect(_scope),
|
||||
() => _$.inConditionalScope(_count$if_content, 2),
|
||||
),
|
||||
_count = _$.state(4, (_scope, count) => {
|
||||
_count_effect(_scope), _count$if_content(_scope, count);
|
||||
}),
|
||||
_show_effect = _$.effect("a2", (_scope, { 3: show }) =>
|
||||
_$.on(_scope[1], "click", function () {
|
||||
_show(_scope, !show);
|
||||
|
||||
@ -1,15 +1,22 @@
|
||||
export const _template_ = "<button class=inc></button><button class=toggle></button><!><!>";
|
||||
export const _walks_ = /* get, over(1), get, over(1), replace, over(1) */" b b%bD";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _count$if_content = /* @__PURE__ */_$.closure("count", (_scope, count) => _$.data(_scope["#text/0"], count));
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", void 0, () => [_count$if_content]));
|
||||
const _count$if_content = /* @__PURE__ */_$.conditionalClosure("#text/2", () => _if_content, (_scope, count) => _$.data(_scope["#text/0"], count));
|
||||
const _setup$if_content = _scope => {
|
||||
_count$if_content._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/2", 0);
|
||||
const _count_effect = _$.effect("__tests__/template.marko_0_count", (_scope, {
|
||||
count
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
_count(_scope, count + 1), count;
|
||||
}));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => _count_effect(_scope), () => _$.inConditionalScope(_count$if_content, "#text/2"));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => {
|
||||
debugger;
|
||||
_count_effect(_scope);
|
||||
_count$if_content(_scope, count);
|
||||
});
|
||||
const _show_effect = _$.effect("__tests__/template.marko_0_show", (_scope, {
|
||||
show
|
||||
}) => _$.on(_scope["#button/1"], "click", function () {
|
||||
|
||||
@ -3,6 +3,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
const _scope0_id = _$.nextScopeId();
|
||||
const show = true;
|
||||
const count = 0;
|
||||
debugger;
|
||||
_$.write(`<button class=inc></button>${_$.markResumeNode(_scope0_id, "#button/0")}<button class=toggle></button>${_$.markResumeNode(_scope0_id, "#button/1")}`);
|
||||
let _ifScopeId, _ifRenderer;
|
||||
if (show) {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<let/show = true/>
|
||||
<let/count = 0/>
|
||||
<debug=count/>
|
||||
<button.inc onClick() { count++; }/>
|
||||
<button.toggle onClick() { show = !show; }/>
|
||||
<if=show><span>${count}</span></if>
|
||||
@ -10,12 +10,16 @@ const _expr_a_b$if_content = /* @__PURE__ */_$.intersection(2, _scope => {
|
||||
} = _scope;
|
||||
_$.data(_scope["#text/0"], a + b);
|
||||
});
|
||||
const _b$if_content = /* @__PURE__ */_$.closure("b", 0, void 0, () => _expr_a_b$if_content);
|
||||
const _a$if_content = /* @__PURE__ */_$.closure("a", 0, void 0, () => _expr_a_b$if_content);
|
||||
const _if_content = /* @__PURE__ */_$.createRenderer(" ", /* get */" ", void 0, () => [_b$if_content, _a$if_content]);
|
||||
const _b$if_content = /* @__PURE__ */_$.conditionalClosure("#text/0", () => _if_content, 0, () => _expr_a_b$if_content);
|
||||
const _a$if_content = /* @__PURE__ */_$.conditionalClosure("#text/0", () => _if_content, 0, () => _expr_a_b$if_content);
|
||||
const _setup$if_content = _scope => {
|
||||
_a$if_content._(_scope, _scope._["a"]);
|
||||
_b$if_content._(_scope, _scope._["b"]);
|
||||
};
|
||||
const _if_content = /* @__PURE__ */_$.createRenderer(" ", /* get */" ", _setup$if_content);
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/0", 0);
|
||||
const _b = /* @__PURE__ */_$.state("b", 0, () => _$.inConditionalScope(_b$if_content, "#text/0"));
|
||||
const _a = /* @__PURE__ */_$.state("a", 0, () => _$.inConditionalScope(_a$if_content, "#text/0"));
|
||||
const _b = /* @__PURE__ */_$.state("b", (_scope, b) => _b$if_content(_scope, b));
|
||||
const _a = /* @__PURE__ */_$.state("a", (_scope, a) => _a$if_content(_scope, a));
|
||||
export function _setup_(_scope) {
|
||||
_a(_scope, 0);
|
||||
_b(_scope, 0);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
export const _template_ = "<!><!><!>";
|
||||
export const _walks_ = /* replace, over(1) */"D%bD";
|
||||
export const _setup_ = () => {};
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _tagName_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("Hello World", ""));
|
||||
const _tagName_input = _$.dynamicTagAttrs("#text/0", _tagName_content);
|
||||
@ -10,4 +9,7 @@ const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _tagN
|
||||
export const _tagName_ = /* @__PURE__ */_$.value("tagName", (_scope, tagName) => _dynamicTagName(_scope, tagName || _tagName_content(_scope)), () => _dynamicTagName);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _tagName_(_scope, input.tagName), () => _tagName_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export function _setup_(_scope) {
|
||||
debugger;
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -4,6 +4,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
const {
|
||||
tagName
|
||||
} = input;
|
||||
debugger;
|
||||
const _dynamicScope = _$.peekNextScope();
|
||||
_$.dynamicTagInput(_dynamicScope, tagName, {
|
||||
class: ["a", "b"]
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<attrs/{ tagName }/>
|
||||
<debug/>
|
||||
<${tagName} class=["a", "b"]>
|
||||
Hello World
|
||||
</>
|
||||
@ -10,7 +10,8 @@
|
||||
"$_message_text": "i",
|
||||
"$_message": "m",
|
||||
"$_message_text$if_content": "c",
|
||||
"$_if_content": "l"
|
||||
"$_if_content": "l",
|
||||
"$_setup$if_content": "s"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,15 @@
|
||||
// size: 337 (min) 204 (brotli)
|
||||
const _message_text$if_content = _$.closure(3, (_scope, message_text) =>
|
||||
_$.data(_scope[0], message_text),
|
||||
// size: 336 (min) 209 (brotli)
|
||||
const _message_text$if_content = _$.conditionalClosure(
|
||||
1,
|
||||
() => _if_content,
|
||||
(_scope, message_text) => _$.data(_scope[0], message_text),
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_message_text$if_content._(_scope, _scope._[3]);
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer(" ", " ", void 0, () => [_message_text$if_content]),
|
||||
_$.createRenderer(" ", " ", _setup$if_content),
|
||||
),
|
||||
_if = _$.conditional(1, 0),
|
||||
_show = _$.state(
|
||||
@ -12,13 +17,11 @@ const _message_text$if_content = _$.closure(3, (_scope, message_text) =>
|
||||
(_scope, show) => _if(_scope, show ? _if_content : null),
|
||||
() => _if,
|
||||
),
|
||||
_message_text = _$.value(3, 0, () =>
|
||||
_$.inConditionalScope(_message_text$if_content, 1),
|
||||
_message_text = _$.value(3, (_scope, message_text) =>
|
||||
_message_text$if_content(_scope, message_text),
|
||||
),
|
||||
_message = _$.state(
|
||||
2,
|
||||
(_scope, message) => _message_text(_scope, message?.text),
|
||||
() => _message_text,
|
||||
_message = _$.state(2, (_scope, message) =>
|
||||
_message_text(_scope, message?.text),
|
||||
);
|
||||
_$.effect("a1", (_scope) =>
|
||||
_$.on(_scope[0], "click", function () {
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
export const _template_ = "<button>hide</button><!><!>";
|
||||
export const _walks_ = /* get, over(1), replace, over(1) */" b%bD";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _message_text$if_content = /* @__PURE__ */_$.closure("message_text", (_scope, message_text) => _$.data(_scope["#text/0"], message_text));
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(" ", /* get */" ", void 0, () => [_message_text$if_content]));
|
||||
const _message_text$if_content = /* @__PURE__ */_$.conditionalClosure("#text/1", () => _if_content, (_scope, message_text) => _$.data(_scope["#text/0"], message_text));
|
||||
const _setup$if_content = _scope => {
|
||||
_message_text$if_content._(_scope, _scope._["message_text"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(" ", /* get */" ", _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/1", 0);
|
||||
const _show = /* @__PURE__ */_$.state("show", (_scope, show) => _if(_scope, show ? _if_content : null), () => _if);
|
||||
const _message_text = /* @__PURE__ */_$.value("message_text", 0, () => _$.inConditionalScope(_message_text$if_content, "#text/1"));
|
||||
const _message = /* @__PURE__ */_$.state("message", (_scope, message) => _message_text(_scope, message?.text), () => _message_text);
|
||||
const _message_text = /* @__PURE__ */_$.value("message_text", (_scope, message_text) => _message_text$if_content(_scope, message_text));
|
||||
const _message = /* @__PURE__ */_$.state("message", (_scope, message) => _message_text(_scope, message?.text));
|
||||
const _setup__effect = _$.effect("__tests__/template.marko_0", _scope => _$.on(_scope["#button/0"], "click", function () {
|
||||
_message(_scope, null);
|
||||
_show(_scope, false);
|
||||
|
||||
@ -6,4 +6,4 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
export const _value_ = /* @__PURE__ */_$.value("value", (_scope, value) => _$.data(_scope["#text/0"], value));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _value_(_scope, input.value));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -15,12 +15,14 @@ const _expr_comment_comments_id$if_content = /* @__PURE__ */_$.intersection(2, _
|
||||
path: id
|
||||
});
|
||||
}, () => _$.inChild("#childScope/0", _input_));
|
||||
const _id$if_content = /* @__PURE__ */_$.closure("id", 0, void 0, () => _expr_comment_comments_id$if_content);
|
||||
const _comment_comments$if_content = /* @__PURE__ */_$.closure("comment_comments", 0, void 0, () => _expr_comment_comments_id$if_content);
|
||||
const _id$if_content = /* @__PURE__ */_$.conditionalClosure("#text/4", () => _if_content, 0, () => _expr_comment_comments_id$if_content);
|
||||
const _comment_comments$if_content = /* @__PURE__ */_$.conditionalClosure("#text/4", () => _if_content, 0, () => _expr_comment_comments_id$if_content);
|
||||
const _setup$if_content = _scope => {
|
||||
_comment_comments$if_content._(_scope, _scope._["comment_comments"]);
|
||||
_id$if_content._(_scope, _scope._["id"]);
|
||||
_setup_(_scope["#childScope/0"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/tags/comments.marko_2_renderer", /* @__PURE__ */_$.createRenderer(_comments_template, /* beginChild, _comments_walks, endChild */`/${_comments_walks}&`, _setup$if_content, () => [_id$if_content, _comment_comments$if_content]));
|
||||
const _if_content = _$.register("__tests__/tags/comments.marko_2_renderer", /* @__PURE__ */_$.createRenderer(_comments_template, /* beginChild, _comments_walks, endChild */`/${_comments_walks}&`, _setup$if_content));
|
||||
const _expr_input_path_i$for_content = /* @__PURE__ */_$.intersection(2, _scope => {
|
||||
const {
|
||||
_: {
|
||||
@ -29,7 +31,7 @@ const _expr_input_path_i$for_content = /* @__PURE__ */_$.intersection(2, _scope
|
||||
i
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
}, () => _id$for_content);
|
||||
});
|
||||
const _if$for_content = /* @__PURE__ */_$.conditional("#text/4", 0);
|
||||
const _open$for_content_effect = _$.effect("__tests__/tags/comments.marko_1_open", (_scope, {
|
||||
open
|
||||
@ -41,9 +43,15 @@ const _open$for_content = /* @__PURE__ */_$.state("open", (_scope, open) => {
|
||||
_$.data(_scope["#text/3"], open ? "[-]" : "[+]");
|
||||
_open$for_content_effect(_scope);
|
||||
});
|
||||
const _id$for_content = /* @__PURE__ */_$.value("id", (_scope, id) => _$.attr(_scope["#li/0"], "id", id), () => _$.inConditionalScope(_id$if_content, "#text/4"));
|
||||
const _id$for_content = /* @__PURE__ */_$.value("id", (_scope, id) => {
|
||||
_$.attr(_scope["#li/0"], "id", id);
|
||||
_id$if_content(_scope, id);
|
||||
});
|
||||
const _i$for_content = /* @__PURE__ */_$.value("i", 0, () => _expr_input_path_i$for_content);
|
||||
const _comment_comments$for_content = /* @__PURE__ */_$.value("comment_comments", (_scope, comment_comments) => _if$for_content(_scope, comment_comments ? _if_content : null), () => _$.intersections([_if$for_content, _$.inConditionalScope(_comment_comments$if_content, "#text/4")]));
|
||||
const _comment_comments$for_content = /* @__PURE__ */_$.value("comment_comments", (_scope, comment_comments) => {
|
||||
_if$for_content(_scope, comment_comments ? _if_content : null);
|
||||
_comment_comments$if_content(_scope, comment_comments);
|
||||
}, () => _if$for_content);
|
||||
const _comment_text$for_content = /* @__PURE__ */_$.value("comment_text", (_scope, comment_text) => _$.data(_scope["#text/1"], comment_text));
|
||||
const _comment$for_content = /* @__PURE__ */_$.value("comment", (_scope, comment) => {
|
||||
_comment_text$for_content(_scope, comment?.text);
|
||||
@ -53,17 +61,18 @@ const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _par
|
||||
_comment$for_content(_scope, _params_2[0]);
|
||||
_i$for_content(_scope, _params_2[1]);
|
||||
}, () => _$.intersections([_comment$for_content, _i$for_content]));
|
||||
const _input_path$for_content = /* @__PURE__ */_$.closure("input_path", 0, void 0, () => _expr_input_path_i$for_content);
|
||||
const _input_path$for_content = /* @__PURE__ */_$.loopClosure("#ul/0", 0, () => _expr_input_path_i$for_content);
|
||||
const _setup$for_content = _scope => {
|
||||
_input_path$for_content._(_scope, _scope._["input_path"]);
|
||||
_open$for_content(_scope, true);
|
||||
};
|
||||
const _for_content = _$.register("__tests__/tags/comments.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace */" E l D l%", _setup$for_content, () => [_input_path$for_content], () => _params_2$for_content));
|
||||
const _for_content = _$.register("__tests__/tags/comments.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace */" E l D l%", _setup$for_content, () => _params_2$for_content));
|
||||
const _for = /* @__PURE__ */_$.loopOf("#ul/0", _for_content);
|
||||
export const _input_path_ = /* @__PURE__ */_$.value("input_path", 0, () => _$.inLoopScope(_input_path$for_content, "#ul/0"));
|
||||
export const _input_path_ = /* @__PURE__ */_$.value("input_path", (_scope, input_path) => _input_path$for_content(_scope, input_path));
|
||||
export const _input_comments_ = /* @__PURE__ */_$.value("input_comments", (_scope, input_comments) => _for(_scope, [input_comments]), () => _for);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_input_comments_(_scope, input.comments);
|
||||
_input_path_(_scope, input.path);
|
||||
}, () => _$.intersections([_input_comments_, _input_path_]));
|
||||
}, () => _input_comments_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/comments.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/comments.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 1206 (min) 546 (brotli)
|
||||
// size: 1148 (min) 531 (brotli)
|
||||
const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
@ -9,39 +9,34 @@ const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
},
|
||||
() => _$.inChild(0, _input_),
|
||||
),
|
||||
_id$if_content = _$.closure(
|
||||
10,
|
||||
_id$if_content = _$.conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_comment_comments$if_content = _$.closure(
|
||||
8,
|
||||
_comment_comments$if_content = _$.conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_comment_comments_id$if_content,
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_scope[0];
|
||||
_comment_comments$if_content._(_scope, _scope._[8]),
|
||||
_id$if_content._(_scope, _scope._[10]),
|
||||
_scope[0];
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer("<ul></ul>", "/ b&", _setup$if_content, () => [
|
||||
_id$if_content,
|
||||
_comment_comments$if_content,
|
||||
]),
|
||||
),
|
||||
_expr_input_path_i$for_content = _$.intersection(
|
||||
2,
|
||||
(_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
},
|
||||
() => _id$for_content,
|
||||
_$.createRenderer("<ul></ul>", "/ b&", _setup$if_content),
|
||||
),
|
||||
_expr_input_path_i$for_content = _$.intersection(2, (_scope) => {
|
||||
const {
|
||||
_: { 4: input_path },
|
||||
9: i,
|
||||
} = _scope;
|
||||
_id$for_content(_scope, `${input_path || "c"}-${i}`);
|
||||
}),
|
||||
_if$for_content = _$.conditional(4, 0),
|
||||
_open$for_content_effect = _$.effect("a1", (_scope, { 11: open }) =>
|
||||
_$.on(_scope[2], "click", function () {
|
||||
@ -53,21 +48,17 @@ const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
_$.data(_scope[3], open ? "[-]" : "[+]"),
|
||||
_open$for_content_effect(_scope);
|
||||
}),
|
||||
_id$for_content = _$.value(
|
||||
10,
|
||||
(_scope, id) => _$.attr(_scope[0], "id", id),
|
||||
() => _$.inConditionalScope(_id$if_content, 4),
|
||||
),
|
||||
_id$for_content = _$.value(10, (_scope, id) => {
|
||||
_$.attr(_scope[0], "id", id), _id$if_content(_scope, id);
|
||||
}),
|
||||
_i$for_content = _$.value(9, 0, () => _expr_input_path_i$for_content),
|
||||
_comment_comments$for_content = _$.value(
|
||||
8,
|
||||
(_scope, comment_comments) =>
|
||||
(_scope, comment_comments) => {
|
||||
_if$for_content(_scope, comment_comments ? _if_content : null),
|
||||
() =>
|
||||
_$.intersections([
|
||||
_if$for_content,
|
||||
_$.inConditionalScope(_comment_comments$if_content, 4),
|
||||
]),
|
||||
_comment_comments$if_content(_scope, comment_comments);
|
||||
},
|
||||
() => _if$for_content,
|
||||
),
|
||||
_comment_text$for_content = _$.value(7, (_scope, comment_text) =>
|
||||
_$.data(_scope[1], comment_text),
|
||||
@ -88,14 +79,14 @@ const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
},
|
||||
() => _$.intersections([_comment$for_content, _i$for_content]),
|
||||
),
|
||||
_input_path$for_content = _$.closure(
|
||||
4,
|
||||
_input_path$for_content = _$.loopClosure(
|
||||
0,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_input_path_i$for_content,
|
||||
),
|
||||
_setup$for_content = (_scope) => {
|
||||
_open$for_content(_scope, !0);
|
||||
_input_path$for_content._(_scope, _scope._[4]),
|
||||
_open$for_content(_scope, !0);
|
||||
},
|
||||
_for_content = _$.register(
|
||||
"a2",
|
||||
@ -103,13 +94,12 @@ const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
"<li><span> </span><button> </button><!></li>",
|
||||
" E l D l%",
|
||||
_setup$for_content,
|
||||
() => [_input_path$for_content],
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
),
|
||||
_for = _$.loopOf(0, _for_content),
|
||||
_input_path_ = _$.value(4, 0, () =>
|
||||
_$.inLoopScope(_input_path$for_content, 0),
|
||||
_input_path_ = _$.value(4, (_scope, input_path) =>
|
||||
_input_path$for_content(_scope, input_path),
|
||||
),
|
||||
_input_comments_ = _$.value(
|
||||
3,
|
||||
@ -122,6 +112,6 @@ const _expr_comment_comments_id$if_content = _$.intersection(
|
||||
_input_comments_(_scope, input.comments),
|
||||
_input_path_(_scope, input.path);
|
||||
},
|
||||
() => _$.intersections([_input_comments_, _input_path_]),
|
||||
() => _input_comments_,
|
||||
);
|
||||
init();
|
||||
|
||||
@ -11,4 +11,4 @@ export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_)
|
||||
export function _setup_(_scope) {
|
||||
_comments(_scope["#childScope/0"]);
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -3,7 +3,8 @@
|
||||
"props": {
|
||||
"$_$": "r",
|
||||
"$_name$layoutBody": "e",
|
||||
"$_name$layout_content": "t"
|
||||
"$_name$layout_content": "t",
|
||||
"$_setup$layout_content": "a"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,4 +7,4 @@ const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _cont
|
||||
export const _content_ = /* @__PURE__ */_$.value("content", (_scope, content) => _dynamicTagName(_scope, content), () => _dynamicTagName);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _content_(_scope, input.content), () => _content_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/layout.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/layout.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,12 +1,17 @@
|
||||
// size: 188 (min) 136 (brotli)
|
||||
// size: 194 (min) 139 (brotli)
|
||||
_$.dynamicTagAttrs(0);
|
||||
const _name$layout_content = _$.registerSubscriber(
|
||||
"b0",
|
||||
_$.dynamicClosure(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
);
|
||||
"b0",
|
||||
_$.dynamicClosure(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
),
|
||||
_setup$layout_content = (_scope) => {
|
||||
_name$layout_content._(_scope, _scope._[3]);
|
||||
};
|
||||
_$.register(
|
||||
"b1",
|
||||
_$.createRendererWithOwner("<h1>Hello <!></h1>", "Db%", void 0, () => [
|
||||
_name$layout_content,
|
||||
]),
|
||||
_$.createRendererWithOwner(
|
||||
"<h1>Hello <!></h1>",
|
||||
"Db%",
|
||||
_setup$layout_content,
|
||||
),
|
||||
);
|
||||
|
||||
@ -3,12 +3,15 @@ export const _walks_ = /* beginChild, _layout_walks, endChild */`/${_layout_walk
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
import { _setup_ as _layout, _content_ as _layout_input_content, _template_ as _layout_template, _walks_ as _layout_walks } from "./tags/layout.marko";
|
||||
const _name$layout_content = _$.registerSubscriber("__tests__/template.marko_1_name/subscriber", /* @__PURE__ */_$.dynamicClosure("name", (_scope, name) => _$.data(_scope["#text/0"], name)));
|
||||
const _layout_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<h1>Hello <!></h1>", /* next(1), over(1), replace */"Db%", void 0, () => [_name$layout_content]));
|
||||
export const _name_ = /* @__PURE__ */_$.value("name", 0, () => _$.dynamicSubscribers("name"));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _name_(_scope, input.name), () => _name_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
const _setup$layout_content = _scope => {
|
||||
_name$layout_content._(_scope, _scope._["name"]);
|
||||
};
|
||||
const _layout_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<h1>Hello <!></h1>", /* next(1), over(1), replace */"Db%", _setup$layout_content));
|
||||
export const _name_ = /* @__PURE__ */_$.value("name", (_scope, name) => _name$layout_content(_scope, name));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _name_(_scope, input.name));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export function _setup_(_scope) {
|
||||
_layout(_scope["#childScope/0"]);
|
||||
_layout_input_content(_scope["#childScope/0"], _layout_content(_scope));
|
||||
}
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
|
||||
"items": items,
|
||||
"index": index
|
||||
});
|
||||
_$.markResumeCleanup(_scope0_id);
|
||||
});
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
|
||||
@ -15,6 +15,7 @@
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
@ -47,6 +48,7 @@ container.querySelector("button").click()
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
@ -80,6 +82,7 @@ container.querySelector("button").click()
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
@ -112,6 +115,7 @@ container.querySelector("button").click()
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
@ -145,6 +149,7 @@ container.querySelector("button").click()
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Write
|
||||
<div>a<!--M_*0 #text/0--></div><div>a<!--M_*0 #text/1--></div><button>Update</button><!--M_*0 #button/2--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()</script>
|
||||
<div>a<!--M_*0 #text/0--></div><div>a<!--M_*0 #text/1--></div><button>Update</button><!--M_*0 #button/2--><!--M_$0--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()</script>
|
||||
|
||||
|
||||
# Render "End"
|
||||
@ -19,6 +19,7 @@
|
||||
Update
|
||||
</button>
|
||||
<!--M_*0 #button/2-->
|
||||
<!--M_$0-->
|
||||
<script>
|
||||
WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{items:["a","b","c"],index:0}}),0,"__tests__/template.marko_0_items_index",0];M._.w()
|
||||
</script>
|
||||
@ -40,6 +41,7 @@ inserted #document/html0/body1/div1/#comment1
|
||||
inserted #document/html0/body1/button2
|
||||
inserted #document/html0/body1/button2/#text0
|
||||
inserted #document/html0/body1/#comment3
|
||||
inserted #document/html0/body1/script4
|
||||
inserted #document/html0/body1/script4/#text0
|
||||
inserted #document/html0/body1/#comment4
|
||||
inserted #document/html0/body1/script5
|
||||
inserted #document/html0/body1/script5/#text0
|
||||
```
|
||||
@ -31,7 +31,8 @@
|
||||
"$_outer$for_content2": "_",
|
||||
"$_items$for_content": "j",
|
||||
"$_params_2$for_content": "q",
|
||||
"$_for_content": "w"
|
||||
"$_for_content": "w",
|
||||
"$_setup$for_content2": "x"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,10 +76,15 @@ container.querySelector("button").click()
|
||||
inserted #comment11
|
||||
inserted #text
|
||||
inserted #comment15
|
||||
inserted div4
|
||||
inserted div9
|
||||
inserted div12
|
||||
inserted div13
|
||||
inserted div14
|
||||
removed #text after #comment11
|
||||
inserted div4
|
||||
inserted div9
|
||||
div4/#text0: " " => "0.2"
|
||||
div9/#text0: " " => "1.2"
|
||||
div12/#text0: " " => "2.0"
|
||||
div13/#text0: " " => "2.1"
|
||||
div14/#text0: " " => "2.2"
|
||||
```
|
||||
@ -5,4 +5,4 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
export const _name_ = /* @__PURE__ */_$.value("name", (_scope, name) => _$.data(_scope["#text/0"], name));
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _name_(_scope, input.name));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 731 (min) 386 (brotli)
|
||||
// size: 685 (min) 371 (brotli)
|
||||
const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
_expr_outer_inner$for_content = _$.intersection(
|
||||
2,
|
||||
@ -11,10 +11,9 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
},
|
||||
() => _$.inChild(0, _name_),
|
||||
),
|
||||
_outer$for_content = _$.closure(
|
||||
2,
|
||||
_outer$for_content = _$.loopClosure(
|
||||
0,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_outer_inner$for_content,
|
||||
),
|
||||
_inner$for_content = _$.value(2, 0, () => _expr_outer_inner$for_content),
|
||||
@ -24,7 +23,7 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
() => _inner$for_content,
|
||||
),
|
||||
_setup$for_content = (_scope) => {
|
||||
_scope[0];
|
||||
_outer$for_content._(_scope, _scope._[2]), _scope[0];
|
||||
},
|
||||
_for_content2 = _$.register(
|
||||
"b0",
|
||||
@ -32,32 +31,30 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
"<div> </div>",
|
||||
"/D l&",
|
||||
_setup$for_content,
|
||||
() => [_outer$for_content],
|
||||
() => _params_3$for_content,
|
||||
),
|
||||
),
|
||||
_for$for_content = _$.loopOf(0, _for_content2),
|
||||
_outer$for_content2 = _$.value(2, 0, () =>
|
||||
_$.inLoopScope(_outer$for_content, 0),
|
||||
_outer$for_content2 = _$.value(2, (_scope, outer) =>
|
||||
_outer$for_content(_scope, outer),
|
||||
),
|
||||
_items$for_content = _$.closure(
|
||||
2,
|
||||
_items$for_content = _$.loopClosure(
|
||||
1,
|
||||
(_scope, items) => _for$for_content(_scope, [items]),
|
||||
void 0,
|
||||
() => _for$for_content,
|
||||
),
|
||||
_params_2$for_content = _$.value(
|
||||
1,
|
||||
(_scope, _params_2) => _outer$for_content2(_scope, _params_2[0]),
|
||||
() => _outer$for_content2,
|
||||
_params_2$for_content = _$.value(1, (_scope, _params_2) =>
|
||||
_outer$for_content2(_scope, _params_2[0]),
|
||||
),
|
||||
_setup$for_content2 = (_scope) => {
|
||||
_items$for_content._(_scope, _scope._[2]);
|
||||
},
|
||||
_for_content = _$.register(
|
||||
"b1",
|
||||
_$.createRenderer(
|
||||
"<!><!><!>",
|
||||
"D%D",
|
||||
void 0,
|
||||
() => [_items$for_content],
|
||||
_setup$for_content2,
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
),
|
||||
@ -70,8 +67,10 @@ const _name_ = _$.value(3, (_scope, name) => _$.data(_scope[0], name)),
|
||||
_items = _$.state(
|
||||
2,
|
||||
(_scope, items) => {
|
||||
_items_effect(_scope), _for(_scope, [items]);
|
||||
_items_effect(_scope),
|
||||
_for(_scope, [items]),
|
||||
_items$for_content(_scope, items);
|
||||
},
|
||||
() => _$.intersections([_for, _$.inLoopScope(_items$for_content, 1)]),
|
||||
() => _for,
|
||||
);
|
||||
init();
|
||||
|
||||
@ -11,18 +11,22 @@ const _expr_outer_inner$for_content = /* @__PURE__ */_$.intersection(2, _scope =
|
||||
} = _scope;
|
||||
_child_input_name(_scope["#childScope/0"], `${outer}.${inner}`);
|
||||
}, () => _$.inChild("#childScope/0", _child_input_name));
|
||||
const _outer$for_content = /* @__PURE__ */_$.closure("outer", 0, void 0, () => _expr_outer_inner$for_content);
|
||||
const _outer$for_content = /* @__PURE__ */_$.loopClosure("#text/0", 0, () => _expr_outer_inner$for_content);
|
||||
const _inner$for_content = /* @__PURE__ */_$.value("inner", 0, () => _expr_outer_inner$for_content);
|
||||
const _params_3$for_content = /* @__PURE__ */_$.value("_params_3", (_scope, _params_3) => _inner$for_content(_scope, _params_3[0]), () => _inner$for_content);
|
||||
const _setup$for_content = _scope => {
|
||||
_outer$for_content._(_scope, _scope._["outer"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
};
|
||||
const _for_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$for_content, () => [_outer$for_content], () => _params_3$for_content));
|
||||
const _for_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$for_content, () => _params_3$for_content));
|
||||
const _for$for_content = /* @__PURE__ */_$.loopOf("#text/0", _for_content2);
|
||||
const _outer$for_content2 = /* @__PURE__ */_$.value("outer", 0, () => _$.inLoopScope(_outer$for_content, "#text/0"));
|
||||
const _items$for_content = /* @__PURE__ */_$.closure("items", (_scope, items) => _for$for_content(_scope, [items]), void 0, () => _for$for_content);
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _outer$for_content2(_scope, _params_2[0]), () => _outer$for_content2);
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", void 0, () => [_items$for_content], () => _params_2$for_content));
|
||||
const _outer$for_content2 = /* @__PURE__ */_$.value("outer", (_scope, outer) => _outer$for_content(_scope, outer));
|
||||
const _items$for_content = /* @__PURE__ */_$.loopClosure("#text/1", (_scope, items) => _for$for_content(_scope, [items]), () => _for$for_content);
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _outer$for_content2(_scope, _params_2[0]));
|
||||
const _setup$for_content2 = _scope => {
|
||||
_items$for_content._(_scope, _scope._["items"]);
|
||||
};
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", _setup$for_content2, () => _params_2$for_content));
|
||||
const _for = /* @__PURE__ */_$.loopOf("#text/1", _for_content);
|
||||
const _items_effect = _$.effect("__tests__/template.marko_0_items", (_scope, {
|
||||
items
|
||||
@ -32,7 +36,8 @@ const _items_effect = _$.effect("__tests__/template.marko_0_items", (_scope, {
|
||||
const _items = /* @__PURE__ */_$.state("items", (_scope, items) => {
|
||||
_items_effect(_scope);
|
||||
_for(_scope, [items]);
|
||||
}, () => _$.intersections([_for, _$.inLoopScope(_items$for_content, "#text/1")]));
|
||||
_items$for_content(_scope, items);
|
||||
}, () => _for);
|
||||
export function _setup_(_scope) {
|
||||
_items(_scope, [0, 1]);
|
||||
}
|
||||
|
||||
@ -112,10 +112,15 @@ container.querySelector("button").click()
|
||||
inserted #document/html0/body1/#comment13
|
||||
inserted #text
|
||||
inserted #document/html0/body1/#comment17
|
||||
inserted #document/html0/body1/div5
|
||||
inserted #document/html0/body1/div12
|
||||
inserted #document/html0/body1/div14
|
||||
inserted #document/html0/body1/div15
|
||||
inserted #document/html0/body1/div16
|
||||
removed #text after #document/html0/body1/#comment13
|
||||
inserted #document/html0/body1/div5
|
||||
#document/html0/body1/div5/#text0: " " => "0.2"
|
||||
inserted #document/html0/body1/div12
|
||||
#document/html0/body1/div12/#text0: " " => "1.2"
|
||||
#document/html0/body1/div14/#text0: " " => "2.0"
|
||||
#document/html0/body1/div15/#text0: " " => "2.1"
|
||||
#document/html0/body1/div16/#text0: " " => "2.2"
|
||||
```
|
||||
@ -27,7 +27,8 @@
|
||||
"$_y$child_content": "w",
|
||||
"$_outer$child_content2": "D",
|
||||
"$_params_2$child_content": "O",
|
||||
"$_setup$child_content": "R"
|
||||
"$_setup$child_content": "R",
|
||||
"$_setup$child_content2": "_"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,4 +17,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_value_(_scope, input.value);
|
||||
}, () => _$.intersections([_content_, _value_]));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 857 (min) 388 (brotli)
|
||||
// size: 843 (min) 378 (brotli)
|
||||
const _content_input = _$.dynamicTagAttrs(0),
|
||||
_expr_Text_value = _$.intersection(
|
||||
2,
|
||||
@ -25,13 +25,15 @@ const _content_input = _$.dynamicTagAttrs(0),
|
||||
_params_3$child_content = _$.value(2, (_scope, _params_3) =>
|
||||
_inner$child_content(_scope, _params_3[0]),
|
||||
),
|
||||
_setup$child_content = (_scope) => {
|
||||
_outer$child_content._(_scope, _scope._[2]);
|
||||
},
|
||||
_child_content2 = _$.register(
|
||||
"b1",
|
||||
_$.createRendererWithOwner(
|
||||
"<div><!>.<!></div>",
|
||||
"D%c%",
|
||||
void 0,
|
||||
() => [_outer$child_content],
|
||||
_setup$child_content,
|
||||
() => _params_3$child_content,
|
||||
),
|
||||
),
|
||||
@ -44,22 +46,23 @@ const _content_input = _$.dynamicTagAttrs(0),
|
||||
() => _$.inChild(0, _value_),
|
||||
),
|
||||
),
|
||||
_outer$child_content2 = _$.value(2, 0, () => _$.dynamicSubscribers(2)),
|
||||
_params_2$child_content = _$.value(
|
||||
1,
|
||||
(_scope, _params_2) => _outer$child_content2(_scope, _params_2[0]),
|
||||
() => _outer$child_content2,
|
||||
_outer$child_content2 = _$.value(2, (_scope, outer) =>
|
||||
_outer$child_content(_scope, outer),
|
||||
),
|
||||
_setup$child_content = (_scope) => {
|
||||
_scope[0], _content_(_scope[0], _child_content2(_scope));
|
||||
_params_2$child_content = _$.value(1, (_scope, _params_2) =>
|
||||
_outer$child_content2(_scope, _params_2[0]),
|
||||
),
|
||||
_setup$child_content2 = (_scope) => {
|
||||
_y$child_content._(_scope, _scope._[3]),
|
||||
_scope[0],
|
||||
_content_(_scope[0], _child_content2(_scope));
|
||||
};
|
||||
_$.register(
|
||||
"b3",
|
||||
_$.createRendererWithOwner(
|
||||
"<div><!></div>",
|
||||
"/D%l&",
|
||||
_setup$child_content,
|
||||
() => [_y$child_content],
|
||||
_setup$child_content2,
|
||||
() => _params_2$child_content,
|
||||
),
|
||||
);
|
||||
|
||||
@ -5,16 +5,20 @@ import { _setup_ as _child, _content_ as _child_input_content, _value_ as _child
|
||||
const _inner$child_content = /* @__PURE__ */_$.value("inner", (_scope, inner) => _$.data(_scope["#text/1"], inner));
|
||||
const _outer$child_content = _$.registerSubscriber("__tests__/template.marko_2_outer/subscriber", /* @__PURE__ */_$.dynamicClosure("outer", (_scope, outer) => _$.data(_scope["#text/0"], outer)));
|
||||
const _params_3$child_content = /* @__PURE__ */_$.value("_params_3", (_scope, _params_3) => _inner$child_content(_scope, _params_3[0]));
|
||||
const _child_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRendererWithOwner("<div><!>.<!></div>", /* next(1), replace, over(2), replace */"D%c%", void 0, () => [_outer$child_content], () => _params_3$child_content));
|
||||
const _y$child_content = _$.registerSubscriber("__tests__/template.marko_1_y/subscriber", /* @__PURE__ */_$.dynamicClosure("y", (_scope, y) => _child_input_value(_scope["#childScope/0"], y), void 0, () => _$.inChild("#childScope/0", _child_input_value)));
|
||||
const _outer$child_content2 = /* @__PURE__ */_$.value("outer", 0, () => _$.dynamicSubscribers("outer"));
|
||||
const _params_2$child_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _outer$child_content2(_scope, _params_2[0]), () => _outer$child_content2);
|
||||
const _setup$child_content = _scope => {
|
||||
_outer$child_content._(_scope, _scope._["outer"]);
|
||||
};
|
||||
const _child_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRendererWithOwner("<div><!>.<!></div>", /* next(1), replace, over(2), replace */"D%c%", _setup$child_content, () => _params_3$child_content));
|
||||
const _y$child_content = _$.registerSubscriber("__tests__/template.marko_1_y/subscriber", /* @__PURE__ */_$.dynamicClosure("y", (_scope, y) => _child_input_value(_scope["#childScope/0"], y), void 0, () => _$.inChild("#childScope/0", _child_input_value)));
|
||||
const _outer$child_content2 = /* @__PURE__ */_$.value("outer", (_scope, outer) => _outer$child_content(_scope, outer));
|
||||
const _params_2$child_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _outer$child_content2(_scope, _params_2[0]));
|
||||
const _setup$child_content2 = _scope => {
|
||||
_y$child_content._(_scope, _scope._["y"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
_child_input_content(_scope["#childScope/0"], _child_content2(_scope));
|
||||
};
|
||||
const _child_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$child_content, () => [_y$child_content], () => _params_2$child_content));
|
||||
const _y = /* @__PURE__ */_$.state("y", 0, () => _$.dynamicSubscribers("y"));
|
||||
const _child_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$child_content2, () => _params_2$child_content));
|
||||
const _y = /* @__PURE__ */_$.state("y", (_scope, y) => _y$child_content(_scope, y));
|
||||
const _x_effect = _$.effect("__tests__/template.marko_0_x", (_scope, {
|
||||
x
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
|
||||
@ -7,7 +7,8 @@
|
||||
"$_count$childBody": "o",
|
||||
"$_count": "n",
|
||||
"$_count$child_content_effect": "i",
|
||||
"$_count$child_content": "a"
|
||||
"$_count$child_content": "a",
|
||||
"$_setup$child_content": "m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,4 +7,4 @@ const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _inpu
|
||||
export const _input_content_ = /* @__PURE__ */_$.value("input_content", (_scope, input_content) => _dynamicTagName(_scope, input_content), () => _dynamicTagName);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _input_content_(_scope, input.content), () => _input_content_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 328 (min) 209 (brotli)
|
||||
// size: 318 (min) 207 (brotli)
|
||||
_$.dynamicTagAttrs(0);
|
||||
const _count$child_content_effect = _$.effect(
|
||||
"b0",
|
||||
@ -12,12 +12,15 @@ const _count$child_content_effect = _$.effect(
|
||||
_$.dynamicClosure(1, (_scope, count) => {
|
||||
_$.data(_scope[1], count), _count$child_content_effect(_scope);
|
||||
}),
|
||||
);
|
||||
),
|
||||
_setup$child_content = (_scope) => {
|
||||
_count$child_content._(_scope, _scope._[1]);
|
||||
};
|
||||
_$.register(
|
||||
"b2",
|
||||
_$.createRendererWithOwner("<button> </button>", " D ", void 0, () => [
|
||||
_count$child_content,
|
||||
]),
|
||||
_$.createRendererWithOwner("<button> </button>", " D ", _setup$child_content),
|
||||
);
|
||||
const _count = _$.state(1, (_scope, count) =>
|
||||
_count$child_content(_scope, count),
|
||||
);
|
||||
const _count = _$.state(1, 0, () => _$.dynamicSubscribers(1));
|
||||
init();
|
||||
|
||||
@ -13,8 +13,11 @@ const _count$child_content = _$.registerSubscriber("__tests__/template.marko_1_c
|
||||
_$.data(_scope["#text/1"], count);
|
||||
_count$child_content_effect(_scope);
|
||||
}));
|
||||
const _child_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<button> </button>", /* get, next(1), get */" D ", void 0, () => [_count$child_content]));
|
||||
const _count = /* @__PURE__ */_$.state("count", 0, () => _$.dynamicSubscribers("count"));
|
||||
const _setup$child_content = _scope => {
|
||||
_count$child_content._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _child_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<button> </button>", /* get, next(1), get */" D ", _setup$child_content));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => _count$child_content(_scope, count));
|
||||
export function _setup_(_scope) {
|
||||
_child(_scope["#childScope/0"]);
|
||||
_count(_scope, 0);
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
"$_count": "i",
|
||||
"$_count$falseChild_content_effect": "a",
|
||||
"$_count$falseChild_content": "m",
|
||||
"$_falseChild_content": "s"
|
||||
"$_falseChild_content": "s",
|
||||
"$_setup$falseChild_content": "c"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,4 +7,4 @@ const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _inpu
|
||||
export const _input_content_ = /* @__PURE__ */_$.value("input_content", (_scope, input_content) => _dynamicTagName(_scope, input_content), () => _dynamicTagName);
|
||||
export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _input_content_(_scope, input.content), () => _input_content_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 353 (min) 218 (brotli)
|
||||
// size: 343 (min) 218 (brotli)
|
||||
_$.dynamicTagAttrs(0);
|
||||
const _count$falseChild_content_effect = _$.effect(
|
||||
"b0",
|
||||
@ -13,12 +13,19 @@ const _count$falseChild_content_effect = _$.effect(
|
||||
_$.data(_scope[1], count), _count$falseChild_content_effect(_scope);
|
||||
}),
|
||||
),
|
||||
_setup$falseChild_content = (_scope) => {
|
||||
_count$falseChild_content._(_scope, _scope._[1]);
|
||||
},
|
||||
_falseChild_content = _$.register(
|
||||
"b2",
|
||||
_$.createRendererWithOwner("<button> </button>", " D ", void 0, () => [
|
||||
_count$falseChild_content,
|
||||
]),
|
||||
_$.createRendererWithOwner(
|
||||
"<button> </button>",
|
||||
" D ",
|
||||
_setup$falseChild_content,
|
||||
),
|
||||
);
|
||||
_$.dynamicTagAttrs(0, _falseChild_content);
|
||||
const _count = _$.state(1, 0, () => _$.dynamicSubscribers(1));
|
||||
const _count = _$.state(1, (_scope, count) =>
|
||||
_count$falseChild_content(_scope, count),
|
||||
);
|
||||
init();
|
||||
|
||||
@ -13,10 +13,13 @@ const _count$falseChild_content = _$.registerSubscriber("__tests__/template.mark
|
||||
_$.data(_scope["#text/1"], count);
|
||||
_count$falseChild_content_effect(_scope);
|
||||
}));
|
||||
const _falseChild_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<button> </button>", /* get, next(1), get */" D ", void 0, () => [_count$falseChild_content]));
|
||||
const _setup$falseChild_content = _scope => {
|
||||
_count$falseChild_content._(_scope, _scope._["count"]);
|
||||
};
|
||||
const _falseChild_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner("<button> </button>", /* get, next(1), get */" D ", _setup$falseChild_content));
|
||||
const _falseChild_input = _$.dynamicTagAttrs("#text/0", _falseChild_content);
|
||||
const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", _scope => _falseChild_input(_scope, () => ({})), () => _falseChild_input);
|
||||
const _count = /* @__PURE__ */_$.state("count", 0, () => _$.dynamicSubscribers("count"));
|
||||
const _count = /* @__PURE__ */_$.state("count", (_scope, count) => _count$falseChild_content(_scope, count));
|
||||
export function _setup_(_scope) {
|
||||
_count(_scope, 0);
|
||||
_dynamicTagName(_scope, false || Child || _falseChild_content(_scope));
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 277 (min) 180 (brotli)
|
||||
// size: 263 (min) 174 (brotli)
|
||||
const _expr_selected_num$for_content = _$.intersection(2, (_scope) => {
|
||||
const {
|
||||
_: { 1: selected },
|
||||
@ -12,11 +12,12 @@ _$.effect("a0", (_scope, { 3: num }) =>
|
||||
_selected(_scope._, num);
|
||||
}),
|
||||
);
|
||||
const _selected$for_content = _$.closure(
|
||||
1,
|
||||
const _selected$for_content = _$.loopClosure(
|
||||
0,
|
||||
0,
|
||||
void 0,
|
||||
() => _expr_selected_num$for_content,
|
||||
),
|
||||
_selected = _$.state(1, 0, () => _$.inLoopScope(_selected$for_content, 0));
|
||||
_selected = _$.state(1, (_scope, selected) =>
|
||||
_selected$for_content(_scope, selected),
|
||||
);
|
||||
init();
|
||||
|
||||
@ -21,10 +21,13 @@ const _num$for_content = /* @__PURE__ */_$.value("num", (_scope, num) => {
|
||||
_num$for_content_effect(_scope);
|
||||
}, () => _expr_selected_num$for_content);
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _num$for_content(_scope, _params_2[0]), () => _num$for_content);
|
||||
const _selected$for_content = /* @__PURE__ */_$.closure("selected", 0, void 0, () => _expr_selected_num$for_content);
|
||||
const _for_content = /* @__PURE__ */_$.createRenderer("<button> </button>", /* get, next(1), get */" D ", void 0, () => [_selected$for_content], () => _params_2$for_content);
|
||||
const _selected$for_content = /* @__PURE__ */_$.loopClosure("#text/0", 0, () => _expr_selected_num$for_content);
|
||||
const _setup$for_content = _scope => {
|
||||
_selected$for_content._(_scope, _scope._["selected"]);
|
||||
};
|
||||
const _for_content = /* @__PURE__ */_$.createRenderer("<button> </button>", /* get, next(1), get */" D ", _setup$for_content, () => _params_2$for_content);
|
||||
const _for = /* @__PURE__ */_$.loopOf("#text/0", _for_content);
|
||||
const _selected = /* @__PURE__ */_$.state("selected", 0, () => _$.inLoopScope(_selected$for_content, "#text/0"));
|
||||
const _selected = /* @__PURE__ */_$.state("selected", (_scope, selected) => _selected$for_content(_scope, selected));
|
||||
export function _setup_(_scope) {
|
||||
_selected(_scope, 0);
|
||||
_for(_scope, [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]);
|
||||
|
||||
@ -14,7 +14,9 @@
|
||||
"$_else_content": "m",
|
||||
"$_clickCount$if_content_effect": "u",
|
||||
"$_clickCount$if_content": "l",
|
||||
"$_if_content": "p"
|
||||
"$_if_content": "p",
|
||||
"$_setup$else_content": "_",
|
||||
"$_setup$if_content": "f"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
// size: 498 (min) 263 (brotli)
|
||||
const _clickCount$else_content = _$.closure(1, (_scope, clickCount) =>
|
||||
_$.data(_scope[0], clickCount),
|
||||
// size: 493 (min) 265 (brotli)
|
||||
const _clickCount$else_content = _$.conditionalClosure(
|
||||
0,
|
||||
() => _else_content,
|
||||
(_scope, clickCount) => _$.data(_scope[0], clickCount),
|
||||
),
|
||||
_setup$else_content = (_scope) => {
|
||||
_clickCount$else_content._(_scope, _scope._[1]);
|
||||
},
|
||||
_else_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer(
|
||||
"<span>The button was clicked <!> times.</span>",
|
||||
"Db%",
|
||||
void 0,
|
||||
() => [_clickCount$else_content],
|
||||
_setup$else_content,
|
||||
),
|
||||
),
|
||||
_clickCount$if_content_effect = _$.effect(
|
||||
@ -18,25 +22,28 @@ const _clickCount$else_content = _$.closure(1, (_scope, clickCount) =>
|
||||
_clickCount(_scope._, clickCount + 1);
|
||||
}),
|
||||
),
|
||||
_clickCount$if_content = _$.closure(1, (_scope, clickCount) => {
|
||||
_$.data(_scope[1], clickCount), _clickCount$if_content_effect(_scope);
|
||||
}),
|
||||
_clickCount$if_content = _$.conditionalClosure(
|
||||
0,
|
||||
() => _if_content,
|
||||
(_scope, clickCount) => {
|
||||
_$.data(_scope[1], clickCount), _clickCount$if_content_effect(_scope);
|
||||
},
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_clickCount$if_content._(_scope, _scope._[1]);
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a2",
|
||||
_$.createRenderer("<button> </button>", " D ", void 0, () => [
|
||||
_clickCount$if_content,
|
||||
]),
|
||||
_$.createRenderer("<button> </button>", " D ", _setup$if_content),
|
||||
),
|
||||
_if = _$.conditional(0, 0),
|
||||
_clickCount = _$.state(
|
||||
1,
|
||||
(_scope, clickCount) =>
|
||||
(_scope, clickCount) => {
|
||||
_if(_scope, clickCount < 3 ? _if_content : _else_content),
|
||||
() =>
|
||||
_$.intersections([
|
||||
_if,
|
||||
_$.inConditionalScope(_clickCount$if_content, 0),
|
||||
_$.inConditionalScope(_clickCount$else_content, 0),
|
||||
]),
|
||||
_clickCount$if_content(_scope, clickCount),
|
||||
_clickCount$else_content(_scope, clickCount);
|
||||
},
|
||||
() => _if,
|
||||
);
|
||||
init();
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
export const _template_ = "<div><!></div>";
|
||||
export const _walks_ = /* next(1), replace, out(1) */"D%l";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _clickCount$else_content = /* @__PURE__ */_$.closure("clickCount", (_scope, clickCount) => _$.data(_scope["#text/0"], clickCount));
|
||||
const _else_content = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer("<span>The button was clicked <!> times.</span>", /* next(1), over(1), replace */"Db%", void 0, () => [_clickCount$else_content]));
|
||||
const _clickCount$else_content = /* @__PURE__ */_$.conditionalClosure("#text/0", () => _else_content, (_scope, clickCount) => _$.data(_scope["#text/0"], clickCount));
|
||||
const _setup$else_content = _scope => {
|
||||
_clickCount$else_content._(_scope, _scope._["clickCount"]);
|
||||
};
|
||||
const _else_content = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer("<span>The button was clicked <!> times.</span>", /* next(1), over(1), replace */"Db%", _setup$else_content));
|
||||
const _clickCount$if_content_effect = _$.effect("__tests__/template.marko_1_clickCount", (_scope, {
|
||||
_: {
|
||||
clickCount
|
||||
@ -10,13 +13,20 @@ const _clickCount$if_content_effect = _$.effect("__tests__/template.marko_1_clic
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
_clickCount(_scope._, clickCount + 1), clickCount;
|
||||
}));
|
||||
const _clickCount$if_content = /* @__PURE__ */_$.closure("clickCount", (_scope, clickCount) => {
|
||||
const _clickCount$if_content = /* @__PURE__ */_$.conditionalClosure("#text/0", () => _if_content, (_scope, clickCount) => {
|
||||
_$.data(_scope["#text/1"], clickCount);
|
||||
_clickCount$if_content_effect(_scope);
|
||||
});
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<button> </button>", /* get, next(1), get */" D ", void 0, () => [_clickCount$if_content]));
|
||||
const _setup$if_content = _scope => {
|
||||
_clickCount$if_content._(_scope, _scope._["clickCount"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<button> </button>", /* get, next(1), get */" D ", _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/0", 0);
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => _if(_scope, clickCount < 3 ? _if_content : _else_content), () => _$.intersections([_if, _$.inConditionalScope(_clickCount$if_content, "#text/0"), _$.inConditionalScope(_clickCount$else_content, "#text/0")]));
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => {
|
||||
_if(_scope, clickCount < 3 ? _if_content : _else_content);
|
||||
_clickCount$if_content(_scope, clickCount);
|
||||
_clickCount$else_content(_scope, clickCount);
|
||||
}, () => _if);
|
||||
export function _setup_(_scope) {
|
||||
_clickCount(_scope, 0);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 445 (min) 245 (brotli)
|
||||
// size: 438 (min) 245 (brotli)
|
||||
const _item$for_content = _$.value(2, (_scope, item) =>
|
||||
_$.data(_scope[0], item),
|
||||
),
|
||||
@ -7,7 +7,7 @@ const _item$for_content = _$.value(2, (_scope, item) =>
|
||||
),
|
||||
_for_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer(" ", " ", void 0, void 0, () => _params_2$for_content),
|
||||
_$.createRenderer(" ", " ", void 0, () => _params_2$for_content),
|
||||
),
|
||||
_expr_id_items_effect = _$.effect("a1", (_scope, { 3: id, 4: items }) =>
|
||||
_$.on(_scope[1], "click", function () {
|
||||
|
||||
@ -3,7 +3,7 @@ export const _walks_ = /* next(1), replace, over(1), get, over(1), get, out(1) *
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _item$for_content = /* @__PURE__ */_$.value("item", (_scope, item) => _$.data(_scope["#text/0"], item));
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _item$for_content(_scope, _params_2[0]));
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(" ", /* get */" ", void 0, void 0, () => _params_2$for_content));
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(" ", /* get */" ", void 0, () => _params_2$for_content));
|
||||
const _expr_id_items_effect = _$.effect("__tests__/template.marko_0_id_items", (_scope, {
|
||||
id,
|
||||
items
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
// size: 448 (min) 237 (brotli)
|
||||
// size: 441 (min) 237 (brotli)
|
||||
const _x$for_content = _$.value(2, (_scope, x) => _$.data(_scope[0], x)),
|
||||
_params_2$for_content = _$.value(1, (_scope, _params_2) =>
|
||||
_x$for_content(_scope, _params_2[0]),
|
||||
),
|
||||
_for_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer(
|
||||
"<li> </li>",
|
||||
"D ",
|
||||
void 0,
|
||||
void 0,
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
_$.createRenderer("<li> </li>", "D ", void 0, () => _params_2$for_content),
|
||||
),
|
||||
_for = _$.loopOf(0, _for_content),
|
||||
_list_effect = _$.effect("a1", (_scope, { 4: list }) =>
|
||||
|
||||
@ -3,7 +3,7 @@ export const _walks_ = /* get, over(1), get, over(1), get, over(1) */" b b b";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _x$for_content = /* @__PURE__ */_$.value("x", (_scope, x) => _$.data(_scope["#text/0"], x));
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _x$for_content(_scope, _params_2[0]));
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<li> </li>", /* next(1), get */"D ", void 0, void 0, () => _params_2$for_content));
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<li> </li>", /* next(1), get */"D ", void 0, () => _params_2$for_content));
|
||||
const _for = /* @__PURE__ */_$.loopOf("#ul/0", _for_content);
|
||||
const _list_effect = _$.effect("__tests__/template.marko_0_list", (_scope, {
|
||||
list
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
"$_show_effect": "i",
|
||||
"$_show": "s",
|
||||
"$_message$if_content": "m",
|
||||
"$_if_content": "c"
|
||||
"$_if_content": "c",
|
||||
"$_setup$if_content": "d"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
// size: 326 (min) 205 (brotli)
|
||||
const _message$if_content = _$.closure(3, (_scope, message) =>
|
||||
_$.data(_scope[0], message),
|
||||
// size: 333 (min) 213 (brotli)
|
||||
const _message$if_content = _$.conditionalClosure(
|
||||
1,
|
||||
() => _if_content,
|
||||
(_scope, message) => _$.data(_scope[0], message),
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_message$if_content._(_scope, _scope._[3]);
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"a0",
|
||||
_$.createRenderer("<span> </span>", "D ", void 0, () => [
|
||||
_message$if_content,
|
||||
]),
|
||||
_$.createRenderer("<span> </span>", "D ", _setup$if_content),
|
||||
),
|
||||
_if = _$.conditional(1, 0),
|
||||
_message = _$.state(3, 0, () =>
|
||||
_$.inConditionalScope(_message$if_content, 1),
|
||||
_message = _$.state(3, (_scope, message) =>
|
||||
_message$if_content(_scope, message),
|
||||
),
|
||||
_show_effect = _$.effect("a1", (_scope, { 2: show }) =>
|
||||
_$.on(_scope[0], "click", function () {
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
export const _template_ = "<button></button><!><!>";
|
||||
export const _walks_ = /* get, over(1), replace, over(1) */" b%bD";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
const _message$if_content = /* @__PURE__ */_$.closure("message", (_scope, message) => _$.data(_scope["#text/0"], message));
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", void 0, () => [_message$if_content]));
|
||||
const _message$if_content = /* @__PURE__ */_$.conditionalClosure("#text/1", () => _if_content, (_scope, message) => _$.data(_scope["#text/0"], message));
|
||||
const _setup$if_content = _scope => {
|
||||
_message$if_content._(_scope, _scope._["message"]);
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/1", 0);
|
||||
const _message = /* @__PURE__ */_$.state("message", 0, () => _$.inConditionalScope(_message$if_content, "#text/1"));
|
||||
const _message = /* @__PURE__ */_$.state("message", (_scope, message) => _message$if_content(_scope, message));
|
||||
const _show_effect = _$.effect("__tests__/template.marko_0_show", (_scope, {
|
||||
show
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
"$_content_input": "u",
|
||||
"$_content_": "b",
|
||||
"$_clickCount$FancyButton_content": "f",
|
||||
"$_FancyButton_content": "g"
|
||||
"$_FancyButton_content": "g",
|
||||
"$_setup$FancyButton_content": "l"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,4 +15,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_content_(_scope, input.content);
|
||||
}, () => _content_);
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/FancyButton.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/FancyButton.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 577 (min) 316 (brotli)
|
||||
// size: 549 (min) 305 (brotli)
|
||||
const _content_input = _$.dynamicTagAttrs(1),
|
||||
_dynamicTagName = _$.conditional(
|
||||
1,
|
||||
@ -27,20 +27,23 @@ const _content_input = _$.dynamicTagAttrs(1),
|
||||
_$.data(_scope[0], clickCount),
|
||||
),
|
||||
),
|
||||
_setup$FancyButton_content = (_scope) => {
|
||||
_clickCount$FancyButton_content._(_scope, _scope._[1]);
|
||||
},
|
||||
_FancyButton_content = _$.register(
|
||||
"b2",
|
||||
_$.createRendererWithOwner(" ", " ", void 0, () => [
|
||||
_clickCount$FancyButton_content,
|
||||
]),
|
||||
_$.createRendererWithOwner(" ", " ", _setup$FancyButton_content),
|
||||
),
|
||||
_clickCount = _$.state(
|
||||
1,
|
||||
(_scope, clickCount) =>
|
||||
(_scope, clickCount) => {
|
||||
_input_(_scope[0], {
|
||||
onClick: _onClick(_scope),
|
||||
content: _FancyButton_content(_scope),
|
||||
}),
|
||||
() => _$.intersections([_$.inChild(0, _input_), _$.dynamicSubscribers(1)]),
|
||||
_clickCount$FancyButton_content(_scope, clickCount);
|
||||
},
|
||||
() => _$.inChild(0, _input_),
|
||||
);
|
||||
function _onClick(_scope, { 1: clickCount } = _scope) {
|
||||
return function () {
|
||||
|
||||
@ -3,11 +3,17 @@ export const _walks_ = /* beginChild, _FancyButton_walks, endChild */`/${_FancyB
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
import { _setup_ as _FancyButton, _input_ as _FancyButton_input, _template_ as _FancyButton_template, _walks_ as _FancyButton_walks } from "./tags/FancyButton.marko";
|
||||
const _clickCount$FancyButton_content = _$.registerSubscriber("__tests__/template.marko_1_clickCount/subscriber", /* @__PURE__ */_$.dynamicClosure("clickCount", (_scope, clickCount) => _$.data(_scope["#text/0"], clickCount)));
|
||||
const _FancyButton_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(" ", /* get */" ", void 0, () => [_clickCount$FancyButton_content]));
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => _FancyButton_input(_scope["#childScope/0"], {
|
||||
onClick: _onClick(_scope),
|
||||
content: _FancyButton_content(_scope)
|
||||
}), () => _$.intersections([_$.inChild("#childScope/0", _FancyButton_input), _$.dynamicSubscribers("clickCount")]));
|
||||
const _setup$FancyButton_content = _scope => {
|
||||
_clickCount$FancyButton_content._(_scope, _scope._["clickCount"]);
|
||||
};
|
||||
const _FancyButton_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRendererWithOwner(" ", /* get */" ", _setup$FancyButton_content));
|
||||
const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => {
|
||||
_FancyButton_input(_scope["#childScope/0"], {
|
||||
onClick: _onClick(_scope),
|
||||
content: _FancyButton_content(_scope)
|
||||
});
|
||||
_clickCount$FancyButton_content(_scope, clickCount);
|
||||
}, () => _$.inChild("#childScope/0", _FancyButton_input));
|
||||
export function _setup_(_scope) {
|
||||
_FancyButton(_scope["#childScope/0"]);
|
||||
_clickCount(_scope, 0);
|
||||
|
||||
@ -30,4 +30,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_write_(_scope, input.write);
|
||||
}, () => _$.intersections([_name_, _write_]));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 787 (min) 404 (brotli)
|
||||
// size: 788 (min) 404 (brotli)
|
||||
const _expr_name_write_effect = _$.effect(
|
||||
"a0",
|
||||
(_scope, { 5: name, 6: write }) => {
|
||||
@ -21,10 +21,9 @@ const _expr_name_write_effect = _$.effect(
|
||||
},
|
||||
() => _expr_name_write,
|
||||
),
|
||||
_write$for_content = _$.closure(
|
||||
4,
|
||||
_write$for_content = _$.loopClosure(
|
||||
2,
|
||||
(_scope, write) => _write_(_scope[0], write),
|
||||
void 0,
|
||||
() => _$.inChild(0, _write_),
|
||||
),
|
||||
_item$for_content = _$.value(
|
||||
@ -38,7 +37,7 @@ const _expr_name_write_effect = _$.effect(
|
||||
() => _item$for_content,
|
||||
),
|
||||
_setup$for_content = (_scope) => {
|
||||
_scope[0];
|
||||
_write$for_content._(_scope, _scope._[4]), _scope[0];
|
||||
},
|
||||
_for_content = _$.register(
|
||||
"b1",
|
||||
@ -46,7 +45,6 @@ const _expr_name_write_effect = _$.effect(
|
||||
"<div> </div><span> </span><p> </p>",
|
||||
"/D lD lD l&",
|
||||
_setup$for_content,
|
||||
() => [_write$for_content],
|
||||
() => _params_2$for_content,
|
||||
),
|
||||
),
|
||||
|
||||
@ -2,15 +2,16 @@ export const _template_ = "<button>Toggle</button><div></div><!><!>";
|
||||
export const _walks_ = /* get, over(1), get, over(1), replace, over(1) */" b b%bD";
|
||||
import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
import { _setup_ as _child, _write_ as _child_input_write, _name_ as _child_input_name, _template_ as _child_template, _walks_ as _child_walks } from "./tags/child.marko";
|
||||
const _write$for_content = /* @__PURE__ */_$.closure("write", (_scope, write) => _child_input_write(_scope["#childScope/0"], write), void 0, () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _write$for_content = /* @__PURE__ */_$.loopClosure("#text/2", (_scope, write) => _child_input_write(_scope["#childScope/0"], write), () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _item$for_content = /* @__PURE__ */_$.value("item", (_scope, item) => _child_input_name(_scope["#childScope/0"], item), () => _$.inChild("#childScope/0", _child_input_name));
|
||||
const _params_2$for_content = /* @__PURE__ */_$.value("_params_2", (_scope, _params_2) => _item$for_content(_scope, _params_2[0]), () => _item$for_content);
|
||||
const _setup$for_content = _scope => {
|
||||
_write$for_content._(_scope, _scope._["write"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
};
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$for_content, () => [_write$for_content], () => _params_2$for_content));
|
||||
const _for_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$for_content, () => _params_2$for_content));
|
||||
const _for = /* @__PURE__ */_$.loopOf("#text/2", _for_content);
|
||||
const _write = /* @__PURE__ */_$.value("write", 0, () => _$.inLoopScope(_write$for_content, "#text/2"));
|
||||
const _write = /* @__PURE__ */_$.value("write", 0);
|
||||
const _items_effect = _$.effect("__tests__/template.marko_0_items", (_scope, {
|
||||
items
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
|
||||
@ -335,8 +335,8 @@ Outer destroyed
|
||||
Outer mounted
|
||||
Middle mounted
|
||||
Inner mounted
|
||||
Outer destroyed
|
||||
Middle destroyed
|
||||
Inner destroyed
|
||||
Middle destroyed
|
||||
Outer destroyed
|
||||
</pre>
|
||||
```
|
||||
@ -363,10 +363,19 @@ inserted div4
|
||||
removed #text after div4
|
||||
inserted div4/div3
|
||||
removed #text after div4/div3
|
||||
div4/div0/#text0: "" => "Outer"
|
||||
div4/span1/#text0: "" => "Outer"
|
||||
div4/p2/#text0: "" => "Outer"
|
||||
inserted div4/div3/div3
|
||||
inserted div4/div3/span4
|
||||
inserted div4/div3/p5
|
||||
removed #text after div4/div3/p5
|
||||
div4/div3/div0/#text0: "" => "Middle"
|
||||
div4/div3/span1/#text0: "" => "Middle"
|
||||
div4/div3/p2/#text0: "" => "Middle"
|
||||
div4/div3/div3/#text0: "" => "Inner"
|
||||
div4/div3/span4/#text0: "" => "Inner"
|
||||
div4/div3/p5/#text0: "" => "Inner"
|
||||
removed #text in pre3
|
||||
inserted #text
|
||||
removed #text in pre3
|
||||
@ -406,9 +415,9 @@ Outer destroyed
|
||||
Outer mounted
|
||||
Middle mounted
|
||||
Inner mounted
|
||||
Outer destroyed
|
||||
Middle destroyed
|
||||
Inner destroyed
|
||||
Middle destroyed
|
||||
Outer destroyed
|
||||
</pre>
|
||||
<!---->
|
||||
```
|
||||
|
||||
@ -30,4 +30,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_write_(_scope, input.write);
|
||||
}, () => _$.intersections([_name_, _write_]));
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -1,4 +1,4 @@
|
||||
// size: 1525 (min) 554 (brotli)
|
||||
// size: 1549 (min) 557 (brotli)
|
||||
const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
_expr_name_write_effect = _$.effect("a0", (_scope, { 5: name, 6: write }) => {
|
||||
write(`${name} mounted`),
|
||||
@ -26,13 +26,13 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
() => _$.inChild(0, _write_),
|
||||
),
|
||||
_setup$if_content3 = (_scope) => {
|
||||
_scope[0], _name_(_scope[0], "Inner");
|
||||
_write$if_content3._(_scope, _scope._._._[8]),
|
||||
_scope[0],
|
||||
_name_(_scope[0], "Inner");
|
||||
},
|
||||
_if_content3 = _$.register(
|
||||
"b1",
|
||||
_$.createRenderer(_template_, "/D%lD%lD%l&", _setup$if_content3, () => [
|
||||
_write$if_content3,
|
||||
]),
|
||||
_$.createRenderer(_template_, "/D%lD%lD%l&", _setup$if_content3),
|
||||
),
|
||||
_if$if_content = _$.conditional(1, 0),
|
||||
_write$if_content2 = _$.dynamicClosure(
|
||||
@ -52,7 +52,10 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
),
|
||||
),
|
||||
_setup$if_content2 = (_scope) => {
|
||||
_scope[0], _name_(_scope[0], "Middle");
|
||||
_write$if_content2._(_scope, _scope._._[8]),
|
||||
_scope[0],
|
||||
_showInner$if_content._(_scope, _scope._._[7]),
|
||||
_name_(_scope[0], "Middle");
|
||||
},
|
||||
_if_content2 = _$.register(
|
||||
"b3",
|
||||
@ -60,25 +63,27 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
`<div>${_template_}<!></div>`,
|
||||
"D/D%lD%lD%l&%",
|
||||
_setup$if_content2,
|
||||
() => [_write$if_content2, _showInner$if_content],
|
||||
),
|
||||
),
|
||||
_if$if_content2 = _$.conditional(1, 0),
|
||||
_write$if_content = _$.closure(
|
||||
8,
|
||||
_write$if_content = _$.conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
(_scope, write) => _write_(_scope[0], write),
|
||||
void 0,
|
||||
() => _$.inChild(0, _write_),
|
||||
),
|
||||
_showMiddle$if_content = _$.closure(
|
||||
6,
|
||||
_showMiddle$if_content = _$.conditionalClosure(
|
||||
4,
|
||||
() => _if_content,
|
||||
(_scope, showMiddle) =>
|
||||
_if$if_content2(_scope, showMiddle ? _if_content2 : null),
|
||||
void 0,
|
||||
() => _if$if_content2,
|
||||
),
|
||||
_setup$if_content = (_scope) => {
|
||||
_scope[0], _name_(_scope[0], "Outer");
|
||||
_write$if_content._(_scope, _scope._[8]),
|
||||
_scope[0],
|
||||
_showMiddle$if_content._(_scope, _scope._[6]),
|
||||
_name_(_scope[0], "Outer");
|
||||
},
|
||||
_if_content = _$.register(
|
||||
"b4",
|
||||
@ -86,7 +91,6 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
`<div>${_template_}<!></div>`,
|
||||
"D/D%lD%lD%l&%",
|
||||
_setup$if_content,
|
||||
() => [_write$if_content, _showMiddle$if_content],
|
||||
),
|
||||
),
|
||||
_if = _$.conditional(4, 0),
|
||||
@ -95,21 +99,17 @@ const _template_ = "<div><!> a</div><span><!> a</span><p><!> a</p>",
|
||||
_showInner(_scope, !showInner);
|
||||
}),
|
||||
),
|
||||
_showInner = _$.state(
|
||||
7,
|
||||
(_scope, showInner) => _showInner_effect(_scope),
|
||||
() => _$.dynamicSubscribers(7),
|
||||
),
|
||||
_showInner = _$.state(7, (_scope, showInner) => {
|
||||
_showInner_effect(_scope), _showInner$if_content(_scope, showInner);
|
||||
}),
|
||||
_showMiddle_effect = _$.effect("b6", (_scope, { 6: showMiddle }) =>
|
||||
_$.on(_scope[1], "click", function () {
|
||||
_showMiddle(_scope, !showMiddle);
|
||||
}),
|
||||
),
|
||||
_showMiddle = _$.state(
|
||||
6,
|
||||
(_scope, showMiddle) => _showMiddle_effect(_scope),
|
||||
() => _$.inConditionalScope(_showMiddle$if_content, 4),
|
||||
),
|
||||
_showMiddle = _$.state(6, (_scope, showMiddle) => {
|
||||
_showMiddle_effect(_scope), _showMiddle$if_content(_scope, showMiddle);
|
||||
}),
|
||||
_showOuter_effect = _$.effect("b7", (_scope, { 5: showOuter }) =>
|
||||
_$.on(_scope[0], "click", function () {
|
||||
_showOuter(_scope, !showOuter);
|
||||
|
||||
@ -4,40 +4,51 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
|
||||
import { _setup_ as _child, _write_ as _child_input_write, _name_ as _child_input_name, _template_ as _child_template, _walks_ as _child_walks } from "./tags/child.marko";
|
||||
const _write$if_content3 = /* @__PURE__ */_$.dynamicClosure("write", (_scope, write) => _child_input_write(_scope["#childScope/0"], write), _scope => _scope._._._, () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _setup$if_content3 = _scope => {
|
||||
_write$if_content3._(_scope, _scope._._._["write"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
_child_input_name(_scope["#childScope/0"], "Inner");
|
||||
};
|
||||
const _if_content3 = _$.register("__tests__/template.marko_3_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$if_content3, () => [_write$if_content3]));
|
||||
const _if_content3 = _$.register("__tests__/template.marko_3_renderer", /* @__PURE__ */_$.createRenderer(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, _setup$if_content3));
|
||||
const _if$if_content = /* @__PURE__ */_$.conditional("#text/1", 0);
|
||||
const _write$if_content2 = /* @__PURE__ */_$.dynamicClosure("write", (_scope, write) => _child_input_write(_scope["#childScope/0"], write), _scope => _scope._._, () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _showInner$if_content = _$.registerSubscriber("__tests__/template.marko_2_showInner/subscriber", /* @__PURE__ */_$.dynamicClosure("showInner", (_scope, showInner) => _if$if_content(_scope, showInner ? _if_content3 : null), _scope => _scope._._, () => _if$if_content));
|
||||
const _setup$if_content2 = _scope => {
|
||||
_write$if_content2._(_scope, _scope._._["write"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
_showInner$if_content._(_scope, _scope._._["showInner"]);
|
||||
_child_input_name(_scope["#childScope/0"], "Middle");
|
||||
};
|
||||
const _if_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace */`D/${_child_walks}&%`, _setup$if_content2, () => [_write$if_content2, _showInner$if_content]));
|
||||
const _if_content2 = _$.register("__tests__/template.marko_2_renderer", /* @__PURE__ */_$.createRenderer(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace */`D/${_child_walks}&%`, _setup$if_content2));
|
||||
const _if$if_content2 = /* @__PURE__ */_$.conditional("#text/1", 0);
|
||||
const _write$if_content = /* @__PURE__ */_$.closure("write", (_scope, write) => _child_input_write(_scope["#childScope/0"], write), void 0, () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _showMiddle$if_content = /* @__PURE__ */_$.closure("showMiddle", (_scope, showMiddle) => _if$if_content2(_scope, showMiddle ? _if_content2 : null), void 0, () => _if$if_content2);
|
||||
const _write$if_content = /* @__PURE__ */_$.conditionalClosure("#text/4", () => _if_content, (_scope, write) => _child_input_write(_scope["#childScope/0"], write), () => _$.inChild("#childScope/0", _child_input_write));
|
||||
const _showMiddle$if_content = /* @__PURE__ */_$.conditionalClosure("#text/4", () => _if_content, (_scope, showMiddle) => _if$if_content2(_scope, showMiddle ? _if_content2 : null), () => _if$if_content2);
|
||||
const _setup$if_content = _scope => {
|
||||
_write$if_content._(_scope, _scope._["write"]);
|
||||
_child(_scope["#childScope/0"]);
|
||||
_showMiddle$if_content._(_scope, _scope._["showMiddle"]);
|
||||
_child_input_name(_scope["#childScope/0"], "Outer");
|
||||
};
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace */`D/${_child_walks}&%`, _setup$if_content, () => [_write$if_content, _showMiddle$if_content]));
|
||||
const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace */`D/${_child_walks}&%`, _setup$if_content));
|
||||
const _if = /* @__PURE__ */_$.conditional("#text/4", 0);
|
||||
const _write = /* @__PURE__ */_$.value("write", 0, () => _$.intersections([_$.inConditionalScope(_write$if_content, "#text/4"), _$.dynamicSubscribers("write")]));
|
||||
const _write = /* @__PURE__ */_$.value("write", 0);
|
||||
const _showInner_effect = _$.effect("__tests__/template.marko_0_showInner", (_scope, {
|
||||
showInner
|
||||
}) => _$.on(_scope["#button/2"], "click", function () {
|
||||
_showInner(_scope, !showInner);
|
||||
}));
|
||||
const _showInner = /* @__PURE__ */_$.state("showInner", (_scope, showInner) => _showInner_effect(_scope), () => _$.dynamicSubscribers("showInner"));
|
||||
const _showInner = /* @__PURE__ */_$.state("showInner", (_scope, showInner) => {
|
||||
_showInner_effect(_scope);
|
||||
_showInner$if_content(_scope, showInner);
|
||||
});
|
||||
const _showMiddle_effect = _$.effect("__tests__/template.marko_0_showMiddle", (_scope, {
|
||||
showMiddle
|
||||
}) => _$.on(_scope["#button/1"], "click", function () {
|
||||
_showMiddle(_scope, !showMiddle);
|
||||
}));
|
||||
const _showMiddle = /* @__PURE__ */_$.state("showMiddle", (_scope, showMiddle) => _showMiddle_effect(_scope), () => _$.inConditionalScope(_showMiddle$if_content, "#text/4"));
|
||||
const _showMiddle = /* @__PURE__ */_$.state("showMiddle", (_scope, showMiddle) => {
|
||||
_showMiddle_effect(_scope);
|
||||
_showMiddle$if_content(_scope, showMiddle);
|
||||
});
|
||||
const _showOuter_effect = _$.effect("__tests__/template.marko_0_showOuter", (_scope, {
|
||||
showOuter
|
||||
}) => _$.on(_scope["#button/0"], "click", function () {
|
||||
|
||||
@ -335,8 +335,8 @@ Outer destroyed
|
||||
Outer mounted
|
||||
Middle mounted
|
||||
Inner mounted
|
||||
Outer destroyed
|
||||
Middle destroyed
|
||||
Inner destroyed
|
||||
Middle destroyed
|
||||
Outer destroyed
|
||||
</pre>
|
||||
```
|
||||
@ -517,10 +517,19 @@ inserted #document/html0/body1/div8
|
||||
removed #comment after #document/html0/body1/div8
|
||||
inserted #document/html0/body1/div8/div3
|
||||
removed #text after #document/html0/body1/div8/div3
|
||||
#document/html0/body1/div8/div0/#text0: "" => "Outer"
|
||||
#document/html0/body1/div8/span1/#text0: "" => "Outer"
|
||||
#document/html0/body1/div8/p2/#text0: "" => "Outer"
|
||||
inserted #document/html0/body1/div8/div3/div3
|
||||
inserted #document/html0/body1/div8/div3/span4
|
||||
inserted #document/html0/body1/div8/div3/p5
|
||||
removed #text after #document/html0/body1/div8/div3/p5
|
||||
#document/html0/body1/div8/div3/div0/#text0: "" => "Middle"
|
||||
#document/html0/body1/div8/div3/span1/#text0: "" => "Middle"
|
||||
#document/html0/body1/div8/div3/p2/#text0: "" => "Middle"
|
||||
#document/html0/body1/div8/div3/div3/#text0: "" => "Inner"
|
||||
#document/html0/body1/div8/div3/span4/#text0: "" => "Inner"
|
||||
#document/html0/body1/div8/div3/p5/#text0: "" => "Inner"
|
||||
removed #text in #document/html0/body1/pre6
|
||||
inserted #text
|
||||
removed #text in #document/html0/body1/pre6
|
||||
@ -566,9 +575,9 @@ Outer destroyed
|
||||
Outer mounted
|
||||
Middle mounted
|
||||
Inner mounted
|
||||
Outer destroyed
|
||||
Middle destroyed
|
||||
Inner destroyed
|
||||
Middle destroyed
|
||||
Outer destroyed
|
||||
</pre>
|
||||
<!--M_*0 #pre/3-->
|
||||
<!--M_|0 #text/4 1-->
|
||||
|
||||
@ -15,4 +15,4 @@ export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => {
|
||||
_input__effect(_scope);
|
||||
});
|
||||
export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]));
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, void 0, () => _params__);
|
||||
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _template_, _walks_, _setup_, () => _params__);
|
||||
@ -76,10 +76,10 @@ container.querySelector("button").click()
|
||||
</button>
|
||||
<div>
|
||||
|
||||
destroyed 3
|
||||
destroyed 3.1
|
||||
destroyed 3.2
|
||||
destroyed 3.3
|
||||
destroyed 3
|
||||
destroyed 1.3
|
||||
destroyed 2.3
|
||||
</div>
|
||||
|
||||
@ -82,10 +82,10 @@ container.querySelector("button").click()
|
||||
</button>
|
||||
<div>
|
||||
|
||||
destroyed 3
|
||||
destroyed 3.1
|
||||
destroyed 3.2
|
||||
destroyed 3.3
|
||||
destroyed 3
|
||||
destroyed 1.3
|
||||
destroyed 2.3
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user