Skip to content

Commit

Permalink
refactor: start some internal ids at 1
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jan 28, 2025
1 parent f481b92 commit 36eab94
Show file tree
Hide file tree
Showing 347 changed files with 3,601 additions and 3,595 deletions.
6 changes: 6 additions & 0 deletions .changeset/lemon-beds-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@marko/translator-interop-class-tags": patch
"@marko/runtime-tags": patch
---

Start tag/scope/reorder ids at 1.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<button>
+
</button>
<!--M_*0 #button/0-->
<!--M_*1 #button/0-->
<span>
0
<!--M_*0 #text/1-->
<!--M_*1 #text/1-->
was
<!---->
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</span>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()
</script>
</body>
</html>
Expand All @@ -34,17 +34,17 @@ container.querySelector("button").click();
<button>
+
</button>
<!--M_*0 #button/0-->
<!--M_*1 #button/0-->
<span>
1
<!--M_*0 #text/1-->
<!--M_*1 #text/1-->
was
<!---->
0
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</span>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()
</script>
</body>
</html>
Expand All @@ -67,17 +67,17 @@ container.querySelector("button").click();
<button>
+
</button>
<!--M_*0 #button/0-->
<!--M_*1 #button/0-->
<span>
2
<!--M_*0 #text/1-->
<!--M_*1 #text/1-->
was
<!---->
1
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</span>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()
</script>
</body>
</html>
Expand All @@ -100,17 +100,17 @@ container.querySelector("button").click();
<button>
+
</button>
<!--M_*0 #button/0-->
<!--M_*1 #button/0-->
<span>
3
<!--M_*0 #text/1-->
<!--M_*1 #text/1-->
was
<!---->
2
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</span>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<button>+</button><!--M_*0 #button/0--><span>0<!--M_*0 #text/1--> was <!>&zwj;<!--M_*0 #text/2--></span><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()</script>
<button>+</button><!--M_*1 #button/0--><span>0<!--M_*1 #text/1--> was <!>&zwj;<!--M_*1 #text/2--></span><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()</script>
```

# Render End
Expand All @@ -11,17 +11,17 @@
<button>
+
</button>
<!--M_*0 #button/0-->
<!--M_*1 #button/0-->
<span>
0
<!--M_*0 #text/1-->
<!--M_*1 #text/1-->
was
<!---->
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</span>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{clickCount:0}}),1,"__tests__/template.marko_0_clickCount",0];M._.w()
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Render `{"x":true}`

```html
<!--M_[2-->
<!--M_[3-->
<html>
<head />
<body>
Hello
<!--M_]1 #text/0-->
<!--M_]2 #text/0-->
<div>
1
<!--M_*1 #text/1-->
<!--M_*2 #text/1-->
</div>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Write
```html
<!--M_[2-->Hello<!--M_]1 #text/0--><div>1<!--M_*1 #text/1--></div><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]</script>
<!--M_[3-->Hello<!--M_]2 #text/0--><div>1<!--M_*2 #text/1--></div><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]</script>
```

# Render End
```html
<!--M_[2-->
<!--M_[3-->
<html>
<head />
<body>
Hello
<!--M_]1 #text/0-->
<!--M_]2 #text/0-->
<div>
1
<!--M_*1 #text/1-->
<!--M_*2 #text/1-->
</div>
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Render
```html
<!--M_[2-->
<!--M_[3-->
<html>
<head />
<body>
Foo!
<!--M_]1 #text/0-->
<!--M_]2 #text/0-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Write
```html
<!--M_[2-->Foo!<!--M_]1 #text/0--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]</script>
<!--M_[3-->Foo!<!--M_]2 #text/0--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]</script>
```

