接入原生壳分享卡图片导出
新增 file.exportImage 宿主能力契约 分享卡下载在原生壳中优先走宿主图片导出 Expo 壳写入缓存图片并调用系统分享保存 Tauri 壳通过保存对话框写入图片字节 补齐能力漂移检查、测试和架构文档
This commit is contained in:
@@ -24,6 +24,7 @@ export const HOST_BRIDGE_METHODS = [
|
||||
'app.setTitle',
|
||||
'clipboard.writeText',
|
||||
'file.exportText',
|
||||
'file.exportImage',
|
||||
'haptics.impact',
|
||||
] as const;
|
||||
|
||||
@@ -171,6 +172,18 @@ export type FileExportTextResult = {
|
||||
bytes: number;
|
||||
};
|
||||
|
||||
export type FileExportImagePayload = {
|
||||
fileName: string;
|
||||
base64Data: string;
|
||||
mimeType: 'image/png' | 'image/jpeg' | 'image/webp';
|
||||
};
|
||||
|
||||
export type FileExportImageResult = {
|
||||
action: 'saved';
|
||||
fileName: string;
|
||||
bytes: number;
|
||||
};
|
||||
|
||||
export type HapticsImpactPayload = {
|
||||
style?: 'light' | 'medium' | 'heavy';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user