ripple 0.4.2 → 0.4.4

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 (98) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/package.json +10 -4
  3. package/src/constants.js +6 -0
  4. package/src/jsx-runtime.d.ts +2 -1
  5. package/src/runtime/array.js +15 -9
  6. package/src/runtime/index-client.js +25 -7
  7. package/src/runtime/index-server.js +1 -0
  8. package/src/runtime/internal/client/attributes.js +439 -0
  9. package/src/runtime/internal/client/blocks.js +20 -20
  10. package/src/runtime/internal/client/component.js +2 -5
  11. package/src/runtime/internal/client/composite.js +295 -95
  12. package/src/runtime/internal/client/constants.js +14 -6
  13. package/src/runtime/internal/client/context.js +3 -2
  14. package/src/runtime/internal/client/css.js +11 -26
  15. package/src/runtime/internal/client/errors.js +188 -0
  16. package/src/runtime/internal/client/events.js +79 -34
  17. package/src/runtime/internal/client/expression.js +25 -120
  18. package/src/runtime/internal/client/for.js +113 -262
  19. package/src/runtime/internal/client/head.js +4 -3
  20. package/src/runtime/internal/client/html.js +5 -3
  21. package/src/runtime/internal/client/hydrate.js +484 -0
  22. package/src/runtime/internal/client/hydration-enabled.js +7 -0
  23. package/src/runtime/internal/client/hydration.js +16 -81
  24. package/src/runtime/internal/client/if.js +69 -10
  25. package/src/runtime/internal/client/index.js +18 -10
  26. package/src/runtime/internal/client/operations.js +11 -7
  27. package/src/runtime/internal/client/portal.js +3 -2
  28. package/src/runtime/internal/client/render.js +42 -325
  29. package/src/runtime/internal/client/root-boundary-enabled.js +7 -0
  30. package/src/runtime/internal/client/runtime.js +157 -371
  31. package/src/runtime/internal/client/template-ns.js +88 -0
  32. package/src/runtime/internal/client/template.js +118 -139
  33. package/src/runtime/internal/client/track-async.js +356 -0
  34. package/src/runtime/internal/client/try.js +133 -319
  35. package/src/runtime/internal/client/types.d.ts +48 -24
  36. package/src/runtime/internal/server/index.js +31 -29
  37. package/src/runtime/internal/server/prerender.js +27 -0
  38. package/src/server/index.js +1 -0
  39. package/src/utils/class-name.js +28 -0
  40. package/tests/client/basic/basic.errors.test.tsrx +3 -3
  41. package/tests/client/compiler/__snapshots__/compiler.typescript.test.tsrx.snap +0 -2
  42. package/tests/client/compiler/compiler.basic.test.tsrx +2 -2
  43. package/tests/client/compiler/compiler.tracked-access.test.tsrx +3 -3
  44. package/tests/client/composite/composite.dynamic-components.test.tsrx +40 -0
  45. package/tests/client/composite/composite.props.test.tsrx +10 -10
  46. package/tests/client/css/scoped-styles.test.tsrx +3 -1
  47. package/tests/client/derived-release.test.tsrx +3 -3
  48. package/tests/client/for-item.test.tsrx +39 -0
  49. package/tests/client/for-selector.test.tsrx +95 -0
  50. package/tests/client/svg.test.tsrx +273 -1
  51. package/tests/hydration/compiled/client/basic.js +88 -87
  52. package/tests/hydration/compiled/client/composite.js +15 -6
  53. package/tests/hydration/compiled/client/events.js +40 -48
  54. package/tests/hydration/compiled/client/for.js +191 -199
  55. package/tests/hydration/compiled/client/fragment-cursor.js +633 -334
  56. package/tests/hydration/compiled/client/head.js +22 -22
  57. package/tests/hydration/compiled/client/hmr.js +14 -5
  58. package/tests/hydration/compiled/client/html-in-template.js +5 -5
  59. package/tests/hydration/compiled/client/html.js +195 -177
  60. package/tests/hydration/compiled/client/if-children.js +136 -63
  61. package/tests/hydration/compiled/client/if-fragment-controlflow.js +63 -43
  62. package/tests/hydration/compiled/client/if.js +78 -30
  63. package/tests/hydration/compiled/client/mixed-control-flow.js +90 -72
  64. package/tests/hydration/compiled/client/nested-control-flow.js +266 -307
  65. package/tests/hydration/compiled/client/portal.js +20 -11
  66. package/tests/hydration/compiled/client/reactivity.js +29 -29
  67. package/tests/hydration/compiled/client/return.js +2 -2
  68. package/tests/hydration/compiled/client/streaming.js +33 -35
  69. package/tests/hydration/compiled/client/switch.js +25 -25
  70. package/tests/hydration/compiled/client/track-async-serialization.js +41 -41
  71. package/tests/hydration/compiled/client/try.js +15 -15
  72. package/tests/hydration/compiled/client/typed-text.js +8 -7
  73. package/tests/hydration/compiled/server/basic.js +6 -6
  74. package/tests/hydration/compiled/server/events.js +8 -8
  75. package/tests/hydration/compiled/server/for.js +22 -22
  76. package/tests/hydration/compiled/server/fragment-cursor.js +188 -52
  77. package/tests/hydration/compiled/server/head.js +6 -6
  78. package/tests/hydration/compiled/server/hmr.js +1 -1
  79. package/tests/hydration/compiled/server/html.js +1 -1
  80. package/tests/hydration/compiled/server/if-children.js +9 -9
  81. package/tests/hydration/compiled/server/if.js +5 -5
  82. package/tests/hydration/compiled/server/mixed-control-flow.js +4 -4
  83. package/tests/hydration/compiled/server/portal.js +1 -1
  84. package/tests/hydration/compiled/server/reactivity.js +9 -9
  85. package/tests/hydration/compiled/server/streaming.js +9 -9
  86. package/tests/hydration/compiled/server/switch.js +4 -4
  87. package/tests/hydration/compiled/server/track-async-serialization.js +16 -16
  88. package/tests/hydration/compiled/server/try.js +4 -4
  89. package/tests/hydration/compiled/server/typed-text.js +1 -1
  90. package/tests/hydration/components/fragment-cursor.tsrx +60 -0
  91. package/tests/hydration/components/track-async-serialization.tsrx +2 -2
  92. package/tests/hydration/fragment-cursor.test.js +34 -1
  93. package/tests/hydration/track-async-serialization.test.js +1 -1
  94. package/tests/server/basic.components.test.tsrx +3 -3
  95. package/tests/server/track-async-serialization.test.tsrx +6 -6
  96. package/tests/utils/tracked-types.test.js +3 -3
  97. package/types/index.d.ts +8 -8
  98. package/types/server.d.ts +17 -0
@@ -1,13 +1,13 @@
1
1
  // @ts-nocheck
2
2
  import * as _$_ from 'ripple/internal/client';
3
3
 
4
- var root_1 = _$_.template(`<li> </li>`, 0);
4
+ var root_1 = _$_.template_el('li', null, ' ');
5
5
 
6
6
  function render(__prev) {
7
- var __a = `item item-${_$_.get(__prev._pattern).id}`;
7
+ var __a = `item item-${_$_.get(__prev._a).id}`;
8
8
 
9
9
  if (__prev.a !== __a) {
10
- _$_.set_class(__prev._li, __prev.a = __a, void 0, true);
10
+ _$_.set_class(__prev._b, __prev.a = __a);
11
11
  }
12
12
  }
13
13
 
@@ -21,7 +21,7 @@ function consequent(__anchor, pattern) {
21
21
  _$_.hydrating && _$_.pop(li);
22
22
  }
23
23
 
