import { i as Cell, o as CellPatch } from "./color-profile-CyeHnG1T.js";
import { n as Rect } from "./geometry-BxXOzJgo.js";
//#region src/screen/screen.d.ts
type Line = readonly Cell[];
/** A half-open range of changed columns in one row. */
type DirtySpan = {
  readonly y: number;
  readonly start: number;
  readonly end: number;
};
/**
A mutable two-dimensional terminal cell buffer. Cells themselves are immutable,
so current and next screens can compare them by value or safely share constants.
*/
declare class Screen {
  #private;
  constructor(width: number, height: number);
  get width(): number;
  /**
    The populated length of one row: the nominal width, or more when overflow
    writes (`textWrap: "none"` content) extended it past the screen's width.
    */
  rowLength(y: number): number;
  get height(): number;
  bounds(): Rect;
  cellAt(x: number, y: number): Cell | undefined;
  /** Whether a drawable explicitly touched this position. */
  isPainted(x: number, y: number): boolean;
  setCell(x: number, y: number, cell: Cell, options?: {
    overflow?: boolean;
  }): void;
  /**
    Composes independent cell channels over the existing cell. An undefined
    patch is transparent; an explicit space in `content` paints a blank.
    */
  composeCell(x: number, y: number, patch: CellPatch | undefined, options?: {
    overflow?: boolean;
  }): void;
  /** Composes a patch throughout a rectangle, clipped to this screen. */
  fill(bounds: Rect, patch: CellPatch | undefined): void;
  /** Resizes while preserving complete graphemes in the shared top-left area. */
  resize(width: number, height: number): void;
  clear(): void;
  toRows(): readonly Line[];
  dirtySpans(): readonly DirtySpan[];
  takeDirtySpans(): readonly DirtySpan[];
}
//#endregion
export { Screen as n, Line as t };