/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. * * The sources of a Plan's one `Slice.bindRecords` (#1344), place by place: * the `rows` source gives the canvas its rows, paged from it — the rows the * event kinds land on among them (#1541); a source named after an event kind * narrows that kind's events and its backlog, its reads the kind's own; and a * templates list's and an author's tab's narrow those cards. Every source * holding a `range` of the axis's arm holds the window with the others, but * the `rows` source, whose rows the dates on screen never narrow. * * @packageDocumentation */ import { type ValueTypeOf } from "@elaraai/east"; import type { PlanPayloadType } from "@elaraai/e3-ui/internal"; import type { RecordSliceBindType, RecordSlicesChromeType } from "@elaraai/east-ui/internal"; import type { PlanAxisKind } from "../instant.js"; import type { PlanRootValue } from "../model.js"; /** One record Slice's controls: a source's part of the slice. */ export type PlanSourcePart = ValueTypeOf; /** The rail's chrome, as the canvas's root carries it. */ export type PlanSlicesChrome = ValueTypeOf; /** One event kind, as the Plan's payload carries it. */ type PlanEventKindValue = ValueTypeOf["events"][number]; /** An event kind narrowed through its source of the slice: the kind, and its part. */ export interface PlanEventPart { /** The event kind. */ readonly kind: PlanEventKindValue; /** Its source's part of the slice: the Slice its reads, its counts and its Save notice go through. */ readonly part: PlanSourcePart; } /** The source of a Plan's slice that gives the canvas its rows. */ export declare const ROWS_SOURCE = "rows"; /** * The rail's chrome, when the Plan has a slice. * * @param value - The canvas's root * @returns Its chrome; `undefined` with no slice */ export declare function planSlices(value: PlanRootValue): PlanSlicesChrome | undefined; /** * One source's part of the slice, by its name. * * @param chrome - The rail's chrome; `undefined` with no slice * @param source - The source's name (`rows`, an event kind's slot) * @returns Its part; `undefined` when the slice has no source of that name */ export declare function planPart(chrome: PlanSlicesChrome | undefined, source: string): PlanSourcePart | undefined; /** * The event kinds narrowed through their sources: each kind the slice names a * source after, in the kinds' order. * * @param chrome - The rail's chrome; `undefined` with no slice * @param kinds - The Plan's event kinds * @returns Each such kind and its part */ export declare function planEventParts(chrome: PlanSlicesChrome | undefined, kinds: readonly PlanEventKindValue[]): PlanEventPart[]; /** * The sources whose ranges never hold the window (#1344): the canvas's rows' * — the `rows` source, the rows the event kinds land on among them (#1541) — * which the dates on screen never narrow, so a pan, a step, the brush or a key * reads no row again. A date field there is a field of the rail the viewer * sets. */ export declare const PLAN_ROW_SOURCES: readonly string[]; /** * The sources holding the window: each part whose range field speaks the * axis's arm, in the slice's order — the first leads — but the canvas's * rows', whose ranges never hold it. * * @param chrome - The rail's chrome; `undefined` with no slice * @param axis - The axis kind * @param rows - The sources whose ranges never hold the window ({@link PLAN_ROW_SOURCES}) when omitted * @returns Each such source's name and part */ export declare function planWindowParts(chrome: PlanSlicesChrome | undefined, axis: PlanAxisKind, rows?: readonly string[]): { readonly source: string; readonly part: PlanSourcePart; }[]; /** One of the library's tabs, as the Plan's payload carries it. */ type PlanLibraryTabValue = ValueTypeOf["library"][number]; /** * The sources the Plan's frame follows itself, beside the `rows` source and * the event kinds', which the canvas reads through their parts: each templates * list's, whose keys narrow the Events tab, and each an author's tab names — * each once, in that order. * * @param value - The Plan's payload * @returns The sources' names */ export declare function planFollowedSources(value: ValueTypeOf): string[]; /** * What the rail counts each source in, and heads it with folded, where the * source has no label of its own: the canvas's rows in the Plan's word for * them — `rows`, or the app's (`vocabulary.rows`, #1516), since the rows are * whatever the app's record holds, the resources its event kinds land on * among them (#1541): `presses` — an event kind's events (`print job * events`), a kind's templates, a tab's — each as running text writes it, the * first that names a source keeping it. * * @param kinds - The Plan's event kinds * @param tabs - Its library's tabs * @param rows - The Plan's word for its rows, as running text counts them: its messages' `saveNoticeNoun` of the `rows` source * @param locale - The app's locale * @returns Each source's noun, by its name */ export declare function planNouns(kinds: readonly PlanEventKindValue[], tabs: readonly PlanLibraryTabValue[], rows: string, locale: string): Record; export {}; //# sourceMappingURL=sources.d.ts.map