import { StyledFragment, StyledRun, TextMeasurer, WrapOptions, WrappedLine } from "document-schema.js"; //#region src/layout/text-layout.d.ts interface SourcedRun extends StyledRun { readonly runIndex?: number; } interface SourcedFragment extends StyledFragment { readonly runIndex?: number; } interface SourcedWrappedLine extends Omit { readonly fragments: readonly (SourcedFragment & { readonly xOffsetPt: number; })[]; } interface BoxAtom { readonly kind: "box"; readonly fragments: readonly SourcedFragment[]; readonly widthPt: number; } interface GlueAtom { readonly kind: "glue"; readonly widthPt: number; } interface BreakAtom { readonly kind: "break"; readonly widthPt: 0; } type WrapAtom = BoxAtom | GlueAtom | BreakAtom; declare function atomizeForWrap(runs: readonly SourcedRun[], measurer: TextMeasurer): WrapAtom[]; declare function firstWrappedLineOf(atoms: readonly WrapAtom[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): { line: SourcedWrappedLine; rest: WrapAtom[]; }; declare function wrapRunsToWidth(runs: readonly SourcedRun[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): SourcedWrappedLine[]; //#endregion export { SourcedFragment, SourcedRun, SourcedWrappedLine, WrapAtom, atomizeForWrap, firstWrappedLineOf, wrapRunsToWidth };