feat(brief): locked sections, list formatting, auto/manual placeholder chips

- brief.machine: reducer refuses edits to locked (predefined) sections as
  defense-in-depth; LetterSection gains a `locked` flag
- rich-text: paragraphs gain optional `list` kind; editor gets bullet/numbered
  list buttons, keyboard shortcuts, and backspace-deletes-adjacent-chip
- placeholder chips distinguish auto-resolvable (grey) vs manual (yellow), in
  both the editor and the read-only preview
- fix: preview chip now renders matching {…} braces (was a one-sided ⌗ glyph),
  aligned with the editor's chip styling

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
eho
2026-07-02 08:50:22 +02:00
co-authored by Claude Opus 4.8
parent 053160c5c9
commit 84c2d1b6a0
23 changed files with 955 additions and 431 deletions
@@ -115,7 +115,8 @@ public sealed record SubmitApplicationResponse(string Referentie, AanvraagStatus
// rich-text semantics and re-validates at its parse* boundary.
public sealed record RichTextNodeDto(string Type, string? Text = null, IReadOnlyList<string>? Marks = null, string? Key = null);
public sealed record ParagraphDto(IReadOnlyList<RichTextNodeDto> Nodes);
// List is null for a plain paragraph, "bullet" or "number" for a list item.
public sealed record ParagraphDto(IReadOnlyList<RichTextNodeDto> Nodes, string? List = null);
public sealed record RichTextBlockDto(IReadOnlyList<ParagraphDto> Paragraphs);
public sealed record PlaceholderDefDto(string Key, string Label, bool AutoResolvable, bool? Fillable = null, bool? Deprecated = null);
@@ -125,7 +126,8 @@ public sealed record LetterBlockDto(
string Type, string BlockId, RichTextBlockDto Content,
string? SourcePassageId = null, int? SourceVersion = null, bool? Edited = null);
public sealed record LetterSectionDto(string SectionKey, string Title, bool Required, IReadOnlyList<LetterBlockDto> Blocks);
// Locked sections (aanhef, slot) are predefined template text the drafter cannot edit.
public sealed record LetterSectionDto(string SectionKey, string Title, bool Required, IReadOnlyList<LetterBlockDto> Blocks, bool Locked = false);
// BriefStatus union, flattened by Tag (draft | submitted | approved | rejected | sent).
public sealed record BriefStatusDto(