@lynx-js/react-canary 0.115.1-canary-20251210-37d32392 → 0.115.1-canary-20251212-9c715ffe

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 CHANGED
@@ -1,11 +1,28 @@
1
1
  # @lynx-js/react
2
2
 
3
- ## 0.115.1-canary-20251210102141-37d32392fef3644ef156866321a2879710671ef2
3
+ ## 0.115.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Auto define lynx.loadLazyBundle when using `import(/* relative path */)`. ([#1956](https://github.com/lynx-family/lynx-stack/pull/1956))
8
8
 
9
+ - feat: support declaring cross-thread shared modules via Import Attributes, enabling Main Thread Functions to call standard JS functions directly. ([#1968](https://github.com/lynx-family/lynx-stack/pull/1968))
10
+
11
+ - Usage: Add `with { runtime: "shared" }` to the `import` statement. For example:
12
+
13
+ ```ts
14
+ import { func } from './utils.js' with { runtime: 'shared' };
15
+
16
+ function worklet() {
17
+ 'main thread';
18
+ func(); // callable inside a main thread function
19
+ }
20
+ ```
21
+
22
+ - Limitations:
23
+ - Only directly imported identifiers are treated as shared; assigning the import to a new variable will result in the loss of this shared capability.
24
+ - Functions defined within shared modules do not automatically become Main Thread Functions. Accessing main-thread-only APIs (e.g., `MainThreadRef`) will cause errors.
25
+
9
26
  ## 0.115.0
10
27
 
11
28
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-canary",
3
- "version": "0.115.1-canary-20251210-37d32392",
3
+ "version": "0.115.1-canary-20251212-9c715ffe",
4
4
  "description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,7 +5,7 @@
5
5
  Rslib v0.15.0
6
6
 
7
7
  info build started...
8
- ready built in 0.26 s
8
+ ready built in 0.17 s
9
9
 
10
10
  File (esm) Size 
11
11
  dist/index.js 10.1 kB