@lynx-js/web-constants 0.12.0 → 0.13.1
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 +35 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +4 -0
- package/dist/endpoints.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/Cloneable.d.ts +2 -2
- package/dist/types/PageConfig.d.ts +3 -0
- package/dist/types/StyleInfo.d.ts +3 -1
- package/dist/utils/LynxCrossThreadContext.d.ts +13 -0
- package/dist/utils/LynxCrossThreadContext.js +24 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @lynx-js/web-constants
|
|
2
2
|
|
|
3
|
+
## 0.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: support touch events for MTS ([#641](https://github.com/lynx-family/lynx-stack/pull/641))
|
|
8
|
+
|
|
9
|
+
now we support
|
|
10
|
+
|
|
11
|
+
- main-thread:bindtouchstart
|
|
12
|
+
- main-thread:bindtouchend
|
|
13
|
+
- main-thread:bindtouchmove
|
|
14
|
+
- main-thread:bindtouchcancel
|
|
15
|
+
|
|
16
|
+
- Updated dependencies []:
|
|
17
|
+
- @lynx-js/web-worker-rpc@0.13.1
|
|
18
|
+
|
|
19
|
+
## 0.13.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- refactor: isolate SystemInfo ([#628](https://github.com/lynx-family/lynx-stack/pull/628))
|
|
24
|
+
|
|
25
|
+
Never assign `SystemInfo` on worker's self object.
|
|
26
|
+
|
|
27
|
+
- refactor: move mainthread impl into mainthread-api packages ([#622](https://github.com/lynx-family/lynx-stack/pull/622))
|
|
28
|
+
|
|
29
|
+
- fix(web): css selector not work for selectors with combinator and pseudo-class on WEB ([#608](https://github.com/lynx-family/lynx-stack/pull/608))
|
|
30
|
+
|
|
31
|
+
like `.parent > :not([hidden]) ~ :not([hidden])`
|
|
32
|
+
|
|
33
|
+
you will need to upgrade your `react-rsbuild-plugin` to fix this issue
|
|
34
|
+
|
|
35
|
+
- Updated dependencies []:
|
|
36
|
+
- @lynx-js/web-worker-rpc@0.13.0
|
|
37
|
+
|
|
3
38
|
## 0.12.0
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/dist/constants.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare const lynxDefaultDisplayLinearAttribute: "lynx-default-display-li
|
|
|
6
6
|
export declare const lynxDefaultOverflowVisibleAttribute: "lynx-default-overflow-visible";
|
|
7
7
|
export declare const __lynx_timing_flag: "__lynx_timing_flag";
|
|
8
8
|
export declare const globalMuteableVars: readonly ["registerDataProcessor", "registerWorkletInternal", "lynxWorkletImpl", "runWorklet"];
|
|
9
|
+
export declare const systemInfo: Record<string, string | number>;
|
package/dist/constants.js
CHANGED
package/dist/endpoints.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { LynxTemplate } from './types/LynxModule.js';
|
|
|
6
6
|
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
|
+
import type { BrowserConfig } from './types/PageConfig.js';
|
|
9
10
|
export declare const postExposureEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[{
|
|
10
11
|
exposures: ExposureWorkerEvent[];
|
|
11
12
|
disExposures: ExposureWorkerEvent[];
|
|
@@ -30,6 +31,7 @@ export declare const BackgroundThreadStartEndpoint: import("@lynx-js/web-worker-
|
|
|
30
31
|
customSections: Record<string, Cloneable>;
|
|
31
32
|
nativeModulesMap: NativeModulesMap;
|
|
32
33
|
napiModulesMap: NapiModulesMap;
|
|
34
|
+
browserConfig: BrowserConfig;
|
|
33
35
|
}], void>;
|
|
34
36
|
/**
|
|
35
37
|
* Error message, info
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type Cloneable<T = string | number | null | undefined> = T | Record<string, T> | T[];
|
|
2
|
-
export type CloneableObject<T = string | number | null | undefined> = Record<string, T>;
|
|
1
|
+
export type Cloneable<T = string | number | null | boolean | undefined> = T | Record<string, T> | T[];
|
|
2
|
+
export type CloneableObject<T = string | number | null | boolean | undefined> = Record<string, T | T[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { dispatchCoreContextOnBackgroundEndpoint, Rpc } from '../index.js';
|
|
2
|
+
import { type LynxContextEventTarget } from '../types/LynxContextEventTarget.js';
|
|
3
|
+
export declare class LynxCrossThreadContext extends EventTarget implements LynxContextEventTarget {
|
|
4
|
+
private _config;
|
|
5
|
+
constructor(_config: {
|
|
6
|
+
rpc: Rpc;
|
|
7
|
+
receiveEventEndpoint: typeof dispatchCoreContextOnBackgroundEndpoint;
|
|
8
|
+
sendEventEndpoint: typeof dispatchCoreContextOnBackgroundEndpoint;
|
|
9
|
+
});
|
|
10
|
+
postMessage(...args: any[]): void;
|
|
11
|
+
dispatchEvent(event: ContextCrossThreadEvent): 3;
|
|
12
|
+
__start(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DispatchEventResult, } from '../types/LynxContextEventTarget.js';
|
|
2
|
+
export class LynxCrossThreadContext extends EventTarget {
|
|
3
|
+
_config;
|
|
4
|
+
constructor(_config) {
|
|
5
|
+
super();
|
|
6
|
+
this._config = _config;
|
|
7
|
+
}
|
|
8
|
+
postMessage(...args) {
|
|
9
|
+
console.error('[lynx-web] postMessage not implemented, args:', ...args);
|
|
10
|
+
}
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
dispatchEvent(event) {
|
|
13
|
+
const { rpc, sendEventEndpoint } = this._config;
|
|
14
|
+
rpc.invoke(sendEventEndpoint, [event]);
|
|
15
|
+
return DispatchEventResult.CanceledBeforeDispatch;
|
|
16
|
+
}
|
|
17
|
+
__start() {
|
|
18
|
+
const { rpc, receiveEventEndpoint } = this._config;
|
|
19
|
+
rpc.registerHandler(receiveEventEndpoint, ({ type, data }) => {
|
|
20
|
+
super.dispatchEvent(new MessageEvent(type, { data: data ?? {} }));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=LynxCrossThreadContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LynxCrossThreadContext } from './LynxCrossThreadContext.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-constants",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
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.
|
|
26
|
+
"@lynx-js/web-worker-rpc": "0.13.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@lynx-js/offscreen-document": "0.0.
|
|
29
|
+
"@lynx-js/offscreen-document": "0.0.2"
|
|
30
30
|
}
|
|
31
31
|
}
|