ripple 0.3.127 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +293 -0
  2. package/package.json +10 -4
  3. package/src/runtime/element.js +23 -6
  4. package/src/runtime/index-client.js +81 -41
  5. package/src/runtime/index-server.js +1 -0
  6. package/src/runtime/internal/client/blocks.js +192 -114
  7. package/src/runtime/internal/client/component.js +4 -30
  8. package/src/runtime/internal/client/composite.js +12 -13
  9. package/src/runtime/internal/client/constants.js +14 -5
  10. package/src/runtime/internal/client/context.js +12 -19
  11. package/src/runtime/internal/client/css.js +7 -9
  12. package/src/runtime/internal/client/events.js +178 -90
  13. package/src/runtime/internal/client/expression.js +185 -124
  14. package/src/runtime/internal/client/for.js +616 -264
  15. package/src/runtime/internal/client/head.js +10 -5
  16. package/src/runtime/internal/client/html.js +1 -0
  17. package/src/runtime/internal/client/hydration.js +152 -10
  18. package/src/runtime/internal/client/if.js +239 -50
  19. package/src/runtime/internal/client/index.js +9 -13
  20. package/src/runtime/internal/client/operations.js +44 -51
  21. package/src/runtime/internal/client/portal.js +163 -85
  22. package/src/runtime/internal/client/render.js +44 -25
  23. package/src/runtime/internal/client/rpc.js +3 -3
  24. package/src/runtime/internal/client/runtime.js +799 -576
  25. package/src/runtime/internal/client/selector.js +77 -0
  26. package/src/runtime/internal/client/template.js +133 -158
  27. package/src/runtime/internal/client/transport.js +38 -0
  28. package/src/runtime/internal/client/try.js +465 -426
  29. package/src/runtime/internal/client/types.d.ts +65 -21
  30. package/src/runtime/internal/client/utils.js +1 -3
  31. package/src/runtime/internal/server/dynamic.js +20 -21
  32. package/src/runtime/internal/server/index.js +327 -275
  33. package/src/runtime/internal/server/rpc.js +3 -2
  34. package/src/runtime/internal/server/transport.js +16 -0
  35. package/src/runtime/transport.js +21 -0
  36. package/tests/client/__snapshots__/for.test.tsrx.snap +0 -5
  37. package/tests/client/array/array.copy-within.test.tsrx +12 -12
  38. package/tests/client/array/array.derived.test.tsrx +46 -46
  39. package/tests/client/array/array.iteration.test.tsrx +10 -10
  40. package/tests/client/array/array.mutations.test.tsrx +20 -20
  41. package/tests/client/array/array.static.test.tsrx +11 -11
  42. package/tests/client/array/array.to-methods.test.tsrx +6 -6
  43. package/tests/client/async-suspend.test.tsrx +74 -75
  44. package/tests/client/basic/basic.attributes.test.tsrx +86 -83
  45. package/tests/client/basic/basic.collections.test.tsrx +12 -12
  46. package/tests/client/basic/basic.components.test.tsrx +99 -25
  47. package/tests/client/basic/basic.errors.test.tsrx +18 -18
  48. package/tests/client/basic/basic.events.test.tsrx +42 -42
  49. package/tests/client/basic/basic.get-set.test.tsrx +8 -8
  50. package/tests/client/basic/basic.reactivity.test.tsrx +97 -29
  51. package/tests/client/basic/basic.rendering.test.tsrx +25 -25
  52. package/tests/client/basic/basic.utilities.test.tsrx +3 -3
  53. package/tests/client/boundaries.test.tsrx +8 -8
  54. package/tests/client/boxed-locals.test.tsrx +452 -0
  55. package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +6 -6
  56. package/tests/client/compiler/compiler.assignments.test.tsrx +9 -73
  57. package/tests/client/compiler/compiler.attributes.test.tsrx +23 -23
  58. package/tests/client/compiler/compiler.basic.test.tsrx +15 -60
  59. package/tests/client/compiler/compiler.tracked-access.test.tsrx +18 -43
  60. package/tests/client/compiler/compiler.try-in-function.test.tsrx +2 -2
  61. package/tests/client/composite/__snapshots__/composite.render.test.tsrx.snap +0 -1
  62. package/tests/client/composite/composite.dynamic-components.test.tsrx +77 -6
  63. package/tests/client/composite/composite.props.test.tsrx +149 -12
  64. package/tests/client/composite/composite.reactivity.test.tsrx +51 -52
  65. package/tests/client/composite/composite.render.test.tsrx +26 -9
  66. package/tests/client/css/scoped-styles.test.tsrx +8 -8
  67. package/tests/client/date.test.tsrx +42 -42
  68. package/tests/client/derived-release.test.tsrx +370 -0
  69. package/tests/client/dynamic-elements.test.tsrx +45 -45
  70. package/tests/client/events.test.tsrx +97 -71
  71. package/tests/client/for-selector.test.tsrx +221 -0
  72. package/tests/client/for-single-root-items.test.tsrx +118 -3
  73. package/tests/client/for.test.tsrx +332 -31
  74. package/tests/client/head.test.tsrx +19 -19
  75. package/tests/client/html.test.tsrx +11 -9
  76. package/tests/client/if-block.test.tsrx +80 -0
  77. package/tests/client/map.test.tsrx +16 -16
  78. package/tests/client/media-query.test.tsrx +7 -7
  79. package/tests/client/portal.test.tsrx +224 -26
  80. package/tests/client/primitive-text.test.tsrx +50 -0
  81. package/tests/client/prop-kind-switch.test.tsrx +141 -0
  82. package/tests/client/ref.test.tsrx +17 -17
  83. package/tests/client/return.test.tsrx +26 -3
  84. package/tests/client/root-boundary.test.tsrx +42 -0
  85. package/tests/client/scoped-flush.test.tsrx +8 -8
  86. package/tests/client/set.test.tsrx +6 -6
  87. package/tests/client/svg.test.tsrx +11 -11
  88. package/tests/client/switch.test.tsrx +44 -44
  89. package/tests/client/track-async-hydration.test.tsrx +4 -4
  90. package/tests/client/try.test.tsrx +151 -83
  91. package/tests/client/tsx.test.tsrx +43 -40
  92. package/tests/client/url/url.derived.test.tsrx +6 -6
  93. package/tests/client/url-search-params/url-search-params.derived.test.tsrx +8 -8
  94. package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +10 -10
  95. package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +10 -10
  96. package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +18 -18
  97. package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +2 -2
  98. package/tests/hydration/basic.test.js +74 -1
  99. package/tests/hydration/build-components.js +22 -1
  100. package/tests/hydration/compiled/client/basic.js +1142 -713
  101. package/tests/hydration/compiled/client/composite.js +151 -100
  102. package/tests/hydration/compiled/client/events.js +190 -150
  103. package/tests/hydration/compiled/client/for.js +1472 -1126
  104. package/tests/hydration/compiled/client/fragment-cursor.js +2341 -0
  105. package/tests/hydration/compiled/client/head.js +255 -199
  106. package/tests/hydration/compiled/client/hmr.js +54 -41
  107. package/tests/hydration/compiled/client/html-in-template.js +54 -39
  108. package/tests/hydration/compiled/client/html.js +1633 -1263
  109. package/tests/hydration/compiled/client/if-children.js +420 -270
  110. package/tests/hydration/compiled/client/if-fragment-controlflow.js +363 -317
  111. package/tests/hydration/compiled/client/if.js +229 -219
  112. package/tests/hydration/compiled/client/mixed-control-flow.js +420 -400
  113. package/tests/hydration/compiled/client/nested-control-flow.js +1326 -1255
  114. package/tests/hydration/compiled/client/portal.js +87 -95
  115. package/tests/hydration/compiled/client/reactivity.js +140 -83
  116. package/tests/hydration/compiled/client/return.js +28 -19
  117. package/tests/hydration/compiled/client/streaming.js +390 -306
  118. package/tests/hydration/compiled/client/switch.js +258 -266
  119. package/tests/hydration/compiled/client/track-async-serialization.js +448 -280
  120. package/tests/hydration/compiled/client/try.js +173 -129
  121. package/tests/hydration/compiled/client/typed-text.js +71 -0
  122. package/tests/hydration/compiled/fixtures/money.js +10 -0
  123. package/tests/hydration/compiled/server/basic.js +123 -6
  124. package/tests/hydration/compiled/server/composite.js +16 -30
  125. package/tests/hydration/compiled/server/events.js +19 -19
  126. package/tests/hydration/compiled/server/for.js +109 -49
  127. package/tests/hydration/compiled/server/fragment-cursor.js +1687 -0
  128. package/tests/hydration/compiled/server/head.js +20 -28
  129. package/tests/hydration/compiled/server/hmr.js +2 -2
  130. package/tests/hydration/compiled/server/html.js +71 -247
  131. package/tests/hydration/compiled/server/if-children.js +107 -15
  132. package/tests/hydration/compiled/server/if.js +11 -15
  133. package/tests/hydration/compiled/server/mixed-control-flow.js +8 -8
  134. package/tests/hydration/compiled/server/portal.js +14 -22
  135. package/tests/hydration/compiled/server/reactivity.js +14 -46
  136. package/tests/hydration/compiled/server/streaming.js +19 -19
  137. package/tests/hydration/compiled/server/switch.js +8 -8
  138. package/tests/hydration/compiled/server/track-async-serialization.js +150 -23
  139. package/tests/hydration/compiled/server/try.js +8 -8
  140. package/tests/hydration/compiled/server/typed-text.js +17 -0
  141. package/tests/hydration/components/basic.tsrx +44 -8
  142. package/tests/hydration/components/composite.tsrx +2 -2
  143. package/tests/hydration/components/events.tsrx +25 -25
  144. package/tests/hydration/components/for.tsrx +115 -67
  145. package/tests/hydration/components/fragment-cursor.tsrx +650 -0
  146. package/tests/hydration/components/head.tsrx +16 -16
  147. package/tests/hydration/components/hmr.tsrx +2 -2
  148. package/tests/hydration/components/html.tsrx +7 -7
  149. package/tests/hydration/components/if-children.tsrx +72 -25
  150. package/tests/hydration/components/if.tsrx +18 -18
  151. package/tests/hydration/components/mixed-control-flow.tsrx +11 -11
  152. package/tests/hydration/components/portal.tsrx +3 -3
  153. package/tests/hydration/components/reactivity.tsrx +16 -16
  154. package/tests/hydration/components/streaming.tsrx +20 -20
  155. package/tests/hydration/components/switch.tsrx +20 -20
  156. package/tests/hydration/components/text-types.ts +4 -0
  157. package/tests/hydration/components/track-async-serialization.tsrx +80 -26
  158. package/tests/hydration/components/try.tsrx +8 -8
  159. package/tests/hydration/components/typed-text.tsrx +22 -0
  160. package/tests/hydration/fixtures/money.js +10 -0
  161. package/tests/hydration/for.test.js +36 -0
  162. package/tests/hydration/fragment-cursor.test.js +111 -0
  163. package/tests/hydration/if-children.test.js +24 -0
  164. package/tests/hydration/streaming.test.js +19 -0
  165. package/tests/hydration/track-async-serialization.test.js +87 -2
  166. package/tests/hydration/tsconfig.text-types.json +10 -0
  167. package/tests/hydration/typed-text.test.js +34 -0
  168. package/tests/server/await.test.tsrx +3 -3
  169. package/tests/server/basic.attributes.test.tsrx +42 -42
  170. package/tests/server/basic.components.test.tsrx +64 -8
  171. package/tests/server/basic.test.tsrx +34 -32
  172. package/tests/server/compiler.test.tsrx +1 -70
  173. package/tests/server/composite.props.test.tsrx +6 -6
  174. package/tests/server/dynamic-elements.test.tsrx +31 -8
  175. package/tests/server/for.test.tsrx +94 -0
  176. package/tests/server/head.test.tsrx +11 -11
  177. package/tests/server/scoped-styles.test.tsrx +2 -2
  178. package/tests/server/streaming-ssr.test.tsrx +48 -43
  179. package/tests/server/track-async-serialization.test.tsrx +204 -21
  180. package/tests/server/try.test.tsrx +48 -48
  181. package/tests/types/transport.ts +40 -0
  182. package/tests/utils/vite-plugin-config.test.js +23 -0
  183. package/types/index.d.ts +48 -7
  184. package/types/server.d.ts +3 -0
  185. package/types/transport.d.ts +15 -0
  186. package/src/runtime/internal/client/switch.js +0 -113
  187. package/src/utils/errors.js +0 -13
  188. package/tests/client/lazy-array.test.tsrx +0 -31
  189. package/tests/client/lazy-destructuring.test.tsrx +0 -438
  190. package/tests/client/tracked-index-access.test.tsrx +0 -113
  191. package/tests/server/lazy-destructuring.test.tsrx +0 -595
  192. package/tests/server/tracked-index-access.test.tsrx +0 -76
