/** * Shape-aware field access (spec: "Feature Field Resolution & Data Shape"). * The same field name resolves differently depending on the layer's detected * shape — `d.field` (flat) vs `d.properties.field` (GeoJSON) — mirrored here * for ctx.stats/dataInViewport so widget code never has to think about it. */ import type { Shape, LayerData } from "./ir"; export declare function getField(row: unknown, field: string, shape: Shape): unknown; /** Normalizes a picked feature to flat (GeoJSON properties lifted to the top level) — for ctx.selection.object. */ export declare function flattenFeature(row: unknown, shape: Shape): unknown; /** * Best-effort feature-id matching for the `highlight-feature` action and the * id form of `zoom-to-feature` (spec: "Action payload contract"). The spec * doesn't prescribe an id-extraction convention, so this checks the two * conventional sources: a GeoJSON Feature's own top-level `id` (RFC 7946), * and a plain `id` field on the (possibly shape-flattened) datum. */ export declare function matchesFeatureId(row: unknown, featureId: string, shape: Shape): boolean; /** * Id → row index over any LayerData (`highlight-feature`, `zoom-to-feature` * id form). Id lookup is row-semantics, so columnar layers scan the memoized * asRows view — the Tier-2 rule, stated once here instead of at each caller. */ export declare function findRowIndexById(data: LayerData, featureId: string, shape: Shape): number; /** * Shape-less named-field read: a GeoJSON Feature's field lives under * `properties`, a flat row carries it directly — probe both, `in`-checked so * an explicit null/undefined stored under properties still wins. For callers * that have no `Shape` in hand (the Tracking layer pair); everything with a * shape should use `getField`. */ export declare function readNamedField(row: unknown, field: string): unknown; /** Recursively walks GeoJSON `coordinates` (Point/LineString/Polygon/Multi*) collecting every [lng, lat] vertex. */ export declare function collectCoordinates(coordinates: unknown, out: [number, number][]): void;