highlights

App-owned highlights, each with its own fill colour and its own optional margin marker. Painted over the page after searchHighlights, in list order, so later entries win where they overlap. Clear by assigning an empty list.

state.highlights = notes.map { note ->
KiteHighlight(
hit = KiteSearchHit(note.location, note.quads, note.text),
color = note.category.tint,
edgeMarker = true,
)
}

Save the selection's location with the quads. They survive chapter publication and reopening with the same content and layout, but must be recomputed after a reflow. Unlocated hits follow the global-index fallback of searchHighlights. See KiteHighlight for the per-entry knobs.