managarten/packages/shared-ui/src
Till JS 2e9ec76d60 feat(writing): token-usage in version history + draft drag-source
Two small UX wins.

Version-history shows generation cost
- VersionHistory takes a generations[] prop (DetailView already pulls
  one via useGenerationsForDraft) and looks up each AI version's linked
  Generation by id. When found, renders a monospace cost line under the
  version's wordcount: "1234 → 567 Tokens · 1.4s · ollama/gemma3:4b".
- Skips silently when the generation row isn't there (e.g. older drafts
  before the field was tracked, or a generation that was reverted).
- Lets the user see what each draft cost without digging into the
  Workbench audit timeline.

Drafts as drag source
- DraftCard wires `use:dragSource` with type='draft' + a payload
  carrying id / title / kind / content / wordCount / topic. Cards in
  the Writing list view are now drag origins for any drop target that
  declares acceptsDropFrom: ['draft'].
- App-registry entry for 'writing' gets the matching collection /
  paramKey / dragType / getDisplayData fields so the workbench layer
  treats drafts as full first-class drag-citizens (sibling navigation,
  display fallbacks).
- @mana/shared-ui DragType union extended with 'draft'.

No drop-target wiring yet — articles' acceptsDropFrom can pick up
'draft' as a follow-up, but the M10 ExportMenu's "Als Artikel
speichern" already covers that flow from the editor side.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 12:31:29 +02:00
..
actions feat(shared-ui): add focusTrap action and apply to shared Modal 2026-03-24 10:04:04 +01:00
atoms feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
bottom-stack fix(mana,ui): integrate guest nudge into bottom stack + theme it 2026-04-08 12:13:05 +02:00
charts refactor(theme): migrate shared packages to --color-* token naming 2026-04-15 22:11:42 +02:00
components feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
context-menu fix(mana/web+packages): clear all 270 warnings to zero 2026-04-10 17:34:49 +02:00
dnd feat(writing): token-usage in version history + draft drag-source 2026-04-25 12:31:29 +02:00
help fix(mana/web+packages): clear all 270 warnings to zero 2026-04-10 17:34:49 +02:00
molecules refactor(theme): migrate shared packages to --color-* token naming 2026-04-15 22:11:42 +02:00
navigation feat(pill-nav): show Anmelden pill for guests next to menu icon 2026-04-23 15:36:09 +02:00
onboarding fix: dev startup — Redis eviction policy, mana-media port crash, Svelte warnings 2026-04-10 18:33:41 +02:00
organisms refactor(theme): migrate shared packages to --color-* token naming 2026-04-15 22:11:42 +02:00
pages refactor(theme): migrate shared packages to --color-* token naming 2026-04-15 22:11:42 +02:00
quick-input refactor(shared-ui): extract search-core for highlight + debounce 2026-04-15 01:06:37 +02:00
search-core refactor(arcade, shared-ui): migrate CommandBar to GlobalSpotlight, delete CommandBar 2026-04-15 01:17:55 +02:00
settings refactor(theme): migrate shared packages to --color-* token naming 2026-04-15 22:11:42 +02:00
test feat(shared-ui): add TagChip component and tag component tests 2026-04-02 14:24:19 +02:00
toast feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
index.ts refactor(arcade, shared-ui): migrate CommandBar to GlobalSpotlight, delete CommandBar 2026-04-15 01:17:55 +02:00