// Icon.jsx — Lucide icon wrapper (substitution: Lucide ~ see ICONOGRAPHY) function toPascal(name){ return name.split('-').map(s => s.charAt(0).toUpperCase()+s.slice(1)).join(''); } function Icon({ name, size = 24, color = 'currentColor', stroke = 2, style }) { const ref = React.useRef(null); React.useEffect(() => { const L = window.lucide; if (!ref.current || !L || !L.icons) return; const node = L.icons[toPascal(name)]; if (!node) return; const svg = L.createElement(node); svg.setAttribute('width', size); svg.setAttribute('height', size); svg.setAttribute('stroke', color); svg.setAttribute('stroke-width', stroke); svg.setAttribute('stroke-linecap', 'round'); svg.setAttribute('stroke-linejoin', 'round'); ref.current.replaceChildren(svg); }); return React.createElement('span', { ref, style: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', lineHeight: 0, ...style } }); } Object.assign(window, { Icon });