@octanejs/recharts 0.1.51 → 0.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/package.json +4 -4
  2. package/src/animation/AnimationController.ts +1 -1
  3. package/src/animation/AnimationControllerImpl.ts +2 -2
  4. package/src/animation/AnimationHandle.ts +1 -1
  5. package/src/animation/CSSTransitionAnimate.tsrx +1 -1
  6. package/src/animation/matchBy.ts +1 -1
  7. package/src/animation/useAnimationController.ts +1 -1
  8. package/src/cartesian/Area.tsrx +23 -19
  9. package/src/cartesian/AreaRevealShape.tsrx +2 -2
  10. package/src/cartesian/Bar.tsrx +2 -2
  11. package/src/cartesian/BarStack.tsrx +2 -2
  12. package/src/cartesian/CartesianGrid.tsrx +6 -6
  13. package/src/cartesian/ErrorBar.tsrx +5 -5
  14. package/src/cartesian/Funnel.tsrx +34 -31
  15. package/src/cartesian/ReferenceLine.tsrx +10 -7
  16. package/src/cartesian/Scatter.tsrx +44 -36
  17. package/src/cartesian/ZAxis.tsrx +4 -4
  18. package/src/cartesian/getCartesianPosition.ts +2 -2
  19. package/src/cartesian/getEquidistantTicks.ts +2 -2
  20. package/src/cartesian/getTicks.ts +2 -2
  21. package/src/chart/AreaChart.tsrx +1 -1
  22. package/src/chart/ComposedChart.tsrx +1 -1
  23. package/src/chart/FunnelChart.tsrx +1 -1
  24. package/src/chart/PieChart.tsrx +1 -1
  25. package/src/chart/PolarChart.tsrx +3 -3
  26. package/src/chart/RadarChart.tsrx +1 -1
  27. package/src/chart/RadialBarChart.tsrx +1 -1
  28. package/src/chart/RechartsWrapper.tsrx +4 -4
  29. package/src/chart/Sankey.tsrx +11 -11
  30. package/src/chart/ScatterChart.tsrx +1 -1
  31. package/src/chart/SunburstChart.tsrx +16 -10
  32. package/src/component/Cursor.tsrx +7 -7
  33. package/src/component/DefaultLegendContent.tsrx +5 -5
  34. package/src/component/DefaultTooltipContent.tsrx +2 -2
  35. package/src/component/Label.tsrx +2 -2
  36. package/src/component/LabelList.tsrx +2 -2
  37. package/src/component/Legend.tsrx +8 -8
  38. package/src/component/ResponsiveContainer.tsrx +1 -1
  39. package/src/component/Tooltip.tsrx +12 -12
  40. package/src/component/TooltipBoundingBox.tsrx +2 -2
  41. package/src/container/ClipPathProvider.tsrx +2 -2
  42. package/src/context/CellsContext.ts +1 -1
  43. package/src/context/ErrorBarContext.tsrx +1 -1
  44. package/src/context/RegisterGraphicalItemId.tsrx +1 -3
  45. package/src/context/legendPayloadContext.tsrx +1 -1
  46. package/src/context/tooltipContext.ts +2 -2
  47. package/src/context/useTooltipAxis.ts +1 -1
  48. package/src/hooks.ts +6 -6
  49. package/src/polar/Pie.tsrx +32 -32
  50. package/src/polar/PolarAngleAxis.tsrx +16 -16
  51. package/src/polar/PolarGrid.tsrx +3 -3
  52. package/src/polar/PolarRadiusAxis.tsrx +17 -17
  53. package/src/polar/Radar.tsrx +10 -10
  54. package/src/polar/RadialBar.tsrx +31 -31
  55. package/src/polar/defaultPolarAngleAxisProps.ts +1 -1
  56. package/src/polar/defaultPolarRadiusAxisProps.ts +1 -1
  57. package/src/state/ReportPolarOptions.tsrx +1 -1
  58. package/src/state/brushSlice.ts +2 -2
  59. package/src/state/cartesianAxisSlice.ts +4 -4
  60. package/src/state/chartDataSlice.ts +2 -2
  61. package/src/state/errorBarSlice.ts +4 -4
  62. package/src/state/eventSettingsSlice.ts +2 -2
  63. package/src/state/externalEventsMiddleware.ts +5 -5
  64. package/src/state/graphicalItemsSlice.ts +11 -11
  65. package/src/state/keyboardEventsMiddleware.ts +3 -3
  66. package/src/state/layoutSlice.ts +2 -2
  67. package/src/state/legendSlice.ts +3 -3
  68. package/src/state/mouseEventsMiddleware.ts +4 -4
  69. package/src/state/optionsSlice.ts +2 -2
  70. package/src/state/polarAxisSlice.ts +2 -2
  71. package/src/state/polarOptionsSlice.ts +1 -1
  72. package/src/state/referenceElementsSlice.ts +5 -5
  73. package/src/state/renderedTicksSlice.ts +4 -4
  74. package/src/state/rootPropsSlice.ts +4 -4
  75. package/src/state/selectors/areaSelectors.ts +7 -7
  76. package/src/state/selectors/axisSelectors.ts +22 -18
  77. package/src/state/selectors/barSelectors.ts +11 -11
  78. package/src/state/selectors/brushSelectors.ts +2 -2
  79. package/src/state/selectors/combiners/combineActiveLabel.ts +3 -3
  80. package/src/state/selectors/combiners/combineActiveTooltipIndex.ts +3 -3
  81. package/src/state/selectors/combiners/combineAllBarPositions.ts +3 -3
  82. package/src/state/selectors/combiners/combineAxisRangeWithReverse.ts +2 -2
  83. package/src/state/selectors/combiners/combineBarPosition.ts +3 -3
  84. package/src/state/selectors/combiners/combineBarSizeList.ts +5 -5
  85. package/src/state/selectors/combiners/combineCheckedDomain.ts +1 -1
  86. package/src/state/selectors/combiners/combineConfiguredScale.ts +4 -4
  87. package/src/state/selectors/combiners/combineCoordinateForDefaultIndex.ts +2 -2
  88. package/src/state/selectors/combiners/combineDisplayedStackedData.ts +4 -4
  89. package/src/state/selectors/combiners/combineInverseScaleFunction.ts +2 -2
  90. package/src/state/selectors/combiners/combineRealScaleType.ts +2 -2
  91. package/src/state/selectors/combiners/combineStackedData.ts +2 -2
  92. package/src/state/selectors/combiners/combineTooltipInteractionState.ts +5 -5
  93. package/src/state/selectors/combiners/combineTooltipPayload.ts +4 -4
  94. package/src/state/selectors/combiners/combineTooltipPayloadConfigurations.ts +4 -4
  95. package/src/state/selectors/containerSelectors.ts +2 -2
  96. package/src/state/selectors/dataSelectors.ts +2 -2
  97. package/src/state/selectors/funnelSelectors.ts +5 -5
  98. package/src/state/selectors/graphicalItemSelectors.ts +3 -3
  99. package/src/state/selectors/legendSelectors.ts +4 -4
  100. package/src/state/selectors/lineSelectors.ts +6 -6
  101. package/src/state/selectors/numberDomainEqualityCheck.ts +1 -1
  102. package/src/state/selectors/pickAxisId.ts +2 -2
  103. package/src/state/selectors/pickAxisType.ts +1 -1
  104. package/src/state/selectors/pieSelectors.ts +5 -5
  105. package/src/state/selectors/polarAxisSelectors.ts +6 -6
  106. package/src/state/selectors/polarGridSelectors.ts +3 -3
  107. package/src/state/selectors/polarScaleSelectors.ts +4 -4
  108. package/src/state/selectors/polarSelectors.ts +6 -6
  109. package/src/state/selectors/radarSelectors.ts +11 -11
  110. package/src/state/selectors/radialBarSelectors.ts +16 -16
  111. package/src/state/selectors/rootPropsSelectors.ts +4 -4
  112. package/src/state/selectors/scatterSelectors.ts +8 -8
  113. package/src/state/selectors/selectActivePropsFromChartPointer.ts +3 -3
  114. package/src/state/selectors/selectAllAxes.ts +2 -2
  115. package/src/state/selectors/selectChartOffset.ts +2 -2
  116. package/src/state/selectors/selectChartOffsetInternal.ts +4 -4
  117. package/src/state/selectors/selectTooltipAxisId.ts +2 -2
  118. package/src/state/selectors/selectTooltipAxisType.ts +1 -1
  119. package/src/state/selectors/selectTooltipEventType.ts +3 -3
  120. package/src/state/selectors/selectTooltipPayloadSearcher.ts +2 -2
  121. package/src/state/selectors/selectTooltipSettings.ts +2 -2
  122. package/src/state/selectors/selectTooltipState.ts +2 -2
  123. package/src/state/selectors/selectors.ts +5 -5
  124. package/src/state/selectors/tooltipSelectors.ts +16 -16
  125. package/src/state/selectors/touchSelectors.ts +4 -4
  126. package/src/state/store.ts +3 -3
  127. package/src/state/tooltipSlice.ts +5 -5
  128. package/src/state/touchEventsMiddleware.ts +4 -4
  129. package/src/state/types/AreaSettings.ts +5 -5
  130. package/src/state/types/BarSettings.ts +3 -3
  131. package/src/state/types/LineSettings.ts +3 -3
  132. package/src/state/types/PieSettings.ts +5 -5
  133. package/src/state/types/RadarSettings.ts +1 -1
  134. package/src/state/types/RadialBarSettings.ts +2 -2
  135. package/src/state/types/ScatterSettings.ts +4 -4
  136. package/src/state/types/StackedGraphicalItem.ts +3 -3
  137. package/src/state/zIndexSlice.ts +1 -1
  138. package/src/synchronisation/syncSelectors.ts +2 -2
  139. package/src/synchronisation/types.ts +2 -2
  140. package/src/util/CartesianUtils.ts +1 -1
  141. package/src/util/ChartUtils.ts +8 -8
  142. package/src/util/DOMUtils.ts +1 -1
  143. package/src/util/DataUtils.ts +1 -1
  144. package/src/util/Events.ts +3 -3
  145. package/src/util/FunnelUtils.tsrx +2 -2
  146. package/src/util/PolarUtils.ts +1 -1
  147. package/src/util/RadialBarUtils.tsrx +2 -2
  148. package/src/util/ScatterUtils.tsrx +4 -4
  149. package/src/util/TickUtils.ts +1 -1
  150. package/src/util/axisPropsAreEqual.ts +3 -3
  151. package/src/util/cursor/getCursorPoints.ts +6 -6
  152. package/src/util/cursor/getCursorRectangle.ts +1 -1
  153. package/src/util/cursor/getRadialCursorPoints.ts +1 -1
  154. package/src/util/getActiveCoordinate.ts +2 -2
  155. package/src/util/getAxisTypeBasedOnLayout.ts +1 -1
  156. package/src/util/getRadiusAndStrokeWidthFromDot.ts +1 -1
  157. package/src/util/getRelativeCoordinate.ts +1 -1
  158. package/src/util/isDomainSpecifiedByUser.ts +1 -1
  159. package/src/util/scale/CartesianScaleHelper.ts +2 -2
  160. package/src/util/scale/CustomScaleDefinition.ts +1 -1
  161. package/src/util/scale/RechartsScale.ts +2 -2
  162. package/src/util/scale/createCategoricalInverse.ts +2 -2
  163. package/src/util/scale/getNiceTickValues.ts +2 -2
  164. package/src/util/stacks/getStackSeriesIdentifier.ts +2 -2
  165. package/src/util/stacks/stackTypes.ts +4 -4
  166. package/src/util/tooltip/translate.ts +1 -1
  167. package/src/util/types.ts +12 -12
  168. package/src/zIndex/zIndexSelectors.ts +1 -1
