@ai-matrx/icons 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.5
4
+
5
+ - Fix: the lazy Lucide map is imported as `lucide-react/dynamicIconImports.mjs`. lucide-react has
6
+ no exports map and ships only the `.mjs` file, and esbuild's default extensions skip `.mjs`, so
7
+ 0.3.4 broke every esbuild host bundle (the frontend kind sandbox — all four Vercel builds).
8
+ Guard: `src/lucide-lazy.test.ts` names the specifier and proves the file exists.
9
+ - Consumer action: none.
10
+
3
11
  ## 0.3.4
4
12
 
5
13
  - First-screen bundle law (chat side-panel budget, lanes/agents-chat-proposal W1). `dist/index.js`
package/dist/index.cjs CHANGED
@@ -384,7 +384,7 @@ function lucideIndex() {
384
384
  const holder = globalThis;
385
385
  let index = holder[INDEX_SLOT];
386
386
  if (!index) {
387
- index = import("lucide-react/dynamicIconImports").then((mod) => {
387
+ index = import("lucide-react/dynamicIconImports.mjs").then((mod) => {
388
388
  const imports = mod.default ?? mod;
389
389
  const map = /* @__PURE__ */ new Map();
390
390
  for (const key of Object.keys(imports)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/static-icons.ts","../src/custom-icons.ts","../src/svg-registry.ts","../src/lucide-name-normalize.ts","../src/lucide-module-icon.ts","../src/resolver.tsx","../src/cn.ts","../src/lucide-lazy.ts"],"sourcesContent":["export type { IconComponentType, IconRenderProps } from \"./types\";\nexport {\n staticLucideIconMap,\n extendStaticIcons,\n} from \"./static-icons\";\nexport {\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nexport {\n registerSvgIcons,\n parseSvgIconPath,\n isSvgIconValue,\n listSvgIconValues,\n} from \"./svg-registry\";\nexport {\n extractLucideJsxIconName,\n kebabCaseToLucidePascalCase,\n collectLucideIconNameCandidates,\n} from \"./lucide-name-normalize\";\nexport { isLucideModuleIconExport } from \"./lucide-module-icon\";\nexport {\n default as IconResolver,\n type IconResolverProps,\n DynamicIcon,\n type DynamicIconProps,\n getIconComponent,\n renderIcon,\n getCuratedIconIdsForPicker,\n isIconRegisteredSync,\n isRegisteredOrLucideIconName,\n isHexColor,\n getTextColorClass,\n getIconWithColorAndSize,\n} from \"./resolver\";\n","// Statically import commonly used Lucide icons to reduce bundle size.\n// This curated hot set is the product: a hit here renders synchronously,\n// with zero dynamic-import latency and no fallback flash.\nimport {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n} from \"lucide-react\";\nimport type { IconComponentType } from \"./types\";\n\nexport { Zap as fallbackZapIcon };\n\n// Statically imported Lucide icons map (commonly used icons for optimal bundle size)\n// Exported so callers can spread it as a scope without importing the full lucide namespace.\nexport const staticLucideIconMap: Record<string, IconComponentType> = {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n};\n\n/**\n * Extend the static (synchronous, zero-latency) icon map with host-supplied\n * components — extra statically imported Lucide icons a host uses on hot paths,\n * or any component matching {@link IconComponentType}. Merges in place; later\n * registrations override earlier entries of the same name.\n */\nexport function extendStaticIcons(map: Record<string, IconComponentType>): void {\n Object.assign(staticLucideIconMap, map);\n}\n","/**\n * Curated brand/custom icon names served from the OPTIONAL `react-icons` peer.\n *\n * Coupling inversion vs. the original (which statically imported react-icons):\n * `react-icons` is an optional peerDependency, so these are lazy-imported on first\n * use and cached at module level. When the host has not installed `react-icons`,\n * loading degrades to null and the resolver renders the fallback icon instead —\n * no install-time or import-time failure.\n */\nimport type { IconComponentType } from \"./types\";\n\n/**\n * name → loader of exactly that one export. Each loader DESTRUCTURES its one icon from the\n * dynamic import so the host bundler tree-shakes the subpackage: a namespace `mod[name]` lookup\n * forced the whole of react-icons/fa6 (~480 kB gzip) into the first screen whenever any other\n * module imported a single Fa icon statically. Guarded by src/lucide-lazy.test.ts.\n */\nconst CUSTOM_ICON_LOADERS: Record<string, () => Promise<unknown>> = {\n FaBrave: () => import(\"react-icons/fa6\").then(({ FaBrave }) => FaBrave),\n FcGoogle: () => import(\"react-icons/fc\").then(({ FcGoogle }) => FcGoogle),\n FcBrokenLink: () => import(\"react-icons/fc\").then(({ FcBrokenLink }) => FcBrokenLink),\n FcFilm: () => import(\"react-icons/fc\").then(({ FcFilm }) => FcFilm),\n FcDownload: () => import(\"react-icons/fc\").then(({ FcDownload }) => FcDownload),\n FcBiotech: () => import(\"react-icons/fc\").then(({ FcBiotech }) => FcBiotech),\n FcElectronics: () => import(\"react-icons/fc\").then(({ FcElectronics }) => FcElectronics),\n FcGraduationCap: () => import(\"react-icons/fc\").then(({ FcGraduationCap }) => FcGraduationCap),\n FcLibrary: () => import(\"react-icons/fc\").then(({ FcLibrary }) => FcLibrary),\n FcMusic: () => import(\"react-icons/fc\").then(({ FcMusic }) => FcMusic),\n FcParallelTasks: () => import(\"react-icons/fc\").then(({ FcParallelTasks }) => FcParallelTasks),\n FcSalesPerformance: () => import(\"react-icons/fc\").then(({ FcSalesPerformance }) => FcSalesPerformance),\n FcCalendar: () => import(\"react-icons/fc\").then(({ FcCalendar }) => FcCalendar),\n FcDocument: () => import(\"react-icons/fc\").then(({ FcDocument }) => FcDocument),\n FcEngineering: () => import(\"react-icons/fc\").then(({ FcEngineering }) => FcEngineering),\n FcDataProtection: () => import(\"react-icons/fc\").then(({ FcDataProtection }) => FcDataProtection),\n FcAssistant: () => import(\"react-icons/fc\").then(({ FcAssistant }) => FcAssistant),\n FcSms: () => import(\"react-icons/fc\").then(({ FcSms }) => FcSms),\n FcTodoList: () => import(\"react-icons/fc\").then(({ FcTodoList }) => FcTodoList),\n FcWikipedia: () => import(\"react-icons/fc\").then(({ FcWikipedia }) => FcWikipedia),\n FcCommandLine: () => import(\"react-icons/fc\").then(({ FcCommandLine }) => FcCommandLine),\n FcConferenceCall: () => import(\"react-icons/fc\").then(({ FcConferenceCall }) => FcConferenceCall),\n FcManager: () => import(\"react-icons/fc\").then(({ FcManager }) => FcManager),\n FcAreaChart: () => import(\"react-icons/fc\").then(({ FcAreaChart }) => FcAreaChart),\n FcMultipleInputs: () => import(\"react-icons/fc\").then(({ FcMultipleInputs }) => FcMultipleInputs),\n FcShipped: () => import(\"react-icons/fc\").then(({ FcShipped }) => FcShipped),\n FcBusinessContact: () => import(\"react-icons/fc\").then(({ FcBusinessContact }) => FcBusinessContact),\n FcAlphabeticalSortingAz: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingAz }) => FcAlphabeticalSortingAz),\n FcAlphabeticalSortingZa: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingZa }) => FcAlphabeticalSortingZa),\n FcFeedback: () => import(\"react-icons/fc\").then(({ FcFeedback }) => FcFeedback),\n FcBusiness: () => import(\"react-icons/fc\").then(({ FcBusiness }) => FcBusiness),\n FcSignature: () => import(\"react-icons/fc\").then(({ FcSignature }) => FcSignature),\n};\n\n/**\n * Cache for lazily loaded custom icons (also the sync-lookup source once\n * loaded). Lives on a globalThis Symbol.for slot, NOT module state — dual\n * ESM/CJS unsplit bundles each instantiate their own module graph, and a\n * module-level cache would load the same icon once per graph and let a\n * sync lookup miss what the other graph already loaded. Never \"clean this up\".\n */\nconst CUSTOM_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.custom-icon-cache\");\nexport const customIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[CUSTOM_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[CUSTOM_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/** True when `name` is one of the curated custom (react-icons) ids. */\nexport function isCustomIconName(name: string): boolean {\n return Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name);\n}\n\n/** The curated custom icon ids (known without loading react-icons). */\nexport function listCustomIconNames(): string[] {\n return Object.keys(CUSTOM_ICON_LOADERS);\n}\n\n/**\n * Lazy-load a curated custom icon from the optional `react-icons` peer.\n * Returns null for unknown names, a missing export, or when `react-icons`\n * is not installed — the caller degrades to the fallback icon.\n */\nexport async function loadCustomIcon(\n name: string,\n): Promise<IconComponentType | null> {\n const cached = customIconCache[name];\n if (cached) {\n return cached;\n }\n const load = Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name)\n ? CUSTOM_ICON_LOADERS[name]\n : undefined;\n if (!load) {\n return null;\n }\n try {\n const exported = await load();\n if (typeof exported !== \"function\") {\n return null;\n }\n const IconComponent = exported as IconComponentType;\n customIconCache[name] = IconComponent;\n return IconComponent;\n } catch {\n // react-icons not installed (optional peer) — degrade to the fallback icon.\n return null;\n }\n}\n","/**\n * Injectable registry for host-owned SVG assets. Stored icon ids use the form\n * `svg:<path-without-leading-slash-and-without-extension>` e.g. `svg:icons/Home`\n * → whatever URL the host registered for the id `icons/Home` (typically `/icons/Home.svg`).\n *\n * The package ships EMPTY — the host application registers its own asset paths once at\n * startup via {@link registerSvgIcons}. An unregistered `svg:` value resolves to null\n * and the resolver falls back exactly as it does for an unknown Lucide name.\n */\n// The registry lives on a globalThis Symbol.for slot, NOT module state: with\n// dual ESM/CJS unsplit bundles each loader graph instantiates its own module,\n// and a module-level map would silently split the host's registrations from\n// a consumer resolving through the other graph. Never \"clean this up\".\nconst SVG_REGISTRY_SLOT = Symbol.for(\"ai-matrx.icons.svg-registry\");\nconst svgIconRegistry: Record<string, string> = (() => {\n const holder = globalThis as Record<symbol, Record<string, string> | undefined>;\n let reg = holder[SVG_REGISTRY_SLOT];\n if (!reg) {\n reg = {};\n holder[SVG_REGISTRY_SLOT] = reg;\n }\n return reg;\n})();\n\nconst SVG_PREFIX = \"svg:\";\n\n/**\n * Register (or override) `svg:` icon ids → asset URLs. Merges into the module-level\n * registry, so multiple calls compose. Ids are stored without the `svg:` prefix.\n */\nexport function registerSvgIcons(map: Record<string, string>): void {\n for (const [rawId, path] of Object.entries(map)) {\n const id = rawId.startsWith(SVG_PREFIX)\n ? rawId.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\")\n : rawId.replace(/^\\/+/, \"\");\n if (id && path) {\n svgIconRegistry[id] = path;\n }\n }\n}\n\n/** The registered asset URL for a `svg:…` icon value, or null when not a registered svg icon. */\nexport function parseSvgIconPath(value: string): string | null {\n if (!value.startsWith(SVG_PREFIX)) {\n return null;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n const path = svgIconRegistry[id];\n return path ?? null;\n}\n\n/** True if `value` is a `svg:…` id with a registered asset path. */\nexport function isSvgIconValue(value: string | null | undefined): boolean {\n if (!value || !value.startsWith(SVG_PREFIX)) {\n return false;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n return Boolean(svgIconRegistry[id]);\n}\n\n/** Every registered svg icon value, `svg:` prefix included (for pickers/galleries). */\nexport function listSvgIconValues(): string[] {\n return Object.keys(svgIconRegistry).map((id) => `${SVG_PREFIX}${id}`);\n}\n","/**\n * Lucide.dev lists icons in kebab-case (e.g. `alarm-clock`); the React package\n * exports PascalCase (`AlarmClock`). Normalize pasted / typed names into candidates\n * to validate against `lucide-react` exports.\n */\n\n/**\n * If the user pasted Lucide's JSX snippet (e.g. `'<BugPlay />'` or `<AlignCenterHorizontal />`),\n * return the component name only. Otherwise return null.\n *\n * Supports optional outer quotes and optional attributes before the closing `/>`.\n */\nexport function extractLucideJsxIconName(raw: string): string | null {\n let s = raw.trim();\n if (!s) return null;\n if (\n (s.startsWith(\"'\") && s.endsWith(\"'\") && s.length >= 2) ||\n (s.startsWith('\"') && s.endsWith('\"') && s.length >= 2)\n ) {\n s = s.slice(1, -1).trim();\n }\n const m = s.match(/^<\\s*([A-Za-z][A-Za-z0-9]*)(?:\\s[^>]*)?\\s*\\/\\s*>$/);\n return m?.[1] ?? null;\n}\n\n/** `alarm-clock` → `AlarmClock`, `a-arrow-down` → `AArrowDown` */\nexport function kebabCaseToLucidePascalCase(raw: string): string {\n const s = raw.trim();\n if (!s.includes(\"-\")) {\n return s;\n }\n return s\n .split(\"-\")\n .filter(Boolean)\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).toLowerCase())\n .join(\"\");\n}\n\n/**\n * Ordered unique candidates: exact input, first-letter fix, kebab → Pascal variants.\n * Skip Lucide heuristics for `svg:…` asset values (caller should pass only those as `[trimmed]`).\n */\nexport function collectLucideIconNameCandidates(raw: string): string[] {\n const t = raw.trim();\n if (!t) {\n return [];\n }\n\n const out: string[] = [];\n const push = (s: string) => {\n if (s && !out.includes(s)) {\n out.push(s);\n }\n };\n\n push(t);\n\n if (t[0] === t[0]!.toLowerCase()) {\n push(t.charAt(0).toUpperCase() + t.slice(1));\n }\n\n if (t.includes(\"-\")) {\n push(kebabCaseToLucidePascalCase(t));\n const lower = t.toLowerCase();\n if (lower !== t) {\n push(kebabCaseToLucidePascalCase(lower));\n }\n }\n\n return out;\n}\n","/**\n * lucide-react namespaced exports: icons are ForwardRef/Memo objects in current builds,\n * not plain functions. Only createLucideIcon and default are non-icon exports we skip.\n */\nconst LUCIDE_NAMESPACE_DENYLIST = new Set([\"default\", \"createLucideIcon\"]);\n\n/**\n * True if `exported` is the value of a Lucide icon entry for `name` in `import * as Lucide`.\n * Does not mean the icon exists in the static resolver map — only that the lucide-react\n * module exposes this name as a renderable component type.\n */\nexport function isLucideModuleIconExport(\n name: string,\n exported: unknown,\n): boolean {\n if (!name || LUCIDE_NAMESPACE_DENYLIST.has(name)) return false;\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n if (typeof exported === \"object\" && \"$$typeof\" in (exported as object)) {\n return true;\n }\n return false;\n}\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n staticLucideIconMap,\n fallbackZapIcon as Zap,\n} from \"./static-icons\";\nimport {\n customIconCache,\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nimport { hasLucideIcon, loadLucideIcon } from \"./lucide-lazy\";\nimport {\n isSvgIconValue,\n listSvgIconValues,\n parseSvgIconPath,\n} from \"./svg-registry\";\nimport type { IconComponentType, IconRenderProps } from \"./types\";\n\n// Cache for dynamically loaded icons to prevent re-importing. Lives on a\n// globalThis Symbol.for slot, NOT module state — dual ESM/CJS unsplit bundles\n// each instantiate their own module graph, and a per-graph cache would\n// re-import icons the other graph already resolved. Never \"clean this up\".\nconst DYNAMIC_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.dynamic-icon-cache\");\nconst dynamicIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[DYNAMIC_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[DYNAMIC_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/**\n * Finite list for a curated icon gallery: every statically bundled Lucide name,\n * curated custom ids (react-icons), and all registered `svg:…` assets.\n */\nexport function getCuratedIconIdsForPicker(): string[] {\n const set = new Set<string>();\n for (const k of Object.keys(staticLucideIconMap)) {\n set.add(k);\n }\n for (const k of listCustomIconNames()) {\n set.add(k);\n }\n for (const id of listSvgIconValues()) {\n set.add(id);\n }\n return Array.from(set).sort((a, b) =>\n a.localeCompare(b, undefined, { sensitivity: \"base\" }),\n );\n}\n\n/**\n * True if this exact name maps to a known icon (static Lucide, curated custom id, or\n * previously resolved dynamic Lucide cached under this key).\n *\n * Does not import lucide-react — use with {@link isRegisteredOrLucideIconName} for full checks.\n */\nexport function isIconRegisteredSync(\n iconName: string | null | undefined,\n): boolean {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n const name = iconName;\n if (isCustomIconName(name)) return true;\n if (staticLucideIconMap[name]) return true;\n return Boolean(dynamicIconCache[name]);\n}\n\n/**\n * True if `iconName` is a real icon id: custom/static/cached, a registered `svg:…`\n * asset, or a Lucide export that is a renderable component (not the fallback Zap).\n *\n * Prefer this over truthiness on {@link getIconComponent}, which always returns a component.\n */\nexport async function isRegisteredOrLucideIconName(\n iconName: string | null | undefined,\n): Promise<boolean> {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n if (isSvgIconValue(iconName)) {\n return true;\n }\n if (isIconRegisteredSync(iconName)) {\n return true;\n }\n try {\n return await hasLucideIcon(iconName);\n } catch {\n return false;\n }\n}\n\n/**\n * HOW TO ADD MORE STATIC ICONS:\n *\n * The curated hot set ships in the package (src/static-icons.ts). A host that\n * frequently renders an icon outside the set keeps it zero-latency by statically\n * importing it and registering it once at startup:\n *\n * import { YourIcon } from \"lucide-react\";\n * import { extendStaticIcons } from \"@ai-matrx/icons\";\n * extendStaticIcons({ YourIcon });\n */\n\nexport interface IconResolverProps {\n iconName: string | null;\n className?: string | undefined;\n size?: number | undefined;\n fallbackIcon?: string | undefined;\n style?: React.CSSProperties | undefined;\n}\n\n/**\n * IconResolver - A unified component for resolving and rendering icons by name\n * Uses hybrid approach: static imports for common icons, dynamic imports for others\n * Supports all lucide-react icons, curated custom icons (optional react-icons peer),\n * and registered `svg:…` public assets.\n */\nconst IconResolver: React.FC<IconResolverProps> = ({\n iconName,\n className = \"h-4 w-4\",\n size,\n fallbackIcon = \"Zap\",\n style,\n}) => {\n const svgSrc = iconName ? parseSvgIconPath(iconName) : null;\n const [DynamicIcon, setDynamicIcon] = useState<IconComponentType | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n const loadIcon = async () => {\n if (!iconName) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n if (parseSvgIconPath(iconName)) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n // Check custom icons first (already-loaded cache hit is synchronous)\n const cachedCustom = customIconCache[iconName];\n if (cachedCustom) {\n setDynamicIcon(() => cachedCustom);\n return;\n }\n\n // Check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n setDynamicIcon(() => staticIcon);\n return;\n }\n\n // Check if already cached\n const cachedDynamic = dynamicIconCache[iconName];\n if (cachedDynamic) {\n setDynamicIcon(() => cachedDynamic);\n return;\n }\n\n // Curated custom icon: lazy-import the optional react-icons peer;\n // degrade to the fallback icon when it is absent.\n if (isCustomIconName(iconName)) {\n setIsLoading(true);\n const loaded = await loadCustomIcon(iconName);\n if (cancelled) return;\n if (loaded) {\n setDynamicIcon(() => loaded);\n } else {\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n setIsLoading(false);\n return;\n }\n\n // Dynamically import from lucide-react\n setIsLoading(true);\n try {\n // One icon, one chunk — never the lucide-react namespace (see lucide-lazy.ts).\n const IconComponent = await loadLucideIcon(iconName);\n if (cancelled) return;\n\n if (IconComponent) {\n dynamicIconCache[iconName] = IconComponent;\n setDynamicIcon(() => IconComponent);\n } else {\n // Icon not found, use fallback\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n } catch (error) {\n if (cancelled) return;\n console.warn(`Failed to load icon: ${iconName}`, error);\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n } finally {\n if (!cancelled) setIsLoading(false);\n }\n };\n\n loadIcon();\n // Cancellation: without it, a slow dynamic import resolving after unmount\n // (or after iconName changed) called setState on a dead/stale effect.\n return () => {\n cancelled = true;\n };\n }, [iconName, fallbackIcon]);\n\n if (svgSrc) {\n return (\n <img\n src={svgSrc}\n alt=\"\"\n className={cn(\"object-contain shrink-0\", className)}\n width={size}\n height={size}\n style={style}\n />\n );\n }\n\n // Get the icon component to render\n const IconComponent = DynamicIcon || staticLucideIconMap[fallbackIcon] || Zap;\n\n // Build exact-optional props (never pass an explicit undefined through)\n const iconProps: IconRenderProps = {\n ...(className !== undefined ? { className } : {}),\n ...(size !== undefined ? { size } : {}),\n ...(style !== undefined ? { style } : {}),\n };\n\n // Show fallback while loading dynamic icons (seamless experience)\n if (isLoading && !DynamicIcon) {\n const FallbackIcon = staticLucideIconMap[fallbackIcon] || Zap;\n return <FallbackIcon {...iconProps} />;\n }\n\n return <IconComponent {...iconProps} />;\n};\n\nexport default IconResolver;\n\n/**\n * Synchronous utility function for getting icon components directly\n * Only works with statically imported icons plus already-loaded custom/dynamic icons.\n * For dynamic Lucide icons not in the static map, use the IconResolver component instead\n *\n * **Always returns a component** (default/fallback Zap when unknown). Do not use the return\n * value to infer whether `iconName` exists — use {@link isIconRegisteredSync} or\n * {@link isRegisteredOrLucideIconName} instead.\n */\nexport const getIconComponent = (\n iconName: string | null | undefined,\n fallbackIcon: string = \"Zap\",\n): IconComponentType => {\n if (!iconName) {\n return staticLucideIconMap[fallbackIcon] || Zap;\n }\n\n // First check custom icons (loaded lazily; a hit means it is already cached)\n const custom = customIconCache[iconName];\n if (custom) {\n return custom;\n }\n\n // Then check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n return staticIcon;\n }\n\n // Check dynamic cache\n const dynamic = dynamicIconCache[iconName];\n if (dynamic) {\n return dynamic;\n }\n\n // Fallback to default icon\n return staticLucideIconMap[fallbackIcon] || Zap;\n};\n\n/**\n * Renders an icon element directly with optional props\n * This is the preferred method for rendering icons in JSX\n */\nexport const renderIcon = (\n iconName: string | null | undefined,\n props?: IconRenderProps,\n fallbackIcon: string = \"Zap\",\n) => {\n const IconComponent = getIconComponent(iconName, fallbackIcon);\n return <IconComponent {...props} />;\n};\n\n/**\n * Utility to detect if a string is a hex color code\n */\nexport const isHexColor = (color: string): boolean => {\n return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n};\n\nexport const getTextColorClass = (color?: string) => {\n if (!color) return \"text-gray-600 dark:text-gray-400\";\n\n // If it's a hex color, return null (we'll use inline styles instead)\n if (isHexColor(color)) return null;\n\n const colorMap: Record<string, string> = {\n gray: \"text-gray-600 dark:text-gray-400\",\n rose: \"text-rose-600 dark:text-rose-400\",\n blue: \"text-blue-600 dark:text-blue-400\",\n amber: \"text-amber-600 dark:text-amber-400\",\n cyan: \"text-cyan-600 dark:text-cyan-400\",\n emerald: \"text-emerald-600 dark:text-emerald-400\",\n fuchsia: \"text-fuchsia-600 dark:text-fuchsia-400\",\n green: \"text-green-600 dark:text-green-400\",\n indigo: \"text-indigo-600 dark:text-indigo-400\",\n lime: \"text-lime-600 dark:text-lime-400\",\n neutral: \"text-neutral-600 dark:text-neutral-400\",\n orange: \"text-orange-600 dark:text-orange-400\",\n pink: \"text-pink-600 dark:text-pink-400\",\n purple: \"text-purple-600 dark:text-purple-400\",\n red: \"text-red-600 dark:text-red-400\",\n sky: \"text-sky-600 dark:text-sky-400\",\n slate: \"text-slate-600 dark:text-slate-400\",\n stone: \"text-stone-600 dark:text-stone-400\",\n teal: \"text-teal-600 dark:text-teal-400\",\n violet: \"text-violet-600 dark:text-violet-400\",\n yellow: \"text-yellow-600 dark:text-yellow-400\",\n zinc: \"text-zinc-600 dark:text-zinc-400\",\n };\n\n return colorMap[color.toLowerCase()] || \"text-gray-600 dark:text-gray-400\";\n};\n\n/**\n * Utility function for rendering an icon with color and size\n * Note: This is synchronous and only works with statically imported icons\n * For dynamic icons, use the DynamicIcon component instead\n */\nexport const getIconWithColorAndSize = (\n iconName: string | null,\n color: string = \"gray\",\n size: number = 4,\n) => {\n const IconComponent = getIconComponent(iconName);\n const colorClass = getTextColorClass(color);\n // Hex colors have no Tailwind class (getTextColorClass returns null) —\n // they color via inline style. The original interpolated the null into the\n // className as a literal \"null\" token; fixed in 0.1.1.\n return (\n <IconComponent\n className={cn(`h-${size} w-${size}`, colorClass)}\n {...(colorClass === null ? { style: { color } } : {})}\n />\n );\n};\n\n/**\n * Simple Icon component for direct usage with color and size support\n * Uses IconResolver internally to support both static and dynamic icons\n *\n * Supports both Tailwind color names (e.g., \"blue\", \"red\", \"zinc\") and hex colors (e.g., \"#ff0000\", \"#666\")\n */\nexport interface DynamicIconProps {\n name: string | null;\n color?: string | undefined;\n size?: number | undefined;\n className?: string | undefined;\n fallbackIcon?: string | undefined;\n}\n\nexport const DynamicIcon: React.FC<DynamicIconProps> = ({\n name,\n color = \"gray\",\n size = 4,\n className,\n fallbackIcon = \"Zap\",\n}) => {\n const isHex = color && isHexColor(color);\n const colorClass = isHex ? null : getTextColorClass(color);\n const sizeClass = `h-${size} w-${size}`;\n\n // Build className: always include size, include colorClass if not hex, include custom className\n const combinedClassName = [sizeClass, !isHex && colorClass, className]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n // If hex color, apply as inline style\n const style = isHex ? { color } : undefined;\n\n return (\n <IconResolver\n iconName={name}\n className={combinedClassName}\n fallbackIcon={fallbackIcon}\n style={style}\n />\n );\n};\n","/**\n * Minimal className join — the only piece of `cn` this package needs.\n * No tailwind-merge / clsx dependency by design: callers pass literal strings.\n */\nexport function cn(\n ...values: Array<string | null | undefined | false>\n): string {\n return values.filter(Boolean).join(\" \").trim();\n}\n","/**\n * Per-icon lazy loading for the rest of the Lucide catalog.\n *\n * Never `import(\"lucide-react\")` (the namespace) at runtime: a host bundler that also sees static\n * named imports of lucide-react then puts EVERY icon (~1,500 kB source, ~190 kB gzip) into the\n * statically loaded chunk — the whole catalog lands on the first screen. Lucide's own\n * `dynamicIconImports` map (one `() => import(...)` per icon) keeps each icon its own chunk, so an\n * icon outside the static hot set costs one tiny request when first rendered.\n * Guarded by `lucide-lazy.test.ts` and the chat package's side-panel bundle budget.\n */\nimport type { IconComponentType } from \"./types\";\n\ntype IconLoader = () => Promise<{ default: unknown }>;\n\n/** `arrow-up-0-1` → `ArrowUp01` (Lucide's own export-name rule). */\nexport function lucideKeyToPascal(key: string): string {\n return key\n .split(\"-\")\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nconst INDEX_SLOT = Symbol.for(\"ai-matrx.icons.lucide-lazy-index\");\ntype IndexHolder = Record<symbol, Promise<Map<string, IconLoader>> | undefined>;\n\n/** PascalCase export name → loader, built once from lucide's map (aliases included). */\nfunction lucideIndex(): Promise<Map<string, IconLoader>> {\n const holder = globalThis as IndexHolder;\n let index = holder[INDEX_SLOT];\n if (!index) {\n index = import(\"lucide-react/dynamicIconImports\").then((mod) => {\n const imports = ((mod as { default?: unknown }).default ?? mod) as Record<string, IconLoader>;\n const map = new Map<string, IconLoader>();\n for (const key of Object.keys(imports)) {\n const loader = imports[key];\n if (typeof loader === \"function\") map.set(lucideKeyToPascal(key), loader);\n }\n return map;\n });\n // A failed load (lucide missing) must be retryable, not cached forever.\n index.catch(() => {\n if (holder[INDEX_SLOT] === index) holder[INDEX_SLOT] = undefined;\n });\n holder[INDEX_SLOT] = index;\n }\n return index;\n}\n\n/** `Home`, `HomeIcon` and `LucideHome` are the same Lucide icon. */\nfunction exportNameCandidates(name: string): string[] {\n const out = [name];\n const unprefixed = name.startsWith(\"Lucide\") ? name.slice(\"Lucide\".length) : name;\n if (unprefixed !== name) out.push(unprefixed);\n for (const n of [...out]) if (n.endsWith(\"Icon\") && n.length > 4) out.push(n.slice(0, -4));\n return out;\n}\n\nfunction isRenderable(exported: unknown): exported is IconComponentType {\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n return typeof exported === \"object\" && \"$$typeof\" in (exported as object);\n}\n\n/** True when `name` is an export name of the installed lucide-react catalog (no icon is loaded). */\nexport async function hasLucideIcon(name: string): Promise<boolean> {\n const index = await lucideIndex();\n return exportNameCandidates(name).some((n) => index.has(n));\n}\n\n/** Load ONE Lucide icon by export name; null when lucide-react has no such icon. */\nexport async function loadLucideIcon(name: string): Promise<IconComponentType | null> {\n const index = await lucideIndex();\n for (const candidate of exportNameCandidates(name)) {\n const loader = index.get(candidate);\n if (!loader) continue;\n const mod = await loader();\n return isRenderable(mod.default) ? mod.default : null;\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,0BAyIO;AAOA,IAAM,sBAAyD;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAQO,SAAS,kBAAkB,KAA8C;AAC9E,SAAO,OAAO,qBAAqB,GAAG;AACxC;;;ACrRA,IAAM,sBAA8D;AAAA,EAClE,SAAS,MAAM,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C1C;AAOO,IAAM,0BAA0B,CACrC,UACA,QAAgB,QAChB,OAAe,MACZ;AACH,QAAM,gBAAgB,iBAAiB,QAAQ;AAC/C,QAAM,aAAa,kBAAkB,KAAK;AAI1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,KAAK,IAAI,MAAM,IAAI,IAAI,UAAU;AAAA,MAC9C,GAAI,eAAe,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA;AAAA,EACrD;AAEJ;AAgBO,IAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,QAAQ,SAAS,WAAW,KAAK;AACvC,QAAM,aAAa,QAAQ,OAAO,kBAAkB,KAAK;AACzD,QAAM,YAAY,KAAK,IAAI,MAAM,IAAI;AAGrC,QAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,YAAY,SAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACR,KAAK;AAGR,QAAM,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":["DynamicIcon","IconComponent"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/static-icons.ts","../src/custom-icons.ts","../src/svg-registry.ts","../src/lucide-name-normalize.ts","../src/lucide-module-icon.ts","../src/resolver.tsx","../src/cn.ts","../src/lucide-lazy.ts"],"sourcesContent":["export type { IconComponentType, IconRenderProps } from \"./types\";\nexport {\n staticLucideIconMap,\n extendStaticIcons,\n} from \"./static-icons\";\nexport {\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nexport {\n registerSvgIcons,\n parseSvgIconPath,\n isSvgIconValue,\n listSvgIconValues,\n} from \"./svg-registry\";\nexport {\n extractLucideJsxIconName,\n kebabCaseToLucidePascalCase,\n collectLucideIconNameCandidates,\n} from \"./lucide-name-normalize\";\nexport { isLucideModuleIconExport } from \"./lucide-module-icon\";\nexport {\n default as IconResolver,\n type IconResolverProps,\n DynamicIcon,\n type DynamicIconProps,\n getIconComponent,\n renderIcon,\n getCuratedIconIdsForPicker,\n isIconRegisteredSync,\n isRegisteredOrLucideIconName,\n isHexColor,\n getTextColorClass,\n getIconWithColorAndSize,\n} from \"./resolver\";\n","// Statically import commonly used Lucide icons to reduce bundle size.\n// This curated hot set is the product: a hit here renders synchronously,\n// with zero dynamic-import latency and no fallback flash.\nimport {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n} from \"lucide-react\";\nimport type { IconComponentType } from \"./types\";\n\nexport { Zap as fallbackZapIcon };\n\n// Statically imported Lucide icons map (commonly used icons for optimal bundle size)\n// Exported so callers can spread it as a scope without importing the full lucide namespace.\nexport const staticLucideIconMap: Record<string, IconComponentType> = {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n};\n\n/**\n * Extend the static (synchronous, zero-latency) icon map with host-supplied\n * components — extra statically imported Lucide icons a host uses on hot paths,\n * or any component matching {@link IconComponentType}. Merges in place; later\n * registrations override earlier entries of the same name.\n */\nexport function extendStaticIcons(map: Record<string, IconComponentType>): void {\n Object.assign(staticLucideIconMap, map);\n}\n","/**\n * Curated brand/custom icon names served from the OPTIONAL `react-icons` peer.\n *\n * Coupling inversion vs. the original (which statically imported react-icons):\n * `react-icons` is an optional peerDependency, so these are lazy-imported on first\n * use and cached at module level. When the host has not installed `react-icons`,\n * loading degrades to null and the resolver renders the fallback icon instead —\n * no install-time or import-time failure.\n */\nimport type { IconComponentType } from \"./types\";\n\n/**\n * name → loader of exactly that one export. Each loader DESTRUCTURES its one icon from the\n * dynamic import so the host bundler tree-shakes the subpackage: a namespace `mod[name]` lookup\n * forced the whole of react-icons/fa6 (~480 kB gzip) into the first screen whenever any other\n * module imported a single Fa icon statically. Guarded by src/lucide-lazy.test.ts.\n */\nconst CUSTOM_ICON_LOADERS: Record<string, () => Promise<unknown>> = {\n FaBrave: () => import(\"react-icons/fa6\").then(({ FaBrave }) => FaBrave),\n FcGoogle: () => import(\"react-icons/fc\").then(({ FcGoogle }) => FcGoogle),\n FcBrokenLink: () => import(\"react-icons/fc\").then(({ FcBrokenLink }) => FcBrokenLink),\n FcFilm: () => import(\"react-icons/fc\").then(({ FcFilm }) => FcFilm),\n FcDownload: () => import(\"react-icons/fc\").then(({ FcDownload }) => FcDownload),\n FcBiotech: () => import(\"react-icons/fc\").then(({ FcBiotech }) => FcBiotech),\n FcElectronics: () => import(\"react-icons/fc\").then(({ FcElectronics }) => FcElectronics),\n FcGraduationCap: () => import(\"react-icons/fc\").then(({ FcGraduationCap }) => FcGraduationCap),\n FcLibrary: () => import(\"react-icons/fc\").then(({ FcLibrary }) => FcLibrary),\n FcMusic: () => import(\"react-icons/fc\").then(({ FcMusic }) => FcMusic),\n FcParallelTasks: () => import(\"react-icons/fc\").then(({ FcParallelTasks }) => FcParallelTasks),\n FcSalesPerformance: () => import(\"react-icons/fc\").then(({ FcSalesPerformance }) => FcSalesPerformance),\n FcCalendar: () => import(\"react-icons/fc\").then(({ FcCalendar }) => FcCalendar),\n FcDocument: () => import(\"react-icons/fc\").then(({ FcDocument }) => FcDocument),\n FcEngineering: () => import(\"react-icons/fc\").then(({ FcEngineering }) => FcEngineering),\n FcDataProtection: () => import(\"react-icons/fc\").then(({ FcDataProtection }) => FcDataProtection),\n FcAssistant: () => import(\"react-icons/fc\").then(({ FcAssistant }) => FcAssistant),\n FcSms: () => import(\"react-icons/fc\").then(({ FcSms }) => FcSms),\n FcTodoList: () => import(\"react-icons/fc\").then(({ FcTodoList }) => FcTodoList),\n FcWikipedia: () => import(\"react-icons/fc\").then(({ FcWikipedia }) => FcWikipedia),\n FcCommandLine: () => import(\"react-icons/fc\").then(({ FcCommandLine }) => FcCommandLine),\n FcConferenceCall: () => import(\"react-icons/fc\").then(({ FcConferenceCall }) => FcConferenceCall),\n FcManager: () => import(\"react-icons/fc\").then(({ FcManager }) => FcManager),\n FcAreaChart: () => import(\"react-icons/fc\").then(({ FcAreaChart }) => FcAreaChart),\n FcMultipleInputs: () => import(\"react-icons/fc\").then(({ FcMultipleInputs }) => FcMultipleInputs),\n FcShipped: () => import(\"react-icons/fc\").then(({ FcShipped }) => FcShipped),\n FcBusinessContact: () => import(\"react-icons/fc\").then(({ FcBusinessContact }) => FcBusinessContact),\n FcAlphabeticalSortingAz: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingAz }) => FcAlphabeticalSortingAz),\n FcAlphabeticalSortingZa: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingZa }) => FcAlphabeticalSortingZa),\n FcFeedback: () => import(\"react-icons/fc\").then(({ FcFeedback }) => FcFeedback),\n FcBusiness: () => import(\"react-icons/fc\").then(({ FcBusiness }) => FcBusiness),\n FcSignature: () => import(\"react-icons/fc\").then(({ FcSignature }) => FcSignature),\n};\n\n/**\n * Cache for lazily loaded custom icons (also the sync-lookup source once\n * loaded). Lives on a globalThis Symbol.for slot, NOT module state — dual\n * ESM/CJS unsplit bundles each instantiate their own module graph, and a\n * module-level cache would load the same icon once per graph and let a\n * sync lookup miss what the other graph already loaded. Never \"clean this up\".\n */\nconst CUSTOM_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.custom-icon-cache\");\nexport const customIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[CUSTOM_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[CUSTOM_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/** True when `name` is one of the curated custom (react-icons) ids. */\nexport function isCustomIconName(name: string): boolean {\n return Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name);\n}\n\n/** The curated custom icon ids (known without loading react-icons). */\nexport function listCustomIconNames(): string[] {\n return Object.keys(CUSTOM_ICON_LOADERS);\n}\n\n/**\n * Lazy-load a curated custom icon from the optional `react-icons` peer.\n * Returns null for unknown names, a missing export, or when `react-icons`\n * is not installed — the caller degrades to the fallback icon.\n */\nexport async function loadCustomIcon(\n name: string,\n): Promise<IconComponentType | null> {\n const cached = customIconCache[name];\n if (cached) {\n return cached;\n }\n const load = Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name)\n ? CUSTOM_ICON_LOADERS[name]\n : undefined;\n if (!load) {\n return null;\n }\n try {\n const exported = await load();\n if (typeof exported !== \"function\") {\n return null;\n }\n const IconComponent = exported as IconComponentType;\n customIconCache[name] = IconComponent;\n return IconComponent;\n } catch {\n // react-icons not installed (optional peer) — degrade to the fallback icon.\n return null;\n }\n}\n","/**\n * Injectable registry for host-owned SVG assets. Stored icon ids use the form\n * `svg:<path-without-leading-slash-and-without-extension>` e.g. `svg:icons/Home`\n * → whatever URL the host registered for the id `icons/Home` (typically `/icons/Home.svg`).\n *\n * The package ships EMPTY — the host application registers its own asset paths once at\n * startup via {@link registerSvgIcons}. An unregistered `svg:` value resolves to null\n * and the resolver falls back exactly as it does for an unknown Lucide name.\n */\n// The registry lives on a globalThis Symbol.for slot, NOT module state: with\n// dual ESM/CJS unsplit bundles each loader graph instantiates its own module,\n// and a module-level map would silently split the host's registrations from\n// a consumer resolving through the other graph. Never \"clean this up\".\nconst SVG_REGISTRY_SLOT = Symbol.for(\"ai-matrx.icons.svg-registry\");\nconst svgIconRegistry: Record<string, string> = (() => {\n const holder = globalThis as Record<symbol, Record<string, string> | undefined>;\n let reg = holder[SVG_REGISTRY_SLOT];\n if (!reg) {\n reg = {};\n holder[SVG_REGISTRY_SLOT] = reg;\n }\n return reg;\n})();\n\nconst SVG_PREFIX = \"svg:\";\n\n/**\n * Register (or override) `svg:` icon ids → asset URLs. Merges into the module-level\n * registry, so multiple calls compose. Ids are stored without the `svg:` prefix.\n */\nexport function registerSvgIcons(map: Record<string, string>): void {\n for (const [rawId, path] of Object.entries(map)) {\n const id = rawId.startsWith(SVG_PREFIX)\n ? rawId.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\")\n : rawId.replace(/^\\/+/, \"\");\n if (id && path) {\n svgIconRegistry[id] = path;\n }\n }\n}\n\n/** The registered asset URL for a `svg:…` icon value, or null when not a registered svg icon. */\nexport function parseSvgIconPath(value: string): string | null {\n if (!value.startsWith(SVG_PREFIX)) {\n return null;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n const path = svgIconRegistry[id];\n return path ?? null;\n}\n\n/** True if `value` is a `svg:…` id with a registered asset path. */\nexport function isSvgIconValue(value: string | null | undefined): boolean {\n if (!value || !value.startsWith(SVG_PREFIX)) {\n return false;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n return Boolean(svgIconRegistry[id]);\n}\n\n/** Every registered svg icon value, `svg:` prefix included (for pickers/galleries). */\nexport function listSvgIconValues(): string[] {\n return Object.keys(svgIconRegistry).map((id) => `${SVG_PREFIX}${id}`);\n}\n","/**\n * Lucide.dev lists icons in kebab-case (e.g. `alarm-clock`); the React package\n * exports PascalCase (`AlarmClock`). Normalize pasted / typed names into candidates\n * to validate against `lucide-react` exports.\n */\n\n/**\n * If the user pasted Lucide's JSX snippet (e.g. `'<BugPlay />'` or `<AlignCenterHorizontal />`),\n * return the component name only. Otherwise return null.\n *\n * Supports optional outer quotes and optional attributes before the closing `/>`.\n */\nexport function extractLucideJsxIconName(raw: string): string | null {\n let s = raw.trim();\n if (!s) return null;\n if (\n (s.startsWith(\"'\") && s.endsWith(\"'\") && s.length >= 2) ||\n (s.startsWith('\"') && s.endsWith('\"') && s.length >= 2)\n ) {\n s = s.slice(1, -1).trim();\n }\n const m = s.match(/^<\\s*([A-Za-z][A-Za-z0-9]*)(?:\\s[^>]*)?\\s*\\/\\s*>$/);\n return m?.[1] ?? null;\n}\n\n/** `alarm-clock` → `AlarmClock`, `a-arrow-down` → `AArrowDown` */\nexport function kebabCaseToLucidePascalCase(raw: string): string {\n const s = raw.trim();\n if (!s.includes(\"-\")) {\n return s;\n }\n return s\n .split(\"-\")\n .filter(Boolean)\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).toLowerCase())\n .join(\"\");\n}\n\n/**\n * Ordered unique candidates: exact input, first-letter fix, kebab → Pascal variants.\n * Skip Lucide heuristics for `svg:…` asset values (caller should pass only those as `[trimmed]`).\n */\nexport function collectLucideIconNameCandidates(raw: string): string[] {\n const t = raw.trim();\n if (!t) {\n return [];\n }\n\n const out: string[] = [];\n const push = (s: string) => {\n if (s && !out.includes(s)) {\n out.push(s);\n }\n };\n\n push(t);\n\n if (t[0] === t[0]!.toLowerCase()) {\n push(t.charAt(0).toUpperCase() + t.slice(1));\n }\n\n if (t.includes(\"-\")) {\n push(kebabCaseToLucidePascalCase(t));\n const lower = t.toLowerCase();\n if (lower !== t) {\n push(kebabCaseToLucidePascalCase(lower));\n }\n }\n\n return out;\n}\n","/**\n * lucide-react namespaced exports: icons are ForwardRef/Memo objects in current builds,\n * not plain functions. Only createLucideIcon and default are non-icon exports we skip.\n */\nconst LUCIDE_NAMESPACE_DENYLIST = new Set([\"default\", \"createLucideIcon\"]);\n\n/**\n * True if `exported` is the value of a Lucide icon entry for `name` in `import * as Lucide`.\n * Does not mean the icon exists in the static resolver map — only that the lucide-react\n * module exposes this name as a renderable component type.\n */\nexport function isLucideModuleIconExport(\n name: string,\n exported: unknown,\n): boolean {\n if (!name || LUCIDE_NAMESPACE_DENYLIST.has(name)) return false;\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n if (typeof exported === \"object\" && \"$$typeof\" in (exported as object)) {\n return true;\n }\n return false;\n}\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n staticLucideIconMap,\n fallbackZapIcon as Zap,\n} from \"./static-icons\";\nimport {\n customIconCache,\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nimport { hasLucideIcon, loadLucideIcon } from \"./lucide-lazy\";\nimport {\n isSvgIconValue,\n listSvgIconValues,\n parseSvgIconPath,\n} from \"./svg-registry\";\nimport type { IconComponentType, IconRenderProps } from \"./types\";\n\n// Cache for dynamically loaded icons to prevent re-importing. Lives on a\n// globalThis Symbol.for slot, NOT module state — dual ESM/CJS unsplit bundles\n// each instantiate their own module graph, and a per-graph cache would\n// re-import icons the other graph already resolved. Never \"clean this up\".\nconst DYNAMIC_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.dynamic-icon-cache\");\nconst dynamicIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[DYNAMIC_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[DYNAMIC_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/**\n * Finite list for a curated icon gallery: every statically bundled Lucide name,\n * curated custom ids (react-icons), and all registered `svg:…` assets.\n */\nexport function getCuratedIconIdsForPicker(): string[] {\n const set = new Set<string>();\n for (const k of Object.keys(staticLucideIconMap)) {\n set.add(k);\n }\n for (const k of listCustomIconNames()) {\n set.add(k);\n }\n for (const id of listSvgIconValues()) {\n set.add(id);\n }\n return Array.from(set).sort((a, b) =>\n a.localeCompare(b, undefined, { sensitivity: \"base\" }),\n );\n}\n\n/**\n * True if this exact name maps to a known icon (static Lucide, curated custom id, or\n * previously resolved dynamic Lucide cached under this key).\n *\n * Does not import lucide-react — use with {@link isRegisteredOrLucideIconName} for full checks.\n */\nexport function isIconRegisteredSync(\n iconName: string | null | undefined,\n): boolean {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n const name = iconName;\n if (isCustomIconName(name)) return true;\n if (staticLucideIconMap[name]) return true;\n return Boolean(dynamicIconCache[name]);\n}\n\n/**\n * True if `iconName` is a real icon id: custom/static/cached, a registered `svg:…`\n * asset, or a Lucide export that is a renderable component (not the fallback Zap).\n *\n * Prefer this over truthiness on {@link getIconComponent}, which always returns a component.\n */\nexport async function isRegisteredOrLucideIconName(\n iconName: string | null | undefined,\n): Promise<boolean> {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n if (isSvgIconValue(iconName)) {\n return true;\n }\n if (isIconRegisteredSync(iconName)) {\n return true;\n }\n try {\n return await hasLucideIcon(iconName);\n } catch {\n return false;\n }\n}\n\n/**\n * HOW TO ADD MORE STATIC ICONS:\n *\n * The curated hot set ships in the package (src/static-icons.ts). A host that\n * frequently renders an icon outside the set keeps it zero-latency by statically\n * importing it and registering it once at startup:\n *\n * import { YourIcon } from \"lucide-react\";\n * import { extendStaticIcons } from \"@ai-matrx/icons\";\n * extendStaticIcons({ YourIcon });\n */\n\nexport interface IconResolverProps {\n iconName: string | null;\n className?: string | undefined;\n size?: number | undefined;\n fallbackIcon?: string | undefined;\n style?: React.CSSProperties | undefined;\n}\n\n/**\n * IconResolver - A unified component for resolving and rendering icons by name\n * Uses hybrid approach: static imports for common icons, dynamic imports for others\n * Supports all lucide-react icons, curated custom icons (optional react-icons peer),\n * and registered `svg:…` public assets.\n */\nconst IconResolver: React.FC<IconResolverProps> = ({\n iconName,\n className = \"h-4 w-4\",\n size,\n fallbackIcon = \"Zap\",\n style,\n}) => {\n const svgSrc = iconName ? parseSvgIconPath(iconName) : null;\n const [DynamicIcon, setDynamicIcon] = useState<IconComponentType | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n const loadIcon = async () => {\n if (!iconName) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n if (parseSvgIconPath(iconName)) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n // Check custom icons first (already-loaded cache hit is synchronous)\n const cachedCustom = customIconCache[iconName];\n if (cachedCustom) {\n setDynamicIcon(() => cachedCustom);\n return;\n }\n\n // Check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n setDynamicIcon(() => staticIcon);\n return;\n }\n\n // Check if already cached\n const cachedDynamic = dynamicIconCache[iconName];\n if (cachedDynamic) {\n setDynamicIcon(() => cachedDynamic);\n return;\n }\n\n // Curated custom icon: lazy-import the optional react-icons peer;\n // degrade to the fallback icon when it is absent.\n if (isCustomIconName(iconName)) {\n setIsLoading(true);\n const loaded = await loadCustomIcon(iconName);\n if (cancelled) return;\n if (loaded) {\n setDynamicIcon(() => loaded);\n } else {\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n setIsLoading(false);\n return;\n }\n\n // Dynamically import from lucide-react\n setIsLoading(true);\n try {\n // One icon, one chunk — never the lucide-react namespace (see lucide-lazy.ts).\n const IconComponent = await loadLucideIcon(iconName);\n if (cancelled) return;\n\n if (IconComponent) {\n dynamicIconCache[iconName] = IconComponent;\n setDynamicIcon(() => IconComponent);\n } else {\n // Icon not found, use fallback\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n } catch (error) {\n if (cancelled) return;\n console.warn(`Failed to load icon: ${iconName}`, error);\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n } finally {\n if (!cancelled) setIsLoading(false);\n }\n };\n\n loadIcon();\n // Cancellation: without it, a slow dynamic import resolving after unmount\n // (or after iconName changed) called setState on a dead/stale effect.\n return () => {\n cancelled = true;\n };\n }, [iconName, fallbackIcon]);\n\n if (svgSrc) {\n return (\n <img\n src={svgSrc}\n alt=\"\"\n className={cn(\"object-contain shrink-0\", className)}\n width={size}\n height={size}\n style={style}\n />\n );\n }\n\n // Get the icon component to render\n const IconComponent = DynamicIcon || staticLucideIconMap[fallbackIcon] || Zap;\n\n // Build exact-optional props (never pass an explicit undefined through)\n const iconProps: IconRenderProps = {\n ...(className !== undefined ? { className } : {}),\n ...(size !== undefined ? { size } : {}),\n ...(style !== undefined ? { style } : {}),\n };\n\n // Show fallback while loading dynamic icons (seamless experience)\n if (isLoading && !DynamicIcon) {\n const FallbackIcon = staticLucideIconMap[fallbackIcon] || Zap;\n return <FallbackIcon {...iconProps} />;\n }\n\n return <IconComponent {...iconProps} />;\n};\n\nexport default IconResolver;\n\n/**\n * Synchronous utility function for getting icon components directly\n * Only works with statically imported icons plus already-loaded custom/dynamic icons.\n * For dynamic Lucide icons not in the static map, use the IconResolver component instead\n *\n * **Always returns a component** (default/fallback Zap when unknown). Do not use the return\n * value to infer whether `iconName` exists — use {@link isIconRegisteredSync} or\n * {@link isRegisteredOrLucideIconName} instead.\n */\nexport const getIconComponent = (\n iconName: string | null | undefined,\n fallbackIcon: string = \"Zap\",\n): IconComponentType => {\n if (!iconName) {\n return staticLucideIconMap[fallbackIcon] || Zap;\n }\n\n // First check custom icons (loaded lazily; a hit means it is already cached)\n const custom = customIconCache[iconName];\n if (custom) {\n return custom;\n }\n\n // Then check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n return staticIcon;\n }\n\n // Check dynamic cache\n const dynamic = dynamicIconCache[iconName];\n if (dynamic) {\n return dynamic;\n }\n\n // Fallback to default icon\n return staticLucideIconMap[fallbackIcon] || Zap;\n};\n\n/**\n * Renders an icon element directly with optional props\n * This is the preferred method for rendering icons in JSX\n */\nexport const renderIcon = (\n iconName: string | null | undefined,\n props?: IconRenderProps,\n fallbackIcon: string = \"Zap\",\n) => {\n const IconComponent = getIconComponent(iconName, fallbackIcon);\n return <IconComponent {...props} />;\n};\n\n/**\n * Utility to detect if a string is a hex color code\n */\nexport const isHexColor = (color: string): boolean => {\n return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n};\n\nexport const getTextColorClass = (color?: string) => {\n if (!color) return \"text-gray-600 dark:text-gray-400\";\n\n // If it's a hex color, return null (we'll use inline styles instead)\n if (isHexColor(color)) return null;\n\n const colorMap: Record<string, string> = {\n gray: \"text-gray-600 dark:text-gray-400\",\n rose: \"text-rose-600 dark:text-rose-400\",\n blue: \"text-blue-600 dark:text-blue-400\",\n amber: \"text-amber-600 dark:text-amber-400\",\n cyan: \"text-cyan-600 dark:text-cyan-400\",\n emerald: \"text-emerald-600 dark:text-emerald-400\",\n fuchsia: \"text-fuchsia-600 dark:text-fuchsia-400\",\n green: \"text-green-600 dark:text-green-400\",\n indigo: \"text-indigo-600 dark:text-indigo-400\",\n lime: \"text-lime-600 dark:text-lime-400\",\n neutral: \"text-neutral-600 dark:text-neutral-400\",\n orange: \"text-orange-600 dark:text-orange-400\",\n pink: \"text-pink-600 dark:text-pink-400\",\n purple: \"text-purple-600 dark:text-purple-400\",\n red: \"text-red-600 dark:text-red-400\",\n sky: \"text-sky-600 dark:text-sky-400\",\n slate: \"text-slate-600 dark:text-slate-400\",\n stone: \"text-stone-600 dark:text-stone-400\",\n teal: \"text-teal-600 dark:text-teal-400\",\n violet: \"text-violet-600 dark:text-violet-400\",\n yellow: \"text-yellow-600 dark:text-yellow-400\",\n zinc: \"text-zinc-600 dark:text-zinc-400\",\n };\n\n return colorMap[color.toLowerCase()] || \"text-gray-600 dark:text-gray-400\";\n};\n\n/**\n * Utility function for rendering an icon with color and size\n * Note: This is synchronous and only works with statically imported icons\n * For dynamic icons, use the DynamicIcon component instead\n */\nexport const getIconWithColorAndSize = (\n iconName: string | null,\n color: string = \"gray\",\n size: number = 4,\n) => {\n const IconComponent = getIconComponent(iconName);\n const colorClass = getTextColorClass(color);\n // Hex colors have no Tailwind class (getTextColorClass returns null) —\n // they color via inline style. The original interpolated the null into the\n // className as a literal \"null\" token; fixed in 0.1.1.\n return (\n <IconComponent\n className={cn(`h-${size} w-${size}`, colorClass)}\n {...(colorClass === null ? { style: { color } } : {})}\n />\n );\n};\n\n/**\n * Simple Icon component for direct usage with color and size support\n * Uses IconResolver internally to support both static and dynamic icons\n *\n * Supports both Tailwind color names (e.g., \"blue\", \"red\", \"zinc\") and hex colors (e.g., \"#ff0000\", \"#666\")\n */\nexport interface DynamicIconProps {\n name: string | null;\n color?: string | undefined;\n size?: number | undefined;\n className?: string | undefined;\n fallbackIcon?: string | undefined;\n}\n\nexport const DynamicIcon: React.FC<DynamicIconProps> = ({\n name,\n color = \"gray\",\n size = 4,\n className,\n fallbackIcon = \"Zap\",\n}) => {\n const isHex = color && isHexColor(color);\n const colorClass = isHex ? null : getTextColorClass(color);\n const sizeClass = `h-${size} w-${size}`;\n\n // Build className: always include size, include colorClass if not hex, include custom className\n const combinedClassName = [sizeClass, !isHex && colorClass, className]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n // If hex color, apply as inline style\n const style = isHex ? { color } : undefined;\n\n return (\n <IconResolver\n iconName={name}\n className={combinedClassName}\n fallbackIcon={fallbackIcon}\n style={style}\n />\n );\n};\n","/**\n * Minimal className join — the only piece of `cn` this package needs.\n * No tailwind-merge / clsx dependency by design: callers pass literal strings.\n */\nexport function cn(\n ...values: Array<string | null | undefined | false>\n): string {\n return values.filter(Boolean).join(\" \").trim();\n}\n","/**\n * Per-icon lazy loading for the rest of the Lucide catalog.\n *\n * Never `import(\"lucide-react\")` (the namespace) at runtime: a host bundler that also sees static\n * named imports of lucide-react then puts EVERY icon (~1,500 kB source, ~190 kB gzip) into the\n * statically loaded chunk — the whole catalog lands on the first screen. Lucide's own\n * `dynamicIconImports` map (one `() => import(...)` per icon) keeps each icon its own chunk, so an\n * icon outside the static hot set costs one tiny request when first rendered.\n * Guarded by `lucide-lazy.test.ts` and the chat package's side-panel bundle budget.\n */\nimport type { IconComponentType } from \"./types\";\n\ntype IconLoader = () => Promise<{ default: unknown }>;\n\n/** `arrow-up-0-1` → `ArrowUp01` (Lucide's own export-name rule). */\nexport function lucideKeyToPascal(key: string): string {\n return key\n .split(\"-\")\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nconst INDEX_SLOT = Symbol.for(\"ai-matrx.icons.lucide-lazy-index\");\ntype IndexHolder = Record<symbol, Promise<Map<string, IconLoader>> | undefined>;\n\n/** PascalCase export name → loader, built once from lucide's map (aliases included). */\nfunction lucideIndex(): Promise<Map<string, IconLoader>> {\n const holder = globalThis as IndexHolder;\n let index = holder[INDEX_SLOT];\n if (!index) {\n index = import(\"lucide-react/dynamicIconImports.mjs\").then((mod) => {\n const imports = ((mod as { default?: unknown }).default ?? mod) as Record<string, IconLoader>;\n const map = new Map<string, IconLoader>();\n for (const key of Object.keys(imports)) {\n const loader = imports[key];\n if (typeof loader === \"function\") map.set(lucideKeyToPascal(key), loader);\n }\n return map;\n });\n // A failed load (lucide missing) must be retryable, not cached forever.\n index.catch(() => {\n if (holder[INDEX_SLOT] === index) holder[INDEX_SLOT] = undefined;\n });\n holder[INDEX_SLOT] = index;\n }\n return index;\n}\n\n/** `Home`, `HomeIcon` and `LucideHome` are the same Lucide icon. */\nfunction exportNameCandidates(name: string): string[] {\n const out = [name];\n const unprefixed = name.startsWith(\"Lucide\") ? name.slice(\"Lucide\".length) : name;\n if (unprefixed !== name) out.push(unprefixed);\n for (const n of [...out]) if (n.endsWith(\"Icon\") && n.length > 4) out.push(n.slice(0, -4));\n return out;\n}\n\nfunction isRenderable(exported: unknown): exported is IconComponentType {\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n return typeof exported === \"object\" && \"$$typeof\" in (exported as object);\n}\n\n/** True when `name` is an export name of the installed lucide-react catalog (no icon is loaded). */\nexport async function hasLucideIcon(name: string): Promise<boolean> {\n const index = await lucideIndex();\n return exportNameCandidates(name).some((n) => index.has(n));\n}\n\n/** Load ONE Lucide icon by export name; null when lucide-react has no such icon. */\nexport async function loadLucideIcon(name: string): Promise<IconComponentType | null> {\n const index = await lucideIndex();\n for (const candidate of exportNameCandidates(name)) {\n const loader = index.get(candidate);\n if (!loader) continue;\n const mod = await loader();\n return isRenderable(mod.default) ? mod.default : null;\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,0BAyIO;AAOA,IAAM,sBAAyD;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAQO,SAAS,kBAAkB,KAA8C;AAC9E,SAAO,OAAO,qBAAqB,GAAG;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AA,EACR;AAEA,SAAO,SAAS,MAAM,YAAY,CAAC,KAAK;AAC1C;AAOO,IAAM,0BAA0B,CACrC,UACA,QAAgB,QAChB,OAAe,MACZ;AACH,QAAM,gBAAgB,iBAAiB,QAAQ;AAC/C,QAAM,aAAa,kBAAkB,KAAK;AAI1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,KAAK,IAAI,MAAM,IAAI,IAAI,UAAU;AAAA,MAC9C,GAAI,eAAe,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA;AAAA,EACrD;AAEJ;AAgBO,IAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,QAAQ,SAAS,WAAW,KAAK;AACvC,QAAM,aAAa,QAAQ,OAAO,kBAAkB,KAAK;AACzD,QAAM,YAAY,KAAK,IAAI,MAAM,IAAI;AAGrC,QAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,YAAY,SAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACR,KAAK;AAGR,QAAM,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":["DynamicIcon","IconComponent"]}
package/dist/index.js CHANGED
@@ -464,7 +464,7 @@ function lucideIndex() {
464
464
  const holder = globalThis;
465
465
  let index = holder[INDEX_SLOT];
466
466
  if (!index) {
467
- index = import("lucide-react/dynamicIconImports").then((mod) => {
467
+ index = import("lucide-react/dynamicIconImports.mjs").then((mod) => {
468
468
  const imports = mod.default ?? mod;
469
469
  const map = /* @__PURE__ */ new Map();
470
470
  for (const key of Object.keys(imports)) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/static-icons.ts","../src/custom-icons.ts","../src/svg-registry.ts","../src/lucide-name-normalize.ts","../src/lucide-module-icon.ts","../src/resolver.tsx","../src/cn.ts","../src/lucide-lazy.ts"],"sourcesContent":["// Statically import commonly used Lucide icons to reduce bundle size.\n// This curated hot set is the product: a hit here renders synchronously,\n// with zero dynamic-import latency and no fallback flash.\nimport {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n} from \"lucide-react\";\nimport type { IconComponentType } from \"./types\";\n\nexport { Zap as fallbackZapIcon };\n\n// Statically imported Lucide icons map (commonly used icons for optimal bundle size)\n// Exported so callers can spread it as a scope without importing the full lucide namespace.\nexport const staticLucideIconMap: Record<string, IconComponentType> = {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n};\n\n/**\n * Extend the static (synchronous, zero-latency) icon map with host-supplied\n * components — extra statically imported Lucide icons a host uses on hot paths,\n * or any component matching {@link IconComponentType}. Merges in place; later\n * registrations override earlier entries of the same name.\n */\nexport function extendStaticIcons(map: Record<string, IconComponentType>): void {\n Object.assign(staticLucideIconMap, map);\n}\n","/**\n * Curated brand/custom icon names served from the OPTIONAL `react-icons` peer.\n *\n * Coupling inversion vs. the original (which statically imported react-icons):\n * `react-icons` is an optional peerDependency, so these are lazy-imported on first\n * use and cached at module level. When the host has not installed `react-icons`,\n * loading degrades to null and the resolver renders the fallback icon instead —\n * no install-time or import-time failure.\n */\nimport type { IconComponentType } from \"./types\";\n\n/**\n * name → loader of exactly that one export. Each loader DESTRUCTURES its one icon from the\n * dynamic import so the host bundler tree-shakes the subpackage: a namespace `mod[name]` lookup\n * forced the whole of react-icons/fa6 (~480 kB gzip) into the first screen whenever any other\n * module imported a single Fa icon statically. Guarded by src/lucide-lazy.test.ts.\n */\nconst CUSTOM_ICON_LOADERS: Record<string, () => Promise<unknown>> = {\n FaBrave: () => import(\"react-icons/fa6\").then(({ FaBrave }) => FaBrave),\n FcGoogle: () => import(\"react-icons/fc\").then(({ FcGoogle }) => FcGoogle),\n FcBrokenLink: () => import(\"react-icons/fc\").then(({ FcBrokenLink }) => FcBrokenLink),\n FcFilm: () => import(\"react-icons/fc\").then(({ FcFilm }) => FcFilm),\n FcDownload: () => import(\"react-icons/fc\").then(({ FcDownload }) => FcDownload),\n FcBiotech: () => import(\"react-icons/fc\").then(({ FcBiotech }) => FcBiotech),\n FcElectronics: () => import(\"react-icons/fc\").then(({ FcElectronics }) => FcElectronics),\n FcGraduationCap: () => import(\"react-icons/fc\").then(({ FcGraduationCap }) => FcGraduationCap),\n FcLibrary: () => import(\"react-icons/fc\").then(({ FcLibrary }) => FcLibrary),\n FcMusic: () => import(\"react-icons/fc\").then(({ FcMusic }) => FcMusic),\n FcParallelTasks: () => import(\"react-icons/fc\").then(({ FcParallelTasks }) => FcParallelTasks),\n FcSalesPerformance: () => import(\"react-icons/fc\").then(({ FcSalesPerformance }) => FcSalesPerformance),\n FcCalendar: () => import(\"react-icons/fc\").then(({ FcCalendar }) => FcCalendar),\n FcDocument: () => import(\"react-icons/fc\").then(({ FcDocument }) => FcDocument),\n FcEngineering: () => import(\"react-icons/fc\").then(({ FcEngineering }) => FcEngineering),\n FcDataProtection: () => import(\"react-icons/fc\").then(({ FcDataProtection }) => FcDataProtection),\n FcAssistant: () => import(\"react-icons/fc\").then(({ FcAssistant }) => FcAssistant),\n FcSms: () => import(\"react-icons/fc\").then(({ FcSms }) => FcSms),\n FcTodoList: () => import(\"react-icons/fc\").then(({ FcTodoList }) => FcTodoList),\n FcWikipedia: () => import(\"react-icons/fc\").then(({ FcWikipedia }) => FcWikipedia),\n FcCommandLine: () => import(\"react-icons/fc\").then(({ FcCommandLine }) => FcCommandLine),\n FcConferenceCall: () => import(\"react-icons/fc\").then(({ FcConferenceCall }) => FcConferenceCall),\n FcManager: () => import(\"react-icons/fc\").then(({ FcManager }) => FcManager),\n FcAreaChart: () => import(\"react-icons/fc\").then(({ FcAreaChart }) => FcAreaChart),\n FcMultipleInputs: () => import(\"react-icons/fc\").then(({ FcMultipleInputs }) => FcMultipleInputs),\n FcShipped: () => import(\"react-icons/fc\").then(({ FcShipped }) => FcShipped),\n FcBusinessContact: () => import(\"react-icons/fc\").then(({ FcBusinessContact }) => FcBusinessContact),\n FcAlphabeticalSortingAz: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingAz }) => FcAlphabeticalSortingAz),\n FcAlphabeticalSortingZa: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingZa }) => FcAlphabeticalSortingZa),\n FcFeedback: () => import(\"react-icons/fc\").then(({ FcFeedback }) => FcFeedback),\n FcBusiness: () => import(\"react-icons/fc\").then(({ FcBusiness }) => FcBusiness),\n FcSignature: () => import(\"react-icons/fc\").then(({ FcSignature }) => FcSignature),\n};\n\n/**\n * Cache for lazily loaded custom icons (also the sync-lookup source once\n * loaded). Lives on a globalThis Symbol.for slot, NOT module state — dual\n * ESM/CJS unsplit bundles each instantiate their own module graph, and a\n * module-level cache would load the same icon once per graph and let a\n * sync lookup miss what the other graph already loaded. Never \"clean this up\".\n */\nconst CUSTOM_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.custom-icon-cache\");\nexport const customIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[CUSTOM_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[CUSTOM_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/** True when `name` is one of the curated custom (react-icons) ids. */\nexport function isCustomIconName(name: string): boolean {\n return Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name);\n}\n\n/** The curated custom icon ids (known without loading react-icons). */\nexport function listCustomIconNames(): string[] {\n return Object.keys(CUSTOM_ICON_LOADERS);\n}\n\n/**\n * Lazy-load a curated custom icon from the optional `react-icons` peer.\n * Returns null for unknown names, a missing export, or when `react-icons`\n * is not installed — the caller degrades to the fallback icon.\n */\nexport async function loadCustomIcon(\n name: string,\n): Promise<IconComponentType | null> {\n const cached = customIconCache[name];\n if (cached) {\n return cached;\n }\n const load = Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name)\n ? CUSTOM_ICON_LOADERS[name]\n : undefined;\n if (!load) {\n return null;\n }\n try {\n const exported = await load();\n if (typeof exported !== \"function\") {\n return null;\n }\n const IconComponent = exported as IconComponentType;\n customIconCache[name] = IconComponent;\n return IconComponent;\n } catch {\n // react-icons not installed (optional peer) — degrade to the fallback icon.\n return null;\n }\n}\n","/**\n * Injectable registry for host-owned SVG assets. Stored icon ids use the form\n * `svg:<path-without-leading-slash-and-without-extension>` e.g. `svg:icons/Home`\n * → whatever URL the host registered for the id `icons/Home` (typically `/icons/Home.svg`).\n *\n * The package ships EMPTY — the host application registers its own asset paths once at\n * startup via {@link registerSvgIcons}. An unregistered `svg:` value resolves to null\n * and the resolver falls back exactly as it does for an unknown Lucide name.\n */\n// The registry lives on a globalThis Symbol.for slot, NOT module state: with\n// dual ESM/CJS unsplit bundles each loader graph instantiates its own module,\n// and a module-level map would silently split the host's registrations from\n// a consumer resolving through the other graph. Never \"clean this up\".\nconst SVG_REGISTRY_SLOT = Symbol.for(\"ai-matrx.icons.svg-registry\");\nconst svgIconRegistry: Record<string, string> = (() => {\n const holder = globalThis as Record<symbol, Record<string, string> | undefined>;\n let reg = holder[SVG_REGISTRY_SLOT];\n if (!reg) {\n reg = {};\n holder[SVG_REGISTRY_SLOT] = reg;\n }\n return reg;\n})();\n\nconst SVG_PREFIX = \"svg:\";\n\n/**\n * Register (or override) `svg:` icon ids → asset URLs. Merges into the module-level\n * registry, so multiple calls compose. Ids are stored without the `svg:` prefix.\n */\nexport function registerSvgIcons(map: Record<string, string>): void {\n for (const [rawId, path] of Object.entries(map)) {\n const id = rawId.startsWith(SVG_PREFIX)\n ? rawId.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\")\n : rawId.replace(/^\\/+/, \"\");\n if (id && path) {\n svgIconRegistry[id] = path;\n }\n }\n}\n\n/** The registered asset URL for a `svg:…` icon value, or null when not a registered svg icon. */\nexport function parseSvgIconPath(value: string): string | null {\n if (!value.startsWith(SVG_PREFIX)) {\n return null;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n const path = svgIconRegistry[id];\n return path ?? null;\n}\n\n/** True if `value` is a `svg:…` id with a registered asset path. */\nexport function isSvgIconValue(value: string | null | undefined): boolean {\n if (!value || !value.startsWith(SVG_PREFIX)) {\n return false;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n return Boolean(svgIconRegistry[id]);\n}\n\n/** Every registered svg icon value, `svg:` prefix included (for pickers/galleries). */\nexport function listSvgIconValues(): string[] {\n return Object.keys(svgIconRegistry).map((id) => `${SVG_PREFIX}${id}`);\n}\n","/**\n * Lucide.dev lists icons in kebab-case (e.g. `alarm-clock`); the React package\n * exports PascalCase (`AlarmClock`). Normalize pasted / typed names into candidates\n * to validate against `lucide-react` exports.\n */\n\n/**\n * If the user pasted Lucide's JSX snippet (e.g. `'<BugPlay />'` or `<AlignCenterHorizontal />`),\n * return the component name only. Otherwise return null.\n *\n * Supports optional outer quotes and optional attributes before the closing `/>`.\n */\nexport function extractLucideJsxIconName(raw: string): string | null {\n let s = raw.trim();\n if (!s) return null;\n if (\n (s.startsWith(\"'\") && s.endsWith(\"'\") && s.length >= 2) ||\n (s.startsWith('\"') && s.endsWith('\"') && s.length >= 2)\n ) {\n s = s.slice(1, -1).trim();\n }\n const m = s.match(/^<\\s*([A-Za-z][A-Za-z0-9]*)(?:\\s[^>]*)?\\s*\\/\\s*>$/);\n return m?.[1] ?? null;\n}\n\n/** `alarm-clock` → `AlarmClock`, `a-arrow-down` → `AArrowDown` */\nexport function kebabCaseToLucidePascalCase(raw: string): string {\n const s = raw.trim();\n if (!s.includes(\"-\")) {\n return s;\n }\n return s\n .split(\"-\")\n .filter(Boolean)\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).toLowerCase())\n .join(\"\");\n}\n\n/**\n * Ordered unique candidates: exact input, first-letter fix, kebab → Pascal variants.\n * Skip Lucide heuristics for `svg:…` asset values (caller should pass only those as `[trimmed]`).\n */\nexport function collectLucideIconNameCandidates(raw: string): string[] {\n const t = raw.trim();\n if (!t) {\n return [];\n }\n\n const out: string[] = [];\n const push = (s: string) => {\n if (s && !out.includes(s)) {\n out.push(s);\n }\n };\n\n push(t);\n\n if (t[0] === t[0]!.toLowerCase()) {\n push(t.charAt(0).toUpperCase() + t.slice(1));\n }\n\n if (t.includes(\"-\")) {\n push(kebabCaseToLucidePascalCase(t));\n const lower = t.toLowerCase();\n if (lower !== t) {\n push(kebabCaseToLucidePascalCase(lower));\n }\n }\n\n return out;\n}\n","/**\n * lucide-react namespaced exports: icons are ForwardRef/Memo objects in current builds,\n * not plain functions. Only createLucideIcon and default are non-icon exports we skip.\n */\nconst LUCIDE_NAMESPACE_DENYLIST = new Set([\"default\", \"createLucideIcon\"]);\n\n/**\n * True if `exported` is the value of a Lucide icon entry for `name` in `import * as Lucide`.\n * Does not mean the icon exists in the static resolver map — only that the lucide-react\n * module exposes this name as a renderable component type.\n */\nexport function isLucideModuleIconExport(\n name: string,\n exported: unknown,\n): boolean {\n if (!name || LUCIDE_NAMESPACE_DENYLIST.has(name)) return false;\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n if (typeof exported === \"object\" && \"$$typeof\" in (exported as object)) {\n return true;\n }\n return false;\n}\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n staticLucideIconMap,\n fallbackZapIcon as Zap,\n} from \"./static-icons\";\nimport {\n customIconCache,\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nimport { hasLucideIcon, loadLucideIcon } from \"./lucide-lazy\";\nimport {\n isSvgIconValue,\n listSvgIconValues,\n parseSvgIconPath,\n} from \"./svg-registry\";\nimport type { IconComponentType, IconRenderProps } from \"./types\";\n\n// Cache for dynamically loaded icons to prevent re-importing. Lives on a\n// globalThis Symbol.for slot, NOT module state — dual ESM/CJS unsplit bundles\n// each instantiate their own module graph, and a per-graph cache would\n// re-import icons the other graph already resolved. Never \"clean this up\".\nconst DYNAMIC_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.dynamic-icon-cache\");\nconst dynamicIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[DYNAMIC_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[DYNAMIC_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/**\n * Finite list for a curated icon gallery: every statically bundled Lucide name,\n * curated custom ids (react-icons), and all registered `svg:…` assets.\n */\nexport function getCuratedIconIdsForPicker(): string[] {\n const set = new Set<string>();\n for (const k of Object.keys(staticLucideIconMap)) {\n set.add(k);\n }\n for (const k of listCustomIconNames()) {\n set.add(k);\n }\n for (const id of listSvgIconValues()) {\n set.add(id);\n }\n return Array.from(set).sort((a, b) =>\n a.localeCompare(b, undefined, { sensitivity: \"base\" }),\n );\n}\n\n/**\n * True if this exact name maps to a known icon (static Lucide, curated custom id, or\n * previously resolved dynamic Lucide cached under this key).\n *\n * Does not import lucide-react — use with {@link isRegisteredOrLucideIconName} for full checks.\n */\nexport function isIconRegisteredSync(\n iconName: string | null | undefined,\n): boolean {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n const name = iconName;\n if (isCustomIconName(name)) return true;\n if (staticLucideIconMap[name]) return true;\n return Boolean(dynamicIconCache[name]);\n}\n\n/**\n * True if `iconName` is a real icon id: custom/static/cached, a registered `svg:…`\n * asset, or a Lucide export that is a renderable component (not the fallback Zap).\n *\n * Prefer this over truthiness on {@link getIconComponent}, which always returns a component.\n */\nexport async function isRegisteredOrLucideIconName(\n iconName: string | null | undefined,\n): Promise<boolean> {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n if (isSvgIconValue(iconName)) {\n return true;\n }\n if (isIconRegisteredSync(iconName)) {\n return true;\n }\n try {\n return await hasLucideIcon(iconName);\n } catch {\n return false;\n }\n}\n\n/**\n * HOW TO ADD MORE STATIC ICONS:\n *\n * The curated hot set ships in the package (src/static-icons.ts). A host that\n * frequently renders an icon outside the set keeps it zero-latency by statically\n * importing it and registering it once at startup:\n *\n * import { YourIcon } from \"lucide-react\";\n * import { extendStaticIcons } from \"@ai-matrx/icons\";\n * extendStaticIcons({ YourIcon });\n */\n\nexport interface IconResolverProps {\n iconName: string | null;\n className?: string | undefined;\n size?: number | undefined;\n fallbackIcon?: string | undefined;\n style?: React.CSSProperties | undefined;\n}\n\n/**\n * IconResolver - A unified component for resolving and rendering icons by name\n * Uses hybrid approach: static imports for common icons, dynamic imports for others\n * Supports all lucide-react icons, curated custom icons (optional react-icons peer),\n * and registered `svg:…` public assets.\n */\nconst IconResolver: React.FC<IconResolverProps> = ({\n iconName,\n className = \"h-4 w-4\",\n size,\n fallbackIcon = \"Zap\",\n style,\n}) => {\n const svgSrc = iconName ? parseSvgIconPath(iconName) : null;\n const [DynamicIcon, setDynamicIcon] = useState<IconComponentType | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n const loadIcon = async () => {\n if (!iconName) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n if (parseSvgIconPath(iconName)) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n // Check custom icons first (already-loaded cache hit is synchronous)\n const cachedCustom = customIconCache[iconName];\n if (cachedCustom) {\n setDynamicIcon(() => cachedCustom);\n return;\n }\n\n // Check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n setDynamicIcon(() => staticIcon);\n return;\n }\n\n // Check if already cached\n const cachedDynamic = dynamicIconCache[iconName];\n if (cachedDynamic) {\n setDynamicIcon(() => cachedDynamic);\n return;\n }\n\n // Curated custom icon: lazy-import the optional react-icons peer;\n // degrade to the fallback icon when it is absent.\n if (isCustomIconName(iconName)) {\n setIsLoading(true);\n const loaded = await loadCustomIcon(iconName);\n if (cancelled) return;\n if (loaded) {\n setDynamicIcon(() => loaded);\n } else {\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n setIsLoading(false);\n return;\n }\n\n // Dynamically import from lucide-react\n setIsLoading(true);\n try {\n // One icon, one chunk — never the lucide-react namespace (see lucide-lazy.ts).\n const IconComponent = await loadLucideIcon(iconName);\n if (cancelled) return;\n\n if (IconComponent) {\n dynamicIconCache[iconName] = IconComponent;\n setDynamicIcon(() => IconComponent);\n } else {\n // Icon not found, use fallback\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n } catch (error) {\n if (cancelled) return;\n console.warn(`Failed to load icon: ${iconName}`, error);\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n } finally {\n if (!cancelled) setIsLoading(false);\n }\n };\n\n loadIcon();\n // Cancellation: without it, a slow dynamic import resolving after unmount\n // (or after iconName changed) called setState on a dead/stale effect.\n return () => {\n cancelled = true;\n };\n }, [iconName, fallbackIcon]);\n\n if (svgSrc) {\n return (\n <img\n src={svgSrc}\n alt=\"\"\n className={cn(\"object-contain shrink-0\", className)}\n width={size}\n height={size}\n style={style}\n />\n );\n }\n\n // Get the icon component to render\n const IconComponent = DynamicIcon || staticLucideIconMap[fallbackIcon] || Zap;\n\n // Build exact-optional props (never pass an explicit undefined through)\n const iconProps: IconRenderProps = {\n ...(className !== undefined ? { className } : {}),\n ...(size !== undefined ? { size } : {}),\n ...(style !== undefined ? { style } : {}),\n };\n\n // Show fallback while loading dynamic icons (seamless experience)\n if (isLoading && !DynamicIcon) {\n const FallbackIcon = staticLucideIconMap[fallbackIcon] || Zap;\n return <FallbackIcon {...iconProps} />;\n }\n\n return <IconComponent {...iconProps} />;\n};\n\nexport default IconResolver;\n\n/**\n * Synchronous utility function for getting icon components directly\n * Only works with statically imported icons plus already-loaded custom/dynamic icons.\n * For dynamic Lucide icons not in the static map, use the IconResolver component instead\n *\n * **Always returns a component** (default/fallback Zap when unknown). Do not use the return\n * value to infer whether `iconName` exists — use {@link isIconRegisteredSync} or\n * {@link isRegisteredOrLucideIconName} instead.\n */\nexport const getIconComponent = (\n iconName: string | null | undefined,\n fallbackIcon: string = \"Zap\",\n): IconComponentType => {\n if (!iconName) {\n return staticLucideIconMap[fallbackIcon] || Zap;\n }\n\n // First check custom icons (loaded lazily; a hit means it is already cached)\n const custom = customIconCache[iconName];\n if (custom) {\n return custom;\n }\n\n // Then check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n return staticIcon;\n }\n\n // Check dynamic cache\n const dynamic = dynamicIconCache[iconName];\n if (dynamic) {\n return dynamic;\n }\n\n // Fallback to default icon\n return staticLucideIconMap[fallbackIcon] || Zap;\n};\n\n/**\n * Renders an icon element directly with optional props\n * This is the preferred method for rendering icons in JSX\n */\nexport const renderIcon = (\n iconName: string | null | undefined,\n props?: IconRenderProps,\n fallbackIcon: string = \"Zap\",\n) => {\n const IconComponent = getIconComponent(iconName, fallbackIcon);\n return <IconComponent {...props} />;\n};\n\n/**\n * Utility to detect if a string is a hex color code\n */\nexport const isHexColor = (color: string): boolean => {\n return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n};\n\nexport const getTextColorClass = (color?: string) => {\n if (!color) return \"text-gray-600 dark:text-gray-400\";\n\n // If it's a hex color, return null (we'll use inline styles instead)\n if (isHexColor(color)) return null;\n\n const colorMap: Record<string, string> = {\n gray: \"text-gray-600 dark:text-gray-400\",\n rose: \"text-rose-600 dark:text-rose-400\",\n blue: \"text-blue-600 dark:text-blue-400\",\n amber: \"text-amber-600 dark:text-amber-400\",\n cyan: \"text-cyan-600 dark:text-cyan-400\",\n emerald: \"text-emerald-600 dark:text-emerald-400\",\n fuchsia: \"text-fuchsia-600 dark:text-fuchsia-400\",\n green: \"text-green-600 dark:text-green-400\",\n indigo: \"text-indigo-600 dark:text-indigo-400\",\n lime: \"text-lime-600 dark:text-lime-400\",\n neutral: \"text-neutral-600 dark:text-neutral-400\",\n orange: \"text-orange-600 dark:text-orange-400\",\n pink: \"text-pink-600 dark:text-pink-400\",\n purple: \"text-purple-600 dark:text-purple-400\",\n red: \"text-red-600 dark:text-red-400\",\n sky: \"text-sky-600 dark:text-sky-400\",\n slate: \"text-slate-600 dark:text-slate-400\",\n stone: \"text-stone-600 dark:text-stone-400\",\n teal: \"text-teal-600 dark:text-teal-400\",\n violet: \"text-violet-600 dark:text-violet-400\",\n yellow: \"text-yellow-600 dark:text-yellow-400\",\n zinc: \"text-zinc-600 dark:text-zinc-400\",\n };\n\n return colorMap[color.toLowerCase()] || \"text-gray-600 dark:text-gray-400\";\n};\n\n/**\n * Utility function for rendering an icon with color and size\n * Note: This is synchronous and only works with statically imported icons\n * For dynamic icons, use the DynamicIcon component instead\n */\nexport const getIconWithColorAndSize = (\n iconName: string | null,\n color: string = \"gray\",\n size: number = 4,\n) => {\n const IconComponent = getIconComponent(iconName);\n const colorClass = getTextColorClass(color);\n // Hex colors have no Tailwind class (getTextColorClass returns null) —\n // they color via inline style. The original interpolated the null into the\n // className as a literal \"null\" token; fixed in 0.1.1.\n return (\n <IconComponent\n className={cn(`h-${size} w-${size}`, colorClass)}\n {...(colorClass === null ? { style: { color } } : {})}\n />\n );\n};\n\n/**\n * Simple Icon component for direct usage with color and size support\n * Uses IconResolver internally to support both static and dynamic icons\n *\n * Supports both Tailwind color names (e.g., \"blue\", \"red\", \"zinc\") and hex colors (e.g., \"#ff0000\", \"#666\")\n */\nexport interface DynamicIconProps {\n name: string | null;\n color?: string | undefined;\n size?: number | undefined;\n className?: string | undefined;\n fallbackIcon?: string | undefined;\n}\n\nexport const DynamicIcon: React.FC<DynamicIconProps> = ({\n name,\n color = \"gray\",\n size = 4,\n className,\n fallbackIcon = \"Zap\",\n}) => {\n const isHex = color && isHexColor(color);\n const colorClass = isHex ? null : getTextColorClass(color);\n const sizeClass = `h-${size} w-${size}`;\n\n // Build className: always include size, include colorClass if not hex, include custom className\n const combinedClassName = [sizeClass, !isHex && colorClass, className]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n // If hex color, apply as inline style\n const style = isHex ? { color } : undefined;\n\n return (\n <IconResolver\n iconName={name}\n className={combinedClassName}\n fallbackIcon={fallbackIcon}\n style={style}\n />\n );\n};\n","/**\n * Minimal className join — the only piece of `cn` this package needs.\n * No tailwind-merge / clsx dependency by design: callers pass literal strings.\n */\nexport function cn(\n ...values: Array<string | null | undefined | false>\n): string {\n return values.filter(Boolean).join(\" \").trim();\n}\n","/**\n * Per-icon lazy loading for the rest of the Lucide catalog.\n *\n * Never `import(\"lucide-react\")` (the namespace) at runtime: a host bundler that also sees static\n * named imports of lucide-react then puts EVERY icon (~1,500 kB source, ~190 kB gzip) into the\n * statically loaded chunk — the whole catalog lands on the first screen. Lucide's own\n * `dynamicIconImports` map (one `() => import(...)` per icon) keeps each icon its own chunk, so an\n * icon outside the static hot set costs one tiny request when first rendered.\n * Guarded by `lucide-lazy.test.ts` and the chat package's side-panel bundle budget.\n */\nimport type { IconComponentType } from \"./types\";\n\ntype IconLoader = () => Promise<{ default: unknown }>;\n\n/** `arrow-up-0-1` → `ArrowUp01` (Lucide's own export-name rule). */\nexport function lucideKeyToPascal(key: string): string {\n return key\n .split(\"-\")\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nconst INDEX_SLOT = Symbol.for(\"ai-matrx.icons.lucide-lazy-index\");\ntype IndexHolder = Record<symbol, Promise<Map<string, IconLoader>> | undefined>;\n\n/** PascalCase export name → loader, built once from lucide's map (aliases included). */\nfunction lucideIndex(): Promise<Map<string, IconLoader>> {\n const holder = globalThis as IndexHolder;\n let index = holder[INDEX_SLOT];\n if (!index) {\n index = import(\"lucide-react/dynamicIconImports\").then((mod) => {\n const imports = ((mod as { default?: unknown }).default ?? mod) as Record<string, IconLoader>;\n const map = new Map<string, IconLoader>();\n for (const key of Object.keys(imports)) {\n const loader = imports[key];\n if (typeof loader === \"function\") map.set(lucideKeyToPascal(key), loader);\n }\n return map;\n });\n // A failed load (lucide missing) must be retryable, not cached forever.\n index.catch(() => {\n if (holder[INDEX_SLOT] === index) holder[INDEX_SLOT] = undefined;\n });\n holder[INDEX_SLOT] = index;\n }\n return index;\n}\n\n/** `Home`, `HomeIcon` and `LucideHome` are the same Lucide icon. */\nfunction exportNameCandidates(name: string): string[] {\n const out = [name];\n const unprefixed = name.startsWith(\"Lucide\") ? name.slice(\"Lucide\".length) : name;\n if (unprefixed !== name) out.push(unprefixed);\n for (const n of [...out]) if (n.endsWith(\"Icon\") && n.length > 4) out.push(n.slice(0, -4));\n return out;\n}\n\nfunction isRenderable(exported: unknown): exported is IconComponentType {\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n return typeof exported === \"object\" && \"$$typeof\" in (exported as object);\n}\n\n/** True when `name` is an export name of the installed lucide-react catalog (no icon is loaded). */\nexport async function hasLucideIcon(name: string): Promise<boolean> {\n const index = await lucideIndex();\n return exportNameCandidates(name).some((n) => index.has(n));\n}\n\n/** Load ONE Lucide icon by export name; null when lucide-react has no such icon. */\nexport async function loadLucideIcon(name: string): Promise<IconComponentType | null> {\n const index = await lucideIndex();\n for (const candidate of exportNameCandidates(name)) {\n const loader = index.get(candidate);\n if (!loader) continue;\n const mod = await loader();\n return isRenderable(mod.default) ? mod.default : null;\n }\n return null;\n}\n"],"mappings":";;;AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOA,IAAM,sBAAyD;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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gB,iBAAiB,QAAQ;AAC/C,QAAM,aAAa,kBAAkB,KAAK;AAI1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,KAAK,IAAI,MAAM,IAAI,IAAI,UAAU;AAAA,MAC9C,GAAI,eAAe,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA;AAAA,EACrD;AAEJ;AAgBO,IAAM,cAA0C,CAAC;AAAA,EACtD;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,QAAQ,SAAS,WAAW,KAAK;AACvC,QAAM,aAAa,QAAQ,OAAO,kBAAkB,KAAK;AACzD,QAAM,YAAY,KAAK,IAAI,MAAM,IAAI;AAGrC,QAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,YAAY,SAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACR,KAAK;AAGR,QAAM,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":["Map","Map","DynamicIcon","IconComponent"]}
1
+ {"version":3,"sources":["../src/static-icons.ts","../src/custom-icons.ts","../src/svg-registry.ts","../src/lucide-name-normalize.ts","../src/lucide-module-icon.ts","../src/resolver.tsx","../src/cn.ts","../src/lucide-lazy.ts"],"sourcesContent":["// Statically import commonly used Lucide icons to reduce bundle size.\n// This curated hot set is the product: a hit here renders synchronously,\n// with zero dynamic-import latency and no fallback flash.\nimport {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n} from \"lucide-react\";\nimport type { IconComponentType } from \"./types\";\n\nexport { Zap as fallbackZapIcon };\n\n// Statically imported Lucide icons map (commonly used icons for optimal bundle size)\n// Exported so callers can spread it as a scope without importing the full lucide namespace.\nexport const staticLucideIconMap: Record<string, IconComponentType> = {\n Zap,\n Home,\n User,\n Settings,\n Search,\n Bell,\n Menu,\n X,\n ChevronDown,\n ChevronUp,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Edit,\n Trash,\n Check,\n AlertCircle,\n Info,\n HelpCircle,\n Eye,\n EyeOff,\n Copy,\n Download,\n Upload,\n Save,\n MoreVertical,\n MoreHorizontal,\n Filter,\n SortAsc,\n SortDesc,\n Calendar,\n Clock,\n Mail,\n Phone,\n MapPin,\n Link,\n ExternalLink,\n File,\n Folder,\n Image,\n Video,\n Music,\n FileText,\n Database,\n Cloud,\n Server,\n Code,\n Terminal,\n Globe,\n Lock,\n Unlock,\n Shield,\n Key,\n LogIn,\n LogOut,\n UserPlus,\n Users,\n Star,\n Heart,\n Bookmark,\n Share,\n Send,\n MessageSquare,\n MessageCircle,\n Hash,\n AtSign,\n Paperclip,\n Mic,\n Volume2,\n Play,\n Pause,\n SkipForward,\n SkipBack,\n RefreshCw,\n RotateCw,\n Loader,\n Loader2,\n Circle,\n Square,\n Triangle,\n Hexagon,\n Package,\n Box,\n Archive,\n Inbox,\n Layers,\n Layout,\n Grid,\n List,\n Columns,\n Sidebar,\n Maximize,\n Minimize,\n ZoomIn,\n ZoomOut,\n Move,\n Scissors,\n Clipboard,\n PieChart,\n BarChart,\n TrendingUp,\n TrendingDown,\n Activity,\n Cpu,\n HardDrive,\n Wifi,\n WifiOff,\n Bluetooth,\n Battery,\n BatteryCharging,\n Power,\n Sun,\n Moon,\n CloudRain,\n Droplet,\n Wind,\n Tag,\n Tags,\n Flag,\n Award,\n Gift,\n ShoppingCart,\n CreditCard,\n DollarSign,\n Percent,\n Target,\n Crosshair,\n Navigation,\n Compass,\n Map,\n Smile,\n Frown,\n Meh,\n ThumbsUp,\n ThumbsDown,\n};\n\n/**\n * Extend the static (synchronous, zero-latency) icon map with host-supplied\n * components — extra statically imported Lucide icons a host uses on hot paths,\n * or any component matching {@link IconComponentType}. Merges in place; later\n * registrations override earlier entries of the same name.\n */\nexport function extendStaticIcons(map: Record<string, IconComponentType>): void {\n Object.assign(staticLucideIconMap, map);\n}\n","/**\n * Curated brand/custom icon names served from the OPTIONAL `react-icons` peer.\n *\n * Coupling inversion vs. the original (which statically imported react-icons):\n * `react-icons` is an optional peerDependency, so these are lazy-imported on first\n * use and cached at module level. When the host has not installed `react-icons`,\n * loading degrades to null and the resolver renders the fallback icon instead —\n * no install-time or import-time failure.\n */\nimport type { IconComponentType } from \"./types\";\n\n/**\n * name → loader of exactly that one export. Each loader DESTRUCTURES its one icon from the\n * dynamic import so the host bundler tree-shakes the subpackage: a namespace `mod[name]` lookup\n * forced the whole of react-icons/fa6 (~480 kB gzip) into the first screen whenever any other\n * module imported a single Fa icon statically. Guarded by src/lucide-lazy.test.ts.\n */\nconst CUSTOM_ICON_LOADERS: Record<string, () => Promise<unknown>> = {\n FaBrave: () => import(\"react-icons/fa6\").then(({ FaBrave }) => FaBrave),\n FcGoogle: () => import(\"react-icons/fc\").then(({ FcGoogle }) => FcGoogle),\n FcBrokenLink: () => import(\"react-icons/fc\").then(({ FcBrokenLink }) => FcBrokenLink),\n FcFilm: () => import(\"react-icons/fc\").then(({ FcFilm }) => FcFilm),\n FcDownload: () => import(\"react-icons/fc\").then(({ FcDownload }) => FcDownload),\n FcBiotech: () => import(\"react-icons/fc\").then(({ FcBiotech }) => FcBiotech),\n FcElectronics: () => import(\"react-icons/fc\").then(({ FcElectronics }) => FcElectronics),\n FcGraduationCap: () => import(\"react-icons/fc\").then(({ FcGraduationCap }) => FcGraduationCap),\n FcLibrary: () => import(\"react-icons/fc\").then(({ FcLibrary }) => FcLibrary),\n FcMusic: () => import(\"react-icons/fc\").then(({ FcMusic }) => FcMusic),\n FcParallelTasks: () => import(\"react-icons/fc\").then(({ FcParallelTasks }) => FcParallelTasks),\n FcSalesPerformance: () => import(\"react-icons/fc\").then(({ FcSalesPerformance }) => FcSalesPerformance),\n FcCalendar: () => import(\"react-icons/fc\").then(({ FcCalendar }) => FcCalendar),\n FcDocument: () => import(\"react-icons/fc\").then(({ FcDocument }) => FcDocument),\n FcEngineering: () => import(\"react-icons/fc\").then(({ FcEngineering }) => FcEngineering),\n FcDataProtection: () => import(\"react-icons/fc\").then(({ FcDataProtection }) => FcDataProtection),\n FcAssistant: () => import(\"react-icons/fc\").then(({ FcAssistant }) => FcAssistant),\n FcSms: () => import(\"react-icons/fc\").then(({ FcSms }) => FcSms),\n FcTodoList: () => import(\"react-icons/fc\").then(({ FcTodoList }) => FcTodoList),\n FcWikipedia: () => import(\"react-icons/fc\").then(({ FcWikipedia }) => FcWikipedia),\n FcCommandLine: () => import(\"react-icons/fc\").then(({ FcCommandLine }) => FcCommandLine),\n FcConferenceCall: () => import(\"react-icons/fc\").then(({ FcConferenceCall }) => FcConferenceCall),\n FcManager: () => import(\"react-icons/fc\").then(({ FcManager }) => FcManager),\n FcAreaChart: () => import(\"react-icons/fc\").then(({ FcAreaChart }) => FcAreaChart),\n FcMultipleInputs: () => import(\"react-icons/fc\").then(({ FcMultipleInputs }) => FcMultipleInputs),\n FcShipped: () => import(\"react-icons/fc\").then(({ FcShipped }) => FcShipped),\n FcBusinessContact: () => import(\"react-icons/fc\").then(({ FcBusinessContact }) => FcBusinessContact),\n FcAlphabeticalSortingAz: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingAz }) => FcAlphabeticalSortingAz),\n FcAlphabeticalSortingZa: () => import(\"react-icons/fc\").then(({ FcAlphabeticalSortingZa }) => FcAlphabeticalSortingZa),\n FcFeedback: () => import(\"react-icons/fc\").then(({ FcFeedback }) => FcFeedback),\n FcBusiness: () => import(\"react-icons/fc\").then(({ FcBusiness }) => FcBusiness),\n FcSignature: () => import(\"react-icons/fc\").then(({ FcSignature }) => FcSignature),\n};\n\n/**\n * Cache for lazily loaded custom icons (also the sync-lookup source once\n * loaded). Lives on a globalThis Symbol.for slot, NOT module state — dual\n * ESM/CJS unsplit bundles each instantiate their own module graph, and a\n * module-level cache would load the same icon once per graph and let a\n * sync lookup miss what the other graph already loaded. Never \"clean this up\".\n */\nconst CUSTOM_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.custom-icon-cache\");\nexport const customIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[CUSTOM_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[CUSTOM_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/** True when `name` is one of the curated custom (react-icons) ids. */\nexport function isCustomIconName(name: string): boolean {\n return Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name);\n}\n\n/** The curated custom icon ids (known without loading react-icons). */\nexport function listCustomIconNames(): string[] {\n return Object.keys(CUSTOM_ICON_LOADERS);\n}\n\n/**\n * Lazy-load a curated custom icon from the optional `react-icons` peer.\n * Returns null for unknown names, a missing export, or when `react-icons`\n * is not installed — the caller degrades to the fallback icon.\n */\nexport async function loadCustomIcon(\n name: string,\n): Promise<IconComponentType | null> {\n const cached = customIconCache[name];\n if (cached) {\n return cached;\n }\n const load = Object.prototype.hasOwnProperty.call(CUSTOM_ICON_LOADERS, name)\n ? CUSTOM_ICON_LOADERS[name]\n : undefined;\n if (!load) {\n return null;\n }\n try {\n const exported = await load();\n if (typeof exported !== \"function\") {\n return null;\n }\n const IconComponent = exported as IconComponentType;\n customIconCache[name] = IconComponent;\n return IconComponent;\n } catch {\n // react-icons not installed (optional peer) — degrade to the fallback icon.\n return null;\n }\n}\n","/**\n * Injectable registry for host-owned SVG assets. Stored icon ids use the form\n * `svg:<path-without-leading-slash-and-without-extension>` e.g. `svg:icons/Home`\n * → whatever URL the host registered for the id `icons/Home` (typically `/icons/Home.svg`).\n *\n * The package ships EMPTY — the host application registers its own asset paths once at\n * startup via {@link registerSvgIcons}. An unregistered `svg:` value resolves to null\n * and the resolver falls back exactly as it does for an unknown Lucide name.\n */\n// The registry lives on a globalThis Symbol.for slot, NOT module state: with\n// dual ESM/CJS unsplit bundles each loader graph instantiates its own module,\n// and a module-level map would silently split the host's registrations from\n// a consumer resolving through the other graph. Never \"clean this up\".\nconst SVG_REGISTRY_SLOT = Symbol.for(\"ai-matrx.icons.svg-registry\");\nconst svgIconRegistry: Record<string, string> = (() => {\n const holder = globalThis as Record<symbol, Record<string, string> | undefined>;\n let reg = holder[SVG_REGISTRY_SLOT];\n if (!reg) {\n reg = {};\n holder[SVG_REGISTRY_SLOT] = reg;\n }\n return reg;\n})();\n\nconst SVG_PREFIX = \"svg:\";\n\n/**\n * Register (or override) `svg:` icon ids → asset URLs. Merges into the module-level\n * registry, so multiple calls compose. Ids are stored without the `svg:` prefix.\n */\nexport function registerSvgIcons(map: Record<string, string>): void {\n for (const [rawId, path] of Object.entries(map)) {\n const id = rawId.startsWith(SVG_PREFIX)\n ? rawId.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\")\n : rawId.replace(/^\\/+/, \"\");\n if (id && path) {\n svgIconRegistry[id] = path;\n }\n }\n}\n\n/** The registered asset URL for a `svg:…` icon value, or null when not a registered svg icon. */\nexport function parseSvgIconPath(value: string): string | null {\n if (!value.startsWith(SVG_PREFIX)) {\n return null;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n const path = svgIconRegistry[id];\n return path ?? null;\n}\n\n/** True if `value` is a `svg:…` id with a registered asset path. */\nexport function isSvgIconValue(value: string | null | undefined): boolean {\n if (!value || !value.startsWith(SVG_PREFIX)) {\n return false;\n }\n const id = value.slice(SVG_PREFIX.length).replace(/^\\/+/, \"\");\n return Boolean(svgIconRegistry[id]);\n}\n\n/** Every registered svg icon value, `svg:` prefix included (for pickers/galleries). */\nexport function listSvgIconValues(): string[] {\n return Object.keys(svgIconRegistry).map((id) => `${SVG_PREFIX}${id}`);\n}\n","/**\n * Lucide.dev lists icons in kebab-case (e.g. `alarm-clock`); the React package\n * exports PascalCase (`AlarmClock`). Normalize pasted / typed names into candidates\n * to validate against `lucide-react` exports.\n */\n\n/**\n * If the user pasted Lucide's JSX snippet (e.g. `'<BugPlay />'` or `<AlignCenterHorizontal />`),\n * return the component name only. Otherwise return null.\n *\n * Supports optional outer quotes and optional attributes before the closing `/>`.\n */\nexport function extractLucideJsxIconName(raw: string): string | null {\n let s = raw.trim();\n if (!s) return null;\n if (\n (s.startsWith(\"'\") && s.endsWith(\"'\") && s.length >= 2) ||\n (s.startsWith('\"') && s.endsWith('\"') && s.length >= 2)\n ) {\n s = s.slice(1, -1).trim();\n }\n const m = s.match(/^<\\s*([A-Za-z][A-Za-z0-9]*)(?:\\s[^>]*)?\\s*\\/\\s*>$/);\n return m?.[1] ?? null;\n}\n\n/** `alarm-clock` → `AlarmClock`, `a-arrow-down` → `AArrowDown` */\nexport function kebabCaseToLucidePascalCase(raw: string): string {\n const s = raw.trim();\n if (!s.includes(\"-\")) {\n return s;\n }\n return s\n .split(\"-\")\n .filter(Boolean)\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).toLowerCase())\n .join(\"\");\n}\n\n/**\n * Ordered unique candidates: exact input, first-letter fix, kebab → Pascal variants.\n * Skip Lucide heuristics for `svg:…` asset values (caller should pass only those as `[trimmed]`).\n */\nexport function collectLucideIconNameCandidates(raw: string): string[] {\n const t = raw.trim();\n if (!t) {\n return [];\n }\n\n const out: string[] = [];\n const push = (s: string) => {\n if (s && !out.includes(s)) {\n out.push(s);\n }\n };\n\n push(t);\n\n if (t[0] === t[0]!.toLowerCase()) {\n push(t.charAt(0).toUpperCase() + t.slice(1));\n }\n\n if (t.includes(\"-\")) {\n push(kebabCaseToLucidePascalCase(t));\n const lower = t.toLowerCase();\n if (lower !== t) {\n push(kebabCaseToLucidePascalCase(lower));\n }\n }\n\n return out;\n}\n","/**\n * lucide-react namespaced exports: icons are ForwardRef/Memo objects in current builds,\n * not plain functions. Only createLucideIcon and default are non-icon exports we skip.\n */\nconst LUCIDE_NAMESPACE_DENYLIST = new Set([\"default\", \"createLucideIcon\"]);\n\n/**\n * True if `exported` is the value of a Lucide icon entry for `name` in `import * as Lucide`.\n * Does not mean the icon exists in the static resolver map — only that the lucide-react\n * module exposes this name as a renderable component type.\n */\nexport function isLucideModuleIconExport(\n name: string,\n exported: unknown,\n): boolean {\n if (!name || LUCIDE_NAMESPACE_DENYLIST.has(name)) return false;\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n if (typeof exported === \"object\" && \"$$typeof\" in (exported as object)) {\n return true;\n }\n return false;\n}\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { cn } from \"./cn\";\nimport {\n staticLucideIconMap,\n fallbackZapIcon as Zap,\n} from \"./static-icons\";\nimport {\n customIconCache,\n isCustomIconName,\n listCustomIconNames,\n loadCustomIcon,\n} from \"./custom-icons\";\nimport { hasLucideIcon, loadLucideIcon } from \"./lucide-lazy\";\nimport {\n isSvgIconValue,\n listSvgIconValues,\n parseSvgIconPath,\n} from \"./svg-registry\";\nimport type { IconComponentType, IconRenderProps } from \"./types\";\n\n// Cache for dynamically loaded icons to prevent re-importing. Lives on a\n// globalThis Symbol.for slot, NOT module state — dual ESM/CJS unsplit bundles\n// each instantiate their own module graph, and a per-graph cache would\n// re-import icons the other graph already resolved. Never \"clean this up\".\nconst DYNAMIC_CACHE_SLOT = Symbol.for(\"ai-matrx.icons.dynamic-icon-cache\");\nconst dynamicIconCache: Record<string, IconComponentType> = (() => {\n const holder = globalThis as Record<\n symbol,\n Record<string, IconComponentType> | undefined\n >;\n let cache = holder[DYNAMIC_CACHE_SLOT];\n if (!cache) {\n cache = {};\n holder[DYNAMIC_CACHE_SLOT] = cache;\n }\n return cache;\n})();\n\n/**\n * Finite list for a curated icon gallery: every statically bundled Lucide name,\n * curated custom ids (react-icons), and all registered `svg:…` assets.\n */\nexport function getCuratedIconIdsForPicker(): string[] {\n const set = new Set<string>();\n for (const k of Object.keys(staticLucideIconMap)) {\n set.add(k);\n }\n for (const k of listCustomIconNames()) {\n set.add(k);\n }\n for (const id of listSvgIconValues()) {\n set.add(id);\n }\n return Array.from(set).sort((a, b) =>\n a.localeCompare(b, undefined, { sensitivity: \"base\" }),\n );\n}\n\n/**\n * True if this exact name maps to a known icon (static Lucide, curated custom id, or\n * previously resolved dynamic Lucide cached under this key).\n *\n * Does not import lucide-react — use with {@link isRegisteredOrLucideIconName} for full checks.\n */\nexport function isIconRegisteredSync(\n iconName: string | null | undefined,\n): boolean {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n const name = iconName;\n if (isCustomIconName(name)) return true;\n if (staticLucideIconMap[name]) return true;\n return Boolean(dynamicIconCache[name]);\n}\n\n/**\n * True if `iconName` is a real icon id: custom/static/cached, a registered `svg:…`\n * asset, or a Lucide export that is a renderable component (not the fallback Zap).\n *\n * Prefer this over truthiness on {@link getIconComponent}, which always returns a component.\n */\nexport async function isRegisteredOrLucideIconName(\n iconName: string | null | undefined,\n): Promise<boolean> {\n if (!iconName || iconName.trim() === \"\") {\n return false;\n }\n if (isSvgIconValue(iconName)) {\n return true;\n }\n if (isIconRegisteredSync(iconName)) {\n return true;\n }\n try {\n return await hasLucideIcon(iconName);\n } catch {\n return false;\n }\n}\n\n/**\n * HOW TO ADD MORE STATIC ICONS:\n *\n * The curated hot set ships in the package (src/static-icons.ts). A host that\n * frequently renders an icon outside the set keeps it zero-latency by statically\n * importing it and registering it once at startup:\n *\n * import { YourIcon } from \"lucide-react\";\n * import { extendStaticIcons } from \"@ai-matrx/icons\";\n * extendStaticIcons({ YourIcon });\n */\n\nexport interface IconResolverProps {\n iconName: string | null;\n className?: string | undefined;\n size?: number | undefined;\n fallbackIcon?: string | undefined;\n style?: React.CSSProperties | undefined;\n}\n\n/**\n * IconResolver - A unified component for resolving and rendering icons by name\n * Uses hybrid approach: static imports for common icons, dynamic imports for others\n * Supports all lucide-react icons, curated custom icons (optional react-icons peer),\n * and registered `svg:…` public assets.\n */\nconst IconResolver: React.FC<IconResolverProps> = ({\n iconName,\n className = \"h-4 w-4\",\n size,\n fallbackIcon = \"Zap\",\n style,\n}) => {\n const svgSrc = iconName ? parseSvgIconPath(iconName) : null;\n const [DynamicIcon, setDynamicIcon] = useState<IconComponentType | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n const loadIcon = async () => {\n if (!iconName) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n if (parseSvgIconPath(iconName)) {\n setDynamicIcon(null);\n setIsLoading(false);\n return;\n }\n\n // Check custom icons first (already-loaded cache hit is synchronous)\n const cachedCustom = customIconCache[iconName];\n if (cachedCustom) {\n setDynamicIcon(() => cachedCustom);\n return;\n }\n\n // Check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n setDynamicIcon(() => staticIcon);\n return;\n }\n\n // Check if already cached\n const cachedDynamic = dynamicIconCache[iconName];\n if (cachedDynamic) {\n setDynamicIcon(() => cachedDynamic);\n return;\n }\n\n // Curated custom icon: lazy-import the optional react-icons peer;\n // degrade to the fallback icon when it is absent.\n if (isCustomIconName(iconName)) {\n setIsLoading(true);\n const loaded = await loadCustomIcon(iconName);\n if (cancelled) return;\n if (loaded) {\n setDynamicIcon(() => loaded);\n } else {\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n setIsLoading(false);\n return;\n }\n\n // Dynamically import from lucide-react\n setIsLoading(true);\n try {\n // One icon, one chunk — never the lucide-react namespace (see lucide-lazy.ts).\n const IconComponent = await loadLucideIcon(iconName);\n if (cancelled) return;\n\n if (IconComponent) {\n dynamicIconCache[iconName] = IconComponent;\n setDynamicIcon(() => IconComponent);\n } else {\n // Icon not found, use fallback\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n }\n } catch (error) {\n if (cancelled) return;\n console.warn(`Failed to load icon: ${iconName}`, error);\n setDynamicIcon(() => staticLucideIconMap[fallbackIcon] || Zap);\n } finally {\n if (!cancelled) setIsLoading(false);\n }\n };\n\n loadIcon();\n // Cancellation: without it, a slow dynamic import resolving after unmount\n // (or after iconName changed) called setState on a dead/stale effect.\n return () => {\n cancelled = true;\n };\n }, [iconName, fallbackIcon]);\n\n if (svgSrc) {\n return (\n <img\n src={svgSrc}\n alt=\"\"\n className={cn(\"object-contain shrink-0\", className)}\n width={size}\n height={size}\n style={style}\n />\n );\n }\n\n // Get the icon component to render\n const IconComponent = DynamicIcon || staticLucideIconMap[fallbackIcon] || Zap;\n\n // Build exact-optional props (never pass an explicit undefined through)\n const iconProps: IconRenderProps = {\n ...(className !== undefined ? { className } : {}),\n ...(size !== undefined ? { size } : {}),\n ...(style !== undefined ? { style } : {}),\n };\n\n // Show fallback while loading dynamic icons (seamless experience)\n if (isLoading && !DynamicIcon) {\n const FallbackIcon = staticLucideIconMap[fallbackIcon] || Zap;\n return <FallbackIcon {...iconProps} />;\n }\n\n return <IconComponent {...iconProps} />;\n};\n\nexport default IconResolver;\n\n/**\n * Synchronous utility function for getting icon components directly\n * Only works with statically imported icons plus already-loaded custom/dynamic icons.\n * For dynamic Lucide icons not in the static map, use the IconResolver component instead\n *\n * **Always returns a component** (default/fallback Zap when unknown). Do not use the return\n * value to infer whether `iconName` exists — use {@link isIconRegisteredSync} or\n * {@link isRegisteredOrLucideIconName} instead.\n */\nexport const getIconComponent = (\n iconName: string | null | undefined,\n fallbackIcon: string = \"Zap\",\n): IconComponentType => {\n if (!iconName) {\n return staticLucideIconMap[fallbackIcon] || Zap;\n }\n\n // First check custom icons (loaded lazily; a hit means it is already cached)\n const custom = customIconCache[iconName];\n if (custom) {\n return custom;\n }\n\n // Then check statically imported Lucide icons\n const staticIcon = staticLucideIconMap[iconName];\n if (staticIcon) {\n return staticIcon;\n }\n\n // Check dynamic cache\n const dynamic = dynamicIconCache[iconName];\n if (dynamic) {\n return dynamic;\n }\n\n // Fallback to default icon\n return staticLucideIconMap[fallbackIcon] || Zap;\n};\n\n/**\n * Renders an icon element directly with optional props\n * This is the preferred method for rendering icons in JSX\n */\nexport const renderIcon = (\n iconName: string | null | undefined,\n props?: IconRenderProps,\n fallbackIcon: string = \"Zap\",\n) => {\n const IconComponent = getIconComponent(iconName, fallbackIcon);\n return <IconComponent {...props} />;\n};\n\n/**\n * Utility to detect if a string is a hex color code\n */\nexport const isHexColor = (color: string): boolean => {\n return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n};\n\nexport const getTextColorClass = (color?: string) => {\n if (!color) return \"text-gray-600 dark:text-gray-400\";\n\n // If it's a hex color, return null (we'll use inline styles instead)\n if (isHexColor(color)) return null;\n\n const colorMap: Record<string, string> = {\n gray: \"text-gray-600 dark:text-gray-400\",\n rose: \"text-rose-600 dark:text-rose-400\",\n blue: \"text-blue-600 dark:text-blue-400\",\n amber: \"text-amber-600 dark:text-amber-400\",\n cyan: \"text-cyan-600 dark:text-cyan-400\",\n emerald: \"text-emerald-600 dark:text-emerald-400\",\n fuchsia: \"text-fuchsia-600 dark:text-fuchsia-400\",\n green: \"text-green-600 dark:text-green-400\",\n indigo: \"text-indigo-600 dark:text-indigo-400\",\n lime: \"text-lime-600 dark:text-lime-400\",\n neutral: \"text-neutral-600 dark:text-neutral-400\",\n orange: \"text-orange-600 dark:text-orange-400\",\n pink: \"text-pink-600 dark:text-pink-400\",\n purple: \"text-purple-600 dark:text-purple-400\",\n red: \"text-red-600 dark:text-red-400\",\n sky: \"text-sky-600 dark:text-sky-400\",\n slate: \"text-slate-600 dark:text-slate-400\",\n stone: \"text-stone-600 dark:text-stone-400\",\n teal: \"text-teal-600 dark:text-teal-400\",\n violet: \"text-violet-600 dark:text-violet-400\",\n yellow: \"text-yellow-600 dark:text-yellow-400\",\n zinc: \"text-zinc-600 dark:text-zinc-400\",\n };\n\n return colorMap[color.toLowerCase()] || \"text-gray-600 dark:text-gray-400\";\n};\n\n/**\n * Utility function for rendering an icon with color and size\n * Note: This is synchronous and only works with statically imported icons\n * For dynamic icons, use the DynamicIcon component instead\n */\nexport const getIconWithColorAndSize = (\n iconName: string | null,\n color: string = \"gray\",\n size: number = 4,\n) => {\n const IconComponent = getIconComponent(iconName);\n const colorClass = getTextColorClass(color);\n // Hex colors have no Tailwind class (getTextColorClass returns null) —\n // they color via inline style. The original interpolated the null into the\n // className as a literal \"null\" token; fixed in 0.1.1.\n return (\n <IconComponent\n className={cn(`h-${size} w-${size}`, colorClass)}\n {...(colorClass === null ? { style: { color } } : {})}\n />\n );\n};\n\n/**\n * Simple Icon component for direct usage with color and size support\n * Uses IconResolver internally to support both static and dynamic icons\n *\n * Supports both Tailwind color names (e.g., \"blue\", \"red\", \"zinc\") and hex colors (e.g., \"#ff0000\", \"#666\")\n */\nexport interface DynamicIconProps {\n name: string | null;\n color?: string | undefined;\n size?: number | undefined;\n className?: string | undefined;\n fallbackIcon?: string | undefined;\n}\n\nexport const DynamicIcon: React.FC<DynamicIconProps> = ({\n name,\n color = \"gray\",\n size = 4,\n className,\n fallbackIcon = \"Zap\",\n}) => {\n const isHex = color && isHexColor(color);\n const colorClass = isHex ? null : getTextColorClass(color);\n const sizeClass = `h-${size} w-${size}`;\n\n // Build className: always include size, include colorClass if not hex, include custom className\n const combinedClassName = [sizeClass, !isHex && colorClass, className]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n // If hex color, apply as inline style\n const style = isHex ? { color } : undefined;\n\n return (\n <IconResolver\n iconName={name}\n className={combinedClassName}\n fallbackIcon={fallbackIcon}\n style={style}\n />\n );\n};\n","/**\n * Minimal className join — the only piece of `cn` this package needs.\n * No tailwind-merge / clsx dependency by design: callers pass literal strings.\n */\nexport function cn(\n ...values: Array<string | null | undefined | false>\n): string {\n return values.filter(Boolean).join(\" \").trim();\n}\n","/**\n * Per-icon lazy loading for the rest of the Lucide catalog.\n *\n * Never `import(\"lucide-react\")` (the namespace) at runtime: a host bundler that also sees static\n * named imports of lucide-react then puts EVERY icon (~1,500 kB source, ~190 kB gzip) into the\n * statically loaded chunk — the whole catalog lands on the first screen. Lucide's own\n * `dynamicIconImports` map (one `() => import(...)` per icon) keeps each icon its own chunk, so an\n * icon outside the static hot set costs one tiny request when first rendered.\n * Guarded by `lucide-lazy.test.ts` and the chat package's side-panel bundle budget.\n */\nimport type { IconComponentType } from \"./types\";\n\ntype IconLoader = () => Promise<{ default: unknown }>;\n\n/** `arrow-up-0-1` → `ArrowUp01` (Lucide's own export-name rule). */\nexport function lucideKeyToPascal(key: string): string {\n return key\n .split(\"-\")\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nconst INDEX_SLOT = Symbol.for(\"ai-matrx.icons.lucide-lazy-index\");\ntype IndexHolder = Record<symbol, Promise<Map<string, IconLoader>> | undefined>;\n\n/** PascalCase export name → loader, built once from lucide's map (aliases included). */\nfunction lucideIndex(): Promise<Map<string, IconLoader>> {\n const holder = globalThis as IndexHolder;\n let index = holder[INDEX_SLOT];\n if (!index) {\n index = import(\"lucide-react/dynamicIconImports.mjs\").then((mod) => {\n const imports = ((mod as { default?: unknown }).default ?? mod) as Record<string, IconLoader>;\n const map = new Map<string, IconLoader>();\n for (const key of Object.keys(imports)) {\n const loader = imports[key];\n if (typeof loader === \"function\") map.set(lucideKeyToPascal(key), loader);\n }\n return map;\n });\n // A failed load (lucide missing) must be retryable, not cached forever.\n index.catch(() => {\n if (holder[INDEX_SLOT] === index) holder[INDEX_SLOT] = undefined;\n });\n holder[INDEX_SLOT] = index;\n }\n return index;\n}\n\n/** `Home`, `HomeIcon` and `LucideHome` are the same Lucide icon. */\nfunction exportNameCandidates(name: string): string[] {\n const out = [name];\n const unprefixed = name.startsWith(\"Lucide\") ? name.slice(\"Lucide\".length) : name;\n if (unprefixed !== name) out.push(unprefixed);\n for (const n of [...out]) if (n.endsWith(\"Icon\") && n.length > 4) out.push(n.slice(0, -4));\n return out;\n}\n\nfunction isRenderable(exported: unknown): exported is IconComponentType {\n if (exported == null) return false;\n if (typeof exported === \"function\") return true;\n return typeof exported === \"object\" && \"$$typeof\" in (exported as object);\n}\n\n/** True when `name` is an export name of the installed lucide-react catalog (no icon is loaded). */\nexport async function hasLucideIcon(name: string): Promise<boolean> {\n const index = await lucideIndex();\n return exportNameCandidates(name).some((n) => index.has(n));\n}\n\n/** Load ONE Lucide icon by export name; null when lucide-react has no such icon. */\nexport async function loadLucideIcon(name: string): Promise<IconComponentType | null> {\n const index = await lucideIndex();\n for (const candidate of exportNameCandidates(name)) {\n const loader = index.get(candidate);\n if (!loader) continue;\n const mod = await loader();\n return isRenderable(mod.default) ? mod.default : null;\n }\n return null;\n}\n"],"mappings":";;;AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOA,IAAM,sBAAyD;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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OAAO,kBAAkB,KAAK;AACzD,QAAM,YAAY,KAAK,IAAI,MAAM,IAAI;AAGrC,QAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,YAAY,SAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACR,KAAK;AAGR,QAAM,QAAQ,QAAQ,EAAE,MAAM,IAAI;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":["Map","Map","DynamicIcon","IconComponent"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/icons",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "The AI Matrx icon resolver: turn any icon NAME into a rendered component — a curated static map of ~140 hot Lucide icons for zero-latency hits, a validated dynamic import for the rest of the Lucide catalog, a module-level cache, kebab/PascalCase name normalization, an injectable svg: public-asset registry, and a fallback icon while loading.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",