@lynx-js/react 0.110.1 → 0.111.0
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 +44 -0
- package/components/lib/DeferredListItem.d.ts +7 -0
- package/components/lib/DeferredListItem.jsx +40 -0
- package/components/lib/DeferredListItem.jsx.map +1 -0
- package/components/lib/index.d.ts +1 -0
- package/components/lib/index.js +1 -0
- package/components/lib/index.js.map +1 -1
- package/components/src/DeferredListItem.tsx +56 -0
- package/components/src/index.ts +1 -0
- package/package.json +1 -1
- package/refresh/.turbo/turbo-build.log +1 -1
- package/runtime/lazy/react-lepus.js +1 -0
- package/runtime/lazy/react.js +1 -0
- package/runtime/lepus/index.d.ts +1 -1
- package/runtime/lepus/index.js +44 -0
- package/runtime/lib/backgroundSnapshot.d.ts +2 -1
- package/runtime/lib/backgroundSnapshot.js +62 -40
- package/runtime/lib/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/compat/initData.js +10 -0
- package/runtime/lib/compat/initData.js.map +1 -1
- package/runtime/lib/index.d.ts +2 -2
- package/runtime/lib/index.js +2 -2
- package/runtime/lib/index.js.map +1 -1
- package/runtime/lib/lifecycle/patch/commit.js +5 -5
- package/runtime/lib/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/lifecycle/patch/snapshotPatch.d.ts +9 -9
- package/runtime/lib/lifecycle/patch/snapshotPatch.js +9 -10
- package/runtime/lib/lifecycle/patch/snapshotPatch.js.map +1 -1
- package/runtime/lib/lifecycle/patch/updateMainThread.js +7 -8
- package/runtime/lib/lifecycle/patch/updateMainThread.js.map +1 -1
- package/runtime/lib/lifecycleConstant.d.ts +2 -1
- package/runtime/lib/lifecycleConstant.js +1 -0
- package/runtime/lib/lifecycleConstant.js.map +1 -1
- package/runtime/lib/list.js +102 -12
- package/runtime/lib/list.js.map +1 -1
- package/runtime/lib/lynx/calledByNative.js +6 -9
- package/runtime/lib/lynx/calledByNative.js.map +1 -1
- package/runtime/lib/lynx/component.js +11 -14
- package/runtime/lib/lynx/component.js.map +1 -1
- package/runtime/lib/lynx/env.js +1 -2
- package/runtime/lib/lynx/env.js.map +1 -1
- package/runtime/lib/lynx/lazy-bundle.js +48 -21
- package/runtime/lib/lynx/lazy-bundle.js.map +1 -1
- package/runtime/lib/lynx/performance.d.ts +3 -19
- package/runtime/lib/lynx/performance.js +25 -26
- package/runtime/lib/lynx/performance.js.map +1 -1
- package/runtime/lib/lynx/tt.js +10 -5
- package/runtime/lib/lynx/tt.js.map +1 -1
- package/runtime/lib/lynx-api.d.ts +78 -1
- package/runtime/lib/lynx-api.js.map +1 -1
- package/runtime/lib/snapshot.d.ts +2 -0
- package/runtime/lib/snapshot.js +19 -5
- package/runtime/lib/snapshot.js.map +1 -1
- package/runtime/lib/utils.d.ts +1 -0
- package/runtime/lib/utils.js +6 -0
- package/runtime/lib/utils.js.map +1 -1
- package/runtime/src/backgroundSnapshot.ts +74 -55
- package/runtime/src/compat/initData.ts +10 -0
- package/runtime/src/index.ts +2 -0
- package/runtime/src/lifecycle/patch/commit.ts +5 -11
- package/runtime/src/lifecycle/patch/snapshotPatch.ts +9 -9
- package/runtime/src/lifecycle/patch/updateMainThread.ts +7 -8
- package/runtime/src/lifecycleConstant.ts +1 -0
- package/runtime/src/list.ts +118 -15
- package/runtime/src/lynx/calledByNative.ts +6 -8
- package/runtime/src/lynx/component.ts +17 -29
- package/runtime/src/lynx/env.ts +1 -2
- package/runtime/src/lynx/lazy-bundle.ts +55 -20
- package/runtime/src/lynx/performance.ts +26 -27
- package/runtime/src/lynx/tt.ts +10 -11
- package/runtime/src/lynx-api.ts +77 -1
- package/runtime/src/snapshot.ts +20 -5
- package/runtime/src/utils.ts +9 -0
- package/testing-library/dist/index.d.ts +4 -1
- package/testing-library/dist/pure.js +1 -1
- package/testing-library/dist/vitest.config.js +38 -1
- package/testing-library/types/entry.d.ts +3 -2
- package/transform/dist/wasm.cjs +1 -1
- package/types/react.d.ts +21 -1
- package/types/react.docs.d.ts +1 -1
package/types/react.d.ts
CHANGED
|
@@ -142,7 +142,27 @@ declare module '@lynx-js/types' {
|
|
|
142
142
|
* we can use typeof item as the reuse-identifier.
|
|
143
143
|
* By default, the developer does not provide a reuse-identifier, which is determined by the framework at the compile stage.
|
|
144
144
|
*/
|
|
145
|
-
'reuse-identifier'?: Key;
|
|
145
|
+
'reuse-identifier'?: Key | null | undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Makes the `<list-item />` deferred, meaning it will not be eagerly rendered
|
|
149
|
+
* on the main thread like a non-deferred `<list-item />`.
|
|
150
|
+
* Instead, it will be rendered on the background thread when necessary.
|
|
151
|
+
*
|
|
152
|
+
* As a result, rendering becomes asynchronous,
|
|
153
|
+
* which means that during extremely fast scrolling, some `<list-item />`s may not have been rendered yet—these will usually appear blank.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
*
|
|
157
|
+
* Render a `<list-item />` containing a heavyweight component on the background thread.
|
|
158
|
+
*
|
|
159
|
+
* ```tsx
|
|
160
|
+
* <list-item defer item-key="heavy-item">
|
|
161
|
+
* <HeavyComponent />
|
|
162
|
+
* </list-item>
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
'defer'?: boolean | undefined;
|
|
146
166
|
}
|
|
147
167
|
|
|
148
168
|
export interface FrameworkRenderingTimings {
|
package/types/react.docs.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export { Fragment, Suspense } from 'react';
|
|
|
66
66
|
* Legacy React APIs
|
|
67
67
|
* @see https://react.dev/reference/react/legacy
|
|
68
68
|
*/
|
|
69
|
-
export { Component, PureComponent, createElement, createRef, isValidElement } from 'react';
|
|
69
|
+
export { Component, PureComponent, cloneElement, createElement, createRef, isValidElement } from 'react';
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* RL-defined Lynx APIs
|