@lynx-js/web-worker-runtime-canary 0.15.4 → 0.15.5-canary-20250806-08d972e3

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.15.5-canary-20250806040849-08d972e3be5f75b64542fee6cdbd7f35c15fe20a
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`29434ae`](https://github.com/lynx-family/lynx-stack/commit/29434aec853f14242f521316429cf07a93b8c371)]:
8
+ - @lynx-js/web-mainthread-apis@0.15.5-canary-20250806040849-08d972e3be5f75b64542fee6cdbd7f35c15fe20a
9
+ - @lynx-js/web-constants@0.15.5-canary-20250806040849-08d972e3be5f75b64542fee6cdbd7f35c15fe20a
10
+ - @lynx-js/web-worker-rpc@0.15.5-canary-20250806040849-08d972e3be5f75b64542fee6cdbd7f35c15fe20a
11
+
3
12
  ## 0.15.4
4
13
 
5
14
  ### Patch Changes
@@ -63,14 +72,14 @@
63
72
  Usage:
64
73
 
65
74
  ```ts
66
- import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
67
- import { defineConfig } from '@rsbuild/core';
75
+ import { pluginWebPlatform } from "@lynx-js/web-platform-rsbuild-plugin";
76
+ import { defineConfig } from "@rsbuild/core";
68
77
 
69
78
  export default defineConfig({
70
79
  plugins: [
71
80
  pluginWebPlatform({
72
81
  // replace with your actual napi-modules file path
73
- napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
82
+ napiModulesPath: path.resolve(__dirname, "./index.napi-modules.ts"),
74
83
  }),
75
84
  ],
76
85
  });
@@ -81,10 +90,10 @@
81
90
  ```ts
82
91
  // index.napi-modules.ts
83
92
  export default {
84
- custom_module: function(NapiModules, NapiModulesCall) {
93
+ custom_module: function (NapiModules, NapiModulesCall) {
85
94
  return {
86
95
  async test(name) {
87
- console.log('CustomModule', NapiModules, NapiModulesCall);
96
+ console.log("CustomModule", NapiModules, NapiModulesCall);
88
97
  },
89
98
  };
90
99
  },
@@ -136,25 +145,25 @@
136
145
  lynxView.initI18nResources = [
137
146
  {
138
147
  options: {
139
- locale: 'en',
140
- channel: '1',
141
- fallback_url: '',
148
+ locale: "en",
149
+ channel: "1",
150
+ fallback_url: "",
142
151
  },
143
152
  resource: {
144
- hello: 'hello',
145
- lynx: 'lynx web platform1',
153
+ hello: "hello",
154
+ lynx: "lynx web platform1",
146
155
  },
147
156
  },
148
157
  ];
149
- lynxView.addEventListener('i18nResourceMissed', (e) => {
158
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
150
159
  console.log(e);
151
160
  });
152
161
 
153
162
  // mts
154
163
  _I18nResourceTranslation({
155
- locale: 'en',
156
- channel: '1',
157
- fallback_url: '',
164
+ locale: "en",
165
+ channel: "1",
166
+ fallback_url: "",
158
167
  });
159
168
  ```
160
169
 
@@ -404,8 +413,8 @@
404
413
  }
405
414
  };`,
406
415
  ],
407
- { type: 'text/javascript' },
408
- ),
416
+ { type: "text/javascript" }
417
+ )
409
418
  ),
410
419
  };
411
420
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -495,8 +504,8 @@
495
504
  };
496
505
  };`,
497
506
  ],
498
- { type: 'text/javascript' },
499
- ),
507
+ { type: "text/javascript" }
508
+ )
500
509
  );
501
510
 
502
511
  const color_methods = URL.createObjectURL(
@@ -511,8 +520,8 @@
511
520
  };
512
521
  };`,
513
522
  ],
514
- { type: 'text/javascript' },
515
- ),
523
+ { type: "text/javascript" }
524
+ )
516
525
  );
517
526
 
518
527
  lynxView.napiModuleMap = {
@@ -529,7 +538,7 @@
529
538
 
530
539
  ```js
531
540
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
532
- if (name === 'getColor' && moduleName === 'color_methods') {
541
+ if (name === "getColor" && moduleName === "color_methods") {
533
542
  return data.color;
534
543
  }
535
544
  };
@@ -584,8 +593,8 @@
584
593
  }
585
594
  };`,
586
595
  ],
587
- { type: 'text/javascript' },
588
- ),
596
+ { type: "text/javascript" }
597
+ )
589
598
  );
590
599
  ```
591
600
 
@@ -597,7 +606,7 @@
597
606
 
598
607
  ```js
599
608
  lynxView.onNativeModulesCall = (name, data, callback) => {
600
- if (name === 'getColor') {
609
+ if (name === "getColor") {
601
610
  callback(data.color);
602
611
  }
603
612
  };
@@ -607,7 +616,7 @@
607
616
 
608
617
  ```js
609
618
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
610
- if (name === 'getColor' && moduleName === 'bridge') {
619
+ if (name === "getColor" && moduleName === "bridge") {
611
620
  return data.color;
612
621
  }
613
622
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.15.4",
3
+ "version": "0.15.5-canary-20250806-08d972e3",
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.3",
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.4",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.4",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.4"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5-canary-20250806-08d972e3",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.5-canary-20250806-08d972e3",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.5-canary-20250806-08d972e3"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.2"