@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
@@ -16,39 +16,39 @@ import { clsx } from 'clsx';
16
16
  import { selectPieLegend, selectPieSectors } from '../state/selectors/pieSelectors';
17
17
  import { useAppSelector } from '../state/hooks';
18
18
  import { Layer } from '../container/Layer.tsrx';
19
- import { Curve, Props as CurveProps } from '../shape/Curve.tsrx';
19
+ import { Curve, type Props as CurveProps } from '../shape/Curve.tsrx';
20
20
  import { Sector } from '../shape/Sector.tsrx';
21
21
  import { Text, type RenderableText, type TextAnchor } from '../component/Text.tsrx';
22
22
  import { getMaxRadius, polarToCartesian } from '../util/PolarUtils';
23
23
  import { getPercentValue, interpolate, isNumber, mathSign } from '../util/DataUtils';
24
24
  import { getTooltipNameProp, getValueByDataKey } from '../util/ChartUtils';
25
25
  import {
26
- ActiveShape,
26
+ type ActiveShape,
27
27
  adaptEventsOfChild,
28
- AnimationDuration,
29
- ChartOffsetInternal,
30
- Coordinate,
31
- DataConsumer,
32
- DataKey,
33
- DataProvider,
34
- EasingInput,
35
- GeometrySector,
36
- LegendType,
37
- PolarLayout,
38
- PresentationAttributesAdaptChildEvent,
39
- ShapeAnimationProps,
40
- TooltipType,
28
+ type AnimationDuration,
29
+ type ChartOffsetInternal,
30
+ type Coordinate,
31
+ type DataConsumer,
32
+ type DataKey,
33
+ type DataProvider,
34
+ type EasingInput,
35
+ type GeometrySector,
36
+ type LegendType,
37
+ type PolarLayout,
38
+ type PresentationAttributesAdaptChildEvent,
39
+ type ShapeAnimationProps,
40
+ type TooltipType,
41
41
  } from '../util/types';
42
42
  import { Shape } from '../util/ActiveShapeUtils.tsrx';
43
43
  import {
44
- TooltipTriggerInfo,
44
+ type TooltipTriggerInfo,
45
45
  useMouseClickItemDispatch,
46
46
  useMouseEnterItemDispatch,
47
47
  useMouseLeaveItemDispatch,
48
48
  } from '../context/tooltipContext';
49
- import { TooltipPayload, TooltipPayloadConfiguration } from '../state/tooltipSlice';
49
+ import type { TooltipPayload, TooltipPayloadConfiguration } from '../state/tooltipSlice';
50
50
  import { SetTooltipEntrySettings } from '../state/SetTooltipEntrySettings';
