import { type FilterName, type FilterSetting } from './filters.js'; import type { Options, ParseOptions } from './types.js'; export declare const DEFAULT_DATA_ATTRIBUTE = "filter"; /** 🖼 A CSS & Canvas Instagram filters based on CSSgram */ export declare class CCgram { static readonly DEFAULT_DATA_ATTRIBUTE = "filter"; static readonly DEFAULT_FILTERS: Map; /** filter list */ protected readonly _filters: Map; /** data attribute */ protected _dataAttribute: string; /** data attribute key in camelCase for dataset access */ protected _dataAttributeKey: string; /** Initialize CSS filter to all targets */ constructor({ dataAttribute, init, }?: Options); /** The filter name list */ get filterNames(): FilterName[]; /** * Add/Set filter * @param name - the Filter name * @param setting - the Filter setting */ setFilter(name: FilterName, setting: FilterSetting): void; /** * Remove filter * @param name - the Filter name */ removeFilter(name: FilterName): boolean; /** * Get setting object of filter * @param [name=''] - The filter name */ getFilterSetting(name?: FilterName): FilterSetting | void; /** * Get the CSS inline style string of filter * @param [name=''] - The filter name */ getFilterStyle(name?: FilterName): string; /** * Apply CSS filter to all targets * @param [selectors='img[data-${this._dataAttribute}]'] - selectors */ applyFilter(selectors?: string): void; /** * Get the data URL of image element * @param image - image element * @param [options] - options */ getDataURL(image: HTMLImageElement, options?: ParseOptions): Promise; /** * Get the blob of image element * @param image - image element * @param [options={}] - parse options */ getBlob(image: HTMLImageElement, options?: ParseOptions): Promise; } /** old Name, alias for `CCgram` */ export declare const CCGram: typeof CCgram; /** alias for `CCgram` */ export declare const Filter: typeof CCgram; export type FilterInstance = InstanceType; export declare function createFilter(options?: Options): FilterInstance;