feat: add remix mode for spark table rolling

Introduces a `remix` option that allows each data column in a spark
table to be rolled independently. This is enabled via a `remix=true`
attribute in the directive's extra attributes.

Also refactors spark table scanning by moving markdown parsing logic
from the frontend to a new CLI-side `spark-scanner.ts` utility,
improving separation of concerns.
This commit is contained in:
2026-07-11 11:58:01 +08:00
parent 719bb6ad8a
commit 2068ecad10
7 changed files with 215 additions and 178 deletions
+2 -1
View File
@@ -128,7 +128,8 @@ export const JournalInput: Component = () => {
const key = (parsed.payload as { key: string }).key;
const match = comp.data.sparkTables.find((s) => s.slug === key);
const csvPath = match?.csvPath ?? "";
const p = await resolveSparkPayload({ key, csvPath });
const remix = match?.remix ?? false;
const p = await resolveSparkPayload({ key, csvPath, remix });
const result = sendMessage("spark", p);
const r = unwrap(result);
finish(r.ok, r.err);