@lynx-js/web-worker-runtime-canary 0.17.2-canary-20251001-734ff75a → 0.18.0-canary-20251010-77397fd5

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,25 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
- ## 0.17.2-canary-20251001092331-734ff75abe294cfec61120df758d5aa548011569
3
+ ## 0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: ([#1837](https://github.com/lynx-family/lynx-stack/pull/1837))
8
+
9
+ 1. `LynxView.updateData()` cannot trigger `dataProcessor`.
10
+
11
+ 2. **This is a break change:** The second parameter of `LynxView.updateData()` has been changed from `UpdateDataType` to `string`, which is the `processorName` (default is `default` which will use `defaultDataProcessor`). This change is to better align with Native. The current complete type is as follows:
12
+
13
+ ```ts
14
+ LynxView.updateData(data: Cloneable, processorName?: string | undefined, callback?: (() => void) | undefined): void
15
+ ```
16
+
17
+ - Updated dependencies [[`77397fd`](https://github.com/lynx-family/lynx-stack/commit/77397fd535cf60556f8f82f7ef8dae8a623d1625)]:
18
+ - @lynx-js/web-constants@0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
19
+ - @lynx-js/web-mainthread-apis@0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
20
+ - @lynx-js/web-worker-rpc@0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
21
+
22
+ ## 0.17.2
4
23
 
5
24
  ### Patch Changes
6
25
 
@@ -12,9 +31,9 @@
12
31
  - support to add a breakpoint in chrome after reloading the web page
13
32
 
14
33
  - Updated dependencies [[`a35a245`](https://github.com/lynx-family/lynx-stack/commit/a35a2452e5355bda3c475f9a750a86085e0cf56a)]:
15
- - @lynx-js/web-constants@0.17.2-canary-20251001092331-734ff75abe294cfec61120df758d5aa548011569
16
- - @lynx-js/web-mainthread-apis@0.17.2-canary-20251001092331-734ff75abe294cfec61120df758d5aa548011569
17
- - @lynx-js/web-worker-rpc@0.17.2-canary-20251001092331-734ff75abe294cfec61120df758d5aa548011569
34
+ - @lynx-js/web-constants@0.17.2
35
+ - @lynx-js/web-mainthread-apis@0.17.2
36
+ - @lynx-js/web-worker-rpc@0.17.2
18
37
 
19
38
  ## 0.17.1
20
39
 
@@ -55,7 +55,7 @@ export async function createNativeApp(config) {
55
55
  registerPublicComponentEventHandler(mainThreadRpc, tt);
56
56
  registerPublishEventHandler(mainThreadRpc, tt);
57
57
  registerGlobalExposureEventHandler(mainThreadRpc, tt);
58
- registerUpdateDataHandler(uiThreadRpc, tt);
58
+ registerUpdateDataHandler(mainThreadRpc, tt);
59
59
  registerSendGlobalEventHandler(uiThreadRpc, tt);
60
60
  registerUpdateGlobalPropsHandler(uiThreadRpc, tt);
61
61
  registerUpdateI18nResource(uiThreadRpc, mainThreadRpc, i18nResource, tt);
@@ -1,3 +1,2 @@
1
- import { type MainThreadGlobalThis } from '@lynx-js/web-constants';
2
1
  import type { Rpc } from '@lynx-js/web-worker-rpc';
3
- export declare function registerUpdateDataHandler(rpc: Rpc, runtime: MainThreadGlobalThis): void;
2
+ export declare function registerUpdateDataHandler(mainThreadRpc: Rpc, handleUpdatedData: ReturnType<typeof import('@lynx-js/web-mainthread-apis').prepareMainThreadAPIs>['handleUpdatedData']): void;
@@ -1,10 +1,8 @@
1
1
  // Copyright 2023 The Lynx Authors. All rights reserved.
2
2
  // Licensed under the Apache License Version 2.0 that can be found in the
3
3
  // LICENSE file in the root directory of this source tree.
4
- import { updateDataEndpoint, } from '@lynx-js/web-constants';
5
- export function registerUpdateDataHandler(rpc, runtime) {
6
- rpc.registerHandler(updateDataEndpoint, (...args) => {
7
- runtime.updatePage?.(...args);
8
- });
4
+ import { updateDataEndpoint } from '@lynx-js/web-constants';
5
+ export function registerUpdateDataHandler(mainThreadRpc, handleUpdatedData) {
6
+ mainThreadRpc.registerHandler(updateDataEndpoint, (newData, options) => handleUpdatedData(newData, options));
9
7
  }
10
8
  //# sourceMappingURL=registerUpdateDataHandler.js.map
@@ -61,7 +61,7 @@ export async function startMainThreadWorker(uiThreadPort, backgroundThreadPort)
61
61
  uiThreadRpc.registerHandler(postOffscreenEventEndpoint, document[_onEvent]);
62
62
  const sendMultiThreadExposureChangedEndpoint = uiThreadRpc.createCall(multiThreadExposureChangedEndpoint);
63
63
  const loadTemplate = uiThreadRpc.createCall(loadTemplateMultiThread);
64
- const { startMainThread } = prepareMainThreadAPIs(backgroundThreadRpc, document, // rootDom
64
+ const { startMainThread, handleUpdatedData } = prepareMainThreadAPIs(backgroundThreadRpc, document, // rootDom
65
65
  document, mtsRealm, (exposureChangedElementUniqueIds) => {
66
66
  document.commit();
67
67
  sendMultiThreadExposureChangedEndpoint(exposureChangedElementUniqueIds
@@ -73,7 +73,7 @@ export async function startMainThreadWorker(uiThreadPort, backgroundThreadPort)
73
73
  }, loadTemplate);
74
74
  uiThreadRpc.registerHandler(mainThreadStartEndpoint, async (config) => {
75
75
  await startMainThread(config);
76
- registerUpdateDataHandler(uiThreadRpc, globalThis);
76
+ registerUpdateDataHandler(uiThreadRpc, handleUpdatedData);
77
77
  });
78
78
  uiThreadRpc.registerHandler(updateI18nResourcesEndpoint, data => {
79
79
  i18nResources.setData(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.17.2-canary-20251001-734ff75a",
3
+ "version": "0.18.0-canary-20251010-77397fd5",
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.17.2-canary-20251001-734ff75a",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.17.2-canary-20251001-734ff75a",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.17.2-canary-20251001-734ff75a"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.0-canary-20251010-77397fd5",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.0-canary-20251010-77397fd5",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.0-canary-20251010-77397fd5"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.3"