feat(plugins): add clipboard image and media URL APIs
This commit is contained in:
10 files changed
+494
-23
No files matched your search
@@ -5372,6 +5372,14 @@ export async function closePluginLocalFile(_pluginId: string, _handleId: string)
|
||||
throw new Error("Plugin local file access is not available in the web backend");
|
||||
}
|
||||
|
||||
export async function openPluginMedia(_pluginId: string, _method: string, _params: Record<string, unknown>): Promise<string> {
|
||||
throw new Error("Plugin media URLs are not available in the web backend");
|
||||
}
|
||||
|
||||
export async function closePluginMedia(_pluginId: string, _token: string): Promise<void> {
|
||||
throw new Error("Plugin media URLs are not available in the web backend");
|
||||
}
|
||||
|
||||
// Plugin UI storage goes through the Rust plugin-data tree on native hosts;
|
||||
// the web workbench host keeps its localStorage fallback in the component, so
|
||||
// these only exist to satisfy the shared backend surface.
|
||||
|
||||
@@ -2673,6 +2673,14 @@ export async function closePluginLocalFile(pluginId: string, handleId: string):
|
||||
return invoke("plugin_file_close", { pluginId, handleId });
|
||||
}
|
||||
|
||||
export async function openPluginMedia(pluginId: string, method: string, params: Record<string, unknown>): Promise<string> {
|
||||
return invoke("plugin_media_open", { pluginId, method, params });
|
||||
}
|
||||
|
||||
export async function closePluginMedia(pluginId: string, token: string): Promise<void> {
|
||||
return invoke("plugin_media_close", { pluginId, token });
|
||||
}
|
||||
|
||||
export async function getPluginUiStorage(pluginId: string, key: string): Promise<unknown> {
|
||||
return invoke("plugin_ui_storage_get", { pluginId, key });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user