Thank you for being patient! We're working hard on resolving the issue
System rows are canonical header / footer / debug / banner rows
the renderer expects every sheet to carry. They aren't stored in
the wire data — they're synthesized from SystemRowsConfig per
TREE-SPEC §8.8.
import { HEADERS_STATIC, FOOTERS_STATIC } from "@tento-lona/sheets";
HEADERS_STATIC — system(header), system(month-banner),
per-secondary-calendar headersFOOTERS_STATIC — system(footer), system(footer|disclaimer)
for ephemeral sheetsEach is a SystemRowDef[] — a tiny wire-shape descriptor the
builder turns into a real SystemRow.
import { buildSystemRows, SystemRowsConfig } from "@tento-lona/sheets";
const config: SystemRowsConfig = {
showSecondaryCalendars: prefs.calendarSystem.show,
showSecondHeaderRows: prefs.calendarSystem.show2nd,
isEphemeral: sheet.isEphemeral,
/* ... */
};
const result = buildSystemRows(sheet, config);
result.headers; // SystemRow[] to splice at top of tree
result.footers; // SystemRow[] to splice at bottom
result.debug; // optional debug rows
buildSystemRows is a pure function of (sheet, config). The
SDK side wraps this to read preferences and pass the resolved
config in.
The DOM render path runs:
1. Sheet.allRows() ← user rows
2. buildSystemRows(...) ← system rows from config
3. applySecondaryCalendars(...) ← per-secondary-calendar header rows
4. applySecondHeaderRows(...) ← second header row variants
The CLI render path runs the same sequence so snapshots cross-validate.
interface SystemRow extends SheetRow {
isSystemRow: true;
isFooterRow: boolean;
systemKey: string; // "header", "footer", "footer|disclaimer", …
}
SystemRow is identifiable by row.id.key.isSystem() — see
Row Identity.
App code can extend the catalogs at startup:
import { HEADERS_STATIC } from "@tento-lona/sheets";
HEADERS_STATIC.push({
systemKey: "my-banner",
layoutType: "block",
/* ... */
});
Note: extending the static catalogs means every sheet picks the
addition up. Prefer SystemRowsConfig toggles for opt-in
features.
Sheet as user rowssystem(<name>) RowKey variant