import { BBox } from './geo.cjs'; import { I as InlinedSource } from '../types-yLQy3AKR.cjs'; import * as _maplibre_maplibre_gl_style_spec from '@maplibre/maplibre-gl-style-spec'; import { StyleSpecification, ValidationError } from '@maplibre/maplibre-gl-style-spec'; import 'geojson'; import 'stream'; import 'type-fest'; import 'readable-stream'; import 'events'; /** @import {StyleSpecification, ExpressionSpecification, ValidationError} from '@maplibre/maplibre-gl-style-spec' */ /** * For a given style, replace all font stacks (`text-field` properties) with the * provided fonts. If no matching font is found, the first font in the stack is * used. * * *Modifies the input style object* * * @param {StyleSpecification} style * @param {string[]} fonts */ declare function replaceFontStacks(style: StyleSpecification, fonts: string[]): StyleSpecification; /** * From given style layers, create a new style by calling the provided callback * function on every font stack defined in the style. * * @param {StyleSpecification['layers']} layers * @param {(fontStack: string[]) => string[]} callbackFn * @returns {StyleSpecification['layers']} */ declare function mapFontStacks(layers: StyleSpecification["layers"], callbackFn: (fontStack: string[]) => string[]): StyleSpecification["layers"]; /** * @typedef {object} TileJSONPartial * @property {string[]} tiles * @property {string} [description] * @property {string} [attribution] * @property {object[]} [vector_layers] * @property {import('./geo.js').BBox} [bounds] * @property {number} [maxzoom] * @property {number} [minzoom] */ /** * * @param {unknown} tilejson * @returns {asserts tilejson is TileJSONPartial} */ declare function assertTileJSON(tilejson: unknown): asserts tilejson is TileJSONPartial; /** * Check whether a source is already inlined (e.g. does not reference a TileJSON or GeoJSON url) * * @param {import('@maplibre/maplibre-gl-style-spec').SourceSpecification} source * @returns {source is import('../types.js').InlinedSource} */ declare function isInlinedSource(source: _maplibre_maplibre_gl_style_spec.SourceSpecification): source is InlinedSource; declare const validateStyle: { (style: unknown): style is StyleSpecification; errors: ValidationError[]; }; type TileJSONPartial = { tiles: string[]; description?: string | undefined; attribution?: string | undefined; vector_layers?: object[] | undefined; bounds?: BBox | undefined; maxzoom?: number | undefined; minzoom?: number | undefined; }; export { type TileJSONPartial, assertTileJSON, isInlinedSource, mapFontStacks, replaceFontStacks, validateStyle };