// icons.js — SVG sprite 单源(Lucide 细线条,viewBox 0 0 24 24 / stroke-width 2 / 圆角端点,ISC 许可)。 // 用法:;.ic{ width/height/color } 即可控制尺寸与颜色。 // 收敛三处分散的 Lucide 图标为一份权威 sprite: // · usercenter —— web/usercenter/components/icons.tsx 的内联路径(权威副本,逐字照抄)。 // · lucide-react —— web/website/node_modules/lucide-react(usercenter 没有的从包源提取)。 // 新增图标先在此登记 symbol,再用 引用;勿手写/瞎猜路径。 (function () { // key = kebab-name,value = 该图标的 lucide 子元素串(照搬权威来源)。 var ICONS = { // ── 源自 usercenter(web/usercenter/components/icons.tsx 内联,逐字照抄)── 'layout-dashboard': '', 'link': '', 'ticket': '', 'users': '', 'bell': '', 'copy': '', 'refresh-cw': '', 'qr-code': '', 'download': '', 'check': '', 'check-circle': '', 'zap': '', 'clock': '', 'shield-check': '', 'shield': '', 'crown': '', 'credit-card': '', 'send': '', 'message-circle': '', 'mail': '', 'shopping-bag': '', 'log-out': '', 'external-link': '', 'gift': '', 'smartphone': '', 'lock': '', 'chevron-right': '', 'arrow-down': '', 'settings': '', 'trash-2': '', 'monitor': '', 'key': '', 'sun': '', 'moon': '', 'alert-triangle': '', 'x': '', // ── 源自 lucide-react 包(web/website/node_modules/lucide-react v0.469.0,usercenter 未含)── 'power': '', 'loader-circle': '', 'globe': '', 'user': '', 'search': '', 'chevron-down': '', 'arrow-left': '', 'arrow-up': '', 'arrow-right': '', 'compass': '', 'chart-no-axes-column': '', 'home': '', 'map-pin': '', 'laptop': '', 'monitor-smartphone': '', 'play-circle': '', 'wifi': '', 'eye': '', 'eye-off': '', 'more-vertical': '', 'pencil': '', 'terminal': '', 'menu': '' }; // 组装隐藏 sprite:每个图标一个 ,符号上带 lucide 标准描边属性,故 .ic 只需管 width/height/color。 function buildSprite() { var parts = [''); return parts.join(''); } function inject() { if (document.getElementById('pangolin-icon-sprite')) return; var d = document.createElement('div'); d.id = 'pangolin-icon-sprite'; d.style.cssText = 'position:absolute;width:0;height:0'; d.innerHTML = buildSprite(); document.body.insertBefore(d, document.body.firstChild); } if (document.readyState !== 'loading') inject(); else document.addEventListener('DOMContentLoaded', inject); // 便于调试/校验:暴露原始映射。 if (typeof window !== 'undefined') window.PANGOLIN_ICONS = ICONS; })();