drizzle-cube 0.15.4 → 0.15.5

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 (393) hide show
  1. package/dist/adapters/ActivityGridChart.config-CRStoJN7.js +1 -0
  2. package/dist/adapters/ActivityGridChart.config-UVIbGrZs.cjs +1 -0
  3. package/dist/adapters/AreaChart.config-C-64XzvV.cjs +1 -0
  4. package/dist/adapters/AreaChart.config-OSenKEDa.js +1 -0
  5. package/dist/adapters/BarChart.config-B3l-2o-5.cjs +1 -0
  6. package/dist/adapters/BarChart.config-BL-JqfNl.js +1 -0
  7. package/dist/adapters/BoxPlotChart.config-En2W9sCn.js +1 -0
  8. package/dist/adapters/BoxPlotChart.config-HT7Vqh3S.cjs +1 -0
  9. package/dist/adapters/BubbleChart.config-CdrtTNRu.cjs +1 -0
  10. package/dist/adapters/BubbleChart.config-DCyaRccE.js +1 -0
  11. package/dist/adapters/CandlestickChart.config-BI2Wti1n.cjs +1 -0
  12. package/dist/adapters/CandlestickChart.config-DkJ3DZBF.js +1 -0
  13. package/dist/adapters/DataTable.config-BWGLaGBR.js +1 -0
  14. package/dist/adapters/DataTable.config-D98yguXz.cjs +1 -0
  15. package/dist/adapters/DotStripChart.config-BZ4QHLwz.cjs +1 -0
  16. package/dist/adapters/DotStripChart.config-JPHZAfHq.js +1 -0
  17. package/dist/adapters/FunnelChart.config-D3WQSq3V.cjs +1 -0
  18. package/dist/adapters/FunnelChart.config-F0r0WayB.js +1 -0
  19. package/dist/adapters/GaugeChart.config-CEHrHMfs.cjs +1 -0
  20. package/dist/adapters/GaugeChart.config-DXdvqUYH.js +1 -0
  21. package/dist/adapters/HeatMapChart.config-BxKS-o0A.cjs +1 -0
  22. package/dist/adapters/HeatMapChart.config-D4Q45Omu.js +1 -0
  23. package/dist/adapters/KpiDelta.config-BBGRf802.js +1 -0
  24. package/dist/adapters/KpiDelta.config-CpILJrIk.cjs +1 -0
  25. package/dist/adapters/KpiNumber.config-CbirqFHq.cjs +1 -0
  26. package/dist/adapters/KpiNumber.config-DctOJjE-.js +1 -0
  27. package/dist/adapters/KpiText.config-BE67uez4.js +1 -0
  28. package/dist/adapters/KpiText.config-ChDZbNLQ.cjs +1 -0
  29. package/dist/adapters/LineChart.config-77h_gmww.js +1 -0
  30. package/dist/adapters/LineChart.config-V03h_sF5.cjs +1 -0
  31. package/dist/adapters/MarkdownChart.config-uiOrmHo7.cjs +1 -0
  32. package/dist/adapters/MarkdownChart.config-zHL8n3e_.js +1 -0
  33. package/dist/adapters/MeasureProfileChart.config-D-uRVi5J.cjs +1 -0
  34. package/dist/adapters/MeasureProfileChart.config-YFdPWnN0.js +1 -0
  35. package/dist/adapters/PieChart.config-DKJVsbZm.cjs +1 -0
  36. package/dist/adapters/PieChart.config-tDcrCy6I.js +1 -0
  37. package/dist/adapters/ProportionBarChart.config-Bd780fV1.cjs +1 -0
  38. package/dist/adapters/ProportionBarChart.config-BpUzsBL5.js +1 -0
  39. package/dist/adapters/RadarChart.config-DgscyxZj.js +1 -0
  40. package/dist/adapters/RadarChart.config-Dhz9TUf1.cjs +1 -0
  41. package/dist/adapters/RadialBarChart.config-CstfMNyO.js +1 -0
  42. package/dist/adapters/RadialBarChart.config-DU0g9Sqd.cjs +1 -0
  43. package/dist/adapters/RecordsTable.config-xWF_FwIf.js +1 -0
  44. package/dist/adapters/RecordsTable.config-yk1-fb7H.cjs +1 -0
  45. package/dist/adapters/RetentionCombinedChart.config-BPFKAI0l.js +1 -0
  46. package/dist/adapters/RetentionCombinedChart.config-BQEu6B6q.cjs +1 -0
  47. package/dist/adapters/RetentionHeatmap.config-B7wz6qj4.cjs +1 -0
  48. package/dist/adapters/RetentionHeatmap.config-BTX_CrZJ.js +1 -0
  49. package/dist/adapters/SankeyChart.config-CicdaFta.js +1 -0
  50. package/dist/adapters/SankeyChart.config-n21KdYxz.cjs +1 -0
  51. package/dist/adapters/ScatterChart.config-CToAMrS3.cjs +1 -0
  52. package/dist/adapters/ScatterChart.config-DE9FdKgm.js +1 -0
  53. package/dist/adapters/SunburstChart.config-BH1UDwp2.js +1 -0
  54. package/dist/adapters/SunburstChart.config-BNgHwK_7.cjs +1 -0
  55. package/dist/adapters/TreeMapChart.config-C6aMNMTc.cjs +1 -0
  56. package/dist/adapters/TreeMapChart.config-CxTQF8zN.js +1 -0
  57. package/dist/adapters/WaterfallChart.config-B9AeS0MH.cjs +1 -0
  58. package/dist/adapters/WaterfallChart.config-CtiVue_6.js +1 -0
  59. package/dist/adapters/core/index.cjs +1 -1
  60. package/dist/adapters/core/index.js +1 -1
  61. package/dist/adapters/{core-D6Ghepzl.cjs → core-BcdrjdP_.cjs} +1 -1
  62. package/dist/adapters/{core-BAwQ6u3F.js → core-p2tpIc-e.js} +2 -2
  63. package/dist/adapters/{cors-headers-BqdVnwOm.js → cors-headers-BtxruIvb.js} +1 -1
  64. package/dist/adapters/{cors-headers-B9wxgUI3.cjs → cors-headers-C-cQjvVu.cjs} +1 -1
  65. package/dist/adapters/express/index.cjs +1 -1
  66. package/dist/adapters/express/index.js +5 -5
  67. package/dist/adapters/fastify/index.cjs +1 -1
  68. package/dist/adapters/fastify/index.js +5 -5
  69. package/dist/adapters/{handler-TM2VACi3.js → handler-Bt51aMjp.js} +147 -123
  70. package/dist/adapters/handler-CUvj92A3.cjs +32 -0
  71. package/dist/adapters/hono/index.cjs +1 -1
  72. package/dist/adapters/hono/index.js +4 -4
  73. package/dist/adapters/mcp-app-html.cjs +1 -1
  74. package/dist/adapters/mcp-app-html.js +1 -1
  75. package/dist/adapters/mcp-tools.cjs +1 -1
  76. package/dist/adapters/mcp-tools.js +2 -2
  77. package/dist/adapters/{mcp-transport-BRcw-fQh.cjs → mcp-transport-BQdvIzJZ.cjs} +1 -1
  78. package/dist/adapters/{mcp-transport-Dd8CiQTk.js → mcp-transport-D_PRLMFH.js} +1 -1
  79. package/dist/adapters/nextjs/index.cjs +1 -1
  80. package/dist/adapters/nextjs/index.js +5 -5
  81. package/dist/adapters/{openai-GmnIW6fg.cjs → openai-B8PNzl8m.cjs} +1 -1
  82. package/dist/adapters/{openai-1xYjNPzU.cjs → openai-BO26SYis.cjs} +1 -1
  83. package/dist/adapters/{openai-CvzXzyAV.js → openai-D8lG5oYl.js} +1 -1
  84. package/dist/adapters/{openai-DedOllZH.js → openai-f29v_-Jd.js} +1 -1
  85. package/dist/adapters/{utils-2FhyAM0C.js → utils-BVIM2U0f.js} +6 -0
  86. package/dist/adapters/{utils-BQz41FNg.cjs → utils-CPSvgG1y.cjs} +1 -1
  87. package/dist/adapters/utils.cjs +1 -1
  88. package/dist/adapters/utils.js +1 -1
  89. package/dist/cjs/client/charts/chartConfigHelpers.d.ts +5 -0
  90. package/dist/cjs/client/components/AnalyticsDashboard.d.ts +1 -1
  91. package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +2 -0
  92. package/dist/cjs/client/components/DashboardFilters/EditModeFilterList.d.ts +2 -0
  93. package/dist/cjs/client/components/DashboardGrid.d.ts +3 -1
  94. package/dist/cjs/client/components/DashboardPortletCard.d.ts +1 -1
  95. package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +5 -1
  96. package/dist/cjs/client/components/charts/WaterfallChart.d.ts +1 -1
  97. package/dist/cjs/client/components/charts/cartesianChartHelpers.d.ts +14 -1
  98. package/dist/cjs/client/components/charts/chartScaffolding.d.ts +61 -1
  99. package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +7 -1
  100. package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
  101. package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
  102. package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +3 -1
  103. package/dist/cjs/client/hooks/useResponsiveDashboard.d.ts +10 -1
  104. package/dist/cjs/client/hooks.d.ts +1 -1
  105. package/dist/cjs/client/index.d.ts +1 -1
  106. package/dist/cjs/client/types.d.ts +30 -0
  107. package/dist/cjs/client/utils/autoGranularity.d.ts +18 -0
  108. package/dist/cjs/client/utils/index.d.ts +1 -0
  109. package/dist/cjs/client/utils/timeAxisFormatting.d.ts +81 -0
  110. package/dist/client/charts/chartConfigHelpers.d.ts +5 -0
  111. package/dist/client/charts.js +12 -12
  112. package/dist/client/chunks/{ActivityGridChart-DYJkZzwx.js → ActivityGridChart-9jQtN8-K.js} +4 -4
  113. package/dist/client/chunks/{ActivityGridChart-DYJkZzwx.js.map → ActivityGridChart-9jQtN8-K.js.map} +1 -1
  114. package/dist/client/chunks/{BarSeries-RYOuAiaW.js → BarSeries-DK-vuiwN.js} +2 -2
  115. package/dist/client/chunks/{BarSeries-RYOuAiaW.js.map → BarSeries-DK-vuiwN.js.map} +1 -1
  116. package/dist/client/chunks/{BubbleChart-DYLLZ_cl.js → BubbleChart-C68fNRF0.js} +4 -4
  117. package/dist/client/chunks/{BubbleChart-DYLLZ_cl.js.map → BubbleChart-C68fNRF0.js.map} +1 -1
  118. package/dist/client/chunks/{BubbleChart.helpers-CjbCvUeT.js → BubbleChart.helpers-uNNiXCp3.js} +2 -2
  119. package/dist/client/chunks/{BubbleChart.helpers-CjbCvUeT.js.map → BubbleChart.helpers-uNNiXCp3.js.map} +1 -1
  120. package/dist/client/chunks/{ChartStates-CmQaadEo.js → ChartStates-q3isKswo.js} +2 -2
  121. package/dist/client/chunks/{ChartStates-CmQaadEo.js.map → ChartStates-q3isKswo.js.map} +1 -1
  122. package/dist/client/chunks/{ChartSummaryHeader-CD9xvGd8.js → ChartSummaryHeader-CArf-Zae.js} +3 -3
  123. package/dist/client/chunks/{ChartSummaryHeader-CD9xvGd8.js.map → ChartSummaryHeader-CArf-Zae.js.map} +1 -1
  124. package/dist/client/chunks/{DashboardEditModal-B7OSUOiv.js → DashboardEditModal-DE4tRYdM.js} +1954 -1932
  125. package/dist/client/chunks/DashboardEditModal-DE4tRYdM.js.map +1 -0
  126. package/dist/client/chunks/{DataHistogram-06lCYT_Q.js → DataHistogram-ByPAXQ7l.js} +2 -2
  127. package/dist/client/chunks/{DataHistogram-06lCYT_Q.js.map → DataHistogram-ByPAXQ7l.js.map} +1 -1
  128. package/dist/client/chunks/{DotStripChart-BmKYH2yE.js → DotStripChart-C6pnWcnJ.js} +5 -5
  129. package/dist/client/chunks/{DotStripChart-BmKYH2yE.js.map → DotStripChart-C6pnWcnJ.js.map} +1 -1
  130. package/dist/client/chunks/{FunnelViews-Ck885XTd.js → FunnelViews-CjbkdKgA.js} +2 -2
  131. package/dist/client/chunks/{FunnelViews-Ck885XTd.js.map → FunnelViews-CjbkdKgA.js.map} +1 -1
  132. package/dist/client/chunks/{HeatMapChart-CZeYGRLC.js → HeatMapChart-CNxD7vQ7.js} +4 -4
  133. package/dist/client/chunks/{HeatMapChart-CZeYGRLC.js.map → HeatMapChart-CNxD7vQ7.js.map} +1 -1
  134. package/dist/client/chunks/{KpiDelta-ls34EAAv.js → KpiDelta-_ZYYbF62.js} +2 -2
  135. package/dist/client/chunks/{KpiDelta-ls34EAAv.js.map → KpiDelta-_ZYYbF62.js.map} +1 -1
  136. package/dist/client/chunks/{KpiText-BByhn9KP.js → KpiText-DbqKXrt_.js} +2 -2
  137. package/dist/client/chunks/{KpiText-BByhn9KP.js.map → KpiText-DbqKXrt_.js.map} +1 -1
  138. package/dist/client/chunks/{MarkdownChart.helpers-BZuq25Uq.js → MarkdownChart.helpers-BXTbF88z.js} +2 -2
  139. package/dist/client/chunks/{MarkdownChart.helpers-BZuq25Uq.js.map → MarkdownChart.helpers-BXTbF88z.js.map} +1 -1
  140. package/dist/client/chunks/{PortletAnalysisModal-BUK4uJRQ.js → PortletAnalysisModal-DyAH0Fr6.js} +6 -6
  141. package/dist/client/chunks/{PortletAnalysisModal-BUK4uJRQ.js.map → PortletAnalysisModal-DyAH0Fr6.js.map} +1 -1
  142. package/dist/client/chunks/{ProportionBarChart-BCnhz3Xe.js → ProportionBarChart-C-leF5gI.js} +6 -6
  143. package/dist/client/chunks/{ProportionBarChart-BCnhz3Xe.js.map → ProportionBarChart-C-leF5gI.js.map} +1 -1
  144. package/dist/client/chunks/{RecordsTable-DpFttrbE.js → RecordsTable-DYZF1s9w.js} +6 -6
  145. package/dist/client/chunks/{RecordsTable-DpFttrbE.js.map → RecordsTable-DYZF1s9w.js.map} +1 -1
  146. package/dist/client/chunks/{RetentionCombinedChart-D6HL0Ewc.js → RetentionCombinedChart-CQXtz2yS.js} +3 -3
  147. package/dist/client/chunks/{RetentionCombinedChart-D6HL0Ewc.js.map → RetentionCombinedChart-CQXtz2yS.js.map} +1 -1
  148. package/dist/client/chunks/{RetentionHeatmap-4-FOghfG.js → RetentionHeatmap-1Thi6ecj.js} +2 -2
  149. package/dist/client/chunks/{RetentionHeatmap-4-FOghfG.js.map → RetentionHeatmap-1Thi6ecj.js.map} +1 -1
  150. package/dist/client/chunks/{ScatterSeries-C69e7fWt.js → ScatterSeries-B4nwj1RE.js} +2 -2
  151. package/dist/client/chunks/{ScatterSeries-C69e7fWt.js.map → ScatterSeries-B4nwj1RE.js.map} +1 -1
  152. package/dist/client/chunks/{SchemaVisualization-BLNTnD5S.js → SchemaVisualization--StKeQKD.js} +1 -1
  153. package/dist/client/chunks/{TextPortletModal-DH5HkRuy.js → TextPortletModal-BLokJrUd.js} +4 -4
  154. package/dist/client/chunks/{TextPortletModal-DH5HkRuy.js.map → TextPortletModal-BLokJrUd.js.map} +1 -1
  155. package/dist/client/chunks/{TreeMapLegend-CccnfTYy.js → TreeMapLegend-D_vqfx_X.js} +2 -2
  156. package/dist/client/chunks/{TreeMapLegend-CccnfTYy.js.map → TreeMapLegend-D_vqfx_X.js.map} +1 -1
  157. package/dist/client/chunks/{analysis-builder-Bau8adTK.js → analysis-builder-ChpumcKg.js} +10 -10
  158. package/dist/client/chunks/{analysis-builder-Bau8adTK.js.map → analysis-builder-ChpumcKg.js.map} +1 -1
  159. package/dist/client/chunks/{analysis-builder-shared-DFMkGsT_.js → analysis-builder-shared-0wLNwq5q.js} +64 -64
  160. package/dist/client/chunks/{analysis-builder-shared-DFMkGsT_.js.map → analysis-builder-shared-0wLNwq5q.js.map} +1 -1
  161. package/dist/client/chunks/cartesianChartHelpers-Do-TAOih.js +421 -0
  162. package/dist/client/chunks/cartesianChartHelpers-Do-TAOih.js.map +1 -0
  163. package/dist/client/chunks/{chart-activity-grid-DgXF88W6.js → chart-activity-grid-B9dC1A5R.js} +5 -5
  164. package/dist/client/chunks/{chart-activity-grid-DgXF88W6.js.map → chart-activity-grid-B9dC1A5R.js.map} +1 -1
  165. package/dist/client/chunks/chart-area-BEXKNAXv.js +138 -0
  166. package/dist/client/chunks/chart-area-BEXKNAXv.js.map +1 -0
  167. package/dist/client/chunks/chart-bar-SMb2q1G9.js +143 -0
  168. package/dist/client/chunks/chart-bar-SMb2q1G9.js.map +1 -0
  169. package/dist/client/chunks/{chart-box-plot-DzY4pP09.js → chart-box-plot-C5COpr1_.js} +3 -3
  170. package/dist/client/chunks/{chart-box-plot-DzY4pP09.js.map → chart-box-plot-C5COpr1_.js.map} +1 -1
  171. package/dist/client/chunks/{chart-bubble-Dmcv09zb.js → chart-bubble-Df2C1LQW.js} +5 -5
  172. package/dist/client/chunks/{chart-bubble-Dmcv09zb.js.map → chart-bubble-Df2C1LQW.js.map} +1 -1
  173. package/dist/client/chunks/{chart-candlestick-BQbqfz7P.js → chart-candlestick-DuDaGj4R.js} +3 -3
  174. package/dist/client/chunks/{chart-candlestick-BQbqfz7P.js.map → chart-candlestick-DuDaGj4R.js.map} +1 -1
  175. package/dist/client/chunks/{chart-config-area-Bvft9O_T.js → chart-config-area-DVA0oKNp.js} +11 -10
  176. package/dist/client/chunks/chart-config-area-DVA0oKNp.js.map +1 -0
  177. package/dist/client/chunks/{chart-config-bar-OyxCyA3e.js → chart-config-bar-DhqbYfpf.js} +9 -8
  178. package/dist/client/chunks/chart-config-bar-DhqbYfpf.js.map +1 -0
  179. package/dist/client/chunks/{chart-config-kpi-delta-ZMObFeZr.js → chart-config-kpi-delta-BPMq7hzP.js} +2 -2
  180. package/dist/client/chunks/{chart-config-kpi-delta-ZMObFeZr.js.map → chart-config-kpi-delta-BPMq7hzP.js.map} +1 -1
  181. package/dist/client/chunks/{chart-config-kpi-number-C6rnZbNk.js → chart-config-kpi-number-B83Z2jLe.js} +2 -2
  182. package/dist/client/chunks/{chart-config-kpi-number-C6rnZbNk.js.map → chart-config-kpi-number-B83Z2jLe.js.map} +1 -1
  183. package/dist/client/chunks/{chart-config-line-FKcg6zYi.js → chart-config-line-CYwh72pj.js} +11 -10
  184. package/dist/client/chunks/chart-config-line-CYwh72pj.js.map +1 -0
  185. package/dist/client/chunks/{chart-config-measure-profile-Bw7okF4K.js → chart-config-measure-profile-Chi9pZNK.js} +5 -3
  186. package/dist/client/chunks/chart-config-measure-profile-Chi9pZNK.js.map +1 -0
  187. package/dist/client/chunks/{chart-config-pie-tNg_02bP.js → chart-config-pie-CenIR70H.js} +2 -2
  188. package/dist/client/chunks/{chart-config-pie-tNg_02bP.js.map → chart-config-pie-CenIR70H.js.map} +1 -1
  189. package/dist/client/chunks/{chart-config-radar-BbK_cePI.js → chart-config-radar-iBtE5R3S.js} +2 -2
  190. package/dist/client/chunks/{chart-config-radar-BbK_cePI.js.map → chart-config-radar-iBtE5R3S.js.map} +1 -1
  191. package/dist/client/chunks/{chart-config-radial-bar-B-ysOwq_.js → chart-config-radial-bar-U0gm1O8q.js} +2 -2
  192. package/dist/client/chunks/{chart-config-radial-bar-B-ysOwq_.js.map → chart-config-radial-bar-U0gm1O8q.js.map} +1 -1
  193. package/dist/client/chunks/{chart-config-tree-map-CES9mAql.js → chart-config-tree-map-DxSNKyGd.js} +2 -2
  194. package/dist/client/chunks/{chart-config-tree-map-CES9mAql.js.map → chart-config-tree-map-DxSNKyGd.js.map} +1 -1
  195. package/dist/client/chunks/{chart-config-waterfall-D3xkuYph.js → chart-config-waterfall-DtDzu_14.js} +5 -3
  196. package/dist/client/chunks/chart-config-waterfall-DtDzu_14.js.map +1 -0
  197. package/dist/client/chunks/{chart-data-table-CPjBzcme.js → chart-data-table-CytJbYDW.js} +5 -5
  198. package/dist/client/chunks/{chart-data-table-CPjBzcme.js.map → chart-data-table-CytJbYDW.js.map} +1 -1
  199. package/dist/client/chunks/{chart-funnel-DO66-IUH.js → chart-funnel-CXV90Ndw.js} +3 -3
  200. package/dist/client/chunks/{chart-funnel-DO66-IUH.js.map → chart-funnel-CXV90Ndw.js.map} +1 -1
  201. package/dist/client/chunks/{chart-gauge-BqWifMPW.js → chart-gauge-C4nY8NQj.js} +5 -5
  202. package/dist/client/chunks/{chart-gauge-BqWifMPW.js.map → chart-gauge-C4nY8NQj.js.map} +1 -1
  203. package/dist/client/chunks/{chart-heat-map-Cqsz9upg.js → chart-heat-map-BebyQ9Vf.js} +5 -5
  204. package/dist/client/chunks/{chart-heat-map-Cqsz9upg.js.map → chart-heat-map-BebyQ9Vf.js.map} +1 -1
  205. package/dist/client/chunks/{chart-kpi-delta-Bn_Anifd.js → chart-kpi-delta-CeEhPFso.js} +4 -4
  206. package/dist/client/chunks/{chart-kpi-delta-Bn_Anifd.js.map → chart-kpi-delta-CeEhPFso.js.map} +1 -1
  207. package/dist/client/chunks/{chart-kpi-number-6Hp4nqp9.js → chart-kpi-number-BU6XRX3h.js} +4 -4
  208. package/dist/client/chunks/{chart-kpi-number-6Hp4nqp9.js.map → chart-kpi-number-BU6XRX3h.js.map} +1 -1
  209. package/dist/client/chunks/{chart-kpi-text-Dbe-anJN.js → chart-kpi-text-skyF2iq6.js} +5 -5
  210. package/dist/client/chunks/{chart-kpi-text-Dbe-anJN.js.map → chart-kpi-text-skyF2iq6.js.map} +1 -1
  211. package/dist/client/chunks/chart-line-JtvhnFif.js +135 -0
  212. package/dist/client/chunks/chart-line-JtvhnFif.js.map +1 -0
  213. package/dist/client/chunks/{chart-markdown-BN0nnp-T.js → chart-markdown-CdrimJrm.js} +3 -3
  214. package/dist/client/chunks/{chart-markdown-BN0nnp-T.js.map → chart-markdown-CdrimJrm.js.map} +1 -1
  215. package/dist/client/chunks/{chart-measure-profile-B3bL3mfE.js → chart-measure-profile-DOl_xbBI.js} +19 -11
  216. package/dist/client/chunks/chart-measure-profile-DOl_xbBI.js.map +1 -0
  217. package/dist/client/chunks/{chart-pie-BD2UKMmW.js → chart-pie-DY_3XcSj.js} +6 -6
  218. package/dist/client/chunks/{chart-pie-BD2UKMmW.js.map → chart-pie-DY_3XcSj.js.map} +1 -1
  219. package/dist/client/chunks/{chart-radar-NyciE337.js → chart-radar-qus6NAYq.js} +6 -6
  220. package/dist/client/chunks/{chart-radar-NyciE337.js.map → chart-radar-qus6NAYq.js.map} +1 -1
  221. package/dist/client/chunks/{chart-radial-bar-BrmjHNAL.js → chart-radial-bar-CmvRUW7j.js} +6 -6
  222. package/dist/client/chunks/{chart-radial-bar-BrmjHNAL.js.map → chart-radial-bar-CmvRUW7j.js.map} +1 -1
  223. package/dist/client/chunks/{chart-sankey-DWPKdkOS.js → chart-sankey-Blp-T8_v.js} +2 -2
  224. package/dist/client/chunks/{chart-sankey-DWPKdkOS.js.map → chart-sankey-Blp-T8_v.js.map} +1 -1
  225. package/dist/client/chunks/{chart-scatter-CTvzOt2P.js → chart-scatter-BvHmImdY.js} +7 -7
  226. package/dist/client/chunks/{chart-scatter-CTvzOt2P.js.map → chart-scatter-BvHmImdY.js.map} +1 -1
  227. package/dist/client/chunks/{chart-sunburst-B3DzSatC.js → chart-sunburst-CYCSZ6pL.js} +2 -2
  228. package/dist/client/chunks/{chart-sunburst-B3DzSatC.js.map → chart-sunburst-CYCSZ6pL.js.map} +1 -1
  229. package/dist/client/chunks/{chart-tree-map-DyTG0Alb.js → chart-tree-map-DXl7KCM8.js} +7 -7
  230. package/dist/client/chunks/{chart-tree-map-DyTG0Alb.js.map → chart-tree-map-DXl7KCM8.js.map} +1 -1
  231. package/dist/client/chunks/{chart-waterfall-bJ_W_eiJ.js → chart-waterfall-E8bbmkm7.js} +99 -81
  232. package/dist/client/chunks/chart-waterfall-E8bbmkm7.js.map +1 -0
  233. package/dist/client/chunks/{chartComponentRegistry-xa0hV8aQ.js → chartComponentRegistry-LNS2NwAv.js} +4 -4
  234. package/dist/client/chunks/{chartComponentRegistry-xa0hV8aQ.js.map → chartComponentRegistry-LNS2NwAv.js.map} +1 -1
  235. package/dist/client/chunks/{chartPlugin-uXUb0QRv.js → chartPlugin-yM7JPt-B.js} +14 -14
  236. package/dist/client/chunks/{chartPlugin-uXUb0QRv.js.map → chartPlugin-yM7JPt-B.js.map} +1 -1
  237. package/dist/client/chunks/{chartRegistry-CVOMsXOK.js → chartRegistry-CI9eqtt9.js} +57 -38
  238. package/dist/client/chunks/chartRegistry-CI9eqtt9.js.map +1 -0
  239. package/dist/client/chunks/chartScaffolding-DcJLGHlm.js +188 -0
  240. package/dist/client/chunks/chartScaffolding-DcJLGHlm.js.map +1 -0
  241. package/dist/client/chunks/{chartUtils-CcCLgSOB.js → chartUtils-C49Kr8Nt.js} +2 -2
  242. package/dist/client/chunks/{chartUtils-CcCLgSOB.js.map → chartUtils-C49Kr8Nt.js.map} +1 -1
  243. package/dist/client/chunks/{charts-core-BHhJICdb.js → charts-core-Cur4p6Mn.js} +3 -3
  244. package/dist/client/chunks/{charts-core-BHhJICdb.js.map → charts-core-Cur4p6Mn.js.map} +1 -1
  245. package/dist/client/chunks/{charts-loader-fPRsqaiJ.js → charts-loader-dfaiJVGE.js} +32 -32
  246. package/dist/client/chunks/{charts-loader-fPRsqaiJ.js.map → charts-loader-dfaiJVGE.js.map} +1 -1
  247. package/dist/client/chunks/{dashboardExport-Cz_5rWlF.js → dashboardExport-Cuas_Jm2.js} +203 -144
  248. package/dist/client/chunks/dashboardExport-Cuas_Jm2.js.map +1 -0
  249. package/dist/client/chunks/{gaugeChartHelpers-D1QsCg21.js → gaugeChartHelpers-B0uUgsQ4.js} +2 -2
  250. package/dist/client/chunks/{gaugeChartHelpers-D1QsCg21.js.map → gaugeChartHelpers-B0uUgsQ4.js.map} +1 -1
  251. package/dist/client/chunks/{nl-NL-DtiGzigu.js → nl-NL-Dl2q6V08.js} +7 -1
  252. package/dist/client/chunks/nl-NL-Dl2q6V08.js.map +1 -0
  253. package/dist/client/chunks/{pivotUtils-Cc-PAP1w.js → pivotUtils-CD_kVHWS.js} +2 -2
  254. package/dist/client/chunks/{pivotUtils-Cc-PAP1w.js.map → pivotUtils-CD_kVHWS.js.map} +1 -1
  255. package/dist/client/chunks/{providers-DJq_2QU4.js → providers-BanUxi9o.js} +4 -4
  256. package/dist/client/chunks/{providers-DJq_2QU4.js.map → providers-BanUxi9o.js.map} +1 -1
  257. package/dist/client/chunks/{radarChartHelpers-B6Tcvmjg.js → radarChartHelpers-MSCZGEBc.js} +2 -2
  258. package/dist/client/chunks/{radarChartHelpers-B6Tcvmjg.js.map → radarChartHelpers-MSCZGEBc.js.map} +1 -1
  259. package/dist/client/chunks/{radialBarChartHelpers-2KuJKH_9.js → radialBarChartHelpers-CJ0tVPGJ.js} +2 -2
  260. package/dist/client/chunks/{radialBarChartHelpers-2KuJKH_9.js.map → radialBarChartHelpers-CJ0tVPGJ.js.map} +1 -1
  261. package/dist/client/chunks/{schema-visualization-B04dKs1c.js → schema-visualization-BBuxndAv.js} +5 -5
  262. package/dist/client/chunks/{schema-visualization-B04dKs1c.js.map → schema-visualization-BBuxndAv.js.map} +1 -1
  263. package/dist/client/chunks/{useCubeFieldLabel-DwTL-1fd.js → useCubeFieldLabel-DORlYhRk.js} +2 -2
  264. package/dist/client/chunks/{useCubeFieldLabel-DwTL-1fd.js.map → useCubeFieldLabel-DORlYhRk.js.map} +1 -1
  265. package/dist/client/chunks/{useCubeMetaQuery-CKkxam6t.js → useCubeMetaQuery-ClNaCRP-.js} +2 -2
  266. package/dist/client/chunks/{useCubeMetaQuery-CKkxam6t.js.map → useCubeMetaQuery-ClNaCRP-.js.map} +1 -1
  267. package/dist/client/chunks/{useDirtyStateTracking-CesO_Xr8.js → useDirtyStateTracking-BA8JTfGP.js} +111 -108
  268. package/dist/client/chunks/useDirtyStateTracking-BA8JTfGP.js.map +1 -0
  269. package/dist/client/chunks/{useExplainAI-B9CqKiqE.js → useExplainAI-DhkrNycx.js} +3 -3
  270. package/dist/client/chunks/{useExplainAI-B9CqKiqE.js.map → useExplainAI-DhkrNycx.js.map} +1 -1
  271. package/dist/client/chunks/{useTranslation-DgVTqWyJ.js → useTranslation-DQ_tbKyn.js} +9 -3
  272. package/dist/client/chunks/{useTranslation-DgVTqWyJ.js.map → useTranslation-DQ_tbKyn.js.map} +1 -1
  273. package/dist/client/chunks/utils-4nU07wK8.js.map +1 -1
  274. package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
  275. package/dist/client/components/DashboardFilters/CompactFilterBar.d.ts +2 -0
  276. package/dist/client/components/DashboardFilters/EditModeFilterList.d.ts +2 -0
  277. package/dist/client/components/DashboardGrid.d.ts +3 -1
  278. package/dist/client/components/DashboardPortletCard.d.ts +1 -1
  279. package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +5 -1
  280. package/dist/client/components/charts/WaterfallChart.d.ts +1 -1
  281. package/dist/client/components/charts/cartesianChartHelpers.d.ts +14 -1
  282. package/dist/client/components/charts/chartScaffolding.d.ts +61 -1
  283. package/dist/client/components/dashboard/DashboardContext.d.ts +7 -1
  284. package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
  285. package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
  286. package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +3 -1
  287. package/dist/client/components.js +17 -17
  288. package/dist/client/components.js.map +1 -1
  289. package/dist/client/hooks/useResponsiveDashboard.d.ts +10 -1
  290. package/dist/client/hooks.d.ts +1 -1
  291. package/dist/client/hooks.js +3 -3
  292. package/dist/client/icons.js +1 -1
  293. package/dist/client/index.d.ts +1 -1
  294. package/dist/client/index.js +14 -14
  295. package/dist/client/index.js.map +1 -1
  296. package/dist/client/providers.js +1 -1
  297. package/dist/client/schema.js +1 -1
  298. package/dist/client/types.d.ts +30 -0
  299. package/dist/client/utils/autoGranularity.d.ts +18 -0
  300. package/dist/client/utils/index.d.ts +1 -0
  301. package/dist/client/utils/timeAxisFormatting.d.ts +81 -0
  302. package/dist/client/utils.js +12 -12
  303. package/dist/client/utils.js.map +1 -1
  304. package/dist/client-bundle-stats.html +1 -1
  305. package/dist/mcp-app/mcp-app.html +111 -111
  306. package/dist/server/{chartConfigHelpers-CLCi4RHs.js → chartConfigHelpers-BZ93eyEi.js} +22 -1
  307. package/dist/server/{chartConfigHelpers-BhME7ow_.cjs → chartConfigHelpers-DqYCkMe-.cjs} +1 -1
  308. package/dist/server/index.cjs +3 -3
  309. package/dist/server/index.js +1732 -1721
  310. package/package.json +2 -2
  311. package/dist/adapters/ActivityGridChart.config-BiO_BwqY.cjs +0 -1
  312. package/dist/adapters/ActivityGridChart.config-CEwmvCjC.js +0 -1
  313. package/dist/adapters/AreaChart.config-BXAsVmwo.cjs +0 -1
  314. package/dist/adapters/AreaChart.config-CiXadO2d.js +0 -1
  315. package/dist/adapters/BarChart.config-By2FZ2kF.js +0 -1
  316. package/dist/adapters/BarChart.config-CW27elpr.cjs +0 -1
  317. package/dist/adapters/BoxPlotChart.config-CepOeLm6.js +0 -1
  318. package/dist/adapters/BoxPlotChart.config-tiimrKXX.cjs +0 -1
  319. package/dist/adapters/BubbleChart.config-36YTcVrQ.cjs +0 -1
  320. package/dist/adapters/BubbleChart.config-CsgN3Ttr.js +0 -1
  321. package/dist/adapters/CandlestickChart.config-B1_CPFAW.cjs +0 -1
  322. package/dist/adapters/CandlestickChart.config-DCeUTeiy.js +0 -1
  323. package/dist/adapters/DataTable.config-DxYwamnu.js +0 -1
  324. package/dist/adapters/DataTable.config-IN3GABQx.cjs +0 -1
  325. package/dist/adapters/DotStripChart.config-4nqXGR4i.cjs +0 -1
  326. package/dist/adapters/DotStripChart.config-DTO7E6Ya.js +0 -1
  327. package/dist/adapters/FunnelChart.config-DDzcKtc-.cjs +0 -1
  328. package/dist/adapters/FunnelChart.config-DywH337V.js +0 -1
  329. package/dist/adapters/GaugeChart.config-B15umptj.cjs +0 -1
  330. package/dist/adapters/GaugeChart.config-B649tVKp.js +0 -1
  331. package/dist/adapters/HeatMapChart.config-BdCTMqLA.js +0 -1
  332. package/dist/adapters/HeatMapChart.config-IMBhg4W9.cjs +0 -1
  333. package/dist/adapters/KpiDelta.config-BHgaI9Gx.cjs +0 -1
  334. package/dist/adapters/KpiDelta.config-OsBjIc_V.js +0 -1
  335. package/dist/adapters/KpiNumber.config-Bv9riES9.js +0 -1
  336. package/dist/adapters/KpiNumber.config-CYDzBYFA.cjs +0 -1
  337. package/dist/adapters/KpiText.config-RnsCqsm9.js +0 -1
  338. package/dist/adapters/KpiText.config-Y8Rnb2Nj.cjs +0 -1
  339. package/dist/adapters/LineChart.config-C3g8_jPt.js +0 -1
  340. package/dist/adapters/LineChart.config-CUfL4ZkJ.cjs +0 -1
  341. package/dist/adapters/MarkdownChart.config-CpijhI2w.cjs +0 -1
  342. package/dist/adapters/MarkdownChart.config-Jn4Zb-NH.js +0 -1
  343. package/dist/adapters/MeasureProfileChart.config-BfKPTnqR.js +0 -1
  344. package/dist/adapters/MeasureProfileChart.config-DCDH31a3.cjs +0 -1
  345. package/dist/adapters/PieChart.config-Bg3Mao5o.cjs +0 -1
  346. package/dist/adapters/PieChart.config-CIF81MzA.js +0 -1
  347. package/dist/adapters/ProportionBarChart.config-BlPsMMEk.cjs +0 -1
  348. package/dist/adapters/ProportionBarChart.config-BmTVGcQW.js +0 -1
  349. package/dist/adapters/RadarChart.config-BycPR9z8.js +0 -1
  350. package/dist/adapters/RadarChart.config-Dog6QtI2.cjs +0 -1
  351. package/dist/adapters/RadialBarChart.config-Di3ovQ4K.js +0 -1
  352. package/dist/adapters/RadialBarChart.config-Zj0zioze.cjs +0 -1
  353. package/dist/adapters/RecordsTable.config-BadLMdUV.js +0 -1
  354. package/dist/adapters/RecordsTable.config-inxw1DXR.cjs +0 -1
  355. package/dist/adapters/RetentionCombinedChart.config-Dr2dpeDV.cjs +0 -1
  356. package/dist/adapters/RetentionCombinedChart.config-OJsvPybR.js +0 -1
  357. package/dist/adapters/RetentionHeatmap.config-C51uRSfX.cjs +0 -1
  358. package/dist/adapters/RetentionHeatmap.config-DVnwGs5p.js +0 -1
  359. package/dist/adapters/SankeyChart.config-CAXBtVXD.js +0 -1
  360. package/dist/adapters/SankeyChart.config-DxhC9P0u.cjs +0 -1
  361. package/dist/adapters/ScatterChart.config-ClCGa8Lt.js +0 -1
  362. package/dist/adapters/ScatterChart.config-CoPZgwLx.cjs +0 -1
  363. package/dist/adapters/SunburstChart.config-DrZfdP6B.cjs +0 -1
  364. package/dist/adapters/SunburstChart.config-bKBKmu4e.js +0 -1
  365. package/dist/adapters/TreeMapChart.config-C-S7VqVg.cjs +0 -1
  366. package/dist/adapters/TreeMapChart.config-C12JqraB.js +0 -1
  367. package/dist/adapters/WaterfallChart.config-C5kwn5iF.js +0 -1
  368. package/dist/adapters/WaterfallChart.config-UcJtN8HT.cjs +0 -1
  369. package/dist/adapters/handler-8sQlwdFt.cjs +0 -32
  370. package/dist/client/chunks/AngledXAxisTick-DTvPXpZV.js +0 -21
  371. package/dist/client/chunks/AngledXAxisTick-DTvPXpZV.js.map +0 -1
  372. package/dist/client/chunks/DashboardEditModal-B7OSUOiv.js.map +0 -1
  373. package/dist/client/chunks/cartesianChartHelpers-XuqUcTM1.js +0 -256
  374. package/dist/client/chunks/cartesianChartHelpers-XuqUcTM1.js.map +0 -1
  375. package/dist/client/chunks/chart-area-D6InVJ_Y.js +0 -125
  376. package/dist/client/chunks/chart-area-D6InVJ_Y.js.map +0 -1
  377. package/dist/client/chunks/chart-bar-BkiQa3FZ.js +0 -129
  378. package/dist/client/chunks/chart-bar-BkiQa3FZ.js.map +0 -1
  379. package/dist/client/chunks/chart-config-area-Bvft9O_T.js.map +0 -1
  380. package/dist/client/chunks/chart-config-bar-OyxCyA3e.js.map +0 -1
  381. package/dist/client/chunks/chart-config-line-FKcg6zYi.js.map +0 -1
  382. package/dist/client/chunks/chart-config-measure-profile-Bw7okF4K.js.map +0 -1
  383. package/dist/client/chunks/chart-config-waterfall-D3xkuYph.js.map +0 -1
  384. package/dist/client/chunks/chart-line-CIsG5AVG.js +0 -122
  385. package/dist/client/chunks/chart-line-CIsG5AVG.js.map +0 -1
  386. package/dist/client/chunks/chart-measure-profile-B3bL3mfE.js.map +0 -1
  387. package/dist/client/chunks/chart-waterfall-bJ_W_eiJ.js.map +0 -1
  388. package/dist/client/chunks/chartRegistry-CVOMsXOK.js.map +0 -1
  389. package/dist/client/chunks/chartScaffolding-CBw7fDuD.js +0 -131
  390. package/dist/client/chunks/chartScaffolding-CBw7fDuD.js.map +0 -1
  391. package/dist/client/chunks/dashboardExport-Cz_5rWlF.js.map +0 -1
  392. package/dist/client/chunks/nl-NL-DtiGzigu.js.map +0 -1
  393. package/dist/client/chunks/useDirtyStateTracking-CesO_Xr8.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"chartPlugin-uXUb0QRv.js","names":["barChartConfig","lineChartConfig","areaChartConfig","pieChartConfig","scatterChartConfig","bubbleChartConfig","radarChartConfig","radialBarChartConfig","treemapChartConfig","dataTableConfig","recordsTableConfig","activityGridChartConfig","kpiNumberConfig","kpiDeltaConfig","kpiTextConfig","markdownConfig","funnelChartConfig","sankeyChartConfig","sunburstChartConfig","heatmapChartConfig","retentionHeatmapConfig","retentionCombinedConfig","boxPlotChartConfig","dotStripChartConfig","waterfallChartConfig","candlestickChartConfig","measureProfileChartConfig","proportionBarChartConfig","gaugeChartConfig","registerCustomChartEntry","getCustomChartEntry","composeChartConfig","unregisterCustomChartEntry","chartRegistry","unregisterConfigFromCache","registerConfigToCache","registerChartComponent","unregisterChartComponent","baseConfigs","chartConfigRegistry","type","isRecordGrainChart","chartType","registerChartConfig","config","unregisterChartConfig","chartDefinitionToEntry","definition","chartPluginRegistry","backup","icon","listener"],"sources":["../../../src/client/charts/chartConfigRegistry.ts","../../../src/client/charts/chartPlugin.ts"],"sourcesContent":["import { barChartConfig } from '../components/charts/BarChart.config.js'\nimport { lineChartConfig } from '../components/charts/LineChart.config.js'\nimport { areaChartConfig } from '../components/charts/AreaChart.config.js'\nimport { pieChartConfig } from '../components/charts/PieChart.config.js'\nimport { scatterChartConfig } from '../components/charts/ScatterChart.config.js'\nimport { bubbleChartConfig } from '../components/charts/BubbleChart.config.js'\nimport { radarChartConfig } from '../components/charts/RadarChart.config.js'\nimport { radialBarChartConfig } from '../components/charts/RadialBarChart.config.js'\nimport { treemapChartConfig } from '../components/charts/TreeMapChart.config.js'\nimport { dataTableConfig } from '../components/charts/DataTable.config.js'\nimport { recordsTableConfig } from '../components/charts/RecordsTable.config.js'\nimport { activityGridChartConfig } from '../components/charts/ActivityGridChart.config.js'\nimport { kpiNumberConfig } from '../components/charts/KpiNumber.config.js'\nimport { kpiDeltaConfig } from '../components/charts/KpiDelta.config.js'\nimport { kpiTextConfig } from '../components/charts/KpiText.config.js'\nimport { markdownConfig } from '../components/charts/MarkdownChart.config.js'\nimport { funnelChartConfig } from '../components/charts/FunnelChart.config.js'\nimport { sankeyChartConfig } from '../components/charts/SankeyChart.config.js'\nimport { sunburstChartConfig } from '../components/charts/SunburstChart.config.js'\nimport { heatmapChartConfig } from '../components/charts/HeatMapChart.config.js'\nimport { retentionHeatmapConfig } from '../components/charts/RetentionHeatmap.config.js'\nimport { retentionCombinedConfig } from '../components/charts/RetentionCombinedChart.config.js'\nimport { boxPlotChartConfig } from '../components/charts/BoxPlotChart.config.js'\nimport { dotStripChartConfig } from '../components/charts/DotStripChart.config.js'\nimport { waterfallChartConfig } from '../components/charts/WaterfallChart.config.js'\nimport { candlestickChartConfig } from '../components/charts/CandlestickChart.config.js'\nimport { measureProfileChartConfig } from '../components/charts/MeasureProfileChart.config.js'\nimport { proportionBarChartConfig } from '../components/charts/ProportionBarChart.config.js'\nimport { gaugeChartConfig } from '../components/charts/GaugeChart.config.js'\nimport type { BuiltInChartType } from '../types.js'\nimport type { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs.js'\nimport { chartRegistry, composeChartConfig } from './chartRegistry.js'\n\n/**\n * Statically-imported full config shapes (drop zones, display options, clickable\n * elements, validation) for every built-in chart. These are the lazy-loaded\n * side of a chart, but the eager registry below needs them synchronously because\n * the server agent reads drop zones for mandatory-zone validation and tool\n * guidance. Eager metadata (label/description/useCase/isAvailable) is NOT here —\n * it lives on the `chartRegistry` entry, its single source of truth.\n */\nconst baseConfigs: Record<BuiltInChartType, ChartTypeConfig> = {\n bar: barChartConfig,\n line: lineChartConfig,\n area: areaChartConfig,\n pie: pieChartConfig,\n scatter: scatterChartConfig,\n bubble: bubbleChartConfig,\n radar: radarChartConfig,\n radialBar: radialBarChartConfig,\n treemap: treemapChartConfig,\n table: dataTableConfig,\n recordsTable: recordsTableConfig,\n activityGrid: activityGridChartConfig,\n kpiNumber: kpiNumberConfig,\n kpiDelta: kpiDeltaConfig,\n kpiText: kpiTextConfig,\n markdown: markdownConfig,\n funnel: funnelChartConfig,\n sankey: sankeyChartConfig,\n sunburst: sunburstChartConfig,\n heatmap: heatmapChartConfig,\n retentionHeatmap: retentionHeatmapConfig,\n retentionCombined: retentionCombinedConfig,\n boxPlot: boxPlotChartConfig,\n dotStrip: dotStripChartConfig,\n waterfall: waterfallChartConfig,\n candlestick: candlestickChartConfig,\n measureProfile: measureProfileChartConfig,\n proportionBar: proportionBarChartConfig,\n gauge: gaugeChartConfig,\n}\n\n/**\n * Registry of all chart type configurations (the eager / full / server source).\n *\n * Every built-in is composed from its `chartRegistry` entry's metadata (single\n * source of truth) laid over its full config shape. Drop zones / display options\n * stay here in full because the server agent reads them synchronously.\n */\nexport const chartConfigRegistry: ChartConfigRegistry = Object.fromEntries(\n (Object.keys(chartRegistry) as BuiltInChartType[]).map((type) => [\n type,\n composeChartConfig(chartRegistry[type], baseConfigs[type]),\n ])\n)\n\n/**\n * Whether a chart lists records rather than aggregates, and so needs an\n * `ungrouped` query.\n *\n * Reads the eager registry so the query builders need no chart-type switch.\n */\nexport function isRecordGrainChart(chartType: string): boolean {\n return chartConfigRegistry[chartType]?.recordGrain === true\n}\n\n/**\n * Register a custom chart config into the registry.\n * Used by the chart plugin system.\n */\nexport function registerChartConfig(type: string, config: ChartTypeConfig): void {\n chartConfigRegistry[type] = config\n}\n\n/**\n * Unregister a chart config from the registry.\n * Used by the chart plugin system.\n */\nexport function unregisterChartConfig(type: string): void {\n delete chartConfigRegistry[type]\n}\n","/**\n * Chart Plugin System\n *\n * Provides a public API for registering custom chart types at runtime.\n * Custom charts can extend the built-in set or override existing chart types.\n *\n * Registration via CubeProvider (recommended):\n * ```tsx\n * <CubeProvider customCharts={[{ type: 'gantt', label: 'Gantt', config, component }]}>\n * ```\n *\n * Imperative registration (library authors):\n * ```ts\n * import { chartPluginRegistry } from 'drizzle-cube/client'\n * chartPluginRegistry.register({ type: 'gantt', label: 'Gantt', config, component })\n * ```\n */\n\nimport type { ComponentType } from 'react'\nimport type { ChartProps } from '../types.js'\nimport type { ChartTypeConfig } from './chartConfigs.js'\nimport type { IconProps } from '../icons/types.js'\nimport { registerChartConfig, unregisterChartConfig, chartConfigRegistry } from './chartConfigRegistry.js'\nimport { registerConfigToCache, unregisterConfigFromCache } from './lazyChartConfigRegistry.js'\nimport { registerChartComponent, unregisterChartComponent } from './chartComponentRegistry.js'\nimport {\n type ChartRegistryEntry,\n registerCustomChartEntry,\n unregisterCustomChartEntry,\n getCustomChartEntry,\n} from './chartRegistry.js'\n\n/**\n * Map a custom `ChartDefinition` onto the unified `ChartRegistryEntry` shape —\n * the same shape built-in charts use — so both flow through one lookup path.\n * `config` is the label-normalized config; the entry's lazy thunk resolves the\n * provided config object directly (it is already in memory, not code-split).\n */\nfunction chartDefinitionToEntry(\n definition: ChartDefinition,\n config: ChartTypeConfig\n): ChartRegistryEntry {\n return {\n label: config.label ?? definition.label,\n // Plugins supply a ready-made icon component; absent one, use the bar icon.\n icon: definition.icon ?? 'chartBar',\n description: config.description,\n useCase: config.useCase,\n isAvailable: config.isAvailable,\n dependencies: definition.dependencies,\n config: async () => config,\n }\n}\n\n/**\n * Complete definition for registering a custom chart type.\n * Bundles component, config metadata, and optional icon.\n */\nexport interface ChartDefinition {\n /** Unique chart type identifier (e.g., 'myGantt', 'customBar') */\n type: string\n\n /** Display label for the chart type picker */\n label: string\n\n /** Chart type configuration (drop zones, display options, validation) */\n config: ChartTypeConfig\n\n /** The chart component (eager — loaded immediately) */\n component?: ComponentType<ChartProps>\n\n /** Lazy-loaded chart component (for code splitting). Use instead of `component`. */\n lazyComponent?: () => Promise<{ default: ComponentType<ChartProps> }>\n\n /** Optional icon component for the chart type picker */\n icon?: ComponentType<IconProps>\n\n /** Optional dependency info — shows install instructions if the import fails */\n dependencies?: {\n packageName: string\n installCommand: string\n }\n}\n\n/**\n * Central registry for custom chart plugins.\n *\n * Coordinates registration across the three internal registries\n * (config, lazy config cache, chart loader) and provides a\n * `useSyncExternalStore`-compatible subscription API for React reactivity.\n */\nclass ChartPluginRegistry {\n private customCharts = new Map<string, ChartDefinition>()\n private builtInBackups = new Map<string, ChartTypeConfig>()\n private version = 0\n private listeners = new Set<() => void>()\n\n /**\n * Register a custom chart definition.\n * If `type` matches a built-in chart, the built-in is backed up and can be\n * restored by calling `unregister()`.\n */\n register(definition: ChartDefinition): void {\n // Ensure the config has the label set\n const config: ChartTypeConfig = {\n ...definition.config,\n label: definition.config.label || definition.label,\n }\n\n // Backup built-in config if overriding and not already backed up\n if (\n chartConfigRegistry[definition.type] &&\n !this.builtInBackups.has(definition.type) &&\n !this.customCharts.has(definition.type)\n ) {\n this.builtInBackups.set(definition.type, chartConfigRegistry[definition.type])\n }\n\n // Store the definition\n this.customCharts.set(definition.type, definition)\n\n // Produce the unified entry — the single source of truth both built-in and\n // custom charts share — and register the component graph alongside it.\n registerCustomChartEntry(definition.type, chartDefinitionToEntry(definition, config))\n registerChartConfig(definition.type, config)\n registerConfigToCache(definition.type, config)\n registerChartComponent(\n definition.type,\n definition.component,\n definition.lazyComponent,\n definition.dependencies\n )\n\n this.bump()\n }\n\n /**\n * Unregister a custom chart.\n * If the chart type was a built-in override, the original built-in is restored.\n */\n unregister(type: string): void {\n if (!this.customCharts.has(type)) return\n\n this.customCharts.delete(type)\n unregisterCustomChartEntry(type)\n\n // Restore built-in backup if exists\n const backup = this.builtInBackups.get(type)\n if (backup) {\n registerChartConfig(type, backup)\n registerConfigToCache(type, backup)\n this.builtInBackups.delete(type)\n } else {\n unregisterChartConfig(type)\n unregisterConfigFromCache(type)\n }\n\n // Always unregister the custom component\n unregisterChartComponent(type)\n\n this.bump()\n }\n\n /** Get the custom icon component for a chart type, if one was registered. */\n getIcon(type: string): ComponentType<IconProps> | undefined {\n // Derived from the unified entry — a string icon is a built-in IconName, so\n // only a component value counts as a plugin-supplied icon here.\n const icon = getCustomChartEntry(type)?.icon\n return icon && typeof icon !== 'string' ? icon : undefined\n }\n\n /** Get all registered custom chart type strings */\n getCustomTypes(): string[] {\n return Array.from(this.customCharts.keys())\n }\n\n /** Check if a chart type is a custom plugin (not built-in) */\n isCustom(type: string): boolean {\n return this.customCharts.has(type)\n }\n\n /**\n * Subscribe to registry changes.\n * Compatible with React's `useSyncExternalStore`.\n */\n subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener)\n return () => {\n this.listeners.delete(listener)\n }\n }\n\n /**\n * Get a snapshot of the registry version.\n * Compatible with React's `useSyncExternalStore`.\n */\n getSnapshot = (): number => {\n return this.version\n }\n\n private bump(): void {\n this.version++\n for (const listener of this.listeners) {\n listener()\n }\n }\n}\n\n/** Singleton chart plugin registry */\nexport const chartPluginRegistry = new ChartPluginRegistry()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAMsC,IAAyD;CAC7D,KAAKtC;CACL,MAAMC;CACN,MAAMC;CACN,KAAKC;CACL,SAASC;CACT,QAAQC;CACR,OAAOC;CACP,WAAWC;CACX,SAASC;CACT,OAAOC;CACP,cAAcC;CACd,cAAcC;CACd,WAAWC;CACX,UAAUC;C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uBC,GAAYH,CAAM,CAAC,GACpFD,EAAoBI,EAAW,MAAMH,CAAM,GAC3CT,EAAsBY,EAAW,MAAMH,CAAM,GAC7CR,EACEW,EAAW,MACXA,EAAW,WACXA,EAAW,eACXA,EAAW,YACb,GAEA,KAAK,KAAK;CACZ;CAMA,WAAWP,GAAoB;EAC7B,IAAI,CAAC,KAAK,aAAa,IAAIA,CAAI,GAAG;EAElC,KAAK,aAAa,OAAOA,CAAI,GAC7BR,EAA2BQ,CAAI;EAG/B,IAAMS,IAAS,KAAK,eAAe,IAAIT,CAAI;EACvCS,KACFN,EAAoBH,GAAMS,CAAM,GAChCd,EAAsBK,GAAMS,CAAM,GAClC,KAAK,eAAe,OAAOT,CAAI,MAE/BK,EAAsBL,CAAI,GAC1BN,EAA0BM,CAAI,IAIhCH,EAAyBG,CAAI,GAE7B,KAAK,KAAK;CACZ;CAGA,QAAQA,GAAoD;EAG1D,IAAMU,IAAOpB,EAAoBU,CAAI,CAAC,EAAE;EACxC,OAAOU,KAAQ,OAAOA,KAAS,WAAWA,IAAO,KAAA;CACnD;CAGA,iBAA2B;EACzB,OAAO,MAAM,KAAK,KAAK,aAAa,KAAK,CAAC;CAC5C;CAGA,SAASV,GAAuB;EAC9B,OAAO,KAAK,aAAa,IAAIA,CAAI;CACnC;CAMA,aAAaW,OACX,KAAK,UAAU,IAAIA,CAAQ,SACd;EACX,KAAK,UAAU,OAAOA,CAAQ;CAChC;CAOF,oBACS,KAAK;CAGN,OAAa;EACnB,KAAK;EACL,KAAK,IAAMA,KAAY,KAAK,WAC1BA,EAAS;CAEb;AACF,EAG2D"}
