收口原生剪贴板桥接边界

将 Expo 剪贴板 HostBridge 读写收口到 clipboard 模块

将 Tauri 剪贴板 HostBridge 响应收口到 clipboard 模块

同步原生壳结构门禁、架构文档和共享记忆
This commit is contained in:
2026-06-19 22:18:54 +08:00
parent c0940bc790
commit 1d6fda4696
9 changed files with 127 additions and 57 deletions
+26 -3
View File
@@ -1719,6 +1719,30 @@ for (const snippet of [
}
}
if (
!desktopHostBridgeDispatchSource.includes(
'write_desktop_host_bridge_clipboard_text(&app, &request)',
) ||
!desktopHostBridgeDispatchSource.includes(
'read_desktop_host_bridge_clipboard_text(&app, &request)',
) ||
desktopHostBridgeDispatchSource.includes('required_string_payload(&request, "text")') ||
desktopHostBridgeDispatchSource.includes('read_desktop_clipboard_text(&app)')
) {
throw new Error('desktop shell clipboard HostBridge methods must delegate to clipboard module');
}
for (const snippet of [
'write_desktop_clipboard_text(app, text)',
'read_desktop_clipboard_text(app)',
'normalize_clipboard_text(&text)',
'required_string_payload(request, "text")',
'"text": text',
]) {
if (!desktopHostBridgeClipboardSource.includes(snippet)) {
throw new Error(`desktop shell clipboard module is missing ${snippet}`);
}
}
if (config.build?.frontendDist !== '../../../dist') {
throw new Error('desktop shell must package the root H5 dist');
}
@@ -1986,9 +2010,8 @@ const requiredRustHostSnippets = [
'"file.exportAudio"',
'"file.imageDropped"',
'"notification.showLocal"',
'write_desktop_clipboard_text(&app, text)',
'read_desktop_clipboard_text(&app)',
'normalize_clipboard_text(&text)',
'write_desktop_host_bridge_clipboard_text(&app, &request)',
'read_desktop_host_bridge_clipboard_text(&app, &request)',
'tauri_plugin_dialog::init()',
'tauri_plugin_notification::init()',
'tauri_plugin_notification::{NotificationExt, PermissionState}',