@lynx-js/web-constants 0.19.5 → 0.19.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 +17 -0
- package/dist/endpoints.d.ts +1 -0
- package/dist/endpoints.js +1 -0
- package/dist/types/MainThreadGlobalThis.d.ts +6 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @lynx-js/web-constants
|
|
2
2
|
|
|
3
|
+
## 0.19.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: add main-thread API: \_\_QuerySelector ([#2115](https://github.com/lynx-family/lynx-stack/pull/2115))
|
|
8
|
+
|
|
9
|
+
- fix: when a list-item is deleted from list, the deleted list-item is still showed incorrectly. ([#1092](https://github.com/lynx-family/lynx-stack/pull/1092))
|
|
10
|
+
|
|
11
|
+
This is because the `enqueueComponent` method does not delete the node from the Element Tree. It is only to maintain the display node on RL, and lynx web needs to delete the dom additionally.
|
|
12
|
+
|
|
13
|
+
- feat: support main thread invoke ui method ([#2104](https://github.com/lynx-family/lynx-stack/pull/2104))
|
|
14
|
+
|
|
15
|
+
- feat: support lynx.reload() ([#2127](https://github.com/lynx-family/lynx-stack/pull/2127))
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`f7133c1`](https://github.com/lynx-family/lynx-stack/commit/f7133c137f094063e991dfa0e993ea92177aa173)]:
|
|
18
|
+
- @lynx-js/web-worker-rpc@0.19.6
|
|
19
|
+
|
|
3
20
|
## 0.19.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/endpoints.d.ts
CHANGED
|
@@ -66,3 +66,4 @@ export declare const queryComponentEndpoint: import("@lynx-js/web-worker-rpc").R
|
|
|
66
66
|
}>;
|
|
67
67
|
export declare const updateBTSTemplateCacheEndpoint: import("@lynx-js/web-worker-rpc").RpcEndpointAsync<[string, LynxTemplate], void>;
|
|
68
68
|
export declare const loadTemplateMultiThread: import("@lynx-js/web-worker-rpc").RpcEndpointAsync<[string], LynxTemplate>;
|
|
69
|
+
export declare const reloadEndpoint: import("@lynx-js/web-worker-rpc").RpcEndpointAsyncVoid<[]>;
|
package/dist/endpoints.js
CHANGED
|
@@ -41,4 +41,5 @@ export const dispatchI18nResourceEndpoint = createRpcEndpoint('dispatchI18nResou
|
|
|
41
41
|
export const queryComponentEndpoint = createRpcEndpoint('queryComponent', false, true);
|
|
42
42
|
export const updateBTSTemplateCacheEndpoint = createRpcEndpoint('updateBTSTemplateCacheEndpoint', false, true);
|
|
43
43
|
export const loadTemplateMultiThread = createRpcEndpoint('loadTemplateMultiThread', false, true);
|
|
44
|
+
export const reloadEndpoint = createRpcEndpoint('reload', false, false);
|
|
44
45
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -7,6 +7,7 @@ import type { I18nResourceTranslationOptions } from './index.js';
|
|
|
7
7
|
import type { MainThreadLynx } from './MainThreadLynx.js';
|
|
8
8
|
import type { ProcessDataCallback } from './ProcessDataCallback.js';
|
|
9
9
|
import type { UpdateDataOptions } from './UpdateDataOptions.js';
|
|
10
|
+
import type { InvokeCallbackRes } from './NativeApp.js';
|
|
10
11
|
type ElementPAPIEventHandler = string | {
|
|
11
12
|
type: 'worklet';
|
|
12
13
|
value: unknown;
|
|
@@ -62,9 +63,7 @@ export type UpdateListInfoAttributeValue = {
|
|
|
62
63
|
insertAction: {
|
|
63
64
|
position: number;
|
|
64
65
|
}[];
|
|
65
|
-
removeAction:
|
|
66
|
-
position: number;
|
|
67
|
-
}[];
|
|
66
|
+
removeAction: number[];
|
|
68
67
|
};
|
|
69
68
|
export type SetAttributePAPI = (element: HTMLElement, key: Exclude<string, 'update-list-info'>, value: string | null | undefined | boolean) => void;
|
|
70
69
|
export type SetAttributePAPIUpdateListInfo = (element: HTMLElement, key: 'update-list-info', value: UpdateListInfoAttributeValue | null) => void;
|
|
@@ -99,6 +98,8 @@ export type QueryComponentPAPI = (source: string, resultCallback?: (result: {
|
|
|
99
98
|
evalResult: unknown;
|
|
100
99
|
};
|
|
101
100
|
}) => void) => null;
|
|
101
|
+
export type InvokeUIMethodPAPI = (element: HTMLElement, method: string, params: object, callback: (result: InvokeCallbackRes) => void) => void;
|
|
102
|
+
export type QuerySelectorPAPI = (element: HTMLElement, selector: string) => unknown;
|
|
102
103
|
export interface ElementPAPIs {
|
|
103
104
|
__ElementFromBinary: ElementFromBinaryPAPI;
|
|
104
105
|
__GetTemplateParts?: GetTemplatePartsPAPI;
|
|
@@ -157,6 +158,8 @@ export interface ElementPAPIs {
|
|
|
157
158
|
__GetPageElement: GetPageElementPAPI;
|
|
158
159
|
__GetAttributeByName: GetAttributeByNamePAPI;
|
|
159
160
|
__FlushElementTree: (_subTree?: unknown, options?: FlushElementTreeOptions) => void;
|
|
161
|
+
__InvokeUIMethod: InvokeUIMethodPAPI;
|
|
162
|
+
__QuerySelector: QuerySelectorPAPI;
|
|
160
163
|
}
|
|
161
164
|
export interface MainThreadGlobalThis extends ElementPAPIs {
|
|
162
165
|
__globalProps: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-constants",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.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.19.
|
|
26
|
+
"@lynx-js/web-worker-rpc": "0.19.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@lynx-js/offscreen-document": "0.1.4"
|