@lynx-js/web-worker-runtime-canary 0.19.6 → 0.19.7-canary-20260127-43fc7e7f
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 +34 -25
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/web-worker-runtime
|
|
2
2
|
|
|
3
|
+
## 0.19.7-canary-20260127120110-43fc7e7f550a761ab94bdcd01a3eda9b93273279
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @lynx-js/web-constants@0.19.7-canary-20260127120110-43fc7e7f550a761ab94bdcd01a3eda9b93273279
|
|
9
|
+
- @lynx-js/web-mainthread-apis@0.19.7-canary-20260127120110-43fc7e7f550a761ab94bdcd01a3eda9b93273279
|
|
10
|
+
- @lynx-js/web-worker-rpc@0.19.7-canary-20260127120110-43fc7e7f550a761ab94bdcd01a3eda9b93273279
|
|
11
|
+
|
|
3
12
|
## 0.19.6
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -291,14 +300,14 @@
|
|
|
291
300
|
Usage:
|
|
292
301
|
|
|
293
302
|
```ts
|
|
294
|
-
import { pluginWebPlatform } from
|
|
295
|
-
import { defineConfig } from
|
|
303
|
+
import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
|
|
304
|
+
import { defineConfig } from "@rsbuild/core";
|
|
296
305
|
|
|
297
306
|
export default defineConfig({
|
|
298
307
|
plugins: [
|
|
299
308
|
pluginWebPlatform({
|
|
300
309
|
// replace with your actual napi-modules file path
|
|
301
|
-
napiModulesPath: path.resolve(__dirname,
|
|
310
|
+
napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
|
|
302
311
|
}),
|
|
303
312
|
],
|
|
304
313
|
});
|
|
@@ -309,10 +318,10 @@
|
|
|
309
318
|
```ts
|
|
310
319
|
// index.napi-modules.ts
|
|
311
320
|
export default {
|
|
312
|
-
custom_module: function(NapiModules, NapiModulesCall) {
|
|
321
|
+
custom_module: function (NapiModules, NapiModulesCall) {
|
|
313
322
|
return {
|
|
314
323
|
async test(name) {
|
|
315
|
-
console.log(
|
|
324
|
+
console.log("CustomModule", NapiModules, NapiModulesCall);
|
|
316
325
|
},
|
|
317
326
|
};
|
|
318
327
|
},
|
|
@@ -364,25 +373,25 @@
|
|
|
364
373
|
lynxView.initI18nResources = [
|
|
365
374
|
{
|
|
366
375
|
options: {
|
|
367
|
-
locale:
|
|
368
|
-
channel:
|
|
369
|
-
fallback_url:
|
|
376
|
+
locale: "en",
|
|
377
|
+
channel: "1",
|
|
378
|
+
fallback_url: "",
|
|
370
379
|
},
|
|
371
380
|
resource: {
|
|
372
|
-
hello:
|
|
373
|
-
lynx:
|
|
381
|
+
hello: "hello",
|
|
382
|
+
lynx: "lynx web platform1",
|
|
374
383
|
},
|
|
375
384
|
},
|
|
376
385
|
];
|
|
377
|
-
lynxView.addEventListener(
|
|
386
|
+
lynxView.addEventListener("i18nResourceMissed", (e) => {
|
|
378
387
|
console.log(e);
|
|
379
388
|
});
|
|
380
389
|
|
|
381
390
|
// mts
|
|
382
391
|
_I18nResourceTranslation({
|
|
383
|
-
locale:
|
|
384
|
-
channel:
|
|
385
|
-
fallback_url:
|
|
392
|
+
locale: "en",
|
|
393
|
+
channel: "1",
|
|
394
|
+
fallback_url: "",
|
|
386
395
|
});
|
|
387
396
|
```
|
|
388
397
|
|
|
@@ -632,8 +641,8 @@
|
|
|
632
641
|
}
|
|
633
642
|
};`,
|
|
634
643
|
],
|
|
635
|
-
{ type:
|
|
636
|
-
)
|
|
644
|
+
{ type: "text/javascript" }
|
|
645
|
+
)
|
|
637
646
|
),
|
|
638
647
|
};
|
|
639
648
|
lynxView.nativeModulesMap = nativeModulesMap;
|
|
@@ -723,8 +732,8 @@
|
|
|
723
732
|
};
|
|
724
733
|
};`,
|
|
725
734
|
],
|
|
726
|
-
{ type:
|
|
727
|
-
)
|
|
735
|
+
{ type: "text/javascript" }
|
|
736
|
+
)
|
|
728
737
|
);
|
|
729
738
|
|
|
730
739
|
const color_methods = URL.createObjectURL(
|
|
@@ -739,8 +748,8 @@
|
|
|
739
748
|
};
|
|
740
749
|
};`,
|
|
741
750
|
],
|
|
742
|
-
{ type:
|
|
743
|
-
)
|
|
751
|
+
{ type: "text/javascript" }
|
|
752
|
+
)
|
|
744
753
|
);
|
|
745
754
|
|
|
746
755
|
lynxView.napiModuleMap = {
|
|
@@ -757,7 +766,7 @@
|
|
|
757
766
|
|
|
758
767
|
```js
|
|
759
768
|
lynxView.onNapiModulesCall = (name, data, moduleName) => {
|
|
760
|
-
if (name ===
|
|
769
|
+
if (name === "getColor" && moduleName === "color_methods") {
|
|
761
770
|
return data.color;
|
|
762
771
|
}
|
|
763
772
|
};
|
|
@@ -812,8 +821,8 @@
|
|
|
812
821
|
}
|
|
813
822
|
};`,
|
|
814
823
|
],
|
|
815
|
-
{ type:
|
|
816
|
-
)
|
|
824
|
+
{ type: "text/javascript" }
|
|
825
|
+
)
|
|
817
826
|
);
|
|
818
827
|
```
|
|
819
828
|
|
|
@@ -825,7 +834,7 @@
|
|
|
825
834
|
|
|
826
835
|
```js
|
|
827
836
|
lynxView.onNativeModulesCall = (name, data, callback) => {
|
|
828
|
-
if (name ===
|
|
837
|
+
if (name === "getColor") {
|
|
829
838
|
callback(data.color);
|
|
830
839
|
}
|
|
831
840
|
};
|
|
@@ -835,7 +844,7 @@
|
|
|
835
844
|
|
|
836
845
|
```js
|
|
837
846
|
lynxView.onNativeModulesCall = (name, data, moduleName) => {
|
|
838
|
-
if (name ===
|
|
847
|
+
if (name === "getColor" && moduleName === "bridge") {
|
|
839
848
|
return data.color;
|
|
840
849
|
}
|
|
841
850
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-worker-runtime-canary",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.7-canary-20260127-43fc7e7f",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
|
|
26
|
-
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.
|
|
27
|
-
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.
|
|
28
|
-
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.
|
|
26
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.7-canary-20260127-43fc7e7f",
|
|
27
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.7-canary-20260127-43fc7e7f",
|
|
28
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.7-canary-20260127-43fc7e7f"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@lynx-js/lynx-core": "0.1.3"
|