Groundwork, and the three questions a frame list and a minimap need answered:
what is on screen, how do I put something on screen, and what order do frames
paint in.
`visibleWorldRect` inverse-transforms the viewport box. `centerAt` centres a
world point without touching scale. `projectInto` is `fitTo`'s twin with the
clamp removed, and the removal is the whole point — `MIN_SCALE` would floor a
minimap projection at 0.1 and the minimap would stop shrinking. On the viewport:
`visibleSafeRect`, `fitToRect` and `centerOn`, with the safe-area offset pulled
into `inSafe()` so `fitInSafe` and `centerOn` cannot drift apart.
`frames.reorder` publishes paint order as `z-index` and never re-parents an
`iframe`. Re-parenting reloads it, which would make restacking a frame throw
away its state. `applyOrder()` republishes on add, remove and both restores.
`onFrameReady` is a field now so `destroy()` can clear
`window.__airshipOnFrameReady` — but only if it is still its own, or a second
manager's handler gets torn down by the first one's teardown.
The marquee fixes are the same story from the input end: three ways a press was
claimed by the wrong gesture.
- `pointerup` moved to capture. The inline `EditGuard` swallowed it at document
capture, so the band was drawn and never landed.
- A `gestureFrom` latch lets a pan decline the marquee at pointerdown, rather
than both starting and one winning by accident.
- `suppressNextClick()` fires at pointer*up* after any drag, so the synthesized
click cannot wipe the selection the marquee just made.