/** * 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 { LoadingLineText } from "@elaraai/east-ui-components/internal"; import { type PagedLoadingMessages } from "../shared/loading.js"; import { type HiddenWords } from "../shared/schedule/words.js"; import type { SchematicValue } from "./data.js"; import type { SchematicIssueWord } from "./issues.js"; import type { SchematicTool } from "./tools.js"; /** The app's words for what the Schematic draws, as the payload carries them. */ export type SchematicVocabulary = SchematicValue["vocabulary"]; /** A count as a message takes it: the number, for its plural, and the number as the locale prints it. */ export interface SchematicCount { /** The number. */ readonly n: number; /** The number, printed in the app's locale. */ readonly count: string; } /** A side of a net as its name lists it: its first members' names, and how many more it holds past them. */ export interface SchematicMembers { /** The first members' names, in the side's order. */ readonly names: readonly string[]; /** How many more members the side holds; `undefined` where the names are all of them. */ readonly more: SchematicCount | undefined; } /** * The Schematic's message table: its own words, the footer's loading line's over a kind's rows (`PagedLoadingMessages`), * and what Find's line and an issue's line say of a row the rail's filters hide (`HiddenWords`) — and Find's of one a * dimmed narrowing draws as context (`dimmedByFilters`, `dimmedBy`). */ export interface SchematicMessages extends PagedLoadingMessages, HiddenWords { /** The frame's accessible name, and what its skeleton is the loading of. */ frameLabel: () => string; /** What the footer's loading line names a read of the drawing as a whole that failed — `Couldn't read the drawing`. */ drawingNoun: () => string; /** A kind's window's rows read, the drawing in view standing meanwhile (#1398, CL3) — `Loading racks in view`. */ lineInView: (p: { noun: string; }) => LoadingLineText; /** A kind's density's counts read — `Loading counts`. */ lineCounts: () => LoadingLineText; /** A kind's rows' details read, its rows drawn meanwhile — `Loading details for 12 racks`, the count strong; `noun` is one row's or several's, by `n`. */ lineDetails: (p: SchematicCount & { noun: string; }) => LoadingLineText; /** A kind's window whose read failed — `Couldn't read racks in view`. */ lineFailedInView: (p: { noun: string; }) => LoadingLineText; /** What the canvas says at the top-left of an area whose read failed, beside its Retry (CL11) — `Couldn't read this area`. */ areaFailed: () => string; /** The canvas's accessible name: what it is, and what its keys do. */ canvasLabel: () => string; /** The minimap's line under the pointer: what a press on it does. */ minimapHint: () => string; /** The tools' strip's accessible name. */ toolsLabel: () => string; /** A tool's name: its segment's word, and its accessible name. */ toolName: (p: { tool: SchematicTool; }) => string; /** A tool's line under the pointer: what it does, and the key that holds it. */ toolHint: (p: { tool: SchematicTool; }) => string; /** Connect's menu's accessible name: the link kind it draws. */ connectDraws: () => string; /** Connect drawing a link kind, as the folded tools' menu lists it — `Connect · Fibre run`. */ connectKind: (p: { name: string; }) => string; /** The zoom's group's accessible name. */ zoomLabel: () => string; /** Zoom out. */ zoomOut: () => string; /** Zoom in. */ zoomIn: () => string; /** Fit: the whole drawing in view. */ fit: () => string; /** Find's placeholder, its icon's accessible name and its popover's head. */ findLabel: () => string; /** What Find says when a query finds nothing. */ findNoMatches: () => string; /** * What keeps an item Find found off the canvas, at its line's end (#1404): its layer is hidden; it has no position. One * the rail's filters leave out says which of them do: they hide it (`hiddenByFilters`, `hiddenBy`), or, where the * narrowing draws what it leaves out as context, dim it (`dimmedByFilters`, `dimmedBy`). */ findMark: (p: { mark: "layer" | "unplaced"; }) => string; /** What the footer says of an item a Find's pick landed on that the canvas doesn't show as itself — `A04 is on a hidden layer`. */ foundOff: (p: { item: string; mark: "layer" | "unplaced"; }) => string; /** The View popover's name: a phone's row's tools, zoom, Fit and Find. */ viewLabel: () => string; /** The steps' group's accessible name. */ stepLabel: () => string; /** The step to the previous item. */ previousItem: () => string; /** The step to the next item. */ nextItem: () => string; /** * What the footer says of a kind drawn as its density in place of items (#1393, D25) — `Density: 20,000 racks — zoom * in to draw them`: how many rows it shades in the view, `about` that many where the count is an estimate, and * `unfiltered` where the filters the index doesn't lead are not applied to it; `name` is the kind's, as running text * writes it. */ densityNotice: (p: SchematicCount & { name: string; about: boolean; unfiltered: boolean; }) => string; /** What the rail counts a templates list's source in — `rack templates`: `name` is its kind's, as running text writes it. */ templatesNoun: (p: { name: string; }) => string; /** A failed read's Retry, which reads it again. */ retry: () => string; /** * What a Save's notice counts a kind's rows in, a row or several (`RecordSliceSaveNotice`): `name` is the * kind's, as running text writes it — `rack`, `racks`. */ kindNoun: (p: { name: string; plural: boolean; }) => string; /** A kind's details' session, as its banners are titled — `Rack details`. */ detailsName: (p: { name: string; }) => string; /** * Why a connection's draft doesn't snap: its kind's end — `start` a link's from or a net's sources, `end` a * link's to or a net's destinations — holds no item of the target's kind: `Fibre run can't end at PDU-A`. */ endRefused: (p: { kind: string; end: "start" | "end"; item: string; }) => string; /** Why a Delete was refused: a link or a net bound read only names an item it would delete. */ deleteRefused: (p: { item: string; kind: string; key: string; }) => string; /** * Why a connection's draft doesn't snap, or a gesture names no item, where the item is held under a placeholder, its * key still to be typed (#1549) — `Type the new rack's key first`: `kind` is its kind's name, as running text writes it. */ placeholderRefused: (p: { kind: string; }) => string; /** * Why a kind adds no row (#1549) — on a template's card, a drop's ghost and the footer: `Racks are keyed by Blob, * which can't be typed — give the kind `key` to add them`; `name` is the kind's, as running text writes it, `type` its * key type's name. */ keysUntyped: (p: { name: string; type: string; }) => string; /** * A new row held under a placeholder, its key still to be typed (#1549) — `Type this rack's key: Save waits for it`; * `name` is its kind's, as running text writes it. */ keyPlaceholder: (p: { name: string; }) => string; /** * Why a gesture records nothing (#1549), in the footer — `A fibre run A01 → ODF-1 is there already`, `A01 isn't changed: * the filters hide some fibre runs that may name it — clear them, then try again` (#1580), `A01 isn't changed: this page * holds only some fibre runs, and one it does not may name it — edit it where they are all held` (#1621), `A01 isn't * changed: the fibre runs naming it take no edit now — try again in a moment` (#1584). */ keyRefused: (p: SchematicKeyRefusalWord) => string; /** A gesture's label in the history: what it did, and to how many. */ step: (p: { step: SchematicStep; name: string; n: number; }) => string; /** The library pane's name, on its rail and its head (#1389). */ libraryPane: () => string; /** A tab of the library's own, by its name: `Templates`, `Backlog`, `Index`, `Layers`. */ libraryTab: (p: { tab: Exclude; }) => string; /** What a tab counts its cards as, one or several: a template, an item, a zone, a layer; an author's tab's a card. */ libraryNoun: (p: { tab: SchematicLibraryTabWord; n: number; }) => string; /** What an empty tab says: `No templates`; an author's tab, `Nothing in `. */ libraryEmpty: (p: { tab: SchematicLibraryTabWord; name: string; }) => string; /** The line under an empty tab's words. */ libraryEmptyHint: (p: { tab: SchematicLibraryTabWord; name: string; }) => string; /** What a tab the rail leaves no card says: `No templates match the filters`; `name` is an author's tab's, as running text writes it. */ libraryNarrowed: (p: { tab: SchematicLibraryTabWord; name: string; }) => string; /** The line under it. */ libraryNarrowedHint: (p: { tab: SchematicLibraryTabWord; name: string; }) => string; /** The cards' grouping's name. */ libraryGroupBy: () => string; /** A template's group: its kind's name, then the template's own group — `Rack · Half racks`. */ templateGroup: (p: { kind: string; group: string | undefined; }) => string; /** A Backlog card's line: its kind's name, then the item's second line — `Rack · 48U · 12 kW`. */ backlogLine: (p: { kind: string; sublabel: string | undefined; }) => string; /** The Index's search: its placeholder and its accessible name. */ indexSearch: () => string; /** What the Index says when its search keeps no item: `No items match "A9"`. */ indexNoMatch: (p: { query: string; }) => string; /** A zone's chevron: what a press on it does. */ indexToggle: (p: { zone: string; open: boolean; }) => string; /** A zone's count of the items it holds — `4 items` — as a reader hears it. */ indexCount: (p: SchematicCount) => string; /** * What the Index says of an open zone holding more items of a kind read by area than a window reads (#1393, D52) — * `Hall 3 holds more than 20,000 racks: search to find one`; `name` is the kind's, as running text writes it. */ indexCrowded: (p: SchematicCount & { zone: string; name: string; }) => string; /** What the Index says of the matches its search holds past those it lists (#1393, D52) — `12 more match: type more to find them`. */ indexMore: (p: SchematicCount) => string; /** The Layers tab's Show all: every layer shown, the isolation ended. */ layersShowAll: () => string; /** A layer's Show or Hide. */ layerShow: (p: { layer: string; shown: boolean; }) => string; /** A layer's Isolate: alone, or ending it. */ layerIsolate: (p: { layer: string; isolated: boolean; }) => string; /** A layer's Lock. */ layerLock: (p: { layer: string; locked: boolean; }) => string; /** A layer's count of the entities on it — `12 entities` — as a reader hears it. */ layerCount: (p: SchematicCount) => string; /** The banner over a source the library follows whose narrowing could not be read — `Rack templates results unavailable`. */ sourceUnavailable: (p: { name: string; }) => string; /** A followed source's results moved while they were read. */ sourceChanged: (p: { name: string; }) => string; /** A followed source's results could not be read. */ sourceFailed: (p: { name: string; }) => string; /** * Where a card dropped at a point lands, as the ghost says it and the history names its drop (#1390): the zone * holding the point, if one does, and the point as the drawing's scale unit measures it — `Cage A · 6.04, 2.91 m`. */ dropAt: (p: { zone: string | undefined; x: string; y: string; unit: string | undefined; }) => string; /** What a card dropped on an entity lands on, as the ghost says it — `onto A03`; `name` is the entity's. */ dropOnto: (p: { name: string; }) => string; /** A link, as the Schematic names it — its inspector's head and rail, a drop's words, an issue's row — by its ends' items: `A01 → ODF-1`. */ linkEnds: (p: { from: string; to: string; }) => string; /** A net with no label of its own, as the Schematic names it: its sources, then its destinations — `A03 → CORE-1, ODF-1`, `A01, A02, A03 and 17 more → ODF-1`. */ netEnds: (p: { sources: SchematicMembers; destinations: SchematicMembers; }) => string; /** The entities of a kind a card's ⏎ drops on, several of them — `3 racks`; `name` is the kind's, as running text writes it. */ dropMany: (p: SchematicCount & { name: string; }) => string; /** Why a drop is refused where the drag rests: red under the ghost, and for a card's ⏎ and Details' Place in the footer. */ dropRefused: (p: SchematicDropRefusalWord) => string; /** Where a drag that lands nowhere rests, as a screen reader hears it. */ dropCanvas: () => string; /** * A drop's step in the history, and its Save's — `Drop 42U rack · 8 kW at Cage A · 6.04, 2.91 m`, `Drop Uplink · * 100G on A01 → ODF-1`: `where` is where it lands, and `onto` whether that is an entity. */ dropLabel: (p: { card: string; where: string; onto: boolean; }) => string; /** The inspector pane's name, on its rail and its head (#1391). */ inspectorPane: () => string; /** The inspector's tabs: `Details`, `Issues`. */ inspectorTab: (p: { tab: "details" | "issues"; }) => string; /** What nothing selected shows, in its head's eyebrow: the drawing. */ inspectorDrawing: () => string; /** * A section of Details, under its head — `Rack`, `Rack details`, `Position`, `Joined to`, `Ends`, `Sides`, `Member`, and below 480px of * main `Connect to` (#1394): `name` is the kind's. */ inspectorSection: (p: { section: SchematicInspectorSection; name: string; }) => string; /** * A field of Details' own — an item's `x` and `y`, a link's ends, a net's sides, Connect to…'s link kind (#1394), and a * new item's key while it waits under a placeholder (#1549). */ inspectorField: (p: { field: "x" | "y" | "from" | "to" | "sources" | "destinations" | "kind" | "key"; }) => string; /** The line under a new item's key field, while it waits under a placeholder (#1549). */ inspectorKeyHelp: () => string; /** The line under a new item's key of several parts — a struct's fields, a variant's case and its value (#1581). */ inspectorKeyPartsHelp: () => string; /** A key of several parts' Set, which takes it whole (#1581). */ inspectorKeySet: () => string; /** Why a key typed in the inspector is refused, in the footer (#1549) — `A rack is keyed 2026-11-07T06:00:00.000 already`; `name` as running text writes it. */ inspectorKeyRefused: (p: { name: string; key: string; }) => string; /** A gesture's button: Delete, Unplace, Remove, and below 480px of main an item with no position's Place (#1394). */ inspectorAction: (p: { action: "delete" | "unplace" | "remove" | "place"; }) => string; /** What an item with no position says under its name, below 480px of main (#1394) — `Not placed`. */ inspectorUnplaced: () => string; /** An item's place, under its name: the zone holding it, if one does, and its centre — `Cage A · 9.60, 2.90 m`. */ inspectorAt: (p: { zone: string | undefined; x: string; y: string; unit: string | undefined; }) => string; /** A zone's size, under its name — `19.60 × 4.60 m`. */ inspectorSize: (p: { width: string; height: string; unit: string | undefined; }) => string; /** A net's sides, under its name — `2 sources → 3 destinations`. */ inspectorSides: (p: { sources: SchematicCount; destinations: SchematicCount; }) => string; /** Which side a net's leg is on, under its name — `Source leg`, `Destination leg`. */ inspectorLeg: (p: { end: "source" | "destination"; }) => string; /** Several selected, in their head — `4 selected`. */ inspectorSeveral: (p: SchematicCount) => string; /** What the drawing's Details counts, under a count — `Zones`, `Links`, `Nets`, one or several. */ inspectorCount: (p: { what: "zones" | "links" | "nets"; n: number; }) => string; /** * What the drawing's Details says of the counts no read can say (#1393) — `Links not counted: what they join is read as * the view moves`: `names` are the counts' own, as running text writes them in the plural (`racks`, `links`), and `why` * a hidden layer that may hold some of a kind read by area's rows, the items a link or a net joins read as the view * moves, or filters that can't count a kind's rows with no position. */ inspectorNotCounted: (p: { names: readonly string[]; why: "layer" | "ends" | "filters"; }) => string; /** How many of a kind are selected — `3 racks`: `name` is the kind's, as running text writes it. */ inspectorKindCount: (p: SchematicCount & { name: string; }) => string; /** A row the record holds none of: an entity whose row is gone. */ inspectorNoRow: () => string; /** An item whose details record holds no row of it. */ inspectorNoDetails: (p: { name: string; }) => string; /** What a link or a net Details lists an item joined to is, under its name: its kind, and for a net the item's side. */ inspectorJoin: (p: { kind: string; end: "source" | "destination" | undefined; }) => string; /** A record's last save in the drawing's Details — `Rack saved 14:02 by alice`, or `Rack saved 14:02` where it names no one: `when` is its time today, else its date and time. */ inspectorSaved: (p: { name: string; when: string; by: string | undefined; }) => string; /** * An edit's step in the history — `Edit A03`, `Unplace A06`, `Delete A03`, `Remove A05 from PDU-B · A side`, and a new * item's key typed (#1549), `Type A03's key`. */ inspectorStep: (p: { edit: "edit" | "unplace" | "delete" | "remove" | "key"; name: string; from?: string; }) => string; /** Why a net's side can't be emptied in its tags: a Delete takes the net. */ inspectorSideEmpty: (p: { side: "sources" | "destinations"; }) => string; /** What an issue names, in its row — `Rack · A03`; a layer's when `kind` is `undefined`. */ issueWhere: (p: { kind: string | undefined; name: string; }) => string; /** What an issue says. */ issueText: (p: SchematicIssueWord) => string; /** What Issues says with none: its head and the line under it. */ inspectorNoIssues: (p: { part: "title" | "hint"; }) => string; /** * What Issues says of the kinds read by area, whose rows it checks only as the view reads them (ruled 27 Oct 2026) — * `Racks out of view are checked only as the view reaches them`: `names` are the kinds', as running text writes them * in the plural. */ inspectorUnchecked: (p: { names: readonly string[]; }) => string; /** * What Find's line says of an item the rail's filters leave out where the narrowing draws what it leaves out as * context (`narrowed="dim"`), until e3 has said which choices do — `dimmed by the filters`: `hiddenByFilters`' words * for a narrowing that hides. */ dimmedByFilters: HiddenWords["hiddenByFilters"]; /** * What it says once e3 has: the choices that dim it, each as the rail words it, and those a pick clears with them — * `dimmed by Owner: Harbour Labs — picking it clears that filter` (`hiddenByText` with `dimmed`): `hiddenBy`'s for a * narrowing that hides. */ dimmedBy: HiddenWords["hiddenBy"]; /** * What the footer says where a pick of a row the rail's filters hide — Find's, or Go to issue's on an unsaved change * waiting in its session — could not clear the choices hiding it, and the rail gave no words of its own. */ hiddenUncleared: () => string; } /** A section of the inspector's Details, as its head names it. */ export type SchematicInspectorSection = "fields" | "details" | "position" | "joins" | "ends" | "sides" | "member" | "connect"; /** * Why a drop is refused, as its words say it (#1390): outside the drawing; the * view's centre, where a card's ⏎ and Details' Place land, off the drawing * (#1394), which no pointer moves; no entity of the card's kind under the * drag; its kind read only; its kind's session taking no edit now; or its kind * adding no item, its keys of a type the form can't type, by the type's name * (#1549) — `kind` is the kind's name, as running text writes it. */ export type SchematicDropRefusalWord = { readonly why: "outside"; } | { readonly why: "offView"; } | { readonly why: "onto" | "readOnly" | "busy"; readonly kind: string; } | { readonly why: "untyped"; readonly kind: string; readonly type: string; }; /** * Why a gesture records nothing (#1549), as the footer says it: the row holding * the key a row builds, by its kind's name and its own, as running text writes * them; a kind adding no row, its keys of a type the form can't type; an item * whose key would move, by its name, while some rows of a link or net kind that * may name it — by its name, as running text writes it — the filters hide, * aren't read (#1580) or lie beyond the page's scope (#1621), or those naming it * take no edit now (#1584); or a row whose key would move while its kind's * details take no edit now (#1584). */ export type SchematicKeyRefusalWord = { readonly refusal: "taken"; readonly kind: string; readonly name: string; } | { readonly refusal: "untyped"; readonly kind: string; readonly type: string; } | { readonly refusal: "unheld"; readonly name: string; readonly kind: string; readonly why: "filtered" | "scoped" | "unread" | "busy"; } | { readonly refusal: "details"; readonly name: string; readonly kind: string; }; /** A tab of the library, as its words name it: its own, or an author's (`tab`). */ export type SchematicLibraryTabWord = "templates" | "backlog" | "index" | "layers" | "tab"; /** A gesture, as the history labels its step. */ export type SchematicStep = "move" | "connect" | "net" | "retarget" | "extend" | "delete"; /** * The English table, in the app's words for what the Schematic draws (#1516). * * @param v - The app's words * @returns The table */ export declare function schematicMessagesOf(v: SchematicVocabulary): SchematicMessages; /** The English table, in the Schematic's own words. */ export declare const schematicMessages: SchematicMessages; /** The words a Schematic speaks: its message table, and its locale's formatters. */ export interface SchematicWords extends Formatters { /** The message table in effect. */ readonly m: SchematicMessages; } /** * A coordinate or a length as the Schematic prints it, to the centimetre: * Details' position and size, and a conflict's card. * * @param n - The value, in the drawing's unit * @param words - The words * @returns Its text, in the locale */ export declare function coordinate(n: number, words: SchematicWords): string; //# sourceMappingURL=messages.d.ts.map