ripple 0.3.30 → 0.3.31
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.
- package/CHANGELOG.md +8 -0
- package/package.json +4 -4
- package/tests/client/__snapshots__/computed-properties.test.ripple.snap +0 -49
- package/tests/client/__snapshots__/for.test.ripple.snap +0 -319
- package/tests/client/__snapshots__/html.test.ripple.snap +0 -40
- package/tests/client/basic/__snapshots__/basic.attributes.test.ripple.snap +0 -60
- package/tests/client/basic/__snapshots__/basic.rendering.test.ripple.snap +0 -59
- package/tests/client/basic/__snapshots__/basic.text.test.ripple.snap +0 -49
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.ripple.snap +0 -12
- package/tests/client/compiler/__snapshots__/compiler.typescript.test.ripple.snap +0 -46
- package/tests/client/composite/__snapshots__/composite.render.test.ripple.snap +0 -37
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ripple is an elegant TypeScript UI framework",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.31",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/runtime/index-client.js",
|
|
9
9
|
"main": "src/runtime/index-client.js",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"esm-env": "^1.2.2",
|
|
77
77
|
"@types/estree": "^1.0.8",
|
|
78
78
|
"@types/estree-jsx": "^1.0.5",
|
|
79
|
-
"@tsrx/ripple": "0.0.
|
|
79
|
+
"@tsrx/ripple": "0.0.13"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@types/node": "^24.3.0",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
85
|
"@volar/language-core": "~2.4.28",
|
|
86
86
|
"vscode-languageserver-types": "^3.17.5",
|
|
87
|
-
"@tsrx/core": "0.0.
|
|
87
|
+
"@tsrx/core": "0.0.11"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"ripple": "0.3.
|
|
90
|
+
"ripple": "0.3.31"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`computed tracked properties > should update a property using assignment 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div>
|
|
6
|
-
0
|
|
7
|
-
</div>
|
|
8
|
-
<button>
|
|
9
|
-
Increment
|
|
10
|
-
</button>
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`computed tracked properties > should update a property using assignment 2`] = `
|
|
16
|
-
<div>
|
|
17
|
-
<div>
|
|
18
|
-
1
|
|
19
|
-
</div>
|
|
20
|
-
<button>
|
|
21
|
-
Increment
|
|
22
|
-
</button>
|
|
23
|
-
|
|
24
|
-
</div>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`computed tracked properties > should update a property using update expressions 1`] = `
|
|
28
|
-
<div>
|
|
29
|
-
<div>
|
|
30
|
-
0
|
|
31
|
-
</div>
|
|
32
|
-
<button>
|
|
33
|
-
Increment
|
|
34
|
-
</button>
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
exports[`computed tracked properties > should update a property using update expressions 2`] = `
|
|
40
|
-
<div>
|
|
41
|
-
<div>
|
|
42
|
-
1
|
|
43
|
-
</div>
|
|
44
|
-
<button>
|
|
45
|
-
Increment
|
|
46
|
-
</button>
|
|
47
|
-
|
|
48
|
-
</div>
|
|
49
|
-
`;
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`for statements > correctly handles intermediate statements in for block 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div>
|
|
6
|
-
<div>
|
|
7
|
-
<div>
|
|
8
|
-
1
|
|
9
|
-
</div>
|
|
10
|
-
<div>
|
|
11
|
-
1
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
<div>
|
|
15
|
-
<div>
|
|
16
|
-
2
|
|
17
|
-
</div>
|
|
18
|
-
<div>
|
|
19
|
-
2
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<div>
|
|
23
|
-
<div>
|
|
24
|
-
3
|
|
25
|
-
</div>
|
|
26
|
-
<div>
|
|
27
|
-
3
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
</div>
|
|
32
|
-
<button>
|
|
33
|
-
Add Item
|
|
34
|
-
</button>
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
exports[`for statements > correctly handles intermediate statements in for block 2`] = `
|
|
40
|
-
<div>
|
|
41
|
-
<div>
|
|
42
|
-
<div>
|
|
43
|
-
<div>
|
|
44
|
-
1
|
|
45
|
-
</div>
|
|
46
|
-
<div>
|
|
47
|
-
1
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div>
|
|
51
|
-
<div>
|
|
52
|
-
2
|
|
53
|
-
</div>
|
|
54
|
-
<div>
|
|
55
|
-
2
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div>
|
|
59
|
-
<div>
|
|
60
|
-
3
|
|
61
|
-
</div>
|
|
62
|
-
<div>
|
|
63
|
-
3
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
<div>
|
|
67
|
-
<div>
|
|
68
|
-
4
|
|
69
|
-
</div>
|
|
70
|
-
<div>
|
|
71
|
-
4
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
</div>
|
|
76
|
-
<button>
|
|
77
|
-
Add Item
|
|
78
|
-
</button>
|
|
79
|
-
|
|
80
|
-
</div>
|
|
81
|
-
`;
|
|
82
|
-
|
|
83
|
-
exports[`for statements > correctly handles keyed for...of loops 1`] = `
|
|
84
|
-
<div>
|
|
85
|
-
<!---->
|
|
86
|
-
<div>
|
|
87
|
-
0:Item 1
|
|
88
|
-
</div>
|
|
89
|
-
<div>
|
|
90
|
-
1:Item 2
|
|
91
|
-
</div>
|
|
92
|
-
<div>
|
|
93
|
-
2:Item 3
|
|
94
|
-
</div>
|
|
95
|
-
<!---->
|
|
96
|
-
<button>
|
|
97
|
-
Reverse
|
|
98
|
-
</button>
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
`;
|
|
102
|
-
|
|
103
|
-
exports[`for statements > correctly handles keyed for...of loops 2`] = `
|
|
104
|
-
<div>
|
|
105
|
-
<!---->
|
|
106
|
-
<div>
|
|
107
|
-
0:Item 3
|
|
108
|
-
</div>
|
|
109
|
-
<div>
|
|
110
|
-
1:Item 2
|
|
111
|
-
</div>
|
|
112
|
-
<div>
|
|
113
|
-
2:Item 1
|
|
114
|
-
</div>
|
|
115
|
-
<!---->
|
|
116
|
-
<button>
|
|
117
|
-
Reverse
|
|
118
|
-
</button>
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
|
-
exports[`for statements > correctly handles the index in a for...of loop 1`] = `
|
|
124
|
-
<div>
|
|
125
|
-
<div>
|
|
126
|
-
<div>
|
|
127
|
-
0 : a
|
|
128
|
-
</div>
|
|
129
|
-
<div>
|
|
130
|
-
1 : b
|
|
131
|
-
</div>
|
|
132
|
-
<div>
|
|
133
|
-
2 : c
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
</div>
|
|
137
|
-
<button>
|
|
138
|
-
Add Item
|
|
139
|
-
</button>
|
|
140
|
-
<button>
|
|
141
|
-
Reverse
|
|
142
|
-
</button>
|
|
143
|
-
|
|
144
|
-
</div>
|
|
145
|
-
`;
|
|
146
|
-
|
|
147
|
-
exports[`for statements > correctly handles the index in a for...of loop 2`] = `
|
|
148
|
-
<div>
|
|
149
|
-
<div>
|
|
150
|
-
<div>
|
|
151
|
-
0 : a
|
|
152
|
-
</div>
|
|
153
|
-
<div>
|
|
154
|
-
1 : b
|
|
155
|
-
</div>
|
|
156
|
-
<div>
|
|
157
|
-
2 : c
|
|
158
|
-
</div>
|
|
159
|
-
<div>
|
|
160
|
-
3 : d
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
</div>
|
|
164
|
-
<button>
|
|
165
|
-
Add Item
|
|
166
|
-
</button>
|
|
167
|
-
<button>
|
|
168
|
-
Reverse
|
|
169
|
-
</button>
|
|
170
|
-
|
|
171
|
-
</div>
|
|
172
|
-
`;
|
|
173
|
-
|
|
174
|
-
exports[`for statements > correctly handles the index in a for...of loop 3`] = `
|
|
175
|
-
<div>
|
|
176
|
-
<div>
|
|
177
|
-
<div>
|
|
178
|
-
0 : d
|
|
179
|
-
</div>
|
|
180
|
-
<div>
|
|
181
|
-
1 : c
|
|
182
|
-
</div>
|
|
183
|
-
<div>
|
|
184
|
-
2 : b
|
|
185
|
-
</div>
|
|
186
|
-
<div>
|
|
187
|
-
3 : a
|
|
188
|
-
</div>
|
|
189
|
-
|
|
190
|
-
</div>
|
|
191
|
-
<button>
|
|
192
|
-
Add Item
|
|
193
|
-
</button>
|
|
194
|
-
<button>
|
|
195
|
-
Reverse
|
|
196
|
-
</button>
|
|
197
|
-
|
|
198
|
-
</div>
|
|
199
|
-
`;
|
|
200
|
-
|
|
201
|
-
exports[`for statements > handles updating with new objects with same key 1`] = `
|
|
202
|
-
<div>
|
|
203
|
-
<!---->
|
|
204
|
-
<div>
|
|
205
|
-
0:Item 1
|
|
206
|
-
</div>
|
|
207
|
-
<div>
|
|
208
|
-
1:Item 2
|
|
209
|
-
</div>
|
|
210
|
-
<div>
|
|
211
|
-
2:Item 3
|
|
212
|
-
</div>
|
|
213
|
-
<!---->
|
|
214
|
-
<button>
|
|
215
|
-
Reverse
|
|
216
|
-
</button>
|
|
217
|
-
|
|
218
|
-
</div>
|
|
219
|
-
`;
|
|
220
|
-
|
|
221
|
-
exports[`for statements > handles updating with new objects with same key 2`] = `
|
|
222
|
-
<div>
|
|
223
|
-
<!---->
|
|
224
|
-
<div>
|
|
225
|
-
0:Item 1!
|
|
226
|
-
</div>
|
|
227
|
-
<div>
|
|
228
|
-
1:Item 2!
|
|
229
|
-
</div>
|
|
230
|
-
<div>
|
|
231
|
-
2:Item 3!
|
|
232
|
-
</div>
|
|
233
|
-
<!---->
|
|
234
|
-
<button>
|
|
235
|
-
Reverse
|
|
236
|
-
</button>
|
|
237
|
-
|
|
238
|
-
</div>
|
|
239
|
-
`;
|
|
240
|
-
|
|
241
|
-
exports[`for statements > renders a simple dynamic array 1`] = `
|
|
242
|
-
<div>
|
|
243
|
-
<!---->
|
|
244
|
-
<div
|
|
245
|
-
class="Item 1"
|
|
246
|
-
>
|
|
247
|
-
Item 1
|
|
248
|
-
</div>
|
|
249
|
-
<div
|
|
250
|
-
class="Item 2"
|
|
251
|
-
>
|
|
252
|
-
Item 2
|
|
253
|
-
</div>
|
|
254
|
-
<div
|
|
255
|
-
class="Item 3"
|
|
256
|
-
>
|
|
257
|
-
Item 3
|
|
258
|
-
</div>
|
|
259
|
-
<!---->
|
|
260
|
-
<button>
|
|
261
|
-
Add Item
|
|
262
|
-
</button>
|
|
263
|
-
|
|
264
|
-
</div>
|
|
265
|
-
`;
|
|
266
|
-
|
|
267
|
-
exports[`for statements > renders a simple dynamic array 2`] = `
|
|
268
|
-
<div>
|
|
269
|
-
<!---->
|
|
270
|
-
<div
|
|
271
|
-
class="Item 1"
|
|
272
|
-
>
|
|
273
|
-
Item 1
|
|
274
|
-
</div>
|
|
275
|
-
<div
|
|
276
|
-
class="Item 2"
|
|
277
|
-
>
|
|
278
|
-
Item 2
|
|
279
|
-
</div>
|
|
280
|
-
<div
|
|
281
|
-
class="Item 3"
|
|
282
|
-
>
|
|
283
|
-
Item 3
|
|
284
|
-
</div>
|
|
285
|
-
<div
|
|
286
|
-
class="Item 4"
|
|
287
|
-
>
|
|
288
|
-
Item 4
|
|
289
|
-
</div>
|
|
290
|
-
<!---->
|
|
291
|
-
<button>
|
|
292
|
-
Add Item
|
|
293
|
-
</button>
|
|
294
|
-
|
|
295
|
-
</div>
|
|
296
|
-
`;
|
|
297
|
-
|
|
298
|
-
exports[`for statements > renders a simple static array 1`] = `
|
|
299
|
-
<div>
|
|
300
|
-
<!---->
|
|
301
|
-
<div
|
|
302
|
-
class="Item 1"
|
|
303
|
-
>
|
|
304
|
-
Item 1
|
|
305
|
-
</div>
|
|
306
|
-
<div
|
|
307
|
-
class="Item 2"
|
|
308
|
-
>
|
|
309
|
-
Item 2
|
|
310
|
-
</div>
|
|
311
|
-
<div
|
|
312
|
-
class="Item 3"
|
|
313
|
-
>
|
|
314
|
-
Item 3
|
|
315
|
-
</div>
|
|
316
|
-
<!---->
|
|
317
|
-
|
|
318
|
-
</div>
|
|
319
|
-
`;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`html directive > renders dynamic html 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<!---->
|
|
6
|
-
<div>
|
|
7
|
-
Test
|
|
8
|
-
</div>
|
|
9
|
-
<!---->
|
|
10
|
-
<button>
|
|
11
|
-
Update
|
|
12
|
-
</button>
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
exports[`html directive > renders dynamic html 2`] = `
|
|
18
|
-
<div>
|
|
19
|
-
<!---->
|
|
20
|
-
<div>
|
|
21
|
-
Updated
|
|
22
|
-
</div>
|
|
23
|
-
<!---->
|
|
24
|
-
<button>
|
|
25
|
-
Update
|
|
26
|
-
</button>
|
|
27
|
-
|
|
28
|
-
</div>
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
exports[`html directive > renders static html 1`] = `
|
|
32
|
-
<div>
|
|
33
|
-
<!---->
|
|
34
|
-
<div>
|
|
35
|
-
Test
|
|
36
|
-
</div>
|
|
37
|
-
<!---->
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`basic client > attribute rendering > handles boolean attributes with no prop value provides 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="container"
|
|
7
|
-
>
|
|
8
|
-
<button
|
|
9
|
-
disabled=""
|
|
10
|
-
>
|
|
11
|
-
Button
|
|
12
|
-
</button>
|
|
13
|
-
<input
|
|
14
|
-
checked=""
|
|
15
|
-
type="checkbox"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
</div>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`basic client > attribute rendering > handles boolean props correctly 1`] = `
|
|
23
|
-
<div>
|
|
24
|
-
<div
|
|
25
|
-
data-disabled=""
|
|
26
|
-
/>
|
|
27
|
-
<input
|
|
28
|
-
disabled=""
|
|
29
|
-
/>
|
|
30
|
-
<!---->
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
exports[`basic client > attribute rendering > render spread props without duplication 1`] = `
|
|
36
|
-
<div>
|
|
37
|
-
<div>
|
|
38
|
-
<input
|
|
39
|
-
id="vehicle1"
|
|
40
|
-
name="car"
|
|
41
|
-
type="checkbox"
|
|
42
|
-
value="Bike"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
exports[`basic client > attribute rendering > render static attributes 1`] = `
|
|
50
|
-
<div>
|
|
51
|
-
<div
|
|
52
|
-
class="foo"
|
|
53
|
-
id="bar"
|
|
54
|
-
style="color: red;"
|
|
55
|
-
>
|
|
56
|
-
Hello World
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
</div>
|
|
60
|
-
`;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`basic client > rendering & text > basic operations 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div>
|
|
6
|
-
0
|
|
7
|
-
</div>
|
|
8
|
-
<div>
|
|
9
|
-
2
|
|
10
|
-
</div>
|
|
11
|
-
<div>
|
|
12
|
-
5
|
|
13
|
-
</div>
|
|
14
|
-
<div>
|
|
15
|
-
2
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
exports[`basic client > rendering & text > renders semi-dynamic text 1`] = `
|
|
22
|
-
<div>
|
|
23
|
-
<div>
|
|
24
|
-
Hello World
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
exports[`basic client > rendering & text > renders simple JS expression logic correctly 1`] = `
|
|
31
|
-
<div>
|
|
32
|
-
<div>
|
|
33
|
-
{"0":"Test"}
|
|
34
|
-
</div>
|
|
35
|
-
<div>
|
|
36
|
-
1
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`basic client > rendering & text > renders static text 1`] = `
|
|
43
|
-
<div>
|
|
44
|
-
<div>
|
|
45
|
-
Hello World
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
</div>
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
exports[`basic client > rendering & text > should handle lexical scopes correctly 1`] = `
|
|
52
|
-
<div>
|
|
53
|
-
<section>
|
|
54
|
-
Nested scope variable
|
|
55
|
-
<!---->
|
|
56
|
-
</section>
|
|
57
|
-
|
|
58
|
-
</div>
|
|
59
|
-
`;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`basic client > text rendering > basic operations 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div>
|
|
6
|
-
0
|
|
7
|
-
</div>
|
|
8
|
-
<div>
|
|
9
|
-
2
|
|
10
|
-
</div>
|
|
11
|
-
<div>
|
|
12
|
-
5
|
|
13
|
-
</div>
|
|
14
|
-
<div>
|
|
15
|
-
2
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
exports[`basic client > text rendering > renders semi-dynamic text 1`] = `
|
|
22
|
-
<div>
|
|
23
|
-
<div>
|
|
24
|
-
Hello World
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
exports[`basic client > text rendering > renders simple JS expression logic correctly 1`] = `
|
|
31
|
-
<div>
|
|
32
|
-
<div>
|
|
33
|
-
{"0":"Test"}
|
|
34
|
-
</div>
|
|
35
|
-
<div>
|
|
36
|
-
1
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`basic client > text rendering > renders static text 1`] = `
|
|
43
|
-
<div>
|
|
44
|
-
<div>
|
|
45
|
-
Hello World
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
</div>
|
|
49
|
-
`;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`compiler > assignments > compiles tracked values in effect with assignment expression 1`] = `"state.count = _$_.get(lazy);"`;
|
|
4
|
-
|
|
5
|
-
exports[`compiler > assignments > compiles tracked values in effect with update expressions 1`] = `
|
|
6
|
-
"_$_.untrack(() => {
|
|
7
|
-
state.preIncrement = _$_.update_pre(lazy);
|
|
8
|
-
state.postIncrement = _$_.update(lazy);
|
|
9
|
-
state.preDecrement = _$_.update_pre(lazy, -1);
|
|
10
|
-
state.postDecrement = _$_.update(lazy, -1);
|
|
11
|
-
});"
|
|
12
|
-
`;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`compiler > typescript > compiles TSInstantiationExpression 1`] = `
|
|
4
|
-
"import * as _$_ from 'ripple/internal/client';
|
|
5
|
-
|
|
6
|
-
function makeBox(value) {
|
|
7
|
-
return { value };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const makeStringBox = (makeBox);
|
|
11
|
-
const stringBox = makeStringBox('abc');
|
|
12
|
-
const ErrorMap = (Map);
|
|
13
|
-
const errorMap = new ErrorMap();"
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
exports[`compiler > typescript > removes class TypeScript syntax from JS output 1`] = `
|
|
17
|
-
"import * as _$_ from 'ripple/internal/client';
|
|
18
|
-
|
|
19
|
-
class PrintEvent {
|
|
20
|
-
text;
|
|
21
|
-
|
|
22
|
-
constructor(text) {
|
|
23
|
-
this.text = text;
|
|
24
|
-
}
|
|
25
|
-
}"
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
exports[`compiler > typescript > removes class extends type arguments from JS output 1`] = `
|
|
29
|
-
"import * as _$_ from 'ripple/internal/client';
|
|
30
|
-
|
|
31
|
-
class StringMap extends Map {
|
|
32
|
-
constructor() {
|
|
33
|
-
var __block = _$_.scope();
|
|
34
|
-
|
|
35
|
-
super();
|
|
36
|
-
}
|
|
37
|
-
}"
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
exports[`compiler > typescript > removes type assertions from function parameters and leaves default values 1`] = `
|
|
41
|
-
"import * as _$_ from 'ripple/internal/client';
|
|
42
|
-
|
|
43
|
-
function getString(e = 'test') {
|
|
44
|
-
return e;
|
|
45
|
-
}"
|
|
46
|
-
`;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`composite > render > correct handles passing through component props and children 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<!---->
|
|
6
|
-
<div>
|
|
7
|
-
<div>
|
|
8
|
-
I am A
|
|
9
|
-
</div>
|
|
10
|
-
<!---->
|
|
11
|
-
<div>
|
|
12
|
-
other text
|
|
13
|
-
</div>
|
|
14
|
-
<!---->
|
|
15
|
-
<div>
|
|
16
|
-
I am B
|
|
17
|
-
</div>
|
|
18
|
-
<!---->
|
|
19
|
-
</div>
|
|
20
|
-
<!---->
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
exports[`composite > render > render simple text as children 1`] = `
|
|
26
|
-
<div>
|
|
27
|
-
<!---->
|
|
28
|
-
<button
|
|
29
|
-
class="my-button"
|
|
30
|
-
>
|
|
31
|
-
Click Me
|
|
32
|
-
<!---->
|
|
33
|
-
</button>
|
|
34
|
-
<!---->
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
`;
|