24
- _$_.render(render, { a: _$_.UNINITIALIZED, _pattern: pattern, _li: li });
24
+ _$_.render(render, { a: _$_.UNINITIALIZED, _a: pattern, _b: li });
25
25
  _$_.append(__anchor, li);
26
26
  }
27
27
 
@@ -29,7 +29,15 @@ function if_1(pattern) {
29
29
  if (_$_.get(pattern).show) return consequent;
30
30
  }
31
31
 
32
- var root = _$_.template(`<ul class="for-if"></ul>`, 0);
32
+ function render_1(__prev) {
33
+ var __a = if_1(__prev._a);
34
+
35
+ if (__prev.a !== __a) {
36
+ _$_.if_update(__prev._b, __prev.a = __a);
37
+ }
38
+ }
39
+
40
+ var root = _$_.template_el('ul', ['class', 'for-if']);
33
41
 
34
42
  function ForIf_render(__anchor, __block) {
35
43
  const items = [
@@ -45,10 +53,15 @@ function ForIf_render(__anchor, __block) {
45
53
  ul,
46
54
  () => items,
47
55
  (__anchor, pattern) => {
48
- _$_.if(__anchor, if_1, true, pattern);
56
+ var ifs = _$_.if_static(__anchor, if_1, 3, pattern);
57
+
58
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern, _b: ifs });
49
59
  },
50
60
  4,
51
- (pattern) => pattern.id
61
+ (pattern) => pattern.id,
62
+ void 0,
63
+ void 0,
64
+ render_1
52
65
  );
53
66
 
54
67
  _$_.hydrating && _$_.pop(ul);
