import { type Unzipped, type Zippable } from 'fflate'; import type { LottieAsset, LottieJSON, LottieManifest, ObjectFit } from './types.js'; export declare enum PlayerState { Completed = "completed", Destroyed = "destroyed", Error = "error", Frozen = "frozen", Loading = "loading", Paused = "paused", Playing = "playing", Stopped = "stopped" } export declare enum PlayMode { Bounce = "bounce", Normal = "normal" } export declare enum PlayerEvents { Complete = "awc-lottie-complete", Destroyed = "awc-lottie-destroyed", Error = "awc-lottie-error", Frame = "awc-lottie-frame", Freeze = "awc-lottie-freeze", Load = "awc-lottie-load", Loop = "awc-lottie-loop", Next = "awc-lottie-next", Pause = "awc-lottie-pause", Play = "awc-lottie-play", Previous = "awc-lottie-previous", Ready = "awc-lottie-ready", Rendered = "awc-lottie-rendered", Stop = "awc-lottie-stop" } export declare class CustomError extends Error { status?: number; } export declare const addExt: (ext: string, str?: string) => string | undefined; export declare const aspectRatio: (objectFit: ObjectFit) => "none" | "xMidYMid meet" | "xMidYMid slice" | "xMinYMin slice"; /** * Convert Base64 encoded string to Uint8Array * @param { string } str Base64 encoded string * @returns { Uint8Array } UTF-8/Latin-1 binary */ export declare const base64ToU8: (str: string) => Uint8Array; /** * Convert a JSON Lottie to dotLottie or combine several animations and download new dotLottie file in your browser. */ export declare const createDotLottie: ({ animations, manifest, fileName, shouldDownload }: { animations?: LottieJSON[]; manifest: LottieManifest; fileName?: string; shouldDownload?: boolean; }) => Promise; export declare const createJSON: ({ animation, fileName, shouldDownload }: { animation?: LottieJSON; fileName?: string; shouldDownload?: boolean; }) => string | void; /** * Download file, either SVG or dotLottie. * @param { string } data The data to be downloaded * @param { string } name Don't include file extension in the filename */ export declare const download: (data: string | ArrayBuffer, options?: { name: string; mimeType: string; }) => void; export declare const fileToBase64: (url: string) => Promise; export declare const frameOutput: (frame?: number) => string; export declare const getAnimationData: (input: unknown) => Promise<{ animations?: LottieJSON[]; manifest?: LottieManifest; isDotLottie: boolean; }>; export declare const getArrayBuffer: (zippable: Zippable) => Promise; /** * Get extension from filename, URL or path * @param { string } str Filename, URL or path */ export declare const getExt: (str?: string) => string | undefined; export declare const getExtFromB64: (str: string) => string; /** * Parse URL to get filename * @param { string } src The url string * @param { boolean } keepExt Whether to include file extension * @returns { string } Filename, in lowercase */ export declare const getFilename: (src: string, keepExt?: boolean) => string; export declare const getLottieJSON: (resp: Response) => Promise<{ data: LottieJSON[]; manifest: LottieManifest; }>; export declare const getManifest: (unzipped: Unzipped) => LottieManifest; export declare const getMimeFromExt: (ext?: string) => string; export declare const handleErrors: (err: unknown) => { message: string; status: number; }; export declare const hasExt: (path?: string) => boolean | "" | undefined; export declare const isAudio: (asset: LottieAsset) => boolean; export declare const isBase64: (str?: string) => boolean; export declare const isImage: (asset: LottieAsset) => boolean; export declare const isServer: () => boolean; export declare const parseBase64: (str: string) => string; export declare const resolveAssets: (unzipped: Unzipped, assets?: LottieAsset[]) => Promise; export declare const unzip: (resp: Response) => Promise; export declare const useId: (prefix?: string) => string;