Thank you for being patient! We're working hard on resolving the issue
@tento-lona/sheets carries the pure layout pipeline — no DOM, no
canvas. It computes:
CellLayout + the column/sheet contextimport { resolveLayoutShape, DEFAULT_LAYOUT_SHAPE } from "@tento-lona/sheets";
const shape = resolveLayoutShape(rowType);
// Returns the per-type RowLayoutShape (header columns, content columns, …)
Non-DOM platforms (CLI, tests, terminal) consume this directly without dragging pixel heights through the pure path.
import { resolveLayoutHeights, DEFAULT_LAYOUT_HEIGHTS } from "@tento-lona/sheets";
const heights = resolveLayoutHeights(rowType);
// → RowLayoutHeights — header height, body height per row mode, etc.
DOM consults this for the type's static heights, then composes
per-row heightPx overrides + plugin-runtime adjustments via
composeLayoutSpec.
import {
TimeScale, RowRenderMode,
calculateStackSize, getConservativeSpanCount,
shouldStackCells, shouldSpanColumns,
getOwnedRowPeriod, getTimescaleOrder, isOwnerColumn,
} from "@tento-lona/sheets";
const mode = RowRenderMode.compute(row, scale); // "normal" | "stacked" | "spanned" | "span-stacked"
Mirrors yuzu-ui's timescale.ts — both copies co-exist until yuzu-ui's sheet-layout code re-routes through this barrel.
Pure cell-positioning synthesizer. Given a row's CellLayout +
its column context, produces a Map<ColumnKey, CellPlacement>:
import { LayoutEngine } from "@tento-lona/sheets";
const placements = LayoutEngine.compute({
row,
cellLayout: row.cellLayout(),
columns: visibleColumns,
scale,
mode,
});
Per-row reconciliation strategy:
import { RenderPlan } from "@tento-lona/sheets";
const plan = RenderPlan.for(row, prevPlan, invalidationContext);
switch (plan.strategy) {
case "full-rebuild": rebuildRow(row); break;
case "content": updateContent(row); break;
case "style-only": restyle(row); break;
case "none": /* skip */ break;
}
A full plan covers strategy + mode + timeState + spanMode + stacking — five orthogonal axes a renderer needs to know which update path is cheapest for this frame.
import { defaultSubcolumnCache } from "@tento-lona/sheets";
const cache = defaultSubcolumnCache();
// Threaded through buildScene + plugin data providers for
// consistent subcolumn enumeration across re-renders.
buildScene consumes
RenderPlan + LayoutEngine outputs