( degree: number, nodeType: string, structuralTypes: Set<string>, )
| 29 | // ─── Node Sizing ───────────────────────────────────────────────────────── |
| 30 | |
| 31 | export function nodeSize( |
| 32 | degree: number, |
| 33 | nodeType: string, |
| 34 | structuralTypes: Set<string>, |
| 35 | ): number { |
| 36 | const base = Math.min( |
| 37 | NODE_SIZE_MAX, |
| 38 | Math.max( |
| 39 | NODE_SIZE_MIN, |
| 40 | NODE_SIZE_MIN + Math.sqrt(degree) * NODE_SIZE_DEGREE_SCALE, |
| 41 | ), |
| 42 | ); |
| 43 | const multiplier = |
| 44 | NODE_SIZE_MULTIPLIERS[nodeType] ?? |
| 45 | (structuralTypes.has(nodeType) ? NODE_SIZE_MULTIPLIERS._structural : 1); |
| 46 | return base * multiplier; |
| 47 | } |
| 48 | |
| 49 | // ─── Endpoint ID Extraction ────────────────────────────────────────────── |
| 50 |
no outgoing calls
no test coverage detected