# Render End
```html
<!--M_[2-->
<!--M_[3-->
<html>
<head />
<body>
Foo!
<!--M_]1 #text/0-->
<!--M_]2 #text/0-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={0:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},1:_.b,2:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.d={1:_.a={"#childScope/0":_.b={"#text/0!":_.c={}}},2:_.b,3:_.c},_.b["#text/0("]=_._["__tests__/template.marko_1_renderer"](_.a),_.d),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<input
disabled=""
/>
<!--M_*0 #input/0-->
<!--M_*1 #input/0-->
<button>
enable
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</button>
<!--M_*0 #button/1-->
<!--M_*1 #button/1-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()
</script>
</body>
</html>
Expand All @@ -29,14 +29,14 @@ container.querySelector("button").click();
<head />
<body>
<input />
<!--M_*0 #input/0-->
<!--M_*1 #input/0-->
<button>
disable
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</button>
<!--M_*0 #button/1-->
<!--M_*1 #button/1-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()
</script>
</body>
</html>
Expand All @@ -59,14 +59,14 @@ container.querySelector("button").click();
<input
disabled=""
/>
<!--M_*0 #input/0-->
<!--M_*1 #input/0-->
<button>
enable
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</button>
<!--M_*0 #button/1-->
<!--M_*1 #button/1-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()
</script>
</body>
</html>
Expand All @@ -87,14 +87,14 @@ container.querySelector("button").click();
<head />
<body>
<input />
<!--M_*0 #input/0-->
<!--M_*1 #input/0-->
<button>
disable
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</button>
<!--M_*0 #button/1-->
<!--M_*1 #button/1-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<input disabled><!--M_*0 #input/0--><button>enable<!--M_*0 #text/2--></button><!--M_*0 #button/1--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()</script>
<input disabled><!--M_*1 #input/0--><button>enable<!--M_*1 #text/2--></button><!--M_*1 #button/1--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()</script>
```

# Render End
Expand All @@ -11,14 +11,14 @@
<input
disabled=""
/>
<!--M_*0 #input/0-->
<!--M_*1 #input/0-->
<button>
enable
<!--M_*0 #text/2-->
<!--M_*1 #text/2-->
</button>
<!--M_*0 #button/1-->
<!--M_*1 #button/1-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{disabled:!0}}),0,"__tests__/template.marko_0_disabled",0];M._.w()
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{disabled:!0}}),1,"__tests__/template.marko_0_disabled",0];M._.w()
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
foo="acb"
nested="a c nested d b"
/>
<!--M_*0 #div/0-->
<!--M_*1 #div/0-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{input_foo:"c",input_bar:"d"}}),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{input_foo:"c",input_bar:"d"}}),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<div class=c foo=acb bar="a d b" nested="a c nested d b"></div><!--M_*0 #div/0--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{input_foo:"c",input_bar:"d"}}),0]</script>
<div class=c foo=acb bar="a d b" nested="a c nested d b"></div><!--M_*1 #div/0--><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={1:{input_foo:"c",input_bar:"d"}}),0]</script>
```

# Render End
Expand All @@ -14,9 +14,9 @@
foo="acb"
nested="a c nested d b"
/>
<!--M_*0 #div/0-->
<!--M_*1 #div/0-->
<script>
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={0:{input_foo:"c",input_bar:"d"}}),0]
WALKER_RUNTIME("M")("_");M._.r=[_=&gt;(_.a={1:{input_foo:"c",input_bar:"d"}}),0]
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div
foo="Hello Marko"
/>
<!--M_*0 #div/0-->
<!--M_*1 #div/0-->
<script>
WALKER_RUNTIME("M")("_")
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Write
```html
<div foo="Hello Marko"></div><!--M_*0 #div/0--><script>WALKER_RUNTIME("M")("_")</script>
<div foo="Hello Marko"></div><!--M_*1 #div/0--><script>WALKER_RUNTIME("M")("_")</script>
```

# Render End
Expand All @@ -11,7 +11,7 @@
<div
foo="Hello Marko"
/>
<!--M_*0 #div/0-->
<!--M_*1 #div/0-->
<script>
WALKER_RUNTIME("M")("_")
</script>
Expand Down
Loading

0 comments on commit 36eab94

Please sign in to comment.