KiteStructuredText
Format-neutral structured text for a KitePage: the minimal blocks → lines → text model a viewer needs for extraction, search highlights and selection, without committing to a handler's internals.
All geometry is in the page's DISPLAY space: the top-left-origin, y-down [0, displayWidth] x [0, displayHeight] box that KitePage.displayToDeviceBase maps onto. Because Rectangle names its fields PDF-style (y-up), display rectangles here store the y-MIN (the edge nearest the page top) in Rectangle.bottom and the y-MAX in Rectangle.top, keeping width/height positive.
Properties
Functions
The flattened index of the char at a display-space point, or null when the point is on no text line. Within a line, x clamps to the nearest char, which is what a selection drag wants at the line's ends.
Find needle in this page's text. Matches may cross line boundaries inside a block: a line break counts as one space, except after a line ending in a hyphen, which joins the halves directly with the hyphen dropped (so a hyphenated "compres-/sion" matches "compression"). Matches never cross block boundaries. Case-insensitive comparison uses per-position regionMatches, so indices stay aligned for any script.