import { type UndEndNext } from '../../../util/iterator'; import { Inline } from './Inline'; import { Range } from '../rga/Range'; import { OverlayPoint } from '../overlay/OverlayPoint'; import type { Point } from '../rga/Point'; import type { Printable } from 'tree-dump'; import type { Peritext } from '../Peritext'; import type { Stateful } from '../types'; import type { OverlayTuple } from '../overlay/types'; import type { PeritextMlElement } from './types'; import type { SliceTypeSteps } from '../slice'; export interface IBlock { readonly path: SliceTypeSteps; readonly parent: IBlock | null; } export declare class Block extends Range implements IBlock, Printable, Stateful { readonly txt: Peritext; readonly path: SliceTypeSteps; readonly marker: OverlayPoint | undefined; start: Point; end: Point; parent: Block | null; children: Block[]; constructor(txt: Peritext, path: SliceTypeSteps, marker: OverlayPoint | undefined, start: Point, end: Point); /** * @returns Stable unique identifier within a list of blocks. Used for React * or other rendering library keys. */ key(): number | string; tag(): number | string; attr(): Attr | undefined; isLeaf(): boolean; /** * Iterate through all overlay points of this block, until the next marker * (regardless if that marker is a child or not). */ points0(withMarker?: boolean): UndEndNext>; points(withMarker?: boolean): IterableIterator>; protected tuples0(): UndEndNext>; /** * @todo Consider moving inline-related methods to {@link LeafBlock}. */ texts0(): UndEndNext>; /** * @todo Consider moving inline-related methods to {@link LeafBlock}. */ texts(): IterableIterator>; text(): string; toJson(): PeritextMlElement; hash: number; refresh(): number; toStringName(): string; protected toStringHeader(): string; toString(tab?: string): string; }