@lynx-js/react-canary 0.112.3-canary-20250813-e1152fc7 → 0.112.3-canary-20250813-fcec513a
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
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# @lynx-js/react
|
|
2
2
|
|
|
3
|
-
## 0.112.3-canary-
|
|
3
|
+
## 0.112.3-canary-20250813131057-fcec513a7edf1ed585207b4a07b5b2dd2414844b
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- fix css transform error in testing library ([#1500](https://github.com/lynx-family/lynx-stack/pull/1500))
|
|
8
8
|
|
|
9
|
+
- fix the type error of `wrapper` option in testing library's `render` and `renderHook` function ([#1502](https://github.com/lynx-family/lynx-stack/pull/1502))
|
|
10
|
+
|
|
9
11
|
- Introduce recursive hydration for lists to prevent double remove/insert on moves. ([#1401](https://github.com/lynx-family/lynx-stack/pull/1401))
|
|
10
12
|
|
|
11
13
|
- Handle `<frame/>` correctly. ([#1497](https://github.com/lynx-family/lynx-stack/pull/1497))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-canary",
|
|
3
|
-
"version": "0.112.3-canary-20250813-
|
|
3
|
+
"version": "0.112.3-canary-20250813-fcec513a",
|
|
4
4
|
"description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { act } from 'preact/test-utils';
|
|
2
2
|
import { ARIARole } from 'aria-query';
|
|
3
|
-
import { ComponentChild } from 'preact';
|
|
4
|
-
import { ComponentType } from 'preact';
|
|
5
3
|
import { JSDOM } from 'jsdom';
|
|
6
4
|
import { OptionsReceived } from 'pretty-format';
|
|
7
5
|
import * as prettyFormat from 'pretty-format';
|
|
@@ -1235,7 +1233,7 @@ export declare interface QueryOptions {
|
|
|
1235
1233
|
* @public
|
|
1236
1234
|
*/
|
|
1237
1235
|
export declare function render<Q extends Queries>(
|
|
1238
|
-
ui:
|
|
1236
|
+
ui: React.ReactNode,
|
|
1239
1237
|
options?: RenderOptions<Q>,
|
|
1240
1238
|
): RenderResult<Q>;
|
|
1241
1239
|
|
|
@@ -1314,7 +1312,7 @@ export declare interface RenderHookOptions<Props> {
|
|
|
1314
1312
|
* export { customRender as renderHook }
|
|
1315
1313
|
* ```
|
|
1316
1314
|
*/
|
|
1317
|
-
wrapper?:
|
|
1315
|
+
wrapper?: React.JSXElementConstructor<{ children: React.ReactNode }> | undefined;
|
|
1318
1316
|
}
|
|
1319
1317
|
|
|
1320
1318
|
/**
|
|
@@ -1400,7 +1398,7 @@ export declare interface RenderOptions<Q extends Queries = typeof queries> {
|
|
|
1400
1398
|
* export { customRender as render }
|
|
1401
1399
|
* ```
|
|
1402
1400
|
*/
|
|
1403
|
-
wrapper?:
|
|
1401
|
+
wrapper?: React.JSXElementConstructor<{ children: React.ReactNode }> | undefined;
|
|
1404
1402
|
/**
|
|
1405
1403
|
* Render your component in the main thread or not.
|
|
1406
1404
|
*
|
|
@@ -1426,7 +1424,7 @@ export declare interface RenderOptions<Q extends Queries = typeof queries> {
|
|
|
1426
1424
|
*/
|
|
1427
1425
|
export declare type RenderResult<Q extends Queries = typeof queries> = {
|
|
1428
1426
|
container: LynxElement;
|
|
1429
|
-
rerender: (ui:
|
|
1427
|
+
rerender: (ui: React.ReactNode) => void;
|
|
1430
1428
|
unmount: () => boolean;
|
|
1431
1429
|
} & { [P in keyof Q]: BoundFunction<Q[P]> };
|
|
1432
1430
|
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
import { queries, Queries, BoundFunction } from '@testing-library/dom';
|
|
11
11
|
import { LynxElement, type ElementTree, type LynxTestingEnv } from '@lynx-js/testing-environment';
|
|
12
|
-
import { ComponentChild, ComponentType } from 'preact';
|
|
13
12
|
import { act } from 'preact/test-utils';
|
|
14
13
|
export * from '@testing-library/dom';
|
|
15
14
|
export { ElementTree, LynxTestingEnv, act };
|
|
@@ -69,7 +68,7 @@ export interface RenderOptions<Q extends Queries = typeof queries> {
|
|
|
69
68
|
* export { customRender as render }
|
|
70
69
|
* ```
|
|
71
70
|
*/
|
|
72
|
-
wrapper?:
|
|
71
|
+
wrapper?: React.JSXElementConstructor<{ children: React.ReactNode }> | undefined;
|
|
73
72
|
/**
|
|
74
73
|
* Render your component in the main thread or not.
|
|
75
74
|
*
|
|
@@ -95,7 +94,7 @@ export interface RenderOptions<Q extends Queries = typeof queries> {
|
|
|
95
94
|
*/
|
|
96
95
|
export type RenderResult<Q extends Queries = typeof queries> = {
|
|
97
96
|
container: LynxElement;
|
|
98
|
-
rerender: (ui:
|
|
97
|
+
rerender: (ui: React.ReactNode) => void;
|
|
99
98
|
unmount: () => boolean;
|
|
100
99
|
} & { [P in keyof Q]: BoundFunction<Q[P]> };
|
|
101
100
|
|
|
@@ -132,7 +131,7 @@ export type RenderResult<Q extends Queries = typeof queries> = {
|
|
|
132
131
|
* @public
|
|
133
132
|
*/
|
|
134
133
|
export function render<Q extends Queries>(
|
|
135
|
-
ui:
|
|
134
|
+
ui: React.ReactNode,
|
|
136
135
|
options?: RenderOptions<Q>,
|
|
137
136
|
): RenderResult<Q>;
|
|
138
137
|
/**
|
|
@@ -213,7 +212,7 @@ export interface RenderHookOptions<Props> {
|
|
|
213
212
|
* export { customRender as renderHook }
|
|
214
213
|
* ```
|
|
215
214
|
*/
|
|
216
|
-
wrapper?:
|
|
215
|
+
wrapper?: React.JSXElementConstructor<{ children: React.ReactNode }> | undefined;
|
|
217
216
|
}
|
|
218
217
|
|
|
219
218
|
/**
|