@@ -3,413 +3,459 @@ import * as _$_ from 'ripple/internal/client';
3
3
 
4
4
  var root_2 = _$_.template(`<p class="muze"> </p>`, 0);
5
5
  var root_1 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
6
+
7
+ function consequent(__anchor, { hasLoaded, muzes }) {
8
+ var fragment = root_1();
9
+ var node_1 = _$_.first_child_frag(fragment);
10
+
11
+ _$_.for_keyed(
12
+ node_1,
13
+ () => muzes,
14
+ (__anchor, pattern) => {
15
+ var p = root_2();
16
+
17
+ {
18
+ var expression = _$_.hydrating ? _$_.hydrate_child() : p.firstChild;
19
+
20
+ _$_.expression(expression, () => _$_.get(pattern).muzeId);
21
+ _$_.hydrating && _$_.pop(p);
22
+ }
23
+
24
+ _$_.append(__anchor, p);
25
+ },
26
+ 0,
27
+ (pattern) => _$_.get(pattern).muzeId
28
+ );
29
+
30
+ _$_.next();
31
+ _$_.append(__anchor, fragment);
32
+ }
33
+
34
+ function if_1({ hasLoaded, muzes }) {
35
+ if (hasLoaded) return consequent;
36
+ }
37
+
6
38
  var root = _$_.template(`<div class="feed-c"><!></div>`, 0);
