From 4ed82e203b4a82742953790be8a5be9edf6780d9 Mon Sep 17 00:00:00 2001 From: dpiercey Date: Mon, 3 Feb 2025 11:38:49 -0700 Subject: [PATCH] chore: update snapshots --- .../__snapshots__/html.expected/template.js | 5 ++- .../html.expected/tags/custom-tag/index.js | 6 +++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/hello/index.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 16 ++++++--- .../html.expected/tags/my-button.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/my-button.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/my-button.js | 7 +++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/my-button.js | 6 +++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/my-button.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/my-button.js | 5 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 6 +++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../html.expected/tags/comments.js | 15 +++++--- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/layout.js | 4 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 12 +++++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 13 +++++-- .../__snapshots__/html.expected/tags/child.js | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 12 ++++--- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 6 ++-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 5 ++- .../html.expected/tags/FancyButton.js | 5 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 19 +++++++---- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 13 +++++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 19 +++++++---- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/ssr-sanitized.expected.md | 6 ---- .../__snapshots__/ssr.expected.md | 34 ++----------------- .../tags/display-intersection.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 6 ++-- .../html.expected/tags/checkbox.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/checkbox.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/.name-cache.json | 6 +++- .../dom.expected/template.hydrate.js | 28 ++++++++++++--- .../__snapshots__/dom.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/resume.expected.md | 4 +-- .../__snapshots__/ssr.expected.md | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 13 ++++--- .../html.expected/tags/my-let.js | 4 ++- .../html.expected/tags/my-tag.js | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/custom-tag.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/custom-tag.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/custom-tag.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/child/index.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/tags/child.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/tags/child.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/tags/child.js | 4 +-- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 10 ++++-- .../__snapshots__/html.expected/template.js | 8 +++-- .../html.expected/tags/custom-tag.js | 4 +-- .../__snapshots__/html.expected/template.js | 17 ++++++---- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../html.expected/tags/custom-tag.js | 4 +-- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../html.expected/tags/tag-a/index.js | 6 +++- .../html.expected/tags/tag-b/index.js | 6 +++- .../__snapshots__/html.expected/template.js | 14 +++++++- .../html.expected/tags/custom-tag.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/child/index.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 29 ++++++++++++---- .../__snapshots__/html.expected/template.js | 10 ++++-- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 10 ++++-- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/tags/parent-el.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 6 ++-- .../__snapshots__/html.expected/template.js | 14 ++++---- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/tags/child.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 6 +++- .../__snapshots__/html.expected/template.js | 6 +++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 7 +++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 8 +++-- .../html.expected/tags/2counters.js | 5 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../html.expected/tags/hello-setter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 6 +++- .../__snapshots__/html.expected/template.js | 18 ++++++---- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/tags/child.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 7 +++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 7 +++- .../__snapshots__/html.expected/template.js | 4 +-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 8 +++-- .../__snapshots__/html.expected/template.js | 14 +++++--- .../__snapshots__/html.expected/template.js | 14 +++++--- .../__snapshots__/html.expected/template.js | 18 ++++++---- .../__snapshots__/html.expected/template.js | 8 ++--- .../html.expected/tags/counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/template.js | 5 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/components/custom-tag.js | 5 ++- .../__snapshots__/ssr.expected.md | 4 +-- .../html.expected/components/tags-counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../__snapshots__/html.expected/tags/hello.js | 4 +-- .../html.expected/components/tags-counter.js | 4 ++- .../__snapshots__/html.expected/template.js | 4 ++- .../html.expected/components/tags-layout.js | 4 ++- .../__snapshots__/resume.expected.md | 12 +++---- .../__snapshots__/ssr.expected.md | 4 +-- .../html.expected/components/tags-layout.js | 4 ++- .../__snapshots__/resume.expected.md | 12 +++---- .../__snapshots__/ssr.expected.md | 4 +-- .../__snapshots__/html.expected/template.js | 8 +++-- .../html.expected/components/tags-layout.js | 4 ++- .../__snapshots__/resume.expected.md | 12 +++---- .../__snapshots__/ssr.expected.md | 4 +-- .../__snapshots__/html.expected/template.js | 9 +++-- .../__snapshots__/html.expected/template.js | 4 ++- 230 files changed, 991 insertions(+), 464 deletions(-) diff --git a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js index 26ffa471e9..2aa261eea3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js @@ -5,8 +5,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const lastClickCount = undefined; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.escapeXML(clickCount)}${_$.markResumeNode(_scope0_id, "#text/1")} was ${_$.escapeXML(lastClickCount)}${_$.markResumeNode(_scope0_id, "#text/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "6:6", + "lastClickCount": "7:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/tags/custom-tag/index.js b/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/tags/custom-tag/index.js index ed29eecbf6..d1f1a81423 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/tags/custom-tag/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/tags/custom-tag/index.js @@ -10,9 +10,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", content, {}); _$.write(`
${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/1")}
`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/custom-tag/index.marko", 0, { + "_pattern_": "1:17", + "x": "1:19", + "content": "1:22" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js index c5a61d499e..c48c94c9c0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js @@ -27,8 +27,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _customTag({ thing: _thing }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "x": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js index 783da43f16..8678217dd7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js @@ -4,8 +4,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _childScope = _$.peekNextScope(); _hello({}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js index 4666b519f3..0e9f584989 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js @@ -24,9 +24,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write("Body content"); }), "__tests__/template.marko_1_renderer", _scope0_id)); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(x) + }), "__tests__/template.marko", 0, { + "x": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js index a7dbc85a8f..c79da06825 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js @@ -7,8 +7,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; const _childScope = _$.peekNextScope(); _hello({}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js index a6b8208a4c..b286854885 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js @@ -4,8 +4,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _childScope = _$.peekNextScope(); _hello({}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/tags/hello/index.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/tags/hello/index.js index 8fcbbc9cd2..51fbbe419c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/tags/hello/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/tags/hello/index.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", input.foo, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(input.foo) - }); + }), "__tests__/tags/hello/index.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/hello/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/template.js index c361b822b2..047b2ed467 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags/__snapshots__/html.expected/template.js @@ -11,8 +11,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }), "__tests__/template.marko_1_renderer", _scope0_id) }) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js index a193fa2329..99d6ab19a6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const disabled = true; _$.write(`${_$.markResumeNode(_scope0_id, "#input/0")}${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_disabled"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "disabled": disabled + }), "__tests__/template.marko", 0, { + "disabled": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js index 417aab566b..ab60dab7d8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js @@ -38,13 +38,16 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }), "__tests__/template.marko_1_renderer", _scope0_id) }) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "c": c, "d": d, "#childScope/1": _$.writeExistingScope(_childScope), "#childScope/2": _$.writeExistingScope(_childScope2), "#text/3!": _$.writeExistingScope(_dynamicScope), "#text/3(": _$.normalizeDynamicRenderer(input.test) + }), "__tests__/template.marko", 0, { + "c": "2:10", + "d": "2:13" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js index bbc3af2faa..d9d9de6fcd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js @@ -2,9 +2,9 @@ import * as _$ from "@marko/runtime-tags/debug/html"; const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_foo": input.foo, "input_bar": input.bar - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js index e58907a4c0..dbac85a065 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js @@ -40,12 +40,15 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }), "__tests__/template.marko_1_renderer", _scope0_id) }) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/1": _$.writeExistingScope(_childScope), "#childScope/2": _$.writeExistingScope(_childScope2), "#childScope/3": _$.writeExistingScope(_childScope3), "#text/4!": _$.writeExistingScope(_dynamicScope), "#text/4(": _$.normalizeDynamicRenderer(test) + }), "__tests__/template.marko", 0, { + "color": "1:10", + "test": "1:17" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js index 280636f68b..95ee639140 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js @@ -8,8 +8,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { 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, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "5:4", { + "value": "5:10" }); _$.resumeClosestBranch(_scope1_id); }); @@ -17,8 +19,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { 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, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "9:4", { + "value": "9:10" }); _$.resumeClosestBranch(_scope2_id); }); @@ -26,15 +30,19 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { 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, { + _$.debug(_$.writeScope(_scope3_id, { "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "13:4", { + "value": "13:10" }); _$.resumeClosestBranch(_scope3_id); }); _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/tags/my-button.js index 563e3f8777..86c85b5cf5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/tags/my-button.js @@ -7,8 +7,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick + }), "__tests__/tags/my-button.marko", 0, { + "onClick": "1:10", + "text": "1:19" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js index 4436819a4b..e2afbc31dd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js @@ -10,9 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { clickCount++; }, "__tests__/template.marko_0/onClick", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/tags/my-button.js index 50f13d6a8e..92857833a1 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/tags/my-button.js @@ -10,8 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = attrs; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick + }), "__tests__/tags/my-button.marko", 0, { + "text": "2:10", + "onClick": "3:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js index 4436819a4b..e2afbc31dd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js @@ -10,9 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { clickCount++; }, "__tests__/template.marko_0/onClick", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/tags/my-button.js index 878d2a7b6c..af2e2418ab 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/tags/my-button.js @@ -14,8 +14,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick + }), "__tests__/tags/my-button.marko", 0, { + "onClick": "1:10", + "_pattern_": "1:26", + "text": "1:28", + "textAlias": "2:25" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js index 3318065b10..61a2f00a13 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js @@ -21,10 +21,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { text: clickCount }) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/tags/my-button.js index dda3caa8a1..7f386daac2 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/tags/my-button.js @@ -10,8 +10,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick + }), "__tests__/tags/my-button.marko", 0, { + "onClick": "1:10", + "text": "1:19", + "textAlias": "2:16" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js index 4436819a4b..e2afbc31dd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js @@ -10,9 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { clickCount++; }, "__tests__/template.marko_0/onClick", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/tags/my-button.js index 563e3f8777..86c85b5cf5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/tags/my-button.js @@ -7,8 +7,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick + }), "__tests__/tags/my-button.marko", 0, { + "onClick": "1:10", + "text": "1:19" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js index 4436819a4b..e2afbc31dd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js @@ -10,9 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { clickCount++; }, "__tests__/template.marko_0/onClick", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/tags/my-button.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/tags/my-button.js index eb4f2afe23..0cb15feabb 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/tags/my-button.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/tags/my-button.js @@ -10,10 +10,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/1", content, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/my-button.marko_0_onClick"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onClick": onClick, "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/my-button.marko", 0, { + "onClick": "1:10", + "content": "1:19" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-button.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js index 62dae71db0..69bcc24d3d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js @@ -12,15 +12,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(clickCount)}${_$.markResumeNode(_scope1_id, "#text/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_clickCount/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js index 151dbd3a64..2d8ba670c5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const clickCount = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/tags/counter.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/template.js index f29868a7af..202a7c46e4 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/template.js @@ -6,8 +6,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope = _$.peekNextScope(); _counter({}); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/html.expected/template.js index e48a90f36d..786a500024 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/html.expected/template.js @@ -9,20 +9,23 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write(`The count is ${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "5:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "count": count, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6", + "count": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js index 957340ffdf..2bdf9568ca 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js @@ -9,20 +9,23 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "5:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "count": count, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6", + "count": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js index 753204be05..0a0ae26f5d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js @@ -7,15 +7,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (true) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(a + b)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "3:2"); _ifScopeId = _scope1_id; } - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "a": a, "b": b, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "a": "1:6", + "b": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js index 8755893c09..d2f1b4e7cd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }, "__tests__/template.marko_0/increment", _scope0_id); _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_increment"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "increment": increment + }), "__tests__/template.marko", 0, { + "clickCount": "1:6", + "increment": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js index aac2029be5..8415c532c5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js @@ -7,9 +7,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#button/2")}
${_$.escapeXML(multipliedCount)}${_$.markResumeNode(_scope0_id, "#text/3")}
`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_multiplier"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "multiplier": multiplier + }), "__tests__/template.marko", 0, { + "count": "1:6", + "multiplier": "2:6", + "multipliedCount": "3:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js index fce01b6450..374a48cc7f 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const clickCount = 0; _$.write(`
${_$.markResumeNode(_scope0_id, "#button/0")}
`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-dynamic-native-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-dynamic-native-tag/__snapshots__/html.expected/template.js index 571ffb369d..771c444a7d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-dynamic-native-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-dynamic-native-tag/__snapshots__/html.expected/template.js @@ -11,9 +11,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write("Hello World"); }), "__tests__/template.marko_1_renderer", _scope0_id)); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(tagName) + }), "__tests__/template.marko", 0, { + "tagName": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js index 0b77ac3869..aea816770e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js @@ -11,18 +11,21 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(message.text)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "8:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/1"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "message_text": message?.text, "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "message": "1:6", + "show": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js index 1ce95da7fd..ecf9062d43 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js index 0a0045693f..4f521b575c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js @@ -5,9 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const b = 1; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_a_b"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "a": a, "b": b + }), "__tests__/template.marko", 0, { + "a": "1:6", + "b": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js index 5f7657cb29..66f46d0b4d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js @@ -17,10 +17,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { comments: comment.comments, path: id }); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "#childScope/0": _$.writeExistingScope(_childScope), "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/tags/comments.marko", "10:8"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/tags/comments.marko_2_renderer"); _ifScopeId = _scope2_id; } @@ -28,7 +28,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _scope1_.set(i, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.markResumeNode(_scope1_id, "#li/0")}`); _$.writeEffect(_scope1_id, "__tests__/tags/comments.marko_1_open"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "comment_comments": comment?.comments, "i": i, "id": id, @@ -36,12 +36,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { "#text/4(": _ifRenderer, "#text/4!": _$.getScopeById(_ifScopeId), "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/tags/comments.marko", "2:4", { + "comment": "2:8", + "i": "2:17", + "id": "3:12", + "open": "4:10" }); }, _scope0_id, "#ul/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#ul/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_path": input.path, "#ul/0(": _scope1_.size ? _scope1_ : undefined - }); + }), "__tests__/tags/comments.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/comments.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/template.js index 447f829d8c..736a2fd2b6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/template.js @@ -4,8 +4,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _childScope = _$.peekNextScope(); _comments(input); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/tags/layout.js b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/tags/layout.js index ab53df12a0..1801b57e63 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/tags/layout.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/tags/layout.js @@ -8,9 +8,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", content, {}); _$.writeTrailers(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/layout.marko", 0, { + "content": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/layout.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js index 91409c0b21..4c3864d6d6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js @@ -11,15 +11,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`

Hello ${_$.escapeXML(name)}${_$.markResumeNode(_scope1_id, "#text/0")}

`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_name/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "name": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-member-expression-computed/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-member-expression-computed/__snapshots__/html.expected/template.js index 89ea6098de..6f4c226775 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-member-expression-computed/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-member-expression-computed/__snapshots__/html.expected/template.js @@ -5,9 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const index = 0; _$.write(`
${_$.escapeXML(items[0])}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.escapeXML(items[index])}${_$.markResumeNode(_scope0_id, "#text/1")}
${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items_index"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "index": index + }), "__tests__/template.marko", 0, { + "items": "1:5", + "index": "2:5" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js index 9d50bc1971..b50d883545 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js @@ -15,22 +15,28 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { name: `${outer}.${inner}` }); _scope2_.set(_index, _$.ensureScopeWithId(_scope2_id)); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "#childScope/0": _$.writeExistingScope(_childScope), "_": _$.ensureScopeWithId(_scope1_id) + }), "__tests__/template.marko", "5:4", { + "inner": "5:8" }); }, _scope1_id, "#text/0"); _scope1_.set(_index2, _$.ensureScopeWithId(_scope1_id)); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "outer": outer, "#text/0(": _scope2_.size ? _scope2_ : undefined, "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "4:2", { + "outer": "4:6" }); }, _scope0_id, "#text/1"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "#text/1(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "items": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/tags/child.js index db85bae3aa..e367f27769 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/tags/child.js @@ -9,10 +9,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", content, value); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/child.marko", 0, { + "content": "1:9", + "value": "1:18" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js index 864784ca02..13b73d6fc8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js @@ -17,26 +17,33 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope2_id = _$.nextScopeId(); _$.write(`
${_$.escapeXML(outer)}${_$.markResumeNode(_scope2_id, "#text/0")}.${_$.escapeXML(inner)}${_$.markResumeNode(_scope2_id, "#text/1")}
`); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_outer/subscriber"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope1_id) + }), "__tests__/template.marko", "7:6", { + "inner": "7:12" }); _$.resumeClosestBranch(_scope2_id); }), "__tests__/template.marko_2_renderer", _scope1_id) }); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_y/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "outer": outer, "#childScope/0": _$.writeExistingScope(_childScope), "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "6:2", { + "outer": "6:8" }); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "y": y, "#childScope/1": _$.writeExistingScope(_childScope2) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/tags/child.js index 72e94e09eb..54984c85aa 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/tags/child.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", input.content, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(input.content) - }); + }), "__tests__/tags/child.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js index 44ad4601c8..b52e0d3de3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js @@ -10,15 +10,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count/subscriber"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/tags/child.js index 72e94e09eb..54984c85aa 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/tags/child.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", input.content, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(input.content) - }); + }), "__tests__/tags/child.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js index 6bb12d5125..1fa2dedb83 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js @@ -9,15 +9,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count/subscriber"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "4:4"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id)); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(false || Child) + }), "__tests__/template.marko", 0, { + "count": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js index 0bebc8b540..b0690038cf 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js @@ -8,13 +8,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _scope1_.set(_index, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(num)}${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_num"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "num": num, "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "3:2", { + "num": "3:6" }); }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "selected": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js index ef809fca1e..b5d8be0e06 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js @@ -9,26 +9,28 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_clickCount"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "3:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } else { const _scope2_id = _$.nextScopeId(); _$.write(`The button was clicked ${_$.escapeXML(clickCount)}${_$.markResumeNode(_scope2_id, "#text/0")} times.`); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "8:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId = _scope2_id; } }, _scope0_id, "#text/0"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "clickCount": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js index 8fe1089a0b..0584806682 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js @@ -9,15 +9,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(_index, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(item)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "5:4", { + "item": "5:8" + }); }, _scope0_id, "#text/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_id_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "id": id, "items": items, "#text/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "id": "2:8", + "items": "3:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js index a1abfbe031..bb5fe07030 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js @@ -12,15 +12,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(_by(x, _index), _$.ensureScopeWithId(_scope1_id)); _$.write(`
  • ${_$.escapeXML(x)}${_$.markResumeNode(_scope1_id, "#text/0")}
  • `); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "4:4", { + "x": "4:8" + }); }, _scope0_id, "#ul/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#ul/0")}${_$.markResumeNode(_scope0_id, "#button/1")}${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_list"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_open"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "open": open, "list": list, "#ul/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "open": "1:6", + "list": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js index 62ba4131ae..06140f0020 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js @@ -8,17 +8,19 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write("Hello!"); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "3:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js index e4ee1318c9..265cc105a9 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js @@ -6,8 +6,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const clickCount = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "4:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js index c795535201..d89cea0375 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js @@ -9,19 +9,22 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(message)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "4:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/1"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "message": message, "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6", + "message": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js index b1ab85558d..45fed5e23b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js @@ -5,9 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const b = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_a_b"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "a": a, "b": b + }), "__tests__/template.marko", 0, { + "a": "1:6", + "b": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/tags/FancyButton.js b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/tags/FancyButton.js index 0093a275e5..5963462738 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/tags/FancyButton.js +++ b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/tags/FancyButton.js @@ -10,10 +10,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/1", content, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/FancyButton.marko_0_attrs"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "attrs": attrs, "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/FancyButton.marko", 0, { + "content": "1:10", + "attrs": "1:22" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/FancyButton.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js index 2d699345c7..56927d4f07 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js @@ -12,15 +12,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(clickCount)}${_$.markResumeNode(_scope1_id, "#text/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_clickCount/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js index aee7c3371d..32ba68e83e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")}

    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")}

    `); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "write": write + }), "__tests__/tags/child.marko", 0, { + "name": "1:9", + "write": "1:15" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js index e794661e2a..969fefcbce 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js @@ -17,15 +17,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { name: item }); _scope1_.set(_index, _$.ensureScopeWithId(_scope1_id)); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", "7:2", { + "item": "7:6" }); }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "write": write, "#text/2(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "items": "1:6", + "write": "5:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js index 0d4efad241..8d86ef07b8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")} a
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")} a

    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")} a

    `); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "write": write + }), "__tests__/tags/child.marko", 0, { + "name": "1:9", + "write": "1:15" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js index 7bd8b567b6..5acc21d4de 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js @@ -39,32 +39,32 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { write: write, name: "Inner" }); - _$.writeScope(_scope3_id, { + _$.debug(_$.writeScope(_scope3_id, { "#childScope/0": _$.writeExistingScope(_childScope3) - }); + }), "__tests__/template.marko", "17:10"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer"); _ifScopeId = _scope3_id; } }, _scope2_id, "#text/1"); _$.write(""); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_showInner/subscriber"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "#childScope/0": _$.writeExistingScope(_childScope2), "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId), "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "14:6"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId2 = _scope2_id; } }, _scope1_id, "#text/1"); _$.write(""); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope), "_": _$.ensureScopeWithId(_scope0_id), "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) - }); + }), "__tests__/template.marko", "11:2"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId3 = _scope1_id; } @@ -72,13 +72,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showInner"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showMiddle"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showOuter"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "showOuter": showOuter, "showMiddle": showMiddle, "showInner": showInner, "write": write, "#text/4(": _ifRenderer3, "#text/4!": _$.getScopeById(_ifScopeId3) + }), "__tests__/template.marko", 0, { + "showOuter": "1:6", + "showMiddle": "2:6", + "showInner": "3:6", + "write": "9:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js index c894c9f453..c03db50271 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js @@ -10,18 +10,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write("
    a
    b

    c

    "); _$.writeEffect(_scope1_id, "__tests__/template.marko_1"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "6:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js index 37305d66f2..8ca88220e8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); _$.write("
    a
    b

    c

    "); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_input"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input - }); + }), "__tests__/tags/child.marko", 0); _$.resumeClosestBranch(_scope0_id); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js index ab27b9aa2c..cfce42be02 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js @@ -15,19 +15,21 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { el().innerHTML = state; }, "__tests__/template.marko_1/write", _scope1_id) }); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id), "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", "6:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js index 6a6dc7926d..5bfdef7540 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
    `); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "write": write + }), "__tests__/tags/child.marko", 0, { + "name": "1:9", + "write": "1:15" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js index e74fdc8b6f..b2539b679e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js @@ -28,25 +28,32 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _scope2_.set(_index, _$.ensureScopeWithId(_scope2_id)); _$.write(""); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "#childScope/0": _$.writeExistingScope(_childScope2), "_": _$.ensureScopeWithId(_scope1_id) + }), "__tests__/template.marko", "10:6", { + "middleItem": "10:10" }); }, _scope1_id, "#text/1"); _scope1_.set(_index2, _$.ensureScopeWithId(_scope1_id)); _$.write(""); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "outerItem": outerItem, "#childScope/0": _$.writeExistingScope(_childScope), "#text/1(": _scope2_.size ? _scope2_ : undefined, "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "7:2", { + "outerItem": "7:6" }); }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "write": write, "#text/2(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "items": "1:6", + "write": "5:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js index 6a6dc7926d..5bfdef7540 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
    `); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "write": write + }), "__tests__/tags/child.marko", 0, { + "name": "1:9", + "write": "1:15" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js index a8463e051c..c8f1698e21 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js @@ -17,15 +17,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { name: item }); _scope1_.set(_index, _$.ensureScopeWithId(_scope1_id)); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", "7:2", { + "item": "7:6" }); }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "write": write, "#text/2(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "items": "1:6", + "write": "5:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js index c579ce7fc1..ab124a7887 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; _$.write(`

    ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}

    `); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "name": name, "write": write + }), "__tests__/tags/child.marko", 0, { + "name": "1:9", + "write": "1:15" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js index 30b57ffc3b..adc49db738 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js @@ -39,32 +39,32 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { write: write, name: "Inner" }); - _$.writeScope(_scope3_id, { + _$.debug(_$.writeScope(_scope3_id, { "#childScope/0": _$.writeExistingScope(_childScope3) - }); + }), "__tests__/template.marko", "17:10"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer"); _ifScopeId = _scope3_id; } }, _scope2_id, "#text/1"); _$.write(""); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_showInner/subscriber"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "#childScope/0": _$.writeExistingScope(_childScope2), "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId), "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "14:6"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId2 = _scope2_id; } }, _scope1_id, "#text/1"); _$.write(""); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope), "_": _$.ensureScopeWithId(_scope0_id), "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) - }); + }), "__tests__/template.marko", "11:2"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId3 = _scope1_id; } @@ -72,13 +72,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showInner"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showMiddle"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_showOuter"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "showOuter": showOuter, "showMiddle": showMiddle, "showInner": showInner, "write": write, "#text/4(": _ifRenderer3, "#text/4!": _$.getScopeById(_ifScopeId3) + }), "__tests__/template.marko", 0, { + "showOuter": "1:6", + "showMiddle": "2:6", + "showInner": "3:6", + "write": "9:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js index 9ef45182fa..18f0a65a05 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js @@ -10,18 +10,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write("
    child
    "); _$.writeEffect(_scope1_id, "__tests__/template.marko_1"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "6:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js index a5aa54b735..dbf96320e5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); _$.write("
    child
    "); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_input"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input - }); + }), "__tests__/tags/child.marko", 0); _$.resumeClosestBranch(_scope0_id); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js index 897a663988..019395a843 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js @@ -15,19 +15,21 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { el().innerHTML = state; }, "__tests__/template.marko_1/write", _scope1_id) }); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id), "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", "6:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/2(": _ifRenderer, "#text/2!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js index a4965004f4..5ba0ce12a0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js @@ -4,9 +4,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input, "count": count + }), "__tests__/tags/counter.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/template.js index a16ee633e8..25b8f67a66 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/template.js @@ -7,8 +7,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _counter({ format: formatNumber }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr-sanitized.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr-sanitized.expected.md index 1fb24b6c49..e69de29bb2 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr-sanitized.expected.md +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr-sanitized.expected.md @@ -1,6 +0,0 @@ -# Render End -```html - -``` diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md index b32c289d81..6df9ebe772 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md @@ -1,34 +1,4 @@ -# Write -```html - +# Emit error ``` - -# Render End -```html - - - - - - - - -``` - -# Mutations -``` -INSERT html -INSERT html/head -INSERT html/body -INSERT html/body/button -INSERT html/body/button/#text -INSERT html/body/button/#comment -INSERT html/body/#comment -INSERT html/body/script -INSERT html/body/script/#text + TypeError: Unable to serialize "input" in __tests__/tags/counter.marko (reading format) ``` \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js index 1c1df76f39..0232ec1e86 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js @@ -6,9 +6,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = input; const dummy = {}; _$.write(`
    ${_$.escapeXML((dummy, value))}${_$.markResumeNode(_scope0_id, "#text/0")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value, "dummy": dummy + }), "__tests__/tags/display-intersection.marko", 0, { + "value": "1:10", + "dummy": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js index 481c5d6f74..6a0568a797 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js @@ -9,9 +9,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js index a4965004f4..5ba0ce12a0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js @@ -4,9 +4,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input, "count": count + }), "__tests__/tags/counter.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/template.js index c849845ee1..cd161dc04a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/template.js @@ -17,9 +17,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _counter({ format: formatNumber2 }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/conditional-table-row/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/conditional-table-row/__snapshots__/html.expected/template.js index 4e74e197f2..932c6ed5c7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/conditional-table-row/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/conditional-table-row/__snapshots__/html.expected/template.js @@ -8,17 +8,19 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write("Hi"); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "4:6"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/tags/checkbox.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/tags/checkbox.js index 32b623543b..642d63ec69 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/tags/checkbox.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/tags/checkbox.js @@ -6,8 +6,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { ...input }, "#input/0", _scope0_id, "input")}>${_$.markResumeNode(_scope0_id, "#input/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/checkbox.marko_0_input"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input - }); + }), "__tests__/tags/checkbox.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/checkbox.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js index 12481f5cfa..a879fdea9c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js @@ -11,8 +11,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }, "__tests__/template.marko_0/checkedChange", _scope0_id) }); _$.write(`${_$.escapeXML(String(checked))}${_$.markResumeNode(_scope0_id, "#text/1")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "checked": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js index 7e36226892..fc904cb92a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js @@ -10,8 +10,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { checkedValue = _new_checkedValue3; }, "__tests__/template.marko_0/checkedValueChange_0", _scope0_id), "c")} type=radio>${_$.markResumeNode(_scope0_id, "#input/2")}${_$.escapeXML(checkedValue)}${_$.markResumeNode(_scope0_id, "#text/3")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "checkedValue": checkedValue + }), "__tests__/template.marko", 0, { + "checkedValue": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/tags/checkbox.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/tags/checkbox.js index 32b623543b..642d63ec69 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/tags/checkbox.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/tags/checkbox.js @@ -6,8 +6,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { ...input }, "#input/0", _scope0_id, "input")}>${_$.markResumeNode(_scope0_id, "#input/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/checkbox.marko_0_input"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input": input - }); + }), "__tests__/tags/checkbox.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/checkbox.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js index 63374f7378..17461c7f3f 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js @@ -28,10 +28,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { value: "c" }); _$.write(`${_$.escapeXML(checkedValue)}${_$.markResumeNode(_scope0_id, "#text/3")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2), "#childScope/2": _$.writeExistingScope(_childScope3) + }), "__tests__/template.marko", 0, { + "checkedValue": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js index 23bc18b3e2..a854674381 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js @@ -10,8 +10,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { checkedValue = _new_checkedValue3; }, "__tests__/template.marko_0/checkedValueChange_0", _scope0_id), "c")} type=checkbox>${_$.markResumeNode(_scope0_id, "#input/2")}${_$.escapeXML(checkedValue)}${_$.markResumeNode(_scope0_id, "#text/3")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "checkedValue": checkedValue + }), "__tests__/template.marko", 0, { + "checkedValue": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js index d1f7a6522a..7f9e4b71cd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js @@ -6,8 +6,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { checked = _new_checked; }, "__tests__/template.marko_0/checkedChange", _scope0_id))} type=checkbox>${_$.markResumeNode(_scope0_id, "#input/0")}${_$.escapeXML(String(checked))}${_$.markResumeNode(_scope0_id, "#text/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "checked": checked + }), "__tests__/template.marko", 0, { + "checked": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js index bb0a91f6d2..ea1db0ff57 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js @@ -6,8 +6,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { value = _new_value; }, "__tests__/template.marko_0/valueChange", _scope0_id))} type=text>${_$.markResumeNode(_scope0_id, "#input/0")}${_$.escapeXML(value)}${_$.markResumeNode(_scope0_id, "#text/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value + }), "__tests__/template.marko", 0, { + "value": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/.name-cache.json b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/.name-cache.json index 6ce2f1cf1d..51453275f2 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/.name-cache.json +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/.name-cache.json @@ -8,7 +8,11 @@ "$_tagSelectBody": "e", "$_setup$tagSelect_content_effect": "n", "$_setup$tagSelect_content": "s", - "$_tagSelect_content": "i" + "$_tagSelect_content": "i", + "$_tagSelect_input": "m", + "$_expr_Text_value": "c", + "$_value": "p", + "$_valueChange": "u" } } } diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.hydrate.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.hydrate.js index 2b2c63605e..556f5a7bcf 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.hydrate.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.hydrate.js @@ -1,5 +1,5 @@ -// size: 314 (min) 165 (brotli) -const _setup$tagSelect_content_effect = _$.effect("a0", (_scope) => { +// size: 491 (min) 255 (brotli) +const _setup$tagSelect_content_effect = _$.effect("a1", (_scope) => { _$.attrsEvents(_scope, 0), _$.attrsEvents(_scope, 1), _$.attrsEvents(_scope, 2); @@ -11,11 +11,31 @@ const _setup$tagSelect_content_effect = _$.effect("a0", (_scope) => { _setup$tagSelect_content_effect(_scope); }, _tagSelect_content = _$.register( - "a1", + "a2", _$.createRendererWithOwner( "", " b b ", _setup$tagSelect_content, ), + ), + _tagSelect_input = _$.dynamicTagAttrs(0, _tagSelect_content), + _expr_Text_value = _$.intersection( + 2, + (_scope) => { + const { 2: value } = _scope; + _tagSelect_input(_scope, () => ({ + value: value, + valueChange: _valueChange, + })); + }, + () => _tagSelect_input, + ), + _value = _$.state( + 2, + (_scope, value) => _$.data(_scope[1], value), + () => _expr_Text_value, ); -_$.dynamicTagAttrs(0, _tagSelect_content), init(); +function _valueChange(v) { + _value(_scope, v); +} +_$.register("a0", _valueChange), init(); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.js index ed50571108..b35b666676 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/dom.expected/template.js @@ -26,9 +26,7 @@ const _expr_Text_value = /* @__PURE__ */_$.intersection(2, _scope => { } = _scope; _tagSelect_input(_scope, () => ({ value, - valueChange(v) { - _value(_scope, v); - } + valueChange: _valueChange })); }, () => _tagSelect_input); const _dynamicTagName = /* @__PURE__ */_$.conditional("#text/0", 0, () => _expr_Text_value); @@ -38,4 +36,8 @@ export function _setup_(_scope) { _value(_scope, "b"); _tag(_scope, "select"); } +function _valueChange(v) { + _value(_scope, v); +} +_$.register("__tests__/template.marko_0/valueChange", _valueChange); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js index 62aa93dff4..8dc936b1d3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js @@ -6,9 +6,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", tag ? "select" : {}, { value, - valueChange(v) { + valueChange: _$.register(function (v) { value = v; - } + }, "__tests__/template.marko_0/valueChange") }, _$.register(/* @__PURE__ */_$.createRenderer(() => { const _scope1_id = _$.nextScopeId(); _$.write(` { _$.writeEffect(_scope1_id, "__tests__/template.marko_1"); }), "__tests__/template.marko_1_renderer", _scope0_id)); _$.write(`${_$.escapeXML(value)}${_$.markResumeNode(_scope0_id, "#text/1")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(tag ? "select" : {}) + }), "__tests__/template.marko", 0, { + "value": "1:6", + "tag": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md index 7b608bb57d..5be87e6d98 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md @@ -30,7 +30,7 @@ @@ -77,7 +77,7 @@ select.dispatchEvent(new window.Event("input", { diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md index c18c7b9a81..1272285fab 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md @@ -1,6 +1,6 @@ # Write ```html - b + b ``` # Render End @@ -35,7 +35,7 @@ diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js index 80b4a0f615..de28a1975e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js @@ -9,8 +9,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _$.write(`${_$.markResumeNode(_scope0_id, "#select/0")}${_$.escapeXML(value)}${_$.markResumeNode(_scope0_id, "#text/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value + }), "__tests__/template.marko", 0, { + "value": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js index a1a529a730..4bf9442349 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js @@ -6,8 +6,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { value = _new_value; }, "__tests__/template.marko_0/valueChange", _scope0_id))}${_$.markResumeNode(_scope0_id, "#textarea/0")}${_$.escapeXML(value)}${_$.markResumeNode(_scope0_id, "#text/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value + }), "__tests__/template.marko", 0, { + "value": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js index 7955501f84..abaad9583b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js @@ -5,9 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const b = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")} + ${_$.markResumeNode(_scope0_id, "#button/2")} = ${_$.escapeXML(a + b)}${_$.markResumeNode(_scope0_id, "#text/4")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "a": a, "b": b + }), "__tests__/template.marko", 0, { + "a": "2:8", + "b": "3:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-from/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-from/__snapshots__/html.expected/template.js index dd1f2f8b5f..681976c708 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-from/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-from/__snapshots__/html.expected/template.js @@ -7,14 +7,16 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(n, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(n)}${_$.markResumeNode(_scope1_id, "#text/0")}, `); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "2:4", { + "n": "2:8" + }); }, _scope0_id, "#div/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_from": input.from, "input_to": input.to, "input_step": input.step, "#div/0(": _scope1_.size ? _scope1_ : undefined - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-in/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-in/__snapshots__/html.expected/template.js index 3f721c5030..ca8ac8977a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-in/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/create-and-clear-rows-loop-in/__snapshots__/html.expected/template.js @@ -7,19 +7,24 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(key, _$.ensureScopeWithId(_scope1_id)); _$.write(`

    ${_$.escapeXML(key)}${_$.markResumeNode(_scope1_id, "#text/0")}: ${_$.escapeXML(text)}${_$.markResumeNode(_scope1_id, "#text/1")}

    `); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "2:4", { + "key": "2:8", + "text": "2:13" + }); }, _scope0_id, "#text/0"); const _scope2_ = new Map(); _$.resumeSingleNodeForIn(input.children, key => { const _scope2_id = _$.nextScopeId(); _scope2_.set(key, _$.ensureScopeWithId(_scope2_id)); _$.write(`

    ${_$.escapeXML(key)}${_$.markResumeNode(_scope2_id, "#text/0")}

    `); - _$.writeScope(_scope2_id, {}); + _$.debug(_$.writeScope(_scope2_id, {}), "__tests__/template.marko", "5:4", { + "key": "5:8" + }); }, _scope0_id, "#text/1"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0(": _scope1_.size ? _scope1_ : undefined, "#text/1(": _scope2_.size ? _scope2_ : undefined - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-let.js b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-let.js index a48baac306..3b5311733c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-let.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-let.js @@ -3,11 +3,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const value = input.value; const _return = value; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar, "@": _$.register(_new_value => { value = _new_value; }, "__tests__/tags/my-let.marko_0/valueChange", _scope0_id) + }), "__tests__/tags/my-let.marko", 0, { + "value": "1:5" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-tag.js b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-tag.js index 81b3bfb20b..3a9dd506ea 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/tags/my-tag.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", input.content, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(input.content) - }); + }), "__tests__/tags/my-tag.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/my-tag.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/template.js index bb43c5de89..9d50f64712 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/cross-tag-closure/__snapshots__/html.expected/template.js @@ -14,16 +14,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count/subscriber"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:1"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2) + }), "__tests__/template.marko", 0, { + "count": "1:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js index a7e3300341..321d8f2cb5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js @@ -11,9 +11,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _child({ value: x }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2) + }), "__tests__/template.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js index 00695bbe62..31cd984ec7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js @@ -7,11 +7,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagArgs(_scope0_id, "#text/3", input.content, [x, y]); _$.writeEffect(_scope0_id, "__tests__/tags/custom-tag.marko_0_x_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "y": y, "#text/3!": _$.writeExistingScope(_dynamicScope), "#text/3(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/tags/custom-tag.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/template.js index 0220da1d8d..16557a8224 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/template.js @@ -9,8 +9,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`
    Counts: ${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/0")},${_$.escapeXML(count2)}${_$.markResumeNode(_scope1_id, "#text/1")}
    `); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js index e0806bbde0..18b5f7a401 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js @@ -9,11 +9,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { name: input.name }); _$.writeEffect(_scope0_id, "__tests__/tags/custom-tag.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_name": input.name, "x": x, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/tags/custom-tag.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/template.js index 7b9d448bdf..397985d932 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/template.js @@ -13,8 +13,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`
    Count (${_$.escapeXML(name)}${_$.markResumeNode(_scope1_id, "#text/0")}): ${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/1")}
    `); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js index 0f1fcb8b5f..4928e87a59 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js @@ -6,10 +6,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/2", input.content, x); _$.writeEffect(_scope0_id, "__tests__/tags/custom-tag.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/tags/custom-tag.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/template.js index 8fc0c6ed9a..750a1ec18b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/template.js @@ -9,8 +9,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`
    Count: ${_$.escapeXML(count)}${_$.markResumeNode(_scope1_id, "#text/0")}
    `); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/tags/child/index.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/tags/child/index.js index d1683a9b3c..906dd27bb0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/tags/child/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/tags/child/index.js @@ -8,9 +8,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}`); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/1", content, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/child/index.marko", 0, { + "name": "1:10", + "content": "1:16" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/template.js index bc81c92a25..1dd2947570 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-render-body/__snapshots__/html.expected/template.js @@ -10,8 +10,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write("This is the body content"); }), "__tests__/template.marko_1_renderer", _scope0_id) }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-template/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-template/__snapshots__/html.expected/template.js index 44fc0e76ce..65bfa7ceae 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-template/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-template/__snapshots__/html.expected/template.js @@ -6,8 +6,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _hello({ name: "Frank" }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js index 29cb9d4974..a636f41291 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js @@ -5,12 +5,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); const _return = x; _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "/": _tagVar, "@": _$.register(_new_x => { x = _new_x; }, "__tests__/tags/counter.marko_0/valueChange", _scope0_id) + }), "__tests__/tags/counter.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/template.js index d82dc0a1d1..be53b3ba70 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/template.js @@ -7,9 +7,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}${_$.markResumeNode(_scope0_id, "#button/3")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "count": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js index 6dfce5c154..c89ff21613 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 1; _$.write("child"); const _return = x + 3; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar + }), "__tests__/tags/child.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/template.js index 4e5ba39371..1ce83019ac 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/template.js @@ -5,8 +5,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope = _$.peekNextScope(); const data = _child({}, _$.register(() => {}, "__tests__/template.marko_0_data/var", _scope0_id)); _$.write(`
    ${_$.escapeXML(data)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "data": "1:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js index 72575dd183..1e74618f69 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js @@ -5,10 +5,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = 2; _$.write("child"); const _return = x + y; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "y": y, "/": _tagVar + }), "__tests__/tags/child.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/template.js index 4e5ba39371..1ce83019ac 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/template.js @@ -5,8 +5,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope = _$.peekNextScope(); const data = _child({}, _$.register(() => {}, "__tests__/template.marko_0_data/var", _scope0_id)); _$.write(`
    ${_$.escapeXML(data)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "data": "1:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js index 0896f87669..743bcd17b4 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js @@ -5,9 +5,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); const _return = x; _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "/": _tagVar + }), "__tests__/tags/child.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/template.js index 4e5ba39371..1ce83019ac 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/template.js @@ -5,8 +5,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope = _$.peekNextScope(); const data = _child({}, _$.register(() => {}, "__tests__/template.marko_0_data/var", _scope0_id)); _$.write(`
    ${_$.escapeXML(data)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "data": "1:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/tags/child.js index 8e8b20429e..85fcb00d6c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/tags/child.js @@ -7,9 +7,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/1", input.thing.content, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(input.thing.content) - }); + }), "__tests__/tags/child.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js index a11bd51490..870e466c51 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js @@ -16,9 +16,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_selected"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "selected": selected, "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "selected": "1:6", + "myThing": "2:9" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js index 043e1c0160..94503c7452 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js @@ -8,8 +8,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }; _$.write(`
    ${_$.escapeXML(JSON.stringify(myObj))}${_$.markResumeNode(_scope0_id, "#text/0")}
    ${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6", + "myObj": "2:9" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js index b44dcac076..297044f08b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js @@ -12,10 +12,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagArgs(_scope0_id, "#text/0", MyTag, [1, "Hello", x]); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(MyTag) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "MyTag": "2:9" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js index 2aa1928ac3..530a3a6679 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js @@ -16,10 +16,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(MyTag) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "MyTag": "2:9" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js index f9c90cb451..3f19d96399 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js @@ -7,9 +7,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`
    ${_$.escapeXML(x)}${_$.markResumeNode(_scope1_id, "#text/0")}
    `); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_x/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }; @@ -17,10 +17,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/0", MyTag, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(MyTag) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "MyTag": "2:9" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js index c3bc2479ee..98d0e517fa 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js @@ -9,8 +9,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = 1; _$.write(`
    Hello ${_$.escapeXML(name)}${_$.markResumeNode(_scope1_id, "#text/0")} ${_$.escapeXML(y)}${_$.markResumeNode(_scope1_id, "#text/1")}
    ${_$.markResumeNode(_scope1_id, "#button/2")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_y"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "y": y + }), "__tests__/template.marko", "1:2", { + "_pattern_": "1:15", + "name": "1:16", + "y": "2:8" }); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) @@ -19,9 +23,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/0", MyTag, { name: "Ryan" }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(MyTag) + }), "__tests__/template.marko", 0, { + "MyTag": "1:9" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/html.expected/template.js index 626ca0f00a..03fba532d7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/html.expected/template.js @@ -8,7 +8,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(_$.$global().x)}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "3:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } @@ -18,19 +18,21 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (!show) { const _scope2_id = _$.nextScopeId(); _$.write(``); - _$.writeScope(_scope2_id, {}); + _$.debug(_$.writeScope(_scope2_id, {}), "__tests__/template.marko", "7:4"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId2 = _scope2_id; } }, _scope0_id, "#text/1"); _$.write(`${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId), "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) + }), "__tests__/template.marko", 0, { + "show": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/tags/custom-tag.js index 462011fbe4..940089c342 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/tags/custom-tag.js @@ -5,9 +5,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", input.content, {}); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(input.content) - }); + }), "__tests__/tags/custom-tag.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js index 4fc8e0b766..5b477a4a75 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js @@ -12,9 +12,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(a)} ${_$.escapeXML(b)} ${_$.escapeXML(c)}${_$.markResumeNode(_scope1_id, "#text/2")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_c/subscriber"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "6:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id) }); @@ -25,20 +25,23 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope3_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(a)} ${_$.escapeXML(b)} ${_$.escapeXML(c)}${_$.markResumeNode(_scope3_id, "#text/2")}`); _$.writeEffect(_scope3_id, "__tests__/template.marko_3_c/subscriber"); - _$.writeScope(_scope3_id, { + _$.debug(_$.writeScope(_scope3_id, { "_": _$.ensureScopeWithId(_scope2_id) - }); + }), "__tests__/template.marko", "11:6"); } - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "10:4"); } _$.write(""); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "b": b, "c": c, "#childScope/1": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "b": "2:7", + "c": "3:5" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js index 2667c91807..f8d19b3548 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const clickCount = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js index a887fc466f..7351c737d6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js @@ -12,11 +12,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }), "__tests__/template.marko_1_renderer", _scope0_id)); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_tagName"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "tagName": tagName, "className": className, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(tagName) + }), "__tests__/template.marko", 0, { + "tagName": "1:6", + "className": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/tags/custom-tag.js index 1b6ff4753b..687a651215 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/tags/custom-tag.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); _$.write(`
    Child: ${_$.escapeXML(input)}${_$.markResumeNode(_scope0_id, "#text/0")}
    `); const _return = input; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar - }); + }), "__tests__/tags/custom-tag.marko", 0); return _return; }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js index 271dbdf0ed..35be81ba46 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js @@ -9,10 +9,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = _$.dynamicTagInput(_scope0_id, "#text/2", tags[0], x, void 0, _$.register(() => {}, "__tests__/template.marko_0_y/var", _scope0_id)); _$.write(`
    Parent: ${_$.escapeXML(y)}${_$.markResumeNode(_scope0_id, "#text/3")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(tags[0]) + }), "__tests__/template.marko", 0, { + "x": "3:6", + "y": "5:16" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js index 58e006f100..72c5c699ec 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js @@ -8,10 +8,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagArgs(_scope0_id, "#text/2", tags[0], [x, 'foo']); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(tags[0]) + }), "__tests__/template.marko", 0, { + "x": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js index a5e645fbb0..697a389900 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const className = "A"; _$.write(`paragraph

    ${_$.markResumeNode(_scope0_id, "#p/0")}${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_className"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "className": className + }), "__tests__/template.marko", 0, { + "className": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js index be966e9080..9e03b04759 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js @@ -9,10 +9,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { id: "dynamic" }); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_tagName"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "tagName": tagName, "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(tagName) + }), "__tests__/template.marko", 0, { + "tagName": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js index fdc87a6433..bf6cad350b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js @@ -11,11 +11,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_tagName"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "tagName": tagName, "val": val, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(tagName) + }), "__tests__/template.marko", 0, { + "tagName": "4:6", + "val": "5:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-a/index.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-a/index.js index b4ff60493a..878fb84501 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-a/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-a/index.js @@ -10,9 +10,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/1", content, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/tag-a/index.marko", 0, { + "className": "1:17", + "other": "1:28", + "content": "1:35" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/tag-a/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-b/index.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-b/index.js index 344cad3c39..c6cb0b5a70 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-b/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/tags/tag-b/index.js @@ -10,9 +10,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/1", content, {}); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(content) + }), "__tests__/tags/tag-b/index.marko", 0, { + "className": "1:17", + "other": "1:28", + "content": "1:35" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/tag-b/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/template.js index a2b06f0fcd..79791e4645 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-name/__snapshots__/html.expected/template.js @@ -76,7 +76,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (tagConstB) _$.write(`<${tagConstB} class="a b"${_$.attr("other", other)}>`); if (tagConstB) _$.write(``); _$.write(_$.markResumeNode(_scope0_id, "#tagConstB/14")); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "other": other, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(content), @@ -92,6 +92,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { "#text/8(": _$.normalizeDynamicRenderer(tag || tagA), "#text/9!": _$.writeExistingScope(_dynamicScope6), "#text/9(": _$.normalizeDynamicRenderer(_tagName5) + }), "__tests__/template.marko", 0, { + "content": "4:10", + "x": "4:19", + "show": "4:22", + "showTagA": "4:28", + "isLarge": "4:38", + "tag": "4:47", + "level": "4:52", + "other": "4:59", + "largeHeading": "22:8", + "tagConstA": "29:8", + "tagConstB": "32:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/tags/custom-tag.js index e9defbb8d8..09309758be 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/tags/custom-tag.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/tags/custom-tag.js @@ -3,9 +3,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); _$.write(`
    ${_$.escapeXML(input)}${_$.markResumeNode(_scope0_id, "#text/0")}
    `); const _return = "hello from other"; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar - }); + }), "__tests__/tags/custom-tag.marko", 0); return _return; }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js index 41873193f3..9b40ebb74b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js @@ -8,10 +8,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/2", tags[0], x); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(tags[0]) + }), "__tests__/template.marko", 0, { + "x": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js index 36ed47ec09..4fe1b71e99 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js @@ -9,10 +9,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }), "__tests__/template.marko_1_renderer", _scope0_id)); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(x) + }), "__tests__/template.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js index 9b06153643..bc6d802a39 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js @@ -5,12 +5,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); const _return = x; _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "/": _tagVar, "@": _$.register(_new_x => { x = _new_x; }, "__tests__/tags/counter.marko_0/valueChange", _scope0_id) + }), "__tests__/tags/counter.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/template.js index 77620c923f..4d9f591d63 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/template.js @@ -10,9 +10,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = _$.dynamicTagInput(_scope0_id, "#text/0", getCounter(), {}, void 0, _$.register(() => {}, "__tests__/template.marko_0_count/var", _scope0_id)); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(getCounter()) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/tags/child/index.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/tags/child/index.js index 382c46fdc5..94f9df279b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/tags/child/index.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/tags/child/index.js @@ -2,9 +2,9 @@ import * as _$ from "@marko/runtime-tags/debug/html"; const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _return = 1; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar - }); + }), "__tests__/tags/child/index.marko", 0); return _return; }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child/index.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/template.js index ed32042866..e8eebf7e84 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var/__snapshots__/html.expected/template.js @@ -15,11 +15,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (_tagName2) _$.write(`<${_tagName2}>`); if (_tagName2) _$.write(``); _$.write(_$.markResumeNode(_scope0_id, "#inputShowDiv/3")); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2), "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.dynamic) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/tags/counter.js index b3f86c03ab..a2d6427053 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/tags/counter.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/tags/counter.marko", 0, { + "count": "1:5" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js index 0a205a0886..3ee5c8b8b7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js @@ -8,16 +8,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); const _childScope = _$.peekNextScope(); _counter({}); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", "3:4"); }), "__tests__/template.marko_1_renderer", _scope0_id)); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_tagName"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "tagName": tagName, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(tagName) + }), "__tests__/template.marko", 0, { + "tagName": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js index 4d42df8ba2..dd84949834 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js @@ -32,7 +32,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list; _scope1_.set(_list.id, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(text)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "17:6", { + "_pattern_": "17:10", + "text": "17:12" + }); }, _scope0_id, "#div/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}
    `); const _by = item => item.id; @@ -44,7 +47,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list2; _scope2_.set(_by(_list2, _index2), _$.ensureScopeWithId(_scope2_id)); _$.write(`${_$.escapeXML(text)}${_$.markResumeNode(_scope2_id, "#text/0")}`); - _$.writeScope(_scope2_id, {}); + _$.debug(_$.writeScope(_scope2_id, {}), "__tests__/template.marko", "21:6", { + "_pattern_2": "21:10", + "text": "21:12" + }); }, _scope0_id, "#div/1"); _$.write(`
    ${_$.markResumeNode(_scope0_id, "#div/1")}
    `); const _scope3_ = new Map(); @@ -55,7 +61,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list3; _scope3_.set(_$.forOfBy(getStringBy(), _list3, _index3), _$.ensureScopeWithId(_scope3_id)); _$.write(`${_$.escapeXML(text)}${_$.markResumeNode(_scope3_id, "#text/0")}`); - _$.writeScope(_scope3_id, {}); + _$.debug(_$.writeScope(_scope3_id, {}), "__tests__/template.marko", "25:6", { + "_pattern_3": "25:10", + "text": "25:12" + }); }, _scope0_id, "#div/2"); _$.write(`
    ${_$.markResumeNode(_scope0_id, "#div/2")}
    `); const _scope4_ = new Map(); @@ -66,7 +75,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list4; _scope4_.set(_$.forOfBy(getFunctionBy(), _list4, _index4), _$.ensureScopeWithId(_scope4_id)); _$.write(`${_$.escapeXML(text)}${_$.markResumeNode(_scope4_id, "#text/0")}`); - _$.writeScope(_scope4_id, {}); + _$.debug(_$.writeScope(_scope4_id, {}), "__tests__/template.marko", "29:6", { + "_pattern_4": "29:10", + "text": "29:12" + }); }, _scope0_id, "#div/3"); _$.write(`
    ${_$.markResumeNode(_scope0_id, "#div/3")}
    `); const _scope5_ = new Map(); @@ -77,17 +89,22 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list5; _scope5_.set(_$.forOfBy(getMissingBy(), _list5, _index5), _$.ensureScopeWithId(_scope5_id)); _$.write(`${_$.escapeXML(text)}${_$.markResumeNode(_scope5_id, "#text/0")}`); - _$.writeScope(_scope5_id, {}); + _$.debug(_$.writeScope(_scope5_id, {}), "__tests__/template.marko", "33:6", { + "_pattern_5": "33:10", + "text": "33:12" + }); }, _scope0_id, "#div/4"); _$.write(`
    ${_$.markResumeNode(_scope0_id, "#div/4")}${_$.markResumeNode(_scope0_id, "#button/5")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "#div/0(": _scope1_.size ? _scope1_ : undefined, "#div/1(": _scope2_.size ? _scope2_ : undefined, "#div/2(": _scope3_.size ? _scope3_ : undefined, "#div/3(": _scope4_.size ? _scope4_ : undefined, "#div/4(": _scope5_.size ? _scope5_ : undefined + }), "__tests__/template.marko", 0, { + "items": "14:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js index 2ba3227365..0b07223c6d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js @@ -16,13 +16,19 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = _list; _scope1_.set(_index, _$.ensureScopeWithId(_scope1_id)); _$.write(`
    ${_$.escapeXML(name)}${_$.markResumeNode(_scope1_id, "#text/0")}: ${_$.escapeXML(description)}${_$.markResumeNode(_scope1_id, "#text/1")}
    `); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "5:4", { + "_pattern_": "5:8", + "name": "5:10", + "description": "5:16" + }); }, _scope0_id, "#text/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#button/1")}${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_items"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "items": items, "#text/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "items": "3:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js index 067374278d..23c0d3b49b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js @@ -8,13 +8,17 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _scope1_.set(i, _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_num"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "3:2", { + "i": "3:6" }); }, _scope0_id, "#text/0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "num": num, "#text/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "num": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js index fa1cac8daf..3851646860 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js @@ -12,10 +12,16 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope2_id = _$.nextScopeId(); _scope2_.set(i, _$.ensureScopeWithId(_scope2_id)); _$.write(`
    ${_$.escapeXML(i)}${_$.markResumeNode(_scope2_id, "#text/0")}: ${_$.escapeXML(val)}${_$.markResumeNode(_scope2_id, "#text/1")}
    `); - _$.writeScope(_scope2_id, {}); + _$.debug(_$.writeScope(_scope2_id, {}), "__tests__/template.marko", "9:2", { + "val": "9:6", + "i": "9:11" + }); }, _scope0_id, "#text/1"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/1(": _scope2_.size ? _scope2_ : undefined + }), "__tests__/template.marko", 0, { + "arrA": "1:8", + "arrB": "7:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js index 2dab3fec13..d030075811 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#comment/2")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js index 8b4f1d926a..b807fadfe9 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js +++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js @@ -6,8 +6,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#comment/0")}`); const _return = tagName; _$.writeEffect(_scope0_id, "__tests__/tags/parent-el.marko_0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar + }), "__tests__/tags/parent-el.marko", 0, { + "tagName": "2:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/template.js index d5b1d6d2a8..916a95b0fd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/template.js @@ -9,9 +9,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope2 = _$.peekNextScope(); const spanName = _parentEl({}, _$.register(() => {}, "__tests__/template.marko_0_spanName/var", _scope0_id)); _$.write(`${_$.escapeXML(spanName)}${_$.markResumeNode(_scope0_id, "#text/3")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/2": _$.writeExistingScope(_childScope2) + }), "__tests__/template.marko", 0, { + "divName": "2:16", + "spanName": "7:16" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js index 33d9ae6a27..809f5e2486 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js @@ -10,8 +10,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } ${_$.markResumeNode(_scope0_id, "#script/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js index ea219aa485..da8b1b663b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js @@ -8,8 +8,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } ${_$.markResumeNode(_scope0_id, "#style/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js index 962f91c4c9..badeef2262 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js @@ -8,16 +8,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.write("hi"); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "3:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/1"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "show": show, "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/if-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/if-tag/__snapshots__/html.expected/template.js index 8ace79e6af..d7344e36ec 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/if-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/if-tag/__snapshots__/html.expected/template.js @@ -6,7 +6,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (input.a + input.b) { const _scope1_id = _$.nextScopeId(); _$.write("Hello"); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "1:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } @@ -16,7 +16,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (input.a, input.b) { const _scope2_id = _$.nextScopeId(); _$.write("World"); - _$.writeScope(_scope2_id, {}); + _$.debug(_$.writeScope(_scope2_id, {}), "__tests__/template.marko", "5:2"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId2 = _scope2_id; } @@ -27,25 +27,25 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (input.x) { const _scope3_id = _$.nextScopeId(); _$.write("A"); - _$.writeScope(_scope3_id, {}); + _$.debug(_$.writeScope(_scope3_id, {}), "__tests__/template.marko", "10:4"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer"); _ifScopeId3 = _scope3_id; } else if (input.y) { const _scope4_id = _$.nextScopeId(); _$.write("B"); - _$.writeScope(_scope4_id, {}); + _$.debug(_$.writeScope(_scope4_id, {}), "__tests__/template.marko", "13:4"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_4_renderer"); _ifScopeId3 = _scope4_id; } else { const _scope5_id = _$.nextScopeId(); _$.write("C"); - _$.writeScope(_scope5_id, {}); + _$.debug(_$.writeScope(_scope5_id, {}), "__tests__/template.marko", "16:4"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_5_renderer"); _ifScopeId3 = _scope5_id; } }, _scope0_id, "#text/2"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_a": input.a, "input_b": input.b, "input_x": input.x, @@ -56,6 +56,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { "#text/1!": _$.getScopeById(_ifScopeId2), "#text/2(": _ifRenderer3, "#text/2!": _$.getScopeById(_ifScopeId3) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag-shorthand/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/import-tag-shorthand/__snapshots__/html.expected/template.js index 8f8d89dfbe..7fc6bebdbd 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/import-tag-shorthand/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag-shorthand/__snapshots__/html.expected/template.js @@ -6,9 +6,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { BazComp({}); const _childScope2 = _$.peekNextScope(); BazComp({}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js index 5881773799..5bc026a408 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js @@ -6,9 +6,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 1; const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", x === 1 ? baz : foo, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(x === 1 ? baz : foo) + }), "__tests__/template.marko", 0, { + "x": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/import-tag/__snapshots__/html.expected/template.js index d55b2e478d..12177127ad 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/import-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag/__snapshots__/html.expected/template.js @@ -12,10 +12,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope3 = _$.peekNextScope(); _baz({}); _$.write(_$.escapeXML(c)); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#childScope/1": _$.writeExistingScope(_childScope2), "#childScope/2": _$.writeExistingScope(_childScope3) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js index b9e66b1341..156581fa13 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js @@ -6,13 +6,16 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#button/3")}`); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_otherState"); _$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_state"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_value": input.value, "input_valueChange": input.valueChange, "state": state, "otherState": otherState, "state@": input.valueChange, "otherState@": input["value" + "Change"] + }), "__tests__/tags/child.marko", 0, { + "state": "1:6", + "otherState": "6:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js index e7dd3ffe7a..fd6a2998d5 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js @@ -11,8 +11,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }, "__tests__/template.marko_0/valueChange", _scope0_id) }); _$.write(`source=${_$.escapeXML(source)}${_$.markResumeNode(_scope0_id, "#text/1")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "source": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js index 2d875006c3..6fd7647c73 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js @@ -9,11 +9,15 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#button/3")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "yChange": yChange, "y": y, "y@": yChange + }), "__tests__/template.marko", 0, { + "x": "1:6", + "yChange": "2:6", + "y": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js index 179dfcabd8..c005405f4c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js @@ -8,11 +8,15 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = x; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "handler": handler, "y": y, "y@": handler + }), "__tests__/template.marko", 0, { + "x": "1:6", + "handler": "2:6", + "y": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js index 43ced56933..910143ad70 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js @@ -5,11 +5,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = x; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "y": y, "y@": _$.register(function (newValue) { x = newValue + 1; }, "__tests__/template.marko_0/valueChange", _scope0_id) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js index a79d1fcdeb..ae79579e3c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js @@ -7,8 +7,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const b = a * 2; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.escapeXML(b)}${_$.markResumeNode(_scope0_id, "#text/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_b"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "b": b + }), "__tests__/template.marko", 0, { + "a": "1:10", + "b": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js index 596fbce915..cd32c20d8c 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js @@ -5,8 +5,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = 0; _$.write(`${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}${_$.escapeXML(y)}${_$.markResumeNode(_scope0_id, "#text/1")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js index 02a1b99674..05e10d3cec 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js @@ -7,8 +7,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const a = y + z; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.escapeXML(y)}${_$.markResumeNode(_scope0_id, "#text/2")} ${_$.escapeXML(z)}${_$.markResumeNode(_scope0_id, "#text/3")} ${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/4")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6", + "y": "2:8", + "z": "3:8", + "a": "4:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js index 7aced47a51..c510864d3b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js @@ -5,9 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const y = 1; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.escapeXML(y)}${_$.markResumeNode(_scope0_id, "#text/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "y": y + }), "__tests__/template.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js index 03b4f37df6..dab28f9ad4 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js @@ -5,8 +5,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const prev = false; _$.write(`
    x=${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}, was=${_$.escapeXML(prev)}${_$.markResumeNode(_scope0_id, "#text/1")}
    ${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6", + "prev": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js index 1321b62291..491f94cf8a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js @@ -8,9 +8,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (show) { const _scope1_id = _$.nextScopeId(); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_x"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "3:2"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } @@ -18,11 +18,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/1")}${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_show"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "show": show, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "x": "1:6", + "show": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js index 709e5a7991..0b64157309 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js index 709e5a7991..0b64157309 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-children/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-children/__snapshots__/html.expected/template.js index 11c9a08a15..73334e15b3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-children/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-children/__snapshots__/html.expected/template.js @@ -13,11 +13,15 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(_by(child, _index), _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(child.text)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "3:4", { + "child": "3:8" + }); }, _scope0_id, "#div/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#div/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "children": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-top-level/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-top-level/__snapshots__/html.expected/template.js index fee957a028..f366f5bc6a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-top-level/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/move-and-clear-top-level/__snapshots__/html.expected/template.js @@ -9,10 +9,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(_by(child, _index), _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(child.text)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "1:2", { + "child": "1:6" + }); }, _scope0_id, "#text/0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0(": _scope1_.size ? _scope1_ : undefined - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/tags/2counters.js b/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/tags/2counters.js index ac0cc20bbc..f6d72f8d94 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/tags/2counters.js +++ b/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/tags/2counters.js @@ -6,7 +6,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#button/2")}`); _$.writeEffect(_scope0_id, "__tests__/tags/2counters.marko_0_count2"); _$.writeEffect(_scope0_id, "__tests__/tags/2counters.marko_0_count1"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_count1": input.count1, "input_count1Change": input.count1Change, "input_count2": input.count2, @@ -15,6 +15,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { "count2": count2, "count1@": input.count1Change, "count2@": input.count2Change + }), "__tests__/tags/2counters.marko", 0, { + "count1": "1:6", + "count2": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/template.js index 3fb25d5fb6..f08f667ad9 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/multiple-bound-values/__snapshots__/html.expected/template.js @@ -16,8 +16,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }, "__tests__/template.marko_0/count2Change", _scope0_id) }); _$.write(`
    ${_$.escapeXML(count1)}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.escapeXML(count2)}${_$.markResumeNode(_scope0_id, "#text/2")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "count1": "1:6", + "count2": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-downstream-effect/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-downstream-effect/__snapshots__/html.expected/template.js index 37b95c3a41..75020b4f0f 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-downstream-effect/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-downstream-effect/__snapshots__/html.expected/template.js @@ -6,9 +6,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (true) { const _scope1_id = _$.nextScopeId(); _$.writeEffect(_scope1_id, "__tests__/template.marko_1"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); } }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/tags/hello-setter.js b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/tags/hello-setter.js index d0882a5cff..5b5aceae0e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/tags/hello-setter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/tags/hello-setter.js @@ -5,8 +5,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { el } = input; _$.writeEffect(_scope0_id, "__tests__/tags/hello-setter.marko_0_el"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "el": el + }), "__tests__/tags/hello-setter.marko", 0, { + "el": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/hello-setter.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/template.js index fd3ac6a8a7..e858ff7da9 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/native-tag-ref-effect-child/__snapshots__/html.expected/template.js @@ -8,8 +8,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _helloSetter({ el: el }); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/1": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js index e09c82a4af..82067524ad 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js @@ -6,8 +6,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const lastCount2 = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}used to be ${_$.escapeXML(lastCount)}${_$.markResumeNode(_scope0_id, "#text/2")} which should be the same as ${_$.escapeXML(lastCount2)}${_$.markResumeNode(_scope0_id, "#text/3")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "1:6", + "lastCount": "2:6", + "lastCount2": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/nested-for-if-stateful/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/nested-for-if-stateful/__snapshots__/html.expected/template.js index 4604212ed9..69fde716ed 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/nested-for-if-stateful/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/nested-for-if-stateful/__snapshots__/html.expected/template.js @@ -13,34 +13,40 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope2_id, "#button/0")}`); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_counts/subscriber"); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_counts_count_i"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "4:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId = _scope2_id; } else { const _scope3_id = _$.nextScopeId(); _$.write(`${_$.markResumeNode(_scope3_id, "#button/0")}`); _$.writeEffect(_scope3_id, "__tests__/template.marko_3"); - _$.writeScope(_scope3_id, { + _$.debug(_$.writeScope(_scope3_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "12:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer"); _ifScopeId = _scope3_id; } }, _scope1_id, "#text/0"); _scope1_.set(i, _$.ensureScopeWithId(_scope1_id)); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "count": count, "i": i, "_": _$.ensureScopeWithId(_scope0_id), "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", "2:2", { + "count": "2:6", + "i": "2:13", + "editing": "3:8" }); }, _scope0_id, "#text/0"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "counts": counts, "#text/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "counts": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js index 216d101b17..24b5b8276e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}${_$.markResumeNode(_scope0_id, "#button/2")}${_$.markResumeNode(_scope0_id, "#button/4")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/remove-and-add-rows/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/remove-and-add-rows/__snapshots__/html.expected/template.js index 11c9a08a15..73334e15b3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/remove-and-add-rows/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/remove-and-add-rows/__snapshots__/html.expected/template.js @@ -13,11 +13,15 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope1_id = _$.nextScopeId(); _scope1_.set(_by(child, _index), _$.ensureScopeWithId(_scope1_id)); _$.write(`${_$.escapeXML(child.text)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, {}); + _$.debug(_$.writeScope(_scope1_id, {}), "__tests__/template.marko", "3:4", { + "child": "3:8" + }); }, _scope0_id, "#div/0"); _$.write(`${_$.markResumeNode(_scope0_id, "#div/0")}`); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#div/0(": _scope1_.size ? _scope1_ : undefined + }), "__tests__/template.marko", 0, { + "children": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js index 994552e116..7c575de5b8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js +++ b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 1; _$.write("child"); const _return = x; - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "/": _tagVar + }), "__tests__/tags/child.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); return _return; diff --git a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/template.js index dc7c00aade..2a227a160f 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/template.js @@ -4,8 +4,8 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope0_id = _$.nextScopeId(); const _childScope = _$.peekNextScope(); _child({}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js index ac8b1d3101..e354e79d22 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js @@ -14,8 +14,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { } = createWrapper(count); _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "5:6", + "_pattern_": "6:8", + "a": "6:10", + "b": "6:16" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js index c59dbe1e1e..d6d7726da8 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const x = 1; _$.write("
    0
    "); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_x"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x + }), "__tests__/template.marko", 0, { + "x": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/serialize-promise/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/serialize-promise/__snapshots__/html.expected/template.js index 30361f3144..798cc2bcc6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/serialize-promise/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/serialize-promise/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const promise = Promise.resolve("hello"); _$.write("
    0
    "); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_promise"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "promise": promise + }), "__tests__/template.marko", 0, { + "promise": "1:8" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js index 14298cd3a4..7bba6baf47 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js @@ -10,11 +10,16 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.writeEffect(_scope0_id, "__tests__/template.marko_0__count2"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0__count"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "_count": _count, "_count2": _count2, "_count3": _count3 + }), "__tests__/template.marko", 0, { + "count": "1:6", + "_count": "5:10", + "_count2": "8:12", + "_count3": "14:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/tag-resolution-priority/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/tag-resolution-priority/__snapshots__/html.expected/template.js index e2e0845099..5e4e8c97e0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/tag-resolution-priority/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/tag-resolution-priority/__snapshots__/html.expected/template.js @@ -10,10 +10,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _foo({}); const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/1", Bar, {}); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope), "#text/1!": _$.writeExistingScope(_dynamicScope), "#text/1(": _$.normalizeDynamicRenderer(Bar) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js index 3d5793f35f..1c07b46e39 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const clickCount = 0; _$.write(`
    ${_$.markResumeNode(_scope0_id, "#button/0")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "clickCount": clickCount + }), "__tests__/template.marko", 0, { + "clickCount": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js index 696d3a16e9..7a1d34e54a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js @@ -10,18 +10,20 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (value) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(value)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "3:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value": value, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "value": "1:10" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js index addd2792b1..5828ee3813 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js @@ -17,31 +17,35 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope2_id, "#button/0")}`); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_count/subscriber"); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_count"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "8:6"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId = _scope2_id; } }, _scope1_id, "#text/1"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_inner"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id), "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId) - }); + }), "__tests__/template.marko", "6:4"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId2 = _scope1_id; } }, _scope0_id, "#text/1"); _$.write(""); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_outer"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "outer": outer, "inner": inner, "count": count, "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) + }), "__tests__/template.marko", 0, { + "outer": "1:6", + "inner": "2:6", + "count": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-3/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-3/__snapshots__/html.expected/template.js index f7e3353687..44714cd4a2 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-3/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-3/__snapshots__/html.expected/template.js @@ -17,31 +17,35 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope2_id, "#button/0")}`); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_count/subscriber"); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_count"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "8:6"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId = _scope2_id; } }, _scope1_id, "#text/1"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_inner"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id), "#text/1(": _ifRenderer, "#text/1!": _$.getScopeById(_ifScopeId) - }); + }), "__tests__/template.marko", "6:4"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId2 = _scope1_id; } }, _scope0_id, "#text/1"); _$.write(" hello"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_outer"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "outer": outer, "inner": inner, "count": count, "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) + }), "__tests__/template.marko", 0, { + "outer": "1:6", + "inner": "2:6", + "count": "3:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js index 0110f19f4d..6bde2bf73e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js @@ -17,9 +17,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope2_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(value1)}${_$.markResumeNode(_scope2_id, "#text/0")}`); _$.writeEffect(_scope2_id, "__tests__/template.marko_2_value1/subscriber"); - _$.writeScope(_scope2_id, { + _$.debug(_$.writeScope(_scope2_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "4:6"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer"); _ifScopeId = _scope2_id; } @@ -30,30 +30,34 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _scope3_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(value2)}${_$.markResumeNode(_scope3_id, "#text/0")}`); _$.writeEffect(_scope3_id, "__tests__/template.marko_3_value2/subscriber"); - _$.writeScope(_scope3_id, { + _$.debug(_$.writeScope(_scope3_id, { "_": _$.ensureScopeWithId(_scope1_id) - }); + }), "__tests__/template.marko", "5:6"); _$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer"); _ifScopeId2 = _scope3_id; } }, _scope1_id, "#text/1"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id), "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId), "#text/1(": _ifRenderer2, "#text/1!": _$.getScopeById(_ifScopeId2) - }); + }), "__tests__/template.marko", "3:4"); _$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId3 = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "value1": value1, "value2": value2, "#text/0(": _ifRenderer3, "#text/0!": _$.getScopeById(_ifScopeId3) + }), "__tests__/template.marko", 0, { + "show": "1:9", + "value1": "1:15", + "value2": "1:23" }); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-only-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-only-child/__snapshots__/html.expected/template.js index ab1e56eaff..c4f08642e3 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-only-child/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-only-child/__snapshots__/html.expected/template.js @@ -7,18 +7,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (input.value) { const _scope1_id = _$.nextScopeId(); _$.write(`${_$.escapeXML(input.value)}${_$.markResumeNode(_scope1_id, "#text/0")}`); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_value": input.value, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) - }); + }), "__tests__/template.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer); \ No newline at end of file diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js index 2a9b2ea1b5..a44b883a08 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js @@ -6,9 +6,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { if (clickCount > 0) throw new Error("This should not have executed since the parent removes this component when the count is greater than 0"); })(), clickCount))}${_$.markResumeNode(_scope0_id, "#text/1")}${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_input_onCount_clickCount"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_onCount": input.onCount, "clickCount": clickCount + }), "__tests__/tags/counter.marko", 0, { + "clickCount": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js index d4ef2468ac..507a9bccea 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js @@ -17,18 +17,21 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { onCount: onCount }); _$.write(""); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "#childScope/0": _$.writeExistingScope(_childScope) - }); + }), "__tests__/template.marko", "6:4"); _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer"); _ifScopeId = _scope1_id; } }, _scope0_id, "#text/0"); _$.write(""); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "onCount": onCount, "#text/0(": _ifRenderer, "#text/0!": _$.getScopeById(_ifScopeId) + }), "__tests__/template.marko", 0, { + "show": "1:6", + "onCount": "2:8" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js index 1d20481bea..3574afbdf0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js @@ -10,9 +10,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }, "#div/2", _scope0_id, "div")}>${_$.markResumeNode(_scope0_id, "#div/2")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_input_value_a"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_input_value"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_value": input.value, "a": a + }), "__tests__/template.marko", 0, { + "a": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js index f30a549135..4f6bd928c1 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js @@ -5,8 +5,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const b = 0; _$.write(`
    ${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/0")} ${_$.escapeXML(b)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_input_value"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "input_value": input.value + }), "__tests__/template.marko", 0, { + "a": "1:6", + "b": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js index 69644bf2d7..654d30ac2a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js +++ b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js @@ -7,8 +7,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _childScope = _$.peekNextScope(); _child({}); _$.write(`
    ${_$.escapeXML(count)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#childScope/0": _$.writeExistingScope(_childScope) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js index 75eae25a13..3e9b659ce7 100644 --- a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js +++ b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js @@ -7,11 +7,14 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagArgs(_scope0_id, "#text/3", input.content, [x, y]); _$.writeEffect(_scope0_id, "__tests__/components/custom-tag.marko_0_x_y"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "x": x, "y": y, "#text/3!": _$.writeExistingScope(_dynamicScope), "#text/3(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/components/custom-tag.marko", 0, { + "x": "1:6", + "y": "2:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md index 4654be0ddc..b4b2f84d3c 100644 --- a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md @@ -1,5 +1,5 @@ # Write -
    Counts: 1,10
    +
    Counts: 1,10
    # Render End ```html @@ -23,7 +23,7 @@ diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js index e95474e022..8647b1bc47 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/components/tags-counter.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/components/tags-counter.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/html.expected/template.js index eaaba0d52a..2c69b2d507 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/html.expected/template.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/html.expected/template.js @@ -11,10 +11,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _s(_classCounter, "__tests__/components/class-counter.marko"); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(_classCounter) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-class-in-components-in-tags-dir/__snapshots__/html.expected/tags/hello.js b/packages/translator-interop/src/__tests__/fixtures/interop-class-in-components-in-tags-dir/__snapshots__/html.expected/tags/hello.js index 0832f8641e..8048df2c95 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-class-in-components-in-tags-dir/__snapshots__/html.expected/tags/hello.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-class-in-components-in-tags-dir/__snapshots__/html.expected/tags/hello.js @@ -6,9 +6,9 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const _dynamicScope = _$.peekNextScope(); _$.dynamicTagInput(_scope0_id, "#text/0", _helloInternal, {}); _s(_helloInternal, "__tests__/tags/components/hello-internal.marko"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(_helloInternal) - }); + }), "__tests__/tags/hello.marko", 0); }); export default /* @__PURE__ */_$.createTemplate("__tests__/tags/hello.marko", _renderer); \ No newline at end of file diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js index e95474e022..8647b1bc47 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/components/tags-counter.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/components/tags-counter.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/html.expected/template.js index 73f1dce4b2..c309b7dc8e 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/html.expected/template.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/html.expected/template.js @@ -12,9 +12,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { }); _s(_classCounter, "__tests__/components/class-counter.marko"); _$.write(`
    ${_$.escapeXML(count)}${_$.markResumeNode(_scope0_id, "#text/1")}
    `); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(_classCounter) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js index 686b985f4d..cadaeb06b3 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js @@ -7,10 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/2", input.stuff.content, {}); _$.write(""); _$.writeEffect(_scope0_id, "__tests__/components/tags-layout.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.stuff.content) + }), "__tests__/components/tags-layout.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md index 7af884a491..035d3fb595 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md @@ -19,7 +19,7 @@ @@ -73,7 +73,7 @@ container.querySelector("#tags").click(); @@ -108,7 +108,7 @@ container.querySelector("#class").click(); @@ -153,7 +153,7 @@ container.querySelector("#tags").click(); @@ -188,7 +188,7 @@ container.querySelector("#class").click(); @@ -233,7 +233,7 @@ container.querySelector("#tags").click(); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md index 4e9003552c..0566da2ab2 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md @@ -1,5 +1,5 @@ # Write -
    +
    # Render End ```html @@ -27,7 +27,7 @@ diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/html.expected/components/tags-layout.js b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/html.expected/components/tags-layout.js index a172dd57e4..0b84e68da7 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/html.expected/components/tags-layout.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/html.expected/components/tags-layout.js @@ -7,10 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagInput(_scope0_id, "#text/2", input.content, {}); _$.write(""); _$.writeEffect(_scope0_id, "__tests__/components/tags-layout.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/components/tags-layout.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/resume.expected.md index 7af884a491..035d3fb595 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/resume.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/resume.expected.md @@ -19,7 +19,7 @@ @@ -73,7 +73,7 @@ container.querySelector("#tags").click(); @@ -108,7 +108,7 @@ container.querySelector("#class").click(); @@ -153,7 +153,7 @@ container.querySelector("#tags").click(); @@ -188,7 +188,7 @@ container.querySelector("#class").click(); @@ -233,7 +233,7 @@ container.querySelector("#tags").click(); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md index 4e9003552c..0566da2ab2 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md @@ -1,5 +1,5 @@ # Write -
    +
    # Render End ```html @@ -27,7 +27,7 @@ diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/html.expected/template.js index d6a81b41c8..5c6d58c2ee 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/html.expected/template.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/html.expected/template.js @@ -10,16 +10,18 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`${_$.markResumeNode(_scope1_id, "#button/0")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count/subscriber"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_count"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "_": _$.ensureScopeWithId(_scope0_id) - }); + }), "__tests__/template.marko", "2:2"); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id)); _s(_classLayout, "__tests__/components/class-layout.marko"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(_classLayout) + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js index 46973a54db..8eedc34866 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js @@ -7,10 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.dynamicTagArgs(_scope0_id, "#text/2", input.content, [count, "hello"]); _$.write(""); _$.writeEffect(_scope0_id, "__tests__/components/tags-layout.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count, "#text/2!": _$.writeExistingScope(_dynamicScope), "#text/2(": _$.normalizeDynamicRenderer(input.content) + }), "__tests__/components/tags-layout.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md index 8b10618ece..be203f907b 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md @@ -22,7 +22,7 @@ @@ -86,7 +86,7 @@ container.querySelector("#tags").click(); @@ -126,7 +126,7 @@ container.querySelector("#class").click(); @@ -181,7 +181,7 @@ container.querySelector("#tags").click(); @@ -221,7 +221,7 @@ container.querySelector("#class").click(); @@ -276,7 +276,7 @@ container.querySelector("#tags").click(); diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md index e1e9b62fa3..d56bd0cfbc 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md +++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md @@ -1,5 +1,5 @@ # Write -

    hello

    +

    hello

    # Render End ```html @@ -30,7 +30,7 @@ diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/html.expected/template.js index 5541fe8019..fbf8c99c2b 100644 --- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/html.expected/template.js +++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/html.expected/template.js @@ -10,17 +10,22 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { _$.write(`

    ${_$.escapeXML(message)}${_$.markResumeNode(_scope1_id, "#text/0")}

    ${_$.markResumeNode(_scope1_id, "#button/1")}`); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_multiplier/subscriber"); _$.writeEffect(_scope1_id, "__tests__/template.marko_1_multiplier"); - _$.writeScope(_scope1_id, { + _$.debug(_$.writeScope(_scope1_id, { "baseCount": baseCount, "_": _$.ensureScopeWithId(_scope0_id) + }), "__tests__/template.marko", "2:2", { + "baseCount": "2:15", + "message": "2:26" }); _$.resumeClosestBranch(_scope1_id); }), "__tests__/template.marko_1_renderer", _scope0_id)); _s(_classLayout, "__tests__/components/class-layout.marko"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "multiplier": multiplier, "#text/0!": _$.writeExistingScope(_dynamicScope), "#text/0(": _$.normalizeDynamicRenderer(_classLayout) + }), "__tests__/template.marko", 0, { + "multiplier": "1:6" }); _$.resumeClosestBranch(_scope0_id); }); diff --git a/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js index 1ce95da7fd..ecf9062d43 100644 --- a/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js +++ b/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js @@ -4,8 +4,10 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => { const count = 0; _$.write(`${_$.markResumeNode(_scope0_id, "#button/0")}`); _$.writeEffect(_scope0_id, "__tests__/template.marko_0_count"); - _$.writeScope(_scope0_id, { + _$.debug(_$.writeScope(_scope0_id, { "count": count + }), "__tests__/template.marko", 0, { + "count": "1:6" }); _$.resumeClosestBranch(_scope0_id); });