drizzle-cube 0.13.0 → 0.13.1

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 (278) hide show
  1. package/dist/adapters/ActivityGridChart.config-BDe2_qYC.js +1 -0
  2. package/dist/adapters/ActivityGridChart.config-BY3cUifC.cjs +1 -0
  3. package/dist/adapters/AreaChart.config-CaLEu4WZ.cjs +1 -0
  4. package/dist/adapters/AreaChart.config-upS1qK9z.js +1 -0
  5. package/dist/adapters/BarChart.config-CSbClrlz.cjs +1 -0
  6. package/dist/adapters/BarChart.config-GlYPKS8R.js +1 -0
  7. package/dist/adapters/BoxPlotChart.config-BIxjwA1O.cjs +1 -0
  8. package/dist/adapters/BoxPlotChart.config-DybpbTEl.js +1 -0
  9. package/dist/adapters/BubbleChart.config-CREi46jt.cjs +1 -0
  10. package/dist/adapters/BubbleChart.config-Di8lOOga.js +1 -0
  11. package/dist/adapters/CandlestickChart.config-BrbgDZcn.cjs +1 -0
  12. package/dist/adapters/CandlestickChart.config-CTHDWBM7.js +1 -0
  13. package/dist/adapters/DataTable.config-BpzbJKOY.cjs +1 -0
  14. package/dist/adapters/DataTable.config-DbPDoKSt.js +1 -0
  15. package/dist/adapters/DotStripChart.config-Bkj53d85.cjs +1 -0
  16. package/dist/adapters/DotStripChart.config-Xxte1OgG.js +1 -0
  17. package/dist/adapters/FunnelChart.config-CRbPp-7K.js +1 -0
  18. package/dist/adapters/FunnelChart.config-DfaMSLui.cjs +1 -0
  19. package/dist/adapters/GaugeChart.config-CKKMCRn4.js +1 -0
  20. package/dist/adapters/GaugeChart.config-CN7S1OEB.cjs +1 -0
  21. package/dist/adapters/HeatMapChart.config-BloGhLrU.js +1 -0
  22. package/dist/adapters/HeatMapChart.config-C94iqzfw.cjs +1 -0
  23. package/dist/adapters/KpiDelta.config-CMGQIfsy.cjs +1 -0
  24. package/dist/adapters/KpiDelta.config-qC8_1W29.js +1 -0
  25. package/dist/adapters/KpiNumber.config-CnYoD9WM.js +1 -0
  26. package/dist/adapters/KpiNumber.config-jxzFzY71.cjs +1 -0
  27. package/dist/adapters/KpiText.config--11XBVEz.js +1 -0
  28. package/dist/adapters/KpiText.config-DOYHINgD.cjs +1 -0
  29. package/dist/adapters/LineChart.config-Bt6XKzQj.js +1 -0
  30. package/dist/adapters/LineChart.config-nwC-IWRL.cjs +1 -0
  31. package/dist/adapters/MarkdownChart.config-Br1jAwCf.js +1 -0
  32. package/dist/adapters/MarkdownChart.config-CeqYtwrd.cjs +1 -0
  33. package/dist/adapters/MeasureProfileChart.config-B0G_11c9.js +1 -0
  34. package/dist/adapters/MeasureProfileChart.config-_ZC5pb_I.cjs +1 -0
  35. package/dist/adapters/PieChart.config-CZc5LcmR.js +1 -0
  36. package/dist/adapters/PieChart.config-D1tFIodJ.cjs +1 -0
  37. package/dist/adapters/ProportionBarChart.config-9zHgirKR.cjs +1 -0
  38. package/dist/adapters/ProportionBarChart.config-BMIYtg7Q.js +1 -0
  39. package/dist/adapters/RadarChart.config-CYPyOMbT.js +1 -0
  40. package/dist/adapters/RadarChart.config-mPXx8Moz.cjs +1 -0
  41. package/dist/adapters/RadialBarChart.config-EzhjUjvA.cjs +1 -0
  42. package/dist/adapters/RadialBarChart.config-l9yaKru1.js +1 -0
  43. package/dist/adapters/RecordsTable.config-BNKcGGjX.cjs +1 -0
  44. package/dist/adapters/RecordsTable.config-CbtJMaVG.js +1 -0
  45. package/dist/adapters/RetentionCombinedChart.config-CtJ-q7Gr.js +1 -0
  46. package/dist/adapters/RetentionCombinedChart.config-Y47OjDeH.cjs +1 -0
  47. package/dist/adapters/RetentionHeatmap.config-BqLV6f6o.cjs +1 -0
  48. package/dist/adapters/RetentionHeatmap.config-DPNhEK1p.js +1 -0
  49. package/dist/adapters/SankeyChart.config-Dipd6fNz.cjs +1 -0
  50. package/dist/adapters/SankeyChart.config-DpK5pFy5.js +1 -0
  51. package/dist/adapters/ScatterChart.config-BfDDAH83.cjs +1 -0
  52. package/dist/adapters/ScatterChart.config-C90xKdE-.js +1 -0
  53. package/dist/adapters/SunburstChart.config-CacceE1E.cjs +1 -0
  54. package/dist/adapters/SunburstChart.config-MoFnOy0s.js +1 -0
  55. package/dist/adapters/TreeMapChart.config-BYHi-dzk.js +1 -0
  56. package/dist/adapters/TreeMapChart.config-CWSspab0.cjs +1 -0
  57. package/dist/adapters/WaterfallChart.config-CiOnjcsk.cjs +1 -0
  58. package/dist/adapters/WaterfallChart.config-TNtq-2mo.js +1 -0
  59. package/dist/adapters/{cors-headers-g45-9YKF.cjs → cors-headers-D0ofhz3k.cjs} +1 -1
  60. package/dist/adapters/{cors-headers-1y1YYuKm.js → cors-headers-DPNvO_6o.js} +4 -1
  61. package/dist/adapters/cors-headers.d.ts +10 -2
  62. package/dist/adapters/express/index.cjs +2 -2
  63. package/dist/adapters/express/index.d.ts +18 -2
  64. package/dist/adapters/express/index.js +42 -29
  65. package/dist/adapters/fastify/index.cjs +1 -1
  66. package/dist/adapters/fastify/index.js +6 -6
  67. package/dist/adapters/{handler-C3oYSaVM.cjs → handler-CRAPq8xB.cjs} +1 -1
  68. package/dist/adapters/{handler-C9ZFhsv6.js → handler-Dqe0_Uvx.js} +29 -34
  69. package/dist/adapters/hono/index.cjs +1 -1
  70. package/dist/adapters/hono/index.js +6 -6
  71. package/dist/adapters/mcp-app-html.cjs +1 -1
  72. package/dist/adapters/mcp-app-html.js +1 -1
  73. package/dist/adapters/nextjs/index.cjs +1 -1
  74. package/dist/adapters/nextjs/index.js +8 -3
  75. package/dist/cjs/adapters/cors-headers.d.ts +10 -2
  76. package/dist/cjs/adapters/express/index.d.ts +18 -2
  77. package/dist/client/charts.js +12 -12
  78. package/dist/client/chunks/{ActivityGridChart-BpA0H20k.js → ActivityGridChart-CmboSrmc.js} +2 -2
  79. package/dist/client/chunks/{ActivityGridChart-BpA0H20k.js.map → ActivityGridChart-CmboSrmc.js.map} +1 -1
  80. package/dist/client/chunks/{BubbleChart-Va-bRr3Y.js → BubbleChart-DiloeKCW.js} +2 -2
  81. package/dist/client/chunks/{BubbleChart-Va-bRr3Y.js.map → BubbleChart-DiloeKCW.js.map} +1 -1
  82. package/dist/client/chunks/{ChartStates-DV1Jtonz.js → ChartStates-oCfgZumF.js} +2 -2
  83. package/dist/client/chunks/{ChartStates-DV1Jtonz.js.map → ChartStates-oCfgZumF.js.map} +1 -1
  84. package/dist/client/chunks/{ChartSummaryHeader-DSmXm_lT.js → ChartSummaryHeader-nx-4H-in.js} +2 -2
  85. package/dist/client/chunks/{ChartSummaryHeader-DSmXm_lT.js.map → ChartSummaryHeader-nx-4H-in.js.map} +1 -1
  86. package/dist/client/chunks/{DashboardEditModal-CnbCHKtu.js → DashboardEditModal-6N8H3lXW.js} +7 -7
  87. package/dist/client/chunks/{DashboardEditModal-CnbCHKtu.js.map → DashboardEditModal-6N8H3lXW.js.map} +1 -1
  88. package/dist/client/chunks/{DataHistogram-zBz4Opmm.js → DataHistogram-DbQbA-Pi.js} +2 -2
  89. package/dist/client/chunks/{DataHistogram-zBz4Opmm.js.map → DataHistogram-DbQbA-Pi.js.map} +1 -1
  90. package/dist/client/chunks/{DotStripChart-D6o5DpPf.js → DotStripChart-HcSCkYDs.js} +4 -4
  91. package/dist/client/chunks/{DotStripChart-D6o5DpPf.js.map → DotStripChart-HcSCkYDs.js.map} +1 -1
  92. package/dist/client/chunks/{FunnelViews-DwvKEzU7.js → FunnelViews-SjgYxngb.js} +2 -2
  93. package/dist/client/chunks/{FunnelViews-DwvKEzU7.js.map → FunnelViews-SjgYxngb.js.map} +1 -1
  94. package/dist/client/chunks/{HeatMapChart-DqOZawm3.js → HeatMapChart-B9pj-KQi.js} +3 -3
  95. package/dist/client/chunks/{HeatMapChart-DqOZawm3.js.map → HeatMapChart-B9pj-KQi.js.map} +1 -1
  96. package/dist/client/chunks/{KpiDelta-CUqF9vVH.js → KpiDelta-1BfMFygT.js} +2 -2
  97. package/dist/client/chunks/{KpiDelta-CUqF9vVH.js.map → KpiDelta-1BfMFygT.js.map} +1 -1
  98. package/dist/client/chunks/{KpiText-Dply9kb4.js → KpiText-DzPeryRS.js} +2 -2
  99. package/dist/client/chunks/{KpiText-Dply9kb4.js.map → KpiText-DzPeryRS.js.map} +1 -1
  100. package/dist/client/chunks/{MarkdownChart-BlL5h7nK.js → MarkdownChart-_aif5Ye3.js} +3 -3
  101. package/dist/client/chunks/{MarkdownChart-BlL5h7nK.js.map → MarkdownChart-_aif5Ye3.js.map} +1 -1
  102. package/dist/client/chunks/{PortletAnalysisModal-CDw3uit7.js → PortletAnalysisModal-C0MLoJTP.js} +5 -5
  103. package/dist/client/chunks/{PortletAnalysisModal-CDw3uit7.js.map → PortletAnalysisModal-C0MLoJTP.js.map} +1 -1
  104. package/dist/client/chunks/{ProportionBarChart-CK0FlfTr.js → ProportionBarChart-B9Rgyhbc.js} +4 -4
  105. package/dist/client/chunks/{ProportionBarChart-CK0FlfTr.js.map → ProportionBarChart-B9Rgyhbc.js.map} +1 -1
  106. package/dist/client/chunks/{RecordsTable-DURm8ypj.js → RecordsTable-DRovI83Z.js} +4 -4
  107. package/dist/client/chunks/{RecordsTable-DURm8ypj.js.map → RecordsTable-DRovI83Z.js.map} +1 -1
  108. package/dist/client/chunks/{RetentionCombinedChart-90MBVuS7.js → RetentionCombinedChart-D_vAvtIb.js} +3 -3
  109. package/dist/client/chunks/{RetentionCombinedChart-90MBVuS7.js.map → RetentionCombinedChart-D_vAvtIb.js.map} +1 -1
  110. package/dist/client/chunks/{RetentionHeatmap-ChwWtk6j.js → RetentionHeatmap-CVEmxbg9.js} +2 -2
  111. package/dist/client/chunks/{RetentionHeatmap-ChwWtk6j.js.map → RetentionHeatmap-CVEmxbg9.js.map} +1 -1
  112. package/dist/client/chunks/{SchemaVisualization-RWq1-GVI.js → SchemaVisualization-DE8WBbNZ.js} +1 -1
  113. package/dist/client/chunks/{TextPortletModal-Fvuzf3mT.js → TextPortletModal-Bg5hFfZg.js} +3 -3
  114. package/dist/client/chunks/{TextPortletModal-Fvuzf3mT.js.map → TextPortletModal-Bg5hFfZg.js.map} +1 -1
  115. package/dist/client/chunks/{analysis-builder-4WfT396_.js → analysis-builder-BMoycXCE.js} +10 -10
  116. package/dist/client/chunks/{analysis-builder-4WfT396_.js.map → analysis-builder-BMoycXCE.js.map} +1 -1
  117. package/dist/client/chunks/{analysis-builder-shared-DQCAOl8f.js → analysis-builder-shared-D1KnOXT2.js} +8 -8
  118. package/dist/client/chunks/{analysis-builder-shared-DQCAOl8f.js.map → analysis-builder-shared-D1KnOXT2.js.map} +1 -1
  119. package/dist/client/chunks/{chart-activity-grid-C0V6erx3.js → chart-activity-grid-CiqEnzs_.js} +4 -4
  120. package/dist/client/chunks/{chart-activity-grid-C0V6erx3.js.map → chart-activity-grid-CiqEnzs_.js.map} +1 -1
  121. package/dist/client/chunks/{chart-area-D93yaXt_.js → chart-area-BgKyGty4.js} +6 -6
  122. package/dist/client/chunks/{chart-area-D93yaXt_.js.map → chart-area-BgKyGty4.js.map} +1 -1
  123. package/dist/client/chunks/{chart-bar-Cm5gacSp.js → chart-bar-BKTQ6zyq.js} +5 -5
  124. package/dist/client/chunks/{chart-bar-Cm5gacSp.js.map → chart-bar-BKTQ6zyq.js.map} +1 -1
  125. package/dist/client/chunks/{chart-box-plot-XWfiRDvb.js → chart-box-plot-FD8d8S_Y.js} +2 -2
  126. package/dist/client/chunks/{chart-box-plot-XWfiRDvb.js.map → chart-box-plot-FD8d8S_Y.js.map} +1 -1
  127. package/dist/client/chunks/{chart-bubble-B5eN2Ass.js → chart-bubble-BbmLUynL.js} +4 -4
  128. package/dist/client/chunks/{chart-bubble-B5eN2Ass.js.map → chart-bubble-BbmLUynL.js.map} +1 -1
  129. package/dist/client/chunks/{chart-candlestick-DkjqHZaS.js → chart-candlestick-DeDZSkhF.js} +2 -2
  130. package/dist/client/chunks/{chart-candlestick-DkjqHZaS.js.map → chart-candlestick-DeDZSkhF.js.map} +1 -1
  131. package/dist/client/chunks/{chart-config-area-BAQ3OOX8.js → chart-config-area-CiUGyEFe.js} +2 -2
  132. package/dist/client/chunks/{chart-config-area-BAQ3OOX8.js.map → chart-config-area-CiUGyEFe.js.map} +1 -1
  133. package/dist/client/chunks/{chart-config-bar-BI_fdiHp.js → chart-config-bar-CgnxLwWK.js} +2 -2
  134. package/dist/client/chunks/{chart-config-bar-BI_fdiHp.js.map → chart-config-bar-CgnxLwWK.js.map} +1 -1
  135. package/dist/client/chunks/{chart-config-kpi-delta-B_RTgzlg.js → chart-config-kpi-delta-Bb-SdLfu.js} +2 -2
  136. package/dist/client/chunks/{chart-config-kpi-delta-B_RTgzlg.js.map → chart-config-kpi-delta-Bb-SdLfu.js.map} +1 -1
  137. package/dist/client/chunks/{chart-config-kpi-number-DJAk5ijx.js → chart-config-kpi-number-DrgZOOSX.js} +2 -2
  138. package/dist/client/chunks/{chart-config-kpi-number-DJAk5ijx.js.map → chart-config-kpi-number-DrgZOOSX.js.map} +1 -1
  139. package/dist/client/chunks/{chart-config-line-IvPzwe7J.js → chart-config-line-SZnp_5gb.js} +2 -2
  140. package/dist/client/chunks/{chart-config-line-IvPzwe7J.js.map → chart-config-line-SZnp_5gb.js.map} +1 -1
  141. package/dist/client/chunks/{chart-config-pie-XmiWQBnz.js → chart-config-pie-DgM8pgZ3.js} +2 -2
  142. package/dist/client/chunks/{chart-config-pie-XmiWQBnz.js.map → chart-config-pie-DgM8pgZ3.js.map} +1 -1
  143. package/dist/client/chunks/{chart-config-radar-DgJ6MjX5.js → chart-config-radar-Bz7e2iJu.js} +2 -2
  144. package/dist/client/chunks/{chart-config-radar-DgJ6MjX5.js.map → chart-config-radar-Bz7e2iJu.js.map} +1 -1
  145. package/dist/client/chunks/{chart-config-radial-bar-XtEyL4I7.js → chart-config-radial-bar-Cq-77n9m.js} +2 -2
  146. package/dist/client/chunks/{chart-config-radial-bar-XtEyL4I7.js.map → chart-config-radial-bar-Cq-77n9m.js.map} +1 -1
  147. package/dist/client/chunks/{chart-config-tree-map-BPkeTgk_.js → chart-config-tree-map-CoeS1GRn.js} +2 -2
  148. package/dist/client/chunks/{chart-config-tree-map-BPkeTgk_.js.map → chart-config-tree-map-CoeS1GRn.js.map} +1 -1
  149. package/dist/client/chunks/{chart-data-table-LvjMZByO.js → chart-data-table-DLwFKymv.js} +3 -3
  150. package/dist/client/chunks/{chart-data-table-LvjMZByO.js.map → chart-data-table-DLwFKymv.js.map} +1 -1
  151. package/dist/client/chunks/{chart-funnel-B_YO8r5g.js → chart-funnel-BirEW77o.js} +3 -3
  152. package/dist/client/chunks/{chart-funnel-B_YO8r5g.js.map → chart-funnel-BirEW77o.js.map} +1 -1
  153. package/dist/client/chunks/{chart-gauge-BbcdeJ5v.js → chart-gauge-C4yS5138.js} +4 -4
  154. package/dist/client/chunks/{chart-gauge-BbcdeJ5v.js.map → chart-gauge-C4yS5138.js.map} +1 -1
  155. package/dist/client/chunks/{chart-heat-map-C35lzmXC.js → chart-heat-map-DvGcfud9.js} +4 -4
  156. package/dist/client/chunks/{chart-heat-map-C35lzmXC.js.map → chart-heat-map-DvGcfud9.js.map} +1 -1
  157. package/dist/client/chunks/{chart-kpi-delta-DB4S3nWz.js → chart-kpi-delta-BeReVMyn.js} +4 -4
  158. package/dist/client/chunks/{chart-kpi-delta-DB4S3nWz.js.map → chart-kpi-delta-BeReVMyn.js.map} +1 -1
  159. package/dist/client/chunks/{chart-kpi-number-D_NrcF-S.js → chart-kpi-number-CuYpI5LO.js} +4 -4
  160. package/dist/client/chunks/{chart-kpi-number-D_NrcF-S.js.map → chart-kpi-number-CuYpI5LO.js.map} +1 -1
  161. package/dist/client/chunks/{chart-kpi-text-CnaJn4Dj.js → chart-kpi-text-D3dha9Dn.js} +5 -5
  162. package/dist/client/chunks/{chart-kpi-text-CnaJn4Dj.js.map → chart-kpi-text-D3dha9Dn.js.map} +1 -1
  163. package/dist/client/chunks/{chart-line-B2R3wnGP.js → chart-line-EzYdBDdL.js} +6 -6
  164. package/dist/client/chunks/{chart-line-B2R3wnGP.js.map → chart-line-EzYdBDdL.js.map} +1 -1
  165. package/dist/client/chunks/{chart-markdown-DGPf7O38.js → chart-markdown-B1AZcI8Y.js} +3 -3
  166. package/dist/client/chunks/{chart-markdown-DGPf7O38.js.map → chart-markdown-B1AZcI8Y.js.map} +1 -1
  167. package/dist/client/chunks/{chart-measure-profile-CYli1HVY.js → chart-measure-profile-DaL9c2jy.js} +4 -4
  168. package/dist/client/chunks/{chart-measure-profile-CYli1HVY.js.map → chart-measure-profile-DaL9c2jy.js.map} +1 -1
  169. package/dist/client/chunks/{chart-pie-CsO68YHG.js → chart-pie-Dw3W8Qjg.js} +5 -5
  170. package/dist/client/chunks/{chart-pie-CsO68YHG.js.map → chart-pie-Dw3W8Qjg.js.map} +1 -1
  171. package/dist/client/chunks/{chart-radar-C17iNC8c.js → chart-radar-BhySlY7t.js} +4 -4
  172. package/dist/client/chunks/{chart-radar-C17iNC8c.js.map → chart-radar-BhySlY7t.js.map} +1 -1
  173. package/dist/client/chunks/{chart-radial-bar-ftFfZ-ob.js → chart-radial-bar-DXc37T3I.js} +4 -4
  174. package/dist/client/chunks/{chart-radial-bar-ftFfZ-ob.js.map → chart-radial-bar-DXc37T3I.js.map} +1 -1
  175. package/dist/client/chunks/{chart-sankey-BUSpiTBN.js → chart-sankey-Xi0rQvx-.js} +2 -2
  176. package/dist/client/chunks/{chart-sankey-BUSpiTBN.js.map → chart-sankey-Xi0rQvx-.js.map} +1 -1
  177. package/dist/client/chunks/{chart-scatter-Btk1kofc.js → chart-scatter-D7mMgM6E.js} +5 -5
  178. package/dist/client/chunks/{chart-scatter-Btk1kofc.js.map → chart-scatter-D7mMgM6E.js.map} +1 -1
  179. package/dist/client/chunks/{chart-sunburst-BoaobkAb.js → chart-sunburst-t3Qb3HI7.js} +2 -2
  180. package/dist/client/chunks/{chart-sunburst-BoaobkAb.js.map → chart-sunburst-t3Qb3HI7.js.map} +1 -1
  181. package/dist/client/chunks/{chart-tree-map-DL_NEnww.js → chart-tree-map-C0EZEE0y.js} +5 -5
  182. package/dist/client/chunks/{chart-tree-map-DL_NEnww.js.map → chart-tree-map-C0EZEE0y.js.map} +1 -1
  183. package/dist/client/chunks/{chart-waterfall-FXv1uwLV.js → chart-waterfall-C4rt-_iE.js} +4 -4
  184. package/dist/client/chunks/{chart-waterfall-FXv1uwLV.js.map → chart-waterfall-C4rt-_iE.js.map} +1 -1
  185. package/dist/client/chunks/{chartComponentRegistry-D5I9EH9T.js → chartComponentRegistry-lrQVhpz2.js} +4 -4
  186. package/dist/client/chunks/{chartComponentRegistry-D5I9EH9T.js.map → chartComponentRegistry-lrQVhpz2.js.map} +1 -1
  187. package/dist/client/chunks/{chartPlugin-BHp3WRCj.js → chartPlugin-QJVPr2DC.js} +12 -12
  188. package/dist/client/chunks/{chartPlugin-BHp3WRCj.js.map → chartPlugin-QJVPr2DC.js.map} +1 -1
  189. package/dist/client/chunks/{chartRegistry-Bmubf4iX.js → chartRegistry-C6U441qz.js} +10 -15
  190. package/dist/client/chunks/chartRegistry-C6U441qz.js.map +1 -0
  191. package/dist/client/chunks/{charts-core-CII8LhSd.js → charts-core-USDYqnlX.js} +2 -2
  192. package/dist/client/chunks/{charts-core-CII8LhSd.js.map → charts-core-USDYqnlX.js.map} +1 -1
  193. package/dist/client/chunks/{charts-loader-B6kvPaGV.js → charts-loader-i4Fe3mAw.js} +32 -32
  194. package/dist/client/chunks/{charts-loader-B6kvPaGV.js.map → charts-loader-i4Fe3mAw.js.map} +1 -1
  195. package/dist/client/chunks/{providers-jeBitA9w.js → providers-Bn1iccjx.js} +4 -4
  196. package/dist/client/chunks/{providers-jeBitA9w.js.map → providers-Bn1iccjx.js.map} +1 -1
  197. package/dist/client/chunks/{schema-visualization-D8DYZY2B.js → schema-visualization-D5HMwXPe.js} +5 -5
  198. package/dist/client/chunks/{schema-visualization-D8DYZY2B.js.map → schema-visualization-D5HMwXPe.js.map} +1 -1
  199. package/dist/client/chunks/{useCubeFieldLabel-CFIn-5yX.js → useCubeFieldLabel-CYdABa_m.js} +2 -2
  200. package/dist/client/chunks/{useCubeFieldLabel-CFIn-5yX.js.map → useCubeFieldLabel-CYdABa_m.js.map} +1 -1
  201. package/dist/client/chunks/{useCubeMetaQuery-CoYktIQn.js → useCubeMetaQuery-BQRQjE8r.js} +2 -2
  202. package/dist/client/chunks/{useCubeMetaQuery-CoYktIQn.js.map → useCubeMetaQuery-BQRQjE8r.js.map} +1 -1
  203. package/dist/client/chunks/{useDirtyStateTracking-BRiIxFzz.js → useDirtyStateTracking-DvlGcFpU.js} +2 -2
  204. package/dist/client/chunks/{useDirtyStateTracking-BRiIxFzz.js.map → useDirtyStateTracking-DvlGcFpU.js.map} +1 -1
  205. package/dist/client/chunks/{useExplainAI-Cxzacka-.js → useExplainAI-DGXJ0Rcg.js} +3 -3
  206. package/dist/client/chunks/{useExplainAI-Cxzacka-.js.map → useExplainAI-DGXJ0Rcg.js.map} +1 -1
  207. package/dist/client/chunks/{useTranslation-DiobqdOI.js → useTranslation-F7BGje95.js} +2 -2
  208. package/dist/client/chunks/{useTranslation-DiobqdOI.js.map → useTranslation-F7BGje95.js.map} +1 -1
  209. package/dist/client/components.js +4 -4
  210. package/dist/client/hooks.js +3 -3
  211. package/dist/client/icons.js +1 -1
  212. package/dist/client/index.js +11 -11
  213. package/dist/client/providers.js +1 -1
  214. package/dist/client/schema.js +1 -1
  215. package/dist/client-bundle-stats.html +1 -1
  216. package/dist/mcp-app/mcp-app.html +1 -1
  217. package/dist/server/index.cjs +1 -1
  218. package/dist/server/index.js +0 -5
  219. package/package.json +1 -1
  220. package/dist/adapters/ActivityGridChart.config-BSTVDQG3.js +0 -1
  221. package/dist/adapters/ActivityGridChart.config-D2oLDJki.cjs +0 -1
  222. package/dist/adapters/AreaChart.config-CaZVNqn-.cjs +0 -1
  223. package/dist/adapters/AreaChart.config-HUr9G5_c.js +0 -1
  224. package/dist/adapters/BarChart.config-BhYrmQ9W.js +0 -1
  225. package/dist/adapters/BarChart.config-BolWSYuN.cjs +0 -1
  226. package/dist/adapters/BoxPlotChart.config-DUxYeOWV.js +0 -1
  227. package/dist/adapters/BoxPlotChart.config-DxfUywRi.cjs +0 -1
  228. package/dist/adapters/BubbleChart.config-CNkdZMOF.cjs +0 -1
  229. package/dist/adapters/BubbleChart.config-DYtZIaKF.js +0 -1
  230. package/dist/adapters/CandlestickChart.config-C9ilaGM6.js +0 -1
  231. package/dist/adapters/CandlestickChart.config-CwOt677r.cjs +0 -1
  232. package/dist/adapters/DataTable.config-Br-X1vrT.js +0 -1
  233. package/dist/adapters/DataTable.config-BvuVZ9Jj.cjs +0 -1
  234. package/dist/adapters/DotStripChart.config-Beuh7di8.js +0 -1
  235. package/dist/adapters/DotStripChart.config-DViEbi8S.cjs +0 -1
  236. package/dist/adapters/FunnelChart.config-BnjD49Wp.js +0 -1
  237. package/dist/adapters/FunnelChart.config-DQob2fw6.cjs +0 -1
  238. package/dist/adapters/GaugeChart.config-4f1JNOsS.cjs +0 -1
  239. package/dist/adapters/GaugeChart.config-sHuMiR0R.js +0 -1
  240. package/dist/adapters/HeatMapChart.config-DGkFw6IU.js +0 -1
  241. package/dist/adapters/HeatMapChart.config-DUM2mA2Z.cjs +0 -1
  242. package/dist/adapters/KpiDelta.config-C3lTkG4L.js +0 -1
  243. package/dist/adapters/KpiDelta.config-KCvw480l.cjs +0 -1
  244. package/dist/adapters/KpiNumber.config-Bbt4Jk-l.cjs +0 -1
  245. package/dist/adapters/KpiNumber.config-DpVzsbkJ.js +0 -1
  246. package/dist/adapters/KpiText.config-B_wDkvrC.cjs +0 -1
  247. package/dist/adapters/KpiText.config-BpbC9fM8.js +0 -1
  248. package/dist/adapters/LineChart.config-C0JcDxH6.js +0 -1
  249. package/dist/adapters/LineChart.config-C2Xvxvxn.cjs +0 -1
  250. package/dist/adapters/MarkdownChart.config-5EolVJ3p.js +0 -1
  251. package/dist/adapters/MarkdownChart.config-YvMw-Ve_.cjs +0 -1
  252. package/dist/adapters/MeasureProfileChart.config-DYH3OLCF.cjs +0 -1
  253. package/dist/adapters/MeasureProfileChart.config-DxwRbnb1.js +0 -1
  254. package/dist/adapters/PieChart.config-DOkkTRV7.cjs +0 -1
  255. package/dist/adapters/PieChart.config-me-OCnBU.js +0 -1
  256. package/dist/adapters/ProportionBarChart.config--rJi1BjU.cjs +0 -1
  257. package/dist/adapters/ProportionBarChart.config-DAyp-gwk.js +0 -1
  258. package/dist/adapters/RadarChart.config-BA0Qep8F.cjs +0 -1
  259. package/dist/adapters/RadarChart.config-BMusTmHu.js +0 -1
  260. package/dist/adapters/RadialBarChart.config-CpN-rQQV.js +0 -1
  261. package/dist/adapters/RadialBarChart.config-CqKrOZ31.cjs +0 -1
  262. package/dist/adapters/RecordsTable.config-D1oll1Av.cjs +0 -1
  263. package/dist/adapters/RecordsTable.config-tQAxFn8Y.js +0 -1
  264. package/dist/adapters/RetentionCombinedChart.config-CfPPOzHw.js +0 -1
  265. package/dist/adapters/RetentionCombinedChart.config-DDX-9tjM.cjs +0 -1
  266. package/dist/adapters/RetentionHeatmap.config-DzmrQBgA.cjs +0 -1
  267. package/dist/adapters/RetentionHeatmap.config-sdYuBcId.js +0 -1
  268. package/dist/adapters/SankeyChart.config-BFkz9AUb.js +0 -1
  269. package/dist/adapters/SankeyChart.config-BKbMaV-d.cjs +0 -1
  270. package/dist/adapters/ScatterChart.config-D5tbnMBt.js +0 -1
  271. package/dist/adapters/ScatterChart.config-DlDcvEw6.cjs +0 -1
  272. package/dist/adapters/SunburstChart.config-Bb8nbyu6.cjs +0 -1
  273. package/dist/adapters/SunburstChart.config-CTRj2x0y.js +0 -1
  274. package/dist/adapters/TreeMapChart.config-DB99vBJS.cjs +0 -1
  275. package/dist/adapters/TreeMapChart.config-DviTwv0e.js +0 -1
  276. package/dist/adapters/WaterfallChart.config-CEOy3p3L.js +0 -1
  277. package/dist/adapters/WaterfallChart.config-DNBLGLpY.cjs +0 -1
  278. package/dist/client/chunks/chartRegistry-Bmubf4iX.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"charts-core-CII8LhSd.js","names":["useTranslation","formatNumericValue","ChartContainer","effectiveMinHeight","minHeight","containerRef","useRef","isReady","setIsReady","useState","containerSize","setContainerSize","sizeRef","readyRef","pendingSizeRef","frameRef","mounted","resizeObserver","flushPendingSize","pending","nextWidth","nextHeight","sizeChanged","shouldBecomeReady","startTransition","scheduleSizeUpdate","entry","entries","entryHeight","width","rect","measuredHeight","height","ResponsiveContainer","LoadingIndicator","containerStyle","error","t","defaultFormatter","value","name","ChartTooltip","Tooltip","formatter"],"sources":["../../../src/client/components/charts/ChartContainer.tsx","../../../src/client/components/charts/ChartTooltip.tsx"],"sourcesContent":["import { ReactElement, useState, useRef, useLayoutEffect, startTransition } from 'react'\nimport { ResponsiveContainer } from 'recharts'\nimport { useTranslation } from '../../hooks/useTranslation.js'\nimport LoadingIndicator from '../LoadingIndicator.js'\n\ninterface ChartContainerProps {\n children: ReactElement\n height?: string | number\n /**\n * Override the default minimum height. Charts that share their portlet with\n * another element - a wrapped summary header, say - need the plot to shrink\n * rather than push past the card.\n */\n minHeight?: string | number\n}\n\nexport default function ChartContainer({\n children,\n height = \"100%\",\n minHeight\n}: ChartContainerProps) {\n // The default floor keeps a lone chart from collapsing, but it also stops the\n // plot shrinking when something else shares the portlet (e.g. a summary\n // header that has wrapped). Callers in that position pass a smaller floor.\n const effectiveMinHeight = minHeight ?? undefined\n const { t } = useTranslation()\n // Track if container is ready to render ResponsiveContainer\n // We need to wait for the container to be in the DOM with valid dimensions\n const containerRef = useRef<HTMLDivElement>(null)\n const [isReady, setIsReady] = useState(false)\n const [containerSize, setContainerSize] = useState({ width: 0, height: 0 })\n const sizeRef = useRef({ width: 0, height: 0 })\n const readyRef = useRef(false)\n const pendingSizeRef = useRef<{ width: number; height: number } | null>(null)\n const frameRef = useRef<number | null>(null)\n\n // Use useLayoutEffect to measure before paint\n useLayoutEffect(() => {\n let mounted = true\n let resizeObserver: ResizeObserver | null = null\n\n const flushPendingSize = () => {\n frameRef.current = null\n if (!mounted) return\n const pending = pendingSizeRef.current\n pendingSizeRef.current = null\n if (!pending) return\n\n const nextWidth = Math.round(pending.width)\n const nextHeight = Math.round(pending.height)\n if (nextWidth <= 0 || nextHeight <= 0) return\n\n const sizeChanged =\n sizeRef.current.width !== nextWidth || sizeRef.current.height !== nextHeight\n const shouldBecomeReady = !readyRef.current\n\n if (!sizeChanged && !shouldBecomeReady) return\n\n sizeRef.current = { width: nextWidth, height: nextHeight }\n readyRef.current = true\n\n // Resize-driven chart updates can come in bursts (one per portlet).\n // Transitioning these avoids blocking urgent input and coalesces visual work.\n startTransition(() => {\n if (sizeChanged) {\n setContainerSize({ width: nextWidth, height: nextHeight })\n }\n if (shouldBecomeReady) {\n setIsReady(true)\n }\n })\n }\n\n const scheduleSizeUpdate = (width: number, height: number) => {\n pendingSizeRef.current = { width, height }\n if (frameRef.current === null) {\n frameRef.current = requestAnimationFrame(flushPendingSize)\n }\n }\n\n const measureAndSetReady = () => {\n if (!mounted || !containerRef.current) return\n\n const rect = containerRef.current.getBoundingClientRect()\n // Check both clientWidth/Height AND getBoundingClientRect for robustness\n const width = Math.max(containerRef.current.clientWidth, rect.width)\n const measuredHeight = Math.max(containerRef.current.clientHeight, rect.height)\n\n if (width > 0 && measuredHeight > 0) {\n scheduleSizeUpdate(width, measuredHeight)\n }\n }\n\n // Set up ResizeObserver to detect when container gets valid dimensions\n resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { width, height: entryHeight } = entry.contentRect\n if (width > 0 && entryHeight > 0) {\n scheduleSizeUpdate(width, entryHeight)\n }\n }\n })\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current)\n // Also try immediate measurement\n measureAndSetReady()\n }\n\n return () => {\n mounted = false\n if (frameRef.current !== null) {\n cancelAnimationFrame(frameRef.current)\n frameRef.current = null\n }\n resizeObserver?.disconnect()\n }\n }, [])\n\n try {\n if (height === \"100%\") {\n // For 100% height, make the container fill the available flex space with proper sizing\n // user-select: none prevents browser selection box from appearing when clicking/dragging on charts\n return (\n <div\n ref={containerRef}\n className=\"dc:w-full dc:h-full dc:flex-1 dc:flex dc:flex-col dc:relative\"\n style={{ minHeight: effectiveMinHeight ?? '250px', minWidth: '100px', overflow: 'hidden', userSelect: 'none' }}\n >\n {isReady && containerSize.width > 0 && containerSize.height > 0 ? (\n <ResponsiveContainer\n width={containerSize.width}\n height={containerSize.height - 16}\n debounce={100}\n style={{ marginTop: '16px' }}\n >\n {children}\n </ResponsiveContainer>\n ) : (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full dc:h-full\">\n <LoadingIndicator size=\"sm\" />\n </div>\n )}\n </div>\n )\n }\n\n // For specific heights, use them directly\n // user-select: none prevents browser selection box from appearing when clicking/dragging on charts\n const containerStyle = {\n height: typeof height === 'number' ? `${height}px` : height,\n width: '100%',\n minHeight: effectiveMinHeight ?? '200px',\n minWidth: '100px',\n userSelect: 'none' as const\n }\n\n return (\n <div\n ref={containerRef}\n className=\"dc:w-full dc:flex dc:flex-col dc:relative\"\n style={{ ...containerStyle, overflow: 'hidden' }}\n >\n {isReady && containerSize.width > 0 && containerSize.height > 0 ? (\n <ResponsiveContainer\n width={containerSize.width}\n height={containerSize.height - 16}\n debounce={100}\n style={{ marginTop: '16px' }}\n >\n {children}\n </ResponsiveContainer>\n ) : (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full dc:h-full\">\n <LoadingIndicator size=\"sm\" />\n </div>\n )}\n </div>\n )\n } catch (error) {\n // ChartContainer ResponsiveContainer error\n\n return (\n <div\n className=\"dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full dc:h-full dc:p-4 dc:text-center dc:border dc:border-dashed dc:rounded-lg\"\n style={{ height, borderColor: 'var(--dc-border)', backgroundColor: 'var(--dc-surface)' }}\n >\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1 text-dc-text-muted\">{t('chart.runtime.unableToDisplay')}</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">\n {error instanceof Error ? error.message : 'Failed to create responsive container'}\n </div>\n </div>\n )\n }\n}\n","import React from 'react'\nimport { Tooltip } from 'recharts'\nimport { formatNumericValue } from '../../utils/chartUtils.js'\n\ninterface ChartTooltipProps {\n formatter?: (value: any, name: any, props: any) => [React.ReactNode, React.ReactNode]\n labelFormatter?: (label: any, payload?: readonly any[]) => React.ReactNode\n}\n\n// Default formatter that rounds numeric values to at most 2 decimal places\nconst defaultFormatter = (value: any, name: any): [React.ReactNode, React.ReactNode] => {\n if (value === null || value === undefined) {\n return ['No data', name]\n }\n return [formatNumericValue(value), name]\n}\n\nexport default function ChartTooltip({ formatter, labelFormatter }: ChartTooltipProps) {\n return (\n <Tooltip\n formatter={formatter || defaultFormatter}\n labelFormatter={labelFormatter}\n contentStyle={{\n backgroundColor: 'white',\n border: '1px solid #e5e7eb',\n borderRadius: '0.5rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\n padding: '8px 12px'\n }}\n />\n )\n}"],"mappings":";;;;;;;AAgBA,SAAwBE,EAAe,EACrC,aACA,YAAS,QACT,gBACsB;CAItB,IAAMC,IAAqBC,KAAa,KAAA,GAClC,EAAE,SAAMJ,EAAe,GAGvBK,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAASC,KAAcC,EAAS,EAAK,GACtC,CAACC,GAAeC,KAAoBF,EAAS;EAAE,OAAO;EAAG,QAAQ;CAAE,CAAC,GACpEG,IAAUN,EAAO;EAAE,OAAO;EAAG,QAAQ;CAAE,CAAC,GACxCO,IAAWP,EAAO,EAAK,GACvBQ,IAAiBR,EAAiD,IAAI,GACtES,IAAWT,EAAsB,IAAI;CAG3C,QAAsB;EACpB,IAAIU,IAAU,IACVC,IAAwC,MAEtCC,UAAyB;GAE7B,IADA,EAAS,UAAU,MACf,CAACF,GAAS;GACd,IAAMG,IAAUL,EAAe;GAE/B,IADA,EAAe,UAAU,MACrB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;IACZ,UAAAD,aAAiB,QAAQA,EAAM,UAAU;GACvC,CAAA,CACF;;CAET;AACF;;;ACxLA,IAAME,KAAoB,GAAY,MAChCC,KAAU,OACL,CAAC,WAAWC,CAAI,IAElB,CAACvC,EAAmBsC,CAAK,GAAGC,CAAI;AAGzC,SAAwBC,EAAa,EAAE,cAAW,qBAAqC;CACrF,OACE,kBAACC,GAAD;EACE,WAAWC,KAAaL;EACR;EAChB,cAAc;GACZ,iBAAiB;GACjB,QAAQ;GACR,cAAc;GACd,UAAU;GACV,OAAO;GACP,WAAW;GACX,SAAS;EACX;CACD,CAAA;AAEL"}
