import type { HistoireSession } from '@histoire/sdk/internal' import type { HistoireTestsModel } from '@histoire/vue/internal' import type { CanvasFrameLayout } from '../components/canvas/frame-layout.js' import type { CanvasFrames } from '../composables/canvas-settings.js' import type { CanvasStore } from '../stores/canvas.js' import type { createStandaloneCommands } from './commands.js' import type { createStandaloneFolders } from './folders.js' import type { createStandaloneNavigation } from './navigation.js' import type { StandaloneRuntimeBinding } from './runtime-binding.js' /** Public exposed canvas surface used by standalone frame actions. */ export interface WorkbenchCanvas { /** Per-canvas state tracks current selected frame and pan/zoom ownership. */ canvas: CanvasStore /** Mounted preview records retain exact frame-specific SDK sessions. */ registry: CanvasFrames /** Resolve current arrangement layout for any frame, including virtualized offscreen ones. */ getFrameLayout: (id: string) => CanvasFrameLayout | undefined } /** Explicit standalone ownership passed into the native workbench. */ export interface WorkbenchProps { /** Canonical session, already connected by bootstrap. */ session: HistoireSession /** Bootstrap runtime consumers follow selected admitted frame without moving it. */ runtime: StandaloneRuntimeBinding /** Standalone URL adapter. */ navigation: ReturnType /** Existing folder persistence adapter. */ folders: ReturnType /** Existing plugin commands and docs activation adapter. */ commands: ReturnType /** Selected variant's existing tests controller. */ tests: HistoireTestsModel /** Exact source base, independent of history route. */ previewBase: string /** Owning document's window. */ hostWindow: Window }