39
+
40
+ function IfFragmentForElement_render(__anchor, __block) {
41
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
42
+ const hasLoaded = true;
43
+ var div = root();
44
+
45
+ {
46
+ var node = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
47
+
48
+ _$_.if(node, if_1, false, { hasLoaded, muzes });
49
+ _$_.hydrating && _$_.pop(div);
50
+ }
51
+
52
+ _$_.append(__anchor, div);
53
+ }
54
+
55
+ IfFragmentForElement[_$_.$r] = IfFragmentForElement_render;
56
+
7
57
  var root_5 = _$_.template(`<p class="muze"> </p>`, 0);
8
58
  var root_6 = _$_.template(`<span class="has-items">has items</span>`, 0);
59
+
60
+ function consequent_1(__anchor, muzes) {
61
+ var span = root_6();
62
+
63
+ _$_.append(__anchor, span);
64
+ }
65
+
66
+ function if_2(muzes) {
67
+ if (muzes.length > 0) return consequent_1;
68
+ }
69
+
9
70
  var root_7 = _$_.template(`<span class="empty">empty</span>`, 0);
71
+
72
+ function consequent_2(__anchor, muzes) {
73
+ var span_1 = root_7();
74
+
75
+ _$_.append(__anchor, span_1);
76
+ }
77
+
78
+ function if_3(muzes) {
79
+ if (muzes.length === 0) return consequent_2;
80
+ }
81
+
10
82
  var root_4 = _$_.template(`<!><!><!>`, 1, 3);
