import { type SVGProps } from 'react'; import { type LucideIcon } from 'lucide-react'; /** * One registry for every Lucide glyph resolved by name, shared by the * sidebar, table actions, menus and any host code. * * - A glyph resolves synchronously once this browser has seen it: its SVG * data is kept in localStorage and rebuilt on the next load, before the * first render, instead of waiting for its chunk. * - Each name maps to one component for the page's life, so a glyph never * remounts as a different component once its chunk arrives. * - Until an unseen glyph loads, draws an empty of the same * size, so the text next to it doesn't move when it appears. */ export type GlyphNode = [string, Record][]; /** localStorage entry with the SVG data of every glyph seen on this origin. */ export declare const GLYPH_STORE_KEY = "mc:ui:glyphs:v1"; /** `shopping-cart`, `shopping_cart`, `ShoppingCart` → `shopping-cart`. */ export declare function glyphKey(name: string): string; /** * The glyph for `name` if it can render right now: registered, loaded * earlier in this page, or stored by a previous visit. Undefined otherwise. */ export declare function getGlyph(name: string): LucideIcon | undefined; /** True once `name` was looked up and Lucide has no such glyph. */ export declare function isMissingGlyph(name: string): boolean; /** Loads `name` (once per page). Resolves null for a name Lucide lacks. */ export declare function loadGlyph(name: string): Promise; /** * Loads glyphs ahead of their first render, e.g. every action icon of a * table as soon as its metadata arrives, so opening a menu draws them at once. */ export declare function preloadGlyphs(names: Iterable): Promise; /** * Registers components the host already imports statically, so resolving * their names needs no chunk at all. */ export declare function registerGlyphs(icons: Record): void; export interface GlyphProps extends Omit, 'ref'> { name: string; className?: string; size?: number | string; /** Drawn instead of nothing when Lucide has no glyph by that name. */ fallback?: LucideIcon; } /** * A Lucide glyph by name. Renders synchronously when the glyph is known; * otherwise an empty of the same size holds its place until it loads. */ export declare function Glyph({ name, className, size, fallback: Fallback, style, ...rest }: GlyphProps): import("react").JSX.Element | null; //# sourceMappingURL=glyphs.d.ts.map