//#region src/integrations/svg.d.ts interface ElementsKitSvgPlugin { name: string; enforce: "pre"; load(id: string): Promise; } interface ElementsKitSvgOptions { /** Ids this plugin claims. Default: any path ending `.svg?ek`. */ include?: RegExp; /** Ids to leave alone even when `include` matches. */ exclude?: RegExp; /** * Strip the root's `width`/`height` and default `fill` to `currentColor`, so * an icon sizes with the font and follows text color. Turn off for artwork * that carries its own palette and intrinsic size. */ normalize?: boolean; } /** Parsed root `` open tag plus everything between it and ``. */ interface SvgSource { attributes: Record; inner: string; } /** * Vite plugin: import an SVG file as an elements-kit component. * * `import Close from "./close.svg?ek"` yields a function component rendering * the file's root `` as a real elements-kit element — so `class`, * `style:`, `on:`, `ref` and reactive props all work — with the interior * markup passed through verbatim. * * Server rendering needs no special case: the generated module builds its tree * through `jsx`, which dispatches to whichever renderer is active, and the * interior rides the raw-HTML sink that the hydration claim walk already knows. * * Register it yourself in `vite.config` (or `astro.config`'s `vite.plugins`). * Coexists with vite-plugin-svgr — the `?ek` and `?react` queries claim * different ids. * * @example * ```ts * // vite.config.ts * import { defineConfig } from "vite"; * import elementsKitSvg from "elements-kit/integrations/svg"; * * export default defineConfig({ plugins: [elementsKitSvg()] }); * ``` * * ```tsx * import Close from "@material-symbols/svg-300/outlined/close.svg?ek"; * * * ``` */ declare function elementsKitSvg(options?: ElementsKitSvgOptions): ElementsKitSvgPlugin; declare function generateModule(source: string, { normalize: shouldNormalize, name }?: { normalize?: boolean | undefined; name?: string | undefined; }): string; declare function parseSvg(source: string): SvgSource; //#endregion export { ElementsKitSvgOptions, ElementsKitSvgPlugin, SvgSource, elementsKitSvg as default, generateModule, parseSvg };