@mui/x-charts-pro 8.20.0 → 8.22.0

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 (346) hide show
  1. package/BarChartPro/BarChartPro.d.ts +5 -5
  2. package/BarChartPro/BarChartPro.js +38 -0
  3. package/BarChartPro/BarChartPro.plugins.d.ts +4 -4
  4. package/BarChartPro/BarChartPro.plugins.js +1 -1
  5. package/CHANGELOG.md +248 -0
  6. package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
  7. package/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
  9. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  10. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  11. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -8
  14. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
  15. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
  16. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  17. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
  18. package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  19. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
  20. package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
  21. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
  22. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  23. package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
  24. package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
  25. package/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
  26. package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
  27. package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
  28. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
  29. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
  30. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
  31. package/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
  32. package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  33. package/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
  34. package/FunnelChart/FunnelChart.d.ts +9 -9
  35. package/FunnelChart/FunnelChart.plugins.d.ts +4 -4
  36. package/FunnelChart/FunnelChart.plugins.js +1 -1
  37. package/FunnelChart/FunnelPlot.d.ts +2 -2
  38. package/FunnelChart/FunnelSection.d.ts +2 -2
  39. package/FunnelChart/FunnelSectionLabel.d.ts +2 -2
  40. package/FunnelChart/categoryAxis.types.d.ts +2 -2
  41. package/FunnelChart/coordinateMapper.d.ts +2 -2
  42. package/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
  43. package/FunnelChart/curves/bump.d.ts +1 -1
  44. package/FunnelChart/curves/curve.types.d.ts +1 -1
  45. package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
  46. package/FunnelChart/curves/linear.d.ts +1 -1
  47. package/FunnelChart/curves/pyramid.d.ts +1 -1
  48. package/FunnelChart/curves/step-pyramid.d.ts +1 -1
  49. package/FunnelChart/curves/step.d.ts +1 -1
  50. package/FunnelChart/funnel.types.d.ts +5 -5
  51. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
  52. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
  53. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  54. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
  55. package/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
  56. package/FunnelChart/funnelSlots.types.d.ts +6 -6
  57. package/FunnelChart/labelUtils.d.ts +2 -2
  58. package/FunnelChart/seriesConfig/extremums.d.ts +1 -1
  59. package/FunnelChart/seriesConfig/getColor.d.ts +1 -1
  60. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  61. package/FunnelChart/seriesConfig/legend.d.ts +1 -1
  62. package/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
  63. package/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
  64. package/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
  65. package/FunnelChart/useFunnelChartProps.d.ts +7 -7
  66. package/Heatmap/Heatmap.d.ts +13 -13
  67. package/Heatmap/Heatmap.js +12 -0
  68. package/Heatmap/Heatmap.plugins.d.ts +3 -3
  69. package/Heatmap/Heatmap.plugins.js +1 -1
  70. package/Heatmap/HeatmapItem.d.ts +2 -2
  71. package/Heatmap/HeatmapPlot.d.ts +1 -1
  72. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
  73. package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
  74. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
  75. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
  76. package/Heatmap/seriesConfig/extremums.d.ts +1 -1
  77. package/Heatmap/seriesConfig/getColor.d.ts +1 -1
  78. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  79. package/Heatmap/seriesConfig/index.d.ts +1 -1
  80. package/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
  81. package/Heatmap/seriesConfig/tooltip.d.ts +1 -1
  82. package/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
  83. package/LineChartPro/LineChartPro.d.ts +5 -5
  84. package/LineChartPro/LineChartPro.js +38 -0
  85. package/LineChartPro/LineChartPro.plugins.d.ts +4 -4
  86. package/LineChartPro/LineChartPro.plugins.js +1 -1
  87. package/PieChartPro/PieChartPro.d.ts +5 -5
  88. package/PieChartPro/PieChartPro.plugins.d.ts +3 -3
  89. package/RadarChartPro/RadarChartPro.d.ts +4 -4
  90. package/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
  91. package/RadarChartPro/RadarChartPro.plugins.js +1 -1
  92. package/SankeyChart/SankeyChart.d.ts +1 -1
  93. package/SankeyChart/SankeyChart.plugins.d.ts +3 -3
  94. package/SankeyChart/SankeyChart.plugins.js +1 -1
  95. package/SankeyChart/SankeyLinkLabel.d.ts +1 -1
  96. package/SankeyChart/SankeyNodeElement.d.ts +0 -4
  97. package/SankeyChart/SankeyNodeElement.js +3 -22
  98. package/SankeyChart/SankeyNodeLabel.d.ts +12 -0
  99. package/SankeyChart/SankeyNodeLabel.js +61 -0
  100. package/SankeyChart/SankeyPlot.js +21 -22
  101. package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
  102. package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
  103. package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
  104. package/SankeyChart/calculateSankeyLayout.d.ts +3 -4
  105. package/SankeyChart/calculateSankeyLayout.js +15 -35
  106. package/SankeyChart/d3Sankey/align.d.ts +33 -0
  107. package/SankeyChart/d3Sankey/align.js +63 -0
  108. package/SankeyChart/d3Sankey/index.d.ts +4 -0
  109. package/SankeyChart/d3Sankey/index.js +49 -0
  110. package/SankeyChart/d3Sankey/sankey.d.ts +42 -0
  111. package/SankeyChart/d3Sankey/sankey.js +457 -0
  112. package/SankeyChart/d3Sankey/sankey.types.d.ts +381 -0
  113. package/SankeyChart/d3Sankey/sankey.types.js +5 -0
  114. package/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +22 -0
  115. package/SankeyChart/d3Sankey/sankeyLinkHorizontal.js +37 -0
  116. package/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
  117. package/SankeyChart/plugins/useSankeyHighlight.js +1 -1
  118. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
  119. package/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
  120. package/SankeyChart/sankey.types.d.ts +33 -25
  121. package/SankeyChart/sankeyClasses.d.ts +3 -1
  122. package/SankeyChart/sankeyClasses.js +2 -1
  123. package/SankeyChart/sankeySlots.types.d.ts +4 -4
  124. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
  125. package/SankeyChart/seriesConfig/index.js +15 -0
  126. package/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
  127. package/SankeyChart/seriesConfig/tooltipPosition.d.ts +3 -0
  128. package/SankeyChart/seriesConfig/tooltipPosition.js +96 -0
  129. package/SankeyChart/utils.d.ts +2 -2
  130. package/SankeyChart/utils.js +1 -1
  131. package/ScatterChartPro/ScatterChartPro.d.ts +6 -6
  132. package/ScatterChartPro/ScatterChartPro.js +38 -0
  133. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
  134. package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
  135. package/context/ChartProApi.d.ts +10 -10
  136. package/context/useChartProApiContext.d.ts +1 -1
  137. package/esm/BarChartPro/BarChartPro.d.ts +5 -5
  138. package/esm/BarChartPro/BarChartPro.js +38 -0
  139. package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -4
  140. package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
  141. package/esm/ChartContainerPro/ChartContainerPro.d.ts +4 -4
  142. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
  143. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
  144. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  145. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  146. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
  147. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
  148. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -8
  149. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
  150. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
  151. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  152. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
  153. package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  154. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
  155. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
  156. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
  157. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  158. package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
  159. package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
  160. package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
  161. package/esm/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
  162. package/esm/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
  163. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
  164. package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
  165. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
  166. package/esm/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
  167. package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  168. package/esm/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
  169. package/esm/FunnelChart/FunnelChart.d.ts +9 -9
  170. package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -4
  171. package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
  172. package/esm/FunnelChart/FunnelPlot.d.ts +2 -2
  173. package/esm/FunnelChart/FunnelSection.d.ts +2 -2
  174. package/esm/FunnelChart/FunnelSectionLabel.d.ts +2 -2
  175. package/esm/FunnelChart/categoryAxis.types.d.ts +2 -2
  176. package/esm/FunnelChart/coordinateMapper.d.ts +2 -2
  177. package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
  178. package/esm/FunnelChart/curves/bump.d.ts +1 -1
  179. package/esm/FunnelChart/curves/curve.types.d.ts +1 -1
  180. package/esm/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
  181. package/esm/FunnelChart/curves/linear.d.ts +1 -1
  182. package/esm/FunnelChart/curves/pyramid.d.ts +1 -1
  183. package/esm/FunnelChart/curves/step-pyramid.d.ts +1 -1
  184. package/esm/FunnelChart/curves/step.d.ts +1 -1
  185. package/esm/FunnelChart/funnel.types.d.ts +5 -5
  186. package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
  187. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
  188. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  189. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
  190. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
  191. package/esm/FunnelChart/funnelSlots.types.d.ts +6 -6
  192. package/esm/FunnelChart/labelUtils.d.ts +2 -2
  193. package/esm/FunnelChart/seriesConfig/extremums.d.ts +1 -1
  194. package/esm/FunnelChart/seriesConfig/getColor.d.ts +1 -1
  195. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  196. package/esm/FunnelChart/seriesConfig/legend.d.ts +1 -1
  197. package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
  198. package/esm/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
  199. package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
  200. package/esm/FunnelChart/useFunnelChartProps.d.ts +7 -7
  201. package/esm/Heatmap/Heatmap.d.ts +13 -13
  202. package/esm/Heatmap/Heatmap.js +12 -0
  203. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -3
  204. package/esm/Heatmap/Heatmap.plugins.js +2 -2
  205. package/esm/Heatmap/HeatmapItem.d.ts +2 -2
  206. package/esm/Heatmap/HeatmapPlot.d.ts +1 -1
  207. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
  208. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
  209. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
  210. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
  211. package/esm/Heatmap/seriesConfig/extremums.d.ts +1 -1
  212. package/esm/Heatmap/seriesConfig/getColor.d.ts +1 -1
  213. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  214. package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
  215. package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
  216. package/esm/Heatmap/seriesConfig/tooltip.d.ts +1 -1
  217. package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
  218. package/esm/LineChartPro/LineChartPro.d.ts +5 -5
  219. package/esm/LineChartPro/LineChartPro.js +38 -0
  220. package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -4
  221. package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
  222. package/esm/PieChartPro/PieChartPro.d.ts +5 -5
  223. package/esm/PieChartPro/PieChartPro.plugins.d.ts +3 -3
  224. package/esm/RadarChartPro/RadarChartPro.d.ts +4 -4
  225. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
  226. package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
  227. package/esm/SankeyChart/SankeyChart.d.ts +1 -1
  228. package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -3
  229. package/esm/SankeyChart/SankeyChart.plugins.js +2 -2
  230. package/esm/SankeyChart/SankeyLinkLabel.d.ts +1 -1
  231. package/esm/SankeyChart/SankeyNodeElement.d.ts +0 -4
  232. package/esm/SankeyChart/SankeyNodeElement.js +4 -23
  233. package/esm/SankeyChart/SankeyNodeLabel.d.ts +12 -0
  234. package/esm/SankeyChart/SankeyNodeLabel.js +55 -0
  235. package/esm/SankeyChart/SankeyPlot.js +23 -24
  236. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
  237. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
  238. package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
  239. package/esm/SankeyChart/calculateSankeyLayout.d.ts +3 -4
  240. package/esm/SankeyChart/calculateSankeyLayout.js +15 -35
  241. package/esm/SankeyChart/d3Sankey/align.d.ts +33 -0
  242. package/esm/SankeyChart/d3Sankey/align.js +54 -0
  243. package/esm/SankeyChart/d3Sankey/index.d.ts +4 -0
  244. package/esm/SankeyChart/d3Sankey/index.js +4 -0
  245. package/esm/SankeyChart/d3Sankey/sankey.d.ts +42 -0
  246. package/esm/SankeyChart/d3Sankey/sankey.js +451 -0
  247. package/esm/SankeyChart/d3Sankey/sankey.types.d.ts +381 -0
  248. package/esm/SankeyChart/d3Sankey/sankey.types.js +1 -0
  249. package/esm/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +22 -0
  250. package/esm/SankeyChart/d3Sankey/sankeyLinkHorizontal.js +31 -0
  251. package/esm/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
  252. package/esm/SankeyChart/plugins/useSankeyHighlight.js +1 -1
  253. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
  254. package/esm/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
  255. package/esm/SankeyChart/sankey.types.d.ts +33 -25
  256. package/esm/SankeyChart/sankeyClasses.d.ts +3 -1
  257. package/esm/SankeyChart/sankeyClasses.js +2 -1
  258. package/esm/SankeyChart/sankeySlots.types.d.ts +4 -4
  259. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
  260. package/esm/SankeyChart/seriesConfig/index.js +14 -0
  261. package/esm/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
  262. package/esm/SankeyChart/seriesConfig/tooltipPosition.d.ts +3 -0
  263. package/esm/SankeyChart/seriesConfig/tooltipPosition.js +90 -0
  264. package/esm/SankeyChart/utils.d.ts +2 -2
  265. package/esm/SankeyChart/utils.js +1 -1
  266. package/esm/ScatterChartPro/ScatterChartPro.d.ts +6 -6
  267. package/esm/ScatterChartPro/ScatterChartPro.js +38 -0
  268. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
  269. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
  270. package/esm/context/ChartProApi.d.ts +10 -10
  271. package/esm/context/useChartProApiContext.d.ts +1 -1
  272. package/esm/hooks/useChartProApiRef.d.ts +3 -3
  273. package/esm/hooks/useFunnelSeries.d.ts +1 -1
  274. package/esm/hooks/useHeatmapSeries.d.ts +1 -1
  275. package/esm/hooks/useSankeySeries.d.ts +9 -2
  276. package/esm/hooks/useSankeySeries.js +16 -1
  277. package/esm/index.js +1 -1
  278. package/esm/internals/material/components/BaseMenuItem.d.ts +1 -1
  279. package/esm/internals/material/components/BasePopper.d.ts +1 -1
  280. package/esm/internals/material/index.d.ts +3 -3
  281. package/esm/internals/plugins/allPlugins.d.ts +7 -7
  282. package/esm/internals/plugins/allPlugins.js +3 -3
  283. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  284. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  285. package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
  286. package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
  287. package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
  288. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
  289. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
  290. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
  291. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
  292. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
  293. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
  294. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
  295. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
  296. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
  297. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  298. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +1 -1
  299. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
  300. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  301. package/esm/internals/slots/chartBaseSlotProps.d.ts +1 -1
  302. package/esm/internals/slots/chartsBaseSlots.d.ts +3 -3
  303. package/esm/internals/slots/chartsIconSlots.d.ts +2 -2
  304. package/esm/models/seriesType/heatmap.d.ts +2 -2
  305. package/esm/themeAugmentation/components.d.ts +1 -1
  306. package/esm/themeAugmentation/overrides.d.ts +1 -1
  307. package/esm/themeAugmentation/props.d.ts +4 -4
  308. package/esm/typeOverloads/modules.d.ts +11 -6
  309. package/hooks/useChartProApiRef.d.ts +3 -3
  310. package/hooks/useFunnelSeries.d.ts +1 -1
  311. package/hooks/useHeatmapSeries.d.ts +1 -1
  312. package/hooks/useSankeySeries.d.ts +9 -2
  313. package/hooks/useSankeySeries.js +16 -0
  314. package/index.js +1 -1
  315. package/internals/material/components/BaseMenuItem.d.ts +1 -1
  316. package/internals/material/components/BasePopper.d.ts +1 -1
  317. package/internals/material/index.d.ts +3 -3
  318. package/internals/plugins/allPlugins.d.ts +7 -7
  319. package/internals/plugins/allPlugins.js +2 -2
  320. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  321. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  322. package/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
  323. package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
  324. package/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
  325. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
  326. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
  327. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
  328. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
  329. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
  330. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
  331. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
  332. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
  333. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
  334. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  335. package/internals/plugins/useChartProZoom/useChartProZoom.js +1 -1
  336. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
  337. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  338. package/internals/slots/chartBaseSlotProps.d.ts +1 -1
  339. package/internals/slots/chartsBaseSlots.d.ts +3 -3
  340. package/internals/slots/chartsIconSlots.d.ts +2 -2
  341. package/models/seriesType/heatmap.d.ts +2 -2
  342. package/package.json +5 -5
  343. package/themeAugmentation/components.d.ts +1 -1
  344. package/themeAugmentation/overrides.d.ts +1 -1
  345. package/themeAugmentation/props.d.ts +4 -4
  346. package/typeOverloads/modules.d.ts +11 -6
