/** * @openwaters/seascape — MapLibre GL style for the Open Waters bathymetry tiles. * * Follows the protomaps-basemaps split: layer *structure* lives in the * per-layer modules (one file per layer family), appearance lives in a plain * "flavor" object (flavor.ts), and the consumer owns the style — either * assembled piecemeal (`sources()` + `layers()` concat with other layer * groups) or whole via `style()` (what the tile Worker serves at /style.json). * * import { style } from "@openwaters/seascape"; * new maplibregl.Map({ style: style({ tilesBase }) }); * * Zooms, bounds, and attribution come from the endpoint's TileJSON documents * (raster.json / vector.json). * * Runtime parameters: `unit` ("m" | "ft" | "fm") and `safety` (metres, 0 = off) * appear in the generated expressions as literals — every label, isobath * filter, and the depth-shading ramp. Literal expressions run on any GL JS * with color-relief (MapLibre >= 5.6). To change them on a live map, * applyState() re-derives each layer's declared state-dependent properties and * sets them in place; or fetch a regenerated style * (`/style.json?unit=ft&safety=3`). `shading` ("relief" | "bands") picks the * water shading: the raster ramp, or the vector ENC depth-area bands above z4 * (the relief keeps z<4 either way). */ import type { LayerSpecification, SourceSpecification, StyleSpecification } from "@maplibre/maplibre-gl-style-spec"; import { type Flavor, type Shading, type Unit } from "./flavor.js"; export { day, type Flavor, type Shading, type Unit } from "./flavor.js"; export { depthRelief } from "./depth-shading.js"; export { BANDS_MIN_ZOOM, depthAreasColor } from "./depth-areas.js"; export declare const SCHEMA = 1; export declare function sources({ tilesBase, dem, vector, coverage, }: { tilesBase: string; dem?: string; vector?: string; coverage?: string; }): Record; export declare function layers(flavor?: Flavor, { dem, vector, coverage, unit, safety, shading, hillshade, }?: { dem?: string; vector?: string; coverage?: string; unit?: Unit; safety?: number; shading?: Shading; /** Bathymetric hillshading over the water shading, on by default; false hides it. */ hillshade?: boolean; }): LayerSpecification[]; export declare function style({ tilesBase, flavor, glyphs, osm, unit, safety, shading, hillshade, }: { tilesBase: string; flavor?: Flavor; glyphs?: string; osm?: boolean; unit?: Unit; safety?: number; shading?: Shading; hillshade?: boolean; }): StyleSpecification; export interface ChartMap { setFilter(layerId: string, filter: unknown): unknown; setLayoutProperty(layerId: string, name: string, value: unknown): unknown; setPaintProperty(layerId: string, name: string, value: unknown): unknown; getLayer(id: string): unknown; } export declare function applyState(map: ChartMap, { unit, safety, shading, hillshade, }: { unit: Unit; safety: number; shading?: Shading; hillshade?: boolean; }, flavor?: Flavor): void; export declare function readDepth(tilesBase: string, lngLat: { lng: number; lat: number; }, zoom: number): Promise;