feat(npcs): inspect cards, Show overlay, and optional external link

Clicking an NPC tile opens description cards (multi-select accordion); Show puts avatars on screen. Optional URL opens a webview tab. Avatar pan in the editor commits on pointer up.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-08-19 10:42:57 +08:00
parent 1a9f0f2557
commit 0f4bb76b41
35 changed files with 1189 additions and 259 deletions
@@ -13,10 +13,19 @@ export function useNpcsOverlayState(): readonly [
useEffect(() => {
void api.invoke(ipcChannels.npcsOverlay.getState, {}).then((r) => {
setState(r.state);
const next = r.state;
setState({
...next,
inspectNpcIds: next.inspectNpcIds ?? [],
inspectFocusNpcId: next.inspectFocusNpcId ?? null,
});
});
return api.on(ipcChannels.npcsOverlay.stateChanged, ({ state: next }) => {
setState(next);
setState({
...next,
inspectNpcIds: next.inspectNpcIds ?? [],
inspectFocusNpcId: next.inspectFocusNpcId ?? null,
});
});
}, [api]);