@manohub/icon 1.0.8 → 1.0.9
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/README.md +5 -2
- package/dist/glyphs.d.ts +6 -0
- package/dist/glyphs.js +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,9 +193,12 @@ import { MY_GLYPHS } from './icons'
|
|
|
193
193
|
③ 名字的来由写在**条目注释**里(如 `schema` / `compose` 都注明了为什么不是字面直译)。
|
|
194
194
|
- **同一图形只登记一次**:设计稿常对多个菜单位复用同一图形(只在画板里挪几像素)。入库前用**逐点位移比对**
|
|
195
195
|
验形(命令序列逐字相同 + 所有点位移一致 ⇒ 同形);同形只留一条,另一处**直接复用同名字形**,不新开键。
|
|
196
|
-
-
|
|
196
|
+
- **方位的单箭头族是 `chevron-*`**(四个方向齐备):翻页相邻一格、展开收起、下拉 caret、表头升降序一律用它;
|
|
197
|
+
**禁止再用 `transform: rotate()` 把别的图标转成方位**——旋转是补丁,时间一长没人知道原字形是什么。
|
|
198
|
+
双箭头 **`chevrons-left` / `chevrons-right`** 是另一个语义(**直达端点**,分页的首 / 末页用),
|
|
199
|
+
不靠并排画两个单箭头表达;它只在左右各有一个,别顺手补成四向。
|
|
197
200
|
- **`back` 是"返回"语义**(↩ 曲线箭头,实心填充族),只用于返回上一级 / 面包屑。它**不响应 `stroke-width`**(线重烘在路径几何里),与描边族并排时粗细对不上,别塞进描边图标的位置。
|
|
198
|
-
- **判据一句话**:这个箭头要能四向切换吗?要 → `chevron
|
|
201
|
+
- **判据一句话**:这个箭头要能四向切换吗?要 → `chevron-*`;是"跨一段直达端点" → `chevrons-left/right`;不要且含"回退"含义 → `back`。
|
|
199
202
|
- **实心 / 空心配对用 `-filled` 后缀**(沿 `favorite` / `favorite-filled`),不写 `-solid` / `-fill`。
|
|
200
203
|
- **新增前先查 `IconNameList` 是否已有同义项**(例如"查找"已由 `search` 覆盖,不要再造 `lookup`;"删除"用 `delete`,不要并存 `trash`)。
|
|
201
204
|
|
package/dist/glyphs.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare const ICON_GLYPHS: {
|
|
|
18
18
|
readonly 'chevron-right': "<path d=\"m9 18 6-6-6-6\"/>";
|
|
19
19
|
readonly 'chevron-down': "<path d=\"m6 9 6 6 6-6\"/>";
|
|
20
20
|
readonly 'chevron-up': "<path d=\"m6 15 6-6 6 6\"/>";
|
|
21
|
+
readonly 'chevrons-left': "<path d=\"m11 17-5-5 5-5\"/><path d=\"m18 17-5-5 5-5\"/>";
|
|
22
|
+
readonly 'chevrons-right': "<path d=\"m6 17 5-5-5-5\"/><path d=\"m13 17 5-5-5-5\"/>";
|
|
21
23
|
readonly check: "<path d=\"M20 6 9 17l-5-5\"/>";
|
|
22
24
|
readonly search: "<circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21-4.3-4.3\"/>";
|
|
23
25
|
readonly user: "<g fill=\"currentColor\" stroke=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12 1.5C14.8995 1.5 17.25 3.85051 17.25 6.75C17.25 9.6495 14.8995 12 12 12C9.1005 12 6.75 9.6495 6.75 6.75C6.75 3.85051 9.1005 1.5 12 1.5ZM21.75 19.125C21.75 15.75 17.385 12.777 12 12.777C6.615 12.777 2.25 15.75 2.25 19.125C2.25 22.179 5.823 22.47 10.4925 22.497H13.5075C18.177 22.47 21.75 22.179 21.75 19.125ZM4.5 19.125C4.5 17.1915 7.7775 15.027 12 15.027C16.2225 15.027 19.5 17.1915 19.5 19.125C19.5 19.8443 18.2145 20.2005 13.1625 20.2455L12 20.25L10.8825 20.247C5.817 20.2103 4.5 19.8443 4.5 19.125ZM9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75Z\"/></g>";
|
|
@@ -60,6 +62,10 @@ export declare const ICON_GLYPHS: {
|
|
|
60
62
|
readonly 'info-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>";
|
|
61
63
|
readonly 'check-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m16 9-5.5 5.5L8 12\"/>";
|
|
62
64
|
readonly 'alert-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\"/><line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\"/>";
|
|
65
|
+
readonly play: "<path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\"/>";
|
|
66
|
+
readonly 'play-filled': "<path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" fill=\"currentColor\" stroke=\"none\"/>";
|
|
67
|
+
readonly pause: "<rect x=\"14\" y=\"4\" width=\"4\" height=\"16\" rx=\"1\"/><rect x=\"6\" y=\"4\" width=\"4\" height=\"16\" rx=\"1\"/>";
|
|
68
|
+
readonly 'pause-filled': "<g fill=\"currentColor\" stroke=\"none\"><rect x=\"14\" y=\"4\" width=\"4\" height=\"16\" rx=\"1\"/><rect x=\"6\" y=\"4\" width=\"4\" height=\"16\" rx=\"1\"/></g>";
|
|
63
69
|
readonly menu: "<line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\"/><line x1=\"4\" x2=\"20\" y1=\"6\" y2=\"6\"/><line x1=\"4\" x2=\"20\" y1=\"18\" y2=\"18\"/>";
|
|
64
70
|
readonly list: "<line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\"/><line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\"/><line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\"/><line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\"/>";
|
|
65
71
|
readonly table: "<path d=\"M12 3v18\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/><path d=\"M3 15h18\"/>";
|
package/dist/glyphs.js
CHANGED
|
@@ -29,6 +29,10 @@ export const ICON_GLYPHS = {
|
|
|
29
29
|
'chevron-right': '<path d="m9 18 6-6-6-6"/>',
|
|
30
30
|
'chevron-down': '<path d="m6 9 6 6 6-6"/>',
|
|
31
31
|
'chevron-up': '<path d="m6 15 6-6 6 6"/>',
|
|
32
|
+
/* 双箭头:**整段跳转**(分页的首 / 末页)。与单箭头同族但语义不同 ——
|
|
33
|
+
* 单箭头是「相邻一格」,双箭头是「直达端点」,故不靠并排画两个单箭头表达。 */
|
|
34
|
+
'chevrons-left': '<path d="m11 17-5-5 5-5"/><path d="m18 17-5-5 5-5"/>',
|
|
35
|
+
'chevrons-right': '<path d="m6 17 5-5-5-5"/><path d="m13 17 5-5-5-5"/>',
|
|
32
36
|
check: '<path d="M20 6 9 17l-5-5"/>',
|
|
33
37
|
search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
|
|
34
38
|
user: '<g fill="currentColor" stroke="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.5C14.8995 1.5 17.25 3.85051 17.25 6.75C17.25 9.6495 14.8995 12 12 12C9.1005 12 6.75 9.6495 6.75 6.75C6.75 3.85051 9.1005 1.5 12 1.5ZM21.75 19.125C21.75 15.75 17.385 12.777 12 12.777C6.615 12.777 2.25 15.75 2.25 19.125C2.25 22.179 5.823 22.47 10.4925 22.497H13.5075C18.177 22.47 21.75 22.179 21.75 19.125ZM4.5 19.125C4.5 17.1915 7.7775 15.027 12 15.027C16.2225 15.027 19.5 17.1915 19.5 19.125C19.5 19.8443 18.2145 20.2005 13.1625 20.2455L12 20.25L10.8825 20.247C5.817 20.2103 4.5 19.8443 4.5 19.125ZM9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75Z"/></g>',
|
|
@@ -78,6 +82,14 @@ export const ICON_GLYPHS = {
|
|
|
78
82
|
'info-circle': '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
|
|
79
83
|
'check-circle': '<circle cx="12" cy="12" r="10"/><path d="m16 9-5.5 5.5L8 12"/>',
|
|
80
84
|
'alert-circle': '<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',
|
|
85
|
+
// ===== 媒体控制(播放 / 暂停) =====
|
|
86
|
+
/* 线性与实心**配对**(`-filled` 后缀,同 `favorite` / `favorite-filled`);路径取自 lucide 的
|
|
87
|
+
`play` / `pause`。实心档是主色实底按钮上的形态(设计稿 MH 261009 node 0:11994
|
|
88
|
+
「发送调试请求」按钮的白色三角),与线性档同路径、只换填色。 */
|
|
89
|
+
play: '<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"/>',
|
|
90
|
+
'play-filled': '<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" fill="currentColor" stroke="none"/>',
|
|
91
|
+
pause: '<rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/>',
|
|
92
|
+
'pause-filled': '<g fill="currentColor" stroke="none"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></g>',
|
|
81
93
|
// ===== 导航 / 表单 / 身份 =====
|
|
82
94
|
menu: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
|
|
83
95
|
list: '<line x1="8" x2="21" y1="6" y2="6"/><line x1="8" x2="21" y1="12" y2="12"/><line x1="8" x2="21" y1="18" y2="18"/><line x1="3" x2="3.01" y1="6" y2="6"/><line x1="3" x2="3.01" y1="12" y2="12"/><line x1="3" x2="3.01" y1="18" y2="18"/>',
|