IconRef: add url kind, point registered kinds at palette assets
User pointed at the palette's PNG icons in the bottom toolbar — they
expected the inspector title to use the same artwork, not the iconify
lucide glyphs. Different visual style.
- IconRef gains `{ kind: 'url'; src: string }`. Plain `<img>` render
in ParametricInspector (no next/image — the inspector is
`'use client'`).
- All currently-registered kinds switched to URL refs matching their
palette `iconSrc`:
fence → /icons/fence.png
slab → /icons/floor.png
ceiling → /icons/ceiling.png
wall → /icons/wall.png
spawn → /icons/site.png
shelf → /icons/column.png (placeholder, same as palette)
- Kind-owned panels (slab/ceiling) already pass URL strings to their
own PanelWrapper; unchanged.
Door/window/item will get URL refs when they register at Stage A.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
8c2b03f99b
commit
6a1d853dd8
@@ -137,6 +137,12 @@ export function ParametricInspector() {
|
||||
|
||||
function renderIcon(ref: IconRef | undefined): React.ReactNode | undefined {
|
||||
if (!ref) return undefined
|
||||
if (ref.kind === 'url') {
|
||||
// Plain <img> here so the inspector doesn't pull in next/image's
|
||||
// server-only requirements (the file is `'use client'`). Same
|
||||
// 16x16 box the legacy panels use.
|
||||
return <img alt="" className="h-4 w-4 shrink-0 object-contain" src={ref.src} />
|
||||
}
|
||||
if (ref.kind === 'iconify') {
|
||||
return <Icon height={16} icon={ref.name} width={16} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user