@lynx-js/web-worker-runtime-canary 0.19.3 → 0.19.4-canary-20251230-bba05e2e

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.4-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`bba05e2`](https://github.com/lynx-family/lynx-stack/commit/bba05e2ed06cca8009ad415fd9777e8334a0887a)]:
8
+ - @lynx-js/web-worker-rpc@0.19.4-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
9
+ - @lynx-js/web-constants@0.19.4-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
10
+ - @lynx-js/web-mainthread-apis@0.19.4-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
11
+
3
12
  ## 0.19.3
4
13
 
5
14
  ### Patch Changes
@@ -262,14 +271,14 @@
262
271
  Usage:
263
272
 
264
273
  ```ts
265
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
266
- import { defineConfig } from '@rsbuild/core';
274
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
275
+ import { defineConfig } from "@rsbuild/core";
267
276
 
268
277
  export default defineConfig({
269
278
  plugins: [
270
279
  pluginWebPlatform({
271
280
  // replace with your actual napi-modules file path
272
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
281
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
273
282
  }),
274
283
  ],
275
284
  });
@@ -280,10 +289,10 @@
280
289
  ```ts
281
290
  // index.napi-modules.ts
282
291
  export default {
283
- custom_module: function(NapiModules, NapiModulesCall) {
292
+ custom_module: function (NapiModules, NapiModulesCall) {
284
293
  return {
285
294
  async test(name) {
286
- console.log('CustomModule', NapiModules, NapiModulesCall);
295
+ console.log("CustomModule", NapiModules, NapiModulesCall);
287
296
  },
288
297
  };
289
298
  },
@@ -335,25 +344,25 @@
335
344
  lynxView.initI18nResources = [
336
345
  {
337
346
  options: {
338
- locale: 'en',
339
- channel: '1',
340
- fallback_url: '',
347
+ locale: "en",
348
+ channel: "1",
349
+ fallback_url: "",
341
350
  },
342
351
  resource: {
343
- hello: 'hello',
344
- lynx: 'lynx web platform1',
352
+ hello: "hello",
353
+ lynx: "lynx web platform1",
345
354
  },
346
355
  },
347
356
  ];
348
- lynxView.addEventListener('i18nResourceMissed', (e) => {
357
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
349
358
  console.log(e);
350
359
  });
351
360
 
352
361
  // mts
353
362
  _I18nResourceTranslation({
354
- locale: 'en',
355
- channel: '1',
356
- fallback_url: '',
363
+ locale: "en",
364
+ channel: "1",
365
+ fallback_url: "",
357
366
  });
358
367
  ```
359
368
 
@@ -603,8 +612,8 @@
603
612
  }
604
613
  };`,
605
614
  ],
606
- { type: 'text/javascript' },
607
- ),
615
+ { type: "text/javascript" }
616
+ )
608
617
  ),
609
618
  };
610
619
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -694,8 +703,8 @@
694
703
  };
695
704
  };`,
696
705
  ],
697
- { type: 'text/javascript' },
698
- ),
706
+ { type: "text/javascript" }
707
+ )
699
708
  );
700
709
 
701
710
  const color_methods = URL.createObjectURL(
@@ -710,8 +719,8 @@
710
719
  };
711
720
  };`,
712
721
  ],
713
- { type: 'text/javascript' },
714
- ),
722
+ { type: "text/javascript" }
723
+ )
715
724
  );
716
725
 
717
726
  lynxView.napiModuleMap = {
@@ -728,7 +737,7 @@
728
737
 
729
738
  ```js
730
739
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
731
- if (name === 'getColor' && moduleName === 'color_methods') {
740
+ if (name === "getColor" && moduleName === "color_methods") {
732
741
  return data.color;
733
742
  }
734
743
  };
@@ -783,8 +792,8 @@
783
792
  }
784
793
  };`,
785
794
  ],
786
- { type: 'text/javascript' },
787
- ),
795
+ { type: "text/javascript" }
796
+ )
788
797
  );
789
798
  ```
790
799
 
@@ -796,7 +805,7 @@
796
805
 
797
806
  ```js
798
807
  lynxView.onNativeModulesCall = (name, data, callback) => {
799
- if (name === 'getColor') {
808
+ if (name === "getColor") {
800
809
  callback(data.color);
801
810
  }
802
811
  };
@@ -806,7 +815,7 @@
806
815
 
807
816
  ```js
808
817
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
809
- if (name === 'getColor' && moduleName === 'bridge') {
818
+ if (name === "getColor" && moduleName === "bridge") {
810
819
  return data.color;
811
820
  }
812
821
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.19.3",
3
+ "version": "0.19.4-canary-20251230-bba05e2e",
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.3",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.3",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.3"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.4-canary-20251230-bba05e2e",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.4-canary-20251230-bba05e2e",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.4-canary-20251230-bba05e2e"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"