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:
2026-07-02 08:50:22 +02:00
parent 053160c5c9
commit 84c2d1b6a0
23 changed files with 955 additions and 431 deletions

View File

@@ -1207,6 +1207,42 @@ export class ApiClient {
}
return Promise.resolve<BriefDto>(null as any);
}
/**
* @return OK
*/
briefReset(): Promise<BriefViewDto> {
let url_ = this.baseUrl + "/api/v1/brief/reset";
url_ = url_.replace(/[?&]$/, "");
let options_: RequestInit = {
method: "POST",
headers: {
"Accept": "application/json"
}
};
return this.http.fetch(url_, options_).then((_response: Response) => {
return this.processBriefReset(_response);
});
}
protected processBriefReset(response: Response): Promise<BriefViewDto> {
const status = response.status;
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
if (status === 200) {
return response.text().then((_responseText) => {
let result200: any = null;
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as BriefViewDto;
return result200;
});
} else if (status !== 200 && status !== 204) {
return response.text().then((_responseText) => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
});
}
return Promise.resolve<BriefViewDto>(null as any);
}
}
export interface AantekeningDto {
@@ -1369,6 +1405,7 @@ export interface LetterSectionDto {
title?: string | undefined;
required?: boolean;
blocks?: LetterBlockDto[] | undefined;
locked?: boolean;
}
export interface LibraryPassageDto {
@@ -1388,6 +1425,7 @@ export interface ManualDiplomaPolicyDto {
export interface ParagraphDto {
nodes?: RichTextNodeDto[] | undefined;
list?: string | undefined;
}
export interface PersonDto {