import { MouseEvent } from 'react'; import { useInheritedColor } from '@nivo/colors'; import { GridFillDirection } from '@nivo/grid'; import { CommonProps, ComputedDatum, Datum, DataProps, EmptyCell, Cell, MouseHandlers, TooltipComponent, LegendDatum, WaffleSvgProps, CustomLayerProps } from './types'; /** * Computes empty cells according to dimensions/layout/padding. * At this stage the cells aren't bound to any data. */ export declare const computeGrid: ({ width, height, rows, columns, fillDirection, emptyColor, emptyOpacity, getBorderColor, }: { width: number; height: number; rows: number; columns: number; fillDirection: GridFillDirection; emptyColor: string; emptyOpacity: number; getBorderColor: ReturnType>; }) => EmptyCell[]; export declare const mergeCellsData: (cells: EmptyCell[], data: ComputedDatum[]) => Cell[]; export declare const useWaffle: ({ width, height, data, hiddenIds, valueFormat, total, rows, columns, fillDirection, colors, emptyColor, emptyOpacity, borderColor, forwardLegendData, defs, fill, }: Pick, "hiddenIds" | "valueFormat" | "fillDirection" | "colors" | "emptyColor" | "emptyOpacity" | "borderColor"> & Pick, "defs" | "fill"> & DataProps & { width: number; height: number; forwardLegendData?: CommonProps["forwardLegendData"]; }) => { cells: Cell[]; computedData: ComputedDatum[]; legendData: LegendDatum[]; getBorderColor: import("@nivo/colors").InheritedColorConfigCustomFunction<{ color: string; } | ComputedDatum> | ((d: { color: string; } | ComputedDatum) => any); boundDefs: any; }; /** * This D3 path generator is used to compute the polygons * surrounding each group of cells attached to the same datum. */ export declare const useAreaPathGenerator: () => import("d3-shape").Line<[number, number]>; /** * Generate event handlers for both the SVG & HTML implementations, * for the canvas implementation, we don't need it because the current * cell is detected using a global event handler attached to the canvas itself. */ export declare const useAreaMouseHandlers: (data: ComputedDatum, { onMouseEnter, onMouseMove, onMouseLeave, onClick }: Partial>, tooltip: TooltipComponent) => { handleMouseEnter: (event: MouseEvent) => void; handleMouseMove: (event: MouseEvent) => void; handleMouseLeave: (event: MouseEvent) => void; handleClick: (event: MouseEvent) => void; }; /** * Generate cells transitions for the SVG & HTML implementations. */ export declare const useAnimatedCells: ({ cells, padding, motionStagger, }: { cells: Cell[]; padding: number; motionStagger: number; }) => import("@react-spring/web").TransitionFn, { color: string; size: number; x: number; y: number; opacity: number; borderColor: string; }>; /** * Memoize custom layers props. */ export declare const useCustomLayerProps: ({ cells, computedData, }: CustomLayerProps) => CustomLayerProps; //# sourceMappingURL=hooks.d.ts.map