|
|
|
|
@ -0,0 +1,128 @@
|
|
|
|
|
/**
|
|
|
|
|
* 图标表:全站唯一的图标来源(24×24 网格 / 视觉描边等宽 / currentColor)。
|
|
|
|
|
*
|
|
|
|
|
* 为什么自己画而不用图标库:
|
|
|
|
|
* · 换 antd 之前全站 60 多个图标是 Unicode 字符(⌂ ✧ ◫ ✕ ▶ ▧ ◉ ♫ ⇪ ⇶ ⏻ ⌄ …),
|
|
|
|
|
* 粗细由字体决定、emoji 类(🎙🔊👁🗑)在 macOS 上会被渲染成彩色贴图,
|
|
|
|
|
* 同一个「关闭」在抽屉里是 ✕、在胶囊上又成了 ×;
|
|
|
|
|
* · 成套库(lucide / heroicons / tabler)能解决渲染,但它们的画法是通用办公软件的
|
|
|
|
|
* 词汇,我们的七个业务环节(分镜、调度、时间线合成、导出成本)没有对应图形,
|
|
|
|
|
* 补齐又要引第二套画法——两套画法就是我们刚刚花一整轮删掉的东西。
|
|
|
|
|
* · 自绘的代价很小:一张表、一套几何约定、零运行时依赖(antd 的图标包只留了一颗)。
|
|
|
|
|
*
|
|
|
|
|
* 几何约定(改图标前先读这段):
|
|
|
|
|
* 1) 网格 24×24,可视区留 2px 内缩(内容落在 2~22),这样 12px 与 24px 的两档边距一致;
|
|
|
|
|
* 2) 一律描边(fill:none / stroke:currentColor),只有播放、暂停、圆点这类
|
|
|
|
|
* 「必须实心才认得出」的形状走 solids / srects / spots;
|
|
|
|
|
* 3) 圆角与本站尺子对齐:容器类矩形 r=2.2~2.8(对应 radius.control=7 的手感),
|
|
|
|
|
* 小方块 r≈1,端点与拐角全部 round(在 Icon.tsx 上统一给,别在每个形状上写);
|
|
|
|
|
* 4) 不写颜色:颜色永远继承容器文字色,明暗主题与 hover 因此自动跟着走;
|
|
|
|
|
* 5) 同一族图标共用骨架(媒体族共用 3.4~20.6 的外框、动作族共用 4.4~19.6 的十字),
|
|
|
|
|
* 加新图标请从同族复制再改局部,别从空白开始画。
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/** lines=描边路径;rects/dots=描边形;solids/srects/spots=实心;dashed=虚线圆(读作「样本 / 非参考」) */
|
|
|
|
|
export type Glyph = {
|
|
|
|
|
lines?: string[]
|
|
|
|
|
rects?: [x: number, y: number, w: number, h: number, r: number][]
|
|
|
|
|
dots?: [cx: number, cy: number, r: number][]
|
|
|
|
|
solids?: string[]
|
|
|
|
|
srects?: [x: number, y: number, w: number, h: number, r: number][]
|
|
|
|
|
spots?: [cx: number, cy: number, r: number][]
|
|
|
|
|
dashed?: [cx: number, cy: number, r: number]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const glyphs = {
|
|
|
|
|
/* ── 导航:全局三项 + 项目七个环节(侧栏、帮助页、控制台共用同一批图形) ── */
|
|
|
|
|
dashboard: { rects: [[3.2, 3.2, 7, 8.2, 2.2], [13.8, 3.2, 7, 4.4, 2.2], [13.8, 10.8, 7, 10, 2.2], [3.2, 14.6, 7, 6.2, 2.2]] },
|
|
|
|
|
archive: { rects: [[3.6, 4.4, 16.8, 3.8, 1.4]], lines: ['M5.4 8.2v10a2.2 2.2 0 0 0 2.2 2.2h8.8a2.2 2.2 0 0 0 2.2-2.2v-10', 'M9.8 12.2h4.4'] },
|
|
|
|
|
cpu: { rects: [[7.4, 7.4, 9.2, 9.2, 2.2], [10.8, 10.8, 2.4, 2.4, 0.8]], lines: ['M10.4 3.4v4M13.6 3.4v4M10.4 16.6v4M13.6 16.6v4M3.4 10.4h4M3.4 13.6h4M16.6 10.4h4M16.6 13.6h4'] },
|
|
|
|
|
hub: { dots: [[12, 12, 2.7], [5.6, 5.6, 2], [18.4, 5.6, 2], [12, 18.6, 2]], lines: ['M7.1 7.1l3.4 3.4M16.9 7.1l-3.4 3.4M12 16.6v-2'] },
|
|
|
|
|
layers: { lines: ['M12 3.4 20.6 8 12 12.6 3.4 8Z', 'M3.4 12.2 12 16.8l8.6-4.6', 'M3.4 16.2 12 20.8l8.6-4.6'] },
|
|
|
|
|
frames: { rects: [[3, 5.6, 18, 12.8, 2.4]], lines: ['M9 5.6v12.8M15 5.6v12.8', 'M4.4 8.8h3.2M4.4 15.2h3.2M16.4 8.8h3.2M16.4 15.2h3.2'] },
|
|
|
|
|
queue: { rects: [[3.4, 4.4, 3, 3, 1], [3.4, 10.5, 3, 3, 1], [3.4, 16.6, 3, 3, 1]], lines: ['M9.8 5.9h10.8M9.8 12h10.8M9.8 18.1h6.8'] },
|
|
|
|
|
'shield-check': { lines: ['M12 3.4 19.4 6.2v5.3c0 4.3-2.9 7.2-7.4 9.1-4.5-1.9-7.4-4.8-7.4-9.1V6.2Z', 'M8.6 11.8l2.6 2.6 4.4-4.7'] },
|
|
|
|
|
timeline: { lines: ['M2.8 3.6v16.8'], rects: [[6.2, 5, 6.4, 4.8, 1.6], [16, 5, 4.8, 4.8, 1.6], [6.2, 14, 3.8, 4.8, 1.6], [13, 14, 7.8, 4.8, 1.6]] },
|
|
|
|
|
export: { lines: ['M4.4 14.4v4.2a2.2 2.2 0 0 0 2.2 2.2h10.8a2.2 2.2 0 0 0 2.2-2.2v-4.2', 'M12 15.6V3.4', 'M7.4 8 12 3.4 16.6 8'] },
|
|
|
|
|
|
|
|
|
|
/* ── 媒体:播放控制与素材类型(缩略图角标、灯箱、试听行共用) ── */
|
|
|
|
|
play: { solids: ['M8.6 5.2 18.9 12 8.6 18.8Z'] },
|
|
|
|
|
pause: { srects: [[7.8, 5.4, 3, 13.2, 1.4], [13.2, 5.4, 3, 13.2, 1.4]] },
|
|
|
|
|
stop: { srects: [[6.6, 6.6, 10.8, 10.8, 2.2]] },
|
|
|
|
|
record: { spots: [[12, 12, 5]] },
|
|
|
|
|
mic: { rects: [[9, 2.8, 6, 10.6, 3]], lines: ['M5.4 11.4a6.6 6.6 0 0 0 13.2 0', 'M12 18v2.6M8.6 20.6h6.8'] },
|
|
|
|
|
waveform: { lines: ['M4 9.4v5.2M8 5.6v12.8M12 8.4v7.2M16 4.4v15.2M20 10v4'] },
|
|
|
|
|
music: { dots: [[6.6, 17.4, 2.8], [15.6, 15, 2.8]], lines: ['M9.4 17.4V6.5l9-2.3v10.6'] },
|
|
|
|
|
image: { rects: [[3.4, 4.8, 17.2, 14.4, 2.6]], dots: [[8.6, 9.6, 1.7]], lines: ['M4.4 17.4 9.6 12.2 13.4 15.6 16.6 12.8 20 16.2'] },
|
|
|
|
|
video: { rects: [[3, 6.4, 12.6, 11.2, 2.6]], lines: ['M15.6 11.2 21 8v8l-5.4-3.2Z'] },
|
|
|
|
|
subtitle: { rects: [[3, 5.6, 18, 12.8, 2.8]], lines: ['M10.4 10.6a2.7 2.7 0 1 0 0 2.8M16.6 10.6a2.7 2.7 0 1 0 0 2.8'] },
|
|
|
|
|
volume: { lines: ['M4.4 9.4h3l4.6-3.9v13l-4.6-3.9h-3Z', 'M16.6 9.4a3.9 3.9 0 0 1 0 5.2', 'M19 6.8a7.4 7.4 0 0 1 0 10.4'] },
|
|
|
|
|
|
|
|
|
|
/* ── 动作 ─────────────────────────────────────────────────────────────── */
|
|
|
|
|
plus: { lines: ['M12 4.8v14.4M4.8 12h14.4'] },
|
|
|
|
|
minus: { lines: ['M4.8 12h14.4'] },
|
|
|
|
|
close: { lines: ['M6.2 6.2 17.8 17.8M17.8 6.2 6.2 17.8'] },
|
|
|
|
|
check: { lines: ['M4.8 12.6 9.8 17.6 19.2 6.6'] },
|
|
|
|
|
'check-circle': { dots: [[12, 12, 8.4]], lines: ['M8.2 12.2l2.9 2.9 5-5.4'] },
|
|
|
|
|
edit: { lines: ['M4.6 19.4l1-4L16.1 4.9a2.1 2.1 0 0 1 3 3L8.6 18.4Z', 'M14.4 6.6l3 3'] },
|
|
|
|
|
copy: { rects: [[8.6, 8.6, 11, 11, 2.6]], lines: ['M15.4 5.4H6.6a3 3 0 0 0-3 3v8.8'] },
|
|
|
|
|
trash: { lines: ['M4.6 6.8h14.8', 'M9.6 6.8V4.9a1.1 1.1 0 0 1 1.1-1.1h2.6a1.1 1.1 0 0 1 1.1 1.1v1.9', 'M6.6 6.8l.8 12.1a1.7 1.7 0 0 0 1.7 1.6h5.8a1.7 1.7 0 0 0 1.7-1.6l.8-12.1', 'M10.4 10.6v6.2M13.6 10.6v6.2'] },
|
|
|
|
|
backspace: { lines: ['M8.9 5.4H19a2 2 0 0 1 2 2v9.2a2 2 0 0 1-2 2H8.9L2.6 12Z', 'M12.2 9.6l4.4 4.8M16.6 9.6l-4.4 4.8'] },
|
|
|
|
|
refresh: { lines: ['M20.5 12a8.5 8.5 0 1 1-2.6-6.1', 'M20.9 3.4v5h-5'] },
|
|
|
|
|
reset: { lines: ['M3.5 12a8.5 8.5 0 1 0 2.6-6.1', 'M3.1 3.4v5h5'] },
|
|
|
|
|
upload: { lines: ['M4.4 19.6h15.2', 'M12 16.2V3.6', 'M6.9 8.7 12 3.6l5.1 5.1'] },
|
|
|
|
|
download: { lines: ['M4.4 19.6h15.2', 'M12 3.6v12.6', 'M6.9 10.5 12 15.6l5.1-5.1'] },
|
|
|
|
|
external: { lines: ['M13.6 4.4h6v6', 'M19.6 4.4 11.2 12.8', 'M18 14.4v4.2a2.4 2.4 0 0 1-2.4 2.4H6.4A2.4 2.4 0 0 1 4 18.6V9.4A2.4 2.4 0 0 1 6.4 7h4.2'] },
|
|
|
|
|
search: { dots: [[10.6, 10.6, 6.2]], lines: ['M15.2 15.2 20.2 20.2'] },
|
|
|
|
|
eye: { lines: ['M2.6 12S6.4 5.6 12 5.6 21.4 12 21.4 12 17.6 18.4 12 18.4 2.6 12 2.6 12Z'], dots: [[12, 12, 3.1]] },
|
|
|
|
|
'eye-off': { lines: ['M4 4l16 16', 'M9.8 6.1A9.9 9.9 0 0 1 12 5.8c5.6 0 9.4 6.2 9.4 6.2a18.3 18.3 0 0 1-3.6 4.3', 'M6.5 8.1A17.6 17.6 0 0 0 2.6 12s3.8 6.2 9.4 6.2a9.6 9.6 0 0 0 3.5-.7', 'M10.2 10.3a2.9 2.9 0 0 0 3.6 4.2'] },
|
|
|
|
|
sparkle: { solids: ['M9.9 3.2c.7 3.5 1.7 4.5 5.2 5.2-3.5.7-4.5 1.7-5.2 5.2-.7-3.5-1.7-4.5-5.2-5.2 3.5-.7 4.5-1.7 5.2-5.2Z', 'M16.6 14.2c.4 1.9.9 2.4 2.8 2.8-1.9.4-2.4.9-2.8 2.8-.4-1.9-.9-2.4-2.8-2.8 1.9-.4 2.4-.9 2.8-2.8Z'] },
|
|
|
|
|
star: { lines: ['M12 3.6l2.6 5.3 5.8.9-4.2 4.1 1 5.7L12 16.9l-5.2 2.7 1-5.7-4.2-4.1 5.8-.9Z'] },
|
|
|
|
|
'star-filled': { solids: ['M12 3.6l2.6 5.3 5.8.9-4.2 4.1 1 5.7L12 16.9l-5.2 2.7 1-5.7-4.2-4.1 5.8-.9Z'] },
|
|
|
|
|
flag: { lines: ['M6 20.6V3.8h11.6l-2.2 3.7 2.2 3.7H6'] },
|
|
|
|
|
sample: { dashed: [12, 12, 7.6] },
|
|
|
|
|
clock: { dots: [[12, 12, 8.4]], lines: ['M12 7.2V12l3.4 2.1'] },
|
|
|
|
|
hourglass: { lines: ['M7.4 3.8h9.2M7.4 20.2h9.2', 'M8.6 3.8v2.9c0 2 6.8 2 6.8 0V3.8', 'M8.6 20.2v-2.9c0-2 6.8-2 6.8 0v2.9'] },
|
|
|
|
|
expand: { lines: ['M14.4 4.4h5.2v5.2', 'M19.6 4.4 13 11', 'M9.6 19.6H4.4v-5.2', 'M4.4 19.6 11 13'] },
|
|
|
|
|
send: { lines: ['M20.6 3.4 3.4 10.2l6.4 2.6 2.6 6.4Z', 'M20.6 3.4 9.8 12.8'] },
|
|
|
|
|
drag: { spots: [[9, 6.4, 1.3], [15, 6.4, 1.3], [9, 12, 1.3], [15, 12, 1.3], [9, 17.6, 1.3], [15, 17.6, 1.3]] },
|
|
|
|
|
more: { spots: [[5.6, 12, 1.4], [12, 12, 1.4], [18.4, 12, 1.4]] },
|
|
|
|
|
filter: { lines: ['M3.8 5.4h16.4l-6.4 7.4v5.8l-3.6 2v-7.8Z'] },
|
|
|
|
|
sliders: { lines: ['M4 7.2h16M4 16.8h16'], dots: [[9.4, 7.2, 2.2], [14.6, 16.8, 2.2]] },
|
|
|
|
|
swap: { lines: ['M4.6 8.6h13.2', 'M14.2 5 17.8 8.6 14.2 12.2', 'M19.4 15.4H6.2', 'M9.8 11.8 6.2 15.4l3.6 3.6'] },
|
|
|
|
|
|
|
|
|
|
/* ── 方向与折叠 ───────────────────────────────────────────────────────── */
|
|
|
|
|
'chevron-down': { lines: ['M5.6 9.2 12 15.2l6.4-6'] },
|
|
|
|
|
'chevron-up': { lines: ['M5.6 14.8 12 8.8l6.4 6'] },
|
|
|
|
|
'chevron-left': { lines: ['M14.8 5.6 8.8 12l6 6.4'] },
|
|
|
|
|
'chevron-right': { lines: ['M9.2 5.6 15.2 12l-6 6.4'] },
|
|
|
|
|
'arrow-up': { lines: ['M12 19.6V4.6', 'M6.4 10.2 12 4.6l5.6 5.6'] },
|
|
|
|
|
'arrow-down': { lines: ['M12 4.4v15', 'M6.4 13.8 12 19.4l5.6-5.6'] },
|
|
|
|
|
'arrow-left': { lines: ['M19.6 12H4.6', 'M10.2 6.4 4.6 12l5.6 5.6'] },
|
|
|
|
|
'arrow-right': { lines: ['M4.4 12h15', 'M13.8 6.4 19.4 12l-5.6 5.6'] },
|
|
|
|
|
'to-top': { lines: ['M12 20.4V9', 'M6.6 14.4 12 9l5.4 5.4', 'M4.6 4.4h14.8'] },
|
|
|
|
|
'sort-asc': { lines: ['M8 6.4v11.2', 'M3.6 10.8 8 6.4l4.4 4.4', 'M14 8.4h6.4M14 13h5M14 17.6h3.4'] },
|
|
|
|
|
|
|
|
|
|
/* ── 视图切换 / 主题 / 账号 / 状态 ────────────────────────────────────── */
|
|
|
|
|
grid: { rects: [[3.2, 3.2, 7, 7, 2], [13.8, 3.2, 7, 7, 2], [3.2, 13.8, 7, 7, 2], [13.8, 13.8, 7, 7, 2]] },
|
|
|
|
|
list: { lines: ['M9.4 6.6h11M9.4 12h11M9.4 17.4h11'], spots: [[5, 6.6, 1.3], [5, 12, 1.3], [5, 17.4, 1.3]] },
|
|
|
|
|
sun: { dots: [[12, 12, 4.2]], lines: ['M12 2.8v2.4M12 18.8v2.4M2.8 12h2.4M18.8 12h2.4M5.5 5.5l1.7 1.7M16.8 16.8l1.7 1.7M18.5 5.5l-1.7 1.7M7.2 16.8l-1.7 1.7'] },
|
|
|
|
|
moon: { lines: ['M20.4 14.6A8.8 8.8 0 0 1 9.4 3.6a8.8 8.8 0 1 0 11 11Z'] },
|
|
|
|
|
user: { dots: [[12, 8.2, 3.9]], lines: ['M4.9 20.4c0-3.7 3.2-5.9 7.1-5.9s7.1 2.2 7.1 5.9'] },
|
|
|
|
|
users: { dots: [[9.4, 8.4, 3.5]], lines: ['M3 20.2c0-3.4 2.9-5.4 6.4-5.4 1.3 0 2.5.3 3.5.8', 'M16 5.2a3.5 3.5 0 0 1 0 6.6', 'M17.6 14.9c2.1.6 3.4 2.2 3.4 4.6'] },
|
|
|
|
|
power: { lines: ['M12 3.6v8.2', 'M7.1 7a7.6 7.6 0 1 0 9.8 0'] },
|
|
|
|
|
book: { lines: ['M12 6.6A3.2 3.2 0 0 0 8.8 4.4H4v13.2h4.8a3.2 3.2 0 0 1 3.2 2.2', 'M12 6.6a3.2 3.2 0 0 1 3.2-2.2H20v13.2h-4.8A3.2 3.2 0 0 0 12 18.8', 'M12 6.6v12.2'] },
|
|
|
|
|
palette: { lines: ['M12 3.4a8.6 8.6 0 0 0 0 17.2c1.3 0 2-.8 2-1.8s-.8-1.6-.8-2.5c0-1 .8-1.6 1.9-1.6h1.9a3.6 3.6 0 0 0 3.6-3.6C20.6 6.6 16.7 3.4 12 3.4Z'], spots: [[8.2, 11.4, 1.1], [11, 8.2, 1.1], [15, 8.8, 1.1]] },
|
|
|
|
|
target: { dots: [[12, 12, 8.4], [12, 12, 4.4]], spots: [[12, 12, 1.4]] },
|
|
|
|
|
lock: { rects: [[4.8, 10.2, 14.4, 9.8, 2.4]], lines: ['M8.2 10.2V7.8a3.8 3.8 0 0 1 7.6 0v2.4'] },
|
|
|
|
|
key: { dots: [[8.4, 15.6, 4.2]], lines: ['M11.4 12.6 19.8 4.2', 'M16.4 7.6l2.6 2.6'] },
|
|
|
|
|
info: { dots: [[12, 12, 8.4]], lines: ['M12 11v5.4'], spots: [[12, 8.1, 1.1]] },
|
|
|
|
|
warning: { lines: ['M12 4.2 20.9 19.6H3.1Z', 'M12 9.8v4.2'], spots: [[12, 17, 1.1]] },
|
|
|
|
|
'alert-circle': { dots: [[12, 12, 8.4]], lines: ['M12 7.6v5'], spots: [[12, 15.9, 1.1]] },
|
|
|
|
|
'minus-circle': { dots: [[12, 12, 8.4]], lines: ['M8.2 12h7.6'] },
|
|
|
|
|
link: { lines: ['M10.2 13.8a4.2 4.2 0 0 0 6 0l2.4-2.4a4.2 4.2 0 0 0-6-6l-1.2 1.2', 'M13.8 10.2a4.2 4.2 0 0 0-6 0l-2.4 2.4a4.2 4.2 0 0 0 6 6l1.2-1.2'] },
|
|
|
|
|
'folder-open': { lines: ['M3.6 19.4 6.2 7.4h4.2l-1 3.2h7.6a1.6 1.6 0 0 1 1.6 2l-1.4 6.8Z', 'M6.2 7.4V4.6h5.4v2.8'] },
|
|
|
|
|
cost: { rects: [[3.4, 5.4, 17.2, 13.2, 2.4]], lines: ['M7 9.8h6', 'M7 14.2h3.4'], dots: [[16.2, 11.6, 2.3]] }
|
|
|
|
|
} satisfies Record<string, Glyph>
|
|
|
|
|
|
|
|
|
|
export type IconName = keyof typeof glyphs
|