@lynx-js/web-constants 0.15.5 → 0.15.6
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,22 @@
|
|
|
1
1
|
# @lynx-js/web-constants
|
|
2
2
|
|
|
3
|
+
## 0.15.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: systeminfo in mts function ([#1537](https://github.com/lynx-family/lynx-stack/pull/1537))
|
|
8
|
+
|
|
9
|
+
- feat: add MTS API: \_\_UpdateComponentInfo ([#1485](https://github.com/lynx-family/lynx-stack/pull/1485))
|
|
10
|
+
|
|
11
|
+
- fix: `__ElementFromBinary` needs to correctly apply the dataset in elementTemplate to the Element ([#1487](https://github.com/lynx-family/lynx-stack/pull/1487))
|
|
12
|
+
|
|
13
|
+
- fix: all attributes except `id` and `type` under ElementTemplateData are optional. ([#1483](https://github.com/lynx-family/lynx-stack/pull/1483))
|
|
14
|
+
|
|
15
|
+
- feat: add MTS API \_\_GetAttributeByName ([#1486](https://github.com/lynx-family/lynx-stack/pull/1486))
|
|
16
|
+
|
|
17
|
+
- Updated dependencies []:
|
|
18
|
+
- @lynx-js/web-worker-rpc@0.15.6
|
|
19
|
+
|
|
3
20
|
## 0.15.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -5,16 +5,17 @@ import type { StyleInfo } from './StyleInfo.js';
|
|
|
5
5
|
export type ElementTemplateData = {
|
|
6
6
|
id: string;
|
|
7
7
|
type: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
attributes
|
|
11
|
-
builtinAttributes
|
|
12
|
-
children
|
|
13
|
-
events
|
|
8
|
+
idSelector?: string;
|
|
9
|
+
class?: string[];
|
|
10
|
+
attributes?: Record<string, string>;
|
|
11
|
+
builtinAttributes?: Record<string, string>;
|
|
12
|
+
children?: ElementTemplateData[];
|
|
13
|
+
events?: {
|
|
14
14
|
type: LynxEventType;
|
|
15
15
|
name: string;
|
|
16
16
|
value: string;
|
|
17
17
|
}[];
|
|
18
|
+
dataset?: Record<string, string>;
|
|
18
19
|
};
|
|
19
20
|
export interface LynxTemplate {
|
|
20
21
|
styleInfo: StyleInfo;
|
|
@@ -47,6 +47,13 @@ export type SetConfigPAPI = (element: WebFiberElementImpl, config: Record<string
|
|
|
47
47
|
export type SetDatasetPAPI = (element: WebFiberElementImpl, dataset: Record<string, Cloneable>) => void;
|
|
48
48
|
export type SetIDPAPI = (element: WebFiberElementImpl, id: string | null) => void;
|
|
49
49
|
export type UpdateComponentIDPAPI = (element: WebFiberElementImpl, componentID: string) => void;
|
|
50
|
+
export type UpdateComponentInfoPAPI = (element: WebFiberElementImpl, params: {
|
|
51
|
+
componentID?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
path?: string;
|
|
54
|
+
entry?: string;
|
|
55
|
+
cssID?: number;
|
|
56
|
+
}) => void;
|
|
50
57
|
export type GetClassesPAPI = (element: WebFiberElementImpl) => string[];
|
|
51
58
|
export type CreateViewPAPI = (parentComponentUniqueID: number) => WebFiberElementImpl;
|
|
52
59
|
export type SwapElementPAPI = (childA: WebFiberElementImpl, childB: WebFiberElementImpl) => void;
|
|
@@ -82,6 +89,7 @@ interface JSErrorInfo {
|
|
|
82
89
|
release: string;
|
|
83
90
|
}
|
|
84
91
|
export type ElementFromBinaryPAPI = (templateId: string, parentComponentUniId: number) => WebFiberElementImpl[];
|
|
92
|
+
export type GetAttributeByNamePAPI = (element: WebFiberElementImpl, name: string) => string | null;
|
|
85
93
|
export interface MainThreadGlobalThis {
|
|
86
94
|
__ElementFromBinary: ElementFromBinaryPAPI;
|
|
87
95
|
__GetTemplateParts?: GetTemplatePartsPAPI;
|
|
@@ -117,6 +125,7 @@ export interface MainThreadGlobalThis {
|
|
|
117
125
|
__SetDataset: SetDatasetPAPI;
|
|
118
126
|
__SetID: SetIDPAPI;
|
|
119
127
|
__UpdateComponentID: UpdateComponentIDPAPI;
|
|
128
|
+
__UpdateComponentInfo: UpdateComponentInfoPAPI;
|
|
120
129
|
__GetClasses: GetClassesPAPI;
|
|
121
130
|
__CreateView: CreateViewPAPI;
|
|
122
131
|
__SwapElement: SwapElementPAPI;
|
|
@@ -137,6 +146,7 @@ export interface MainThreadGlobalThis {
|
|
|
137
146
|
__SetInlineStyles: SetInlineStylesPAPI;
|
|
138
147
|
__SetCSSId: SetCSSIdPAPI;
|
|
139
148
|
__GetPageElement: GetPageElementPAPI;
|
|
149
|
+
__GetAttributeByName: GetAttributeByNamePAPI;
|
|
140
150
|
__globalProps: unknown;
|
|
141
151
|
SystemInfo: typeof systemInfo;
|
|
142
152
|
globalThis?: MainThreadGlobalThis;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { systemInfo } from '../constants.js';
|
|
1
2
|
import type { Cloneable } from './Cloneable.js';
|
|
2
3
|
import type { LynxContextEventTarget } from './LynxContextEventTarget.js';
|
|
3
4
|
export interface MainThreadLynx {
|
|
@@ -7,4 +8,5 @@ export interface MainThreadLynx {
|
|
|
7
8
|
__globalProps: unknown;
|
|
8
9
|
getCustomSectionSync: (key: string) => Cloneable;
|
|
9
10
|
markPipelineTiming: (pipelineId: string, timingKey: string) => void;
|
|
11
|
+
SystemInfo: typeof systemInfo;
|
|
10
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-constants",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
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": "0.15.
|
|
26
|
+
"@lynx-js/web-worker-rpc": "0.15.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@lynx-js/offscreen-document": "0.1.3"
|