1
+ {"version":3,"file":"charts-core-USDYqnlX.js","names":["useTranslation","formatNumericValue","ChartContainer","effectiveMinHeight","minHeight","containerRef","useRef","isReady","setIsReady","useState","containerSize","setContainerSize","sizeRef","readyRef","pendingSizeRef","frameRef","mounted","resizeObserver","flushPendingSize","pending","nextWidth","nextHeight","sizeChanged","shouldBecomeReady","startTransition","scheduleSizeUpdate","entry","entries","entryHeight","width","rect","measuredHeight","height","ResponsiveContainer","LoadingIndicator","containerStyle","error","t","defaultFormatter","value","name","ChartTooltip","Tooltip","formatter"],"sources":["../../../src/client/components/charts/ChartContainer.tsx","../../../src/client/components/charts/ChartTooltip.tsx"],"sourcesContent":["import { ReactElement, useState, useRef, useLayoutEffect, startTransition } from 'react'\nimport { ResponsiveContainer } from 'recharts'\nimport { useTranslation } from '../../hooks/useTranslation.js'\nimport LoadingIndicator from '../LoadingIndicator.js'\n\ninterface ChartContainerProps {\n children: ReactElement\n height?: string | number\n /**\n * Override the default minimum height. Charts that share their portlet with\n * another element - a wrapped summary header, say - need the plot to shrink\n * rather than push past the card.\n */\n minHeight?: string | number\n}\n\nexport default function ChartContainer({\n children,\n height = \"100%\",\n minHeight\n}: ChartContainerProps) {\n // The default floor keeps a lone chart from collapsing, but it also stops the\n // plot shrinking when something else shares the portlet (e.g. a summary\n // header that has wrapped). Callers in that position pass a smaller floor.\n const effectiveMinHeight = minHeight ?? undefined\n const { t } = useTranslation()\n // Track if container is ready to render ResponsiveContainer\n // We need to wait for the container to be in the DOM with valid dimensions\n const containerRef = useRef<HTMLDivElement>(null)\n const [isReady, setIsReady] = useState(false)\n const [containerSize, setContainerSize] = useState({ width: 0, height: 0 })\n const sizeRef = useRef({ width: 0, height: 0 })\n const readyRef = useRef(false)\n const pendingSizeRef = useRef<{ width: number; height: number } | null>(null)\n const frameRef = useRef<number | null>(null)\n\n // Use useLayoutEffect to measure before paint\n useLayoutEffect(() => {\n let mounted = true\n let resizeObserver: ResizeObserver | null = null\n\n const flushPendingSize = () => {\n frameRef.current = null\n if (!mounted) return\n const pending = pendingSizeRef.current\n pendingSizeRef.current = null\n if (!pending) return\n\n const nextWidth = Math.round(pending.width)\n const nextHeight = Math.round(pending.height)\n if (nextWidth <= 0 || nextHeight <= 0) return\n\n const sizeChanged =\n sizeRef.current.width !== nextWidth || sizeRef.current.height !== nextHeight\n const shouldBecomeReady = !readyRef.current\n\n if (!sizeChanged && !shouldBecomeReady) return\n\n sizeRef.current = { width: nextWidth, height: nextHeight }\n readyRef.current = true\n\n // Resize-driven chart updates can come in bursts (one per portlet).\n // Transitioning these avoids blocking urgent input and coalesces visual work.\n startTransition(() => {\n if (sizeChanged) {\n setContainerSize({ width: nextWidth, height: nextHeight })\n }\n if (shouldBecomeReady) {\n setIsReady(true)\n }\n })\n }\n\n const scheduleSizeUpdate = (width: number, height: number) => {\n pendingSizeRef.current = { width, height }\n if (frameRef.current === null) {\n frameRef.current = requestAnimationFrame(flushPendingSize)\n }\n }\n\n const measureAndSetReady = () => {\n if (!mounted || !containerRef.current) return\n\n const rect = containerRef.current.getBoundingClientRect()\n // Check both clientWidth/Height AND getBoundingClientRect for robustness\n const width = Math.max(containerRef.current.clientWidth, rect.width)\n const measuredHeight = Math.max(containerRef.current.clientHeight, rect.height)\n\n if (width > 0 && measuredHeight > 0) {\n scheduleSizeUpdate(width, measuredHeight)\n }\n }\n\n // Set up ResizeObserver to detect when container gets valid dimensions\n resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { width, height: entryHeight } = entry.contentRect\n if (width > 0 && entryHeight > 0) {\n scheduleSizeUpdate(width, entryHeight)\n }\n }\n })\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current)\n // Also try immediate measurement\n measureAndSetReady()\n }\n\n return () => {\n mounted = false\n if (frameRef.current !== null) {\n cancelAnimationFrame(frameRef.current)\n frameRef.current = null\n }\n resizeObserver?.disconnect()\n }\n }, [])\n\n try {\n if (height === \"100%\") {\n // For 100% height, make the container fill the available flex space with proper sizing\n // user-select: none prevents browser selection box from appearing when clicking/dragging on charts\n return (\n <div\n ref={containerRef}\n className=\"dc:w-full dc:h-full dc:flex-1 dc:flex dc:flex-col dc:relative\"\n style={{ minHeight: effectiveMinHeight ?? '250px', minWidth: '100px', overflow: 'hidden', userSelect: 'none' }}\n >\n {isReady && containerSize.width > 0 && containerSize.height > 0 ? (\n <ResponsiveContainer\n width={containerSize.width}\n height={containerSize.height - 16}\n debounce={100}\n style={{ marginTop: '16px' }}\n >\n {children}\n </ResponsiveContainer>\n ) : (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full dc:h-full\">\n <LoadingIndicator size=\"sm\" />\n </div>\n )}\n </div>\n )\n }\n\n // For specific heights, use them directly\n // user-select: none prevents browser selection box from appearing when clicking/dragging on charts\n const containerStyle = {\n height: typeof height === 'number' ? `${height}px` : height,\n width: '100%',\n minHeight: effectiveMinHeight ?? '200px',\n minWidth: '100px',\n userSelect: 'none' as const\n }\n\n return (\n <div\n ref={containerRef}\n className=\"dc:w-full dc:flex dc:flex-col dc:relative\"\n style={{ ...containerStyle, overflow: 'hidden' }}\n >\n {isReady && containerSize.width > 0 && containerSize.height > 0 ? (\n <ResponsiveContainer\n width={containerSize.width}\n height={containerSize.height - 16}\n debounce={100}\n style={{ marginTop: '16px' }}\n >\n {children}\n </ResponsiveContainer>\n ) : (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full dc:h-full\">\n <LoadingIndicator size=\"sm\" />\n </div>\n )}\n </div>\n )\n } catch (error) {\n // ChartContainer ResponsiveContainer error\n\n return (\n <div\n className=\"dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full dc:h-full dc:p-4 dc:text-center dc:border dc:border-dashed dc:rounded-lg\"\n style={{ height, borderColor: 'var(--dc-border)', backgroundColor: 'var(--dc-surface)' }}\n >\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1 text-dc-text-muted\">{t('chart.runtime.unableToDisplay')}</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">\n {error instanceof Error ? error.message : 'Failed to create responsive container'}\n </div>\n </div>\n )\n }\n}\n","import React from 'react'\nimport { Tooltip } from 'recharts'\nimport { formatNumericValue } from '../../utils/chartUtils.js'\n\ninterface ChartTooltipProps {\n formatter?: (value: any, name: any, props: any) => [React.ReactNode, React.ReactNode]\n labelFormatter?: (label: any, payload?: readonly any[]) => React.ReactNode\n}\n\n// Default formatter that rounds numeric values to at most 2 decimal places\nconst defaultFormatter = (value: any, name: any): [React.ReactNode, React.ReactNode] => {\n if (value === null || value === undefined) {\n return ['No data', name]\n }\n return [formatNumericValue(value), name]\n}\n\nexport default function ChartTooltip({ formatter, labelFormatter }: ChartTooltipProps) {\n return (\n <Tooltip\n formatter={formatter || defaultFormatter}\n labelFormatter={labelFormatter}\n contentStyle={{\n backgroundColor: 'white',\n border: '1px solid #e5e7eb',\n borderRadius: '0.5rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\n padding: '8px 12px'\n }}\n />\n )\n}"],"mappings":";;;;;;;AAgBA,SAAwBE,EAAe,EACrC,aACA,YAAS,QACT,gBACsB;CAItB,IAAMC,IAAqBC,KAAa,KAAA,GAClC,EAAE,SAAMJ,EAAe,GAGvBK,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAASC,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AC/B,UAAU;IACV,OAAO,EAAE,WAAW,OAAO;IAE1B;GACkB,CAAA,IAErB,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAACwB,GAAD,EAAkB,MAAK,KAAM,CAAA;GAC1B,CAAA;EAEJ,CAAA;CAET,SAASE,GAAO;EAGd,OACE,kBAAC,OAAD;GACE,WAAU;GACV,OAAO;IAAE;IAAQ,aAAa;IAAoB,iBAAiB;GAAoB;GAFzF,UAAA,CAIE,kBAAC,OAAD;IAAK,WAAU;IAA0D,UAAAC,EAAE,+BAA+B;GAAO,CAAA,GACjH,kBAAC,OAAD;IAAK,WAAU;IACZ,UAAAD,aAAiB,QAAQA,EAAM,UAAU;GACvC,CAAA,CACF;;CAET;AACF;;;ACxLA,IAAME,KAAoB,GAAY,MAChCC,KAAU,OACL,CAAC,WAAWC,CAAI,IAElB,CAACvC,EAAmBsC,CAAK,GAAGC,CAAI;AAGzC,SAAwBC,EAAa,EAAE,cAAW,qBAAqC;CACrF,OACE,kBAACC,GAAD;EACE,WAAWC,KAAaL;EACR;EAChB,cAAc;GACZ,iBAAiB;GACjB,QAAQ;GACR,cAAc;GACd,UAAU;GACV,OAAO;GACP,WAAW;GACX,SAAS;EACX;CACD,CAAA;AAEL"}
@@ -1,5 +1,5 @@
1
- import { a as e, i as t, n, r, t as i } from "./chartComponentRegistry-D5I9EH9T.js";
2
- import { t as a } from "./useTranslation-DiobqdOI.js";
1
+ import { a as e, i as t, n, r, t as i } from "./chartComponentRegistry-lrQVhpz2.js";
2
+ import { t as a } from "./useTranslation-F7BGje95.js";
3
3
  import { Suspense as o, lazy as s } from "react";
