import { type ReactNode } from "react"; import { type DatePickerLabels } from "./date_picker"; import { type CalendarLabels } from "./date_calendar"; import { type CalendarViewLabels } from "./calendar/types"; import { type SocialPostPreviewLabels } from "./social_post_rules"; import { type PaginationLabels } from "./pagination"; import { type SortHeaderLabels } from "./sort_header"; import { type StateMatrixLabels } from "./state_matrix"; import { type TimetableLabels } from "./timetable"; import { type ProgressRemainingLabels } from "./progress"; import { type DateFilterFieldLabels } from "./date_filter"; import type { GalleryLabels } from "./file_preview"; import type { FilesEditorLabels } from "./files_editor"; import { type FindingLabels } from "./finding"; import { type AgeingLabels, type DeadlineLabels } from "./deadline"; import { type FormatDateOptions } from "./format_date"; import { type MemberProfileLabels } from "./member_profile_card"; import { type ActGroupLabels } from "./act_group"; import { type ActAsksDialogLabels } from "./act_asks_dialog"; import { type ChecksCalloutLabels } from "./checks_callout"; import { type FolderSwitcherLabels } from "./folder_switcher"; import { type GroupByMenuLabels } from "./group_by_menu"; import { type RecordHeaderLabels } from "./record_header"; import { type SectionNavLabels } from "./section_nav"; import { type LinkValueLabels } from "./link_value"; import { type StatusChipsLabels } from "./status_chips"; /** * The kit's localizable strings, one slice per string-bearing component: plain data an app supplies * once at its root. Slices reuse each component's `*Labels` type, so a missing translation is a * compile error, not an English leak. A per-instance prop wins, else the provider's pack (default * `en`). */ export interface LoticsLocale { /** * Drives every `Intl` rendering (date part order, 12/24h, calendar names, `formatDate`); a * `locale` prop still overrides. */ bcp47: string; /** * The workspace's zone, which a shipped pack cannot know, so the app states it (`{ ...vi, zone * }`). Stored cells are wall clocks; absent, instants read in the viewer's zone. Read via * `useFormatDate` and `useCalendarDay`. */ zone?: string; pagination: Required; sortHeader: Required; timetable: Required; stateMatrix: Required; referenceField: { open: string; change: string; clear: string; edit: string; save: string; saving: string; cancel: string; }; /** `choose`: an empty picker where a label already names the field. */ optionList: { selectAll: string; deselectAll: string; noResults: string; recent: string; searchPlaceholder: string; someSelected: string; choose: string; }; /** * `Select`'s empty option when empty is a choice (`clearable`): a value, hence "None" not * "Clear". */ picker: { emptyOption: string; }; datePicker: DatePickerLabels; calendar: CalendarLabels; /** The scheduling surface, distinct from `calendar`, the picker's month grid. */ calendarView: CalendarViewLabels; socialPostPreview: SocialPostPreviewLabels; filterChip: { clear: string; }; /** A phone's band: the one press holding every filter, and the sheet's close once they are set. */ filterBand: { filters: string; apply: string; }; /** A record: its tabs, its ⋯, what a blocking check stops and what its act still lacks. */ recordHeader: RecordHeaderLabels; /** A linked row, as a picker offers it and as it reads once chosen. */ linkValue: LinkValueLabels; checksCallout: ChecksCalloutLabels; actAsksDialog: ActAsksDialogLabels; /** What an act still needs, or would leave blank, said over its button. */ actGroup: ActGroupLabels; /** A register's status chips and its fold. */ statusChips: StatusChipsLabels; groupByMenu: GroupByMenuLabels; folderSwitcher: FolderSwitcherLabels; floatingActionBar: { clear: string; }; /** The one side every form marks. */ formField: { optional: string; required: string; }; dangerSection: { title: string; }; /** `Alert.confirm`'s chrome; everything about the object is the caller's. */ confirm: { cancel: string; /** Where the request states no consequence. */ irreversible: string; /** Where the host refused without a message. */ failed: string; /** Also the field's accessible name. */ typedPrompt: (name: string) => string; }; /** `position`: where the open row stands among the register's, 1-based. */ drawer: { previous: string; next: string; close: string; openPage: string; position: (index: number, total: number) => string; }; /** One name per geometry, the kit's, so readers meet the same words in every app. */ layout: { timeline: string; }; /** * Which reply answers, the writer of an unattributed entry, the foot box's invite, and the * per-day add. The rest is `TimelineLabels`. */ timeline: { answer: string; markAnswer: (author: string) => string; automation: string; add: string; /** The visible verb, then the day, so the name keeps label-in-name. */ addOn: (verb: string, day: string) => string; /** The noun a clamped entry's disclosure shows and hides. */ whole: string; /** A day head's count of its entries. */ entries: (count: string) => string; /** The head over the entries not placed in time yet, drawn first. */ upcoming: string; /** A day head counted from a first day: the ordinal, then the day's words. */ dayOf: (ordinal: string, day: string) => string; /** The tag on today's day head. */ today: string; /** The composer's hint, also its field's name, and its verb. */ compose: string; post: string; }; /** The import act: its three steps, row verdicts, and what landed. */ intake: { unavailable: string; steps: { file: string; columns: string; preview: string; }; hint: string; unreadable: string; empty: string; /** A run with no key cannot be safely repeated. */ keyOwed: (label: string) => string; ready: (count: number) => string; refused: (count: number) => string; verdict: string; commit: string; back: string; landed: (created: number, updated: number) => string; reasons: { blank: (label: string) => string; number: (label: string, said: string) => string; date: (label: string, said: string) => string; option: (label: string, said: string) => string; }; }; record: RecordLabels; inline: { saveError: string; save: string; cancel: string; }; clarify: { otherPlaceholder: string; back: string; next: string; cancel: string; submit: string; }; chargeLines: { total: string; quantity: (label: string) => string; unitPrice: (label: string) => string; amount: (label: string) => string; }; /** The fallback name, and what the attention dot announces. */ sectionNav: SectionNavLabels; /** Where the caller names none. */ stepper: { complete: string; progress: string; }; /** A value-less `progressbar` announces this instead. */ activityIndicator: { running: string; }; checklist: { expand: string; collapse: string; }; /** The whole phrase, since word order differs by language. */ textDisclosure: { show: (label: string) => string; hide: (label: string) => string; }; /** The ⓘ trigger's name on a heading. */ sectionHeading: { info: string; }; regionState: { retry: string; }; chip: { remove: string; }; /** Each names its row: ten identical "move up" buttons are one control to a screen reader. */ reorderItem: { moveUp: (label: string | undefined) => string; moveDown: (label: string | undefined) => string; remove: (label: string | undefined) => string; }; trend: { up: string; down: string; }; breakdown: { more: (hidden: number) => string; less: string; }; /** The share and direction only; whether cheaper is good is the caller's (`deltaLabel`). */ comparisonBar: { lower: (percent: string) => string; higher: (percent: string) => string; same: string; }; /** See `deadline.ts`. 0 and 1 get words, since "0 days left" reads as broken. */ deadline: DeadlineLabels; /** See `ageingBands`. */ ageing: AgeingLabels; /** `reading="remaining"`, and the pass mark a `gate` speaks. */ /** `gateMark`: a pass mark named where it stands, when the meter's caller names it nothing. */ progress: Required & { gateMark: (mark: string) => string; }; finding: FindingLabels; /** Never colour alone. */ diff: { added: string; changed: string; removed: string; unchanged: string; }; /** A date range's words; its two ends are `range`'s. */ dateRange: Omit; gallery: GalleryLabels; /** Agnostic: the kit does not know what the source is. */ mediaPlayer: { loadFailed: string; }; /** Where there is no `name`; `MemberChip` resolves blanks through it too. */ avatar: { unknown: string; more: (count: number) => string; }; /** What "+2" announces. */ count: { more: (count: number) => string; }; memberProfile: Required; /** `BackButton`, `PopoverNavHeader`. */ nav: { back: string; }; /** `rest` names the bar a ranking's folded tail sums into. */ chart: { noData: string; total: string; rest: string; }; composer: { send: string; stop: string; }; /** The dismiss control's name and tooltip. */ overlay: { close: string; }; /** The region and tone marks, which alone carry valence. */ toast: { notifications: string; success: string; error: string; warning: string; undo: string; }; /** Apps override `hint` with accepted types. */ fileDropzone: { label: string; hint: string; drop: string; }; fileThumbnail: { remove: string; }; markdownToolbar: { /** `role="toolbar"` is name-required. */ label: string; linkUrl: string; heading1: string; heading2: string; heading3: string; bold: string; italic: string; inlineCode: string; bulletList: string; numberedList: string; quote: string; codeBlock: string; link: string; insertTable: string; divider: string; }; filesEditor: FilesEditorLabels; /** Plain `uploading` has no entry: only attention-worthy states do. */ fileUpload: { paused: string; retrying: string; failed: string; /** A dead picker ref or zero bytes. */ unavailable: string; retry: string; retryAll: string; }; /** `loading` names the lone spinner; an indeterminate `progressbar` is name-required. */ imageGallery: { empty: string; loading: string; rotateLeft: string; rotateRight: string; zoom: string; }; /** `about` names the subject where a page has several. */ infoPopover: { more: string; about: (label: string) => string; }; /** * Separate from `Sources`, which may word opening differently. `add` is the placeholder's verb: * an empty slot cannot be opened. */ fileRow: { open: (name: string) => string; add: (name: string) => string; }; sources: { open: (label: string) => string; heading: string; }; /** Named for the value they move. */ numberInput: { decrease: (label: string | undefined) => string; increase: (label: string | undefined) => string; /** Words typed into a field in a unit that read as no figure in it, then the unit's label. */ notInUnit: (typed: string, unit: string) => string; }; /** A range's two ends as they head their fields, its bounds, and the unit or currency it is typed in. */ range: { from: string; to: string; min: (label: string) => string; max: (label: string) => string; unit: (label: string) => string; currency: (label: string) => string; }; matrix: { total: string; less: string; more: string; }; markdown: { copyTable: string; copied: string; }; /** `FollowScroll showJumpToLatest`. */ scrollToBottom: { tooltip: string; }; /** `lines`: the token a search holding a pasted list stands as, by how many lines it holds. */ textInputField: { clear: string; lines: (count: number) => string; }; /** * `tools` localizes platform tool labels for every app; unknown names are prettified and * `labelForCall` overrides. */ agentRun: { starting: string; thinking: string; thinkingStreaming: string; input: string; error: string; output: string; awaiting: string; retry: string; stop: string; tools: Record; }; /** When no step names itself. */ agentProgress: { working: string; done: string; stopped: string; }; /** `CaptureSources`, `RecordingRun`, `Recording`. */ recording: { microphone: string; microphoneHint: string; systemSound: string; systemSoundHint: string; screen: string; screenHint: string; nothingToTranscribe: string; shareHint: string; videoQuality: string; original: string; language: string; autoDetect: string; otherSide: string; you: string; shareAudioMissing: string; silent: string; keepRecording: string; stop: string; /** The strip already says what records. */ stopShort: string; recordingNow: string; minimize: string; expand: string; processing: string; slow: string; transcriptionFailed: string; filingFailed: string; retry: string; discard: string; /** It deletes the only copy. */ discardQuestion: string; /** Verb and noun. */ discardConfirm: string; download: string; interrupted: string; /** A duration in words: a clock in a sentence reads as a time of day. */ kept: (length: string) => string; reshare: string; cannotResume: string; finalize: string; resume: string; screenRecording: string; audioRecording: string; /** The pack spells units, so twelve seconds is not "1 minute". */ length: (hours: number, minutes: number, seconds: number) => string; player: string; transcript: string; }; /** Answers `AgentRun`'s read-only `awaiting` row. */ approvalPrompt: { message: string; approve: string; deny: string; }; messageActions: { /** `role="toolbar"` is name-required. */ label: string; copy: string; copied: string; regenerate: string; edit: string; previousVersion: string; nextVersion: string; }; /** What is copied is a per-instance `label`; `failed` is the one thing a reader acts on. */ copyButton: { copy: string; copied: string; failed: string; }; /** * `withSubject` builds the whole phrase, so the pack picks word order, joining with a word since * screen readers drop punctuation. */ commentsButton: { comment: string; comments: string; withSubject: (counted: string, subject: string) => string; }; } /** A record's words: what an empty reading says, and a door named by where it goes. */ export interface RecordLabels { none: string; /** Names the destination: four "Open" controls cannot be told apart. */ open: (name: string) => string; } /** Every component's default lives here, documented and overridable. */ export declare const en: LoticsLocale; /** One canonical translation for every app and the frontend. */ export declare const vi: LoticsLocale; /** The last mounted provider's pack, else `en`. */ export declare function getLoticsLocale(): LoticsLocale; interface LoticsLocaleProviderProps { /** A shipped pack (`import { vi } from "@lotics/ui/locale"`) or your own. */ locale: LoticsLocale; children: ReactNode; } /** Wrap the root once; per-instance labels still override; without a provider, English applies. */ export declare function LoticsLocaleProvider(props: LoticsLocaleProviderProps): import("react").JSX.Element; export declare function useLoticsLocale(): LoticsLocale; /** An explicit `locale` wins, else {@link LoticsLocale.bcp47}. */ export declare function resolveLocaleTag(locale: LoticsLocale, explicit?: string): string; /** So the `vi` pack yields dd/MM/yyyy and Vietnamese names with no per-instance prop. */ export declare function useLocaleTag(explicit?: string): string; /** * `formatDate` bound to the pack's tag and {@link LoticsLocale.zone}, so instants date where the * workspace is. */ export declare function useFormatDate(explicit?: string): (value: Date | string | null | undefined, options?: Omit) => string; export interface CalendarDay { /** `yyyy-MM-dd` (`calendarDay`). */ of: (value: string) => string | null; /** As `daysUntil` takes it. */ today: (now?: Date) => Date; /** A stored value's moment on the workspace's clock (`zonedMoment`), as `countdownAt` takes it. */ moment: (value: string) => Date | null; /** Now on the workspace's clock (`zonedNow`), what `moment` is counted against. */ now: (now?: Date) => Date; } /** Every "which day", "today" and "how long until" a component draws reads here. */ export declare function useCalendarDay(): CalendarDay; /** One fraction digit, read against its mark. A figure in a row keeps locale precision. */ export declare const PLOTTED_FIGURE: Intl.NumberFormatOptions; /** * Grouped by the pack's tag, not the browser's: a module-level formatter printed `2,000.5` beside * `2.000,5`. A caller's formatter still wins. */ export declare function useNumberFormat(options?: Intl.NumberFormatOptions): (value: number) => string; export {};