feat(client): tokens, BitmapText labels, statuses and lists (#71)

- slices/tokens.ts: token upsert, token_gone, hello reset; status names only.
- slices/characters.ts + slices/encountered.ts: own characters, encountered
  list with grey entries; the GM's per-player copies are ignored.
- render/tokenBoard.ts (pure): event -> entered/updated/left patches, so one
  changed token costs one container; seeds from the reducer on mount.
- render/modules/tokens.ts: pooled world-coordinate nodes on the tokens layer,
  one shared unit-circle context per kind, BitmapText from one pre-installed
  BitmapFont assigned only on a name change, stuck/squeezed badges, canvas
  dataset instrumentation for the "only changed entities" criterion.
- panels/lists.ts + render/modules/lists.ts: #lists under #panels, textContent
  only, greyed encountered rows; mounted by a render module so no shared
  bootstrap file changed.
This commit is contained in:
2026-11-21 00:51:16 +01:00
parent 12c2e88f99
commit 429f023c62
13 changed files with 1592 additions and 0 deletions
+63
View File
@@ -271,3 +271,66 @@ body {
opacity: 0.7;
word-break: break-word;
}
/* Lists panel (T8, #71): story 31's own characters and story 32's encountered list. Overlaid on the
canvas inside the shared `#panels` column; the pointers stay with the canvas (DESIGN 7.2). */
#lists {
display: flex;
flex-direction: column;
gap: 6px;
padding: 8px 10px;
border: 1px solid #333;
border-radius: 6px;
background: rgb(0 0 0 / 55%);
font: 12px/1.4 ui-monospace, monospace;
pointer-events: none;
}
#lists .panel-title {
margin: 0 0 2px;
font: 600 11px/1.2 system-ui, sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
opacity: 0.65;
}
#lists ul {
display: flex;
flex-direction: column;
gap: 2px;
margin: 0 0 6px;
padding: 0;
list-style: none;
}
#lists li {
display: flex;
gap: 6px;
align-items: baseline;
justify-content: space-between;
}
#lists .entry-values {
font-size: 11px;
opacity: 0.6;
}
#lists .entry-state {
font-size: 10px;
opacity: 0.45;
}
#lists .empty {
margin: 0 0 6px;
opacity: 0.45;
}
/* Story 32: met before, whereabouts unknown. */
#lists li.grey,
#lists li[data-grey='true'] {
opacity: 0.55;
}
#lists li.grey .entry-name {
color: #8f8f8f;
}