/** * Sprite utilities shared by the engine adapters. A *sprite* is an inline SVG * whose stroke/fill use the `currentColor` token so the adapters can re-tint one * sprite per feature (`symbolColor`) via {@link colorizeSprite}. * * The default atlas (`DEFAULT_SPRITES`) and default ink stay in each product (they * are domain) — the lib only provides the plumbing. */ import type { SymbolSprites } from "./index.js"; export type { SymbolSprites }; /** Sprite pixel size the adapters rasterize/draw at (icon-size 1 ⇒ this many px). */ export declare const SPRITE_PX = 32; /** Default ink for a sprite when the feature sets no `symbolColor` (shared by all adapters). */ export declare const DEFAULT_SYMBOL_COLOR = "#000000"; /** Bake a concrete colour into a sprite (replaces the `currentColor` token). */ export declare function colorizeSprite(svg: string, color: string): string; /** * Encode an SVG string as a `data:image/svg+xml` URL. A `data:` SVG image is parsed as **strict XML**, * so it silently fails to load (⇒ an EMPTY sprite) without an `xmlns` on the root — even though the very * same markup is tolerated when injected inline into the DOM. So inject the SVG namespace on the root * `` when the glyph author omitted it, making ANY inline glyph rasterize robustly. */ export declare function svgToDataUrl(svg: string): string; /** * Rasterize an SVG sprite (or any image `src`, incl. a `data:` URI) into an * `HTMLImageElement` — for MapLibre `addImage`. */ export declare function loadSpriteImage(svg: string, px?: number): Promise; //# sourceMappingURL=symbols.d.ts.map