/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * Every word the Sheet says itself (#861) — ONE typed message table, the * Plan's #820 table's twin. The toolbar and the view tabs, the header, the * rows, a failed run's line, the strip, the editor and the link cells, the * footer and the history bar, the insertion chips, the message each gesture * leaves, and the words it gives a reader for what it shows only by look all * come from here. What the AUTHOR wrote — a column's header, a group's noun, * a register's labels, a lock's tag, a footer item — is data, and never * passes through it; neither does what an input GRAMMAR reads (the date and * link grammars keep their forms). * * Each message is a function of named parameters, so a translation can put * them where its grammar wants them and choose its own plural forms. Numbers * arrive already formatted for the sheet's locale (the shared formatters, * #850); `n` is the raw count beside a formatted `count`, for plural rules. A * row's number is its identifier and arrives as written. * * English is the default. A host overrides any subset for a subtree with * {@link SheetMessagesProvider}; the locale numbers format in comes from * react-aria's `I18nProvider` above the app (the browser's otherwise). * * @packageDocumentation */ import { type ReactNode } from "react"; import { type EditingMessages } from "@elaraai/east-ui-components"; import { type EditHistoryWord } from "@elaraai/east-ui-components/internal"; import { type PagedLoadingMessages } from "../shared/loading.js"; import type { SheetKind } from "./model.js"; import type { SheetValue } from "./frame/index.js"; /** A date column's level, as the words name it (#844). */ export type SheetLevelWord = "week" | "day" | "range" | "time"; /** Which half of a link cell. */ export type SheetHalfWord = "from" | "to"; /** Where an actual instant stands against the wanted date (#844). */ export type SheetToneWord = "on" | "late" | "early"; /** The history bar's states that say something — the shared editing session's (#879). */ export type SheetHistoryWord = EditHistoryWord; /** What a view narrows by, as its hover title names it (B§8). */ export type SheetScopeWord = "query" | "range" | "filter" | "none"; /** How the arity half's named members stand against the implied count (B§4.6). */ export type SheetArityWord = "short" | "exact" | "over"; /** A tab of a builder's library pane: the templates, the columns, or one of the author's own (#1184, #1186). */ export type SheetLibraryTabWord = "rows" | "columns" | "tab"; /** A tab of a builder's inspector pane (#1184). */ export type SheetInspectorTabWord = "details" | "issues"; /** What the inspector shows one of (#1188): a row, a group's line, or a group's band. */ export type SheetInspectWord = "row" | "line" | "band"; /** A gesture of the inspector's (#1188). */ export type SheetInspectActionWord = "duplicate" | "delete" | "addLine" | "editInSheet" | "clear"; /** * Where a drop lands (#1187), as the words name it: before or after a row, a * line or a group (`what`, worded as the inspector names it); at a group's * start or its end; at the sheet's end; or, on a keyed source, where its key * sorts — a new row, or a new group (`noun`, the host's word for one). */ export type SheetDropPlaceWord = { place: "before" | "after"; what: string; } | { place: "start" | "end"; what: string; } | { place: "sheetEnd"; } | { place: "sorted"; group: boolean; noun: string; }; /** * Why a drop is refused where it rests (#1187): the sheet takes no edit; no * row (`line`: a grouped sheet's line) or group may be added; a card lands * only on a row or only on a band; a cell it sets is read only there; the * rows or the groups keep their place, or their key order; a line moves only * within its group (`what`, the group) and never out of the groups. `noun` and * `nouns` are the host's words for a group. */ export type SheetDropRefusalWord = { why: "readOnly" | "ontoBand"; } | { why: "insertGroup" | "noGroupMove"; nouns: string; } | { why: "insert" | "ontoRow" | "noMove"; line: boolean; } | { why: "keyOrder"; group: boolean; nouns: string; } | { why: "column"; header: string; } | { why: "within"; what: string; } | { why: "lineOut"; noun: string; }; /** * Why a paste, a clear or an edit left a cell as it was: a mark locks it * (`words`, the lock's own); its column is read only; its value isn't an * option, so it is never empty; it is an action cell, which only its actions * change; it is edited where ⏎ opens it, never in the grid (#1531); it steps * in place on a row the upstream system owns, which takes no step there (T9); * or `text` is no value its column reads, and a column from data keeps none it * can't read. `header` is the cell's column's. */ export type SheetCellRefusalWord = { why: "locked"; words: string; } | { why: "readOnly" | "noClear" | "action" | "opens" | "owned"; header: string; } | { why: "unread"; header: string; text: string; }; /** * The Sheet's message table — its own words, and the editing session's * ({@link EditingMessages}, #879: the history bar and the draft issues), so a * host translates the sheet's history bar where it translates the sheet. * * @remarks * Parameters named `count`, `from`, `to`, `total`, `loaded`, `rows`, `cols`, * `skipped`, `page` and `pages` are numbers already formatted for the locale; * `n` is the raw number beside them, for plural rules. `number` is a row's * number, as written. `noun` / `nouns` are the host's words for a group * (#844), `header` a column's header, `name` a view's name — the author's. */ export interface SheetMessages extends EditingMessages, PagedLoadingMessages { /** A count of the host's groups — `3 plans`. */ countNoun: (p: { n: number; count: string; noun: string; nouns: string; }) => string; /** The word for a group when the sheet declares none. */ groupNoun: () => string; /** Its plural. */ groupNouns: () => string; /** The lens's count line — `3 matches`. */ lensCount: (p: { n: number; count: string; }) => string; /** The badge on a paged sheet's narrowing chrome, which sees only the loaded rows. */ scopeBadge: () => string; /** The key search's icon — what a toolbar short of room folds its box to — and the head of the popover it opens the box in (#1221). */ keySearch: () => string; /** The key search's icon and popover head once the views fold into it, over the search box — the row's last rung (#1345). */ keySearchViews: () => string; /** * A row the key search lists that the rail's narrowing hides — `JOB-10001 · hidden by the filters` (#1398, CL10) — * until e3 has said which of the `rows` source's choices hide it: a pick of it then clears every one, and goes to the row. */ keySearchHidden: (p: { key: string; }) => string; /** * The same row once e3 has said which choices hide it — `JOB-10001 · hidden by Status: Ready — picking it clears that * filter`: a pick of it clears them and goes to the row, every other choice kept. `filters` are those choices and * `also` any the pick clears with them, a choice that cannot stand without one of them — each as the rail words it * (`Status: Ready`). */ keySearchHiddenBy: (p: { key: string; filters: readonly string[]; also: readonly string[]; }) => string; /** The tablist's accessible name. */ tabList: () => string; /** The whole-sheet tab. */ tabAll: () => string; /** The whole-sheet tab's hover title. */ tabAllTitle: () => string; /** A view's hover title: what it narrows by, and the gestures it takes. */ viewTitle: (p: { scope: SheetScopeWord; query: string; }) => string; /** A new view's name when there is no query to name it from — stored with the view. */ viewName: (p: { seq: string; }) => string; /** The rename box's accessible name. */ tabRename: () => string; /** The dirty dot's title. */ tabDirty: () => string; /** A tab's close control. */ tabClose: () => string; /** The folded tabs' menu button — `+2`. */ tabMore: (p: { n: number; count: string; }) => string; /** The same button's accessible name. */ tabMoreName: (p: { n: number; count: string; }) => string; /** The same button's title. */ tabMoreTitle: () => string; /** `+ tab`'s label. */ tabAdd: () => string; /** `+ tab`'s accessible name. */ tabAddName: () => string; /** `+ tab`'s title — with a query set, or without one. */ tabAddTitle: (p: { query: boolean; }) => string; /** The strip folded into one chip (#1221): its accessible name, naming the open view — `Views: All`. */ tabMenuName: (p: { name: string; }) => string; /** Its title. */ tabMenuTitle: () => string; /** The chip's menu item that closes the open view — `Close "Spraying"`. */ tabCloseView: (p: { name: string; }) => string; /** The row numbers' column head. */ headerNumber: () => string; /** The fold-all's accessible name — `Fold 3 plans`. */ foldAll: (p: { folded: boolean; groups: string; }) => string; /** The fold-all's title. */ foldAllTitle: (p: { folded: boolean; groups: string; noun: string; }) => string; /** The band title's column, where a column names it (the strip, a band cell's title). */ titleColumn: () => string; /** A row's name — its gutter's accessible name. */ rowName: (p: { number: string; }) => string; /** A line's name in its group. */ lineName: (p: { number: string; group: string; }) => string; /** A row's gutter title — with the copilot's fill waiting on it, or not. */ rowTitle: (p: { fills: boolean; }) => string; /** A row's checkbox. */ selectRow: (p: { number: string; group: string | undefined; }) => string; /** A line's sub-row chevron's accessible name. */ subRows: (p: { open: boolean; n: number; count: string; line: string; }) => string; /** Its title. */ subRowsTitle: (p: { open: boolean; n: number; count: string; noun: string; }) => string; /** The gutter's fill button. */ fillRow: () => string; /** Its title. */ fillRowTitle: () => string; /** A new row's discard button. */ discardRow: () => string; /** * A folded gutter's row-actions button (#1215), its accessible name — * `Actions — row 3`. Its menu's items are the words of the controls it * holds: the gutter's decisions and the insertion strip's inserts. */ rowActions: (p: { what: string; }) => string; /** Its title — and, when its row moves, that a drag on it moves the row. */ rowActionsTitle: (p: { movable: boolean; }) => string; /** A fill's take button. */ take: (p: { header: string; }) => string; /** Its title — the fill's provenance, when it has one. */ takeTitle: (p: { meta: string | undefined; }) => string; /** A suggested row's name. */ proposalName: (p: { number: string; }) => string; /** Its gutter title — a native tooltip, so it names its buttons by their words, never by their icons (#1263). */ proposalTitle: () => string; /** Its checkbox. */ proposalSelect: () => string; /** Its add button. */ proposalAccept: () => string; /** The add button's title. */ proposalAcceptTitle: () => string; /** Its reject button. */ proposalReject: () => string; /** The reject button's title. */ proposalRejectTitle: () => string; /** An author check that reported a state without saying why. */ issueAuthor: (p: { state: string; }) => string; /** A row check that threw. */ issueRowCheck: (p: { reason: string; }) => string; /** A group check that threw. */ issueGroupCheck: (p: { reason: string; }) => string; /** The footer's line for an issue the history bar went to. */ issueAt: (p: { where: string; message: string; }) => string; /** A failed read's retry. */ retry: () => string; /** Why the lens draws a record's rows as a failed band (#1349): which of them the narrowing holds disagrees with where e3 placed its rows — the record changed between the two reads. */ lensChanged: () => string; /** A row that threw as it drew. */ rowFailed: (p: { number: string; reason: string; }) => string; /** A paged source that failed before anything landed. */ noSource: (p: { reason: string; }) => string; /** Why each marked cell of a row whose marks could not be read is locked (#1560): it stays locked until they are. */ marksUnread: () => string; /** A band's rowheader — `plan 2, 5 lines`. */ groupName: (p: { noun: string; number: string; n: number; count: string; }) => string; /** Its gutter title. */ groupTitle: (p: { noun: string; }) => string; /** Its checkbox. */ groupSelect: (p: { noun: string; title: string; }) => string; /** A new group's discard button. */ groupDiscard: (p: { noun: string; }) => string; /** Its chevron's accessible name. */ groupFold: (p: { folded: boolean; noun: string; }) => string; /** Its chevron's title. */ groupFoldTitle: (p: { folded: boolean; }) => string; /** A group with no title. */ untitled: () => string; /** A band cell's title — its column's header and its value. */ bandCellTitle: (p: { header: string; value: string; }) => string; /** The insertion chips' group. */ insertHere: () => string; /** The row chip's accessible name — a line on a grouped sheet. */ insertRow: (p: { ordered: boolean; line: boolean; }) => string; /** Its title. */ insertRowTitle: (p: { ordered: boolean; line: boolean; }) => string; /** The group chip's accessible name. */ insertGroup: (p: { ordered: boolean; noun: string; }) => string; /** Its title. */ insertGroupTitle: (p: { ordered: boolean; noun: string; }) => string; /** The insertion strip's group. */ insertStrip: () => string; /** Insert above the selection. */ insertAbove: () => string; /** Insert below it — or add one, in key order. */ insertBelow: (p: { ordered: boolean; }) => string; /** A new group. */ insertNewGroup: (p: { noun: string; }) => string; /** A grouped sheet's count line — `3 plans · 14 lines`, and `· 2 loose rows` when rows stand between the groups (#846). */ summary: (p: { groups: string; n: number; lines: string; nLoose: number; loose: string; nSub: number; subRows: string; }) => string; /** The key hint — a selected suggestion. */ hintProposal: () => string; /** The key hint — the ring on a band. */ hintBand: (p: { noun: string; }) => string; /** The key hint — the ring on a line with sub rows. */ hintSubRows: (p: { open: boolean; n: number; count: string; noun: string; }) => string; /** The key hint — whole rows selected. */ hintRows: (p: { n: number; count: string; }) => string; /** The key hint — fills waiting. */ hintFills: () => string; /** The key hint — suggested rows waiting. */ hintSuggestedRows: () => string; /** The key hint. */ hintDefault: () => string; /** What an empty field accepts — `START · accepts`. */ stripAccepts: (p: { header: string; }) => string; /** A link column's label, naming the half. */ stripHalf: (p: { header: string; half: SheetHalfWord | undefined; }) => string; /** The predicted members' label. */ stripPredicted: (p: { header: string; }) => string; /** The armed candidate's label — `⌥]` when there are others to step to. */ stripArmed: (p: { header: string; many: boolean; }) => string; /** The pending suggestions' label. */ stripSuggested: () => string; /** A typed text no register member matches. */ stripNoMatch: () => string; /** What a date field accepts. */ stripDate: () => string; /** Its form. */ stripDateForm: () => string; /** A date not yet whole. */ stripIncomplete: () => string; /** What a number field accepts. */ stripNumber: (p: { unit: boolean; }) => string; /** A text that could not be read. */ stripUnrecognised: () => string; /** Why a number field's text isn't taken, in the field's words for what it takes — `2.5 isn't a whole number` (#1585). */ stripNotNumber: (p: { text: string; whole: boolean; }) => string; /** What a custom column accepts when it says nothing. */ stripValue: () => string; /** The days between the base column's date and this one. */ stripDays: (p: { n: number; count: string; }) => string; /** A predicted member's title. */ stripAdd: (p: { label: string; }) => string; /** The suggested rows chip — `+2 rows`. */ stripRows: (p: { n: number; count: string; }) => string; /** The pending rows' header. */ stripRowsHeader: () => string; /** A provider still thinking. */ stripPending: (p: { header: string; }) => string; /** Its title. */ stripPendingTitle: (p: { header: string; }) => string; /** The keys — a text kept as typed. */ stripKeysTyped: () => string; /** The keys — a menu with nothing armed. */ stripKeysFilter: () => string; /** The keys — the armed candidate. */ stripKeysTake: (p: { many: boolean; index: string; total: string; }) => string; /** The keys — an empty date field. */ stripKeysDateEmpty: () => string; /** The keys — an incomplete date. */ stripKeysDate: () => string; /** The keys — a value to commit. */ stripKeysCommit: () => string; /** The keys — a number field. */ stripKeysStep: () => string; /** The keys — a custom column. */ stripKeysParse: () => string; /** The keys — predicted members. */ stripKeysPredicted: () => string; /** The keys — a link's armed candidate. */ stripKeysLinkTake: (p: { many: boolean; index: string; total: string; single: boolean; }) => string; /** The keys — a link half with nothing to offer. */ stripKeysLinkAdd: (p: { single: boolean; }) => string; /** The keys — the pending suggestions. */ stripKeysSuggested: () => string; /** The keys — a resting cell's detail. */ stripKeysDetail: (p: { date: boolean; }) => string; /** The pager's title. */ stripPager: (p: { n: number; count: string; page: string; pages: string; }) => string; /** The pager's page — `1/3`. */ stripPage: (p: { page: string; pages: string; }) => string; /** The pager's back button. */ stripPrevious: () => string; /** The pager's forward button. */ stripNext: () => string; /** An enum's list with nothing in it. */ editorNoOptions: () => string; /** A date's time box. */ editorTime: () => string; /** Its placeholder. */ editorTimePlaceholder: () => string; /** A locked half's warning, in the editor. */ editorLocked: (p: { half: SheetHalfWord; }) => string; /** The register editor's badge over its candidates — `2/5`. */ editorBadge: (p: { index: string; total: string; }) => string; /** An empty live half's label. */ halfLabel: (p: { half: SheetHalfWord; }) => string; /** A live half's title. */ halfTitle: (p: { half: SheetHalfWord; }) => string; /** A locked half's title — `Routing has no source · in place`. */ halfNone: (p: { driver: string; half: SheetHalfWord; lock: string | undefined; }) => string; /** The row whose driver says nothing, in a message about it. */ thisRow: () => string; /** A counted member's count in the kind it resolves to — `4 machines`. */ countedMembers: (p: { n: number; count: string; kind: string | undefined; }) => string; /** A counted member names no one in particular. */ unassigned: () => string; /** A range's span — `6 machines`. */ rangeSpan: (p: { n: number; count: string; kind: string | undefined; }) => string; /** A range candidate's meta — `→ 6 machines: R2140, …`. */ candidateRange: (p: { n: number; count: string; kind: string; names: string; }) => string; /** The enumerate alternative's meta. */ candidateEnumerate: (p: { n: number; count: string; }) => string; /** The placeholder candidate's meta. */ candidateTbc: () => string; /** The predicted counted member's enumerate alternative. */ enumerateInstead: () => string; /** A kind that resolves by code, in the grammar line. */ grammarCode: (p: { kind: string; }) => string; /** The counted form, in the grammar line. */ grammarCounted: () => string; /** A range, in the grammar line. */ grammarRange: () => string; /** The arity line (B§4.6) — `4 × CNC router implied · 3 named so far`. */ arity: (p: { count: string; key: string; named: string; state: SheetArityWord; }) => string; /** The `exists` check's flag. */ notInRegister: (p: { key: string; }) => string; /** A level's tag beside the date. */ whenTag: (p: { level: SheetLevelWord; }) => string; /** What a level accepts. */ whenAccepts: (p: { level: SheetLevelWord; }) => string; /** The forms it takes. */ whenAcceptsForms: (p: { level: SheetLevelWord; }) => string; /** An actual instant's tag — `+2d`, `−3h`, or on time. */ actualTag: (p: { tone: SheetToneWord; n: number; count: string; unit: "d" | "h"; }) => string; /** The same in words — `3 hours late`. */ actualWords: (p: { tone: SheetToneWord; n: number; count: string; unit: "d" | "h"; }) => string; /** When the work happened. */ detailHappened: (p: { when: string; }) => string; /** A date that has happened with nothing wanted. */ detailNoWanted: () => string; /** Its title. */ detailHappenedTitle: (p: { when: string; }) => string; /** The wanted date. */ detailWanted: (p: { text: string; tag: string; }) => string; /** The title of a date that has happened against a wanted one. */ detailTitle: (p: { when: string; text: string; tag: string; words: string; }) => string; /** A row, as a message names it — `row 4`, `line 3 of Bay 2 week 8`. */ rowRef: (p: { line: boolean; number: string; title: string | undefined; noun: string; }) => string; /** A group opened. */ noticeGroupOpened: (p: { noun: string; }) => string; /** A group folded. */ noticeGroupFolded: (p: { noun: string; }) => string; /** Every group opened. */ noticeGroupsOpened: (p: { groups: string; }) => string; /** Every group folded. */ noticeGroupsFolded: (p: { groups: string; }) => string; /** Every line's sub rows shown. */ noticeSubRowsShownAll: (p: { n: number; count: string; noun: string; }) => string; /** Every line's sub rows hidden. */ noticeSubRowsHidAll: (p: { noun: string; }) => string; /** A line's sub rows shown. */ noticeSubRowsShown: (p: { n: number; count: string; }) => string; /** A line's sub rows hidden. */ noticeSubRowsHid: () => string; /** Members added to a link half. */ noticeMembersAdded: (p: { n: number; count: string; }) => string; /** Members removed from a link half. */ noticeMembersRemoved: (p: { n: number; count: string; }) => string; /** Predicted members taken. */ noticePredictedTaken: (p: { n: number; count: string; }) => string; /** A hop into a locked half. */ noticeLockedHalf: (p: { driver: string; }) => string; /** An editor whose row left the sheet closed (#877). */ noticeRowLeft: () => string; /** An editor whose column the grid no longer draws closed. */ noticeColumnLeft: () => string; /** A view saved — with a query, or without one. */ noticeTabSaved: (p: { name: string; query: boolean; }) => string; /** A view closed — the active one, or another. */ noticeTabClosed: (p: { name: string; active: boolean; }) => string; /** A view updated to the current search. */ noticeTabUpdated: (p: { name: string; }) => string; /** A view's search reverted. */ noticeTabReverted: () => string; /** A fill taken. */ noticeFillTaken: (p: { column: string; meta: string | undefined; }) => string; /** A row filled. */ noticeRowFilled: (p: { n: number; count: string; row: string; }) => string; /** A suggested row taken. */ noticeProposalTaken: (p: { label: string | undefined; more: boolean; }) => string; /** A suggested row rejected. */ noticeProposalRejected: (p: { to: string | undefined; from: string | undefined; }) => string; /** A fill dismissed. */ noticeFillDismissed: (p: { column: string; }) => string; /** A selected suggestion let go. */ noticeProposalDeselected: () => string; /** The row fill dismissed. */ noticeRowFillDismissed: () => string; /** Rows, lines or groups deleted — `again`: the group is left empty, ⌫ again removes it. */ noticeDeleted: (p: { n: number; count: string; what: "rows" | "lines" | "groups"; noun: string; nouns: string; again: boolean; }) => string; /** * A paste — `wrote` whether any cell took it; `nActions` the action cells it passed by, which take no paste (T7); `why` * the first cell it skipped was left as it was, in {@link SheetMessages.cellRefused}'s words, where it says. */ noticePasted: (p: { rows: string; cols: string; n: number; skipped: string; wrote: boolean; nActions: number; actions: string; why: string | undefined; }) => string; /** Why a gesture left a cell as it was — `Mon can't be left empty`, `locked: Booked centrally`. */ cellRefused: (p: SheetCellRefusalWord) => string; /** A clear that left `n` cells as they were beside the `nCleared` it cleared, and why the first was — `Nothing cleared — Mon can't be left empty`. */ noticeClearRefused: (p: { n: number; count: string; nCleared: number; cleared: string; why: string; }) => string; /** An edit its cell would not take, and why — `Mon can't be left empty — the edit was not kept`. */ noticeEditRefused: (p: { why: string; }) => string; /** A copy. */ noticeCopied: (p: { rows: string; cols: string; }) => string; /** A new row discarded. */ noticeDiscarded: () => string; /** A new row. */ noticeNewRow: () => string; /** A new group. */ noticeNewGroup: (p: { noun: string; }) => string; /** A new entry's key the app's `newKey` gave is taken already (#1536) — `The new key 7 is taken`: nothing was drafted. */ noticeKeyTaken: (p: { key: string; }) => string; /** The app's `newKey` threw (#1536): nothing was drafted. */ noticeKeyFailed: (p: { reason: string; }) => string; /** * New rows given new keys as they were saved (#1583): another save had added rows under the keys the sheet gave them — * `J-104 was taken by another save — the new row is J-105`; `from` and `to` the first's keys, `n` how many. */ noticeRenumbered: (p: { from: string; to: string; n: number; count: string; }) => string; /** A new row, line or group (`noun`) the app left a field of empty, one no person can set (#1536) — `Can't add a row — the app gives no Serial`: nothing was drafted. */ noticeCantAdd: (p: { what: "row" | "line" | "group"; noun: string; label: string; }) => string; /** The library pane's name. */ libraryPane: () => string; /** A library tab — the author names their own tabs. */ libraryTab: (p: { tab: "rows" | "columns"; }) => string; /** A library tab's empty state: its title — `No templates`, `Nothing in Crews` (#1186, SB37); `name` is an author's tab's. */ libraryEmpty: (p: { tab: SheetLibraryTabWord; name: string; }) => string; /** The line under it. */ libraryEmptyHint: (p: { tab: SheetLibraryTabWord; name: string; }) => string; /** What a library tab's search box counts its cards as — `template`, `templates`. */ libraryNoun: (p: { tab: SheetLibraryTabWord; n: number; }) => string; /** What a library tab's cards are grouped by: its grouping control's words. */ libraryGroupBy: (p: { tab: SheetLibraryTabWord; }) => string; /** A group template's line count, on its card — `4 lines` (SB33). */ templateLines: (p: { n: number; count: string; }) => string; /** A column's kind, as the Columns tab names it (SB36). */ columnKind: (p: { kind: SheetKind; }) => string; /** A phone's Library (`Mobile Sheet Spec.md` SH11): what a tap on an author's card does — sets it on `target` — or, with nothing to set it on, what to select first. */ libraryPhoneSet: (p: { target: string | undefined; }) => string; /** …and on a template: adds it below `target`, or what to select first. */ libraryPhoneAdd: (p: { target: string | undefined; }) => string; /** The mark on the card the target holds now. */ libraryPhoneCurrent: () => string; /** Over a phone's Columns: what stays pinned, where one does, and what a tap does. */ libraryPhoneColumns: (p: { pinned: string | undefined; }) => string; /** A phone's column row's kind, the pinned column's said so — `text · pinned`. */ libraryPhoneKind: (p: { kind: string; pinned: boolean; }) => string; /** A phone's column row's accessible name — `Go to Good`. */ libraryPhoneGo: (p: { header: string; }) => string; /** A column's eye: shown, hidden, or the last one shown, which stays. */ columnEye: (p: { hidden: boolean; last: boolean; }) => string; /** The inspector pane's name. */ inspectorPane: () => string; /** An inspector tab. */ inspectorTab: (p: { tab: SheetInspectorTabWord; }) => string; /** What the inspector shows — `row 3`, `line 2 of WO-2201`, `order 4` — over its fields, and on the collapsed rail (#1188, SB46). */ inspectorWhat: (p: { what: SheetInspectWord; number: string; title: string | undefined; noun: string; }) => string; /** A phone's Details' eyebrow names what is selected alone — `line 2`, `row 3`, `order 4` — its group by its id after it (SH12). */ inspectorPhoneWhat: (p: { what: SheetInspectWord; number: string; noun: string; }) => string; /** A draft's chip: changed since the record held it, or never saved (SB47). */ inspectorChip: (p: { state: "pending" | "new"; }) => string; /** The lock on a row the upstream system owns, and its title. */ inspectorOwned: () => string; /** A section's head: the issues, the sub rows, a group's lines — `2 issues`. */ inspectorSection: (p: { section: "issues" | "subRows" | "lines"; n: number; count: string; }) => string; /** An inspector gesture — `Duplicate`, `Add line`; on a band, `with` its lines (SB49). */ inspectorAction: (p: { action: SheetInspectActionWord; header: string | undefined; withLines: boolean; }) => string; /** A link or set field's Edit in sheet while its column is hidden (SB48). */ inspectorHiddenColumn: (p: { header: string; }) => string; /** Several rows selected (SB50) — `3 rows selected`, `5 lines selected`. */ inspectorSeveral: (p: { n: number; count: string; lines: boolean; }) => string; /** The bulk edit's column choice, and what it sets across the rows. */ inspectorBulk: (p: { part: "column" | "pick" | "hint"; }) => string; /** Nothing selected (SB51): a count's label — `rows`, `pending`, `issues`. */ inspectorCount: (p: { what: "rows" | "pending" | "issues"; n: number; }) => string; /** The record's last commit and who made it — `saved 14:02 by planner`; `undefined` before its first. */ inspectorLastCommit: (p: { when: string | undefined; by: string | undefined; }) => string; /** Nothing selected: three hints, by their place. */ inspectorHint: (p: { n: 1 | 2 | 3; }) => string; /** A row whose entry is not read yet. */ inspectorReading: () => string; /** The Issues tab with nothing to list: its title, and the line under it (SB53). */ inspectorNoIssues: (p: { part: "title" | "hint"; }) => string; /** An issue's place and field — `row 4 · Qty`. */ inspectorIssueAt: (p: { where: string; field: string | undefined; }) => string; /** An issue whose row the rail's narrowing hides, in its line — `hidden by the filters` — until e3 has said which choices: a click then clears every one. */ inspectorIssueHidden: () => string; /** …and once it has, as the key search's line says it — `hidden by Status: Ready — picking it clears that filter` (`keySearchHiddenBy`). */ inspectorIssueHiddenBy: (p: { filters: readonly string[]; also: readonly string[]; }) => string; /** The footer's last save, from the record's commits — `saved 14:02` (SB22). */ savedAt: (p: { when: string; }) => string; /** The banner over an entry the record does not hold (SB15). */ entryMissing: (p: { key: string; }) => string; /** What the rail's summary counts a flat sheet's rows in where its `rows` source has no label of its own — `rows` (#1345); a grouped sheet's, in its groups' noun. */ railRows: () => string; /** The banner over a source of the rail whose narrowing could not be read (#1345) — `Templates results unavailable`; `name` is the source's label, or what it is counted in. */ sourceUnavailable: (p: { name: string; }) => string; /** Why: its results moved while they were read. */ sourceChanged: (p: { name: string; }) => string; /** Why: its results could not be read. */ sourceFailed: (p: { name: string; }) => string; /** Where a drop lands, under its ghost (#1187, SB38) — `after row 3`. */ dropPlace: (p: SheetDropPlaceWord) => string; /** The same place as a screen reader hears the drag layer name it — `the gap after row 3`. */ dropPlaceName: (p: SheetDropPlaceWord) => string; /** An author's card dropped on a row or a band, under its ghost (SB61) — `→ row 3`. */ dropOnto: (p: { what: string; }) => string; /** Why a drop is refused where it rests, red under its ghost (SB38). */ dropRefused: (p: SheetDropRefusalWord) => string; /** A row's grip, its accessible name — `Move row 3` (SB44). */ dropGrip: (p: { what: string; }) => string; /** Its title. */ dropGripTitle: () => string; /** An action cell with nothing taken and something offered (S8). */ actionNotStarted: () => string; /** The ▾ part's accessible name (A2). */ actionMore: () => string; /** A row whose draft lacks fields its actions need (T6) — `Fill Plan before taking an action`; `fields` are their labels. */ actionIncomplete: (p: { fields: readonly string[]; }) => string; /** The Menu's head over the direct actions (M5): how the author names the row, and its words beside it — `Step 30 · Fit`; neither, `Actions`. */ actionMenuHead: (p: { name: string | undefined; title: string | undefined; }) => string; /** The Menu's head over a choice's reasons (M5) — `Hold · reason`. */ actionMenuChoice: (p: { verb: string; }) => string; /** The popover's eyebrow (F4) — `Report · Step 30`. */ actionFormEyebrow: (p: { verb: string; name: string | undefined; }) => string; /** The popover's close button (F4). */ actionFormClose: () => string; /** The popover's Cancel (F8). */ actionFormCancel: () => string; /** What taking it writes (R5, F8) — `Sets Good 12 · Done 14:02`; nothing beside its field, `Sets nothing beside the action`. */ actionSets: (p: { facts: readonly string[]; }) => string; /** What a form's foot says while a required field is empty, in place of what it sets — `Needs Good parts`. */ actionNeeds: (p: { fields: readonly string[]; }) => string; /** The footer's line for ▾ on a range whose rows share no further case (T8). */ actionRangeNothing: () => string; /** What a choice's preview says (R2) — `Pick a reason · sets …`. */ actionPickReason: (p: { facts: readonly string[]; }) => string; /** What a form's preview says (R2) — `Opens its form`. */ actionOpensForm: () => string; /** The strip's label over an action (R2, R3) — `Report · Step 30`, or `Action · Step 30` for the ring's cell. */ actionStripLabel: (p: { verb: string | undefined; name: string | undefined; }) => string; /** The strip's line for the ring on an action cell (R3): its state and summary, then what it offers or why not. */ actionStripState: (p: { state: string | undefined; summary: string; offers: readonly string[]; blocked: string | undefined; incomplete: readonly string[] | undefined; readOnly: boolean; }) => string; /** The strip's keys hint on an action cell (R3). */ actionStripKeys: () => string; /** The message a taken action leaves (T3) — `Completed Step 30 · set Good 12`. */ noticeActionTaken: (p: { state: string; name: string | undefined; n: number; count: string; facts: readonly string[]; }) => string; /** A phone's action bar: ← back to the row's actions (X7). */ actionBarBack: () => string; /** A phone's action bar: the button listing the rest of the offer, past four (X6). */ actionBarMore: () => string; /** A phone's action bar: ⌄ close (SH9). */ actionBarClose: () => string; /** A phone's action bar over a row offered nothing further (SH9.1) — `No further actions · 24 good · done 08:42`. */ actionBarNothing: (p: { summary: string; }) => string; /** Why the field took no value (an action's `updates` threw, or its value could not be read): the gesture is refused. */ actionFailed: (p: { verb: string; reason: string; }) => string; /** The readout's lead — `Columns`, before the range in view. */ pagerColumns: () => string; /** What follows the range — `of 3`. */ pagerOf: (p: { n: number; total: string; }) => string; /** The readout's accessible name — `Columns 1–2 of 3 · go to a column`. */ pagerName: (p: { from: string; to: string; n: number; total: string; }) => string; /** The step back a column. */ pagerPrevious: () => string; /** The step on a column. */ pagerNext: () => string; /** The jump menu's eyebrow. */ pagerMenu: () => string; /** The Row column's head, and its item in the jump menu (SH2). */ pagerRow: () => string; /** What the jump menu says the Row column holds, as it says each column's kind (SH2). */ pagerRowKind: () => string; /** The jump menu's checkbox that adds the Row column (SH2). */ pagerRowNumber: () => string; /** Its note. */ pagerRowNumberNote: () => string; /** Its eyebrow: the column and the row — `Good · step 20 · Weld frame` as its action column names it, else `Good · line 2 of Frame assembly`. */ cellEditorEyebrow: (p: { header: string; what: string; }) => string; /** Its ⌄ close. */ cellEditorClose: () => string; /** A number's − and + (SH10) — `Fewer Good`, `More Good`. */ cellEditorStep: (p: { header: string; more: boolean; }) => string; /** A time's Clear (SH10). */ cellEditorClear: () => string; /** A time's help line (SH10). */ cellEditorTimeHelp: () => string; } /** The English table — the default: the editing session's words, then the sheet's own. */ export declare const sheetMessages: SheetMessages; /** The app's words for what the sheet draws of its own, as the payload carries them (#1516). */ export type SheetVocabulary = SheetValue["vocabulary"]; /** * A table in the app's own words (#1516): each word the app gave over the table above it, wherever the table says it, and * the rest as they stood, so a host's translation stands where the app gave none. * * @param parent - The table above * @param v - The app's words * @returns The table */ export declare function sheetMessagesIn(parent: SheetMessages, v: SheetVocabulary): SheetMessages; /** * The message table in effect — {@link sheetMessages} with every * {@link SheetMessagesProvider} above overriding it. * * @returns The table */ export declare function useSheetMessages(): SheetMessages; /** Props of {@link SheetVocabularyProvider}. */ export interface SheetVocabularyProviderProps { /** The app's words, the same object while they hold. */ vocabulary: SheetVocabulary; /** The subtree they apply to. */ children?: ReactNode; } /** * The app's own words for a sheet (#1516), over whatever table a host gives it. * * @param props - The words and the subtree * @returns The provider */ export declare function SheetVocabularyProvider({ vocabulary, children }: SheetVocabularyProviderProps): import("react").FunctionComponentElement>; /** Props of {@link SheetMessagesProvider}. */ export interface SheetMessagesProviderProps { /** The messages to override — any subset; the rest come from the table above. */ messages: Partial; /** The subtree the overrides apply to. */ children?: ReactNode; } /** * Override the Sheet's words for a subtree — a translation, or a house style. * Providers nest: each overrides the table the one above it resolved. * * @remarks * The overrides are read by identity: define them once (module scope, or a * memo), as below. A new object on every render hands every sheet beneath a * new table, and each re-derives all of its words. * * @param props - The overrides and the subtree * @returns The provider * * @example * ```tsx * const GERMAN: Partial = { * tabAll: () => "Alle", * scopeBadge: () => "nur geladene Zeilen", * lineLoading: ({ noun, from, to }) => (from === undefined || to === undefined ? [`${noun} werden geladen…`] : [`${noun} `, { strong: `${from}–${to}` }, " werden geladen"]), * }; * * * * * * * ``` */ export declare function SheetMessagesProvider({ messages, children }: SheetMessagesProviderProps): import("react").FunctionComponentElement>; //# sourceMappingURL=messages.d.ts.map