@@ -59,65 +72,53 @@ function ForIf_render(__anchor, __block) {
59
72
 
60
73
  ForIf[_$_.$r] = ForIf_render;
61
74
 
62
- var root_3 = _$_.template(`<li></li>`, 0);
75
+ var root_3 = _$_.template_el('li');
63
76
 
64
- function render_1(__prev) {
65
- var __pattern_1 = _$_.get(__prev._pattern_1);
77
+ function render_2(__prev) {
78
+ var __pattern_1 = _$_.get(__prev._a);
66
79
  var __a = `A-${__pattern_1.id}`;
67
80
 
68
81
  if (__prev.a !== __a) {
69
- _$_.set_text_content(__prev._li_1, __a, __prev.a);
82
+ _$_.set_text_content(__prev._b, __a, __prev.a);
70
83
  __prev.a = __a;
71
84
  }
72
85
 
73
86
  var __b = `item item-${__pattern_1.id} kind-a`;
74
87
 
75
88
  if (__prev.b !== __b) {
76
- _$_.set_class(__prev._li_1, __prev.b = __b, void 0, true);
89
+ _$_.set_class(__prev._b, __prev.b = __b);
77
90
  }
78
91
  }
79
92
 
80
- var root_4 = _$_.template(`<li></li>`, 0);
93
+ var root_4 = _$_.template_el('li');
81
94
 
82
- function render_2(__prev) {
83
- var __pattern_1_1 = _$_.get(__prev._pattern_1);
95
+ function render_3(__prev) {
96
+ var __pattern_1_1 = _$_.get(__prev._a);
84
97
  var __a = `B-${__pattern_1_1.id}`;
85
98
 
86
99
  if (__prev.a !== __a) {
87
- _$_.set_text_content(__prev._li_2, __a, __prev.a);
100
+ _$_.set_text_content(__prev._b, __a, __prev.a);
88
101
  __prev.a = __a;
89
102
  }
90
103
 
91
104
  var __b = `item item-${__pattern_1_1.id} kind-b`;
92
105
 
93
106
  if (__prev.b !== __b) {
94
- _$_.set_class(__prev._li_2, __prev.b = __b, void 0, true);
107
+ _$_.set_class(__prev._b, __prev.b = __b);
95
108
  }
96
109
  }
97
110
 
98
111
  function switch_case_0(__anchor, pattern_1) {
99
112
  var li_1 = root_3();
100
113
 
101
- _$_.render(render_1, {
102
- a: '',
103
- b: _$_.UNINITIALIZED,
104
- _pattern_1: pattern_1,
105
- _li_1: li_1
106
- });
107
-
114
+ _$_.render(render_2, { a: '', b: _$_.UNINITIALIZED, _a: pattern_1, _b: li_1 });
108
115
  _$_.append(__anchor, li_1);
109
116
  }
110
117
 
111
118
  function switch_case_default(__anchor, pattern_1) {
112
119
  var li_2 = root_4();
113
120
 
114
- _$_.render(render_2, {
115
- a: '',
116
- b: _$_.UNINITIALIZED,
117
- _pattern_1: pattern_1,
118
- _li_2: li_2
119
- });
120
-
121
+ _$_.render(render_3, { a: '', b: _$_.UNINITIALIZED, _a: pattern_1, _b: li_2 });
121
122
  _$_.append(__anchor, li_2);
122
123
  }
123
124
 
@@ -131,7 +132,7 @@ function switch_1(pattern_1) {
131
132
  }
132
133
  }
133
134
 
134
- var root_2 = _$_.template(`<ul class="for-switch"></ul>`, 0);
135
+ var root_2 = _$_.template_el('ul', ['class', 'for-switch']);
135
136
 
136
137
  function ForSwitch_render(__anchor, __block) {
137
138
  const items = [
@@ -161,8 +162,8 @@ function ForSwitch_render(__anchor, __block) {
161
162
 
162
163
  ForSwitch[_$_.$r] = ForSwitch_render;
163
164
 
164
- var root_6 = _$_.template(`<p class="case-a">Case A</p>`, 0);
165
- var root_7 = _$_.template(`<p class="case-default">Default</p>`, 0);
165
+ var root_6 = _$_.template_el('p', ['class', 'case-a'], 'Case A');
166
+ var root_7 = _$_.template_el('p', ['class', 'case-default'], 'Default');
166
167
 
167
168
  function switch_case_0_1(__anchor, kind) {
168
169
  var p = root_6();
@@ -186,15 +187,15 @@ function switch_2(kind) {
186
187
  }
187
188
  }
188
189
 
189
- function consequent_1(__anchor, { show, kind }) {
190
+ function consequent_1(__anchor, { a: show, b: kind }) {
190
191
  _$_.switch(__anchor, switch_2, true, kind);
191
192
  }
192
193
 
193
- function if_2({ show, kind }) {
194
+ function if_2({ a: show, b: kind }) {
194
195
  if (show) return consequent_1;
195
196
  }
196
197
 
197
- var root_5 = _$_.template(`<div class="if-switch"><!></div>`, 0);
198
+ var root_5 = _$_.template(`<div class=if-switch><!>`);
198
199
 
199
200
  function IfSwitch_render(__anchor, __block) {
200
201
  const show = true;
@@ -204,7 +205,7 @@ function IfSwitch_render(__anchor, __block) {
204
205
  {
205
206
  var node = _$_.hydrating ? _$_.hydrate_child() : div.firstChild;
206
207
 
207
- _$_.if(node, if_2, false, { show, kind });
208
+ _$_.if(node, if_2, false, { a: show, b: kind });
208
209
  _$_.hydrating && _$_.pop(div);
209
210
  }
210
211
 
@@ -213,8 +214,8 @@ function IfSwitch_render(__anchor, __block) {
213
214
 
214
215
  IfSwitch[_$_.$r] = IfSwitch_render;
215
216
 
216
- var root_9 = _$_.template(`<p class="case-a">Case A</p>`, 0);
217
- var root_10 = _$_.template(`<p class="case-default">Default</p>`, 0);
217
+ var root_9 = _$_.template_el('p', ['class', 'case-a'], 'Case A');
218
+ var root_10 = _$_.template_el('p', ['class', 'case-default'], 'Default');
218
219
 
219
220
  function switch_case_0_2(__anchor, kind) {
220
221
  var p_2 = root_9();
@@ -238,15 +239,15 @@ function switch_3(kind) {
238
239
  }
239
240
  }
240
241
 
241
- function consequent_2(__anchor, { show, kind }) {
242
+ function consequent_2(__anchor, { a: show, b: kind }) {
242
243
  _$_.switch(__anchor, switch_3, true, kind);
243
244
  }
244
245
 
245
- function if_3({ show, kind }) {
246
+ function if_3({ a: show, b: kind }) {
246
247
  if (show) return consequent_2;
247
248
  }
248
249
 
249
- var root_8 = _$_.template(`<div class="if-switch-hidden"><!><p class="after">after</p></div>`, 0);
250
+ var root_8 = _$_.template(`<div class=if-switch-hidden><p class=after>after`);
250
251
 
251
252
  function IfSwitchHidden_render(__anchor, __block) {
252
253
  const show = false;
@@ -256,7 +257,7 @@ function IfSwitchHidden_render(__anchor, __block) {
256
257
  {
257
258
  var node_1 = _$_.hydrating ? _$_.hydrate_child() : div_1.firstChild;
258
259
 
259
- _$_.if(node_1, if_3, false, { show, kind });
260
+ _$_.if(node_1, if_3, false, { a: show, b: kind });
260
261
  _$_.hydrating && _$_.pop(div_1);
261
262
  }
262
263
 
@@ -265,65 +266,53 @@ function IfSwitchHidden_render(__anchor, __block) {
265
266
 
266
267
  IfSwitchHidden[_$_.$r] = IfSwitchHidden_render;
267
268
 
268
- var root_12 = _$_.template(`<li></li>`, 0);
269
+ var root_12 = _$_.template_el('li');
269
270
 
270
- function render_3(__prev) {
271
- var __pattern_2 = _$_.get(__prev._pattern_2);
271
+ function render_4(__prev) {
272
+ var __pattern_2 = _$_.get(__prev._a);
272
273
  var __a = `A-${__pattern_2.id}`;
273
274
 
274
275
  if (__prev.a !== __a) {
275
- _$_.set_text_content(__prev._li_3, __a, __prev.a);
276
+ _$_.set_text_content(__prev._b, __a, __prev.a);
276
277
  __prev.a = __a;
277
278
  }
278
279
 
279
280
  var __b = `item item-${__pattern_2.id} kind-a`;
280
281
 
281
282
  if (__prev.b !== __b) {
282
- _$_.set_class(__prev._li_3, __prev.b = __b, void 0, true);
283
+ _$_.set_class(__prev._b, __prev.b = __b);
283
284
  }
284
285
  }
285
286
 
286
- var root_13 = _$_.template(`<li></li>`, 0);
287
+ var root_13 = _$_.template_el('li');
287
288
 
288
- function render_4(__prev) {
289
- var __pattern_2_1 = _$_.get(__prev._pattern_2);
289
+ function render_5(__prev) {
290
+ var __pattern_2_1 = _$_.get(__prev._a);
290
291
  var __a = `D-${__pattern_2_1.id}`;
291
292
 
292
293
  if (__prev.a !== __a) {
293
- _$_.set_text_content(__prev._li_4, __a, __prev.a);
294
+ _$_.set_text_content(__prev._b, __a, __prev.a);
294
295
  __prev.a = __a;
295
296
  }
296
297
 
297
298
  var __b = `item item-${__pattern_2_1.id} kind-default`;
298
299
 
299
300
  if (__prev.b !== __b) {
300
- _$_.set_class(__prev._li_4, __prev.b = __b, void 0, true);
301
+ _$_.set_class(__prev._b, __prev.b = __b);
301
302
  }
302
303
  }
303
304
 
304
305
  function switch_case_0_3(__anchor, pattern_2) {
305
306
  var li_3 = root_12();
306
307
 
307
- _$_.render(render_3, {
308
- a: '',
309
- b: _$_.UNINITIALIZED,
310
- _pattern_2: pattern_2,
311
- _li_3: li_3
312
- });
313
-
308
+ _$_.render(render_4, { a: '', b: _$_.UNINITIALIZED, _a: pattern_2, _b: li_3 });
314
309
  _$_.append(__anchor, li_3);
315
310
  }
316
311
 
317
312
  function switch_case_default_3(__anchor, pattern_2) {
318
313
  var li_4 = root_13();
319
314
 
320
- _$_.render(render_4, {
321
- a: '',
322
- b: _$_.UNINITIALIZED,
323
- _pattern_2: pattern_2,
324
- _li_4: li_4
325
- });
326
-
315
+ _$_.render(render_5, { a: '', b: _$_.UNINITIALIZED, _a: pattern_2, _b: li_4 });
327
316
  _$_.append(__anchor, li_4);
328
317
  }
329
318
 
@@ -345,7 +334,15 @@ function if_4(pattern_2) {
345
334
  if (_$_.get(pattern_2).show) return consequent_3;
346
335
  }
347
336
 
348
- var root_11 = _$_.template(`<ul class="for-if-switch-single"></ul>`, 0);
337
+ function render_6(__prev) {
338
+ var __a = if_4(__prev._a);
339
+
340
+ if (__prev.a !== __a) {
341
+ _$_.if_update(__prev._b, __prev.a = __a);
342
+ }
343
+ }
344
+
345
+ var root_11 = _$_.template_el('ul', ['class', 'for-if-switch-single']);
349
346
 
350
347
  function ForIfSwitchSingle_render(__anchor, __block) {
351
348
  const items = [{ id: 1, kind: 'a', show: true }];
@@ -356,10 +353,15 @@ function ForIfSwitchSingle_render(__anchor, __block) {
356
353
  ul_2,
357
354
  () => items,
358
355
  (__anchor, pattern_2) => {
359
- _$_.if(__anchor, if_4, true, pattern_2);
356
+ var ifs_1 = _$_.if_static(__anchor, if_4, 3, pattern_2);
357
+
358
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_2, _b: ifs_1 });
360
359
  },
361
360
  4,
362
- (pattern_2) => pattern_2.id
361
+ (pattern_2) => pattern_2.id,
362
+ void 0,
363
+ void 0,
364
+ render_6
363
365
  );
364
366
 
365
367
  _$_.hydrating && _$_.pop(ul_2);
@@ -370,65 +372,53 @@ function ForIfSwitchSingle_render(__anchor, __block) {
370
372
 
371
373
  ForIfSwitchSingle[_$_.$r] = ForIfSwitchSingle_render;
372
374
 
373
- var root_15 = _$_.template(`<li></li>`, 0);
375
+ var root_15 = _$_.template_el('li');
374
376
 
375
- function render_5(__prev) {
376
- var __pattern_3 = _$_.get(__prev._pattern_3);
377
+ function render_7(__prev) {
378
+ var __pattern_3 = _$_.get(__prev._a);
377
379
  var __a = `A-${__pattern_3.id}`;
378
380
 
379
381
  if (__prev.a !== __a) {
380
- _$_.set_text_content(__prev._li_5, __a, __prev.a);
382
+ _$_.set_text_content(__prev._b, __a, __prev.a);
381
383
  __prev.a = __a;
382
384
  }
383
385
 
384
386
  var __b = `item item-${__pattern_3.id} kind-a`;
385
387
 
386
388
  if (__prev.b !== __b) {
387
- _$_.set_class(__prev._li_5, __prev.b = __b, void 0, true);
389
+ _$_.set_class(__prev._b, __prev.b = __b);
388
390
  }
389
391
  }
390
392
 
391
- var root_16 = _$_.template(`<li></li>`, 0);
393
+ var root_16 = _$_.template_el('li');
392
394
 
393
- function render_6(__prev) {
394
- var __pattern_3_1 = _$_.get(__prev._pattern_3);
395
+ function render_8(__prev) {
396
+ var __pattern_3_1 = _$_.get(__prev._a);
395
397
  var __a = `B-${__pattern_3_1.id}`;
396
398
 
397
399
  if (__prev.a !== __a) {
398
- _$_.set_text_content(__prev._li_6, __a, __prev.a);
400
+ _$_.set_text_content(__prev._b, __a, __prev.a);
399
401
  __prev.a = __a;
400
402
  }
401
403
 
402
404
  var __b = `item item-${__pattern_3_1.id} kind-b`;
403
405
 
404
406
  if (__prev.b !== __b) {
405
- _$_.set_class(__prev._li_6, __prev.b = __b, void 0, true);
407
+ _$_.set_class(__prev._b, __prev.b = __b);
406
408
  }
407
409
  }
408
410
 
409
411
  function switch_case_0_4(__anchor, pattern_3) {
410
412
  var li_5 = root_15();
411
413
 
412
- _$_.render(render_5, {
413
- a: '',
414
- b: _$_.UNINITIALIZED,
415
- _pattern_3: pattern_3,
416
- _li_5: li_5
417
- });
418
-
414
+ _$_.render(render_7, { a: '', b: _$_.UNINITIALIZED, _a: pattern_3, _b: li_5 });
419
415
  _$_.append(__anchor, li_5);
420
416
  }
421
417
 
422
418
  function switch_case_default_4(__anchor, pattern_3) {
423
419
  var li_6 = root_16();
424
420
 
425
- _$_.render(render_6, {
426
- a: '',
427
- b: _$_.UNINITIALIZED,
428
- _pattern_3: pattern_3,
429
- _li_6: li_6
430
- });
431
-
421
+ _$_.render(render_8, { a: '', b: _$_.UNINITIALIZED, _a: pattern_3, _b: li_6 });
432
422
  _$_.append(__anchor, li_6);
433
423
  }
434
424
 
@@ -450,7 +440,15 @@ function if_5(pattern_3) {
450
440
  if (_$_.get(pattern_3).show) return consequent_4;
451
441
  }
452
442
 
453
- var root_14 = _$_.template(`<ul class="for-if-switch-multi"></ul>`, 0);
443
+ function render_9(__prev) {
444
+ var __a = if_5(__prev._a);
445
+
446
+ if (__prev.a !== __a) {
447
+ _$_.if_update(__prev._b, __prev.a = __a);
448
+ }
449
+ }
450
+
451
+ var root_14 = _$_.template_el('ul', ['class', 'for-if-switch-multi']);
454
452
 
455
453
  function ForIfSwitchMulti_render(__anchor, __block) {
456
454
  const items = [
@@ -465,10 +463,15 @@ function ForIfSwitchMulti_render(__anchor, __block) {
465
463
  ul_3,
466
464
  () => items,
467
465
  (__anchor, pattern_3) => {
468
- _$_.if(__anchor, if_5, true, pattern_3);
466
+ var ifs_2 = _$_.if_static(__anchor, if_5, 3, pattern_3);
467
+
468
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_3, _b: ifs_2 });
469
469
  },
470
470
  4,
471
- (pattern_3) => pattern_3.id
471
+ (pattern_3) => pattern_3.id,
472
+ void 0,
473
+ void 0,
474
+ render_9
472
475
  );
473
476
 
474
477
  _$_.hydrating && _$_.pop(ul_3);
@@ -479,65 +482,53 @@ function ForIfSwitchMulti_render(__anchor, __block) {
479
482
 
480
483
  ForIfSwitchMulti[_$_.$r] = ForIfSwitchMulti_render;
481
484
 
482
- var root_18 = _$_.template(`<li></li>`, 0);
485
+ var root_18 = _$_.template_el('li');
483
486
 
484
- function render_7(__prev) {
485
- var __pattern_4 = _$_.get(__prev._pattern_4);
487
+ function render_10(__prev) {
488
+ var __pattern_4 = _$_.get(__prev._a);
486
489
  var __a = `A-${__pattern_4.id}`;
487
490
 
488
491
  if (__prev.a !== __a) {
489
- _$_.set_text_content(__prev._li_7, __a, __prev.a);
492
+ _$_.set_text_content(__prev._b, __a, __prev.a);
490
493
  __prev.a = __a;
491
494
  }
492
495
 
493
496
  var __b = `item item-${__pattern_4.id} kind-a`;
494
497
 
495
498
  if (__prev.b !== __b) {
496
- _$_.set_class(__prev._li_7, __prev.b = __b, void 0, true);
499
+ _$_.set_class(__prev._b, __prev.b = __b);
497
500
  }
498
501
  }
499
502
 
500
- var root_19 = _$_.template(`<li></li>`, 0);
503
+ var root_19 = _$_.template_el('li');
501
504
 
502
- function render_8(__prev) {
503
- var __pattern_4_1 = _$_.get(__prev._pattern_4);
505
+ function render_11(__prev) {
506
+ var __pattern_4_1 = _$_.get(__prev._a);
504
507
  var __a = `B-${__pattern_4_1.id}`;
505
508
 
506
509
  if (__prev.a !== __a) {
507
- _$_.set_text_content(__prev._li_8, __a, __prev.a);
510
+ _$_.set_text_content(__prev._b, __a, __prev.a);
508
511
  __prev.a = __a;
509
512
  }
510
513
 
511
514
  var __b = `item item-${__pattern_4_1.id} kind-b`;
512
515
 
513
516
  if (__prev.b !== __b) {
514
- _$_.set_class(__prev._li_8, __prev.b = __b, void 0, true);
517
+ _$_.set_class(__prev._b, __prev.b = __b);
515
518
  }
516
519
  }
517
520
 
518
521
  function switch_case_0_5(__anchor, pattern_4) {
519
522
  var li_7 = root_18();
520
523
 
521
- _$_.render(render_7, {
522
- a: '',
523
- b: _$_.UNINITIALIZED,
524
- _pattern_4: pattern_4,
525
- _li_7: li_7
526
- });
527
-
524
+ _$_.render(render_10, { a: '', b: _$_.UNINITIALIZED, _a: pattern_4, _b: li_7 });
528
525
  _$_.append(__anchor, li_7);
529
526
  }
530
527
 
531
528
  function switch_case_default_5(__anchor, pattern_4) {
532
529
  var li_8 = root_19();
533
530
 
534
- _$_.render(render_8, {
535
- a: '',
536
- b: _$_.UNINITIALIZED,
537
- _pattern_4: pattern_4,
538
- _li_8: li_8
539
- });
540
-
531
+ _$_.render(render_11, { a: '', b: _$_.UNINITIALIZED, _a: pattern_4, _b: li_8 });
541
532
  _$_.append(__anchor, li_8);
542
533
  }
543
534
 
@@ -559,7 +550,15 @@ function if_6(pattern_4) {
559
550
  if (_$_.get(pattern_4).show) return consequent_5;
560
551
  }
561
552
 
562
- var root_17 = _$_.template(`<ul class="for-if-switch-disabled"></ul>`, 0);
553
+ function render_12(__prev) {
554
+ var __a = if_6(__prev._a);
555
+
556
+ if (__prev.a !== __a) {
557
+ _$_.if_update(__prev._b, __prev.a = __a);
558
+ }
559
+ }
560
+
561
+ var root_17 = _$_.template_el('ul', ['class', 'for-if-switch-disabled']);
563
562
 
564
563
  function ForIfSwitchWithDisabled_render(__anchor, __block) {
565
564
  const items = [
@@ -575,10 +574,15 @@ function ForIfSwitchWithDisabled_render(__anchor, __block) {
575
574
  ul_4,
576
575
  () => items,
577
576
  (__anchor, pattern_4) => {
578
- _$_.if(__anchor, if_6, true, pattern_4);
577
+ var ifs_3 = _$_.if_static(__anchor, if_6, 3, pattern_4);
578
+
579
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_4, _b: ifs_3 });
579
580
  },
580
581
  4,
581
- (pattern_4) => pattern_4.id
582
+ (pattern_4) => pattern_4.id,
583
+ void 0,
584
+ void 0,
585
+ render_12
582
586
  );
583
587
 
584
588
  _$_.hydrating && _$_.pop(ul_4);
@@ -589,9 +593,9 @@ function ForIfSwitchWithDisabled_render(__anchor, __block) {
589
593
 
590
594
  ForIfSwitchWithDisabled[_$_.$r] = ForIfSwitchWithDisabled_render;
591
595
 
592
- var root_21 = _$_.template(`<p class="resolved-a">A resolved</p>`, 0);
593
- var root_22 = _$_.template(`<p class="pending-a">A pending</p>`, 0);
594
- var root_23 = _$_.template(`<p class="default">Default</p>`, 0);
596
+ var root_21 = _$_.template_el('p', ['class', 'resolved-a'], 'A resolved');
597
+ var root_22 = _$_.template_el('p', ['class', 'pending-a'], 'A pending');
598
+ var root_23 = _$_.template_el('p', ['class', 'default'], 'Default');
595
599
 
596
600
  function switch_case_0_6(__anchor, kind) {
597
601
  _$_.try(
@@ -627,7 +631,7 @@ function switch_7(kind) {
627
631
  }
628
632
  }
629
633
 
630
- var root_20 = _$_.template(`<div class="switch-try"><!></div>`, 0);
634
+ var root_20 = _$_.template(`<div class=switch-try><!>`);
631
635
 
632
636
  function SwitchTry_render(__anchor, __block) {
633
637
  const kind = 'a';
@@ -645,75 +649,75 @@ function SwitchTry_render(__anchor, __block) {
645
649
 
646
650
  SwitchTry[_$_.$r] = SwitchTry_render;
647
651
 
648
- var root_25 = _$_.template(`<li></li>`, 0);
652
+ var root_25 = _$_.template_el('li');
649
653
 
650
- function render_9(__prev) {
651
- var __pattern_5 = _$_.get(__prev._pattern_5);
654
+ function render_13(__prev) {
655
+ var __pattern_5 = _$_.get(__prev._a);
652
656
  var __a = `A-${__pattern_5.id}`;
653
657
 
654
658
  if (__prev.a !== __a) {
655
- _$_.set_text_content(__prev._li_9, __a, __prev.a);
659
+ _$_.set_text_content(__prev._b, __a, __prev.a);
656
660
  __prev.a = __a;
657
661
  }
658
662
 
659
663
  var __b = `item item-${__pattern_5.id} kind-a`;
660
664
 
661
665
  if (__prev.b !== __b) {
662
- _$_.set_class(__prev._li_9, __prev.b = __b, void 0, true);
666
+ _$_.set_class(__prev._b, __prev.b = __b);
663
667
  }
664
668
  }
665
669
 
666
- var root_26 = _$_.template(`<li></li>`, 0);
670
+ var root_26 = _$_.template_el('li');
667
671
 
668
- function render_10(__prev) {
669
- var __pattern_5_1 = _$_.get(__prev._pattern_5);
672
+ function render_14(__prev) {
673
+ var __pattern_5_1 = _$_.get(__prev._a);
670
674
  var __a = `pending ${__pattern_5_1.id}`;
671
675
 
672
676
  if (__prev.a !== __a) {
673
- _$_.set_text_content(__prev._li_10, __a, __prev.a);
677
+ _$_.set_text_content(__prev._b, __a, __prev.a);
674
678
  __prev.a = __a;
675
679
  }
676
680
 
677
681
  var __b = `pending pending-${__pattern_5_1.id}`;
678
682
 
679
683
  if (__prev.b !== __b) {
680
- _$_.set_class(__prev._li_10, __prev.b = __b, void 0, true);
684
+ _$_.set_class(__prev._b, __prev.b = __b);
681
685
  }
682
686
  }
683
687
 
684
- var root_27 = _$_.template(`<li></li>`, 0);
688
+ var root_27 = _$_.template_el('li');
685
689
 
686
- function render_11(__prev) {
687
- var __pattern_5_2 = _$_.get(__prev._pattern_5);
690
+ function render_15(__prev) {
691
+ var __pattern_5_2 = _$_.get(__prev._a);
688
692
  var __a = `B-${__pattern_5_2.id}`;
689
693
 
690
694
  if (__prev.a !== __a) {
691
- _$_.set_text_content(__prev._li_11, __a, __prev.a);
695
+ _$_.set_text_content(__prev._b, __a, __prev.a);
692
696
  __prev.a = __a;
693
697
  }
694
698
 
695
699
  var __b = `item item-${__pattern_5_2.id} kind-b`;
696
700
 
697
701
  if (__prev.b !== __b) {
698
- _$_.set_class(__prev._li_11, __prev.b = __b, void 0, true);
702
+ _$_.set_class(__prev._b, __prev.b = __b);
699
703
  }
700
704
  }
701
705
 
702
- var root_28 = _$_.template(`<li></li>`, 0);
706
+ var root_28 = _$_.template_el('li');
703
707
 
704
- function render_12(__prev) {
705
- var __pattern_5_3 = _$_.get(__prev._pattern_5);
708
+ function render_16(__prev) {
709
+ var __pattern_5_3 = _$_.get(__prev._a);
706
710
  var __a = `pending ${__pattern_5_3.id}`;
707
711
 
708
712
  if (__prev.a !== __a) {
709
- _$_.set_text_content(__prev._li_12, __a, __prev.a);
713
+ _$_.set_text_content(__prev._b, __a, __prev.a);
710
714
  __prev.a = __a;
711
715
  }
712
716
 
713
717
  var __b = `pending pending-${__pattern_5_3.id}`;
714
718
 
715
719
  if (__prev.b !== __b) {
716
- _$_.set_class(__prev._li_12, __prev.b = __b, void 0, true);
720
+ _$_.set_class(__prev._b, __prev.b = __b);
717
721
  }
718
722
  }
719
723
 
@@ -723,26 +727,14 @@ function switch_case_0_7(__anchor, pattern_5) {
723
727
  (__anchor) => {
724
728
  var li_9 = root_25();
725
729
 
726
- _$_.render(render_9, {
727
- a: '',
728
- b: _$_.UNINITIALIZED,
729
- _pattern_5: pattern_5,
730
- _li_9: li_9
731
- });
732
-
730
+ _$_.render(render_13, { a: '', b: _$_.UNINITIALIZED, _a: pattern_5, _b: li_9 });
733
731
  _$_.append(__anchor, li_9);
734
732
  },
735
733
  null,
736
734
  (__anchor) => {
737
735
  var li_10 = root_26();
738
736
 
739
- _$_.render(render_10, {
740
- a: '',
741
- b: _$_.UNINITIALIZED,
742
- _pattern_5: pattern_5,
743
- _li_10: li_10
744
- });
745
-
737
+ _$_.render(render_14, { a: '', b: _$_.UNINITIALIZED, _a: pattern_5, _b: li_10 });
746
738
  _$_.append(__anchor, li_10);
747
739
  },
748
740
  true
@@ -755,26 +747,14 @@ function switch_case_default_7(__anchor, pattern_5) {
755
747
  (__anchor) => {
756
748
  var li_11 = root_27();
757
749
 
758
- _$_.render(render_11, {
759
- a: '',
760
- b: _$_.UNINITIALIZED,
761
- _pattern_5: pattern_5,
762
- _li_11: li_11
763
- });
764
-
750
+ _$_.render(render_15, { a: '', b: _$_.UNINITIALIZED, _a: pattern_5, _b: li_11 });
765
751
  _$_.append(__anchor, li_11);
766
752
  },
767
753
  null,
768
754
  (__anchor) => {
769
755
  var li_12 = root_28();
770
756
 
771
- _$_.render(render_12, {
772
- a: '',
773
- b: _$_.UNINITIALIZED,
774
- _pattern_5: pattern_5,
775
- _li_12: li_12
776
- });
777
-
757
+ _$_.render(render_16, { a: '', b: _$_.UNINITIALIZED, _a: pattern_5, _b: li_12 });
778
758
  _$_.append(__anchor, li_12);
779
759
  },
780
760
  true
@@ -791,7 +771,7 @@ function switch_8(pattern_5) {
791
771
  }
792
772
  }
793
773
 
794
- var root_24 = _$_.template(`<ul class="for-switch-try"></ul>`, 0);
774
+ var root_24 = _$_.template_el('ul', ['class', 'for-switch-try']);
795
775
 
796
776
  function ForSwitchTry_render(__anchor, __block) {
797
777
  const items = [{ id: 1, kind: 'a' }, { id: 2, kind: 'b' }];
@@ -816,39 +796,39 @@ function ForSwitchTry_render(__anchor, __block) {
816
796
 
817
797
  ForSwitchTry[_$_.$r] = ForSwitchTry_render;
818
798
 
819
- var root_30 = _$_.template(`<li></li>`, 0);
799
+ var root_30 = _$_.template_el('li');
820
800
 
821
- function render_13(__prev) {
822
- var __pattern_6 = _$_.get(__prev._pattern_6);
801
+ function render_17(__prev) {
802
+ var __pattern_6 = _$_.get(__prev._a);
823
803
  var __a = `item-${__pattern_6.id}`;
824
804
 
825
805
  if (__prev.a !== __a) {
826
- _$_.set_text_content(__prev._li_13, __a, __prev.a);
806
+ _$_.set_text_content(__prev._b, __a, __prev.a);
827
807
  __prev.a = __a;
828
808
  }
829
809
 
830
810
  var __b = `item item-${__pattern_6.id}`;
831
811
 
832
812
  if (__prev.b !== __b) {
833
- _$_.set_class(__prev._li_13, __prev.b = __b, void 0, true);
813
+ _$_.set_class(__prev._b, __prev.b = __b);
834
814
  }
835
815
  }
836
816
 
837
- var root_31 = _$_.template(`<li></li>`, 0);
817
+ var root_31 = _$_.template_el('li');
838
818
 
839
- function render_14(__prev) {
840
- var __pattern_6_1 = _$_.get(__prev._pattern_6);
819
+ function render_18(__prev) {
820
+ var __pattern_6_1 = _$_.get(__prev._a);
841
821
  var __a = `pending ${__pattern_6_1.id}`;
842
822
 
843
823
  if (__prev.a !== __a) {
844
- _$_.set_text_content(__prev._li_14, __a, __prev.a);
824
+ _$_.set_text_content(__prev._b, __a, __prev.a);
845
825
  __prev.a = __a;
846
826
  }
847
827
 
848
828
  var __b = `pending pending-${__pattern_6_1.id}`;
849
829
 
850
830
  if (__prev.b !== __b) {
851
- _$_.set_class(__prev._li_14, __prev.b = __b, void 0, true);
831
+ _$_.set_class(__prev._b, __prev.b = __b);
852
832
  }
853
833
  }
854
834
 
@@ -858,26 +838,14 @@ function consequent_6(__anchor, pattern_6) {
858
838
  (__anchor) => {
859
839
  var li_13 = root_30();
860
840
 
861
- _$_.render(render_13, {
862
- a: '',
863
- b: _$_.UNINITIALIZED,
864
- _pattern_6: pattern_6,
865
- _li_13: li_13
866
- });
867
-
841
+ _$_.render(render_17, { a: '', b: _$_.UNINITIALIZED, _a: pattern_6, _b: li_13 });
868
842
  _$_.append(__anchor, li_13);
869
843
  },
870
844
  null,
871
845
  (__anchor) => {
872
846
  var li_14 = root_31();
873
847
 
874
- _$_.render(render_14, {
875
- a: '',
876
- b: _$_.UNINITIALIZED,
877
- _pattern_6: pattern_6,
878
- _li_14: li_14
879
- });
880
-
848
+ _$_.render(render_18, { a: '', b: _$_.UNINITIALIZED, _a: pattern_6, _b: li_14 });
881
849
  _$_.append(__anchor, li_14);
882
850
  },
883
851
  true
@@ -888,7 +856,15 @@ function if_7(pattern_6) {
888
856
  if (_$_.get(pattern_6).show) return consequent_6;
889
857
  }
890
858
 
891
- var root_29 = _$_.template(`<ul class="for-if-try"></ul>`, 0);
859
+ function render_19(__prev) {
860
+ var __a = if_7(__prev._a);
861
+
862
+ if (__prev.a !== __a) {
863
+ _$_.if_update(__prev._b, __prev.a = __a);
864
+ }
865
+ }
866
+
867
+ var root_29 = _$_.template_el('ul', ['class', 'for-if-try']);
892
868
 
893
869
  function ForIfTry_render(__anchor, __block) {
894
870
  const items = [{ id: 1, show: true }, { id: 2, show: true }];
@@ -899,10 +875,15 @@ function ForIfTry_render(__anchor, __block) {
899
875
  ul_6,
900
876
  () => items,
901
877
  (__anchor, pattern_6) => {
902
- _$_.if(__anchor, if_7, true, pattern_6);
878
+ var ifs_4 = _$_.if_static(__anchor, if_7, 3, pattern_6);
879
+
880
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_6, _b: ifs_4 });
903
881
  },
904
882
  4,
905
- (pattern_6) => pattern_6.id
883
+ (pattern_6) => pattern_6.id,
884
+ void 0,
885
+ void 0,
886
+ render_19
906
887
  );
907
888
 
908
889
  _$_.hydrating && _$_.pop(ul_6);
@@ -913,75 +894,75 @@ function ForIfTry_render(__anchor, __block) {
913
894
 
914
895
  ForIfTry[_$_.$r] = ForIfTry_render;
915
896
 
916
- var root_33 = _$_.template(`<li></li>`, 0);
897
+ var root_33 = _$_.template_el('li');
917
898
 
918
- function render_15(__prev) {
919
- var __pattern_7 = _$_.get(__prev._pattern_7);
899
+ function render_20(__prev) {
900
+ var __pattern_7 = _$_.get(__prev._a);
920
901
  var __a = `A-${__pattern_7.id}`;
921
902
 
922
903
  if (__prev.a !== __a) {
923
- _$_.set_text_content(__prev._li_15, __a, __prev.a);
904
+ _$_.set_text_content(__prev._b, __a, __prev.a);
924
905
  __prev.a = __a;
925
906
  }
926
907
 
927
908
  var __b = `item item-${__pattern_7.id} kind-a`;
928
909
 
929
910
  if (__prev.b !== __b) {
930
- _$_.set_class(__prev._li_15, __prev.b = __b, void 0, true);
911
+ _$_.set_class(__prev._b, __prev.b = __b);
931
912
  }
932
913
  }
933
914
 
934
- var root_34 = _$_.template(`<li></li>`, 0);
915
+ var root_34 = _$_.template_el('li');
935
916
 
936
- function render_16(__prev) {
937
- var __pattern_7_1 = _$_.get(__prev._pattern_7);
917
+ function render_21(__prev) {
918
+ var __pattern_7_1 = _$_.get(__prev._a);
938
919
  var __a = `pending ${__pattern_7_1.id}`;
939
920
 
940
921
  if (__prev.a !== __a) {
941
- _$_.set_text_content(__prev._li_16, __a, __prev.a);
922
+ _$_.set_text_content(__prev._b, __a, __prev.a);
942
923
  __prev.a = __a;
943
924
  }
944
925
 
945
926
  var __b = `pending pending-${__pattern_7_1.id}`;
946
927
 
947
928
  if (__prev.b !== __b) {
948
- _$_.set_class(__prev._li_16, __prev.b = __b, void 0, true);
929
+ _$_.set_class(__prev._b, __prev.b = __b);
949
930
  }
950
931
  }
951
932
 
952
- var root_35 = _$_.template(`<li></li>`, 0);
933
+ var root_35 = _$_.template_el('li');
953
934
 
954
- function render_17(__prev) {
955
- var __pattern_7_2 = _$_.get(__prev._pattern_7);
935
+ function render_22(__prev) {
936
+ var __pattern_7_2 = _$_.get(__prev._a);
956
937
  var __a = `D-${__pattern_7_2.id}`;
957
938
 
958
939
  if (__prev.a !== __a) {
959
- _$_.set_text_content(__prev._li_17, __a, __prev.a);
940
+ _$_.set_text_content(__prev._b, __a, __prev.a);
960
941
  __prev.a = __a;
961
942
  }
962
943
 
963
944
  var __b = `item item-${__pattern_7_2.id} kind-default`;
964
945
 
965
946
  if (__prev.b !== __b) {
966
- _$_.set_class(__prev._li_17, __prev.b = __b, void 0, true);
947
+ _$_.set_class(__prev._b, __prev.b = __b);
967
948
  }
968
949
  }
969
950
 
970
- var root_36 = _$_.template(`<li></li>`, 0);
951
+ var root_36 = _$_.template_el('li');
971
952
 
972
- function render_18(__prev) {
973
- var __pattern_7_3 = _$_.get(__prev._pattern_7);
953
+ function render_23(__prev) {
954
+ var __pattern_7_3 = _$_.get(__prev._a);
974
955
  var __a = `pending ${__pattern_7_3.id}`;
975
956
 
976
957
  if (__prev.a !== __a) {
977
- _$_.set_text_content(__prev._li_18, __a, __prev.a);
958
+ _$_.set_text_content(__prev._b, __a, __prev.a);
978
959
  __prev.a = __a;
979
960
  }
980
961
 
981
962
  var __b = `pending pending-${__pattern_7_3.id}`;
982
963
 
983
964
  if (__prev.b !== __b) {
984
- _$_.set_class(__prev._li_18, __prev.b = __b, void 0, true);
965
+ _$_.set_class(__prev._b, __prev.b = __b);
985
966
  }
986
967
  }
987
968
 
@@ -991,26 +972,14 @@ function switch_case_0_8(__anchor, pattern_7) {
991
972
  (__anchor) => {
992
973
  var li_15 = root_33();
993
974
 
994
- _$_.render(render_15, {
995
- a: '',
996
- b: _$_.UNINITIALIZED,
997
- _pattern_7: pattern_7,
998
- _li_15: li_15
999
- });
1000
-
975
+ _$_.render(render_20, { a: '', b: _$_.UNINITIALIZED, _a: pattern_7, _b: li_15 });
1001
976
  _$_.append(__anchor, li_15);
1002
977
  },
1003
978
  null,
1004
979
  (__anchor) => {
1005
980
  var li_16 = root_34();
1006
981
 
1007
- _$_.render(render_16, {
1008
- a: '',
1009
- b: _$_.UNINITIALIZED,
1010
- _pattern_7: pattern_7,
1011
- _li_16: li_16
1012
- });
1013
-
982
+ _$_.render(render_21, { a: '', b: _$_.UNINITIALIZED, _a: pattern_7, _b: li_16 });
1014
983
  _$_.append(__anchor, li_16);
1015
984
  },
1016
985
  true
@@ -1023,26 +992,14 @@ function switch_case_default_8(__anchor, pattern_7) {
1023
992
  (__anchor) => {
1024
993
  var li_17 = root_35();
1025
994
 
1026
- _$_.render(render_17, {
1027
- a: '',
1028
- b: _$_.UNINITIALIZED,
1029
- _pattern_7: pattern_7,
1030
- _li_17: li_17
1031
- });
1032
-
995
+ _$_.render(render_22, { a: '', b: _$_.UNINITIALIZED, _a: pattern_7, _b: li_17 });
1033
996
  _$_.append(__anchor, li_17);
1034
997
  },
1035
998
  null,
1036
999
  (__anchor) => {
1037
1000
  var li_18 = root_36();
1038
1001
 
1039
- _$_.render(render_18, {
1040
- a: '',
1041
- b: _$_.UNINITIALIZED,
1042
- _pattern_7: pattern_7,
1043
- _li_18: li_18
1044
- });
1045
-
1002
+ _$_.render(render_23, { a: '', b: _$_.UNINITIALIZED, _a: pattern_7, _b: li_18 });
1046
1003
  _$_.append(__anchor, li_18);
1047
1004
  },
1048
1005
  true
@@ -1067,7 +1024,15 @@ function if_8(pattern_7) {
1067
1024
  if (_$_.get(pattern_7).show) return consequent_7;
1068
1025
  }
1069
1026
 
1070
- var root_32 = _$_.template(`<ul class="for-if-switch-try-single"></ul>`, 0);
1027
+ function render_24(__prev) {
1028
+ var __a = if_8(__prev._a);
1029
+
1030
+ if (__prev.a !== __a) {
1031
+ _$_.if_update(__prev._b, __prev.a = __a);
1032
+ }
1033
+ }
1034
+
1035
+ var root_32 = _$_.template_el('ul', ['class', 'for-if-switch-try-single']);
1071
1036
 
1072
1037
  function ForIfSwitchTrySingle_render(__anchor, __block) {
1073
1038
  const items = [{ id: 1, kind: 'a', show: true }];
@@ -1078,10 +1043,15 @@ function ForIfSwitchTrySingle_render(__anchor, __block) {
1078
1043
  ul_7,
1079
1044
  () => items,
1080
1045
  (__anchor, pattern_7) => {
1081
- _$_.if(__anchor, if_8, true, pattern_7);
1046
+ var ifs_5 = _$_.if_static(__anchor, if_8, 3, pattern_7);
1047
+
1048
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_7, _b: ifs_5 });
1082
1049
  },
1083
1050
  4,
1084
- (pattern_7) => pattern_7.id
1051
+ (pattern_7) => pattern_7.id,
1052
+ void 0,
1053
+ void 0,
1054
+ render_24
1085
1055
  );
1086
1056
 
1087
1057
  _$_.hydrating && _$_.pop(ul_7);
@@ -1092,75 +1062,75 @@ function ForIfSwitchTrySingle_render(__anchor, __block) {
1092
1062
 
1093
1063
  ForIfSwitchTrySingle[_$_.$r] = ForIfSwitchTrySingle_render;
1094
1064
 
1095
- var root_38 = _$_.template(`<li></li>`, 0);
1065
+ var root_38 = _$_.template_el('li');
1096
1066
 
1097
- function render_19(__prev) {
1098
- var __pattern_8 = _$_.get(__prev._pattern_8);
1067
+ function render_25(__prev) {
1068
+ var __pattern_8 = _$_.get(__prev._a);
1099
1069
  var __a = `A-${__pattern_8.id}`;
1100
1070
 
1101
1071
  if (__prev.a !== __a) {
1102
- _$_.set_text_content(__prev._li_19, __a, __prev.a);
1072
+ _$_.set_text_content(__prev._b, __a, __prev.a);
1103
1073
  __prev.a = __a;
1104
1074
  }
1105
1075
 
1106
1076
  var __b = `item item-${__pattern_8.id} kind-a`;
1107
1077
 
1108
1078
  if (__prev.b !== __b) {
1109
- _$_.set_class(__prev._li_19, __prev.b = __b, void 0, true);
1079
+ _$_.set_class(__prev._b, __prev.b = __b);
1110
1080
  }
1111
1081
  }
1112
1082
 
1113
- var root_39 = _$_.template(`<li></li>`, 0);
1083
+ var root_39 = _$_.template_el('li');
1114
1084
 
1115
- function render_20(__prev) {
1116
- var __pattern_8_1 = _$_.get(__prev._pattern_8);
1085
+ function render_26(__prev) {
1086
+ var __pattern_8_1 = _$_.get(__prev._a);
1117
1087
  var __a = `pending ${__pattern_8_1.id}`;
1118
1088
 
1119
1089
  if (__prev.a !== __a) {
1120
- _$_.set_text_content(__prev._li_20, __a, __prev.a);
1090
+ _$_.set_text_content(__prev._b, __a, __prev.a);
1121
1091
  __prev.a = __a;
1122
1092
  }
1123
1093
 
1124
1094
  var __b = `pending pending-${__pattern_8_1.id}`;
1125
1095
 
1126
1096
  if (__prev.b !== __b) {
1127
- _$_.set_class(__prev._li_20, __prev.b = __b, void 0, true);
1097
+ _$_.set_class(__prev._b, __prev.b = __b);
1128
1098
  }
1129
1099
  }
1130
1100
 
1131
- var root_40 = _$_.template(`<li></li>`, 0);
1101
+ var root_40 = _$_.template_el('li');
1132
1102
 
1133
- function render_21(__prev) {
1134
- var __pattern_8_2 = _$_.get(__prev._pattern_8);
1103
+ function render_27(__prev) {
1104
+ var __pattern_8_2 = _$_.get(__prev._a);
1135
1105
  var __a = `B-${__pattern_8_2.id}`;
1136
1106
 
1137
1107
  if (__prev.a !== __a) {
1138
- _$_.set_text_content(__prev._li_21, __a, __prev.a);
1108
+ _$_.set_text_content(__prev._b, __a, __prev.a);
1139
1109
  __prev.a = __a;
1140
1110
  }
1141
1111
 
1142
1112
  var __b = `item item-${__pattern_8_2.id} kind-b`;
1143
1113
 
1144
1114
  if (__prev.b !== __b) {
1145
- _$_.set_class(__prev._li_21, __prev.b = __b, void 0, true);
1115
+ _$_.set_class(__prev._b, __prev.b = __b);
1146
1116
  }
1147
1117
  }
1148
1118
 
1149
- var root_41 = _$_.template(`<li></li>`, 0);
1119
+ var root_41 = _$_.template_el('li');
1150
1120
 
1151
- function render_22(__prev) {
1152
- var __pattern_8_3 = _$_.get(__prev._pattern_8);
1121
+ function render_28(__prev) {
1122
+ var __pattern_8_3 = _$_.get(__prev._a);
1153
1123
  var __a = `pending ${__pattern_8_3.id}`;
1154
1124
 
1155
1125
  if (__prev.a !== __a) {
1156
- _$_.set_text_content(__prev._li_22, __a, __prev.a);
1126
+ _$_.set_text_content(__prev._b, __a, __prev.a);
1157
1127
  __prev.a = __a;
1158
1128
  }
1159
1129
 
1160
1130
  var __b = `pending pending-${__pattern_8_3.id}`;
1161
1131
 
1162
1132
  if (__prev.b !== __b) {
1163
- _$_.set_class(__prev._li_22, __prev.b = __b, void 0, true);
1133
+ _$_.set_class(__prev._b, __prev.b = __b);
1164
1134
  }
1165
1135
  }
1166
1136
 
@@ -1170,26 +1140,14 @@ function switch_case_0_9(__anchor, pattern_8) {
1170
1140
  (__anchor) => {
1171
1141
  var li_19 = root_38();
1172
1142
 
1173
- _$_.render(render_19, {
1174
- a: '',
1175
- b: _$_.UNINITIALIZED,
1176
- _pattern_8: pattern_8,
1177
- _li_19: li_19
1178
- });
1179
-
1143
+ _$_.render(render_25, { a: '', b: _$_.UNINITIALIZED, _a: pattern_8, _b: li_19 });
1180
1144
  _$_.append(__anchor, li_19);
1181
1145
  },
1182
1146
  null,
1183
1147
  (__anchor) => {
1184
1148
  var li_20 = root_39();
1185
1149
 
1186
- _$_.render(render_20, {
1187
- a: '',
1188
- b: _$_.UNINITIALIZED,
1189
- _pattern_8: pattern_8,
1190
- _li_20: li_20
1191
- });
1192
-
1150
+ _$_.render(render_26, { a: '', b: _$_.UNINITIALIZED, _a: pattern_8, _b: li_20 });
1193
1151
  _$_.append(__anchor, li_20);
1194
1152
  },
1195
1153
  true
@@ -1202,26 +1160,14 @@ function switch_case_default_9(__anchor, pattern_8) {
1202
1160
  (__anchor) => {
1203
1161
  var li_21 = root_40();
1204
1162
 
1205
- _$_.render(render_21, {
1206
- a: '',
1207
- b: _$_.UNINITIALIZED,
1208
- _pattern_8: pattern_8,
1209
- _li_21: li_21
1210
- });
1211
-
1163
+ _$_.render(render_27, { a: '', b: _$_.UNINITIALIZED, _a: pattern_8, _b: li_21 });
1212
1164
  _$_.append(__anchor, li_21);
1213
1165
  },
1214
1166
  null,
1215
1167
  (__anchor) => {
1216
1168
  var li_22 = root_41();
1217
1169
 
1218
- _$_.render(render_22, {
1219
- a: '',
1220
- b: _$_.UNINITIALIZED,
1221
- _pattern_8: pattern_8,
1222
- _li_22: li_22
1223
- });
1224
-
1170
+ _$_.render(render_28, { a: '', b: _$_.UNINITIALIZED, _a: pattern_8, _b: li_22 });
1225
1171
  _$_.append(__anchor, li_22);
1226
1172
  },
1227
1173
  true
@@ -1246,7 +1192,15 @@ function if_9(pattern_8) {
1246
1192
  if (_$_.get(pattern_8).show) return consequent_8;
1247
1193
  }
1248
1194
 
1249
- var root_37 = _$_.template(`<ul class="for-if-switch-try-multi"></ul>`, 0);
1195
+ function render_29(__prev) {
1196
+ var __a = if_9(__prev._a);
1197
+
1198
+ if (__prev.a !== __a) {
1199
+ _$_.if_update(__prev._b, __prev.a = __a);
1200
+ }
1201
+ }
1202
+
1203
+ var root_37 = _$_.template_el('ul', ['class', 'for-if-switch-try-multi']);
1250
1204
 
1251
1205
  function ForIfSwitchTryMulti_render(__anchor, __block) {
1252
1206
  const items = [
@@ -1261,10 +1215,15 @@ function ForIfSwitchTryMulti_render(__anchor, __block) {
1261
1215
  ul_8,
1262
1216
  () => items,
1263
1217
  (__anchor, pattern_8) => {
1264
- _$_.if(__anchor, if_9, true, pattern_8);
1218
+ var ifs_6 = _$_.if_static(__anchor, if_9, 3, pattern_8);
1219
+
1220
+ _$_.item({ a: _$_.UNINITIALIZED, _a: pattern_8, _b: ifs_6 });
1265
1221
  },
1266
1222
  4,
1267
- (pattern_8) => pattern_8.id
1223
+ (pattern_8) => pattern_8.id,
1224
+ void 0,
1225
+ void 0,
1226
+ render_29
1268
1227
  );
1269
1228
 
1270
1229
  _$_.hydrating && _$_.pop(ul_8);