IOweb/node_modules/@iconify/tools/lib/optimise/mask.d.cts
2026-07-03 15:07:38 -05:00

24 lines
780 B
TypeScript

import { Color } from '@iconify/utils/lib/colors/types';
import { SVG } from '../svg/index.cjs';
import 'cheerio';
import '@iconify/types';
import '@iconify/utils/lib/customisations/defaults';
type ColorCallback = (value: string, color: Color | null) => boolean;
type ColorCheck = string | string[] | ColorCallback;
interface SVGToMaskOptions {
color?: string;
solid?: ColorCheck;
transparent?: ColorCheck;
custom?: (value: string, color: Color | null) => string | number | undefined;
force?: boolean;
id?: string;
}
/**
* Converts SVG to mask
*
* Fixes badly designed icons, which use white shape where icon supposed to be transparent
*/
declare function convertSVGToMask(svg: SVG, options?: SVGToMaskOptions): boolean;
export { convertSVGToMask };