♻️ refactor(vscode): 代码阅读的种类图标改成插件自己定义的一组(契约里的封闭名字集合),webview 只带这些图标,不再打包 lucide 全套

This commit is contained in:
cruldra committed 2026-09-27 20:23:44 +08:00
1 parent c1d0dd3753
commit b186b007a4
11 files changed
+139 -47

No files matched your search

@@ -3,7 +3,7 @@ import type { CSSProperties, ReactElement } from 'react'
import type { GroupStyle, Inline, SegmentGroup } from './types'
import { useContext } from 'react'
import { DisplayNameContext, shownName } from './displayNames'
import { KIND_ICONS, lucideIcon } from './kindIcons'
import { KIND_ICON_COMPONENTS, KIND_ICONS } from './kindIcons'
import { isCurrent, segmentOccurrence } from './occurrences'
import { HighlightContext } from './useOccurrences'
@@ -43,7 +43,7 @@ export function SegmentText({ segments }: { segments: Inline[] }): ReactElement
}
/** 框的样式 → 框头图标:遍历同「循环」块的图标;颜色在 codeReader.css 的 .cr-group[data-style] 里。 */
const GROUP_ICONS: Record<GroupStyle, LucideIcon> = { iteration: lucideIcon(KIND_ICONS.loop) }
const GROUP_ICONS: Record<GroupStyle, LucideIcon> = { iteration: KIND_ICON_COMPONENTS[KIND_ICONS.loop] }
/** 框起来的一组词:嵌在前后文字里的小框,放不下时整个挪到下一行,比一行还长时在框里换行。 */
function GroupBox({ group }: { group: SegmentGroup }): ReactElement {