import type { MagicalInkId } from '../configs/inkPaint'; import type { Gradient } from '../types/slides'; import type { Command } from './commandHistory'; export type ShapeType = 'rect' | 'circle' | 'arrow' | 'line' | 'triangle'; export type InkStrokePaint = { color: string; gradient?: Gradient; gradientId?: MagicalInkId; }; export type PenStroke = InkStrokePaint & { kind: 'pen'; size: number; points: Array<{ x: number; y: number; pressure?: number; }>; simulatePressure?: boolean; }; export type MarkStroke = InkStrokePaint & { kind: 'mark'; size: number; points: Array<{ x: number; y: number; pressure?: number; }>; simulatePressure?: boolean; }; export type EraserStroke = { kind: 'eraser'; size: number; points: Array<{ x: number; y: number; }>; }; export type ShapeStroke = InkStrokePaint & { kind: 'shape'; shapeType: ShapeType; size: number; startX: number; startY: number; endX: number; endY: number; }; export type Stroke = PenStroke | MarkStroke | EraserStroke | ShapeStroke; export interface DrawingSurface { strokes: Stroke[]; baseline: HTMLImageElement | null; redraw: () => void; } export declare const strokeHasInk: (stroke: Stroke) => boolean; export declare class AddStrokeCommand implements Command { private readonly surface; private readonly stroke; constructor(surface: DrawingSurface, stroke: Stroke); do(): void; undo(): void; } export declare class ClearInkCommand implements Command { private readonly surface; private removedStrokes; private removedBaseline; constructor(surface: DrawingSurface); do(): void; undo(): void; }