@lynx-js/react 0.105.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 +250 -0
- package/LICENSE +202 -0
- package/README.md +20 -0
- package/components/lib/Page.d.ts +3 -0
- package/components/lib/Page.js +56 -0
- package/components/lib/Page.js.map +1 -0
- package/components/lib/index.d.ts +1 -0
- package/components/lib/index.js +5 -0
- package/components/lib/index.js.map +1 -0
- package/components/src/Page.ts +75 -0
- package/components/src/index.ts +5 -0
- package/package.json +162 -0
- package/refresh/.gitignore +1 -0
- package/refresh/.npmignore +3 -0
- package/refresh/.turbo/turbo-build.log +8 -0
- package/refresh/dist/index.js +311 -0
- package/refresh/package.json +21 -0
- package/refresh/src/index.ts +6 -0
- package/refresh/src/prefresh.d.ts +11 -0
- package/refresh/tsconfig.json +4 -0
- package/refresh/turbo.json +15 -0
- package/runtime/jsx-dev-runtime/index.d.ts +5 -0
- package/runtime/jsx-dev-runtime/index.js +4 -0
- package/runtime/jsx-runtime/index.d.ts +4 -0
- package/runtime/jsx-runtime/index.js +4 -0
- package/runtime/lazy/import.d.ts +1 -0
- package/runtime/lazy/import.js +55 -0
- package/runtime/lazy/internal.js +39 -0
- package/runtime/lazy/jsx-dev-runtime.js +12 -0
- package/runtime/lazy/jsx-runtime.js +12 -0
- package/runtime/lazy/legacy-react-runtime.js +20 -0
- package/runtime/lazy/react-lepus.js +9 -0
- package/runtime/lazy/react.js +46 -0
- package/runtime/lazy/target.js +11 -0
- package/runtime/lepus/index.d.ts +4 -0
- package/runtime/lepus/index.js +43 -0
- package/runtime/lepus/jsx-dev-runtime/index.js +4 -0
- package/runtime/lepus/jsx-runtime/index.js +66 -0
- package/runtime/lib/backgroundSnapshot.d.ts +23 -0
- package/runtime/lib/backgroundSnapshot.js +348 -0
- package/runtime/lib/backgroundSnapshot.js.map +1 -0
- package/runtime/lib/compat/componentIs.d.ts +4 -0
- package/runtime/lib/compat/componentIs.js +20 -0
- package/runtime/lib/compat/componentIs.js.map +1 -0
- package/runtime/lib/compat/initData.d.ts +43 -0
- package/runtime/lib/compat/initData.js +93 -0
- package/runtime/lib/compat/initData.js.map +1 -0
- package/runtime/lib/compat/lynxComponent.d.ts +5 -0
- package/runtime/lib/compat/lynxComponent.js +71 -0
- package/runtime/lib/compat/lynxComponent.js.map +1 -0
- package/runtime/lib/debug/debug.d.ts +2 -0
- package/runtime/lib/debug/debug.js +9 -0
- package/runtime/lib/debug/debug.js.map +1 -0
- package/runtime/lib/debug/printSnapshot.d.ts +3 -0
- package/runtime/lib/debug/printSnapshot.js +21 -0
- package/runtime/lib/debug/printSnapshot.js.map +1 -0
- package/runtime/lib/debug/profile.d.ts +1 -0
- package/runtime/lib/debug/profile.js +51 -0
- package/runtime/lib/debug/profile.js.map +1 -0
- package/runtime/lib/document.d.ts +4 -0
- package/runtime/lib/document.js +49 -0
- package/runtime/lib/document.js.map +1 -0
- package/runtime/lib/gesture/processGesture.d.ts +4 -0
- package/runtime/lib/gesture/processGesture.js +48 -0
- package/runtime/lib/gesture/processGesture.js.map +1 -0
- package/runtime/lib/gesture/processGestureBagkround.d.ts +2 -0
- package/runtime/lib/gesture/processGestureBagkround.js +16 -0
- package/runtime/lib/gesture/processGestureBagkround.js.map +1 -0
- package/runtime/lib/gesture/types.d.ts +34 -0
- package/runtime/lib/gesture/types.js +13 -0
- package/runtime/lib/gesture/types.js.map +1 -0
- package/runtime/lib/hooks/react.d.ts +26 -0
- package/runtime/lib/hooks/react.js +35 -0
- package/runtime/lib/hooks/react.js.map +1 -0
- package/runtime/lib/hooks/useLynxGlobalEventListener.d.ts +29 -0
- package/runtime/lib/hooks/useLynxGlobalEventListener.js +53 -0
- package/runtime/lib/hooks/useLynxGlobalEventListener.js.map +1 -0
- package/runtime/lib/hydrate.d.ts +18 -0
- package/runtime/lib/hydrate.js +271 -0
- package/runtime/lib/hydrate.js.map +1 -0
- package/runtime/lib/index.d.ts +9 -0
- package/runtime/lib/index.js +46 -0
- package/runtime/lib/index.js.map +1 -0
- package/runtime/lib/internal.d.ts +26 -0
- package/runtime/lib/internal.js +41 -0
- package/runtime/lib/internal.js.map +1 -0
- package/runtime/lib/legacy-react-runtime/index.d.ts +7 -0
- package/runtime/lib/legacy-react-runtime/index.js +34 -0
- package/runtime/lib/legacy-react-runtime/index.js.map +1 -0
- package/runtime/lib/lifecycle/delayUnmount.d.ts +8 -0
- package/runtime/lib/lifecycle/delayUnmount.js +68 -0
- package/runtime/lib/lifecycle/delayUnmount.js.map +1 -0
- package/runtime/lib/lifecycle/destroy.d.ts +2 -0
- package/runtime/lib/lifecycle/destroy.js +21 -0
- package/runtime/lib/lifecycle/destroy.js.map +1 -0
- package/runtime/lib/lifecycle/pass.d.ts +3 -0
- package/runtime/lib/lifecycle/pass.js +12 -0
- package/runtime/lib/lifecycle/pass.js.map +1 -0
- package/runtime/lib/lifecycle/patchUpdate.d.ts +23 -0
- package/runtime/lib/lifecycle/patchUpdate.js +179 -0
- package/runtime/lib/lifecycle/patchUpdate.js.map +1 -0
- package/runtime/lib/lifecycle/reload.d.ts +3 -0
- package/runtime/lib/lifecycle/reload.js +63 -0
- package/runtime/lib/lifecycle/reload.js.map +1 -0
- package/runtime/lib/lifecycle/render.d.ts +2 -0
- package/runtime/lib/lifecycle/render.js +44 -0
- package/runtime/lib/lifecycle/render.js.map +1 -0
- package/runtime/lib/lifecycleConstant.d.ts +12 -0
- package/runtime/lib/lifecycleConstant.js +17 -0
- package/runtime/lib/lifecycleConstant.js.map +1 -0
- package/runtime/lib/list.d.ts +40 -0
- package/runtime/lib/list.js +305 -0
- package/runtime/lib/list.js.map +1 -0
- package/runtime/lib/lynx/calledByNative.d.ts +2 -0
- package/runtime/lib/lynx/calledByNative.js +113 -0
- package/runtime/lib/lynx/calledByNative.js.map +1 -0
- package/runtime/lib/lynx/component.d.ts +1 -0
- package/runtime/lib/lynx/component.js +69 -0
- package/runtime/lib/lynx/component.js.map +1 -0
- package/runtime/lib/lynx/dynamic-js.d.ts +2 -0
- package/runtime/lib/lynx/dynamic-js.js +31 -0
- package/runtime/lib/lynx/dynamic-js.js.map +1 -0
- package/runtime/lib/lynx/env.d.ts +1 -0
- package/runtime/lib/lynx/env.js +92 -0
- package/runtime/lib/lynx/env.js.map +1 -0
- package/runtime/lib/lynx/injectLepusMethods.d.ts +2 -0
- package/runtime/lib/lynx/injectLepusMethods.js +50 -0
- package/runtime/lib/lynx/injectLepusMethods.js.map +1 -0
- package/runtime/lib/lynx/lazy-bundle.d.ts +9 -0
- package/runtime/lib/lynx/lazy-bundle.js +119 -0
- package/runtime/lib/lynx/lazy-bundle.js.map +1 -0
- package/runtime/lib/lynx/performance.d.ts +29 -0
- package/runtime/lib/lynx/performance.js +100 -0
- package/runtime/lib/lynx/performance.js.map +1 -0
- package/runtime/lib/lynx/tt.d.ts +4 -0
- package/runtime/lib/lynx/tt.js +193 -0
- package/runtime/lib/lynx/tt.js.map +1 -0
- package/runtime/lib/lynx-api.d.ts +311 -0
- package/runtime/lib/lynx-api.js +116 -0
- package/runtime/lib/lynx-api.js.map +1 -0
- package/runtime/lib/lynx.d.ts +2 -0
- package/runtime/lib/lynx.js +91 -0
- package/runtime/lib/lynx.js.map +1 -0
- package/runtime/lib/opcodes.d.ts +2 -0
- package/runtime/lib/opcodes.js +59 -0
- package/runtime/lib/opcodes.js.map +1 -0
- package/runtime/lib/renderToOpcodes/constants.d.ts +17 -0
- package/runtime/lib/renderToOpcodes/constants.js +23 -0
- package/runtime/lib/renderToOpcodes/constants.js.map +1 -0
- package/runtime/lib/renderToOpcodes/index.d.ts +13 -0
- package/runtime/lib/renderToOpcodes/index.js +227 -0
- package/runtime/lib/renderToOpcodes/index.js.map +1 -0
- package/runtime/lib/root.d.ts +7 -0
- package/runtime/lib/root.js +17 -0
- package/runtime/lib/root.js.map +1 -0
- package/runtime/lib/snapshot/event.d.ts +3 -0
- package/runtime/lib/snapshot/event.js +24 -0
- package/runtime/lib/snapshot/event.js.map +1 -0
- package/runtime/lib/snapshot/gesture.d.ts +2 -0
- package/runtime/lib/snapshot/gesture.js +18 -0
- package/runtime/lib/snapshot/gesture.js.map +1 -0
- package/runtime/lib/snapshot/platformInfo.d.ts +4 -0
- package/runtime/lib/snapshot/platformInfo.js +35 -0
- package/runtime/lib/snapshot/platformInfo.js.map +1 -0
- package/runtime/lib/snapshot/ref.d.ts +10 -0
- package/runtime/lib/snapshot/ref.js +119 -0
- package/runtime/lib/snapshot/ref.js.map +1 -0
- package/runtime/lib/snapshot/spread.d.ts +5 -0
- package/runtime/lib/snapshot/spread.js +289 -0
- package/runtime/lib/snapshot/spread.js.map +1 -0
- package/runtime/lib/snapshot/workletEvent.d.ts +3 -0
- package/runtime/lib/snapshot/workletEvent.js +22 -0
- package/runtime/lib/snapshot/workletEvent.js.map +1 -0
- package/runtime/lib/snapshot/workletRef.d.ts +5 -0
- package/runtime/lib/snapshot/workletRef.js +52 -0
- package/runtime/lib/snapshot/workletRef.js.map +1 -0
- package/runtime/lib/snapshot.d.ts +81 -0
- package/runtime/lib/snapshot.js +477 -0
- package/runtime/lib/snapshot.js.map +1 -0
- package/runtime/lib/snapshotPatch.d.ts +14 -0
- package/runtime/lib/snapshotPatch.js +31 -0
- package/runtime/lib/snapshotPatch.js.map +1 -0
- package/runtime/lib/snapshotPatchApply.d.ts +2 -0
- package/runtime/lib/snapshotPatchApply.js +110 -0
- package/runtime/lib/snapshotPatchApply.js.map +1 -0
- package/runtime/lib/utils.d.ts +4 -0
- package/runtime/lib/utils.js +32 -0
- package/runtime/lib/utils.js.map +1 -0
- package/runtime/lib/worklet/ctx.d.ts +1 -0
- package/runtime/lib/worklet/ctx.js +17 -0
- package/runtime/lib/worklet/ctx.js.map +1 -0
- package/runtime/lib/worklet/execMap.d.ts +1 -0
- package/runtime/lib/worklet/execMap.js +42 -0
- package/runtime/lib/worklet/execMap.js.map +1 -0
- package/runtime/lib/worklet/functionality.d.ts +1 -0
- package/runtime/lib/worklet/functionality.js +11 -0
- package/runtime/lib/worklet/functionality.js.map +1 -0
- package/runtime/lib/worklet/hmr.d.ts +1 -0
- package/runtime/lib/worklet/hmr.js +21 -0
- package/runtime/lib/worklet/hmr.js.map +1 -0
- package/runtime/lib/worklet/indexMap.d.ts +8 -0
- package/runtime/lib/worklet/indexMap.js +17 -0
- package/runtime/lib/worklet/indexMap.js.map +1 -0
- package/runtime/lib/worklet/jsImpl.d.ts +11 -0
- package/runtime/lib/worklet/jsImpl.js +68 -0
- package/runtime/lib/worklet/jsImpl.js.map +1 -0
- package/runtime/lib/worklet/runWorklet.d.ts +14 -0
- package/runtime/lib/worklet/runWorklet.js +82 -0
- package/runtime/lib/worklet/runWorklet.js.map +1 -0
- package/runtime/lib/worklet/workletRef.d.ts +131 -0
- package/runtime/lib/worklet/workletRef.js +96 -0
- package/runtime/lib/worklet/workletRef.js.map +1 -0
- package/runtime/lib/worklet/workletRefPool.d.ts +2 -0
- package/runtime/lib/worklet/workletRefPool.js +22 -0
- package/runtime/lib/worklet/workletRefPool.js.map +1 -0
- package/runtime/src/backgroundSnapshot.ts +452 -0
- package/runtime/src/compat/componentIs.ts +30 -0
- package/runtime/src/compat/initData.ts +140 -0
- package/runtime/src/compat/lynxComponent.ts +80 -0
- package/runtime/src/debug/debug.ts +9 -0
- package/runtime/src/debug/printSnapshot.ts +28 -0
- package/runtime/src/debug/profile.ts +54 -0
- package/runtime/src/document.ts +53 -0
- package/runtime/src/gesture/processGesture.ts +77 -0
- package/runtime/src/gesture/processGestureBagkround.ts +15 -0
- package/runtime/src/gesture/types.ts +39 -0
- package/runtime/src/hooks/react.ts +62 -0
- package/runtime/src/hooks/useLynxGlobalEventListener.ts +59 -0
- package/runtime/src/hydrate.ts +364 -0
- package/runtime/src/index.ts +89 -0
- package/runtime/src/internal.ts +60 -0
- package/runtime/src/legacy-react-runtime/index.ts +40 -0
- package/runtime/src/lifecycle/delayUnmount.ts +77 -0
- package/runtime/src/lifecycle/destroy.ts +26 -0
- package/runtime/src/lifecycle/pass.ts +14 -0
- package/runtime/src/lifecycle/patchUpdate.ts +240 -0
- package/runtime/src/lifecycle/reload.ts +79 -0
- package/runtime/src/lifecycle/render.ts +46 -0
- package/runtime/src/lifecycleConstant.ts +16 -0
- package/runtime/src/list.ts +375 -0
- package/runtime/src/lynx/calledByNative.ts +132 -0
- package/runtime/src/lynx/component.ts +116 -0
- package/runtime/src/lynx/dynamic-js.ts +33 -0
- package/runtime/src/lynx/env.ts +110 -0
- package/runtime/src/lynx/injectLepusMethods.ts +53 -0
- package/runtime/src/lynx/lazy-bundle.ts +126 -0
- package/runtime/src/lynx/performance.ts +117 -0
- package/runtime/src/lynx/tt.ts +212 -0
- package/runtime/src/lynx-api.ts +374 -0
- package/runtime/src/lynx.ts +105 -0
- package/runtime/src/opcodes.ts +64 -0
- package/runtime/src/renderToOpcodes/constants.ts +24 -0
- package/runtime/src/renderToOpcodes/index.ts +301 -0
- package/runtime/src/root.ts +19 -0
- package/runtime/src/snapshot/event.ts +33 -0
- package/runtime/src/snapshot/gesture.ts +25 -0
- package/runtime/src/snapshot/platformInfo.ts +48 -0
- package/runtime/src/snapshot/ref.ts +151 -0
- package/runtime/src/snapshot/spread.ts +287 -0
- package/runtime/src/snapshot/workletEvent.ts +33 -0
- package/runtime/src/snapshot/workletRef.ts +63 -0
- package/runtime/src/snapshot.ts +576 -0
- package/runtime/src/snapshotPatch.ts +56 -0
- package/runtime/src/snapshotPatchApply.ts +117 -0
- package/runtime/src/utils.ts +35 -0
- package/runtime/src/worklet/ctx.ts +22 -0
- package/runtime/src/worklet/execMap.ts +50 -0
- package/runtime/src/worklet/functionality.ts +12 -0
- package/runtime/src/worklet/hmr.ts +26 -0
- package/runtime/src/worklet/indexMap.ts +20 -0
- package/runtime/src/worklet/jsImpl.ts +86 -0
- package/runtime/src/worklet/runWorklet.ts +88 -0
- package/runtime/src/worklet/workletRef.ts +229 -0
- package/runtime/src/worklet/workletRefPool.ts +25 -0
- package/transform/cjs/main.cjs +6 -0
- package/transform/cjs/main.d.cts +3 -0
- package/transform/cjs/package.json +3 -0
- package/transform/dist/wasm.cjs +8478 -0
- package/transform/index.d.ts +187 -0
- package/transform/main.js +15 -0
- package/types/react.d.ts +147 -0
- package/types/react.docs.d.ts +74 -0
- package/worklet-runtime/dist/dev.js +414 -0
- package/worklet-runtime/dist/dev.js.map +8 -0
- package/worklet-runtime/dist/main.js +414 -0
- package/worklet-runtime/dist/main.js.map +8 -0
- package/worklet-runtime/lib/api/element.d.ts +14 -0
- package/worklet-runtime/lib/api/element.js +71 -0
- package/worklet-runtime/lib/api/element.js.map +1 -0
- package/worklet-runtime/lib/api/lepusQuerySelector.d.ts +3 -0
- package/worklet-runtime/lib/api/lepusQuerySelector.js +23 -0
- package/worklet-runtime/lib/api/lepusQuerySelector.js.map +1 -0
- package/worklet-runtime/lib/api/lynxApi.d.ts +2 -0
- package/worklet-runtime/lib/api/lynxApi.js +35 -0
- package/worklet-runtime/lib/api/lynxApi.js.map +1 -0
- package/worklet-runtime/lib/bindings/bindings.d.ts +14 -0
- package/worklet-runtime/lib/bindings/bindings.js +61 -0
- package/worklet-runtime/lib/bindings/bindings.js.map +1 -0
- package/worklet-runtime/lib/bindings/events.d.ts +7 -0
- package/worklet-runtime/lib/bindings/events.js +9 -0
- package/worklet-runtime/lib/bindings/events.js.map +1 -0
- package/worklet-runtime/lib/bindings/index.d.ts +4 -0
- package/worklet-runtime/lib/bindings/index.js +7 -0
- package/worklet-runtime/lib/bindings/index.js.map +1 -0
- package/worklet-runtime/lib/bindings/loadRuntime.d.ts +8 -0
- package/worklet-runtime/lib/bindings/loadRuntime.js +25 -0
- package/worklet-runtime/lib/bindings/loadRuntime.js.map +1 -0
- package/worklet-runtime/lib/bindings/types.d.ts +35 -0
- package/worklet-runtime/lib/bindings/types.js +2 -0
- package/worklet-runtime/lib/bindings/types.js.map +1 -0
- package/worklet-runtime/lib/delayWorkletEvent.d.ts +11 -0
- package/worklet-runtime/lib/delayWorkletEvent.js +49 -0
- package/worklet-runtime/lib/delayWorkletEvent.js.map +1 -0
- package/worklet-runtime/lib/global.d.ts +15 -0
- package/worklet-runtime/lib/global.js +2 -0
- package/worklet-runtime/lib/global.js.map +1 -0
- package/worklet-runtime/lib/index.d.ts +1 -0
- package/worklet-runtime/lib/index.js +12 -0
- package/worklet-runtime/lib/index.js.map +1 -0
- package/worklet-runtime/lib/jsFunctionLifecycle.d.ts +18 -0
- package/worklet-runtime/lib/jsFunctionLifecycle.js +55 -0
- package/worklet-runtime/lib/jsFunctionLifecycle.js.map +1 -0
- package/worklet-runtime/lib/listeners.d.ts +2 -0
- package/worklet-runtime/lib/listeners.js +17 -0
- package/worklet-runtime/lib/listeners.js.map +1 -0
- package/worklet-runtime/lib/utils/profile.d.ts +1 -0
- package/worklet-runtime/lib/utils/profile.js +20 -0
- package/worklet-runtime/lib/utils/profile.js.map +1 -0
- package/worklet-runtime/lib/utils/version.d.ts +1 -0
- package/worklet-runtime/lib/utils/version.js +10 -0
- package/worklet-runtime/lib/utils/version.js.map +1 -0
- package/worklet-runtime/lib/workletRef.d.ts +12 -0
- package/worklet-runtime/lib/workletRef.js +50 -0
- package/worklet-runtime/lib/workletRef.js.map +1 -0
- package/worklet-runtime/lib/workletRuntime.d.ts +2 -0
- package/worklet-runtime/lib/workletRuntime.js +128 -0
- package/worklet-runtime/lib/workletRuntime.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/lynx/env.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC;QAC3D,aAAa;QACb,IAAI,CAAC,UAAU,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;QACjD,IAAI,CAAC,sBAAsB,GAAG,cAAY,CAAC,CAAC;IAC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AC;oBACZ,CAAC;yBAAM,CAAC;wBACN,CAAC,GAAG,uBAAuB,EAAE,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;oBACpE,CAAC;gBACH,CAAC;gBAAC,OAAO,CAAM,EAAE,CAAC;oBAChB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;oBACpB,yBAAyB;oBACzB,uDAAuD;oBACvD,iCAAiC;oBACjC,CAAC,GAAG,EAAE,CAAC;gBACT,CAAC;gBAED,IAAI,WAAW,EAAE,CAAC;oBAChB,OAAO,CAAC,UAAU,EAAE,CAAC;gBACvB,CAAC;gBAED,IAAI,+BAA+B,KAAK,KAAK,EAAE,CAAC;oBAC9C,aAAa;oBACb,IAAI,UAAU,CAAC,6BAA6B,EAAE,CAAC;wBAC7C,CAAC,GAAG;4BACF,GAAG,CAAC;4BACJ,aAAa;4BACb,6BAA6B,EAAE,UAAU,CAAC,6BAA6B;yBACxE,CAAC;oBACJ,CAAC;oBAED,aAAa;oBACb,IAAI,eAAe,EAAE,CAAC;wBACpB,CAAC,GAAG;4BACF,GAAG,CAAC;4BACJ,aAAa;4BACb,YAAY,EAAE,0BAA0B;yBACzC,CAAC;oBACJ,CAAC;gBACH,CAAC;gBAED,IAAI,aAAa,EAAE,CAAC;gBACpB,CAAC;qBAAM,CAAC;oBACN,+BAA+B,GAAG,IAAI,CAAC;gBACzC,CAAC;gBAED,OAAO,CAAC,CAAC;gBACT,OAAO;YACT,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,6EAA6E;QAC7E,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { snapshotInstanceManager } from '../snapshot.js';
|
|
5
|
+
function injectLepusMethods() {
|
|
6
|
+
Object.assign(globalThis, {
|
|
7
|
+
getUniqueIdListBySnapshotId,
|
|
8
|
+
getSnapshotIdByUniqueId,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get the list of `unique_id` of the fiber element by the SnapshotInstance `__id`.
|
|
13
|
+
*/
|
|
14
|
+
function getUniqueIdListBySnapshotId({ snapshotId }) {
|
|
15
|
+
const si = snapshotInstanceManager.values.get(snapshotId);
|
|
16
|
+
if (si?.__elements?.length) {
|
|
17
|
+
const uniqueIdList = [];
|
|
18
|
+
for (const element of si.__elements) {
|
|
19
|
+
const uniqueId = __GetElementUniqueID(element);
|
|
20
|
+
uniqueIdList.push(uniqueId);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
uniqueIdList,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the SnapshotInstance `__id` of the fiber element by the `unique_id`.
|
|
30
|
+
*/
|
|
31
|
+
function getSnapshotIdByUniqueId({ uniqueId }) {
|
|
32
|
+
for (const si of snapshotInstanceManager.values.values()) {
|
|
33
|
+
if (si?.__elements?.length) {
|
|
34
|
+
for (const element of si.__elements) {
|
|
35
|
+
const unique_id = __GetElementUniqueID(element);
|
|
36
|
+
if (unique_id === uniqueId) {
|
|
37
|
+
return {
|
|
38
|
+
snapshotId: si.__id,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export { injectLepusMethods };
|
|
50
|
+
//# sourceMappingURL=injectLepusMethods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectLepusMethods.js","sourceRoot":"","sources":["../../src/lynx/injectLepusMethods.ts"],"names":[],"mappings":"AAAA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,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load dynamic component from source. Designed to be used with `lazy`.
|
|
3
|
+
* @param source - where dynamic component template.js locates
|
|
4
|
+
* @returns
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadLazyBundle<T extends {
|
|
8
|
+
default: React.ComponentType<any>;
|
|
9
|
+
}>(source: string): Promise<T>;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { Fragment, lazy as backgroundLazy, createElement } from 'preact/compat';
|
|
5
|
+
/**
|
|
6
|
+
* To make code below works
|
|
7
|
+
* const App1 = lazy(() => import("./x").then(({App1}) => ({default: App1})))
|
|
8
|
+
* const App2 = lazy(() => import("./x").then(({App2}) => ({default: App2})))
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export const makeSyncThen = function (result) {
|
|
12
|
+
return function (onF) {
|
|
13
|
+
if (onF) {
|
|
14
|
+
let ret;
|
|
15
|
+
try {
|
|
16
|
+
ret = onF(result);
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
return Promise.reject(e);
|
|
20
|
+
}
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
if (ret && typeof ret.then === 'function' /* `thenable` object */) {
|
|
23
|
+
// lazy(() =>
|
|
24
|
+
// import("./x").then(() => new Promise(...))
|
|
25
|
+
// )
|
|
26
|
+
// Calling `then` and passing a callback is standard behavior
|
|
27
|
+
// but in Lepus runtime the callback will never be called
|
|
28
|
+
// So can be simplified to code below
|
|
29
|
+
return new Promise(() => { });
|
|
30
|
+
// TODO(hongzhiyuan.hzy): Avoid warning that cannot be turned-off, so the warning is commented
|
|
31
|
+
// lynx.reportError(
|
|
32
|
+
// new Error(
|
|
33
|
+
// 'You returned a Promise in promise-chain of lazy-bundle import (eg. `import("./x").then(() => new Promise(...))`), which will cause related Component unavailable at first-screen, '
|
|
34
|
+
// ),
|
|
35
|
+
// { level: "warning" }
|
|
36
|
+
// );
|
|
37
|
+
}
|
|
38
|
+
const p = Promise.resolve(ret);
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
p.then = makeSyncThen(ret);
|
|
41
|
+
return p;
|
|
42
|
+
}
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Load dynamic component from source. Designed to be used with `lazy`.
|
|
48
|
+
* @param source - where dynamic component template.js locates
|
|
49
|
+
* @returns
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export function loadLazyBundle(source) {
|
|
53
|
+
if (__LEPUS__) {
|
|
54
|
+
const query = __QueryComponent(source);
|
|
55
|
+
let result;
|
|
56
|
+
try {
|
|
57
|
+
result = query.evalResult;
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
// Here we cannot return a rejected promise
|
|
61
|
+
// (which will eventually be an unhandled rejection and cause unnecessary redbox)
|
|
62
|
+
// But we still need a object in shape of Promise
|
|
63
|
+
// So we return a Promise which will never resolve or reject,
|
|
64
|
+
// which fit our principle "lepus run only once at first-screen" better
|
|
65
|
+
return new Promise(() => { });
|
|
66
|
+
}
|
|
67
|
+
const r = Promise.resolve(result);
|
|
68
|
+
// Why we should modify the implementation of `then`?
|
|
69
|
+
// We should make it `sync` so lepus first-screen render can use result above instantly
|
|
70
|
+
// We also should keep promise shape
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
r.then = makeSyncThen(result);
|
|
73
|
+
return r;
|
|
74
|
+
}
|
|
75
|
+
else if (__JS__) {
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
77
|
+
const callback = result => {
|
|
78
|
+
const { code, detail } = result;
|
|
79
|
+
if (code === 0) {
|
|
80
|
+
const { schema } = detail;
|
|
81
|
+
const exports = lynxCoreInject.tt.getDynamicComponentExports(schema);
|
|
82
|
+
// `code === 0` means that the lazy bundle has been successfully parsed. However,
|
|
83
|
+
// its javascript files may still fail to run, which would prevent the retrieval of the exports object.
|
|
84
|
+
if (exports) {
|
|
85
|
+
resolve(exports);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
reject(new Error('Lazy bundle load failed: ' + JSON.stringify(result)));
|
|
90
|
+
};
|
|
91
|
+
if (typeof lynx.QueryComponent === 'function') {
|
|
92
|
+
lynx.QueryComponent(source, callback);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
lynx.getNativeLynx().QueryComponent(source, callback);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
throw new Error('unreachable');
|
|
100
|
+
}
|
|
101
|
+
lynx.loadLazyBundle = loadLazyBundle;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
export function mainThreadLazy(loader) {
|
|
106
|
+
const Lazy = backgroundLazy(loader);
|
|
107
|
+
function _Lazy(props) {
|
|
108
|
+
try {
|
|
109
|
+
// @ts-expect-error `Lazy` returned from `backgroundLazy` should be a FC
|
|
110
|
+
return Lazy(props);
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
// We should never throw at mainThread
|
|
114
|
+
return createElement(Fragment, {});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return _Lazy;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=lazy-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-bundle.js","sourceRoot":"","sources":["../../src/lynx/lazy-bundle.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEhF;;;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IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;AAErC;;GAEG;AACH,MAAM,UAAU,cAAc,CAAI,MAAyC;IACzE,MAAM,IAAI,GAAG,cAAc,CAAI,MAAM,CAAC,CAAC;IAEvC,SAAS,KAAK,CAAC,KAAU;QACvB,IAAI,CAAC;YACH,wEAAwE;YACxE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,sCAAsC;YACtC,OAAO,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,KAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare enum PerformanceTimingKeys {
|
|
2
|
+
update_set_state_trigger = 0,
|
|
3
|
+
update_diff_vdom_start = 1,
|
|
4
|
+
update_diff_vdom_end = 2,
|
|
5
|
+
diff_vdom_start = 3,
|
|
6
|
+
diff_vdom_end = 4,
|
|
7
|
+
pack_changes_start = 5,
|
|
8
|
+
pack_changes_end = 6,
|
|
9
|
+
parse_changes_start = 7,
|
|
10
|
+
parse_changes_end = 8,
|
|
11
|
+
patch_changes_start = 9,
|
|
12
|
+
patch_changes_end = 10,
|
|
13
|
+
hydrate_parse_snapshot_start = 11,
|
|
14
|
+
hydrate_parse_snapshot_end = 12
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated used by old timing api(setState timing flag)
|
|
18
|
+
*/
|
|
19
|
+
declare const PerfSpecificKey = "__lynx_timing_flag";
|
|
20
|
+
declare let globalPipelineOptions: PipelineOptions | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated used by old timing api(setState timing flag)
|
|
23
|
+
*/
|
|
24
|
+
declare function markTimingLegacy(key: PerformanceTimingKeys, timingFlag_?: string): void;
|
|
25
|
+
declare function beginPipeline(needTimestamps: boolean, timingFlag?: string): void;
|
|
26
|
+
declare function setPipeline(pipeline: PipelineOptions | undefined): void;
|
|
27
|
+
declare function markTiming(timestampKey: PerformanceTimingKeys, force?: boolean): void;
|
|
28
|
+
declare function initTimingAPI(): void;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { options } from 'preact';
|
|
5
|
+
import { DIFF } from '../renderToOpcodes/constants.js';
|
|
6
|
+
import { __globalSnapshotPatch } from '../snapshotPatch.js';
|
|
7
|
+
var PerformanceTimingKeys;
|
|
8
|
+
(function (PerformanceTimingKeys) {
|
|
9
|
+
PerformanceTimingKeys[PerformanceTimingKeys["update_set_state_trigger"] = 0] = "update_set_state_trigger";
|
|
10
|
+
PerformanceTimingKeys[PerformanceTimingKeys["update_diff_vdom_start"] = 1] = "update_diff_vdom_start";
|
|
11
|
+
PerformanceTimingKeys[PerformanceTimingKeys["update_diff_vdom_end"] = 2] = "update_diff_vdom_end";
|
|
12
|
+
// update_set_state_trigger, update_diff_vdom_start and update_diff_vdom_end is deprecated
|
|
13
|
+
PerformanceTimingKeys[PerformanceTimingKeys["diff_vdom_start"] = 3] = "diff_vdom_start";
|
|
14
|
+
PerformanceTimingKeys[PerformanceTimingKeys["diff_vdom_end"] = 4] = "diff_vdom_end";
|
|
15
|
+
PerformanceTimingKeys[PerformanceTimingKeys["pack_changes_start"] = 5] = "pack_changes_start";
|
|
16
|
+
PerformanceTimingKeys[PerformanceTimingKeys["pack_changes_end"] = 6] = "pack_changes_end";
|
|
17
|
+
PerformanceTimingKeys[PerformanceTimingKeys["parse_changes_start"] = 7] = "parse_changes_start";
|
|
18
|
+
PerformanceTimingKeys[PerformanceTimingKeys["parse_changes_end"] = 8] = "parse_changes_end";
|
|
19
|
+
PerformanceTimingKeys[PerformanceTimingKeys["patch_changes_start"] = 9] = "patch_changes_start";
|
|
20
|
+
PerformanceTimingKeys[PerformanceTimingKeys["patch_changes_end"] = 10] = "patch_changes_end";
|
|
21
|
+
PerformanceTimingKeys[PerformanceTimingKeys["hydrate_parse_snapshot_start"] = 11] = "hydrate_parse_snapshot_start";
|
|
22
|
+
PerformanceTimingKeys[PerformanceTimingKeys["hydrate_parse_snapshot_end"] = 12] = "hydrate_parse_snapshot_end";
|
|
23
|
+
})(PerformanceTimingKeys || (PerformanceTimingKeys = {}));
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated used by old timing api(setState timing flag)
|
|
26
|
+
*/
|
|
27
|
+
const PerfSpecificKey = '__lynx_timing_flag';
|
|
28
|
+
let timingFlag;
|
|
29
|
+
let shouldMarkDiffVdomStart = false;
|
|
30
|
+
let shouldMarkDiffVdomEnd = false;
|
|
31
|
+
let globalPipelineOptions;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated used by old timing api(setState timing flag)
|
|
34
|
+
*/
|
|
35
|
+
function markTimingLegacy(key, timingFlag_) {
|
|
36
|
+
switch (key) {
|
|
37
|
+
case PerformanceTimingKeys.update_set_state_trigger: {
|
|
38
|
+
shouldMarkDiffVdomStart = true;
|
|
39
|
+
shouldMarkDiffVdomEnd = true;
|
|
40
|
+
timingFlag = timingFlag_;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case PerformanceTimingKeys.update_diff_vdom_start: {
|
|
44
|
+
/* v8 ignore start */
|
|
45
|
+
if (!shouldMarkDiffVdomStart) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
/* v8 ignore stop */
|
|
49
|
+
shouldMarkDiffVdomStart = false;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case PerformanceTimingKeys.update_diff_vdom_end: {
|
|
53
|
+
if (!shouldMarkDiffVdomEnd) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
shouldMarkDiffVdomEnd = false;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
lynx.getNativeApp().markTiming?.(timingFlag, PerformanceTimingKeys[key]);
|
|
61
|
+
}
|
|
62
|
+
function beginPipeline(needTimestamps, timingFlag) {
|
|
63
|
+
globalPipelineOptions = lynx.performance?._generatePipelineOptions?.();
|
|
64
|
+
if (globalPipelineOptions) {
|
|
65
|
+
globalPipelineOptions.needTimestamps = needTimestamps;
|
|
66
|
+
lynx.performance?._onPipelineStart?.(globalPipelineOptions.pipelineID);
|
|
67
|
+
if (timingFlag) {
|
|
68
|
+
lynx.performance?._bindPipelineIdWithTimingFlag?.(globalPipelineOptions.pipelineID, timingFlag);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function setPipeline(pipeline) {
|
|
73
|
+
globalPipelineOptions = pipeline;
|
|
74
|
+
}
|
|
75
|
+
function markTiming(timestampKey, force) {
|
|
76
|
+
if (globalPipelineOptions && (force || globalPipelineOptions.needTimestamps)) {
|
|
77
|
+
lynx.performance?._markTiming?.(globalPipelineOptions.pipelineID, PerformanceTimingKeys[timestampKey]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function initTimingAPI() {
|
|
81
|
+
const oldDiff = options[DIFF];
|
|
82
|
+
options[DIFF] = (vnode) => {
|
|
83
|
+
// check `__globalSnapshotPatch` to make sure this only runs after hydrate
|
|
84
|
+
if (__JS__ && __globalSnapshotPatch) {
|
|
85
|
+
if (!globalPipelineOptions) {
|
|
86
|
+
beginPipeline(false);
|
|
87
|
+
markTiming(PerformanceTimingKeys.diff_vdom_start, true);
|
|
88
|
+
}
|
|
89
|
+
if (shouldMarkDiffVdomStart) {
|
|
90
|
+
markTimingLegacy(PerformanceTimingKeys.update_diff_vdom_start);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
oldDiff?.(vnode);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
export { PerformanceTimingKeys, PerfSpecificKey, markTimingLegacy, initTimingAPI, beginPipeline, markTiming, setPipeline, globalPipelineOptions, };
|
|
100
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/lynx/performance.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,IAAK,qBAeJ;AAfD,WAAK,qBAAqB;IACxB,yGAAwB,CAAA;IACxB,qGAAsB,CAAA;IACtB,iGAAoB,CAAA;IACpB,0FAA0F;IAC1F,uFAAe,CAAA;IACf,mFAAa,CAAA;IACb,6FAAkB,CAAA;IAClB,yFAAgB,CAAA;IAChB,+FAAmB,CAAA;IACnB,2FAAiB,CAAA;IACjB,+FAAmB,CAAA;IACnB,4FAAiB,CAAA;IACjB,kHAA4B,CAAA;IAC5B,8GAA0B,CAAA;AAC5B,CAAC,EAfI,qBAAqB,KAArB,qBAAqB,QAezB;AAED;;GAEG;AACH,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAC7C,IAAI,UAA8B,CAAC;AACnC,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC,IAAI,qBAAkD,CAAC;AAEvD;;GAEG;AACH,SAAS,gBAAgB,CAAC,GAA0B,EAAE,WAAoB;IACxE,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,qBAAqB,CAAC,wBAAwB,CAAC,CAAC,CAAC;YACpD,uBAAuB,GAAG,IAAI,CAAC;YAC/B,qBAAqB,GAAG,IAAI,CAAC;YAC7B,UAAU,GAAG,WAAW,CAAC;YACzB,MAAM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,YAAY,CAAC,CAAC,CAAC;IACzG,CAAC;AACH,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAY,EAAE,EAAE;QAC/B,0EAA0E;QAC1E,IAAI,MAAM,IAAI,qBAAqB,EAAE,CAAC;YACpC,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC3B,aAAa,CAAC,KAAK,CAAC,CAAC;gBACrB,UAAU,CAAC,qBAAqB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;YAC1D,CAAC;YACD,IAAI,uBAAuB,EAAE,CAAC;gBAC5B,gBAAgB,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { render } from 'preact';
|
|
5
|
+
import { LifecycleConstant, NativeUpdateDataType } from '../lifecycleConstant.js';
|
|
6
|
+
import { PerformanceTimingKeys, beginPipeline, markTiming } from './performance.js';
|
|
7
|
+
import { BackgroundSnapshotInstance, hydrate } from '../backgroundSnapshot.js';
|
|
8
|
+
import { destroyBackground } from '../lifecycle/destroy.js';
|
|
9
|
+
import { commitPatchUpdate, genCommitTaskId, globalCommitTaskMap } from '../lifecycle/patchUpdate.js';
|
|
10
|
+
import { reloadBackground } from '../lifecycle/reload.js';
|
|
11
|
+
import { runWithForce } from '../lynx.js';
|
|
12
|
+
import { CHILDREN } from '../renderToOpcodes/constants.js';
|
|
13
|
+
import { __root } from '../root.js';
|
|
14
|
+
import { globalRefsToSet, updateBackgroundRefs } from '../snapshot/ref.js';
|
|
15
|
+
import { backgroundSnapshotInstanceManager } from '../snapshot.js';
|
|
16
|
+
import { destroyWorklet } from '../worklet/jsImpl.js';
|
|
17
|
+
function injectTt() {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
const tt = lynxCoreInject.tt;
|
|
20
|
+
tt.OnLifecycleEvent = OnLifecycleEvent;
|
|
21
|
+
tt.publishEvent = delayedPublishEvent;
|
|
22
|
+
tt.publicComponentEvent = delayedPublicComponentEvent;
|
|
23
|
+
tt.callDestroyLifetimeFun = () => {
|
|
24
|
+
destroyWorklet();
|
|
25
|
+
destroyBackground();
|
|
26
|
+
};
|
|
27
|
+
tt.updateGlobalProps = updateGlobalProps;
|
|
28
|
+
tt.updateCardData = updateCardData;
|
|
29
|
+
tt.onAppReload = reloadBackground;
|
|
30
|
+
tt.processCardConfig = () => {
|
|
31
|
+
// used to updateTheme, no longer rely on this function
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
let delayedLifecycleEvents;
|
|
35
|
+
async function OnLifecycleEvent([type, data]) {
|
|
36
|
+
const hasRootRendered = CHILDREN in __root;
|
|
37
|
+
// never called `render(<App/>, __root)`
|
|
38
|
+
// happens if user call `root.render()` async
|
|
39
|
+
if (!hasRootRendered) {
|
|
40
|
+
delayedLifecycleEvents ??= [];
|
|
41
|
+
delayedLifecycleEvents.push([type, data]);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (__PROFILE__) {
|
|
45
|
+
console.profile(`OnLifecycleEvent::${type}`);
|
|
46
|
+
}
|
|
47
|
+
switch (type) {
|
|
48
|
+
case LifecycleConstant.firstScreen: {
|
|
49
|
+
const { root: lepusSide, refPatch, jsReadyEventIdSwap } = data;
|
|
50
|
+
if (__PROFILE__) {
|
|
51
|
+
console.profile('hydrate');
|
|
52
|
+
}
|
|
53
|
+
beginPipeline(true, 'react_lynx_hydrate');
|
|
54
|
+
markTiming(PerformanceTimingKeys.hydrate_parse_snapshot_start);
|
|
55
|
+
const before = JSON.parse(lepusSide);
|
|
56
|
+
markTiming(PerformanceTimingKeys.hydrate_parse_snapshot_end);
|
|
57
|
+
markTiming(PerformanceTimingKeys.diff_vdom_start);
|
|
58
|
+
const snapshotPatch = hydrate(before, __root);
|
|
59
|
+
if (__PROFILE__) {
|
|
60
|
+
console.profileEnd();
|
|
61
|
+
}
|
|
62
|
+
markTiming(PerformanceTimingKeys.diff_vdom_end);
|
|
63
|
+
if (delayedEvents) {
|
|
64
|
+
delayedEvents.forEach((args) => {
|
|
65
|
+
const [handlerName, data] = args;
|
|
66
|
+
let [idStr, ...rest] = handlerName.split(':');
|
|
67
|
+
while (jsReadyEventIdSwap[idStr])
|
|
68
|
+
idStr = jsReadyEventIdSwap[idStr];
|
|
69
|
+
try {
|
|
70
|
+
publishEvent([idStr, ...rest].join(':'), data);
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
lynx.reportError(e);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
delayedEvents.length = 0;
|
|
77
|
+
}
|
|
78
|
+
lynxCoreInject.tt.publishEvent = publishEvent;
|
|
79
|
+
lynxCoreInject.tt.publicComponentEvent = publicComponentEvent;
|
|
80
|
+
if (__PROFILE__) {
|
|
81
|
+
console.profile('patchRef');
|
|
82
|
+
}
|
|
83
|
+
if (refPatch) {
|
|
84
|
+
globalRefsToSet.set(0, JSON.parse(refPatch));
|
|
85
|
+
updateBackgroundRefs(0);
|
|
86
|
+
}
|
|
87
|
+
if (__PROFILE__) {
|
|
88
|
+
console.profileEnd();
|
|
89
|
+
}
|
|
90
|
+
markTiming(PerformanceTimingKeys.pack_changes_start);
|
|
91
|
+
// console.debug("********** After hydration:");
|
|
92
|
+
// printSnapshotInstance(__root as BackgroundSnapshotInstance);
|
|
93
|
+
if (__PROFILE__) {
|
|
94
|
+
console.profile('commitChanges');
|
|
95
|
+
}
|
|
96
|
+
const commitTaskId = genCommitTaskId();
|
|
97
|
+
await commitPatchUpdate({ snapshotPatch }, { commitTaskId, isHydration: true });
|
|
98
|
+
updateBackgroundRefs(commitTaskId);
|
|
99
|
+
globalCommitTaskMap.forEach((commitTask, id) => {
|
|
100
|
+
if (id > commitTaskId) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
commitTask();
|
|
104
|
+
globalCommitTaskMap.delete(id);
|
|
105
|
+
});
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
case LifecycleConstant.globalEventFromLepus: {
|
|
109
|
+
const [eventName, params] = data;
|
|
110
|
+
lynx.getJSModule('GlobalEventEmitter').trigger(eventName, params);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case LifecycleConstant.ref: {
|
|
114
|
+
const { refPatch, commitTaskId } = data;
|
|
115
|
+
if (commitTaskId) {
|
|
116
|
+
globalRefsToSet.set(commitTaskId, JSON.parse(refPatch));
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
globalRefsToSet.set(0, JSON.parse(refPatch));
|
|
120
|
+
updateBackgroundRefs(0);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (__PROFILE__) {
|
|
126
|
+
console.profileEnd();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function flushDelayedLifecycleEvents() {
|
|
130
|
+
if (delayedLifecycleEvents) {
|
|
131
|
+
delayedLifecycleEvents.forEach((e) => {
|
|
132
|
+
try {
|
|
133
|
+
OnLifecycleEvent(e);
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
lynx.reportError(e);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
delayedLifecycleEvents.length = 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function publishEvent(handlerName, data) {
|
|
143
|
+
// TODO: delay js events until js ready
|
|
144
|
+
lynxCoreInject.tt.callBeforePublishEvent?.(data);
|
|
145
|
+
const eventHandler = backgroundSnapshotInstanceManager.getValueBySign(handlerName);
|
|
146
|
+
if (eventHandler) {
|
|
147
|
+
try {
|
|
148
|
+
eventHandler(data);
|
|
149
|
+
}
|
|
150
|
+
catch (e) {
|
|
151
|
+
lynx.reportError(e);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function publicComponentEvent(_componentId, handlerName, data) {
|
|
156
|
+
publishEvent(handlerName, data);
|
|
157
|
+
}
|
|
158
|
+
let delayedEvents;
|
|
159
|
+
function delayedPublishEvent(handlerName, data) {
|
|
160
|
+
delayedEvents ??= [];
|
|
161
|
+
delayedEvents.push([handlerName, data]);
|
|
162
|
+
}
|
|
163
|
+
function delayedPublicComponentEvent(_componentId, handlerName, data) {
|
|
164
|
+
delayedPublishEvent(handlerName, data);
|
|
165
|
+
}
|
|
166
|
+
function updateGlobalProps(newData) {
|
|
167
|
+
Object.assign(lynx.__globalProps, newData);
|
|
168
|
+
// Our purpose is to make sure SYNC setState inside `emit`'s listeners
|
|
169
|
+
// can be batched with updateFromRoot
|
|
170
|
+
// This is already done because updateFromRoot will consume all dirty flags marked by
|
|
171
|
+
// the setState, and setState's flush will be a noop. No extra diffs will be needed.
|
|
172
|
+
Promise.resolve().then(() => {
|
|
173
|
+
runWithForce(() => render(__root.__jsx, __root));
|
|
174
|
+
});
|
|
175
|
+
lynxCoreInject.tt.GlobalEventEmitter.emit('onGlobalPropsChanged');
|
|
176
|
+
}
|
|
177
|
+
function updateCardData(newData, options) {
|
|
178
|
+
const { ['__lynx_timing_flag']: performanceTimingFlag, ...restNewData } = newData;
|
|
179
|
+
if (performanceTimingFlag) {
|
|
180
|
+
lynx.reportError(new Error(`Received unsupported updateData with \`__lynx_timing_flag\` (value "${performanceTimingFlag}"), the timing flag is ignored`));
|
|
181
|
+
}
|
|
182
|
+
const { type = NativeUpdateDataType.UPDATE } = options || {};
|
|
183
|
+
if (type == NativeUpdateDataType.RESET) {
|
|
184
|
+
// @ts-ignore
|
|
185
|
+
lynx.__initData = {};
|
|
186
|
+
}
|
|
187
|
+
// COW when modify `lynx.__initData` to make sure Provider & Consumer works
|
|
188
|
+
// @ts-ignore
|
|
189
|
+
lynx.__initData = Object.assign({}, lynx.__initData, restNewData);
|
|
190
|
+
lynxCoreInject.tt.GlobalEventEmitter.emit('onDataChanged');
|
|
191
|
+
}
|
|
192
|
+
export { injectTt, flushDelayedLifecycleEvents, delayedLifecycleEvents };
|
|
193
|
+
//# sourceMappingURL=tt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt.js","sourceRoot":"","sources":["../../src/lynx/tt.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,iCA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