11
- var root_3 = _$_.template(`<div class="feed"><!></div>`, 0);
12
- var root_9 = _$_.template(`<p class="muze">b</p><p class="muze">c</p>`, 1, 2);
13
- var root_8 = _$_.template(`<div class="feed-b"><!></div>`, 0);
14
- var root_12 = _$_.template(`<p class="muze"> </p>`, 0);
15
- var root_11 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
16
- var root_10 = _$_.template(`<!>`, 1, 1);
17
- var root_14 = _$_.template(`<p class="muze"> </p>`, 0);
18
- var root_15 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
19
- var root_13 = _$_.template(`<!>`, 1, 1);
20
- var root_17 = _$_.template(`<p class="muze"> </p>`, 0);
21
- var root_18 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
22
- var root_16 = _$_.template(`<div class="feed-f"><!></div>`, 0);
23
- var root_20 = _$_.template(`<span class="loading">loading</span>`, 0);
24
- var root_22 = _$_.template(`<p class="muze"> </p>`, 0);
25
- var root_21 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
26
- var root_19 = _$_.template(`<div class="feed-d"><!></div>`, 0);
27
- var root_25 = _$_.template(`<p class="muze"> </p>`, 0);
28
- var root_24 = _$_.template(`<section><!><span class="after">after</span></section>`, 0);
29
- var root_23 = _$_.template(`<div class="feed-e"><!></div>`, 0);
30
83
 
