@ripple-ts/compat-react 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 +31 -0
- package/package.json +3 -3
- package/tests/index.test.ripple +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @ripple-ts/compat-react
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
[[`87c2078`](https://github.com/Ripple-TS/ripple/commit/87c20780f6f6f7339cf94b9a9d08e028533df0a2)]:
|
|
9
|
+
- ripple@0.3.1
|
|
10
|
+
|
|
11
|
+
## 0.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#779](https://github.com/Ripple-TS/ripple/pull/779)
|
|
16
|
+
[`74a10cc`](https://github.com/Ripple-TS/ripple/commit/74a10cc5701962cd7c72b144d59b35ecb76263a3)
|
|
17
|
+
Thanks [@leonidaz](https://github.com/leonidaz)! - Introduces #ripple namespace
|
|
18
|
+
for creating ripple reactive entities without imports, such as array, object,
|
|
19
|
+
map, set, date, url, urlSearchParams, mediaQuery. Adds track, untrack,
|
|
20
|
+
trackSplit, effect, context, server, style to the namespace. Deprecates #[] and
|
|
21
|
+
#{} in favor of #ripple[] and #ripple{}. Renames types and actual reactive
|
|
22
|
+
imports for TrackedX entities, such as TrackedArray, TrackedObject, etc. into
|
|
23
|
+
RippleArray, RippleObjec, etc.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
[[`61271cb`](https://github.com/Ripple-TS/ripple/commit/61271cb1c4777f2ab9093c6c89a5ad771ec98b7d),
|
|
29
|
+
[`21dd402`](https://github.com/Ripple-TS/ripple/commit/21dd4029d7e027a0706cb133b09530a722feb73d),
|
|
30
|
+
[`c2dbefe`](https://github.com/Ripple-TS/ripple/commit/c2dbefe5645c0c4f6e0ff4dc00d9c4de81616667),
|
|
31
|
+
[`74a10cc`](https://github.com/Ripple-TS/ripple/commit/74a10cc5701962cd7c72b144d59b35ecb76263a3)]:
|
|
32
|
+
- ripple@0.3.0
|
|
33
|
+
|
|
3
34
|
## 0.2.216
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripple-ts/compat-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Ripple compatibility layer for React",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Dominic Gannaway",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"react": "^19.2.0",
|
|
19
19
|
"react-dom": "^19.2.0",
|
|
20
|
-
"ripple": "0.
|
|
20
|
+
"ripple": "0.3.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^24.3.0",
|
|
24
24
|
"@types/react": "^19.2.2",
|
|
25
25
|
"@types/react-dom": "^19.2.2",
|
|
26
|
-
"typescript": "^5.9.
|
|
26
|
+
"typescript": "^5.9.3"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
package/tests/index.test.ripple
CHANGED
|
@@ -230,7 +230,7 @@ describe('compat-react', () => {
|
|
|
230
230
|
|
|
231
231
|
it('should work with Ripple reactivity', async () => {
|
|
232
232
|
component App() {
|
|
233
|
-
let count = track(0);
|
|
233
|
+
let count = #ripple.track(0);
|
|
234
234
|
<div>
|
|
235
235
|
<div class="ripple-count">{@count}</div>
|
|
236
236
|
<button onClick={() => @count++}>{'Increment'}</button>
|
|
@@ -321,7 +321,7 @@ describe('compat-react', () => {
|
|
|
321
321
|
</tsx:react>
|
|
322
322
|
</div>
|
|
323
323
|
} catch (e) {
|
|
324
|
-
<div class="error">{'
|
|
324
|
+
<div class="error">{'ReactChild had an error'}</div>
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
|
|
@@ -331,7 +331,7 @@ describe('compat-react', () => {
|
|
|
331
331
|
|
|
332
332
|
const reactContent = container.querySelector('div > div');
|
|
333
333
|
expect(reactContent).toBeTruthy();
|
|
334
|
-
expect(reactContent.textContent).toBe('
|
|
334
|
+
expect(reactContent.textContent).toBe('ReactChild had an error');
|
|
335
335
|
});
|
|
336
336
|
|
|
337
337
|
it('should handle React errors #2', async () => {
|
|
@@ -353,7 +353,7 @@ describe('compat-react', () => {
|
|
|
353
353
|
</tsx:react>
|
|
354
354
|
</div>
|
|
355
355
|
} catch (e) {
|
|
356
|
-
<div class="error">{'
|
|
356
|
+
<div class="error">{'ReactChild had an error'}</div>
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
|
|
@@ -363,7 +363,7 @@ describe('compat-react', () => {
|
|
|
363
363
|
|
|
364
364
|
const reactContent = container.querySelector('div > div');
|
|
365
365
|
expect(reactContent).toBeTruthy();
|
|
366
|
-
expect(reactContent.textContent).toBe('
|
|
366
|
+
expect(reactContent.textContent).toBe('ReactChild had an error');
|
|
367
367
|
});
|
|
368
368
|
|
|
369
369
|
it('Should handle React context', async () => {
|
|
@@ -464,7 +464,7 @@ describe('compat-react', () => {
|
|
|
464
464
|
component AsyncRippleChild() {
|
|
465
465
|
await sleep(1000);
|
|
466
466
|
|
|
467
|
-
let count = track(0);
|
|
467
|
+
let count = #ripple.track(0);
|
|
468
468
|
|
|
469
469
|
<div>
|
|
470
470
|
<div class="async-content">{'Loaded!'}</div>
|
|
@@ -549,7 +549,7 @@ describe('compat-react', () => {
|
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
component App() {
|
|
552
|
-
let page = track(1);
|
|
552
|
+
let page = #ripple.track(1);
|
|
553
553
|
setPage = (p: number) => {
|
|
554
554
|
@page = p;
|
|
555
555
|
};
|
|
@@ -629,7 +629,7 @@ describe('compat-react', () => {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
component App() {
|
|
632
|
-
let page = track(1);
|
|
632
|
+
let page = #ripple.track(1);
|
|
633
633
|
setPage = (p: number) => {
|
|
634
634
|
@page = p;
|
|
635
635
|
};
|