ripple 0.3.10 → 0.3.11
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 +31 -0
- package/package.json +2 -2
- package/src/compiler/errors.js +1 -1
- package/src/compiler/index.d.ts +3 -1
- package/src/compiler/phases/1-parse/index.js +170 -8
- package/src/compiler/phases/2-analyze/index.js +231 -20
- package/src/compiler/phases/3-transform/client/index.js +169 -77
- package/src/compiler/phases/3-transform/server/index.js +46 -3
- package/src/compiler/types/index.d.ts +19 -2
- package/src/compiler/types/parse.d.ts +1 -1
- package/src/compiler/utils.js +174 -0
- package/src/runtime/index-client.js +14 -4
- package/src/runtime/internal/client/composite.js +2 -2
- package/src/runtime/internal/client/expression.js +64 -2
- package/src/runtime/internal/client/portal.js +1 -1
- package/src/utils/builders.js +30 -0
- package/tests/client/basic/__snapshots__/basic.rendering.test.ripple.snap +1 -0
- package/tests/client/basic/basic.rendering.test.ripple +4 -2
- package/tests/client/composite/composite.render.test.ripple +46 -0
- package/tests/client/return.test.ripple +101 -0
- package/tests/client/tsx.test.ripple +486 -0
- package/tests/hydration/compiled/client/basic.js +8 -24
- package/tests/hydration/compiled/client/composite.js +6 -24
- package/tests/hydration/compiled/client/events.js +9 -54
- package/tests/hydration/compiled/client/for.js +59 -152
- package/tests/hydration/compiled/client/head.js +5 -20
- package/tests/hydration/compiled/client/hmr.js +2 -8
- package/tests/hydration/compiled/client/html.js +59 -226
- package/tests/hydration/compiled/client/if-children.js +6 -22
- package/tests/hydration/compiled/client/mixed-control-flow.js +18 -66
- package/tests/hydration/compiled/client/nested-control-flow.js +92 -368
- package/tests/hydration/compiled/client/portal.js +4 -16
- package/tests/hydration/compiled/client/reactivity.js +7 -40
- package/tests/hydration/compiled/client/return.js +1 -4
- package/tests/hydration/compiled/client/try.js +2 -2
- package/tests/utils/compiler-compat-config.test.js +38 -0
- package/tests/utils/vite-plugin-config.test.js +113 -0
- package/tsconfig.typecheck.json +2 -1
- package/types/index.d.ts +2 -12
|
@@ -42,6 +42,7 @@ export function ReactiveTitle(__anchor, _, __block) {
|
|
|
42
42
|
{
|
|
43
43
|
var expression = _$_.child(span_1, true);
|
|
44
44
|
|
|
45
|
+
_$_.expression(expression, () => _$_.get(lazy));
|
|
45
46
|
_$_.pop(span_1);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -52,10 +53,6 @@ export function ReactiveTitle(__anchor, _, __block) {
|
|
|
52
53
|
});
|
|
53
54
|
});
|
|
54
55
|
|
|
55
|
-
_$_.render(() => {
|
|
56
|
-
_$_.set_text(expression, _$_.get(lazy));
|
|
57
|
-
});
|
|
58
|
-
|
|
59
56
|
_$_.append(__anchor, div_2);
|
|
60
57
|
_$_.pop_component();
|
|
61
58
|
}
|
|
@@ -86,6 +83,7 @@ export function ReactiveMetaTags(__anchor, _, __block) {
|
|
|
86
83
|
{
|
|
87
84
|
var expression_1 = _$_.child(div_4, true);
|
|
88
85
|
|
|
86
|
+
_$_.expression(expression_1, () => _$_.get(lazy_1));
|
|
89
87
|
_$_.pop(div_4);
|
|
90
88
|
}
|
|
91
89
|
|
|
@@ -97,10 +95,6 @@ export function ReactiveMetaTags(__anchor, _, __block) {
|
|
|
97
95
|
_$_.append(__anchor, meta_1);
|
|
98
96
|
});
|
|
99
97
|
|
|
100
|
-
_$_.render(() => {
|
|
101
|
-
_$_.set_text(expression_1, _$_.get(lazy_1));
|
|
102
|
-
});
|
|
103
|
-
|
|
104
98
|
_$_.append(__anchor, div_4);
|
|
105
99
|
_$_.pop_component();
|
|
106
100
|
}
|
|
@@ -114,6 +108,7 @@ export function TitleWithTemplate(__anchor, _, __block) {
|
|
|
114
108
|
{
|
|
115
109
|
var expression_2 = _$_.child(div_5, true);
|
|
116
110
|
|
|
111
|
+
_$_.expression(expression_2, () => _$_.get(lazy_2));
|
|
117
112
|
_$_.pop(div_5);
|
|
118
113
|
}
|
|
119
114
|
|
|
@@ -123,10 +118,6 @@ export function TitleWithTemplate(__anchor, _, __block) {
|
|
|
123
118
|
});
|
|
124
119
|
});
|
|
125
120
|
|
|
126
|
-
_$_.render(() => {
|
|
127
|
-
_$_.set_text(expression_2, _$_.get(lazy_2));
|
|
128
|
-
});
|
|
129
|
-
|
|
130
121
|
_$_.append(__anchor, div_5);
|
|
131
122
|
_$_.pop_component();
|
|
132
123
|
}
|
|
@@ -154,6 +145,7 @@ export function ConditionalTitle(__anchor, _, __block) {
|
|
|
154
145
|
{
|
|
155
146
|
var expression_3 = _$_.child(div_7, true);
|
|
156
147
|
|
|
148
|
+
_$_.expression(expression_3, () => _$_.get(lazy_4));
|
|
157
149
|
_$_.pop(div_7);
|
|
158
150
|
}
|
|
159
151
|
|
|
@@ -163,10 +155,6 @@ export function ConditionalTitle(__anchor, _, __block) {
|
|
|
163
155
|
});
|
|
164
156
|
});
|
|
165
157
|
|
|
166
|
-
_$_.render(() => {
|
|
167
|
-
_$_.set_text(expression_3, _$_.get(lazy_4));
|
|
168
|
-
});
|
|
169
|
-
|
|
170
158
|
_$_.append(__anchor, div_7);
|
|
171
159
|
_$_.pop_component();
|
|
172
160
|
}
|
|
@@ -184,6 +172,7 @@ export function ComputedTitle(__anchor, _, __block) {
|
|
|
184
172
|
{
|
|
185
173
|
var expression_4 = _$_.child(span_2, true);
|
|
186
174
|
|
|
175
|
+
_$_.expression(expression_4, () => _$_.get(lazy_5));
|
|
187
176
|
_$_.pop(span_2);
|
|
188
177
|
}
|
|
189
178
|
}
|
|
@@ -194,10 +183,6 @@ export function ComputedTitle(__anchor, _, __block) {
|
|
|
194
183
|
});
|
|
195
184
|
});
|
|
196
185
|
|
|
197
|
-
_$_.render(() => {
|
|
198
|
-
_$_.set_text(expression_4, _$_.get(lazy_5));
|
|
199
|
-
});
|
|
200
|
-
|
|
201
186
|
_$_.append(__anchor, div_8);
|
|
202
187
|
_$_.pop_component();
|
|
203
188
|
}
|
|
@@ -21,14 +21,11 @@ export function Layout(__anchor, { children }, __block) {
|
|
|
21
21
|
{
|
|
22
22
|
var expression = _$_.child(main_1);
|
|
23
23
|
|
|
24
|
+
_$_.expression(expression, () => children);
|
|
24
25
|
_$_.pop(main_1);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
_$_.render(() => {
|
|
29
|
-
_$_.expression(expression, () => children);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
29
|
_$_.append(__anchor, div_1);
|
|
33
30
|
_$_.pop_component();
|
|
34
31
|
}
|
|
@@ -70,15 +67,12 @@ export function LayoutWithContent(__anchor, _, __block) {
|
|
|
70
67
|
Layout(
|
|
71
68
|
node_1,
|
|
72
69
|
{
|
|
73
|
-
children: _$_.ripple_element(function render_children(__anchor,
|
|
74
|
-
_$_.push_component();
|
|
75
|
-
|
|
70
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
76
71
|
var fragment_1 = root_4();
|
|
77
72
|
var node_2 = _$_.first_child_frag(fragment_1);
|
|
78
73
|
|
|
79
74
|
Content(node_2, {}, _$_.active_block);
|
|
80
75
|
_$_.append(__anchor, fragment_1);
|
|
81
|
-
_$_.pop_component();
|
|
82
76
|
})
|
|
83
77
|
},
|
|
84
78
|
_$_.active_block
|