@gravity-ui/charts 1.42.0 → 1.42.2

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 (663) hide show
  1. package/dist/cjs/components/AxisX/AxisX.js +2 -1
  2. package/dist/cjs/components/AxisX/prepare-axis-data.js +2 -2
  3. package/dist/cjs/components/AxisX/types.d.ts +1 -1
  4. package/dist/cjs/components/AxisY/AxisY.js +2 -1
  5. package/dist/cjs/components/AxisY/prepare-axis-data.js +1 -1
  6. package/dist/cjs/components/AxisY/prepare-axis-title.js +1 -1
  7. package/dist/cjs/components/AxisY/types.d.ts +1 -1
  8. package/dist/cjs/components/AxisY/utils.js +1 -1
  9. package/dist/cjs/components/ChartInner/index.js +3 -2
  10. package/dist/cjs/components/ChartInner/useChartInnerHandlers.d.ts +1 -1
  11. package/dist/cjs/components/ChartInner/useChartInnerHandlers.js +4 -4
  12. package/dist/cjs/components/ChartInner/useChartInnerProps.d.ts +1 -1
  13. package/dist/cjs/components/ChartInner/useChartInnerProps.js +4 -4
  14. package/dist/cjs/components/ChartInner/useChartInnerState.js +1 -1
  15. package/dist/cjs/components/ChartInner/useDefaultState.d.ts +1 -1
  16. package/dist/cjs/components/ChartInner/useDefaultState.js +4 -4
  17. package/dist/cjs/components/ChartInner/utils/axis.d.ts +2 -2
  18. package/dist/cjs/components/ChartInner/utils/axis.js +1 -1
  19. package/dist/cjs/components/ChartInner/utils/normalized-original-data.js +1 -1
  20. package/dist/cjs/components/ChartInner/utils/title.js +1 -1
  21. package/dist/cjs/components/ChartInner/utils/tooltip.js +1 -1
  22. package/dist/cjs/components/ChartInner/utils/zoom.d.ts +1 -1
  23. package/dist/cjs/components/ChartInner/utils/zoom.js +1 -1
  24. package/dist/cjs/components/Legend/index.js +4 -3
  25. package/dist/cjs/components/PlotTitle/index.d.ts +1 -1
  26. package/dist/cjs/components/RangeSlider/index.js +2 -1
  27. package/dist/cjs/components/Tooltip/DefaultTooltipContent/RowWithAggregation.js +1 -1
  28. package/dist/cjs/components/Tooltip/DefaultTooltipContent/index.js +2 -2
  29. package/dist/cjs/components/Tooltip/DefaultTooltipContent/utils.js +3 -3
  30. package/dist/cjs/components/index.js +3 -3
  31. package/dist/cjs/components/utils/axis-title.js +1 -1
  32. package/dist/cjs/components/utils/index.d.ts +1 -1
  33. package/dist/cjs/components/utils/index.js +1 -1
  34. package/dist/cjs/core/axes/index.d.ts +5 -0
  35. package/dist/cjs/core/axes/index.js +5 -0
  36. package/dist/{esm/hooks/useAxis → cjs/core/axes}/range-slider.js +1 -1
  37. package/dist/cjs/core/axes/types.d.ts +84 -0
  38. package/dist/{esm/hooks/useAxis → cjs/core/axes}/utils.js +1 -1
  39. package/dist/cjs/{hooks/useAxis → core/axes}/x-axis.js +4 -4
  40. package/dist/cjs/{hooks/useAxis → core/axes}/y-axis.d.ts +2 -2
  41. package/dist/cjs/{hooks/useAxis → core/axes}/y-axis.js +3 -3
  42. package/dist/cjs/core/index.d.ts +10 -0
  43. package/dist/cjs/core/index.js +10 -0
  44. package/dist/{esm/utils/chart → cjs/core/layout}/chart-dimensions.d.ts +3 -1
  45. package/dist/cjs/{utils/chart → core/layout}/chart-dimensions.js +1 -1
  46. package/dist/cjs/core/layout/index.d.ts +3 -0
  47. package/dist/cjs/core/layout/index.js +3 -0
  48. package/dist/cjs/{hooks/useSplit/index.d.ts → core/layout/split.d.ts} +1 -1
  49. package/dist/{esm/hooks/useSplit/index.js → cjs/core/layout/split.js} +1 -1
  50. package/dist/cjs/core/scales/index.d.ts +4 -0
  51. package/dist/cjs/core/scales/index.js +4 -0
  52. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/utils.d.ts +3 -2
  53. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/utils.js +2 -2
  54. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/x-scale.d.ts +4 -2
  55. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/x-scale.js +3 -3
  56. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/y-scale.d.ts +3 -2
  57. package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/y-scale.js +3 -3
  58. package/dist/cjs/{hooks/useSeries → core/series}/constants.d.ts +1 -1
  59. package/dist/cjs/core/series/index.d.ts +4 -0
  60. package/dist/cjs/core/series/index.js +4 -0
  61. package/dist/cjs/{hooks/useSeries → core/series}/prepare-area.d.ts +1 -1
  62. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-area.js +2 -2
  63. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-bar-x.js +2 -2
  64. package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-y.js +3 -3
  65. package/dist/cjs/{hooks/useSeries → core/series}/prepare-funnel.js +2 -2
  66. package/dist/cjs/{hooks/useSeries → core/series}/prepare-heatmap.js +2 -2
  67. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-legend.d.ts +1 -1
  68. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-legend.js +2 -2
  69. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-line.d.ts +1 -1
  70. package/dist/cjs/{hooks/useSeries → core/series}/prepare-line.js +2 -2
  71. package/dist/cjs/{hooks/useSeries → core/series}/prepare-options.js +1 -1
  72. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-pie.js +2 -2
  73. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-radar.d.ts +1 -1
  74. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-radar.js +2 -2
  75. package/dist/cjs/{hooks/useSeries → core/series}/prepare-sankey.js +2 -2
  76. package/dist/cjs/{hooks/useSeries → core/series}/prepare-scatter.js +2 -2
  77. package/dist/cjs/{hooks/useSeries → core/series}/prepare-treemap.js +2 -2
  78. package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-waterfall.js +2 -2
  79. package/dist/cjs/core/series/types.d.ts +346 -0
  80. package/dist/cjs/core/series/utils.d.ts +11 -0
  81. package/dist/cjs/core/series/utils.js +37 -0
  82. package/dist/{esm → cjs/core}/types/chart/base.d.ts +19 -0
  83. package/dist/{esm → cjs/core}/types/chart/tooltip.d.ts +1 -1
  84. package/dist/cjs/core/types/formatter.d.ts +40 -0
  85. package/dist/cjs/core/types/index.d.ts +96 -0
  86. package/dist/cjs/core/types/index.js +24 -0
  87. package/dist/{esm/utils/chart → cjs/core/utils}/common.js +2 -2
  88. package/dist/cjs/{utils/chart → core/utils}/format.d.ts +1 -1
  89. package/dist/cjs/{utils/chart → core/utils}/format.js +1 -1
  90. package/dist/cjs/{utils/chart → core/utils}/get-closest-data.js +2 -2
  91. package/dist/{esm/utils/chart → cjs/core/utils}/get-hovered-plots.d.ts +2 -2
  92. package/dist/cjs/{utils/chart → core/utils}/index.d.ts +4 -2
  93. package/dist/{esm/utils/chart → cjs/core/utils}/index.js +4 -2
  94. package/dist/cjs/{utils/chart → core/utils}/series/line.d.ts +1 -1
  95. package/dist/{esm/utils/chart → cjs/core/utils}/series/sorting.js +2 -2
  96. package/dist/cjs/{utils/chart → core/utils}/symbol.d.ts +1 -1
  97. package/dist/{esm/utils/chart → cjs/core/utils}/symbol.js +1 -1
  98. package/dist/cjs/{utils/chart → core/utils}/text.js +1 -1
  99. package/dist/{esm/utils/chart → cjs/core/utils}/ticks/datetime.js +1 -1
  100. package/dist/{esm → cjs/core}/validation/index.js +1 -1
  101. package/dist/cjs/{validation → core/validation}/validate-axes.js +1 -1
  102. package/dist/cjs/core/zoom/index.d.ts +1 -0
  103. package/dist/cjs/core/zoom/index.js +1 -0
  104. package/dist/cjs/{utils/chart → core/zoom}/zoom.d.ts +3 -1
  105. package/dist/cjs/{utils/chart → core/zoom}/zoom.js +1 -1
  106. package/dist/cjs/hooks/index.d.ts +5 -5
  107. package/dist/cjs/hooks/index.js +5 -5
  108. package/dist/cjs/hooks/useAxis/index.d.ts +4 -4
  109. package/dist/cjs/hooks/useAxis/index.js +3 -3
  110. package/dist/cjs/hooks/useAxis/types.d.ts +1 -84
  111. package/dist/cjs/hooks/useAxis/types.js +1 -1
  112. package/dist/cjs/hooks/useAxisScales/index.d.ts +4 -4
  113. package/dist/cjs/hooks/useAxisScales/index.js +6 -6
  114. package/dist/cjs/hooks/useBrush/types.d.ts +1 -1
  115. package/dist/cjs/hooks/useCrosshair/index.js +1 -1
  116. package/dist/cjs/hooks/useCrosshair/useCrosshairHover.js +1 -1
  117. package/dist/cjs/hooks/useRangeSlider/index.d.ts +1 -1
  118. package/dist/cjs/hooks/useRangeSlider/index.js +2 -2
  119. package/dist/cjs/hooks/useRangeSlider/types.d.ts +1 -1
  120. package/dist/cjs/hooks/useRangeSlider/utils.d.ts +1 -1
  121. package/dist/cjs/hooks/useRangeSlider/utils.js +1 -1
  122. package/dist/cjs/hooks/useSeries/index.d.ts +1 -1
  123. package/dist/cjs/hooks/useSeries/index.js +2 -2
  124. package/dist/cjs/hooks/useSeries/types.d.ts +1 -346
  125. package/dist/cjs/hooks/useSeries/types.js +1 -1
  126. package/dist/cjs/hooks/useSeries/utils.d.ts +1 -11
  127. package/dist/cjs/hooks/useSeries/utils.js +1 -37
  128. package/dist/cjs/hooks/useShapes/area/index.js +2 -1
  129. package/dist/cjs/hooks/useShapes/area/prepare-data.d.ts +2 -2
  130. package/dist/cjs/hooks/useShapes/area/prepare-data.js +2 -2
  131. package/dist/cjs/hooks/useShapes/bar-x/index.js +2 -1
  132. package/dist/cjs/hooks/useShapes/bar-x/prepare-data.d.ts +2 -2
  133. package/dist/cjs/hooks/useShapes/bar-x/prepare-data.js +2 -2
  134. package/dist/cjs/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
  135. package/dist/cjs/hooks/useShapes/bar-y/prepare-data.js +2 -2
  136. package/dist/cjs/hooks/useShapes/funnel/index.js +2 -1
  137. package/dist/cjs/hooks/useShapes/funnel/prepare-data.js +1 -1
  138. package/dist/cjs/hooks/useShapes/funnel/types.d.ts +1 -1
  139. package/dist/cjs/hooks/useShapes/heatmap/prepare-data.d.ts +1 -1
  140. package/dist/cjs/hooks/useShapes/heatmap/prepare-data.js +1 -1
  141. package/dist/cjs/hooks/useShapes/index.d.ts +3 -3
  142. package/dist/cjs/hooks/useShapes/index.js +2 -2
  143. package/dist/cjs/hooks/useShapes/line/index.js +2 -1
  144. package/dist/cjs/hooks/useShapes/line/prepare-data.d.ts +2 -2
  145. package/dist/cjs/hooks/useShapes/line/prepare-data.js +2 -2
  146. package/dist/cjs/hooks/useShapes/line/types.d.ts +1 -1
  147. package/dist/cjs/hooks/useShapes/marker.d.ts +1 -1
  148. package/dist/cjs/hooks/useShapes/marker.js +3 -2
  149. package/dist/cjs/hooks/useShapes/pie/index.js +2 -1
  150. package/dist/cjs/hooks/useShapes/pie/prepare-data.js +3 -3
  151. package/dist/cjs/hooks/useShapes/radar/prepare-data.js +2 -2
  152. package/dist/cjs/hooks/useShapes/sankey/prepare-data.js +1 -1
  153. package/dist/cjs/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
  154. package/dist/cjs/hooks/useShapes/scatter/prepare-data.js +1 -1
  155. package/dist/cjs/hooks/useShapes/treemap/prepare-data.js +3 -3
  156. package/dist/cjs/hooks/useShapes/utils.d.ts +1 -1
  157. package/dist/cjs/hooks/useShapes/utils.js +1 -1
  158. package/dist/cjs/hooks/useShapes/waterfall/index.js +3 -2
  159. package/dist/cjs/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
  160. package/dist/cjs/hooks/useShapes/waterfall/prepare-data.js +2 -2
  161. package/dist/cjs/hooks/useZoom/index.d.ts +2 -2
  162. package/dist/cjs/hooks/useZoom/utils.d.ts +2 -2
  163. package/dist/cjs/hooks/useZoom/utils.js +1 -1
  164. package/dist/cjs/hooks/utils/bar-y.d.ts +1 -1
  165. package/dist/cjs/hooks/utils/bar-y.js +1 -1
  166. package/dist/cjs/hooks/utils/get-band-size.js +1 -1
  167. package/dist/cjs/index.d.ts +3 -2
  168. package/dist/cjs/index.js +3 -2
  169. package/dist/cjs/types/chart-ui.d.ts +1 -1
  170. package/dist/cjs/types/index.d.ts +1 -96
  171. package/dist/cjs/types/index.js +1 -24
  172. package/dist/cjs/utils/chart-ui/pie-center-text.js +2 -2
  173. package/dist/cjs/utils/index.d.ts +0 -3
  174. package/dist/cjs/utils/index.js +0 -3
  175. package/dist/esm/components/AxisX/AxisX.js +2 -1
  176. package/dist/esm/components/AxisX/prepare-axis-data.js +2 -2
  177. package/dist/esm/components/AxisX/types.d.ts +1 -1
  178. package/dist/esm/components/AxisY/AxisY.js +2 -1
  179. package/dist/esm/components/AxisY/prepare-axis-data.js +1 -1
  180. package/dist/esm/components/AxisY/prepare-axis-title.js +1 -1
  181. package/dist/esm/components/AxisY/types.d.ts +1 -1
  182. package/dist/esm/components/AxisY/utils.js +1 -1
  183. package/dist/esm/components/ChartInner/index.js +3 -2
  184. package/dist/esm/components/ChartInner/useChartInnerHandlers.d.ts +1 -1
  185. package/dist/esm/components/ChartInner/useChartInnerHandlers.js +4 -4
  186. package/dist/esm/components/ChartInner/useChartInnerProps.d.ts +1 -1
  187. package/dist/esm/components/ChartInner/useChartInnerProps.js +4 -4
  188. package/dist/esm/components/ChartInner/useChartInnerState.js +1 -1
  189. package/dist/esm/components/ChartInner/useDefaultState.d.ts +1 -1
  190. package/dist/esm/components/ChartInner/useDefaultState.js +4 -4
  191. package/dist/esm/components/ChartInner/utils/axis.d.ts +2 -2
  192. package/dist/esm/components/ChartInner/utils/axis.js +1 -1
  193. package/dist/esm/components/ChartInner/utils/normalized-original-data.js +1 -1
  194. package/dist/esm/components/ChartInner/utils/title.js +1 -1
  195. package/dist/esm/components/ChartInner/utils/tooltip.js +1 -1
  196. package/dist/esm/components/ChartInner/utils/zoom.d.ts +1 -1
  197. package/dist/esm/components/ChartInner/utils/zoom.js +1 -1
  198. package/dist/esm/components/Legend/index.js +4 -3
  199. package/dist/esm/components/PlotTitle/index.d.ts +1 -1
  200. package/dist/esm/components/RangeSlider/index.js +2 -1
  201. package/dist/esm/components/Tooltip/DefaultTooltipContent/RowWithAggregation.js +1 -1
  202. package/dist/esm/components/Tooltip/DefaultTooltipContent/index.js +2 -2
  203. package/dist/esm/components/Tooltip/DefaultTooltipContent/utils.js +3 -3
  204. package/dist/esm/components/index.js +3 -3
  205. package/dist/esm/components/utils/axis-title.js +1 -1
  206. package/dist/esm/components/utils/index.d.ts +1 -1
  207. package/dist/esm/components/utils/index.js +1 -1
  208. package/dist/esm/core/axes/index.d.ts +5 -0
  209. package/dist/esm/core/axes/index.js +5 -0
  210. package/dist/{cjs/hooks/useAxis → esm/core/axes}/range-slider.js +1 -1
  211. package/dist/esm/core/axes/types.d.ts +84 -0
  212. package/dist/{cjs/hooks/useAxis → esm/core/axes}/utils.js +1 -1
  213. package/dist/esm/{hooks/useAxis → core/axes}/x-axis.js +4 -4
  214. package/dist/esm/{hooks/useAxis → core/axes}/y-axis.d.ts +2 -2
  215. package/dist/esm/{hooks/useAxis → core/axes}/y-axis.js +3 -3
  216. package/dist/esm/core/index.d.ts +10 -0
  217. package/dist/esm/core/index.js +10 -0
  218. package/dist/{cjs/utils/chart → esm/core/layout}/chart-dimensions.d.ts +3 -1
  219. package/dist/esm/{utils/chart → core/layout}/chart-dimensions.js +1 -1
  220. package/dist/esm/core/layout/index.d.ts +3 -0
  221. package/dist/esm/core/layout/index.js +3 -0
  222. package/dist/esm/{hooks/useSplit/index.d.ts → core/layout/split.d.ts} +1 -1
  223. package/dist/{cjs/hooks/useSplit/index.js → esm/core/layout/split.js} +1 -1
  224. package/dist/esm/core/scales/index.d.ts +4 -0
  225. package/dist/esm/core/scales/index.js +4 -0
  226. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/utils.d.ts +3 -2
  227. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/utils.js +2 -2
  228. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/x-scale.d.ts +4 -2
  229. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/x-scale.js +3 -3
  230. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/y-scale.d.ts +3 -2
  231. package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/y-scale.js +3 -3
  232. package/dist/esm/{hooks/useSeries → core/series}/constants.d.ts +1 -1
  233. package/dist/esm/core/series/index.d.ts +4 -0
  234. package/dist/esm/core/series/index.js +4 -0
  235. package/dist/esm/{hooks/useSeries → core/series}/prepare-area.d.ts +1 -1
  236. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-area.js +2 -2
  237. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-bar-x.js +2 -2
  238. package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-y.d.ts +3 -3
  239. package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-y.js +3 -3
  240. package/dist/esm/{hooks/useSeries → core/series}/prepare-funnel.js +2 -2
  241. package/dist/esm/{hooks/useSeries → core/series}/prepare-heatmap.js +2 -2
  242. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-legend.d.ts +1 -1
  243. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-legend.js +2 -2
  244. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-line.d.ts +1 -1
  245. package/dist/esm/{hooks/useSeries → core/series}/prepare-line.js +2 -2
  246. package/dist/esm/{hooks/useSeries → core/series}/prepare-options.js +1 -1
  247. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-pie.js +2 -2
  248. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-radar.d.ts +1 -1
  249. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-radar.js +2 -2
  250. package/dist/esm/{hooks/useSeries → core/series}/prepare-sankey.js +2 -2
  251. package/dist/esm/{hooks/useSeries → core/series}/prepare-scatter.js +2 -2
  252. package/dist/esm/{hooks/useSeries → core/series}/prepare-treemap.js +2 -2
  253. package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-waterfall.js +2 -2
  254. package/dist/esm/core/series/types.d.ts +346 -0
  255. package/dist/esm/core/series/utils.d.ts +11 -0
  256. package/dist/esm/core/series/utils.js +37 -0
  257. package/dist/{cjs → esm/core}/types/chart/base.d.ts +19 -0
  258. package/dist/{cjs → esm/core}/types/chart/tooltip.d.ts +1 -1
  259. package/dist/esm/core/types/chart/zoom.js +1 -0
  260. package/dist/esm/core/types/formatter.d.ts +40 -0
  261. package/dist/esm/core/types/formatter.js +1 -0
  262. package/dist/esm/core/types/index.d.ts +96 -0
  263. package/dist/esm/core/types/index.js +24 -0
  264. package/dist/esm/core/types/misc.js +1 -0
  265. package/dist/{cjs/utils/chart → esm/core/utils}/common.js +2 -2
  266. package/dist/esm/{utils/chart → core/utils}/format.d.ts +1 -1
  267. package/dist/esm/{utils/chart → core/utils}/format.js +1 -1
  268. package/dist/esm/{utils/chart → core/utils}/get-closest-data.js +2 -2
  269. package/dist/{cjs/utils/chart → esm/core/utils}/get-hovered-plots.d.ts +2 -2
  270. package/dist/esm/{utils/chart → core/utils}/index.d.ts +4 -2
  271. package/dist/{cjs/utils/chart → esm/core/utils}/index.js +4 -2
  272. package/dist/esm/{utils/chart → core/utils}/series/line.d.ts +1 -1
  273. package/dist/{cjs/utils/chart → esm/core/utils}/series/sorting.js +2 -2
  274. package/dist/esm/{utils/chart → core/utils}/symbol.d.ts +1 -1
  275. package/dist/{cjs/utils/chart → esm/core/utils}/symbol.js +1 -1
  276. package/dist/esm/{utils/chart → core/utils}/text.js +1 -1
  277. package/dist/{cjs/utils/chart → esm/core/utils}/ticks/datetime.js +1 -1
  278. package/dist/esm/{utils/chart → core/utils}/tooltip.d.ts +1 -1
  279. package/dist/esm/core/utils/types.js +1 -0
  280. package/dist/{cjs → esm/core}/validation/index.js +1 -1
  281. package/dist/esm/{validation → core/validation}/validate-axes.js +1 -1
  282. package/dist/esm/core/zoom/index.d.ts +1 -0
  283. package/dist/esm/core/zoom/index.js +1 -0
  284. package/dist/esm/{utils/chart → core/zoom}/zoom.d.ts +3 -1
  285. package/dist/esm/{utils/chart → core/zoom}/zoom.js +1 -1
  286. package/dist/esm/hooks/index.d.ts +5 -5
  287. package/dist/esm/hooks/index.js +5 -5
  288. package/dist/esm/hooks/useAxis/index.d.ts +4 -4
  289. package/dist/esm/hooks/useAxis/index.js +3 -3
  290. package/dist/esm/hooks/useAxis/types.d.ts +1 -84
  291. package/dist/esm/hooks/useAxis/types.js +1 -1
  292. package/dist/esm/hooks/useAxisScales/index.d.ts +4 -4
  293. package/dist/esm/hooks/useAxisScales/index.js +6 -6
  294. package/dist/esm/hooks/useBrush/types.d.ts +1 -1
  295. package/dist/esm/hooks/useCrosshair/index.js +1 -1
  296. package/dist/esm/hooks/useCrosshair/useCrosshairHover.js +1 -1
  297. package/dist/esm/hooks/useRangeSlider/index.d.ts +1 -1
  298. package/dist/esm/hooks/useRangeSlider/index.js +2 -2
  299. package/dist/esm/hooks/useRangeSlider/types.d.ts +1 -1
  300. package/dist/esm/hooks/useRangeSlider/utils.d.ts +1 -1
  301. package/dist/esm/hooks/useRangeSlider/utils.js +1 -1
  302. package/dist/esm/hooks/useSeries/index.d.ts +1 -1
  303. package/dist/esm/hooks/useSeries/index.js +2 -2
  304. package/dist/esm/hooks/useSeries/types.d.ts +1 -346
  305. package/dist/esm/hooks/useSeries/types.js +1 -1
  306. package/dist/esm/hooks/useSeries/utils.d.ts +1 -11
  307. package/dist/esm/hooks/useSeries/utils.js +1 -37
  308. package/dist/esm/hooks/useShapes/area/index.js +2 -1
  309. package/dist/esm/hooks/useShapes/area/prepare-data.d.ts +2 -2
  310. package/dist/esm/hooks/useShapes/area/prepare-data.js +2 -2
  311. package/dist/esm/hooks/useShapes/bar-x/index.js +2 -1
  312. package/dist/esm/hooks/useShapes/bar-x/prepare-data.d.ts +2 -2
  313. package/dist/esm/hooks/useShapes/bar-x/prepare-data.js +2 -2
  314. package/dist/esm/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
  315. package/dist/esm/hooks/useShapes/bar-y/prepare-data.js +2 -2
  316. package/dist/esm/hooks/useShapes/funnel/index.js +2 -1
  317. package/dist/esm/hooks/useShapes/funnel/prepare-data.js +1 -1
  318. package/dist/esm/hooks/useShapes/funnel/types.d.ts +1 -1
  319. package/dist/esm/hooks/useShapes/heatmap/prepare-data.d.ts +1 -1
  320. package/dist/esm/hooks/useShapes/heatmap/prepare-data.js +1 -1
  321. package/dist/esm/hooks/useShapes/index.d.ts +3 -3
  322. package/dist/esm/hooks/useShapes/index.js +2 -2
  323. package/dist/esm/hooks/useShapes/line/index.js +2 -1
  324. package/dist/esm/hooks/useShapes/line/prepare-data.d.ts +2 -2
  325. package/dist/esm/hooks/useShapes/line/prepare-data.js +2 -2
  326. package/dist/esm/hooks/useShapes/line/types.d.ts +1 -1
  327. package/dist/esm/hooks/useShapes/marker.d.ts +1 -1
  328. package/dist/esm/hooks/useShapes/marker.js +3 -2
  329. package/dist/esm/hooks/useShapes/pie/index.js +2 -1
  330. package/dist/esm/hooks/useShapes/pie/prepare-data.js +3 -3
  331. package/dist/esm/hooks/useShapes/radar/prepare-data.js +2 -2
  332. package/dist/esm/hooks/useShapes/sankey/prepare-data.js +1 -1
  333. package/dist/esm/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
  334. package/dist/esm/hooks/useShapes/scatter/prepare-data.js +1 -1
  335. package/dist/esm/hooks/useShapes/treemap/prepare-data.js +3 -3
  336. package/dist/esm/hooks/useShapes/utils.d.ts +1 -1
  337. package/dist/esm/hooks/useShapes/utils.js +1 -1
  338. package/dist/esm/hooks/useShapes/waterfall/index.js +3 -2
  339. package/dist/esm/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
  340. package/dist/esm/hooks/useShapes/waterfall/prepare-data.js +2 -2
  341. package/dist/esm/hooks/useZoom/index.d.ts +2 -2
  342. package/dist/esm/hooks/useZoom/utils.d.ts +2 -2
  343. package/dist/esm/hooks/useZoom/utils.js +1 -1
  344. package/dist/esm/hooks/utils/bar-y.d.ts +1 -1
  345. package/dist/esm/hooks/utils/bar-y.js +1 -1
  346. package/dist/esm/hooks/utils/get-band-size.js +1 -1
  347. package/dist/esm/index.d.ts +3 -2
  348. package/dist/esm/index.js +3 -2
  349. package/dist/esm/types/chart-ui.d.ts +1 -1
  350. package/dist/esm/types/index.d.ts +1 -96
  351. package/dist/esm/types/index.js +1 -24
  352. package/dist/esm/utils/chart-ui/pie-center-text.js +2 -2
  353. package/dist/esm/utils/index.d.ts +0 -3
  354. package/dist/esm/utils/index.js +0 -3
  355. package/package.json +2 -1
  356. package/dist/cjs/types/formatter.d.ts +0 -13
  357. package/dist/esm/types/formatter.d.ts +0 -13
  358. /package/dist/cjs/{hooks/useAxis → core/axes}/range-slider.d.ts +0 -0
  359. /package/dist/cjs/{hooks/useAxisScales → core/axes}/types.js +0 -0
  360. /package/dist/cjs/{hooks/useAxis → core/axes}/utils.d.ts +0 -0
  361. /package/dist/cjs/{hooks/useAxis → core/axes}/x-axis.d.ts +0 -0
  362. /package/dist/cjs/{constants → core/constants}/axis.d.ts +0 -0
  363. /package/dist/cjs/{constants → core/constants}/axis.js +0 -0
  364. /package/dist/cjs/{constants → core/constants}/chart-types.d.ts +0 -0
  365. /package/dist/cjs/{constants → core/constants}/chart-types.js +0 -0
  366. /package/dist/cjs/{constants → core/constants}/datetime.d.ts +0 -0
  367. /package/dist/cjs/{constants → core/constants}/datetime.js +0 -0
  368. /package/dist/cjs/{constants → core/constants}/defaults/axis.d.ts +0 -0
  369. /package/dist/cjs/{constants → core/constants}/defaults/axis.js +0 -0
  370. /package/dist/cjs/{constants → core/constants}/defaults/brush.d.ts +0 -0
  371. /package/dist/cjs/{constants → core/constants}/defaults/brush.js +0 -0
  372. /package/dist/cjs/{constants → core/constants}/defaults/data-labels.d.ts +0 -0
  373. /package/dist/cjs/{constants → core/constants}/defaults/data-labels.js +0 -0
  374. /package/dist/cjs/{constants → core/constants}/defaults/index.d.ts +0 -0
  375. /package/dist/cjs/{constants → core/constants}/defaults/index.js +0 -0
  376. /package/dist/cjs/{constants → core/constants}/defaults/legend.d.ts +0 -0
  377. /package/dist/cjs/{constants → core/constants}/defaults/legend.js +0 -0
  378. /package/dist/cjs/{constants → core/constants}/defaults/series-options.d.ts +0 -0
  379. /package/dist/cjs/{constants → core/constants}/defaults/series-options.js +0 -0
  380. /package/dist/cjs/{constants → core/constants}/index.d.ts +0 -0
  381. /package/dist/cjs/{constants → core/constants}/index.js +0 -0
  382. /package/dist/cjs/{constants → core/constants}/layout-algorithms.d.ts +0 -0
  383. /package/dist/cjs/{constants → core/constants}/layout-algorithms.js +0 -0
  384. /package/dist/cjs/{constants → core/constants}/line-styles.d.ts +0 -0
  385. /package/dist/cjs/{constants → core/constants}/line-styles.js +0 -0
  386. /package/dist/cjs/{constants → core/constants}/misc.d.ts +0 -0
  387. /package/dist/cjs/{constants → core/constants}/misc.js +0 -0
  388. /package/dist/cjs/{constants → core/constants}/palette.d.ts +0 -0
  389. /package/dist/cjs/{constants → core/constants}/palette.js +0 -0
  390. /package/dist/cjs/{constants → core/constants}/symbol-types.d.ts +0 -0
  391. /package/dist/cjs/{constants → core/constants}/symbol-types.js +0 -0
  392. /package/dist/cjs/{constants → core/constants}/tooltip.d.ts +0 -0
  393. /package/dist/cjs/{constants → core/constants}/tooltip.js +0 -0
  394. /package/dist/cjs/{constants → core/constants}/typography.d.ts +0 -0
  395. /package/dist/cjs/{constants → core/constants}/typography.js +0 -0
  396. /package/dist/cjs/{constants → core/constants}/zoom.d.ts +0 -0
  397. /package/dist/cjs/{constants → core/constants}/zoom.js +0 -0
  398. /package/dist/cjs/{i18n → core/i18n}/index.d.ts +0 -0
  399. /package/dist/cjs/{i18n → core/i18n}/index.js +0 -0
  400. /package/dist/cjs/{i18n → core/i18n}/keysets/en.json +0 -0
  401. /package/dist/cjs/{i18n → core/i18n}/keysets/ru.json +0 -0
  402. /package/dist/cjs/{hooks/useSplit/types.d.ts → core/layout/split-types.d.ts} +0 -0
  403. /package/dist/cjs/{hooks/useSplit/types.js → core/layout/split-types.js} +0 -0
  404. /package/dist/cjs/{hooks/useAxisScales → core/scales}/types.d.ts +0 -0
  405. /package/dist/cjs/{utils/chart → core/scales}/types.js +0 -0
  406. /package/dist/cjs/{hooks/useSeries → core/series}/constants.js +0 -0
  407. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-x.d.ts +0 -0
  408. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-y.d.ts +0 -0
  409. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-funnel.d.ts +0 -0
  410. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-heatmap.d.ts +0 -0
  411. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-options.d.ts +0 -0
  412. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-pie.d.ts +0 -0
  413. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-sankey.d.ts +0 -0
  414. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-scatter.d.ts +0 -0
  415. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-treemap.d.ts +0 -0
  416. /package/dist/cjs/{hooks/useSeries → core/series}/prepare-waterfall.d.ts +0 -0
  417. /package/dist/cjs/{hooks/useSeries → core/series}/prepareSeries.d.ts +0 -0
  418. /package/dist/cjs/{hooks/useSeries → core/series}/prepareSeries.js +0 -0
  419. /package/dist/{esm/hooks/useAxisScales → cjs/core/series}/types.js +0 -0
  420. /package/dist/cjs/{types → core/types}/chart/area.d.ts +0 -0
  421. /package/dist/cjs/{types → core/types}/chart/area.js +0 -0
  422. /package/dist/cjs/{types → core/types}/chart/axis.d.ts +0 -0
  423. /package/dist/cjs/{types → core/types}/chart/axis.js +0 -0
  424. /package/dist/cjs/{types → core/types}/chart/bar-x.d.ts +0 -0
  425. /package/dist/cjs/{types → core/types}/chart/bar-x.js +0 -0
  426. /package/dist/cjs/{types → core/types}/chart/bar-y.d.ts +0 -0
  427. /package/dist/cjs/{types → core/types}/chart/bar-y.js +0 -0
  428. /package/dist/cjs/{types → core/types}/chart/base.js +0 -0
  429. /package/dist/cjs/{types → core/types}/chart/brush.d.ts +0 -0
  430. /package/dist/cjs/{types → core/types}/chart/brush.js +0 -0
  431. /package/dist/cjs/{types → core/types}/chart/chart.d.ts +0 -0
  432. /package/dist/cjs/{types → core/types}/chart/chart.js +0 -0
  433. /package/dist/cjs/{types → core/types}/chart/funnel.d.ts +0 -0
  434. /package/dist/cjs/{types → core/types}/chart/funnel.js +0 -0
  435. /package/dist/cjs/{types → core/types}/chart/halo.d.ts +0 -0
  436. /package/dist/cjs/{types → core/types}/chart/halo.js +0 -0
  437. /package/dist/cjs/{types → core/types}/chart/heatmap.d.ts +0 -0
  438. /package/dist/cjs/{types → core/types}/chart/heatmap.js +0 -0
  439. /package/dist/cjs/{types → core/types}/chart/legend.d.ts +0 -0
  440. /package/dist/cjs/{types → core/types}/chart/legend.js +0 -0
  441. /package/dist/cjs/{types → core/types}/chart/line.d.ts +0 -0
  442. /package/dist/cjs/{types → core/types}/chart/line.js +0 -0
  443. /package/dist/cjs/{types → core/types}/chart/marker.d.ts +0 -0
  444. /package/dist/cjs/{types → core/types}/chart/marker.js +0 -0
  445. /package/dist/cjs/{types → core/types}/chart/pie.d.ts +0 -0
  446. /package/dist/cjs/{types → core/types}/chart/pie.js +0 -0
  447. /package/dist/cjs/{types → core/types}/chart/radar.d.ts +0 -0
  448. /package/dist/cjs/{types → core/types}/chart/radar.js +0 -0
  449. /package/dist/cjs/{types → core/types}/chart/sankey.d.ts +0 -0
  450. /package/dist/cjs/{types → core/types}/chart/sankey.js +0 -0
  451. /package/dist/cjs/{types → core/types}/chart/scatter.d.ts +0 -0
  452. /package/dist/cjs/{types → core/types}/chart/scatter.js +0 -0
  453. /package/dist/cjs/{types → core/types}/chart/series.d.ts +0 -0
  454. /package/dist/cjs/{types → core/types}/chart/series.js +0 -0
  455. /package/dist/cjs/{types → core/types}/chart/split.d.ts +0 -0
  456. /package/dist/cjs/{types → core/types}/chart/split.js +0 -0
  457. /package/dist/cjs/{types → core/types}/chart/title.d.ts +0 -0
  458. /package/dist/cjs/{types → core/types}/chart/title.js +0 -0
  459. /package/dist/cjs/{types → core/types}/chart/tooltip.js +0 -0
  460. /package/dist/cjs/{types → core/types}/chart/treemap.d.ts +0 -0
  461. /package/dist/cjs/{types → core/types}/chart/treemap.js +0 -0
  462. /package/dist/cjs/{types → core/types}/chart/waterfall.d.ts +0 -0
  463. /package/dist/cjs/{types → core/types}/chart/waterfall.js +0 -0
  464. /package/dist/cjs/{types → core/types}/chart/zoom.d.ts +0 -0
  465. /package/dist/cjs/{types → core/types}/chart/zoom.js +0 -0
  466. /package/dist/cjs/{types → core/types}/formatter.js +0 -0
  467. /package/dist/cjs/{types → core/types}/misc.d.ts +0 -0
  468. /package/dist/cjs/{types → core/types}/misc.js +0 -0
  469. /package/dist/cjs/{utils/chart → core/utils}/array.d.ts +0 -0
  470. /package/dist/cjs/{utils/chart → core/utils}/array.js +0 -0
  471. /package/dist/cjs/{utils/chart → core/utils}/axis/common.d.ts +0 -0
  472. /package/dist/cjs/{utils/chart → core/utils}/axis/common.js +0 -0
  473. /package/dist/cjs/{utils/chart → core/utils}/axis/x-axis.d.ts +0 -0
  474. /package/dist/cjs/{utils/chart → core/utils}/axis/x-axis.js +0 -0
  475. /package/dist/cjs/{utils/chart → core/utils}/axis-generators/bottom.d.ts +0 -0
  476. /package/dist/cjs/{utils/chart → core/utils}/axis-generators/bottom.js +0 -0
  477. /package/dist/cjs/{utils/chart → core/utils}/axis-generators/index.d.ts +0 -0
  478. /package/dist/cjs/{utils/chart → core/utils}/axis-generators/index.js +0 -0
  479. /package/dist/cjs/{utils/chart → core/utils}/color.d.ts +0 -0
  480. /package/dist/cjs/{utils/chart → core/utils}/color.js +0 -0
  481. /package/dist/cjs/{utils/chart → core/utils}/common.d.ts +0 -0
  482. /package/dist/cjs/{utils → core/utils}/dispatcher.d.ts +0 -0
  483. /package/dist/cjs/{utils → core/utils}/dispatcher.js +0 -0
  484. /package/dist/cjs/{utils/chart → core/utils}/get-closest-data.d.ts +0 -0
  485. /package/dist/cjs/{utils/chart → core/utils}/get-hovered-plots.js +0 -0
  486. /package/dist/cjs/{utils/chart → core/utils}/labels.d.ts +0 -0
  487. /package/dist/cjs/{utils/chart → core/utils}/labels.js +0 -0
  488. /package/dist/cjs/{utils/chart → core/utils}/legend.d.ts +0 -0
  489. /package/dist/cjs/{utils/chart → core/utils}/legend.js +0 -0
  490. /package/dist/cjs/{utils/chart → core/utils}/math.d.ts +0 -0
  491. /package/dist/cjs/{utils/chart → core/utils}/math.js +0 -0
  492. /package/dist/cjs/{utils → core/utils}/misc.d.ts +0 -0
  493. /package/dist/cjs/{utils → core/utils}/misc.js +0 -0
  494. /package/dist/cjs/{utils/chart → core/utils}/series/index.d.ts +0 -0
  495. /package/dist/cjs/{utils/chart → core/utils}/series/index.js +0 -0
  496. /package/dist/cjs/{utils/chart → core/utils}/series/line.js +0 -0
  497. /package/dist/cjs/{utils/chart → core/utils}/series/sorting.d.ts +0 -0
  498. /package/dist/cjs/{utils/chart → core/utils}/series/waterfall.d.ts +0 -0
  499. /package/dist/cjs/{utils/chart → core/utils}/series/waterfall.js +0 -0
  500. /package/dist/cjs/{utils/chart → core/utils}/series-type-guards.d.ts +0 -0
  501. /package/dist/cjs/{utils/chart → core/utils}/series-type-guards.js +0 -0
  502. /package/dist/cjs/{utils/chart → core/utils}/text.d.ts +0 -0
  503. /package/dist/cjs/{utils/chart → core/utils}/ticks/datetime.d.ts +0 -0
  504. /package/dist/cjs/{utils/chart → core/utils}/ticks/index.d.ts +0 -0
  505. /package/dist/cjs/{utils/chart → core/utils}/ticks/index.js +0 -0
  506. /package/dist/cjs/{utils/chart → core/utils}/time.d.ts +0 -0
  507. /package/dist/cjs/{utils/chart → core/utils}/time.js +0 -0
  508. /package/dist/cjs/{utils/chart → core/utils}/tooltip.d.ts +0 -0
  509. /package/dist/cjs/{utils/chart → core/utils}/tooltip.js +0 -0
  510. /package/dist/cjs/{utils/chart → core/utils}/types.d.ts +0 -0
  511. /package/dist/{esm/hooks/useSplit → cjs/core/utils}/types.js +0 -0
  512. /package/dist/cjs/{validation → core/validation}/index.d.ts +0 -0
  513. /package/dist/cjs/{validation → core/validation}/validate-axes.d.ts +0 -0
  514. /package/dist/esm/{hooks/useAxis → core/axes}/range-slider.d.ts +0 -0
  515. /package/dist/esm/{utils/chart → core/axes}/types.js +0 -0
  516. /package/dist/esm/{hooks/useAxis → core/axes}/utils.d.ts +0 -0
  517. /package/dist/esm/{hooks/useAxis → core/axes}/x-axis.d.ts +0 -0
  518. /package/dist/esm/{constants → core/constants}/axis.d.ts +0 -0
  519. /package/dist/esm/{constants → core/constants}/axis.js +0 -0
  520. /package/dist/esm/{constants → core/constants}/chart-types.d.ts +0 -0
  521. /package/dist/esm/{constants → core/constants}/chart-types.js +0 -0
  522. /package/dist/esm/{constants → core/constants}/datetime.d.ts +0 -0
  523. /package/dist/esm/{constants → core/constants}/datetime.js +0 -0
  524. /package/dist/esm/{constants → core/constants}/defaults/axis.d.ts +0 -0
  525. /package/dist/esm/{constants → core/constants}/defaults/axis.js +0 -0
  526. /package/dist/esm/{constants → core/constants}/defaults/brush.d.ts +0 -0
  527. /package/dist/esm/{constants → core/constants}/defaults/brush.js +0 -0
  528. /package/dist/esm/{constants → core/constants}/defaults/data-labels.d.ts +0 -0
  529. /package/dist/esm/{constants → core/constants}/defaults/data-labels.js +0 -0
  530. /package/dist/esm/{constants → core/constants}/defaults/index.d.ts +0 -0
  531. /package/dist/esm/{constants → core/constants}/defaults/index.js +0 -0
  532. /package/dist/esm/{constants → core/constants}/defaults/legend.d.ts +0 -0
  533. /package/dist/esm/{constants → core/constants}/defaults/legend.js +0 -0
  534. /package/dist/esm/{constants → core/constants}/defaults/series-options.d.ts +0 -0
  535. /package/dist/esm/{constants → core/constants}/defaults/series-options.js +0 -0
  536. /package/dist/esm/{constants → core/constants}/index.d.ts +0 -0
  537. /package/dist/esm/{constants → core/constants}/index.js +0 -0
  538. /package/dist/esm/{constants → core/constants}/layout-algorithms.d.ts +0 -0
  539. /package/dist/esm/{constants → core/constants}/layout-algorithms.js +0 -0
  540. /package/dist/esm/{constants → core/constants}/line-styles.d.ts +0 -0
  541. /package/dist/esm/{constants → core/constants}/line-styles.js +0 -0
  542. /package/dist/esm/{constants → core/constants}/misc.d.ts +0 -0
  543. /package/dist/esm/{constants → core/constants}/misc.js +0 -0
  544. /package/dist/esm/{constants → core/constants}/palette.d.ts +0 -0
  545. /package/dist/esm/{constants → core/constants}/palette.js +0 -0
  546. /package/dist/esm/{constants → core/constants}/symbol-types.d.ts +0 -0
  547. /package/dist/esm/{constants → core/constants}/symbol-types.js +0 -0
  548. /package/dist/esm/{constants → core/constants}/tooltip.d.ts +0 -0
  549. /package/dist/esm/{constants → core/constants}/tooltip.js +0 -0
  550. /package/dist/esm/{constants → core/constants}/typography.d.ts +0 -0
  551. /package/dist/esm/{constants → core/constants}/typography.js +0 -0
  552. /package/dist/esm/{constants → core/constants}/zoom.d.ts +0 -0
  553. /package/dist/esm/{constants → core/constants}/zoom.js +0 -0
  554. /package/dist/esm/{i18n → core/i18n}/index.d.ts +0 -0
  555. /package/dist/esm/{i18n → core/i18n}/index.js +0 -0
  556. /package/dist/esm/{i18n → core/i18n}/keysets/en.json +0 -0
  557. /package/dist/esm/{i18n → core/i18n}/keysets/ru.json +0 -0
  558. /package/dist/esm/{hooks/useSplit/types.d.ts → core/layout/split-types.d.ts} +0 -0
  559. /package/dist/esm/{types/chart/area.js → core/layout/split-types.js} +0 -0
  560. /package/dist/esm/{hooks/useAxisScales → core/scales}/types.d.ts +0 -0
  561. /package/dist/esm/{types/chart/axis.js → core/scales/types.js} +0 -0
  562. /package/dist/esm/{hooks/useSeries → core/series}/constants.js +0 -0
  563. /package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-x.d.ts +0 -0
  564. /package/dist/esm/{hooks/useSeries → core/series}/prepare-funnel.d.ts +0 -0
  565. /package/dist/esm/{hooks/useSeries → core/series}/prepare-heatmap.d.ts +0 -0
  566. /package/dist/esm/{hooks/useSeries → core/series}/prepare-options.d.ts +0 -0
  567. /package/dist/esm/{hooks/useSeries → core/series}/prepare-pie.d.ts +0 -0
  568. /package/dist/esm/{hooks/useSeries → core/series}/prepare-sankey.d.ts +0 -0
  569. /package/dist/esm/{hooks/useSeries → core/series}/prepare-scatter.d.ts +0 -0
  570. /package/dist/esm/{hooks/useSeries → core/series}/prepare-treemap.d.ts +0 -0
  571. /package/dist/esm/{hooks/useSeries → core/series}/prepare-waterfall.d.ts +0 -0
  572. /package/dist/esm/{hooks/useSeries → core/series}/prepareSeries.d.ts +0 -0
  573. /package/dist/esm/{hooks/useSeries → core/series}/prepareSeries.js +0 -0
  574. /package/dist/esm/{types/chart/bar-x.js → core/series/types.js} +0 -0
  575. /package/dist/esm/{types → core/types}/chart/area.d.ts +0 -0
  576. /package/dist/esm/{types/chart/bar-y.js → core/types/chart/area.js} +0 -0
  577. /package/dist/esm/{types → core/types}/chart/axis.d.ts +0 -0
  578. /package/dist/esm/{types/chart/base.js → core/types/chart/axis.js} +0 -0
  579. /package/dist/esm/{types → core/types}/chart/bar-x.d.ts +0 -0
  580. /package/dist/esm/{types/chart/brush.js → core/types/chart/bar-x.js} +0 -0
  581. /package/dist/esm/{types → core/types}/chart/bar-y.d.ts +0 -0
  582. /package/dist/esm/{types/chart/chart.js → core/types/chart/bar-y.js} +0 -0
  583. /package/dist/esm/{types/chart/funnel.js → core/types/chart/base.js} +0 -0
  584. /package/dist/esm/{types → core/types}/chart/brush.d.ts +0 -0
  585. /package/dist/esm/{types/chart/halo.js → core/types/chart/brush.js} +0 -0
  586. /package/dist/esm/{types → core/types}/chart/chart.d.ts +0 -0
  587. /package/dist/esm/{types/chart/heatmap.js → core/types/chart/chart.js} +0 -0
  588. /package/dist/esm/{types → core/types}/chart/funnel.d.ts +0 -0
  589. /package/dist/esm/{types/chart/legend.js → core/types/chart/funnel.js} +0 -0
  590. /package/dist/esm/{types → core/types}/chart/halo.d.ts +0 -0
  591. /package/dist/esm/{types/chart/line.js → core/types/chart/halo.js} +0 -0
  592. /package/dist/esm/{types → core/types}/chart/heatmap.d.ts +0 -0
  593. /package/dist/esm/{types/chart/marker.js → core/types/chart/heatmap.js} +0 -0
  594. /package/dist/esm/{types → core/types}/chart/legend.d.ts +0 -0
  595. /package/dist/esm/{types/chart/pie.js → core/types/chart/legend.js} +0 -0
  596. /package/dist/esm/{types → core/types}/chart/line.d.ts +0 -0
  597. /package/dist/esm/{types/chart/radar.js → core/types/chart/line.js} +0 -0
  598. /package/dist/esm/{types → core/types}/chart/marker.d.ts +0 -0
  599. /package/dist/esm/{types/chart/sankey.js → core/types/chart/marker.js} +0 -0
  600. /package/dist/esm/{types → core/types}/chart/pie.d.ts +0 -0
  601. /package/dist/esm/{types/chart/scatter.js → core/types/chart/pie.js} +0 -0
  602. /package/dist/esm/{types → core/types}/chart/radar.d.ts +0 -0
  603. /package/dist/esm/{types/chart/series.js → core/types/chart/radar.js} +0 -0
  604. /package/dist/esm/{types → core/types}/chart/sankey.d.ts +0 -0
  605. /package/dist/esm/{types/chart/split.js → core/types/chart/sankey.js} +0 -0
  606. /package/dist/esm/{types → core/types}/chart/scatter.d.ts +0 -0
  607. /package/dist/esm/{types/chart/title.js → core/types/chart/scatter.js} +0 -0
  608. /package/dist/esm/{types → core/types}/chart/series.d.ts +0 -0
  609. /package/dist/esm/{types/chart/tooltip.js → core/types/chart/series.js} +0 -0
  610. /package/dist/esm/{types → core/types}/chart/split.d.ts +0 -0
  611. /package/dist/esm/{types/chart/treemap.js → core/types/chart/split.js} +0 -0
  612. /package/dist/esm/{types → core/types}/chart/title.d.ts +0 -0
  613. /package/dist/esm/{types/chart/waterfall.js → core/types/chart/title.js} +0 -0
  614. /package/dist/esm/{types/chart/zoom.js → core/types/chart/tooltip.js} +0 -0
  615. /package/dist/esm/{types → core/types}/chart/treemap.d.ts +0 -0
  616. /package/dist/esm/{types/formatter.js → core/types/chart/treemap.js} +0 -0
  617. /package/dist/esm/{types → core/types}/chart/waterfall.d.ts +0 -0
  618. /package/dist/esm/{types/misc.js → core/types/chart/waterfall.js} +0 -0
  619. /package/dist/esm/{types → core/types}/chart/zoom.d.ts +0 -0
  620. /package/dist/esm/{types → core/types}/misc.d.ts +0 -0
  621. /package/dist/esm/{utils/chart → core/utils}/array.d.ts +0 -0
  622. /package/dist/esm/{utils/chart → core/utils}/array.js +0 -0
  623. /package/dist/esm/{utils/chart → core/utils}/axis/common.d.ts +0 -0
  624. /package/dist/esm/{utils/chart → core/utils}/axis/common.js +0 -0
  625. /package/dist/esm/{utils/chart → core/utils}/axis/x-axis.d.ts +0 -0
  626. /package/dist/esm/{utils/chart → core/utils}/axis/x-axis.js +0 -0
  627. /package/dist/esm/{utils/chart → core/utils}/axis-generators/bottom.d.ts +0 -0
  628. /package/dist/esm/{utils/chart → core/utils}/axis-generators/bottom.js +0 -0
  629. /package/dist/esm/{utils/chart → core/utils}/axis-generators/index.d.ts +0 -0
  630. /package/dist/esm/{utils/chart → core/utils}/axis-generators/index.js +0 -0
  631. /package/dist/esm/{utils/chart → core/utils}/color.d.ts +0 -0
  632. /package/dist/esm/{utils/chart → core/utils}/color.js +0 -0
  633. /package/dist/esm/{utils/chart → core/utils}/common.d.ts +0 -0
  634. /package/dist/esm/{utils → core/utils}/dispatcher.d.ts +0 -0
  635. /package/dist/esm/{utils → core/utils}/dispatcher.js +0 -0
  636. /package/dist/esm/{utils/chart → core/utils}/get-closest-data.d.ts +0 -0
  637. /package/dist/esm/{utils/chart → core/utils}/get-hovered-plots.js +0 -0
  638. /package/dist/esm/{utils/chart → core/utils}/labels.d.ts +0 -0
  639. /package/dist/esm/{utils/chart → core/utils}/labels.js +0 -0
  640. /package/dist/esm/{utils/chart → core/utils}/legend.d.ts +0 -0
  641. /package/dist/esm/{utils/chart → core/utils}/legend.js +0 -0
  642. /package/dist/esm/{utils/chart → core/utils}/math.d.ts +0 -0
  643. /package/dist/esm/{utils/chart → core/utils}/math.js +0 -0
  644. /package/dist/esm/{utils → core/utils}/misc.d.ts +0 -0
  645. /package/dist/esm/{utils → core/utils}/misc.js +0 -0
  646. /package/dist/esm/{utils/chart → core/utils}/series/index.d.ts +0 -0
  647. /package/dist/esm/{utils/chart → core/utils}/series/index.js +0 -0
  648. /package/dist/esm/{utils/chart → core/utils}/series/line.js +0 -0
  649. /package/dist/esm/{utils/chart → core/utils}/series/sorting.d.ts +0 -0
  650. /package/dist/esm/{utils/chart → core/utils}/series/waterfall.d.ts +0 -0
  651. /package/dist/esm/{utils/chart → core/utils}/series/waterfall.js +0 -0
  652. /package/dist/esm/{utils/chart → core/utils}/series-type-guards.d.ts +0 -0
  653. /package/dist/esm/{utils/chart → core/utils}/series-type-guards.js +0 -0
  654. /package/dist/esm/{utils/chart → core/utils}/text.d.ts +0 -0
  655. /package/dist/esm/{utils/chart → core/utils}/ticks/datetime.d.ts +0 -0
  656. /package/dist/esm/{utils/chart → core/utils}/ticks/index.d.ts +0 -0
  657. /package/dist/esm/{utils/chart → core/utils}/ticks/index.js +0 -0
  658. /package/dist/esm/{utils/chart → core/utils}/time.d.ts +0 -0
  659. /package/dist/esm/{utils/chart → core/utils}/time.js +0 -0
  660. /package/dist/esm/{utils/chart → core/utils}/tooltip.js +0 -0
  661. /package/dist/esm/{utils/chart → core/utils}/types.d.ts +0 -0
  662. /package/dist/esm/{validation → core/validation}/index.d.ts +0 -0
  663. /package/dist/esm/{validation → core/validation}/validate-axes.d.ts +0 -0
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { select } from 'd3-selection';
3
3
  import { line } from 'd3-shape';