@@ -1,4 +1,4 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
2
+ import type { RechartsRootState } from '../store';
3
3
 
4
4
  export const pickAxisType = <T>(_state: RechartsRootState, axisType: T): T => axisType;
@@ -1,17 +1,17 @@
1
1
  import type { RegisteredCell } from '../../context/CellsContext';
2
2
  import { createSelector } from 'reselect';
3
3
 
4
- import { computePieSectors, PieSectorDataItem } from '../../polar/Pie.tsrx';
5
- import { RechartsRootState } from '../store';
4
+ import { computePieSectors, type PieSectorDataItem } from '../../polar/Pie.tsrx';
5
+ import type { RechartsRootState } from '../store';
6
6
  import { selectChartDataAndAlwaysIgnoreIndexes } from './dataSelectors';
7
- import { ChartData, ChartDataState } from '../chartDataSlice';
8
- import { ChartOffsetInternal } from '../../util/types';
7
+ import type { ChartData, ChartDataState } from '../chartDataSlice';
8
+ import type { ChartOffsetInternal } from '../../util/types';
9
9
  import { selectChartOffsetInternal } from './selectChartOffsetInternal';
10
10
  import type { LegendPayload } from '../../component/DefaultLegendContent.tsrx';
11
11
  import { getTooltipNameProp, getValueByDataKey } from '../../util/ChartUtils';
