forked from figmar/apes-sidebar
图标主题(VSCode 的 fileNames / folderNames 半边)需要按**文件名**和**目录名** 着色,扩展名规则表达不了 `package.json` / `Dockerfile` / `node_modules`。 - `names?: readonly string[]`:精确 basename(大小写不敏感),命中优先于扩展名。 - `folderNames?: readonly string[]`:精确目录 basename,命中优先于保留扩展名; 只认领列出的目录,未列出的目录仍走 `'folder'`/`'folder-open'` 或内置 glyph。 - `exts` 变为可选:省略 = 没有扩展名规则(`names`-only 注册不再是 catch-all); `exts: []` 仍是全局默认 catch-all,语义不变。 - `icon(path, size, open?)`:目录行的展开态传入工厂,一条注册即可渲染开/合两态。 - `matchFileIcon` 先 names 后 exts;`matchFolderIcon(open, name?)` 先 folderNames 后保留扩展名(新参数可选,旧调用不变)。 - 指南 §7 同步:字段、匹配顺序、四例注册(names / folderNames / 全目录 / catch-all)。 测试:`tests/file-icons.spec.tsx` 19 → 23(names 大小写、name 优先于 ext、 folderNames 只认领列出目录、open 传入工厂);`tests/consumer-types.ts` 补新字段。