/** * Hierarchical project navigation by slash-path segments. * * Project names are `org/repo` (and occasionally deeper). The projects view * shows one path level at a time: roots first, then children under a chosen * prefix. A node is a leaf project when exactly one project sits at that path * and nothing deeper shares the prefix; otherwise it is a namespace that drills * down. The same factory is unit-tested in Node and interpolated into the * buildless dashboard client. */ export interface DashboardHierarchyProject { id: number | string; name: string; } export type DashboardHierarchyKind = "namespace" | "project"; export interface DashboardHierarchyNode { /** Stable graph element id (not a project id). */ key: string; kind: DashboardHierarchyKind; /** Display label (last path segment). */ label: string; /** Full slash path segments for this node. */ path: string[]; /** Leaf project id, or exact project under a namespace (when both exist). */ projectId?: number | string; /** Projects whose names start with this path. */ projectCount: number; /** Distinct direct child segments under a namespace (0 for leaves). */ childCount: number; } export interface DashboardHierarchyApi { splitPath(name: string): string[]; pathKey(path: readonly string[]): string; isPathPrefix(prefix: readonly string[], segments: readonly string[]): boolean; listLevel(projects: readonly DashboardHierarchyProject[], pathPrefix?: readonly string[]): DashboardHierarchyNode[]; } export declare function dashboardHierarchyFactory(): DashboardHierarchyApi; /** Source-safe factory for direct interpolation into the embedded client. */ export declare const DASHBOARD_HIERARCHY_FACTORY_SOURCE: string;