@sigx/lynx-plugin 0.4.2 → 0.4.4
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/README.md +5 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -11,10 +11,10 @@ npm install -D @sigx/lynx-plugin
|
|
|
11
11
|
```ts
|
|
12
12
|
// rspeedy.config.ts (or rspack.config.ts)
|
|
13
13
|
import { defineConfig } from '@lynx-js/rspeedy';
|
|
14
|
-
import {
|
|
14
|
+
import { pluginSigxLynx } from '@sigx/lynx-plugin';
|
|
15
15
|
|
|
16
16
|
export default defineConfig({
|
|
17
|
-
plugins: [
|
|
17
|
+
plugins: [pluginSigxLynx()],
|
|
18
18
|
});
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -37,7 +37,7 @@ export default defineConfig({
|
|
|
37
37
|
|
|
38
38
|
Listing them as separate entries in webpack isn't sufficient because the chunk graph can evaluate user code before the bootstrap chain. Prepending side-effect imports per-file forces the dep-graph order.
|
|
39
39
|
|
|
40
|
-
4. **Cross-package worklet pickup.** The worklet rules run on every JS/TS file in the BG / MT layers, including `node_modules` and pre-built `dist/`.
|
|
40
|
+
4. **Cross-package worklet pickup.** The worklet rules run on every JS/TS file in the BG / MT layers, including `node_modules` and pre-built `dist/`. Any package shipping `'main thread'` directives in its dist (`@sigx/lynx-motion`, `@sigx/lynx-navigation`, `@sigx/lynx-gestures`, future additions) is picked up automatically — no allowlist or opt-in flag. See [CONTRIBUTING.md](https://github.com/signalxjs/lynx/blob/main/CONTRIBUTING.md#lynx-plugin-internals-cross-package-worklet-pickup) for the loader-branching details.
|
|
41
41
|
|
|
42
42
|
## Worklet author quick reference
|
|
43
43
|
|
|
@@ -54,12 +54,12 @@ Mark an event handler as MT-thread by adding the directive as the first statemen
|
|
|
54
54
|
|
|
55
55
|
The plugin handles the rest — the handler body lives in the MT bundle, the BG bundle keeps a `{_wkltId, _c}` placeholder, and Lynx native dispatches the touch event directly to the MT thread.
|
|
56
56
|
|
|
57
|
-
For higher-level abstractions (drag, tap, swipe, animations), see [`@sigx/gestures`](
|
|
57
|
+
For higher-level abstractions (drag, tap, swipe, animations), see [`@sigx/lynx-gestures`](https://github.com/signalxjs/lynx/tree/main/packages/lynx-gestures).
|
|
58
58
|
|
|
59
59
|
## Limitations
|
|
60
60
|
|
|
61
61
|
- **Custom worklet bodies require `'main thread'` directives.** Worklets aren't auto-detected from JSX shape; the directive is the marker.
|
|
62
|
-
- **Variables declared inside a worklet body are MT-locals.** They can't cross the bridge via `runOnBackground` closure capture — pass them as arguments instead. See `@sigx/gestures` README, "Performance notes."
|
|
62
|
+
- **Variables declared inside a worklet body are MT-locals.** They can't cross the bridge via `runOnBackground` closure capture — pass them as arguments instead. See `@sigx/lynx-gestures` README, "Performance notes."
|
|
63
63
|
- **Mappers for `useAnimatedStyle` ship as MT-side code.** Custom mappers must be registered from a MT-side module via `registerMapper(name, fn)` — BG-side `useAnimatedStyle` only carries the *name* across the build pipeline.
|
|
64
64
|
|
|
65
65
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx-plugin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Rspack/Rspeedy plugin for SignalX Lynx dual-thread rendering",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@lynx-js/react": "^0.121.0",
|
|
37
37
|
"ws": "^8.20.1",
|
|
38
|
-
"@sigx/lynx-runtime-internal": "0.4.
|
|
38
|
+
"@sigx/lynx-runtime-internal": "0.4.4"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@rspack/core": ">=1.0.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@lynx-js/template-webpack-plugin": ">=0.1.0",
|
|
45
45
|
"@lynx-js/runtime-wrapper-webpack-plugin": ">=0.1.0",
|
|
46
46
|
"@lynx-js/webpack-dev-transport": ">=0.1.0",
|
|
47
|
-
"@sigx/lynx-cli": "^0.4.
|
|
48
|
-
"@sigx/lynx-icons": "^0.4.
|
|
47
|
+
"@sigx/lynx-cli": "^0.4.4",
|
|
48
|
+
"@sigx/lynx-icons": "^0.4.4"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@rspack/core": {
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@types/ws": "^8.5.13",
|
|
77
77
|
"@typescript/native-preview": "7.0.0-dev.20260521.1",
|
|
78
78
|
"typescript": "^6.0.3",
|
|
79
|
-
"@sigx/lynx-cli": "0.4.
|
|
80
|
-
"@sigx/lynx-icons": "0.4.
|
|
79
|
+
"@sigx/lynx-cli": "0.4.4",
|
|
80
|
+
"@sigx/lynx-icons": "0.4.4"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|