/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The Plan's geometry — every row and slot height, and the widths its * elements draw at, per density, in ONE table (#817). * * The model computes row heights from it (`rowHeight`, the virtualizer's sizes * and the paging ledger's window heights), and the canvas writes it once, on * its body, as CSS variables (`--plan-row-h`, `--plan-strip-h`, …) that the * recipe reads wherever it draws one of these heights. The ledger's "band px * == rendered px" invariant rests on the two agreeing; before this they were * three hand-kept copies (model constants, recipe pixels, inline heights). * * The widths are the narrowest a bar, a chip and a bucket cell draw, and each * mark's glyph across (`--plan-bar-min-w`, …): a link's end meets an element * where it draws (#1258), so the ribbons lay out from the same numbers the * recipe draws the elements at. * * @packageDocumentation */ /** * How far a bucket cell sits in from its bucket's edges and its lane's, and a * cards chip from its own ends, each side (px). The renderers place both by it, * and a link meets either where it draws (#1258). */ export declare const PLAN_CELL_INSET = 2; /** * The one CSS variable the canvas writes on its body beside the table: the * gutter's width (#1680's review), which the rows' template and the gutter's * rule read. It is the viewer's to drag, so no density's table holds it. */ export declare const PLAN_GUTTER_VAR = "--plan-gutter-w"; /** Every row and slot height the canvas lays out from, and the widths its elements draw at, in px. */ export interface PlanGeometry { /** Span / buckets / cards / table rows — the shared default row. */ row: number; /** The rule under a row, INSIDE its height: its plot cell is the row less * this, and a bar centres in the plot cell (the link ribbons register to * it, #818). */ rule: number; /** The floor of a row with a two-line gutter (a sub line, or `stacked`). */ rowStacked: number; /** A group band. */ group: number; /** A collapsed group's summary heat strip. */ groupStrip: number; /** A chart row at rest (spark). */ chartSpark: number; /** A chart row expanded (the default when no `expandedHeight` is declared). */ chartExpanded: number; /** A heat row — its cells plus {@link PlanGeometry.heatInset} above and below. */ heatRow: number; /** The inset above and below a heat cell. */ heatInset: number; /** A heat cell's minimum height. */ heatCellMin: number; /** A context strip — an expand focus's unfocused row, compressed (R2), and a pinned row a links focus does not * gather (R1, #1680's review). A links focus's own bands are a group band's height. */ strip: number; /** A mark inside a context strip. */ stripMark: number; /** A vertical multi-series table row: {@link PlanGeometry.tablePad} + one line per series. */ tableLine: number; tablePad: number; /** A laned bucket row: 2 × `lanePad` + one `laneCell` per lane + a `laneGap` between. */ laneCell: number; laneGap: number; lanePad: number; /** A span run bar. */ bar: number; /** A collapsed parent's rollup band. */ rollBar: number; /** A bucket tile. */ tile: number; /** A cards chip. */ chip: number; /** A weight bar. */ weight: number; /** A segment track. */ segment: number; /** The chrome bands: horizon brush (its strip and its lens), ruler, * footer. The toolbar band is the frame's (#1193). */ brush: number; ruler: number; footer: number; /** The horizon's lens under its strip (#949) — the connectors from the * window it selected down to the plot's edges. The strip is the band * less this. */ lens: number; /** The horizon brush's tallest histogram bar: the strip less the 4px over it (#1438). */ brushBar: number; /** A narrow group card's strip body. */ narrowStrip: number; /** The shortest a failed window's band renders (#811) — its reason and its * Retry stay legible even in a short last window. */ failedBandMin: number; /** An exception mark's triangle, its point to its base. */ markTriangle: number; /** The narrowest a span bar draws, its padding and its look's ring * inside it: a run shorter than this draws this wide from its start. */ barMinWidth: number; /** The narrowest a cards chip draws, its padding and ring inside it. */ chipMinWidth: number; /** The narrowest a bucket cell draws, its padding inside it. */ cellMinWidth: number; /** A tile's floor (#1266): the narrowest it draws where its cell has the * room, and what a folding cell keeps beside its `+n` chip (#1267). */ tileMinWidth: number; /** The narrowest a tile draws at all, its padding given way: a proposal's * two 1.5px rings (#1276). A cell that leaves its tiles less room draws * none of them, and shows its `+n` chip alone. */ tileLeastWidth: number; /** A milestone's dot, across and down. */ markDotWidth: number; /** A decision's diamond, each side before it turns 45° — its corners then * reach √2 times this across and down. */ markDiamondWidth: number; /** An exception's triangle, across its base. */ markTriangleWidth: number; /** The box an event mark's icon fits in, across and down. */ markIconWidth: number; /** A bar's padding either side, which its label starts in from. */ barPadWidth: number; /** A locked bar's padding either side. */ barPadLockedWidth: number; /** The gap between a bar's lock, its label and its quantity. */ barGapWidth: number; /** A bar's lock, across. */ lockWidth: number; /** One glyph of a bar's label — its mono face at the bar's size draws every glyph this wide (`1ch`). */ barGlyphWidth: number; } /** The two densities' tables. Dense tightens the shared row — the heat row * with it — and the bars that sit in it; everything else keeps its size. */ export declare const PLAN_GEOMETRY: Readonly>>; /** * A density's geometry, on the pointer the canvas has. * * @param dense - Whether the canvas is dense (`density: compact`) * @param coarse - Whether the pointer is coarse: the horizon band is taller (#1438) * @returns The table */ export declare function planGeometry(dense: boolean, coarse?: boolean): Readonly; /** * The CSS variable a geometry entry is written as — a height `row` → * `--plan-row-h`, `heatInset` → `--plan-heat-inset-h`; a width, its key ending * `Width`, `barMinWidth` → `--plan-bar-min-w`. * * @param key - The entry * @returns The variable's name */ export declare function planGeometryVar(key: keyof PlanGeometry): `--plan-${string}-${"h" | "w"}`; /** * The geometry as the CSS variables the recipe reads — written once, on the * canvas body. * * @param geometry - The canvas's table * @returns Variable name → px value */ export declare function planGeometryStyle(geometry: Readonly): Record; //# sourceMappingURL=geometry.d.ts.map