@lynx-js/react 0.126.2 → 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 +36 -0
- package/components/tsconfig.tsbuildinfo +1 -1
- package/docs/directives.md +90 -0
- package/docs/global-events.md +50 -0
- package/docs/import-attributes.md +43 -0
- package/docs/macros.md +285 -0
- package/package.json +7 -14
- package/refresh/.turbo/turbo-build.log +2 -2
- package/refresh/dist/index.js +26 -6
- package/refresh/package.json +1 -1
- package/runtime/__test__/core/main-thread-object.test.js +149 -0
- package/runtime/__test__/element-template/fixtures/background/main-thread-function/run-on-main-thread/index.tsx +26 -3
- package/runtime/__test__/element-template/imports/main-thread-object-api.test.ts +10 -0
- package/runtime/__test__/element-template/internal/legacy-internal-guardrail.test.ts +4 -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 +11 -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__/snapshot/ctxNotFound.test.ts +271 -0
- package/runtime/__test__/snapshot/event.test.jsx +7 -7
- package/runtime/__test__/snapshot/lazy.test.js +73 -1
- package/runtime/__test__/snapshot/lynx/portals.test.jsx +75 -37
- package/runtime/__test__/snapshot/snapshotPatch.test.jsx +59 -47
- package/runtime/__test__/snapshot/spread.test.jsx +10 -10
- package/runtime/__test__/snapshot/worklet/main-thread-object.test.jsx +306 -0
- package/runtime/__test__/snapshot/worklet/workletRef.test.jsx +1 -0
- package/runtime/__test__/worklet-runtime/initEntry.test.js +109 -0
- package/runtime/__test__/worklet-runtime/mainThreadObject.test.js +182 -0
- package/runtime/__test__/worklet-runtime/object-methods.test.js +59 -0
- package/runtime/__test__/worklet-runtime/workletRef.test.js +362 -2
- package/runtime/__test__/worklet-runtime/workletRuntime.test.js +246 -1
- package/runtime/lazy/compat.js +2 -0
- package/runtime/lazy/element-template-internal.js +1 -1
- package/runtime/lazy/element-template.js +2 -0
- package/runtime/lazy/internal.js +2 -1
- package/runtime/lazy/react.js +2 -0
- 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.d.ts +16 -0
- package/runtime/lib/core/background-function/run-on-background.js +16 -0
- package/runtime/lib/core/background-function/run-on-background.js.map +1 -1
- package/runtime/lib/core/capture-main-thread-object.d.ts +1 -0
- package/runtime/lib/core/capture-main-thread-object.js +16 -0
- package/runtime/lib/core/capture-main-thread-object.js.map +1 -0
- 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.d.ts +2 -0
- 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.d.ts +4 -0
- package/runtime/lib/core/hooks/react.js +4 -0
- package/runtime/lib/core/hooks/react.js.map +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.d.ts +2 -0
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js +2 -0
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js.map +1 -1
- package/runtime/lib/core/initData.d.ts +2 -0
- package/runtime/lib/core/initData.js +2 -0
- 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.d.ts +3 -0
- package/runtime/lib/core/main-thread-object-handle-registry.js +17 -0
- package/runtime/lib/core/main-thread-object-handle-registry.js.map +1 -0
- package/runtime/lib/core/main-thread-object.d.ts +77 -0
- package/runtime/lib/core/main-thread-object.js +258 -0
- package/runtime/lib/core/main-thread-object.js.map +1 -0
- package/runtime/lib/core/main-thread-ref-id.d.ts +1 -0
- package/runtime/lib/core/main-thread-ref-id.js +14 -0
- package/runtime/lib/core/main-thread-ref-id.js.map +1 -0
- package/runtime/lib/core/main-thread-ref-init-value.d.ts +1 -1
- package/runtime/lib/core/main-thread-ref-init-value.js +4 -2
- package/runtime/lib/core/main-thread-ref-init-value.js.map +1 -1
- package/runtime/lib/core/main-thread-ref.d.ts +4 -0
- package/runtime/lib/core/main-thread-ref.js +5 -8
- 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.d.ts +2 -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 +1 -1
- package/runtime/lib/element-template/internal.js +1 -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.d.ts +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 +1 -1
- package/runtime/lib/internal.js +1 -1
- package/runtime/lib/internal.js.map +1 -1
- package/runtime/lib/lynx-api.d.ts +34 -0
- package/runtime/lib/lynx-api.js +21 -0
- package/runtime/lib/lynx-api.js.map +1 -1
- package/runtime/lib/lynx.js +4 -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.d.ts +11 -1
- package/runtime/lib/snapshot/lifecycle/patch/error.js +24 -16
- 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.d.ts +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/snapshotPatchApply.js +29 -7
- package/runtime/lib/snapshot/lifecycle/patch/snapshotPatchApply.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js +2 -2
- 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.d.ts +2 -0
- package/runtime/lib/snapshot/lynx/children.js.map +1 -1
- package/runtime/lib/snapshot/lynx/element.d.ts +8 -0
- package/runtime/lib/snapshot/lynx/element.js +4 -0
- 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.d.ts +2 -0
- package/runtime/lib/snapshot/worklet/call/runOnMainThread.js +2 -0
- 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.d.ts +3 -3
- package/runtime/lib/worklet-runtime/bindings/bindings.js +9 -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.d.ts +3 -6
- 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 +26 -7
- 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.d.ts +8 -0
- package/runtime/lib/worklet-runtime/mainThreadObject.js +67 -0
- package/runtime/lib/worklet-runtime/mainThreadObject.js.map +1 -0
- 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.d.ts +11 -7
- package/runtime/lib/worklet-runtime/workletRef.js +72 -9
- package/runtime/lib/worklet-runtime/workletRef.js.map +1 -1
- package/runtime/lib/worklet-runtime/workletRuntime.js +68 -9
- package/runtime/lib/worklet-runtime/workletRuntime.js.map +1 -1
- package/runtime/package.json +2 -3
- package/runtime/src/core/background-function/run-on-background.ts +16 -0
- package/runtime/src/core/capture-main-thread-object.ts +17 -0
- package/runtime/src/core/globalProps.ts +2 -0
- package/runtime/src/core/hooks/react.ts +4 -0
- package/runtime/src/core/hooks/useLynxGlobalEventListener.ts +2 -0
- package/runtime/src/core/initData.ts +2 -0
- package/runtime/src/core/main-thread-object-handle-registry.ts +25 -0
- package/runtime/src/core/main-thread-object.ts +380 -0
- package/runtime/src/core/main-thread-ref-id.ts +16 -0
- package/runtime/src/core/main-thread-ref-init-value.ts +12 -4
- package/runtime/src/core/main-thread-ref.ts +7 -8
- package/runtime/src/element-template/background/commit-hook.ts +1 -1
- package/runtime/src/element-template/index.ts +6 -0
- package/runtime/src/element-template/internal.ts +2 -1
- package/runtime/src/element-template/protocol/types.ts +1 -1
- package/runtime/src/internal.ts +1 -1
- package/runtime/src/lynx-api.ts +38 -0
- package/runtime/src/lynx.ts +5 -1
- package/runtime/src/snapshot/lifecycle/patch/error.ts +36 -19
- package/runtime/src/snapshot/lifecycle/patch/snapshotPatchApply.ts +29 -7
- package/runtime/src/snapshot/lifecycle/patch/updateMainThread.ts +2 -2
- package/runtime/src/snapshot/lynx/children.ts +2 -0
- package/runtime/src/snapshot/lynx/element.ts +8 -0
- package/runtime/src/snapshot/worklet/call/runOnMainThread.ts +2 -0
- package/runtime/src/snapshot/worklet/ref/updateInitValue.ts +1 -1
- package/runtime/src/worklet-runtime/bindings/bindings.ts +17 -2
- package/runtime/src/worklet-runtime/bindings/index.ts +0 -1
- package/runtime/src/worklet-runtime/bindings/types.ts +7 -11
- package/runtime/src/worklet-runtime/hydrate.ts +43 -10
- package/runtime/src/worklet-runtime/index.ts +7 -0
- package/runtime/src/worklet-runtime/mainThreadObject.ts +117 -0
- package/runtime/src/worklet-runtime/workletRef.ts +120 -19
- package/runtime/src/worklet-runtime/workletRuntime.ts +83 -11
- 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/index.d.ts +165 -2
- 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/package.json +2 -1
- package/testing-library/rstest.config.ts +3 -0
- package/testing-library/src/__tests__/lynx.test.jsx +1 -1
- package/testing-library/src/__tests__/rstest-config.test.js +34 -1
- package/testing-library/src/__tests__/worklet.test.jsx +87 -33
- 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/testing-library/tsconfig.docs.json +9 -0
- package/testing-library/typedoc.json +22 -0
- package/transform/.turbo/turbo-build$colon$wasm.log +135 -73
- package/transform/__test__/defines.spec.js +80 -12
- package/transform/__test__/fixture.spec.js +231 -71
- package/transform/__test__/object-methods.spec.js +82 -0
- package/transform/crates/swc_plugin_worklet/decl_collect.rs +10 -0
- package/transform/crates/swc_plugin_worklet/extract_ident.rs +14 -0
- package/transform/crates/swc_plugin_worklet/gen_stmt.rs +228 -13
- package/transform/crates/swc_plugin_worklet/lib.rs +599 -150
- package/transform/crates/swc_plugin_worklet/napi.rs +10 -1
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_js.js +8 -1
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js +12 -7
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_expose_object_method_capture_channels_js.js +27 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_expose_object_method_capture_channels_lepus.js +43 -0
- 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_js.js +16 -14
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js +18 -18
- 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_js.js +7 -5
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js +9 -9
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_computed_object_method_key_lepus.js +22 -0
- 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 +14 -0
- 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_js.js +42 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_preserve_main_thread_objects_in_class_lepus.js +58 -0
- 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.js +3 -1
- 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 +5 -5
- 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_js.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_object_methods_lepus.js +14 -0
- 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/rspack-napi/tsconfig.tsbuildinfo +1 -1
- package/transform/src/lib.rs +193 -23
- package/transform/swc-plugin-reactlynx/.turbo/turbo-build.log +63 -467
- package/transform/swc-plugin-reactlynx/swc_plugin_reactlynx.wasm +0 -0
- package/transform/swc-plugin-reactlynx-compat/.turbo/turbo-build.log +340 -28
- package/transform/swc-plugin-reactlynx-compat/swc_plugin_reactlynx_compat.wasm +0 -0
- package/transform/vitest.config.ts +5 -1
- package/types/react.docs.d.ts +130 -11
- 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 -638
- package/runtime/worklet-runtime/main.js +0 -1
- package/testing-library/node_modules/.bin/rsbuild +0 -68
- package/testing-library/node_modules/.bin/rspeedy +0 -68
- package/testing-library/node_modules/.bin/rstest +0 -68
- 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
- package/transform/node_modules/.bin/esbuild +0 -59
- package/transform/node_modules/.bin/napi +0 -68
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var e,t,n;let r,l,i;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class a{cancel(){return __ElementAnimate(this.effect.target.element,[3,this.id])}pause(){return __ElementAnimate(this.effect.target.element,[2,this.id])}play(){return __ElementAnimate(this.effect.target.element,[1,this.id])}start(){return __ElementAnimate(this.effect.target.element,[0,this.id,this.effect.keyframes,this.effect.options])}constructor(e){o(this,"effect",void 0),o(this,"id",void 0),this.effect=e,this.id="__lynx-inner-js-animation-"+a.count++,this.start()}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o(a,"count",0);class u{constructor(e,t,n){s(this,"target",void 0),s(this,"keyframes",void 0),s(this,"options",void 0),this.target=e,this.keyframes=t,this.options=n}}function c(e,t){var n;let r=(null!=(n=SystemInfo.lynxSdkVersion)?n:"1.0").split(".");return Number(r[0])>e||Number(r[0])==e&&Number(r[1])>t}let d=!1,f=!0;class y{setAttribute(e,t){__SetAttribute(this.element,e,t),this.flushElementTree()}setStyleProperty(e,t){__AddInlineStyle(this.element,e,t),this.flushElementTree()}setStyleProperties(e){for(let t in e)__AddInlineStyle(this.element,t,e[t]);this.flushElementTree()}getAttribute(e){return __GetAttributeByName(this.element,e)}getAttributeNames(){return __GetAttributeNames(this.element)}querySelector(e){let t=__QuerySelector(this.element,e,{});return t?new y(t):null}querySelectorAll(e){return __QuerySelectorAll(this.element,e,{}).map(e=>new y(e))}getComputedStyleProperty(e){if(!c(3,4))throw Error("getComputedStyleProperty requires Lynx sdk version 3.5");if(!e)throw Error("getComputedStyleProperty: key is required");return __GetComputedStyleByKey(this.element,e)}animate(e,t){return new a(new u(this,e,"number"==typeof t?{duration:t}:null!=t?t:{}))}invoke(e,t){return new Promise((n,r)=>{__InvokeUIMethod(this.element,e,null!=t?t:{},e=>{0===e.code?n(e.data):r(Error("UI method invoke: "+JSON.stringify(e)))}),this.flushElementTree()})}flushElementTree(){!d&&f&&(d=!0,Promise.resolve().then(()=>{d=!1,__FlushElementTree()}))}constructor(e){var t,n;n=void 0,(t="element")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n,Object.defineProperty(this,"element",{get:()=>e})}}class m{static get(){return null!=m.pageElement||(m.pageElement=__GetPageElement()),m.pageElement}}function h(e,t,n){let r;try{r=runWorklet(e,t)}finally{lynx.getJSContext().dispatchEvent({type:"Lynx.Worklet.FunctionCallRet",data:JSON.stringify({resolveId:n,returnValue:r})})}}t=void 0,(e="pageElement")in m?Object.defineProperty(m,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):m[e]=t;let _=(e,t)=>({current:t,_wvid:e}),p=e=>{let t,n=e._wvid;return n<0?(t=r._firstScreenWorkletRefMap[n])||(t=r._firstScreenWorkletRefMap[n]=_(n,e._initValue)):t=r._workletRefMap[n],t};function k(){l.delayedBackgroundFunctionArray.length=0}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t,n){lynxWorkletImpl._workletMap[t]=n}let I=new WeakMap;function b(e,t){if("object"!=typeof e||null===e)return e;if(t){let t=I.get(e);if(t)return t}let n={main:e};return x(n,0,e),t&&I.set(e,n.main),n.main}let x=(e,t,n)=>{if(++t>=1e3)throw Error("Depth of value exceeds limit of 1000.");if("object"==typeof e&&null!==e)for(let l in e){let i=e[l];if("object"==typeof i&&null!==i){if("elementRefptr"in i){e[l]=new y(i.elementRefptr);continue}if(!(i instanceof y)){if(x(i,t,n),"_wvid"in i){e[l]=p(i);continue}if("_wkltId"in i){let t=i===n,r={...i};e[l]=lynxWorkletImpl._workletMap[i._wkltId].bind(r),t||(e[l].boundCtx=r);continue}if("_jsFnId"in i){var r;i._execId=n._execId,null==(r=lynxWorkletImpl._jsFunctionLifecycleManager)||r.addRef(n._execId,i);continue}}}}};if(void 0===globalThis.lynxWorkletImpl){let e,t;globalThis.lynxWorkletImpl={_workletMap:{},_refImpl:r={_workletRefMap:{},_firstScreenWorkletRefMap:{},updateWorkletRef:function(e,t){p(e).current=t?new y(t):null},updateWorkletRefInitValueChanges:function(e){e.forEach(([e,t])=>{r._workletRefMap[e]||(r._workletRefMap[e]=_(e,t))})},clearFirstScreenWorkletRefMap:function(){r._firstScreenWorkletRefMap={}}},_runOnBackgroundDelayImpl:l={delayedBackgroundFunctionArray:[],clearDelayedBackgroundFunctions:k,delayRunOnBackground:function(e,t){var n;l.delayedBackgroundFunctionArray.push({task:t}),(null!=(n=e._delayIndices)?n:e._delayIndices=[]).push(l.delayedBackgroundFunctionArray.length-1)},runDelayedBackgroundFunctions:function(){for(let e of l.delayedBackgroundFunctionArray)(null==e?void 0:e.jsFnHandle)&&e.task(e.jsFnHandle._jsFnId,e.jsFnHandle._execId);k()}},_hydrateCtx:function(e,t){!function e(t,n,r){if(t&&"object"==typeof t&&n&&"object"==typeof n&&(!t._wkltId||t._wkltId===n._wkltId))for(let o in t)if("_wvid"===o){var l,i;l=t[o],"_initValue"in(i=n)||(lynxWorkletImpl._refImpl._workletRefMap[l]=i)}else if("_jsFn"===o)!function(e,t,n){for(let r in e){let l=e[r],i=t[r];if(!(null==i?void 0:i._delayIndices)){i&&(i._isFirstScreen=!1,i._execId=n,Object.assign(i,l));continue}for(let e of i._delayIndices){let t=lynxWorkletImpl._runOnBackgroundDelayImpl.delayedBackgroundFunctionArray[e];t&&(l._execId=n,t.jsFnHandle=l)}}}(t[o],n[o],r);else{let l="function"==typeof n[o]?n[o].boundCtx:n[o];e(t[o],l,r)}}(e,t,e._execId)},_eventDelayImpl:i={_delayedWorkletParamsMap:new Map,runDelayedWorklet:function(e,t){(()=>{let n=i._delayedWorkletParamsMap.get(e._wkltId);if(void 0===n)return;let r=[];n.forEach(n=>{var l;let i=n[0];(null==i||null==(l=i.currentTarget)?void 0:l.elementRefptr)===t?setTimeout(()=>{runWorklet(e,n)},0):r.push(n)}),i._delayedWorkletParamsMap.set(e._wkltId,r)})()},clearDelayedWorklets:function(){i._delayedWorkletParamsMap.clear()}},_eomImpl:{setShouldFlush:function(e){f=e}},_runRunOnMainThreadTask:h},c(2,15)&&(globalThis.lynxWorkletImpl._jsFunctionLifecycleManager=new class e{addRef(e,t){var n;this.retainedObjects.has(t)||(this.retainedObjects.add(t),this.execIdRefCount.set(e,(null!=(n=this.execIdRefCount.get(e))?n:0)+1),this.registry.register(t,e))}removeRef(e){let t=this.execIdRefCount.get(e);t>1?this.execIdRefCount.set(e,t-1):(this.execIdRefCount.delete(e),this.execIdSetToFire.add(e),this.willFire||(this.willFire=!0,Promise.resolve().then(()=>{this.fire()})))}fire(){lynx.getJSContext().dispatchEvent({type:"Lynx.Worklet.releaseBackgroundWorkletCtx",data:Array.from(this.execIdSetToFire)}),this.execIdSetToFire.clear(),this.willFire=!1}constructor(){g(this,"execIdRefCount",new Map),g(this,"execIdSetToFire",new Set),g(this,"retainedObjects",new WeakSet),g(this,"willFire",!1),g(this,"registry",void 0),this.registry=new FinalizationRegistry(this.removeRef.bind(this))}}),globalThis.registerWorklet=v,globalThis.registerWorkletInternal=v,globalThis.runWorklet=function(e,t,n){var r,l,o;if("object"==typeof(r=e)&&null!==r&&("_wkltId"in r||"_lepusWorkletHash"in r)){let r,a;return"_lepusWorkletHash"in e?void(l=e._lepusWorkletHash,o=t,(a=(r=i._delayedWorkletParamsMap).get(l))?a.push(o):r.set(l,[o])):function(e,t,n){let r=(e._wkltId,b(e,!0)),l=b(t||[],!1),[i,o]=function(e,t){if(!Array.isArray(e)||"object"!=typeof e[0]||null===e[0]||(!t||1!==t.source)&&1)return[!1,{}];let n={},r=e[0];return r.stopPropagation=function(){var e;n._eventReturnResult=(null!=(e=n._eventReturnResult)?e:0)|1},r.stopImmediatePropagation=function(){var e;n._eventReturnResult=(null!=(e=n._eventReturnResult)?e:0)|2},[!0,n]}(l,n),a=r(...l);return i?{returnValue:a,eventReturnResult:o._eventReturnResult}:a}(e,t,n)}},lynx.querySelector=function(e){let t=m.get();if(!t)return null;let n=__QuerySelector(t,e,{});return n?new y(n):null},lynx.querySelectorAll=function(e){let t=m.get();return t?__QuerySelectorAll(t,e,{}).map(e=>new y(e)):[]},globalThis.setTimeout=lynx.setTimeout,globalThis.setInterval=lynx.setInterval,globalThis.clearTimeout=lynx.clearTimeout,globalThis.clearInterval=null!=(n=lynx.clearInterval)?n:lynx.clearTimeInterval,e=lynx.requestAnimationFrame,lynx.requestAnimationFrame=globalThis.requestAnimationFrame=t=>{if(!c(2,15))throw Error("requestAnimationFrame in main thread script requires Lynx sdk version 2.16");return e(t)},globalThis.cancelAnimationFrame=lynx.cancelAnimationFrame,(t=lynx.getJSContext()).addEventListener("Lynx.Worklet.runWorkletCtx",e=>{let t=JSON.parse(e.data);h(t.worklet,t.params,t.resolveId)}),t.addEventListener("Lynx.Worklet.releaseWorkletRef",e=>{var t;t=e.data.id,delete r._workletRefMap[t]})}})();
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve $0 through symlinks so basedir is the shim's real directory.
|
|
3
|
-
# Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
|
|
4
|
-
#
|
|
5
|
-
# A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
|
|
6
|
-
# uname, and printf go through `command -p`, which searches the system default
|
|
7
|
-
# path instead. A dependency's bin cannot stand in for one of them and take over
|
|
8
|
-
# the shim before it reaches its target. Directories come from `${link%/*}`,
|
|
9
|
-
# which needs no helper at all.
|
|
10
|
-
link="$0"
|
|
11
|
-
# `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
|
|
12
|
-
# and stands for a file in the current directory.
|
|
13
|
-
case "$link" in
|
|
14
|
-
*/*|*\\*) ;;
|
|
15
|
-
*) link="./$link" ;;
|
|
16
|
-
esac
|
|
17
|
-
hops=0
|
|
18
|
-
while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
|
|
19
|
-
hops=$((hops+1))
|
|
20
|
-
target=$(command -p readlink "$link")
|
|
21
|
-
case "$target" in
|
|
22
|
-
/*) link="$target" ;;
|
|
23
|
-
*) link="${link%/*}/$target" ;;
|
|
24
|
-
esac
|
|
25
|
-
done
|
|
26
|
-
basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
|
|
27
|
-
basedir="${basedir%/*}"
|
|
28
|
-
basedir_win="$basedir"
|
|
29
|
-
exe=""
|
|
30
|
-
msys=""
|
|
31
|
-
|
|
32
|
-
case `command -p uname -a` in
|
|
33
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
34
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
35
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
36
|
-
fi
|
|
37
|
-
exe=".exe"
|
|
38
|
-
msys="true"
|
|
39
|
-
;;
|
|
40
|
-
*WSL2*)
|
|
41
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
42
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
43
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
44
|
-
basedir_win="$basedir"
|
|
45
|
-
else
|
|
46
|
-
exe=".exe"
|
|
47
|
-
fi
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
esac
|
|
51
|
-
|
|
52
|
-
if [ -z "$NODE_PATH" ]; then
|
|
53
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rsbuild+core@2.2.9_core-js@3.50.0/node_modules/@rsbuild/core/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rsbuild+core@2.2.9_core-js@3.50.0/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules"
|
|
54
|
-
else
|
|
55
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rsbuild+core@2.2.9_core-js@3.50.0/node_modules/@rsbuild/core/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rsbuild+core@2.2.9_core-js@3.50.0/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
56
|
-
fi
|
|
57
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
58
|
-
exec "$basedir/node.exe" "$basedir_win/../@rsbuild/core/bin/rsbuild.js" "$@"
|
|
59
|
-
elif [ -x "$basedir/node" ]; then
|
|
60
|
-
exec "$basedir/node" "$basedir/../@rsbuild/core/bin/rsbuild.js" "$@"
|
|
61
|
-
elif command -v node >/dev/null 2>&1; then
|
|
62
|
-
exec node "$basedir/../@rsbuild/core/bin/rsbuild.js" "$@"
|
|
63
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
64
|
-
exec node.exe "$basedir_win/../@rsbuild/core/bin/rsbuild.js" "$@"
|
|
65
|
-
else
|
|
66
|
-
exec node "$basedir/../@rsbuild/core/bin/rsbuild.js" "$@"
|
|
67
|
-
fi
|
|
68
|
-
# cmd-shim-target=/home/runner/work/lynx-stack/lynx-stack/packages/react/testing-library/node_modules/@rsbuild/core/./bin/rsbuild.js
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve $0 through symlinks so basedir is the shim's real directory.
|
|
3
|
-
# Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
|
|
4
|
-
#
|
|
5
|
-
# A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
|
|
6
|
-
# uname, and printf go through `command -p`, which searches the system default
|
|
7
|
-
# path instead. A dependency's bin cannot stand in for one of them and take over
|
|
8
|
-
# the shim before it reaches its target. Directories come from `${link%/*}`,
|
|
9
|
-
# which needs no helper at all.
|
|
10
|
-
link="$0"
|
|
11
|
-
# `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
|
|
12
|
-
# and stands for a file in the current directory.
|
|
13
|
-
case "$link" in
|
|
14
|
-
*/*|*\\*) ;;
|
|
15
|
-
*) link="./$link" ;;
|
|
16
|
-
esac
|
|
17
|
-
hops=0
|
|
18
|
-
while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
|
|
19
|
-
hops=$((hops+1))
|
|
20
|
-
target=$(command -p readlink "$link")
|
|
21
|
-
case "$target" in
|
|
22
|
-
/*) link="$target" ;;
|
|
23
|
-
*) link="${link%/*}/$target" ;;
|
|
24
|
-
esac
|
|
25
|
-
done
|
|
26
|
-
basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
|
|
27
|
-
basedir="${basedir%/*}"
|
|
28
|
-
basedir_win="$basedir"
|
|
29
|
-
exe=""
|
|
30
|
-
msys=""
|
|
31
|
-
|
|
32
|
-
case `command -p uname -a` in
|
|
33
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
34
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
35
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
36
|
-
fi
|
|
37
|
-
exe=".exe"
|
|
38
|
-
msys="true"
|
|
39
|
-
;;
|
|
40
|
-
*WSL2*)
|
|
41
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
42
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
43
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
44
|
-
basedir_win="$basedir"
|
|
45
|
-
else
|
|
46
|
-
exe=".exe"
|
|
47
|
-
fi
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
esac
|
|
51
|
-
|
|
52
|
-
if [ -z "$NODE_PATH" ]; then
|
|
53
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules"
|
|
54
|
-
else
|
|
55
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
56
|
-
fi
|
|
57
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
58
|
-
exec "$basedir/node.exe" "$basedir_win/../@lynx-js/rspeedy/bin/rspeedy-for-dev.js" "$@"
|
|
59
|
-
elif [ -x "$basedir/node" ]; then
|
|
60
|
-
exec "$basedir/node" "$basedir/../@lynx-js/rspeedy/bin/rspeedy-for-dev.js" "$@"
|
|
61
|
-
elif command -v node >/dev/null 2>&1; then
|
|
62
|
-
exec node "$basedir/../@lynx-js/rspeedy/bin/rspeedy-for-dev.js" "$@"
|
|
63
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
64
|
-
exec node.exe "$basedir_win/../@lynx-js/rspeedy/bin/rspeedy-for-dev.js" "$@"
|
|
65
|
-
else
|
|
66
|
-
exec node "$basedir/../@lynx-js/rspeedy/bin/rspeedy-for-dev.js" "$@"
|
|
67
|
-
fi
|
|
68
|
-
# cmd-shim-target=/home/runner/work/lynx-stack/lynx-stack/packages/react/testing-library/node_modules/@lynx-js/rspeedy/./bin/rspeedy-for-dev.js
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve $0 through symlinks so basedir is the shim's real directory.
|
|
3
|
-
# Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
|
|
4
|
-
#
|
|
5
|
-
# A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
|
|
6
|
-
# uname, and printf go through `command -p`, which searches the system default
|
|
7
|
-
# path instead. A dependency's bin cannot stand in for one of them and take over
|
|
8
|
-
# the shim before it reaches its target. Directories come from `${link%/*}`,
|
|
9
|
-
# which needs no helper at all.
|
|
10
|
-
link="$0"
|
|
11
|
-
# `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
|
|
12
|
-
# and stands for a file in the current directory.
|
|
13
|
-
case "$link" in
|
|
14
|
-
*/*|*\\*) ;;
|
|
15
|
-
*) link="./$link" ;;
|
|
16
|
-
esac
|
|
17
|
-
hops=0
|
|
18
|
-
while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
|
|
19
|
-
hops=$((hops+1))
|
|
20
|
-
target=$(command -p readlink "$link")
|
|
21
|
-
case "$target" in
|
|
22
|
-
/*) link="$target" ;;
|
|
23
|
-
*) link="${link%/*}/$target" ;;
|
|
24
|
-
esac
|
|
25
|
-
done
|
|
26
|
-
basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
|
|
27
|
-
basedir="${basedir%/*}"
|
|
28
|
-
basedir_win="$basedir"
|
|
29
|
-
exe=""
|
|
30
|
-
msys=""
|
|
31
|
-
|
|
32
|
-
case `command -p uname -a` in
|
|
33
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
34
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
35
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
36
|
-
fi
|
|
37
|
-
exe=".exe"
|
|
38
|
-
msys="true"
|
|
39
|
-
;;
|
|
40
|
-
*WSL2*)
|
|
41
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
42
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
43
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
44
|
-
basedir_win="$basedir"
|
|
45
|
-
else
|
|
46
|
-
exe=".exe"
|
|
47
|
-
fi
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
esac
|
|
51
|
-
|
|
52
|
-
if [ -z "$NODE_PATH" ]; then
|
|
53
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rstest+core@0.12.1_core-js@3.50.0_happy-dom@20.14.0_jsdom@30.0.1/node_modules/@rstest/core/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rstest+core@0.12.1_core-js@3.50.0_happy-dom@20.14.0_jsdom@30.0.1/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules"
|
|
54
|
-
else
|
|
55
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rstest+core@0.12.1_core-js@3.50.0_happy-dom@20.14.0_jsdom@30.0.1/node_modules/@rstest/core/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@rstest+core@0.12.1_core-js@3.50.0_happy-dom@20.14.0_jsdom@30.0.1/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
56
|
-
fi
|
|
57
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
58
|
-
exec "$basedir/node.exe" "$basedir_win/../@rstest/core/bin/rstest.js" "$@"
|
|
59
|
-
elif [ -x "$basedir/node" ]; then
|
|
60
|
-
exec "$basedir/node" "$basedir/../@rstest/core/bin/rstest.js" "$@"
|
|
61
|
-
elif command -v node >/dev/null 2>&1; then
|
|
62
|
-
exec node "$basedir/../@rstest/core/bin/rstest.js" "$@"
|
|
63
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
64
|
-
exec node.exe "$basedir_win/../@rstest/core/bin/rstest.js" "$@"
|
|
65
|
-
else
|
|
66
|
-
exec node "$basedir/../@rstest/core/bin/rstest.js" "$@"
|
|
67
|
-
fi
|
|
68
|
-
# cmd-shim-target=/home/runner/work/lynx-stack/lynx-stack/packages/react/testing-library/node_modules/@rstest/core/./bin/rstest.js
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { loadWorkletRuntime as __loadWorkletRuntime } from "@lynx-js/react";
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
3
|
-
let foo = {
|
|
4
|
-
_wkltId: "a123:test:1"
|
|
5
|
-
};
|
|
6
|
-
const __workletRuntimeLoaded = loadWorkletRuntime(typeof globDynamicComponentEntry === 'undefined' ? undefined : globDynamicComponentEntry);
|
|
7
|
-
__workletRuntimeLoaded && registerWorkletInternal("main-thread", "a123:test:1", function() {
|
|
8
|
-
const foo = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
9
|
-
"main thread";
|
|
10
|
-
const __workletRuntimeLoaded = false;
|
|
11
|
-
console.log(__workletRuntimeLoaded);
|
|
12
|
-
return 1;
|
|
13
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { loadWorkletRuntime as __loadWorkletRuntime } from "@lynx-js/react";
|
|
2
|
-
var loadWorkletRuntime = __loadWorkletRuntime;
|
|
3
|
-
const __workletRuntimeLoaded = false;
|
|
4
|
-
console.log(__workletRuntimeLoaded);
|
|
5
|
-
let foo = {
|
|
6
|
-
_wkltId: "a123:test:1"
|
|
7
|
-
};
|
|
8
|
-
const __workletRuntimeLoaded1 = loadWorkletRuntime(typeof globDynamicComponentEntry === 'undefined' ? undefined : globDynamicComponentEntry);
|
|
9
|
-
__workletRuntimeLoaded1 && registerWorkletInternal("main-thread", "a123:test:1", function() {
|
|
10
|
-
const foo = lynxWorkletImpl._workletMap["a123:test:1"].bind(this);
|
|
11
|
-
"main thread";
|
|
12
|
-
return 1;
|
|
13
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve $0 through symlinks so basedir is the shim's real directory.
|
|
3
|
-
# Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
|
|
4
|
-
#
|
|
5
|
-
# A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
|
|
6
|
-
# uname, and printf go through `command -p`, which searches the system default
|
|
7
|
-
# path instead. A dependency's bin cannot stand in for one of them and take over
|
|
8
|
-
# the shim before it reaches its target. Directories come from `${link%/*}`,
|
|
9
|
-
# which needs no helper at all.
|
|
10
|
-
link="$0"
|
|
11
|
-
# `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
|
|
12
|
-
# and stands for a file in the current directory.
|
|
13
|
-
case "$link" in
|
|
14
|
-
*/*|*\\*) ;;
|
|
15
|
-
*) link="./$link" ;;
|
|
16
|
-
esac
|
|
17
|
-
hops=0
|
|
18
|
-
while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
|
|
19
|
-
hops=$((hops+1))
|
|
20
|
-
target=$(command -p readlink "$link")
|
|
21
|
-
case "$target" in
|
|
22
|
-
/*) link="$target" ;;
|
|
23
|
-
*) link="${link%/*}/$target" ;;
|
|
24
|
-
esac
|
|
25
|
-
done
|
|
26
|
-
basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
|
|
27
|
-
basedir="${basedir%/*}"
|
|
28
|
-
basedir_win="$basedir"
|
|
29
|
-
exe=""
|
|
30
|
-
msys=""
|
|
31
|
-
|
|
32
|
-
case `command -p uname -a` in
|
|
33
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
34
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
35
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
36
|
-
fi
|
|
37
|
-
exe=".exe"
|
|
38
|
-
msys="true"
|
|
39
|
-
;;
|
|
40
|
-
*WSL2*)
|
|
41
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
42
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
43
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
44
|
-
basedir_win="$basedir"
|
|
45
|
-
else
|
|
46
|
-
exe=".exe"
|
|
47
|
-
fi
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
esac
|
|
51
|
-
|
|
52
|
-
if [ -z "$NODE_PATH" ]; then
|
|
53
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/esbuild@0.28.1/node_modules/esbuild/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/esbuild@0.28.1/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules"
|
|
54
|
-
else
|
|
55
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/esbuild@0.28.1/node_modules/esbuild/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/esbuild@0.28.1/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
56
|
-
fi
|
|
57
|
-
exec "$basedir/../esbuild/bin/esbuild" "$@"
|
|
58
|
-
exit $?
|
|
59
|
-
# cmd-shim-target=/home/runner/work/lynx-stack/lynx-stack/packages/react/transform/node_modules/esbuild/bin/esbuild
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve $0 through symlinks so basedir is the shim's real directory.
|
|
3
|
-
# Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
|
|
4
|
-
#
|
|
5
|
-
# A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
|
|
6
|
-
# uname, and printf go through `command -p`, which searches the system default
|
|
7
|
-
# path instead. A dependency's bin cannot stand in for one of them and take over
|
|
8
|
-
# the shim before it reaches its target. Directories come from `${link%/*}`,
|
|
9
|
-
# which needs no helper at all.
|
|
10
|
-
link="$0"
|
|
11
|
-
# `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
|
|
12
|
-
# and stands for a file in the current directory.
|
|
13
|
-
case "$link" in
|
|
14
|
-
*/*|*\\*) ;;
|
|
15
|
-
*) link="./$link" ;;
|
|
16
|
-
esac
|
|
17
|
-
hops=0
|
|
18
|
-
while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
|
|
19
|
-
hops=$((hops+1))
|
|
20
|
-
target=$(command -p readlink "$link")
|
|
21
|
-
case "$target" in
|
|
22
|
-
/*) link="$target" ;;
|
|
23
|
-
*) link="${link%/*}/$target" ;;
|
|
24
|
-
esac
|
|
25
|
-
done
|
|
26
|
-
basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
|
|
27
|
-
basedir="${basedir%/*}"
|
|
28
|
-
basedir_win="$basedir"
|
|
29
|
-
exe=""
|
|
30
|
-
msys=""
|
|
31
|
-
|
|
32
|
-
case `command -p uname -a` in
|
|
33
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
34
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
35
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
36
|
-
fi
|
|
37
|
-
exe=".exe"
|
|
38
|
-
msys="true"
|
|
39
|
-
;;
|
|
40
|
-
*WSL2*)
|
|
41
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
42
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
43
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
44
|
-
basedir_win="$basedir"
|
|
45
|
-
else
|
|
46
|
-
exe=".exe"
|
|
47
|
-
fi
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
esac
|
|
51
|
-
|
|
52
|
-
if [ -z "$NODE_PATH" ]; then
|
|
53
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@napi-rs+cli@2.18.4_patch_hash=ba947eb1c48b2a85834e99f92cbbae896722ce61fd5ae67507a3be9041959ebd/node_modules/@napi-rs/cli/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@napi-rs+cli@2.18.4_patch_hash=ba947eb1c48b2a85834e99f92cbbae896722ce61fd5ae67507a3be9041959ebd/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules"
|
|
54
|
-
else
|
|
55
|
-
export NODE_PATH="/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@napi-rs+cli@2.18.4_patch_hash=ba947eb1c48b2a85834e99f92cbbae896722ce61fd5ae67507a3be9041959ebd/node_modules/@napi-rs/cli/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/@napi-rs+cli@2.18.4_patch_hash=ba947eb1c48b2a85834e99f92cbbae896722ce61fd5ae67507a3be9041959ebd/node_modules:/home/runner/work/lynx-stack/lynx-stack/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
56
|
-
fi
|
|
57
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
58
|
-
exec "$basedir/node.exe" "$basedir_win/../@napi-rs/cli/scripts/index.js" "$@"
|
|
59
|
-
elif [ -x "$basedir/node" ]; then
|
|
60
|
-
exec "$basedir/node" "$basedir/../@napi-rs/cli/scripts/index.js" "$@"
|
|
61
|
-
elif command -v node >/dev/null 2>&1; then
|
|
62
|
-
exec node "$basedir/../@napi-rs/cli/scripts/index.js" "$@"
|
|
63
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
64
|
-
exec node.exe "$basedir_win/../@napi-rs/cli/scripts/index.js" "$@"
|
|
65
|
-
else
|
|
66
|
-
exec node "$basedir/../@napi-rs/cli/scripts/index.js" "$@"
|
|
67
|
-
fi
|
|
68
|
-
# cmd-shim-target=/home/runner/work/lynx-stack/lynx-stack/packages/react/transform/node_modules/@napi-rs/cli/./scripts/index.js
|