/**
 * gridGuides.ts — Grid, guides, rulers, and snap-to-grid/pixel for editors.
 *
 * Unified system for drawing grids, ruler bars, snapping to grid,
 * and managing user-defined guide lines.
 */
export interface GridConfig {
    enabled: boolean;
    size: number;
    subdivisions: number;
    color: string;
    subColor: string;
    opacity: number;
    snapToGrid: boolean;
}
export interface RulersConfig {
    enabled: boolean;
    size: number;
    color: string;
    backgroundColor: string;
    textColor: string;
    tickSize: number;
}
export interface Guide {
    id: string;
    orientation: "horizontal" | "vertical";
    position: number;
    color: string;
    locked: boolean;
}
export interface GuidesConfig {
    enabled: boolean;
    guides: Guide[];
    snapToGuides: boolean;
    snapDistance: number;
    color: string;
}
export interface SnapResult {
    x: number;
    y: number;
    snappedX: boolean;
    snappedY: boolean;
}
export declare const DEFAULT_GRID: GridConfig;
export declare const DEFAULT_RULERS: RulersConfig;
export declare const DEFAULT_GUIDES: GuidesConfig;
/** Draw a grid on a canvas context. */
export declare function drawGrid(ctx: CanvasRenderingContext2D, width: number, height: number, config: GridConfig, offsetX?: number, offsetY?: number, zoom?: number): void;
/** Draw horizontal ruler bar. */
export declare function drawHorizontalRuler(ctx: CanvasRenderingContext2D, width: number, config: RulersConfig, offsetX?: number, zoom?: number): void;
/** Draw vertical ruler bar. */
export declare function drawVerticalRuler(ctx: CanvasRenderingContext2D, height: number, config: RulersConfig, offsetY?: number, zoom?: number): void;
/** Draw guides on a canvas context. */
export declare function drawGuides(ctx: CanvasRenderingContext2D, width: number, height: number, config: GuidesConfig, offsetX?: number, offsetY?: number, zoom?: number): void;
/** Snap a point to the grid. */
export declare function snapToGrid(x: number, y: number, gridSize: number): SnapResult;
/** Snap a point to nearby guides. */
export declare function snapToGuides(x: number, y: number, guides: Guide[], snapDistance: number): SnapResult;
/** Snap to pixel (floor to nearest integer). */
export declare function snapToPixel(x: number, y: number): SnapResult;
/** Combined snap: try guides first, then grid, then pixel. */
export declare function snapPoint(x: number, y: number, gridConfig: GridConfig, guidesConfig: GuidesConfig): SnapResult;
/** Create a new guide. */
export declare function createGuide(orientation: "horizontal" | "vertical", position: number, color?: string): Guide;
/** Add a guide to the config. */
export declare function addGuide(config: GuidesConfig, guide: Guide): GuidesConfig;
/** Remove a guide by ID. */
export declare function removeGuide(config: GuidesConfig, guideId: string): GuidesConfig;
/** Clear all guides. */
export declare function clearGuides(config: GuidesConfig): GuidesConfig;
