import type { EditorCore } from "@auto-hwp/editor-core"; import type { ToolbarAlign } from "./components/FloatingToolbar"; /** The single-selection edit target the format actions need (a subset of HwpWorkspace's EditTarget). */ export interface SelectionActionTarget { section: number; block: number; kind: string; rows?: [number, number]; cols?: [number, number]; curBold: boolean; curItalic: boolean; } /** A rectangular cell range `[r0..=r1] × [c0..=c1]` (the target of a batch format/shade). */ export interface SelectionRange { r0: number; c0: number; r1: number; c1: number; } export interface SelectionActions { /** The resolved cell range, or null when the target isn't a formattable cell/range. */ fmtRange: SelectionRange | null; /** Whether the format controls are usable (a single cell/range is selected). */ canFormat: boolean; bold: () => void; italic: () => void; setSize: (pt: number) => void; setFont: (family: string) => void; setColor: (hex: string) => void; setShade: (hex: string | null) => void; setAlign: (align: ToolbarAlign) => void; } export declare function useSelectionActions(core: EditorCore, target: SelectionActionTarget | null, runFmt: (fn: () => Promise, ok: string) => void): SelectionActions; //# sourceMappingURL=useSelectionActions.d.ts.map