import { HierarchyRectangularNode } from '@visx/hierarchy/lib/types'; import type { ClusterNode, LeafNode } from './guards/node-guards.js'; import { type LegendColorMap } from './internal.js'; import { LegendItem } from '../../core/components/legend/categorical/types/legend.js'; export interface TreeMapState { /** List of categories (nodes of depth 1) which are shown in the treemap. */ groupsSelected: LegendItem[]; /** Id of highlighted nodes (category node - depth 1). */ highlightedItem?: LegendItem; overlay: { toolbarVisible: boolean; }; /** An array containing all visible nodes. */ hierarchyLeafNodes: HierarchyRectangularNode[]; hierarchyClusterNodes: HierarchyRectangularNode[]; colorMap: LegendColorMap; }