import { FetchableTile } from './FetchableTile.js'; import { CacheableTile } from './CacheableTile.js'; import { FetchFn } from '@allmaps/types'; /** * Raw JPEG tile data - stores compressed JPEG bytes for WASM decoding */ export type RawJpegData = { jpegBytes: Uint8ClampedArray; width: number; height: number; }; /** * Class for tiles that cache raw JPEG bytes for WASM decoding * This avoids JavaScript JPEG decoding and lets WASM handle it */ export declare class CacheableRawJpegTile extends CacheableTile { decodeJpegForDimensions: (jpegBytes: Uint8ClampedArray) => { width: number; height: number; }; constructor(fetchableTile: FetchableTile, decodeJpegForDimensions: (jpegBytes: Uint8ClampedArray) => { width: number; height: number; }, fetchFn?: FetchFn); /** * Fetch the tile and store raw JPEG bytes * Only decodes to get dimensions, then stores raw bytes for WASM */ fetch(): Promise; applySprites(): Promise; spritesDataToCachedTiles(): never[]; static createFactory(decodeJpegForDimensions: (jpegBytes: Uint8ClampedArray) => { width: number; height: number; }): (fetchableTile: FetchableTile, fetchFn?: FetchFn) => CacheableRawJpegTile; } /** * Class for tiles that have been fetched and cached as raw JPEG */ export declare class CachedRawJpegTile extends CacheableRawJpegTile { data: RawJpegData; }