@lynx-js/react 0.127.0 → 0.128.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 +18 -0
- package/components/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -14
- package/refresh/.turbo/turbo-build.log +1 -1
- package/runtime/__test__/element-template/internal/legacy-internal-guardrail.test.ts +1 -1
- package/runtime/__test__/element-template/runtime/background/event/compiled-fixtures.test.tsx +39 -48
- package/runtime/__test__/element-template/runtime/background/main-thread-function/compiled-fixtures.test.tsx +7 -9
- package/runtime/__test__/element-template/runtime/render/render-transform.contract.test.ts +6 -3
- package/runtime/__test__/element-template/test-utils/mock/globals.js +6 -0
- package/runtime/__test__/element-template/vitest.config.ts +4 -0
- package/runtime/__test__/worklet-runtime/initEntry.test.js +109 -0
- package/runtime/__test__/worklet-runtime/object-methods.test.js +2 -3
- package/runtime/lazy/element-template-internal.js +0 -1
- package/runtime/lazy/internal.js +0 -1
- package/runtime/lib/core/background-function/exec-map.js.map +1 -1
- package/runtime/lib/core/background-function/handle.js.map +1 -1
- package/runtime/lib/core/background-function/run-on-background.js.map +1 -1
- package/runtime/lib/core/capture-main-thread-object.js.map +1 -1
- package/runtime/lib/core/commit-context.js.map +1 -1
- package/runtime/lib/core/compat/legacy-react-runtime.js.map +1 -1
- package/runtime/lib/core/compat/lynxComponent.js.map +1 -1
- package/runtime/lib/core/component.js.map +1 -1
- package/runtime/lib/core/forceRootRender.js.map +1 -1
- package/runtime/lib/core/globalProps.js.map +1 -1
- package/runtime/lib/core/hooks/mainThread.js.map +1 -1
- package/runtime/lib/core/hooks/mainThreadImpl.js.map +1 -1
- package/runtime/lib/core/hooks/react.js.map +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js.map +1 -1
- package/runtime/lib/core/initData.js.map +1 -1
- package/runtime/lib/core/lynx/dynamic-import.js.map +1 -1
- package/runtime/lib/core/lynx/lazy-bundle.js.map +1 -1
- package/runtime/lib/core/lynx/runtime-backend.js.map +1 -1
- package/runtime/lib/core/lynx/runtime-version.js.map +1 -1
- package/runtime/lib/core/lynx-data-processors.js.map +1 -1
- package/runtime/lib/core/lynx-page-data.js.map +1 -1
- package/runtime/lib/core/lynx-update-data.js.map +1 -1
- package/runtime/lib/core/main-thread-function.js.map +1 -1
- package/runtime/lib/core/main-thread-object-handle-registry.js.map +1 -1
- package/runtime/lib/core/main-thread-object.js +1 -4
- package/runtime/lib/core/main-thread-object.js.map +1 -1
- package/runtime/lib/core/main-thread-ref-id.js.map +1 -1
- package/runtime/lib/core/main-thread-ref-init-value.js.map +1 -1
- package/runtime/lib/core/main-thread-ref.js.map +1 -1
- package/runtime/lib/core/mts-capability.js.map +1 -1
- package/runtime/lib/core/performance.js.map +1 -1
- package/runtime/lib/core/ref.js.map +1 -1
- package/runtime/lib/core/reload-version.js.map +1 -1
- package/runtime/lib/core/runtime-destroy.js.map +1 -1
- package/runtime/lib/core/thread-function-call/main-thread.js.map +1 -1
- package/runtime/lib/core/thread-function-call/return-value.js.map +1 -1
- package/runtime/lib/document.js.map +1 -1
- package/runtime/lib/element-template/background/attr-slots.js.map +1 -1
- package/runtime/lib/element-template/background/commit-context.js.map +1 -1
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/destroy.js.map +1 -1
- package/runtime/lib/element-template/background/document.js.map +1 -1
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/background/manager.js.map +1 -1
- package/runtime/lib/element-template/background/page-root-hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/render-scope.js.map +1 -1
- package/runtime/lib/element-template/client/root.js.map +1 -1
- package/runtime/lib/element-template/debug/alog.js.map +1 -1
- package/runtime/lib/element-template/debug/elementPAPICall.js.map +1 -1
- package/runtime/lib/element-template/debug/profile.js.map +1 -1
- package/runtime/lib/element-template/hydration-map.js.map +1 -1
- package/runtime/lib/element-template/index.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +0 -1
- package/runtime/lib/element-template/internal.js +0 -1
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/jsx-dev-runtime/index.js.map +1 -1
- package/runtime/lib/element-template/jsx-runtime/index.js.map +1 -1
- package/runtime/lib/element-template/lynx/env.js.map +1 -1
- package/runtime/lib/element-template/lynx/performance.js.map +1 -1
- package/runtime/lib/element-template/native/callDestroyLifetimeFun.js.map +1 -1
- package/runtime/lib/element-template/native/index.js.map +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
- package/runtime/lib/element-template/native/mts-destroy.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js.map +1 -1
- package/runtime/lib/element-template/native/reload-background.js.map +1 -1
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/event-value.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/event.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/ref.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
- package/runtime/lib/element-template/protocol/lifecycle-constant.js.map +1 -1
- package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
- package/runtime/lib/element-template/protocol/page.js.map +1 -1
- package/runtime/lib/element-template/protocol/template-type.js.map +1 -1
- package/runtime/lib/element-template/protocol/types.js.map +1 -1
- package/runtime/lib/element-template/protocol/update-event.js.map +1 -1
- package/runtime/lib/element-template/runtime/list/list.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/authored-page.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/page.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/root-instance.js.map +1 -1
- package/runtime/lib/element-template/runtime/patch.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/create-rendered-host.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/host.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-components.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-direct.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- 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.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-function.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/registry.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/typed-attributes.js.map +1 -1
- package/runtime/lib/element-template/runtime-marker.js.map +1 -1
- package/runtime/lib/index.js.map +1 -1
- package/runtime/lib/internal.d.ts +0 -1
- package/runtime/lib/internal.js +0 -1
- package/runtime/lib/internal.js.map +1 -1
- package/runtime/lib/lynx-api.js.map +1 -1
- package/runtime/lib/lynx.js.map +1 -1
- package/runtime/lib/root.js.map +1 -1
- package/runtime/lib/runtime-marker.js.map +1 -1
- package/runtime/lib/shared/attribute-name.js.map +1 -1
- package/runtime/lib/shared/component-stack.js.map +1 -1
- package/runtime/lib/shared/index-map.js.map +1 -1
- package/runtime/lib/shared/profile.js.map +1 -1
- package/runtime/lib/shared/render-constants.js.map +1 -1
- package/runtime/lib/snapshot/alog/elementPAPICall.js.map +1 -1
- package/runtime/lib/snapshot/alog/index.js.map +1 -1
- package/runtime/lib/snapshot/alog/render.js.map +1 -1
- package/runtime/lib/snapshot/compat/componentIs.js.map +1 -1
- package/runtime/lib/snapshot/debug/debug.js.map +1 -1
- package/runtime/lib/snapshot/debug/describeInvalidValue.js.map +1 -1
- package/runtime/lib/snapshot/debug/formatPatch.js.map +1 -1
- package/runtime/lib/snapshot/debug/printSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/debug/profileHooks.js.map +1 -1
- package/runtime/lib/snapshot/debug/vnodeSource.js.map +1 -1
- package/runtime/lib/snapshot/gesture/processGesture.js.map +1 -1
- package/runtime/lib/snapshot/gesture/processGestureBagkround.js.map +1 -1
- package/runtime/lib/snapshot/gesture/types.js.map +1 -1
- package/runtime/lib/snapshot/index.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/constant.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/destroy.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/event/delayEvents.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/event/delayLifecycleEvents.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/event/firstScreenSync.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/isRendering.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/error.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/globalState.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/isMainThreadHydrating.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/nodesRefApply.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/snapshotPatch.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/snapshotPatchApply.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/ref/delay.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/reload.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/render.js.map +1 -1
- package/runtime/lib/snapshot/list/list.js.map +1 -1
- package/runtime/lib/snapshot/list/listUpdateInfo.js.map +1 -1
- package/runtime/lib/snapshot/list/pendingListUpdates.js.map +1 -1
- package/runtime/lib/snapshot/lynx/calledByNative.js.map +1 -1
- package/runtime/lib/snapshot/lynx/children.js.map +1 -1
- package/runtime/lib/snapshot/lynx/element.js.map +1 -1
- package/runtime/lib/snapshot/lynx/env.js.map +1 -1
- package/runtime/lib/snapshot/lynx/injectLepusMethods.js.map +1 -1
- package/runtime/lib/snapshot/lynx/lazyBundleConstants.js.map +1 -1
- package/runtime/lib/snapshot/lynx/nodesRef.js.map +1 -1
- package/runtime/lib/snapshot/lynx/performance.js.map +1 -1
- package/runtime/lib/snapshot/lynx/portals.js.map +1 -1
- package/runtime/lib/snapshot/lynx/portalsPending.js.map +1 -1
- package/runtime/lib/snapshot/lynx/prepareLazyBundleMTS.js.map +1 -1
- package/runtime/lib/snapshot/lynx/runWithForce.js.map +1 -1
- package/runtime/lib/snapshot/lynx/suspense.js.map +1 -1
- package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
- package/runtime/lib/snapshot/renderToOpcodes/hydrate.js.map +1 -1
- package/runtime/lib/snapshot/renderToOpcodes/index.js.map +1 -1
- package/runtime/lib/snapshot/renderToOpcodes/opcodes.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/constants.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/definition.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/dynamicPartType.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/event.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/gesture.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/index.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/list.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/platformInfo.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/reconstructInstanceTree.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/ref.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshotCreatorMap.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshotInstanceHydrationMap.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshotInstanceManager.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/spread.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/types.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/utils.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/workletEvent.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/workletRef.js.map +1 -1
- package/runtime/lib/snapshot/worklet/call/runOnMainThread.js.map +1 -1
- package/runtime/lib/snapshot/worklet/ctx.js.map +1 -1
- package/runtime/lib/snapshot/worklet/destroy.js.map +1 -1
- package/runtime/lib/snapshot/worklet/functionality.js.map +1 -1
- package/runtime/lib/snapshot/worklet/hmr.js.map +1 -1
- package/runtime/lib/snapshot/worklet/ref/updateInitValue.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/lib/utils.js.map +1 -1
- package/runtime/lib/worklet-runtime/api/animation/animation.js.map +1 -1
- package/runtime/lib/worklet-runtime/api/animation/effect.js.map +1 -1
- package/runtime/lib/worklet-runtime/api/element.js.map +1 -1
- package/runtime/lib/worklet-runtime/api/lepusQuerySelector.js.map +1 -1
- package/runtime/lib/worklet-runtime/api/lynxApi.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/events.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/index.d.ts +0 -1
- package/runtime/lib/worklet-runtime/bindings/index.js +0 -1
- package/runtime/lib/worklet-runtime/bindings/index.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/types.js.map +1 -1
- package/runtime/lib/worklet-runtime/delayRunOnBackground.js.map +1 -1
- package/runtime/lib/worklet-runtime/delayWorkletEvent.js.map +1 -1
- package/runtime/lib/worklet-runtime/eomImpl.js.map +1 -1
- package/runtime/lib/worklet-runtime/eventPropagation.js.map +1 -1
- package/runtime/lib/worklet-runtime/global.js.map +1 -1
- package/runtime/lib/worklet-runtime/hydrate.js.map +1 -1
- package/runtime/lib/worklet-runtime/index.js +6 -0
- package/runtime/lib/worklet-runtime/index.js.map +1 -1
- package/runtime/lib/worklet-runtime/jsFunctionLifecycle.js.map +1 -1
- package/runtime/lib/worklet-runtime/listeners.js.map +1 -1
- package/runtime/lib/worklet-runtime/mainThreadObject.js.map +1 -1
- package/runtime/lib/worklet-runtime/runOnMainThread.js.map +1 -1
- package/runtime/lib/worklet-runtime/utils/mainThreadFlushLoopGuard.js.map +1 -1
- package/runtime/lib/worklet-runtime/utils/profile.js.map +1 -1
- package/runtime/lib/worklet-runtime/utils/version.js.map +1 -1
- package/runtime/lib/worklet-runtime/workletRef.js.map +1 -1
- package/runtime/lib/worklet-runtime/workletRuntime.js.map +1 -1
- package/runtime/src/core/main-thread-object.ts +1 -8
- package/runtime/src/element-template/internal.ts +0 -1
- package/runtime/src/internal.ts +0 -1
- package/runtime/src/worklet-runtime/bindings/index.ts +0 -1
- package/runtime/src/worklet-runtime/index.ts +7 -0
- package/runtime/tsconfig.json +2 -0
- package/runtime/vitest.config.ts +4 -0
- package/testing-library/.turbo/turbo-build.log +11 -11
- package/testing-library/dist/env/index.js +3 -15
- package/testing-library/dist/plugins/index.js +10 -0
- package/testing-library/dist/rstest-config.js +15 -0
- package/testing-library/dist/setupFiles/common/worklet-runtime-init.js +11 -0
- package/testing-library/rstest.config.ts +3 -0
- package/testing-library/src/__tests__/rstest-config.test.js +34 -1
- package/testing-library/src/__tests__/worklet.test.jsx +41 -32
- package/testing-library/src/plugins/vitest.ts +5 -1
- package/testing-library/src/rstest-config.ts +17 -1
- package/testing-library/src/setupFiles/common/worklet-runtime-init.js +22 -0
- package/transform/.turbo/turbo-build$colon$wasm.log +113 -123
- package/transform/__test__/defines.spec.js +80 -12
- package/transform/__test__/fixture.spec.js +166 -48
- package/transform/__test__/object-methods.spec.js +1 -3
- package/transform/crates/swc_plugin_worklet/gen_stmt.rs +26 -10
- package/transform/crates/swc_plugin_worklet/lib.rs +132 -148
- package/transform/crates/swc_plugin_worklet/napi.rs +10 -1
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js +4 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_expose_object_method_capture_channels_lepus.js +3 -5
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js +4 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_lepus.js +3 -5
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js +4 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_computed_object_method_key_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_globals.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_object_method_local_decls_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_type_annotations.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_destructure_from_closure.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_catch_clause_params.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_idents_inside_of_ctx.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_recursively.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_preserve_main_thread_objects_in_class_lepus.js +6 -6
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_arrow_function.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_function_expr.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js +4 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_alias.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general_mixed.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets.js +3 -5
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets_in_func.js +3 -5
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_object_methods_lepus.js +2 -4
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_lepus.js +2 -4
- package/transform/dist/wasm.cjs +1 -1
- package/transform/index.d.ts +25 -1
- package/transform/src/lib.rs +193 -23
- package/transform/swc-plugin-reactlynx/.turbo/turbo-build.log +30 -31
- package/transform/swc-plugin-reactlynx/swc_plugin_reactlynx.wasm +0 -0
- package/transform/swc-plugin-reactlynx-compat/.turbo/turbo-build.log +195 -217
- package/runtime/lib/worklet-runtime/bindings/loadRuntime.d.ts +0 -8
- package/runtime/lib/worklet-runtime/bindings/loadRuntime.js +0 -23
- package/runtime/lib/worklet-runtime/bindings/loadRuntime.js.map +0 -1
- package/runtime/src/worklet-runtime/bindings/loadRuntime.ts +0 -25
- package/runtime/worklet-runtime/dev.js +0 -775
- package/runtime/worklet-runtime/main.js +0 -1
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_inner_ident.js +0 -13
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_outer_ident.js +0 -13
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let Y = {
|
|
4
3
|
_wkltId: "a77b:test:1"
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(n) {
|
|
5
|
+
__registerWorklet("main-thread", "a77b:test:1", function(n) {
|
|
8
6
|
const Y = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
9
7
|
"main thread";
|
|
10
8
|
let a = 123;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let onTapLepus = {
|
|
4
3
|
_c: {
|
|
5
4
|
g
|
|
6
5
|
},
|
|
7
6
|
_wkltId: "a123:test:1"
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
8
|
+
__registerWorklet("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
11
9
|
const onTapLepus = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
12
10
|
let { g } = this["_c"];
|
|
13
11
|
"main thread";
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let onTapLepus = {
|
|
4
3
|
_wkltId: "a123:test:1"
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
5
|
+
__registerWorklet("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
8
6
|
const onTapLepus = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
9
7
|
"main thread";
|
|
10
8
|
if (true) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let X = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1,
|
|
@@ -9,8 +8,7 @@ let X = {
|
|
|
9
8
|
},
|
|
10
9
|
_wkltId: "a77b:test:1"
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function() {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function() {
|
|
14
12
|
const X = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
let { y1, y2, z1, z2 } = this["_c"];
|
|
16
14
|
"main thread";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
2
|
+
import { captureMainThreadObject as __captureMainThreadObject } from "@lynx-js/react";
|
|
3
|
+
var captureMainThreadObject = __captureMainThreadObject;
|
|
3
4
|
class App extends Component {
|
|
4
5
|
value: MotionValue<number>;
|
|
5
6
|
ref: MainThreadRef<number>;
|
|
@@ -36,8 +37,7 @@ class App extends Component {
|
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function() {
|
|
40
|
+
__registerWorklet("main-thread", "a123:test:1", function() {
|
|
41
41
|
this["onTap"] = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
42
42
|
"main thread";
|
|
43
43
|
this.value.get();
|
|
@@ -47,11 +47,11 @@ __workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1",
|
|
|
47
47
|
this.value["get"]();
|
|
48
48
|
return this.ref.current;
|
|
49
49
|
});
|
|
50
|
-
|
|
50
|
+
__registerWorklet("main-thread", "a123:test:2", function() {
|
|
51
51
|
"main thread";
|
|
52
52
|
return this.value.get();
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
__registerWorklet("main-thread", "a123:test:3", function() {
|
|
55
55
|
this["onStatic"] = lynxWorkletImpl._workletMap["a123:test:3"].bind(this);
|
|
56
56
|
"main thread";
|
|
57
57
|
return this.value.get();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
import { sharedRuntime } from './utils.js' with {
|
|
4
3
|
runtime: "shared"
|
|
5
4
|
};
|
|
@@ -12,8 +11,7 @@ let worklet = {
|
|
|
12
11
|
y1: this.y1
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
|
-
|
|
16
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event: Event) {
|
|
14
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event: Event) {
|
|
17
15
|
const worklet = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
18
16
|
let { y1 } = this["_c"];
|
|
19
17
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let X = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1,
|
|
@@ -7,8 +6,7 @@ let X = {
|
|
|
7
6
|
},
|
|
8
7
|
_wkltId: "a77b:test:1"
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
9
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
12
10
|
let { y1, y2 } = this["_c"];
|
|
13
11
|
"main thread";
|
|
14
12
|
console.log(y1[y2 + 1]);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
export default {
|
|
4
3
|
_c: {
|
|
5
4
|
x
|
|
6
5
|
},
|
|
7
6
|
_wkltId: "a123:test:1"
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function(exposureArgs) {
|
|
8
|
+
__registerWorklet("main-thread", "a123:test:1", function(exposureArgs) {
|
|
11
9
|
let { x } = this["_c"];
|
|
12
10
|
'main thread';
|
|
13
11
|
console.log('useExposure2');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let X = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1,
|
|
@@ -7,8 +6,7 @@ let X = {
|
|
|
7
6
|
},
|
|
8
7
|
_wkltId: "a77b:test:1"
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
9
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
12
10
|
let { y1, y2 } = this["_c"];
|
|
13
11
|
"main thread";
|
|
14
12
|
console.log(y1[y2 + 1]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
class App extends Component {
|
|
4
3
|
a = 1;
|
|
5
4
|
onTapLepus = {
|
|
@@ -9,8 +8,7 @@ class App extends Component {
|
|
|
9
8
|
}
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
14
12
|
this["onTapLepus"] = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
"main thread";
|
|
16
14
|
console.log(this.a);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let a = 1;
|
|
4
3
|
class App extends Component {
|
|
5
4
|
onTapLepus = {
|
|
@@ -12,8 +11,7 @@ class App extends Component {
|
|
|
12
11
|
}
|
|
13
12
|
};
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
14
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
17
15
|
let { a } = this["_c"];
|
|
18
16
|
"main thread";
|
|
19
17
|
console.log(a);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let a = 1;
|
|
4
3
|
class App extends Component {
|
|
5
4
|
static onTapLepus = {
|
|
@@ -9,8 +8,7 @@ class App extends Component {
|
|
|
9
8
|
_wkltId: "a77b:test:1"
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
14
12
|
this["onTapLepus"] = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
let { a } = this["_c"];
|
|
16
14
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let a = 1;
|
|
4
3
|
class App extends Component {
|
|
5
4
|
static onTapLepus = {
|
|
@@ -9,8 +8,7 @@ class App extends Component {
|
|
|
9
8
|
_wkltId: "a77b:test:1"
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
14
12
|
let { a } = this["_c"];
|
|
15
13
|
"main thread";
|
|
16
14
|
console.log(a);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let onTapLepus = {
|
|
4
3
|
_wkltId: "a123:test:1",
|
|
5
4
|
_jsFn: {
|
|
@@ -14,8 +13,7 @@ let onTapLepus = {
|
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
16
|
+
__registerWorklet("main-thread", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
19
17
|
const onTapLepus = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
20
18
|
let { _jsFn1, _jsFn2, _jsFn3 } = this["_jsFn"];
|
|
21
19
|
"main thread";
|
package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
2
|
+
import { captureMainThreadObject as __captureMainThreadObject } from "@lynx-js/react";
|
|
3
|
+
var captureMainThreadObject = __captureMainThreadObject;
|
|
3
4
|
let X = {
|
|
4
5
|
_c: {
|
|
5
6
|
y1,
|
|
@@ -15,8 +16,7 @@ let X = {
|
|
|
15
16
|
},
|
|
16
17
|
_wkltId: "a77b:test:1"
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
19
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
20
20
|
const X = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
21
21
|
let { y1, y2, y3, y4, y8, y5, y6, y7 } = this["_c"];
|
|
22
22
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let worklet = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1
|
|
@@ -9,8 +8,7 @@ let worklet = {
|
|
|
9
8
|
y1: this.y1
|
|
10
9
|
}
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event: Event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event: Event) {
|
|
14
12
|
const worklet = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
let { y1 } = this["_c"];
|
|
16
14
|
"main-thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let worklet = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1
|
|
@@ -9,8 +8,7 @@ let worklet = {
|
|
|
9
8
|
y1: this.y1
|
|
10
9
|
}
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event: Event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event: Event) {
|
|
14
12
|
const worklet = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
let { y1 } = this["_c"];
|
|
16
14
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let worklet = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1
|
|
@@ -9,8 +8,7 @@ let worklet = {
|
|
|
9
8
|
y1: this.y1
|
|
10
9
|
}
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event: Event) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event: Event) {
|
|
14
12
|
const worklet = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
15
13
|
let { y1 } = this["_c"];
|
|
16
14
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let X = {
|
|
4
3
|
_c: {
|
|
5
4
|
y1,
|
|
@@ -14,14 +13,13 @@ let Y = {
|
|
|
14
13
|
},
|
|
15
14
|
_wkltId: "a77b:test:2"
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
16
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
19
17
|
const X = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
20
18
|
let { y1, y2 } = this["_c"];
|
|
21
19
|
"main thread";
|
|
22
20
|
console.log(y1[y2 + 1]);
|
|
23
21
|
});
|
|
24
|
-
|
|
22
|
+
__registerWorklet("main-thread", "a77b:test:2", function(event) {
|
|
25
23
|
const Y = lynxWorkletImpl._workletMap["a77b:test:2"].bind(this);
|
|
26
24
|
let { z1, z2 } = this["_c"];
|
|
27
25
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
function App() {
|
|
4
3
|
let X = {
|
|
5
4
|
_c: {
|
|
@@ -16,14 +15,13 @@ function App() {
|
|
|
16
15
|
_wkltId: "a77b:test:2"
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(event) {
|
|
18
|
+
__registerWorklet("main-thread", "a77b:test:1", function(event) {
|
|
21
19
|
const X = lynxWorkletImpl._workletMap["a77b:test:1"].bind(this);
|
|
22
20
|
let { y1, y2 } = this["_c"];
|
|
23
21
|
"main thread";
|
|
24
22
|
console.log(y1[y2 + 1]);
|
|
25
23
|
});
|
|
26
|
-
|
|
24
|
+
__registerWorklet("main-thread", "a77b:test:2", function(event) {
|
|
27
25
|
const Y = lynxWorkletImpl._workletMap["a77b:test:2"].bind(this);
|
|
28
26
|
let { z1, z2 } = this["_c"];
|
|
29
27
|
"main thread";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
import { create } from './shared.js' with {
|
|
4
3
|
runtime: "shared"
|
|
5
4
|
};
|
|
@@ -9,8 +8,7 @@ const valueType = defineMainThreadObjectType({
|
|
|
9
8
|
_wkltId: "a77b:test:1"
|
|
10
9
|
}
|
|
11
10
|
});
|
|
12
|
-
|
|
13
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a77b:test:1", function(initialValue: number) {
|
|
11
|
+
__registerWorklet("main-thread", "a77b:test:1", function(initialValue: number) {
|
|
14
12
|
"main thread";
|
|
15
13
|
return create(initialValue);
|
|
16
14
|
});
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
1
|
+
import { registerWorklet as __registerWorklet } from "@lynx-js/react/worklet-runtime/init";
|
|
3
2
|
let onTapLepus = {
|
|
4
3
|
_c: {
|
|
5
4
|
a
|
|
6
5
|
},
|
|
7
6
|
_wkltId: "a123:test:1"
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
__workletRuntimeLoaded && registerWorkletInternal("ui", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
8
|
+
__registerWorklet("ui", "a123:test:1", function(event: ReactLynx.Worklet.ITouchEvent) {
|
|
11
9
|
const onTapLepus = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
12
10
|
let { a } = this["_c"];
|
|
13
11
|
"use worklet";
|