feat: add ReactiveStatManager for markdown template support

Introduce ReactiveStatManager to allow dynamic stat replacement within
rendered markdown content. This component scans the article DOM for
`${key}` patterns and reactively updates them based on the journal
stream.

As part of this change, the SVG-based StatSheet system is removed in
favor of this more flexible text-based approach.
This commit is contained in:
2026-07-12 13:32:49 +08:00
parent 722a8110e6
commit 736bcf4bb2
11 changed files with 306 additions and 515 deletions
-3
View File
@@ -20,7 +20,6 @@ import {
parseBlockAttrs,
resolveBlockAs,
} from "./block-scanner.js";
import type { StatSheet } from "./types.js";
// Re-export shared pieces for convenience
export {
@@ -37,7 +36,6 @@ export {
export interface ProcessedBlocks {
stats: StatDef[];
statTemplates: StatTemplate[];
statSheets: StatSheet[];
}
export interface BlockResult {
@@ -78,7 +76,6 @@ export function processBlocks(
const blocks: ProcessedBlocks = {
stats: [],
statTemplates: [],
statSheets: [],
};
const stripped = content.replace(