@lynx-js/web-worker-runtime-canary 0.19.1 → 0.19.2-canary-20251216-e38e21a1

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.2-canary-20251216115050-e38e21a13bc43472da91f99f6cc60266d7e0de8b
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-constants@0.19.2-canary-20251216115050-e38e21a13bc43472da91f99f6cc60266d7e0de8b
9
+ - @lynx-js/web-mainthread-apis@0.19.2-canary-20251216115050-e38e21a13bc43472da91f99f6cc60266d7e0de8b
10
+ - @lynx-js/web-worker-rpc@0.19.2-canary-20251216115050-e38e21a13bc43472da91f99f6cc60266d7e0de8b
11
+
3
12
  ## 0.19.1
4
13
 
5
14
  ### Patch Changes
@@ -244,14 +253,14 @@
244
253
  Usage:
245
254
 
246
255
  ```ts
247
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
248
- import { defineConfig } from '@rsbuild/core';
256
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
257
+ import { defineConfig } from "@rsbuild/core";
249
258
 
250
259
  export default defineConfig({
251
260
  plugins: [
252
261
  pluginWebPlatform({
253
262
  // replace with your actual napi-modules file path
254
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
263
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
255
264
  }),
256
265
  ],
257
266
  });
@@ -262,10 +271,10 @@
262
271
  ```ts
263
272
  // index.napi-modules.ts
264
273
  export default {
265
- custom_module: function(NapiModules, NapiModulesCall) {
274
+ custom_module: function (NapiModules, NapiModulesCall) {
266
275
  return {
267
276
  async test(name) {
268
- console.log('CustomModule', NapiModules, NapiModulesCall);
277
+ console.log("CustomModule", NapiModules, NapiModulesCall);
269
278
  },
270
279
  };
271
280
  },
@@ -317,25 +326,25 @@
317
326
  lynxView.initI18nResources = [
318
327
  {
319
328
  options: {
320
- locale: 'en',
321
- channel: '1',
322
- fallback_url: '',
329
+ locale: "en",
330
+ channel: "1",
331
+ fallback_url: "",
323
332
  },
324
333
  resource: {
325
- hello: 'hello',
326
- lynx: 'lynx web platform1',
334
+ hello: "hello",
335
+ lynx: "lynx web platform1",
327
336
  },
328
337
  },
329
338
  ];
330
- lynxView.addEventListener('i18nResourceMissed', (e) => {
339
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
331
340
  console.log(e);
332
341
  });
333
342
 
334
343
  // mts
335
344
  _I18nResourceTranslation({
336
- locale: 'en',
337
- channel: '1',
338
- fallback_url: '',
345
+ locale: "en",
346
+ channel: "1",
347
+ fallback_url: "",
339
348
  });
340
349
  ```
341
350
 
@@ -585,8 +594,8 @@
585
594
  }
586
595
  };`,
587
596
  ],
588
- { type: 'text/javascript' },
589
- ),
597
+ { type: "text/javascript" }
598
+ )
590
599
  ),
591
600
  };
592
601
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -676,8 +685,8 @@
676
685
  };
677
686
  };`,
678
687
  ],
679
- { type: 'text/javascript' },
680
- ),
688
+ { type: "text/javascript" }
689
+ )
681
690
  );
682
691
 
683
692
  const color_methods = URL.createObjectURL(
@@ -692,8 +701,8 @@
692
701
  };
693
702
  };`,
694
703
  ],
695
- { type: 'text/javascript' },
696
- ),
704
+ { type: "text/javascript" }
705
+ )
697
706
  );
698
707
 
699
708
  lynxView.napiModuleMap = {
@@ -710,7 +719,7 @@
710
719
 
711
720
  ```js
712
721
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
713
- if (name === 'getColor' && moduleName === 'color_methods') {
722
+ if (name === "getColor" && moduleName === "color_methods") {
714
723
  return data.color;
715
724
  }
716
725
  };
@@ -765,8 +774,8 @@
765
774
  }
766
775
  };`,
767
776
  ],
768
- { type: 'text/javascript' },
769
- ),
777
+ { type: "text/javascript" }
778
+ )
770
779
  );
771
780
  ```
772
781
 
@@ -778,7 +787,7 @@
778
787
 
779
788
  ```js
780
789
  lynxView.onNativeModulesCall = (name, data, callback) => {
781
- if (name === 'getColor') {
790
+ if (name === "getColor") {
782
791
  callback(data.color);
783
792
  }
784
793
  };
@@ -788,7 +797,7 @@
788
797
 
789
798
  ```js
790
799
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
791
- if (name === 'getColor' && moduleName === 'bridge') {
800
+ if (name === "getColor" && moduleName === "bridge") {
792
801
  return data.color;
793
802
  }
794
803
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.19.1",
3
+ "version": "0.19.2-canary-20251216-e38e21a1",
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.1",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.1",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.1"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.2-canary-20251216-e38e21a1",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.2-canary-20251216-e38e21a1",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.2-canary-20251216-e38e21a1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"