/** * Presentation: what an object looks like to the scene at a time (doc 28 A, doc 29 §1–4). The runtime keeps the * provider's object as it is (index, queries, inspect); the scene gets this view of it: * * - outside its validity window (`validFrom` … `validUntil`) it is not drawn; * - `$age` from `observedAt` and the layer's age thresholds (live clock or replay time); it changes exactly when * the state changes (the runtime schedules that moment), so a map of 10 000 objects is not redrawn every second; * - `$confidence` from `object.confidence`; `$alternatives` = number of unresolved candidates; * - `$s:` = the value of each continuous scale (renderers read it before any rule). * * Rules and conditions can use these `$` properties like any other. Nothing here knows a domain. */ import type { AgeConfig, MapLayer, SpatialObject, StyleScale } from '../core/types.js'; export declare const AGE = "$age"; export declare const CONFIDENCE = "$confidence"; export declare const ALTERNATIVES = "$alternatives"; /** The per-object value of a continuous scale for a style token: `$s:opacity`, `$s:color`… */ export declare const scaled: (token: StyleScale["token"]) => string; export type AgeState = 'fresh' | 'ageing' | 'stale' | 'lost'; /** Whether the object's state holds at `nowMs` (no window = always). */ export declare function isValidAt(o: SpatialObject, nowMs: number): boolean; /** Age of an object at `nowMs` under the layer's thresholds; null when it does not age (no config or no time). */ export declare function ageOf(o: SpatialObject, age: AgeConfig | undefined, nowMs: number): { state: AgeState; seconds: number; } | null; /** The age state an object will next change to, in ms from now (for the clock tick), or null if it never will. */ export declare function nextAgeChangeMs(o: SpatialObject, age: AgeConfig | undefined, nowMs: number): number | null; /** One scale's value for a property value; undefined when the value is not a number. */ export declare function scaleValue(scale: StyleScale, raw: unknown): number | string | undefined; /** * The scene's view of one object through one layer at `nowMs`; null when it is not drawn now (outside its * validity window, or lost and the layer hides lost objects). The same object is returned when nothing applies. */ export declare function presentObject(layer: MapLayer, o: SpatialObject, nowMs: number): SpatialObject | null; /** * The layer as the renderer gets it: link layers draw as lines; age fading becomes leading rules on `$age` * (rules are per token, so the fade sets opacity — or a dashed outline for areas — and colours fall through). */ export declare function effectiveLayer(layer: MapLayer): MapLayer; /** Validates the presentation options of a layer (age, scales, decorations). */ export declare function validatePresentation(l: MapLayer): { valid: true; } | { valid: false; reason: string; };