Skip to content

Commit

Permalink
feat: add basic ssr try tag
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jan 9, 2025
1 parent 491413d commit 76b3083
Show file tree
Hide file tree
Showing 34 changed files with 465 additions and 1,041 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-poems-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/runtime-tags": patch
---

Add basic ssr try tag.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const _scope1_ = new Map();
_$.forOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], (num, _index) => {
const _scope1_id = _$.nextScopeId();
_$.write(`<button${_$.attr("data-selected", selected === num)}${_$.attr("data-multiple", num % selected === 0)}>${_$.escapeXML(num)}${_$.markResumeNode(_scope1_id, "#text/1")}</button>${_$.markResumeNode(_scope1_id, "#button/0")}`);
_$.write(`<button${_$.attr("data-selected", selected === num)}${_$.attr("data-multiple", num % selected === 0)}>${_$.escapeXML(num)}</button>${_$.markResumeNode(_scope1_id, "#button/0")}`);
_$.writeEffect(_scope1_id, "__tests__/template.marko_1_num");
_$.writeScope(_scope1_id, {
"num": num,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,50 @@
<body>
<button>
1
<!--M_*1 #text/1-->
</button>
<!--M_*1 #button/0-->
<button>
2
<!--M_*2 #text/1-->
</button>
<!--M_*2 #button/0-->
<button>
3
<!--M_*3 #text/1-->
</button>
<!--M_*3 #button/0-->
<button>
4
<!--M_*4 #text/1-->
</button>
<!--M_*4 #button/0-->
<button>
5
<!--M_*5 #text/1-->
</button>
<!--M_*5 #button/0-->
<button>
6
<!--M_*6 #text/1-->
</button>
<!--M_*6 #button/0-->
<button>
7
<!--M_*7 #text/1-->
</button>
<!--M_*7 #button/0-->
<button>
8
<!--M_*8 #text/1-->
</button>
<!--M_*8 #button/0-->
<button>
9
<!--M_*9 #text/1-->
</button>
<!--M_*9 #button/0-->
<button>
10
<!--M_*10 #text/1-->
</button>
<!--M_*10 #button/0-->
<button>
11
<!--M_*11 #text/1-->
</button>
<!--M_*11 #button/0-->
<button>
12
<!--M_*12 #text/1-->
</button>
<!--M_*12 #button/0-->
<script>
Expand All @@ -85,75 +73,63 @@ c => click(c, 2)
<body>
<button>
1
<!--M_*1 #text/1-->
</button>
<!--M_*1 #button/0-->
<button
data-multiple=""
data-selected=""
>
2
<!--M_*2 #text/1-->
</button>
<!--M_*2 #button/0-->
<button>
3
<!--M_*3 #text/1-->
</button>
<!--M_*3 #button/0-->
<button
data-multiple=""
>
4
<!--M_*4 #text/1-->
</button>
<!--M_*4 #button/0-->
<button>
5
<!--M_*5 #text/1-->
</button>
<!--M_*5 #button/0-->
<button
data-multiple=""
>
6
<!--M_*6 #text/1-->
</button>
<!--M_*6 #button/0-->
<button>
7
<!--M_*7 #text/1-->
</button>
<!--M_*7 #button/0-->
<button
data-multiple=""
>
8
<!--M_*8 #text/1-->
</button>
<!--M_*8 #button/0-->
<button>
9
<!--M_*9 #text/1-->
</button>
<!--M_*9 #button/0-->
<button
data-multiple=""
>
10
<!--M_*10 #text/1-->
</button>
<!--M_*10 #button/0-->
<button>
11
<!--M_*11 #text/1-->
</button>
<!--M_*11 #button/0-->
<button
data-multiple=""
>
12
<!--M_*12 #text/1-->
</button>
<!--M_*12 #button/0-->
<script>
Expand Down Expand Up @@ -184,71 +160,59 @@ c => click(c, 3)
<body>
<button>
1
<!--M_*1 #text/1-->
</button>
<!--M_*1 #button/0-->
<button>
2
<!--M_*2 #text/1-->
</button>
<!--M_*2 #button/0-->
<button
data-multiple=""
data-selected=""
>
3
<!--M_*3 #text/1-->
</button>
<!--M_*3 #button/0-->
<button>
4
<!--M_*4 #text/1-->
</button>
<!--M_*4 #button/0-->
<button>
5
<!--M_*5 #text/1-->
</button>
<!--M_*5 #button/0-->
<button
data-multiple=""
>
6
<!--M_*6 #text/1-->
</button>
<!--M_*6 #button/0-->
<button>
7
<!--M_*7 #text/1-->
</button>
<!--M_*7 #button/0-->
<button>
8
<!--M_*8 #text/1-->
</button>
<!--M_*8 #button/0-->
<button
data-multiple=""
>
9
<!--M_*9 #text/1-->
</button>
<!--M_*9 #button/0-->
<button>
10
<!--M_*10 #text/1-->
</button>
<!--M_*10 #button/0-->
<button>
11
<!--M_*11 #text/1-->
</button>
<!--M_*11 #button/0-->
<button
data-multiple=""
>
12
<!--M_*12 #text/1-->
</button>
<!--M_*12 #button/0-->
<script>
Expand Down Expand Up @@ -280,67 +244,55 @@ c => click(c, 5)
<body>
<button>
1
<!--M_*1 #text/1-->
</button>
<!--M_*1 #button/0-->
<button>
2
<!--M_*2 #text/1-->
</button>
<!--M_*2 #button/0-->
<button>
3
<!--M_*3 #text/1-->
</button>
<!--M_*3 #button/0-->
<button>
4
<!--M_*4 #text/1-->
</button>
<!--M_*4 #button/0-->
<button
data-multiple=""
data-selected=""
>
5
<!--M_*5 #text/1-->
</button>
<!--M_*5 #button/0-->
<button>
6
<!--M_*6 #text/1-->
</button>
<!--M_*6 #button/0-->
<button>
7
<!--M_*7 #text/1-->
</button>
<!--M_*7 #button/0-->
<button>
8
<!--M_*8 #text/1-->
</button>
<!--M_*8 #button/0-->
<button>
9
<!--M_*9 #text/1-->
</button>
<!--M_*9 #button/0-->
<button
data-multiple=""
>
10
<!--M_*10 #text/1-->
</button>
<!--M_*10 #button/0-->
<button>
11
<!--M_*11 #text/1-->
</button>
<!--M_*11 #button/0-->
<button>
12
<!--M_*12 #text/1-->
</button>
<!--M_*12 #button/0-->
<script>
Expand Down
Loading

0 comments on commit 76b3083

Please sign in to comment.