feat(frontend): host les fenêtres plugin et l'API publique windows.open
Ajoute la vue window host qui charge le layout plugin dans une fenêtre OS détachée, expose react/react-dom/jsx-runtime hébergés sous frontend/public/plugin-host pour que le runtime SDK y résolve React, et câble services.windows.open() côté runtime plugin (loader/services/registry). npm test -- --run src/adapters/window.test.ts src/app/ViewWindow.test.tsx src/plugins/runtime/loader.test.ts src/plugins/runtime/services.test.ts : 39/39 npm run typecheck : OK npm run build : OK Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -15,6 +15,8 @@ import { listen } from "@tauri-apps/api/event";
|
||||
|
||||
import type { Unsubscribe } from "@/domain";
|
||||
import type {
|
||||
PluginLayoutWindowOpenInput,
|
||||
PluginLayoutWindowOpenResult,
|
||||
ViewWindowClosed,
|
||||
ViewWindowSnapshot,
|
||||
WindowGateway,
|
||||
@ -41,6 +43,14 @@ export class TauriWindowGateway implements WindowGateway {
|
||||
await invoke("open_view_window", { panel });
|
||||
}
|
||||
|
||||
async openPluginLayoutWindow(
|
||||
input: PluginLayoutWindowOpenInput,
|
||||
): Promise<PluginLayoutWindowOpenResult> {
|
||||
return invoke<PluginLayoutWindowOpenResult>("open_plugin_layout_window", {
|
||||
input,
|
||||
});
|
||||
}
|
||||
|
||||
async closeViewWindow(panel: string): Promise<void> {
|
||||
await invoke("close_view_window", { panel });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user