sa2kit 3.8.0 → 3.9.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/dist/chunk-FV7IHC23.js +751 -0
- package/dist/chunk-FV7IHC23.js.map +1 -0
- package/dist/chunk-OOVINE7M.mjs +715 -0
- package/dist/chunk-OOVINE7M.mjs.map +1 -0
- package/dist/common/appLauncher/index.d.mts +32 -0
- package/dist/common/appLauncher/index.d.ts +32 -0
- package/dist/common/appLauncher/index.js +149 -0
- package/dist/common/appLauncher/index.js.map +1 -0
- package/dist/common/appLauncher/index.mjs +4 -0
- package/dist/common/appLauncher/index.mjs.map +1 -0
- package/dist/common/appLauncher/rn/index.d.mts +35 -0
- package/dist/common/appLauncher/rn/index.d.ts +35 -0
- package/dist/common/appLauncher/rn/index.js +100 -0
- package/dist/common/appLauncher/rn/index.js.map +1 -0
- package/dist/common/appLauncher/rn/index.mjs +31 -0
- package/dist/common/appLauncher/rn/index.mjs.map +1 -0
- package/dist/index-BHgDdlJW.d.mts +177 -0
- package/dist/index-BHgDdlJW.d.ts +177 -0
- package/package.json +11 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/** 支持的第三方 App 提供方 */
|
|
2
|
+
type AppProviderId = 'amap' | 'baidu' | 'google' | 'wechat' | 'qq' | 'generic';
|
|
3
|
+
/** 运行平台 */
|
|
4
|
+
type AppLaunchPlatform = 'web' | 'rn';
|
|
5
|
+
/** 唤起结果状态 */
|
|
6
|
+
type AppLaunchStatus = 'opened' | 'fallback' | 'unavailable' | 'cancelled' | 'timeout';
|
|
7
|
+
type AppLaunchUrls = {
|
|
8
|
+
/** 优先尝试的 scheme / URI */
|
|
9
|
+
primary: string;
|
|
10
|
+
/** 无法唤起 App 时的降级链接(通常为 https://uri.* 网页版) */
|
|
11
|
+
fallback?: string;
|
|
12
|
+
};
|
|
13
|
+
type AppLaunchResult = {
|
|
14
|
+
provider: AppProviderId;
|
|
15
|
+
action: string;
|
|
16
|
+
status: AppLaunchStatus;
|
|
17
|
+
url: string;
|
|
18
|
+
platform: AppLaunchPlatform;
|
|
19
|
+
data?: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
declare class AppLaunchError extends Error {
|
|
22
|
+
readonly code: 'UNKNOWN_PROVIDER' | 'UNKNOWN_ACTION' | 'INVALID_PARAMS' | 'ADAPTER_MISSING' | 'OPEN_FAILED';
|
|
23
|
+
readonly details?: Record<string, unknown>;
|
|
24
|
+
constructor(code: AppLaunchError['code'], message: string, details?: Record<string, unknown>);
|
|
25
|
+
}
|
|
26
|
+
type AppReturnPayload = {
|
|
27
|
+
provider?: AppProviderId;
|
|
28
|
+
action?: string;
|
|
29
|
+
url: string;
|
|
30
|
+
params: Record<string, string>;
|
|
31
|
+
raw?: unknown;
|
|
32
|
+
};
|
|
33
|
+
type AppLaunchCallbacks = {
|
|
34
|
+
/** 已成功尝试唤起(Web 端通过页面隐藏等方式推断) */
|
|
35
|
+
onOpened?: (result: AppLaunchResult) => void;
|
|
36
|
+
/** 使用了 fallback 链接 */
|
|
37
|
+
onFallback?: (result: AppLaunchResult) => void;
|
|
38
|
+
/** 无法唤起目标 App */
|
|
39
|
+
onUnavailable?: (result: AppLaunchResult) => void;
|
|
40
|
+
/** 第三方 App 通过 returnUrl / deep link 回传 */
|
|
41
|
+
onReturn?: (payload: AppReturnPayload) => void;
|
|
42
|
+
/** 任意错误 */
|
|
43
|
+
onError?: (error: AppLaunchError) => void;
|
|
44
|
+
};
|
|
45
|
+
type AppLaunchOptions = {
|
|
46
|
+
/** 第三方统计用的来源应用名,如 profile-v1 */
|
|
47
|
+
sourceApplication?: string;
|
|
48
|
+
/** 自定义 fallback,覆盖 provider 默认值 */
|
|
49
|
+
fallbackUrl?: string;
|
|
50
|
+
/** 回跳地址(如 myapp://launch/callback),供宿主监听 */
|
|
51
|
+
returnUrl?: string;
|
|
52
|
+
/** Web 端等待 App 唤起的超时(毫秒) */
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
};
|
|
55
|
+
type AppLaunchRequest = {
|
|
56
|
+
provider: AppProviderId;
|
|
57
|
+
action: string;
|
|
58
|
+
params?: Record<string, unknown>;
|
|
59
|
+
options?: AppLaunchOptions;
|
|
60
|
+
callbacks?: AppLaunchCallbacks;
|
|
61
|
+
/** 单次调用可覆盖全局 adapter */
|
|
62
|
+
adapter?: AppLaunchAdapter;
|
|
63
|
+
};
|
|
64
|
+
type LaunchExecutionOptions = {
|
|
65
|
+
timeoutMs: number;
|
|
66
|
+
callbacks?: AppLaunchCallbacks;
|
|
67
|
+
provider: AppProviderId;
|
|
68
|
+
action: string;
|
|
69
|
+
};
|
|
70
|
+
/** 平台适配器:负责实际 openURL 与结果推断 */
|
|
71
|
+
type AppLaunchAdapter = {
|
|
72
|
+
platform: AppLaunchPlatform;
|
|
73
|
+
launch(urls: AppLaunchUrls, options: LaunchExecutionOptions): Promise<AppLaunchResult>;
|
|
74
|
+
canOpen?(url: string): Promise<boolean>;
|
|
75
|
+
};
|
|
76
|
+
type AppLauncherConfig = {
|
|
77
|
+
sourceApplication: string;
|
|
78
|
+
adapter?: AppLaunchAdapter;
|
|
79
|
+
defaultOptions?: AppLaunchOptions;
|
|
80
|
+
defaultCallbacks?: AppLaunchCallbacks;
|
|
81
|
+
};
|
|
82
|
+
type AppLaunchProviderContext = {
|
|
83
|
+
sourceApplication: string;
|
|
84
|
+
options: AppLaunchOptions;
|
|
85
|
+
};
|
|
86
|
+
/** 各子功能(高德/微信/QQ 等)的统一契约 */
|
|
87
|
+
type AppLaunchProvider = {
|
|
88
|
+
id: AppProviderId;
|
|
89
|
+
actions: readonly string[];
|
|
90
|
+
buildUrls(action: string, params: Record<string, unknown>, context: AppLaunchProviderContext): AppLaunchUrls;
|
|
91
|
+
validateParams?(action: string, params: Record<string, unknown>): void;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** RN Linking 最小能力面,避免硬依赖 react-native */
|
|
95
|
+
type RnLinkingLike = {
|
|
96
|
+
canOpenURL(url: string): Promise<boolean>;
|
|
97
|
+
openURL(url: string): Promise<void>;
|
|
98
|
+
addEventListener?: (type: 'url', handler: (event: {
|
|
99
|
+
url: string;
|
|
100
|
+
}) => void) => void;
|
|
101
|
+
removeEventListener?: (type: 'url', handler: (event: {
|
|
102
|
+
url: string;
|
|
103
|
+
}) => void) => void;
|
|
104
|
+
getInitialURL?: () => Promise<string | null>;
|
|
105
|
+
};
|
|
106
|
+
declare function createRnAppLaunchAdapter(linking: RnLinkingLike): AppLaunchAdapter;
|
|
107
|
+
/**
|
|
108
|
+
* 在已安装 react-native 的宿主中快捷创建 adapter。
|
|
109
|
+
* 若未安装 react-native 将抛出明确错误。
|
|
110
|
+
*/
|
|
111
|
+
declare function createRnAppLaunchAdapterFromReactNative(): AppLaunchAdapter;
|
|
112
|
+
|
|
113
|
+
declare function configureAppLauncher(patch: Partial<AppLauncherConfig>): AppLauncherConfig;
|
|
114
|
+
declare function getAppLauncherConfig(): AppLauncherConfig;
|
|
115
|
+
declare function resetAppLauncherConfig(): void;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 统一唤起入口:按 provider + action 构建 scheme,经平台 adapter 拉起第三方 App。
|
|
119
|
+
*/
|
|
120
|
+
declare function launchApp(request: AppLaunchRequest): Promise<AppLaunchResult>;
|
|
121
|
+
|
|
122
|
+
declare function parseReturnUrl(url: string): AppReturnPayload;
|
|
123
|
+
type ReturnListener = (payload: AppReturnPayload) => void;
|
|
124
|
+
/** 宿主 App 在收到 deep link 回跳时调用,分发给 onReturn 订阅者 */
|
|
125
|
+
declare function notifyAppReturn(payload: AppReturnPayload): void;
|
|
126
|
+
declare function subscribeAppReturn(listener: ReturnListener): () => void;
|
|
127
|
+
declare function matchesReturnUrl(incomingUrl: string, expectedReturnUrl?: string): boolean;
|
|
128
|
+
|
|
129
|
+
declare function registerAppProvider(provider: AppLaunchProvider): void;
|
|
130
|
+
declare function getAppProvider(id: AppProviderId): AppLaunchProvider | undefined;
|
|
131
|
+
declare function listAppProviders(): AppProviderId[];
|
|
132
|
+
|
|
133
|
+
/** 地图导航提供方(关键词导航场景) */
|
|
134
|
+
type MapNavigationProviderId = 'amap' | 'baidu' | 'google';
|
|
135
|
+
type MapNavigationOption = {
|
|
136
|
+
id: MapNavigationProviderId;
|
|
137
|
+
label: string;
|
|
138
|
+
description?: string;
|
|
139
|
+
};
|
|
140
|
+
declare const MAP_NAVIGATION_OPTIONS: readonly MapNavigationOption[];
|
|
141
|
+
type MapNavigationOptions = AppLaunchOptions & {
|
|
142
|
+
callbacks?: AppLaunchCallbacks;
|
|
143
|
+
};
|
|
144
|
+
declare function launchMapNavigation(provider: MapNavigationProviderId, destination: string, options?: MapNavigationOptions): Promise<AppLaunchResult>;
|
|
145
|
+
/** 同步唤起,结果通过 callbacks 回传 */
|
|
146
|
+
declare function openMapNavigation(provider: MapNavigationProviderId, destination: string, options?: MapNavigationOptions): void;
|
|
147
|
+
|
|
148
|
+
type AmapNavigationOptions = AppLaunchOptions & {
|
|
149
|
+
callbacks?: AppLaunchCallbacks;
|
|
150
|
+
};
|
|
151
|
+
/** 高德关键词导航(日历等场景:仅地点文本) */
|
|
152
|
+
declare function launchAmapNavigation(destination: string, options?: AmapNavigationOptions): Promise<AppLaunchResult>;
|
|
153
|
+
/** 兼容同步调用:不阻塞 UI,结果通过 callbacks 回传 */
|
|
154
|
+
declare function openAmapNavigation(destination: string, options?: AmapNavigationOptions): void;
|
|
155
|
+
|
|
156
|
+
type WechatShareOptions = AppLaunchOptions & {
|
|
157
|
+
callbacks?: AppLaunchCallbacks;
|
|
158
|
+
title: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
url: string;
|
|
161
|
+
thumbUrl?: string;
|
|
162
|
+
};
|
|
163
|
+
declare function launchWechatShare(options: WechatShareOptions): Promise<AppLaunchResult>;
|
|
164
|
+
type QqShareOptions = AppLaunchOptions & {
|
|
165
|
+
callbacks?: AppLaunchCallbacks;
|
|
166
|
+
title: string;
|
|
167
|
+
summary?: string;
|
|
168
|
+
url: string;
|
|
169
|
+
imageUrl?: string;
|
|
170
|
+
};
|
|
171
|
+
declare function launchQqShare(options: QqShareOptions): Promise<AppLaunchResult>;
|
|
172
|
+
declare function launchGenericUrl(url: string, options?: AppLaunchOptions & {
|
|
173
|
+
callbacks?: AppLaunchCallbacks;
|
|
174
|
+
fallback?: string;
|
|
175
|
+
}): Promise<AppLaunchResult>;
|
|
176
|
+
|
|
177
|
+
export { type AppReturnPayload as A, type AppLaunchPlatform as B, type AppLaunchRequest as C, type AppLaunchStatus as D, type AppLaunchUrls as E, type AppLauncherConfig as F, type AppProviderId as G, AppLaunchError as H, type AmapNavigationOptions as I, type MapNavigationOption as J, type MapNavigationOptions as K, type LaunchExecutionOptions as L, MAP_NAVIGATION_OPTIONS as M, type QqShareOptions as Q, type RnLinkingLike as R, type WechatShareOptions as W, createRnAppLaunchAdapter as a, createRnAppLaunchAdapterFromReactNative as b, configureAppLauncher as c, launchAmapNavigation as d, launchGenericUrl as e, launchQqShare as f, getAppLauncherConfig as g, launchWechatShare as h, launchMapNavigation as i, type AppLaunchCallbacks as j, type AppLaunchOptions as k, launchApp as l, matchesReturnUrl as m, notifyAppReturn as n, openMapNavigation as o, parseReturnUrl as p, type AppLaunchResult as q, registerAppProvider as r, subscribeAppReturn as s, type MapNavigationProviderId as t, type AppLaunchAdapter as u, type AppLaunchProvider as v, resetAppLauncherConfig as w, getAppProvider as x, listAppProviders as y, openAmapNavigation as z };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/** 支持的第三方 App 提供方 */
|
|
2
|
+
type AppProviderId = 'amap' | 'baidu' | 'google' | 'wechat' | 'qq' | 'generic';
|
|
3
|
+
/** 运行平台 */
|
|
4
|
+
type AppLaunchPlatform = 'web' | 'rn';
|
|
5
|
+
/** 唤起结果状态 */
|
|
6
|
+
type AppLaunchStatus = 'opened' | 'fallback' | 'unavailable' | 'cancelled' | 'timeout';
|
|
7
|
+
type AppLaunchUrls = {
|
|
8
|
+
/** 优先尝试的 scheme / URI */
|
|
9
|
+
primary: string;
|
|
10
|
+
/** 无法唤起 App 时的降级链接(通常为 https://uri.* 网页版) */
|
|
11
|
+
fallback?: string;
|
|
12
|
+
};
|
|
13
|
+
type AppLaunchResult = {
|
|
14
|
+
provider: AppProviderId;
|
|
15
|
+
action: string;
|
|
16
|
+
status: AppLaunchStatus;
|
|
17
|
+
url: string;
|
|
18
|
+
platform: AppLaunchPlatform;
|
|
19
|
+
data?: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
declare class AppLaunchError extends Error {
|
|
22
|
+
readonly code: 'UNKNOWN_PROVIDER' | 'UNKNOWN_ACTION' | 'INVALID_PARAMS' | 'ADAPTER_MISSING' | 'OPEN_FAILED';
|
|
23
|
+
readonly details?: Record<string, unknown>;
|
|
24
|
+
constructor(code: AppLaunchError['code'], message: string, details?: Record<string, unknown>);
|
|
25
|
+
}
|
|
26
|
+
type AppReturnPayload = {
|
|
27
|
+
provider?: AppProviderId;
|
|
28
|
+
action?: string;
|
|
29
|
+
url: string;
|
|
30
|
+
params: Record<string, string>;
|
|
31
|
+
raw?: unknown;
|
|
32
|
+
};
|
|
33
|
+
type AppLaunchCallbacks = {
|
|
34
|
+
/** 已成功尝试唤起(Web 端通过页面隐藏等方式推断) */
|
|
35
|
+
onOpened?: (result: AppLaunchResult) => void;
|
|
36
|
+
/** 使用了 fallback 链接 */
|
|
37
|
+
onFallback?: (result: AppLaunchResult) => void;
|
|
38
|
+
/** 无法唤起目标 App */
|
|
39
|
+
onUnavailable?: (result: AppLaunchResult) => void;
|
|
40
|
+
/** 第三方 App 通过 returnUrl / deep link 回传 */
|
|
41
|
+
onReturn?: (payload: AppReturnPayload) => void;
|
|
42
|
+
/** 任意错误 */
|
|
43
|
+
onError?: (error: AppLaunchError) => void;
|
|
44
|
+
};
|
|
45
|
+
type AppLaunchOptions = {
|
|
46
|
+
/** 第三方统计用的来源应用名,如 profile-v1 */
|
|
47
|
+
sourceApplication?: string;
|
|
48
|
+
/** 自定义 fallback,覆盖 provider 默认值 */
|
|
49
|
+
fallbackUrl?: string;
|
|
50
|
+
/** 回跳地址(如 myapp://launch/callback),供宿主监听 */
|
|
51
|
+
returnUrl?: string;
|
|
52
|
+
/** Web 端等待 App 唤起的超时(毫秒) */
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
};
|
|
55
|
+
type AppLaunchRequest = {
|
|
56
|
+
provider: AppProviderId;
|
|
57
|
+
action: string;
|
|
58
|
+
params?: Record<string, unknown>;
|
|
59
|
+
options?: AppLaunchOptions;
|
|
60
|
+
callbacks?: AppLaunchCallbacks;
|
|
61
|
+
/** 单次调用可覆盖全局 adapter */
|
|
62
|
+
adapter?: AppLaunchAdapter;
|
|
63
|
+
};
|
|
64
|
+
type LaunchExecutionOptions = {
|
|
65
|
+
timeoutMs: number;
|
|
66
|
+
callbacks?: AppLaunchCallbacks;
|
|
67
|
+
provider: AppProviderId;
|
|
68
|
+
action: string;
|
|
69
|
+
};
|
|
70
|
+
/** 平台适配器:负责实际 openURL 与结果推断 */
|
|
71
|
+
type AppLaunchAdapter = {
|
|
72
|
+
platform: AppLaunchPlatform;
|
|
73
|
+
launch(urls: AppLaunchUrls, options: LaunchExecutionOptions): Promise<AppLaunchResult>;
|
|
74
|
+
canOpen?(url: string): Promise<boolean>;
|
|
75
|
+
};
|
|
76
|
+
type AppLauncherConfig = {
|
|
77
|
+
sourceApplication: string;
|
|
78
|
+
adapter?: AppLaunchAdapter;
|
|
79
|
+
defaultOptions?: AppLaunchOptions;
|
|
80
|
+
defaultCallbacks?: AppLaunchCallbacks;
|
|
81
|
+
};
|
|
82
|
+
type AppLaunchProviderContext = {
|
|
83
|
+
sourceApplication: string;
|
|
84
|
+
options: AppLaunchOptions;
|
|
85
|
+
};
|
|
86
|
+
/** 各子功能(高德/微信/QQ 等)的统一契约 */
|
|
87
|
+
type AppLaunchProvider = {
|
|
88
|
+
id: AppProviderId;
|
|
89
|
+
actions: readonly string[];
|
|
90
|
+
buildUrls(action: string, params: Record<string, unknown>, context: AppLaunchProviderContext): AppLaunchUrls;
|
|
91
|
+
validateParams?(action: string, params: Record<string, unknown>): void;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** RN Linking 最小能力面,避免硬依赖 react-native */
|
|
95
|
+
type RnLinkingLike = {
|
|
96
|
+
canOpenURL(url: string): Promise<boolean>;
|
|
97
|
+
openURL(url: string): Promise<void>;
|
|
98
|
+
addEventListener?: (type: 'url', handler: (event: {
|
|
99
|
+
url: string;
|
|
100
|
+
}) => void) => void;
|
|
101
|
+
removeEventListener?: (type: 'url', handler: (event: {
|
|
102
|
+
url: string;
|
|
103
|
+
}) => void) => void;
|
|
104
|
+
getInitialURL?: () => Promise<string | null>;
|
|
105
|
+
};
|
|
106
|
+
declare function createRnAppLaunchAdapter(linking: RnLinkingLike): AppLaunchAdapter;
|
|
107
|
+
/**
|
|
108
|
+
* 在已安装 react-native 的宿主中快捷创建 adapter。
|
|
109
|
+
* 若未安装 react-native 将抛出明确错误。
|
|
110
|
+
*/
|
|
111
|
+
declare function createRnAppLaunchAdapterFromReactNative(): AppLaunchAdapter;
|
|
112
|
+
|
|
113
|
+
declare function configureAppLauncher(patch: Partial<AppLauncherConfig>): AppLauncherConfig;
|
|
114
|
+
declare function getAppLauncherConfig(): AppLauncherConfig;
|
|
115
|
+
declare function resetAppLauncherConfig(): void;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 统一唤起入口:按 provider + action 构建 scheme,经平台 adapter 拉起第三方 App。
|
|
119
|
+
*/
|
|
120
|
+
declare function launchApp(request: AppLaunchRequest): Promise<AppLaunchResult>;
|
|
121
|
+
|
|
122
|
+
declare function parseReturnUrl(url: string): AppReturnPayload;
|
|
123
|
+
type ReturnListener = (payload: AppReturnPayload) => void;
|
|
124
|
+
/** 宿主 App 在收到 deep link 回跳时调用,分发给 onReturn 订阅者 */
|
|
125
|
+
declare function notifyAppReturn(payload: AppReturnPayload): void;
|
|
126
|
+
declare function subscribeAppReturn(listener: ReturnListener): () => void;
|
|
127
|
+
declare function matchesReturnUrl(incomingUrl: string, expectedReturnUrl?: string): boolean;
|
|
128
|
+
|
|
129
|
+
declare function registerAppProvider(provider: AppLaunchProvider): void;
|
|
130
|
+
declare function getAppProvider(id: AppProviderId): AppLaunchProvider | undefined;
|
|
131
|
+
declare function listAppProviders(): AppProviderId[];
|
|
132
|
+
|
|
133
|
+
/** 地图导航提供方(关键词导航场景) */
|
|
134
|
+
type MapNavigationProviderId = 'amap' | 'baidu' | 'google';
|
|
135
|
+
type MapNavigationOption = {
|
|
136
|
+
id: MapNavigationProviderId;
|
|
137
|
+
label: string;
|
|
138
|
+
description?: string;
|
|
139
|
+
};
|
|
140
|
+
declare const MAP_NAVIGATION_OPTIONS: readonly MapNavigationOption[];
|
|
141
|
+
type MapNavigationOptions = AppLaunchOptions & {
|
|
142
|
+
callbacks?: AppLaunchCallbacks;
|
|
143
|
+
};
|
|
144
|
+
declare function launchMapNavigation(provider: MapNavigationProviderId, destination: string, options?: MapNavigationOptions): Promise<AppLaunchResult>;
|
|
145
|
+
/** 同步唤起,结果通过 callbacks 回传 */
|
|
146
|
+
declare function openMapNavigation(provider: MapNavigationProviderId, destination: string, options?: MapNavigationOptions): void;
|
|
147
|
+
|
|
148
|
+
type AmapNavigationOptions = AppLaunchOptions & {
|
|
149
|
+
callbacks?: AppLaunchCallbacks;
|
|
150
|
+
};
|
|
151
|
+
/** 高德关键词导航(日历等场景:仅地点文本) */
|
|
152
|
+
declare function launchAmapNavigation(destination: string, options?: AmapNavigationOptions): Promise<AppLaunchResult>;
|
|
153
|
+
/** 兼容同步调用:不阻塞 UI,结果通过 callbacks 回传 */
|
|
154
|
+
declare function openAmapNavigation(destination: string, options?: AmapNavigationOptions): void;
|
|
155
|
+
|
|
156
|
+
type WechatShareOptions = AppLaunchOptions & {
|
|
157
|
+
callbacks?: AppLaunchCallbacks;
|
|
158
|
+
title: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
url: string;
|
|
161
|
+
thumbUrl?: string;
|
|
162
|
+
};
|
|
163
|
+
declare function launchWechatShare(options: WechatShareOptions): Promise<AppLaunchResult>;
|
|
164
|
+
type QqShareOptions = AppLaunchOptions & {
|
|
165
|
+
callbacks?: AppLaunchCallbacks;
|
|
166
|
+
title: string;
|
|
167
|
+
summary?: string;
|
|
168
|
+
url: string;
|
|
169
|
+
imageUrl?: string;
|
|
170
|
+
};
|
|
171
|
+
declare function launchQqShare(options: QqShareOptions): Promise<AppLaunchResult>;
|
|
172
|
+
declare function launchGenericUrl(url: string, options?: AppLaunchOptions & {
|
|
173
|
+
callbacks?: AppLaunchCallbacks;
|
|
174
|
+
fallback?: string;
|
|
175
|
+
}): Promise<AppLaunchResult>;
|
|
176
|
+
|
|
177
|
+
export { type AppReturnPayload as A, type AppLaunchPlatform as B, type AppLaunchRequest as C, type AppLaunchStatus as D, type AppLaunchUrls as E, type AppLauncherConfig as F, type AppProviderId as G, AppLaunchError as H, type AmapNavigationOptions as I, type MapNavigationOption as J, type MapNavigationOptions as K, type LaunchExecutionOptions as L, MAP_NAVIGATION_OPTIONS as M, type QqShareOptions as Q, type RnLinkingLike as R, type WechatShareOptions as W, createRnAppLaunchAdapter as a, createRnAppLaunchAdapterFromReactNative as b, configureAppLauncher as c, launchAmapNavigation as d, launchGenericUrl as e, launchQqShare as f, getAppLauncherConfig as g, launchWechatShare as h, launchMapNavigation as i, type AppLaunchCallbacks as j, type AppLaunchOptions as k, launchApp as l, matchesReturnUrl as m, notifyAppReturn as n, openMapNavigation as o, parseReturnUrl as p, type AppLaunchResult as q, registerAppProvider as r, subscribeAppReturn as s, type MapNavigationProviderId as t, type AppLaunchAdapter as u, type AppLaunchProvider as v, resetAppLauncherConfig as w, getAppProvider as x, listAppProviders as y, openAmapNavigation as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sa2kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "SA2Kit 2.0 — common API 稳定;business 实验田模块逐步迁出 profile-v1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -309,6 +309,16 @@
|
|
|
309
309
|
"import": "./dist/common/api/index.mjs",
|
|
310
310
|
"require": "./dist/common/api/index.js"
|
|
311
311
|
},
|
|
312
|
+
"./common/appLauncher": {
|
|
313
|
+
"types": "./dist/common/appLauncher/index.d.ts",
|
|
314
|
+
"import": "./dist/common/appLauncher/index.mjs",
|
|
315
|
+
"require": "./dist/common/appLauncher/index.js"
|
|
316
|
+
},
|
|
317
|
+
"./common/appLauncher/rn": {
|
|
318
|
+
"types": "./dist/common/appLauncher/rn/index.d.ts",
|
|
319
|
+
"import": "./dist/common/appLauncher/rn/index.mjs",
|
|
320
|
+
"require": "./dist/common/appLauncher/rn/index.js"
|
|
321
|
+
},
|
|
312
322
|
"./common/auth/client": {
|
|
313
323
|
"types": "./dist/common/auth/client/index.d.ts",
|
|
314
324
|
"import": "./dist/common/auth/client/index.mjs",
|