import { PatchAST, Connection, LayoutResult, NodeLayout, Side } from './types.js'; import { PatchConfig } from './config.js'; export declare const BOX_W = 144; export declare const BOX_H = 81; export declare const BAND_STEP_H = 5; export declare const BAND_STEP_V: number; export declare const CORNER_R_OUTER = 12; export declare const CORNER_R_INNER = 4; export declare const TAB_D = 24; export declare const TAB_L: number; export declare const LAYER_GAP = 17; export declare const NODE_GAP = 16; export declare const SVG_PAD = 40; export declare const STUB = 36; export declare const DANGLING_LEN = 60; export declare const FACE_PORT_SPREAD: number; export declare const SIDE_DIR: Record; /** * Returns SVG path data for a rectangle with: * top-right corner — quadratic bezier arc (radius r) * bottom-left corner — quadratic bezier arc (radius r) * top-left, bottom-right — sharp right angles * Winding is clockwise so the interior fills with the default fill-rule. * * Used by the renderer to build each banded-frame layer for the node box. * The corner radius `r` should decrease with each inner layer so that nested * arcs create a smooth graduated transition at the rounded corners. */ export declare function mixedCornerRect(x: number, y: number, w: number, h: number, r: number): string; /** * Returns SVG path data for one band layer of a port tab in canonical orientation: * Width = tl (horizontal), Height = td (vertical) * Open/attachment side = bottom (y = td) * Outer/thick edge = right (BAND_STEP_H per band) * Thin edges = left and top (BAND_STEP_V per band) * * The path traces the outer boundary clockwise, then the inner boundary * counter-clockwise (same approach as mixedCornerRect nested layers). * * Arc radii: * Top-right corner (thin-top → thick-right): rTR_outer / rTR_inner * Follow the same radius progression as the node-box band layers: * rTR = CORNER_R_OUTER - i * rStep, rTR_inner = CORNER_R_OUTER - (i+1)*rStep * Top-left corner (thin-left ↔ thin-top): rTL_outer / rTL_inner * rTL = CORNER_R_OUTER - outerV (so arc centre at (outerV, outerV) has * effective radius CORNER_R_OUTER, keeping band width constant around corner) * * @param tl - tab length (canonical width, = TAB_L) * @param td - tab depth (canonical height, = TAB_D) * @param outerH - right inset of outer boundary (= i * BAND_STEP_H) * @param innerH - right inset of inner boundary (= (i+1) * BAND_STEP_H) * @param outerV - left/top inset of outer boundary (= i * BAND_STEP_V) * @param innerV - left/top inset of inner boundary (= (i+1) * BAND_STEP_V) * @param rTR_outer - top-right arc radius for outer boundary * @param rTR_inner - top-right arc radius for inner boundary * @param rTL_outer - top-left arc radius for outer boundary (= CORNER_R_OUTER - outerV) * @param rTL_inner - top-left arc radius for inner boundary (= CORNER_R_OUTER - innerV) */ export declare function tabBandPath(tl: number, td: number, outerH: number, innerH: number, outerV: number, innerV: number, rTR_outer: number, rTR_inner: number, rTL_outer: number, rTL_inner: number): string; export interface PortInfo { moduleDefs: Record; }>; outPorts: Record>; inPorts: Record>; } export declare function prepareConnections(ast: PatchAST): PortInfo; export declare function validateConnections(ast: PatchAST): { warnings: string[]; broken: Set; }; export declare function badgeAnchorFn(nl: NodeLayout, portName?: string | null): { bx: number; by: number; side: Side; }; export declare function portTipFn(nl: NodeLayout, portName?: string | null): { x: number; y: number; }; export declare function buildLayout(ast: PatchAST, portInfo: PortInfo, brokenConns: Set, config: PatchConfig): Promise; export interface LayoutInspection { grid: { cols: number; rows: number; }; nodes: Record; }>; edges: Array<{ from: string | null; to: string | null; label: string | null; points: [number, number][]; }>; crossings: Array<{ edge_a: number; edge_b: number; at: [number, number]; }>; } export declare function inspectLayout(text: string, opts?: { portPlacement?: PatchConfig['portPlacement']; nodePlacementStrategy?: PatchConfig['nodePlacementStrategy']; }): Promise; //# sourceMappingURL=layout.d.ts.map