/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. * * Words the schedule builders share (#1424): a kind's name in the plural, * a count and what it counts, words joined as English lists them, what a figure says of the kinds it * does not count — the Plan's footer and the Calendar's counts alike, a kind * past the cap counted none of, never 0 — and the hidden pick's words for a * row the rail's narrowing hides (`hidden.ts`): what a builder's message table * gives its line ({@link HiddenWords}) and their English — hidden by the * choices, or dimmed by them where the narrowing draws the row as context * ({@link dimmedWords}), or not on this page, where its page's scope does not * hold what it stands on ({@link notOnPageText}) — and what a refusal says of * a kind its page's scope holds only some rows of ({@link unheldByScopeText}) * — here, with no DOM to load, so a builder's message table that says them * loads with none. * * @packageDocumentation */ /** * A word in running text: lower case, unless it is written in capitals (`QA` stays `QA`). * * @param word - The word as a heading writes it * @returns The word as a sentence writes it */ export declare function lowerWord(word: string): string; /** * A kind's name in the plural, as English makes one — `Stop` → `Stops`, * `Delivery` → `Deliveries`; a name that ends in `s` stays. * * @param name - The kind's name * @returns Its plural */ export declare function kindPlural(name: string): string; /** * A kind's name in the singular, as English reads one back from its plural * ({@link kindPlural}'s other way) — `presses` → `press`, `deliveries` → * `delivery`, `machines` → `machine`, `people` → `person` — as running text * writes it (`lowerWord`). A name with no plural ending, as a collective's is, * stays: `crew`, `staff`, `status`. What a line names one row of a kind by, * whose name is its heading (`Schedule.resources`' `name`, `Presses`). * * @param name - The kind's name, as running text writes it * @returns Its singular */ export declare function kindSingular(name: string): string; /** * A count and what it counts, as English says it: `1 issue`, `3 issues` — the * word's plural as English makes one ({@link kindPlural}): `1 breach`, * `4 breaches`. * * @param n - How many * @param word - What it counts, in the singular * @returns The words */ export declare function plural(n: number, word: string): string; /** * Words joined as English reads a list — `a`, `a or b`, `a, b or c` — `and` * in place of `or` when asked. * * @param words - The words, in order * @param last - The word before the last * @returns The list */ export declare function joinedWords(words: readonly string[], last: "or" | "and"): string; /** * What a count of events says when some kinds' events are not counted (#1039, * #1424): `13 events, print jobs not counted`; with no count of the others, * `print jobs not counted`. * * @param p - The count, `count` formatted for the locale beside its raw `n`, `undefined` when no kind's are counted; and * the names of the kinds not counted, as running text writes them * @returns The words */ export declare function eventsNotCounted(p: { n: number; count: string | undefined; kinds: readonly string[]; }): string; /** * A builder's words for a row the rail's narrowing hides, as its line says * it — its message table's, so a translation words them (the hidden pick, * `hidden.ts`' `hiddenLine`). */ export interface HiddenWords { /** Until e3 has said which choices hide it, for each source that does — `hidden by the filters`. */ readonly hiddenByFilters: () => string; /** * Once it has: the choices that hide it, each as the rail words it, and those a pick clears with them — `hidden by * Status: Ready — picking it clears that filter` ({@link hiddenByText} in English). */ readonly hiddenBy: (p: { readonly filters: readonly string[]; readonly also: readonly string[]; }) => string; /** * Of a row that stands on one its page's scope does not hold (#1621): what it stands on is not on this page — `its * crew is not on this page` — after what the viewer's choices hide of it, where they hide it too (`hidden`). A * table that words none says the shared English ({@link notOnPageText}). */ readonly notOnPage?: ((p: { readonly what: readonly string[]; readonly hidden: string | undefined; }) => string) | undefined; } /** * The English of a row the rail's narrowing hides, by the choices that do — * joined as the rail's `Replaces …` joins them — and what a pick of it clears: * `hidden by Status: Ready — picking it clears that filter`; or, of a row a * narrowing draws as context where it leaves it out (the Schematic's * `narrowed="dim"`), `dimmed by Status: Ready — …`. A builder's message table * says it so in English, and a translation in its own words. * * @param filters - The choices that hide the row, as the rail words them * @param also - The choices a pick clears with them * @param verb - What the choices do to the row: `hidden`, the default, or `dimmed`, where the narrowing draws it as context * @returns The words */ export declare function hiddenByText(filters: readonly string[], also: readonly string[], verb?: "hidden" | "dimmed"): string; /** * The English of a row that stands on one its page's scope does not hold * (#1621): `not on this page` of the row itself; `its crew is not on this * page` of what it stands on, as the builder names it; and after the choices * that hide it too, `hidden by Status: Ready — picking it clears that filter; * its crew is not on this page`. A scope is no choice of the viewer's: the * words name no filter of it, and nothing a pick clears. * * @param what - What the row stands on that the page does not hold, as running text names it; none for the row itself * @param hidden - What the viewer's choices hide of it, as its line says it ({@link hiddenByText}); `undefined` where none does * @returns The words */ export declare function notOnPageText(what: readonly string[], hidden?: string): string; /** * A builder's words for a row a narrowing draws as context where it leaves it * out (`narrowed="dim"`), as its message table holds them beside its * {@link HiddenWords}. */ export interface DimmedWords { /** Until e3 has said which choices dim it — `dimmed by the filters`. */ readonly dimmedByFilters: HiddenWords["hiddenByFilters"]; /** Once it has: the choices that dim it, and those a pick clears with them — `dimmed by Status: Ready — …`. */ readonly dimmedBy: HiddenWords["hiddenBy"]; } /** * The words a line names the choices that leave a row out in, where the * narrowing draws what it leaves out as context (`narrowed="dim"`): they dim * it, never hide it. What a builder that dims gives the hidden pick's line * (`hidden.ts`' `hiddenLine`) in place of its hidden words. * * @param m - The builder's message table * @returns Its dimmed words, as the hidden pick's line takes them */ export declare function dimmedWords(m: DimmedWords): HiddenWords; /** * Why a row isn't changed where a kind that may name it is one its page's * scope holds only some rows of (#1621), as a builder's refusal says it after * the row's name: `this page holds only some transitions, and one it does not * may name it — edit it where they are all held`. A scope is no choice of the * viewer's, so the words name no Clear: they say where the edit can be made. * * @param kinds - The kind's name in the plural, as running text writes it * @returns The clause */ export declare function unheldByScopeText(kinds: string): string; //# sourceMappingURL=words.d.ts.map