feat: 检索词表 + 表情技能 + 海报字重编排 三向增强

- 中文语义词表 425 → 619 条(+194),新增行业细分/商业指标/技术工程/合规风控/节日节气/生活服务等 17 组场景词;对 11.8 万图标名语料复核覆盖率 99.0%

- 表情技能 12 → 20(motion 11→13 新增循环接缝/多元素错峰;emotion 1→7 新增强度匹配/场景克制/覆盖度/可读性/调性一致/情绪跳变)

- 共享技能 54 → 55:新增头像向技能 avatar-safe-zone(圆/方裁切安全区),映射到方案评审步骤

- 海报字体层级:新增 TYPE_SCALES 四档白名单(impact/editorial/steady/quiet),AI 决策 JSON 增加 typeScaleId,渲染层按预设输出 400/700/800 与字号比;非法值回退默认

- 修复 audit-emojis.html 技能数量断言过期(12→20);emoji-smoke 62/62 通过,audit-emojis 27 通过 0 失败

- 版本联动 20261108e(cn-tags / skills core+layout / sticker skills / poster-generator+ai)
This commit is contained in:
sgp
2026-11-08 10:45:28 +08:00
parent 50d6e019ce
commit beb10e170b
16 changed files with 2020 additions and 80 deletions
+3 -3
View File
@@ -32,9 +32,9 @@ h1{font-size:16px}h2{font-size:14px;margin:14px 0 6px}
<script src="js/core/emojiGen.js?v=20260824a"></script>
<script src="js/core/emojiAi.js?v=20260824a"></script>
<script src="js/sticker-skills/core.js?v=20260823e"></script>
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
<script src="js/sticker-skills/skills.js?v=20261108e"></script>
<script src="js/data/builtin-icons.js?v=20261108d"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/data/cn-tags.js?v=20261108e"></script>
<script src="js/core/iconlib.js?v=20261108d"></script>
<script>
@@ -85,7 +85,7 @@ async function run() {
// 表情技能库完整性
const skillIds = HGB_StickerSkills.all().map(s => s.id);
check('表情技能 12 个注册', skillIds.length === 12, '实际 ' + skillIds.length);
check('表情技能 20 个注册', skillIds.length === 20, '实际 ' + skillIds.length);
check('全部技能 test 通过', skillIds.every(id => {
try { const r = HGB_StickerSkills.test(id); return !!r && r.error === undefined && r.ok !== false; }
catch (e) { return false; }
+3 -3
View File
@@ -325,8 +325,8 @@
<script src="js/core/dicebear.js?v=20260822e"></script>
<script src="js/core/ai.js?v=20260927a"></script>
<script src="js/core/aiDesigner.js?v=20260812h"></script>
<script src="js/skills/core.js?v=20260824a"></script>
<script src="js/skills/layout.js?v=20260823d"></script>
<script src="js/skills/core.js?v=20261108e"></script>
<script src="js/skills/layout.js?v=20261108e"></script>
<script src="js/skills/color.js?v=20260823d"></script>
<script src="js/skills/typography.js?v=20260823d"></script>
<script src="js/skills/icon.js?v=20260823d"></script>
@@ -335,7 +335,7 @@
<script src="js/skills/export.js?v=20260823d"></script>
<script src="js/ui/panels.js?v=20261105e"></script>
<script src="js/data/builtin-icons.js?v=20261108d"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/data/cn-tags.js?v=20261108e"></script>
<script src="js/core/iconlib.js?v=20261108d"></script>
<script src="js/app.js"></script>
</body>
+2 -2
View File
@@ -215,9 +215,9 @@
<script src="js/core/emojiGen.js?v=20260824a"></script>
<script src="js/core/emojiAi.js?v=20260824a"></script>
<script src="js/sticker-skills/core.js?v=20260823e"></script>
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
<script src="js/sticker-skills/skills.js?v=20261108e"></script>
<script src="js/data/builtin-icons.js?v=20261108d"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/data/cn-tags.js?v=20261108e"></script>
<script src="js/core/iconlib.js?v=20261108d"></script>
<script src="js/ui/emoji.js?v=20261105a"></script>
</body>
+3 -3
View File
@@ -327,8 +327,8 @@
<script src="js/core/dicebear.js?v=20260822e"></script>
<script src="js/core/ai.js?v=20260927a"></script>
<script src="js/core/aiDesigner.js?v=20260812h"></script>
<script src="js/skills/core.js?v=20260824a"></script>
<script src="js/skills/layout.js?v=20260824a"></script>
<script src="js/skills/core.js?v=20261108e"></script>
<script src="js/skills/layout.js?v=20261108e"></script>
<script src="js/skills/color.js?v=20260824a"></script>
<script src="js/skills/typography.js?v=20260824a"></script>
<script src="js/skills/icon.js?v=20260824a"></script>
@@ -337,7 +337,7 @@
<script src="js/skills/export.js?v=20260824a"></script>
<script src="js/ui/panels.js?v=20261105e"></script>
<script src="js/data/builtin-icons.js?v=20261108d"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/data/cn-tags.js?v=20261108e"></script>
<script src="js/core/iconlib.js?v=20261108d"></script>
<script src="js/app.js"></script>
</body>
+14 -5
View File
@@ -10,16 +10,20 @@ const HGB_PosterAI = (function () {
function buildPrompt(opt) {
const layoutList = HGB_PosterGenerator.LAYOUTS.map(l => `${l.id}:${l.name}`).join('\n');
const paletteList = HGB_PosterGenerator.PALETTES.map(p => `${p.id}:${p.name}(背景 ${p.bg})`).join('\n');
const sys = `你是顶级的海报设计师。请基于用户提供的主题信息,从白名单中选择版式与配色,设计多套专业海报方案。
const scaleList = HGB_PosterGenerator.TYPE_SCALES
.map(s => `${s.id}:${s.name}(标题 ${s.titleWeight} / 副标题 ${s.subWeight},标题占画布宽 ${Math.round(s.titleRatio * 1000) / 10}%)— ${s.note}`)
.join('\n');
const sys = `你是顶级的海报设计师。请基于用户提供的主题信息,从白名单中选择版式、配色与字体层级,设计多套专业海报方案。
设计原则:
1. 标题(title)精炼有力、突出主题;副标题(subtitle)补充说明(可空)。
2. 版式 layoutId 与配色 paletteId 必须从白名单中选择,不得编造。
3. 多套方案尽量使用不同的版式与配色,呈现不同设计方向。
4. 每套方案给出贴切的中文方案名(name)与设计理念(concept)。
2. 版式 layoutId、配色 paletteId、字体层级 typeScaleId 必须从白名单中选择,不得编造。
3. 字体层级按信息调性选择:促销/活动用强冲击,文化/品牌叙事用编辑感,政务/金融用稳健均衡,高端/极简用克制留白。
4. 多套方案尽量使用不同的版式、配色与字体层级,呈现不同设计方向。
5. 每套方案给出贴切的中文方案名(name)与设计理念(concept)。
只输出 JSON,不要输出任何其他文字。JSON 结构:
{ "overallConcept": "整体理念", "plans": [ { "name": "方案名", "title": "主标题", "subtitle": "副标题(可空)", "paletteId": "indigo", "layoutId": "centered", "concept": "设计理念" } ] }
{ "overallConcept": "整体理念", "plans": [ { "name": "方案名", "title": "主标题", "subtitle": "副标题(可空)", "paletteId": "indigo", "layoutId": "centered", "typeScaleId": "impact", "concept": "设计理念" } ] }
其中 plans 数组包含 ${opt.count || 5} 套方案。`;
const user = `【主题信息】
- 行业/主题:${opt.industry || '通用'}
@@ -33,6 +37,9 @@ ${layoutList}
【配色白名单】
${paletteList}
【字体层级白名单】
${scaleList}
请设计 ${opt.count || 5} 套海报方案。`;
return [
{ role: 'system', content: sys },
@@ -54,6 +61,7 @@ ${paletteList}
for (const p of data.plans) {
if (!HGB_PosterGenerator.PALETTES.some(x => x.id === p.paletteId)) p._paletteInvalid = true;
if (!HGB_PosterGenerator.LAYOUTS.some(x => x.id === p.layoutId)) p._layoutInvalid = true;
if (!HGB_PosterGenerator.TYPE_SCALES.some(x => x.id === p.typeScaleId)) p._scaleInvalid = true;
}
return data;
}
@@ -63,6 +71,7 @@ ${paletteList}
const decision = HGB_PosterGenerator.defaultDecision(p.title, p.subtitle);
if (!p._paletteInvalid) decision.paletteId = p.paletteId;
if (!p._layoutInvalid) decision.layoutId = p.layoutId;
if (!p._scaleInvalid) decision.typeScaleId = p.typeScaleId;
const elements = HGB_PosterGenerator.generate(spec, decision);
return {
id: 'poster_' + Date.now().toString(36) + idx.toString(36),
+31 -12
View File
@@ -13,6 +13,24 @@ const HGB_PosterGenerator = (function () {
{ id: 'minimal', name: '极简', bg: '#ffffff', primary: '#111827', accent: '#4f46e5' }
];
/**
* 字体层级预设(白名单):AI 只能从中选择,保证标题/副标题的字号比与字重组合可控。
* 字重限制在 400 / 700 / 800 —— 渲染器只内嵌 Noto Sans SC Regular(400) 与 Bold(700-900),
* 超出范围的权重会被浏览器合成,视觉不可控。
*/
const TYPE_SCALES = [
{ id: 'impact', name: '强冲击', titleWeight: 800, subWeight: 400, titleRatio: 0.075, subRatio: 0.38, note: '促销/活动主视觉,超大粗标题压场' },
{ id: 'editorial', name: '编辑感', titleWeight: 700, subWeight: 400, titleRatio: 0.062, subRatio: 0.44, note: '文化/品牌叙事,标题收敛、副标题更可读' },
{ id: 'steady', name: '稳健均衡', titleWeight: 700, subWeight: 700, titleRatio: 0.068, subRatio: 0.40, note: '政务/金融等信息型海报,标题副标题同粗同稳' },
{ id: 'quiet', name: '克制留白', titleWeight: 400, subWeight: 400, titleRatio: 0.052, subRatio: 0.46, note: '高端/极简,细标题+大留白,靠空间而非字重建立层级' }
];
const DEFAULT_SCALE = 'impact';
function scaleOf(id) {
return TYPE_SCALES.find(s => s.id === id) || TYPE_SCALES[0];
}
function uid(p) { return p + '_' + Date.now().toString(36) + Math.random().toString(36).slice(2, 6); }
function rect(id, x, y, w, h, fill) { return { id, type: 'rect', x, y, w, h, fill }; }
@@ -28,9 +46,9 @@ const HGB_PosterGenerator = (function () {
const cw = spec.w, ch = spec.h, els = [];
els.push(rect(uid('bg'), 0, 0, cw, ch, o.palette.bg));
els.push(circle(uid('dot'), cw / 2, ch * 0.30, ch * 0.12, o.palette.accent));
const fs = Math.round(cw * 0.075);
els.push(text(uid('title'), o.title, cw / 2, ch * 0.50, fs, 800, o.palette.primary, 'middle'));
if (o.sub) els.push(text(uid('sub'), o.sub, cw / 2, ch * 0.56, Math.round(fs * 0.38), 400, o.palette.primary, 'middle'));
const fs = Math.round(cw * o.scale.titleRatio);
els.push(text(uid('title'), o.title, cw / 2, ch * 0.50, fs, o.scale.titleWeight, o.palette.primary, 'middle'));
if (o.sub) els.push(text(uid('sub'), o.sub, cw / 2, ch * 0.56, Math.round(fs * o.scale.subRatio), o.scale.subWeight, o.palette.primary, 'middle'));
els.push(rect(uid('bar'), cw / 2 - cw * 0.12, ch * 0.62, cw * 0.24, 8, o.palette.accent));
return els;
}
@@ -42,9 +60,9 @@ const HGB_PosterGenerator = (function () {
els.push(rect(uid('bg'), 0, 0, cw, ch, o.palette.bg));
els.push(rect(uid('side'), 0, 0, cw * 0.06, ch, o.palette.accent));
const mx = cw * 0.13;
const fs = Math.round(cw * 0.08);
els.push(text(uid('title'), o.title, mx, ch * 0.44, fs, 800, o.palette.primary, 'start'));
if (o.sub) els.push(text(uid('sub'), o.sub, mx, ch * 0.52, Math.round(fs * 0.36), 400, o.palette.primary, 'start'));
const fs = Math.round(cw * o.scale.titleRatio);
els.push(text(uid('title'), o.title, mx, ch * 0.44, fs, o.scale.titleWeight, o.palette.primary, 'start'));
if (o.sub) els.push(text(uid('sub'), o.sub, mx, ch * 0.52, Math.round(fs * o.scale.subRatio), o.scale.subWeight, o.palette.primary, 'start'));
els.push(rect(uid('bar'), mx, ch * 0.58, cw * 0.18, 8, o.palette.accent));
return els;
}
@@ -55,9 +73,9 @@ const HGB_PosterGenerator = (function () {
const cw = spec.w, ch = spec.h, els = [];
els.push(rect(uid('bg'), 0, 0, cw, ch, o.palette.bg));
els.push(rect(uid('band'), 0, ch * 0.18, cw, ch * 0.16, o.palette.accent));
const fs = Math.round(cw * 0.07);
els.push(text(uid('title'), o.title, cw / 2, ch * 0.26, fs, 800, o.palette.bg, 'middle'));
if (o.sub) els.push(text(uid('sub'), o.sub, cw / 2, ch * 0.55, Math.round(fs * 0.42), 400, o.palette.primary, 'middle'));
const fs = Math.round(cw * o.scale.titleRatio);
els.push(text(uid('title'), o.title, cw / 2, ch * 0.26, fs, o.scale.titleWeight, o.palette.bg, 'middle'));
if (o.sub) els.push(text(uid('sub'), o.sub, cw / 2, ch * 0.55, Math.round(fs * o.scale.subRatio), o.scale.subWeight, o.palette.primary, 'middle'));
return els;
}
}
@@ -67,13 +85,14 @@ const HGB_PosterGenerator = (function () {
function generate(spec, decision) {
const palette = PALETTES.find(p => p.id === decision.paletteId) || PALETTES[0];
const layout = LAYOUTS.find(l => l.id === decision.layoutId) || LAYOUTS[0];
const o = { palette, title: decision.title || '海报标题', sub: decision.sub || '' };
const scale = scaleOf(decision.typeScaleId);
const o = { palette, scale, title: decision.title || '海报标题', sub: decision.sub || '' };
return layout.build(spec, o);
}
function defaultDecision(title, sub) {
return { paletteId: 'indigo', layoutId: 'centered', title: title || '海报标题', sub: sub || '' };
return { paletteId: 'indigo', layoutId: 'centered', typeScaleId: DEFAULT_SCALE, title: title || '海报标题', sub: sub || '' };
}
return { PALETTES, LAYOUTS, generate, defaultDecision };
return { PALETTES, LAYOUTS, TYPE_SCALES, scaleOf, generate, defaultDecision };
})();
+1229 -34
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -5,7 +5,7 @@
## 生成时间
2026-11-07T18:50:43.761Z
2026-11-08T02:38:04.341Z
## ① 图标库(共享,LOGO/头像/海报共用)
@@ -21,10 +21,10 @@
## ③ 技能库
- 共享技能:54(分类:layout 10 / color 9 / typography 8 / icon 8 / ai 6 / presentation 5 / export 8)
- 共享技能:55(分类:layout 11 / color 9 / typography 8 / icon 8 / ai 6 / presentation 5 / export 8)
- 海报技能:64(分类:layout 8 / color 8 / typography 8 / grid 8 / hierarchy 8 / print 8 / creative 8 / ai 8)
- 表情技能:12(分类:motion 11 / emotion 1)
- 三区覆盖(共享,按 scene/workspaces):LOGO 向 54 / 头像向 45 / 海报向 54 / 未标注 0
- 表情技能:20(分类:motion 13 / emotion 7)
- 三区覆盖(共享,按 scene/workspaces):LOGO 向 54 / 头像向 46 / 海报向 54 / 未标注 0
- 三区覆盖(海报专属):LOGO 向 0 / 头像向 0 / 海报向 64
- 技能明细:js/data/manifest/skills.json
+176 -3
View File
@@ -1,9 +1,9 @@
{
"kind": "skills",
"generatedAt": "2026-08-23T17:18:35.193Z",
"generatedAt": "2026-11-08T02:38:00.293Z",
"guide": "js/data/manifest/README.md",
"shared": {
"total": 54,
"total": 55,
"categories": [
{
"step": 1,
@@ -288,6 +288,46 @@
"poster"
]
},
{
"id": "avatar-safe-zone",
"name": "头像安全区",
"category": "layout",
"emoji": "⭕",
"scene": "头像导出前的圆/方裁切安全检查(微信/QQ/抖音等平台多为圆形裁切)",
"summary": "圆形裁切时主体直径占画布 62%-78% 最稳(平台会裁掉四角),方形 70%-88%;主体中心偏移不得超过留白的一半,否则裁切后偏边。",
"params": [
{
"name": "crop",
"type": "string",
"required": false,
"desc": "裁切形状:'circle' 圆形(默认)/ 'square' 方形"
},
{
"name": "subjectRatio",
"type": "number",
"required": false,
"desc": "主体直径占画布比例(默认 0.7)"
},
{
"name": "size",
"type": "number",
"required": false,
"desc": "画布边长 px(默认 300)"
},
{
"name": "offset",
"type": "object",
"required": false,
"desc": "主体中心相对画布中心偏移 {x,y}(px)"
}
],
"source": "自研(平台头像裁切规范:圆形内切 + 留白安全域)",
"step": 3,
"kind": "check",
"workspaces": [
"avatar"
]
},
{
"id": "contrast-check",
"name": "对比度校验",
@@ -2495,7 +2535,7 @@
]
},
"sticker": {
"total": 12,
"total": 20,
"categories": null,
"skills": [
{
@@ -2692,6 +2732,139 @@
"workspaces": [
"emoji"
]
},
{
"id": "motion-loop-seam",
"name": "循环接缝",
"category": "motion",
"emoji": "🔁",
"scene": "检查循环类动画(漂浮/呼吸/脉冲/旋转)首尾帧是否闭合,避免导出 GIF 时出现跳帧",
"summary": "周期动画必须满足 f(0) ≈ f(1):正弦驱动天然闭合;含位移累加或线性旋转的动画需确认整周期回到原点。",
"params": {
"type": "动画类型 id",
"cycles": "整周期内的往返次数(默认 1)",
"amplitude": "强度倍率"
},
"source": "自研(循环动画连续性)",
"workspaces": [
"emoji"
]
},
{
"id": "motion-multi-element",
"name": "多元素错峰",
"category": "motion",
"emoji": "🎚",
"scene": "表情由主图 + 装饰(星星/汗滴/符号)组成时,检查各元素是否错峰,避免整组同相抖动",
"summary": "N 个元素应按周期均匀分配相位延迟(delay = period / N),主图领先、装饰跟随 0.1-0.25 个周期。",
"params": {
"elements": "元素数量",
"duration": "周期秒(默认 1.2)",
"leadRatio": "主图领先比例(默认 0.08)"
},
"source": "自研(分层动画错峰)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-intensity",
"name": "情绪强度匹配",
"category": "emotion",
"emoji": "🌡",
"scene": "评估动画幅度/节奏是否与情绪强度一致(微笑用轻浮动,狂喜才用夸张弹跳)",
"summary": "强度 1-5 与动效幅度映射:1-2 用呼吸/淡入,3 用脉冲/浮动,4-5 才用弹跳/心跳/抖动。",
"params": {
"intensity": "情绪强度 1-5(默认 3)",
"amplitude": "动效幅度倍率(默认 1)",
"type": "动画类型 id"
},
"source": "自研(情绪-动效映射)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-context",
"name": "场景克制度",
"category": "emotion",
"emoji": "🏷",
"scene": "同一情绪在不同使用场景(聊天/弹幕/工作群/亲密关系)需要不同表达强度",
"summary": "工作场景避免强烈负向与夸张动效;弹幕需高辨识度短动效;亲密场景可夸张;聊天居中即可。",
"params": {
"scene": "场景(chat/bullet/work/intimate,默认 chat)",
"emotion": "情绪 id(如 joy/anger/sad/wow/love)",
"amplitude": "动效幅度(默认 1)"
},
"source": "自研(场景化表情规范)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-coverage",
"name": "情绪覆盖度",
"category": "emotion",
"emoji": "🎭",
"scene": "检查一套表情包的情绪分布是否失衡(全是开心 / 缺中性 / 负向过多)",
"summary": "健康的一组表情建议:正向 50%-70%、中性 15%-30%、负向 10%-25%,且必含至少 1 个中性锚点。",
"params": {
"emotions": "情绪 id 数组或 {joy:4, neutral:1} 计数对象"
},
"source": "自研(表情包情绪配比)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-clarity",
"name": "情绪可读性",
"category": "emotion",
"emoji": "👁",
"scene": "小尺寸(48-96px)下表情是否一眼可辨,装饰过多会削弱情绪识别",
"summary": "主体占画面 ≥ 60%、装饰元素 ≤ 2 个、避免细碎线条;小尺寸优先强化眼神与嘴形这类情绪特征。",
"params": {
"size": "展示尺寸 px(默认 64)",
"subjectRatio": "主体占比 0-1(默认 0.7)",
"decorations": "装饰元素数(默认 1)",
"fineLines": "细碎线条数(默认 0)"
},
"source": "自研(小尺寸可读性)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-brand-fit",
"name": "角色调性一致性",
"category": "emotion",
"emoji": "🧭",
"scene": "角色/IP/品牌有固定调性时,检查表情情绪是否越界(严谨品牌不适合夸张搞怪)",
"summary": "调性决定可用情绪集:friendly 全开、calm 去狂喜狂怒、sharp 弱化软萌、formal 仅中性+轻正向。",
"params": {
"tone": "调性(friendly/calm/sharp/formal,默认 friendly)",
"emotion": "情绪 id",
"amplitude": "动效幅度(默认 1)"
},
"source": "自研(品牌调性-情绪白名单)",
"workspaces": [
"emoji"
]
},
{
"id": "emotion-transition",
"name": "情绪跳变",
"category": "emotion",
"emoji": "↔️",
"scene": "一组表情按顺序播放或成套使用时,相邻情绪强度落差过大会显得突兀",
"summary": "相邻情绪强度差建议 ≤2;强负向与强正向之间应有中性过渡项。",
"params": {
"sequence": "情绪 id 数组(按使用顺序)"
},
"source": "自研(情绪序列过渡)",
"workspaces": [
"emoji"
]
}
]
}
+1 -1
View File
@@ -77,7 +77,7 @@ const HGB_Skills = (function () {
'neutral-palette': 2,
// ③ 方案评审(检查类)
'composition': 3, 'align-check': 3, 'negative-space': 3, 'spacing-check': 3, 'proportion-check': 3,
'visual-balance': 3, 'focal-point': 3, 'rule-of-thirds': 3, 'circle-crop-safety': 3,
'visual-balance': 3, 'focal-point': 3, 'rule-of-thirds': 3, 'circle-crop-safety': 3, 'avatar-safe-zone': 3,
'contrast-check': 3, 'wcag-contrast': 3, 'color-blind-check': 3, 'monochrome-check': 3,
'font-hierarchy': 3, 'text-fit': 3, 'tiny-readable': 3, 'letter-spacing-check': 3, 'line-break': 3,
'cjk-mix-check': 3,
+47
View File
@@ -389,6 +389,53 @@
const edge = { plan: { elements: [{ type: 'icon', iconId: 'x', x: 585, y: 300, w: 30, h: 30 }] } };
return { generated: this.run({ plan }).pass !== undefined, edge: this.run(edge).risky.length };
}
},
{
id: 'avatar-safe-zone',
name: '头像安全区',
category: 'layout',
emoji: '⭕',
scene: '头像导出前的圆/方裁切安全检查(微信/QQ/抖音等平台多为圆形裁切)',
summary: '圆形裁切时主体直径占画布 62%-78% 最稳(平台会裁掉四角),方形 70%-88%;主体中心偏移不得超过留白的一半,否则裁切后偏边。',
params: [
{ name: 'crop', type: 'string', required: false, desc: "裁切形状:'circle' 圆形(默认)/ 'square' 方形" },
{ name: 'subjectRatio', type: 'number', required: false, desc: '主体直径占画布比例(默认 0.7)' },
{ name: 'size', type: 'number', required: false, desc: '画布边长 px(默认 300)' },
{ name: 'offset', type: 'object', required: false, desc: '主体中心相对画布中心偏移 {x,y}(px)' }
],
source: '自研(平台头像裁切规范:圆形内切 + 留白安全域)',
workspaces: ['avatar'],
run: function (args) {
const crop = (args.crop === 'square') ? 'square' : 'circle';
const ratio = Number(args.subjectRatio) || 0.7;
const size = Number(args.size) || 300;
const off = args.offset || { x: 0, y: 0 };
const dx = Number(off.x) || 0;
const dy = Number(off.y) || 0;
const range = crop === 'circle' ? [0.62, 0.78] : [0.7, 0.88];
const pad = size * (1 - ratio) / 2;
const tips = [];
if (ratio > range[1]) tips.push('主体占比 ' + Math.round(ratio * 100) + '% 偏大(建议 ≤' + Math.round(range[1] * 100) + '%),' + (crop === 'circle' ? '圆形裁切会切到主体边缘' : '导出后显拥挤'));
if (ratio < range[0]) tips.push('主体占比 ' + Math.round(ratio * 100) + '% 偏小(建议 ≥' + Math.round(range[0] * 100) + '%),头像缩小后辨识度不足');
const maxOff = pad * 0.5;
if (Math.abs(dx) > maxOff || Math.abs(dy) > maxOff) {
tips.push('主体中心偏移 (x' + Math.round(dx) + ', y' + Math.round(dy) + ') 超过安全留白的一半(±' + Math.round(maxOff) + 'px),裁切后偏边');
}
if (crop === 'circle' && ratio > 0.78) tips.push('圆形裁切的安全直径约为画布的 100%,但视觉留白建议保留 12% 以上');
return {
pass: tips.length === 0,
crop, subjectRatio: ratio, size, offset: { x: dx, y: dy }, safeRange: range, padding: Math.round(pad),
verdict: tips.length ? tips.join(';') : crop === 'circle' ? '主体在圆形裁切安全区内,四角留白充足' : '主体比例与居中位置符合方形头像规范',
suggest: tips.length ? '建议把主体缩放到画布 ' + Math.round((range[0] + range[1]) / 2 * 100) + '% 并居中' : '无需调整'
};
},
test: function () {
const good = this.run({ crop: 'circle', subjectRatio: 0.7, size: 300, offset: { x: 0, y: 0 } });
const big = this.run({ crop: 'circle', subjectRatio: 0.95, size: 300 });
const off = this.run({ crop: 'square', subjectRatio: 0.75, size: 300, offset: { x: 60, y: 0 } });
return { good: good.pass, bigFails: big.pass === false, offsetFails: off.pass === false };
}
}
]);
})();
+240 -1
View File
@@ -1,5 +1,5 @@
/**
* 画个标 · 表情技能(12 个:motion 11 / emotion 1)
* 画个标 · 表情技能(20 个:motion 13 / emotion 7)
* 全部为纯函数:run(args) 返回 {ok/tip/...},test() 可自跑。
* 用于表情生成后的评审/优化建议(动态节奏/物理/循环/体积/平台/情绪)。
* 来源标注「自研」或公开设计原则。
@@ -264,5 +264,244 @@ HGB_StickerSkills.register([
return { ok: smooth || eased, tip: (smooth ? '正弦驱动,平滑自然' : eased ? '含减速/压缩段,物理自然' : '线性驱动,建议叠加缓动曲线') + '(' + t + ')' };
},
test() { return this.run({ type: 'bounce' }); }
},
/* ---------- 第二批 motion(动效质量深化,2026-11-08) ---------- */
{
id: 'motion-loop-seam', name: '循环接缝', category: 'motion', emoji: '🔁',
scene: '检查循环类动画(漂浮/呼吸/脉冲/旋转)首尾帧是否闭合,避免导出 GIF 时出现跳帧',
summary: '周期动画必须满足 f(0) ≈ f(1):正弦驱动天然闭合;含位移累加或线性旋转的动画需确认整周期回到原点。',
params: { type: '动画类型 id', cycles: '整周期内的往返次数(默认 1)', amplitude: '强度倍率' },
source: '自研(循环动画连续性)',
run(args) {
const t = args.type || 'float';
const cycles = Number(args.cycles) || 1;
const amp = Number(args.amplitude) || 1;
const periodic = ['float', 'breath', 'pulse', 'heartbeat', 'wiggle', 'bounce', 'hopspin'];
const smoothLoop = ['float', 'breath', 'pulse', 'heartbeat'];
const spinning = ['spin', 'twirl'];
const continuous = spinning.includes(t);
const closed = periodic.includes(t) || continuous;
const intCycles = Math.abs(cycles - Math.round(cycles)) < 1e-6;
const ok = closed && intCycles;
const tips = [];
if (!closed) tips.push('该动画不保证首尾闭合,建议改用正弦驱动或补首尾过渡帧');
if (!intCycles) tips.push('往返次数需为整数(当前 ' + cycles + '),否则末帧与首帧错位');
if (smoothLoop.includes(t) && amp > 1.4) tips.push('幅度过大时接缝更明显,建议 amplitude ≤ 1.4');
return {
ok, type: t, cycles, amplitude: amp,
tip: tips.length ? tips.join(';') : '首尾帧闭合,循环无跳帧(' + t + ' × ' + cycles + ' 周期)'
};
},
test() {
return { ok: this.run({ type: 'float', cycles: 2, amplitude: 1 }).ok, bad: this.run({ type: 'float', cycles: 1.5 }).ok };
}
},
{
id: 'motion-multi-element', name: '多元素错峰', category: 'motion', emoji: '🎚',
scene: '表情由主图 + 装饰(星星/汗滴/符号)组成时,检查各元素是否错峰,避免整组同相抖动',
summary: 'N 个元素应按周期均匀分配相位延迟(delay = period / N),主图领先、装饰跟随 0.1-0.25 个周期。',
params: { elements: '元素数量', duration: '周期秒(默认 1.2)', leadRatio: '主图领先比例(默认 0.08)' },
source: '自研(分层动画错峰)',
run(args) {
const n = Math.max(1, Number(args.elements) || 3);
const d = Number(args.duration) || 1.2;
const lead = Number(args.leadRatio) || 0.08;
const step = n > 1 ? (0.85 - lead) / (n - 1) : 0;
const delays = [];
for (let i = 0; i < n; i++) delays.push(Math.round((-lead - step * i) * d * 1000) / 1000);
const samePhase = n > 1 && step * d < 0.02;
const maxDelay = Math.abs(delays[delays.length - 1] || 0);
const ok = !samePhase && maxDelay < d;
return {
ok, count: n, period: d, delays,
tip: ok
? n + ' 个元素按 ' + (step * d).toFixed(2) + 's 间隔错峰,最长延迟 ' + maxDelay.toFixed(2) + 's 在周期内'
: '元素同相或延迟超出周期,建议减小元素数或缩短延迟步长'
};
},
test() {
return { ok: this.run({ elements: 3, duration: 1.2 }).ok, single: this.run({ elements: 1 }).ok };
}
},
/* ---------- emotion 情绪传达(第二批,2026-11-08) ---------- */
{
id: 'emotion-intensity', name: '情绪强度匹配', category: 'emotion', emoji: '🌡',
scene: '评估动画幅度/节奏是否与情绪强度一致(微笑用轻浮动,狂喜才用夸张弹跳)',
summary: '强度 1-5 与动效幅度映射:1-2 用呼吸/淡入,3 用脉冲/浮动,4-5 才用弹跳/心跳/抖动。',
params: { intensity: '情绪强度 1-5(默认 3)', amplitude: '动效幅度倍率(默认 1)', type: '动画类型 id' },
source: '自研(情绪-动效映射)',
run(args) {
const intensity = Math.min(5, Math.max(1, Number(args.intensity) || 3));
const amp = Number(args.amplitude) || 1;
const t = args.type || 'pulse';
const strong = ['bounce', 'heartbeat', 'shake', 'hopspin', 'spin'];
const gentle = ['breath', 'fade', 'float', 'pulse', 'twirl', 'wiggle'];
const isStrong = strong.includes(t);
const expectedStrong = intensity >= 4;
const match = isStrong === expectedStrong;
const ampOk = intensity >= 4 ? amp >= 0.9 : amp <= 1.2;
const tips = [];
if (!match) tips.push(expectedStrong ? '强度 ' + intensity + ' 建议用更有力的动效(弹跳/心跳/抖动)' : '强度 ' + intensity + ' 用强动效会显得夸张,建议改呼吸/浮动/脉冲');
if (!ampOk) tips.push(intensity >= 4 ? '幅度偏小(' + amp + '),可提到 1.0+' : '幅度偏大(' + amp + '),建议 ≤ 1.2');
return {
ok: match && ampOk, intensity, amplitude: amp, type: t,
suggestTypes: expectedStrong ? strong : gentle,
tip: tips.length ? tips.join(';') : '情绪强度与动效力度匹配(强度 ' + intensity + ' × ' + t + ')'
};
},
test() {
return { ok: this.run({ intensity: 5, amplitude: 1.1, type: 'bounce' }).ok, gentle: this.run({ intensity: 1, amplitude: 0.8, type: 'breath' }).ok };
}
},
{
id: 'emotion-context', name: '场景克制度', category: 'emotion', emoji: '🏷',
scene: '同一情绪在不同使用场景(聊天/弹幕/工作群/亲密关系)需要不同表达强度',
summary: '工作场景避免强烈负向与夸张动效;弹幕需高辨识度短动效;亲密场景可夸张;聊天居中即可。',
params: { scene: '场景(chat/bullet/work/intimate,默认 chat)', emotion: '情绪 id(如 joy/anger/sad/wow/love)', amplitude: '动效幅度(默认 1)' },
source: '自研(场景化表情规范)',
run(args) {
const scene = args.scene || 'chat';
const emotion = args.emotion || 'joy';
const amp = Number(args.amplitude) || 1;
const cap = { chat: 1.3, bullet: 1.4, work: 0.9, intimate: 1.6 }[scene];
const negative = ['anger', 'sad', 'disgust', 'cry'].includes(emotion);
const strongNegInWork = scene === 'work' && negative && amp > 0.8;
const bulletSlow = scene === 'bullet' && amp < 0.9;
const ok = amp <= (cap || 1.3) && !strongNegInWork && !bulletSlow;
const tips = [];
if (amp > (cap || 1.3)) tips.push(scene + ' 场景建议幅度 ≤ ' + cap);
if (strongNegInWork) tips.push('工作场景的负向情绪建议收敛到 0.8 以下或改用中性表达');
if (bulletSlow) tips.push('弹幕场景需要更强视觉冲击,幅度建议 ≥ 0.9');
return {
ok, scene, emotion, amplitude: amp, cap: cap || 1.3,
tip: tips.length ? tips.join(';') : scene + ' 场景下 ' + emotion + ' 的表达强度合适'
};
},
test() {
return { ok: this.run({ scene: 'chat', emotion: 'joy', amplitude: 1.1 }).ok, work: this.run({ scene: 'work', emotion: 'anger', amplitude: 0.6 }).ok };
}
},
{
id: 'emotion-coverage', name: '情绪覆盖度', category: 'emotion', emoji: '🎭',
scene: '检查一套表情包的情绪分布是否失衡(全是开心 / 缺中性 / 负向过多)',
summary: '健康的一组表情建议:正向 50%-70%、中性 15%-30%、负向 10%-25%,且必含至少 1 个中性锚点。',
params: { emotions: '情绪 id 数组或 {joy:4, neutral:1} 计数对象' },
source: '自研(表情包情绪配比)',
run(args) {
const src = args.emotions;
const counts = {};
if (Array.isArray(src)) for (const e of src) counts[e] = (counts[e] || 0) + 1;
else if (src && typeof src === 'object') Object.assign(counts, src);
const total = Object.values(counts).reduce((a, b) => a + b, 0);
if (!total) return { ok: false, tip: '请提供至少一个情绪(数组或计数对象)' };
const group = e => ['joy', 'love', 'wow', 'excited', 'happy', 'laugh'].includes(e) ? 'pos'
: ['neutral', 'calm', 'think', 'hmm'].includes(e) ? 'neu' : 'neg';
let pos = 0, neu = 0, neg = 0;
for (const [e, n] of Object.entries(counts)) {
const g = group(e);
if (g === 'pos') pos += n; else if (g === 'neu') neu += n; else neg += n;
}
const r = { pos: pos / total, neu: neu / total, neg: neg / total };
const tips = [];
if (r.neu < 0.15) tips.push('缺中性锚点(当前 ' + Math.round(r.neu * 100) + '%),建议补 15%-30%');
if (r.pos > 0.8) tips.push('正向占比过高(' + Math.round(r.pos * 100) + '%),情绪层次单一');
if (r.neg > 0.3) tips.push('负向占比过高(' + Math.round(r.neg * 100) + '%),正式场景易误用');
return {
ok: tips.length === 0, total,
ratio: { pos: Math.round(r.pos * 100), neu: Math.round(r.neu * 100), neg: Math.round(r.neg * 100) },
tip: tips.length ? tips.join(';') : '情绪分布均衡(正 ' + Math.round(r.pos * 100) + '% / 中 ' + Math.round(r.neu * 100) + '% / 负 ' + Math.round(r.neg * 100) + '%)'
};
},
test() {
return { balanced: this.run({ emotions: { joy: 6, neutral: 2, sad: 2 } }).ok, unbalanced: this.run({ emotions: { joy: 9, wow: 1 } }).ok };
}
},
{
id: 'emotion-clarity', name: '情绪可读性', category: 'emotion', emoji: '👁',
scene: '小尺寸(48-96px)下表情是否一眼可辨,装饰过多会削弱情绪识别',
summary: '主体占画面 ≥ 60%、装饰元素 ≤ 2 个、避免细碎线条;小尺寸优先强化眼神与嘴形这类情绪特征。',
params: { size: '展示尺寸 px(默认 64)', subjectRatio: '主体占比 0-1(默认 0.7)', decorations: '装饰元素数(默认 1)', fineLines: '细碎线条数(默认 0)' },
source: '自研(小尺寸可读性)',
run(args) {
const size = Number(args.size) || 64;
const ratio = Number(args.subjectRatio) || 0.7;
const deco = Number(args.decorations) || 0;
const fine = Number(args.fineLines) || 0;
const small = size <= 96;
const tips = [];
if (ratio < 0.6) tips.push('主体占比 ' + Math.round(ratio * 100) + '% 偏小,建议 ≥60%');
if (deco > 2) tips.push('装饰 ' + deco + ' 个过多,小尺寸建议 ≤2');
if (small && fine > 0) tips.push('小尺寸下 ' + fine + ' 条细碎线条会糊,建议简化');
return {
ok: tips.length === 0, size, subjectRatio: ratio, decorations: deco,
tip: tips.length ? tips.join(';') : size + 'px 下主体清晰、装饰克制,情绪一眼可辨'
};
},
test() {
return { ok: this.run({ size: 64, subjectRatio: 0.72, decorations: 1 }).ok, noisy: this.run({ size: 64, subjectRatio: 0.5, decorations: 3 }).ok };
}
},
{
id: 'emotion-brand-fit', name: '角色调性一致性', category: 'emotion', emoji: '🧭',
scene: '角色/IP/品牌有固定调性时,检查表情情绪是否越界(严谨品牌不适合夸张搞怪)',
summary: '调性决定可用情绪集:friendly 全开、calm 去狂喜狂怒、sharp 弱化软萌、formal 仅中性+轻正向。',
params: { tone: '调性(friendly/calm/sharp/formal,默认 friendly)', emotion: '情绪 id', amplitude: '动效幅度(默认 1)' },
source: '自研(品牌调性-情绪白名单)',
run(args) {
const tone = args.tone || 'friendly';
const emotion = args.emotion || 'joy';
const amp = Number(args.amplitude) || 1;
const allow = {
friendly: ['joy', 'love', 'wow', 'sad', 'anger', 'neutral', 'laugh', 'think'],
calm: ['joy', 'neutral', 'think', 'calm', 'sad'],
sharp: ['anger', 'wow', 'joy', 'neutral', 'think'],
formal: ['neutral', 'joy', 'think']
}[tone] || ['joy', 'neutral'];
const inSet = allow.includes(emotion);
const ampCap = { friendly: 1.6, calm: 0.9, sharp: 1.3, formal: 0.7 }[tone] || 1.2;
const ampOk = amp <= ampCap;
const tips = [];
if (!inSet) tips.push(tone + ' 调性不建议使用 ' + emotion + ',可用:' + allow.join('/'));
if (!ampOk) tips.push(tone + ' 调性幅度建议 ≤ ' + ampCap + '(当前 ' + amp + ')');
return {
ok: inSet && ampOk, tone, emotion, amplitude: amp, allowed: allow,
tip: tips.length ? tips.join(';') : emotion + ' 符合 ' + tone + ' 调性,幅度 ' + amp + ' 在安全区'
};
},
test() {
return { ok: this.run({ tone: 'calm', emotion: 'joy', amplitude: 0.8 }).ok, bad: this.run({ tone: 'formal', emotion: 'anger', amplitude: 1.2 }).ok };
}
},
{
id: 'emotion-transition', name: '情绪跳变', category: 'emotion', emoji: '↔️',
scene: '一组表情按顺序播放或成套使用时,相邻情绪强度落差过大会显得突兀',
summary: '相邻情绪强度差建议 ≤2;强负向与强正向之间应有中性过渡项。',
params: { sequence: '情绪 id 数组(按使用顺序)' },
source: '自研(情绪序列过渡)',
run(args) {
const seq = Array.isArray(args.sequence) ? args.sequence : [];
if (seq.length < 2) return { ok: true, tip: '少于 2 个情绪,无需检查过渡' };
const level = { neutral: 1, calm: 1, think: 2, hmm: 2, joy: 3, love: 4, laugh: 4, wow: 4, sad: 3, cry: 4, anger: 5, excited: 5 };
const jump = [];
for (let i = 1; i < seq.length; i++) {
const a = level[seq[i - 1]] || 3, b = level[seq[i]] || 3;
if (Math.abs(a - b) >= 3) jump.push(seq[i - 1] + '→' + seq[i] + '(差' + Math.abs(a - b) + ')');
}
return {
ok: jump.length === 0, length: seq.length, jumps: jump,
tip: jump.length ? '情绪跳变过大:' + jump.join('、') + ',建议中间插入中性/轻度情绪过渡' : '情绪过渡平滑(' + seq.length + ' 个)'
};
},
test() {
return { smooth: this.run({ sequence: ['joy', 'wow', 'neutral'] }).ok, jump: this.run({ sequence: ['anger', 'calm', 'joy'] }).ok };
}
}
]);
+2 -2
View File
@@ -94,10 +94,10 @@
<script src="js/core/posterlib.js?v=20261108d"></script>
<script src="js/core/ai.js?v=20260927a"></script>
<script src="js/core/poster-store.js?v=20261105a"></script>
<script src="js/core/poster-generator.js?v=20261105a"></script>
<script src="js/core/poster-generator.js?v=20261108e"></script>
<script src="js/core/poster-renderer.js?v=20261105a"></script>
<script src="js/core/poster-exporter.js?v=20261105a"></script>
<script src="js/core/poster-ai.js?v=20261105a"></script>
<script src="js/core/poster-ai.js?v=20261108e"></script>
<script>
(function () {
'use strict';
+3 -3
View File
@@ -4,7 +4,7 @@
* 1) motion:帧函数确定性、normalize 补参、帧时间序列、pickAnim 轮换、composeTransform 合法
* 2) gifEncoder:lzwEncode 子块结构 + 确定性(纯函数,用假像素序列)
* 3) emojiGen:generateEmojis 产物带 anim、buildFrameSvg SVG 合法且含动画 transform、纯图形无文字
* 4) sticker-skills:12 技能 test 全部通过、分类白名单 motion/emotion、workspaces 统一 emoji、
* 4) sticker-skills:20 技能 test 全部通过、分类白名单 motion/emotion、workspaces 统一 emoji、
* emotion-fit 评审覆盖 6 种标准情绪(与 emotion-params 生成决策同源)
* 5) emojiAi:降级路径 + validate 白名单修正;情绪驱动降级(无 AI 时首张动画贴合情绪)
*/
@@ -126,7 +126,7 @@ check('contentBox 存在且有效', !!box && box.w > 0 && box.h > 0, box.w.toFix
/* ============ 4) sticker-skills ============ */
console.log('== 4) sticker-skills 技能库 ==');
const SKILL_ALL = HGB_StickerSkills.all();
check('技能总数 = 12', SKILL_ALL.length === 12, '实际 ' + SKILL_ALL.length);
check('', SKILL_ALL.length === 20, '实际 ' + SKILL_ALL.length);
check('分类白名单 = motion/emotion', HGB_StickerSkills.categories().every(c => ['motion', 'emotion'].includes(c.id)), HGB_StickerSkills.categories().map(c => c.id).join('/'));
check('workspaces 统一 emoji', SKILL_ALL.every(s => HGB_StickerSkills.workspacesOf(s.id).includes('emoji')));
let sFail = 0;
@@ -135,7 +135,7 @@ for (const s of SKILL_ALL) {
if (!r || r.error || r.ok === false) { sFail++; console.log(' ❌ test 失败: ' + s.id + ' — ' + JSON.stringify(r)); }
else check(s.id + ' test 通过', true);
}
check('12 技能 test 全通过', sFail === 0);
check('20 技能 test 全通过', sFail === 0);
// 评审闭环:emotion-fit 覆盖 6 种标准情绪(与 emotion-params 生成决策同源)
const EFIT = [
+259 -1
View File
@@ -302,7 +302,265 @@ const EMOJI_EXTRA = {
'南瓜': ['jack-o-lantern', 'pumpkin'],
'南瓜灯': ['jack-o-lantern'],
'蔬菜': ['broccoli', 'carrot', 'cucumber', 'tomato', 'leafy-green', 'vegetable'],
'春节': ['red-envelope', 'firecracker', 'dumpling', 'lantern']
'春节': ['red-envelope', 'firecracker', 'dumpling', 'lantern'],
/* ============================================================
* 第三批(2026-11-08):行业细分 / 商业指标 / 技术工程 / 合规风控 /
* 节日节气 / 生活服务 / 教育科研 / 医疗细分 / 金融细分 / 供应链 /
* 制造能源 / 农业 / 政务文旅 / 宠物母婴 / 美妆服饰 / 家居汽车 / 法律媒体
* 规则:中文 → 英文词根(对齐素材 name 常见拼写),由 scripts/gen-cn-tags.js 生成
* ============================================================ */
// —— 餐饮零售 ——
'餐饮': ['restaurant', 'utensils', 'chef', 'cooking', 'food'],
'咖啡': ['coffee', 'espresso', 'cafe', 'mug'],
'茶饮': ['tea', 'bubble-tea', 'teacup', 'cup'],
'烘焙': ['bakery', 'bread', 'croissant', 'cake', 'cupcake'],
'甜品': ['dessert', 'ice-cream', 'cake', 'donut'],
'火锅': ['hot-pot', 'pot', 'cooking'],
'外卖': ['delivery', 'takeout', 'scooter', 'package'],
'餐厅': ['restaurant', 'dining', 'table', 'fork-knife'],
'超市': ['supermarket', 'shopping-cart', 'basket', 'grocery'],
'便利店': ['store', 'shop', 'convenience'],
'零售': ['retail', 'store', 'shop', 'tag', 'price'],
'电商': ['ecommerce', 'shopping-cart', 'online-shopping', 'cart', 'bag'],
'优惠券': ['coupon', 'ticket', 'discount', 'sale'],
'购物袋': ['shopping-bag', 'bag', 'handbag'],
'生鲜': ['fresh', 'vegetable', 'fruit', 'fish', 'meat'],
'酒水': ['wine', 'beer', 'cocktail', 'bottle', 'glass'],
'酒吧': ['bar', 'cocktail', 'beer', 'wine'],
// —— 商业与增长 ——
'增长': ['growth', 'trending-up', 'chart-up', 'increase'],
'转化': ['conversion', 'funnel', 'target', 'click'],
'留存': ['retention', 'repeat', 'loyalty', 'heart'],
'复购': ['repeat', 'refresh', 'cycle', 'loyalty'],
'裂变': ['share', 'network', 'users', 'growth'],
'漏斗': ['funnel', 'filter', 'conversion'],
'看板': ['dashboard', 'layout', 'grid', 'gauge'],
'报表': ['report', 'chart', 'table', 'document'],
'指标': ['metric', 'gauge', 'chart', 'statistics'],
'预算': ['budget', 'calculator', 'wallet', 'money'],
'成本': ['cost', 'coin', 'receipt', 'calculator'],
'利润': ['profit', 'money', 'chart-up', 'dollar'],
'合同': ['contract', 'document', 'signature', 'agreement'],
'发票': ['invoice', 'receipt', 'bill', 'document'],
'审计': ['audit', 'clipboard', 'checklist', 'search'],
'风控': ['risk', 'shield', 'alert', 'warning'],
'合规': ['compliance', 'shield-check', 'badge-check', 'law'],
'法务': ['law', 'gavel', 'scale', 'justice'],
'版权': ['copyright', 'license', 'certificate', 'badge'],
'商标': ['trademark', 'badge', 'certificate', 'brand'],
'专利': ['patent', 'certificate', 'document', 'badge'],
// —— 技术与工程 ——
'接口': ['api', 'plug', 'connection', 'code'],
'微服务': ['microservice', 'server', 'container', 'service'],
'容器': ['container', 'docker', 'box', 'package'],
'云服务': ['cloud', 'server', 'database'],
'数据库': ['database', 'server', 'storage', 'table'],
'缓存': ['cache', 'database', 'storage', 'refresh'],
'队列': ['queue', 'list', 'layers', 'stack'],
'监控': ['monitor', 'activity', 'pulse', 'eye'],
'告警': ['alert', 'bell', 'warning', 'alarm'],
'日志': ['log', 'file-text', 'terminal', 'list'],
'部署': ['deploy', 'rocket', 'upload', 'server'],
'发布': ['release', 'rocket', 'tag', 'upload'],
'回滚': ['rollback', 'undo', 'refresh', 'history'],
'压测': ['benchmark', 'gauge', 'performance', 'speed'],
'性能': ['performance', 'speed', 'gauge', 'zap'],
'架构': ['architecture', 'layers', 'sitemap', 'grid'],
'重构': ['refactor', 'refresh', 'code', 'wrench'],
'调试': ['debug', 'bug', 'terminal', 'code'],
'测试': ['test', 'flask', 'check', 'clipboard-check'],
'自动化': ['automation', 'robot', 'settings', 'workflow'],
'脚本': ['script', 'code', 'terminal', 'file-code'],
'组件': ['component', 'blocks', 'puzzle', 'box'],
'权限': ['permission', 'lock', 'key', 'shield'],
'角色': ['role', 'user', 'users', 'badge'],
'账号': ['account', 'user', 'profile', 'id-card'],
'密码': ['password', 'lock', 'key', 'eye-off'],
'验证码': ['captcha', 'shield', 'check', 'grid'],
'加密': ['encrypt', 'lock', 'shield', 'key'],
'备份': ['backup', 'save', 'archive', 'database'],
'容灾': ['disaster', 'shield', 'server', 'alert'],
'网关': ['gateway', 'router', 'network', 'server'],
'区块链': ['blockchain', 'blocks', 'chain', 'link'],
'数字货币': ['crypto', 'bitcoin', 'coin', 'wallet'],
'算法': ['algorithm', 'code', 'network', 'chart'],
'模型': ['model', 'brain', 'cube', 'layers'],
'数据集': ['dataset', 'database', 'table', 'folder'],
'标注': ['label', 'tag', 'edit', 'highlighter'],
'训练': ['training', 'dumbbell', 'brain', 'repeat'],
'推理': ['inference', 'brain', 'zap', 'server'],
'算力': ['compute', 'chip', 'cpu', 'server'],
'芯片': ['chip', 'cpu', 'processor', 'microchip'],
'边缘计算': ['edge', 'chip', 'network', 'server'],
'物联': ['iot', 'wifi', 'sensor', 'chip'],
'传感': ['sensor', 'radar', 'activity', 'signal'],
'机器人': ['robot', 'bot', 'android', 'cpu'],
'智能硬件': ['device', 'chip', 'hardware', 'cpu'],
// —— 数据与安全 ——
'数据看板': ['dashboard', 'chart', 'grid', 'activity'],
'数据治理': ['governance', 'database', 'shield', 'list'],
'隐私': ['privacy', 'eye-off', 'shield', 'lock'],
'水印': ['watermark', 'stamp', 'image', 'copyright'],
'溯源': ['trace', 'search', 'link', 'history'],
'校验': ['verify', 'check', 'badge-check', 'shield-check'],
// —— 物流供应链 ——
'物流': ['truck', 'shipping', 'package', 'delivery'],
'仓储': ['warehouse', 'box', 'archive', 'package'],
'库存': ['inventory', 'boxes', 'package', 'clipboard-list'],
'分拣': ['sort', 'filter', 'package', 'layers'],
'运输': ['transport', 'truck', 'ship', 'plane'],
'港口': ['port', 'anchor', 'ship', 'crane'],
'集装箱': ['container', 'box', 'package', 'ship'],
'跨国': ['global', 'globe', 'world', 'plane'],
'报关': ['customs', 'document', 'stamp', 'clipboard'],
'快递': ['courier', 'delivery', 'package', 'truck'],
'冷链': ['cold', 'snowflake', 'truck', 'package'],
// —— 制造业 / 能源 / 农业 ——
'制造': ['factory', 'industry', 'gear', 'wrench'],
'车间': ['factory', 'industry', 'gear', 'cog'],
'流水线': ['assembly', 'conveyor', 'factory', 'layers'],
'质检': ['quality', 'clipboard-check', 'search', 'badge-check'],
'机械': ['gear', 'cog', 'wrench', 'engine'],
'新能源': ['solar', 'wind', 'battery', 'leaf'],
'光伏': ['solar', 'sun', 'panel', 'battery'],
'风电': ['wind', 'turbine', 'fan', 'battery'],
'储能': ['battery', 'storage', 'power', 'zap'],
'电力': ['power', 'bolt', 'plug', 'zap'],
'碳中和': ['carbon', 'leaf', 'eco', 'recycle'],
'环保': ['eco', 'leaf', 'recycle', 'globe'],
'回收': ['recycle', 'refresh', 'trash', 'leaf'],
'农业': ['farm', 'agriculture', 'plant', 'tractor'],
'种植': ['plant', 'seedling', 'sprout', 'farm'],
'养殖': ['farm', 'animal', 'fish', 'barn'],
'渔业': ['fish', 'fishing', 'hook', 'boat'],
'林业': ['forest', 'tree', 'evergreen', 'leaf'],
'灌溉': ['water', 'droplet', 'sprinkler', 'plant'],
'农机': ['tractor', 'farm', 'gear', 'wrench'],
// —— 医疗细分 ——
'口腔': ['tooth', 'dental', 'dentist'],
'眼科': ['eye', 'glasses', 'vision'],
'心理': ['brain', 'heart', 'mind', 'chat'],
'康复': ['recovery', 'activity', 'heart-pulse', 'body'],
'护理': ['nurse', 'care', 'heart', 'bandage'],
'疫苗': ['vaccine', 'syringe', 'shield', 'virus'],
'检验': ['test-tube', 'microscope', 'flask', 'lab'],
'影像': ['scan', 'x-ray', 'image', 'monitor'],
'药店': ['pharmacy', 'pill', 'medicine', 'cross'],
'急救': ['first-aid', 'ambulance', 'heart-pulse', 'cross'],
'中医': ['herb', 'leaf', 'acupuncture', 'tea'],
'康养': ['wellness', 'spa', 'leaf', 'heart'],
// —— 金融细分 ——
'银行': ['bank', 'building', 'credit-card', 'vault'],
'保险': ['insurance', 'shield', 'umbrella', 'heart'],
'证券': ['stock', 'chart', 'trending-up', 'candlestick'],
'基金': ['fund', 'pie-chart', 'chart', 'briefcase'],
'信贷': ['credit', 'card', 'loan', 'wallet'],
'支付': ['payment', 'credit-card', 'wallet', 'qr-code'],
'结算': ['settlement', 'receipt', 'check', 'exchange'],
'汇率': ['exchange', 'currency', 'dollar', 'swap'],
'理财': ['finance', 'chart-up', 'piggy-bank', 'coins'],
'投资': ['invest', 'chart-up', 'rocket', 'coins'],
'融资': ['funding', 'handshake', 'coins', 'rocket'],
'上市': ['ipo', 'rocket', 'building', 'chart-up'],
'并购': ['merger', 'handshake', 'building', 'link'],
// —— 政务 / 文旅 ——
'政务': ['government', 'building', 'landmark', 'stamp'],
'公共服务': ['public', 'service', 'users', 'building'],
'社区': ['community', 'users', 'home', 'building'],
'街道': ['street', 'road', 'map', 'building'],
'文旅': ['tourism', 'culture', 'camera', 'map'],
'景区': ['scenic', 'map', 'mountain', 'camera'],
'酒店': ['hotel', 'bed', 'key', 'building'],
'民宿': ['guesthouse', 'home', 'bed', 'key'],
'博物馆': ['museum', 'building', 'landmark', 'history'],
'展览': ['exhibition', 'frame', 'palette', 'gallery'],
'演出': ['performance', 'mic', 'theater', 'music'],
'非遗': ['heritage', 'craft', 'scissors', 'brush'],
'节庆': ['festival', 'confetti', 'lantern', 'sparkles'],
// —— 教育科研 ——
'课程': ['course', 'book', 'lesson', 'presentation'],
'直播课': ['live', 'video', 'presentation', 'mic'],
'考试': ['exam', 'file-check', 'pencil', 'clipboard'],
'证书': ['certificate', 'badge', 'award', 'ribbon'],
'培训': ['training', 'presentation', 'users', 'graduation-cap'],
'研究': ['research', 'microscope', 'flask', 'search'],
'实验': ['experiment', 'flask', 'test-tube', 'lab'],
'论文': ['paper', 'document', 'file-text', 'book'],
'图书馆': ['library', 'books', 'book', 'building'],
// —— 招聘 / 办公 ——
'招聘': ['recruit', 'user-plus', 'briefcase', 'search'],
'简历': ['resume', 'file-text', 'user', 'briefcase'],
'面试': ['interview', 'users', 'chat', 'briefcase'],
'入职': ['onboarding', 'user-check', 'badge', 'briefcase'],
'考勤': ['attendance', 'clock', 'calendar-check', 'user-check'],
'审批': ['approval', 'check', 'clipboard-check', 'stamp'],
'排班': ['schedule', 'calendar', 'clock', 'users'],
'会议': ['meeting', 'users', 'video', 'presentation'],
'协作': ['collaboration', 'users', 'share', 'handshake'],
'任务': ['task', 'clipboard-list', 'check', 'list'],
'流程': ['workflow', 'git-branch', 'flow', 'settings'],
'自动化流程': ['automation', 'workflow', 'robot', 'refresh'],
// —— 生活服务 / 宠物母婴 / 美妆服饰 ——
'宠物': ['pet', 'dog', 'cat', 'paw'],
'猫': ['cat', 'kitten', 'paw'],
'狗': ['dog', 'puppy', 'paw'],
'母婴': ['baby', 'stroller', 'bottle', 'heart'],
'育儿': ['parenting', 'baby', 'child', 'heart'],
'美妆': ['beauty', 'lipstick', 'cosmetics', 'sparkles'],
'护肤': ['skincare', 'lotion', 'droplet', 'sparkles'],
'美发': ['hair', 'scissors', 'barber'],
'服装': ['clothing', 'shirt', 'dress', 'tshirt'],
'鞋': ['shoe', 'sneaker', 'boot'],
'配饰': ['accessory', 'watch', 'ring', 'gem'],
'珠宝': ['jewelry', 'gem', 'diamond', 'ring'],
'家居': ['home', 'sofa', 'lamp', 'interior'],
'家具': ['furniture', 'chair', 'sofa', 'bed'],
'建材': ['construction', 'brick', 'wall', 'hammer'],
'装修': ['renovation', 'paint', 'roller', 'hammer'],
'汽车服务': ['car', 'wrench', 'garage', 'tire'],
'保养': ['maintenance', 'wrench', 'settings', 'oil'],
'充电': ['charging', 'battery', 'plug', 'bolt'],
// —— 法律 / 媒体 ——
'律师': ['lawyer', 'gavel', 'scale', 'briefcase'],
'诉讼': ['lawsuit', 'gavel', 'document', 'scale'],
'媒体': ['media', 'news', 'mic', 'tv'],
'新闻': ['news', 'newspaper', 'broadcast', 'rss'],
'出版': ['publish', 'book', 'printer', 'file-text'],
'广告': ['advertising', 'megaphone', 'target', 'image'],
'营销': ['marketing', 'megaphone', 'target', 'chart-up'],
'品牌': ['brand', 'badge', 'palette', 'star'],
'公关': ['pr', 'megaphone', 'handshake', 'users'],
// —— 节日节气补充 ——
'元宵': ['lantern', 'dumpling', 'moon'],
'清明': ['qingming', 'leaf', 'rain'],
'端午': ['dragon-boat', 'zongzi', 'leaf'],
'中秋': ['moon-cake', 'moon', 'lantern'],
'重阳': ['chrysanthemum', 'mountain', 'leaf'],
'七夕': ['valentine', 'heart', 'star'],
'元旦': ['new-year', 'confetti', 'fireworks'],
'国庆': ['national-day', 'flag', 'fireworks'],
'教师节': ['teacher', 'apple', 'book'],
'母亲节': ['mother', 'heart', 'flower'],
'父亲节': ['father', 'heart', 'tie'],
'儿童节': ['children', 'balloon', 'toy'],
'感恩节': ['thanksgiving', 'turkey', 'leaf'],
'情人节': ['valentine', 'heart', 'rose'],
'复活节': ['easter', 'egg', 'bunny'],
'春节祝福': ['red-envelope', 'lantern', 'firecracker', 'fu'],
// —— 抽象概念 ——
'效率': ['efficiency', 'zap', 'speed', 'gauge'],
'创新': ['innovation', 'bulb', 'rocket', 'sparkles'],
'协作共赢': ['win-win', 'handshake', 'users', 'heart'],
'全球化': ['global', 'globe', 'world', 'plane'],
'可持续': ['sustainable', 'leaf', 'recycle', 'globe'],
'多元': ['diversity', 'users', 'palette', 'globe'],
'信任': ['trust', 'shield-check', 'handshake', 'heart'],
'品质': ['quality', 'badge-check', 'medal', 'star'],
'速度': ['speed', 'zap', 'rocket', 'gauge'],
'安全': ['security', 'shield', 'lock', 'shield-check'],
'连接': ['connect', 'link', 'plug', 'network'],
'生态': ['ecosystem', 'leaf', 'globe', 'network']
};
function merge(base, extra) {
+3 -3
View File
@@ -186,10 +186,10 @@
<script src="js/core/ai.js?v=20260927a"></script>
<script src="js/core/aiDesigner.js?v=20260812h"></script>
<script src="js/data/builtin-icons.js?v=20261108d"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/data/cn-tags.js?v=20261108e"></script>
<script src="js/core/iconlib.js?v=20261108d"></script>
<script src="js/skills/core.js?v=20260824a"></script>
<script src="js/skills/layout.js?v=20260823d"></script>
<script src="js/skills/core.js?v=20261108e"></script>
<script src="js/skills/layout.js?v=20261108e"></script>
<script src="js/skills/color.js?v=20260823d"></script>
<script src="js/skills/typography.js?v=20260823d"></script>
<script src="js/skills/icon.js?v=20260823d"></script>