/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type Formatters, sessionErrorText } from "@elaraai/east-ui-components"; import { SESSION_TEXT } from "@elaraai/east-ui-components/internal"; import { type SheetMessages } from "./messages.js"; import type { SheetNotice, SheetRowRef } from "./sheet-types.js"; export { SESSION_TEXT, sessionErrorText }; /** The Sheet's words: its message table, and its locale's formatters. */ export interface SheetWords extends Formatters { /** The message table in effect. */ m: SheetMessages; } /** * Build the words for a locale and a message table. * * @param locale - The BCP 47 locale * @param m - The message table * @returns The words */ export declare function sheetWords(locale: string, m: SheetMessages): SheetWords; /** The words a sheet speaks with no provider above it: English, in `en-US`. */ export declare const SHEET_WORDS: SheetWords; /** * The sheet's words — its locale (react-aria's `useLocale`, through the * shared formatters) and the message table in effect * (`SheetMessagesProvider`), one object per change of either. * * @returns The words */ export declare function useSheetWords(): SheetWords; /** * A row, in words — `row 4`, or on a grouped sheet `line 3 of Bay 2 week 8`. * * @param ref - The row * @param w - The words * @returns The text */ export declare function rowRefText(ref: SheetRowRef, w: SheetWords): string; /** * The footer's line for the message a gesture left. * * @param notice - The message * @param w - The words * @returns The text */ export declare function noticeText(notice: SheetNotice, w: SheetWords): string; /** * The renderer's own readiness issues, in their canonical English — the text * the patch events carry to the host: a draft's (the editing session's, * #879) and the sheet's author checks'. Read back here ({@link issueText}), * so the two never drift. */ export declare const ISSUE_TEXT: { readonly required: string; readonly invalid: (value: string) => string; readonly author: (state: string) => string; readonly rowCheck: (reason: string) => string; readonly groupCheck: (reason: string) => string; }; /** * An issue's text as the sheet shows it: the renderer's own issue, read back * from its canonical form ({@link ISSUE_TEXT}) and worded in the table's * language; any other issue — an author's — as written. * * @param message - The issue's text, as the readiness carries it * @param w - The words * @returns The text to show */ export declare function issueText(message: string, w: SheetWords): string; //# sourceMappingURL=words.d.ts.map