4
4
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
5
  //#region src/client/components/charts/MissingDependencyFallback.tsx
@@ -80,35 +80,35 @@ function u({ chartType: e, packageName: t, installCommand: n, height: r = 200 })
80
80
  //#endregion
81
81
  //#region src/client/charts/ChartLoader.tsx
82
82
  var d = {
83
- bar: () => import("./chart-bar-Cm5gacSp.js").then((e) => e.n),
84
- line: () => import("./chart-line-B2R3wnGP.js").then((e) => e.n),
85
- area: () => import("./chart-area-D93yaXt_.js").then((e) => e.n),
86
- pie: () => import("./chart-pie-CsO68YHG.js").then((e) => e.n),
87
- scatter: () => import("./chart-scatter-Btk1kofc.js").then((e) => e.n),
88
- radar: () => import("./chart-radar-C17iNC8c.js").then((e) => e.n),
89
- radialBar: () => import("./chart-radial-bar-ftFfZ-ob.js").then((e) => e.n),
90
- treemap: () => import("./chart-tree-map-DL_NEnww.js").then((e) => e.n),
91
- bubble: () => import("./BubbleChart-Va-bRr3Y.js"),
92
- table: () => import("./chart-data-table-LvjMZByO.js").then((e) => e.n),
93
- recordsTable: () => import("./RecordsTable-DURm8ypj.js"),
94
- activityGrid: () => import("./ActivityGridChart-BpA0H20k.js"),
95
- kpiNumber: () => import("./chart-kpi-number-D_NrcF-S.js").then((e) => e.t),
96
- kpiDelta: () => import("./KpiDelta-CUqF9vVH.js"),
97
- kpiText: () => import("./KpiText-Dply9kb4.js"),
98
- markdown: () => import("./MarkdownChart-BlL5h7nK.js"),
99
- funnel: () => import("./chart-funnel-B_YO8r5g.js").then((e) => e.n),
100
- sankey: () => import("./chart-sankey-BUSpiTBN.js").then((e) => e.t),
101
- sunburst: () => import("./chart-sunburst-BoaobkAb.js").then((e) => e.t),
102
- heatmap: () => import("./HeatMapChart-DqOZawm3.js"),
103
- retentionHeatmap: () => import("./RetentionHeatmap-ChwWtk6j.js"),
104
- retentionCombined: () => import("./RetentionCombinedChart-90MBVuS7.js"),
105
- boxPlot: () => import("./chart-box-plot-XWfiRDvb.js").then((e) => e.t),
106
- dotStrip: () => import("./DotStripChart-D6o5DpPf.js"),
107
- waterfall: () => import("./chart-waterfall-FXv1uwLV.js").then((e) => e.t),
108
- candlestick: () => import("./chart-candlestick-DkjqHZaS.js").then((e) => e.t),
109
- measureProfile: () => import("./chart-measure-profile-CYli1HVY.js").then((e) => e.t),
110
- proportionBar: () => import("./ProportionBarChart-CK0FlfTr.js"),
111
- gauge: () => import("./chart-gauge-BbcdeJ5v.js").then((e) => e.t)
83
+ bar: () => import("./chart-bar-BKTQ6zyq.js").then((e) => e.n),
84
+ line: () => import("./chart-line-EzYdBDdL.js").then((e) => e.n),
85
+ area: () => import("./chart-area-BgKyGty4.js").then((e) => e.n),
86
+ pie: () => import("./chart-pie-Dw3W8Qjg.js").then((e) => e.n),
87
+ scatter: () => import("./chart-scatter-D7mMgM6E.js").then((e) => e.n),
88
+ radar: () => import("./chart-radar-BhySlY7t.js").then((e) => e.n),
89
+ radialBar: () => import("./chart-radial-bar-DXc37T3I.js").then((e) => e.n),
90
+ treemap: () => import("./chart-tree-map-C0EZEE0y.js").then((e) => e.n),
91
+ bubble: () => import("./BubbleChart-DiloeKCW.js"),
92
+ table: () => import("./chart-data-table-DLwFKymv.js").then((e) => e.n),
93
+ recordsTable: () => import("./RecordsTable-DRovI83Z.js"),
94
+ activityGrid: () => import("./ActivityGridChart-CmboSrmc.js"),
95
+ kpiNumber: () => import("./chart-kpi-number-CuYpI5LO.js").then((e) => e.t),
96
+ kpiDelta: () => import("./KpiDelta-1BfMFygT.js"),
97
+ kpiText: () => import("./KpiText-DzPeryRS.js"),
98
+ markdown: () => import("./MarkdownChart-_aif5Ye3.js"),
99
+ funnel: () => import("./chart-funnel-BirEW77o.js").then((e) => e.n),
100
+ sankey: () => import("./chart-sankey-Xi0rQvx-.js").then((e) => e.t),
101
+ sunburst: () => import("./chart-sunburst-t3Qb3HI7.js").then((e) => e.t),
102
+ heatmap: () => import("./HeatMapChart-B9pj-KQi.js"),
103
+ retentionHeatmap: () => import("./RetentionHeatmap-CVEmxbg9.js"),
104
+ retentionCombined: () => import("./RetentionCombinedChart-D_vAvtIb.js"),
105
+ boxPlot: () => import("./chart-box-plot-FD8d8S_Y.js").then((e) => e.t),
106
+ dotStrip: () => import("./DotStripChart-HcSCkYDs.js"),
107
+ waterfall: () => import("./chart-waterfall-C4rt-_iE.js").then((e) => e.t),
108
+ candlestick: () => import("./chart-candlestick-DeDZSkhF.js").then((e) => e.t),
109
+ measureProfile: () => import("./chart-measure-profile-DaL9c2jy.js").then((e) => e.t),
110
+ proportionBar: () => import("./ProportionBarChart-B9Rgyhbc.js"),
111
+ gauge: () => import("./chart-gauge-C4yS5138.js").then((e) => e.t)
112
112
  };
