@lynx-js/web-constants 0.13.3 → 0.13.5

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,5 +1,47 @@
1
1
  # @lynx-js/web-constants
2
2
 
3
+ ## 0.13.5
4
+
5
+ ### Patch Changes
6
+
7
+ - refactor: move some internal status to dom's attribute ([#945](https://github.com/lynx-family/lynx-stack/pull/945))
8
+
9
+ It's essential for SSR
10
+
11
+ - fix: target.id is undefined ([#1016](https://github.com/lynx-family/lynx-stack/pull/1016))
12
+
13
+ - feat: add new pageConfig configuration: enableJSDataProcessor ([#886](https://github.com/lynx-family/lynx-stack/pull/886))
14
+
15
+ - refactor: move component config info to attribute ([#984](https://github.com/lynx-family/lynx-stack/pull/984))
16
+
17
+ - refactor: save dataset on an attribute ([#981](https://github.com/lynx-family/lynx-stack/pull/981))
18
+
19
+ On lynx, the `data-*` attributes have different behaviors than the HTMLElement has.
20
+
21
+ The dataset will be treated as properties, the key will not be applied the camel-case <-> hyphenate name transformation.
22
+
23
+ Before this commit we use it as a runtime data, but after this commit we will use encodeURI(JSON.stringify(dataset)) to encode it as a string.
24
+
25
+ - refactor: create elements of `elementToRuntimeInfoMap` on demand ([#986](https://github.com/lynx-family/lynx-stack/pull/986))
26
+
27
+ - refactor: implement mts apis in closure pattern ([#1004](https://github.com/lynx-family/lynx-stack/pull/1004))
28
+
29
+ - Updated dependencies []:
30
+ - @lynx-js/web-worker-rpc@0.13.5
31
+
32
+ ## 0.13.4
33
+
34
+ ### Patch Changes
35
+
36
+ - feat: lynx-view supports `updateGlobalProps` method, which can be used to update lynx.\_\_globalProps ([#918](https://github.com/lynx-family/lynx-stack/pull/918))
37
+
38
+ - feat: supports `lynx.getElementById()` && `animate()`. ([#912](https://github.com/lynx-family/lynx-stack/pull/912))
39
+
40
+ After this commit, you can use `lynx.getElementById()` to get the element by id, and use `element.animate()` to animate the element.
41
+
42
+ - Updated dependencies []:
43
+ - @lynx-js/web-worker-rpc@0.13.4
44
+
3
45
  ## 0.13.3
4
46
 
5
47
  ### Patch Changes
@@ -1,7 +1,10 @@
1
- export declare const lynxUniqueIdAttribute: "lynx-unique-id";
2
- export declare const cssIdAttribute: "lynx-css-id";
3
- export declare const componentIdAttribute: "lynx-component-id";
1
+ export declare const lynxUniqueIdAttribute: "l-uid";
2
+ export declare const cssIdAttribute: "l-css-id";
3
+ export declare const componentIdAttribute: "l-comp-id";
4
+ export declare const parentComponentUniqueIdAttribute: "l-p-comp-uid";
4
5
  export declare const lynxTagAttribute: "lynx-tag";
6
+ export declare const lynxDatasetAttribute: "l-dset";
7
+ export declare const lynxComponentConfigAttribute: "l-comp-cfg";
5
8
  export declare const lynxDefaultDisplayLinearAttribute: "lynx-default-display-linear";
6
9
  export declare const lynxDefaultOverflowVisibleAttribute: "lynx-default-overflow-visible";
7
10
  export declare const __lynx_timing_flag: "__lynx_timing_flag";
package/dist/constants.js CHANGED
@@ -1,10 +1,13 @@
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
- export const lynxUniqueIdAttribute = 'lynx-unique-id';
5
- export const cssIdAttribute = 'lynx-css-id';
6
- export const componentIdAttribute = 'lynx-component-id';
4
+ export const lynxUniqueIdAttribute = 'l-uid';
5
+ export const cssIdAttribute = 'l-css-id';
6
+ export const componentIdAttribute = 'l-comp-id';
7
+ export const parentComponentUniqueIdAttribute = 'l-p-comp-uid';
7
8
  export const lynxTagAttribute = 'lynx-tag';
9
+ export const lynxDatasetAttribute = 'l-dset';
10
+ export const lynxComponentConfigAttribute = 'l-comp-cfg';
8
11
  export const lynxDefaultDisplayLinearAttribute = 'lynx-default-display-linear';
9
12
  export const lynxDefaultOverflowVisibleAttribute = 'lynx-default-overflow-visible';
10
13
  export const __lynx_timing_flag = '__lynx_timing_flag';
@@ -7,6 +7,7 @@ import type { NapiModulesMap } from './types/NapiModules.js';
7
7
  import type { NativeModulesMap } from './types/NativeModules.js';
8
8
  import type { ElementOperation } from '@lynx-js/offscreen-document';
9
9
  import type { BrowserConfig } from './types/PageConfig.js';
10
+ import type { ElementAnimationOptions } from './types/Element.js';
10
11
  export declare const postExposureEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[{
11
12
  exposures: ExposureWorkerEvent[];
12
13
  disExposures: ExposureWorkerEvent[];
@@ -62,3 +63,5 @@ export declare const dispatchJSContextOnMainThreadEndpoint: import("@lynx-js/web
62
63
  type: string;
63
64
  data: Cloneable;
64
65
  }]>;
66
+ export declare const triggerElementMethodEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[method: string, id: string, options: ElementAnimationOptions]>;
67
+ export declare const updateGlobalPropsEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[Cloneable]>;
package/dist/endpoints.js CHANGED
@@ -31,4 +31,6 @@ export const dispatchLynxViewEventEndpoint = createRpcEndpoint('dispatchLynxView
31
31
  export const dispatchNapiModuleEndpoint = createRpcEndpoint('dispatchNapiModule', false, false);
32
32
  export const dispatchCoreContextOnBackgroundEndpoint = createRpcEndpoint('dispatchCoreContextOnBackground', false, false);
33
33
  export const dispatchJSContextOnMainThreadEndpoint = createRpcEndpoint('dispatchJSContextOnMainThread', false, false);
34
+ export const triggerElementMethodEndpoint = createRpcEndpoint('__triggerElementMethod', false, false);
35
+ export const updateGlobalPropsEndpoint = createRpcEndpoint('updateGlobalProps', false, false);
34
36
  //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1,66 @@
1
+ import type { LynxEventType } from './EventType.js';
2
+ export interface LynxRuntimeInfo {
3
+ eventHandlerMap: Record<string, {
4
+ capture: {
5
+ type: LynxEventType;
6
+ handler: string | {
7
+ type: 'worklet';
8
+ value: unknown;
9
+ };
10
+ } | undefined;
11
+ bind: {
12
+ type: LynxEventType;
13
+ handler: string | {
14
+ type: 'worklet';
15
+ value: unknown;
16
+ };
17
+ } | undefined;
18
+ }>;
19
+ componentAtIndex?: ComponentAtIndexCallback;
20
+ enqueueComponent?: EnqueueComponentCallback;
21
+ }
22
+ export type ComponentAtIndexCallback = (list: WebFiberElementImpl, listID: number, cellIndex: number, operationID: number, enableReuseNotification: boolean) => void;
23
+ export type EnqueueComponentCallback = (list: WebFiberElementImpl, listID: number, sign: number) => void;
24
+ export declare const enum AnimationOperation {
25
+ START = 0,
26
+ PLAY = 1,
27
+ PAUSE = 2,
28
+ CANCEL = 3,
29
+ FINISH = 4
30
+ }
31
+ export interface ElementAnimationOptions {
32
+ operation: AnimationOperation;
33
+ id: string;
34
+ keyframes?: any;
35
+ timingOptions?: Record<string, any>;
36
+ }
37
+ export interface WebFiberElementImpl {
38
+ getAttributeNames: () => string[];
39
+ getAttribute: (name: string) => string | null;
40
+ setAttribute: (name: string, value: string) => void;
41
+ removeAttribute: (name: string) => void;
42
+ append: (...children: WebFiberElementImpl[]) => void;
43
+ appendChild: (child: WebFiberElementImpl) => void;
44
+ removeChild: (child: WebFiberElementImpl) => WebFiberElementImpl;
45
+ insertBefore: (child: WebFiberElementImpl, ref?: WebFiberElementImpl | null) => WebFiberElementImpl;
46
+ replaceWith: (...newElement: WebFiberElementImpl[]) => void;
47
+ addEventListener: (type: string, handler: (ev: Event) => void, options: {
48
+ capture?: boolean;
49
+ passive?: boolean;
50
+ }) => void;
51
+ removeEventListener: (type: string, handler: (ev: Event) => void, options?: {
52
+ capture?: boolean;
53
+ }) => void;
54
+ innerHTML: string;
55
+ readonly tagName: string;
56
+ readonly firstElementChild: WebFiberElementImpl | null;
57
+ readonly children: WebFiberElementImpl[];
58
+ readonly parentElement: WebFiberElementImpl | null;
59
+ readonly parentNode: WebFiberElementImpl | null;
60
+ readonly lastElementChild: WebFiberElementImpl | null;
61
+ readonly nextElementSibling: WebFiberElementImpl | null;
62
+ readonly style: {
63
+ removeProperty(name: string): void;
64
+ setProperty(name: string, value: string, priority?: 'important' | '' | null): void;
65
+ };
66
+ }
@@ -0,0 +1,12 @@
1
+ // Copyright 2023 The Lynx Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+ export var AnimationOperation;
5
+ (function (AnimationOperation) {
6
+ AnimationOperation[AnimationOperation["START"] = 0] = "START";
7
+ AnimationOperation[AnimationOperation["PLAY"] = 1] = "PLAY";
8
+ AnimationOperation[AnimationOperation["PAUSE"] = 2] = "PAUSE";
9
+ AnimationOperation[AnimationOperation["CANCEL"] = 3] = "CANCEL";
10
+ AnimationOperation[AnimationOperation["FINISH"] = 4] = "FINISH";
11
+ })(AnimationOperation || (AnimationOperation = {}));
12
+ //# sourceMappingURL=Element.js.map
@@ -1,10 +1,11 @@
1
1
  import type { Cloneable } from './Cloneable.js';
2
+ import type { WebFiberElementImpl } from './Element.js';
2
3
  export type LynxEventType = 'bindEvent' | 'catchEvent' | 'capture-bind' | 'capture-catch';
3
4
  export interface LynxCrossThreadEventTarget {
4
5
  dataset: {
5
6
  [key: string]: Cloneable;
6
7
  };
7
- id?: string;
8
+ id: string | null;
8
9
  uniqueId: number;
9
10
  }
10
11
  export interface LynxCrossThreadEvent<T = {
@@ -38,3 +39,16 @@ export type ExposureEvent = {
38
39
  detail: ExposureEventDetail;
39
40
  };
40
41
  export type ExposureWorkerEvent = LynxCrossThreadEvent<ExposureEventDetail> & ExposureEventDetail;
42
+ export type MinimalRawEventObject = {
43
+ type: string;
44
+ target: Pick<WebFiberElementImpl, 'getAttribute'> | null;
45
+ currentTarget: Pick<WebFiberElementImpl, 'getAttribute'> | null;
46
+ detail?: Cloneable;
47
+ isTrusted: boolean;
48
+ timeStamp: number;
49
+ propertyName?: string;
50
+ animationName?: string;
51
+ touches?: unknown[];
52
+ targetTouches?: unknown[];
53
+ changedTouches?: unknown[];
54
+ };
@@ -0,0 +1,150 @@
1
+ import type { systemInfo } from '../constants.js';
2
+ import type { Cloneable } from './Cloneable.js';
3
+ import type { ComponentAtIndexCallback, EnqueueComponentCallback, WebFiberElementImpl } from './Element.js';
4
+ import type { LynxEventType } from './EventType.js';
5
+ import type { FlushElementTreeOptions } from './FlushElementTreeOptions.js';
6
+ import type { MainThreadLynx } from './MainThreadLynx.js';
7
+ import type { ProcessDataCallback } from './ProcessDataCallback.js';
8
+ type ElementPAPIEventHandler = string | {
9
+ type: 'worklet';
10
+ value: unknown;
11
+ } | undefined;
12
+ export type AddEventPAPI = (element: WebFiberElementImpl, eventType: LynxEventType, eventName: string, newEventHandler: ElementPAPIEventHandler) => void;
13
+ export type GetEventPAPI = (element: WebFiberElementImpl, eventName: string, eventType: LynxEventType) => ElementPAPIEventHandler;
14
+ export type GetEventsPAPI = (element: WebFiberElementImpl) => {
15
+ type: LynxEventType;
16
+ name: string;
17
+ function: ElementPAPIEventHandler;
18
+ }[];
19
+ export type SetEventsPAPI = (element: WebFiberElementImpl, listeners: {
20
+ type: LynxEventType;
21
+ name: string;
22
+ function: ElementPAPIEventHandler;
23
+ }[]) => void;
24
+ export type AppendElementPAPI = (parent: WebFiberElementImpl, child: WebFiberElementImpl) => void;
25
+ export type ElementIsEqualPAPI = (left: WebFiberElementImpl, right: WebFiberElementImpl) => boolean;
26
+ export type FirstElementPAPI = (element: WebFiberElementImpl) => WebFiberElementImpl | null;
27
+ export type GetChildrenPAPI = (element: WebFiberElementImpl) => WebFiberElementImpl[];
28
+ export type GetParentPAPI = (element: WebFiberElementImpl) => WebFiberElementImpl | null;
29
+ export type InsertElementBeforePAPI = (parent: WebFiberElementImpl, child: WebFiberElementImpl, ref?: WebFiberElementImpl | null) => WebFiberElementImpl;
30
+ export type LastElementPAPI = (element: WebFiberElementImpl) => WebFiberElementImpl | null;
31
+ export type NextElementPAPI = (element: WebFiberElementImpl) => WebFiberElementImpl | null;
32
+ export type RemoveElementPAPI = (parent: WebFiberElementImpl, child: WebFiberElementImpl) => WebFiberElementImpl;
33
+ export type ReplaceElementPAPI = (newElement: WebFiberElementImpl, oldElement: WebFiberElementImpl) => void;
34
+ export type ReplaceElementsPAPI = (parent: WebFiberElementImpl, newChildren: WebFiberElementImpl[] | WebFiberElementImpl, oldChildren?: WebFiberElementImpl[] | WebFiberElementImpl | null | undefined) => void;
35
+ export type AddConfigPAPI = (element: WebFiberElementImpl, type: string, value: Cloneable) => void;
36
+ export type AddDatasetPAPI = (element: WebFiberElementImpl, key: string, value: Cloneable) => void;
37
+ export type GetDatasetPAPI = (element: WebFiberElementImpl) => Record<string, Cloneable>;
38
+ export type GetDataByKeyPAPI = (element: WebFiberElementImpl, key: string) => Cloneable | undefined;
39
+ export type GetAttributesPAPI = (element: WebFiberElementImpl) => Record<string, string>;
40
+ export type GetComponentIdPAPI = (element: WebFiberElementImpl) => string | null;
41
+ export type GetElementConfigPAPI = (element: WebFiberElementImpl) => Record<string, Cloneable>;
42
+ export type GetElementUniqueIDPAPI = (element: WebFiberElementImpl) => number;
43
+ export type GetIDPAPI = (element: WebFiberElementImpl) => string | null;
44
+ export type GetTagPAPI = (element: WebFiberElementImpl) => string;
45
+ export type SetConfigPAPI = (element: WebFiberElementImpl, config: Record<string, Cloneable>) => void;
46
+ export type SetDatasetPAPI = (element: WebFiberElementImpl, dataset: Record<string, Cloneable>) => void;
47
+ export type SetIDPAPI = (element: WebFiberElementImpl, id: string | null) => void;
48
+ export type UpdateComponentIDPAPI = (element: WebFiberElementImpl, componentID: string) => void;
49
+ export type GetClassesPAPI = (element: WebFiberElementImpl) => string[];
50
+ export type CreateViewPAPI = (parentComponentUniqueID: number) => WebFiberElementImpl;
51
+ export type SwapElementPAPI = (childA: WebFiberElementImpl, childB: WebFiberElementImpl) => void;
52
+ export type UpdateListInfoAttributeValue = {
53
+ insertAction: {
54
+ position: number;
55
+ }[];
56
+ removeAction: {
57
+ position: number;
58
+ }[];
59
+ };
60
+ export type SetAttributePAPI = (element: WebFiberElementImpl, key: string, value: string | null | undefined | UpdateListInfoAttributeValue) => void;
61
+ export type UpdateListCallbacksPAPI = (element: WebFiberElementImpl, componentAtIndex: ComponentAtIndexCallback, enqueueComponent: EnqueueComponentCallback) => void;
62
+ export type CreateTextPAPI = CreateViewPAPI;
63
+ export type CreateRawTextPAPI = (text: string) => WebFiberElementImpl;
64
+ export type CreateImagePAPI = CreateViewPAPI;
65
+ export type CreateScrollViewPAPI = CreateViewPAPI;
66
+ export type CreateWrapperElementPAPI = CreateViewPAPI;
67
+ export type CreateComponentPAPI = (componentParentUniqueID: number, componentID: string, cssID: number, entryName: string, name: string, path: string, config: Record<string, Cloneable> | null | undefined, info: Record<string, Cloneable> | null | undefined) => WebFiberElementImpl;
68
+ export type CreateElementPAPI = (tagName: string, parentComponentUniqueId: number, info?: Record<string, Cloneable> | null | undefined) => WebFiberElementImpl;
69
+ export type CreatePagePAPI = (componentID: string, cssID: number, info: Record<string, Cloneable> | null | undefined) => WebFiberElementImpl;
70
+ export type CreateListPAPI = (parentComponentUniqueId: number, componentAtIndex: ComponentAtIndexCallback, enqueueComponent: EnqueueComponentCallback) => WebFiberElementImpl;
71
+ export type AddClassPAPI = (element: WebFiberElementImpl, className: string) => void;
72
+ export type SetClassesPAPI = (element: WebFiberElementImpl, classNames: string | null) => void;
73
+ export type AddInlineStylePAPI = (element: WebFiberElementImpl, key: number | string, value: string | number | null | undefined) => void;
74
+ export type SetInlineStylesPAPI = (element: WebFiberElementImpl, value: string | Record<string, string> | undefined) => void;
75
+ export type SetCSSIdPAPI = (elements: WebFiberElementImpl[], cssId: number | null) => void;
76
+ export type GetPageElementPAPI = () => WebFiberElementImpl | undefined;
77
+ export type GetTemplatePartsPAPI = (templateElement: WebFiberElementImpl) => Record<string, WebFiberElementImpl> | undefined;
78
+ export interface MainThreadGlobalThis {
79
+ __AddEvent: AddEventPAPI;
80
+ __GetEvent: GetEventPAPI;
81
+ __GetEvents: GetEventsPAPI;
82
+ __SetEvents: SetEventsPAPI;
83
+ __AppendElement: AppendElementPAPI;
84
+ __ElementIsEqual: ElementIsEqualPAPI;
85
+ __FirstElement: FirstElementPAPI;
86
+ __GetChildren: GetChildrenPAPI;
87
+ __GetParent: GetParentPAPI;
88
+ __InsertElementBefore: InsertElementBeforePAPI;
89
+ __LastElement: LastElementPAPI;
90
+ __NextElement: NextElementPAPI;
91
+ __RemoveElement: RemoveElementPAPI;
92
+ __ReplaceElement: ReplaceElementPAPI;
93
+ __ReplaceElements: ReplaceElementsPAPI;
94
+ __AddConfig: AddConfigPAPI;
95
+ __AddDataset: AddDatasetPAPI;
96
+ __GetDataset: GetDatasetPAPI;
97
+ __GetDataByKey: GetDataByKeyPAPI;
98
+ __GetAttributes: GetAttributesPAPI;
99
+ __GetComponentID: GetComponentIdPAPI;
100
+ __GetElementConfig: GetElementConfigPAPI;
101
+ __GetElementUniqueID: GetElementUniqueIDPAPI;
102
+ __GetID: GetIDPAPI;
103
+ __GetTag: GetTagPAPI;
104
+ __SetConfig: SetConfigPAPI;
105
+ __GetConfig: GetElementConfigPAPI;
106
+ __SetDataset: SetDatasetPAPI;
107
+ __SetID: SetIDPAPI;
108
+ __UpdateComponentID: UpdateComponentIDPAPI;
109
+ __GetClasses: GetClassesPAPI;
110
+ __CreateView: CreateViewPAPI;
111
+ __SwapElement: SwapElementPAPI;
112
+ __CreateText: CreateTextPAPI;
113
+ __CreateRawText: CreateRawTextPAPI;
114
+ __CreateImage: CreateImagePAPI;
115
+ __CreateScrollView: CreateScrollViewPAPI;
116
+ __CreateWrapperElement: CreateWrapperElementPAPI;
117
+ __CreateComponent: CreateComponentPAPI;
118
+ __CreateElement: CreateElementPAPI;
119
+ __CreatePage: CreatePagePAPI;
120
+ __CreateList: CreateListPAPI;
121
+ __SetAttribute: SetAttributePAPI;
122
+ __UpdateListCallbacks: UpdateListCallbacksPAPI;
123
+ __AddClass: AddClassPAPI;
124
+ __SetClasses: SetClassesPAPI;
125
+ __AddInlineStyle: AddInlineStylePAPI;
126
+ __SetInlineStyles: SetInlineStylesPAPI;
127
+ __SetCSSId: SetCSSIdPAPI;
128
+ __GetPageElement: GetPageElementPAPI;
129
+ __GetTemplateParts: GetTemplatePartsPAPI;
130
+ __globalProps: unknown;
131
+ SystemInfo: typeof systemInfo;
132
+ globalThis?: MainThreadGlobalThis;
133
+ lynx: MainThreadLynx;
134
+ processData?: ProcessDataCallback;
135
+ ssrEncode?: () => string;
136
+ ssrHydrate?: (encodeData?: string) => void;
137
+ _ReportError: (error: string, _: unknown) => void;
138
+ __OnLifecycleEvent: (lifeCycleEvent: Cloneable) => void;
139
+ __LoadLepusChunk: (path: string) => boolean;
140
+ __FlushElementTree: (_subTree: unknown, options: FlushElementTreeOptions) => void;
141
+ /**
142
+ * private fields
143
+ */
144
+ _updateVars: () => void;
145
+ __lynxGlobalBindingValues: Record<string, unknown>;
146
+ renderPage: ((data: unknown) => void) | undefined;
147
+ updatePage?: (data: Cloneable, options?: Record<string, string>) => void;
148
+ runWorklet?: (obj: unknown, event: unknown) => void;
149
+ }
150
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MainThreadGlobalThis.js.map
@@ -0,0 +1,10 @@
1
+ import type { Cloneable } from './Cloneable.js';
2
+ import type { LynxContextEventTarget } from './LynxContextEventTarget.js';
3
+ export interface MainThreadLynx {
4
+ getJSContext: () => LynxContextEventTarget;
5
+ requestAnimationFrame: (cb: () => void) => number;
6
+ cancelAnimationFrame: (handler: number) => void;
7
+ __globalProps: unknown;
8
+ getCustomSectionSync: (key: string) => Cloneable;
9
+ markPipelineTiming: (pipelineId: string, timingKey: string) => void;
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MainThreadLynx.js.map
@@ -43,6 +43,7 @@ export type NativeTTObject = {
43
43
  globalThis?: {
44
44
  tt: NativeTTObject;
45
45
  };
46
+ updateGlobalProps: (newData: Record<string, any>) => void;
46
47
  };
47
48
  export type BundleInitReturnObj = {
48
49
  /**
@@ -3,6 +3,7 @@ export interface PageConfig {
3
3
  enableRemoveCSSScope: boolean;
4
4
  defaultDisplayLinear: boolean;
5
5
  defaultOverflowVisible: boolean;
6
+ enableJSDataProcessor: boolean;
6
7
  }
7
8
  export interface BrowserConfig {
8
9
  pixelRatio: number;
@@ -4,7 +4,7 @@ export declare const enum NativeUpdateDataType {
4
4
  }
5
5
  export declare const enum UpdateDataType {
6
6
  Unknown = 0,
7
- UpdateExplictByUser = 1,
7
+ UpdateExplicitByUser = 1,
8
8
  UpdateByKernelFromCtor = 2,
9
9
  UpdateByKernelFromRender = 4,
10
10
  UpdateByKernelFromHydrate = 8,
@@ -8,7 +8,7 @@ export var UpdateDataType;
8
8
  // default
9
9
  UpdateDataType[UpdateDataType["Unknown"] = 0] = "Unknown";
10
10
  // update by `setState` or `setData`
11
- UpdateDataType[UpdateDataType["UpdateExplictByUser"] = 1] = "UpdateExplictByUser";
11
+ UpdateDataType[UpdateDataType["UpdateExplicitByUser"] = 1] = "UpdateExplicitByUser";
12
12
  // update by lynx_core from ctor
13
13
  UpdateDataType[UpdateDataType["UpdateByKernelFromCtor"] = 2] = "UpdateByKernelFromCtor";
14
14
  // update by lynx_core from render
@@ -12,3 +12,6 @@ export * from './NativeModules.js';
12
12
  export * from './NapiModules.js';
13
13
  export * from './FlushElementTreeOptions.js';
14
14
  export * from './LynxContextEventTarget.js';
15
+ export * from './Element.js';
16
+ export * from './MainThreadGlobalThis.js';
17
+ export * from './MainThreadLynx.js';
@@ -12,4 +12,7 @@ export * from './NativeModules.js';
12
12
  export * from './NapiModules.js';
13
13
  export * from './FlushElementTreeOptions.js';
14
14
  export * from './LynxContextEventTarget.js';
15
+ export * from './Element.js';
16
+ export * from './MainThreadGlobalThis.js';
17
+ export * from './MainThreadLynx.js';
15
18
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-constants",
3
- "version": "0.13.3",
3
+ "version": "0.13.5",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,9 +23,9 @@
23
23
  "**/*.css"
24
24
  ],
25
25
  "dependencies": {
26
- "@lynx-js/web-worker-rpc": "0.13.3"
26
+ "@lynx-js/web-worker-rpc": "0.13.5"
27
27
  },
28
28
  "devDependencies": {
29
- "@lynx-js/offscreen-document": "0.0.4"
29
+ "@lynx-js/offscreen-document": "0.1.1"
30
30
  }
31
31
  }