51
- import { Formatter } from '../component/DefaultTooltipContent.tsrx';
51
+ import type { Formatter } from '../component/DefaultTooltipContent.tsrx';
52
52
  import {
53
53
  selectActiveTooltipDataKey,
54
54
  selectActiveTooltipGraphicalItemId,
@@ -61,31 +61,31 @@ import {
61
61
  } from '../util/Constants';
62
62
  import {
63
63
  AnimatedItems,
64
- AnimationInterpolateFn,
64
+ type AnimationInterpolateFn,
65
65
  useAnimationCallbacks,
66
66
  } from '../animation/AnimatedItems.tsrx';
67
- import { AnimationMatchByProp, matchAppend } from '../animation/matchBy';
68
- import { RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
67
+ import { type AnimationMatchByProp, matchAppend } from '../animation/matchBy';
68
+ import { type RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
69
69
  import { RegisterGraphicalItemId } from '../context/RegisterGraphicalItemId.tsrx';
70
70
  import { SetPolarGraphicalItem } from '../state/SetGraphicalItem';
71
71
  import type { PiePresentationProps, PieSettings } from '../state/types/PieSettings';
72
72
  import {
73
73
  svgPropertiesNoEvents,
74
74
  svgPropertiesNoEventsFromUnknown,
75
- SVGPropsNoEvents,
75
+ type SVGPropsNoEvents,
76
76
  } from '../util/svgPropertiesNoEvents';
77
77
  import {
78
78
  LabelListFromLabelProp,
79
79
  PolarLabelListContextProvider,
80
- PolarLabelListEntry,
81
- Props as LabelListProps,
80
+ type PolarLabelListEntry,
81
+ type Props as LabelListProps,
82
82
  } from '../component/LabelList.tsrx';
83
- import { GraphicalItemId } from '../state/graphicalItemsSlice';
84
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
83
+ import type { GraphicalItemId } from '../state/graphicalItemsSlice';
84
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
85
85
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
86
- import { ChartData } from '../state/chartDataSlice';
86
+ import type { ChartData } from '../state/chartDataSlice';
87
87
  import { getClassNameFromUnknown } from '../util/getClassNameFromUnknown';
88
- import { WithIdRequired } from '../util/useUniqueId';
88
+ import type { WithIdRequired } from '../util/useUniqueId';
89
89
  import { usePolarChartLayout } from '../context/chartLayoutContext';
90
90
  import { CellsContext, useCellRegistry } from '../context/CellsContext';
91
91
 
@@ -1154,17 +1154,17 @@ function PieImpl(props: WithIdRequired<PropsWithResolvedDefaults>) {
1154
1154
 
1155
1155
  if (sectors == null) {
1156
1156
  previousSectorsRef.current = null;
1157
- return <CellsContext.Provider value={cellRegistry}>
1157
+ return <CellsContext value={cellRegistry}>
1158
1158
  <SetPiePayloadLegend cells={cells} id={id} />
1159
1159
  <Layer tabIndex={rootTabIndex} className={layerClass}>{props.children}</Layer>
1160
- </CellsContext.Provider>;
1160
+ </CellsContext>;
1161
1161
  }
1162
1162
 
1163
1163
  if (hide) {
1164
1164
  previousSectorsRef.current = null;
1165
1165
  }
1166
1166
 
1167
- return <CellsContext.Provider value={cellRegistry}>
1167
+ return <CellsContext value={cellRegistry}>
1168
1168
  <SetPiePayloadLegend cells={cells} id={id} />
1169
1169
  <ZIndexLayer zIndex={props.zIndex}>
1170
1170
  <SetPieTooltipEntrySettings
@@ -1191,7 +1191,7 @@ function PieImpl(props: WithIdRequired<PropsWithResolvedDefaults>) {
1191
1191
  : props.children}
1192
1192
  </Layer>
1193
1193
  </ZIndexLayer>
1194
- </CellsContext.Provider>;
1194
+ </CellsContext>;
1195
1195
  }
1196
1196
 
1197
1197
  type PropsWithResolvedDefaults = RequiresDefaultProps<Props, typeof defaultPieProps>;
@@ -12,23 +12,23 @@ import { clsx } from 'clsx';
12
12
  import { Layer } from '../container/Layer.tsrx';
13
13
  import { Dot } from '../shape/Dot.tsrx';
14
14
  import { Polygon } from '../shape/Polygon.tsrx';
15
- import { Text, TextAnchor, TextVerticalAnchor } from '../component/Text.tsrx';
15
+ import { Text, type TextAnchor, type TextVerticalAnchor } from '../component/Text.tsrx';
16
16
  import {
17
17
  adaptEventsOfChild,
18
- AxisDomain,
19
- AxisTick,
20
- AxisDomainTypeInput,
21
- PolarTickContentProps,
22
- EvaluatedAxisDomainType,
23
- PresentationAttributesAdaptChildEvent,
24
- RenderableAxisProps,
25
- ScaleType,
26
- TickItem,
27
- TickProp,
18
+ type AxisDomain,
19
+ type AxisTick,
20
+ type AxisDomainTypeInput,
21
+ type PolarTickContentProps,
22
+ type EvaluatedAxisDomainType,
23
+ type PresentationAttributesAdaptChildEvent,
24
+ type RenderableAxisProps,
25
+ type ScaleType,
26
+ type TickItem,
27
+ type TickProp,
28
28
  } from '../util/types';
29
29
  import { degreeToRadian, polarToCartesian } from '../util/PolarUtils';
30
- import { addAngleAxis, AngleAxisSettings, removeAngleAxis } from '../state/polarAxisSlice';
31
- import { NiceTicksAlgorithm } from '../state/cartesianAxisSlice';
30
+ import { addAngleAxis, type AngleAxisSettings, removeAngleAxis } from '../state/polarAxisSlice';
31
+ import type { NiceTicksAlgorithm } from '../state/cartesianAxisSlice';
32
32
  import { useAppDispatch, useAppSelector } from '../state/hooks';
33
33
  import {
34
34
  selectPolarAngleAxisTicks,
@@ -41,9 +41,9 @@ import {
41
41
  svgPropertiesNoEvents,
42
42
  svgPropertiesNoEventsFromUnknown,
43
43
  } from '../util/svgPropertiesNoEvents';
44
- import { RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
45
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
46
- import { RechartsScale } from '../util/scale/RechartsScale';
44
+ import { type RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
45
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
46
+ import type { RechartsScale } from '../util/scale/RechartsScale';
47
47
  import type { CustomScaleDefinition } from '../util/scale/CustomScaleDefinition';
48
48
  import { usePolarChartLayout } from '../context/chartLayoutContext';
49
49
  import { noop } from '../util/DataUtils';
@@ -3,13 +3,13 @@ import { clsx } from 'clsx';
3
3
  import * as React from 'octane';
4
4
 
5
5
  import { polarToCartesian } from '../util/PolarUtils';
6
- import { AxisId } from '../state/cartesianAxisSlice';
6
+ import type { AxisId } from '../state/cartesianAxisSlice';
7
7
  import { useAppSelector } from '../state/hooks';
8
8
  import { selectPolarGridAngles, selectPolarGridRadii } from '../state/selectors/polarGridSelectors';
9
9
  import { selectPolarViewBox } from '../state/selectors/polarAxisSelectors';
10
- import { PolarViewBoxRequired } from '../util/types';
10
+ import type { PolarViewBoxRequired } from '../util/types';
11
11
  import { svgPropertiesNoEvents } from '../util/svgPropertiesNoEvents';
12
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
12
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
13
13
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
14
14
  import { resolveDefaultProps } from '../util/resolveDefaultProps';
15
15
 
@@ -17,21 +17,21 @@ import { Layer } from '../container/Layer.tsrx';
17
17
  import { polarToCartesian } from '../util/PolarUtils';
18
18
  import {
19
19
  adaptEventsOfChild,
20
- RenderableAxisProps,
21
- Coordinate,
22
- PolarViewBoxRequired,
23
- PresentationAttributesAdaptChildEvent,
24
- TickItem,
25
- AxisDomain,
26
- ScaleType,
27
- AxisDomainTypeInput,
28
- EvaluatedAxisDomainType,
29
- TickProp,
30
- PolarTickContentProps,
31
- AxisTick,
20
+ type RenderableAxisProps,
21
+ type Coordinate,
22
+ type PolarViewBoxRequired,
23
+ type PresentationAttributesAdaptChildEvent,
24
+ type TickItem,
25
+ type AxisDomain,
26
+ type ScaleType,
27
+ type AxisDomainTypeInput,
28
+ type EvaluatedAxisDomainType,
29
+ type TickProp,
30
+ type PolarTickContentProps,
31
+ type AxisTick,
32
32
  } from '../util/types';
33
- import { addRadiusAxis, RadiusAxisSettings, removeRadiusAxis } from '../state/polarAxisSlice';
34
- import { NiceTicksAlgorithm } from '../state/cartesianAxisSlice';
33
+ import { addRadiusAxis, type RadiusAxisSettings, removeRadiusAxis } from '../state/polarAxisSlice';
34
+ import type { NiceTicksAlgorithm } from '../state/cartesianAxisSlice';
35
35
  import { useAppDispatch, useAppSelector } from '../state/hooks';
36
36
  import { selectPolarAxisScale, selectPolarAxisTicks } from '../state/selectors/polarScaleSelectors';
37
37
  import { selectPolarViewBox } from '../state/selectors/polarAxisSelectors';
@@ -40,9 +40,9 @@ import {
40
40
  svgPropertiesNoEvents,
41
41
  svgPropertiesNoEventsFromUnknown,
42
42
  } from '../util/svgPropertiesNoEvents';
43
- import { RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
44
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
45
- import { RechartsScale } from '../util/scale/RechartsScale';
43
+ import { type RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
44
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
45
+ import type { RechartsScale } from '../util/scale/RechartsScale';
46
46
  import type { CustomScaleDefinition } from '../util/scale/CustomScaleDefinition';
47
47
  import { usePolarChartLayout } from '../context/chartLayoutContext';
48
48
  import { noop } from '../util/DataUtils';
@@ -17,12 +17,12 @@ import { Polygon } from '../shape/Polygon.tsrx';
17
17
  import { Layer } from '../container/Layer.tsrx';
18
18
  import {
19
19
  CartesianLabelListContextProvider,
20
- CartesianLabelListEntry,
21
- ImplicitLabelListType,
20
+ type CartesianLabelListEntry,
21
+ type ImplicitLabelListType,
22
22
  LabelListFromLabelProp,
23
23
  } from '../component/LabelList.tsrx';
24
24
  import { Dots } from '../component/Dots.tsrx';
25
- import {
25
+ import type {
26
26
  ActiveDotType,
27
27
  AnimationDuration,
28
28
  DataConsumer,
@@ -36,7 +36,7 @@ import {
36
36
  } from '../util/types';
37
37
  import type { LegendPayload } from '../component/DefaultLegendContent.tsrx';
38
38
  import { ActivePoints } from '../component/ActivePoints.tsrx';
39
- import { TooltipPayloadConfiguration } from '../state/tooltipSlice';
39
+ import type { TooltipPayloadConfiguration } from '../state/tooltipSlice';
40
40
  import { SetTooltipEntrySettings } from '../state/SetTooltipEntrySettings';
41
41
  import { selectRadarPoints } from '../state/selectors/radarSelectors';
42
42
  import { useAppSelector } from '../state/hooks';
@@ -47,17 +47,17 @@ import { SetPolarGraphicalItem } from '../state/SetGraphicalItem';
47
47
  import { svgPropertiesNoEvents } from '../util/svgPropertiesNoEvents';
48
48
  import {
49
49
  AnimatedItems,
50
- AnimationInterpolateFn,
50
+ type AnimationInterpolateFn,
51
51
  useAnimationCallbacks,
52
52
  } from '../animation/AnimatedItems.tsrx';
53
- import { AnimationMatchByProp, matchAnimationItems, matchByIndex } from '../animation/matchBy';
53
+ import { type AnimationMatchByProp, matchAnimationItems, matchByIndex } from '../animation/matchBy';
54
54
  import { useAnimationStartSnapshot } from '../animation/useAnimationStartSnapshot';
55
55
  import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
56
- import { RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
57
- import { WithIdRequired } from '../util/useUniqueId';
58
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
56
+ import { type RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
57
+ import type { WithIdRequired } from '../util/useUniqueId';
58
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
59
59
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
60
- import { RechartsScale } from '../util/scale/RechartsScale';
60
+ import type { RechartsScale } from '../util/scale/RechartsScale';
61
61
  import { usePolarChartLayout } from '../context/chartLayoutContext';
62
62
 
63
63
  export interface RadarPoint {
@@ -13,24 +13,24 @@ import * as React from 'octane';
13
13
  import { useRef } from 'octane';
14
14
  import { clsx } from 'clsx';
15
15
 
16
- import { Series } from 'victory-vendor/d3-shape';
16
+ import type { Series } from 'victory-vendor/d3-shape';
17
17
  import {
18
18
  defaultRadialBarShape,
19
19
  parseCornerRadius,
20
20
  RadialBarSector,
21
- RadialBarSectorProps,
21
+ type RadialBarSectorProps,
22
22
  } from '../util/RadialBarUtils.tsrx';
23
23
  import { defaultSectorProps, type Props as SectorProps } from '../shape/Sector.tsrx';
24
24
  import { Layer } from '../container/Layer.tsrx';
25
25
  import {
26
- ImplicitLabelListType,
26
+ type ImplicitLabelListType,
27
27
  LabelListFromLabelProp,
28
28
  PolarLabelListContextProvider,
29
- PolarLabelListEntry,
29
+ type PolarLabelListEntry,
30
30
  } from '../component/LabelList.tsrx';
31
31
  import { interpolate, mathSign, noop } from '../util/DataUtils';
32
32
  import {
33
- BarPositionPosition,
33
+ type BarPositionPosition,
34
34
  getCateCoordinateOfBar,
35
35
  getNormalizedStackId,
36
36
  getTooltipNameProp,
@@ -38,32 +38,32 @@ import {
38
38
  truncateByDomain,
39
39
  } from '../util/ChartUtils';
40
40
  import {
41
- ActiveShape,
41
+ type ActiveShape,
42
42
  adaptEventsOfChild,
43
- AnimationDuration,
44
- EasingInput,
45
- DataConsumer,
46
- DataKey,
47
- GeometrySector,
48
- LayoutType,
49
- LegendType,
50
- PresentationAttributesAdaptChildEvent,
51
- ShapeAnimationProps,
52
- TickItem,
53
- TooltipType,
54
- PolarLayout,
43
+ type AnimationDuration,
44
+ type EasingInput,
45
+ type DataConsumer,
46
+ type DataKey,
47
+ type GeometrySector,
48
+ type LayoutType,
49
+ type LegendType,
50
+ type PresentationAttributesAdaptChildEvent,
51
+ type ShapeAnimationProps,
52
+ type TickItem,
53
+ type TooltipType,
54
+ type PolarLayout,
55
55
  } from '../util/types';
56
56
  import {
57
- TooltipTriggerInfo,
57
+ type TooltipTriggerInfo,
58
58
  useMouseClickItemDispatch,
59
59
  useMouseEnterItemDispatch,
60
60
  useMouseLeaveItemDispatch,
61
61
  } from '../context/tooltipContext';
62
- import { TooltipPayloadConfiguration } from '../state/tooltipSlice';
62
+ import type { TooltipPayloadConfiguration } from '../state/tooltipSlice';
63
63
  import { SetTooltipEntrySettings } from '../state/SetTooltipEntrySettings';
64
- import { Formatter } from '../component/DefaultTooltipContent.tsrx';
65
- import { BaseAxisWithScale } from '../state/selectors/axisSelectors';
66
- import { ChartData } from '../state/chartDataSlice';
64
+ import type { Formatter } from '../component/DefaultTooltipContent.tsrx';
65
+ import type { BaseAxisWithScale } from '../state/selectors/axisSelectors';
66
+ import type { ChartData } from '../state/chartDataSlice';
67
67
  import {
68
68
  selectRadialBarLegendPayload,
69
69
  selectRadialBarSectors,
@@ -73,11 +73,11 @@ import { selectActiveTooltipIndex } from '../state/selectors/tooltipSelectors';
73
73
  import { SetPolarLegendPayload } from '../state/SetLegendPayload';
74
74
  import {
75
75
  AnimatedItems,
76
- AnimationInterpolateFn,
76
+ type AnimationInterpolateFn,
77
77
  useAnimationCallbacks,
78
78
  } from '../animation/AnimatedItems.tsrx';
79
- import { AnimationMatchByProp, matchAppend } from '../animation/matchBy';
80
- import { AxisId } from '../state/cartesianAxisSlice';
79
+ import { type AnimationMatchByProp, matchAppend } from '../animation/matchBy';
80
+ import type { AxisId } from '../state/cartesianAxisSlice';
81
81
  import { RegisterGraphicalItemId } from '../context/RegisterGraphicalItemId.tsrx';
82
82
  import type { RadialBarSettings } from '../state/types/RadialBarSettings';
83
83
  import { SetPolarGraphicalItem } from '../state/SetGraphicalItem';
@@ -85,9 +85,9 @@ import {
85
85
  svgPropertiesNoEvents,
86
86
  svgPropertiesNoEventsFromUnknown,
87
87
  } from '../util/svgPropertiesNoEvents';
88
- import { RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
89
- import { WithIdRequired } from '../util/useUniqueId';
90
- import { ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
88
+ import { type RequiresDefaultProps, resolveDefaultProps } from '../util/resolveDefaultProps';
89
+ import type { WithIdRequired } from '../util/useUniqueId';
90
+ import { type ZIndexable, ZIndexLayer } from '../zIndex/ZIndexLayer.tsrx';
91
91
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
92
92
  import { getZIndexFromUnknown } from '../zIndex/getZIndexFromUnknown';
93
93
  import { usePolarChartLayout } from '../context/chartLayoutContext';
@@ -687,7 +687,7 @@ function RadialBarImpl(props: WithIdRequired<PropsWithDefaults>) {
687
687
  ),
688
688
  ) ??
689
689
  STABLE_EMPTY_ARRAY;
690
- return <CellsContext.Provider value={cellRegistry}>
690
+ return <CellsContext value={cellRegistry}>
691
691
  <SetRadialBarTooltipEntrySettings
692
692
  dataKey={props.dataKey}
693
693
  sectors={sectors}
@@ -701,7 +701,7 @@ function RadialBarImpl(props: WithIdRequired<PropsWithDefaults>) {
701
701
  id={props.id}
702
702
  />
703
703
  <RadialBarWithState {...props} sectors={sectors} />
704
- </CellsContext.Provider>;
704
+ </CellsContext>;
705
705
  }
706
706
 
707
707
  export const defaultRadialBarProps = {
@@ -1,5 +1,5 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { Props } from './PolarAngleAxis.tsrx';
2
+ import type { Props } from './PolarAngleAxis.tsrx';
3
3
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
4
4
 
5
5
  export const defaultPolarAngleAxisProps = {
@@ -1,5 +1,5 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { Props } from './PolarRadiusAxis.tsrx';
2
+ import type { Props } from './PolarRadiusAxis.tsrx';
3
3
  import { DefaultZIndexes } from '../zIndex/DefaultZIndexes';
4
4
 
5
5
  export const defaultPolarRadiusAxisProps = {
@@ -1,6 +1,6 @@
1
1
  import { useEffect } from 'octane';
2
2
  import { useAppDispatch } from './hooks';
3
- import { PolarChartOptions, updatePolarOptions } from './polarOptionsSlice';
3
+ import { type PolarChartOptions, updatePolarOptions } from './polarOptionsSlice';
4
4
 
5
5
  export function ReportPolarOptions(props: PolarChartOptions): null {
6
6
  const dispatch = useAppDispatch();
@@ -1,6 +1,6 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, PayloadAction } from '@reduxjs/toolkit';
3
- import { Padding } from '../util/types';
2
+ import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
3
+ import type { Padding } from '../util/types';
4
4
 
5
5
  /**
6
6
  * From all Brush properties, only height has a default value and will always be defined.
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, PayloadAction, prepareAutoBatched } from '@reduxjs/toolkit';
2
+ import { createSlice, type PayloadAction, prepareAutoBatched } from '@reduxjs/toolkit';
3
3
  import { castDraft, type Draft } from 'immer';
4
- import {
4
+ import type {
5
5
  AxisDomain,
6
6
  AxisInterval,
7
7
  AxisTick,
@@ -10,9 +10,9 @@ import {
10
10
  ScaleType,
11
11
  TickProp,
12
12
  } from '../util/types';
13
- import { TickFormatter } from '../cartesian/CartesianAxis.tsrx';
13
+ import type { TickFormatter } from '../cartesian/CartesianAxis.tsrx';
14
14
  import type { AxisRange } from './selectors/axisSelectors';
15
- import { CustomScaleDefinition } from '../util/scale/CustomScaleDefinition';
15
+ import type { CustomScaleDefinition } from '../util/scale/CustomScaleDefinition';
16
16
 
17
17
  /**
18
18
  * @inline
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { PayloadAction, createSlice } from '@reduxjs/toolkit';
2
+ import { type PayloadAction, createSlice } from '@reduxjs/toolkit';
3
3
  import { castDraft } from 'immer';
4
- import { BrushStartEndIndex } from '../context/brushUpdateContext';
4
+ import type { BrushStartEndIndex } from '../context/brushUpdateContext';
5
5
 
6
6
  /**
7
7
  * This is the data that's coming through main chart `data` prop
@@ -1,8 +1,8 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, PayloadAction } from '@reduxjs/toolkit';
3
- import { ErrorBarDirection } from '../cartesian/ErrorBar.tsrx';
4
- import { DataKey } from '../util/types';
5
- import { GraphicalItemId } from './graphicalItemsSlice';
2
+ import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
3
+ import type { ErrorBarDirection } from '../cartesian/ErrorBar.tsrx';
4
+ import type { DataKey } from '../util/types';
5
+ import type { GraphicalItemId } from './graphicalItemsSlice';
6
6
 
7
7
  /**
8
8
  * ErrorBars have lot more settings but all the others are scoped to the component itself.
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, PayloadAction } from '@reduxjs/toolkit';
2
+ import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
3
3
  import { castDraft } from 'immer';
4
- import { EventThrottlingProps } from '../util/types';
4
+ import type { EventThrottlingProps } from '../util/types';
5
5
 
6
6
  export type EventSettingsState = Required<EventThrottlingProps>;
7
7
 
@@ -3,12 +3,12 @@ import type { NativeEvent } 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 { CategoricalChartFunc } from '../chart/types';
11
- import { MouseHandlerDataParam } from '../synchronisation/types';
10
+ import type { CategoricalChartFunc } from '../chart/types';
11
+ import type { MouseHandlerDataParam } from '../synchronisation/types';
12
12
  import {
13
13
  selectActiveLabel,
14
14
  selectActiveTooltipCoordinate,
@@ -16,7 +16,7 @@ import {
16
16
  selectActiveTooltipIndex,
17
17
  selectIsTooltipActive,
18
18
  } from './selectors/tooltipSelectors';
19
- import { AppDispatch, RechartsRootState } from './store';
19
+ import type { AppDispatch, RechartsRootState } from './store';
20
20
  import { createEventProxy } from '../util/createEventProxy';
21
21
 
22
22
  type ExternalEventActionPayload<E = NativeEvent> = {
@@ -1,16 +1,16 @@
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 { ChartData } from './chartDataSlice';
5
- import { AxisId } from './cartesianAxisSlice';
6
- import { DataKey } from '../util/types';
7
- import { LineSettings } from './types/LineSettings';
8
- import { ScatterSettings } from './types/ScatterSettings';
9
- import { AreaSettings } from './types/AreaSettings';
10
- import { BarSettings } from './types/BarSettings';
11
- import { RadialBarSettings } from './types/RadialBarSettings';
12
- import { PieSettings } from './types/PieSettings';
13
- import { RadarSettings } from './types/RadarSettings';
4
+ import type { ChartData } from './chartDataSlice';
5
+ import type { AxisId } from './cartesianAxisSlice';
6
+ import type { DataKey } from '../util/types';
7
+ import type { LineSettings } from './types/LineSettings';
8
+ import type { ScatterSettings } from './types/ScatterSettings';
9
+ import type { AreaSettings } from './types/AreaSettings';
10
+ import type { BarSettings } from './types/BarSettings';
11
+ import type { RadialBarSettings } from './types/RadialBarSettings';
12
+ import type { PieSettings } from './types/PieSettings';
13
+ import type { RadarSettings } from './types/RadarSettings';
14
14
 
15
15
  /**
16
16
  * Unique ID of the graphical item.
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createAction, createListenerMiddleware, ListenerEffectAPI } from '@reduxjs/toolkit';
3
- import { setKeyboardInteraction, TooltipInteractionState } from './tooltipSlice';
4
- import { AppDispatch, RechartsRootState } from './store';
2
+ import { createAction, createListenerMiddleware, type ListenerEffectAPI } from '@reduxjs/toolkit';
3
+ import { setKeyboardInteraction, type TooltipInteractionState } from './tooltipSlice';
4
+ import type { AppDispatch, RechartsRootState } from './store';
5
5
  import {
6
6
  selectTooltipAxisDomain,
7
7
  selectTooltipAxisTicks,
@@ -1,6 +1,6 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
- import { createSlice, PayloadAction } from '@reduxjs/toolkit';
3
- import { LayoutType, Margin, Size } from '../util/types';
2
+ import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
3
+ import type { LayoutType, Margin, Size } from '../util/types';
4
4
 
5
5
  type ChartLayoutState = {
6
6
  layoutType: LayoutType;
@@ -1,8 +1,8 @@
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 } from 'immer';
4
- import { LayoutType, Size } from '../util/types';
5
- import {
4
+ import type { LayoutType, Size } from '../util/types';
5
+ import type {
6
6
  HorizontalAlignmentType,
7
7
  LegendPayload,
8
8
  VerticalAlignmentType,
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  createAction,
4
4
  createListenerMiddleware,
5
- ListenerEffectAPI,
6
- PayloadAction,
5
+ type ListenerEffectAPI,
6
+ type PayloadAction,
7
7
  } from '@reduxjs/toolkit';
8
- import { AppDispatch, RechartsRootState } from './store';
8
+ import type { AppDispatch, RechartsRootState } from './store';
9
9
  import { mouseLeaveChart, setMouseClickAxisIndex, setMouseOverAxisIndex } from './tooltipSlice';
10
10
  import { selectActivePropsFromChartPointer } from './selectors/selectActivePropsFromChartPointer';
11
11
  import { selectTooltipEventType } from './selectors/selectTooltipEventType';
12
12
 
13
13
  import { getRelativeCoordinate } from '../util/getRelativeCoordinate';
14
- import { RelativePointer, HTMLMousePointer } from '../util/types';
14
+ import type { RelativePointer, HTMLMousePointer } from '../util/types';
15
15
 
16
16
  export const mouseClickAction = createAction<HTMLMousePointer>('mouseClick');
17
17
 
@@ -1,7 +1,7 @@
1
1
  // Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
2
2
  import { createSlice } from '@reduxjs/toolkit';
3
- import { TooltipEventType } from '../util/types';
4
- import { TooltipIndex, TooltipPayloadSearcher } from './tooltipSlice';
3
+ import type { TooltipEventType } from '../util/types';
4
+ import type { TooltipIndex, TooltipPayloadSearcher } from './tooltipSlice';
5
5
  import { isNan } from '../util/DataUtils';
6
6
 
7
7
  /**