31
- export function IfFragmentForElement() {
32
- return _$_.tsrx_element((__anchor, __block) => {
33
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
34
- const hasLoaded = true;
35
- var div = root();
84
+ function consequent_3(__anchor, { hasLoaded, muzes }) {
85
+ var fragment_1 = root_4();
86
+ var node_3 = _$_.first_child_frag(fragment_1);
36
87
 
37
- {
38
- var node = _$_.child(div);
88
+ _$_.for_keyed(
89
+ node_3,
90
+ () => muzes,
91
+ (__anchor, pattern_1) => {
92
+ var p_1 = root_5();
39
93
 
40
94
  {
41
- var consequent = (__anchor) => {
42
- var fragment = root_1();
43
- var node_1 = _$_.first_child_frag(fragment);
44
-
45
- _$_.for_keyed(
46
- node_1,
47
- () => muzes,
48
- (__anchor, pattern) => {
49
- var p = root_2();
50
-
51
- {
52
- var expression = _$_.child(p);
53
-
54
- _$_.expression(expression, () => _$_.get(pattern).muzeId);
55
- _$_.pop(p);
56
- }
57
-
58
- _$_.append(__anchor, p);
59
- },
60
- 0,
61
- (pattern) => _$_.get(pattern).muzeId
62
- );
63
-
64
- _$_.append(__anchor, fragment);
65
- };
66
-
67
- _$_.if(node, (__render) => {
68
- if (hasLoaded) __render(consequent);
69
- });
95
+ var expression_1 = _$_.hydrating ? _$_.hydrate_child() : p_1.firstChild;
96
+
97
+ _$_.expression(expression_1, () => _$_.get(pattern_1).muzeId);
98
+ _$_.hydrating && _$_.pop(p_1);
70
99
  }
71
100
 
72
- _$_.pop(div);
73
- }
101
+ _$_.append(__anchor, p_1);
102
+ },
103
+ 0,
104
+ (pattern_1) => _$_.get(pattern_1).muzeId
105
+ );
74
106
 
75
- _$_.append(__anchor, div);
76
- });
77
- }
107
+ var node_4 = _$_.hydrating ? _$_.hydrate_sibling() : node_3.nextSibling;
78
108
 
79
- export function IfFragmentForIfIf() {
80
- return _$_.tsrx_element((__anchor, __block) => {
81
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
82
- const hasLoaded = true;
83
- var div_1 = root_3();
109
+ _$_.if(node_4, if_2, false, muzes);
84
110
 
85
- {
86
- var node_2 = _$_.child(div_1);
111
+ var node_5 = _$_.hydrating ? _$_.hydrate_sibling() : node_4.nextSibling;
87
112
 
88
- {
89
- var consequent_3 = (__anchor) => {
90
- var fragment_1 = root_4();
91
- var node_3 = _$_.first_child_frag(fragment_1);
113
+ _$_.if(node_5, if_3, false, muzes);
114
+ _$_.append(__anchor, fragment_1);
115
+ }
92
116
 
93
- _$_.for_keyed(
94
- node_3,
95
- () => muzes,
96
- (__anchor, pattern_1) => {
97
- var p_1 = root_5();
117
+ function if_4({ hasLoaded, muzes }) {
118
+ if (hasLoaded) return consequent_3;
119
+ }
98
120
 
99
- {
100
- var expression_1 = _$_.child(p_1);
121
+ var root_3 = _$_.template(`<div class="feed"><!></div>`, 0);
101
122
 
102
- _$_.expression(expression_1, () => _$_.get(pattern_1).muzeId);
103
- _$_.pop(p_1);
104
- }
123
+ function IfFragmentForIfIf_render(__anchor, __block) {
124
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
125
+ const hasLoaded = true;
126
+ var div_1 = root_3();
105
127
 
106
- _$_.append(__anchor, p_1);
107
- },
108
- 0,
109
- (pattern_1) => _$_.get(pattern_1).muzeId
110
- );
128
+ {
129
+ var node_2 = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
111
130
 
112
- var node_4 = _$_.sibling(node_3);
131
+ _$_.if(node_2, if_4, false, { hasLoaded, muzes });
132
+ _$_.hydrating && _$_.pop(div_1);
133
+ }
113
134
 
114
- {
115
- var consequent_1 = (__anchor) => {
116
- var span = root_6();
135
+ _$_.append(__anchor, div_1);
136
+ }
117
137
 
118
- _$_.append(__anchor, span);
119
- };
138
+ IfFragmentForIfIf[_$_.$r] = IfFragmentForIfIf_render;
120
139
 
121
- _$_.if(node_4, (__render) => {
122
- if (muzes.length > 0) __render(consequent_1);
123
- });
124
- }
140
+ var root_9 = _$_.template(`<p class="muze">b</p><p class="muze">c</p>`, 1, 2);
125
141
 
126
- var node_5 = _$_.sibling(node_4);
142
+ function consequent_4(__anchor, hasLoaded) {
143
+ var fragment_2 = root_9();
127
144
 
128
- {
129
- var consequent_2 = (__anchor) => {
130
- var span_1 = root_7();
145
+ _$_.next();
146
+ _$_.append(__anchor, fragment_2);
147
+ }
131
148
 
132
- _$_.append(__anchor, span_1);
133
- };
149
+ function if_5(hasLoaded) {
150
+ if (hasLoaded) return consequent_4;
151
+ }
134
152
 
135
- _$_.if(node_5, (__render) => {
136
- if (muzes.length === 0) __render(consequent_2);
137
- });
138
- }
153
+ var root_8 = _$_.template(`<div class="feed-b"><!></div>`, 0);
139
154
 
140
- _$_.append(__anchor, fragment_1);
141
- };
155
+ function IfFragmentElements_render(__anchor, __block) {
156
+ const hasLoaded = true;
157
+ var div_2 = root_8();
142
158
 
143
- _$_.if(node_2, (__render) => {
144
- if (hasLoaded) __render(consequent_3);
145
- });
146
- }
159
+ {
160
+ var node_6 = _$_.hydrating ? _$_.hydrate_child() : div_2.firstChild;
147
161
 
148
- _$_.pop(div_1);
149
- }
162
+ _$_.if(node_6, if_5, false, hasLoaded);
163
+ _$_.hydrating && _$_.pop(div_2);
164
+ }
150
165
 
151
- _$_.append(__anchor, div_1);
152
- });
166
+ _$_.append(__anchor, div_2);
153
167
  }
154
168
 
155
- export function IfFragmentElements() {
156
- return _$_.tsrx_element((__anchor, __block) => {
157
- const hasLoaded = true;
158
- var div_2 = root_8();
169
+ IfFragmentElements[_$_.$r] = IfFragmentElements_render;
159
170
 
160
- {
161
- var node_6 = _$_.child(div_2);
171
+ var root_12 = _$_.template(`<p class="muze"> </p>`, 0);
172
+ var root_11 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
173
+ var root_10 = _$_.template(`<!>`, 1, 1);
162
174
 
163
- {
164
- var consequent_4 = (__anchor) => {
165
- var fragment_2 = root_9();
175
+ function ComponentBodyFragmentControlFlow_render(__anchor, __block) {
176
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
177
+ var fragment_3 = root_10();
178
+ var node_8 = _$_.first_child_frag(fragment_3);
166
179
 
167
- _$_.append(__anchor, fragment_2);
168
- };
180
+ _$_.expression(node_8, () => _$_.tsrx_element((__anchor, __block) => {
181
+ var fragment_4 = root_11();
182
+ var node_7 = _$_.first_child_frag(fragment_4);
169
183
 
170
- _$_.if(node_6, (__render) => {
171
- if (hasLoaded) __render(consequent_4);
172
- });
173
- }
184
+ _$_.for_keyed(
185
+ node_7,
186
+ () => muzes,
187
+ (__anchor, pattern_2) => {
188
+ var p_2 = root_12();
189
+
190
+ {
191
+ var expression_2 = _$_.hydrating ? _$_.hydrate_child() : p_2.firstChild;
192
+
193
+ _$_.expression(expression_2, () => _$_.get(pattern_2).muzeId);
194
+ _$_.hydrating && _$_.pop(p_2);
195
+ }
174
196
 
175
- _$_.pop(div_2);
176
- }
197
+ _$_.append(__anchor, p_2);
198
+ },
199
+ 0,
200
+ (pattern_2) => _$_.get(pattern_2).muzeId
201
+ );
177
202
 
178
- _$_.append(__anchor, div_2);
179
- });
203
+ _$_.next();
204
+ _$_.append(__anchor, fragment_4);
205
+ }));
206
+
207
+ _$_.append(__anchor, fragment_3);
180
208
  }
181
209
 
182
- export function ComponentBodyFragmentControlFlow() {
183
- return _$_.tsrx_element((__anchor, __block) => {
184
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
185
- var fragment_3 = root_10();
186
- var node_8 = _$_.first_child_frag(fragment_3);
210
+ ComponentBodyFragmentControlFlow[_$_.$r] = ComponentBodyFragmentControlFlow_render;
211
+
212
+ var root_14 = _$_.template(`<p class="muze"> </p>`, 0);
213
+ var root_15 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
214
+ var root_13 = _$_.template(`<!>`, 1, 1);
215
+
216
+ function ComponentBodyCodeBlockControlFlow_render(__anchor, __block) {
217
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
218
+ var fragment_5 = root_13();
219
+ var node_9 = _$_.first_child_frag(fragment_5);
220
+
221
+ _$_.expression(node_9, () => _$_.tsrx_element((__anchor, __block) => {
222
+ var fragment_6 = root_15();
223
+ var expression_4 = _$_.first_child_frag(fragment_6);
187
224
 
188
- _$_.expression(node_8, () => _$_.tsrx_element((__anchor, __block) => {
189
- var fragment_4 = root_11();
190
- var node_7 = _$_.first_child_frag(fragment_4);
225
+ _$_.expression(expression_4, () => _$_.tsrx_element((__anchor, __block) => {
226
+ const rows = muzes;
191
227
 
192
228
  _$_.for_keyed(
193
- node_7,
194
- () => muzes,
195
- (__anchor, pattern_2) => {
196
- var p_2 = root_12();
229
+ __anchor,
230
+ () => rows,
231
+ (__anchor, pattern_3) => {
232
+ var p_3 = root_14();
197
233
 
198
234
  {
199
- var expression_2 = _$_.child(p_2);
235
+ var expression_3 = _$_.hydrating ? _$_.hydrate_child() : p_3.firstChild;
200
236
 
201
- _$_.expression(expression_2, () => _$_.get(pattern_2).muzeId);
202
- _$_.pop(p_2);
237
+ _$_.expression(expression_3, () => _$_.get(pattern_3).muzeId);
238
+ _$_.hydrating && _$_.pop(p_3);
203
239
  }
204
240
 
205
- _$_.append(__anchor, p_2);
241
+ _$_.append(__anchor, p_3);
206
242
  },
207
- 0,
208
- (pattern_2) => _$_.get(pattern_2).muzeId
243
+ 16,
244
+ (pattern_3) => _$_.get(pattern_3).muzeId
209
245
  );
210
-
211
- _$_.append(__anchor, fragment_4);
212
246
  }));
213
247
 
214
- _$_.append(__anchor, fragment_3);
215
- });
248
+ _$_.next();
249
+ _$_.append(__anchor, fragment_6);
250
+ }));
251
+
252
+ _$_.append(__anchor, fragment_5);
216
253
  }
217
254
 
218
- export function ComponentBodyCodeBlockControlFlow() {
219
- return _$_.tsrx_element((__anchor, __block) => {
220
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
221
- var fragment_5 = root_13();
222
- var node_9 = _$_.first_child_frag(fragment_5);
223
-
224
- _$_.expression(node_9, () => _$_.tsrx_element((__anchor, __block) => {
225
- var fragment_6 = root_15();
226
- var expression_4 = _$_.first_child_frag(fragment_6);
227
-
228
- _$_.expression(expression_4, () => _$_.tsrx_element((__anchor, __block) => {
229
- const rows = muzes;
230
-
231
- _$_.for_keyed(
232
- __anchor,
233
- () => rows,
234
- (__anchor, pattern_3) => {
235
- var p_3 = root_14();
236
-
237
- {
238
- var expression_3 = _$_.child(p_3);
239
-
240
- _$_.expression(expression_3, () => _$_.get(pattern_3).muzeId);
241
- _$_.pop(p_3);
242
- }
243
-
244
- _$_.append(__anchor, p_3);
245
- },
246
- 16,
247
- (pattern_3) => _$_.get(pattern_3).muzeId
248
- );
249
- }));
250
-
251
- _$_.append(__anchor, fragment_6);
252
- }));
255
+ ComponentBodyCodeBlockControlFlow[_$_.$r] = ComponentBodyCodeBlockControlFlow_render;
256
+
257
+ var root_17 = _$_.template(`<p class="muze"> </p>`, 0);
258
+ var root_18 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
259
+
260
+ function consequent_5(__anchor, { hasLoaded, muzes }) {
261
+ var fragment_7 = root_18();
262
+ var expression_6 = _$_.first_child_frag(fragment_7);
263
+
264
+ _$_.expression(expression_6, () => _$_.tsrx_element((__anchor, __block) => {
265
+ const rows = muzes;
266
+
267
+ _$_.for_keyed(
268
+ __anchor,
269
+ () => rows,
270
+ (__anchor, pattern_4) => {
271
+ var p_4 = root_17();
272
+
273
+ {
274
+ var expression_5 = _$_.hydrating ? _$_.hydrate_child() : p_4.firstChild;
253
275
 
254
- _$_.append(__anchor, fragment_5);
255
- });
276
+ _$_.expression(expression_5, () => _$_.get(pattern_4).muzeId);
277
+ _$_.hydrating && _$_.pop(p_4);
278
+ }
279
+
280
+ _$_.append(__anchor, p_4);
281
+ },
282
+ 16,
283
+ (pattern_4) => _$_.get(pattern_4).muzeId
284
+ );
285
+ }));
286
+
287
+ _$_.next();
288
+ _$_.append(__anchor, fragment_7);
256
289
  }
257
290
 
258
- export function IfCodeBlockControlFlow() {
259
- return _$_.tsrx_element((__anchor, __block) => {
260
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
261
- const hasLoaded = true;
262
- var div_3 = root_16();
291
+ function if_6({ hasLoaded, muzes }) {
292
+ if (hasLoaded) return consequent_5;
293
+ }
294
+
295
+ var root_16 = _$_.template(`<div class="feed-f"><!></div>`, 0);
296
+
297
+ function IfCodeBlockControlFlow_render(__anchor, __block) {
298
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
299
+ const hasLoaded = true;
300
+ var div_3 = root_16();
301
+
302
+ {
303
+ var node_10 = _$_.hydrating ? _$_.hydrate_child() : div_3.firstChild;
304
+
305
+ _$_.if(node_10, if_6, false, { hasLoaded, muzes });
306
+ _$_.hydrating && _$_.pop(div_3);
307
+ }
308
+
309
+ _$_.append(__anchor, div_3);
310
+ }
311
+
312
+ IfCodeBlockControlFlow[_$_.$r] = IfCodeBlockControlFlow_render;
313
+
314
+ var root_20 = _$_.template(`<span class="loading">loading</span>`, 0);
315
+ var root_22 = _$_.template(`<p class="muze"> </p>`, 0);
316
+ var root_21 = _$_.template(`<!><span class="after">after</span>`, 1, 2);
317
+
318
+ function consequent_6(__anchor, { hasLoaded, muzes }) {
319
+ var span_2 = root_20();
320
+
321
+ _$_.append(__anchor, span_2);
322
+ }
263
323
 
264
- {
265
- var node_10 = _$_.child(div_3);
324
+ function alternate(__anchor, { hasLoaded, muzes }) {
325
+ var fragment_8 = root_21();
326
+ var node_12 = _$_.first_child_frag(fragment_8);
327
+
328
+ _$_.for_keyed(
329
+ node_12,
330
+ () => muzes,
331
+ (__anchor, pattern_5) => {
332
+ var p_5 = root_22();
266
333
 
267
334
  {
268
- var consequent_5 = (__anchor) => {
269
- var fragment_7 = root_18();
270
- var expression_6 = _$_.first_child_frag(fragment_7);
271
-
272
- _$_.expression(expression_6, () => _$_.tsrx_element((__anchor, __block) => {
273
- const rows = muzes;
274
-
275
- _$_.for_keyed(
276
- __anchor,
277
- () => rows,
278
- (__anchor, pattern_4) => {
279
- var p_4 = root_17();
280
-
281
- {
282
- var expression_5 = _$_.child(p_4);
283
-
284
- _$_.expression(expression_5, () => _$_.get(pattern_4).muzeId);
285
- _$_.pop(p_4);
286
- }
287
-
288
- _$_.append(__anchor, p_4);
289
- },
290
- 16,
291
- (pattern_4) => _$_.get(pattern_4).muzeId
292
- );
293
- }));
294
-
295
- _$_.append(__anchor, fragment_7);
296
- };
297
-
298
- _$_.if(node_10, (__render) => {
299
- if (hasLoaded) __render(consequent_5);
300
- });
335
+ var expression_7 = _$_.hydrating ? _$_.hydrate_child() : p_5.firstChild;
336
+
337
+ _$_.expression(expression_7, () => _$_.get(pattern_5).muzeId);
338
+ _$_.hydrating && _$_.pop(p_5);
301
339
  }
302
340
 
303
- _$_.pop(div_3);
304
- }
341
+ _$_.append(__anchor, p_5);
342
+ },
343
+ 0,
344
+ (pattern_5) => _$_.get(pattern_5).muzeId
345
+ );
305
346
 
306
- _$_.append(__anchor, div_3);
307
- });
347
+ _$_.next();
348
+ _$_.append(__anchor, fragment_8);
308
349
  }
309
350
 
310
- export function IfElseFragment() {
311
- return _$_.tsrx_element((__anchor, __block) => {
312
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
313
- const hasLoaded = false;
314
- var div_4 = root_19();
351
+ function if_7({ hasLoaded, muzes }) {
352
+ if (hasLoaded) return consequent_6; else return alternate;
353
+ }
315
354
 
316
- {
317
- var node_11 = _$_.child(div_4);
355
+ var root_19 = _$_.template(`<div class="feed-d"><!></div>`, 0);
318
356
 
319
- {
320
- var consequent_6 = (__anchor) => {
321
- var span_2 = root_20();
357
+ function IfElseFragment_render(__anchor, __block) {
358
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
359
+ const hasLoaded = false;
360
+ var div_4 = root_19();
322
361
 
323
- _$_.append(__anchor, span_2);
324
- };
362
+ {
363
+ var node_11 = _$_.hydrating ? _$_.hydrate_child() : div_4.firstChild;
325
364
 
326
- var alternate = (__anchor) => {
327
- var fragment_8 = root_21();
328
- var node_12 = _$_.first_child_frag(fragment_8);
365
+ _$_.if(node_11, if_7, false, { hasLoaded, muzes });
366
+ _$_.hydrating && _$_.pop(div_4);
367
+ }
329
368
 
330
- _$_.for_keyed(
331
- node_12,
332
- () => muzes,
333
- (__anchor, pattern_5) => {
334
- var p_5 = root_22();
369
+ _$_.append(__anchor, div_4);
370
+ }
335
371
 
336
- {
337
- var expression_7 = _$_.child(p_5);
372
+ IfElseFragment[_$_.$r] = IfElseFragment_render;
338
373
 
339
- _$_.expression(expression_7, () => _$_.get(pattern_5).muzeId);
340
- _$_.pop(p_5);
341
- }
374
+ var root_25 = _$_.template(`<p class="muze"> </p>`, 0);
375
+ var root_24 = _$_.template(`<section><!><span class="after">after</span></section>`, 0);
342
376
 
343
- _$_.append(__anchor, p_5);
344
- },
345
- 0,
346
- (pattern_5) => _$_.get(pattern_5).muzeId
347
- );
377
+ function consequent_7(__anchor, { hasLoaded, muzes }) {
378
+ var section = root_24();
348
379
 
349
- _$_.append(__anchor, fragment_8);
350
- };
380
+ {
381
+ var node_14 = _$_.hydrating ? _$_.hydrate_child() : section.firstChild;
351
382
 
352
- _$_.if(node_11, (__render) => {
353
- if (hasLoaded) __render(consequent_6); else __render(alternate, false);
354
- });
355
- }
383
+ _$_.for_keyed(
384
+ node_14,
385
+ () => muzes,
386
+ (__anchor, pattern_6) => {
387
+ var p_6 = root_25();
356
388
 
357
- _$_.pop(div_4);
358
- }
389
+ {
390
+ var expression_8 = _$_.hydrating ? _$_.hydrate_child() : p_6.firstChild;
359
391
 
360
- _$_.append(__anchor, div_4);
361
- });
392
+ _$_.expression(expression_8, () => _$_.get(pattern_6).muzeId);
393
+ _$_.hydrating && _$_.pop(p_6);
394
+ }
395
+
396
+ _$_.append(__anchor, p_6);
397
+ },
398
+ 0,
399
+ (pattern_6) => _$_.get(pattern_6).muzeId
400
+ );
401
+
402
+ _$_.hydrating && _$_.pop(section);
403
+ }
404
+
405
+ _$_.append(__anchor, section);
362
406
  }
363
407
 
364
- export function IfDivFragment() {
365
- return _$_.tsrx_element((__anchor, __block) => {
366
- const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
367
- const hasLoaded = true;
368
- var div_5 = root_23();
408
+ function if_8({ hasLoaded, muzes }) {
409
+ if (hasLoaded) return consequent_7;
410
+ }
369
411
 
370
- {
371
- var node_13 = _$_.child(div_5);
412
+ var root_23 = _$_.template(`<div class="feed-e"><!></div>`, 0);
372
413
 
373
- {
374
- var consequent_7 = (__anchor) => {
375
- var section = root_24();
414
+ function IfDivFragment_render(__anchor, __block) {
415
+ const muzes = [{ muzeId: 'b' }, { muzeId: 'c' }];
416
+ const hasLoaded = true;
417
+ var div_5 = root_23();
376
418
 
377
- {
378
- var node_14 = _$_.child(section);
419
+ {
420
+ var node_13 = _$_.hydrating ? _$_.hydrate_child() : div_5.firstChild;
421
+
422
+ _$_.if(node_13, if_8, false, { hasLoaded, muzes });
423
+ _$_.hydrating && _$_.pop(div_5);
424
+ }
379
425
 
380
- _$_.for_keyed(
381
- node_14,
382
- () => muzes,
383
- (__anchor, pattern_6) => {
384
- var p_6 = root_25();
426
+ _$_.append(__anchor, div_5);
427
+ }
385
428
 
386
- {
387
- var expression_8 = _$_.child(p_6);
429
+ IfDivFragment[_$_.$r] = IfDivFragment_render;
388
430
 
389
- _$_.expression(expression_8, () => _$_.get(pattern_6).muzeId);
390
- _$_.pop(p_6);
391
- }
431
+ export function IfFragmentForElement() {
432
+ return _$_.tsrx_element(IfFragmentForElement_render);
433
+ }
392
434
 
393
- _$_.append(__anchor, p_6);
394
- },
395
- 0,
396
- (pattern_6) => _$_.get(pattern_6).muzeId
397
- );
435
+ export function IfFragmentForIfIf() {
436
+ return _$_.tsrx_element(IfFragmentForIfIf_render);
437
+ }
398
438
 
399
- _$_.pop(section);
400
- }
439
+ export function IfFragmentElements() {
440
+ return _$_.tsrx_element(IfFragmentElements_render);
441
+ }
401
442
 
402
- _$_.append(__anchor, section);
403
- };
443
+ export function ComponentBodyFragmentControlFlow() {
444
+ return _$_.tsrx_element(ComponentBodyFragmentControlFlow_render);
445
+ }
404
446
 
405
- _$_.if(node_13, (__render) => {
406
- if (hasLoaded) __render(consequent_7);
407
- });
408
- }
447
+ export function ComponentBodyCodeBlockControlFlow() {
448
+ return _$_.tsrx_element(ComponentBodyCodeBlockControlFlow_render);
449
+ }
409
450
 
410
- _$_.pop(div_5);
411
- }
451
+ export function IfCodeBlockControlFlow() {
452
+ return _$_.tsrx_element(IfCodeBlockControlFlow_render);
453
+ }
412
454
 
413
- _$_.append(__anchor, div_5);
414
- });
455
+ export function IfElseFragment() {
456
+ return _$_.tsrx_element(IfElseFragment_render);
457
+ }
458
+
459
+ export function IfDivFragment() {
460
+ return _$_.tsrx_element(IfDivFragment_render);
415
461
  }