/** * Org chart node primitives (cards, branch palette, collapse). */ import type { App } from '../../App'; import type { Group } from '../../shapes/Group'; export interface OrgNodeOptions { name: string; role?: string; /** Avatar image URL or data URI (optional) */ image?: string; department?: string; childCount?: number; collapsed?: boolean; depth?: number; /** Branch grouping color (inherited by sub-branches) */ branchStyle?: { fill: string; stroke: string; accent: string; }; } export type OrgBranchStyle = { fill: string; stroke: string; accent: string; }; /** FNV-1a style seed from branch names (stable across rebuilds). */ export declare function hashOrgBranchSeed(names: string[]): number; /** * Build N unique branch colors (no repeats). * Hues are spaced on the wheel then shuffled with a seeded RNG so assignment * feels random but stays stable for the same seed / rebuild. */ export declare function buildDistinctOrgBranchPalette(count: number, seed?: number): OrgBranchStyle[]; /** Resolve executive vs branch/sub-branch grouping colors. */ export declare function resolveOrgBranchStyle(depth: number, branchIndex: number | null | undefined, branchPalette?: readonly OrgBranchStyle[] | null): OrgBranchStyle; /** Count every org node under `node` (all descendants, not just direct children). */ export declare function countOrgDescendants(node: Group): number; /** Draw professional minimize (−) / maximize (+) control; shows total subtree size. */ export declare function drawOrgCollapseGlyph(app: App, btn: Group, collapsed: boolean, count: number): void; /** Refresh minimize/maximize button after toggle (count = total descendants). */ export declare function updateOrgCollapseButton(node: Group, collapsed: boolean): void; /** Build a circular SVG avatar data-URI from initials (offline-safe fallback). */ export declare function orgInitialsAvatarDataUri(name: string, accent: string, fill?: string): string; /** Professional portrait org-chart card with optional photo. */ export declare function createOrgNode(app: App, nameOrOpts: string | OrgNodeOptions, role?: string, childCount?: number, collapsed?: boolean, depth?: number): { node: Group; indicator?: Group; };