import { Layer } from "@deck.gl/core"; export type PropKind = "reserved" | "accessor" | "shorthand" | "scalar"; export interface PropDescriptor { /** Kebab-case attribute name as authored, e.g. "get-fill-color". */ attr: string; kind: PropKind; /** The deck.gl prop this resolves to, e.g. "getFillColor". Absent for `reserved`. */ deckProp?: string; /** Coercion hint for pass-through/scalar values. */ type?: "string" | "number" | "boolean" | "json" | "color"; required?: boolean; default?: unknown; /** * Only for kind: "accessor" — a `$field`-style expression compiled and * used AS the accessor when the author writes no `attr` at all (a true * zero-attribute default, not a fallback VALUE the way scalar `default` * is). Compiled through the exact same accessorCache path an authored * attribute would take, so it gets real updateTriggers/caching and — for * a `*Color`-named deckProp — the same hex-string-to-RGB conversion. An * authored `attr` always wins; this only fills the gap when absent. Keep * the field name itself data-agnostic/reserved (e.g. `$fill_color`), not * tied to one data format, so the layer schema stays format-agnostic — * whichever DataFormat populates that field gets the free default, not * just the one that motivated adding it (CityJSON surfaces mode). */ defaultExpr?: string; /** Only for kind: "shorthand" — the deckProp it expands to when no accessor overrides it. */ shorthandFor?: string; } export interface LayerSchema { type: string; /** Absent only for lazy entries whose chunk hasn't loaded yet (see `loadClass`). */ deckClass?: new (props: Record) => Layer; /** * Lazy-chunk seam (spec: "Raster / GeoTIFF"): a curated entry may ship its * SCHEMA eagerly (attribute resolution and validation need it at parse * time) while the deck class arrives via dynamic import on first use. * `ensureLayerClass` runs the load exactly once; until it settles the * runtime simply skips the layer and re-applies when the class lands. */ loadClass?: () => Promise) => Layer>; props: PropDescriptor[]; /** Hand-authored (curated, ~15) vs. runtime-derived from defaultProps (HU1 tiering). */ tier: "curated" | "auto-derived"; /** * Carries a deck `Tileset3D` and supports the `onTilesetLoad` deck prop * (spec: "Consumer map events / om-tileset-load") — the runtime injects * the tileset-load hook only into these types. Declared HERE, at * registration, rather than a name-matched set in runtime-core (the * `compact`/`neverHides` widget-flag precedent — one source of truth). */ carriesTileset?: boolean; /** * BIM feature-picking epic, Phase 2 (design pending). Supports * `pick-features`/`feature-id-property` — the runtime injects the * `_subLayerProps` sublayer-class swap (to `FeatureMeshLayer`) only into * these types, same one-source-of-truth reasoning as `carriesTileset`. */ supportsFeaturePicking?: boolean; /** * Loads its own georeferencing from the source file (spec: "auto-terrain * for georeferenced BIM") and supports the `onGeoreference` deck prop — * the runtime injects that hook only into these types, same * one-source-of-truth reasoning as `carriesTileset`. */ carriesGeoreference?: boolean; /** * Resolves its own route (spec: "Routing & Tracking") and supports the * `onRouteResolved` deck prop — the runtime injects that hook only into * these types (`Route`), same one-source-of-truth reasoning as * `carriesTileset`. Drives `follow="fit-route"` camera behavior. */ carriesRoute?: boolean; /** Layer-owned async asset resolver; keeps parse/runtime branching registry-driven rather than name-matched. */ assetResolver?: "image-overlay"; } export declare function registerLayer(schema: Omit & { tier?: LayerSchema["tier"]; }): void; /** * Kick (or join) the lazy class load for a schema. Returns null when there * is nothing to load (class already present, or a plain eager entry). */ export declare function ensureLayerClass(schema: LayerSchema): Promise | null; export declare function getLayerSchema(type: string): LayerSchema | undefined; export declare function getAllLayerSchemas(): ReadonlyMap; /** * The ONE opt-out predicate for the scene-wide per-layer attributes declared * above (issue: three call sites each accepted a different value set — * runtime-core honored only snap="off", clip-box honored "off"/false, and * validation waved through "false" for both — so snap="false" passed * validation clean yet kept snapping). Accepts the documented "off" plus the * boolean-ish spellings validation already accepts; programmatic descriptors * can carry a real `false`. */ export declare function isSceneOptOut(props: Record, key: "snap" | "clip"): boolean;