4
+ import { getLineDashArray } from '../../core/utils';
4
5
  import { HtmlLayer } from '../../hooks/useShapes/HtmlLayer';
5
- import { block, getLineDashArray } from '../../utils';
6
+ import { block } from '../../utils';
6
7
  import './styles.css';
7
8
  const b = block('x-axis');
8
9
  export const AxisX = (props) => {
@@ -1,6 +1,6 @@
1
1
  import { getUniqId } from '@gravity-ui/uikit';
2
- import { calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, } from '../../utils';
3
- import { getXAxisTickValues } from '../../utils/chart/axis/x-axis';
2
+ import { calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, } from '../../core/utils';
3
+ import { getXAxisTickValues } from '../../core/utils/axis/x-axis';
4
4
  import { getMultilineTitleContentRows } from '../utils/axis-title';
5
5
  async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxWidth, axisWidth, boundsOffsetLeft, boundsOffsetRight, }) {
6
6
  var _a;
@@ -1,4 +1,4 @@
1
- import type { DashStyle } from 'src/constants';
1
+ import type { DashStyle } from 'src/core/constants';
2
2
  import type { BaseTextStyle, HtmlItem, PlotLayerPlacement, PointPosition } from '../../types';
3
3
  import type { TextRowData } from '../types';
4
4
  export type AxisSvgLabelData = {
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { select } from 'd3-selection';
3
3
  import { line } from 'd3-shape';
4
+ import { getLineDashArray } from '../../core/utils';
4
5
  import { HtmlLayer } from '../../hooks/useShapes/HtmlLayer';
5
- import { block, getLineDashArray } from '../../utils';
6
+ import { block } from '../../utils';
6
7
  import './styles.css';
7
8
  const b = block('y-axis');
8
9
  export const AxisY = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { getUniqId } from '@gravity-ui/uikit';
2
- import { calculateCos, calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, wrapText, } from '../../utils';
2
+ import { calculateCos, calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, wrapText, } from '../../core/utils';
3
3
  import { prepareHtmlYAxisTitle, prepareSvgYAxisTitle } from './prepare-axis-title';
4
4
  import { getTickValues } from './utils';
5
5
  async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxHeight, topOffset, }) {
@@ -1,4 +1,4 @@
1
- import { calculateCos, calculateSin, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '../../utils';
1
+ import { calculateCos, calculateSin, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '../../core/utils';
2
2
  import { getMultilineTitleContentRows } from '../utils/axis-title';
3
3
  export async function prepareSvgYAxisTitle({ axis, axisTop, axisHeight, axisWidth, axisLabelsWidth, }) {
4
4
  if (!axis.title.text || axis.title.html) {
@@ -1,4 +1,4 @@
1
- import type { DashStyle } from 'src/constants';
1
+ import type { DashStyle } from 'src/core/constants';
2
2
  import type { BaseTextStyle, HtmlItem, PlotLayerPlacement, PointPosition } from '../../types';
3
3
  import type { TextRowData } from '../types';
4
4
  export type AxisSvgLabelData = {
@@ -1,4 +1,4 @@
1
- import { getDomainDataYBySeries, getMinSpaceBetween, getTicksCountByPixelInterval, isBandScale, thinOut, } from '../../utils';
1
+ import { getDomainDataYBySeries, getMinSpaceBetween, getTicksCountByPixelInterval, isBandScale, thinOut, } from '../../core/utils';
2
2
  export function getTickValues({ scale, axis, labelLineHeight, series, }) {
3
3
  if ('ticks' in scale && typeof scale.ticks === 'function') {
4
4
  const range = scale.range();
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { ArrowRotateLeft } from '@gravity-ui/icons';
3
3
  import { Button, ButtonIcon, useUniqId } from '@gravity-ui/uikit';
4
+ import { getPreparedRangeSlider } from '../../core/axes/range-slider';
5
+ import { EventType, getDispatcher, isBandScale } from '../../core/utils';
4
6
  import { useCrosshair, usePrevious } from '../../hooks';
5
- import { getPreparedRangeSlider } from '../../hooks/useAxis/range-slider';
6
7
  import { getClipPathIdByBounds } from '../../hooks/useShapes/utils';
7
- import { EventType, block, getDispatcher, isBandScale } from '../../utils';
8
+ import { block } from '../../utils';
8
9
  import { AxisX } from '../AxisX/AxisX';
9
10
  import { prepareXAxisData } from '../AxisX/prepare-axis-data';
10
11
  import { AxisY } from '../AxisY/AxisY';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Dispatch } from 'd3-dispatch';
3
+ import type { ChartScale } from '../../core/scales/types';
3
4
  import type { PreparedXAxis, PreparedYAxis, ShapeData } from '../../hooks';
4
- import type { ChartScale } from '../../hooks/useAxisScales/types';
5
5
  import type { useChartInnerState } from './useChartInnerState';
6
6
  type ChartInnerState = ReturnType<typeof useChartInnerState>;
7
7
  type Props = {
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  import { pointer } from 'd3-selection';
3
3
  import get from 'lodash/get';
4
4
  import throttle from 'lodash/throttle';
5
- import { IS_TOUCH_ENABLED } from '../../constants';
6
- import { EventType } from '../../utils';
7
- import { getClosestPoints } from '../../utils/chart/get-closest-data';
8
- import { getHoveredPlots } from '../../utils/chart/get-hovered-plots';
5
+ import { IS_TOUCH_ENABLED } from '../../core/constants';
6
+ import { EventType } from '../../core/utils';
7
+ import { getClosestPoints } from '../../core/utils/get-closest-data';
8
+ import { getHoveredPlots } from '../../core/utils/get-hovered-plots';
9
9
  export function useChartInnerHandlers(props) {
10
10
  const { boundsHeight, boundsOffsetLeft, boundsOffsetTop, boundsWidth, dispatcher, shapesData, svgContainer, togglePinTooltip, tooltipPinned, unpinTooltip, xAxis, yAxis, xScale, yScale, tooltipThrottle, } = props;
11
11
  const isOutsideBounds = React.useCallback((x, y) => {
@@ -29,7 +29,7 @@ export declare function useChartInnerProps(props: Props): {
29
29
  legendConfig?: LegendConfig | undefined;
30
30
  legendItems?: LegendItem[][] | undefined;
31
31
  preparedLegend?: PreparedLegend | undefined;
32
- preparedSeriesOptions?: import("../../constants").SeriesOptionsDefaults | undefined;
32
+ preparedSeriesOptions?: import("../../core/constants").SeriesOptionsDefaults | undefined;
33
33
  preparedSplit?: PreparedSplit | undefined;
34
34
  shapes?: React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
35
35
  xScale?: ChartScale | undefined;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import isEqual from 'lodash/isEqual';
3
- import { DEFAULT_PALETTE, SERIES_TYPE } from '../../constants';
3
+ import { DEFAULT_PALETTE, SERIES_TYPE } from '../../core/constants';
4
+ import { getLegendComponents, getPreparedLegend } from '../../core/series/prepare-legend';
5
+ import { getPreparedOptions } from '../../core/series/prepare-options';
6
+ import { getChartDimensions, getEffectiveXRange, getSortedSeriesData, getYAxisWidth, getZoomedSeriesData, isAxisRelatedSeries, } from '../../core/utils';
4
7
  import { createScales, getAxes, getPreparedSeries, getShapes, getSplit, getVisibleSeries, useZoom, } from '../../hooks';
5
- import { getLegendComponents, getPreparedLegend } from '../../hooks/useSeries/prepare-legend';
6
- import { getPreparedOptions } from '../../hooks/useSeries/prepare-options';
7
8
  import { getActiveLegendItems, getAllLegendItems } from '../../hooks/useSeries/utils';
8
- import { getChartDimensions, getEffectiveXRange, getSortedSeriesData, getYAxisWidth, getZoomedSeriesData, isAxisRelatedSeries, } from '../../utils';
9
9
  import { getNormalizedXAxis, getNormalizedYAxis, recalculateYAxisLabelsWidth } from './utils';
10
10
  import { hasAtLeastOneSeriesDataPerPlot } from './utils/common';
11
11
  const CLIP_PATH_BY_SERIES_TYPE = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import isEqual from 'lodash/isEqual';
3
- import { EventType, isMacintosh } from '../../utils';
3
+ import { EventType, isMacintosh } from '../../core/utils';
4
4
  export function useChartInnerState(props) {
5
5
  var _a, _b;
6
6
  const { dispatcher, preparedRangeSlider, tooltip } = props;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Dispatch } from 'd3-dispatch';
3
+ import type { ChartScale } from '../../core/scales/types';
3
4
  import type { PreparedXAxis, PreparedYAxis, ShapeData } from '../../hooks';
4
- import type { ChartScale } from '../../hooks/useAxisScales/types';
5
5
  type Props = {
6
6
  boundsHeight: number;
7
7
  boundsOffsetLeft: number;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import get from 'lodash/get';
3
- import { EventType } from '../../utils';
4
- import { getClosestPoints } from '../../utils/chart/get-closest-data';
5
- import { getHoveredPlots } from '../../utils/chart/get-hovered-plots';
6
- import { calculateNumericProperty } from '../../utils/chart/math';
3
+ import { EventType } from '../../core/utils';
4
+ import { getClosestPoints } from '../../core/utils/get-closest-data';
5
+ import { getHoveredPlots } from '../../core/utils/get-hovered-plots';
6
+ import { calculateNumericProperty } from '../../core/utils/math';
7
7
  export function useDefaultState(props) {
8
8
  const { boundsHeight, boundsOffsetLeft, boundsOffsetTop, boundsWidth, defaultState, dispatcher, shapesData, shapesReady, svgRef, xAxis, yAxis, xScale, yScale, } = props;
9
9
  const appliedRef = React.useRef(false);
@@ -1,6 +1,6 @@
1
+ import type { ChartScale } from '../../../core/scales/types';
2
+ import type { PreparedSeries } from '../../../core/series/types';
1
3
  import type { PreparedYAxis } from '../../../hooks';
2
- import type { ChartScale } from '../../../hooks/useAxisScales/types';
3
- import type { PreparedSeries } from '../../../hooks/useSeries/types';
4
4
  export declare function recalculateYAxisLabelsWidth(props: {
5
5
  seriesData: PreparedSeries[];
6
6
  yAxis: PreparedYAxis[];
@@ -1,5 +1,5 @@
1
1
  import get from 'lodash/get';
2
- import { getYAxisLabelMaxWidth } from '../../../hooks/useAxis/y-axis';
2
+ import { getYAxisLabelMaxWidth } from '../../../core/axes/y-axis';
3
3
  export async function recalculateYAxisLabelsWidth(props) {
4
4
  const { seriesData, yAxis, yScale } = props;
5
5
  const axisIndexesToRecalculateMap = new Map();
@@ -1,4 +1,4 @@
1
- import { getAxisCategories } from '../../../utils';
1
+ import { getAxisCategories } from '../../../core/utils';
2
2
  export function getNormalizedXAxis(props) {
3
3
  var _a;
4
4
  let categories = (_a = props.xAxis) === null || _a === void 0 ? void 0 : _a.categories;
@@ -1,5 +1,5 @@
1
1
  import get from 'lodash/get';
2
- import { getHorizontalSvgTextHeight } from '../../../utils';
2
+ import { getHorizontalSvgTextHeight } from '../../../core/utils';
3
3
  const DEFAULT_TITLE_FONT_SIZE = '15px';
4
4
  const TITLE_PADDINGS = 8 * 2;
5
5
  export const getPreparedTitle = ({ title, }) => {
@@ -1,5 +1,5 @@
1
1
  import get from 'lodash/get';
2
- import { getDefaultTooltipHeaderFormat } from '../../../utils/chart/tooltip';
2
+ import { getDefaultTooltipHeaderFormat } from '../../../core/utils/tooltip';
3
3
  export const getPreparedTooltip = (args) => {
4
4
  var _a, _b;
5
5
  const { tooltip, seriesData, yAxes, xAxis } = args;
@@ -1,4 +1,4 @@
1
- import type { ZoomType } from '../../../constants';
1
+ import type { ZoomType } from '../../../core/constants';
2
2
  import type { PreparedZoom } from '../../../hooks/types';
3
3
  import type { ChartSeries, ChartZoom } from '../../../types';
4
4
  export declare function getZoomType(args: {
@@ -1,6 +1,6 @@
1
1
  import intersection from 'lodash/intersection';
2
2
  import merge from 'lodash/merge';
3
- import { SERIES_TYPE, ZOOM_TYPE, brushDefaults } from '../../../constants';
3
+ import { SERIES_TYPE, ZOOM_TYPE, brushDefaults } from '../../../core/constants';
4
4
  function mapSeriesTypeToZoomType(seriesType) {
5
5
  switch (seriesType) {
6
6
  case SERIES_TYPE.Area: {
@@ -2,10 +2,11 @@ import React from 'react';
2
2
  import { scaleLinear } from 'd3-scale';
3
3
  import { select } from 'd3-selection';
4
4
  import { symbol } from 'd3-shape';
5
- import { CONTINUOUS_LEGEND_SIZE } from '../../constants';
5
+ import { CONTINUOUS_LEGEND_SIZE } from '../../core/constants';
6
+ import { createGradientRect, getContinuesColorFn, getLabelsSize, getSymbol, getUniqId, } from '../../core/utils';
7
+ import { axisBottom } from '../../core/utils/axis-generators';
6
8
  import { formatNumber } from '../../libs';
7
- import { block, createGradientRect, getContinuesColorFn, getLabelsSize, getSymbol, getUniqId, } from '../../utils';
8
- import { axisBottom } from '../../utils/chart/axis-generators';
9
+ import { block } from '../../utils';
9
10
  import { appendLinePathElement } from '../utils';
10
11
  import './styles.css';
11
12
  const b = block('legend');
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PreparedPlotTitle } from '../../hooks/useSplit/types';
2
+ import type { PreparedPlotTitle } from '../../core/layout/split-types';
3
3
  import './styles.css';
4
4
  type Props = {
5
5
  title?: PreparedPlotTitle;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { useUniqId } from '@gravity-ui/uikit';
3
+ import { isBandScale } from '../../core/utils';
3
4
  import { useBrush, useRangeSlider } from '../../hooks';
4
- import { block, isBandScale } from '../../utils';
5
+ import { block } from '../../utils';
5
6
  import { getInitialRangeSliderState } from '../utils';
6
7
  import { getFramedPath } from './utils';
7
8
  import './styles.css';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { getFormattedValue } from '../../../core/utils/format';
2
3
  import { block } from '../../../utils';
3
- import { getFormattedValue } from '../../../utils/chart/format';
4
4
  import { getBuiltInAggregatedValue, getBuiltInAggregationLabel } from './utils';
5
5
  const b = block('tooltip');
6
6
  export function RowWithAggregation(props) {
@@ -3,10 +3,10 @@ import { Divider } from '@gravity-ui/uikit';
3
3
  import parse from 'html-react-parser';
4
4
  import get from 'lodash/get';
5
5
  import isEqual from 'lodash/isEqual';
6
+ import { i18n } from '../../../core/i18n';
7
+ import { getFormattedValue } from '../../../core/utils/format';
6
8
  import { usePrevious } from '../../../hooks';
7
- import { i18n } from '../../../i18n';
8
9
  import { block } from '../../../utils';
9
- import { getFormattedValue } from '../../../utils/chart/format';
10
10
  import { Row } from './Row';
11
11
  import { RowWithAggregation } from './RowWithAggregation';
12
12
  import { getDefaultValueFormat, getHoveredValues, getMeasureValue, getPreparedAggregation, getTooltipRowColorSymbol, getXRowData, } from './utils';
@@ -1,8 +1,8 @@
1
1
  import { create } from 'd3-selection';
2
2
  import get from 'lodash/get';
3
- import { i18n } from '../../../i18n';
4
- import { getDataCategoryValue, getDefaultDateFormat } from '../../../utils';
5
- import { getFormattedValue } from '../../../utils/chart/format';
3
+ import { i18n } from '../../../core/i18n';
4
+ import { getDataCategoryValue, getDefaultDateFormat } from '../../../core/utils';
5
+ import { getFormattedValue } from '../../../core/utils/format';
6
6
  import { appendLinePathElement } from '../../utils';
7
7
  function getRowData(fieldName, data, axis) {
8
8
  switch (axis === null || axis === void 0 ? void 0 : axis.type) {
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { select } from 'd3-selection';
3
3
  import debounce from 'lodash/debounce';
4
- import { i18nFactory } from '../i18n';
5
- import { getUniqId } from '../utils';
6
- import { validateData } from '../validation';
4
+ import { i18nFactory } from '../core/i18n';
5
+ import { getUniqId } from '../core/utils';
6
+ import { validateData } from '../core/validation';
7
7
  import { ChartInner } from './ChartInner';
8
8
  export * from './Tooltip/ChartTooltipContent';
9
9
  export const Chart = React.forwardRef(function Chart(props, forwardedRef) {
@@ -1,4 +1,4 @@
1
- import { getTextSizeFn, getTextWithElipsis, wrapText } from '../../utils';
1
+ import { getTextSizeFn, getTextWithElipsis, wrapText } from '../../core/utils';
2
2
  export async function getMultilineTitleContentRows({ axis, titleMaxWidth, }) {
3
3
  const titleContent = [];
4
4
  const getTitleTextSize = getTextSizeFn({ style: axis.title.style });
@@ -1,4 +1,4 @@
1
- import type { DashStyle } from '../../constants';
1
+ import type { DashStyle } from '../../core/constants';
2
2
  import type { ChartScaleLinear, ChartScaleTime } from '../../hooks';
3
3
  import type { ChartAxisRangeSlider } from '../../types';
4
4
  export declare function getInitialRangeSliderState(args: {
@@ -1,7 +1,7 @@
1
1
  import { duration } from '@gravity-ui/date-utils';
2
2
  import { select } from 'd3-selection';
3
3
  import { line as lineGenerator } from 'd3-shape';
4
- import { getLineDashArray, isTimeScale } from '../../utils';
4
+ import { getLineDashArray, isTimeScale } from '../../core/utils';
5
5
  export function getInitialRangeSliderState(args) {
6
6
  const { defaultRange, xScale } = args;
7
7
  let minRange;
@@ -0,0 +1,5 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './range-slider';
4
+ export * from './x-axis';
5
+ export * from './y-axis';
@@ -0,0 +1,5 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './range-slider';
4
+ export * from './x-axis';
5
+ export * from './y-axis';
@@ -1,5 +1,5 @@
1
1
  import merge from 'lodash/merge';
2
- import { brushDefaults } from '../../constants';
2
+ import { brushDefaults } from '../constants';
3
3
  const DEFAULT_RANGE_SLIDER_HEIGHT = 40;
4
4
  const DEFAULT_RANGE_SLIDER_MARGIN = 10;
5
5
  export function getPreparedRangeSlider({ xAxis }) {
@@ -0,0 +1,84 @@
1
+ import type { AxisCrosshair, AxisPlotBand, BaseTextStyle, ChartAxis, ChartAxisLabels, ChartAxisRangeSlider, ChartAxisTitleAlignment, ChartAxisTitleRotation, ChartAxisType, DeepRequired, MeaningfulAny, PlotLayerPlacement } from '../../types';
2
+ import type { DashStyle } from '../constants';
3
+ type PreparedAxisLabels = Omit<ChartAxisLabels, 'enabled' | 'padding' | 'style' | 'autoRotation'> & Required<Pick<ChartAxisLabels, 'enabled' | 'padding' | 'margin' | 'rotation' | 'html'>> & {
4
+ style: BaseTextStyle;
5
+ rotation: number;
6
+ height: number;
7
+ width: number;
8
+ lineHeight: number;
9
+ maxWidth: number;
10
+ };
11
+ export type PreparedAxisPlotBand = Required<AxisPlotBand> & {
12
+ custom?: MeaningfulAny;
13
+ label: {
14
+ text: string;
15
+ style: BaseTextStyle;
16
+ padding: number;
17
+ qa?: string;
18
+ };
19
+ };
20
+ type PreparedAxisCrosshair = Required<AxisCrosshair>;
21
+ export type PreparedAxisPlotLine = {
22
+ value: number;
23
+ color: string;
24
+ width: number;
25
+ dashStyle: DashStyle;
26
+ opacity: number;
27
+ layerPlacement: PlotLayerPlacement;
28
+ custom?: MeaningfulAny;
29
+ label: {
30
+ text: string;
31
+ style: BaseTextStyle;
32
+ padding: number;
33
+ qa?: string;
34
+ };
35
+ };
36
+ export type PreparedRangeSlider = DeepRequired<Omit<ChartAxisRangeSlider, 'defaultRange'>> & {
37
+ defaultRange?: ChartAxisRangeSlider['defaultRange'];
38
+ };
39
+ export type PreparedAxisTickMarks = {
40
+ enabled: boolean;
41
+ length: number;
42
+ };
43
+ type PreparedBaseAxis = Omit<ChartAxis, 'type' | 'labels' | 'plotLines' | 'plotBands'> & {
44
+ type: ChartAxisType;
45
+ labels: PreparedAxisLabels;
46
+ title: {
47
+ height: number;
48
+ width: number;
49
+ text: string;
50
+ margin: number;
51
+ style: BaseTextStyle;
52
+ align: ChartAxisTitleAlignment;
53
+ maxRowCount: number;
54
+ rotation: ChartAxisTitleRotation;
55
+ maxWidth: number;
56
+ html: boolean;
57
+ };
58
+ min?: number;
59
+ grid: {
60
+ enabled: boolean;
61
+ };
62
+ maxPadding: number;
63
+ ticks: {
64
+ pixelInterval?: number;
65
+ };
66
+ tickMarks: PreparedAxisTickMarks;
67
+ plotIndex: number;
68
+ plotLines: PreparedAxisPlotLine[];
69
+ plotBands: PreparedAxisPlotBand[];
70
+ crosshair: PreparedAxisCrosshair;
71
+ };
72
+ export type PreparedXAxis = PreparedBaseAxis & {
73
+ rangeSlider: PreparedRangeSlider;
74
+ position: 'bottom';
75
+ };
76
+ export type PreparedYAxis = PreparedBaseAxis & {
77
+ position: 'left' | 'right';
78
+ };
79
+ export type PreparedAxis = PreparedXAxis | PreparedYAxis;
80
+ export type AxesState = {
81
+ xAxis: PreparedXAxis | null;
82
+ yAxis: PreparedYAxis[];
83
+ };
84
+ export {};
@@ -1,4 +1,4 @@
1
- import { DEFAULT_AXIS_LABEL_FONT_SIZE } from '../../constants';
1
+ import { DEFAULT_AXIS_LABEL_FONT_SIZE } from '../constants';
2
2
  export function prepareAxisPlotLabel(d) {
3
3
  var _a, _b, _c, _d, _e, _f;
4
4
  return {
@@ -1,8 +1,8 @@
1
1
  import get from 'lodash/get';
2
- import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, xAxisTitleDefaults, } from '../../constants';
3
- import { TIME_UNITS, calculateCos, calculateNumericProperty, calculateSin, formatAxisTickLabel, getDefaultDateFormat, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, wrapText, } from '../../utils';
4
- import { getXAxisTickValues } from '../../utils/chart/axis/x-axis';
5
- import { createXScale } from '../useAxisScales';
2
+ import { TIME_UNITS, calculateCos, calculateNumericProperty, calculateSin, formatAxisTickLabel, getDefaultDateFormat, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, wrapText, } from '../utils';
3
+ import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, xAxisTitleDefaults, } from '../constants';
4
+ import { createXScale } from '../scales/x-scale';
5
+ import { getXAxisTickValues } from '../utils/axis/x-axis';
6
6
  import { getPreparedRangeSlider } from './range-slider';
7
7
  import { prepareAxisPlotLabel } from './utils';
8
8
  async function setLabelSettings({ axis, seriesData, width, axisLabels, }) {
@@ -1,6 +1,6 @@
1
1
  import type { ChartSeries, ChartYAxis } from '../../types';
2
- import type { ChartScale } from '../useAxisScales/types';
3
- import type { PreparedSeries } from '../useSeries/types';
2
+ import type { ChartScale } from '../scales/types';
3
+ import type { PreparedSeries } from '../series/types';
4
4
  import type { PreparedYAxis } from './types';
5
5
  export declare const getYAxisLabelMaxWidth: (args: {
6
6
  axis: PreparedYAxis;
@@ -1,8 +1,8 @@
1
1
  import get from 'lodash/get';
2
+ import { calculateNumericProperty, formatAxisTickLabel, getDefaultDateFormat, getDefaultMinYAxisValue, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, shouldSyncAxisWithPrimary, wrapText, } from '../utils';
2
3
  import { getTickValues } from '../../components/AxisY/utils';
3
- import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, DEFAULT_AXIS_TYPE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, yAxisTitleDefaults, } from '../../constants';
4
- import { calculateNumericProperty, formatAxisTickLabel, getDefaultDateFormat, getDefaultMinYAxisValue, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, shouldSyncAxisWithPrimary, wrapText, } from '../../utils';
5
- import { createYScale } from '../useAxisScales';
4
+ import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, DEFAULT_AXIS_TYPE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, yAxisTitleDefaults, } from '../constants';
5
+ import { createYScale } from '../scales/y-scale';
6
6
  import { prepareAxisPlotLabel } from './utils';
7
7
  export const getYAxisLabelMaxWidth = async (args) => {
8
8
  const { axis, scale, seriesData } = args;
@@ -0,0 +1,10 @@
1
+ export * from './types';
2
+ export * from './constants';
3
+ export * from './i18n';
4
+ export * from './validation';
5
+ export * from './utils';
6
+ export * from './series';
7
+ export * from './scales';
8
+ export * from './axes';
9
+ export * from './layout';
10
+ export * from './zoom';
@@ -0,0 +1,10 @@
1
+ export * from './types';
2
+ export * from './constants';
3
+ export * from './i18n';
4
+ export * from './validation';
5
+ export * from './utils';
6
+ export * from './series';
7
+ export * from './scales';
8
+ export * from './axes';
9
+ export * from './layout';
10
+ export * from './zoom';
@@ -1,5 +1,7 @@
1
- import type { PreparedChart, PreparedLegend, PreparedSeries, PreparedXAxis, PreparedYAxis } from '../../hooks';
1
+ import type { PreparedChart } from '../../hooks/types';
2
2
  import type { ChartMargin, LegendConfig } from '../../types';
3
+ import type { PreparedXAxis, PreparedYAxis } from '../axes/types';
4
+ import type { PreparedLegend, PreparedSeries } from '../series';
3
5
  export declare const getBoundsWidth: (args: {
4
6
  chartWidth: number;
5
7
  chartMargin: PreparedChart["margin"];
@@ -1,4 +1,4 @@
1
- import { isAxisRelatedSeries } from './series-type-guards';
1
+ import { isAxisRelatedSeries } from '../utils/series-type-guards';
2
2
  export const getBoundsWidth = (args) => {
3
3
  const { chartWidth, chartMargin, preparedYAxis } = args;
4
4
  return (chartWidth -
@@ -0,0 +1,3 @@
1
+ export * from './split-types';
2
+ export * from './split';
3
+ export * from './chart-dimensions';
@@ -0,0 +1,3 @@
1
+ export * from './split-types';
2
+ export * from './split';
3
+ export * from './chart-dimensions';
@@ -1,5 +1,5 @@
1
1
  import type { ChartSplit } from '../../types';
2
- import type { PreparedPlot } from './types';
2
+ import type { PreparedPlot } from './split-types';
3
3
  type UseSplitArgs = {
4
4
  split?: ChartSplit;
5
5
  boundsHeight: number;
@@ -1,6 +1,6 @@
1
1
  import get from 'lodash/get';
2
2
  import isEmpty from 'lodash/isEmpty';
3
- import { calculateNumericProperty, getHorizontalSvgTextHeight } from '../../utils';
3
+ import { calculateNumericProperty, getHorizontalSvgTextHeight } from '../utils';
4
4
  const DEFAULT_TITLE_FONT_SIZE = '15px';
5
5
  const TITLE_TOP_BOTTOM_PADDING = 8;
6
6
  function preparePlotTitle(args) {
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './x-scale';
4
+ export * from './y-scale';
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './x-scale';
4
+ export * from './y-scale';
@@ -1,6 +1,7 @@
1
- import type { PreparedAxis, PreparedSeries, PreparedYAxis } from '../../hooks';
1
+ import type { AxisDirection } from '../utils';
2
2
  import type { ChartAxis, ChartSeries } from '../../types';
3
- import type { AxisDirection } from '../../utils';
3
+ import type { PreparedAxis, PreparedYAxis } from '../axes/types';
4
+ import type { PreparedSeries } from '../series';
4
5
  type OptionalNumber = number | undefined;
5
6
  export declare function getMinMaxPropsOrState(args: {
6
7
  axis: PreparedAxis | ChartAxis;
@@ -1,6 +1,6 @@
1
1
  import get from 'lodash/get';
2
- import { SERIES_TYPE } from '../../constants';
3
- import { getDataCategoryValue, isSeriesWithCategoryValues } from '../../utils';
2
+ import { getDataCategoryValue, isSeriesWithCategoryValues } from '../utils';
3
+ import { SERIES_TYPE } from '../constants';
4
4
  const MARKER_SERIES_TYPES = [SERIES_TYPE.Area, SERIES_TYPE.Line, SERIES_TYPE.Scatter];
5
5
  function getNormilizedMinMax(args) {
6
6
  const { maxValues, minValues } = args;