ripple 0.2.46 → 0.2.47
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/package.json +1 -1
- package/src/compiler/phases/1-parse/index.js +2 -2
- package/src/compiler/phases/2-analyze/index.js +640 -667
- package/src/compiler/phases/3-transform/index.js +1873 -1880
- package/src/compiler/phases/3-transform/segments.js +2 -2
- package/src/compiler/utils.js +596 -551
- package/src/jsx-runtime.js +12 -12
- package/src/runtime/array.js +611 -609
- package/src/runtime/index.js +29 -17
- package/src/runtime/internal/client/array.js +121 -121
- package/src/runtime/internal/client/blocks.js +206 -206
- package/src/runtime/internal/client/constants.js +2 -2
- package/src/runtime/internal/client/context.js +40 -40
- package/src/runtime/internal/client/events.js +191 -191
- package/src/runtime/internal/client/for.js +355 -355
- package/src/runtime/internal/client/if.js +25 -25
- package/src/runtime/internal/client/index.js +57 -56
- package/src/runtime/internal/client/operations.js +32 -32
- package/src/runtime/internal/client/portal.js +19 -19
- package/src/runtime/internal/client/render.js +132 -132
- package/src/runtime/internal/client/runtime.js +838 -835
- package/src/runtime/internal/client/template.js +36 -36
- package/src/runtime/internal/client/try.js +113 -113
- package/src/runtime/internal/client/types.d.ts +10 -10
- package/src/runtime/internal/client/utils.js +5 -5
- package/src/runtime/map.js +139 -139
- package/src/runtime/set.js +130 -130
- package/src/utils/ast.js +189 -189
- package/src/utils/builders.js +244 -244
- package/src/utils/sanitize_template_string.js +1 -1
- package/tests/__snapshots__/composite.test.ripple.snap +1 -1
- package/tests/accessors-props.test.ripple +9 -9
- package/tests/basic.test.ripple +4 -4
- package/tests/boundaries.test.ripple +17 -17
- package/tests/composite.test.ripple +43 -72
- package/types/index.d.ts +6 -2
package/src/jsx-runtime.js
CHANGED
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
* @returns {void} Ripple components don't return anything
|
|
14
14
|
*/
|
|
15
15
|
export function jsx(type, props, key) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
// Ripple components are imperative - they don't return JSX elements
|
|
17
|
+
// This is a placeholder for the actual Ripple rendering logic
|
|
18
|
+
if (typeof type === 'function') {
|
|
19
|
+
// Call the Ripple component function
|
|
20
|
+
type(props);
|
|
21
|
+
} else {
|
|
22
|
+
// Handle DOM elements
|
|
23
|
+
console.warn('DOM element rendering not implemented in jsx runtime:', type, props);
|
|
24
|
+
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -32,7 +32,7 @@ export function jsx(type, props, key) {
|
|
|
32
32
|
* @returns {void} Ripple components don't return anything
|
|
33
33
|
*/
|
|
34
34
|
export function jsxs(type, props, key) {
|
|
35
|
-
|
|
35
|
+
return jsx(type, props, key);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -41,6 +41,6 @@ export function jsxs(type, props, key) {
|
|
|
41
41
|
* @returns {void} Ripple fragments don't return anything
|
|
42
42
|
*/
|
|
43
43
|
export function Fragment(props) {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
// Ripple fragments are imperative
|
|
45
|
+
console.warn('Fragment rendering not implemented in jsx runtime:', props);
|
|
46
46
|
}
|