1
+ {"version":3,"file":"chartPlugin-yM7JPt-B.js","names":["barChartConfig","lineChartConfig","areaChartConfig","pieChartConfig","scatterChartConfig","bubbleChartConfig","radarChartConfig","radialBarChartConfig","treemapChartConfig","dataTableConfig","recordsTableConfig","activityGridChartConfig","kpiNumberConfig","kpiDeltaConfig","kpiTextConfig","markdownConfig","funnelChartConfig","sankeyChartConfig","sunburstChartConfig","heatmapChartConfig","retentionHeatmapConfig","retentionCombinedConfig","boxPlotChartConfig","dotStripChartConfig","waterfallChartConfig","candlestickChartConfig","measureProfileChartConfig","proportionBarChartConfig","gaugeChartConfig","registerCustomChartEntry","getCustomChartEntry","composeChartConfig","unregisterCustomChartEntry","chartRegistry","unregisterConfigFromCache","registerConfigToCache","registerChartComponent","unregisterChartComponent","baseConfigs","chartConfigRegistry","type","isRecordGrainChart","chartType","registerChartConfig","config","unregisterChartConfig","chartDefinitionToEntry","definition","chartPluginRegistry","backup","icon","listener"],"sources":["../../../src/client/charts/chartConfigRegistry.ts","../../../src/client/charts/chartPlugin.ts"],"sourcesContent":["import { barChartConfig } from '../components/charts/BarChart.config.js'\nimport { lineChartConfig } from '../components/charts/LineChart.config.js'\nimport { areaChartConfig } from '../components/charts/AreaChart.config.js'\nimport { pieChartConfig } from '../components/charts/PieChart.config.js'\nimport { scatterChartConfig } from '../components/charts/ScatterChart.config.js'\nimport { bubbleChartConfig } from '../components/charts/BubbleChart.config.js'\nimport { radarChartConfig } from '../components/charts/RadarChart.config.js'\nimport { radialBarChartConfig } from '../components/charts/RadialBarChart.config.js'\nimport { treemapChartConfig } from '../components/charts/TreeMapChart.config.js'\nimport { dataTableConfig } from '../components/charts/DataTable.config.js'\nimport { recordsTableConfig } from '../components/charts/RecordsTable.config.js'\nimport { activityGridChartConfig } from '../components/charts/ActivityGridChart.config.js'\nimport { kpiNumberConfig } from '../components/charts/KpiNumber.config.js'\nimport { kpiDeltaConfig } from '../components/charts/KpiDelta.config.js'\nimport { kpiTextConfig } from '../components/charts/KpiText.config.js'\nimport { markdownConfig } from '../components/charts/MarkdownChart.config.js'\nimport { funnelChartConfig } from '../components/charts/FunnelChart.config.js'\nimport { sankeyChartConfig } from '../components/charts/SankeyChart.config.js'\nimport { sunburstChartConfig } from '../components/charts/SunburstChart.config.js'\nimport { heatmapChartConfig } from '../components/charts/HeatMapChart.config.js'\nimport { retentionHeatmapConfig } from '../components/charts/RetentionHeatmap.config.js'\nimport { retentionCombinedConfig } from '../components/charts/RetentionCombinedChart.config.js'\nimport { boxPlotChartConfig } from '../components/charts/BoxPlotChart.config.js'\nimport { dotStripChartConfig } from '../components/charts/DotStripChart.config.js'\nimport { waterfallChartConfig } from '../components/charts/WaterfallChart.config.js'\nimport { candlestickChartConfig } from '../components/charts/CandlestickChart.config.js'\nimport { measureProfileChartConfig } from '../components/charts/MeasureProfileChart.config.js'\nimport { proportionBarChartConfig } from '../components/charts/ProportionBarChart.config.js'\nimport { gaugeChartConfig } from '../components/charts/GaugeChart.config.js'\nimport type { BuiltInChartType } from '../types.js'\nimport type { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs.js'\nimport { chartRegistry, composeChartConfig } from './chartRegistry.js'\n\n/**\n * Statically-imported full config shapes (drop zones, display options, clickable\n * elements, validation) for every built-in chart. These are the lazy-loaded\n * side of a chart, but the eager registry below needs them synchronously because\n * the server agent reads drop zones for mandatory-zone validation and tool\n * guidance. Eager metadata (label/description/useCase/isAvailable) is NOT here —\n * it lives on the `chartRegistry` entry, its single source of truth.\n */\nconst baseConfigs: Record<BuiltInChartType, ChartTypeConfig> = {\n bar: barChartConfig,\n line: lineChartConfig,\n area: areaChartConfig,\n pie: pieChartConfig,\n scatter: scatterChartConfig,\n bubble: bubbleChartConfig,\n radar: radarChartConfig,\n radialBar: radialBarChartConfig,\n treemap: treemapChartConfig,\n table: dataTableConfig,\n recordsTable: recordsTableConfig,\n activityGrid: activityGridChartConfig,\n kpiNumber: kpiNumberConfig,\n kpiDelta: kpiDeltaConfig,\n kpiText: kpiTextConfig,\n markdown: markdownConfig,\n funnel: funnelChartConfig,\n sankey: sankeyChartConfig,\n sunburst: sunburstChartConfig,\n heatmap: heatmapChartConfig,\n retentionHeatmap: retentionHeatmapConfig,\n retentionCombined: retentionCombinedConfig,\n boxPlot: boxPlotChartConfig,\n dotStrip: dotStripChartConfig,\n waterfall: waterfallChartConfig,\n candlestick: candlestickChartConfig,\n measureProfile: measureProfileChartConfig,\n proportionBar: proportionBarChartConfig,\n gauge: gaugeChartConfig,\n}\n\n/**\n * Registry of all chart type configurations (the eager / full / server source).\n *\n * Every built-in is composed from its `chartRegistry` entry's metadata (single\n * source of truth) laid over its full config shape. Drop zones / display options\n * stay here in full because the server agent reads them synchronously.\n */\nexport const chartConfigRegistry: ChartConfigRegistry = Object.fromEntries(\n (Object.keys(chartRegistry) as BuiltInChartType[]).map((type) => [\n type,\n composeChartConfig(chartRegistry[type], baseConfigs[type]),\n ])\n)\n\n/**\n * Whether a chart lists records rather than aggregates, and so needs an\n * `ungrouped` query.\n *\n * Reads the eager registry so the query builders need no chart-type switch.\n */\nexport function isRecordGrainChart(chartType: string): boolean {\n return chartConfigRegistry[chartType]?.recordGrain === true\n}\n\n/**\n * Register a custom chart config into the registry.\n * Used by the chart plugin system.\n */\nexport function registerChartConfig(type: string, config: ChartTypeConfig): void {\n chartConfigRegistry[type] = config\n}\n\n/**\n * Unregister a chart config from the registry.\n * Used by the chart plugin system.\n */\nexport function unregisterChartConfig(type: string): void {\n delete chartConfigRegistry[type]\n}\n","/**\n * Chart Plugin System\n *\n * Provides a public API for registering custom chart types at runtime.\n * Custom charts can extend the built-in set or override existing chart types.\n *\n * Registration via CubeProvider (recommended):\n * ```tsx\n * <CubeProvider customCharts={[{ type: 'gantt', label: 'Gantt', config, component }]}>\n * ```\n *\n * Imperative registration (library authors):\n * ```ts\n * import { chartPluginRegistry } from 'drizzle-cube/client'\n * chartPluginRegistry.register({ type: 'gantt', label: 'Gantt', config, component })\n * ```\n */\n\nimport type { ComponentType } from 'react'\nimport type { ChartProps } from '../types.js'\nimport type { ChartTypeConfig } from './chartConfigs.js'\nimport type { IconProps } from '../icons/types.js'\nimport { registerChartConfig, unregisterChartConfig, chartConfigRegistry } from './chartConfigRegistry.js'\nimport { registerConfigToCache, unregisterConfigFromCache } from './lazyChartConfigRegistry.js'\nimport { registerChartComponent, unregisterChartComponent } from './chartComponentRegistry.js'\nimport {\n type ChartRegistryEntry,\n registerCustomChartEntry,\n unregisterCustomChartEntry,\n getCustomChartEntry,\n} from './chartRegistry.js'\n\n/**\n * Map a custom `ChartDefinition` onto the unified `ChartRegistryEntry` shape —\n * the same shape built-in charts use — so both flow through one lookup path.\n * `config` is the label-normalized config; the entry's lazy thunk resolves the\n * provided config object directly (it is already in memory, not code-split).\n */\nfunction chartDefinitionToEntry(\n definition: ChartDefinition,\n config: ChartTypeConfig\n): ChartRegistryEntry {\n return {\n label: config.label ?? definition.label,\n // Plugins supply a ready-made icon component; absent one, use the bar icon.\n icon: definition.icon ?? 'chartBar',\n description: config.description,\n useCase: config.useCase,\n isAvailable: config.isAvailable,\n dependencies: definition.dependencies,\n config: async () => config,\n }\n}\n\n/**\n * Complete definition for registering a custom chart type.\n * Bundles component, config metadata, and optional icon.\n */\nexport interface ChartDefinition {\n /** Unique chart type identifier (e.g., 'myGantt', 'customBar') */\n type: string\n\n /** Display label for the chart type picker */\n label: string\n\n /** Chart type configuration (drop zones, display options, validation) */\n config: ChartTypeConfig\n\n /** The chart component (eager — loaded immediately) */\n component?: ComponentType<ChartProps>\n\n /** Lazy-loaded chart component (for code splitting). Use instead of `component`. */\n lazyComponent?: () => Promise<{ default: ComponentType<ChartProps> }>\n\n /** Optional icon component for the chart type picker */\n icon?: ComponentType<IconProps>\n\n /** Optional dependency info — shows install instructions if the import fails */\n dependencies?: {\n packageName: string\n installCommand: string\n }\n}\n\n/**\n * Central registry for custom chart plugins.\n *\n * Coordinates registration across the three internal registries\n * (config, lazy config cache, chart loader) and provides a\n * `useSyncExternalStore`-compatible subscription API for React reactivity.\n */\nclass ChartPluginRegistry {\n private customCharts = new Map<string, ChartDefinition>()\n private builtInBackups = new Map<string, ChartTypeConfig>()\n private version = 0\n private listeners = new Set<() => void>()\n\n /**\n * Register a custom chart definition.\n * If `type` matches a built-in chart, the built-in is backed up and can be\n * restored by calling `unregister()`.\n */\n register(definition: ChartDefinition): void {\n // Ensure the config has the label set\n const config: ChartTypeConfig = {\n ...definition.config,\n label: definition.config.label || definition.label,\n }\n\n // Backup built-in config if overriding and not already backed up\n if (\n chartConfigRegistry[definition.type] &&\n !this.builtInBackups.has(definition.type) &&\n !this.customCharts.has(definition.type)\n ) {\n this.builtInBackups.set(definition.type, chartConfigRegistry[definition.type])\n }\n\n // Store the definition\n this.customCharts.set(definition.type, definition)\n\n // Produce the unified entry — the single source of truth both built-in and\n // custom charts share — and register the component graph alongside it.\n registerCustomChartEntry(definition.type, chartDefinitionToEntry(definition, config))\n registerChartConfig(definition.type, config)\n registerConfigToCache(definition.type, config)\n registerChartComponent(\n definition.type,\n definition.component,\n definition.lazyComponent,\n definition.dependencies\n )\n\n this.bump()\n }\n\n /**\n * Unregister a custom chart.\n * If the chart type was a built-in override, the original built-in is restored.\n */\n unregister(type: string): void {\n if (!this.customCharts.has(type)) return\n\n this.customCharts.delete(type)\n unregisterCustomChartEntry(type)\n\n // Restore built-in backup if exists\n const backup = this.builtInBackups.get(type)\n if (backup) {\n registerChartConfig(type, backup)\n registerConfigToCache(type, backup)\n this.builtInBackups.delete(type)\n } else {\n unregisterChartConfig(type)\n unregisterConfigFromCache(type)\n }\n\n // Always unregister the custom component\n unregisterChartComponent(type)\n\n this.bump()\n }\n\n /** Get the custom icon component for a chart type, if one was registered. */\n getIcon(type: string): ComponentType<IconProps> | undefined {\n // Derived from the unified entry — a string icon is a built-in IconName, so\n // only a component value counts as a plugin-supplied icon here.\n const icon = getCustomChartEntry(type)?.icon\n return icon && typeof icon !== 'string' ? icon : undefined\n }\n\n /** Get all registered custom chart type strings */\n getCustomTypes(): string[] {\n return Array.from(this.customCharts.keys())\n }\n\n /** Check if a chart type is a custom plugin (not built-in) */\n isCustom(type: string): boolean {\n return this.customCharts.has(type)\n }\n\n /**\n * Subscribe to registry changes.\n * Compatible with React's `useSyncExternalStore`.\n */\n subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener)\n return () => {\n this.listeners.delete(listener)\n }\n }\n\n /**\n * Get a snapshot of the registry version.\n * Compatible with React's `useSyncExternalStore`.\n */\n getSnapshot = (): number => {\n return this.version\n }\n\n private bump(): void {\n this.version++\n for (const listener of this.listeners) {\n listener()\n }\n }\n}\n\n/** Singleton chart plugin registry */\nexport const chartPluginRegistry = new ChartPluginRegistry()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAMsC,IAAyD;CAC7D,KAAKtC;CACL,MAAMC;CACN,MAAMC;CACN,KAAKC;CACL,SAASC;CACT,QAAQC;CACR,OAAOC;CACP,WAAWC;CACX,SAASC;CACT,OAAOC;CACP,cAAcC;CACd,cAAcC;CACd,WAAWC;CACX,UAAUC;CACV,SAASC;CACT,UAAUC;CACV,QAAQC;CACR,QAAQC;CACR,UAAUC;CACV,SAASC;CACT,kBAAkBC;CAClB,mBAAmBC;CACnB,SAASC;CACT,UAAUC;CACV,WAAWC;CACX,aAAaC;CACb,gBAAgBC;CAChB,eAAeC;CACf,OAAOC;AACT,GASaW,IAA2C,OAAO,YAC5D,OAAO,KAAKN,CAAa,CAAC,CAAwB,KAAKO,MAAS,CAC/DA,GACAT,EAAmBE,EAAcO,IAAOF,EAAYE,EAAK,CAC3D,CAAC,CACH;AAQA,SAAgBC,EAAmBC,GAA4B;CAC7D,OAAOH,EAAoBG,EAAU,EAAE,gBAAgB;AACzD;AAMA,SAAgBC,EAAoBH,GAAcI,GAA+B;CAC/EL,EAAoBC,KAAQI;AAC9B;AAMA,SAAgBC,EAAsBL,GAAoB;CACxD,OAAOD,EAAoBC;AAC7B;;ACzEA,SAASM,EACPC,GACAH,GACoB;CACpB,OAAO;EACL,OAAOA,EAAO,SAASG,EAAW;EAElC,MAAMA,EAAW,QAAQ;EACzB,aAAaH,EAAO;EACpB,SAASA,EAAO;EAChB,aAAaA,EAAO;EACpB,cAAcG,EAAW;EACzB,QAAQ,YAAYH;CACtB;AACF;AA6JA,IAAaI,IAAsB,IAAI,MAtHb;CAChB,+BAAe,IAAI,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C;CAMA,aAAaW,OACX,KAAK,UAAU,IAAIA,CAAQ,SACd;EACX,KAAK,UAAU,OAAOA,CAAQ;CAChC;CAOF,oBACS,KAAK;CAGN,OAAa;EACnB,KAAK;EACL,KAAK,IAAMA,KAAY,KAAK,WAC1BA,EAAS;CAEb;AACF,EAG2D"}
@@ -117,19 +117,38 @@ function d(e = !0) {
117
117
  description: "chart.option.showPoints.description"
118
118
  };
119
119
  }
