import { PptxElement } from 'pptx-viewer-core'; import { SnapLine } from 'pptx-viewer-shared'; import { AdjustGestureController } from './editor-adjust-gesture'; import { EditorControllerDeps } from './editor-controller-deps'; import { GestureController } from './editor-gestures'; import { InkGestureController } from './editor-ink-gesture'; import { createSelectionGestureController, EditorMarqueeRect } from './editor-selection-gestures'; import { EditorState } from './editor-state.svelte'; /** * The slice of `EditorController` its sub-controllers need. Passing this * instead of the controller itself keeps the wiring below independent of the * class (and of its private fields), which is what lets it live outside * `editor-controller.svelte.ts` and hold that file within the repo's * file-size budget. */ export interface EditorControllerHost { editor: EditorState; deps: EditorControllerDeps; /** The elements the pointer currently acts on (slide, or master/layout). */ currentElements(): PptxElement[]; /** Publish the transient snap-alignment lines to the overlay. */ setSnapLines(lines: readonly SnapLine[]): void; /** Publish the in-progress empty-canvas marquee rectangle. */ setMarquee(rect: EditorMarqueeRect | null): void; /** The element currently open in the inline text editor, or null. */ getEditingId(): string | null; } /** * Drag a shape and the connectors glued to it must follow, exactly as they do * in PowerPoint. The endpoint math is the shared `connector-reroute` model (one * copy for all five bindings); this only decides WHEN it runs: once, at gesture * end, over the ids the gesture actually moved. * * Deliberately NOT `commitActiveElements` and deliberately no `pushHistory`: * the gesture's own `onStart` already pushed one history entry, so recording a * second here would make every drag of a connected shape take two undos. */ export declare function rerouteConnectorsAfterGesture(host: EditorControllerHost, movedIds: Set): void; /** Move / resize / rotate gestures, including snapping and history bracketing. */ export declare function createTransformGestures(host: EditorControllerHost): GestureController; /** * The amber adjustment-diamond drag (round-rect corner radius). * * Bracketed exactly like the transform gestures: one `pushHistory` when the * drag clears its dead zone, live frames straight onto the active elements * (history-free, so a drag is not one undo step per frame), one `commitChange` * at the end. */ export declare function createAdjustGestures(host: EditorControllerHost): AdjustGestureController; /** Pen / highlighter / eraser stroke gestures. */ export declare function createInkGestures(host: EditorControllerHost): InkGestureController; /** The editing keymap (delete / duplicate / nudge / clipboard / undo / group / ...). */ export declare function createEditorKeydown(host: EditorControllerHost): (event: KeyboardEvent) => void; /** Multi-selection drag + the empty-canvas rubber-band marquee. */ export declare function createSelectionGestures(host: EditorControllerHost): ReturnType; //# sourceMappingURL=editor-controller-wiring.d.ts.map