ripple 0.2.216 → 0.3.1
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 +52 -0
- package/package.json +16 -7
- package/src/compiler/errors.js +1 -1
- package/src/compiler/identifier-utils.js +2 -0
- package/src/compiler/index.d.ts +2 -6
- package/src/compiler/phases/1-parse/index.js +171 -233
- package/src/compiler/phases/2-analyze/index.js +192 -16
- package/src/compiler/phases/2-analyze/prune.js +2 -2
- package/src/compiler/phases/3-transform/client/index.js +308 -91
- package/src/compiler/phases/3-transform/segments.js +43 -15
- package/src/compiler/phases/3-transform/server/index.js +71 -21
- package/src/compiler/scope.js +31 -12
- package/src/compiler/source-map-utils.js +4 -6
- package/src/compiler/types/acorn.d.ts +11 -0
- package/src/compiler/types/estree-jsx.d.ts +11 -0
- package/src/compiler/types/estree.d.ts +11 -0
- package/src/compiler/types/import.d.ts +32 -18
- package/src/compiler/types/index.d.ts +75 -23
- package/src/compiler/types/parse.d.ts +7 -10
- package/src/compiler/utils.js +48 -0
- package/src/runtime/array.js +53 -22
- package/src/runtime/date.js +15 -5
- package/src/runtime/index-client.js +41 -7
- package/src/runtime/index-server.js +7 -7
- package/src/runtime/internal/client/bindings.js +2 -2
- package/src/runtime/internal/client/blocks.js +40 -1
- package/src/runtime/internal/client/context.js +8 -0
- package/src/runtime/internal/client/for.js +3 -3
- package/src/runtime/internal/client/index.js +27 -5
- package/src/runtime/internal/client/render.js +20 -8
- package/src/runtime/internal/client/runtime.js +9 -7
- package/src/runtime/internal/client/try.js +15 -22
- package/src/runtime/internal/client/utils.js +1 -1
- package/src/runtime/internal/server/context.js +8 -0
- package/src/runtime/internal/server/index.js +99 -6
- package/src/runtime/map.js +7 -7
- package/src/runtime/media-query.js +10 -1
- package/src/runtime/object.js +6 -6
- package/src/runtime/proxy.js +6 -6
- package/src/runtime/set.js +11 -11
- package/src/runtime/url-search-params.js +13 -2
- package/src/runtime/url.js +15 -5
- package/src/utils/builders.js +13 -3
- package/tests/client/array/array.copy-within.test.ripple +11 -11
- package/tests/client/array/array.derived.test.ripple +42 -42
- package/tests/client/array/array.iteration.test.ripple +12 -12
- package/tests/client/array/array.mutations.test.ripple +25 -25
- package/tests/client/array/array.static.test.ripple +103 -106
- package/tests/client/array/array.to-methods.test.ripple +8 -8
- package/tests/client/async-suspend.test.ripple +94 -0
- package/tests/client/basic/basic.attributes.test.ripple +31 -31
- package/tests/client/basic/basic.collections.test.ripple +7 -7
- package/tests/client/basic/basic.components.test.ripple +48 -10
- package/tests/client/basic/basic.errors.test.ripple +46 -31
- package/tests/client/basic/basic.events.test.ripple +11 -11
- package/tests/client/basic/basic.get-set.test.ripple +18 -18
- package/tests/client/basic/basic.reactivity.test.ripple +47 -42
- package/tests/client/basic/basic.rendering.test.ripple +7 -7
- package/tests/client/basic/basic.utilities.test.ripple +4 -4
- package/tests/client/boundaries.test.ripple +7 -7
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.ripple.snap +2 -2
- package/tests/client/compiler/compiler.assignments.test.ripple +21 -21
- package/tests/client/compiler/compiler.basic.test.ripple +223 -82
- package/tests/client/compiler/compiler.tracked-access.test.ripple +8 -9
- package/tests/client/composite/composite.dynamic-components.test.ripple +8 -8
- package/tests/client/composite/composite.generics.test.ripple +4 -4
- package/tests/client/composite/composite.props.test.ripple +9 -9
- package/tests/client/composite/composite.reactivity.test.ripple +32 -26
- package/tests/client/composite/composite.render.test.ripple +13 -4
- package/tests/client/computed-properties.test.ripple +3 -3
- package/tests/client/context.test.ripple +3 -3
- package/tests/client/css/global-additional-cases.test.ripple +4 -4
- package/tests/client/css/style-identifier.test.ripple +49 -41
- package/tests/client/date.test.ripple +40 -40
- package/tests/client/dynamic-elements.test.ripple +165 -30
- package/tests/client/events.test.ripple +25 -25
- package/tests/client/for.test.ripple +76 -8
- package/tests/client/function-overload.test.ripple +0 -1
- package/tests/client/head.test.ripple +7 -7
- package/tests/client/html.test.ripple +2 -2
- package/tests/client/input-value.test.ripple +174 -176
- package/tests/client/map.test.ripple +21 -21
- package/tests/client/media-query.test.ripple +4 -4
- package/tests/client/object.test.ripple +12 -12
- package/tests/client/portal.test.ripple +4 -4
- package/tests/client/ref.test.ripple +5 -5
- package/tests/client/return.test.ripple +17 -17
- package/tests/client/set.test.ripple +16 -16
- package/tests/client/svg.test.ripple +6 -7
- package/tests/client/switch.test.ripple +10 -10
- package/tests/client/tracked-expression.test.ripple +1 -3
- package/tests/client/try.test.ripple +33 -4
- package/tests/client/url/url.derived.test.ripple +10 -9
- package/tests/client/url/url.parsing.test.ripple +10 -10
- package/tests/client/url/url.partial-removal.test.ripple +10 -10
- package/tests/client/url/url.reactivity.test.ripple +17 -17
- package/tests/client/url/url.serialization.test.ripple +4 -4
- package/tests/client/url-search-params/url-search-params.derived.test.ripple +11 -10
- package/tests/client/url-search-params/url-search-params.initialization.test.ripple +5 -7
- package/tests/client/url-search-params/url-search-params.iteration.test.ripple +13 -13
- package/tests/client/url-search-params/url-search-params.mutation.test.ripple +19 -19
- package/tests/client/url-search-params/url-search-params.retrieval.test.ripple +17 -17
- package/tests/client/url-search-params/url-search-params.serialization.test.ripple +5 -5
- package/tests/client/url-search-params/url-search-params.tracked-url.test.ripple +5 -5
- package/tests/hydration/compiled/client/events.js +8 -11
- package/tests/hydration/compiled/client/for.js +20 -23
- package/tests/hydration/compiled/client/head.js +17 -19
- package/tests/hydration/compiled/client/hmr.js +1 -3
- package/tests/hydration/compiled/client/html.js +1 -15
- package/tests/hydration/compiled/client/if-children.js +7 -9
- package/tests/hydration/compiled/client/if.js +5 -7
- package/tests/hydration/compiled/client/mixed-control-flow.js +3 -5
- package/tests/hydration/compiled/client/portal.js +1 -1
- package/tests/hydration/compiled/client/reactivity.js +9 -11
- package/tests/hydration/compiled/client/return.js +11 -13
- package/tests/hydration/compiled/client/switch.js +4 -6
- package/tests/hydration/compiled/server/basic.js +0 -1
- package/tests/hydration/compiled/server/composite.js +0 -3
- package/tests/hydration/compiled/server/events.js +8 -12
- package/tests/hydration/compiled/server/for.js +20 -23
- package/tests/hydration/compiled/server/head.js +17 -19
- package/tests/hydration/compiled/server/hmr.js +1 -4
- package/tests/hydration/compiled/server/html.js +1 -35
- package/tests/hydration/compiled/server/if-children.js +7 -11
- package/tests/hydration/compiled/server/if.js +5 -7
- package/tests/hydration/compiled/server/mixed-control-flow.js +3 -5
- package/tests/hydration/compiled/server/portal.js +1 -9
- package/tests/hydration/compiled/server/reactivity.js +9 -11
- package/tests/hydration/compiled/server/return.js +11 -13
- package/tests/hydration/compiled/server/switch.js +4 -6
- package/tests/hydration/components/events.ripple +8 -9
- package/tests/hydration/components/for.ripple +20 -21
- package/tests/hydration/components/head.ripple +6 -8
- package/tests/hydration/components/hmr.ripple +1 -2
- package/tests/hydration/components/html.ripple +1 -3
- package/tests/hydration/components/if-children.ripple +7 -8
- package/tests/hydration/components/if.ripple +5 -6
- package/tests/hydration/components/mixed-control-flow.ripple +4 -6
- package/tests/hydration/components/portal.ripple +1 -1
- package/tests/hydration/components/reactivity.ripple +9 -10
- package/tests/hydration/components/return.ripple +11 -12
- package/tests/hydration/components/switch.ripple +6 -8
- package/tests/server/await.test.ripple +2 -2
- package/tests/server/basic.attributes.test.ripple +19 -21
- package/tests/server/basic.components.test.ripple +13 -7
- package/tests/server/basic.test.ripple +20 -21
- package/tests/server/compiler.test.ripple +5 -5
- package/tests/server/composite.props.test.ripple +6 -7
- package/tests/server/composite.test.ripple +4 -4
- package/tests/server/context.test.ripple +1 -3
- package/tests/server/dynamic-elements.test.ripple +24 -24
- package/tests/server/head.test.ripple +5 -7
- package/tests/server/style-identifier.test.ripple +16 -17
- package/types/index.d.ts +266 -62
- package/types/server.d.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# ripple
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#799](https://github.com/Ripple-TS/ripple/pull/799)
|
|
8
|
+
[`87c2078`](https://github.com/Ripple-TS/ripple/commit/87c20780f6f6f7339cf94b9a9d08e028533df0a2)
|
|
9
|
+
Thanks [@leonidaz](https://github.com/leonidaz)! - Fix imports for removed
|
|
10
|
+
functions
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`87c2078`](https://github.com/Ripple-TS/ripple/commit/87c20780f6f6f7339cf94b9a9d08e028533df0a2)]:
|
|
14
|
+
- ripple@0.3.1
|
|
15
|
+
|
|
16
|
+
## 0.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#779](https://github.com/Ripple-TS/ripple/pull/779)
|
|
21
|
+
[`74a10cc`](https://github.com/Ripple-TS/ripple/commit/74a10cc5701962cd7c72b144d59b35ecb76263a3)
|
|
22
|
+
Thanks [@leonidaz](https://github.com/leonidaz)! - Introduces #ripple namespace
|
|
23
|
+
for creating ripple reactive entities without imports, such as array, object,
|
|
24
|
+
map, set, date, url, urlSearchParams, mediaQuery. Adds track, untrack,
|
|
25
|
+
trackSplit, effect, context, server, style to the namespace. Deprecates #[] and
|
|
26
|
+
#{} in favor of #ripple[] and #ripple{}. Renames types and actual reactive
|
|
27
|
+
imports for TrackedX entities, such as TrackedArray, TrackedObject, etc. into
|
|
28
|
+
RippleArray, RippleObjec, etc.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- [#786](https://github.com/Ripple-TS/ripple/pull/786)
|
|
33
|
+
[`61271cb`](https://github.com/Ripple-TS/ripple/commit/61271cb1c4777f2ab9093c6c89a5ad771ec98b7d)
|
|
34
|
+
Thanks [@anubra266](https://github.com/anubra266)! - fix: preserve generic type
|
|
35
|
+
arguments in interface extends clauses for `compile_to_volar_mappings`
|
|
36
|
+
|
|
37
|
+
- [#772](https://github.com/Ripple-TS/ripple/pull/772)
|
|
38
|
+
[`21dd402`](https://github.com/Ripple-TS/ripple/commit/21dd4029d7e027a0706cb133b09530a722feb73d)
|
|
39
|
+
Thanks [@anubra266](https://github.com/anubra266)! - Fix ref handling for
|
|
40
|
+
dynamic elements with reactive spread props to avoid read-only/proxy symbol
|
|
41
|
+
errors and prevent unnecessary ref teardown/recreation.
|
|
42
|
+
|
|
43
|
+
- [#774](https://github.com/Ripple-TS/ripple/pull/774)
|
|
44
|
+
[`c2dbefe`](https://github.com/Ripple-TS/ripple/commit/c2dbefe5645c0c4f6e0ff4dc00d9c4de81616667)
|
|
45
|
+
Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fixes
|
|
46
|
+
language server type support for nested component call inside a parent
|
|
47
|
+
components that become props and should not be marked as unused by typescript
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
[[`61271cb`](https://github.com/Ripple-TS/ripple/commit/61271cb1c4777f2ab9093c6c89a5ad771ec98b7d),
|
|
50
|
+
[`21dd402`](https://github.com/Ripple-TS/ripple/commit/21dd4029d7e027a0706cb133b09530a722feb73d),
|
|
51
|
+
[`c2dbefe`](https://github.com/Ripple-TS/ripple/commit/c2dbefe5645c0c4f6e0ff4dc00d9c4de81616667),
|
|
52
|
+
[`74a10cc`](https://github.com/Ripple-TS/ripple/commit/74a10cc5701962cd7c72b144d59b35ecb76263a3)]:
|
|
53
|
+
- ripple@0.3.0
|
|
54
|
+
|
|
3
55
|
## 0.2.216
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|
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.
|
|
6
|
+
"version": "0.3.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/runtime/index-client.js",
|
|
9
9
|
"main": "src/runtime/index-client.js",
|
|
@@ -38,6 +38,15 @@
|
|
|
38
38
|
"require": "./src/compiler/index.js",
|
|
39
39
|
"default": "./src/compiler/index.js"
|
|
40
40
|
},
|
|
41
|
+
"./types/estree": {
|
|
42
|
+
"types": "./src/compiler/types/estree.d.ts"
|
|
43
|
+
},
|
|
44
|
+
"./types/estree-jsx": {
|
|
45
|
+
"types": "./src/compiler/types/estree-jsx.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./types/acorn": {
|
|
48
|
+
"types": "./src/compiler/types/acorn.d.ts"
|
|
49
|
+
},
|
|
41
50
|
"./compiler/internal/import": {
|
|
42
51
|
"types": "./src/compiler/types/import.d.ts"
|
|
43
52
|
},
|
|
@@ -78,24 +87,24 @@
|
|
|
78
87
|
"@sveltejs/acorn-typescript": "^1.0.9",
|
|
79
88
|
"acorn": "^8.15.0",
|
|
80
89
|
"clsx": "^2.1.1",
|
|
81
|
-
"devalue": "^5.3
|
|
90
|
+
"devalue": "^5.6.3",
|
|
82
91
|
"esm-env": "^1.2.2",
|
|
83
92
|
"esrap": "^2.1.0",
|
|
84
93
|
"is-reference": "^3.0.3",
|
|
85
94
|
"magic-string": "^0.30.18",
|
|
86
95
|
"muggle-string": "^0.4.1",
|
|
87
|
-
"zimmerframe": "^1.1.2"
|
|
96
|
+
"zimmerframe": "^1.1.2",
|
|
97
|
+
"@types/estree": "^1.0.8",
|
|
98
|
+
"@types/estree-jsx": "^1.0.5"
|
|
88
99
|
},
|
|
89
100
|
"devDependencies": {
|
|
90
|
-
"@types/estree": "^1.0.8",
|
|
91
|
-
"@types/estree-jsx": "^1.0.5",
|
|
92
101
|
"@types/node": "^24.3.0",
|
|
93
102
|
"@typescript-eslint/types": "^8.40.0",
|
|
94
|
-
"typescript": "^5.9.
|
|
103
|
+
"typescript": "^5.9.3",
|
|
95
104
|
"@volar/language-core": "~2.4.28",
|
|
96
105
|
"vscode-languageserver-types": "^3.17.5"
|
|
97
106
|
},
|
|
98
107
|
"peerDependencies": {
|
|
99
|
-
"ripple": "0.
|
|
108
|
+
"ripple": "0.3.1"
|
|
100
109
|
}
|
|
101
110
|
}
|
package/src/compiler/errors.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const IDENTIFIER_OBFUSCATION_PREFIX = '_$_';
|
|
2
|
+
export const RIPPLE_NAMESPACE_IDENTIFIER =
|
|
3
|
+
IDENTIFIER_OBFUSCATION_PREFIX + encode_utf16_char('#') + 'ripple';
|
|
2
4
|
export const STYLE_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + encode_utf16_char('#') + 'style';
|
|
3
5
|
export const SERVER_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + encode_utf16_char('#') + 'server';
|
|
4
6
|
export const CSS_HASH_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + 'hash';
|
package/src/compiler/index.d.ts
CHANGED
|
@@ -58,7 +58,6 @@ export interface PluginActionOverrides {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export interface CustomMappingData extends PluginActionOverrides {
|
|
61
|
-
generatedLengths: number[];
|
|
62
61
|
embeddedId?: string; // e.g. css regions: 'style_0', 'style_1', etc.
|
|
63
62
|
content?: string; // (e.g., css code)
|
|
64
63
|
}
|
|
@@ -67,12 +66,9 @@ export interface MappingData extends VolarCodeInformation {
|
|
|
67
66
|
customData: CustomMappingData;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
export interface CodeMapping extends VolarMapping<MappingData> {
|
|
71
|
-
data: MappingData;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface CodeMappingWithAll extends CodeMapping {
|
|
69
|
+
export interface CodeMapping extends Omit<VolarMapping<MappingData>, 'generatedLengths'> {
|
|
75
70
|
generatedLengths: number[];
|
|
71
|
+
data: MappingData;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
export interface VolarMappingsResult {
|