import { ICosmographInternalApi } from "../../internal"; type Label = { index: number; text: string; position: [number, number]; className?: string; color?: string; weight?: number; fontSize?: number; style?: string; padding?: { left: number; top: number; right: number; bottom: number; }; maxWidth?: number; }; export type CosmographCustomLabel = Omit; export type LabelMap = Map; /** * Manages the labels for the Cosmograph visualization. * This class is responsible for updating, rendering, and handling the display of labels for the points in the Cosmograph. */ export declare class Labels { private _; private _onHoveredLabelClick; private _hoveredCssLabel; private _cssLabelsRenderer; private _focusedLabel; private _staticLabelsMap; private _dynamicLabelsMap; private _selectedLabelsMap; private _validLabelAccessor; private _validLabelWeightAccessor; private _labelDataMap; private _customLabelsMap; private _sanitizedLabelTextCache; private _columnNames; private _cachedTrackedPointsPositions; private _lastTrackedPointsQueryTime; private _cachedSampledPointsPositions; private _lastSampledPointsQueryTime; private _isZooming; private _isManualZooming; private _lastSelectedLabelsKey; private _lastDynamicLabelsKey; private _weightSummary; private _clustersFontScale; private _clustersWeightScale; private _updateClustersFontScaleHandler; private _clusterLabelsRefreshFrame; private _pointSizeScaleUpdateHandler; private _minDegree; private _maxDegree; private _degreeRange; private _degreeSummaryCalculated; labelsContainer: HTMLDivElement; private get _weightsColumn(); private _getFontRatio; private _resolveLabelStyle; private _sanitizeLabelText; constructor(_: ICosmographInternalApi, dispatchWheelEventElement: HTMLCanvasElement); /** * Renders the labels for the Cosmograph visualization. */ render(): Promise; /** * Updates the labels for the Cosmograph visualization. */ update(): Promise; updatePositions(): void; private _updateLabels; private _updateSelectedPointLabels; private _updateDynamicLabels; private _updateStaticLabels; private _fetchTopLabels; private _setLabels; private _findTopIndicesByDegree; private _populateLabelDataMap; private _getTrackedPositions; private _getSampledPositions; private _hashIndices; private _trackPointPositions; private _getWeightSummary; private _resolveColumnWeight; private _addPointLabelsToDataMap; private _updateClustersFontScale; private _addClusterLabelsToDataMap; private _addCustomLabelsToDataMap; private _addFocusedLabelToDataMap; private _normalizeWeight; private _calculateDegreeSummary; private _renderLabels; /** * Renders a hovered label for a point in the Cosmograph visualization. */ renderHoveredLabel(pointIndexBy?: number, pointSpacePosition?: [number, number]): Promise; setCustomLabels(labels?: CosmographCustomLabel[]): void; /** * Set zooming state */ setZooming(isZooming: boolean, isManual?: boolean): void; /** * Destroys the labels module, removing event listeners and destroying internal components. */ destroy(): void; /** * Clears the labels data and resets the CSS labels renderer. */ clear(): void; private _getLabelColorByIndex; private _checkLabelEvents; private _hasPointLabelEvents; private _hasClusterLabelEvents; private _getPaddingObject; private _getClusterPadding; private _getClusterLabelText; } export {};