@lynx-js/web-worker-runtime-canary 0.15.3 → 0.15.4-canary-20250729-a2c8e119

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +34 -25
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
+ ## 0.15.4-canary-20250729033839-a2c8e1195f3b30a88af5a69d441bab1161218ac4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-constants@0.15.4-canary-20250729033839-a2c8e1195f3b30a88af5a69d441bab1161218ac4
9
+ - @lynx-js/web-mainthread-apis@0.15.4-canary-20250729033839-a2c8e1195f3b30a88af5a69d441bab1161218ac4
10
+ - @lynx-js/web-worker-rpc@0.15.4-canary-20250729033839-a2c8e1195f3b30a88af5a69d441bab1161218ac4
11
+
3
12
  ## 0.15.3
4
13
 
5
14
  ### Patch Changes
@@ -52,14 +61,14 @@
52
61
  Usage:
53
62
 
54
63
  ```ts
55
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
56
- import { defineConfig } from '@rsbuild/core';
64
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
65
+ import { defineConfig } from "@rsbuild/core";
57
66
 
58
67
  export default defineConfig({
59
68
  plugins: [
60
69
  pluginWebPlatform({
61
70
  // replace with your actual napi-modules file path
62
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
71
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
63
72
  }),
64
73
  ],
65
74
  });
@@ -70,10 +79,10 @@
70
79
  ```ts
71
80
  // index.napi-modules.ts
72
81
  export default {
73
- custom_module: function(NapiModules, NapiModulesCall) {
82
+ custom_module: function (NapiModules, NapiModulesCall) {
74
83
  return {
75
84
  async test(name) {
76
- console.log('CustomModule', NapiModules, NapiModulesCall);
85
+ console.log("CustomModule", NapiModules, NapiModulesCall);
77
86
  },
78
87
  };
79
88
  },
@@ -125,25 +134,25 @@
125
134
  lynxView.initI18nResources = [
126
135
  {
127
136
  options: {
128
- locale: 'en',
129
- channel: '1',
130
- fallback_url: '',
137
+ locale: "en",
138
+ channel: "1",
139
+ fallback_url: "",
131
140
  },
132
141
  resource: {
133
- hello: 'hello',
134
- lynx: 'lynx web platform1',
142
+ hello: "hello",
143
+ lynx: "lynx web platform1",
135
144
  },
136
145
  },
137
146
  ];
138
- lynxView.addEventListener('i18nResourceMissed', (e) => {
147
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
139
148
  console.log(e);
140
149
  });
141
150
 
142
151
  // mts
143
152
  _I18nResourceTranslation({
144
- locale: 'en',
145
- channel: '1',
146
- fallback_url: '',
153
+ locale: "en",
154
+ channel: "1",
155
+ fallback_url: "",
147
156
  });
148
157
  ```
149
158
 
@@ -393,8 +402,8 @@
393
402
  }
394
403
  };`,
395
404
  ],
396
- { type: 'text/javascript' },
397
- ),
405
+ { type: "text/javascript" }
406
+ )
398
407
  ),
399
408
  };
400
409
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -484,8 +493,8 @@
484
493
  };
485
494
  };`,
486
495
  ],
487
- { type: 'text/javascript' },
488
- ),
496
+ { type: "text/javascript" }
497
+ )
489
498
  );
490
499
 
491
500
  const color_methods = URL.createObjectURL(
@@ -500,8 +509,8 @@
500
509
  };
501
510
  };`,
502
511
  ],
503
- { type: 'text/javascript' },
504
- ),
512
+ { type: "text/javascript" }
513
+ )
505
514
  );
506
515
 
507
516
  lynxView.napiModuleMap = {
@@ -518,7 +527,7 @@
518
527
 
519
528
  ```js
520
529
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
521
- if (name === 'getColor' && moduleName === 'color_methods') {
530
+ if (name === "getColor" && moduleName === "color_methods") {
522
531
  return data.color;
523
532
  }
524
533
  };
@@ -573,8 +582,8 @@
573
582
  }
574
583
  };`,
575
584
  ],
576
- { type: 'text/javascript' },
577
- ),
585
+ { type: "text/javascript" }
586
+ )
578
587
  );
579
588
  ```
580
589
 
@@ -586,7 +595,7 @@
586
595
 
587
596
  ```js
588
597
  lynxView.onNativeModulesCall = (name, data, callback) => {
589
- if (name === 'getColor') {
598
+ if (name === "getColor") {
590
599
  callback(data.color);
591
600
  }
592
601
  };
@@ -596,7 +605,7 @@
596
605
 
597
606
  ```js
598
607
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
599
- if (name === 'getColor' && moduleName === 'bridge') {
608
+ if (name === "getColor" && moduleName === "bridge") {
600
609
  return data.color;
601
610
  }
602
611
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.15.3",
3
+ "version": "0.15.4-canary-20250729-a2c8e119",
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.3",
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.3",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.3",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.3"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.4-canary-20250729-a2c8e119",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.4-canary-20250729-a2c8e119",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.4-canary-20250729-a2c8e119"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.2"