/** * JSON (`@startjson`) and YAML (`@startyaml`) data diagrams: nested objects * and arrays as linked tables, with `#highlight` paths. * @module diagrams/data */ export type Value = import("./yaml.mjs").YamlValue; export type RichLayout = import("../../layout/measure.mjs").RichLayout; export type Table = { rows: { key: RichLayout | null; value: RichLayout | null; child: Table | null; highlight: boolean; }[]; x: number; y: number; w: number; h: number; keyW: number; highlight: boolean; }; /** @typedef {import("./yaml.mjs").YamlValue} Value */ /** @typedef {import("../../layout/measure.mjs").RichLayout} RichLayout */ /** * @typedef {object} Table * @property {{ key: RichLayout | null, value: RichLayout | null, child: Table | null, highlight: boolean }[]} rows * @property {number} x * @property {number} y * @property {number} w * @property {number} h * @property {number} keyW * @property {boolean} highlight */ /** * Split the data from leading `#highlight` and common commands. * @param {import("../../core/source.mjs").SourceLine[]} lines * @param {"json" | "yaml"} format */ declare function parseData(lines: import("../../core/source.mjs").SourceLine[], format: "json" | "yaml"): { meta: import("../../syntax/commons.mjs").DiagramMeta; data: import("./yaml.mjs").YamlValue; highlights: string[][]; }; /** * @param {ReturnType} model * @param {import("../../core/registry.mjs").ModuleContext} ctx */ declare function layoutData(model: ReturnType, ctx: import("../../core/registry.mjs").ModuleContext): { root: Table; fs: number; }; /** * @param {ReturnType} laid * @param {import("../../draw/canvas.mjs").Canvas} c */ declare function drawData(laid: ReturnType, c: import("../../draw/canvas.mjs").Canvas): void; export declare const jsonDiagram: Readonly<{ kind: string; title: string; starts: string[]; raw: true; parse: (lines: import("../../core/source.mjs").SourceLine[]) => { meta: import("../../syntax/commons.mjs").DiagramMeta; data: import("./yaml.mjs").YamlValue; highlights: string[][]; }; layout: typeof layoutData; draw: typeof drawData; }>; export declare const yamlDiagram: Readonly<{ kind: string; title: string; starts: string[]; raw: true; parse: (lines: import("../../core/source.mjs").SourceLine[]) => { meta: import("../../syntax/commons.mjs").DiagramMeta; data: import("./yaml.mjs").YamlValue; highlights: string[][]; }; layout: typeof layoutData; draw: typeof drawData; }>; export {};