@lynx-js/web-worker-runtime-canary 0.19.5 → 0.19.6-canary-20260112-9e774c8d

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.19.6-canary-20260112113628-9e774c8db22e4b3e5d677cf8347f3f29869bc65f
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`6c2b51a`](https://github.com/lynx-family/lynx-stack/commit/6c2b51a661ae244eb40671f63f29ee971e084ed4)]:
8
+ - @lynx-js/web-mainthread-apis@0.19.6-canary-20260112113628-9e774c8db22e4b3e5d677cf8347f3f29869bc65f
9
+ - @lynx-js/web-constants@0.19.6-canary-20260112113628-9e774c8db22e4b3e5d677cf8347f3f29869bc65f
10
+ - @lynx-js/web-worker-rpc@0.19.6-canary-20260112113628-9e774c8db22e4b3e5d677cf8347f3f29869bc65f
11
+
3
12
  ## 0.19.5
4
13
 
5
14
  ### Patch Changes
@@ -280,14 +289,14 @@
280
289
  Usage:
281
290
 
282
291
  ```ts
283
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
284
- import { defineConfig } from '@rsbuild/core';
292
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
293
+ import { defineConfig } from "@rsbuild/core";
285
294
 
286
295
  export default defineConfig({
287
296
  plugins: [
288
297
  pluginWebPlatform({
289
298
  // replace with your actual napi-modules file path
290
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
299
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
291
300
  }),
292
301
  ],
293
302
  });
@@ -298,10 +307,10 @@
298
307
  ```ts
299
308
  // index.napi-modules.ts
300
309
  export default {
301
- custom_module: function(NapiModules, NapiModulesCall) {
310
+ custom_module: function (NapiModules, NapiModulesCall) {
302
311
  return {
303
312
  async test(name) {
304
- console.log('CustomModule', NapiModules, NapiModulesCall);
313
+ console.log("CustomModule", NapiModules, NapiModulesCall);
305
314
  },
306
315
  };
307
316
  },
@@ -353,25 +362,25 @@
353
362
  lynxView.initI18nResources = [
354
363
  {
355
364
  options: {
356
- locale: 'en',
357
- channel: '1',
358
- fallback_url: '',
365
+ locale: "en",
366
+ channel: "1",
367
+ fallback_url: "",
359
368
  },
360
369
  resource: {
361
- hello: 'hello',
362
- lynx: 'lynx web platform1',
370
+ hello: "hello",
371
+ lynx: "lynx web platform1",
363
372
  },
364
373
  },
365
374
  ];
366
- lynxView.addEventListener('i18nResourceMissed', (e) => {
375
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
367
376
  console.log(e);
368
377
  });
369
378
 
370
379
  // mts
371
380
  _I18nResourceTranslation({
372
- locale: 'en',
373
- channel: '1',
374
- fallback_url: '',
381
+ locale: "en",
382
+ channel: "1",
383
+ fallback_url: "",
375
384
  });
376
385
  ```
377
386
 
@@ -621,8 +630,8 @@
621
630
  }
622
631
  };`,
623
632
  ],
624
- { type: 'text/javascript' },
625
- ),
633
+ { type: "text/javascript" }
634
+ )
626
635
  ),
627
636
  };
628
637
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -712,8 +721,8 @@
712
721
  };
713
722
  };`,
714
723
  ],
715
- { type: 'text/javascript' },
716
- ),
724
+ { type: "text/javascript" }
725
+ )
717
726
  );
718
727
 
719
728
  const color_methods = URL.createObjectURL(
@@ -728,8 +737,8 @@
728
737
  };
729
738
  };`,
730
739
  ],
731
- { type: 'text/javascript' },
732
- ),
740
+ { type: "text/javascript" }
741
+ )
733
742
  );
734
743
 
735
744
  lynxView.napiModuleMap = {
@@ -746,7 +755,7 @@
746
755
 
747
756
  ```js
748
757
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
749
- if (name === 'getColor' && moduleName === 'color_methods') {
758
+ if (name === "getColor" && moduleName === "color_methods") {
750
759
  return data.color;
751
760
  }
752
761
  };
@@ -801,8 +810,8 @@
801
810
  }
802
811
  };`,
803
812
  ],
804
- { type: 'text/javascript' },
805
- ),
813
+ { type: "text/javascript" }
814
+ )
806
815
  );
807
816
  ```
808
817
 
@@ -814,7 +823,7 @@
814
823
 
815
824
  ```js
816
825
  lynxView.onNativeModulesCall = (name, data, callback) => {
817
- if (name === 'getColor') {
826
+ if (name === "getColor") {
818
827
  callback(data.color);
819
828
  }
820
829
  };
@@ -824,7 +833,7 @@
824
833
 
825
834
  ```js
826
835
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
827
- if (name === 'getColor' && moduleName === 'bridge') {
836
+ if (name === "getColor" && moduleName === "bridge") {
828
837
  return data.color;
829
838
  }
830
839
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.19.5",
3
+ "version": "0.19.6-canary-20260112-9e774c8d",
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.5",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.5",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.5"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.6-canary-20260112-9e774c8d",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.6-canary-20260112-9e774c8d",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.6-canary-20260112-9e774c8d"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"