@lynx-js/react 0.125.0 → 0.126.1
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 +63 -0
- package/LICENSE +202 -0
- package/components/.gitignore +3 -0
- package/components/.npmignore +5 -0
- package/components/lib/Page.js +4 -2
- package/components/lib/Page.js.map +1 -1
- package/components/src/Page.ts +4 -2
- package/components/tsconfig.json +17 -0
- package/components/tsconfig.tsbuildinfo +1 -0
- package/package.json +6 -2
- package/refresh/.gitignore +1 -0
- package/refresh/.npmignore +3 -0
- package/refresh/.turbo/turbo-build.log +9 -0
- package/refresh/package.json +21 -0
- package/refresh/rslib.config.ts +24 -0
- package/refresh/tsconfig.json +4 -0
- package/refresh/turbo.json +16 -0
- package/runtime/.gitignore +4 -0
- package/runtime/.npmignore +15 -0
- package/runtime/.prettierrc +6 -0
- package/runtime/.turbo/turbo-build.log +1 -0
- package/runtime/CHANGELOG.md +7 -0
- package/runtime/__test__/core/background-function.test.ts +133 -0
- package/runtime/__test__/core/commit-context.test.ts +37 -0
- package/runtime/__test__/core/forceRootRender.test.ts +65 -0
- package/runtime/__test__/core/globalProps.test.ts +141 -0
- package/runtime/__test__/core/hooks/mainThread.test.tsx +279 -0
- package/runtime/__test__/core/hooks/useLynxGlobalEventListener.test.jsx +168 -0
- package/runtime/__test__/core/lynx-data-processors.test.ts +131 -0
- package/runtime/__test__/core/lynx-page-data.test.ts +62 -0
- package/runtime/__test__/core/lynx-update-data.test.ts +97 -0
- package/runtime/__test__/core/main-thread-function.test.ts +13 -0
- package/runtime/__test__/core/main-thread-ref.test.ts +102 -0
- package/runtime/__test__/core/ref.test.ts +261 -0
- package/runtime/__test__/core/reload-version.test.ts +14 -0
- package/runtime/__test__/core/thread-function-call.test.ts +182 -0
- package/runtime/__test__/element-template/debug/alog.test.ts +214 -0
- package/runtime/__test__/element-template/debug/elementPAPICall.test.ts +157 -0
- package/runtime/__test__/element-template/debug/profile-hook.test.tsx +67 -0
- package/runtime/__test__/element-template/debug/profile-installation.test.tsx +49 -0
- package/runtime/__test__/element-template/fixtures/background/event/conditional-direct-event/index.tsx +8 -0
- package/runtime/__test__/element-template/fixtures/background/event/direct-event/index.tsx +7 -0
- package/runtime/__test__/element-template/fixtures/background/event/main-thread-direct-event/index.tsx +11 -0
- package/runtime/__test__/element-template/fixtures/background/event/main-thread-run-on-background-event/index.tsx +14 -0
- package/runtime/__test__/element-template/fixtures/background/event/spread-event/index.tsx +20 -0
- package/runtime/__test__/element-template/fixtures/background/global-props/direct-read/index.tsx +7 -0
- package/runtime/__test__/element-template/fixtures/background/global-props/event-hook/index.tsx +34 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/_shared.tsx +584 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.adds-background-only/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.adds-background-only/output.txt +11 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.aligns-ids-and-patches/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.aligns-ids-and-patches/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.array-diff/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.array-diff/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.batch-multiple-patches/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.batch-multiple-patches/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.nullish-values/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.nullish-values/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.object-value-updates/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.object-value-updates/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.patches-nested-component/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.patches-nested-component/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.removes-missing/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.removes-missing/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.skips-identical/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.skips-identical/output.txt +3 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.style-object-updates/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.style-object-updates/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.type-diff/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/attrs.type-diff/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.creates-missing-nodes-recursively/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.creates-missing-nodes-recursively/output.txt +39 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.iterates-existing-slots/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.iterates-existing-slots/output.txt +16 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-attrs-element/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-attrs-element/output.txt +3 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-slot-record-on-background/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-slot-record-on-background/output.txt +11 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-slot-record-on-main/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.missing-slot-record-on-main/output.txt +16 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.raw-text-instance-empty-text/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/children.raw-text-instance-empty-text/output.txt +4 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.emit-create-raw-text/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.emit-create-raw-text/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.emit-create-raw-text-non-text/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.emit-create-raw-text-non-text/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.move-before-child/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.move-before-child/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.raw-text-key-branches/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/coverage.raw-text-key-branches/output.txt +22 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/full-flow.dispatches-update-event/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/full-flow.dispatches-update-event/output.txt +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/root-key-mismatch-reconciles/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/root-key-mismatch-reconciles/output.txt +24 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/updates-raw-text-instance-id/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate/updates-raw-text-instance-id/output.txt +5 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.creates-and-inserts-new/index.tsx +14 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.creates-and-inserts-new/output.txt +20 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.inserts-before-existing-sibling/index.tsx +39 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.inserts-before-existing-sibling/output.txt +20 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.mixed-operations/index.tsx +38 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.mixed-operations/output.txt +29 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.moves-before-existing-sibling/index.tsx +40 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.moves-before-existing-sibling/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.non-string-raw-text-key-on-main/index.tsx +14 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.non-string-raw-text-key-on-main/output.txt +22 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.removes-missing/index.tsx +14 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.removes-missing/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.reorders-when-order-differs/index.tsx +34 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.reorders-when-order-differs/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.reuses-by-type-ignoring-keys/index.tsx +18 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/children.reuses-by-type-ignoring-keys/output.txt +16 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/complex-trees.deeply-nested-dynamic-content/index.tsx +33 -0
- package/runtime/__test__/element-template/fixtures/background/hydrate-compiled/complex-trees.deeply-nested-dynamic-content/output.txt +26 -0
- package/runtime/__test__/element-template/fixtures/background/init-data/update/index.tsx +11 -0
- package/runtime/__test__/element-template/fixtures/background/instance/_shared.ts +30 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/does-not-emit-patch-when-attrs-reference-reused/case.ts +24 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/does-not-emit-patch-when-attrs-reference-reused/output.txt +1 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/emits-bundle-url-in-create-template/case.ts +11 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/emits-bundle-url-in-create-template/output.txt +8 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/supports-silent-insert-before/case.ts +11 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/supports-silent-insert-before/output.txt +1 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/treats-non-object-attrs-entry-as-empty-object/case.ts +23 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/treats-non-object-attrs-entry-as-empty-object/output.txt +6 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/treats-nullish-attrs-as-empty-object/case.ts +23 -0
- package/runtime/__test__/element-template/fixtures/background/instance/ops/treats-nullish-attrs-as-empty-object/output.txt +6 -0
- package/runtime/__test__/element-template/fixtures/background/main-thread-function/run-on-main-thread/index.tsx +24 -0
- package/runtime/__test__/element-template/fixtures/background/ref/direct-ref/index.tsx +7 -0
- package/runtime/__test__/element-template/fixtures/background/ref/multi-ref/index.tsx +20 -0
- package/runtime/__test__/element-template/fixtures/background/ref/spread-ref/index.tsx +14 -0
- package/runtime/__test__/element-template/fixtures/background/ref/unsupported-ref/index.tsx +12 -0
- package/runtime/__test__/element-template/fixtures/background/render/_shared.tsx +85 -0
- package/runtime/__test__/element-template/fixtures/background/render/constructs-shadow-tree/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/render/constructs-shadow-tree/output.txt +7 -0
- package/runtime/__test__/element-template/fixtures/background/render/supports-slot-component-materiality/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/background/render/supports-slot-component-materiality/output.txt +13 -0
- package/runtime/__test__/element-template/fixtures/background/update/keyed/compiled-keyed-list/index.tsx +15 -0
- package/runtime/__test__/element-template/fixtures/background/update/keyed/compiled-keyed-subtree-list/index.tsx +19 -0
- package/runtime/__test__/element-template/fixtures/background/update/sparse/compiled-element-slot/index.tsx +26 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/_shared.tsx +169 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/multiple-root-instances/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/multiple-root-instances/output.txt +14 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/nested-instances/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/nested-instances/output.txt +8 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/simple-element/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/simple-element/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/sub-components/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/sub-components/output.txt +28 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/sub-components/source.tsx +15 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/text-children/case.tsx +5 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/text-children/output.txt +19 -0
- package/runtime/__test__/element-template/fixtures/hydration/hydration-data/text-children/source.tsx +8 -0
- package/runtime/__test__/element-template/fixtures/page/render-page/case.tsx +41 -0
- package/runtime/__test__/element-template/fixtures/page/render-page/native-log.txt +31 -0
- package/runtime/__test__/element-template/fixtures/page/render-page/output.txt +5 -0
- package/runtime/__test__/element-template/fixtures/page-compiled/authored-page/index.tsx +67 -0
- package/runtime/__test__/element-template/fixtures/patch/_shared.tsx +270 -0
- package/runtime/__test__/element-template/fixtures/patch/detaches-node-when-moving-between-slots/after-jsx.txt +7 -0
- package/runtime/__test__/element-template/fixtures/patch/detaches-node-when-moving-between-slots/before-jsx.txt +8 -0
- package/runtime/__test__/element-template/fixtures/patch/detaches-node-when-moving-between-slots/case.tsx +100 -0
- package/runtime/__test__/element-template/fixtures/patch/props-update/after-jsx.txt +3 -0
- package/runtime/__test__/element-template/fixtures/patch/props-update/before-jsx.txt +3 -0
- package/runtime/__test__/element-template/fixtures/patch/props-update/case.tsx +42 -0
- package/runtime/__test__/element-template/fixtures/patch/props-update/ops.txt +8 -0
- package/runtime/__test__/element-template/fixtures/patch/state-update/after-jsx.txt +3 -0
- package/runtime/__test__/element-template/fixtures/patch/state-update/before-jsx.txt +3 -0
- package/runtime/__test__/element-template/fixtures/patch/state-update/case.tsx +64 -0
- package/runtime/__test__/element-template/fixtures/patch/state-update/ops.txt +8 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/applies-insert-before-with-reference/after-jsx.txt +7 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/applies-insert-before-with-reference/before-jsx.txt +6 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/applies-insert-before-with-reference/index.tsx +39 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/applies-insert-before-with-reference/ops.txt +14 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/apply-hydration-ops/after-jsx.txt +10 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/apply-hydration-ops/before-jsx.txt +9 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/apply-hydration-ops/index.tsx +47 -0
- package/runtime/__test__/element-template/fixtures/patch-compiled/apply-hydration-ops/ops.txt +34 -0
- package/runtime/__test__/element-template/fixtures/render/child-siblings/index.js.txt +21 -0
- package/runtime/__test__/element-template/fixtures/render/child-siblings/index.tsx +16 -0
- package/runtime/__test__/element-template/fixtures/render/child-siblings/output.txt +8 -0
- package/runtime/__test__/element-template/fixtures/render/child-siblings/papi.txt +128 -0
- package/runtime/__test__/element-template/fixtures/render/child-siblings/templates.json.txt +66 -0
- package/runtime/__test__/element-template/fixtures/render/component/index.js.txt +12 -0
- package/runtime/__test__/element-template/fixtures/render/component/index.tsx +17 -0
- package/runtime/__test__/element-template/fixtures/render/component/output.txt +7 -0
- package/runtime/__test__/element-template/fixtures/render/component/papi.txt +67 -0
- package/runtime/__test__/element-template/fixtures/render/component/templates.json.txt +68 -0
- package/runtime/__test__/element-template/fixtures/render/component-slot-content/index.js.txt +16 -0
- package/runtime/__test__/element-template/fixtures/render/component-slot-content/index.tsx +18 -0
- package/runtime/__test__/element-template/fixtures/render/component-slot-content/output.txt +6 -0
- package/runtime/__test__/element-template/fixtures/render/component-slot-content/papi.txt +85 -0
- package/runtime/__test__/element-template/fixtures/render/component-slot-content/templates.json.txt +78 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/fixture.config.json +5 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/index.js.txt +6 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/index.tsx +9 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/output.txt +3 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/papi.txt +25 -0
- package/runtime/__test__/element-template/fixtures/render/css-scope-dynamic-bundle-url/templates.json.txt +57 -0
- package/runtime/__test__/element-template/fixtures/render/mapped-view-children/index.js.txt +18 -0
- package/runtime/__test__/element-template/fixtures/render/mapped-view-children/index.tsx +13 -0
- package/runtime/__test__/element-template/fixtures/render/mapped-view-children/output.txt +17 -0
- package/runtime/__test__/element-template/fixtures/render/mapped-view-children/papi.txt +214 -0
- package/runtime/__test__/element-template/fixtures/render/mapped-view-children/templates.json.txt +63 -0
- package/runtime/__test__/element-template/fixtures/render/mixed-children/index.js.txt +15 -0
- package/runtime/__test__/element-template/fixtures/render/mixed-children/index.tsx +15 -0
- package/runtime/__test__/element-template/fixtures/render/mixed-children/output.txt +7 -0
- package/runtime/__test__/element-template/fixtures/render/mixed-children/papi.txt +86 -0
- package/runtime/__test__/element-template/fixtures/render/mixed-children/templates.json.txt +51 -0
- package/runtime/__test__/element-template/fixtures/render/multiple-text/index.js.txt +23 -0
- package/runtime/__test__/element-template/fixtures/render/multiple-text/index.tsx +22 -0
- package/runtime/__test__/element-template/fixtures/render/multiple-text/output.txt +38 -0
- package/runtime/__test__/element-template/fixtures/render/multiple-text/papi.txt +454 -0
- package/runtime/__test__/element-template/fixtures/render/multiple-text/templates.json.txt +131 -0
- package/runtime/__test__/element-template/fixtures/render/nested-templates/index.js.txt +19 -0
- package/runtime/__test__/element-template/fixtures/render/nested-templates/index.tsx +19 -0
- package/runtime/__test__/element-template/fixtures/render/nested-templates/output.txt +5 -0
- package/runtime/__test__/element-template/fixtures/render/nested-templates/papi.txt +80 -0
- package/runtime/__test__/element-template/fixtures/render/nested-templates/templates.json.txt +34 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/_shared.ts +131 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/appends-root-text-via-append-element/case.ts +19 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/appends-root-text-via-append-element/native-log.txt +27 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/appends-root-text-via-append-element/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/creates-template-from-attrs-and-slot-text/case.ts +39 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/creates-template-from-attrs-and-slot-text/native-log.txt +49 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/creates-template-from-attrs-and-slot-text/output.txt +34 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-template-children-in-the-same-slot/case.ts +34 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-template-children-in-the-same-slot/native-log.txt +56 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-template-children-in-the-same-slot/output.txt +11 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-text-nodes-in-the-same-slot/case.ts +29 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-text-nodes-in-the-same-slot/native-log.txt +64 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/handles-multiple-text-nodes-in-the-same-slot/output.txt +20 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/inserts-nested-templates-into-parent-slots/case.ts +42 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/inserts-nested-templates-into-parent-slots/native-log.txt +84 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/inserts-nested-templates-into-parent-slots/output.txt +42 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/keeps-slot-children-separated-and-ordered/case.ts +31 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/keeps-slot-children-separated-and-ordered/native-log.txt +66 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/keeps-slot-children-separated-and-ordered/output.txt +41 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/passes-bundle-url-to-native-create/case.ts +20 -0
- package/runtime/__test__/element-template/fixtures/render/opcodes-into-element-template/passes-bundle-url-to-native-create/native-log.txt +25 -0
- package/runtime/__test__/element-template/fixtures/render/react-example/index.js.txt +39 -0
- package/runtime/__test__/element-template/fixtures/render/react-example/index.tsx +51 -0
- package/runtime/__test__/element-template/fixtures/render/react-example/output.txt +24 -0
- package/runtime/__test__/element-template/fixtures/render/react-example/papi.txt +70 -0
- package/runtime/__test__/element-template/fixtures/render/react-example/templates.json.txt +280 -0
- package/runtime/__test__/element-template/fixtures/render/sparse-element-slot/index.js.txt +14 -0
- package/runtime/__test__/element-template/fixtures/render/sparse-element-slot/index.tsx +17 -0
- package/runtime/__test__/element-template/fixtures/render/sparse-element-slot/output.txt +10 -0
- package/runtime/__test__/element-template/fixtures/render/sparse-element-slot/papi.txt +81 -0
- package/runtime/__test__/element-template/fixtures/render/sparse-element-slot/templates.json.txt +97 -0
- package/runtime/__test__/element-template/fixtures/render/template-dedupe/index.js.txt +28 -0
- package/runtime/__test__/element-template/fixtures/render/template-dedupe/index.tsx +28 -0
- package/runtime/__test__/element-template/fixtures/render/template-dedupe/output.txt +12 -0
- package/runtime/__test__/element-template/fixtures/render/template-dedupe/papi.txt +144 -0
- package/runtime/__test__/element-template/fixtures/render/template-dedupe/templates.json.txt +57 -0
- package/runtime/__test__/element-template/imports/global-props-api.test.ts +23 -0
- package/runtime/__test__/element-template/imports/init-data-api.test.ts +19 -0
- package/runtime/__test__/element-template/imports/jsx-runtime.test.ts +76 -0
- package/runtime/__test__/element-template/imports/legacy-react-runtime.test.ts +100 -0
- package/runtime/__test__/element-template/imports/main-thread-ref-api.test.ts +10 -0
- package/runtime/__test__/element-template/imports/no-legacy-imports.test.ts +415 -0
- package/runtime/__test__/element-template/imports/register-data-processors.test.ts +34 -0
- package/runtime/__test__/element-template/imports/suspense-lazy.test.ts +295 -0
- package/runtime/__test__/element-template/internal/legacy-internal-guardrail.test.ts +35 -0
- package/runtime/__test__/element-template/lynx/env.test.ts +242 -0
- package/runtime/__test__/element-template/lynx/lazy-bundle.test.ts +294 -0
- package/runtime/__test__/element-template/lynx/performance.test.ts +161 -0
- package/runtime/__test__/element-template/native/callDestroyLifetimeFun.test.ts +107 -0
- package/runtime/__test__/element-template/native/index.test.ts +224 -0
- package/runtime/__test__/element-template/native/init-timing-api.test.ts +29 -0
- package/runtime/__test__/element-template/native/main-thread-api.test.ts +202 -0
- package/runtime/__test__/element-template/native/mts-destroy.test.ts +226 -0
- package/runtime/__test__/element-template/native/reload.test.ts +588 -0
- package/runtime/__test__/element-template/runtime/background/adapter/background-adapter.et.test.tsx +65 -0
- package/runtime/__test__/element-template/runtime/background/commit-context.test.ts +91 -0
- package/runtime/__test__/element-template/runtime/background/commit-hook.test.ts +800 -0
- package/runtime/__test__/element-template/runtime/background/event/compiled-fixtures.test.tsx +867 -0
- package/runtime/__test__/element-template/runtime/background/global-props/compiled-fixtures.test.tsx +220 -0
- package/runtime/__test__/element-template/runtime/background/global-props.test.tsx +173 -0
- package/runtime/__test__/element-template/runtime/background/hydrate/compiled-fixtures.test.ts +43 -0
- package/runtime/__test__/element-template/runtime/background/hydrate/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/background/hydrate.test.ts +2179 -0
- package/runtime/__test__/element-template/runtime/background/init-data/compiled-fixtures.test.tsx +129 -0
- package/runtime/__test__/element-template/runtime/background/instance/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/background/instance.test.ts +2751 -0
- package/runtime/__test__/element-template/runtime/background/main-thread-function/compiled-fixtures.test.tsx +287 -0
- package/runtime/__test__/element-template/runtime/background/manager.test.ts +142 -0
- package/runtime/__test__/element-template/runtime/background/page-root-hydrate.test.ts +75 -0
- package/runtime/__test__/element-template/runtime/background/ref/compiled-fixtures.test.tsx +339 -0
- package/runtime/__test__/element-template/runtime/background/reload.test.ts +79 -0
- package/runtime/__test__/element-template/runtime/background/render/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/background/render/preact.test.tsx +268 -0
- package/runtime/__test__/element-template/runtime/background/root-render.test.tsx +265 -0
- package/runtime/__test__/element-template/runtime/background/suspense.test.tsx +940 -0
- package/runtime/__test__/element-template/runtime/background/update/compiled-fixtures.test.tsx +277 -0
- package/runtime/__test__/element-template/runtime/background/update/sparse-fixtures.test.tsx +163 -0
- package/runtime/__test__/element-template/runtime/background/update-timing.test.ts +127 -0
- package/runtime/__test__/element-template/runtime/hydration/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/hydration/hydration-listener.test.ts +1249 -0
- package/runtime/__test__/element-template/runtime/page/authored-page.test.ts +35 -0
- package/runtime/__test__/element-template/runtime/page/compiled-fixtures.test.tsx +560 -0
- package/runtime/__test__/element-template/runtime/page/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/page/page.test.ts +25 -0
- package/runtime/__test__/element-template/runtime/page/root-instance.test.ts +25 -0
- package/runtime/__test__/element-template/runtime/patch/compiled-fixtures.test.ts +40 -0
- package/runtime/__test__/element-template/runtime/patch/element-template-patch.test.tsx +3704 -0
- package/runtime/__test__/element-template/runtime/patch/fixtures.test.ts +16 -0
- package/runtime/__test__/element-template/runtime/patch/patch-listener-alog.test.ts +80 -0
- package/runtime/__test__/element-template/runtime/patch/update-fixture-helper.test.tsx +40 -0
- package/runtime/__test__/element-template/runtime/patch/update-timing.test.ts +203 -0
- package/runtime/__test__/element-template/runtime/prop-adapters/event.test.ts +183 -0
- package/runtime/__test__/element-template/runtime/prop-adapters/hydrate.test.ts +246 -0
- package/runtime/__test__/element-template/runtime/prop-adapters/ref.test.ts +155 -0
- package/runtime/__test__/element-template/runtime/prop-adapters/spread.test.ts +160 -0
- package/runtime/__test__/element-template/runtime/protocol/template-type.test.ts +40 -0
- package/runtime/__test__/element-template/runtime/render/fixtures.test.ts +18 -0
- package/runtime/__test__/element-template/runtime/render/render-main-thread.contract.test.ts +143 -0
- package/runtime/__test__/element-template/runtime/render/render-main-thread.test.ts +377 -0
- package/runtime/__test__/element-template/runtime/render/render-opcodes-into-element-template.et.test.tsx +791 -0
- package/runtime/__test__/element-template/runtime/render/render-to-opcodes.et.test.jsx +522 -0
- package/runtime/__test__/element-template/runtime/render/render-transform.contract.test.ts +564 -0
- package/runtime/__test__/element-template/runtime/template/element-template-attr-slot-plan.test.ts +373 -0
- package/runtime/__test__/element-template/runtime/template/element-template-handle.test.ts +228 -0
- package/runtime/__test__/element-template/runtime/template/element-template-registry.test.ts +65 -0
- package/runtime/__test__/element-template/runtime/template/main-thread-dynamic-attr-state.test.ts +567 -0
- package/runtime/__test__/element-template/runtime/template/main-thread-function.test.ts +280 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledFixtureApp.ts +26 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledFixtureCompiler.ts +76 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledFixtureModule.ts +74 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledFixtureRegistry.ts +22 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledHydrationScenario.ts +82 -0
- package/runtime/__test__/element-template/test-utils/debug/compiledThreadRunner.ts +70 -0
- package/runtime/__test__/element-template/test-utils/debug/envManager.ts +96 -0
- package/runtime/__test__/element-template/test-utils/debug/fixtureRunner.ts +284 -0
- package/runtime/__test__/element-template/test-utils/debug/hydrate.ts +23 -0
- package/runtime/__test__/element-template/test-utils/debug/registry.ts +43 -0
- package/runtime/__test__/element-template/test-utils/debug/renderFixtureRunner.ts +337 -0
- package/runtime/__test__/element-template/test-utils/debug/serializer.ts +79 -0
- package/runtime/__test__/element-template/test-utils/debug/updateRunner.test.tsx +148 -0
- package/runtime/__test__/element-template/test-utils/debug/updateRunner.ts +303 -0
- package/runtime/__test__/element-template/test-utils/mock/globals.js +35 -0
- package/runtime/__test__/element-template/test-utils/mock/jscontext-mock.test.ts +142 -0
- package/runtime/__test__/element-template/test-utils/mock/mockNativePapi/context.ts +305 -0
- package/runtime/__test__/element-template/test-utils/mock/mockNativePapi/templateTree.test.ts +187 -0
- package/runtime/__test__/element-template/test-utils/mock/mockNativePapi/templateTree.ts +745 -0
- package/runtime/__test__/element-template/test-utils/mock/mockNativePapi.ts +432 -0
- package/runtime/__test__/element-template/test-utils/mock/performance.js +68 -0
- package/runtime/__test__/element-template/test-utils/setup.js +100 -0
- package/runtime/__test__/element-template/vitest.config.ts +128 -0
- package/runtime/__test__/guardrails/snapshot-containment.test.ts +198 -0
- package/runtime/__test__/shared/profile.test.ts +88 -0
- package/runtime/__test__/snapshot/alog/elementPAPICall.test.js +50 -0
- package/runtime/__test__/snapshot/attribute-name.test.ts +78 -0
- package/runtime/__test__/snapshot/basic.test.jsx +718 -0
- package/runtime/__test__/snapshot/children.test.jsx +476 -0
- package/runtime/__test__/snapshot/clone.test.jsx +959 -0
- package/runtime/__test__/snapshot/commit-context.test.ts +29 -0
- package/runtime/__test__/snapshot/compat/export.test.jsx +42 -0
- package/runtime/__test__/snapshot/compat/hooks.test.jsx +45 -0
- package/runtime/__test__/snapshot/compat/initData.test.jsx +195 -0
- package/runtime/__test__/snapshot/compat/use-insertion-effect.test.jsx +128 -0
- package/runtime/__test__/snapshot/compat/use.test.jsx +111 -0
- package/runtime/__test__/snapshot/compat.test.jsx +199 -0
- package/runtime/__test__/snapshot/createElement.test.jsx +1352 -0
- package/runtime/__test__/snapshot/createSuspender.jsx +26 -0
- package/runtime/__test__/snapshot/css/compat.test.jsx +164 -0
- package/runtime/__test__/snapshot/css/remove-scoped-lazy-bundle.test.jsx +40 -0
- package/runtime/__test__/snapshot/css/remove-scoped-main-bundle.test.jsx +27 -0
- package/runtime/__test__/snapshot/css/scoped-lazy-bundle.test.jsx +45 -0
- package/runtime/__test__/snapshot/css/scoped-main-bundle.test.jsx +36 -0
- package/runtime/__test__/snapshot/debug/backgroundSnapshot-profile.test.jsx +366 -0
- package/runtime/__test__/snapshot/debug/children-with-same-key.test.jsx +43 -0
- package/runtime/__test__/snapshot/debug/describeInvalidValue.test.ts +32 -0
- package/runtime/__test__/snapshot/debug/formatPatch.test.ts +89 -0
- package/runtime/__test__/snapshot/debug/hooks-in-render.test.jsx +13 -0
- package/runtime/__test__/snapshot/debug/hooks-invalid-args.test.jsx +42 -0
- package/runtime/__test__/snapshot/debug/jsx-twice.test.jsx +55 -0
- package/runtime/__test__/snapshot/debug/missing-suspense.test.jsx +35 -0
- package/runtime/__test__/snapshot/debug/object-as-child.test.jsx +35 -0
- package/runtime/__test__/snapshot/debug/printSnapshot.test.jsx +155 -0
- package/runtime/__test__/snapshot/debug/profile.test.jsx +348 -0
- package/runtime/__test__/snapshot/debug/react-hooks-profile.test.jsx +285 -0
- package/runtime/__test__/snapshot/debug/set-state-in-ctor.test.jsx +40 -0
- package/runtime/__test__/snapshot/debug/too-many-rerenders.test.jsx +33 -0
- package/runtime/__test__/snapshot/debug/undefined-component.test.jsx +40 -0
- package/runtime/__test__/snapshot/debug/vnodeSource.test.ts +120 -0
- package/runtime/__test__/snapshot/delayed-lifecycle-events.test.jsx +62 -0
- package/runtime/__test__/snapshot/dynamicPartType.test.jsx +690 -0
- package/runtime/__test__/snapshot/element.test.jsx +46 -0
- package/runtime/__test__/snapshot/event.test.jsx +1294 -0
- package/runtime/__test__/snapshot/gesture/prepareGestureForCommit.test.js +86 -0
- package/runtime/__test__/snapshot/gesture/processGesture.test.ts +326 -0
- package/runtime/__test__/snapshot/gesture.test.jsx +1446 -0
- package/runtime/__test__/snapshot/hydrate.test.jsx +372 -0
- package/runtime/__test__/snapshot/jsx-runtime-lepus.test.jsx +89 -0
- package/runtime/__test__/snapshot/lazy.test.js +203 -0
- package/runtime/__test__/snapshot/legacySlot.legacy-slot.test.jsx +437 -0
- package/runtime/__test__/snapshot/lifecycle/commitHook.test.jsx +112 -0
- package/runtime/__test__/snapshot/lifecycle/destroy.test.jsx +47 -0
- package/runtime/__test__/snapshot/lifecycle/emptyPatch.test.jsx +104 -0
- package/runtime/__test__/snapshot/lifecycle/isRendering.test.jsx +114 -0
- package/runtime/__test__/snapshot/lifecycle/reload.test.jsx +1908 -0
- package/runtime/__test__/snapshot/lifecycle/reloadBG.jsx +79 -0
- package/runtime/__test__/snapshot/lifecycle/reloadMT.jsx +76 -0
- package/runtime/__test__/snapshot/lifecycle/resetPageDataError.test.jsx +79 -0
- package/runtime/__test__/snapshot/lifecycle/updateData.test.jsx +1688 -0
- package/runtime/__test__/snapshot/lifecycle/updateGlobalProps.event.test.jsx +226 -0
- package/runtime/__test__/snapshot/lifecycle/updateGlobalProps.test.jsx +382 -0
- package/runtime/__test__/snapshot/lifecycle.test.jsx +675 -0
- package/runtime/__test__/snapshot/list.test.jsx +4956 -0
- package/runtime/__test__/snapshot/lynx/component-compat.test.ts +188 -0
- package/runtime/__test__/snapshot/lynx/dynamic-import.test.ts +111 -0
- package/runtime/__test__/snapshot/lynx/injectLepusMethods.test.jsx +81 -0
- package/runtime/__test__/snapshot/lynx/lazy-bundle-fetchbundle.test.js +659 -0
- package/runtime/__test__/snapshot/lynx/lazy-bundle.test.js +576 -0
- package/runtime/__test__/snapshot/lynx/portals.test.jsx +677 -0
- package/runtime/__test__/snapshot/lynx/prepareLazyBundleMTS.test.js +212 -0
- package/runtime/__test__/snapshot/lynx/processEvalResult.test.js +23 -0
- package/runtime/__test__/snapshot/lynx/runtime-backend.test.ts +81 -0
- package/runtime/__test__/snapshot/lynx/suspense.test.jsx +1641 -0
- package/runtime/__test__/snapshot/lynx/timing.test.jsx +1011 -0
- package/runtime/__test__/snapshot/lynx-data-processors.test.ts +3 -0
- package/runtime/__test__/snapshot/lynxQueueMicrotask.test.jsx +38 -0
- package/runtime/__test__/snapshot/mtf-execid-churn.test.jsx +216 -0
- package/runtime/__test__/snapshot/page.test.jsx +417 -0
- package/runtime/__test__/snapshot/preact.test.jsx +930 -0
- package/runtime/__test__/snapshot/ref-parity.test.jsx +78 -0
- package/runtime/__test__/snapshot/ref.test.jsx +2368 -0
- package/runtime/__test__/snapshot/render.test.jsx +148 -0
- package/runtime/__test__/snapshot/renderToOpcodes.test.jsx +1618 -0
- package/runtime/__test__/snapshot/snapshotPatch.test.jsx +1798 -0
- package/runtime/__test__/snapshot/spread.test.jsx +771 -0
- package/runtime/__test__/snapshot/ssr.test.jsx +574 -0
- package/runtime/__test__/snapshot/use-main-thread.test.jsx +141 -0
- package/runtime/__test__/snapshot/utils/debug.js +41 -0
- package/runtime/__test__/snapshot/utils/envManager.ts +109 -0
- package/runtime/__test__/snapshot/utils/globals.js +224 -0
- package/runtime/__test__/snapshot/utils/inject.ts +31 -0
- package/runtime/__test__/snapshot/utils/jsModule.ts +49 -0
- package/runtime/__test__/snapshot/utils/nativeMethod.ts +498 -0
- package/runtime/__test__/snapshot/utils/runtimeProxy.test.js +36 -0
- package/runtime/__test__/snapshot/utils/runtimeProxy.ts +73 -0
- package/runtime/__test__/snapshot/utils/setup.js +72 -0
- package/runtime/__test__/snapshot/worklet/onPost.test.js +30 -0
- package/runtime/__test__/snapshot/worklet/runOnBackground.test.js +234 -0
- package/runtime/__test__/snapshot/worklet/runOnMainThread.test.jsx +402 -0
- package/runtime/__test__/snapshot/worklet/transform.test.js +35 -0
- package/runtime/__test__/snapshot/worklet/workletRef.test.jsx +292 -0
- package/runtime/__test__/snapshot/workletEvent.test.jsx +1286 -0
- package/runtime/__test__/snapshot/workletLifecycle.test.ts +198 -0
- package/runtime/__test__/snapshot/workletRef.test.jsx +831 -0
- package/runtime/__test__/snapshot/workletRefBG.jsx +95 -0
- package/runtime/__test__/snapshot/workletRefMT.jsx +99 -0
- package/runtime/__test__/test-utils/lynx-event-emitter.ts +63 -0
- package/runtime/__test__/tsconfig.json +9 -0
- package/runtime/__test__/worklet-runtime/api/element.test.js +274 -0
- package/runtime/__test__/worklet-runtime/delayWorkletEvent.test.js +89 -0
- package/runtime/__test__/worklet-runtime/eventPropagation.test.js +89 -0
- package/runtime/__test__/worklet-runtime/jsFunctionLifecycle.test.js +89 -0
- package/runtime/__test__/worklet-runtime/mainThreadFlushLoopGuard.test.js +235 -0
- package/runtime/__test__/worklet-runtime/observers.test.js +119 -0
- package/runtime/__test__/worklet-runtime/profile.test.js +27 -0
- package/runtime/__test__/worklet-runtime/runOnBackground.test.js +186 -0
- package/runtime/__test__/worklet-runtime/runOnMainThread.test.js +66 -0
- package/runtime/__test__/worklet-runtime/workletRef.test.js +328 -0
- package/runtime/__test__/worklet-runtime/workletRuntime.test.js +534 -0
- package/runtime/compat/index.d.ts +48 -1
- package/runtime/compat/index.js +7 -3
- package/runtime/lazy/compat.js +2 -0
- package/runtime/lazy/element-template-internal.js +35 -0
- package/runtime/lazy/element-template-jsx-dev-runtime.js +19 -0
- package/runtime/lazy/element-template-jsx-runtime.js +14 -0
- package/runtime/lazy/element-template.js +53 -0
- package/runtime/lazy/internal.js +2 -1
- package/runtime/lepus/index.js +2 -2
- package/runtime/lepus/jsx-runtime/index.js +3 -8
- package/runtime/lib/core/component.js +3 -3
- package/runtime/lib/core/component.js.map +1 -1
- package/runtime/lib/core/forceRootRender.js +3 -2
- package/runtime/lib/core/forceRootRender.js.map +1 -1
- package/runtime/lib/core/globalProps.js +1 -1
- package/runtime/lib/core/globalProps.js.map +1 -1
- package/runtime/lib/core/hooks/mainThreadImpl.js +2 -0
- package/runtime/lib/core/hooks/mainThreadImpl.js.map +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js.map +1 -1
- package/runtime/lib/core/lynx/lazy-bundle.js +1 -1
- package/runtime/lib/core/lynx/lazy-bundle.js.map +1 -1
- package/runtime/lib/core/main-thread-ref.js +1 -1
- package/runtime/lib/core/main-thread-ref.js.map +1 -1
- package/runtime/lib/core/ref.d.ts +7 -5
- package/runtime/lib/core/ref.js +22 -11
- package/runtime/lib/core/ref.js.map +1 -1
- package/runtime/lib/element-template/background/attr-slots.d.ts +5 -1
- package/runtime/lib/element-template/background/attr-slots.js +17 -6
- package/runtime/lib/element-template/background/attr-slots.js.map +1 -1
- package/runtime/lib/element-template/background/commit-context.d.ts +1 -1
- package/runtime/lib/element-template/background/commit-context.js +8 -9
- package/runtime/lib/element-template/background/commit-context.js.map +1 -1
- package/runtime/lib/element-template/background/commit-hook.js +60 -51
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/destroy.js +4 -1
- package/runtime/lib/element-template/background/destroy.js.map +1 -1
- package/runtime/lib/element-template/background/hydrate.js +34 -38
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js +18 -10
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.d.ts +7 -5
- package/runtime/lib/element-template/background/instance.js +79 -38
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/background/page-root-hydrate.js +1 -1
- package/runtime/lib/element-template/background/page-root-hydrate.js.map +1 -1
- package/runtime/lib/element-template/debug/alog.d.ts +10 -4
- package/runtime/lib/element-template/debug/alog.js +22 -9
- package/runtime/lib/element-template/debug/alog.js.map +1 -1
- package/runtime/lib/element-template/debug/profile.js +2 -2
- package/runtime/lib/element-template/debug/profile.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +1 -0
- package/runtime/lib/element-template/internal.js +1 -0
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/jsx-runtime/index.d.ts +3 -1
- package/runtime/lib/element-template/jsx-runtime/index.js +2 -4
- package/runtime/lib/element-template/jsx-runtime/index.js.map +1 -1
- package/runtime/lib/element-template/lynx/env.js +1 -2
- package/runtime/lib/element-template/lynx/env.js.map +1 -1
- package/runtime/lib/element-template/native/callDestroyLifetimeFun.js +2 -0
- package/runtime/lib/element-template/native/callDestroyLifetimeFun.js.map +1 -1
- package/runtime/lib/element-template/native/index.js +9 -7
- package/runtime/lib/element-template/native/index.js.map +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js +3 -3
- package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js +15 -7
- package/runtime/lib/element-template/native/patch-listener.js.map +1 -1
- package/runtime/lib/element-template/native/reload-main-thread.js +21 -3
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/ref.d.ts +3 -1
- package/runtime/lib/element-template/prop-adapters/ref.js +2 -2
- package/runtime/lib/element-template/prop-adapters/ref.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/spread.js +1 -4
- package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
- package/runtime/lib/element-template/protocol/opcodes.d.ts +2 -0
- package/runtime/lib/element-template/protocol/opcodes.js +2 -0
- package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
- package/runtime/lib/element-template/protocol/types.d.ts +45 -22
- package/runtime/lib/element-template/runtime/list/list.d.ts +5 -5
- package/runtime/lib/element-template/runtime/list/list.js +8 -7
- package/runtime/lib/element-template/runtime/list/list.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/authored-page.js +17 -2
- package/runtime/lib/element-template/runtime/page/authored-page.js.map +1 -1
- package/runtime/lib/element-template/runtime/page/page.d.ts +3 -3
- package/runtime/lib/element-template/runtime/page/page.js +1 -1
- package/runtime/lib/element-template/runtime/page/page.js.map +1 -1
- package/runtime/lib/element-template/runtime/patch.js +78 -50
- package/runtime/lib/element-template/runtime/patch.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.js +7 -5
- package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-opcodes.d.ts +3 -1
- package/runtime/lib/element-template/runtime/render/render-opcodes.js +47 -38
- package/runtime/lib/element-template/runtime/render/render-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js +19 -17
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.d.ts +3 -0
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js +39 -0
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/handle.d.ts +5 -3
- package/runtime/lib/element-template/runtime/template/handle.js +14 -6
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.d.ts +16 -7
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.js +133 -55
- 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-ref-ctx.d.ts +4 -0
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.js +30 -1
- package/runtime/lib/element-template/runtime/template/main-thread-ref-ctx.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/registry.d.ts +6 -6
- package/runtime/lib/element-template/runtime/template/registry.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/shared/attribute-name.js +1 -2
- package/runtime/lib/shared/attribute-name.js.map +1 -1
- package/runtime/lib/shared/component-stack.js +2 -1
- package/runtime/lib/shared/component-stack.js.map +1 -1
- package/runtime/lib/shared/render-constants.d.ts +4 -2
- package/runtime/lib/shared/render-constants.js +6 -2
- package/runtime/lib/shared/render-constants.js.map +1 -1
- package/runtime/lib/snapshot/alog/render.js +1 -0
- package/runtime/lib/snapshot/alog/render.js.map +1 -1
- package/runtime/lib/snapshot/debug/profileHooks.js +2 -2
- package/runtime/lib/snapshot/debug/profileHooks.js.map +1 -1
- package/runtime/lib/snapshot/debug/vnodeSource.js +1 -0
- package/runtime/lib/snapshot/debug/vnodeSource.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/destroy.js +5 -2
- package/runtime/lib/snapshot/lifecycle/destroy.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.js +1 -0
- package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/snapshot/lynx/children.js +1 -2
- package/runtime/lib/snapshot/lynx/children.js.map +1 -1
- package/runtime/lib/snapshot/lynx/env.js +1 -1
- package/runtime/lib/snapshot/lynx/env.js.map +1 -1
- package/runtime/lib/snapshot/lynx/suspense.js +1 -1
- package/runtime/lib/snapshot/lynx/suspense.js.map +1 -1
- package/runtime/lib/snapshot/lynx/tt.js +5 -5
- package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
- package/runtime/lib/snapshot/renderToOpcodes/index.js +12 -13
- package/runtime/lib/snapshot/renderToOpcodes/index.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.d.ts +1 -0
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +23 -25
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/platformInfo.js +1 -3
- package/runtime/lib/snapshot/snapshot/platformInfo.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/ref.d.ts +3 -2
- package/runtime/lib/snapshot/snapshot/ref.js +4 -7
- package/runtime/lib/snapshot/snapshot/ref.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshot.d.ts +1 -0
- package/runtime/lib/snapshot/snapshot/snapshot.js +5 -0
- package/runtime/lib/snapshot/snapshot/snapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/spread.js +2 -8
- package/runtime/lib/snapshot/snapshot/spread.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/lib/utils.d.ts +9 -0
- package/runtime/lib/utils.js +27 -0
- package/runtime/lib/utils.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.d.ts +5 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.js +7 -1
- package/runtime/lib/worklet-runtime/bindings/bindings.js.map +1 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js +2 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js.map +1 -1
- package/runtime/package.json +37 -0
- package/runtime/src/core/background-function/exec-map.ts +44 -0
- package/runtime/src/core/background-function/handle.ts +31 -0
- package/runtime/src/core/background-function/run-on-background.ts +151 -0
- package/runtime/src/core/commit-context.ts +26 -0
- package/runtime/src/core/compat/legacy-react-runtime.ts +39 -0
- package/runtime/src/core/compat/lynxComponent.ts +91 -0
- package/runtime/src/core/component.ts +152 -0
- package/runtime/src/core/forceRootRender.ts +52 -0
- package/runtime/src/core/globalProps.ts +111 -0
- package/runtime/src/core/hooks/mainThread.ts +9 -0
- package/runtime/src/core/hooks/mainThreadImpl.ts +226 -0
- package/runtime/src/core/hooks/react.ts +172 -0
- package/runtime/src/core/hooks/useLynxGlobalEventListener.ts +59 -0
- package/runtime/src/core/initData.ts +191 -0
- package/runtime/src/core/lynx/dynamic-import.ts +37 -0
- package/runtime/src/core/lynx/lazy-bundle.ts +352 -0
- package/runtime/src/core/lynx/runtime-backend.ts +30 -0
- package/runtime/src/core/lynx-data-processors.ts +85 -0
- package/runtime/src/core/lynx-page-data.ts +22 -0
- package/runtime/src/core/lynx-update-data.ts +47 -0
- package/runtime/src/core/main-thread-function.ts +12 -0
- package/runtime/src/core/main-thread-ref-init-value.ts +29 -0
- package/runtime/src/core/main-thread-ref.ts +225 -0
- package/runtime/src/core/mts-capability.ts +21 -0
- package/runtime/src/core/performance.ts +186 -0
- package/runtime/src/core/ref.ts +181 -0
- package/runtime/src/core/reload-version.ts +13 -0
- package/runtime/src/core/runtime-destroy.ts +22 -0
- package/runtime/src/core/thread-function-call/main-thread.ts +81 -0
- package/runtime/src/core/thread-function-call/return-value.ts +77 -0
- package/runtime/src/document.ts +86 -0
- package/runtime/src/element-template/background/attr-slots.ts +132 -0
- package/runtime/src/element-template/background/commit-context.ts +47 -0
- package/runtime/src/element-template/background/commit-hook.ts +211 -0
- package/runtime/src/element-template/background/destroy.ts +34 -0
- package/runtime/src/element-template/background/document.ts +41 -0
- package/runtime/src/element-template/background/hydrate.ts +605 -0
- package/runtime/src/element-template/background/hydration-listener.ts +198 -0
- package/runtime/src/element-template/background/instance.ts +820 -0
- package/runtime/src/element-template/background/manager.ts +89 -0
- package/runtime/src/element-template/background/page-root-hydrate.ts +23 -0
- package/runtime/src/element-template/background/render-scope.ts +52 -0
- package/runtime/src/element-template/client/root.ts +71 -0
- package/runtime/src/element-template/debug/alog.ts +238 -0
- package/runtime/src/element-template/debug/elementPAPICall.ts +89 -0
- package/runtime/src/element-template/debug/profile.ts +194 -0
- package/runtime/src/element-template/hydration-map.ts +13 -0
- package/runtime/src/element-template/index.ts +138 -0
- package/runtime/src/element-template/internal.ts +69 -0
- package/runtime/src/element-template/jsx-dev-runtime/index.ts +4 -0
- package/runtime/src/element-template/jsx-runtime/index.ts +86 -0
- package/runtime/src/element-template/lynx/env.ts +59 -0
- package/runtime/src/element-template/lynx/performance.ts +20 -0
- package/runtime/src/element-template/native/callDestroyLifetimeFun.ts +10 -0
- package/runtime/src/element-template/native/index.ts +92 -0
- package/runtime/src/element-template/native/main-thread-api.ts +55 -0
- package/runtime/src/element-template/native/mts-destroy.ts +46 -0
- package/runtime/src/element-template/native/patch-listener.ts +136 -0
- package/runtime/src/element-template/native/reload-background.ts +43 -0
- package/runtime/src/element-template/native/reload-main-thread.ts +76 -0
- package/runtime/src/element-template/prop-adapters/event-value.ts +11 -0
- package/runtime/src/element-template/prop-adapters/event.ts +87 -0
- package/runtime/src/element-template/prop-adapters/ref.ts +148 -0
- package/runtime/src/element-template/prop-adapters/spread.ts +66 -0
- package/runtime/src/element-template/protocol/lifecycle-constant.ts +8 -0
- package/runtime/src/element-template/protocol/opcodes.ts +18 -0
- package/runtime/src/element-template/protocol/page.ts +7 -0
- package/runtime/src/element-template/protocol/template-type.ts +56 -0
- package/runtime/src/element-template/protocol/types.ts +229 -0
- package/runtime/src/element-template/protocol/update-event.ts +46 -0
- package/runtime/src/element-template/runtime/list/list.ts +829 -0
- package/runtime/src/element-template/runtime/page/authored-page.ts +53 -0
- package/runtime/src/element-template/runtime/page/page.ts +21 -0
- package/runtime/src/element-template/runtime/page/root-instance.ts +25 -0
- package/runtime/src/element-template/runtime/patch.ts +517 -0
- package/runtime/src/element-template/runtime/render/render-main-thread.ts +81 -0
- package/runtime/src/element-template/runtime/render/render-opcodes.ts +313 -0
- package/runtime/src/element-template/runtime/render/render-to-opcodes.ts +411 -0
- package/runtime/src/element-template/runtime/template/attr-slot-plan.ts +153 -0
- package/runtime/src/element-template/runtime/template/handle.ts +95 -0
- package/runtime/src/element-template/runtime/template/main-thread-background-function.ts +48 -0
- package/runtime/src/element-template/runtime/template/main-thread-dynamic-attr-state.ts +242 -0
- package/runtime/src/element-template/runtime/template/main-thread-event-ctx.ts +46 -0
- package/runtime/src/element-template/runtime/template/main-thread-function.ts +32 -0
- package/runtime/src/element-template/runtime/template/main-thread-ref-ctx.ts +95 -0
- package/runtime/src/element-template/runtime/template/registry.ts +72 -0
- package/runtime/src/element-template/runtime/template/typed-attributes.ts +25 -0
- package/runtime/src/element-template/runtime-backend-marker.ts +7 -0
- package/runtime/src/element-template/types.d.ts +128 -0
- package/runtime/src/index.ts +95 -0
- package/runtime/src/internal.ts +102 -0
- package/runtime/src/lynx-api.ts +563 -0
- package/runtime/src/lynx.ts +93 -0
- package/runtime/src/root.ts +38 -0
- package/runtime/src/runtime-backend-marker.ts +7 -0
- package/runtime/src/shared/attribute-name.ts +109 -0
- package/runtime/src/shared/component-stack.ts +168 -0
- package/runtime/src/shared/index-map.ts +26 -0
- package/runtime/src/shared/profile.ts +36 -0
- package/runtime/src/shared/render-constants.ts +42 -0
- package/runtime/src/snapshot/alog/elementPAPICall.ts +132 -0
- package/runtime/src/snapshot/alog/index.ts +8 -0
- package/runtime/src/snapshot/alog/render.ts +33 -0
- package/runtime/src/snapshot/compat/componentIs.ts +30 -0
- package/runtime/src/snapshot/debug/debug.ts +9 -0
- package/runtime/src/snapshot/debug/describeInvalidValue.ts +25 -0
- package/runtime/src/snapshot/debug/formatPatch.ts +28 -0
- package/runtime/src/snapshot/debug/printSnapshot.ts +63 -0
- package/runtime/src/snapshot/debug/profileHooks.ts +271 -0
- package/runtime/src/snapshot/debug/vnodeSource.ts +82 -0
- package/runtime/src/snapshot/gesture/processGesture.ts +274 -0
- package/runtime/src/snapshot/gesture/processGestureBagkround.ts +94 -0
- package/runtime/src/snapshot/gesture/types.ts +46 -0
- package/runtime/src/snapshot/index.ts +5 -0
- package/runtime/src/snapshot/lifecycle/constant.ts +29 -0
- package/runtime/src/snapshot/lifecycle/destroy.ts +38 -0
- package/runtime/src/snapshot/lifecycle/event/delayEvents.ts +11 -0
- package/runtime/src/snapshot/lifecycle/event/delayLifecycleEvents.ts +15 -0
- package/runtime/src/snapshot/lifecycle/event/firstScreenSync.ts +97 -0
- package/runtime/src/snapshot/lifecycle/isRendering.ts +27 -0
- package/runtime/src/snapshot/lifecycle/patch/commit.ts +278 -0
- package/runtime/src/snapshot/lifecycle/patch/error.ts +66 -0
- package/runtime/src/snapshot/lifecycle/patch/globalState.ts +16 -0
- package/runtime/src/snapshot/lifecycle/patch/isMainThreadHydrating.ts +13 -0
- package/runtime/src/snapshot/lifecycle/patch/nodesRefApply.ts +119 -0
- package/runtime/src/snapshot/lifecycle/patch/snapshotPatch.ts +97 -0
- package/runtime/src/snapshot/lifecycle/patch/snapshotPatchApply.ts +170 -0
- package/runtime/src/snapshot/lifecycle/patch/updateMainThread.ts +115 -0
- package/runtime/src/snapshot/lifecycle/ref/delay.ts +82 -0
- package/runtime/src/snapshot/lifecycle/reload.ts +95 -0
- package/runtime/src/snapshot/lifecycle/render.ts +36 -0
- package/runtime/src/snapshot/list/list.ts +320 -0
- package/runtime/src/snapshot/list/listUpdateInfo.ts +265 -0
- package/runtime/src/snapshot/list/pendingListUpdates.ts +44 -0
- package/runtime/src/snapshot/lynx/calledByNative.ts +180 -0
- package/runtime/src/snapshot/lynx/children.ts +40 -0
- package/runtime/src/snapshot/lynx/element.ts +217 -0
- package/runtime/src/snapshot/lynx/env.ts +58 -0
- package/runtime/src/snapshot/lynx/injectLepusMethods.ts +53 -0
- package/runtime/src/snapshot/lynx/lazyBundleConstants.ts +9 -0
- package/runtime/src/snapshot/lynx/nodesRef.ts +47 -0
- package/runtime/src/snapshot/lynx/performance.ts +20 -0
- package/runtime/src/snapshot/lynx/portals.ts +203 -0
- package/runtime/src/snapshot/lynx/portalsPending.ts +62 -0
- package/runtime/src/snapshot/lynx/prepareLazyBundleMTS.ts +68 -0
- package/runtime/src/snapshot/lynx/runWithForce.ts +18 -0
- package/runtime/src/snapshot/lynx/suspense.ts +58 -0
- package/runtime/src/snapshot/lynx/tt.ts +281 -0
- package/runtime/src/snapshot/renderToOpcodes/hydrate.ts +465 -0
- package/runtime/src/snapshot/renderToOpcodes/index.ts +445 -0
- package/runtime/src/snapshot/renderToOpcodes/opcodes.ts +155 -0
- package/runtime/src/snapshot/snapshot/backgroundSnapshot.ts +822 -0
- package/runtime/src/snapshot/snapshot/constants.ts +27 -0
- package/runtime/src/snapshot/snapshot/definition.ts +258 -0
- package/runtime/src/snapshot/snapshot/dynamicPartType.ts +40 -0
- package/runtime/src/snapshot/snapshot/event.ts +33 -0
- package/runtime/src/snapshot/snapshot/gesture.ts +31 -0
- package/runtime/src/snapshot/snapshot/index.ts +8 -0
- package/runtime/src/snapshot/snapshot/list.ts +66 -0
- package/runtime/src/snapshot/snapshot/platformInfo.ts +109 -0
- package/runtime/src/snapshot/snapshot/reconstructInstanceTree.ts +46 -0
- package/runtime/src/snapshot/snapshot/ref.ts +116 -0
- package/runtime/src/snapshot/snapshot/snapshot.ts +627 -0
- package/runtime/src/snapshot/snapshot/snapshotCreatorMap.ts +33 -0
- package/runtime/src/snapshot/snapshot/snapshotInstanceHydrationMap.ts +17 -0
- package/runtime/src/snapshot/snapshot/snapshotInstanceManager.ts +22 -0
- package/runtime/src/snapshot/snapshot/spread.ts +378 -0
- package/runtime/src/snapshot/snapshot/types.ts +29 -0
- package/runtime/src/snapshot/snapshot/utils.ts +59 -0
- package/runtime/src/snapshot/snapshot/workletEvent.ts +73 -0
- package/runtime/src/snapshot/snapshot/workletRef.ts +97 -0
- package/runtime/src/snapshot/worklet/call/runOnMainThread.ts +37 -0
- package/runtime/src/snapshot/worklet/ctx.ts +22 -0
- package/runtime/src/snapshot/worklet/destroy.ts +14 -0
- package/runtime/src/snapshot/worklet/functionality.ts +22 -0
- package/runtime/src/snapshot/worklet/hmr.ts +34 -0
- package/runtime/src/snapshot/worklet/ref/updateInitValue.ts +30 -0
- package/runtime/src/utils.ts +134 -0
- package/runtime/src/worklet-runtime/api/animation/animation.ts +48 -0
- package/runtime/src/worklet-runtime/api/animation/effect.ts +20 -0
- package/runtime/src/worklet-runtime/api/element.ts +152 -0
- package/runtime/src/worklet-runtime/api/lepusQuerySelector.ts +34 -0
- package/runtime/src/worklet-runtime/api/lynxApi.ts +42 -0
- package/runtime/src/worklet-runtime/bindings/bindings.ts +91 -0
- package/runtime/src/worklet-runtime/bindings/events.ts +29 -0
- package/runtime/src/worklet-runtime/bindings/index.ts +12 -0
- package/runtime/src/worklet-runtime/bindings/loadRuntime.ts +25 -0
- package/runtime/src/worklet-runtime/bindings/observers.ts +61 -0
- package/runtime/src/worklet-runtime/bindings/types.ts +84 -0
- package/runtime/src/worklet-runtime/delayRunOnBackground.ts +51 -0
- package/runtime/src/worklet-runtime/delayWorkletEvent.ts +70 -0
- package/runtime/src/worklet-runtime/eomImpl.ts +14 -0
- package/runtime/src/worklet-runtime/eventPropagation.ts +56 -0
- package/runtime/src/worklet-runtime/global.ts +28 -0
- package/runtime/src/worklet-runtime/hydrate.ts +113 -0
- package/runtime/src/worklet-runtime/index.ts +12 -0
- package/runtime/src/worklet-runtime/jsFunctionLifecycle.ts +69 -0
- package/runtime/src/worklet-runtime/listeners.ts +28 -0
- package/runtime/src/worklet-runtime/runOnMainThread.ts +21 -0
- package/runtime/src/worklet-runtime/types/dev.d.ts +4 -0
- package/runtime/src/worklet-runtime/types/elementApi.d.ts +97 -0
- package/runtime/src/worklet-runtime/types/runtimeProxy.d.ts +32 -0
- package/runtime/src/worklet-runtime/types/systeminfo.d.ts +19 -0
- package/runtime/src/worklet-runtime/utils/mainThreadFlushLoopGuard.ts +87 -0
- package/runtime/src/worklet-runtime/utils/profile.ts +20 -0
- package/runtime/src/worklet-runtime/utils/version.ts +11 -0
- package/runtime/src/worklet-runtime/workletRef.ts +119 -0
- package/runtime/src/worklet-runtime/workletRuntime.ts +215 -0
- package/runtime/tsconfig.json +30 -0
- package/runtime/turbo.json +21 -0
- package/runtime/types/internal-preact.d.ts +67 -0
- package/runtime/types/types.d.ts +339 -0
- package/runtime/vitest.config.ts +181 -0
- package/runtime/worklet-runtime/dev.js +1 -1
- package/testing-library/.npmignore +6 -0
- package/testing-library/.turbo/turbo-build.log +28 -0
- package/testing-library/README.md +109 -0
- package/testing-library/dist/env/index.js +1 -2
- package/testing-library/dist/index.d.ts +1 -1
- package/testing-library/dist/rstest-config.d.ts +15 -1
- package/testing-library/dist/rstest-config.js +38 -5
- package/testing-library/dist/setupFiles/common/runtime-setup.js +3 -3
- package/testing-library/etc/react-lynx-testing-library.api.md +71 -0
- package/testing-library/loaders/jsx-loader.js +49 -0
- package/testing-library/node_modules/.bin/rsbuild +55 -0
- package/testing-library/node_modules/.bin/rspeedy +55 -0
- package/testing-library/node_modules/.bin/rstest +55 -0
- package/testing-library/package.json +28 -0
- package/testing-library/rslib.config.ts +97 -0
- package/testing-library/rstest.config.ts +44 -0
- package/testing-library/src/__tests__/3.1/text.test.jsx +109 -0
- package/testing-library/src/__tests__/act.test.jsx +348 -0
- package/testing-library/src/__tests__/alog.test.jsx +813 -0
- package/testing-library/src/__tests__/auto-cleanup-skip.test.jsx +25 -0
- package/testing-library/src/__tests__/auto-cleanup.test.jsx +12 -0
- package/testing-library/src/__tests__/background-only.test.jsx +45 -0
- package/testing-library/src/__tests__/button.test.jsx +25 -0
- package/testing-library/src/__tests__/cleanup.test.jsx +29 -0
- package/testing-library/src/__tests__/css/index.test.jsx +47 -0
- package/testing-library/src/__tests__/css/style1.css +3 -0
- package/testing-library/src/__tests__/css/style2.css +3 -0
- package/testing-library/src/__tests__/css/style3.module.css +3 -0
- package/testing-library/src/__tests__/dom-reuse.test.jsx +1515 -0
- package/testing-library/src/__tests__/end-to-end.test.jsx +212 -0
- package/testing-library/src/__tests__/events.test.jsx +368 -0
- package/testing-library/src/__tests__/lazy-bundle/LazyComponent.jsx +4 -0
- package/testing-library/src/__tests__/lazy-bundle/index.test.jsx +598 -0
- package/testing-library/src/__tests__/list.test.jsx +1015 -0
- package/testing-library/src/__tests__/lynx.test.jsx +85 -0
- package/testing-library/src/__tests__/portals.test.jsx +1303 -0
- package/testing-library/src/__tests__/preact-signals.test.jsx +190 -0
- package/testing-library/src/__tests__/raw-text.test.jsx +59 -0
- package/testing-library/src/__tests__/ref.test.jsx +573 -0
- package/testing-library/src/__tests__/remove-element.test.jsx +68 -0
- package/testing-library/src/__tests__/render.test.jsx +296 -0
- package/testing-library/src/__tests__/renderComponent.test.jsx +344 -0
- package/testing-library/src/__tests__/renderHook.test.jsx +61 -0
- package/testing-library/src/__tests__/rerender.test.jsx +62 -0
- package/testing-library/src/__tests__/rstest-config.test.js +31 -0
- package/testing-library/src/__tests__/slot-jsx.test.jsx +965 -0
- package/testing-library/src/__tests__/spread.test.jsx +212 -0
- package/testing-library/src/__tests__/stopwatch.test.jsx +80 -0
- package/testing-library/src/__tests__/text.test.jsx +130 -0
- package/testing-library/src/__tests__/worklet.test.jsx +618 -0
- package/testing-library/src/entry.ts +2 -0
- package/testing-library/src/env/index.ts +2 -0
- package/testing-library/src/env/rstest.ts +7 -0
- package/testing-library/src/env/vitest.ts +27 -0
- package/testing-library/src/fire-event.ts +199 -0
- package/testing-library/src/index.jsx +25 -0
- package/testing-library/src/plugins/index.ts +2 -0
- package/testing-library/src/plugins/vitest.ts +387 -0
- package/testing-library/src/pure.jsx +159 -0
- package/testing-library/src/rstest-config.ts +173 -0
- package/testing-library/src/setupFiles/common/bootstrap.js +6 -0
- package/testing-library/src/setupFiles/common/runtime-setup.js +142 -0
- package/testing-library/src/setupFiles/inner/rstest.js +13 -0
- package/testing-library/src/setupFiles/inner/vitest.js +17 -0
- package/testing-library/src/setupFiles/rstest.js +30 -0
- package/testing-library/src/setupFiles/vitest.js +29 -0
- package/testing-library/src/vitest.config.ts +14 -0
- package/testing-library/tsconfig.json +16 -0
- package/testing-library/turbo.json +21 -0
- package/testing-library/types/entry.d.ts +1 -1
- package/testing-library/vitest-polyfill.cjs +6 -0
- package/testing-library/vitest.3.1.config.ts +17 -0
- package/testing-library/vitest.config.ts +14 -0
- package/transform/.cargo/config.toml +2 -0
- package/transform/.gitignore +6 -0
- package/transform/.npmignore +8 -0
- package/transform/.turbo/turbo-build$colon$wasm.log +252 -0
- package/transform/Cargo.toml +45 -0
- package/transform/__test__/background-only.spec.js +222 -0
- package/transform/__test__/basic.bench.js +80 -0
- package/transform/__test__/css/__snapshots__/transform-all-css-scoped-all.js +18 -0
- package/transform/__test__/css/__snapshots__/transform-all-css-scoped-modules.js +18 -0
- package/transform/__test__/css/__snapshots__/transform-all-css-scoped-none.js +18 -0
- package/transform/__test__/css/__snapshots__/transform-imports-css-scoped-all.js +24 -0
- package/transform/__test__/css/__snapshots__/transform-imports-css-scoped-modules.js +24 -0
- package/transform/__test__/css/__snapshots__/transform-imports-css-scoped-none.js +24 -0
- package/transform/__test__/css/__snapshots__/transform-imports-defaults.js +5 -0
- package/transform/__test__/css/__snapshots__/transform-imports-without-jsx-css-scoped-all.js +5 -0
- package/transform/__test__/css/__snapshots__/transform-imports-without-jsx-css-scoped-modules.js +5 -0
- package/transform/__test__/css/__snapshots__/transform-imports-without-jsx-css-scoped-none.js +5 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-all-lazy-bundle.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-all.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-modules-lazy-bundle.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-modules.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-none-lazy-bundle.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-css-scoped-none.js +50 -0
- package/transform/__test__/css/__snapshots__/transform-jsx-defaults.js +50 -0
- package/transform/__test__/css/css-scope.spec.js +209 -0
- package/transform/__test__/css/inline-style.spec.js +53 -0
- package/transform/__test__/css/object-lit-style.spec.js +293 -0
- package/transform/__test__/defines.spec.js +321 -0
- package/transform/__test__/fixture.spec.js +2496 -0
- package/transform/__test__/typescript.spec.js +97 -0
- package/transform/build.rs +11 -0
- package/transform/crates/swc_plugin_background_only/Cargo.toml +13 -0
- package/transform/crates/swc_plugin_background_only/lib.rs +326 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/defaults_to_null_without_fallback.js +5 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/desugars_nested_background_only.js +5 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/desugars_to_thread_conditional_in_child_position.js +8 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/desugars_to_thread_conditional_in_expression_position.js +3 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/keeps_the_fragment_for_a_lone_text_child.js +3 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/renders_nothing_for_empty_children.js +5 -0
- package/transform/crates/swc_plugin_background_only/tests/__swc_snapshots__/lib.rs/unwraps_a_lone_child_past_layout_and_comments.js +3 -0
- package/transform/crates/swc_plugin_compat/Cargo.toml +24 -0
- package/transform/crates/swc_plugin_compat/is_component_class.rs +51 -0
- package/transform/crates/swc_plugin_compat/lib.rs +1885 -0
- package/transform/crates/swc_plugin_compat/napi.rs +526 -0
- package/transform/crates/swc_plugin_compat/simplify_ctor_like_react_lynx_2.rs +172 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_add_component_element.js +17 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_add_component_element_compiler_only.js +16 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_add_component_element_embedded.js +2 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_add_component_element_embedded_compiler_only.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_add_component_is_import.js +3 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_change_runtime_pkg.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_handle_recursive.js +4 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_left_no_remove_component_element_attr.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_not_handle_jsx_member_expression.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_not_rename_view_in_scope.js +6 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_not_rename_view_redeclaration.js +4 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_not_transform_event_props_when_disabled.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_remove_component_attr_regex.js +8 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_rename_view.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_simplify_ctor.js +9 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_simplify_ctor_correct_order.js +10 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_simplify_ctor_not_remain_local_decls.js +9 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_simplify_ctor_not_remain_local_decls_with_macro.js +19 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_simplify_ctor_not_remain_local_decls_with_spread.js +12 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_transform_event_props_1.js +1 -0
- package/transform/crates/swc_plugin_compat/tests/__swc_snapshots__/lib.rs/should_transform_event_props_2.js +1 -0
- package/transform/crates/swc_plugin_css_scope/Cargo.toml +18 -0
- package/transform/crates/swc_plugin_css_scope/lib.rs +327 -0
- package/transform/crates/swc_plugin_css_scope/napi.rs +144 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_all_transform_imports.js +5 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_all_transform_imports_without_jsx.js +4 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_modules_transform_imports.js +5 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_modules_transform_imports_without_jsx.js +4 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_none_transform_imports.js +5 -0
- package/transform/crates/swc_plugin_css_scope/tests/__swc_snapshots__/lib.rs/scoped_none_transform_imports_without_jsx.js +4 -0
- package/transform/crates/swc_plugin_define_dce/Cargo.toml +15 -0
- package/transform/crates/swc_plugin_define_dce/lib.rs +21 -0
- package/transform/crates/swc_plugin_define_dce/napi.rs +79 -0
- package/transform/crates/swc_plugin_directive_dce/Cargo.toml +18 -0
- package/transform/crates/swc_plugin_directive_dce/lib.rs +489 -0
- package/transform/crates/swc_plugin_directive_dce/napi.rs +65 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_do_nothing_in_mixed_target.js +6 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_do_nothing_when_arrow_function_return_directive.js +1 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_async_arrow_with_background_only_directive.js +1 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_background_only_generator_forms.js +7 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_fn_body_in_component_props.js +1 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_fn_decl.js +1 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_js_only_but_keep_constructor.js +6 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_js_only_class_method.js +4 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_js_only_class_property.js +4 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_js_only_embedded.js +5 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_native_modules_in_default_params.js +1 -0
- package/transform/crates/swc_plugin_directive_dce/tests/__swc_snapshots__/lib.rs/should_eliminate_transpiled_async_arrow_with_background_only_generator.js +1 -0
- package/transform/crates/swc_plugin_dynamic_import/Cargo.toml +18 -0
- package/transform/crates/swc_plugin_dynamic_import/lib.rs +408 -0
- package/transform/crates/swc_plugin_dynamic_import/napi.rs +89 -0
- package/transform/crates/swc_plugin_dynamic_import/tests/__swc_snapshots__/lib.rs/should_import_lazy_bundle.js +4 -0
- package/transform/crates/swc_plugin_dynamic_import/tests/__swc_snapshots__/lib.rs/should_import_lazy_import.js +9 -0
- package/transform/crates/swc_plugin_dynamic_import/tests/__swc_snapshots__/lib.rs/should_not_import_lazy.js +3 -0
- package/transform/crates/swc_plugin_dynamic_import/tests/__swc_snapshots__/lib.rs/should_transform_import_call.js +61 -0
- package/transform/crates/swc_plugin_element_template/Cargo.toml +29 -0
- package/transform/crates/swc_plugin_element_template/asset.rs +64 -0
- package/transform/crates/swc_plugin_element_template/attr_name.rs +77 -0
- package/transform/crates/swc_plugin_element_template/extractor.rs +484 -0
- package/transform/crates/swc_plugin_element_template/lib.rs +734 -0
- package/transform/crates/swc_plugin_element_template/lowering.rs +125 -0
- package/transform/crates/swc_plugin_element_template/napi.rs +168 -0
- package/transform/crates/swc_plugin_element_template/template_attribute.rs +31 -0
- package/transform/crates/swc_plugin_element_template/template_definition.rs +375 -0
- package/transform/crates/swc_plugin_element_template/template_identity.rs +160 -0
- package/transform/crates/swc_plugin_element_template/template_slot.rs +81 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_generate_attribute_slots_for_dynamic_attributes.snap +81 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_background_conditional_attributes.snap +44 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_boolean_and_number_attributes.snap +62 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_complex_text_structure.snap +120 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_dataset_attributes.snap +62 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_deeply_nested_user_components.snap +54 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_dynamic_class_attributes.snap +57 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_events_js.snap +57 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_events_lepus.snap +57 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_id_attributes.snap +57 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_inline_styles.snap +82 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_interpolated_text_with_siblings_js.snap +85 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_interpolated_text_with_siblings_lepus.snap +85 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_mixed_content.snap +82 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_nested_structure_and_dynamic_content.snap +143 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_refs_js.snap +52 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_refs_lepus.snap +52 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_sibling_user_components.snap +69 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_spread_attributes.snap +56 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_handle_user_component.snap +54 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_isolate_arrays_with_child_slot_placeholder.snap +56 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_keep_code_and_template_attribute_slots_in_sync_for_spread.snap +66 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_output_element_template_simple_lepus.snap +52 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_output_template_with_static_attributes.snap +62 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_verify_template_structure_complex.snap +69 -0
- package/transform/crates/swc_plugin_element_template/tests/__combined_snapshots__/should_verify_text_attribute_and_child_text_slots.snap +70 -0
- package/transform/crates/swc_plugin_element_template/tests/element_template.rs +1207 -0
- package/transform/crates/swc_plugin_element_template/tests/element_template_contract.rs +930 -0
- package/transform/crates/swc_plugin_inject/Cargo.toml +18 -0
- package/transform/crates/swc_plugin_inject/lib.rs +344 -0
- package/transform/crates/swc_plugin_inject/napi.rs +150 -0
- package/transform/crates/swc_plugin_inject/tests/__swc_snapshots__/lib.rs/should_inject.js +8 -0
- package/transform/crates/swc_plugin_inject/tests/__swc_snapshots__/lib.rs/should_inject_callee.js +1 -0
- package/transform/crates/swc_plugin_list/Cargo.toml +15 -0
- package/transform/crates/swc_plugin_list/legacy_slot.rs +410 -0
- package/transform/crates/swc_plugin_list/lib.rs +631 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/basic_list_legacy_slot.js +61 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/basic_list_toplevel_legacy_slot.js +40 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/basic_list_with_fragment_legacy_slot.js +65 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/should_transform_list_in_view_legacy_slot.js +6 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/should_transform_list_in_view_with_snapshot_legacy_slot.js +49 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/should_transform_list_item_deferred_in_list_legacy_slot.js +5 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/legacy_slot.rs/should_transform_list_item_deferred_with_children_with_snapshot_legacy_slot.js +95 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/basic_list.js +53 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/basic_list_toplevel.js +40 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/basic_list_with_fragment.js +57 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_not_transform_list_item_with_defer_false.js +1 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view.js +6 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view_with_snapshot.js +54 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view_with_static_sibling.js +7 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view_with_static_sibling_nested.js +16 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view_with_static_sibling_with_snapshot.js +65 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_in_view_with_static_sibling_with_snapshot_nested.js +138 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_deferred_basic.js +2 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_deferred_in_list.js +5 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_deferred_with_children.js +6 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_deferred_with_children_with_snapshot.js +95 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_not_deferred.js +1 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_when_defer_is_expr.js +4 -0
- package/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/should_transform_list_item_with_spread_deferred.js +2 -0
- package/transform/crates/swc_plugin_shake/Cargo.toml +20 -0
- package/transform/crates/swc_plugin_shake/is_component_class.rs +66 -0
- package/transform/crates/swc_plugin_shake/lib.rs +908 -0
- package/transform/crates/swc_plugin_shake/napi.rs +220 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/only_shake_class_like_react_component_class.js +10 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_access_inside_class_property_iife.js +11 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_constructor_and_used.js +12 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_indirect.js +12 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_render_and_used.js +11 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_state_and_remove_other.js +8 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_use_effect_call_from_custom_runtime.js +6 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_keep_with_nested_class.js +11 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_not_remove_call_in_scope_id.js +5 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_not_remove_in_scope_id.js +5 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_not_remove_test_with_other_runtime.js +3 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_aliased_use_effect_call.js +4 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_aliased_use_effect_call_by_local_name.js +4 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_aliased_use_effect_param.js +4 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_aliased_use_effect_param_by_local_name.js +4 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_default_and_namespace_runtime_import_calls.js +6 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_default_and_namespace_runtime_import_params.js +6 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_test.js +5 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_unused_indirect.js +5 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_use_effect_call.js +8 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_remove_use_effect_param.js +8 -0
- package/transform/crates/swc_plugin_shake/tests/__swc_snapshots__/lib.rs/should_replace_use_effect_call_with_undefined.js +2 -0
- package/transform/crates/swc_plugin_snapshot/Cargo.toml +25 -0
- package/transform/crates/swc_plugin_snapshot/attr_name.rs +84 -0
- package/transform/crates/swc_plugin_snapshot/legacy_slot.rs +2201 -0
- package/transform/crates/swc_plugin_snapshot/lib.rs +3495 -0
- package/transform/crates/swc_plugin_snapshot/napi.rs +184 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_component_legacy_slot.js +10 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_component_with_static_sibling_jsx_dev_legacy_slot.js +35 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_component_with_static_sibling_jsx_legacy_slot.js +27 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_component_with_static_sibling_legacy_slot.js +24 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_expr_container_legacy_slot.js +10 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_expr_container_with_static_sibling_legacy_slot.js +24 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/basic_spread_list_item_legacy_slot.js +42 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/full_static_children_map_jsx_legacy_slot.js +44 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/page_component_legacy_slot.js +15 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/page_element_dev_legacy_slot.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/page_element_legacy_slot.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_create_raw_text_node_for_text_node_legacy_slot.js +55 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_emit_list_item_platform_info_marker_for_spread_props_legacy_slot.js +32 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_inject_implicit_flatten_legacy_slot.js +67 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_not_wrap_dynamic_part.js +29 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_wrap_dynamic_key_legacy_slot.js +54 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/legacy_slot.rs/should_wrap_dynamic_part.js +34 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_component.js +10 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_component_with_static_sibling.js +24 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_component_with_static_sibling_jsx.js +27 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_component_with_static_sibling_jsx_dev.js +35 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_event.js +26 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_expr_container.js +10 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_expr_container_with_static_sibling.js +24 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_full_static.js +25 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_full_static_snapshot_extract.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_full_static_snapshot_extract_it.js +21 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_ref.js +45 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_spread.js +30 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_spread_list_item.js +30 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/basic_timing_flag.js +31 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/empty_module.js +1 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/external_bundle_uses_card_entry_name.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/full_static_children_comments.js +19 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/full_static_children_map_jsx.js +28 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/full_static_children_new_line.js +25 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/full_static_children_self_close.js +25 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/gesture.js +26 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/inline_style_literal.js +11 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/inline_style_literal_unknown_property.js +11 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/mode_development_spread.js +24 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/page_component.js +15 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/page_element.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/page_element_dev.js +16 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_create_raw_text_node_for_text_node.js +47 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_emit_list_item_platform_info_marker_for_non_zero_value_index.js +25 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_emit_list_item_platform_info_marker_for_spread_props.js +22 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_escape_newline_character.js +55 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_extract_css_id.js +71 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_extract_css_id_dynamic_component.js +71 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_extract_css_id_dynamic_component_without_css_id.js +69 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_extract_css_id_without_css_id.js +69 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_inject_implicit_flatten.js +59 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_set_attribute_for_text_node.js +44 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_static_extract_dynamic_inline_style.js +69 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_static_extract_inline_style.js +21 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_wrap_dynamic_key.js +46 -0
- package/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/worklet.js +35 -0
- package/transform/crates/swc_plugin_text/Cargo.toml +14 -0
- package/transform/crates/swc_plugin_text/lib.rs +93 -0
- package/transform/crates/swc_plugin_text/tests/__swc_snapshots__/lib.rs/should_keep_children_for_dynamic_or_multiple_text.js +9 -0
- package/transform/crates/swc_plugin_text/tests/__swc_snapshots__/lib.rs/should_transform_single_static_text_to_text_attr.js +8 -0
- package/transform/crates/swc_plugin_worklet/Cargo.toml +24 -0
- package/transform/crates/swc_plugin_worklet/decl_collect.rs +226 -0
- package/transform/crates/swc_plugin_worklet/extract_ident.rs +460 -0
- package/transform/crates/swc_plugin_worklet/gen_stmt.rs +326 -0
- package/transform/crates/swc_plugin_worklet/globals.rs +104 -0
- package/transform/crates/swc_plugin_worklet/hash.rs +29 -0
- package/transform/crates/swc_plugin_worklet/lib.rs +2869 -0
- package/transform/crates/swc_plugin_worklet/napi.rs +116 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/class_in_worklet_1.js +3 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_inner_ident.js +13 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_outer_ident.js +13 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js +35 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_js.js +6 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_lepus.js +15 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_idents_outside_of_ctx.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_js.js +29 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js +54 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_lepus.js +89 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_js.js +3 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_lepus.js +13 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_js.js +23 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js +46 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_handle_renamed_import_shadowing_js.js +16 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_globals.js +15 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_type_annotations.js +22 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_destructure_from_closure.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_catch_clause_params.js +17 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_ident_from_this.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_idents_inside_of_ctx.js +24 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_constructor.js +7 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_getter_and_setter.js +13 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_recursively.js +23 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_when_wrong_directives.js +14 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_default_import_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_lepus.js +23 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_namespace_import_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_string_key_js.js +12 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_arrow_function.js +15 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_js.js +6 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_lepus.js +16 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_function_expr.js +15 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_js.js +11 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_js_capture_values.js +11 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_lepus.js +17 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_js.js +14 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_js_capture_values.js +11 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_lepus.js +21 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_js.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_lepus.js +18 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_js.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_lepus.js +17 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js.js +15 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_js.js +10 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js +25 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_general.js +9 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js +34 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_alias.js +20 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general.js +20 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general_mixed.js +20 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets.js +29 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets_in_func.js +31 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_js.js +6 -0
- package/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_lepus.js +15 -0
- package/transform/crates/swc_plugin_worklet/worklet_type.rs +24 -0
- package/transform/crates/swc_plugins_shared/Cargo.toml +27 -0
- package/transform/crates/swc_plugins_shared/css.rs +64 -0
- package/transform/crates/swc_plugins_shared/defines.rs +51 -0
- package/transform/crates/swc_plugins_shared/engine_version.rs +50 -0
- package/transform/crates/swc_plugins_shared/jsx_helpers.rs +451 -0
- package/transform/crates/swc_plugins_shared/lib.rs +12 -0
- package/transform/crates/swc_plugins_shared/lynx_event.rs +159 -0
- package/transform/crates/swc_plugins_shared/target.rs +66 -0
- package/transform/crates/swc_plugins_shared/target_napi.rs +69 -0
- package/transform/crates/swc_plugins_shared/transform_mode.rs +61 -0
- package/transform/crates/swc_plugins_shared/transform_mode_napi.rs +72 -0
- package/transform/crates/swc_plugins_shared/utils.rs +149 -0
- package/transform/dist/wasm.cjs +1 -1
- package/transform/node_modules/.bin/esbuild +46 -0
- package/transform/node_modules/.bin/napi +55 -0
- package/transform/package.json +42 -0
- package/transform/rspack-napi/lib/index.d.ts +32 -0
- package/transform/rspack-napi/lib/index.js +96 -0
- package/transform/rspack-napi/lib/index.js.map +1 -0
- package/transform/rspack-napi/package.json +25 -0
- package/transform/rspack-napi/src/index.ts +161 -0
- package/transform/rspack-napi/tsconfig.json +17 -0
- package/transform/rspack-napi/tsconfig.tsbuildinfo +1 -0
- package/transform/scripts/build_wasm.js +55 -0
- package/transform/src/bundle.rs +249 -0
- package/transform/src/esbuild.rs +201 -0
- package/transform/src/lib.rs +1197 -0
- package/transform/src/swc_plugin_compat_post/mod.rs +143 -0
- package/transform/src/swc_plugin_extract_str/mod.rs +382 -0
- package/transform/src/swc_plugin_refresh/mod.rs +546 -0
- package/transform/src/swc_plugin_transform_builtin_attribute_names/mod.rs +286 -0
- package/transform/src/swc_plugin_worklet_post_process/mod.rs +100 -0
- package/transform/src/wasm.js +39 -0
- package/transform/swc-plugin-reactlynx/.cargo/config.toml +9 -0
- package/transform/swc-plugin-reactlynx/.gitignore +2 -0
- package/transform/swc-plugin-reactlynx/.turbo/turbo-build.log +346 -0
- package/transform/swc-plugin-reactlynx/Cargo.toml +30 -0
- package/transform/swc-plugin-reactlynx/build.js +27 -0
- package/transform/swc-plugin-reactlynx/index.d.ts +273 -0
- package/transform/swc-plugin-reactlynx/package.json +22 -0
- package/transform/swc-plugin-reactlynx/src/lib.rs +606 -0
- package/transform/swc-plugin-reactlynx/swc_plugin_reactlynx.wasm +0 -0
- package/transform/swc-plugin-reactlynx/turbo.json +18 -0
- package/transform/swc-plugin-reactlynx-compat/.cargo/config.toml +9 -0
- package/transform/swc-plugin-reactlynx-compat/.gitignore +2 -0
- package/transform/swc-plugin-reactlynx-compat/.turbo/turbo-build.log +256 -0
- package/transform/swc-plugin-reactlynx-compat/Cargo.toml +17 -0
- package/transform/swc-plugin-reactlynx-compat/build.js +27 -0
- package/transform/swc-plugin-reactlynx-compat/index.d.ts +326 -0
- package/transform/swc-plugin-reactlynx-compat/package.json +22 -0
- package/transform/swc-plugin-reactlynx-compat/src/lib.rs +15 -0
- package/transform/swc-plugin-reactlynx-compat/swc_plugin_reactlynx_compat.wasm +0 -0
- package/transform/swc-plugin-reactlynx-compat/turbo.json +18 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_compat_post/mod.rs/should_compat_dark_mode.js +3 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_compat_post/mod.rs/should_compat_dark_mode_custom_theme_expr.js +3 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_extract_str/mod.rs/should_extract_str.js +21 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_extract_str/mod.rs/should_extract_str_with_arr.js +20 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_extract_str/mod.rs/should_extract_tpl_str.js +9 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_basic.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_custom_library.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_function_parameter.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_import_computed.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_import_default.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_import_named_computed.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_import_namespace_computed.js +4 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_init_value.js +10 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_local_ident.js +8 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_refresh/mod.rs/should_handle_multiple_index.js +21 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_worklet_post_process/mod.rs/should_transform_worklet.js +12 -0
- package/transform/tests/__swc_snapshots__/src/swc_plugin_worklet_post_process/mod.rs/should_transform_worklet_2.js +14 -0
- package/transform/turbo.json +38 -0
- package/transform/vitest.config.ts +19 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright 2026 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
|
|
5
|
+
import { RUNTIME_BACKEND_ELEMENT_TEMPLATE, registerLazyRuntimeBackend, sExportsReact, target } from './target.js';
|
|
6
|
+
|
|
7
|
+
registerLazyRuntimeBackend(RUNTIME_BACKEND_ELEMENT_TEMPLATE);
|
|
8
|
+
|
|
9
|
+
export const {
|
|
10
|
+
Children,
|
|
11
|
+
Component,
|
|
12
|
+
Fragment,
|
|
13
|
+
InitDataConsumer,
|
|
14
|
+
InitDataProvider,
|
|
15
|
+
GlobalPropsConsumer,
|
|
16
|
+
GlobalPropsProvider,
|
|
17
|
+
MainThreadRef,
|
|
18
|
+
PureComponent,
|
|
19
|
+
Suspense,
|
|
20
|
+
cloneElement,
|
|
21
|
+
createContext,
|
|
22
|
+
createElement,
|
|
23
|
+
createRef,
|
|
24
|
+
forwardRef,
|
|
25
|
+
isValidElement,
|
|
26
|
+
lazy,
|
|
27
|
+
memo,
|
|
28
|
+
root,
|
|
29
|
+
runOnBackground,
|
|
30
|
+
runOnMainThread,
|
|
31
|
+
useCallback,
|
|
32
|
+
useContext,
|
|
33
|
+
useDebugValue,
|
|
34
|
+
useEffect,
|
|
35
|
+
useErrorBoundary,
|
|
36
|
+
useId,
|
|
37
|
+
useImperativeHandle,
|
|
38
|
+
useInitData,
|
|
39
|
+
useInitDataChanged,
|
|
40
|
+
useLynxGlobalEventListener,
|
|
41
|
+
useGlobalProps,
|
|
42
|
+
useGlobalPropsChanged,
|
|
43
|
+
useLayoutEffect,
|
|
44
|
+
useMainThreadRef,
|
|
45
|
+
useMemo,
|
|
46
|
+
useReducer,
|
|
47
|
+
useRef,
|
|
48
|
+
useState,
|
|
49
|
+
useSyncExternalStore,
|
|
50
|
+
withInitDataInState,
|
|
51
|
+
} = target[sExportsReact];
|
|
52
|
+
|
|
53
|
+
export default target[sExportsReact]['default'];
|
package/runtime/lazy/internal.js
CHANGED
package/runtime/lepus/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export function createElement(type, props, children) {
|
|
|
21
21
|
i;
|
|
22
22
|
for (i in props) {
|
|
23
23
|
if (i == 'key') key = props[i];
|
|
24
|
-
else if (i == 'ref') ref = props[i];
|
|
24
|
+
else if (i == 'ref' && typeof type != 'function') ref = props[i];
|
|
25
25
|
else normalizedProps[i] = props[i];
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -65,7 +65,7 @@ export function cloneElement(vnode, props, children) {
|
|
|
65
65
|
|
|
66
66
|
for (i in props) {
|
|
67
67
|
if (i == 'key') key = props[i];
|
|
68
|
-
else if (i == 'ref') ref = props[i];
|
|
68
|
+
else if (i == 'ref' && typeof vnode.type != 'function') ref = props[i];
|
|
69
69
|
else if (props[i] === undefined && defaultProps !== undefined) {
|
|
70
70
|
normalizedProps[i] = defaultProps[i];
|
|
71
71
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
import { CHILDREN, COMPONENT, DIFF,
|
|
4
|
+
import { CHILDREN, COMPONENT, DIFF, DOM, FLAGS, INDEX, PARENT, SnapshotInstance } from '@lynx-js/react/internal';
|
|
5
5
|
|
|
6
6
|
// Kept in sync with `REACT_ELEMENT_TYPE` in preact/compat, whose `isValidElement`
|
|
7
7
|
// compares against it. Inlined rather than imported so the main thread does not
|
|
@@ -29,7 +29,6 @@ function createVNode(type, props, _key) {
|
|
|
29
29
|
r[PARENT] = null;
|
|
30
30
|
r[DIFF] = 0;
|
|
31
31
|
r[DOM] = null;
|
|
32
|
-
r[DIRTY] = undefined;
|
|
33
32
|
r[COMPONENT] = null;
|
|
34
33
|
// r.__v = --vnodeId;
|
|
35
34
|
r[INDEX] = -1;
|
|
@@ -39,13 +38,10 @@ function createVNode(type, props, _key) {
|
|
|
39
38
|
} else if (typeof type === 'function') {
|
|
40
39
|
let normalizedProps = props;
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
if ('ref' in normalizedProps) {
|
|
41
|
+
if ('ref' in normalizedProps && 'prototype' in type && type.prototype.render) {
|
|
44
42
|
normalizedProps = {};
|
|
45
43
|
for (let i in props) {
|
|
46
|
-
if (i
|
|
47
|
-
// ref = props[i];
|
|
48
|
-
} else {
|
|
44
|
+
if (i != 'ref') {
|
|
49
45
|
normalizedProps[i] = props[i];
|
|
50
46
|
}
|
|
51
47
|
}
|
|
@@ -68,7 +64,6 @@ function createVNode(type, props, _key) {
|
|
|
68
64
|
[PARENT]: null,
|
|
69
65
|
[DIFF]: 0,
|
|
70
66
|
[DOM]: null,
|
|
71
|
-
[DIRTY]: void 0,
|
|
72
67
|
[COMPONENT]: null,
|
|
73
68
|
constructor: void 0,
|
|
74
69
|
// __v: --vnodeId,
|
|
@@ -13,13 +13,13 @@ function reportRefDeprecationError(fnName, newFnName) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
function getReactAppInstance() {
|
|
16
|
-
return
|
|
16
|
+
return lynx.getApp();
|
|
17
17
|
}
|
|
18
18
|
function getLegacyNativeApp() {
|
|
19
|
-
return
|
|
19
|
+
return lynx.getApp()._nativeApp;
|
|
20
20
|
}
|
|
21
21
|
function getLegacyReactComponent() {
|
|
22
|
-
return
|
|
22
|
+
return lynx.getApp()._reactLynx.ReactComponent.prototype;
|
|
23
23
|
}
|
|
24
24
|
function createLegacyComponentReceiver(reactAppInstance, nativeApp) {
|
|
25
25
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/core/component.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,oBAAoB;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAmB3D,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,SAAS,yBAAyB,CAAC,MAAc,EAAE,SAAiB;IAClE,IAAI,OAAO,IAAI,CAAC,sDAAsD,EAAE,CAAC;QACvE,IAAI,CAAC,WAAW,CACd,IAAI,KAAK,CACP,GAAG,MAAM,iFAAiF,SAAS,WAAW,CAC/G,CACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/core/component.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,oBAAoB;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,E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;IAE/E,WAAW,CAAC,SAAS,CAAC,mBAAmB,GAAG;QAC1C,yBAAyB,CAAC,2CAA2C,EAAE,0BAA0B,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACpC,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC;IACjG,WAAW,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,WAAW,CAAC;IACzD,WAAW,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAS,KAAU,EAAE,QAAa;QACjE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,aAAa;QACb,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,UAAU,EAAE,CAAC;YACf,mBAAmB,CAAC,YAAY,CAAC,kBAAkB,GAAG,UAAU,CAAC;YACjE,gBAAgB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;YACtD,IAAI,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;QACzC,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
import { options as preactOptions } from 'preact';
|
|
5
|
-
import { COMPONENT,
|
|
5
|
+
import { BITS, COMPONENT, COMPONENT_FORCE, DIFF2, ORIGINAL } from '../shared/render-constants.js';
|
|
6
6
|
export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
7
7
|
// Preact can skip root render if `_original` is unchanged; bumping it keeps
|
|
8
8
|
// backend force renders aligned with Preact's own rerender path.
|
|
@@ -14,6 +14,7 @@ export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
|
14
14
|
setRootVNode(newVNode);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
17
18
|
const oldDiff = preactOptions[DIFF2];
|
|
18
19
|
preactOptions[DIFF2] = (vnode, oldVNode) => {
|
|
19
20
|
/* v8 ignore start */
|
|
@@ -23,7 +24,7 @@ export function runWithForceRootRender({ getRootVNode, setRootVNode, render }) {
|
|
|
23
24
|
/* v8 ignore stop */
|
|
24
25
|
const c = oldVNode[COMPONENT];
|
|
25
26
|
if (c) {
|
|
26
|
-
c[
|
|
27
|
+
c[BITS] |= COMPONENT_FORCE;
|
|
27
28
|
}
|
|
28
29
|
else {
|
|
29
30
|
// mount phase of a new Component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forceRootRender.js","sourceRoot":"","sources":["../../src/core/forceRootRender.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"forceRootRender.js","sourceRoot":"","sources":["../../src/core/forceRootRender.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGlD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAQlG,MAAM,UAAU,sBAAsB,CACpC,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAA0B;IAE9D,4EAA4E;IAC5E,iEAAiE;IACjE,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAU,CAAC;QACvD,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/B,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,KAAY,EAAE,QAAe,EAAE,EAAE;QACvD,qBAAqB;QACrB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,CAAC;QACD,oBAAoB;QAEpB,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC;YACN,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,iCAAiC;YACjC,wCAAwC;QAC1C,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,EAAE,CAAC;IACX,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,KAAK,CAAC,GAAG,OAAkD,CAAC;IAC5E,CAAC;AACH,CAAC"}
|
|
@@ -18,7 +18,7 @@ export function updateGlobalProps(newData, { forceRerender } = {}) {
|
|
|
18
18
|
void Promise.resolve().then(forceRerender);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
lynx.getApp().GlobalEventEmitter.emit('onGlobalPropsChanged', [lynx.__globalProps]);
|
|
22
22
|
}
|
|
23
23
|
function warnGlobalPropsMode() {
|
|
24
24
|
if (typeof __LEPUS__ !== 'undefined' && !__LEPUS__ && typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalProps.js","sourceRoot":"","sources":["../../src/core/globalProps.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA+BxC,MAAM,UAAU,sBAAsB;IACpC,OAAO,OAAO,qBAAqB,KAAK,WAAW,IAAI,qBAAqB,KAAK,OAAO,CAAC;AAC3F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,IAA4B;IAE5B,OAAO,sBAAsB,EAAE;QAC7B,CAAC,CAAC,eAAe,CAAC,OAAO,CACvB,IAAI,EACJ,eAAe,EACf,sBAAsB,CACvB;QACD,CAAC,CAAC,eAAe,CAAC,yBAAyB,CAAO,IAAI,CAAC,0BAA0B,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,OAA4B,EAC5B,EAAE,aAAa,KAA+B,EAAE;IAEhD,IAAI,sBAAsB,EAAE,EAAE,CAAC;QAC7B,qEAAqE;QACrE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,aAAa,EAAE,CAAC;YAClB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"globalProps.js","sourceRoot":"","sources":["../../src/core/globalProps.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA+BxC,MAAM,UAAU,sBAAsB;IACpC,OAAO,OAAO,qBAAqB,KAAK,WAAW,IAAI,qBAAqB,KAAK,OAAO,CAAC;AAC3F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,IAA4B;IAE5B,OAAO,sBAAsB,EAAE;QAC7B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AAC;AAED,SAAS,sBAAsB;IAC7B,mBAAmB,EAAE,CAAC;IACtB,OAAO,IAAI,CAAC,aAAqB,CAAC;AACpC,CAAC;AAED,SAAS,yBAAyB,CAChC,WAA8C;IAE9C,MAAM,UAAU,GAAG,CAAC,QAA8B,EAAQ,EAAE;QAC1D,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC;YACnD,WAAW,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAgB;QAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAkC;QAClD,GAAG,EAAE,GAAG,EAAE,CAAC,sBAAoC;QAC/C,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -23,10 +23,12 @@ function installMainThreadHooks() {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
hooksInstalled = true;
|
|
26
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
26
27
|
oldBeforeDiff = options[DIFF];
|
|
27
28
|
oldBeforeRender = options[RENDER];
|
|
28
29
|
oldAfterDiff = options[DIFFED];
|
|
29
30
|
oldRoot = options[ROOT];
|
|
31
|
+
/* eslint-enable @typescript-eslint/unbound-method */
|
|
30
32
|
options[DIFF] = function (vnode) {
|
|
31
33
|
currentComponent = null;
|
|
32
34
|
if (oldBeforeDiff)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainThreadImpl.js","sourceRoot":"","sources":["../../../src/core/hooks/mainThreadImpl.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAUjC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,MAAM,EACN,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AK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACnD,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAW,CAAC;AAChC,CAAC;AAED,mBAAmB;AACnB,MAAM,SAAS,GAAG,IAA4B,CAAC;AAC/C,MAAM,eAAe,GAAG,IAAkC,CAAC;AAC3D,MAAM,mBAAmB,GAAG,IAAsC,CAAC;AAEnE,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,GACT,CAAC"}
|
|
@@ -32,7 +32,7 @@ import { useEffect, useMemo, useRef } from '@lynx-js/react/hooks';
|
|
|
32
32
|
*/
|
|
33
33
|
export function useLynxGlobalEventListener(eventName, listener) {
|
|
34
34
|
'background only';
|
|
35
|
-
const previousArgsRef = useRef();
|
|
35
|
+
const previousArgsRef = useRef(undefined);
|
|
36
36
|
useMemo(() => {
|
|
37
37
|
if (previousArgsRef.current) {
|
|
38
38
|
const [eventName, listener] = previousArgsRef.current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLynxGlobalEventListener.js","sourceRoot":"","sources":["../../../src/core/hooks/useLynxGlobalEventListener.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,QAAW;IAEX,iBAAiB,CAAC;IAElB,MAA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"}
|
|
@@ -130,7 +130,7 @@ export const loadLazyBundle = /*#__PURE__*/ (() => {
|
|
|
130
130
|
const { code, detail } = result;
|
|
131
131
|
if (code === 0) {
|
|
132
132
|
const { schema } = detail;
|
|
133
|
-
const exports =
|
|
133
|
+
const exports = lynx.getApp().getDynamicComponentExports(schema);
|
|
134
134
|
// `code === 0` means that the lazy bundle has been successfully parsed. However,
|
|
135
135
|
// its javascript files may still fail to run, which would prevent the retrieval of the exports object.
|
|
136
136
|
if (exports) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bundle.js","sourceRoot":"","sources":["../../../src/core/lynx/lazy-bundle.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,6EAA6E;AAC7E,oDAAoD;AACpD,6EAA6E;AAC7E,+CAA+C;AAC/C,4EAA4E;AAC5E,2DAA2D;AAC3D,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAC1C,MAAM,kBAAkB,GAAG,YAAY,CAAC;AACxC,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,8BAA8B,GAAG,CAAC,CAAC;AACzC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAE5D,yEAAyE;AACzE,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAY,MAAS;IAC/C,OAAO,UAEL,GAAmD,EACnD,IAAuD;QAEvD,IAAI,GAAG,EAAE,CAAC;YACR,IAAI,GAA2B,CAAC;YAChC,IAAI,CAAC;gBACH,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,aAAa;gBACb,oCAAoC;gBACpC,IAAI;gBACJ,OAAO,OAAO,CAAC,MAAM,CAAC,C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C,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxD,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,EAAE,CAAC;AAEL,SAAS,iBAAiB;IACxB,iBAAiB,CAAC;IAElB,MAAM,QAAQ,GAKV;QACF,OAAO,EAAE,CAAC,MAAS,EAAQ,EAAE;YAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,CAAC;QACD,MAAM,EAAE,CAAC,KAAY,EAAQ,EAAE;YAC7B,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -44,7 +44,7 @@ export class MainThreadRef {
|
|
|
44
44
|
addMainThreadRefInitValue(this._wvid, initValue);
|
|
45
45
|
const id = this._wvid;
|
|
46
46
|
this._lifecycleObserver = lynx.getNativeApp().createJSObjectDestructionObserver?.(() => {
|
|
47
|
-
lynx.getCoreContext
|
|
47
|
+
lynx.getCoreContext().dispatchEvent({
|
|
48
48
|
type: WorkletEvents.releaseWorkletRef,
|
|
49
49
|
data: {
|
|
50
50
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-thread-ref.js","sourceRoot":"","sources":["../../src/core/main-thread-ref.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAGtE,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AAE,CAAC;YACzB,sBAAsB;YACtB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;QAC/G,CAAC;QACD,OAAO,SAAc,CAAC;IACxB,CAAC;IAED,IAAI,OAAO,CAAC,CAAI;QACd,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;QAC1G,CAAC;QACD,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;QAC/G,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AA2HD,MAAM,UAAU,gBAAgB,CAAI,SAAa;IAC/C,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,OAAO,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { NodesRef } from '@lynx-js/types';
|
|
2
2
|
export type RefCleanup = (() => void) | void;
|
|
3
|
-
export type RefCallback<T> = (
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export type RefCallback<T> = (ref: T | null) => RefCleanup;
|
|
4
|
+
export interface OrdinaryRefBinding {
|
|
5
|
+
cleanup?: RefCleanup;
|
|
6
|
+
}
|
|
6
7
|
export interface RefObject<T> {
|
|
7
8
|
current: T | null;
|
|
8
9
|
}
|
|
@@ -16,11 +17,12 @@ export type RefProxyForwardedMethods<TProxy> = {
|
|
|
16
17
|
};
|
|
17
18
|
export declare function assertValidRef<T>(value: unknown): OrdinaryRef<T>;
|
|
18
19
|
export declare function normalizeRefValue<T>(value: unknown): OrdinaryRef<T> | null | undefined;
|
|
19
|
-
export declare function applyOrdinaryRef<T>(ref: OrdinaryRef<T>, value: T | null): void;
|
|
20
|
+
export declare function applyOrdinaryRef<T>(ref: OrdinaryRef<T>, value: T | null, binding: OrdinaryRefBinding): void;
|
|
20
21
|
export declare class OrdinaryRefEffectQueue<TProxy, TToken> {
|
|
22
|
+
private readonly bindings;
|
|
21
23
|
private readonly refsToClear;
|
|
22
24
|
private readonly refsToApply;
|
|
23
|
-
queue(oldRef: OrdinaryRef<TProxy> | null | undefined, newRef: OrdinaryRef<TProxy> | null | undefined, token: TToken): void;
|
|
25
|
+
queue(oldRef: OrdinaryRef<TProxy> | null | undefined, newRef: OrdinaryRef<TProxy> | null | undefined, owner: object, slot: number, token: TToken): void;
|
|
24
26
|
flush(createValue: (token: TToken) => TProxy): void;
|
|
25
27
|
clear(): void;
|
|
26
28
|
hasPending(): boolean;
|
package/runtime/lib/core/ref.js
CHANGED
|
@@ -15,19 +15,19 @@ export function normalizeRefValue(value) {
|
|
|
15
15
|
}
|
|
16
16
|
return assertValidRef(value);
|
|
17
17
|
}
|
|
18
|
-
export function applyOrdinaryRef(ref, value) {
|
|
18
|
+
export function applyOrdinaryRef(ref, value, binding) {
|
|
19
19
|
try {
|
|
20
20
|
if (typeof ref === 'function') {
|
|
21
|
-
const cleanup =
|
|
21
|
+
const cleanup = binding.cleanup;
|
|
22
22
|
const hasCleanup = typeof cleanup === 'function';
|
|
23
|
+
binding.cleanup = undefined;
|
|
23
24
|
if (hasCleanup) {
|
|
24
25
|
cleanup();
|
|
25
26
|
}
|
|
26
|
-
ref._unmount = undefined;
|
|
27
27
|
if (!hasCleanup || value !== null) {
|
|
28
28
|
const nextCleanup = ref(value);
|
|
29
29
|
if (typeof nextCleanup === 'function') {
|
|
30
|
-
|
|
30
|
+
binding.cleanup = nextCleanup;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -42,17 +42,28 @@ export function applyOrdinaryRef(ref, value) {
|
|
|
42
42
|
// Keeps the Snapshot/ET ordinary ref ordering shared without owning backend
|
|
43
43
|
// timing: each backend decides when to queue/flush and how to build the proxy.
|
|
44
44
|
export class OrdinaryRefEffectQueue {
|
|
45
|
+
// A host instance survives hydration's numeric ID remapping. Each ref slot
|
|
46
|
+
// owns its cleanup independently, even when callbacks are shared.
|
|
47
|
+
bindings = new WeakMap();
|
|
45
48
|
refsToClear = [];
|
|
46
49
|
refsToApply = [];
|
|
47
|
-
queue(oldRef, newRef, token) {
|
|
50
|
+
queue(oldRef, newRef, owner, slot, token) {
|
|
48
51
|
if (oldRef === newRef) {
|
|
49
52
|
return;
|
|
50
53
|
}
|
|
54
|
+
let slots = this.bindings.get(owner);
|
|
55
|
+
if (!slots) {
|
|
56
|
+
this.bindings.set(owner, slots = new Map());
|
|
57
|
+
}
|
|
58
|
+
let binding = slots.get(slot);
|
|
59
|
+
if (!binding) {
|
|
60
|
+
slots.set(slot, binding = {});
|
|
61
|
+
}
|
|
51
62
|
if (oldRef) {
|
|
52
|
-
this.refsToClear.push(oldRef);
|
|
63
|
+
this.refsToClear.push([oldRef, binding]);
|
|
53
64
|
}
|
|
54
65
|
if (newRef) {
|
|
55
|
-
this.refsToApply.push([newRef, token]);
|
|
66
|
+
this.refsToApply.push([newRef, token, binding]);
|
|
56
67
|
}
|
|
57
68
|
}
|
|
58
69
|
flush(createValue) {
|
|
@@ -60,11 +71,11 @@ export class OrdinaryRefEffectQueue {
|
|
|
60
71
|
// the queue before invoking user code so later effects stay in the next batch.
|
|
61
72
|
const refsToClearNow = this.refsToClear.splice(0);
|
|
62
73
|
const refsToApplyNow = this.refsToApply.splice(0);
|
|
63
|
-
for (const ref of refsToClearNow) {
|
|
64
|
-
applyOrdinaryRef(ref, null);
|
|
74
|
+
for (const [ref, binding] of refsToClearNow) {
|
|
75
|
+
applyOrdinaryRef(ref, null, binding);
|
|
65
76
|
}
|
|
66
|
-
for (const [ref, token] of refsToApplyNow) {
|
|
67
|
-
applyOrdinaryRef(ref, createValue(token));
|
|
77
|
+
for (const [ref, token, binding] of refsToApplyNow) {
|
|
78
|
+
applyOrdinaryRef(ref, createValue(token), binding);
|
|
68
79
|
}
|
|
69
80
|
}
|
|
70
81
|
clear() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/core/ref.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;
|
|
1
|
+
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/core/ref.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAyB1D,MAAM,UAAU,cAAc,CAAI,KAAc;IAC9C,IACE,OAAO,KAAK,KAAK,UAAU;WACxB,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,SAAS,IAAI,KAAK,CAAC,EACtE,CAAC;QACD,OAAO,KAAuB,CAAC;IACjC,CAAC;IACD,MAAM,IAAI,KAAK,CACb,sEAAsE;UAClE,4BAA4B,OAAO,KAAK,WAAW,CACxD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAI,KAAc;IACjD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,cAAc,CAAI,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,GAAmB,EACnB,KAAe,EACf,OAA2B;IAE3B,IAAI,CAAC;QACH,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,MAAM,UAAU,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC;YACjD,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;YAC5B,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,IAAI,CAAC,UAAU,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAClC,MAAM,WAA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3B,CAAC;oBACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC7C,CAAC;gBAED,OAAO,CAAsC,GAAG,IAA6B,EAAE,EAAE;oBAC/E,OAAO,MAAM,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,IAAiC,EAAE,IAAI,CAAC,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC;SACF,CAAsB,CAAC;IAC1B,CAAC;IAQO,OAAO,CACb,MAAS,EACT,IAA6B;QAE7B,IAAI,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,EAAE;YACvB,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAA0D,CAAC;YACjG,OAAO,cAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAC;QACF,OAAO,IAAyB,CAAC;IACnC,CAAC;IAED,IAAI;QACF,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,IAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACtE,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ElementTemplateUpdateOp } from '../protocol/opcodes.js';
|
|
1
2
|
import type { SerializableValue } from '../protocol/types.js';
|
|
2
3
|
import type { EtAttrPlan } from '../runtime/template/attr-slot-plan.js';
|
|
3
4
|
export interface PrepareAttributeSlotsOptions {
|
|
@@ -6,4 +7,7 @@ export interface PrepareAttributeSlotsOptions {
|
|
|
6
7
|
attributePlan?: EtAttrPlan | undefined;
|
|
7
8
|
}
|
|
8
9
|
export declare function prepareAttributeSlots(templateKey: string, handleId: number, rawSlots: readonly unknown[], options?: PrepareAttributeSlotsOptions): SerializableValue[];
|
|
9
|
-
export declare function queueRefAttributeSlotUpdates(templateKey: string,
|
|
10
|
+
export declare function queueRefAttributeSlotUpdates(templateKey: string, instance: {
|
|
11
|
+
readonly instanceId: number;
|
|
12
|
+
}, previousRawSlots?: readonly unknown[], nextRawSlots?: readonly unknown[], attributePlan?: EtAttrPlan): void;
|
|
13
|
+
export declare function getAttributeSlotUpdateOp(templateType: string, attrSlotIndex: number): ElementTemplateUpdateOp;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
import { getSpreadRefFromValue, queueRefAttrUpdate } from '../prop-adapters/ref.js';
|
|
5
|
-
import {
|
|
5
|
+
import { ElementTemplateUpdateOps } from '../protocol/opcodes.js';
|
|
6
|
+
import { __etAttrPlanMap, adaptRefAttrSlot, adaptSpreadAttrSlot, getMainThreadDynamicAttrSlotKinds, } from '../runtime/template/attr-slot-plan.js';
|
|
6
7
|
function normalizeAttributeSlots(rawSlots) {
|
|
7
8
|
let normalizedSlots;
|
|
8
9
|
for (let slotIndex = 0; slotIndex < rawSlots.length; slotIndex += 1) {
|
|
@@ -15,12 +16,12 @@ function normalizeAttributeSlots(rawSlots) {
|
|
|
15
16
|
}
|
|
16
17
|
return normalizedSlots ?? rawSlots;
|
|
17
18
|
}
|
|
18
|
-
function queuePlannedRefAttributeSlotUpdates(
|
|
19
|
+
function queuePlannedRefAttributeSlotUpdates(instance, attrPlan, previousRawSlots, nextRawSlots) {
|
|
19
20
|
for (let planIndex = 0; planIndex < attrPlan.length; planIndex += 2) {
|
|
20
21
|
const attrSlotIndex = attrPlan[planIndex];
|
|
21
22
|
const adapter = attrPlan[planIndex + 1];
|
|
22
23
|
if (adapter === adaptRefAttrSlot) {
|
|
23
|
-
queueRefAttrUpdate(previousRawSlots?.[attrSlotIndex], nextRawSlots?.[attrSlotIndex],
|
|
24
|
+
queueRefAttrUpdate(previousRawSlots?.[attrSlotIndex], nextRawSlots?.[attrSlotIndex], instance, attrSlotIndex);
|
|
24
25
|
continue;
|
|
25
26
|
}
|
|
26
27
|
if (adapter === adaptSpreadAttrSlot) {
|
|
@@ -29,7 +30,7 @@ function queuePlannedRefAttributeSlotUpdates(handleId, attrPlan, previousRawSlot
|
|
|
29
30
|
if (previousSpreadRef === undefined && nextSpreadRef === undefined) {
|
|
30
31
|
continue;
|
|
31
32
|
}
|
|
32
|
-
queueRefAttrUpdate(previousSpreadRef, nextSpreadRef ?? null,
|
|
33
|
+
queueRefAttrUpdate(previousSpreadRef, nextSpreadRef ?? null, instance, attrSlotIndex);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -58,11 +59,21 @@ export function prepareAttributeSlots(templateKey, handleId, rawSlots, options)
|
|
|
58
59
|
}
|
|
59
60
|
return preparedSlots;
|
|
60
61
|
}
|
|
61
|
-
export function queueRefAttributeSlotUpdates(templateKey,
|
|
62
|
+
export function queueRefAttributeSlotUpdates(templateKey, instance, previousRawSlots, nextRawSlots, attributePlan) {
|
|
62
63
|
const attrPlan = attributePlan ?? __etAttrPlanMap[templateKey];
|
|
63
64
|
if (!attrPlan || attrPlan.length === 0) {
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
|
-
queuePlannedRefAttributeSlotUpdates(
|
|
67
|
+
queuePlannedRefAttributeSlotUpdates(instance, attrPlan, previousRawSlots, nextRawSlots);
|
|
68
|
+
}
|
|
69
|
+
export function getAttributeSlotUpdateOp(templateType, attrSlotIndex) {
|
|
70
|
+
const kind = getMainThreadDynamicAttrSlotKinds(templateType)?.get(attrSlotIndex);
|
|
71
|
+
if (kind === 'mt-event') {
|
|
72
|
+
return ElementTemplateUpdateOps.setMainThreadEvent;
|
|
73
|
+
}
|
|
74
|
+
if (kind === 'mt-ref') {
|
|
75
|
+
return ElementTemplateUpdateOps.setMainThreadRef;
|
|
76
|
+
}
|
|
77
|
+
return ElementTemplateUpdateOps.setAttribute;
|
|
67
78
|
}
|
|
68
79
|
//# sourceMappingURL=attr-slots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attr-slots.js","sourceRoot":"","sources":["../../../src/element-template/background/attr-slots.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"attr-slots.js","sourceRoot":"","sources":["../../../src/element-template/background/attr-slots.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,iCAAiC,GAClC,MAAM,uCAAuC,CAAC;AAS/C,SAAS,uBAAuB,CAAC,QAA4B;IAC3D,IAAI,eAAgD,CAAC;IACrD,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,CAAC,EAAE,CAAC;QACpE,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,SAAS;QACX,CAAC;QACD,eAAe,KAAK,QAAQ,CAAC,KAAK,EAAyB,CAAC;QAC5D,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACpC,CAAC;IACD,OAAO,eAAe,IAAI,QAA+B,CAAC;AAC5D,CAAC;AAED,SAAS,mCAAmC,CAC1C,QAAyC,EACzC,QAA6C,EAC7C,gBAAqC,EACrC,YAAiC;IAEjC,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,CAAC,EAAE,CAAC;QACpE,MAAM,a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IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,OAAO,wBAAwB,CAAC,gBAAgB,CAAC;IACnD,CAAC;IACD,OAAO,wBAAwB,CAAC,YAAY,CAAC;AAC/C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BackgroundElementTemplateInstance } from './instance.js';
|
|
2
2
|
import type { ElementTemplateUpdateCommitContext } from '../protocol/types.js';
|
|
3
3
|
interface ElementTemplateCommitNonPayloadState {
|
|
4
|
-
removedSubtreesAwaitingTeardown: BackgroundElementTemplateInstance
|
|
4
|
+
removedSubtreesAwaitingTeardown: Set<BackgroundElementTemplateInstance>;
|
|
5
5
|
}
|
|
6
6
|
type ElementTemplateGlobalCommitContext = ElementTemplateUpdateCommitContext & {
|
|
7
7
|
nonPayload: ElementTemplateCommitNonPayloadState;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { globalCommitContext as coreGlobalCommitContext, resetGlobalCommitContext as resetCoreGlobalCommitContext, } from '../../core/commit-context.js';
|
|
2
2
|
const nonPayload = {
|
|
3
|
-
removedSubtreesAwaitingTeardown:
|
|
3
|
+
removedSubtreesAwaitingTeardown: new Set(),
|
|
4
4
|
};
|
|
5
5
|
export const globalCommitContext = coreGlobalCommitContext;
|
|
6
6
|
globalCommitContext.nonPayload = nonPayload;
|
|
7
7
|
export function resetGlobalCommitContext() {
|
|
8
8
|
resetCoreGlobalCommitContext();
|
|
9
|
-
nonPayload.removedSubtreesAwaitingTeardown
|
|
9
|
+
nonPayload.removedSubtreesAwaitingTeardown.clear();
|
|
10
10
|
}
|
|
11
11
|
export function markRemovedSubtreeForPostDispatchTeardown(root) {
|
|
12
|
-
|
|
13
|
-
if (!removedSubtreesAwaitingTeardown.includes(root)) {
|
|
14
|
-
removedSubtreesAwaitingTeardown.push(root);
|
|
15
|
-
}
|
|
12
|
+
globalCommitContext.nonPayload.removedSubtreesAwaitingTeardown.add(root);
|
|
16
13
|
}
|
|
17
14
|
export function takeRemovedSubtreesForPostDispatchTeardown() {
|
|
18
|
-
const removedSubtreesAwaitingTeardown = globalCommitContext.nonPayload
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const { removedSubtreesAwaitingTeardown } = globalCommitContext.nonPayload;
|
|
16
|
+
// Each delayed cleanup owns its batch after the current commit is reset.
|
|
17
|
+
const roots = [...removedSubtreesAwaitingTeardown];
|
|
18
|
+
removedSubtreesAwaitingTeardown.clear();
|
|
19
|
+
return roots;
|
|
21
20
|
}
|
|
22
21
|
//# sourceMappingURL=commit-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit-context.js","sourceRoot":"","sources":["../../../src/element-template/background/commit-context.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,IAAI,uBAAuB,EAC9C,wBAAwB,IAAI,4BAA4B,GACzD,MAAM,8BAA8B,CAAC;AActC,MAAM,UAAU,GAAyC;IACvD,+BAA+B,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"commit-context.js","sourceRoot":"","sources":["../../../src/element-template/background/commit-context.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,IAAI,uBAAuB,EAC9C,wBAAwB,IAAI,4BAA4B,GACzD,MAAM,8BAA8B,CAAC;AActC,MAAM,UAAU,GAAyC;IACvD,+BAA+B,EAAE,IAAI,GAAG,EAAE;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAwE,CAAC;AAE5G,mBAAmB,CAAC,UAAU,GAAG,UAAU,CAAC;AAE5C,MAAM,UAAU,wBAAwB;IACtC,4BAA4B,EAAE,CAAC;IAC/B,UAAU,CAAC,+BAA+B,CAAC,KAAK,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,IAAuC;IAEvC,mBAAmB,CAAC,UAAU,CAAC,+BAA+B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,0CAA0C;IACxD,MAAM,EAAE,+BAA+B,EAAE,GAAG,mBAAmB,CAAC,UAAU,CAAC;IAC3E,yEAAyE;IACzE,MAAM,KAAK,GAAG,CAAC,GAAG,+BAA+B,CAAC,CAAC;IACnD,+BAA+B,CAAC,KAAK,EAAE,CAAC;IACxC,OAAO,KAAK,CAAC;AACf,CAAC"}
|