12
12
  import { selectUnfilteredPolarItems } from './polarSelectors';
13
13
  import type { PieSettings } from '../types/PieSettings';
14
- import { GraphicalItemId } from '../graphicalItemsSlice';
14
+ import type { GraphicalItemId } from '../graphicalItemsSlice';
15
15
 
16
16
  const pickId = (_state: RechartsRootState, id: GraphicalItemId): GraphicalItemId => id;
17
17
 
@@ -1,14 +1,14 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
- import { RechartsRootState } from '../store';
4
- import { AxisId } from '../cartesianAxisSlice';
5
- import { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
6
- import { PolarChartOptions } from '../polarOptionsSlice';
3
+ import type { RechartsRootState } from '../store';
4
+ import type { AxisId } from '../cartesianAxisSlice';
5
+ import type { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
6
+ import type { PolarChartOptions } from '../polarOptionsSlice';
7
7
  import { selectChartHeight, selectChartWidth } from './containerSelectors';
8
8
  import { selectChartOffsetInternal } from './selectChartOffsetInternal';
9
9
  import { getMaxRadius } from '../../util/PolarUtils';
10
10
  import { getPercentValue } from '../../util/DataUtils';
11
- import {
11
+ import type {
12
12
  AxisDomainTypeInput,
13
13
  LayoutType,
14
14
  PolarLayout,
@@ -16,7 +16,7 @@ import {
16
16
  } from '../../util/types';
17
17
  import { defaultPolarAngleAxisProps } from '../../polar/defaultPolarAngleAxisProps';
18
18
  import { defaultPolarRadiusAxisProps } from '../../polar/defaultPolarRadiusAxisProps';
19
- import { AxisRange } from './axisSelectors';
19
+ import type { AxisRange } from './axisSelectors';
20
20
  import { combineAxisRangeWithReverse } from './combiners/combineAxisRangeWithReverse';
21
21
  import { selectChartLayout, selectPolarChartLayout } from '../../context/chartLayoutContext';
22
22
  import { getAxisTypeBasedOnLayout } from '../../util/getAxisTypeBasedOnLayout';
@@ -1,8 +1,8 @@
1
1
  import { createSelector } from 'reselect';
2
- import { RechartsRootState } from '../store';
3
- import { AxisId } from '../cartesianAxisSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { AxisId } from '../cartesianAxisSlice';
4
4
  import { selectPolarAxisTicks } from './polarScaleSelectors';
5
- import { CartesianTickItem } from '../../util/types';
5
+ import type { CartesianTickItem } from '../../util/types';
6
6
 
7
7
  export type PolarAngles = Array<number>;
8
8
 
@@ -1,6 +1,6 @@
1
1
  import { createSelector } from 'reselect';
2
- import { RechartsRootState } from '../store';
3
- import { AxisId } from '../cartesianAxisSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { AxisId } from '../cartesianAxisSlice';
4
4
  import {
5
5
  combineAxisTicks,
6
6
  combineCategoricalDomain,
@@ -15,7 +15,7 @@ import {
15
15
  selectRadiusAxis,
16
16
  selectRadiusAxisRangeWithReversed,
17
17
  } from './polarAxisSelectors';
18
- import { CartesianTickItem } from '../../util/types';
18
+ import type { CartesianTickItem } from '../../util/types';
19
19
  import { selectChartLayout } from '../../context/chartLayoutContext';
20
20
  import {
21
21
  selectPolarAppliedValues,
@@ -23,7 +23,7 @@ import {
23
23
  selectPolarNiceTicks,
24
24
  } from './polarSelectors';
25
25
  import { pickAxisType } from './pickAxisType';
26
- import { RechartsScale, rechartsScaleFactory } from '../../util/scale/RechartsScale';
26
+ import { type RechartsScale, rechartsScaleFactory } from '../../util/scale/RechartsScale';
27
27
  import type { CustomScaleDefinition } from '../../util/scale/CustomScaleDefinition';
28
28
  import { combineConfiguredScale } from './combiners/combineConfiguredScale';
29
29
 
@@ -1,13 +1,13 @@
1
1
  import { createSelector } from 'reselect';
2
- import { AppliedChartData, ChartData } from '../chartDataSlice';
3
- import { RechartsRootState } from '../store';
4
- import { AxisId, BaseCartesianAxis } from '../cartesianAxisSlice';
2
+ import type { AppliedChartData, ChartData } from '../chartDataSlice';
3
+ import type { RechartsRootState } from '../store';
4
+ import type { AxisId, BaseCartesianAxis } from '../cartesianAxisSlice';
5
5
  import {
6
6
  selectChartDataAndAlwaysIgnoreIndexes,
7
7
  selectChartDataSliceIgnoringIndexes,
8
8
  } from './dataSelectors';
9
9
  import {
10
- AppliedChartDataWithErrorDomain,
10
+ type AppliedChartDataWithErrorDomain,
11
11
  combineAppliedValues,
12
12
  combineAxisDomain,
13
13
  combineAxisDomainWithNiceTicks,
@@ -25,8 +25,8 @@ import {
25
25
  selectRealScaleType,
26
26
  selectRenderableAxisSettings,
27
27
  } from './axisSelectors';
28
- import { PolarGraphicalItemSettings } from '../graphicalItemsSlice';
29
- import { CategoricalDomain, NumberDomain } from '../../util/types';
28
+ import type { PolarGraphicalItemSettings } from '../graphicalItemsSlice';
29
+ import type { CategoricalDomain, NumberDomain } from '../../util/types';
30
30
  import { selectChartLayout } from '../../context/chartLayoutContext';
31
31
  import { getValueByDataKey } from '../../util/ChartUtils';
32
32
  import { pickAxisType } from './pickAxisType';
@@ -1,24 +1,24 @@
1
1
  import { createSelector } from 'reselect';
2
- import { RechartsRootState } from '../store';
2
+ import type { RechartsRootState } from '../store';
3
3
  import {
4
- AngleAxisForRadar,
4
+ type AngleAxisForRadar,
5
5
  computeRadarPoints,
6
- RadarComposedData,
7
- RadiusAxisForRadar,
6
+ type RadarComposedData,
7
+ type RadiusAxisForRadar,
8
8
  } from '../../polar/Radar.tsrx';
9
- import { BaseAxisWithScale } from './axisSelectors';
9
+ import type { BaseAxisWithScale } from './axisSelectors';
10
10
  import { selectPolarAxisScale, selectPolarAxisTicks } from './polarScaleSelectors';
11
11
  import { selectAngleAxis, selectPolarViewBox, selectRadiusAxis } from './polarAxisSelectors';
12
- import { AxisId } from '../cartesianAxisSlice';
12
+ import type { AxisId } from '../cartesianAxisSlice';
13
13
  import { selectChartDataAndAlwaysIgnoreIndexes } from './dataSelectors';
14
- import { ChartDataState } from '../chartDataSlice';
15
- import { DataKey, LayoutType, PolarViewBoxRequired, TickItem } from '../../util/types';
14
+ import type { ChartDataState } from '../chartDataSlice';
15
+ import type { DataKey, LayoutType, PolarViewBoxRequired, TickItem } from '../../util/types';
16
16
  import { selectChartLayout } from '../../context/chartLayoutContext';
17
17
  import { getBandSizeOfAxis, isCategoricalAxis } from '../../util/ChartUtils';
18
- import { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
18
+ import type { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
19
19
  import { selectUnfilteredPolarItems } from './polarSelectors';
20
- import { GraphicalItemId } from '../graphicalItemsSlice';
21
- import { RechartsScale } from '../../util/scale/RechartsScale';
20
+ import type { GraphicalItemId } from '../graphicalItemsSlice';
21
+ import type { RechartsScale } from '../../util/scale/RechartsScale';
22
22
 
23
23
  const selectRadiusAxisScale = (
24
24
  state: RechartsRootState,
@@ -1,28 +1,28 @@
1
1
  import type { RegisteredCell } from '../../context/CellsContext';
2
2
  import { createSelector } from 'reselect';
3
3
 
4
- import { Series } from 'victory-vendor/d3-shape';
5
- import { computeRadialBarDataItems, RadialBarDataItem } from '../../polar/RadialBar.tsrx';
4
+ import type { Series } from 'victory-vendor/d3-shape';
5
+ import { computeRadialBarDataItems, type RadialBarDataItem } from '../../polar/RadialBar.tsrx';
6
6
  import { selectChartDataAndAlwaysIgnoreIndexes, selectChartDataWithIndexes } from './dataSelectors';
7
- import { RechartsRootState } from '../store';
8
- import { ChartDataState } from '../chartDataSlice';
9
- import { AxisId } from '../cartesianAxisSlice';
10
- import { LayoutType, LegendType, PolarViewBoxRequired, TickItem } from '../../util/types';
7
+ import type { RechartsRootState } from '../store';
8
+ import type { ChartDataState } from '../chartDataSlice';
9
+ import type { AxisId } from '../cartesianAxisSlice';
10
+ import type { LayoutType, LegendType, PolarViewBoxRequired, TickItem } from '../../util/types';
11
11
  import {
12
12
  selectPolarAxisScale,
13
13
  selectPolarAxisTicks,
14
14
  selectPolarGraphicalItemAxisTicks,
15
15
  } from './polarScaleSelectors';
16
- import { BaseAxisWithScale, combineStackGroups, selectTooltipAxis } from './axisSelectors';
16
+ import { type BaseAxisWithScale, combineStackGroups, selectTooltipAxis } from './axisSelectors';
17
17
  import { selectAngleAxis, selectPolarViewBox, selectRadiusAxis } from './polarAxisSelectors';
18
18
  import { selectChartLayout } from '../../context/chartLayoutContext';
19
19
  import {
20
- BarPositionPosition,
20
+ type BarPositionPosition,
21
21
  getBandSizeOfAxis,
22
22
  getBaseValueOfBar,
23
23
  isCategoricalAxis,
24
24
  } from '../../util/ChartUtils';
25
- import { BarWithPosition, SizeList } from './barSelectors';
25
+ import type { BarWithPosition, SizeList } from './barSelectors';
26
26
  import {
27
27
  selectBarCategoryGap,
28
28
  selectBarGap,
@@ -31,14 +31,14 @@ import {
31
31
  selectRootMaxBarSize,
32
32
  selectStackOffsetType,
33
33
  } from './rootPropsSelectors';
34
- import { PolarGraphicalItemSettings } from '../graphicalItemsSlice';
34
+ import type { PolarGraphicalItemSettings } from '../graphicalItemsSlice';
35
35
  import {
36
- PolarAxisType,
36
+ type PolarAxisType,
37
37
  selectPolarItemsSettings,
38
38
  selectUnfilteredPolarItems,
39
39
  } from './polarSelectors';
40
- import { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
41
- import { LegendPayload } from '../../component/DefaultLegendContent.tsrx';
40
+ import type { AngleAxisSettings, RadiusAxisSettings } from '../polarAxisSlice';
41
+ import type { LegendPayload } from '../../component/DefaultLegendContent.tsrx';
42
42
  import { isNullish } from '../../util/DataUtils';
43
43
 
44
44
  import type {
@@ -49,14 +49,14 @@ import type {
49
49
  } from '../../util/stacks/stackTypes';
50
50
  import {
51
51
  combineDisplayedStackedData,
52
- DisplayedStackedData,
52
+ type DisplayedStackedData,
53
53
  } from './combiners/combineDisplayedStackedData';
54
54
  import type { RadialBarSettings } from '../types/RadialBarSettings';
55
- import { DefinitelyStackedGraphicalItem, isStacked } from '../types/StackedGraphicalItem';
55
+ import { type DefinitelyStackedGraphicalItem, isStacked } from '../types/StackedGraphicalItem';
56
56
  import { combineBarSizeList } from './combiners/combineBarSizeList';
57
57
  import { combineAllBarPositions } from './combiners/combineAllBarPositions';
58
58
  import { combineStackedData } from './combiners/combineStackedData';
59
- import { RechartsScale } from '../../util/scale/RechartsScale';
59
+ import type { RechartsScale } from '../../util/scale/RechartsScale';
60
60
  import { combineBarPosition } from './combiners/combineBarPosition';
61
61
 
62
62
  const selectRadiusAxisForRadialBar = (
@@ -1,8 +1,8 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { StackOffsetType } from '../../util/types';
4
- import { SyncMethod } from '../../synchronisation/types';
5
- import { BaseValue } from '../../cartesian/Area.tsrx';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { StackOffsetType } from '../../util/types';
4
+ import type { SyncMethod } from '../../synchronisation/types';
5
+ import type { BaseValue } from '../../cartesian/Area.tsrx';
6
6
 
7
7
  export const selectRootMaxBarSize = (state: RechartsRootState): number | undefined =>
8
8
  state.rootProps.maxBarSize;
@@ -1,22 +1,22 @@
1
1
  import type { RegisteredCell } from '../../context/CellsContext';
2
2
  import { createSelector } from 'reselect';
3
3
 
4
- import { computeScatterPoints, ScatterPointItem } from '../../cartesian/Scatter.tsrx';
5
- import { RechartsRootState } from '../store';
6
- import { AxisId } from '../cartesianAxisSlice';
4
+ import { computeScatterPoints, type ScatterPointItem } from '../../cartesian/Scatter.tsrx';
5
+ import type { RechartsRootState } from '../store';
6
+ import type { AxisId } from '../cartesianAxisSlice';
7
7
  import { selectChartDataWithIndexesIfNotInPanoramaPosition4 } from './dataSelectors';
8
- import { ChartData, ChartDataState } from '../chartDataSlice';
8
+ import type { ChartData, ChartDataState } from '../chartDataSlice';
9
9
  import {
10
- BaseAxisWithScale,
10
+ type BaseAxisWithScale,
11
11
  selectAxisWithScale,
12
12
  selectTicksOfGraphicalItem,
13
13
  selectUnfilteredCartesianItems,
14
14
  selectZAxisWithScale,
15
- ZAxisWithScale,
15
+ type ZAxisWithScale,
16
16
  } from './axisSelectors';
17
17
  import type { ScatterSettings } from '../types/ScatterSettings';
18
- import { GraphicalItemId } from '../graphicalItemsSlice';
19
- import { TickItem } from '../../util/types';
18
+ import type { GraphicalItemId } from '../graphicalItemsSlice';
19
+ import type { TickItem } from '../../util/types';
20
20
 
21
21
  const selectXAxisWithScale = (
22
22
  state: RechartsRootState,
@@ -1,13 +1,13 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
- import { RechartsRootState } from '../store';
4
- import { ActiveTooltipProps } from '../tooltipSlice';
3
+ import type { RechartsRootState } from '../store';
4
+ import type { ActiveTooltipProps } from '../tooltipSlice';
5
5
  import { selectChartLayout } from '../../context/chartLayoutContext';
6
6
  import { selectTooltipAxisRangeWithReverse, selectTooltipAxisTicks } from './tooltipSelectors';
7
7
  import { selectChartOffsetInternal } from './selectChartOffsetInternal';
8
8
  import { combineActiveProps, selectOrderedTooltipTicks } from './selectors';
9
9
  import { selectPolarViewBox } from './polarAxisSelectors';
10
- import { RelativePointer } from '../../util/types';
10
+ import type { RelativePointer } from '../../util/types';
11
11
  import { selectTooltipAxisType } from './selectTooltipAxisType';
12
12
 
13
13
  const pickChartPointer = (_state: RechartsRootState, chartPointer: RelativePointer) => chartPointer;
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
- import { RechartsRootState } from '../store';
4
- import { XAxisSettings, YAxisSettings } from '../cartesianAxisSlice';
3
+ import type { RechartsRootState } from '../store';
4
+ import type { XAxisSettings, YAxisSettings } from '../cartesianAxisSlice';
5
5
 
6
6
  export const selectAllXAxes: (state: RechartsRootState) => ReadonlyArray<XAxisSettings> =
7
7
  createSelector(
@@ -1,8 +1,8 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
3
  import { selectChartOffsetInternal } from './selectChartOffsetInternal';
4
- import { ChartOffsetInternal } from '../../util/types';
5
- import { ChartOffset } from '../../types';
4
+ import type { ChartOffsetInternal } from '../../util/types';
5
+ import type { ChartOffset } from '../../types';
6
6
 
7
7
  export const selectChartOffset = createSelector(
8
8
  [selectChartOffsetInternal],
@@ -2,7 +2,7 @@
2
2
  import { createSelector } from 'reselect';
3
3
 
4
4
  import { selectLegendSettings, selectLegendSize } from './legendSelectors';
5
- import {
5
+ import type {
6
6
  CartesianViewBoxRequired,
7
7
  ChartOffsetInternal,
8
8
  Margin,
@@ -10,13 +10,13 @@ import {
10
10
  OffsetVertical,
11
11
  Size,
12
12
  } from '../../util/types';
13
- import { XAxisSettings, YAxisSettings } from '../cartesianAxisSlice';
14
- import { LegendSettings } from '../legendSlice';
13
+ import type { XAxisSettings, YAxisSettings } from '../cartesianAxisSlice';
14
+ import type { LegendSettings } from '../legendSlice';
15
15
  import { appendOffsetOfLegend } from '../../util/ChartUtils';
16
16
  import { selectChartHeight, selectChartWidth, selectMargin } from './containerSelectors';
17
17
  import { selectAllXAxes, selectAllYAxes } from './selectAllAxes';
18
18
  import { DEFAULT_Y_AXIS_WIDTH } from '../../util/Constants';
19
- import { RechartsRootState } from '../store';
19
+ import type { RechartsRootState } from '../store';
20
20
 
21
21
  export const selectBrushHeight = (state: RechartsRootState) => state.brush.height;
22
22
 
@@ -1,6 +1,6 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { AxisId } from '../cartesianAxisSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { AxisId } from '../cartesianAxisSlice';
4
4
 
5
5
  export const selectTooltipAxisId = (state: RechartsRootState): AxisId =>
6
6
  state.tooltip.settings.axisId;
@@ -1,5 +1,5 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
2
+ import type { RechartsRootState } from '../store';
3
3
  import { selectChartLayout } from '../../context/chartLayoutContext';
4
4
 
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { TooltipEventType } from '../../util/types';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { TooltipEventType } from '../../util/types';
4
4
  import { useAppSelector } from '../hooks';
5
- import { SharedTooltipSettings } from '../tooltipSlice';
5
+ import type { SharedTooltipSettings } from '../tooltipSlice';
6
6
 
7
7
  export const selectDefaultTooltipEventType = (state: RechartsRootState): TooltipEventType =>
8
8
  state.options.defaultTooltipEventType;
@@ -1,6 +1,6 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { TooltipPayloadSearcher } from '../tooltipSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { TooltipPayloadSearcher } from '../tooltipSlice';
4
4
 
5
5
  export const selectTooltipPayloadSearcher = (state: RechartsRootState): TooltipPayloadSearcher =>
6
6
  state.options.tooltipPayloadSearcher;
@@ -1,6 +1,6 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { TooltipSettingsState } from '../tooltipSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { TooltipSettingsState } from '../tooltipSlice';
4
4
 
5
5
  export const selectTooltipSettings = (state: RechartsRootState): TooltipSettingsState =>
6
6
  state.tooltip.settings;
@@ -1,5 +1,5 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { RechartsRootState } from '../store';
3
- import { TooltipState } from '../tooltipSlice';
2
+ import type { RechartsRootState } from '../store';
3
+ import type { TooltipState } from '../tooltipSlice';
4
4
 
5
5
  export const selectTooltipState = (state: RechartsRootState): TooltipState => state.tooltip;
@@ -2,8 +2,8 @@
2
2
  import { createSelector } from 'reselect';
3
3
  import { sortBy } from 'es-toolkit/compat';
4
4
  import { useAppSelector } from '../hooks';
5
- import { RechartsRootState } from '../store';
6
- import {
5
+ import type { RechartsRootState } from '../store';
6
+ import type {
7
7
  ActiveTooltipProps,
8
8
  TooltipIndex,
9
9
  TooltipInteractionState,
@@ -11,7 +11,7 @@ import {
11
11
  TooltipPayloadConfiguration,
12
12
  } from '../tooltipSlice';
13
13
  import { calculateCartesianTooltipPos, calculatePolarTooltipPos } from '../../util/ChartUtils';
14
- import {
14
+ import type {
15
15
  AxisType,
16
16
  CartesianLayout,
17
17
  ChartOffsetInternal,
@@ -24,14 +24,14 @@ import {
24
24
  TickItem,
25
25
  TooltipEventType,
26
26
  } from '../../util/types';
27
- import { TooltipTrigger } from '../../chart/types';
27
+ import type { TooltipTrigger } from '../../chart/types';
28
28
  import { selectChartDataWithIndexes } from './dataSelectors';
29
29
  import {
30
30
  selectTooltipAxisDomain,
31
31
  selectTooltipAxisTicks,
32
32
  selectTooltipDisplayedData,
33
33
  } from './tooltipSelectors';
34
- import { AxisRange, selectTooltipAxisDataKey } from './axisSelectors';
34
+ import { type AxisRange, selectTooltipAxisDataKey } from './axisSelectors';
35
35
  import { selectChartName } from './rootPropsSelectors';
36
36
  import { selectChartLayout } from '../../context/chartLayoutContext';
37
37
  import { selectChartOffsetInternal } from './selectChartOffsetInternal';
@@ -1,8 +1,8 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
- import { RechartsRootState } from '../store';
3
+ import type { RechartsRootState } from '../store';
4
4
  import {
5
- AxisRange,
5
+ type AxisRange,
6
6
  combineAllAppliedValues,
7
7
  combineAreasDomain,
8
8
  combineAxisDomain,
@@ -24,7 +24,7 @@ import {
24
24
  getDomainDefinition,
25
25
  itemAxisPredicate,
26
26
  mergeDomains,
27
- RenderableAxisSettings,
27
+ type RenderableAxisSettings,
28
28
  selectAllErrorBarSettings,
29
29
  selectAxisRange,
30
30
  selectHasBar,
@@ -35,8 +35,8 @@ import {
35
35
  selectTooltipAxisDataKey,
36
36
  } from './axisSelectors';
37
37
  import { selectChartLayout } from '../../context/chartLayoutContext';
38
- import { isCategoricalAxis, StackId } from '../../util/ChartUtils';
39
- import {
38
+ import { isCategoricalAxis, type StackId } from '../../util/ChartUtils';
39
+ import type {
40
40
  AxisDomain,
41
41
  CategoricalDomain,
42
42
  CategoricalDomainItem,
@@ -48,14 +48,14 @@ import {
48
48
  TickItem,
49
49
  TooltipEventType,
50
50
  } from '../../util/types';
51
- import { AppliedChartData, ChartData } from '../chartDataSlice';
51
+ import type { AppliedChartData, ChartData } from '../chartDataSlice';
52
52
  import { selectChartDataWithIndexes, selectChartDataSliceWithIndexes } from './dataSelectors';
53
- import {
53
+ import type {
54
54
  CartesianGraphicalItemSettings,
55
55
  GraphicalItemSettings,
56
56
  PolarGraphicalItemSettings,
57
57
  } from '../graphicalItemsSlice';
58
- import {
58
+ import type {
59
59
  ReferenceAreaSettings,
60
60
  ReferenceDotSettings,
61
61
  ReferenceLineSettings,
@@ -67,7 +67,7 @@ import {
67
67
  } from './rootPropsSelectors';
68
68
  import { isNotNil, mathSign } from '../../util/DataUtils';
69
69
  import { combineAxisRangeWithReverse } from './combiners/combineAxisRangeWithReverse';
70
- import {
70
+ import type {
71
71
  TooltipIndex,
72
72
  TooltipInteractionState,
73
73
  TooltipPayload,
@@ -94,23 +94,23 @@ import { selectTooltipPayloadSearcher } from './selectTooltipPayloadSearcher';
94
94
  import { selectTooltipState } from './selectTooltipState';
95
95
 
96
96
  import { combineTooltipPayload } from './combiners/combineTooltipPayload';
97
- import { StackGroup } from '../../util/stacks/stackTypes';
97
+ import type { StackGroup } from '../../util/stacks/stackTypes';
98
98
  import { selectTooltipAxisId } from './selectTooltipAxisId';
99
- import { RenderableAxisType, selectTooltipAxisType } from './selectTooltipAxisType';
99
+ import { type RenderableAxisType, selectTooltipAxisType } from './selectTooltipAxisType';
100
100
  import {
101
101
  combineDisplayedStackedData,
102
- DisplayedStackedData,
102
+ type DisplayedStackedData,
103
103
  } from './combiners/combineDisplayedStackedData';
104
- import { DefinitelyStackedGraphicalItem, isStacked } from '../types/StackedGraphicalItem';
104
+ import { type DefinitelyStackedGraphicalItem, isStacked } from '../types/StackedGraphicalItem';
105
105
  import { numericalDomainSpecifiedWithoutRequiringData } from '../../util/isDomainSpecifiedByUser';
106
106
  import { numberDomainEqualityCheck } from './numberDomainEqualityCheck';
107
107
  import { emptyArraysAreEqualCheck } from './arrayEqualityCheck';
108
- import { ActiveLabel } from '../../synchronisation/types';
109
- import { RechartsScale, rechartsScaleFactory } from '../../util/scale/RechartsScale';
108
+ import type { ActiveLabel } from '../../synchronisation/types';
109
+ import { type RechartsScale, rechartsScaleFactory } from '../../util/scale/RechartsScale';
110
110
  import { isWellBehavedNumber } from '../../util/isWellBehavedNumber';
111
111
  import { combineRealScaleType } from './combiners/combineRealScaleType';
112
112
  import { combineConfiguredScale } from './combiners/combineConfiguredScale';
113
- import { CustomScaleDefinition } from '../../util/scale/CustomScaleDefinition';
113
+ import type { CustomScaleDefinition } from '../../util/scale/CustomScaleDefinition';
114
114
 
115
115
  export const selectTooltipAxisRealScaleType: (
116
116
  state: RechartsRootState,
@@ -1,10 +1,10 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSelector } from 'reselect';
3
- import { RechartsRootState } from '../store';
4
- import { TooltipIndex, TooltipPayloadConfiguration } from '../tooltipSlice';
5
- import { Coordinate } from '../../util/types';
3
+ import type { RechartsRootState } from '../store';
4
+ import type { TooltipIndex, TooltipPayloadConfiguration } from '../tooltipSlice';
5
+ import type { Coordinate } from '../../util/types';
6
6
  import { selectTooltipState } from './selectTooltipState';
7
- import { GraphicalItemId } from '../graphicalItemsSlice';
7
+ import type { GraphicalItemId } from '../graphicalItemsSlice';
8
8
 
9
9
  const selectAllTooltipPayloadConfiguration: (
10
10
  state: RechartsRootState,
@@ -1,11 +1,11 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import {
3
- Action,
3
+ type Action,
4
4
  autoBatchEnhancer,
5
5
  combineReducers,
6
6
  configureStore,
7
- Dispatch,
8
- Store,
7
+ type Dispatch,
8
+ type Store,
9
9
  } from '@reduxjs/toolkit';
10
10
  import { optionsReducer } from './optionsSlice';
11
11
  import { tooltipReducer } from './tooltipSlice';
@@ -1,11 +1,11 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, current, PayloadAction, prepareAutoBatched } from '@reduxjs/toolkit';
2
+ import { createSlice, current, type PayloadAction, prepareAutoBatched } from '@reduxjs/toolkit';
3
3
  import { castDraft, type Draft } from 'immer';
4
- import { TooltipTrigger } from '../chart/types';
4
+ import type { TooltipTrigger } from '../chart/types';
5
5
  import type { NameType, Payload, ValueType } from '../component/DefaultTooltipContent.tsrx';
6
- import { CartesianViewBoxRequired, Coordinate, DataKey, PolarCoordinate } from '../util/types';
7
- import { AxisId } from './cartesianAxisSlice';
8
- import { GraphicalItemId } from './graphicalItemsSlice';
6
+ import type { CartesianViewBoxRequired, Coordinate, DataKey, PolarCoordinate } from '../util/types';
7
+ import type { AxisId } from './cartesianAxisSlice';
8
+ import type { GraphicalItemId } from './graphicalItemsSlice';
9
9
 
10
10
  /**
11
11
  * One Tooltip can display multiple TooltipPayloadEntries at a time.
@@ -3,11 +3,11 @@ import type { NativeTouchEvent } from '../util/OctaneTypes';
3
3
  import {
4
4
  createAction,
5
5
  createListenerMiddleware,
6
- ListenerEffectAPI,
7
- PayloadAction,
6
+ type ListenerEffectAPI,
7
+ type PayloadAction,
8
8
  } from '@reduxjs/toolkit';
9
9
 
10
- import { AppDispatch, RechartsRootState } from './store';
10
+ import type { AppDispatch, RechartsRootState } from './store';
11
11
  import { setActiveMouseOverItemIndex, setMouseOverAxisIndex } from './tooltipSlice';
12
12
  import { selectActivePropsFromChartPointer } from './selectors/selectActivePropsFromChartPointer';
13
13
 
@@ -19,7 +19,7 @@ import {
19
19
  } from '../util/Constants';
20
20
  import { selectTooltipCoordinate } from './selectors/touchSelectors';
21
21
  import { selectAllGraphicalItemsSettings } from './selectors/tooltipSelectors';
22
- import { RelativePointer } from '../util/types';
22
+ import type { RelativePointer } from '../util/types';
23
23
  import { createEventProxy } from '../util/createEventProxy';
24
24
 
25
25
  export const touchEventAction = createAction<NativeTouchEvent<HTMLDivElement>>('touchMove');