| name | wca-event |
| description | 渲染 WCA 项目名/图标/选择器时用。(1) 图标走 `<EventIcon>` 或 `<CubingIcon>` (内联 SVG,components/EventIcon),禁 `<span className="cubing-icon ...">` (空 span)。(2) /wca 子页选项目用 `<WcaEventSelector>` 21 图标行,不用 `<EventSelect>` 下拉。Triggers: 项目名, EventIcon, CubingIcon, cubing-icon, WcaEventSelector, 项目选择器, event picker, eventDisplayName. |
项目图标 + 选择器
图标渲染(内联 SVG,源 components/EventIcon/svg/)
import { EventIcon, CubingIcon } from '../../components/EventIcon/EventIcon';
import { eventDisplayName } from '../../utils/wca_events';
<EventIcon event="3x3" /> {eventDisplayName(ev, isZh)}
<CubingIcon icon="event-333" />
<CubingIcon icon="unofficial-fto" />
CSS 用 font-size(SVG=1em) + color(SVG fill=currentColor) — 现存规则零改动。
禁:<span className="cubing-icon ...">(font 已撤,会渲空)/ emoji / lucide / 手写 SVG。
/wca 单项目选择器
<WcaEventSelector availableEvents={SET} selectedEvent={ev} onSelect={...} isZh={isZh} />
放 filters 上方独立一行。allowAll 加"全部"。多选传 selectedEvents+onToggle。
废止项(脚拧/八板/十二板/旧多盲,CANCELLED_EVENT_IDS)组件内自动折叠进末尾三角形,点击展开,选中其一则强制展开。别再把它们内联回去。collapsibleAppend(非 WCA 拼图)同时存在时两者合并到同一个三角(tooltip「其他项目」),不并排两个三角。calc 自带 EventSelector 也复刻了废止项折叠。
加新 unofficial 图标
- 拷
D:\cube\icons\src\svg\unofficial\<name>.svg 到 components/EventIcon/svg/unofficial/
utils/cubingScramble.ts 的 TWIZZLE_NONWCA_APPEND 加 { id, iconClass: 'unofficial-<name>' }