import { PathEl } from '../dom/index'; /** The subset of an element's inline style the mask target writes — structural * so a real HTMLElement's `.style` satisfies it. */ export interface MaskStyle { maskImage: string; webkitMaskImage: string; backgroundColor: string; } /** An element the mask target can drive (an HTMLElement, or a fake in tests). */ export interface MaskEl { style: MaskStyle; } export interface MaskTargetOptions { /** Stroke width of the mask geometry (Lucide's default is 2). */ strokeWidth?: number; /** Grid the icon's coordinates live on (Lucide/Iconify default: "0 0 24 24"). * Used to map the geometry onto the element's box. */ viewBox?: string; /** Set `background-color: currentColor` on first setup so the element shows * through the mask in the current text color, standalone (no icon class). * Turn off to keep an existing paint (e.g. a `bg-*` utility). Default true. */ paint?: boolean; } /** What `maskTarget` returns: the driver's write contract plus a `dispose` * that removes the hidden mask node (call it after `morph.destroy()` when * the element unmounts). */ export interface MaskPathEl extends PathEl { dispose: () => void; } /** Adapts an element into a `PathEl` whose writes drive a referenced SVG * mask, so `createMorph(maskTarget(el), icon)` animates a mask-styled * element instead of an inline ``. * * DOUBLE BUFFER, on purpose: WebKit does not reliably repaint a masked * element when the CONTENT of its referenced `` mutates — a lone mask * whose inner path `d` changes per frame renders frozen in Safari until the * flight ends. So the target keeps TWO masks and every `d` write lands on * the back buffer and re-points `mask-image` at it. */ export declare function maskTarget(el: MaskEl, opts?: MaskTargetOptions): MaskPathEl;