ripple 0.3.9 → 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 +43 -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 +195 -23
- package/src/compiler/phases/2-analyze/index.js +266 -108
- package/src/compiler/phases/2-analyze/prune.js +13 -5
- package/src/compiler/phases/3-transform/client/index.js +304 -80
- package/src/compiler/phases/3-transform/server/index.js +108 -43
- package/src/compiler/types/index.d.ts +28 -3
- package/src/compiler/types/parse.d.ts +3 -1
- package/src/compiler/utils.js +275 -1
- package/src/runtime/element.js +39 -0
- package/src/runtime/index-client.js +14 -4
- package/src/runtime/internal/client/composite.js +10 -6
- package/src/runtime/internal/client/expression.js +280 -0
- package/src/runtime/internal/client/index.js +4 -0
- package/src/runtime/internal/client/portal.js +12 -6
- package/src/runtime/internal/server/index.js +26 -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.components.test.ripple +85 -87
- package/tests/client/basic/basic.errors.test.ripple +4 -8
- package/tests/client/basic/basic.rendering.test.ripple +27 -10
- package/tests/client/capture-error.js +12 -0
- package/tests/client/compiler/compiler.basic.test.ripple +76 -6
- package/tests/client/composite/composite.props.test.ripple +1 -3
- package/tests/client/composite/composite.render.test.ripple +91 -13
- package/tests/client/css/global-additional-cases.test.ripple +3 -3
- package/tests/client/return.test.ripple +101 -0
- package/tests/client/svg.test.ripple +4 -4
- package/tests/client/tsx.test.ripple +486 -0
- package/tests/hydration/basic.test.js +23 -0
- package/tests/hydration/compiled/client/basic.js +111 -75
- package/tests/hydration/compiled/client/composite.js +81 -46
- package/tests/hydration/compiled/client/events.js +18 -63
- package/tests/hydration/compiled/client/for.js +90 -183
- package/tests/hydration/compiled/client/head.js +10 -25
- package/tests/hydration/compiled/client/hmr.js +10 -13
- package/tests/hydration/compiled/client/html.js +251 -380
- package/tests/hydration/compiled/client/if-children.js +35 -45
- package/tests/hydration/compiled/client/if.js +2 -2
- package/tests/hydration/compiled/client/mixed-control-flow.js +24 -72
- package/tests/hydration/compiled/client/nested-control-flow.js +115 -391
- package/tests/hydration/compiled/client/portal.js +8 -20
- package/tests/hydration/compiled/client/reactivity.js +14 -47
- package/tests/hydration/compiled/client/return.js +2 -5
- package/tests/hydration/compiled/client/try.js +4 -4
- package/tests/hydration/compiled/server/basic.js +64 -31
- package/tests/hydration/compiled/server/composite.js +62 -29
- package/tests/hydration/compiled/server/hmr.js +24 -37
- package/tests/hydration/compiled/server/html.js +472 -611
- package/tests/hydration/compiled/server/if-children.js +77 -103
- package/tests/hydration/compiled/server/portal.js +8 -8
- package/tests/hydration/components/basic.ripple +15 -5
- package/tests/hydration/components/composite.ripple +13 -1
- package/tests/hydration/components/hmr.ripple +1 -3
- package/tests/hydration/components/html.ripple +13 -35
- package/tests/hydration/components/if-children.ripple +4 -8
- package/tests/hydration/composite.test.js +11 -0
- package/tests/server/basic.attributes.test.ripple +50 -0
- package/tests/server/basic.components.test.ripple +22 -28
- package/tests/server/basic.test.ripple +12 -0
- package/tests/server/compiler.test.ripple +25 -8
- package/tests/server/composite.props.test.ripple +1 -3
- package/tests/server/style-identifier.test.ripple +2 -4
- 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 +8 -11
|
@@ -19,9 +19,9 @@ export function Layout(__anchor, { children }, __block) {
|
|
|
19
19
|
var main_1 = _$_.sibling(nav_1);
|
|
20
20
|
|
|
21
21
|
{
|
|
22
|
-
var
|
|
22
|
+
var expression = _$_.child(main_1);
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
_$_.expression(expression, () => children);
|
|
25
25
|
_$_.pop(main_1);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -37,7 +37,7 @@ export function Content(__anchor, _, __block) {
|
|
|
37
37
|
var div_2 = root_1();
|
|
38
38
|
|
|
39
39
|
{
|
|
40
|
-
var
|
|
40
|
+
var node = _$_.child(div_2);
|
|
41
41
|
|
|
42
42
|
{
|
|
43
43
|
var consequent = (__anchor) => {
|
|
@@ -46,7 +46,7 @@ export function Content(__anchor, _, __block) {
|
|
|
46
46
|
_$_.append(__anchor, p_1);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
_$_.if(
|
|
49
|
+
_$_.if(node, (__render) => {
|
|
50
50
|
if (_$_.get(lazy)) __render(consequent);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
@@ -62,21 +62,18 @@ export function LayoutWithContent(__anchor, _, __block) {
|
|
|
62
62
|
_$_.push_component();
|
|
63
63
|
|
|
64
64
|
var fragment = root_3();
|
|
65
|
-
var
|
|
65
|
+
var node_1 = _$_.first_child_frag(fragment);
|
|
66
66
|
|
|
67
67
|
Layout(
|
|
68
|
-
|
|
68
|
+
node_1,
|
|
69
69
|
{
|
|
70
|
-
children(__anchor,
|
|
71
|
-
_$_.push_component();
|
|
72
|
-
|
|
70
|
+
children: _$_.ripple_element(function render_children(__anchor, __block) {
|
|
73
71
|
var fragment_1 = root_4();
|
|
74
|
-
var
|
|
72
|
+
var node_2 = _$_.first_child_frag(fragment_1);
|
|
75
73
|
|
|
76
|
-
Content(
|
|
74
|
+
Content(node_2, {}, _$_.active_block);
|
|
77
75
|
_$_.append(__anchor, fragment_1);
|
|
78
|
-
|
|
79
|
-
}
|
|
76
|
+
})
|
|
80
77
|
},
|
|
81
78
|
_$_.active_block
|
|
82
79
|
);
|