@@ -10,13 +10,12 @@ exports.SankeyPlot = SankeyPlot;
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _styles = require("@mui/material/styles");
13
- var _hooks = require("@mui/x-charts/hooks");
14
- var _calculateSankeyLayout = require("./calculateSankeyLayout");
15
13
  var _SankeyNodeElement = require("./SankeyNodeElement");
16
14
  var _SankeyLinkElement = require("./SankeyLinkElement");
17
15
  var _SankeyLinkLabel = require("./SankeyLinkLabel");
18
16
  var _useSankeySeries = require("../hooks/useSankeySeries");
19
17
  var _sankeyClasses = require("./sankeyClasses");
18
+ var _SankeyNodeLabel = require("./SankeyNodeLabel");
20
19
  var _jsxRuntime = require("react/jsx-runtime");
21
20
  const SankeyPlotRoot = (0, _styles.styled)('g')({
22
21
  [`.${_sankeyClasses.sankeyPlotClasses.links} path, .${_sankeyClasses.sankeyPlotClasses.nodes} rect`]: {
@@ -39,35 +38,31 @@ function SankeyPlot(props) {
39
38
  onLinkClick,
40
39
  onNodeClick
41
40
  } = props;
42
- const seriesContext = (0, _useSankeySeries.useSankeySeriesContext)();
43
- if (!seriesContext) {
44
- throw new Error(`MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.`);
45
- }
46
- const series = seriesContext.series[seriesContext.seriesOrder?.[0]];
47
41
  const classes = (0, _sankeyClasses.useUtilityClasses)({
48
42
  classes: inputClasses
49
43
  });
50
- const drawingArea = (0, _hooks.useDrawingArea)();
44
+ const sankeyContext = (0, _useSankeySeries.useSankeySeriesContext)();
45
+ const sankeySeries = sankeyContext?.series[sankeyContext?.seriesOrder[0]];
46
+ const layout = (0, _useSankeySeries.useSankeyLayout)();
47
+ if (!sankeySeries) {
48
+ throw new Error(`MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.`);
49
+ }
50
+ if (!layout || !layout.links) {
51
+ return null;
52
+ }
51
53
  const {
52
- data,
53
54
  linkOptions,
54
55
  nodeOptions
55
- } = series;
56
- const theme = (0, _styles.useTheme)();
57
-
58
- // Calculate layout based on data and dimensions
59
- const layout = React.useMemo(() => (0, _calculateSankeyLayout.calculateSankeyLayout)(data, drawingArea, theme, series), [drawingArea, data, series, theme]);
60
-
56
+ } = sankeySeries;
61
57
  // Early return if no data or dimensions
62
- if (!data || !data.links) {
63
- return null;
64
- }
58
+
59
+ const showNodeLabels = nodeOptions?.showLabels ?? true;
65
60
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SankeyPlotRoot, {
66
61
  className: classes.root,
67
62
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
68
63
  className: classes.links,
69
64
  children: layout.links.map(link => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyLinkElement.SankeyLinkElement, {
70
- seriesId: series.id,
65
+ seriesId: sankeySeries.id,
71
66
  link: link,
72
67
  opacity: linkOptions?.opacity,
73
68
  onClick: onLinkClick
@@ -75,16 +70,20 @@ function SankeyPlot(props) {
75
70
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
76
71
  className: classes.nodes,
77
72
  children: layout.nodes.map(node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyNodeElement.SankeyNodeElement, {
78
- seriesId: series.id,
73
+ seriesId: sankeySeries.id,
79
74
  node: node,
80
- showLabel: nodeOptions?.showLabels,
81
75
  onClick: onNodeClick
82
76
  }, node.id))
83
77
  }), linkOptions?.showValues && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
84
78
  className: classes.linkLabels,
85
79
  children: layout.links.map(link => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyLinkLabel.SankeyLinkLabel, {
86
80
  link: link
87
- }, `label-${link.source.id}-${link.target.id}`))
81
+ }, `label-link-${link.source.id}-${link.target.id}`))
82
+ }), showNodeLabels && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
83
+ className: classes.nodeLabels,
84
+ children: layout.nodes.map(node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyNodeLabel.SankeyNodeLabel, {
85
+ node: node
86
+ }, `label-node-${node.id}`))
88
87
  })]
