@lynx-js/web-constants-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,23 @@
1
1
  # @lynx-js/web-constants
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 []:
18
+ - @lynx-js/web-worker-rpc@0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
19
+
20
+ ## 0.17.2
4
21
 
5
22
  ### Patch Changes
6
23
 
@@ -12,7 +29,7 @@
12
29
  - support to add a breakpoint in chrome after reloading the web page
13
30
 
14
31
  - Updated dependencies []:
15
- - @lynx-js/web-worker-rpc@0.17.2-canary-20251001092331-734ff75abe294cfec61120df758d5aa548011569
32
+ - @lynx-js/web-worker-rpc@0.17.2
16
33
 
17
34
  ## 0.17.1
18
35
 
@@ -4,6 +4,7 @@ import type { StartMainThreadContextConfig } from './types/MainThreadStartConfig
4
4
  import type { IdentifierType, InvokeCallbackRes } from './types/NativeApp.js';
5
5
  import type { ElementAnimationOptions } from './types/Element.js';
6
6
  import type { BackMainThreadContextConfig, LynxTemplate, MarkTiming } from './types/index.js';
7
+ import type { UpdateDataOptions } from './types/UpdateDataOptions.js';
7
8
  export declare const postExposureEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[{
8
9
  exposures: ExposureWorkerEvent[];
9
10
  disExposures: ExposureWorkerEvent[];
@@ -17,7 +18,7 @@ export declare const publishEventEndpoint: import("@lynx-js/web-worker-rpc/dist/
17
18
  export declare const postOffscreenEventEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[eventType: string, targetUniqueId: number, bubbles: boolean, unknown]>;
18
19
  export declare const switchExposureServiceEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[boolean, boolean]>;
19
20
  export declare const mainThreadStartEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[StartMainThreadContextConfig]>;
20
- export declare const updateDataEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[Cloneable, Record<string, string>], void>;
21
+ export declare const updateDataEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[Cloneable, UpdateDataOptions | undefined], void>;
21
22
  export declare const sendGlobalEventEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[string, Cloneable[] | undefined]>;
22
23
  export declare const disposeEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[], void>;
23
24
  export declare const BackgroundThreadStartEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[BackMainThreadContextConfig], void>;
@@ -6,6 +6,7 @@ import type { FlushElementTreeOptions } from './FlushElementTreeOptions.js';
6
6
  import type { I18nResourceTranslationOptions } from './index.js';
7
7
  import type { MainThreadLynx } from './MainThreadLynx.js';
8
8
  import type { ProcessDataCallback } from './ProcessDataCallback.js';
9
+ import type { UpdateDataOptions } from './UpdateDataOptions.js';
9
10
  type ElementPAPIEventHandler = string | {
10
11
  type: 'worklet';
11
12
  value: unknown;
@@ -171,7 +172,7 @@ export interface MainThreadGlobalThis {
171
172
  __QueryComponent: QueryComponentPAPI;
172
173
  processEvalResult?: (exports: unknown, schema: string) => unknown;
173
174
  renderPage: ((data: unknown) => void) | undefined;
174
- updatePage?: (data: Cloneable, options?: Record<string, string>) => void;
175
+ updatePage?: (data: Cloneable, options?: UpdateDataOptions) => void;
175
176
  runWorklet?: (obj: unknown, event: unknown) => void;
176
177
  }
177
178
  export {};
@@ -2,13 +2,7 @@ export declare const enum NativeUpdateDataType {
2
2
  UPDATE = 0,
3
3
  RESET = 1
4
4
  }
5
- export declare const enum UpdateDataType {
6
- Unknown = 0,
7
- UpdateExplicitByUser = 1,
8
- UpdateByKernelFromCtor = 2,
9
- UpdateByKernelFromRender = 4,
10
- UpdateByKernelFromHydrate = 8,
11
- UpdateByKernelFromGetDerived = 16,
12
- UpdateByKernelFromConflict = 32,
13
- UpdateByKernelFromHMR = 64
5
+ export interface UpdateDataOptions {
6
+ type?: NativeUpdateDataType;
7
+ processorName?: string;
14
8
  }
@@ -3,23 +3,4 @@ export var NativeUpdateDataType;
3
3
  NativeUpdateDataType[NativeUpdateDataType["UPDATE"] = 0] = "UPDATE";
4
4
  NativeUpdateDataType[NativeUpdateDataType["RESET"] = 1] = "RESET";
5
5
  })(NativeUpdateDataType || (NativeUpdateDataType = {}));
6
- export var UpdateDataType;
7
- (function (UpdateDataType) {
8
- // default
9
- UpdateDataType[UpdateDataType["Unknown"] = 0] = "Unknown";
10
- // update by `setState` or `setData`
11
- UpdateDataType[UpdateDataType["UpdateExplicitByUser"] = 1] = "UpdateExplicitByUser";
12
- // update by lynx_core from ctor
13
- UpdateDataType[UpdateDataType["UpdateByKernelFromCtor"] = 2] = "UpdateByKernelFromCtor";
14
- // update by lynx_core from render
15
- UpdateDataType[UpdateDataType["UpdateByKernelFromRender"] = 4] = "UpdateByKernelFromRender";
16
- // update by hydrate
17
- UpdateDataType[UpdateDataType["UpdateByKernelFromHydrate"] = 8] = "UpdateByKernelFromHydrate";
18
- // update by `getDerivedStateFromProps`
19
- UpdateDataType[UpdateDataType["UpdateByKernelFromGetDerived"] = 16] = "UpdateByKernelFromGetDerived";
20
- // update by conflict detected
21
- UpdateDataType[UpdateDataType["UpdateByKernelFromConflict"] = 32] = "UpdateByKernelFromConflict";
22
- // update by HMR
23
- UpdateDataType[UpdateDataType["UpdateByKernelFromHMR"] = 64] = "UpdateByKernelFromHMR";
24
- })(UpdateDataType || (UpdateDataType = {}));
25
6
  //# sourceMappingURL=UpdateDataOptions.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-constants-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,7 +23,7 @@
23
23
  "**/*.css"
24
24
  ],
25
25
  "dependencies": {
26
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.17.2-canary-20251001-734ff75a"
26
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.0-canary-20251010-77397fd5"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4"