import { InkPoint } from 'pptx-viewer-shared'; import { InkDrawTool } from './editor-ink-controller.svelte'; /** * Pointer gesture driver for freehand ink drawing: pen/highlighter accumulate * points into a live stroke and commit it on pointerup; eraser hit-tests on * pointerdown alone. Framework-agnostic (no Svelte), mirroring * `editor-gestures.ts`'s pure-module + window-listener pattern so a stroke * keeps tracking the pointer even when it leaves the stage bounds. */ export interface InkGestureDeps { /** Current stage scale (screen px per element px). */ getScale(): number; /** Stage-holder origin in client coordinates, for pointer-to-slide-space mapping. */ getStageOrigin(): { left: number; top: number; }; /** The active draw tool; `'select'` means the gesture controller is idle. */ getTool(): InkDrawTool; /** A pen/highlighter stroke started (first point captured). */ onStrokeStart(): void; /** Live preview: the accumulated points so far (pen/highlighter only). */ onStrokePreview(points: readonly InkPoint[]): void; /** A pen/highlighter stroke finished (pointerup); may be too short to keep. */ onStrokeEnd(points: readonly InkPoint[]): void; /** Eraser: a single point to hit-test against ink elements. */ onErase(point: InkPoint): void; } export interface InkGestureController { /** Handle a stage `pointerdown` while a draw tool may be active. No-op when the tool is `'select'`. */ handlePointerDown(event: PointerEvent): void; isActive(): boolean; /** Abort listeners without emitting an end callback (teardown). */ dispose(): void; } export declare function createInkGestureController(deps: InkGestureDeps): InkGestureController; //# sourceMappingURL=editor-ink-gesture.d.ts.map