/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The narrow layout (`Plan Spec v2.html` §10, #570) — below 480px of * CONTAINER width the Plan is a review tool, not a canvas. Two jobs survive * the trip: *where is it hot* (the GROUP grain as a strip list) and *what is * this thing doing* (one group's rows). Three tabs over ONE slice — Groups · * Rows · Measures — share the cohort chips, window and resolution; filter * once, every tab narrows. * * The gutter decision, written into the spec: there is no gutter column to * negotiate on a phone. A row's gutter identity (label / id / sub / value / * status dot / meta) becomes the CARD HEAD and its plot — the same kind * renderer, unchanged (`KindPlot`) — the CARD BODY on the shared window. The * list has no gutter, so every card body and the slim shared ruler share one * inset and the bucket columns line up down the page. * * What does not change: the bar vocabulary, the slice semantics, the * now-line. The input model does: tap selects, a second * tap on a row that declares `expand` drills it in place (~148pt; its * neighbours keep their size — a vertical list needs no strip compression), * horizontal pan is two-finger so page scroll stays vertical. The horizon * brush does not mount: the window rides the slice's range in the frame's * toolbar and the pan, the resolution the toolbar's segment. A paged source * shows its resident prefix, and the frame's footer says so. * * The layout is the frame's main below 480px of it (#1193): its controls are * the frame's toolbar's — the slice's chips, the resolution, the diagnostics * and the history item, folded to the room a phone leaves — and its counts * the frame's footer's, so the list draws no chip row or footer of its own. * * Failures stay local here too (#811): a card whose row cannot be placed * shows its diagnostic, a card whose plot throws shows its own fallback, and * a window whose read failed is a card with the reason and a Retry at the top * of the list; the frame's toolbar carries the diagnostics chips. * * A paged source pages around the LIST (#812). There is no virtualizer here * to report a mounted range, so the cards report themselves: an * `IntersectionObserver` watches every row card, and the last one on screen * is the viewport the driver pages around — prefetching past it, keeping what * is on screen resident. Once a list shows every resident row, the canvas's * tail band stands after them in list form: scrolling it into view loads the * next window. Its `N more rows` counts the source, never what has loaded — * the rows read and not shown yet, and every one the source holds past them * (`…` while that is not known) — and a tap past the rows read asks for the * next window at once, its cards coming as it lands (#1398, ruled 27 Oct * 2026). * * The cards (`cards.tsx`), the ruler (`chrome.tsx`), the list demand * (`demand.ts`) and the row walks (`lists.ts`) live beside this shell (#815). * * The tabs are Chakra's `Tabs` (Zag, #819): a tablist with a roving tab stop, * the arrow keys between tabs, and a tabpanel per tab — the list is the * selected tab's panel. * * Events selected from outside the canvas — the overlaps chip's pair, a peer * the inspector's banner names (#1198) — ask for their row: the list opens * the row's group on the Rows tab, pages to it, and scrolls its card into * view, as the desktop canvas scrolls to the row. A row a search found is * selected too and stands in the list's middle. */ import { type ComponentProps } from "react"; import { type EastChakraComponent } from "@elaraai/east-ui-components"; import { type PlanDerived, type PlanRowIndex, type PlanRowValue, type PlanWindowFailure } from "../model.js"; import type { RowKey } from "../plan-state.js"; import type { PlanUiView } from "../root/view.js"; import type { PlanDraftMark } from "../use-plan-editing.js"; import { type PlanNarrowPaging } from "./demand.js"; type Styles = Record>; type UIValue = ComponentProps["value"]; export type { PlanNarrowPaging } from "./demand.js"; /** The narrow breakpoint — the adaptive contract's compact class (#346). */ export declare const PLAN_NARROW_BELOW = 480; export interface PlanNarrowProps { styles: Styles; index: PlanRowIndex; derived: PlanDerived; /** The UI facts the cards read — the selection each list reads itself. */ view: PlanUiView; dense: boolean; storageKey: string; /** The focused row's developer render / gutter body (the root resolvers * called with the focus), or `null`. */ expandBody: UIValue | null; expandGutterBody: UIValue | null; /** Whether the root declares `expandRender` at all. */ canExpand: boolean; /** Whether the source is not yet exhausted (`PlanTransport.partial`) — a * tab count of what has loaded is then `…`, and a top-level section's * member count a placeholder (`spansWindows`, #822, #1398 CL13). */ partial: boolean | undefined; /** * A paged source's own count, once a completed read says it (#1398, CL13): * what the Rows tab counts, as the rail counts the source — never the rows * read so far. `undefined` on an inline canvas, and while the count is not * known — or is a new narrowing's, the last narrowing's rows standing in. */ pagedCount?: number | undefined; /** * What the Measures tab counts over a paged source (#1398, ruled 27 Oct 2026, "Exact where it can be"): the chart * rows the source makes — its count times what each of its entries makes across the paged blocks, where every entry * makes as many, beside the blocks no entry makes — or `"notCounted"`, where some block's entries make no fixed * number of them, which the tab says. Never what has loaded: `undefined` while the source has not counted itself, or * a new narrowing's rows are read, and on an inline canvas. */ pagedMeasures?: number | "notCounted" | undefined; /** A bounded frame — the list scrolls inside it. */ fill: boolean; /** Windows whose read failed (#811) — a card each, with a Retry. */ failures?: readonly PlanWindowFailure[] | undefined; /** Ask a failed window again. */ onRetry?: ((w: number) => void) | undefined; /** A paged source's demand (#812) — absent on an inline canvas, which * has nothing to demand. */ paging?: PlanNarrowPaging | undefined; /** What the rail counts the rows in — `work orders`: what a failed window's line names them by (#1398). */ noun: string; /** Each drafted row's mark, by row key (#880) — a card wears its row's. */ marks: ReadonlyMap; /** Whether a row's cells are unread (#1398, #1438) — its card washes under what it holds, as the canvas's row does. */ unread?: ((row: PlanRowValue) => boolean) | undefined; /** Where the rows the cards draw go, in order, as they change (#1438): the canvas reads the rows' nested series for * them while the list shows, where the desktop's rows read theirs for the rows laid out. */ onShown?: ((rows: readonly PlanRowValue[]) => void) | undefined; } /** The narrow shell: tabs · ruler · card list. */ export declare function PlanNarrow({ styles, index, derived, view, dense, storageKey, expandBody, expandGutterBody, canExpand, partial, pagedCount, pagedMeasures, fill, failures, onRetry, paging, marks, noun, unread, onShown, }: PlanNarrowProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=index.d.ts.map