@lynx-js/web-worker-runtime-canary 0.19.6 → 0.19.7-canary-20260126-5e7e43c5

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.7-canary-20260126074925-5e7e43c59237f98a93aefbd6749ad39c33acdc4d
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-constants@0.19.7-canary-20260126074925-5e7e43c59237f98a93aefbd6749ad39c33acdc4d
9
+ - @lynx-js/web-mainthread-apis@0.19.7-canary-20260126074925-5e7e43c59237f98a93aefbd6749ad39c33acdc4d
10
+ - @lynx-js/web-worker-rpc@0.19.7-canary-20260126074925-5e7e43c59237f98a93aefbd6749ad39c33acdc4d
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 '@lynx-js/web-platform-rsbuild-plugin';
295
- import { defineConfig } from '@rsbuild/core';
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, './index.napi-modules.ts'),
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('CustomModule', NapiModules, NapiModulesCall);
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: 'en',
368
- channel: '1',
369
- fallback_url: '',
376
+ locale: "en",
377
+ channel: "1",
378
+ fallback_url: "",
370
379
  },
371
380
  resource: {
372
- hello: 'hello',
373
- lynx: 'lynx web platform1',
381
+ hello: "hello",
382
+ lynx: "lynx web platform1",
374
383
  },
375
384
  },
376
385
  ];
377
- lynxView.addEventListener('i18nResourceMissed', (e) => {
386
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
378
387
  console.log(e);
379
388
  });
380
389
 
381
390
  // mts
382
391
  _I18nResourceTranslation({
383
- locale: 'en',
384
- channel: '1',
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: 'text/javascript' },
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: 'text/javascript' },
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: 'text/javascript' },
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 === 'getColor' && moduleName === 'color_methods') {
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: 'text/javascript' },
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 === 'getColor') {
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 === 'getColor' && moduleName === 'bridge') {
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.6",
3
+ "version": "0.19.7-canary-20260126-5e7e43c5",
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.6",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.6",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.6"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.7-canary-20260126-5e7e43c5",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.7-canary-20260126-5e7e43c5",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.7-canary-20260126-5e7e43c5"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"