@lynx-js/web-worker-runtime-canary 0.19.4 → 0.19.5-canary-20260107-78c21890

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.5-canary-20260107061419-78c218907a5246a05acf3aa843b304778cdc4467
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-constants@0.19.5-canary-20260107061419-78c218907a5246a05acf3aa843b304778cdc4467
9
+ - @lynx-js/web-mainthread-apis@0.19.5-canary-20260107061419-78c218907a5246a05acf3aa843b304778cdc4467
10
+ - @lynx-js/web-worker-rpc@0.19.5-canary-20260107061419-78c218907a5246a05acf3aa843b304778cdc4467
11
+
3
12
  ## 0.19.4
4
13
 
5
14
  ### Patch Changes
@@ -271,14 +280,14 @@
271
280
  Usage:
272
281
 
273
282
  ```ts
274
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
275
- import { defineConfig } from '@rsbuild/core';
283
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
284
+ import { defineConfig } from "@rsbuild/core";
276
285
 
277
286
  export default defineConfig({
278
287
  plugins: [
279
288
  pluginWebPlatform({
280
289
  // replace with your actual napi-modules file path
281
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
290
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
282
291
  }),
283
292
  ],
284
293
  });
@@ -289,10 +298,10 @@
289
298
  ```ts
290
299
  // index.napi-modules.ts
291
300
  export default {
292
- custom_module: function(NapiModules, NapiModulesCall) {
301
+ custom_module: function (NapiModules, NapiModulesCall) {
293
302
  return {
294
303
  async test(name) {
295
- console.log('CustomModule', NapiModules, NapiModulesCall);
304
+ console.log("CustomModule", NapiModules, NapiModulesCall);
296
305
  },
297
306
  };
298
307
  },
@@ -344,25 +353,25 @@
344
353
  lynxView.initI18nResources = [
345
354
  {
346
355
  options: {
347
- locale: 'en',
348
- channel: '1',
349
- fallback_url: '',
356
+ locale: "en",
357
+ channel: "1",
358
+ fallback_url: "",
350
359
  },
351
360
  resource: {
352
- hello: 'hello',
353
- lynx: 'lynx web platform1',
361
+ hello: "hello",
362
+ lynx: "lynx web platform1",
354
363
  },
355
364
  },
356
365
  ];
357
- lynxView.addEventListener('i18nResourceMissed', (e) => {
366
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
358
367
  console.log(e);
359
368
  });
360
369
 
361
370
  // mts
362
371
  _I18nResourceTranslation({
363
- locale: 'en',
364
- channel: '1',
365
- fallback_url: '',
372
+ locale: "en",
373
+ channel: "1",
374
+ fallback_url: "",
366
375
  });
367
376
  ```
368
377
 
@@ -612,8 +621,8 @@
612
621
  }
613
622
  };`,
614
623
  ],
615
- { type: 'text/javascript' },
616
- ),
624
+ { type: "text/javascript" }
625
+ )
617
626
  ),
618
627
  };
619
628
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -703,8 +712,8 @@
703
712
  };
704
713
  };`,
705
714
  ],
706
- { type: 'text/javascript' },
707
- ),
715
+ { type: "text/javascript" }
716
+ )
708
717
  );
709
718
 
710
719
  const color_methods = URL.createObjectURL(
@@ -719,8 +728,8 @@
719
728
  };
720
729
  };`,
721
730
  ],
722
- { type: 'text/javascript' },
723
- ),
731
+ { type: "text/javascript" }
732
+ )
724
733
  );
725
734
 
726
735
  lynxView.napiModuleMap = {
@@ -737,7 +746,7 @@
737
746
 
738
747
  ```js
739
748
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
740
- if (name === 'getColor' && moduleName === 'color_methods') {
749
+ if (name === "getColor" && moduleName === "color_methods") {
741
750
  return data.color;
742
751
  }
743
752
  };
@@ -792,8 +801,8 @@
792
801
  }
793
802
  };`,
794
803
  ],
795
- { type: 'text/javascript' },
796
- ),
804
+ { type: "text/javascript" }
805
+ )
797
806
  );
798
807
  ```
799
808
 
@@ -805,7 +814,7 @@
805
814
 
806
815
  ```js
807
816
  lynxView.onNativeModulesCall = (name, data, callback) => {
808
- if (name === 'getColor') {
817
+ if (name === "getColor") {
809
818
  callback(data.color);
810
819
  }
811
820
  };
@@ -815,7 +824,7 @@
815
824
 
816
825
  ```js
817
826
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
818
- if (name === 'getColor' && moduleName === 'bridge') {
827
+ if (name === "getColor" && moduleName === "bridge") {
819
828
  return data.color;
820
829
  }
821
830
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.19.4",
3
+ "version": "0.19.5-canary-20260107-78c21890",
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.4",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.4",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.4"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.5-canary-20260107-78c21890",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.5-canary-20260107-78c21890",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.5-canary-20260107-78c21890"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"