1// What the two panes are handed.2//3// The viewport host does the loading and the arithmetic once — the payloads,4// the model, the standing set, the ground the cell systems divide — and hands5// both panes the same object. Neither pane fetches, neither pane filters, and6// neither pane can disagree with the other about what is on the map, because7// there is one answer and they are both reading it.89import type { CellSystem, Ground } from "@atlas/analysis";10import type { Lens, TileGrid } from "./data/payload.ts";11import type { Scene } from "./scene/read.ts";12import type { WorldModel } from "./world/model.ts";13import type { Visibility } from "./world/visibility.ts";1415/** One world, one lens, one arrangement: everything a pane draws from. */16export interface WorldContext {17 readonly scene: Scene;18 readonly base: string;19 readonly grid: TileGrid;20 readonly model: WorldModel;21 /**22 * The world's title, as the catalog spells it. The model carries the slug23 * -- which is what a URL and a payload name a world by -- and the24 * diagnostics report carries the title, because that is the word a reader25 * is shown.26 */27 readonly worldTitle: string;28 readonly lens: Lens | null;29 readonly lensIndex: number;30 /** The rim markers wear on this world: `light`, `dark`, or none. */31 readonly outset: string;32 readonly ground: Ground;33 /** The cell system in play, and the held cell — both the session's. */34 readonly system: CellSystem | null;35 readonly cell: string;36 readonly subgridVisible: boolean;37 visibility: Visibility;38 /** Whether Z is down. Ephemeral, seam-side, shared by both panes. */39 labelsHeld: boolean;40 /** The feature under the pointer, if any. Ephemeral, chart-side. */41 hovered: string | null;42}4344/** A camera as both panes and the session speak it. */45export interface CameraReport {46 readonly world: string;47 readonly x: number;48 readonly y: number;49 readonly zoom: number;50 readonly rotation: number;51}