@lynx-js/react 0.124.0 → 0.126.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 +59 -0
- package/components/lib/Page.js +4 -2
- package/components/lib/Page.js.map +1 -1
- package/components/src/Page.ts +4 -2
- package/package.json +2 -2
- package/runtime/compat/index.d.ts +48 -1
- package/runtime/compat/index.js +7 -3
- package/runtime/jsx-dev-runtime/index.d.ts +39 -1
- package/runtime/jsx-runtime/index.d.ts +39 -1
- package/runtime/lazy/compat.js +2 -0
- package/runtime/lazy/internal.js +2 -1
- package/runtime/lepus/index.js +2 -2
- package/runtime/lepus/jsx-runtime/index.js +20 -8
- package/runtime/lib/core/component.js +3 -3
- package/runtime/lib/core/component.js.map +1 -1
- package/runtime/lib/core/forceRootRender.js +3 -2
- package/runtime/lib/core/forceRootRender.js.map +1 -1
- package/runtime/lib/core/globalProps.js +1 -1
- package/runtime/lib/core/globalProps.js.map +1 -1
- package/runtime/lib/core/hooks/mainThreadImpl.js +2 -0
- package/runtime/lib/core/hooks/mainThreadImpl.js.map +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js.map +1 -1
- package/runtime/lib/core/lynx/lazy-bundle.js +1 -1
- package/runtime/lib/core/lynx/lazy-bundle.js.map +1 -1
- package/runtime/lib/core/main-thread-function.d.ts +2 -0
- package/runtime/lib/core/main-thread-function.js +10 -0
- package/runtime/lib/core/main-thread-function.js.map +1 -0
- package/runtime/lib/core/main-thread-ref-init-value.d.ts +1 -0
- package/runtime/lib/core/main-thread-ref-init-value.js +23 -0
- package/runtime/lib/core/main-thread-ref-init-value.js.map +1 -0
- package/runtime/lib/{snapshot/worklet/ref/workletRef.d.ts → core/main-thread-ref.d.ts} +6 -7
- package/runtime/lib/{snapshot/worklet/ref/workletRef.js → core/main-thread-ref.js} +31 -36
- package/runtime/lib/core/main-thread-ref.js.map +1 -0
- package/runtime/lib/core/mts-capability.d.ts +1 -0
- package/runtime/lib/core/mts-capability.js +18 -0
- package/runtime/lib/core/mts-capability.js.map +1 -0
- package/runtime/lib/core/thread-function-call/main-thread.js +4 -11
- package/runtime/lib/core/thread-function-call/main-thread.js.map +1 -1
- package/runtime/lib/element-template/background/attr-slots.d.ts +5 -1
- package/runtime/lib/element-template/background/attr-slots.js +15 -4
- package/runtime/lib/element-template/background/attr-slots.js.map +1 -1
- package/runtime/lib/element-template/background/commit-hook.d.ts +9 -0
- package/runtime/lib/element-template/background/commit-hook.js +83 -51
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/destroy.js +4 -1
- package/runtime/lib/element-template/background/destroy.js.map +1 -1
- package/runtime/lib/element-template/background/hydrate.js +21 -25
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js +22 -14
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.d.ts +14 -1
- package/runtime/lib/element-template/background/instance.js +117 -52
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/background/manager.d.ts +1 -0
- package/runtime/lib/element-template/background/manager.js +8 -2
- package/runtime/lib/element-template/background/manager.js.map +1 -1
- package/runtime/lib/element-template/background/page-root-hydrate.d.ts +3 -0
- package/runtime/lib/element-template/background/page-root-hydrate.js +14 -0
- package/runtime/lib/element-template/background/page-root-hydrate.js.map +1 -0
- package/runtime/lib/element-template/debug/alog.d.ts +6 -0
- package/runtime/lib/element-template/debug/alog.js +14 -1
- package/runtime/lib/element-template/debug/alog.js.map +1 -1
- package/runtime/lib/element-template/debug/profile.js +2 -2
- package/runtime/lib/element-template/debug/profile.js.map +1 -1
- package/runtime/lib/element-template/index.d.ts +1 -0
- package/runtime/lib/element-template/index.js +1 -0
- package/runtime/lib/element-template/index.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +2 -1
- package/runtime/lib/element-template/internal.js +2 -2
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/jsx-runtime/index.d.ts +3 -1
- package/runtime/lib/element-template/jsx-runtime/index.js +2 -4
- package/runtime/lib/element-template/jsx-runtime/index.js.map +1 -1
- package/runtime/lib/element-template/lynx/env.js +1 -2
- package/runtime/lib/element-template/lynx/env.js.map +1 -1
- package/runtime/lib/element-template/native/callDestroyLifetimeFun.js +2 -0
- package/runtime/lib/element-template/native/callDestroyLifetimeFun.js.map +1 -1
- package/runtime/lib/element-template/native/index.js +8 -8
- package/runtime/lib/element-template/native/index.js.map +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js +1 -2
- package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js +14 -5
- package/runtime/lib/element-template/native/patch-listener.js.map +1 -1
- package/runtime/lib/element-template/native/reload-background.js +2 -2
- package/runtime/lib/element-template/native/reload-background.js.map +1 -1
- package/runtime/lib/element-template/native/reload-main-thread.js +28 -3
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/spread.js +1 -4
- package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
- package/runtime/lib/element-template/protocol/opcodes.d.ts +2 -0
- package/runtime/lib/element-template/protocol/opcodes.js +2 -0
- package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
- package/runtime/lib/element-template/protocol/page.d.ts +3 -0
- package/runtime/lib/element-template/protocol/page.js +7 -0
- package/runtime/lib/element-template/protocol/page.js.map +1 -0
- package/runtime/lib/element-template/protocol/types.d.ts +24 -3
- package/runtime/lib/element-template/protocol/types.js +1 -0
- package/runtime/lib/element-template/protocol/types.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/authored-page.d.ts +8 -0
- package/runtime/lib/element-template/runtime/page/authored-page.js +30 -0
- package/runtime/lib/element-template/runtime/page/authored-page.js.map +1 -0
- package/runtime/lib/element-template/runtime/page/page.d.ts +0 -2
- package/runtime/lib/element-template/runtime/page/page.js +2 -10
- package/runtime/lib/element-template/runtime/page/page.js.map +1 -1
- package/runtime/lib/element-template/runtime/patch.js +53 -18
- package/runtime/lib/element-template/runtime/patch.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.d.ts +1 -3
- package/runtime/lib/element-template/runtime/render/render-main-thread.js +12 -25
- package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-opcodes.d.ts +4 -0
- package/runtime/lib/element-template/runtime/render/render-opcodes.js +62 -20
- package/runtime/lib/element-template/runtime/render/render-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.d.ts +2 -0
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js +23 -10
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.d.ts +4 -0
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js +46 -2
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/handle.d.ts +2 -0
- package/runtime/lib/element-template/runtime/template/handle.js +11 -3
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.d.ts +3 -3
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.js +2 -2
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.d.ts +16 -7
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.js +134 -56
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.d.ts +0 -1
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.js +4 -9
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.d.ts +13 -0
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.js +62 -0
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.js.map +1 -0
- package/runtime/lib/element-template/runtime/template/registry.js +2 -1
- package/runtime/lib/element-template/runtime/template/registry.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/typed-attributes.d.ts +5 -0
- package/runtime/lib/element-template/runtime/template/typed-attributes.js +13 -0
- package/runtime/lib/element-template/runtime/template/typed-attributes.js.map +1 -0
- package/runtime/lib/internal.d.ts +1 -1
- package/runtime/lib/internal.js +1 -1
- package/runtime/lib/internal.js.map +1 -1
- package/runtime/lib/lynx-api.d.ts +1 -1
- package/runtime/lib/lynx-api.js +1 -1
- package/runtime/lib/lynx-api.js.map +1 -1
- package/runtime/lib/shared/attribute-name.js +1 -2
- package/runtime/lib/shared/attribute-name.js.map +1 -1
- package/runtime/lib/shared/component-stack.js +2 -1
- package/runtime/lib/shared/component-stack.js.map +1 -1
- package/runtime/lib/shared/render-constants.d.ts +3 -2
- package/runtime/lib/shared/render-constants.js +5 -2
- package/runtime/lib/shared/render-constants.js.map +1 -1
- package/runtime/lib/snapshot/alog/render.js +1 -0
- package/runtime/lib/snapshot/alog/render.js.map +1 -1
- package/runtime/lib/snapshot/debug/profileHooks.js +2 -2
- package/runtime/lib/snapshot/debug/profileHooks.js.map +1 -1
- package/runtime/lib/snapshot/debug/vnodeSource.js +1 -0
- package/runtime/lib/snapshot/debug/vnodeSource.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/destroy.js +5 -2
- package/runtime/lib/snapshot/lifecycle/destroy.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.d.ts +10 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.js +31 -2
- package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/snapshot/lynx/children.js +1 -2
- package/runtime/lib/snapshot/lynx/children.js.map +1 -1
- package/runtime/lib/snapshot/lynx/env.js +1 -1
- package/runtime/lib/snapshot/lynx/env.js.map +1 -1
- package/runtime/lib/snapshot/lynx/suspense.js +1 -1
- package/runtime/lib/snapshot/lynx/suspense.js.map +1 -1
- package/runtime/lib/snapshot/lynx/tt.js +5 -5
- package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
- package/runtime/lib/snapshot/renderToOpcodes/index.js +8 -11
- package/runtime/lib/snapshot/renderToOpcodes/index.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.d.ts +1 -0
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +5 -0
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/platformInfo.js +1 -3
- package/runtime/lib/snapshot/snapshot/platformInfo.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshot.d.ts +1 -0
- package/runtime/lib/snapshot/snapshot/snapshot.js +8 -0
- package/runtime/lib/snapshot/snapshot/snapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/spread.js +2 -8
- package/runtime/lib/snapshot/snapshot/spread.js.map +1 -1
- package/runtime/lib/snapshot/worklet/destroy.js +2 -2
- package/runtime/lib/snapshot/worklet/destroy.js.map +1 -1
- package/runtime/lib/snapshot/worklet/functionality.d.ts +1 -0
- package/runtime/lib/snapshot/worklet/functionality.js +2 -8
- package/runtime/lib/snapshot/worklet/functionality.js.map +1 -1
- package/runtime/lib/snapshot/worklet/ref/updateInitValue.js +2 -2
- package/runtime/lib/snapshot/worklet/ref/updateInitValue.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/lib/utils.d.ts +9 -0
- package/runtime/lib/utils.js +27 -0
- package/runtime/lib/utils.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.d.ts +5 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.js +7 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js +2 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js.map +1 -1
- package/runtime/worklet-runtime/dev.js +1 -1
- package/testing-library/dist/env/index.js +1 -2
- package/testing-library/dist/setupFiles/common/runtime-setup.js +3 -3
- package/transform/dist/wasm.cjs +5 -5
- package/runtime/lib/snapshot/worklet/ref/workletRef.js.map +0 -1
- package/runtime/lib/snapshot/worklet/ref/workletRefPool.d.ts +0 -1
- package/runtime/lib/snapshot/worklet/ref/workletRefPool.js +0 -23
- package/runtime/lib/snapshot/worklet/ref/workletRefPool.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @lynx-js/react
|
|
2
2
|
|
|
3
|
+
## 0.126.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Export `useInsertionEffect` from `@lynx-js/react/compat`, currently an alias of `useEffect`. ([#3784](https://github.com/lynx-family/lynx-stack/pull/3784))
|
|
8
|
+
|
|
9
|
+
- Export `use` from `@lynx-js/react/compat`. ([#3672](https://github.com/lynx-family/lynx-stack/pull/3672))
|
|
10
|
+
|
|
11
|
+
- Upgrade the bundled Preact fork to Preact 11 (`@lynx-js/internal-preact` ([#3450](https://github.com/lynx-family/lynx-stack/pull/3450))
|
|
12
|
+
based on `11.0.0-rc.1`).
|
|
13
|
+
|
|
14
|
+
**Breaking:** `useEffect` cleanups of unmounted components no longer run
|
|
15
|
+
synchronously during unmount. They run in the after-paint flush instead,
|
|
16
|
+
matching React. This applies to `useLayoutEffect` too, which ReactLynx
|
|
17
|
+
exports as an alias of `useEffect`. Page destroy is unaffected — it drains
|
|
18
|
+
them synchronously, so cleanups that release native resources still run
|
|
19
|
+
before the runtime goes away. Code that assumed a cleanup had already run
|
|
20
|
+
right after a re-render removed the component needs to await a flush;
|
|
21
|
+
ReactLynx does not currently export a hook whose cleanup stays inside the
|
|
22
|
+
unmount commit.
|
|
23
|
+
|
|
24
|
+
Other runtime-visible changes:
|
|
25
|
+
|
|
26
|
+
- Context consumers no longer double-render on provider updates
|
|
27
|
+
(preactjs/preact#4724), so fewer `rLynxChange` flushes are emitted and
|
|
28
|
+
patches merge into the first flush.
|
|
29
|
+
- List reorders use Preact 11's longest-increasing-subsequence diff, which
|
|
30
|
+
may pick an equivalent-but-different minimal set of moves.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Reach lynx-core's app object through `lynx.getApp()` instead of the ([#3553](https://github.com/lynx-family/lynx-stack/pull/3553))
|
|
35
|
+
`lynxCoreInject` global the AMD wrapper injects. It is the same instance, so
|
|
36
|
+
behavior is unchanged, and resolving it through `lynx` also stays correct once
|
|
37
|
+
several cards share a runtime chunk. `@lynx-js/testing-environment` now exposes
|
|
38
|
+
`lynx.getApp()` alongside the object it already provided.
|
|
39
|
+
- Move runtime attribute-name configuration to the page-scoped `lynx` object and ([#3718](https://github.com/lynx-family/lynx-stack/pull/3718))
|
|
40
|
+
inject it from the host compilation through a standalone webpack plugin. Lazy
|
|
41
|
+
and external bundles reuse the host-injected configuration without applying
|
|
42
|
+
the plugin themselves. The runtime-config webpack plugin is published through
|
|
43
|
+
its own DSL-neutral package entry and accepts arbitrary runtime configuration
|
|
44
|
+
keys without depending on ReactLynx. The merged top-level configuration is
|
|
45
|
+
shallow-frozen to prevent accidental mutation after host initialization.
|
|
46
|
+
- Keep `ref` in props for function components on the main thread, matching the background thread. ([#3688](https://github.com/lynx-family/lynx-stack/pull/3688))
|
|
47
|
+
|
|
48
|
+
- Update `swc_core` to 77 in the transform. ([#3793](https://github.com/lynx-family/lynx-stack/pull/3793))
|
|
49
|
+
|
|
50
|
+
## 0.125.0
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- Add the `<background-only>` element, which renders its `fallback` on the main thread first screen and its children on the background thread. ([#3551](https://github.com/lynx-family/lynx-stack/pull/3551))
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Tag main-thread vnodes with `$$typeof: Symbol.for('react.element')` so `isValidElement` recognizes them, matching the background thread. ([#3514](https://github.com/lynx-family/lynx-stack/pull/3514))
|
|
59
|
+
|
|
60
|
+
- Release worklet refs when list items are logically removed while preserving native element recycling. ([#3590](https://github.com/lynx-family/lynx-stack/pull/3590))
|
|
61
|
+
|
|
3
62
|
## 0.124.0
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|
package/components/lib/Page.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { useLayoutEffect } from 'preact/hooks';
|
|
4
5
|
// We use "@lynx-js/react" here
|
|
5
6
|
// because import * as ReactLynx from "@lynx-js/react/internal"; will be added when transform
|
|
6
7
|
// no matter if we use "@lynx-js/react" here
|
|
7
|
-
import { forwardRef,
|
|
8
|
+
import { forwardRef, useRef } from '@lynx-js/react';
|
|
8
9
|
import { __root, snapshotManager, updateSpread } from '@lynx-js/react/internal';
|
|
9
10
|
let pageMounted = false;
|
|
10
11
|
const Page =
|
|
@@ -27,7 +28,8 @@ const Page =
|
|
|
27
28
|
__spread: true,
|
|
28
29
|
}]);
|
|
29
30
|
const isFirstPageElement = useRef(true);
|
|
30
|
-
|
|
31
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: runs on mount/unmount only
|
|
32
|
+
useLayoutEffect(() => {
|
|
31
33
|
if (pageMounted) {
|
|
32
34
|
lynx.reportError(new Error(`Attempt to render more than one \`<page />\`, which is not supported.`));
|
|
33
35
|
isFirstPageElement.current = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../src/Page.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAy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AG,EAAE;YACnB,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,CAAC,WAAW,CACd,IAAI,KAAK,CACP,uEAAuE,CACxE,CACF,CAAC;gBACF,kBAAkB,CAAC,OAAO,GAAG,KAAK,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,WAAW,GAAG,IAAI,CAAC;YACrB,CAAC;YAED,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE;oBAC5B;wBACE,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;4BAC5C,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;wBAC1B,CAAC,CAAC,CACH;wBACD,QAAQ,EAAE,IAAI;qBACf;iBACF,CAAC,CAAC;gBACH,oBAAoB;gBACpB,IAAI,kBAAkB,CAAC,OAAO;oBAAE,WAAW,GAAG,KAAK,CAAC;YACtD,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,QAAQ,CAAC;IAClB,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAEP,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/components/src/Page.ts
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
|
|
5
|
+
import { useLayoutEffect } from 'preact/hooks';
|
|
5
6
|
import type { ForwardRefExoticComponent, PropsWithChildren, RefAttributes } from 'react';
|
|
6
7
|
|
|
7
8
|
// We use "@lynx-js/react" here
|
|
8
9
|
// because import * as ReactLynx from "@lynx-js/react/internal"; will be added when transform
|
|
9
10
|
// no matter if we use "@lynx-js/react" here
|
|
10
|
-
import { forwardRef,
|
|
11
|
+
import { forwardRef, useRef } from '@lynx-js/react';
|
|
11
12
|
import { __root, snapshotManager, updateSpread } from '@lynx-js/react/internal';
|
|
12
13
|
|
|
13
14
|
let pageMounted = false;
|
|
@@ -39,7 +40,8 @@ const Page: ForwardRefExoticComponent<Omit<PropsWithChildren, 'ref'> & RefAttrib
|
|
|
39
40
|
}]);
|
|
40
41
|
const isFirstPageElement = useRef(true);
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: runs on mount/unmount only
|
|
44
|
+
useLayoutEffect(() => {
|
|
43
45
|
if (pageMounted) {
|
|
44
46
|
lynx.reportError(
|
|
45
47
|
new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.126.0",
|
|
4
4
|
"description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"README.zh.md"
|
|
221
221
|
],
|
|
222
222
|
"dependencies": {
|
|
223
|
-
"preact": "npm:@lynx-js/internal-preact@
|
|
223
|
+
"preact": "npm:@lynx-js/internal-preact@11.0.0-rc.1-20260903085447-f95471a"
|
|
224
224
|
},
|
|
225
225
|
"devDependencies": {
|
|
226
226
|
"@lynx-js/types": "4.1.0",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import type { Context } from 'preact';
|
|
5
|
+
|
|
4
6
|
export * from '@lynx-js/react';
|
|
5
7
|
|
|
6
8
|
/**
|
|
@@ -30,11 +32,56 @@ declare function startTransition(cb: () => void): void;
|
|
|
30
32
|
* @public
|
|
31
33
|
*/
|
|
32
34
|
declare function useTransition(): [false, typeof startTransition];
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Reads the value of a resource during render.
|
|
38
|
+
*
|
|
39
|
+
* Unlike the other hooks, `use` may be called conditionally and inside loops.
|
|
40
|
+
*
|
|
41
|
+
* - Given a promise, it returns the resolved value. While the promise is
|
|
42
|
+
* pending it suspends, so the nearest `Suspense` boundary renders its
|
|
43
|
+
* fallback; a rejected promise throws.
|
|
44
|
+
* - Given a context, it returns the current value, subscribing the component
|
|
45
|
+
* to that context.
|
|
46
|
+
*
|
|
47
|
+
* @param resource - A promise or a context to read
|
|
48
|
+
* @returns The resolved value of the promise, or the current context value
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
declare function use<T>(resource: Promise<T> | Context<T>): T;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Runs an effect whose write is meant to be visible to the effects that read it.
|
|
56
|
+
*
|
|
57
|
+
* Preact has no separate insertion phase, so ReactLynx forwards this to `useEffect`.
|
|
58
|
+
* Ordering within a component still follows declaration order, and across components
|
|
59
|
+
* effects run child-before-parent, which covers the pattern libraries such as
|
|
60
|
+
* react-navigation use it for:
|
|
61
|
+
*
|
|
62
|
+
* ```js
|
|
63
|
+
* useInsertionEffect(() => { optionsRef.current = options; }, [options]);
|
|
64
|
+
* useEffect(() => { readsOptionsRef(); });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* It is not React's guarantee, though. Code that only relies on the ordering above
|
|
68
|
+
* keeps working if this is ever pointed at a real insertion phase.
|
|
69
|
+
*
|
|
70
|
+
* @param effect - Imperative function that can return a cleanup function
|
|
71
|
+
* @param deps - If present, effect will only activate if the values in the list change (using ===)
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*
|
|
75
|
+
* @deprecated `useInsertionEffect` in the background thread is an alias of `useEffect` and cannot offer React's insertion-phase timing: the effect has not run when `render` returns, and its cleanup is deferred to a later flush instead of running inside the unmount commit.
|
|
76
|
+
*/
|
|
77
|
+
declare const useInsertionEffect: typeof import('@lynx-js/react').useEffect;
|
|
78
|
+
export { startTransition, use, useInsertionEffect, useTransition };
|
|
34
79
|
|
|
35
80
|
// type for the default export
|
|
36
81
|
declare const _default: typeof import('@lynx-js/react') & {
|
|
37
82
|
startTransition: typeof startTransition;
|
|
83
|
+
use: typeof use;
|
|
84
|
+
useInsertionEffect: typeof useInsertionEffect;
|
|
38
85
|
useTransition: typeof useTransition;
|
|
39
86
|
};
|
|
40
87
|
export default _default;
|
package/runtime/compat/index.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
import { startTransition, useTransition } from 'preact/compat';
|
|
4
|
+
import { startTransition, use, useTransition } from 'preact/compat';
|
|
5
5
|
|
|
6
6
|
/* eslint-disable-next-line import/default */
|
|
7
|
-
import ReactLynx from '@lynx-js/react';
|
|
7
|
+
import ReactLynx, { useEffect } from '@lynx-js/react';
|
|
8
|
+
|
|
9
|
+
const useInsertionEffect = useEffect;
|
|
8
10
|
|
|
9
11
|
export default /*#__PURE__*/ Object.assign({}, ReactLynx, {
|
|
10
12
|
startTransition,
|
|
13
|
+
use,
|
|
14
|
+
useInsertionEffect,
|
|
11
15
|
useTransition,
|
|
12
16
|
});
|
|
13
17
|
|
|
14
18
|
export * from '@lynx-js/react';
|
|
15
|
-
export { startTransition, useTransition };
|
|
19
|
+
export { startTransition, use, useInsertionEffect, useTransition };
|
|
@@ -19,5 +19,43 @@ export namespace JSX {
|
|
|
19
19
|
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
20
20
|
interface IntrinsicAttributes {}
|
|
21
21
|
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
22
|
-
interface IntrinsicElements extends Lynx.IntrinsicElements {
|
|
22
|
+
interface IntrinsicElements extends Lynx.IntrinsicElements {
|
|
23
|
+
/**
|
|
24
|
+
* Renders `fallback` on the main thread and `children` on the background thread.
|
|
25
|
+
*
|
|
26
|
+
* Resolved at compile time, so the main thread renders only `fallback`. Modules
|
|
27
|
+
* that nothing but `children` reference leave its bundle, including their
|
|
28
|
+
* top-level side effects, while the element definitions the deferred subtree
|
|
29
|
+
* needs stay behind so it can hydrate. The background thread renders `children`,
|
|
30
|
+
* which replace the fallback once it takes over.
|
|
31
|
+
*
|
|
32
|
+
* Only the `fallback` attribute is supported. Spread attributes are a build error.
|
|
33
|
+
*
|
|
34
|
+
* The fold is the same in development, so what renders there is what renders in
|
|
35
|
+
* production, at the cost of the deferred modules not being refreshable on the
|
|
36
|
+
* main thread.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <view>
|
|
41
|
+
* <background-only fallback={<Skeleton />}>
|
|
42
|
+
* <Feed />
|
|
43
|
+
* </background-only>
|
|
44
|
+
* </view>
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
'background-only': {
|
|
50
|
+
/**
|
|
51
|
+
* Rendered on the main thread first screen in place of `children`.
|
|
52
|
+
* Defaults to rendering nothing.
|
|
53
|
+
*/
|
|
54
|
+
fallback?: React.JSX.Element | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Rendered on the background thread only.
|
|
57
|
+
*/
|
|
58
|
+
children?: React.ReactNode | undefined;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
23
61
|
}
|
|
@@ -22,5 +22,43 @@ export namespace JSX {
|
|
|
22
22
|
key?: React.Key | null | undefined;
|
|
23
23
|
}
|
|
24
24
|
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
25
|
-
interface IntrinsicElements extends Lynx.IntrinsicElements {
|
|
25
|
+
interface IntrinsicElements extends Lynx.IntrinsicElements {
|
|
26
|
+
/**
|
|
27
|
+
* Renders `fallback` on the main thread and `children` on the background thread.
|
|
28
|
+
*
|
|
29
|
+
* Resolved at compile time, so the main thread renders only `fallback`. Modules
|
|
30
|
+
* that nothing but `children` reference leave its bundle, including their
|
|
31
|
+
* top-level side effects, while the element definitions the deferred subtree
|
|
32
|
+
* needs stay behind so it can hydrate. The background thread renders `children`,
|
|
33
|
+
* which replace the fallback once it takes over.
|
|
34
|
+
*
|
|
35
|
+
* Only the `fallback` attribute is supported. Spread attributes are a build error.
|
|
36
|
+
*
|
|
37
|
+
* The fold is the same in development, so what renders there is what renders in
|
|
38
|
+
* production, at the cost of the deferred modules not being refreshable on the
|
|
39
|
+
* main thread.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <view>
|
|
44
|
+
* <background-only fallback={<Skeleton />}>
|
|
45
|
+
* <Feed />
|
|
46
|
+
* </background-only>
|
|
47
|
+
* </view>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
'background-only': {
|
|
53
|
+
/**
|
|
54
|
+
* Rendered on the main thread first screen in place of `children`.
|
|
55
|
+
* Defaults to rendering nothing.
|
|
56
|
+
*/
|
|
57
|
+
fallback?: React.JSX.Element | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Rendered on the background thread only.
|
|
60
|
+
*/
|
|
61
|
+
children?: React.ReactNode | undefined;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
26
64
|
}
|
package/runtime/lazy/compat.js
CHANGED
package/runtime/lazy/internal.js
CHANGED
package/runtime/lepus/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export function createElement(type, props, children) {
|
|
|
21
21
|
i;
|
|
22
22
|
for (i in props) {
|
|
23
23
|
if (i == 'key') key = props[i];
|
|
24
|
-
else if (i == 'ref') ref = props[i];
|
|
24
|
+
else if (i == 'ref' && typeof type != 'function') ref = props[i];
|
|
25
25
|
else normalizedProps[i] = props[i];
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -65,7 +65,7 @@ export function cloneElement(vnode, props, children) {
|
|
|
65
65
|
|
|
66
66
|
for (i in props) {
|
|
67
67
|
if (i == 'key') key = props[i];
|
|
68
|
-
else if (i == 'ref') ref = props[i];
|
|
68
|
+
else if (i == 'ref' && typeof vnode.type != 'function') ref = props[i];
|
|
69
69
|
else if (props[i] === undefined && defaultProps !== undefined) {
|
|
70
70
|
normalizedProps[i] = defaultProps[i];
|
|
71
71
|
} else {
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
import { CHILDREN, COMPONENT, DIFF,
|
|
4
|
+
import { CHILDREN, COMPONENT, DIFF, DOM, FLAGS, INDEX, PARENT, SnapshotInstance } from '@lynx-js/react/internal';
|
|
5
|
+
|
|
6
|
+
// Kept in sync with `REACT_ELEMENT_TYPE` in preact/compat, whose `isValidElement`
|
|
7
|
+
// compares against it. Inlined rather than imported so the main thread does not
|
|
8
|
+
// have to pull in compat.
|
|
9
|
+
const REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
10
|
+
|
|
11
|
+
// A SnapshotInstance is the main thread's element, so it has to satisfy
|
|
12
|
+
// `isValidElement` too. Assigning per instance would add a property after the
|
|
13
|
+
// constructor has run, which costs a shape transition on a hot path, so put it
|
|
14
|
+
// on the prototype instead. Writable, so that the `$$typeof: undefined` in
|
|
15
|
+
// `renderToOpcodes` can still shadow it.
|
|
16
|
+
Object.defineProperty(SnapshotInstance.prototype, '$$typeof', {
|
|
17
|
+
value: REACT_ELEMENT_TYPE,
|
|
18
|
+
writable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
});
|
|
5
21
|
|
|
6
22
|
function createVNode(type, props, _key) {
|
|
7
23
|
if (typeof type === 'string') {
|
|
@@ -13,7 +29,6 @@ function createVNode(type, props, _key) {
|
|
|
13
29
|
r[PARENT] = null;
|
|
14
30
|
r[DIFF] = 0;
|
|
15
31
|
r[DOM] = null;
|
|
16
|
-
r[DIRTY] = undefined;
|
|
17
32
|
r[COMPONENT] = null;
|
|
18
33
|
// r.__v = --vnodeId;
|
|
19
34
|
r[INDEX] = -1;
|
|
@@ -23,13 +38,10 @@ function createVNode(type, props, _key) {
|
|
|
23
38
|
} else if (typeof type === 'function') {
|
|
24
39
|
let normalizedProps = props;
|
|
25
40
|
|
|
26
|
-
|
|
27
|
-
if ('ref' in normalizedProps) {
|
|
41
|
+
if ('ref' in normalizedProps && 'prototype' in type && type.prototype.render) {
|
|
28
42
|
normalizedProps = {};
|
|
29
43
|
for (let i in props) {
|
|
30
|
-
if (i
|
|
31
|
-
// ref = props[i];
|
|
32
|
-
} else {
|
|
44
|
+
if (i != 'ref') {
|
|
33
45
|
normalizedProps[i] = props[i];
|
|
34
46
|
}
|
|
35
47
|
}
|
|
@@ -52,12 +64,12 @@ function createVNode(type, props, _key) {
|
|
|
52
64
|
[PARENT]: null,
|
|
53
65
|
[DIFF]: 0,
|
|
54
66
|
[DOM]: null,
|
|
55
|
-
[DIRTY]: void 0,
|
|
56
67
|
[COMPONENT]: null,
|
|
57
68
|
constructor: void 0,
|
|
58
69
|
// __v: --vnodeId,
|
|
59
70
|
[INDEX]: -1,
|
|
60
71
|
[FLAGS]: 0,
|
|
72
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
61
73
|
};
|
|
62
74
|
}
|
|
63
75
|
}
|
|
@@ -13,13 +13,13 @@ function reportRefDeprecationError(fnName, newFnName) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
function getReactAppInstance() {
|
|
16
|
-
return
|
|
16
|
+
return lynx.getApp();
|
|
17
17
|
}
|
|
18
18
|
function getLegacyNativeApp() {
|
|
19
|
-
return
|
|
19
|
+
return lynx.getApp()._nativeApp;
|
|
20
20
|
}
|
|
21
21
|
function getLegacyReactComponent() {
|
|
22
|
-
return
|
|
22
|
+
return lynx.getApp()._reactLynx.ReactComponent.prototype;
|
|
23
23
|
}
|
|
24
24
|
function createLegacyComponentReceiver(reactAppInstance, nativeApp) {
|
|
25
25
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/core/component.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,oBAAoB;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAmB3D,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,SAAS,yBAAyB,CAAC,MAAc,EAAE,SAAiB;IAClE,IAAI,OAAO,IAAI,CAAC,sDAAsD,EAAE,CAAC;QACvE,IAAI,CAAC,WAAW,CACd,IAAI,KAAK,CACP,GAAG,MAAM,iFAAiF,SAAS,WAAW,CAC/G,CACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/core/component.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,oBAAoB;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAmB3D,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;A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,SAAS,CAAC,mBAAmB,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC;IACjG,WAAW,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,WAAW,CAAC;IACzD,WAAW,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAS,KAAU,EAAE,QAAa;QACjE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,aAAa;QACb,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,UAAU,EAAE,CAAC;YACf,mBAAmB,CAAC,YAAY,CAAC,kBAAkB,GAAG,UAAU,CAAC;YACjE,gBAAgB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;YACtD,IAAI,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;QACzC,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
import { options as preactOptions } from 'preact';
|
|
5
|
-
import { COMPONENT,
|
|
5
|
+
import { BITS, COMPONENT, COMPONENT_FORCE, DIFF2, ORIGINAL } from '../shared/render-constants.js';
|
|
6
6
|
export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
7
7
|
// Preact can skip root render if `_original` is unchanged; bumping it keeps
|
|
8
8
|
// backend force renders aligned with Preact's own rerender path.
|
|
@@ -14,6 +14,7 @@ export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
|
14
14
|
setRootVNode(newVNode);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
17
18
|
const oldDiff = preactOptions[DIFF2];
|
|
18
19
|
preactOptions[DIFF2] = (vnode, oldVNode) => {
|
|
19
20
|
/* v8 ignore start */
|
|
@@ -23,7 +24,7 @@ export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
|
23
24
|
/* v8 ignore stop */
|
|
24
25
|
const c = oldVNode[COMPONENT];
|
|
25
26
|
if (c) {
|
|
26
|
-
c[
|
|
27
|
+
c[BITS] |= COMPONENT_FORCE;
|
|
27
28
|
}
|
|
28
29
|
else {
|
|
29
30
|
// mount phase of a new Component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forceRootRender.js","sourceRoot":"","sources":["../../src/core/forceRootRender.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"forceRootRender.js","sourceRoot":"","sources":["../../src/core/forceRootRender.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGlD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAQlG,MAAM,UAAU,sBAAsB,CACpC,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAA0B;IAE9D,4EAA4E;IAC5E,iEAAiE;IACjE,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAU,CAAC;QACvD,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/B,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,KAAY,EAAE,QAAe,EAAE,EAAE;QACvD,qBAAqB;QACrB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,CAAC;QACD,oBAAoB;QAEpB,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC;YACN,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,iCAAiC;YACjC,wCAAwC;QAC1C,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,EAAE,CAAC;IACX,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,KAAK,CAAC,GAAG,OAAkD,CAAC;IAC5E,CAAC;AACH,CAAC"}
|
|
@@ -18,7 +18,7 @@ export function updateGlobalProps(newData, { forceRerender } = {}) {
|
|
|
18
18
|
void Promise.resolve().then(forceRerender);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
lynx.getApp().GlobalEventEmitter.emit('onGlobalPropsChanged', [lynx.__globalProps]);
|
|
22
22
|
}
|
|
23
23
|
function warnGlobalPropsMode() {
|
|
24
24
|
if (typeof __LEPUS__ !== 'undefined' && !__LEPUS__ && typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalProps.js","sourceRoot":"","sources":["../../src/core/globalProps.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA+BxC,MAAM,UAAU,sBAAsB;IACpC,OAAO,OAAO,qBAAqB,KAAK,WAAW,IAAI,qBAAqB,KAAK,OAAO,CA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AO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC;YACnD,WAAW,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAgB;QAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAkC;QAClD,GAAG,EAAE,GAAG,EAAE,CAAC,sBAAoC;QAC/C,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -23,10 +23,12 @@ function installMainThreadHooks() {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
hooksInstalled = true;
|
|
26
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
26
27
|
oldBeforeDiff = options[DIFF];
|
|
27
28
|
oldBeforeRender = options[RENDER];
|
|
28
29
|
oldAfterDiff = options[DIFFED];
|
|
29
30
|
oldRoot = options[ROOT];
|
|
31
|
+
/* eslint-enable @typescript-eslint/unbound-method */
|
|
30
32
|
options[DIFF] = function (vnode) {
|
|
31
33
|
currentComponent = null;
|
|
32
34
|
if (oldBeforeDiff)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainThreadImpl.js","sourceRoot":"","sources":["../../../src/core/hooks/mainThreadImpl.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAUjC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,eAAe,EACf,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,IAAI,YA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,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAW,CAAC;AAChC,CAAC;AAED,mBAAmB;AACnB,MAAM,SAAS,GAAG,IAA4B,CAAC;AAC/C,MAAM,eAAe,GAAG,IAAkC,CAAC;AAC3D,MAAM,mBAAmB,GAAG,IAAsC,CAAC;AAEnE,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,GACT,CAAC"}
|
|
@@ -32,7 +32,7 @@ import { useEffect, useMemo, useRef } from '@lynx-js/react/hooks';
|
|
|
32
32
|
*/
|
|
33
33
|
export function useLynxGlobalEventListener(eventName, listener) {
|
|
34
34
|
'background only';
|
|
35
|
-
const previousArgsRef = useRef();
|
|
35
|
+
const previousArgsRef = useRef(undefined);
|
|
36
36
|
useMemo(() => {
|
|
37
37
|
if (previousArgsRef.current) {
|
|
38
38
|
const [eventName, listener] = previousArgsRef.current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLynxGlobalEventListener.js","sourceRoot":"","sources":["../../../src/core/hooks/useLynxGlobalEventListener.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,QAAW;IAEX,iBAAiB,CAAC;IAElB,MAAM,eAAe,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"useLynxGlobalEventListener.js","sourceRoot":"","sources":["../../../src/core/hooks/useLynxGlobalEventListener.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,QAAW;IAEX,iBAAiB,CAAC;IAElB,MAAM,eAAe,GAAG,MAAM,CAAc,SAAS,CAAC,CAAC;IAEvD,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,eAAe,CAAC,OAAO,EAAE,CAAC;YAC5B,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC;YACtD,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACxE,eAAe,CAAC,OAAO,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,IAAI,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC5B,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC;gBACtD,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -130,7 +130,7 @@ export const loadLazyBundle = /*#__PURE__*/ (() => {
|
|
|
130
130
|
const { code, detail } = result;
|
|
131
131
|
if (code === 0) {
|
|
132
132
|
const { schema } = detail;
|
|
133
|
-
const exports =
|
|
133
|
+
const exports = lynx.getApp().getDynamicComponentExports(schema);
|
|
134
134
|
// `code === 0` means that the lazy bundle has been successfully parsed. However,
|
|
135
135
|
// its javascript files may still fail to run, which would prevent the retrieval of the exports object.
|
|
136
136
|
if (exports) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bundle.js","sourceRoot":"","sources":["../../../src/core/lynx/lazy-bundle.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,6EAA6E;AAC7E,oDAAoD;AACpD,6EAA6E;AAC7E,+CAA+C;AAC/C,4EAA4E;AAC5E,2DAA2D;AAC3D,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAC1C,MAAM,kBAAkB,GAAG,YAAY,CAAC;AACxC,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,8BAA8B,GAAG,CAAC,CAAC;AACzC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAE5D,yEAAyE;AACzE,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAY,MAAS;IAC/C,OAAO,UAEL,GAAmD,EACnD,IAAuD;QAEvD,IAAI,GAAG,EAAE,CAAC;YACR,IAAI,GAA2B,CAAC;YAChC,IAAI,CAAC;gBACH,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,aAAa;gBACb,oCAAoC;gBACpC,IAAI;gBACJ,OAAO,OAAO,CAAC,MAAM,CAAC,CAAU,CAAC,CAAC;YACpC,CAAC;YAED,IAAI,GAAG,IAAI,OAAQ,GAAwB,CAAC,IAAI,KAAK,UAAU,CAAC,uBAAuB,EAAE,CAAC;gBACxF,aAAa;gBACb,+CAA+C;gBAC/C,IAAI;gBACJ,6DAA6D;gBAC7D,yDAAyD;gBACzD,qC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