/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type Formatters } from "@elaraai/east-ui-components"; import { type PlanMessages } from "./messages.js"; /** * The canvas's words: its message table, and its locale's formatters. * * `number` is what the canvas prints a number it derived or counts with — a * rollup's total, an aggregated heat cell, a member count (#810): the shared * default arm, the one a Table's undeclared cell uses, so a derived total of * 1234.5 prints `1,234.5` beside the author's own formatted numbers rather * than a hand-rolled `1235`, and the mean of 0.82, 0.64 and 0.90 prints * `0.787` rather than `1`. `value` is a number through an author's declared * format. */ export interface PlanWords extends Formatters { /** The message table in effect. */ m: PlanMessages; } /** * 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 planWords(locale: string, m: PlanMessages): PlanWords; /** The words a canvas speaks with no provider above it: English, in `en-US`. */ export declare const PLAN_WORDS: PlanWords; /** The canvas's words, provided once by the canvas root. */ export declare const PlanWordsContext: import("react").Context; /** * The canvas root's words — its locale (react-aria's `useLocale`) and the * message table in effect (`PlanMessagesProvider`), resolved once per change. * * @returns The words */ export declare function useResolvedPlanWords(): PlanWords; /** * The canvas's words, for its parts. * * @returns The words the canvas root resolved ({@link PLAN_WORDS} outside a canvas) */ export declare function usePlanWords(): PlanWords; //# sourceMappingURL=words.d.ts.map