/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The board's one toolbar (§7, A1): the date, the layout, the day's status, * the narrowing's one rail over its bins, its lanes, its resources and its * arrivals, and each one's count, in both layouts (#1336, #1339) — the bins' * day the board's own navigation, never a chip of the rail (#1372) — the * issues chip, Search Records over the bins' keys (#1398), worded so — its box the first * thing the row folds, to its icon (ruled 25 Oct 2026) — the shared history * and Publish — each folding by its rank, the history last of the ladder, and * in the narrowest frame the date, the layout, Save and Publish reachable * through the combined View fold. Below the ladder the row's floor drops the * rail's caret, and then, with the app's optimiser, takes the Elara eye — * before the history item at every other width — into that View as its * entry, never out of the toolbar (ruled 27 Oct 2026, "Into the View menu"). * The status, the issues and Publish keep their slots from cold load, * whatever the day's read (#1398, CL1): unread, the status and the issues are * placeholders, the issues slot empty at none, and Publish in its slot, off, * wherever it cannot publish. * * @packageDocumentation */ import { type ReactElement } from "react"; import type { SortedMap } from "@elaraai/east"; import { type EditIssue, type HistoryAction, type KeySearchSource, type ToolbarItem } from "@elaraai/east-ui-components"; import type { AllocationCommands } from "./actions.js"; import type { AllocationEditing } from "./editing.js"; import type { AllocationWords } from "./messages.js"; import type { AllocationWindow } from "./window.js"; import { type AllocationStyles, type AllocationValue, type Day, type Issue, type Load, type ResourceRow } from "./model.js"; import { type Nouns } from "./nouns.js"; /** The issues the chip, the Issues tab and the summary count: warning and danger, never neutral or info (A64). */ export declare function countedIssues(issues: readonly Issue[]): Issue[]; /** * What the counted issues are, each kind's count (A63, A81): the refusals holding Save first (#1525), `1 not saved * yet`, then `2 overlaps`, `1 over max`; the app's, `N more`. */ export declare function issueParts(issues: readonly Issue[], refused?: number): string[]; /** * The issues the chip counts — warning and danger, never neutral or info * (A64), and the refusals holding Save (#1525) — and its words (A81): `2 * overlaps · 1 over max · show them`, with `· warnings only, Save still works` * when every one is an under-min warning. */ export declare function issueSummary(issues: readonly Issue[], refused?: number): { count: number; label: string; tip: string; aria: string; }; interface ToolbarArgs extends AllocationWindow { value: AllocationValue; styles: AllocationStyles; commands: AllocationCommands; /** The editing; `undefined` for a read-only board. */ editing: AllocationEditing | undefined; /** The board's words: its message table, the editing session's among them, and the app's formatters. */ words: AllocationWords; /** The day's status chip's words (A3) — its period's, the day's or its week's (#1550): Not started, Draft, Published, or the app's own case; `undefined` without periods. */ status: string | undefined; /** Whether the day's period is published: its chip's tone, whatever its words. */ published: boolean; /** * Whether the day is not read yet (#1398, CL1): its status, its issues and Publish keep their slots, the status a * placeholder — never "Not started" before its row is read — and the issues one too, each unseen at its footprint * until the frame's reveal says so. */ unread: boolean; /** Whether Publish is under way. */ publishing: boolean; /** The open picker's days' statuses, by day — each day of a week its week's (#1550): their marks, and each week's. */ picker: SortedMap; issues: readonly Issue[]; onIssues: () => void; /** How many refusals hold Save (#1525): the issues chip counts them with the counted issues. */ refused: number; /** The history's warning button pressed: its first issue's bin shown and selected (#1525). */ onIssue: (issue: EditIssue) => void; /** Where an issue of the history's is, in the board's words — its banners' — what the history item's conflicts name their items by. */ where?: ((issue: EditIssue) => string) | undefined; /** A conflict's Go to: its item shown and selected. */ onConflict?: ((issue: EditIssue) => void) | undefined; onAction: (action: HistoryAction) => void; onPickerWeeks: (weeks: readonly Date[]) => void; /** The focus (A13): its resource, its load, and whether the narrowing hides its row. */ focus: { resource: ResourceRow; load: Load; hidden: boolean; } | undefined; onClearFocus: () => void; /** The board's nouns: what the narrowing's summary counts each source in, and what heads each source's fields, folded. */ nouns: Nouns; /** Search Records over the bins' keys (#1398); `undefined` without a source of the bins to seek. */ search?: KeySearchSource | undefined; /** The Elara eye (#1409): the run's toolbar item, listed immediately before the history item; `undefined` with no optimiser. */ optimise?: ToolbarItem | undefined; /** * The eye's entry (ruled 27 Oct 2026, "Into the View menu"): what the View lists in the eye's place, beside the issues, * where the row's floor folds the eye into it; `undefined` with no eye. */ optimiseEntry?: ReactElement | undefined; /** Whether a run of the optimiser is out (#1409, R2): the history item stays, its actions locked. */ locked?: boolean | undefined; /** Whether the issues chip flashes (#1409): a run's result landed, and its highlight is on. */ issuesFlash?: boolean | undefined; } /** The board's toolbar items: the shared Toolbar's, ranked around `HOST_RANK`. */ export declare function useAllocationToolbar(args: ToolbarArgs): ReadonlyArray; /** The days of the picker's open month, from the weeks it shows. */ export declare function pickerDays(weeks: readonly Date[]): Date[]; export {}; //# sourceMappingURL=toolbar.d.ts.map