/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type FlowchartDetailsModel, type FlowchartKindDetails, type FlowchartTagColors, type FlowchartTextMeasure } from "./details.js"; import type { FlowchartWords } from "./messages.js"; /** A tag's look (R30), as the canvas, the legend and the inspector draw it. */ export type FlowchartTagLook = /** Subtle in a palette: a 6% wash of it on a 1px rule of it, in its text step. */ { readonly look: "wash"; readonly palette: string; } /** Gray, neutral, or no definition: `--paper-3` on a 1px `--rule`. */ | { readonly look: "neutral"; } /** Any other variant: the Tag recipe's, in its definition's palette. */ | { readonly look: "recipe"; readonly palette: string; readonly variant: string; }; /** * A tag's look (R30): its definition's โ€” the first naming it โ€” else neutral. * * @param colors - The read's looks * @param tag - The tag * @returns Its look */ export declare function tagLookOf(colors: FlowchartTagColors, tag: string): FlowchartTagLook; /** What a legend row's mark draws: a figure's `123`, bars, a list's lines and shares, or a label's badge and its lines. */ export type FlowchartLegendMark = "figure" | "bars" | "lines" | "label"; /** One row the legend adds for a read the cards and labels draw (R31). */ export interface FlowchartLegendRead { /** Its kind and its place in the details: what keys it. */ readonly key: string; /** Its mark. */ readonly mark: FlowchartLegendMark; /** Its words: the read's label, and what it shows. */ readonly text: string; } /** One tag a legend's group lists: the tag, and its look. */ export interface FlowchartLegendTag { readonly tag: string; readonly look: FlowchartTagLook; } /** One group of tags beside the legend's rows (R31): a tag list's label, then its defined tags the cards show. */ export interface FlowchartLegendGroup { /** Its read's place in the states' details: what keys it. */ readonly key: string; /** The read's label. */ readonly label: string; /** Its tags, in the order defined: none while no card shows one. */ readonly tags: readonly FlowchartLegendTag[]; } /** What the legend adds of the details: its rows, and its groups of tags. */ export interface FlowchartLegend { readonly reads: readonly FlowchartLegendRead[]; readonly groups: readonly FlowchartLegendGroup[]; } /** No details on the canvas: the legend draws today's rows alone. */ export declare const NO_LEGEND: FlowchartLegend; /** * What the legend adds of the details (R31; see the module docs): its rows for * the reads the cards and labels draw, and its groups of tags. * * @param details - The details model * @param words - The flowchart's words * @returns The legend's reads and groups */ export declare function legendOf(details: FlowchartDetailsModel, words: FlowchartWords): FlowchartLegend; /** What a group's tags wrap across: the visual spec's. */ export declare const LEGEND_GROUP_W = 236; /** * The legend's height (ยง4; see the module docs): what the layout keeps under * the drawing for it. * * @param legend - What it adds of the details * @param measure - How wide a tag draws * @returns Its height, in px, a whole number */ export declare function legendHeight(legend: FlowchartLegend, measure: FlowchartTextMeasure): number; /** The words a card draws that the canvas measures: its tag lists' labels, and their tags with every +n they may end in. */ export interface FlowchartProbeTexts { readonly labels: readonly string[]; readonly tags: readonly string[]; } /** Nothing to measure. */ export declare const NO_PROBE: FlowchartProbeTexts; /** * The words the canvas measures as a card draws them (#1510): each tag list's * label on the cards, each tag a landed row holds there, and each +n a list of * them may end in โ€” so a card is measured before the layout places it. * * @param kind - The states' details * @param words - The flowchart's words: a +n's * @returns The labels and the tags, each once */ export declare function probeTextsOf(kind: FlowchartKindDetails | undefined, words: FlowchartWords): FlowchartProbeTexts; //# sourceMappingURL=details-draw.d.ts.map