@lingxia/bridge 0.10.0 → 0.12.0
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/dist/bridge-runtime.es2020.js +1 -1
- package/dist/bridge-runtime.es5.js +1 -1
- package/dist/es2020/bridge.js +200 -20
- package/dist/es2020/index.js +1 -0
- package/dist/es2020/runtime-env.js +81 -0
- package/dist/es2020/ui/action-sheet.js +2 -2
- package/dist/es2020/ui/toast.js +27 -6
- package/dist/es5/bridge.js +205 -25
- package/dist/es5/index.js +1 -0
- package/dist/es5/runtime-env.js +131 -0
- package/dist/es5/ui/action-sheet.js +2 -2
- package/dist/es5/ui/toast.js +27 -6
- package/dist/index.d.ts +1 -0
- package/dist/runtime-env.d.ts +6 -0
- package/dist/types.d.ts +13 -0
- package/package.json +4 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export interface BridgeConfig {
|
|
2
2
|
os?: 'Harmony' | 'iOS' | 'Android' | 'macOS' | 'Windows';
|
|
3
|
+
/** Effective host display language; distinct from the raw system locale. */
|
|
4
|
+
displayLanguage?: string;
|
|
3
5
|
nonce?: string;
|
|
4
6
|
appleDownstreamURL?: string;
|
|
7
|
+
dev?: boolean;
|
|
8
|
+
runner?: boolean;
|
|
5
9
|
}
|
|
6
10
|
export interface RuntimeConfig {
|
|
7
11
|
error?: ErrorInfo;
|
|
@@ -113,6 +117,13 @@ export interface NativeChannel<TIn = unknown, TOut = unknown> {
|
|
|
113
117
|
declare global {
|
|
114
118
|
interface Window {
|
|
115
119
|
__LX_BRIDGE_CFG?: BridgeConfig;
|
|
120
|
+
/** Host push for a display language changed while the page is open. */
|
|
121
|
+
__lingxiaApplyDisplayLanguage?: (language: string) => void;
|
|
122
|
+
/** Shared by every copy of the bridge module in this document. */
|
|
123
|
+
__lxDisplayLanguage?: {
|
|
124
|
+
value: string;
|
|
125
|
+
listeners: Set<() => void>;
|
|
126
|
+
};
|
|
116
127
|
__LX_BRIDGE_INIT_STATE?: 'initializing' | 'initialized';
|
|
117
128
|
__LX_RUNTIME_CONFIG?: RuntimeConfig;
|
|
118
129
|
__pageBridge?: {
|
|
@@ -161,6 +172,8 @@ export interface LingXiaBridgeInterface {
|
|
|
161
172
|
isMacOS(): boolean;
|
|
162
173
|
isWindows(): boolean;
|
|
163
174
|
isDesktop(): boolean;
|
|
175
|
+
isApple(): boolean;
|
|
176
|
+
isRunner(): boolean;
|
|
164
177
|
getOS(): string;
|
|
165
178
|
};
|
|
166
179
|
dom: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxia/bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "LingXia Web Runtime - Bridge, boot, and error handling for WebView",
|
|
6
6
|
"repository": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"prepublishOnly": "npm run build"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"rolldown": "^1.
|
|
48
|
-
"terser": "^5.
|
|
49
|
-
"tslib": "^2.
|
|
47
|
+
"rolldown": "^1.2.4",
|
|
48
|
+
"terser": "^5.50.0",
|
|
49
|
+
"tslib": "^2.8.1",
|
|
50
50
|
"typescript": "^5.3.0"
|
|
51
51
|
},
|
|
52
52
|
"files": [
|