import type { SkySpecification, StyleSpecification } from 'maplibre-gl'; import Theme from './theme'; export type MapLibreStyle = { opacity: number; dataColor: string; highlightColor: string; selectedColor: string; invalidColor: string; markerColor: string; markerHighlightColor: string; strokeColor: string; strokeHighlightColor: string; strokeSelectedColor: string; strokeInvalidColor: string; textColor: string; textHaloColor: string; textFont: string; textSize: number; markerFont: string; highlightOpacity: number; boundsOpacity: number; overviewPadding: number; }; export declare const darkBasemapStyle = "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"; export declare const lightBasemapStyle = "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"; export default class MapLibreTheme extends Theme { darkBasemap?: string; lightBasemap?: string; constructor(element: Element, theme?: 'light' | 'dark', basemaps?: { darkBasemap?: string; lightBasemap?: string; }); /** * How previewed data is drawn. Every value here can be overridden by setting the matching * `--ogm-*` custom property on the component or anything above it - custom properties inherit * through shadow boundaries, so setting them on the embedding page reaches in: * * ogm-viewer { --ogm-data-color: #8f1414; } * * Left alone, each falls back to one of Web Awesome's own default colors, picked for the current * mode - copied in as literals rather than read from its stylesheet, so a preview never has to * wait for that stylesheet to load before it can draw. The `--ogm-*` names are the contract, and * are the only ones an embedding app should be naming. * * An app names the color of the data itself and the outline comes from it, so one declaration * restyles a state. `--ogm-stroke-*` is still there for anyone who wants a particular outline. * * `--ogm-font-family` is the one exception: it names a MapLibre glyph font (e.g. "Noto Sans * Regular"), not a CSS font stack, so it can't fall back to `--wa-font-family-body` - that's a * CSS stack like "ui-sans-serif, system-ui, sans-serif", and MapLibre would request it verbatim * from the style's glyphs endpoint and get a CORS failure. An app overriding it must give a * glyph name the active basemap style actually serves. */ getStyle(): MapLibreStyle; getOverviewPadding(): number; getBaseMapStyle(): string; /** * A style document with nothing in it but a color to draw against, for a map whose basemap never * arrived - see 's fallBackToEmptyBasemap. * * A style object rather than the URL getBaseMapStyle hands back, because the whole point of this * one is that it needs nothing from the network: the network is what just failed. MapLibre needs * *some* style document to hold a source, so a preview whose basemap 404s or 503s has nowhere to * be drawn until it is given one of these. * * No glyphs endpoint, which is the one thing lost: MapLibre asks the style document where to fetch * glyphs from, and the only endpoint we know of is the basemap's own. So a preview that labels what * it draws loses its labels here, while its shapes and rasters still draw - which is the part worth * keeping. See getStyle for what `textFont` names. */ getFallbackBaseMapStyle(): StyleSpecification; strokeColor(override: string, dataColor: string): string; markerColor(override: string, color: string): string; haloColor(textColor: string): string; getSkyStyle(): SkySpecification; }