@lynx-js/web-worker-runtime-canary 0.18.3 → 0.18.4-canary-20251111-eee83b60

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.18.4-canary-20251111085403-eee83b601f4626c0576e376047356906886e5b59
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-constants@0.18.4-canary-20251111085403-eee83b601f4626c0576e376047356906886e5b59
9
+ - @lynx-js/web-mainthread-apis@0.18.4-canary-20251111085403-eee83b601f4626c0576e376047356906886e5b59
10
+ - @lynx-js/web-worker-rpc@0.18.4-canary-20251111085403-eee83b601f4626c0576e376047356906886e5b59
11
+
3
12
  ## 0.18.3
4
13
 
5
14
  ### Patch Changes
@@ -217,14 +226,14 @@
217
226
  Usage:
218
227
 
219
228
  ```ts
220
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
221
- import { defineConfig } from '@rsbuild/core';
229
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
230
+ import { defineConfig } from "@rsbuild/core";
222
231
 
223
232
  export default defineConfig({
224
233
  plugins: [
225
234
  pluginWebPlatform({
226
235
  // replace with your actual napi-modules file path
227
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
236
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
228
237
  }),
229
238
  ],
230
239
  });
@@ -235,10 +244,10 @@
235
244
  ```ts
236
245
  // index.napi-modules.ts
237
246
  export default {
238
- custom_module: function(NapiModules, NapiModulesCall) {
247
+ custom_module: function (NapiModules, NapiModulesCall) {
239
248
  return {
240
249
  async test(name) {
241
- console.log('CustomModule', NapiModules, NapiModulesCall);
250
+ console.log("CustomModule", NapiModules, NapiModulesCall);
242
251
  },
243
252
  };
244
253
  },
@@ -290,25 +299,25 @@
290
299
  lynxView.initI18nResources = [
291
300
  {
292
301
  options: {
293
- locale: 'en',
294
- channel: '1',
295
- fallback_url: '',
302
+ locale: "en",
303
+ channel: "1",
304
+ fallback_url: "",
296
305
  },
297
306
  resource: {
298
- hello: 'hello',
299
- lynx: 'lynx web platform1',
307
+ hello: "hello",
308
+ lynx: "lynx web platform1",
300
309
  },
301
310
  },
302
311
  ];
303
- lynxView.addEventListener('i18nResourceMissed', (e) => {
312
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
304
313
  console.log(e);
305
314
  });
306
315
 
307
316
  // mts
308
317
  _I18nResourceTranslation({
309
- locale: 'en',
310
- channel: '1',
311
- fallback_url: '',
318
+ locale: "en",
319
+ channel: "1",
320
+ fallback_url: "",
312
321
  });
313
322
  ```
314
323
 
@@ -558,8 +567,8 @@
558
567
  }
559
568
  };`,
560
569
  ],
561
- { type: 'text/javascript' },
562
- ),
570
+ { type: "text/javascript" }
571
+ )
563
572
  ),
564
573
  };
565
574
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -649,8 +658,8 @@
649
658
  };
650
659
  };`,
651
660
  ],
652
- { type: 'text/javascript' },
653
- ),
661
+ { type: "text/javascript" }
662
+ )
654
663
  );
655
664
 
656
665
  const color_methods = URL.createObjectURL(
@@ -665,8 +674,8 @@
665
674
  };
666
675
  };`,
667
676
  ],
668
- { type: 'text/javascript' },
669
- ),
677
+ { type: "text/javascript" }
678
+ )
670
679
  );
671
680
 
672
681
  lynxView.napiModuleMap = {
@@ -683,7 +692,7 @@
683
692
 
684
693
  ```js
685
694
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
686
- if (name === 'getColor' && moduleName === 'color_methods') {
695
+ if (name === "getColor" && moduleName === "color_methods") {
687
696
  return data.color;
688
697
  }
689
698
  };
@@ -738,8 +747,8 @@
738
747
  }
739
748
  };`,
740
749
  ],
741
- { type: 'text/javascript' },
742
- ),
750
+ { type: "text/javascript" }
751
+ )
743
752
  );
744
753
  ```
745
754
 
@@ -751,7 +760,7 @@
751
760
 
752
761
  ```js
753
762
  lynxView.onNativeModulesCall = (name, data, callback) => {
754
- if (name === 'getColor') {
763
+ if (name === "getColor") {
755
764
  callback(data.color);
756
765
  }
757
766
  };
@@ -761,7 +770,7 @@
761
770
 
762
771
  ```js
763
772
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
764
- if (name === 'getColor' && moduleName === 'bridge') {
773
+ if (name === "getColor" && moduleName === "bridge") {
765
774
  return data.color;
766
775
  }
767
776
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.18.3",
3
+ "version": "0.18.4-canary-20251111-eee83b60",
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.18.3",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.3",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.3"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.4-canary-20251111-eee83b60",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.4-canary-20251111-eee83b60",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.4-canary-20251111-eee83b60"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"