import * as stream from 'stream'; import { a as SMPStyle } from './types-yLQy3AKR.js'; import * as yauzl_promise from 'yauzl-promise'; import '@maplibre/maplibre-gl-style-spec'; import 'geojson'; import 'type-fest'; import 'readable-stream'; import 'events'; /** * @typedef {object} Resource * @property {string} resourceType * @property {string} contentType * @property {number} contentLength * @property {import('stream').Readable} stream * @property {'gzip'} [contentEncoding] */ /** * A low-level reader for styled map packages. Returns resources in the package * as readable streams, for serving over HTTP for example. */ declare class Reader { /** * @param {string | import('yauzl-promise').ZipFile} filepathOrZip Path to styled map package (`.styledmap`) file, or an instance of yauzl ZipFile */ constructor(filepathOrZip: string | yauzl_promise.ZipFile); /** * Resolves when the styled map package has been opened and the entries have * been read. Throws any error that occurred during opening. */ opened(): Promise; /** * Get the style JSON from the styled map package. The URLs in the style JSON * will be transformed to use the provided base URL. * * @param {string | null} [baseUrl] Base URL where you plan to serve the resources in this styled map package, e.g. `http://localhost:3000/maps/styleA` * @returns {Promise} */ getStyle(baseUrl?: string | null): Promise; /** * Get a resource from the styled map package. The path should be relative to * the root of the package. * * @param {string} path * @returns {Promise} */ getResource(path: string): Promise; /** * Close the styled map package file (should be called after reading the file to avoid memory leaks) */ close(): Promise; #private; } type Resource = { resourceType: string; contentType: string; contentLength: number; stream: stream.Readable; contentEncoding?: "gzip" | undefined; }; export { Reader, type Resource };