KiteSearchHit
class KiteSearchHit(val pageIndex: Int, val quads: List<KiteRectangle>, val text: String, val location: KiteLocation?)(source)
One search match: display-space quads (one per line touched) at location. The location is a coordinate in the current layout, so it and the quads must be recomputed when that layout changes. It is not a reflow-stable content anchor.
Document search keeps pageIndex as a global page index. A standalone KiteStructuredText.search keeps the caller's supplied index, or -1 when unknown. Located consumers use location when present, even if the old index is stale.