/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { RGB } from "./paint"; import type { DrawnItem, DrawnLink, DrawnNet, DrawnZone, SchematicDrawn } from "./drawn"; import type { SchematicLayerValue } from "./layers"; /** * An entity's colour roles, as the recipe's chain takes them from its data * attributes: its surface (whose ground colour is the last resort), its * colour token, its tone, its status's tone and its pattern's tone. */ export interface SchematicTint { /** `item`, `zone` or `link` (a net's too): what its tone's `muted` and its ground are. */ readonly surface: "item" | "zone" | "link"; /** A theme colour token (`status.warn`, `heat.3`): drawn when the theme holds it, else its tone. */ readonly color?: string | undefined; /** Its tone: brand, ink, muted, success, warning or danger. */ readonly tone?: string | undefined; /** Its status's tone: success, warning, danger, info or neutral. */ readonly status?: string | undefined; /** A zone's pattern's tone. */ readonly pattern?: string | undefined; } /** * An item's colour roles: its colour token, its tone, its status's — the * colour of its card's dot, its markers and its footprint. * * @param item - The item, as the canvas draws it * @returns Its colour roles */ export declare function itemTint(item: DrawnItem): SchematicTint; /** * A zone's colour roles: its colour token, its tone, its pattern's tone — muted * when its pattern names none (§4.2). * * @param zone - The zone, as the canvas draws it * @returns Its colour roles */ export declare function zoneTint(zone: DrawnZone): SchematicTint; /** * A link's or a net's colour roles: its style's tone (#1403). A style naming * none has no colour of its own: it draws in the shared links look's muted ink, * as the Plan's and the Allocation's links do. * * @param edge - The link or the net, as the canvas draws it * @returns Its colour roles; `undefined` for a style naming no tone */ export declare function edgeTint(edge: DrawnLink | DrawnNet): SchematicTint | undefined; /** * A layer's swatch's colour roles, in the library's Layers tab (#1389, §8): * its colour token, else its tone, else an item's ground. * * @param layer - The layer * @returns Its colour roles */ export declare function layerTint(layer: SchematicLayerValue): SchematicTint; /** * The key a colour is resolved under: its roles, each in its place. * * @param tint - The colour roles * @returns Its key */ export declare function tintKey(tint: SchematicTint): string; /** * The data attributes the recipe's chain reads a colour from: what the * probe's element and an item's card dot carry. * * @param tint - The colour roles * @returns The attributes, each only when its role is given */ export declare function tintAttributes(tint: SchematicTint): Readonly>; /** Every colour a drawing draws its entities in, and each entity's. */ export interface SchematicTints { /** Each colour, by its key, in the order the drawing first names it. */ readonly specs: ReadonlyMap; /** Each entity's colour's key, by the entity's id. */ readonly byEntity: ReadonlyMap; /** The colours' keys, in order: equal whenever the drawing names the same colours. */ readonly signature: string; } /** * Every colour a drawing draws its entities in (see the module docs). * * @param drawn - What the canvas draws * @returns The colours, and each entity's */ export declare function tintsOf(drawn: SchematicDrawn): SchematicTints; /** * Each entity's colour, resolved: its colour's RGB, by the entity's id. * * @param byEntity - Each entity's colour's key, by its id * @param resolved - Each colour's RGB, by its key, as the bridge read it * @returns Each entity's RGB; an entity whose colour was not read is left out, and draws its kind's ground */ export declare function entityTints(byEntity: ReadonlyMap, resolved: ReadonlyMap): Map; //# sourceMappingURL=tints.d.ts.map