113
113
  function f(e) {
114
114
  let a = t.get(e);
@@ -161,4 +161,4 @@ function b() {
161
161
  //#endregion
162
162
  export { p as a, u as c, y as i, v as n, g as o, b as r, _ as s, h as t };
163
163
 
164
- //# sourceMappingURL=charts-loader-B6kvPaGV.js.map
164
+ //# sourceMappingURL=charts-loader-i4Fe3mAw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"charts-loader-B6kvPaGV.js","names":["failedChartTypes","customChartMap","chartLoaderCache","useTranslation","MissingDependencyFallback","height","t","installCommand","chartImportMap","n","getLazyChart","customChart","chartType","importFn","safeImport","createSafeImport","lazy","createUnknownChartFallback","isValidChartType","DefaultChartFallback","LazyChart","chartProps","ChartComponent","Suspense","fallback","preloadChart","preloadCharts","getAvailableChartTypes","builtIn","custom","isChartTypeAvailable","getUnavailableChartTypes"],"sources":["../../../src/client/components/charts/MissingDependencyFallback.tsx","../../../src/client/charts/ChartLoader.tsx"],"sourcesContent":["import { useTranslation } from '../../hooks/useTranslation.js'\n\ninterface MissingDependencyFallbackProps {\n chartType: string\n packageName: string\n installCommand: string\n height?: string | number\n}\n\n/**\n * Fallback component shown when a chart's optional dependency is not installed.\n * Provides clear instructions on how to install the missing package.\n */\nexport function MissingDependencyFallback({\n chartType,\n packageName,\n installCommand,\n height = 200\n}: MissingDependencyFallbackProps) {\n const { t } = useTranslation()\n return (\n <div\n className=\"dc-missing-dependency-fallback\"\n style={{\n height: typeof height === 'number' ? `${height}px` : height,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n padding: '1.5rem',\n textAlign: 'center',\n border: '1px dashed var(--dc-border, #e5e7eb)',\n borderRadius: '0.5rem',\n backgroundColor: 'var(--dc-surface, #f9fafb)'\n }}\n >\n <div style={{ fontSize: '2.5rem', marginBottom: '1rem' }}>📦</div>\n <h3 style={{\n fontSize: '1.125rem',\n fontWeight: 600,\n marginBottom: '0.5rem',\n color: 'var(--dc-text, #111827)'\n }}>\n {t('chart.runtime.missingDep.title')}\n </h3>\n <p style={{\n fontSize: '0.875rem',\n color: 'var(--dc-text-secondary, #6b7280)',\n marginBottom: '1rem',\n maxWidth: '28rem'\n }}>\n {t('chart.runtime.missingDep.description', { chartType, packageName })}\n </p>\n <div style={{\n backgroundColor: 'var(--dc-surface-secondary, #f3f4f6)',\n borderRadius: '0.5rem',\n padding: '0.75rem 1rem',\n fontFamily: 'monospace',\n fontSize: '0.875rem',\n color: 'var(--dc-text, #111827)'\n }}>\n <span style={{\n color: 'var(--dc-text-muted, #9ca3af)',\n userSelect: 'none'\n }}>$ </span>\n {installCommand}\n </div>\n <p style={{\n fontSize: '0.75rem',\n color: 'var(--dc-text-muted, #9ca3af)',\n marginTop: '0.75rem'\n }}>\n {t('chart.runtime.missingDep.restartHint')}\n </p>\n </div>\n )\n}\n","/**\n * Lazy Chart Loader\n *\n * Provides React.lazy-based dynamic loading for chart components.\n * This enables code splitting - each chart type loads only when needed.\n *\n * Handles missing optional dependencies gracefully by showing a fallback\n * component instead of crashing the application.\n */\n\nimport { lazy, Suspense, ReactNode, LazyExoticComponent } from 'react'\nimport type { BuiltInChartType, ChartType, ChartProps } from '../types.js'\nimport {\n type LazyChartComponent,\n chartLoaderCache,\n failedChartTypes,\n customChartMap,\n createSafeImport,\n createUnknownChartFallback\n} from './chartComponentRegistry.js'\n// Dynamic import functions for built-in chart **components** (the DOM-bearing,\n// client-only side of a chart). This stays separate from `chartRegistry` — which\n// is DOM-free and shared with the server — so importing the unified registry\n// never drags the chart component graph into server/agent code. Lazy loading is\n// a client-only optimisation.\n\n// The custom-chart registration API lives in chartComponentRegistry to avoid an\n// import cycle (chartPlugin → ChartLoader → DataTable → CubeProvider → chartPlugin).\n// Re-exported here so existing import paths keep working.\nexport { registerChartComponent, unregisterChartComponent } from './chartComponentRegistry.js'\n\n// Dynamic import functions for built-in chart **components** — the DOM-bearing,\n// client-only side of a chart. Kept separate from the unified `chartRegistry`\n// (which is DOM-free and shared with the server agent) so importing the registry\n// never drags the chart component graph into server/MCP/agent code. Lazy loading\n// is a client-only optimisation.\nconst chartImportMap: Record<BuiltInChartType, () => Promise<{ default: LazyChartComponent }>> = {\n bar: () => import('../components/charts/BarChart.js'),\n line: () => import('../components/charts/LineChart.js'),\n area: () => import('../components/charts/AreaChart.js'),\n pie: () => import('../components/charts/PieChart.js'),\n scatter: () => import('../components/charts/ScatterChart.js'),\n radar: () => import('../components/charts/RadarChart.js'),\n radialBar: () => import('../components/charts/RadialBarChart.js'),\n treemap: () => import('../components/charts/TreeMapChart.js'),\n bubble: () => import('../components/charts/BubbleChart.js'),\n table: () => import('../components/charts/DataTable.js'),\n recordsTable: () => import('../components/charts/RecordsTable.js'),\n activityGrid: () => import('../components/charts/ActivityGridChart.js'),\n kpiNumber: () => import('../components/charts/KpiNumber.js'),\n kpiDelta: () => import('../components/charts/KpiDelta.js'),\n kpiText: () => import('../components/charts/KpiText.js'),\n markdown: () => import('../components/charts/MarkdownChart.js'),\n funnel: () => import('../components/charts/FunnelChart.js'),\n sankey: () => import('../components/charts/SankeyChart.js'),\n sunburst: () => import('../components/charts/SunburstChart.js'),\n heatmap: () => import('../components/charts/HeatMapChart.js'),\n retentionHeatmap: () => import('../components/charts/RetentionHeatmap.js'),\n retentionCombined: () => import('../components/charts/RetentionCombinedChart.js'),\n boxPlot: () => import('../components/charts/BoxPlotChart.js'),\n dotStrip: () => import('../components/charts/DotStripChart.js'),\n waterfall: () => import('../components/charts/WaterfallChart.js'),\n candlestick: () => import('../components/charts/CandlestickChart.js'),\n measureProfile: () => import('../components/charts/MeasureProfileChart.js'),\n proportionBar: () => import('../components/charts/ProportionBarChart.js'),\n gauge: () => import('../components/charts/GaugeChart.js'),\n}\n\n/**\n * Get or create a lazy component for a chart type.\n * Checks custom (plugin) charts first, then built-in charts.\n * Returns an unknown chart fallback for unregistered types instead of throwing.\n */\nfunction getLazyChart(chartType: ChartType): LazyExoticComponent<LazyChartComponent> {\n // 1. Check custom charts first (allows overriding built-ins)\n const customChart = customChartMap.get(chartType)\n if (customChart) {\n return customChart\n }\n\n // 2. Check built-in cache\n if (chartLoaderCache.has(chartType)) {\n return chartLoaderCache.get(chartType)!\n }\n\n // 3. Check built-in import map (the client component registry)\n const importFn = chartImportMap[chartType as BuiltInChartType]\n if (importFn) {\n const safeImport = createSafeImport(chartType, importFn)\n chartLoaderCache.set(chartType, lazy(safeImport))\n return chartLoaderCache.get(chartType)!\n }\n\n // 4. Unknown chart type — return graceful fallback\n return lazy(() => Promise.resolve({ default: createUnknownChartFallback(chartType) }))\n}\n\n/**\n * Check if a chart type is supported (built-in or custom plugin)\n */\nexport function isValidChartType(chartType: string): chartType is ChartType {\n return chartType in chartImportMap || customChartMap.has(chartType)\n}\n\n// Props for the LazyChart wrapper\nexport interface LazyChartProps extends ChartProps {\n chartType: ChartType\n fallback?: ReactNode\n}\n\n/**\n * Default loading placeholder for charts\n */\nfunction DefaultChartFallback({ height }: { height?: string | number }) {\n return (\n <div\n className=\"dc:flex dc:items-center dc:justify-center dc:w-full\"\n style={{ height: typeof height === 'number' ? `${height}px` : height || '200px' }}\n >\n <div className=\"dc:animate-pulse bg-dc-surface-secondary dc:rounded-sm dc:w-full dc:h-full dc:min-h-[100px]\" />\n </div>\n )\n}\n\n/**\n * Lazy Chart Component\n *\n * Renders a chart component with React.lazy dynamic loading.\n * The chart type determines which chart component is loaded.\n *\n * @example\n * ```tsx\n * <LazyChart\n * chartType=\"bar\"\n * data={chartData}\n * chartConfig={{ yAxis: ['value'] }}\n * height={300}\n * />\n * ```\n */\nexport function LazyChart({\n chartType,\n fallback,\n height,\n ...chartProps\n}: LazyChartProps) {\n const ChartComponent = getLazyChart(chartType)\n\n return (\n <Suspense fallback={fallback ?? <DefaultChartFallback height={height} />}>\n <ChartComponent height={height} {...chartProps} />\n </Suspense>\n )\n}\n\n/**\n * Preload a chart type\n *\n * Triggers the dynamic import without rendering.\n * Useful for prefetching charts that will likely be needed.\n *\n * @example\n * ```tsx\n * // Preload bar chart on hover\n * onMouseEnter={() => preloadChart('bar')}\n * ```\n */\nexport function preloadChart(chartType: ChartType): void {\n const importFn = chartImportMap[chartType as BuiltInChartType]\n if (importFn) {\n importFn()\n }\n}\n\n/**\n * Preload multiple chart types\n *\n * @example\n * ```tsx\n * // Preload common charts on app init\n * useEffect(() => {\n * preloadCharts(['bar', 'line', 'pie'])\n * }, [])\n * ```\n */\nexport function preloadCharts(chartTypes: ChartType[]): void {\n chartTypes.forEach(preloadChart)\n}\n\n/**\n * Get all available chart types (built-in + custom plugins)\n */\nexport function getAvailableChartTypes(): ChartType[] {\n const builtIn = Object.keys(chartImportMap) as ChartType[]\n const custom = Array.from(customChartMap.keys())\n // Deduplicate in case a custom chart overrides a built-in\n return [...new Set([...builtIn, ...custom])]\n}\n\n/**\n * Check if a chart type has loaded successfully.\n * Returns false if the chart failed to load due to missing dependencies.\n *\n * Note: This only returns accurate results after the chart has been attempted to load.\n * Use this for conditional UI logic (e.g., hiding unavailable chart types).\n */\nexport function isChartTypeAvailable(chartType: ChartType): boolean {\n return !failedChartTypes.has(chartType)\n}\n\n/**\n * Get list of chart types that failed to load due to missing dependencies.\n */\nexport function getUnavailableChartTypes(): ChartType[] {\n return Array.from(failedChartTypes)\n}\n"],"mappings":";;;;;AAaA,SAAgBI,EAA0B,EACxC,cACA,gBACA,mBACA,YAAS,OACwB;CACjC,IAAM,EAAE,SAAMD,EAAe;CAC7B,OACE,kBAAC,OAAD;EACE,WAAU;EACV,OAAO;GACL,QAAQ,OAAOE,KAAW,WAAW,GAAGA,EAAO,MAAMA;GACrD,SAAS;GACT,eAAe;GACf,YAAY;GACZ,gBAAgB;GAChB,OAAO;GACP,SAAS;GACT,W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iB,GAA2C;CAC1E,OAAON,KAAaJ,KAAkBP,EAAe,IAAIW,CAAS;AACpE;AAWA,SAASO,EAAqB,EAAE,aAAwC;CACtE,OACE,kBAAC,OAAD;EACE,WAAU;EACV,OAAO,EAAE,QAAQ,OAAOd,KAAW,WAAW,GAAGA,EAAO,MAAMA,KAAU,QAAQ;EAEhF,UAAA,kBAAC,OAAD,EAAK,WAAU,8FAA+F,CAAA;CAC3G,CAAA;AAET;AAkBA,SAAgBe,EAAU,EACxB,cACA,aACA,WACA,GAAGC,KACc;CACjB,IAAMC,IAAiBZ,EAAaE,CAAS;CAE7C,OACE,kBAACW,GAAD;EAAU,UAAUC,KAAY,kBAACL,GAAD,EAA8B,UAAS,CAAA;EACrE,UAAA,kBAACG,GAAD;GAAwB;GAAQ,GAAID;EAAa,CAAA;CACzC,CAAA;AAEd;AAcA,SAAgBI,EAAa,GAA4B;CACvD,IAAMZ,IAAWL,EAAeI;CAChC,AAAIC,KACFA,EAAS;AAEb;AAaA,SAAgBa,EAAc,GAA+B;CAC3D,EAAW,QAAQD,CAAY;AACjC;AAKA,SAAgBE,IAAsC;CACpD,IAAMC,IAAU,OAAO,KAAKpB,CAAc,GACpCqB,IAAS,MAAM,KAAK5B,EAAe,KAAK,CAAC;CAE/C,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG2B,GAAS,GAAGC,CAAM,CAAC,CAAC;AAC7C;AASA,SAAgBC,EAAqB,GAA+B;CAClE,OAAO,CAAC9B,EAAiB,IAAIY,CAAS;AACxC;AAKA,SAAgBmB,IAAwC;CACtD,OAAO,MAAM,KAAK/B,CAAgB;AACpC"}
1
+ {"version":3,"file":"charts-loader-i4Fe3mAw.js","names":["failedChartTypes","customChartMap","chartLoaderCache","useTranslation","MissingDependencyFallback","height","t","installCommand","chartImportMap","n","getLazyChart","customChart","chartType","importFn","safeImport","createSafeImport","lazy","createUnknownChartFallback","isValidChartType","DefaultChartFallback","LazyChart","chartProps","ChartComponent","Suspense","fallback","preloadChart","preloadCharts","getAvailableChartTypes","builtIn","custom","isChartTypeAvailable","getUnavailableChartTypes"],"sources":["../../../src/client/components/charts/MissingDependencyFallback.tsx","../../../src/client/charts/ChartLoader.tsx"],"sourcesContent":["import { useTranslation } from '../../hooks/useTranslation.js'\n\ninterface MissingDependencyFallbackProps {\n chartType: string\n packageName: string\n installCommand: string\n height?: string | number\n}\n\n/**\n * Fallback component shown when a chart's optional dependency is not installed.\n * Provides clear instructions on how to install the missing package.\n */\nexport function MissingDependencyFallback({\n chartType,\n packageName,\n installCommand,\n height = 200\n}: MissingDependencyFallbackProps) {\n const { t } = useTranslation()\n return (\n <div\n className=\"dc-missing-dependency-fallback\"\n style={{\n height: typeof height === 'number' ? `${height}px` : height,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n padding: '1.5rem',\n textAlign: 'center',\n border: '1px dashed var(--dc-border, #e5e7eb)',\n borderRadius: '0.5rem',\n backgroundColor: 'var(--dc-surface, #f9fafb)'\n }}\n >\n <div style={{ fontSize: '2.5rem', marginBottom: '1rem' }}>📦</div>\n <h3 style={{\n fontSize: '1.125rem',\n fontWeight: 600,\n marginBottom: '0.5rem',\n color: 'var(--dc-text, #111827)'\n }}>\n {t('chart.runtime.missingDep.title')}\n </h3>\n <p style={{\n fontSize: '0.875rem',\n color: 'var(--dc-text-secondary, #6b7280)',\n marginBottom: '1rem',\n maxWidth: '28rem'\n }}>\n {t('chart.runtime.missingDep.description', { chartType, packageName })}\n </p>\n <div style={{\n backgroundColor: 'var(--dc-surface-secondary, #f3f4f6)',\n borderRadius: '0.5rem',\n padding: '0.75rem 1rem',\n fontFamily: 'monospace',\n fontSize: '0.875rem',\n color: 'var(--dc-text, #111827)'\n }}>\n <span style={{\n color: 'var(--dc-text-muted, #9ca3af)',\n userSelect: 'none'\n }}>$ </span>\n {installCommand}\n </div>\n <p style={{\n fontSize: '0.75rem',\n color: 'var(--dc-text-muted, #9ca3af)',\n marginTop: '0.75rem'\n }}>\n {t('chart.runtime.missingDep.restartHint')}\n </p>\n </div>\n )\n}\n","/**\n * Lazy Chart Loader\n *\n * Provides React.lazy-based dynamic loading for chart components.\n * This enables code splitting - each chart type loads only when needed.\n *\n * Handles missing optional dependencies gracefully by showing a fallback\n * component instead of crashing the application.\n */\n\nimport { lazy, Suspense, ReactNode, LazyExoticComponent } from 'react'\nimport type { BuiltInChartType, ChartType, ChartProps } from '../types.js'\nimport {\n type LazyChartComponent,\n chartLoaderCache,\n failedChartTypes,\n customChartMap,\n createSafeImport,\n createUnknownChartFallback\n} from './chartComponentRegistry.js'\n// Dynamic import functions for built-in chart **components** (the DOM-bearing,\n// client-only side of a chart). This stays separate from `chartRegistry` — which\n// is DOM-free and shared with the server — so importing the unified registry\n// never drags the chart component graph into server/agent code. Lazy loading is\n// a client-only optimisation.\n\n// The custom-chart registration API lives in chartComponentRegistry to avoid an\n// import cycle (chartPlugin → ChartLoader → DataTable → CubeProvider → chartPlugin).\n// Re-exported here so existing import paths keep working.\nexport { registerChartComponent, unregisterChartComponent } from './chartComponentRegistry.js'\n\n// Dynamic import functions for built-in chart **components** — the DOM-bearing,\n// client-only side of a chart. Kept separate from the unified `chartRegistry`\n// (which is DOM-free and shared with the server agent) so importing the registry\n// never drags the chart component graph into server/MCP/agent code. Lazy loading\n// is a client-only optimisation.\nconst chartImportMap: Record<BuiltInChartType, () => Promise<{ default: LazyChartComponent }>> = {\n bar: () => import('../components/charts/BarChart.js'),\n line: () => import('../components/charts/LineChart.js'),\n area: () => import('../components/charts/AreaChart.js'),\n pie: () => import('../components/charts/PieChart.js'),\n scatter: () => import('../components/charts/ScatterChart.js'),\n radar: () => import('../components/charts/RadarChart.js'),\n radialBar: () => import('../components/charts/RadialBarChart.js'),\n treemap: () => import('../components/charts/TreeMapChart.js'),\n bubble: () => import('../components/charts/BubbleChart.js'),\n table: () => import('../components/charts/DataTable.js'),\n recordsTable: () => import('../components/charts/RecordsTable.js'),\n activityGrid: () => import('../components/charts/ActivityGridChart.js'),\n kpiNumber: () => import('../components/charts/KpiNumber.js'),\n kpiDelta: () => import('../components/charts/KpiDelta.js'),\n kpiText: () => import('../components/charts/KpiText.js'),\n markdown: () => import('../components/charts/MarkdownChart.js'),\n funnel: () => import('../components/charts/FunnelChart.js'),\n sankey: () => import('../components/charts/SankeyChart.js'),\n sunburst: () => import('../components/charts/SunburstChart.js'),\n heatmap: () => import('../components/charts/HeatMapChart.js'),\n retentionHeatmap: () => import('../components/charts/RetentionHeatmap.js'),\n retentionCombined: () => import('../components/charts/RetentionCombinedChart.js'),\n boxPlot: () => import('../components/charts/BoxPlotChart.js'),\n dotStrip: () => import('../components/charts/DotStripChart.js'),\n waterfall: () => import('../components/charts/WaterfallChart.js'),\n candlestick: () => import('../components/charts/CandlestickChart.js'),\n measureProfile: () => import('../components/charts/MeasureProfileChart.js'),\n proportionBar: () => import('../components/charts/ProportionBarChart.js'),\n gauge: () => import('../components/charts/GaugeChart.js'),\n}\n\n/**\n * Get or create a lazy component for a chart type.\n * Checks custom (plugin) charts first, then built-in charts.\n * Returns an unknown chart fallback for unregistered types instead of throwing.\n */\nfunction getLazyChart(chartType: ChartType): LazyExoticComponent<LazyChartComponent> {\n // 1. Check custom charts first (allows overriding built-ins)\n const customChart = customChartMap.get(chartType)\n if (customChart) {\n return customChart\n }\n\n // 2. Check built-in cache\n if (chartLoaderCache.has(chartType)) {\n return chartLoaderCache.get(chartType)!\n }\n\n // 3. Check built-in import map (the client component registry)\n const importFn = chartImportMap[chartType as BuiltInChartType]\n if (importFn) {\n const safeImport = createSafeImport(chartType, importFn)\n chartLoaderCache.set(chartType, lazy(safeImport))\n return chartLoaderCache.get(chartType)!\n }\n\n // 4. Unknown chart type — return graceful fallback\n return lazy(() => Promise.resolve({ default: createUnknownChartFallback(chartType) }))\n}\n\n/**\n * Check if a chart type is supported (built-in or custom plugin)\n */\nexport function isValidChartType(chartType: string): chartType is ChartType {\n return chartType in chartImportMap || customChartMap.has(chartType)\n}\n\n// Props for the LazyChart wrapper\nexport interface LazyChartProps extends ChartProps {\n chartType: ChartType\n fallback?: ReactNode\n}\n\n/**\n * Default loading placeholder for charts\n */\nfunction DefaultChartFallback({ height }: { height?: string | number }) {\n return (\n <div\n className=\"dc:flex dc:items-center dc:justify-center dc:w-full\"\n style={{ height: typeof height === 'number' ? `${height}px` : height || '200px' }}\n >\n <div className=\"dc:animate-pulse bg-dc-surface-secondary dc:rounded-sm dc:w-full dc:h-full dc:min-h-[100px]\" />\n </div>\n )\n}\n\n/**\n * Lazy Chart Component\n *\n * Renders a chart component with React.lazy dynamic loading.\n * The chart type determines which chart component is loaded.\n *\n * @example\n * ```tsx\n * <LazyChart\n * chartType=\"bar\"\n * data={chartData}\n * chartConfig={{ yAxis: ['value'] }}\n * height={300}\n * />\n * ```\n */\nexport function LazyChart({\n chartType,\n fallback,\n height,\n ...chartProps\n}: LazyChartProps) {\n const ChartComponent = getLazyChart(chartType)\n\n return (\n <Suspense fallback={fallback ?? <DefaultChartFallback height={height} />}>\n <ChartComponent height={height} {...chartProps} />\n </Suspense>\n )\n}\n\n/**\n * Preload a chart type\n *\n * Triggers the dynamic import without rendering.\n * Useful for prefetching charts that will likely be needed.\n *\n * @example\n * ```tsx\n * // Preload bar chart on hover\n * onMouseEnter={() => preloadChart('bar')}\n * ```\n */\nexport function preloadChart(chartType: ChartType): void {\n const importFn = chartImportMap[chartType as BuiltInChartType]\n if (importFn) {\n importFn()\n }\n}\n\n/**\n * Preload multiple chart types\n *\n * @example\n * ```tsx\n * // Preload common charts on app init\n * useEffect(() => {\n * preloadCharts(['bar', 'line', 'pie'])\n * }, [])\n * ```\n */\nexport function preloadCharts(chartTypes: ChartType[]): void {\n chartTypes.forEach(preloadChart)\n}\n\n/**\n * Get all available chart types (built-in + custom plugins)\n */\nexport function getAvailableChartTypes(): ChartType[] {\n const builtIn = Object.keys(chartImportMap) as ChartType[]\n const custom = Array.from(customChartMap.keys())\n // Deduplicate in case a custom chart overrides a built-in\n return [...new Set([...builtIn, ...custom])]\n}\n\n/**\n * Check if a chart type has loaded successfully.\n * Returns false if the chart failed to load due to missing dependencies.\n *\n * Note: This only returns accurate results after the chart has been attempted to load.\n * Use this for conditional UI logic (e.g., hiding unavailable chart types).\n */\nexport function isChartTypeAvailable(chartType: ChartType): boolean {\n return !failedChartTypes.has(chartType)\n}\n\n/**\n * Get list of chart types that failed to load due to missing dependencies.\n */\nexport function getUnavailableChartTypes(): ChartType[] {\n return Array.from(failedChartTypes)\n}\n"],"mappings":";;;;;AAaA,SAAgBI,EAA0B,EACxC,cACA,gBACA,mBACA,YAAS,OACwB;CACjC,IAAM,EAAE,SAAMD,EAAe;CAC7B,OACE,kBAAC,OAAD;EACE,WAAU;EACV,OAAO;GACL,QAAQ,OAAOE,KAAW,WAAW,GAAGA,EAAO,MAAMA;GACrD,SAAS;GACT,eAAe;GACf,YAAY;GACZ,gBAAgB;GAChB,OAAO;GACP,SAAS;GACT,WAAW;GACX,QAAQ;GACR,cAAc;GACd,iBAAiB;EACnB;EAdF,UAAA;GAgBE,kBAAC,OAAD;IAAK,OAAO;KAAE,UAAU;KAAU,cAAc;IAAO;IAAG,UAAA;GAAO,CAAA;GACjE,kBAAC,MAAD;IAAI,OAAO;KACT,UAAU;KACV,YAAY;KACZ,cAAc;KACd,OAAO;IACT;IACG,UAAAC,EAAE,gCAAgC;GACjC,CAAA;GACJ,kBAAC,KAAD;IAAG,OAAO;KACR,UAAU;KACV,OAAO;KACP,cAAc;KACd,UAAU;IACZ;IACG,UAAAA,EAAE,wCAAwC;KAAE;KAAW;IAAY,CAAC;GACpE,CAAA;GACH,kBAAC,OAAD;IAAK,OAAO;KACV,iBAAiB;KACjB,cAAc;KACd,SAAS;KACT,YAAY;KACZ,UAAU;KACV,OAAO;IACT;IAPA,UAAA,CAQE,kBAAC,QAAD;KAAM,OAAO;MACX,OAAO;MACP,YAAY;KACd;KAAG,UAAA;IAAQ,CAAA,GACVC,CACE;;GACL,kBAAC,KAAD;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B;CAC3D,EAAW,QAAQD,CAAY;AACjC;AAKA,SAAgBE,IAAsC;CACpD,IAAMC,IAAU,OAAO,KAAKpB,CAAc,GACpCqB,IAAS,MAAM,KAAK5B,EAAe,KAAK,CAAC;CAE/C,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG2B,GAAS,GAAGC,CAAM,CAAC,CAAC;AAC7C;AASA,SAAgBC,EAAqB,GAA+B;CAClE,OAAO,CAAC9B,EAAiB,IAAIY,CAAS;AACxC;AAKA,SAAgBmB,IAAwC;CACtD,OAAO,MAAM,KAAK/B,CAAgB;AACpC"}
@@ -1,9 +1,9 @@
1
1
  import { f as e, p as t } from "./vendor-BPwAo1-t.js";
2
2
  import { i as n, t as r } from "./BatchCoordinator-DGE3i5Sj.js";
3
- import { t as i } from "./useCubeMetaQuery-CoYktIQn.js";
3
+ import { t as i } from "./useCubeMetaQuery-BQRQjE8r.js";
4
4
  import { c as a, r as o } from "./exportXlsx-Dnc0ZOJW.js";
5
- import { a as s, i as c, n as l, o as u, r as d, s as f } from "./useTranslation-DiobqdOI.js";
6
- import { t as p } from "./chartPlugin-BHp3WRCj.js";
5
+ import { a as s, i as c, n as l, o as u, r as d, s as f } from "./useTranslation-F7BGje95.js";
6
+ import { t as p } from "./chartPlugin-QJVPr2DC.js";
7
7
  import { createContext as m, useCallback as h, useContext as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
8
8
  import { jsx as x } from "react/jsx-runtime";
9
9
  //#region src/client/providers/CubeMetaContext.tsx
@@ -235,4 +235,4 @@ function U() {
235
235
  //#endregion
236
236
  export { P as a, S as c, N as i, C as l, U as n, j as o, F as r, E as s, H as t };
237
237
 
238
- //# sourceMappingURL=providers-jeBitA9w.js.map
238
+ //# sourceMappingURL=providers-Bn1iccjx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers-jeBitA9w.js","names":["globalT","QueryClient","QueryClientProvider","createCubeClient","BatchCoordinator","useCubeMetaQuery","warnIfScreenshotLibMissing","warnIfExcelJsMissing","setDebugMode","loadLocale","getLocale","setTranslations","getMessages","t","chartPluginRegistry","CubeMetaContext","createContext","useCubeMeta","context","useContext","CubeApiContext","CubeApiProvider","initialApiOptions","initialToken","baseConfig","useMemo","overrideConfig","setOverrideConfig","useState","config","apiOptionsWithLocale","locale","cubeApi","batchCoordinator","enableBatching","queries","batchOptions","batchDelayMs","updateApiConfig","useCallback","newApiOptions","newToken","value","options","useCubeApi","CubeFeaturesContext","DEFAULT_FEATURES","CubeFeaturesProvider","initialFeatures","features","setFeatures","useEffect","updateFeatures","prev","newFeatures","dashboardModes","DEFAULT_CONTEXT","useCubeFeatures","ScrollContainerContext","ScrollContainerProvider","useScrollContainer","I18nContext","I18nProvider","ready","setReady","currentLocale","setCurrentLocale","cancelled","translations","merged","CubeMetaProvider","metaLoading","getFieldLabelFromQuery","metaError","error","refetchMeta","refetch","getFieldLabel","fieldName","meta","labelMap","DEFAULT_API_OPTIONS","MAX_RETRIES","isRequestFault","status","createCubeQueryClient","failureCount","CubeProvider","_initialCubeApi","providedQueryClient","debugI18n","internalQueryClient","queryClient","registeredTypesRef","useRef","customCharts","type","newTypes","c","chart","apiOptions","useCubeContext","api","featuresCtx"],"sources":["../../../src/client/providers/CubeMetaContext.tsx","../../../src/client/providers/CubeApiProvider.tsx","../../../src/client/providers/CubeFeaturesProvider.tsx","../../../src/client/providers/ScrollContainerContext.tsx","../../../src/client/providers/I18nProvider.tsx","../../../src/client/providers/CubeMetaProvider.tsx","../../../src/client/providers/CubeProvider.tsx"],"sourcesContent":["/**\n * CubeMetaContext - Metadata context definitions.\n *\n * Split from CubeMetaProvider so consumers can access metadata context\n * without pulling in TanStack Query dependencies.\n */\n\nimport { createContext, useContext } from 'react'\nimport type { CubeMeta, FieldLabelMap } from '../types.js'\n\nexport interface CubeMetaContextValue {\n meta: CubeMeta | null\n labelMap: FieldLabelMap\n metaLoading: boolean\n metaError: string | null\n getFieldLabel: (fieldName: string) => string\n refetchMeta: () => void\n}\n\nexport const CubeMetaContext = createContext<CubeMetaContextValue | null>(null)\n\nexport function useCubeMeta() {\n const context = useContext(CubeMetaContext)\n if (!context) {\n throw new Error('useCubeMeta must be used within CubeMetaProvider')\n }\n return context\n}\n","/**\n * CubeApiProvider - Stable API Context Layer\n *\n * Provides the CubeClient API instance that only changes on authentication updates.\n * Isolated from metadata and feature contexts to prevent unnecessary re-renders.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport { createCubeClient, type CubeClient } from '../client/CubeClient.js'\nimport type { CubeQueryOptions, CubeApiOptions } from '../types.js'\nimport { BatchCoordinator } from '../client/BatchCoordinator.js'\n\ninterface CubeApiContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n apiOptions: CubeApiOptions\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n}\n\nconst CubeApiContext = createContext<CubeApiContextValue | null>(null)\n\ninterface CubeApiProviderProps {\n apiOptions: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n locale?: string\n enableBatching?: boolean\n batchDelayMs?: number\n children: ReactNode\n}\n\nexport function CubeApiProvider({\n apiOptions: initialApiOptions,\n token: initialToken,\n options = {},\n locale,\n enableBatching = true,\n batchDelayMs = 50,\n children\n}: CubeApiProviderProps) {\n const baseConfig = useMemo(\n () => ({ apiOptions: initialApiOptions, token: initialToken }),\n [initialApiOptions, initialToken]\n )\n const [overrideConfig, setOverrideConfig] = useState<{\n apiOptions: CubeApiOptions\n token?: string\n } | null>(null)\n\n useEffect(() => {\n setOverrideConfig(null)\n }, [baseConfig])\n\n const config = overrideConfig ?? baseConfig\n\n const apiOptionsWithLocale = useMemo(() => {\n if (!locale) return config.apiOptions\n return {\n ...config.apiOptions,\n headers: {\n ...(config.apiOptions.headers ?? {}),\n 'X-DC-Locale': locale\n }\n }\n }, [config.apiOptions, locale])\n\n // Create CubeClient - only recreates when config changes\n const cubeApi = useMemo(() =>\n createCubeClient(config.token, apiOptionsWithLocale),\n [apiOptionsWithLocale, config.token]\n )\n\n // Create BatchCoordinator - only recreates when cubeApi or batching config changes\n const batchCoordinator = useMemo(() => {\n if (!enableBatching) return null\n return new BatchCoordinator((queries, batchOptions) => cubeApi.batchLoad(queries, batchOptions), batchDelayMs)\n }, [enableBatching, cubeApi, batchDelayMs])\n\n // Stable callback for updating config\n const updateApiConfig = useCallback((newApiOptions: CubeApiOptions, newToken?: string) => {\n setOverrideConfig({ apiOptions: newApiOptions, token: newToken })\n }, [])\n\n // Memoize context value - only changes when cubeApi/options change\n const value = useMemo(() => ({\n cubeApi,\n options,\n apiOptions: apiOptionsWithLocale,\n updateApiConfig,\n batchCoordinator,\n enableBatching\n }), [cubeApi, options, apiOptionsWithLocale, updateApiConfig, batchCoordinator, enableBatching])\n\n return (\n <CubeApiContext.Provider value={value}>\n {children}\n </CubeApiContext.Provider>\n )\n}\n\nexport function useCubeApi() {\n const context = useContext(CubeApiContext)\n if (!context) {\n throw new Error('useCubeApi must be used within CubeApiProvider')\n }\n return context\n}\n","/**\n * CubeFeaturesProvider - Feature Flags Context Layer\n *\n * Provides feature configuration isolated from API and metadata layers.\n * This prevents components from re-rendering when feature flags change\n * if they don't use features.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport type { FeaturesConfig, DashboardLayoutMode } from '../types.js'\nimport { warnIfScreenshotLibMissing } from '../utils/thumbnail.js'\nimport { warnIfExcelJsMissing } from '../utils/exportXlsx.js'\n\ninterface CubeFeaturesContextValue {\n features: FeaturesConfig\n dashboardModes: DashboardLayoutMode[]\n updateFeatures: (newFeatures: Partial<FeaturesConfig>) => void\n}\n\nconst CubeFeaturesContext = createContext<CubeFeaturesContextValue | null>(null)\n\ninterface CubeFeaturesProviderProps {\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n children: ReactNode\n}\n\nconst DEFAULT_FEATURES: FeaturesConfig = {\n enableAI: true,\n aiEndpoint: '/api/ai/generate',\n showSchemaDiagram: false,\n useAnalysisBuilder: false,\n editToolbar: 'both',\n floatingToolbarPosition: 'right'\n}\n\nexport function CubeFeaturesProvider({\n features: initialFeatures,\n dashboardModes = ['rows', 'grid'],\n children\n}: CubeFeaturesProviderProps) {\n // Merge passed features with defaults so new features get default values\n const [features, setFeatures] = useState<FeaturesConfig>(() => ({\n ...DEFAULT_FEATURES,\n ...initialFeatures\n }))\n\n // Warn in development if thumbnail feature is enabled but modern-screenshot is not installed\n useEffect(() => {\n warnIfScreenshotLibMissing(features.thumbnail)\n }, [features.thumbnail])\n\n // Warn in development if xlsExport feature is enabled but exceljs is not installed\n useEffect(() => {\n warnIfExcelJsMissing(features.xlsExport)\n }, [features.xlsExport])\n\n const updateFeatures = useCallback((newFeatures: Partial<FeaturesConfig>) => {\n setFeatures(prev => ({ ...prev, ...newFeatures }))\n }, [])\n\n const value = useMemo(() => ({\n features,\n dashboardModes,\n updateFeatures\n }), [features, dashboardModes, updateFeatures])\n\n return (\n <CubeFeaturesContext.Provider value={value}>\n {children}\n </CubeFeaturesContext.Provider>\n )\n}\n\n// Default context value when used outside provider (safe fallback for hooks)\nconst DEFAULT_CONTEXT: CubeFeaturesContextValue = {\n features: DEFAULT_FEATURES,\n dashboardModes: ['rows', 'grid'],\n updateFeatures: () => {\n // No-op when used outside provider\n }\n}\n\n/**\n * Hook to access cube features context.\n * Returns default values if used outside CubeFeaturesProvider (graceful fallback).\n */\nexport function useCubeFeatures() {\n const context = useContext(CubeFeaturesContext)\n // Return default context if not within provider (allows hooks like useCubeLoadQuery to work in isolation)\n return context ?? DEFAULT_CONTEXT\n}\n","/**\n * ScrollContainerContext\n *\n * Provides the scroll container element for lazy loading with IntersectionObserver.\n * This allows portlets to detect visibility relative to a custom scroll container\n * (not just the viewport) when the dashboard is embedded in a scrolling div.\n */\n\nimport { createContext, useContext } from 'react'\n\nconst ScrollContainerContext = createContext<HTMLElement | null>(null)\n\n/**\n * Provider component to wrap dashboard content with a scroll container reference.\n * Used by DashboardGrid and MobileStackedLayout to pass the detected scroll container\n * to child portlets.\n */\nexport const ScrollContainerProvider = ScrollContainerContext.Provider\n\n/**\n * Hook to access the scroll container element for lazy loading.\n * Returns null if using viewport (window) scroll, or the container element\n * if the dashboard is inside a scrolling container.\n */\nexport const useScrollContainer = () => useContext(ScrollContainerContext)\n","import { createContext, useEffect, useState, type ReactNode } from 'react'\nimport { loadLocale, setTranslations, getLocale, getMessages, t as globalT } from '../../i18n/runtime.js'\nimport type { TranslationKey, TranslationParams } from '../../i18n/types.js'\n\nexport interface I18nContextValue {\n t: (key: TranslationKey, params?: TranslationParams) => string\n locale: string\n}\n\nexport const I18nContext = createContext<I18nContextValue>({\n t: globalT,\n locale: 'en-GB',\n})\n\ninterface I18nProviderProps {\n locale?: string\n translations?: Record<string, string>\n children: ReactNode\n}\n\n/**\n * I18nProvider — loads the requested locale and optionally merges consumer overrides.\n * Wraps children with a React context providing `t()` and `locale`.\n */\nexport function I18nProvider({ locale = 'en-GB', translations, children }: I18nProviderProps) {\n const [ready, setReady] = useState(false)\n const [currentLocale, setCurrentLocale] = useState(getLocale())\n\n useEffect(() => {\n let cancelled = false\n\n const init = async () => {\n await loadLocale(locale)\n if (translations && !cancelled) {\n // Merge consumer overrides on top of the loaded locale\n const merged = { ...getMessages(), ...translations }\n setTranslations(locale, merged)\n }\n if (!cancelled) {\n setCurrentLocale(getLocale())\n setReady(true)\n }\n }\n init()\n\n return () => { cancelled = true }\n }, [locale, translations])\n\n // Render children immediately with current translations — no loading spinner.\n // The default locale (en-GB) is statically bundled and always available.\n const value: I18nContextValue = {\n t: globalT,\n locale: ready ? currentLocale : locale,\n }\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n )\n}\n","/**\n * CubeMetaProvider - Metadata Context Layer\n *\n * Provides cube metadata (meta, labelMap) isolated from API layer.\n * This prevents components from re-rendering when metadata loads\n * if they only need API access.\n *\n * Uses TanStack Query for metadata fetching with built-in caching.\n */\n\nimport { useCallback, useMemo, type ReactNode } from 'react'\nimport { useCubeMetaQuery } from '../hooks/queries/useCubeMetaQuery.js'\nimport { CubeMetaContext } from './CubeMetaContext.js'\n\ninterface CubeMetaProviderProps {\n children: ReactNode\n}\n\nexport function CubeMetaProvider({ children }: CubeMetaProviderProps) {\n // Use TanStack Query hook for metadata fetching\n const {\n meta,\n labelMap,\n isLoading: metaLoading,\n error,\n refetch,\n getFieldLabel: getFieldLabelFromQuery\n } = useCubeMetaQuery()\n\n // Convert error to string for backward compatibility\n const metaError = error ? (error instanceof Error ? error.message : String(error)) : null\n\n // Wrap refetch to match expected signature\n const refetchMeta = useCallback(() => {\n refetch()\n }, [refetch])\n\n // Create stable getFieldLabel that reads from current labelMap\n const getFieldLabel = useCallback((fieldName: string): string => {\n return getFieldLabelFromQuery(fieldName)\n }, [getFieldLabelFromQuery])\n\n // Memoize context value to prevent unnecessary re-renders\n const value = useMemo(() => ({\n meta,\n labelMap,\n metaLoading,\n metaError,\n getFieldLabel,\n refetchMeta\n }), [meta, labelMap, metaLoading, metaError, getFieldLabel, refetchMeta])\n\n return (\n <CubeMetaContext.Provider value={value}>\n {children}\n </CubeMetaContext.Provider>\n )\n}\n","/**\n * CubeProvider - Backward Compatibility Wrapper\n *\n * This provider wraps the three specialized context providers (API, Meta, Features)\n * to maintain 100% backward compatibility with existing code using useCubeContext().\n *\n * New code should use the specialized hooks (useCubeApi, useCubeMeta, useCubeFeatures)\n * for better performance and selective re-rendering.\n *\n * Also includes TanStack Query's QueryClientProvider for data fetching in\n * AnalysisBuilder and other components that use TanStack Query hooks.\n */\n\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { CubeApiProvider, useCubeApi } from './CubeApiProvider.js'\nimport { CubeMetaProvider } from './CubeMetaProvider.js'\nimport { useCubeMeta } from './CubeMetaContext.js'\nimport { CubeFeaturesProvider, useCubeFeatures } from './CubeFeaturesProvider.js'\nimport type { CubeQueryOptions, CubeApiOptions, FeaturesConfig, DashboardLayoutMode, CubeMeta, FieldLabelMap } from '../types.js'\nimport type { CubeClient } from '../client/CubeClient.js'\nimport type { BatchCoordinator } from '../client/BatchCoordinator.js'\nimport type { ChartDefinition } from '../charts/chartPlugin.js'\nimport { chartPluginRegistry } from '../charts/chartPlugin.js'\nimport { I18nProvider } from './I18nProvider.js'\nimport { setDebugMode } from '../../i18n/runtime.js'\n\nconst DEFAULT_API_OPTIONS: CubeApiOptions = { apiUrl: '/cubejs-api/v1' }\n\n/** Retries left to a request that failed for a reason retrying might fix. */\nconst MAX_RETRIES = 3\n\n/**\n * A 4xx is the server's verdict on the request itself — an invalid query, an\n * unknown member, a missing dashboard. Retrying it cannot change the answer; it\n * only delays the error by the backoff (~7s over three attempts), which is the\n * difference between a widget reporting a bad query at once and appearing to\n * hang. 5xx and network failures are still retried.\n */\nfunction isRequestFault(error: unknown): boolean {\n const status = (error as { status?: number } | null)?.status\n return typeof status === 'number' && status >= 400 && status < 500\n}\n\nexport const createCubeQueryClient = () => new QueryClient({\n defaultOptions: {\n queries: {\n // Stale time: 5 minutes (matches existing cache duration)\n staleTime: 5 * 60 * 1000,\n // GC time: 15 minutes\n gcTime: 15 * 60 * 1000,\n retry: (failureCount, error) => !isRequestFault(error) && failureCount < MAX_RETRIES,\n // Don't refetch on window focus by default (can be overridden per-query)\n refetchOnWindowFocus: false,\n },\n },\n})\n\n// Legacy default client (useful for tests or explicit injection)\nexport const queryClient = createCubeQueryClient()\n\n// Backward compatible interface - merges all three contexts\ninterface CubeContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n meta: CubeMeta | null\n labelMap: FieldLabelMap\n metaLoading: boolean\n metaError: string | null\n getFieldLabel: (fieldName: string) => string\n refetchMeta: () => void\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n features: FeaturesConfig\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n dashboardModes: DashboardLayoutMode[]\n}\n\ninterface CubeProviderProps {\n cubeApi?: CubeClient\n apiOptions?: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n enableBatching?: boolean\n batchDelayMs?: number // Delay in ms to collect queries before batching (default: 100)\n queryClient?: QueryClient\n /** Custom chart definitions to register. Overrides built-in charts when `type` matches. */\n customCharts?: ChartDefinition[]\n /** Locale code for i18n (default: 'en-GB'). Bundled locales are loaded via dynamic import. */\n locale?: string\n /** Optional translation overrides merged on top of the loaded locale. */\n translations?: Record<string, string>\n /** Enable i18n debug mode — logs console warnings for missing translation keys. */\n debugI18n?: boolean\n children: ReactNode\n}\n\n/**\n * CubeProvider - Three-layer context wrapper\n *\n * Wraps children in three isolated context providers for optimal performance:\n * 1. CubeApiProvider - Stable API layer (changes only on auth)\n * 2. CubeMetaProvider - Metadata layer (changes on metadata load)\n * 3. CubeFeaturesProvider - Feature flags layer (changes on feature updates)\n */\nexport function CubeProvider({\n cubeApi: _initialCubeApi, // Intentionally unused - for backward compatibility\n apiOptions,\n token,\n options,\n features,\n dashboardModes,\n enableBatching,\n batchDelayMs,\n queryClient: providedQueryClient,\n customCharts,\n locale,\n translations,\n debugI18n,\n children\n}: CubeProviderProps) {\n // Enable/disable i18n debug mode (warns on missing keys)\n useEffect(() => {\n setDebugMode(!!debugI18n)\n }, [debugI18n])\n\n const [internalQueryClient] = useState(() => createCubeQueryClient())\n const queryClient = providedQueryClient ?? internalQueryClient\n\n // Register/unregister custom charts\n const registeredTypesRef = useRef<string[]>([])\n useEffect(() => {\n if (!customCharts || customCharts.length === 0) {\n // Unregister any previously registered charts\n for (const type of registeredTypesRef.current) {\n chartPluginRegistry.unregister(type)\n }\n registeredTypesRef.current = []\n return\n }\n\n // Unregister old charts that are no longer in the list\n const newTypes = new Set(customCharts.map(c => c.type))\n for (const type of registeredTypesRef.current) {\n if (!newTypes.has(type)) {\n chartPluginRegistry.unregister(type)\n }\n }\n\n // Register all current charts\n for (const chart of customCharts) {\n chartPluginRegistry.register(chart)\n }\n registeredTypesRef.current = customCharts.map(c => c.type)\n\n return () => {\n for (const type of registeredTypesRef.current) {\n chartPluginRegistry.unregister(type)\n }\n registeredTypesRef.current = []\n }\n }, [customCharts])\n\n return (\n <I18nProvider locale={locale} translations={translations}>\n <QueryClientProvider client={queryClient}>\n <CubeApiProvider\n apiOptions={apiOptions || DEFAULT_API_OPTIONS}\n token={token}\n options={options}\n locale={locale}\n enableBatching={enableBatching}\n batchDelayMs={batchDelayMs}\n >\n <CubeMetaProvider>\n <CubeFeaturesProvider features={features} dashboardModes={dashboardModes}>\n {children}\n </CubeFeaturesProvider>\n </CubeMetaProvider>\n </CubeApiProvider>\n </QueryClientProvider>\n </I18nProvider>\n )\n}\n\n/**\n * useCubeContext - Backward compatible hook\n *\n * Merges all three contexts into a single object for backward compatibility.\n * Components using this hook will re-render when ANY context changes.\n *\n * For better performance, use specialized hooks:\n * - useCubeApi() - Only re-renders on API changes\n * - useCubeMeta() - Only re-renders on metadata changes\n * - useCubeFeatures() - Only re-renders on feature changes\n */\nexport function useCubeContext(): CubeContextValue {\n const api = useCubeApi()\n const meta = useCubeMeta()\n const featuresCtx = useCubeFeatures()\n\n return useMemo(() => ({\n ...api,\n ...meta,\n features: featuresCtx.features,\n dashboardModes: featuresCtx.dashboardModes\n }), [api, meta, featuresCtx])\n}\n\n// Re-export specialized hooks for better tree-shaking and performance\nexport { useCubeApi, useCubeMeta, useCubeFeatures }\n\n// Export factory for testing and advanced use cases\nexport { createCubeQueryClient as createQueryClient }\n"],"mappings":";;;;;;;;;AAmBA,IAAae,IAAkBC,EAA2C,IAAI;AAE9E,SAAgBC,IAAc;CAC5B,IAAMC,IAAUC,EAAWJ,CAAe;CAC1C,IAAI,CAACG,GACH,MAAU,MAAM,kDAAkD;CAEpE,OAAOA;AACT;;;ACNA,IAAME,IAAiBJ,EAA0C,IAAI;AAYrE,SAAgBK,EAAgB,EAC9B,YAAYC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nBsF,IAAc9C,EAAgB;CAEpC,OAAOhC,SAAe;EACpB,GAAG6E;EACH,GAAGvB;EACH,UAAUwB,EAAY;EACtB,gBAAgBA,EAAY;CAC9B,IAAI;EAACD;EAAKvB;EAAMwB;CAAW,CAAC;AAC9B"}
1
+ {"version":3,"file":"providers-Bn1iccjx.js","names":["globalT","QueryClient","QueryClientProvider","createCubeClient","BatchCoordinator","useCubeMetaQuery","warnIfScreenshotLibMissing","warnIfExcelJsMissing","setDebugMode","loadLocale","getLocale","setTranslations","getMessages","t","chartPluginRegistry","CubeMetaContext","createContext","useCubeMeta","context","useContext","CubeApiContext","CubeApiProvider","initialApiOptions","initialToken","baseConfig","useMemo","overrideConfig","setOverrideConfig","useState","config","apiOptionsWithLocale","locale","cubeApi","batchCoordinator","enableBatching","queries","batchOptions","batchDelayMs","updateApiConfig","useCallback","newApiOptions","newToken","value","options","useCubeApi","CubeFeaturesContext","DEFAULT_FEATURES","CubeFeaturesProvider","initialFeatures","features","setFeatures","useEffect","updateFeatures","prev","newFeatures","dashboardModes","DEFAULT_CONTEXT","useCubeFeatures","ScrollContainerContext","ScrollContainerProvider","useScrollContainer","I18nContext","I18nProvider","ready","setReady","currentLocale","setCurrentLocale","cancelled","translations","merged","CubeMetaProvider","metaLoading","getFieldLabelFromQuery","metaError","error","refetchMeta","refetch","getFieldLabel","fieldName","meta","labelMap","DEFAULT_API_OPTIONS","MAX_RETRIES","isRequestFault","status","createCubeQueryClient","failureCount","CubeProvider","_initialCubeApi","providedQueryClient","debugI18n","internalQueryClient","queryClient","registeredTypesRef","useRef","customCharts","type","newTypes","c","chart","apiOptions","useCubeContext","api","featuresCtx"],"sources":["../../../src/client/providers/CubeMetaContext.tsx","../../../src/client/providers/CubeApiProvider.tsx","../../../src/client/providers/CubeFeaturesProvider.tsx","../../../src/client/providers/ScrollContainerContext.tsx","../../../src/client/providers/I18nProvider.tsx","../../../src/client/providers/CubeMetaProvider.tsx","../../../src/client/providers/CubeProvider.tsx"],"sourcesContent":["/**\n * CubeMetaContext - Metadata context definitions.\n *\n * Split from CubeMetaProvider so consumers can access metadata context\n * without pulling in TanStack Query dependencies.\n */\n\nimport { createContext, useContext } from 'react'\nimport type { CubeMeta, FieldLabelMap } from '../types.js'\n\nexport interface CubeMetaContextValue {\n meta: CubeMeta | null\n labelMap: FieldLabelMap\n metaLoading: boolean\n metaError: string | null\n getFieldLabel: (fieldName: string) => string\n refetchMeta: () => void\n}\n\nexport const CubeMetaContext = createContext<CubeMetaContextValue | null>(null)\n\nexport function useCubeMeta() {\n const context = useContext(CubeMetaContext)\n if (!context) {\n throw new Error('useCubeMeta must be used within CubeMetaProvider')\n }\n return context\n}\n","/**\n * CubeApiProvider - Stable API Context Layer\n *\n * Provides the CubeClient API instance that only changes on authentication updates.\n * Isolated from metadata and feature contexts to prevent unnecessary re-renders.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport { createCubeClient, type CubeClient } from '../client/CubeClient.js'\nimport type { CubeQueryOptions, CubeApiOptions } from '../types.js'\nimport { BatchCoordinator } from '../client/BatchCoordinator.js'\n\ninterface CubeApiContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n apiOptions: CubeApiOptions\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n}\n\nconst CubeApiContext = createContext<CubeApiContextValue | null>(null)\n\ninterface CubeApiProviderProps {\n apiOptions: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n locale?: string\n enableBatching?: boolean\n batchDelayMs?: number\n children: ReactNode\n}\n\nexport function CubeApiProvider({\n apiOptions: initialApiOptions,\n token: initialToken,\n options = {},\n locale,\n enableBatching = true,\n batchDelayMs = 50,\n children\n}: CubeApiProviderProps) {\n const baseConfig = useMemo(\n () => ({ apiOptions: initialApiOptions, token: initialToken }),\n [initialApiOptions, initialToken]\n )\n const [overrideConfig, setOverrideConfig] = useState<{\n apiOptions: CubeApiOptions\n token?: string\n } | null>(null)\n\n useEffect(() => {\n setOverrideConfig(null)\n }, [baseConfig])\n\n const config = overrideConfig ?? baseConfig\n\n const apiOptionsWithLocale = useMemo(() => {\n if (!locale) return config.apiOptions\n return {\n ...config.apiOptions,\n headers: {\n ...(config.apiOptions.headers ?? {}),\n 'X-DC-Locale': locale\n }\n }\n }, [config.apiOptions, locale])\n\n // Create CubeClient - only recreates when config changes\n const cubeApi = useMemo(() =>\n createCubeClient(config.token, apiOptionsWithLocale),\n [apiOptionsWithLocale, config.token]\n )\n\n // Create BatchCoordinator - only recreates when cubeApi or batching config changes\n const batchCoordinator = useMemo(() => {\n if (!enableBatching) return null\n return new BatchCoordinator((queries, batchOptions) => cubeApi.batchLoad(queries, batchOptions), batchDelayMs)\n }, [enableBatching, cubeApi, batchDelayMs])\n\n // Stable callback for updating config\n const updateApiConfig = useCallback((newApiOptions: CubeApiOptions, newToken?: string) => {\n setOverrideConfig({ apiOptions: newApiOptions, token: newToken })\n }, [])\n\n // Memoize context value - only changes when cubeApi/options change\n const value = useMemo(() => ({\n cubeApi,\n options,\n apiOptions: apiOptionsWithLocale,\n updateApiConfig,\n batchCoordinator,\n enableBatching\n }), [cubeApi, options, apiOptionsWithLocale, updateApiConfig, batchCoordinator, enableBatching])\n\n return (\n <CubeApiContext.Provider value={value}>\n {children}\n </CubeApiContext.Provider>\n )\n}\n\nexport function useCubeApi() {\n const context = useContext(CubeApiContext)\n if (!context) {\n throw new Error('useCubeApi must be used within CubeApiProvider')\n }\n return context\n}\n","/**\n * CubeFeaturesProvider - Feature Flags Context Layer\n *\n * Provides feature configuration isolated from API and metadata layers.\n * This prevents components from re-rendering when feature flags change\n * if they don't use features.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport type { FeaturesConfig, DashboardLayoutMode } from '../types.js'\nimport { warnIfScreenshotLibMissing } from '../utils/thumbnail.js'\nimport { warnIfExcelJsMissing } from '../utils/exportXlsx.js'\n\ninterface CubeFeaturesContextValue {\n features: FeaturesConfig\n dashboardModes: DashboardLayoutMode[]\n updateFeatures: (newFeatures: Partial<FeaturesConfig>) => void\n}\n\nconst CubeFeaturesContext = createContext<CubeFeaturesContextValue | null>(null)\n\ninterface CubeFeaturesProviderProps {\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n children: ReactNode\n}\n\nconst DEFAULT_FEATURES: FeaturesConfig = {\n enableAI: true,\n aiEndpoint: '/api/ai/generate',\n showSchemaDiagram: false,\n useAnalysisBuilder: false,\n editToolbar: 'both',\n floatingToolbarPosition: 'right'\n}\n\nexport function CubeFeaturesProvider({\n features: initialFeatures,\n dashboardModes = ['rows', 'grid'],\n children\n}: CubeFeaturesProviderProps) {\n // Merge passed features with defaults so new features get default values\n const [features, setFeatures] = useState<FeaturesConfig>(() => ({\n ...DEFAULT_FEATURES,\n ...initialFeatures\n }))\n\n // Warn in development if thumbnail feature is enabled but modern-screenshot is not installed\n useEffect(() => {\n warnIfScreenshotLibMissing(features.thumbnail)\n }, [features.thumbnail])\n\n // Warn in development if xlsExport feature is enabled but exceljs is not installed\n useEffect(() => {\n warnIfExcelJsMissing(features.xlsExport)\n }, [features.xlsExport])\n\n const updateFeatures = useCallback((newFeatures: Partial<FeaturesConfig>) => {\n setFeatures(prev => ({ ...prev, ...newFeatures }))\n }, [])\n\n const value = useMemo(() => ({\n features,\n dashboardModes,\n updateFeatures\n }), [features, dashboardModes, updateFeatures])\n\n return (\n <CubeFeaturesContext.Provider value={value}>\n {children}\n </CubeFeaturesContext.Provider>\n )\n}\n\n// Default context value when used outside provider (safe fallback for hooks)\nconst DEFAULT_CONTEXT: CubeFeaturesContextValue = {\n features: DEFAULT_FEATURES,\n dashboardModes: ['rows', 'grid'],\n updateFeatures: () => {\n // No-op when used outside provider\n }\n}\n\n/**\n * Hook to access cube features context.\n * Returns default values if used outside CubeFeaturesProvider (graceful fallback).\n */\nexport function useCubeFeatures() {\n const context = useContext(CubeFeaturesContext)\n // Return default context if not within provider (allows hooks like useCubeLoadQuery to work in isolation)\n return context ?? DEFAULT_CONTEXT\n}\n","/**\n * ScrollContainerContext\n *\n * Provides the scroll container element for lazy loading with IntersectionObserver.\n * This allows portlets to detect visibility relative to a custom scroll container\n * (not just the viewport) when the dashboard is embedded in a scrolling div.\n */\n\nimport { createContext, useContext } from 'react'\n\nconst ScrollContainerContext = createContext<HTMLElement | null>(null)\n\n/**\n * Provider component to wrap dashboard content with a scroll container reference.\n * Used by DashboardGrid and MobileStackedLayout to pass the detected scroll container\n * to child portlets.\n */\nexport const ScrollContainerProvider = ScrollContainerContext.Provider\n\n/**\n * Hook to access the scroll container element for lazy loading.\n * Returns null if using viewport (window) scroll, or the container element\n * if the dashboard is inside a scrolling container.\n */\nexport const useScrollContainer = () => useContext(ScrollContainerContext)\n","import { createContext, useEffect, useState, type ReactNode } from 'react'\nimport { loadLocale, setTranslations, getLocale, getMessages, t as globalT } from '../../i18n/runtime.js'\nimport type { TranslationKey, TranslationParams } from '../../i18n/types.js'\n\nexport interface I18nContextValue {\n t: (key: TranslationKey, params?: TranslationParams) => string\n locale: string\n}\n\nexport const I18nContext = createContext<I18nContextValue>({\n t: globalT,\n locale: 'en-GB',\n})\n\ninterface I18nProviderProps {\n locale?: string\n translations?: Record<string, string>\n children: ReactNode\n}\n\n/**\n * I18nProvider — loads the requested locale and optionally merges consumer overrides.\n * Wraps children with a React context providing `t()` and `locale`.\n */\nexport function I18nProvider({ locale = 'en-GB', translations, children }: I18nProviderProps) {\n const [ready, setReady] = useState(false)\n const [currentLocale, setCurrentLocale] = useState(getLocale())\n\n useEffect(() => {\n let cancelled = false\n\n const init = async () => {\n await loadLocale(locale)\n if (translations && !cancelled) {\n // Merge consumer overrides on top of the loaded locale\n const merged = { ...getMessages(), ...translations }\n setTranslations(locale, merged)\n }\n if (!cancelled) {\n setCurrentLocale(getLocale())\n setReady(true)\n }\n }\n init()\n\n return () => { cancelled = true }\n }, [locale, translations])\n\n // Render children immediately with current translations — no loading spinner.\n // The default locale (en-GB) is statically bundled and always available.\n const value: I18nContextValue = {\n t: globalT,\n locale: ready ? currentLocale : locale,\n }\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n )\n}\n","/**\n * CubeMetaProvider - Metadata Context Layer\n *\n * Provides cube metadata (meta, labelMap) isolated from API layer.\n * This prevents components from re-rendering when metadata loads\n * if they only need API access.\n *\n * Uses TanStack Query for metadata fetching with built-in caching.\n */\n\nimport { useCallback, useMemo, type ReactNode } from 'react'\nimport { useCubeMetaQuery } from '../hooks/queries/useCubeMetaQuery.js'\nimport { CubeMetaContext } from './CubeMetaContext.js'\n\ninterface CubeMetaProviderProps {\n children: ReactNode\n}\n\nexport function CubeMetaProvider({ children }: CubeMetaProviderProps) {\n // Use TanStack Query hook for metadata fetching\n const {\n meta,\n labelMap,\n isLoading: metaLoading,\n error,\n refetch,\n getFieldLabel: getFieldLabelFromQuery\n } = useCubeMetaQuery()\n\n // Convert error to string for backward compatibility\n const metaError = error ? (error instanceof Error ? error.message : String(error)) : null\n\n // Wrap refetch to match expected signature\n const refetchMeta = useCallback(() => {\n refetch()\n }, [refetch])\n\n // Create stable getFieldLabel that reads from current labelMap\n const getFieldLabel = useCallback((fieldName: string): string => {\n return getFieldLabelFromQuery(fieldName)\n }, [getFieldLabelFromQuery])\n\n // Memoize context value to prevent unnecessary re-renders\n const value = useMemo(() => ({\n meta,\n labelMap,\n metaLoading,\n metaError,\n getFieldLabel,\n refetchMeta\n }), [meta, labelMap, metaLoading, metaError, getFieldLabel, refetchMeta])\n\n return (\n <CubeMetaContext.Provider value={value}>\n {children}\n </CubeMetaContext.Provider>\n )\n}\n","/**\n * CubeProvider - Backward Compatibility Wrapper\n *\n * This provider wraps the three specialized context providers (API, Meta, Features)\n * to maintain 100% backward compatibility with existing code using useCubeContext().\n *\n * New code should use the specialized hooks (useCubeApi, useCubeMeta, useCubeFeatures)\n * for better performance and selective re-rendering.\n *\n * Also includes TanStack Query's QueryClientProvider for data fetching in\n * AnalysisBuilder and other components that use TanStack Query hooks.\n */\n\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { CubeApiProvider, useCubeApi } from './CubeApiProvider.js'\nimport { CubeMetaProvider } from './CubeMetaProvider.js'\nimport { useCubeMeta } from './CubeMetaContext.js'\nimport { CubeFeaturesProvider, useCubeFeatures } from './CubeFeaturesProvider.js'\nimport type { CubeQueryOptions, CubeApiOptions, FeaturesConfig, DashboardLayoutMode, CubeMeta, FieldLabelMap } from '../types.js'\nimport type { CubeClient } from '../client/CubeClient.js'\nimport type { BatchCoordinator } from '../client/BatchCoordinator.js'\nimport type { ChartDefinition } from '../charts/chartPlugin.js'\nimport { chartPluginRegistry } from '../charts/chartPlugin.js'\nimport { I18nProvider } from './I18nProvider.js'\nimport { setDebugMode } from '../../i18n/runtime.js'\n\nconst DEFAULT_API_OPTIONS: CubeApiOptions = { apiUrl: '/cubejs-api/v1' }\n\n/** Retries left to a request that failed for a reason retrying might fix. */\nconst MAX_RETRIES = 3\n\n/**\n * A 4xx is the server's verdict on the request itself — an invalid query, an\n * unknown member, a missing dashboard. Retrying it cannot change the answer; it\n * only delays the error by the backoff (~7s over three attempts), which is the\n * difference between a widget reporting a bad query at once and appearing to\n * hang. 5xx and network failures are still retried.\n */\nfunction isRequestFault(error: unknown): boolean {\n const status = (error as { status?: number } | null)?.status\n return typeof status === 'number' && status >= 400 && status < 500\n}\n\nexport const createCubeQueryClient = () => new QueryClient({\n defaultOptions: {\n queries: {\n // Stale time: 5 minutes (matches existing cache duration)\n staleTime: 5 * 60 * 1000,\n // GC time: 15 minutes\n gcTime: 15 * 60 * 1000,\n retry: (failureCount, error) => !isRequestFault(error) && failureCount < MAX_RETRIES,\n // Don't refetch on window focus by default (can be overridden per-query)\n refetchOnWindowFocus: false,\n },\n },\n})\n\n// Legacy default client (useful for tests or explicit injection)\nexport const queryClient = createCubeQueryClient()\n\n// Backward compatible interface - merges all three contexts\ninterface CubeContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n meta: CubeMeta | null\n labelMap: FieldLabelMap\n metaLoading: boolean\n metaError: string | null\n getFieldLabel: (fieldName: string) => string\n refetchMeta: () => void\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n features: FeaturesConfig\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n dashboardModes: DashboardLayoutMode[]\n}\n\ninterface CubeProviderProps {\n cubeApi?: CubeClient\n apiOptions?: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n enableBatching?: boolean\n batchDelayMs?: number // Delay in ms to collect queries before batching (default: 100)\n queryClient?: QueryClient\n /** Custom chart definitions to register. Overrides built-in charts when `type` matches. */\n customCharts?: ChartDefinition[]\n /** Locale code for i18n (default: 'en-GB'). Bundled locales are loaded via dynamic import. */\n locale?: string\n /** Optional translation overrides merged on top of the loaded locale. */\n translations?: Record<string, string>\n /** Enable i18n debug mode — logs console warnings for missing translation keys. */\n debugI18n?: boolean\n children: ReactNode\n}\n\n/**\n * CubeProvider - Three-layer context wrapper\n *\n * Wraps children in three isolated context providers for optimal performance:\n * 1. CubeApiProvider - Stable API layer (changes only on auth)\n * 2. CubeMetaProvider - Metadata layer (changes on metadata load)\n * 3. CubeFeaturesProvider - Feature flags layer (changes on feature updates)\n */\nexport function CubeProvider({\n cubeApi: _initialCubeApi, // Intentionally unused - for backward compatibility\n apiOptions,\n token,\n options,\n features,\n dashboardModes,\n enableBatching,\n batchDelayMs,\n queryClient: providedQueryClient,\n customCharts,\n locale,\n translations,\n debugI18n,\n children\n}: CubeProviderProps) {\n // Enable/disable i18n debug mode (warns on missing keys)\n useEffect(() => {\n setDebugMode(!!debugI18n)\n }, [debugI18n])\n\n const [internalQueryClient] = useState(() => createCubeQueryClient())\n const queryClient = providedQueryClient ?? internalQueryClient\n\n // Register/unregister custom charts\n const registeredTypesRef = useRef<string[]>([])\n useEffect(() => {\n if (!customCharts || customCharts.length === 0) {\n // Unregister any previously registered charts\n for (const type of registeredTypesRef.current) {\n chartPluginRegistry.unregister(type)\n }\n registeredTypesRef.current = []\n return\n }\n\n // Unregister old charts that are no longer in the list\n const newTypes = new Set(customCharts.map(c => c.type))\n for (const type of registeredTypesRef.current) {\n if (!newTypes.has(type)) {\n chartPluginRegistry.unregister(type)\n }\n }\n\n // Register all current charts\n for (const chart of customCharts) {\n chartPluginRegistry.register(chart)\n }\n registeredTypesRef.current = customCharts.map(c => c.type)\n\n return () => {\n for (const type of registeredTypesRef.current) {\n chartPluginRegistry.unregister(type)\n }\n registeredTypesRef.current = []\n }\n }, [customCharts])\n\n return (\n <I18nProvider locale={locale} translations={translations}>\n <QueryClientProvider client={queryClient}>\n <CubeApiProvider\n apiOptions={apiOptions || DEFAULT_API_OPTIONS}\n token={token}\n options={options}\n locale={locale}\n enableBatching={enableBatching}\n batchDelayMs={batchDelayMs}\n >\n <CubeMetaProvider>\n <CubeFeaturesProvider features={features} dashboardModes={dashboardModes}>\n {children}\n </CubeFeaturesProvider>\n </CubeMetaProvider>\n </CubeApiProvider>\n </QueryClientProvider>\n </I18nProvider>\n )\n}\n\n/**\n * useCubeContext - Backward compatible hook\n *\n * Merges all three contexts into a single object for backward compatibility.\n * Components using this hook will re-render when ANY context changes.\n *\n * For better performance, use specialized hooks:\n * - useCubeApi() - Only re-renders on API changes\n * - useCubeMeta() - Only re-renders on metadata changes\n * - useCubeFeatures() - Only re-renders on feature changes\n */\nexport function useCubeContext(): CubeContextValue {\n const api = useCubeApi()\n const meta = useCubeMeta()\n const featuresCtx = useCubeFeatures()\n\n return useMemo(() => ({\n ...api,\n ...meta,\n features: featuresCtx.features,\n dashboardModes: featuresCtx.dashboardModes\n }), [api, meta, featuresCtx])\n}\n\n// Re-export specialized hooks for better tree-shaking and performance\nexport { useCubeApi, useCubeMeta, useCubeFeatures }\n\n// Export factory for testing and advanced use c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B,UAAA,kBAACvE,GAAD;IACE,YAAY+E,KAAcnB;IACnB;IACE;IACD;IACQ;IACF;IAEd,UAAA,kBAACX,GAAD,EAAA,UACE,kBAACvB,GAAD;KAAgC;KAA0B;KACvD;IACmB,CAAA,EACN,CAAA;GACH,CAAA;EACE,CAAA;CACT,CAAA;AAElB;AAaA,SAAgBsD,IAAmC;CACjD,IAAMC,IAAM1D,EAAW,GACjBmC,IAAO9D,EAAY,GACnBsF,IAAc9C,EAAgB;CAEpC,OAAOhC,SAAe;EACpB,GAAG6E;EACH,GAAGvB;EACH,UAAUwB,EAAY;EACtB,gBAAgBA,EAAY;CAC9B,IAAI;EAACD;EAAKvB;EAAMwB;CAAW,CAAC;AAC9B"}
@@ -1,8 +1,8 @@
1
1
  import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
- import { n as t } from "./providers-jeBitA9w.js";
2
+ import { n as t } from "./providers-Bn1iccjx.js";
3
3
  import { getIcon as n } from "../icons.js";
4
- import { t as r } from "./useTranslation-DiobqdOI.js";
5
- import "./SchemaVisualization-RWq1-GVI.js";
4
+ import { t as r } from "./useTranslation-F7BGje95.js";
5
+ import "./SchemaVisualization-DE8WBbNZ.js";
6
6
  import { Suspense as i, createContext as a, lazy as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
7
7
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
8
8
  //#region src/client/components/SchemaVisualization/xyflowContext.tsx
@@ -55,7 +55,7 @@ function S() {
55
55
  })
56
56
  });
57
57
  }
58
- var C = o(async () => ({ default: (await import("./SchemaVisualization-RWq1-GVI.js")).SchemaVisualization }));
58
+ var C = o(async () => ({ default: (await import("./SchemaVisualization-DE8WBbNZ.js")).SchemaVisualization }));
59
59
  function w(e) {
60
60
  let [t, n] = f(null), [r, a] = f(b);
61
61
  return l(() => {
@@ -1069,4 +1069,4 @@ function z({ className: e = "", onFieldClick: i, highlightedCubes: a, highlighte
1069
1069
  //#endregion
1070
1070
  export { w as n, y as r, z as t };
1071
1071
 
1072
- //# sourceMappingURL=schema-visualization-D8DYZY2B.js.map
1072
+ //# sourceMappingURL=schema-visualization-D5HMwXPe.js.map