import type { ColorPalette, CustomColorPalette } from '../../core/types/color-palette.js'; import type { ColorRuleProps } from '../../core/types/color-rule.js'; import type { SankeyColorTokenByColumn, SankeyColorTokenByNodeId, SankeyGraphNode } from '../types/sankey-internal.js'; /** * Returns a map from column index to its categorical palette color token. The * color is the column's first-appearance index in the palette. Color rules are * intentionally ignored so a column header keeps the column color even when a * node in that column is overridden. */ export declare function buildColorTokenByColumn(nodes: SankeyGraphNode[], colorPalette: ColorPalette | CustomColorPalette): SankeyColorTokenByColumn; /** * Returns a map from node id to categorical palette color token. * * When nodes carry an explicit column assignment (from `columnIdAccessor`), all * nodes in the same column receive the same palette color so that columns are * visually grouped. Without column assignments each node receives its own * palette color in document order. A node matched by a color rule takes the * rule color instead; when several rules match, the last declared rule wins. * `colorTokenByColumn` defaults to a freshly built column map; pass a prebuilt * one to avoid rebuilding it. */ export declare function buildColorTokenByNodeId(nodes: SankeyGraphNode[], colorPalette: ColorPalette | CustomColorPalette, colorRules: ColorRuleProps[], colorTokenByColumn?: SankeyColorTokenByColumn): SankeyColorTokenByNodeId; //# sourceMappingURL=build-color-token-by-node-id.d.ts.map