@lynx-js/web-worker-runtime-canary 0.19.2 → 0.19.3-canary-20251223-986761dd

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.3-canary-20251223134821-986761dd1e9e631f8118faec68188f29f78e9236
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`986761d`](https://github.com/lynx-family/lynx-stack/commit/986761dd1e9e631f8118faec68188f29f78e9236)]:
8
+ - @lynx-js/web-worker-rpc@0.19.3-canary-20251223134821-986761dd1e9e631f8118faec68188f29f78e9236
9
+ - @lynx-js/web-constants@0.19.3-canary-20251223134821-986761dd1e9e631f8118faec68188f29f78e9236
10
+ - @lynx-js/web-mainthread-apis@0.19.3-canary-20251223134821-986761dd1e9e631f8118faec68188f29f78e9236
11
+
3
12
  ## 0.19.2
4
13
 
5
14
  ### Patch Changes
@@ -253,14 +262,14 @@
253
262
  Usage:
254
263
 
255
264
  ```ts
256
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
257
- import { defineConfig } from '@rsbuild/core';
265
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
266
+ import { defineConfig } from "@rsbuild/core";
258
267
 
259
268
  export default defineConfig({
260
269
  plugins: [
261
270
  pluginWebPlatform({
262
271
  // replace with your actual napi-modules file path
263
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
272
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
264
273
  }),
265
274
  ],
266
275
  });
@@ -271,10 +280,10 @@
271
280
  ```ts
272
281
  // index.napi-modules.ts
273
282
  export default {
274
- custom_module: function(NapiModules, NapiModulesCall) {
283
+ custom_module: function (NapiModules, NapiModulesCall) {
275
284
  return {
276
285
  async test(name) {
277
- console.log('CustomModule', NapiModules, NapiModulesCall);
286
+ console.log("CustomModule", NapiModules, NapiModulesCall);
278
287
  },
279
288
  };
280
289
  },
@@ -326,25 +335,25 @@
326
335
  lynxView.initI18nResources = [
327
336
  {
328
337
  options: {
329
- locale: 'en',
330
- channel: '1',
331
- fallback_url: '',
338
+ locale: "en",
339
+ channel: "1",
340
+ fallback_url: "",
332
341
  },
333
342
  resource: {
334
- hello: 'hello',
335
- lynx: 'lynx web platform1',
343
+ hello: "hello",
344
+ lynx: "lynx web platform1",
336
345
  },
337
346
  },
338
347
  ];
339
- lynxView.addEventListener('i18nResourceMissed', (e) => {
348
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
340
349
  console.log(e);
341
350
  });
342
351
 
343
352
  // mts
344
353
  _I18nResourceTranslation({
345
- locale: 'en',
346
- channel: '1',
347
- fallback_url: '',
354
+ locale: "en",
355
+ channel: "1",
356
+ fallback_url: "",
348
357
  });
349
358
  ```
350
359
 
@@ -594,8 +603,8 @@
594
603
  }
595
604
  };`,
596
605
  ],
597
- { type: 'text/javascript' },
598
- ),
606
+ { type: "text/javascript" }
607
+ )
599
608
  ),
600
609
  };
601
610
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -685,8 +694,8 @@
685
694
  };
686
695
  };`,
687
696
  ],
688
- { type: 'text/javascript' },
689
- ),
697
+ { type: "text/javascript" }
698
+ )
690
699
  );
691
700
 
692
701
  const color_methods = URL.createObjectURL(
@@ -701,8 +710,8 @@
701
710
  };
702
711
  };`,
703
712
  ],
704
- { type: 'text/javascript' },
705
- ),
713
+ { type: "text/javascript" }
714
+ )
706
715
  );
707
716
 
708
717
  lynxView.napiModuleMap = {
@@ -719,7 +728,7 @@
719
728
 
720
729
  ```js
721
730
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
722
- if (name === 'getColor' && moduleName === 'color_methods') {
731
+ if (name === "getColor" && moduleName === "color_methods") {
723
732
  return data.color;
724
733
  }
725
734
  };
@@ -774,8 +783,8 @@
774
783
  }
775
784
  };`,
776
785
  ],
777
- { type: 'text/javascript' },
778
- ),
786
+ { type: "text/javascript" }
787
+ )
779
788
  );
780
789
  ```
781
790
 
@@ -787,7 +796,7 @@
787
796
 
788
797
  ```js
789
798
  lynxView.onNativeModulesCall = (name, data, callback) => {
790
- if (name === 'getColor') {
799
+ if (name === "getColor") {
791
800
  callback(data.color);
792
801
  }
793
802
  };
@@ -797,7 +806,7 @@
797
806
 
798
807
  ```js
799
808
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
800
- if (name === 'getColor' && moduleName === 'bridge') {
809
+ if (name === "getColor" && moduleName === "bridge") {
801
810
  return data.color;
802
811
  }
803
812
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.19.2",
3
+ "version": "0.19.3-canary-20251223-986761dd",
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.2",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.2",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.2"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.3-canary-20251223-986761dd",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.3-canary-20251223-986761dd",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.3-canary-20251223-986761dd"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"