89
88
  });
90
89
  }
@@ -1,4 +1,4 @@
1
- import { SankeyTooltipProps } from "./SankeyTooltip.types.js";
1
+ import { type SankeyTooltipProps } from "./SankeyTooltip.types.js";
2
2
  declare function SankeyTooltip(props: SankeyTooltipProps): import("react/jsx-runtime").JSX.Element;
3
3
  declare namespace SankeyTooltip {
4
4
  var propTypes: any;
@@ -1,4 +1,4 @@
1
- import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
1
+ import { type ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
2
2
  export interface SankeyTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
3
3
  /**
4
4
  * Select the kind of tooltip to display
@@ -1,4 +1,4 @@
1
- import { SankeyTooltipProps } from "./SankeyTooltip.types.js";
1
+ import { type SankeyTooltipProps } from "./SankeyTooltip.types.js";
2
2
  export interface SankeyTooltipContentProps extends Pick<SankeyTooltipProps, 'classes'> {}
3
3
  export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
4
4
  export declare namespace SankeyTooltipContent {
@@ -1,6 +1,5 @@
1
1
  import type { ChartDrawingArea } from '@mui/x-charts/hooks';
2
- import type { Theme } from '@mui/material/styles';
3
- import type { SankeySeriesType, SankeyLayout, SankeyLayoutLink, DefaultizedSankeySeriesType } from "./sankey.types.js";
2
+ import type { SankeyLayout, SankeyLayoutLink, DefaultizedSankeySeriesType } from "./sankey.types.js";
4
3
  /**
5
4
  * Calculates the layout for a Sankey diagram using d3-sankey
6
5
  *
@@ -9,5 +8,5 @@ import type { SankeySeriesType, SankeyLayout, SankeyLayoutLink, DefaultizedSanke
9
8
  * @param options Layout configuration options
10
9
  * @returns The calculated layout
11
10
  */
12
- export declare function calculateSankeyLayout(data: DefaultizedSankeySeriesType['data'], drawingArea: ChartDrawingArea, theme: Theme, series?: Pick<SankeySeriesType, 'nodeOptions' | 'linkOptions' | 'iterations'>): SankeyLayout;
13
- export declare function improvedNaiveSankeyLinkPathHorizontal(link: SankeyLayoutLink, curveCorrection?: number): string;
11
+ export declare function calculateSankeyLayout(series: DefaultizedSankeySeriesType, drawingArea: ChartDrawingArea): SankeyLayout<true>;
12
+ export declare function improvedNaiveSankeyLinkPathHorizontal(link: SankeyLayoutLink<true>, curveCorrection?: number): string;
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.calculateSankeyLayout = calculateSankeyLayout;
9
9
  exports.improvedNaiveSankeyLinkPathHorizontal = improvedNaiveSankeyLinkPathHorizontal;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
- var _d3Sankey = require("@mui/x-charts-vendor/d3-sankey");
12
11
  var _d3Path = require("@mui/x-charts-vendor/d3-path");
12
+ var _d3Sankey = require("./d3Sankey");
13
13
  var _utils = require("./utils");
14
14
  /**
15
15
  * Calculates the layout for a Sankey diagram using d3-sankey
@@ -20,8 +20,9 @@ var _utils = require("./utils");
20
20
  * @returns The calculated layout
21
21
  */
22
22
 
23
- function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
23
+ function calculateSankeyLayout(series, drawingArea) {
24
24
  const {
25
+ data,
25
26
  iterations = 6,
26
27
  nodeOptions,
27
28
  linkOptions
@@ -29,14 +30,19 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
29
30
  const {
30
31
  width: nodeWidth = 15,
31
32
  padding: nodePadding = 10,
32
- align: nodeAlign = 'justify',
33
+ align: nodeAlign,
33
34
  sort: nodeSort
34
35
  } = nodeOptions ?? {};
35
36
  const {
36
- color: linkColor = 'source',
37
37
  sort: linkSort,
38
38
  curveCorrection = 10
39
39
  } = linkOptions ?? {};
40
+ if (!data || !data.links) {
41
+ return {
42
+ nodes: [],
43
+ links: []
44
+ };
45
+ }
40
46
  const {
41
47
  width,
42
48
  height,
@@ -45,21 +51,9 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
45
51
  bottom,
46
52
  right
47
53
  } = drawingArea;
48
- if (!data || !data.links) {
49
- return {
50
- nodes: [],
51
- links: []
52
- };
53
- }
54
-
55
- // Prepare the data structure expected by d3-sankey
56
- const graph = {
57
- nodes: data.nodes.values().toArray().map(v => (0, _extends2.default)({}, v)),
58
- links: data.links.map(v => (0, _extends2.default)({}, v))
59
- };
60
54
 
61
55
  // Create the sankey layout generator
62
- const sankeyGenerator = (0, _d3Sankey.sankey)().nodeWidth(nodeWidth).nodePadding(nodePadding).nodeAlign((0, _utils.getNodeAlignFunction)(nodeAlign)).extent([[left, top], [width + right, height + bottom]]).nodeId(d => d.id).iterations(iterations);
56
+ const sankeyGenerator = (0, _d3Sankey.sankey)(true).nodeWidth(nodeWidth).nodePadding(nodePadding).nodeAlign((0, _utils.getNodeAlignFunction)(nodeAlign)).nodeId(d => d.id).extent([[left, top], [width + right, height + bottom]]).iterations(iterations);
63
57
 
64
58
  // For 'auto' or undefined, don't set anything (use d3-sankey default behavior)
65
59
  if (typeof nodeSort === 'function') {
@@ -79,7 +73,7 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
79
73
  // Generate the layout
80
74
  let result;
81
75
  try {
82
- result = sankeyGenerator(graph);
76
+ result = sankeyGenerator(data);
83
77
  } catch (error) {
84
78
  // There are two errors that can occur:
85
79
  // 1. If the data contains circular references, d3-sankey will throw an error.
@@ -97,27 +91,13 @@ function calculateSankeyLayout(data, drawingArea, theme, series = {}) {
97
91
 
98
92
  // Convert d3-sankey links to our format
99
93
  const layoutLinks = links.map(link => {
100
- // Get the original link data
101
- const originalLink = data.links.find(l => {
102
- return l.source === link.source.id && l.target === link.target.id;
103
- });
104
- let resolvedColor = originalLink?.color ?? linkColor;
105
- if (resolvedColor === 'source') {
106
- resolvedColor = link.source.color ?? linkColor;
107
- } else if (resolvedColor === 'target') {
108
- resolvedColor = link.target.color ?? linkColor;
109
- }
110
- return (0, _extends2.default)({}, originalLink, link, {
111
- color: resolvedColor,
94
+ const rep = (0, _extends2.default)({}, link, {
112
95
  path: improvedNaiveSankeyLinkPathHorizontal(link, curveCorrection)
113
96
  });
114
- });
115
- const layoutNodes = nodes.map(node => {
116
- const originalNode = data.nodes.get(node.id) || {};
117
- return (0, _extends2.default)({}, originalNode, node);
97
+ return rep;
118
98
  });
119
99
  return {
120
- nodes: layoutNodes,
100
+ nodes,
121
101
  links: layoutLinks
122
102
  };
123
103
  }
@@ -0,0 +1,33 @@
1
+ import type { SankeyNode } from "./sankey.types.js";
2
+ /**
3
+ * Compute the horizontal node position of a node in a Sankey layout with left alignment.
4
+ * Returns (node.depth) to indicate the desired horizontal position of the node in the generated Sankey diagram.
5
+ *
6
+ * @param node Sankey node for which to calculate the horizontal node position.
7
+ */
8
+ export declare function sankeyLeft<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>): number;
9
+ /**
10
+ * Compute the horizontal node position of a node in a Sankey layout with right alignment.
11
+ * Returns (n - 1 - node.height) to indicate the desired horizontal position of the node in the generated Sankey diagram.
12
+ *
13
+ * @param node Sankey node for which to calculate the horizontal node position.
14
+ * @param n Total depth n of the graph (one plus the maximum node.depth)
15
+ */
16
+ export declare function sankeyRight<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>, n: number): number;
17
+ /**
18
+ * Compute the horizontal node position of a node in a Sankey layout with justified alignment.
19
+ * Like d3.sankeyLeft, except that nodes without any outgoing links are moved to the far right.
20
+ * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.
21
+ *
22
+ * @param node Sankey node for which to calculate the horizontal node position.
23
+ * @param n Total depth n of the graph (one plus the maximum node.depth)
24
+ */
25
+ export declare function sankeyJustify<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>, n: number): number;
26
+ /**
27
+ * Compute the horizontal node position of a node in a Sankey layout with center alignment.
28
+ * Like d3.sankeyLeft, except that nodes without any incoming links are moved as right as possible.
29
+ * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.
30
+ *
31
+ * @param node Sankey node for which to calculate the horizontal node position.
32
+ */
33
+ export declare function sankeyCenter<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>): number;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sankeyCenter = sankeyCenter;
7
+ exports.sankeyJustify = sankeyJustify;
8
+ exports.sankeyLeft = sankeyLeft;
9
+ exports.sankeyRight = sankeyRight;
10
+ var _d3Array = require("@mui/x-charts-vendor/d3-array");
11
+ function targetDepth(d) {
12
+ return d.target.depth ?? 0;
13
+ }
14
+
15
+ /**
16
+ * Compute the horizontal node position of a node in a Sankey layout with left alignment.
17
+ * Returns (node.depth) to indicate the desired horizontal position of the node in the generated Sankey diagram.
18
+ *
19
+ * @param node Sankey node for which to calculate the horizontal node position.
20
+ */
21
+ function sankeyLeft(node) {
22
+ return node.depth ?? 0;
23
+ }
24
+
25
+ /**
26
+ * Compute the horizontal node position of a node in a Sankey layout with right alignment.
27
+ * Returns (n - 1 - node.height) to indicate the desired horizontal position of the node in the generated Sankey diagram.
28
+ *
29
+ * @param node Sankey node for which to calculate the horizontal node position.
30
+ * @param n Total depth n of the graph (one plus the maximum node.depth)
31
+ */
32
+ function sankeyRight(node, n) {
33
+ return n - 1 - (node.height ?? 0);
34
+ }
35
+
36
+ /**
37
+ * Compute the horizontal node position of a node in a Sankey layout with justified alignment.
38
+ * Like d3.sankeyLeft, except that nodes without any outgoing links are moved to the far right.
39
+ * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.
40
+ *
41
+ * @param node Sankey node for which to calculate the horizontal node position.
42
+ * @param n Total depth n of the graph (one plus the maximum node.depth)
43
+ */
44
+ function sankeyJustify(node, n) {
45
+ return node.sourceLinks?.length ? node.depth ?? 0 : n - 1;
46
+ }
47
+
48
+ /**
49
+ * Compute the horizontal node position of a node in a Sankey layout with center alignment.
50
+ * Like d3.sankeyLeft, except that nodes without any incoming links are moved as right as possible.
51
+ * Returns an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.
52
+ *
53
+ * @param node Sankey node for which to calculate the horizontal node position.
54
+ */
55
+ function sankeyCenter(node) {
56
+ if (node.targetLinks?.length) {
57
+ return node.depth ?? 0;
58
+ }
59
+ if (node.sourceLinks?.length) {
60
+ return ((0, _d3Array.min)(node.sourceLinks, targetDepth) ?? 0) - 1;
61
+ }
62
+ return 0;
63
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./sankey.js";
2
+ export * from "./align.js";
3
+ export * from "./sankeyLinkHorizontal.js";
4
+ export * from "./sankey.types.js";
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _sankey = require("./sankey");
7
+ Object.keys(_sankey).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _sankey[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _sankey[key];
14
+ }
15
+ });
16
+ });
17
+ var _align = require("./align");
18
+ Object.keys(_align).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _align[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _align[key];
25
+ }
26
+ });
27
+ });
28
+ var _sankeyLinkHorizontal = require("./sankeyLinkHorizontal");
29
+ Object.keys(_sankeyLinkHorizontal).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _sankeyLinkHorizontal[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _sankeyLinkHorizontal[key];
36
+ }
37
+ });
38
+ });
39
+ var _sankey2 = require("./sankey.types");
40
+ Object.keys(_sankey2).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _sankey2[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _sankey2[key];
47
+ }
48
+ });
49
+ });
@@ -0,0 +1,42 @@
1
+ import type { SankeyExtraProperties, SankeyGraph, SankeyLayout } from "./sankey.types.js";
2
+ /**
3
+ * Get a Sankey layout generator.
4
+ *
5
+ * Invoking sankey() without generics, means the node type and link type assume no user-defined attributes, i.e.
6
+ * only the attributes internally used by the Sankey layout generator.
7
+ *
8
+ * Default nodes/links accessors are assumed.
9
+ */
10
+ export declare function sankey<WithPosition extends boolean>(withoutPositions?: WithPosition): SankeyLayout<WithPosition, SankeyGraph<WithPosition, {}, {}>, {}, {}>;
11
+ /**
12
+ * Get a Sankey layout generator.
13
+ *
14
+ * Default nodes/links accessors are assumed.
15
+ *
16
+ * The first generic N refers to user-defined properties contained in the node data passed into
17
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
18
+ * SankeyNodeMinimal interface.
19
+ *
20
+ * The second generic L refers to user-defined properties contained in the link data passed into
21
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
22
+ * SankeyLinkMinimal interface.
23
+ */
24
+ export declare function sankey<N extends SankeyExtraProperties, L extends SankeyExtraProperties, WithPosition extends boolean>(withoutPositions?: WithPosition): SankeyLayout<WithPosition, SankeyGraph<WithPosition, N, L>, N, L>;
25
+ /**
26
+ * Get a Sankey layout generator.
27
+ *
28
+ * The nodes/links accessors need to be configured to work with the data type of the first argument passed
29
+ * in when invoking the Sankey layout generator.
30
+ *
31
+ * The first generic corresponds to the data type of the first argument passed in when invoking the Sankey layout generator,
32
+ * and its nodes/links accessors.
33
+ *
34
+ * The second generic N refers to user-defined properties contained in the node data passed into
35
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
36
+ * SankeyNodeMinimal interface.
37
+ *
38
+ * The third generic L refers to user-defined properties contained in the link data passed into
39
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
40
+ * SankeyLinkMinimal interface.
41
+ */
42
+ export declare function sankey<Data, N extends SankeyExtraProperties, L extends SankeyExtraProperties, WithPosition extends boolean>(withPositions?: WithPosition): SankeyLayout<WithPosition, Data, N, L>;