120
- // src/client/charts/chartRegistry.ts
121
120
  var f = {
121
+ key: "xAxisLabels",
122
+ label: "chart.option.xAxisLabels.label",
123
+ type: "buttonGroup",
124
+ defaultValue: "auto",
125
+ options: [
126
+ {
127
+ value: "auto",
128
+ label: "chart.option.xAxisLabels.auto"
129
+ },
130
+ {
131
+ value: "horizontal",
132
+ label: "chart.option.xAxisLabels.horizontal"
133
+ },
134
+ {
135
+ value: "angled",
136
+ label: "chart.option.xAxisLabels.angled"
137
+ }
138
+ ],
139
+ description: "chart.option.xAxisLabels.description"
140
+ }, p = {
122
141
  packageName: "recharts",
123
142
  installCommand: "npm install recharts"
124
- }, p = {
143
+ }, m = {
125
144
  bar: {
126
145
  label: "chart.bar.label",
127
146
  icon: "chartBar",
128
147
  description: "chart.bar.description",
129
148
  useCase: "chart.bar.useCase",
130
149
  isAvailable: e,
131
- dependencies: f,
132
- config: async () => (await import("./chart-config-bar-OyxCyA3e.js")).barChartConfig
150
+ dependencies: p,
151
+ config: async () => (await import("./chart-config-bar-DhqbYfpf.js")).barChartConfig
133
152
  },
134
153
  line: {
135
154
  label: "chart.line.label",
@@ -137,8 +156,8 @@ var f = {
137
156
  description: "chart.line.description",
138
157
  useCase: "chart.line.useCase",
139
158
  isAvailable: e,
140
- dependencies: f,
141
- config: async () => (await import("./chart-config-line-FKcg6zYi.js")).lineChartConfig
159
+ dependencies: p,
160
+ config: async () => (await import("./chart-config-line-CYwh72pj.js")).lineChartConfig
142
161
  },
143
162
  area: {
144
163
  label: "chart.area.label",
@@ -146,8 +165,8 @@ var f = {
146
165
  description: "chart.area.description",
147
166
  useCase: "chart.area.useCase",
148
167
  isAvailable: e,
149
- dependencies: f,
150
- config: async () => (await import("./chart-config-area-Bvft9O_T.js")).areaChartConfig
168
+ dependencies: p,
169
+ config: async () => (await import("./chart-config-area-DVA0oKNp.js")).areaChartConfig
151
170
  },
152
171
  pie: {
153
172
  label: "chart.pie.label",
@@ -155,8 +174,8 @@ var f = {
155
174
  description: "chart.pie.description",
156
175
  useCase: "chart.pie.useCase",
157
176
  isAvailable: e,
158
- dependencies: f,
159
- config: async () => (await import("./chart-config-pie-tNg_02bP.js")).pieChartConfig
177
+ dependencies: p,
178
+ config: async () => (await import("./chart-config-pie-CenIR70H.js")).pieChartConfig
160
179
  },
161
180
  scatter: {
162
181
  label: "chart.scatter.label",
@@ -170,7 +189,7 @@ var f = {
170
189
  available: !1,
171
190
  reason: "chart.availability.scatter"
172
191
  } : { available: !0 },
173
- dependencies: f,
192
+ dependencies: p,
174
193
  config: async () => (await import("./chart-config-scatter-tYWb294D.js")).scatterChartConfig
175
194
  },
176
195
  bubble: {
@@ -193,8 +212,8 @@ var f = {
193
212
  description: "chart.radar.description",
194
213
  useCase: "chart.radar.useCase",
195
214
  isAvailable: e,
196
- dependencies: f,
197
- config: async () => (await import("./chart-config-radar-BbK_cePI.js")).radarChartConfig
215
+ dependencies: p,
216
+ config: async () => (await import("./chart-config-radar-iBtE5R3S.js")).radarChartConfig
198
217
  },
199
218
  radialBar: {
200
219
  label: "chart.radialBar.label",
@@ -202,8 +221,8 @@ var f = {
202
221
  description: "chart.radialBar.description",
203
222
  useCase: "chart.radialBar.useCase",
204
223
  isAvailable: e,
205
- dependencies: f,
206
- config: async () => (await import("./chart-config-radial-bar-B-ysOwq_.js")).radialBarChartConfig
224
+ dependencies: p,
225
+ config: async () => (await import("./chart-config-radial-bar-U0gm1O8q.js")).radialBarChartConfig
207
226
  },
208
227
  treemap: {
209
228
  label: "chart.treemap.label",
@@ -211,8 +230,8 @@ var f = {
211
230
  description: "chart.treemap.description",
212
231
  useCase: "chart.treemap.useCase",
213
232
  isAvailable: e,
214
- dependencies: f,
215
- config: async () => (await import("./chart-config-tree-map-CES9mAql.js")).treemapChartConfig
233
+ dependencies: p,
234
+ config: async () => (await import("./chart-config-tree-map-DxSNKyGd.js")).treemapChartConfig
216
235
  },
217
236
  table: {
218
237
  label: "chart.table.label",
@@ -248,7 +267,7 @@ var f = {
248
267
  description: "chart.kpiNumber.description",
249
268
  useCase: "chart.kpiNumber.useCase",
250
269
  isAvailable: t,
251
- config: async () => (await import("./chart-config-kpi-number-C6rnZbNk.js")).kpiNumberConfig
270
+ config: async () => (await import("./chart-config-kpi-number-B83Z2jLe.js")).kpiNumberConfig
252
271
  },
253
272
  kpiDelta: {
254
273
  label: "chart.kpiDelta.label",
@@ -256,7 +275,7 @@ var f = {
256
275
  description: "chart.kpiDelta.description",
257
276
  useCase: "chart.kpiDelta.useCase",
258
277
  isAvailable: e,
259
- config: async () => (await import("./chart-config-kpi-delta-ZMObFeZr.js")).kpiDeltaConfig
278
+ config: async () => (await import("./chart-config-kpi-delta-BPMq7hzP.js")).kpiDeltaConfig
260
279
  },
261
280
  kpiText: {
262
281
  label: "chart.kpiText.label",
@@ -278,7 +297,7 @@ var f = {
278
297
  icon: "chartFunnel",
279
298
  description: "chart.funnel.description",
280
299
  useCase: "chart.funnel.useCase",
281
- dependencies: f,
300
+ dependencies: p,
282
301
  config: async () => (await import("./chart-config-funnel-CV47qVSO.js")).funnelChartConfig
283
302
  },
284
303
  sankey: {
@@ -286,7 +305,7 @@ var f = {
286
305
  icon: "chartSankey",
287
306
  description: "chart.sankey.description",
288
307
  useCase: "chart.sankey.useCase",
289
- dependencies: f,
308
+ dependencies: p,
290
309
  config: async () => (await import("./chart-config-sankey-DHMMssJ5.js")).sankeyChartConfig
291
310
  },
292
311
  sunburst: {
@@ -294,7 +313,7 @@ var f = {
294
313
  icon: "chartSunburst",
295
314
  description: "chart.sunburst.description",
296
315
  useCase: "chart.sunburst.useCase",
297
- dependencies: f,
316
+ dependencies: p,
298
317
  config: async () => (await import("./chart-config-sunburst-zHL-7kBa.js")).sunburstChartConfig
299
318
  },
300
319
  heatmap: {
@@ -351,8 +370,8 @@ var f = {
351
370
  description: "chart.waterfall.description",
352
371
  useCase: "chart.waterfall.useCase",
353
372
  isAvailable: e,
354
- dependencies: f,
355
- config: async () => (await import("./chart-config-waterfall-D3xkuYph.js")).waterfallChartConfig
373
+ dependencies: p,
374
+ config: async () => (await import("./chart-config-waterfall-DtDzu_14.js")).waterfallChartConfig
356
375
  },
357
376
  candlestick: {
358
377
  label: "chart.candlestick.label",
@@ -377,8 +396,8 @@ var f = {
377
396
  available: !1,
378
397
  reason: "chart.availability.requiresTwoMeasures"
379
398
  } : { available: !0 },
380
- dependencies: f,
381
- config: async () => (await import("./chart-config-measure-profile-Bw7okF4K.js")).measureProfileChartConfig
399
+ dependencies: p,
400
+ config: async () => (await import("./chart-config-measure-profile-Chi9pZNK.js")).measureProfileChartConfig
382
401
  },
383
402
  proportionBar: {
384
403
  label: "chart.proportionBar.label",
@@ -396,20 +415,20 @@ var f = {
396
415
  isAvailable: t,
397
416
  config: async () => (await import("./chart-config-gauge-CWFTDDxM.js")).gaugeChartConfig
398
417
  }
399
- }, m = /* @__PURE__ */ new Map();
400
- function h(e) {
401
- return m.get(e) ?? p[e];
402
- }
403
- function g(e, t) {
404
- m.set(e, t);
418
+ }, h = /* @__PURE__ */ new Map();
419
+ function g(e) {
420
+ return h.get(e) ?? m[e];
405
421
  }
406
- function _(e) {
407
- m.delete(e);
422
+ function _(e, t) {
423
+ h.set(e, t);
408
424
  }
409
425
  function v(e) {
410
- return m.get(e);
426
+ h.delete(e);
427
+ }
428
+ function y(e) {
429
+ return h.get(e);
411
430
  }
412
- function y(e, t) {
431
+ function b(e, t) {
413
432
  return {
414
433
  ...t,
415
434
  label: e.label,
@@ -418,6 +437,6 @@ function y(e, t) {
418
437
  isAvailable: e.isAvailable
419
438
  };
420
439
  }
421
- export { g as a, i as c, o as d, d as f, s as g, n as h, v as i, l, c as m, y as n, _ as o, u as p, h as r, r as s, p as t, a as u };
440
+ export { f as _, _ as a, i as c, o as d, d as f, s as g, n as h, y as i, l, c as m, b as n, v as o, u as p, g as r, r as s, m as t, a as u };
422
441
 
423
- //# sourceMappingURL=chartRegistry-CVOMsXOK.js.map
442
+ //# sourceMappingURL=chartRegistry-CI9eqtt9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartRegistry-CI9eqtt9.js","names":["requiresMeasureAndDimension","measureCount","dimensionCount","requiresMeasure","targetDisplayOption","connectNullsDisplayOption","fillMissingDatesDisplayOption","leftYAxisFormatDisplayOption","rightYAxisFormatDisplayOption","valueFormatDisplayOption","description","stackTypeDisplayOption","kpiLayoutDisplayOption","showSummaryDisplayOption","showPointsDisplayOption","defaultValue","xAxisLabelsDisplayOption","RECHARTS_DEP","chartRegistry","n","timeDimensionCount","customChartEntries","getChartEntry","chartType","registerCustomChartEntry","entry","unregisterCustomChartEntry","getCustomChartEntry","composeChartConfig","base"],"sources":["../../../src/client/charts/chartConfigHelpers.ts","../../../src/client/charts/chartRegistry.ts"],"sourcesContent":["import type { ChartAvailabilityContext, ChartAvailability, DisplayOptionConfig } from './chartConfigs.js'\n\n/**\n * Shared building blocks for chart `*.config.ts` files.\n *\n * Most chart configs repeated the same `isAvailable` guard and the same\n * display-option definitions (target line, Y-axis format, stacking, …).\n * These factories centralise that boilerplate so each chart config only\n * declares what is genuinely unique to it.\n */\n\n/**\n * Standard availability rule shared by most chart types: at least one measure\n * and at least one dimension (regular or time) must be selected.\n */\nexport function requiresMeasureAndDimension({\n measureCount,\n dimensionCount\n}: ChartAvailabilityContext): ChartAvailability {\n if (measureCount < 1) return { available: false, reason: 'chart.availability.requiresMeasure' }\n if (dimensionCount < 1) return { available: false, reason: 'chart.availability.requiresDimension' }\n return { available: true }\n}\n\n/**\n * Availability rule for charts that only need a single measure (KPI-style\n * charts and gauges): at least one measure, no dimension requirement.\n */\nexport function requiresMeasure({ measureCount }: ChartAvailabilityContext): ChartAvailability {\n if (measureCount < 1) return { available: false, reason: 'chart.availability.requiresMeasure' }\n return { available: true }\n}\n\n/** Target-line display option (single value or comma-separated spread). */\nexport const targetDisplayOption: DisplayOptionConfig = {\n key: 'target',\n label: 'chart.option.target.label',\n type: 'string',\n placeholder: 'e.g., 100 or 50,75 for spread',\n description: 'chart.option.target.description'\n}\n\n/** Connect-nulls toggle for line/area charts. */\nexport const connectNullsDisplayOption: DisplayOptionConfig = {\n key: 'connectNulls',\n label: 'chart.option.connectNulls.label',\n type: 'boolean',\n defaultValue: false,\n description: 'chart.option.connectNulls.description'\n}\n\n/**\n * Gap-filling control for time-series charts (issue #1368). `auto` follows the\n * query, then the cube time dimension's `fillMissingDates`, then fills.\n */\nexport const fillMissingDatesDisplayOption: DisplayOptionConfig = {\n key: 'fillMissingDates',\n label: 'chart.option.fillMissingDates.label',\n type: 'buttonGroup',\n defaultValue: 'auto',\n options: [\n { value: 'auto', label: 'chart.option.fillMissingDates.auto' },\n { value: true, label: 'chart.option.fillMissingDates.on' },\n { value: false, label: 'chart.option.fillMissingDates.off' }\n ],\n description: 'chart.option.fillMissingDates.description'\n}\n\n/** Left Y-axis numeric format control (dual-axis charts). */\nexport const leftYAxisFormatDisplayOption: DisplayOptionConfig = {\n key: 'leftYAxisFormat',\n label: 'chart.option.leftYAxisFormat.label',\n type: 'axisFormat',\n description: 'chart.option.leftYAxisFormat.description'\n}\n\n/** Right Y-axis numeric format control (dual-axis charts). */\nexport const rightYAxisFormatDisplayOption: DisplayOptionConfig = {\n key: 'rightYAxisFormat',\n label: 'chart.option.rightYAxisFormat.label',\n type: 'axisFormat',\n description: 'chart.option.rightYAxisFormat.description'\n}\n\n/**\n * Single value-format control used by charts that only have one numeric scale\n * (pie, radar, radial bar, treemap). Stored under `leftYAxisFormat` for\n * backward compatibility with existing saved configs.\n */\nexport function valueFormatDisplayOption(\n description = 'chart.option.valueFormat.description'\n): DisplayOptionConfig {\n return {\n key: 'leftYAxisFormat',\n label: 'chart.option.valueFormat.label',\n type: 'axisFormat',\n description\n }\n}\n\n/**\n * Stacking-mode select shared by bar and area charts. `description` differs\n * per chart (bar vs area series wording).\n */\nexport function stackTypeDisplayOption(description: string): DisplayOptionConfig {\n return {\n key: 'stackType',\n label: 'chart.option.stacking.label',\n type: 'select',\n defaultValue: 'none',\n options: [\n { value: 'none', label: 'chart.option.accentBorder.none' },\n { value: 'normal', label: 'chart.option.stacking.stacked' },\n { value: 'percent', label: 'chart.option.stacking.percent' }\n ],\n description\n }\n}\n\n/**\n * Layout density for the KPI charts.\n *\n * `auto` keeps the historic behaviour, where the value's font size is derived\n * from the portlet box — which makes a wide portlet render an enormous number.\n * `compact` uses a fixed type scale so several KPIs read as a tidy metric strip.\n */\nexport const kpiLayoutDisplayOption: DisplayOptionConfig = {\n key: 'layout',\n label: 'chart.option.kpiLayout.label',\n type: 'buttonGroup',\n defaultValue: 'auto',\n options: [\n { value: 'auto', label: 'chart.option.kpiLayout.auto' },\n { value: 'compact', label: 'chart.option.kpiLayout.compact' }\n ],\n description: 'chart.option.kpiLayout.description'\n}\n\n/**\n * Summary-band toggle for the time-series charts.\n *\n * Renders each series' latest value and its change since the start of the\n * window above the plot, so the chart is readable without hovering.\n */\nexport const showSummaryDisplayOption: DisplayOptionConfig = {\n key: 'showSummary',\n label: 'chart.option.showSummary.label',\n type: 'boolean',\n defaultValue: false,\n description: 'chart.option.showSummary.description'\n}\n\n/**\n * Data-point marker toggle for the time-series charts. Dense series (hundreds\n * of points) read far better without a marker on every one.\n */\nexport function showPointsDisplayOption(defaultValue = true): DisplayOptionConfig {\n return {\n key: 'showPoints',\n label: 'chart.option.showPoints.label',\n type: 'boolean',\n defaultValue,\n description: 'chart.option.showPoints.description'\n }\n}\n\n/**\n * X-axis label orientation for the Cartesian charts. `auto` keeps labels\n * horizontal when they fit (always for time axes) and angles long ones.\n */\nexport const xAxisLabelsDisplayOption: DisplayOptionConfig = {\n key: 'xAxisLabels',\n label: 'chart.option.xAxisLabels.label',\n type: 'buttonGroup',\n defaultValue: 'auto',\n options: [\n { value: 'auto', label: 'chart.option.xAxisLabels.auto' },\n { value: 'horizontal', label: 'chart.option.xAxisLabels.horizontal' },\n { value: 'angled', label: 'chart.option.xAxisLabels.angled' }\n ],\n description: 'chart.option.xAxisLabels.description'\n}\n","/**\n * Unified Chart Registry — the single source of truth for a chart type.\n *\n * Historically, adding a chart required coordinated edits across four central\n * registries (eager config, lazy config, the loader, the icon map) plus the\n * per-chart component/config/helper/icon files, with the same dynamic-import\n * path repeated three times. A typo in one failed silently.\n *\n * `chartRegistry` collapses that into one entry per chart. The eager config\n * registry, the lazy config registry, the icon lookup, and the dependency lookup\n * are all **derived** from this map — each chart's import path is declared once.\n * Custom (plugin) charts register through the same `ChartRegistryEntry` shape\n * (see `getChartEntry` / `registerCustomChartEntry`), so built-in and custom\n * charts flow through one path.\n *\n * Client/server boundary: this module is DOM-free so the server agent and the\n * eager config registry can import it. The React **component** thunk (which\n * pulls recharts / ChartContainer / DOM globals) is a client-only concern and\n * lives in the loader's component map — NOT here. Lazy loading is purely a\n * client optimisation; server/MCP/agent code reads the eager config directly.\n */\n\nimport type { ComponentType } from 'react'\nimport type { BuiltInChartType } from '../types.js'\nimport type { IconName, IconProps } from '../icons/types.js'\nimport type {\n ChartTypeConfig,\n ChartAvailabilityContext,\n ChartAvailability,\n} from './chartConfigs.js'\nimport { requiresMeasureAndDimension, requiresMeasure } from './chartConfigHelpers.js'\n\nconst RECHARTS_DEP = { packageName: 'recharts', installCommand: 'npm install recharts' }\n\n/**\n * The single source of truth for one chart type's DOM-free metadata: the eager\n * picker fields, the lazy config thunk, the icon name, and dependency info.\n *\n * The React component thunk is deliberately NOT part of the entry — it is the\n * one DOM-bearing piece and is owned by the client loader, keeping this entry\n * (and its consumers, incl. the server agent) free of the chart component graph.\n */\nexport interface ChartRegistryEntry {\n /** Display label for the picker — an i18n key, resolved at render time. */\n label: string\n /**\n * The chart's icon. Built-ins use an `IconName` resolved via the icon registry\n * (override-able via registerIcons/setIcon). Plugins may instead supply a\n * ready-made icon component — both flow through the same entry field so custom\n * and built-in charts resolve their icon along one path.\n */\n icon: IconName | ComponentType<IconProps>\n /** Brief description — i18n key. */\n description?: string\n /** When to use this chart — i18n key. */\n useCase?: string\n /** Whether the chart can render with the current query shape. */\n isAvailable?: (ctx: ChartAvailabilityContext) => ChartAvailability\n /** Optional peer dependency — shows install instructions if the import fails. */\n dependencies?: { packageName: string; installCommand: string }\n /** Lazy config import — resolves the config OBJECT directly (client lazy path). */\n config: () => Promise<ChartTypeConfig>\n}\n\n/**\n * The unified registry — one entry per built-in chart type, the single source of\n * truth for its DOM-free metadata. The eager config registry, the lazy config\n * registry, the icon lookup, and the dependency lookup all derive from this map.\n *\n * Adding a chart is now one entry here plus its component/config files.\n */\nexport const chartRegistry: Record<BuiltInChartType, ChartRegistryEntry> = {\n bar: {\n label: 'chart.bar.label',\n icon: 'chartBar',\n description: 'chart.bar.description',\n useCase: 'chart.bar.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/BarChart.config.js')).barChartConfig,\n },\n line: {\n label: 'chart.line.label',\n icon: 'chartLine',\n description: 'chart.line.description',\n useCase: 'chart.line.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/LineChart.config.js')).lineChartConfig,\n },\n area: {\n label: 'chart.area.label',\n icon: 'chartArea',\n description: 'chart.area.description',\n useCase: 'chart.area.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/AreaChart.config.js')).areaChartConfig,\n },\n pie: {\n label: 'chart.pie.label',\n icon: 'chartPie',\n description: 'chart.pie.description',\n useCase: 'chart.pie.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/PieChart.config.js')).pieChartConfig,\n },\n scatter: {\n label: 'chart.scatter.label',\n icon: 'chartScatter',\n description: 'chart.scatter.description',\n useCase: 'chart.scatter.useCase',\n isAvailable: ({ measureCount, dimensionCount }) => {\n if (measureCount < 1) return { available: false, reason: 'chart.availability.requiresMeasure' }\n // Scatter needs either 2 measures, or 1 measure + 1 dimension\n if (measureCount < 2 && dimensionCount < 1) {\n return { available: false, reason: 'chart.availability.scatter' }\n }\n return { available: true }\n },\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/ScatterChart.config.js')).scatterChartConfig,\n },\n bubble: {\n label: 'chart.bubble.label',\n icon: 'chartBubble',\n description: 'chart.bubble.description',\n useCase: 'chart.bubble.useCase',\n isAvailable: ({ measureCount, dimensionCount }) => {\n if (measureCount < 2) return { available: false, reason: 'chart.availability.requiresTwoMeasures' }\n if (dimensionCount < 1) return { available: false, reason: 'chart.availability.bubble' }\n return { available: true }\n },\n config: async () => (await import('../components/charts/BubbleChart.config.js')).bubbleChartConfig,\n },\n radar: {\n label: 'chart.radar.label',\n icon: 'chartRadar',\n description: 'chart.radar.description',\n useCase: 'chart.radar.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/RadarChart.config.js')).radarChartConfig,\n },\n radialBar: {\n label: 'chart.radialBar.label',\n icon: 'chartRadialBar',\n description: 'chart.radialBar.description',\n useCase: 'chart.radialBar.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/RadialBarChart.config.js')).radialBarChartConfig,\n },\n treemap: {\n label: 'chart.treemap.label',\n icon: 'chartTreemap',\n description: 'chart.treemap.description',\n useCase: 'chart.treemap.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/TreeMapChart.config.js')).treemapChartConfig,\n },\n table: {\n label: 'chart.table.label',\n icon: 'chartTable',\n description: 'chart.table.description',\n useCase: 'chart.table.useCase',\n config: async () => (await import('../components/charts/DataTable.config.js')).dataTableConfig,\n },\n recordsTable: {\n label: 'chart.recordsTable.label',\n icon: 'chartRecordsTable',\n description: 'chart.recordsTable.description',\n useCase: 'chart.recordsTable.useCase',\n config: async () => (await import('../components/charts/RecordsTable.config.js')).recordsTableConfig,\n },\n activityGrid: {\n label: 'chart.activityGrid.label',\n icon: 'chartActivityGrid',\n description: 'chart.activityGrid.description',\n useCase: 'chart.activityGrid.useCase',\n isAvailable: ({ measureCount, timeDimensionCount }) => {\n if (measureCount < 1) return { available: false, reason: 'chart.availability.requiresMeasure' }\n if (timeDimensionCount < 1) return { available: false, reason: 'chart.availability.requiresTimeDimension' }\n return { available: true }\n },\n config: async () => (await import('../components/charts/ActivityGridChart.config.js')).activityGridChartConfig,\n },\n kpiNumber: {\n label: 'chart.kpiNumber.label',\n icon: 'chartKpiNumber',\n description: 'chart.kpiNumber.description',\n useCase: 'chart.kpiNumber.useCase',\n isAvailable: requiresMeasure,\n config: async () => (await import('../components/charts/KpiNumber.config.js')).kpiNumberConfig,\n },\n kpiDelta: {\n label: 'chart.kpiDelta.label',\n icon: 'chartKpiDelta',\n description: 'chart.kpiDelta.description',\n useCase: 'chart.kpiDelta.useCase',\n isAvailable: requiresMeasureAndDimension,\n config: async () => (await import('../components/charts/KpiDelta.config.js')).kpiDeltaConfig,\n },\n kpiText: {\n label: 'chart.kpiText.label',\n icon: 'chartKpiText',\n description: 'chart.kpiText.description',\n useCase: 'chart.kpiText.useCase',\n isAvailable: requiresMeasure,\n config: async () => (await import('../components/charts/KpiText.config.js')).kpiTextConfig,\n },\n markdown: {\n label: 'chart.markdown.label',\n icon: 'chartMarkdown',\n description: 'chart.markdown.description',\n useCase: 'chart.markdown.useCase',\n config: async () => (await import('../components/charts/MarkdownChart.config.js')).markdownConfig,\n },\n funnel: {\n label: 'chart.funnel.label',\n icon: 'chartFunnel',\n description: 'chart.funnel.description',\n useCase: 'chart.funnel.useCase',\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/FunnelChart.config.js')).funnelChartConfig,\n },\n sankey: {\n label: 'chart.sankey.label',\n icon: 'chartSankey',\n description: 'chart.sankey.description',\n useCase: 'chart.sankey.useCase',\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/SankeyChart.config.js')).sankeyChartConfig,\n },\n sunburst: {\n label: 'chart.sunburst.label',\n icon: 'chartSunburst',\n description: 'chart.sunburst.description',\n useCase: 'chart.sunburst.useCase',\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/SunburstChart.config.js')).sunburstChartConfig,\n },\n heatmap: {\n label: 'chart.heatmap.label',\n icon: 'chartHeatmap',\n description: 'chart.heatmap.description',\n useCase: 'chart.heatmap.useCase',\n isAvailable: ({ measureCount, dimensionCount }) => {\n if (measureCount < 1) return { available: false, reason: 'chart.availability.requiresMeasure' }\n if (dimensionCount < 2) return { available: false, reason: 'chart.availability.requiresTwoDimensions' }\n return { available: true }\n },\n dependencies: { packageName: '@nivo/heatmap', installCommand: 'npm install @nivo/heatmap' },\n config: async () => (await import('../components/charts/HeatMapChart.config.js')).heatmapChartConfig,\n },\n retentionHeatmap: {\n label: 'chart.retentionHeatmap.label',\n icon: 'chartRetention',\n description: 'chart.retentionHeatmap.description',\n useCase: 'chart.retentionHeatmap.useCase',\n config: async () => (await import('../components/charts/RetentionHeatmap.config.js')).retentionHeatmapConfig,\n },\n retentionCombined: {\n label: 'chart.retentionCombined.label',\n icon: 'chartRetention',\n description: 'chart.retentionCombined.description',\n useCase: 'chart.retentionCombined.useCase',\n config: async () => (await import('../components/charts/RetentionCombinedChart.config.js')).retentionCombinedConfig,\n },\n boxPlot: {\n label: 'chart.boxPlot.label',\n icon: 'chartBoxPlot',\n description: 'chart.boxPlot.description',\n useCase: 'chart.boxPlot.useCase',\n isAvailable: requiresMeasureAndDimension,\n config: async () => (await import('../components/charts/BoxPlotChart.config.js')).boxPlotChartConfig,\n },\n dotStrip: {\n label: 'chart.dotStrip.label',\n icon: 'chartDotStrip',\n description: 'chart.dotStrip.description',\n useCase: 'chart.dotStrip.useCase',\n isAvailable: requiresMeasureAndDimension,\n config: async () => (await import('../components/charts/DotStripChart.config.js')).dotStripChartConfig,\n },\n waterfall: {\n label: 'chart.waterfall.label',\n icon: 'chartWaterfall',\n description: 'chart.waterfall.description',\n useCase: 'chart.waterfall.useCase',\n isAvailable: requiresMeasureAndDimension,\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/WaterfallChart.config.js')).waterfallChartConfig,\n },\n candlestick: {\n label: 'chart.candlestick.label',\n icon: 'chartCandlestick',\n description: 'chart.candlestick.description',\n useCase: 'chart.candlestick.useCase',\n isAvailable: ({ measureCount, dimensionCount }) => {\n if (measureCount < 2) return { available: false, reason: 'chart.availability.requiresTwoMeasures' }\n if (dimensionCount < 1) return { available: false, reason: 'chart.availability.requiresDimension' }\n return { available: true }\n },\n config: async () => (await import('../components/charts/CandlestickChart.config.js')).candlestickChartConfig,\n },\n measureProfile: {\n label: 'chart.measureProfile.label',\n icon: 'chartMeasureProfile',\n description: 'chart.measureProfile.description',\n useCase: 'chart.measureProfile.useCase',\n isAvailable: ({ measureCount }) => {\n if (measureCount < 2) return { available: false, reason: 'chart.availability.requiresTwoMeasures' }\n return { available: true }\n },\n dependencies: RECHARTS_DEP,\n config: async () => (await import('../components/charts/MeasureProfileChart.config.js')).measureProfileChartConfig,\n },\n proportionBar: {\n label: 'chart.proportionBar.label',\n icon: 'chartProportionBar',\n description: 'chart.proportionBar.description',\n useCase: 'chart.proportionBar.useCase',\n isAvailable: requiresMeasureAndDimension,\n config: async () => (await import('../components/charts/ProportionBarChart.config.js')).proportionBarChartConfig,\n },\n gauge: {\n label: 'chart.gauge.label',\n icon: 'chartGauge',\n description: 'chart.gauge.description',\n useCase: 'chart.gauge.useCase',\n isAvailable: requiresMeasure,\n config: async () => (await import('../components/charts/GaugeChart.config.js')).gaugeChartConfig,\n },\n}\n\n/**\n * Custom (plugin) chart entries, keyed by chart type. Populated by the chart\n * plugin system via {@link registerCustomChartEntry}. Looked up *ahead* of the\n * built-in `chartRegistry` so a plugin overriding a built-in (e.g. `bar`) wins.\n */\nconst customChartEntries = new Map<string, ChartRegistryEntry>()\n\n/**\n * The single, unified chart-entry lookup. Custom plugin entries take precedence\n * over built-ins, so a plugin override of a built-in type resolves through the\n * same path. Returns `undefined` for unknown types.\n *\n * Every entry-shaped consumer (icon resolution, dependency fallback, plugin\n * icon API) reads through this so built-in and custom charts flow as one.\n */\nexport function getChartEntry(chartType: string): ChartRegistryEntry | undefined {\n return customChartEntries.get(chartType) ?? chartRegistry[chartType as BuiltInChartType]\n}\n\n/** Register a custom chart's entry (plugin system). */\nexport function registerCustomChartEntry(chartType: string, entry: ChartRegistryEntry): void {\n customChartEntries.set(chartType, entry)\n}\n\n/** Remove a custom chart's entry, falling back to the built-in if one exists. */\nexport function unregisterCustomChartEntry(chartType: string): void {\n customChartEntries.delete(chartType)\n}\n\n/** The custom entry for a type, if one is registered (no built-in fallback). */\nexport function getCustomChartEntry(chartType: string): ChartRegistryEntry | undefined {\n return customChartEntries.get(chartType)\n}\n\n// getChartTypeIcon() (in icons/registry) reads each chart's icon from its\n// unified entry via getChartEntry() — imported directly there, so icon\n// resolution does not depend on this module's init order.\n\n/**\n * Composes a migrated chart's full `ChartTypeConfig` from its entry: the entry's\n * metadata (its single declaration site) laid over the chart's config shape\n * (`base` — drop zones, display options, clickable elements, validation).\n *\n * Used by BOTH derivation paths so they return the same full shape as a\n * non-migrated chart's `*.config.ts`:\n * - eager `chartConfigRegistry` (server/full source — read synchronously for the\n * picker AND by the server agent's chart validation + tool guidance), with\n * `base` = the statically-imported config;\n * - lazy `getChartConfigAsync` (client code-split path), with `base` = the\n * config resolved from the entry's `config` thunk.\n */\nexport function composeChartConfig(entry: ChartRegistryEntry, base: ChartTypeConfig): ChartTypeConfig {\n return {\n ...base,\n label: entry.label,\n description: entry.description,\n useCase: entry.useCase,\n isAvailable: entry.isAvailable,\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,OAAO,0CAAA,CAAA,MAAAmB,MAAAA,EAAA,CAAA,EAAA,CAAsD;CAC1F;CACA,OAAO;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,SAAS;EACT,aAAahB;EACb,QAAQ,aAAa,MAAM,OAAO,oCAAA,CAA8C;CAClF;AACF,GAOMkB,oBAAqB,IAAI,IAAgC;AAU/D,SAAgBC,EAAcC,GAAmD;CAC/E,OAAOF,EAAmB,IAAIE,CAAS,KAAKL,EAAcK;AAC5D;AAGA,SAAgBC,EAAyBD,GAAmBE,GAAiC;CAC3FJ,EAAmB,IAAIE,GAAWE,CAAK;AACzC;AAGA,SAAgBC,EAA2BH,GAAyB;CAClEF,EAAmB,OAAOE,CAAS;AACrC;AAGA,SAAgBI,EAAoBJ,GAAmD;CACrF,OAAOF,EAAmB,IAAIE,CAAS;AACzC;AAmBA,SAAgBK,EAAmBH,GAA2BI,GAAwC;CACpG,OAAO;EACL,GAAGA;EACH,OAAOJ,EAAM;EACb,aAAaA,EAAM;EACnB,SAASA,EAAM;EACf,aAAaA,EAAM;CACrB;AACF"}
@@ -0,0 +1,188 @@
1
+ import { Fragment as e } from "react";
2
+ import { Legend as t, Line as n, YAxis as r } from "recharts";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { r as o } from "./chartConstants-BDkVHEEM.js";
5
+ import { n as s } from "./chartUtils-C49Kr8Nt.js";
6
+ import { i as c, r as l } from "./targetUtils-BlDK-um-.js";
7
+ var u = ({ x: e = 0, y: t = 0, payload: n, tickFormatter: r, index: a = 0 }) => {
8
+ if (!n) return null;
9
+ let o = r ? r(n.value, a) : String(n.value), s = o.length > 16 ? `${o.slice(0, 15)}\u2026` : o;
10
+ return /* @__PURE__ */ i("g", {
11
+ transform: `translate(${e},${t})`,
12
+ children: /* @__PURE__ */ i("text", {
13
+ x: 0,
14
+ y: 0,
15
+ dy: 16,
16
+ textAnchor: "end",
17
+ fill: "var(--dc-text-muted)",
18
+ fontSize: 12,
19
+ transform: "rotate(-45)",
20
+ children: s
21
+ })
22
+ });
23
+ };
24
+ // src/client/components/charts/chartScaffolding.tsx
25
+ function d(e, t) {
26
+ return {
27
+ hasRightAxis: e.some((e) => t[e] === "right"),
28
+ leftAxisFields: e.filter((e) => (t[e] || "left") === "left"),
29
+ rightAxisFields: e.filter((e) => t[e] === "right")
30
+ };
31
+ }
32
+ function f(e) {
33
+ return {
34
+ ...o,
35
+ left: 40,
36
+ right: e ? 40 : 20
37
+ };
38
+ }
39
+ var p = 6.6;
40
+ function m(e) {
41
+ let t = 0;
42
+ for (let n of e) {
43
+ if (n == null) continue;
44
+ let e = String(n).length;
45
+ e > t && (t = e);
46
+ }
47
+ if (t === 0) return 60;
48
+ let n = t * p * Math.SQRT1_2, r = Math.ceil(n) + 20;
49
+ return Math.max(60, Math.min(r, 96));
50
+ }
51
+ function h({ labels: e, mode: t = "auto", isTimeAxis: n = !1, showAllLabels: r = !1 }) {
52
+ if (t === "horizontal" || t === "angled") return t;
53
+ if (r) return "angled";
54
+ if (n) return "horizontal";
55
+ let i = 0;
56
+ for (let t of e) t != null && (i = Math.max(i, String(t).length));
57
+ return i <= 12 ? "horizontal" : "angled";
58
+ }
59
+ function g(e, t) {
60
+ return e === "horizontal" ? 24 : m(t);
61
+ }
62
+ function _({ values: e, tickFormatter: t, mode: n, isTimeAxis: r = !1, showAllLabels: a = !1 }) {
63
+ let o = t ? e.map((e, n) => e === void 0 ? void 0 : t(e, n)) : e, s = h({
64
+ labels: o,
65
+ mode: n,
66
+ isTimeAxis: r,
67
+ showAllLabels: a
68
+ }), c = g(s, o);
69
+ return s === "horizontal" ? {
70
+ orientation: s,
71
+ height: c,
72
+ tickFormatter: t,
73
+ tick: {
74
+ fontSize: 12,
75
+ fill: "var(--dc-text-muted)"
76
+ },
77
+ interval: a ? 0 : "preserveStartEnd",
78
+ minTickGap: 12
79
+ } : {
80
+ orientation: s,
81
+ height: c,
82
+ tickFormatter: t,
83
+ tick: /* @__PURE__ */ i(u, {}),
84
+ interval: a ? 0 : void 0,
85
+ minTickGap: void 0
86
+ };
87
+ }
88
+ function v(e, t) {
89
+ return e === "horizontal" ? 8 : t;
90
+ }
91
+ function y(e) {
92
+ return f(e).left + 60;
93
+ }
94
+ function b(e, t) {
95
+ let n = l(t || ""), r = c(n, e.length);
96
+ return {
97
+ spreadTargets: r,
98
+ enhancedChartData: r.length > 0 ? e.map((e, t) => ({
99
+ ...e,
100
+ __target: r[t] || null
101
+ })) : e
102
+ };
103
+ }
104
+ function x({ hasRightAxis: t, leftAxisFields: n, rightAxisFields: o }, c, l, u, d = !1) {
105
+ return /* @__PURE__ */ a(e, { children: [/* @__PURE__ */ i(r, {
106
+ yAxisId: "left",
107
+ orientation: "left",
108
+ width: 60,
109
+ tick: { fontSize: 12 },
110
+ tickFormatter: d ? (e) => `${(e * 100).toFixed(0)}%` : l ? (e) => s(e, l) : void 0,
111
+ domain: d ? [0, 1] : void 0,
112
+ label: d ? void 0 : n.length > 0 ? {
113
+ value: l?.label || c(n[0]),
114
+ angle: -90,
115
+ position: "left",
116
+ style: {
117
+ textAnchor: "middle",
118
+ fontSize: "12px",
119
+ fill: "var(--dc-text-muted)"
120
+ }
121
+ } : void 0
122
+ }), t && /* @__PURE__ */ i(r, {
123
+ yAxisId: "right",
124
+ orientation: "right",
125
+ tick: { fontSize: 12 },
126
+ tickFormatter: u ? (e) => s(e, u) : void 0,
127
+ label: o.length > 0 ? {
128
+ value: u?.label || c(o[0]),
129
+ angle: 90,
130
+ position: "right",
131
+ style: {
132
+ textAnchor: "middle",
133
+ fontSize: "12px",
134
+ fill: "var(--dc-text-muted)"
135
+ }
136
+ } : void 0
137
+ })] });
138
+ }
139
+ function S(t) {
140
+ return t.length === 0 ? null : /* @__PURE__ */ a(e, { children: [/* @__PURE__ */ i(n, {
141
+ type: "monotone",
142
+ dataKey: "__target",
143
+ yAxisId: "left",
144
+ stroke: "#ffffff",
145
+ strokeWidth: 2,
146
+ dot: !1,
147
+ activeDot: !1,
148
+ connectNulls: !1
149
+ }), /* @__PURE__ */ i(n, {
150
+ type: "monotone",
151
+ dataKey: "__target",
152
+ yAxisId: "left",
153
+ name: "Target",
154
+ stroke: "#8B5CF6",
155
+ strokeWidth: 2,
156
+ strokeDasharray: "2 3",
157
+ dot: !1,
158
+ activeDot: !1,
159
+ connectNulls: !1
160
+ })] });
161
+ }
162
+ function C({ leftYAxisFormat: e, rightYAxisFormat: t, yAxisAssignment: n, resolveField: r, isPercentStack: i = !1 }) {
163
+ return (a, o) => {
164
+ if (a == null) return ["No data", o];
165
+ if (o === "Target") return [s(a, e), "Target Value"];
166
+ if (i && typeof a == "number") return [`${(a * 100).toFixed(1)}%`, o];
167
+ let c = r(o);
168
+ return [s(a, (c && n[c] === "right" ? "right" : "left") == "right" ? t : e), o];
169
+ };
170
+ }
171
+ function w({ show: e, iconType: n, paddingTop: r, onHover: a, onLeave: o }) {
172
+ return e ? /* @__PURE__ */ i(t, {
173
+ wrapperStyle: {
174
+ fontSize: "12px",
175
+ paddingTop: `${r}px`
176
+ },
177
+ iconType: n,
178
+ iconSize: 8,
179
+ layout: "horizontal",
180
+ align: "center",
181
+ verticalAlign: "bottom",
182
+ onMouseEnter: (e) => a(String(e.dataKey || "")),
183
+ onMouseLeave: o
184
+ }) : null;
185
+ }
186
+ export { f as a, x as c, y as i, w as l, d as n, C as o, v as r, S as s, _ as t, b as u };
187
+
188
+ //# sourceMappingURL=chartScaffolding-DcJLGHlm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartScaffolding-DcJLGHlm.js","names":["_jsx","_jsx","_jsxs","Fragment","Legend","Line","YAxis","jsx","jsxs","CHART_MARGINS","formatAxisValue","spreadTargetValues","parseTargetValues","AngledXAxisTick","x","y","payload","tickFormatter","index","rawValue","displayValue","getDualAxisInfo","yAxisFields","yAxisAssignment","field","f","getYAxisChartMargins","hasRightAxis","TICK_CHAR_WIDTH","resolveAngledAxisHeight","values","longest","value","len","projected","needed","resolveXAxisOrientation","labels","mode","isTimeAxis","showAllLabels","label","resolveXAxisHeight","orientation","getCartesianXAxisProps","height","getLegendPaddingTop","angledPadding","getPlotLeftOffset","withTargetData","chartData","target","targetValues","spreadTargets","dataPoint","renderDualYAxes","leftAxisFields","rightAxisFields","getFieldLabel","leftYAxisFormat","rightYAxisFormat","isPercentStack","v","renderChartTargetLines","makeCartesianTooltipFormatter","resolveField","name","originalField","renderHoverLegend","show","iconType","paddingTop","onHover","onLeave","o"],"sources":["../../../src/client/components/charts/AngledXAxisTick.tsx","../../../src/client/components/charts/chartScaffolding.tsx"],"sourcesContent":["import React from 'react'\n\ninterface AngledXAxisTickProps {\n x?: number\n y?: number\n payload?: {\n value: string | number\n }\n tickFormatter?: (value: string | number, index: number) => string\n index?: number\n visibleTicksCount?: number\n // Allow any additional props recharts might pass\n [key: string]: unknown\n}\n\n/**\n * Longest label the angled axis reserves room for; see\n * MAX_ANGLED_AXIS_HEIGHT in chartScaffolding.\n */\nexport const MAX_TICK_LABEL_CHARS = 16\n\n/**\n * Custom XAxis tick component for properly aligned angled labels.\n * Fixes alignment issues in recharts 3.7+ where angled labels don't\n * center properly under data points.\n */\nconst AngledXAxisTick: React.FC<AngledXAxisTickProps> = ({\n x = 0,\n y = 0,\n payload,\n tickFormatter,\n index = 0\n}) => {\n if (!payload) return null\n\n const rawValue = tickFormatter\n ? tickFormatter(payload.value, index)\n : String(payload.value)\n\n // The axis reserves height for the longest label (resolveAngledAxisHeight),\n // capped so one very long value cannot squeeze the plot. Truncate past that\n // cap rather than let the label be clipped by the chart edge.\n const displayValue =\n rawValue.length > MAX_TICK_LABEL_CHARS\n ? `${rawValue.slice(0, MAX_TICK_LABEL_CHARS - 1)}\\u2026`\n : rawValue\n\n return (\n <g transform={`translate(${x},${y})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor=\"end\"\n fill=\"var(--dc-text-muted)\"\n fontSize={12}\n transform=\"rotate(-45)\"\n >\n {displayValue}\n </text>\n </g>\n )\n}\n\nexport default AngledXAxisTick\n","import { Fragment } from 'react'\nimport { YAxis, Line, Legend } from 'recharts'\nimport AngledXAxisTick from './AngledXAxisTick.js'\nimport { CHART_MARGINS } from '../../utils/chartConstants.js'\nimport { formatAxisValue } from '../../utils/chartUtils.js'\nimport { parseTargetValues, spreadTargetValues } from '../../utils/targetUtils.js'\nimport type { AxisFormatConfig, XAxisLabelMode } from '../../types.js'\n\n/**\n * Shared scaffolding for the Cartesian recharts charts (bar, line, area).\n *\n * These charts duplicated the same dual-Y-axis derivation, chart margins,\n * target-line overlay, and the left/right `<YAxis>` JSX. The pure helpers and\n * recharts render-helpers here own that shared setup. Render-helpers return\n * recharts elements (inside a fragment) and are embedded directly in the chart\n * children — recharts flattens fragments when discovering axes/series, exactly\n * as it already does for the inline target-line fragment.\n */\n\nexport interface DualAxisInfo {\n /** True when at least one measure is assigned to the right axis */\n hasRightAxis: boolean\n /** Measure fields rendered against the left axis */\n leftAxisFields: string[]\n /** Measure fields rendered against the right axis */\n rightAxisFields: string[]\n}\n\n/** Derive left/right axis membership from per-measure axis assignments. */\nexport function getDualAxisInfo(\n yAxisFields: string[],\n yAxisAssignment: Record<string, 'left' | 'right'>\n): DualAxisInfo {\n const hasRightAxis = yAxisFields.some((field) => yAxisAssignment[field] === 'right')\n const leftAxisFields = yAxisFields.filter((f) => (yAxisAssignment[f] || 'left') === 'left')\n const rightAxisFields = yAxisFields.filter((f) => yAxisAssignment[f] === 'right')\n return { hasRightAxis, leftAxisFields, rightAxisFields }\n}\n\n/** Chart margins with extra room for the Y-axis label(s). */\nexport function getYAxisChartMargins(hasRightAxis: boolean) {\n return {\n ...CHART_MARGINS,\n left: 40, // Space for left Y-axis label\n right: hasRightAxis ? 40 : 20 // Extra space for right Y-axis label if needed\n }\n}\n\n/**\n * Vertical space an angled X-axis label needs.\n *\n * `AngledXAxisTick` rotates its text -45deg from an anchor offset dy=16, so the\n * space required below the axis is the label's own width projected onto the\n * vertical, plus that offset. A fixed height clipped longer labels: \"2026-08-24\"\n * is roughly 66px wide at 12px, which projects to ~47px and needs ~63px in\n * total against the 60px that used to be hardcoded.\n *\n * Capped, because a pathological label should cost the plot a bounded amount of\n * height rather than squeeze it away - past the cap the label is truncated\n * instead (see AngledXAxisTick).\n */\nexport const MIN_ANGLED_AXIS_HEIGHT = 60\nexport const MAX_ANGLED_AXIS_HEIGHT = 96\n/** Rough advance width of the tick font (12px sans) per character. */\nconst TICK_CHAR_WIDTH = 6.6\n\nexport function resolveAngledAxisHeight(values: Array<string | number | undefined>): number {\n let longest = 0\n for (const value of values) {\n if (value === null || value === undefined) continue\n const len = String(value).length\n if (len > longest) longest = len\n }\n if (longest === 0) return MIN_ANGLED_AXIS_HEIGHT\n\n const projected = longest * TICK_CHAR_WIDTH * Math.SQRT1_2\n const needed = Math.ceil(projected) + 20 // the tick's dy offset plus a little air\n return Math.max(MIN_ANGLED_AXIS_HEIGHT, Math.min(needed, MAX_ANGLED_AXIS_HEIGHT))\n}\n\n/** Height of an X axis with horizontal labels: tick line, margin, one 12px line. */\nexport const HORIZONTAL_AXIS_HEIGHT = 24\n/**\n * In `auto` mode, category labels up to this many characters stay horizontal;\n * longer ones are angled so more of them fit. Time axes are always horizontal\n * in `auto`: their compact labels are short by construction.\n */\nexport const HORIZONTAL_LABEL_MAX_CHARS = 12\n/** Minimum gap between horizontal labels; recharts drops ticks to keep it. */\nexport const HORIZONTAL_MIN_TICK_GAP = 12\n\nexport type XAxisOrientation = 'horizontal' | 'angled'\n\n/**\n * Pick the X-axis label orientation.\n *\n * `auto` keeps labels horizontal when they are short (or the axis is a time\n * axis) and recharts may thin them. Showing every label (`showAllXLabels`) only\n * fits angled, so `auto` angles then. An explicit mode always wins.\n */\nexport function resolveXAxisOrientation({\n labels,\n mode = 'auto',\n isTimeAxis = false,\n showAllLabels = false\n}: {\n labels: Array<string | number | undefined>\n mode?: XAxisLabelMode\n isTimeAxis?: boolean\n showAllLabels?: boolean\n}): XAxisOrientation {\n if (mode === 'horizontal' || mode === 'angled') return mode\n if (showAllLabels) return 'angled'\n if (isTimeAxis) return 'horizontal'\n let longest = 0\n for (const label of labels) {\n if (label === null || label === undefined) continue\n longest = Math.max(longest, String(label).length)\n }\n return longest <= HORIZONTAL_LABEL_MAX_CHARS ? 'horizontal' : 'angled'\n}\n\n/** Axis height for the orientation actually drawn, so no empty band is left. */\nexport function resolveXAxisHeight(\n orientation: XAxisOrientation,\n labels: Array<string | number | undefined>\n): number {\n return orientation === 'horizontal' ? HORIZONTAL_AXIS_HEIGHT : resolveAngledAxisHeight(labels)\n}\n\n/**\n * Props for a category `<XAxis>` shared by the Cartesian charts: the tick\n * (horizontal or angled), its height, thinning and the label formatter.\n *\n * The formatter goes on the axis, not the tick, so recharts measures the\n * labels it will draw when it decides which ticks to drop. Labels are sized\n * from the formatted text, not the raw values.\n */\nexport function getCartesianXAxisProps({\n values,\n tickFormatter,\n mode,\n isTimeAxis = false,\n showAllLabels = false\n}: {\n values: Array<string | number | undefined>\n tickFormatter?: (value: any, index: number) => string\n mode?: XAxisLabelMode\n isTimeAxis?: boolean\n showAllLabels?: boolean\n}) {\n const labels = tickFormatter\n ? values.map((value, index) => (value === undefined ? undefined : tickFormatter(value, index)))\n : values\n const orientation = resolveXAxisOrientation({ labels, mode, isTimeAxis, showAllLabels })\n const height = resolveXAxisHeight(orientation, labels)\n if (orientation === 'horizontal') {\n return {\n orientation,\n height,\n tickFormatter,\n tick: { fontSize: 12, fill: 'var(--dc-text-muted)' },\n interval: showAllLabels ? 0 : ('preserveStartEnd' as const),\n minTickGap: HORIZONTAL_MIN_TICK_GAP\n }\n }\n return {\n orientation,\n height,\n tickFormatter,\n tick: <AngledXAxisTick />,\n interval: showAllLabels ? 0 : undefined,\n minTickGap: undefined\n }\n}\n\n/** Legend gap under the X axis: small once the axis reserves its own labels. */\nexport function getLegendPaddingTop(orientation: XAxisOrientation, angledPadding: number): number {\n return orientation === 'horizontal' ? 8 : angledPadding\n}\n\n/**\n * Width reserved for the left `<YAxis>`. This is recharts' own default, stated\n * explicitly so anything needing to line up with the plot area can rely on it\n * rather than assume it.\n */\nexport const Y_AXIS_WIDTH = 60\n\n/**\n * Distance from the chart container's left edge to the left edge of the plot\n * area — the chart margin plus the Y-axis gutter. Used to indent content\n * rendered outside the chart (the summary header) so it lines up with the first\n * data point instead of floating against the card edge.\n */\nexport function getPlotLeftOffset(hasRightAxis: boolean): number {\n return getYAxisChartMargins(hasRightAxis).left + Y_AXIS_WIDTH\n}\n\n/**\n * Apply target values (single or comma-separated spread) onto chart data,\n * returning the spread targets plus data enhanced with a `__target` key.\n */\nexport function withTargetData<T extends Record<string, any>>(\n chartData: T[],\n target: string | undefined\n): { spreadTargets: number[]; enhancedChartData: T[] } {\n const targetValues = parseTargetValues(target || '')\n const spreadTargets = spreadTargetValues(targetValues, chartData.length)\n const enhancedChartData = spreadTargets.length > 0\n ? chartData.map((dataPoint, index) => ({ ...dataPoint, __target: spreadTargets[index] || null }))\n : chartData\n return { spreadTargets, enhancedChartData }\n}\n\n/**\n * Render the left + optional right `<YAxis>`. Returns recharts elements in a\n * fragment for embedding directly in the chart children. Positional args keep\n * the (otherwise identical) call sites in each chart down to a single line.\n *\n * @param isPercentStack when true (area/bar percent stacking) the left axis shows 0–100%\n */\nexport function renderDualYAxes(\n { hasRightAxis, leftAxisFields, rightAxisFields }: DualAxisInfo,\n getFieldLabel: (field: string) => string,\n leftYAxisFormat?: AxisFormatConfig,\n rightYAxisFormat?: AxisFormatConfig,\n isPercentStack = false\n) {\n return (\n <Fragment>\n <YAxis\n yAxisId=\"left\"\n orientation=\"left\"\n width={Y_AXIS_WIDTH}\n tick={{ fontSize: 12 }}\n tickFormatter={\n isPercentStack\n ? (v) => `${(v * 100).toFixed(0)}%`\n : leftYAxisFormat\n ? (value) => formatAxisValue(value, leftYAxisFormat)\n : undefined\n }\n domain={isPercentStack ? [0, 1] : undefined}\n label={\n isPercentStack\n ? undefined\n : leftAxisFields.length > 0\n ? {\n value: leftYAxisFormat?.label || getFieldLabel(leftAxisFields[0]),\n angle: -90,\n position: 'left',\n style: { textAnchor: 'middle', fontSize: '12px', fill: 'var(--dc-text-muted)' }\n }\n : undefined\n }\n />\n {hasRightAxis && (\n <YAxis\n yAxisId=\"right\"\n orientation=\"right\"\n tick={{ fontSize: 12 }}\n tickFormatter={rightYAxisFormat ? (value) => formatAxisValue(value, rightYAxisFormat) : undefined}\n label={\n rightAxisFields.length > 0\n ? {\n value: rightYAxisFormat?.label || getFieldLabel(rightAxisFields[0]),\n angle: 90,\n position: 'right',\n style: { textAnchor: 'middle', fontSize: '12px', fill: 'var(--dc-text-muted)' }\n }\n : undefined\n }\n />\n )}\n </Fragment>\n )\n}\n\n/**\n * Render the target overlay: a white backing line plus a purple dashed line\n * on top (shared by bar, line, area). Returns null when there are no targets.\n */\nexport function renderChartTargetLines(spreadTargets: number[]) {\n if (spreadTargets.length === 0) return null\n return (\n <Fragment>\n {/* White background line */}\n <Line\n type=\"monotone\"\n dataKey=\"__target\"\n yAxisId=\"left\"\n stroke=\"#ffffff\"\n strokeWidth={2}\n dot={false}\n activeDot={false}\n connectNulls={false}\n />\n {/* Grey dashed line on top */}\n <Line\n type=\"monotone\"\n dataKey=\"__target\"\n yAxisId=\"left\"\n name=\"Target\"\n stroke=\"#8B5CF6\"\n strokeWidth={2}\n strokeDasharray=\"2 3\"\n dot={false}\n activeDot={false}\n connectNulls={false}\n />\n </Fragment>\n )\n}\n\ninterface CartesianTooltipOptions {\n leftYAxisFormat?: AxisFormatConfig\n rightYAxisFormat?: AxisFormatConfig\n yAxisAssignment: Record<string, 'left' | 'right'>\n /** Maps a series key (display label) back to its original measure field. */\n resolveField: (name: string) => string | undefined\n /** When true, values render as percentages (area/bar percent stacking). */\n isPercentStack?: boolean\n}\n\n/**\n * Build the value/name tooltip formatter shared by the Cartesian charts.\n * Handles null values, the target series, percent stacking, and per-series\n * left/right axis format selection.\n */\nexport function makeCartesianTooltipFormatter({\n leftYAxisFormat,\n rightYAxisFormat,\n yAxisAssignment,\n resolveField,\n isPercentStack = false\n}: CartesianTooltipOptions) {\n return (value: any, name: any): [any, any] => {\n if (value === null || value === undefined) {\n return ['No data', name]\n }\n if (name === 'Target') {\n // Use left Y-axis format for target values\n return [formatAxisValue(value, leftYAxisFormat), 'Target Value']\n }\n if (isPercentStack && typeof value === 'number') {\n return [`${(value * 100).toFixed(1)}%`, name]\n }\n // Determine which axis format to use based on series name\n const originalField = resolveField(name)\n const axisId = originalField && yAxisAssignment[originalField] === 'right' ? 'right' : 'left'\n const formatConfig = axisId === 'right' ? rightYAxisFormat : leftYAxisFormat\n return [formatAxisValue(value, formatConfig), name]\n }\n}\n\n/**\n * Render the hover-aware bottom legend shared by the Cartesian charts.\n * Returns null when the legend is hidden. `iconType` / `paddingTop` differ\n * per chart (rect+10 for area, rect+25 for bar, line+25 for line).\n */\nexport function renderHoverLegend({\n show,\n iconType,\n paddingTop,\n onHover,\n onLeave\n}: {\n show: boolean\n iconType: 'rect' | 'line' | 'circle'\n paddingTop: number\n onHover: (dataKey: string) => void\n onLeave: () => void\n}) {\n if (!show) return null\n return (\n <Legend\n wrapperStyle={{ fontSize: '12px', paddingTop: `${paddingTop}px` }}\n iconType={iconType}\n iconSize={8}\n layout=\"horizontal\"\n align=\"center\"\n verticalAlign=\"bottom\"\n onMouseEnter={(o) => onHover(String(o.dataKey || ''))}\n onMouseLeave={onLeave}\n />\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAMa,KAAmD,EACvDC,OAAI,GACJC,OAAI,GACJC,YACAC,kBACAC,WAAQ,QACJ;CACJ,IAAI,CAACF,GAAS,OAAO;CAErB,IAAMG,IAAWF,IACbA,EAAcD,EAAQ,OAAOE,CAAK,IAClC,OAAOF,EAAQ,KAAK,GAKlBI,IACJD,EAAS,SAAA,KACL,GAAGA,EAAS,MAAM,GAAG,EAAwB,EAAE,UAC/CA;CAEN,OACEnB,kBAAC,KAAD;EAAG,WAAW,aAAac,EAAE,GAAGC,EAAE;EAChC,UAAAf,kBAAC,QAA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AA0B;EAC5C,IAAIlC,KAAU,MACZ,OAAO,CAAC,WAAWkC,CAAI;EAEzB,IAAIA,MAAS,UAEX,OAAO,CAACxD,EAAgBsB,GAAO2B,CAAe,GAAG,cAAc;EAEjE,IAAIE,KAAkB,OAAO7B,KAAU,UACrC,OAAO,CAAC,IAAIA,IAAQ,IAAA,CAAK,QAAQ,CAAC,EAAE,IAAIkC,CAAI;EAG9C,IAAMC,IAAgBF,EAAaC,CAAI;EAGvC,OAAO,CAACxD,EAAgBsB,IAFTmC,KAAiB5C,EAAgB4C,OAAmB,UAAU,UAAU,WACvD,UAAUP,IAAmBD,CAClB,GAAGO,CAAI;CACpD;AACF;AAOA,SAAgBE,EAAkB,EAChCC,SACAC,aACAC,eACAC,YACAC,cAOC;CAED,OADKJ,IAEHpE,kBAACG,GAAD;EACE,cAAc;GAAE,UAAU;GAAQ,YAAY,GAAGmE,EAAW;EAAI;EACtDD;EACV,UAAU;EACV,QAAO;EACP,OAAM;EACN,eAAc;EACd,eAAeI,MAAMF,EAAQ,OAAOE,EAAE,WAAW,EAAE,CAAC;EACpD,cAAcD;CACf,CAAA,IAXe;AAapB"}
@@ -285,6 +285,6 @@ function S(e, t, n, r, i, a = (e) => e) {
285
285
  hasDimensions: !1
286
286
  };
287
287
  }
288
- export { b as a, p as c, v as d, e as f, y as i, x as l, h as n, _ as o, m as r, f as s, g as t, S as u };
288
+ export { b as a, p as c, v as d, l as f, y as i, x as l, h as n, _ as o, e as p, m as r, f as s, g as t, S as u };
289
289
 
290
- //# sourceMappingURL=chartUtils-CcCLgSOB.js.map
290
+ //# sourceMappingURL=chartUtils-C49Kr8Nt.js.map