@sqlrooms/mosaic 0.29.0-rc.7 → 0.29.0-rc.9

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 (572) hide show
  1. package/LICENSE.md +2 -1
  2. package/README.md +179 -35
  3. package/dist/MosaicSlice.d.ts +1 -0
  4. package/dist/MosaicSlice.d.ts.map +1 -1
  5. package/dist/MosaicSlice.js.map +1 -1
  6. package/dist/VgPlotChart.d.ts.map +1 -1
  7. package/dist/VgPlotChart.js +9 -3
  8. package/dist/VgPlotChart.js.map +1 -1
  9. package/dist/ai/agentIntent.d.ts +5 -0
  10. package/dist/ai/agentIntent.d.ts.map +1 -0
  11. package/dist/ai/agentIntent.js +8 -0
  12. package/dist/ai/agentIntent.js.map +1 -0
  13. package/dist/ai/block-document/constants.d.ts +9 -0
  14. package/dist/ai/block-document/constants.d.ts.map +1 -0
  15. package/dist/ai/block-document/constants.js +9 -0
  16. package/dist/ai/block-document/constants.js.map +1 -0
  17. package/dist/ai/block-document/createAddMosaicDashboardBlockTool.d.ts +48 -0
  18. package/dist/ai/block-document/createAddMosaicDashboardBlockTool.d.ts.map +1 -0
  19. package/dist/ai/block-document/createAddMosaicDashboardBlockTool.js +59 -0
  20. package/dist/ai/block-document/createAddMosaicDashboardBlockTool.js.map +1 -0
  21. package/dist/ai/block-document/createBlockDocumentChartTools.d.ts +19 -0
  22. package/dist/ai/block-document/createBlockDocumentChartTools.d.ts.map +1 -0
  23. package/dist/ai/block-document/createBlockDocumentChartTools.js +37 -0
  24. package/dist/ai/block-document/createBlockDocumentChartTools.js.map +1 -0
  25. package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.d.ts +32 -0
  26. package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.d.ts.map +1 -0
  27. package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.js +37 -0
  28. package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.js.map +1 -0
  29. package/dist/ai/constants.d.ts +3 -0
  30. package/dist/ai/constants.d.ts.map +1 -0
  31. package/dist/ai/constants.js +3 -0
  32. package/dist/ai/constants.js.map +1 -0
  33. package/dist/ai/createDataTableExplorerTool.d.ts +69 -0
  34. package/dist/ai/createDataTableExplorerTool.d.ts.map +1 -0
  35. package/dist/ai/createDataTableExplorerTool.js +68 -0
  36. package/dist/ai/createDataTableExplorerTool.js.map +1 -0
  37. package/dist/ai/dashboard/constants.d.ts +6 -0
  38. package/dist/ai/dashboard/constants.d.ts.map +1 -0
  39. package/dist/ai/dashboard/constants.js +6 -0
  40. package/dist/ai/dashboard/constants.js.map +1 -0
  41. package/dist/ai/dashboard/createDashboardAgentTool.d.ts +17 -0
  42. package/dist/ai/dashboard/createDashboardAgentTool.d.ts.map +1 -0
  43. package/dist/ai/dashboard/createDashboardAgentTool.js +205 -0
  44. package/dist/ai/dashboard/createDashboardAgentTool.js.map +1 -0
  45. package/dist/ai/dashboard/createDashboardAiAdapter.d.ts +14 -0
  46. package/dist/ai/dashboard/createDashboardAiAdapter.d.ts.map +1 -0
  47. package/dist/ai/dashboard/createDashboardAiAdapter.js +75 -0
  48. package/dist/ai/dashboard/createDashboardAiAdapter.js.map +1 -0
  49. package/dist/ai/dashboard/createDashboardAiTools.d.ts +26 -0
  50. package/dist/ai/dashboard/createDashboardAiTools.d.ts.map +1 -0
  51. package/dist/ai/dashboard/createDashboardAiTools.js +40 -0
  52. package/dist/ai/dashboard/createDashboardAiTools.js.map +1 -0
  53. package/dist/ai/dashboard/createDashboardChartTools.d.ts +27 -0
  54. package/dist/ai/dashboard/createDashboardChartTools.d.ts.map +1 -0
  55. package/dist/ai/dashboard/createDashboardChartTools.js +55 -0
  56. package/dist/ai/dashboard/createDashboardChartTools.js.map +1 -0
  57. package/dist/ai/dashboard/createDashboardDataTableExplorerTool.d.ts +23 -0
  58. package/dist/ai/dashboard/createDashboardDataTableExplorerTool.d.ts.map +1 -0
  59. package/dist/ai/dashboard/createDashboardDataTableExplorerTool.js +29 -0
  60. package/dist/ai/dashboard/createDashboardDataTableExplorerTool.js.map +1 -0
  61. package/dist/ai/dashboard/createListDashboardPanelsTool.d.ts +28 -0
  62. package/dist/ai/dashboard/createListDashboardPanelsTool.d.ts.map +1 -0
  63. package/dist/ai/dashboard/createListDashboardPanelsTool.js +54 -0
  64. package/dist/ai/dashboard/createListDashboardPanelsTool.js.map +1 -0
  65. package/dist/ai/dashboard/dashboard-types.d.ts +59 -0
  66. package/dist/ai/dashboard/dashboard-types.d.ts.map +1 -0
  67. package/dist/ai/dashboard/dashboard-types.js +2 -0
  68. package/dist/ai/dashboard/dashboard-types.js.map +1 -0
  69. package/dist/ai/database-types.d.ts +12 -0
  70. package/dist/ai/database-types.d.ts.map +1 -0
  71. package/dist/ai/database-types.js +2 -0
  72. package/dist/ai/database-types.js.map +1 -0
  73. package/dist/ai/errors.d.ts +8 -0
  74. package/dist/ai/errors.d.ts.map +1 -0
  75. package/dist/ai/errors.js +11 -0
  76. package/dist/ai/errors.js.map +1 -0
  77. package/dist/ai/tool-helpers.d.ts +28 -29
  78. package/dist/ai/tool-helpers.d.ts.map +1 -1
  79. package/dist/ai/tool-helpers.js +38 -76
  80. package/dist/ai/tool-helpers.js.map +1 -1
  81. package/dist/ai/tool-schemas.d.ts +9 -4
  82. package/dist/ai/tool-schemas.d.ts.map +1 -1
  83. package/dist/ai/tool-schemas.js +12 -12
  84. package/dist/ai/tool-schemas.js.map +1 -1
  85. package/dist/ai/tool-types.d.ts +19 -1
  86. package/dist/ai/tool-types.d.ts.map +1 -1
  87. package/dist/ai/tool-types.js.map +1 -1
  88. package/dist/ai/types.d.ts +64 -0
  89. package/dist/ai/types.d.ts.map +1 -0
  90. package/dist/ai/types.js +2 -0
  91. package/dist/ai/types.js.map +1 -0
  92. package/dist/ai.d.ts +16 -2
  93. package/dist/ai.d.ts.map +1 -1
  94. package/dist/ai.js +14 -5
  95. package/dist/ai.js.map +1 -1
  96. package/dist/charts/MosaicChart.d.ts +3 -1
  97. package/dist/charts/MosaicChart.d.ts.map +1 -1
  98. package/dist/charts/MosaicChart.js +2 -2
  99. package/dist/charts/MosaicChart.js.map +1 -1
  100. package/dist/charts/MosaicChartError.d.ts +8 -2
  101. package/dist/charts/MosaicChartError.d.ts.map +1 -1
  102. package/dist/charts/MosaicChartError.js +29 -3
  103. package/dist/charts/MosaicChartError.js.map +1 -1
  104. package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
  105. package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
  106. package/dist/charts/MosaicChartSettingsButton.js +7 -0
  107. package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
  108. package/dist/charts/MosaicChartView.d.ts +2 -0
  109. package/dist/charts/MosaicChartView.d.ts.map +1 -1
  110. package/dist/charts/MosaicChartView.js +19 -7
  111. package/dist/charts/MosaicChartView.js.map +1 -1
  112. package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -1
  113. package/dist/charts/chart-settings/MosaicChartSettings.js +3 -3
  114. package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -1
  115. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +1 -1
  116. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -1
  117. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -1
  118. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +2 -1
  119. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -1
  120. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -1
  121. package/dist/charts/chart-settings/MosaicChartTypeSelector.js +3 -3
  122. package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -1
  123. package/dist/charts/chart-types/base-types.d.ts +40 -25
  124. package/dist/charts/chart-types/base-types.d.ts.map +1 -1
  125. package/dist/charts/chart-types/base-types.js +5 -0
  126. package/dist/charts/chart-types/base-types.js.map +1 -1
  127. package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -1
  128. package/dist/charts/chart-types/box-plot/definition.js +1 -0
  129. package/dist/charts/chart-types/box-plot/definition.js.map +1 -1
  130. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +37 -3
  131. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -1
  132. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +28 -13
  133. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -1
  134. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +2 -2
  135. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -1
  136. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +12 -1
  137. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -1
  138. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +13 -3
  139. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -1
  140. package/dist/charts/chart-types/box-plot/tool.d.ts +20 -24
  141. package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -1
  142. package/dist/charts/chart-types/box-plot/tool.js +25 -33
  143. package/dist/charts/chart-types/box-plot/tool.js.map +1 -1
  144. package/dist/charts/chart-types/box-plot/validation.d.ts +9 -0
  145. package/dist/charts/chart-types/box-plot/validation.d.ts.map +1 -0
  146. package/dist/charts/chart-types/box-plot/validation.js +32 -0
  147. package/dist/charts/chart-types/box-plot/validation.js.map +1 -0
  148. package/dist/charts/chart-types/chart-config.d.ts +3 -1
  149. package/dist/charts/chart-types/chart-config.d.ts.map +1 -1
  150. package/dist/charts/chart-types/chart-config.js +2 -2
  151. package/dist/charts/chart-types/chart-config.js.map +1 -1
  152. package/dist/charts/chart-types/column-types.d.ts +8 -0
  153. package/dist/charts/chart-types/column-types.d.ts.map +1 -0
  154. package/dist/charts/chart-types/column-types.js +2 -0
  155. package/dist/charts/chart-types/column-types.js.map +1 -0
  156. package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -1
  157. package/dist/charts/chart-types/count-plot/definition.js +1 -0
  158. package/dist/charts/chart-types/count-plot/definition.js.map +1 -1
  159. package/dist/charts/chart-types/count-plot/spec.d.ts +2 -1
  160. package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -1
  161. package/dist/charts/chart-types/count-plot/spec.js +47 -34
  162. package/dist/charts/chart-types/count-plot/spec.js.map +1 -1
  163. package/dist/charts/chart-types/count-plot/tool.d.ts +19 -24
  164. package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -1
  165. package/dist/charts/chart-types/count-plot/tool.js +26 -33
  166. package/dist/charts/chart-types/count-plot/tool.js.map +1 -1
  167. package/dist/charts/chart-types/count-plot/validation.d.ts +8 -0
  168. package/dist/charts/chart-types/count-plot/validation.d.ts.map +1 -0
  169. package/dist/charts/chart-types/count-plot/validation.js +20 -0
  170. package/dist/charts/chart-types/count-plot/validation.js.map +1 -0
  171. package/dist/charts/chart-types/createChartInstructions.d.ts +3 -0
  172. package/dist/charts/chart-types/createChartInstructions.d.ts.map +1 -0
  173. package/dist/charts/chart-types/createChartInstructions.js +12 -0
  174. package/dist/charts/chart-types/createChartInstructions.js.map +1 -0
  175. package/dist/charts/chart-types/createChartTools.d.ts +15 -9
  176. package/dist/charts/chart-types/createChartTools.d.ts.map +1 -1
  177. package/dist/charts/chart-types/createChartTools.js +16 -10
  178. package/dist/charts/chart-types/createChartTools.js.map +1 -1
  179. package/dist/charts/chart-types/createDefaultChartTypes.js +2 -2
  180. package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -1
  181. package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -1
  182. package/dist/charts/chart-types/custom-spec/definition.js +1 -0
  183. package/dist/charts/chart-types/custom-spec/definition.js.map +1 -1
  184. package/dist/charts/chart-types/custom-spec/spec.d.ts +2 -1
  185. package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -1
  186. package/dist/charts/chart-types/custom-spec/spec.js +16 -12
  187. package/dist/charts/chart-types/custom-spec/spec.js.map +1 -1
  188. package/dist/charts/chart-types/errors.d.ts +35 -0
  189. package/dist/charts/chart-types/errors.d.ts.map +1 -1
  190. package/dist/charts/chart-types/errors.js +56 -0
  191. package/dist/charts/chart-types/errors.js.map +1 -1
  192. package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -1
  193. package/dist/charts/chart-types/heatmap/definition.js +1 -0
  194. package/dist/charts/chart-types/heatmap/definition.js.map +1 -1
  195. package/dist/charts/chart-types/heatmap/spec.d.ts +2 -1
  196. package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -1
  197. package/dist/charts/chart-types/heatmap/spec.js +21 -21
  198. package/dist/charts/chart-types/heatmap/spec.js.map +1 -1
  199. package/dist/charts/chart-types/heatmap/tool.d.ts +20 -24
  200. package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -1
  201. package/dist/charts/chart-types/heatmap/tool.js +27 -37
  202. package/dist/charts/chart-types/heatmap/tool.js.map +1 -1
  203. package/dist/charts/chart-types/heatmap/validation.d.ts +9 -0
  204. package/dist/charts/chart-types/heatmap/validation.d.ts.map +1 -0
  205. package/dist/charts/chart-types/heatmap/validation.js +34 -0
  206. package/dist/charts/chart-types/heatmap/validation.js.map +1 -0
  207. package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -1
  208. package/dist/charts/chart-types/histogram/HistogramSettings.js +3 -1
  209. package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -1
  210. package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -1
  211. package/dist/charts/chart-types/histogram/definition.js +1 -0
  212. package/dist/charts/chart-types/histogram/definition.js.map +1 -1
  213. package/dist/charts/chart-types/histogram/schema.d.ts +2 -0
  214. package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -1
  215. package/dist/charts/chart-types/histogram/schema.js +1 -0
  216. package/dist/charts/chart-types/histogram/schema.js.map +1 -1
  217. package/dist/charts/chart-types/histogram/spec.d.ts +2 -1
  218. package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -1
  219. package/dist/charts/chart-types/histogram/spec.js +31 -28
  220. package/dist/charts/chart-types/histogram/spec.js.map +1 -1
  221. package/dist/charts/chart-types/histogram/tool.d.ts +39 -24
  222. package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -1
  223. package/dist/charts/chart-types/histogram/tool.js +39 -33
  224. package/dist/charts/chart-types/histogram/tool.js.map +1 -1
  225. package/dist/charts/chart-types/histogram/validation.d.ts +9 -0
  226. package/dist/charts/chart-types/histogram/validation.d.ts.map +1 -0
  227. package/dist/charts/chart-types/histogram/validation.js +22 -0
  228. package/dist/charts/chart-types/histogram/validation.js.map +1 -0
  229. package/dist/charts/chart-types/index.d.ts +5 -11
  230. package/dist/charts/chart-types/index.d.ts.map +1 -1
  231. package/dist/charts/chart-types/index.js +6 -12
  232. package/dist/charts/chart-types/index.js.map +1 -1
  233. package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -1
  234. package/dist/charts/chart-types/line-chart/LineChartSettings.js +4 -13
  235. package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -1
  236. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
  237. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
  238. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
  239. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
  240. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
  241. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
  242. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
  243. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
  244. package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -1
  245. package/dist/charts/chart-types/line-chart/definition.js +1 -0
  246. package/dist/charts/chart-types/line-chart/definition.js.map +1 -1
  247. package/dist/charts/chart-types/line-chart/schema.d.ts +2 -0
  248. package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -1
  249. package/dist/charts/chart-types/line-chart/schema.js +5 -0
  250. package/dist/charts/chart-types/line-chart/schema.js.map +1 -1
  251. package/dist/charts/chart-types/line-chart/spec.d.ts +2 -1
  252. package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -1
  253. package/dist/charts/chart-types/line-chart/spec.js +56 -65
  254. package/dist/charts/chart-types/line-chart/spec.js.map +1 -1
  255. package/dist/charts/chart-types/line-chart/tool.d.ts +28 -24
  256. package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -1
  257. package/dist/charts/chart-types/line-chart/tool.js +27 -39
  258. package/dist/charts/chart-types/line-chart/tool.js.map +1 -1
  259. package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
  260. package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
  261. package/dist/charts/chart-types/line-chart/utils.js +17 -0
  262. package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
  263. package/dist/charts/chart-types/line-chart/validation.d.ts +16 -0
  264. package/dist/charts/chart-types/line-chart/validation.d.ts.map +1 -0
  265. package/dist/charts/chart-types/line-chart/validation.js +43 -0
  266. package/dist/charts/chart-types/line-chart/validation.js.map +1 -0
  267. package/dist/charts/chart-types/mosaicChartTypes.d.ts +4 -2
  268. package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -1
  269. package/dist/charts/chart-types/mosaicChartTypes.js +2 -2
  270. package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -1
  271. package/dist/charts/chart-types/resolveChartTypes.d.ts +3 -0
  272. package/dist/charts/chart-types/resolveChartTypes.d.ts.map +1 -0
  273. package/dist/charts/chart-types/resolveChartTypes.js +8 -0
  274. package/dist/charts/chart-types/resolveChartTypes.js.map +1 -0
  275. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
  276. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
  277. package/dist/charts/chart-types/{bubble-chart/BubbleChartSettings.js → scatter-plot/ScatterPlotSettings.js} +4 -4
  278. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
  279. package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
  280. package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
  281. package/dist/charts/chart-types/scatter-plot/definition.js +25 -0
  282. package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
  283. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.d.ts +5 -5
  284. package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
  285. package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.js +5 -5
  286. package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
  287. package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
  288. package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
  289. package/dist/charts/chart-types/scatter-plot/spec.js +37 -0
  290. package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
  291. package/dist/charts/chart-types/scatter-plot/tool.d.ts +39 -0
  292. package/dist/charts/chart-types/scatter-plot/tool.d.ts.map +1 -0
  293. package/dist/charts/chart-types/scatter-plot/tool.js +57 -0
  294. package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
  295. package/dist/charts/chart-types/scatter-plot/validation.d.ts +13 -0
  296. package/dist/charts/chart-types/scatter-plot/validation.d.ts.map +1 -0
  297. package/dist/charts/chart-types/scatter-plot/validation.js +52 -0
  298. package/dist/charts/chart-types/scatter-plot/validation.js.map +1 -0
  299. package/dist/charts/chart-types/tool-types.d.ts +43 -0
  300. package/dist/charts/chart-types/tool-types.d.ts.map +1 -0
  301. package/dist/charts/chart-types/tool-types.js +2 -0
  302. package/dist/charts/chart-types/tool-types.js.map +1 -0
  303. package/dist/charts/chart-types/utils.d.ts +3 -0
  304. package/dist/charts/chart-types/utils.d.ts.map +1 -0
  305. package/dist/charts/chart-types/utils.js +4 -0
  306. package/dist/charts/chart-types/utils.js.map +1 -0
  307. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -1
  308. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +12 -5
  309. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -1
  310. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -1
  311. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +6 -4
  312. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -1
  313. package/dist/charts/useChartDataPolicy.d.ts.map +1 -1
  314. package/dist/charts/useChartDataPolicy.js +2 -1
  315. package/dist/charts/useChartDataPolicy.js.map +1 -1
  316. package/dist/charts/useChartPanelClients.d.ts +8 -0
  317. package/dist/charts/useChartPanelClients.d.ts.map +1 -0
  318. package/dist/charts/useChartPanelClients.js +22 -0
  319. package/dist/charts/useChartPanelClients.js.map +1 -0
  320. package/dist/charts/useMosaicChartRenderContext.d.ts +2 -3
  321. package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -1
  322. package/dist/charts/useMosaicChartRenderContext.js +15 -15
  323. package/dist/charts/useMosaicChartRenderContext.js.map +1 -1
  324. package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -1
  325. package/dist/charts/worksheet/ChartBlockHeader.js +4 -3
  326. package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -1
  327. package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -1
  328. package/dist/charts/worksheet/ChartBlockRenderer.js +3 -13
  329. package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -1
  330. package/dist/column-types-utils.d.ts.map +1 -1
  331. package/dist/column-types-utils.js +12 -4
  332. package/dist/column-types-utils.js.map +1 -1
  333. package/dist/components/AggregationSelector.d.ts.map +1 -1
  334. package/dist/components/AggregationSelector.js +9 -2
  335. package/dist/components/AggregationSelector.js.map +1 -1
  336. package/dist/components/BlockCaptionEditor.d.ts +20 -0
  337. package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
  338. package/dist/components/BlockCaptionEditor.js +15 -0
  339. package/dist/components/BlockCaptionEditor.js.map +1 -0
  340. package/dist/components/ColorSelector.d.ts +12 -0
  341. package/dist/components/ColorSelector.d.ts.map +1 -0
  342. package/dist/components/ColorSelector.js +13 -0
  343. package/dist/components/ColorSelector.js.map +1 -0
  344. package/dist/components/ColumnSelector.d.ts +1 -0
  345. package/dist/components/ColumnSelector.d.ts.map +1 -1
  346. package/dist/components/ColumnSelector.js +2 -2
  347. package/dist/components/ColumnSelector.js.map +1 -1
  348. package/dist/components/FieldSelectorInput.d.ts +1 -0
  349. package/dist/components/FieldSelectorInput.d.ts.map +1 -1
  350. package/dist/components/FieldSelectorInput.js +4 -9
  351. package/dist/components/FieldSelectorInput.js.map +1 -1
  352. package/dist/components/MultiFieldSelector.d.ts +4 -1
  353. package/dist/components/MultiFieldSelector.d.ts.map +1 -1
  354. package/dist/components/MultiFieldSelector.js +4 -13
  355. package/dist/components/MultiFieldSelector.js.map +1 -1
  356. package/dist/components/TemporalGranularitySelector.d.ts.map +1 -1
  357. package/dist/components/TemporalGranularitySelector.js +13 -9
  358. package/dist/components/TemporalGranularitySelector.js.map +1 -1
  359. package/dist/constants/chart-colors.d.ts +3 -0
  360. package/dist/constants/chart-colors.d.ts.map +1 -0
  361. package/dist/constants/chart-colors.js +5 -0
  362. package/dist/constants/chart-colors.js.map +1 -0
  363. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +2 -1
  364. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -1
  365. package/dist/dashboard/DefaultMosaicDashboardBlock.js +1 -1
  366. package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -1
  367. package/dist/dashboard/MosaicDashboardCommands.d.ts +19 -0
  368. package/dist/dashboard/MosaicDashboardCommands.d.ts.map +1 -0
  369. package/dist/dashboard/MosaicDashboardCommands.js +226 -0
  370. package/dist/dashboard/MosaicDashboardCommands.js.map +1 -0
  371. package/dist/dashboard/MosaicDashboardSlice.d.ts +22 -4
  372. package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
  373. package/dist/dashboard/MosaicDashboardSlice.js +55 -0
  374. package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
  375. package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
  376. package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
  377. package/dist/dashboard/components/ResetFiltersButton.js +15 -0
  378. package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
  379. package/dist/dashboard/dashboard-types.d.ts +9 -3
  380. package/dist/dashboard/dashboard-types.d.ts.map +1 -1
  381. package/dist/dashboard/dashboard-types.js.map +1 -1
  382. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
  383. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
  384. package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
  385. package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
  386. package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
  387. package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
  388. package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
  389. package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
  390. package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -1
  391. package/dist/dashboard/panel/MosaicDashboardPanel.js +1 -1
  392. package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -1
  393. package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -1
  394. package/dist/dashboard/panel/MosaicDashboardPanelLayout.js +3 -3
  395. package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -1
  396. package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -1
  397. package/dist/dashboard/panel/MosaicDashboardPanels.js +4 -2
  398. package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -1
  399. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
  400. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
  401. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
  402. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
  403. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
  404. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
  405. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
  406. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
  407. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
  408. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
  409. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
  410. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
  411. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +14 -10
  412. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
  413. package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
  414. package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
  415. package/dist/dashboard/usePanelClientRegistration.js +30 -0
  416. package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
  417. package/dist/dashboard/usePanelClients.d.ts +7 -0
  418. package/dist/dashboard/usePanelClients.d.ts.map +1 -0
  419. package/dist/dashboard/usePanelClients.js +13 -0
  420. package/dist/dashboard/usePanelClients.js.map +1 -0
  421. package/dist/dashboard/useSelectedOrFirstTable.d.ts +1 -1
  422. package/dist/dashboard/useSelectedOrFirstTable.d.ts.map +1 -1
  423. package/dist/dashboard/useSelectedOrFirstTable.js +10 -8
  424. package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
  425. package/dist/data-table-explorer/DataTableExplorer.d.ts +4 -2
  426. package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -1
  427. package/dist/data-table-explorer/DataTableExplorer.js +4 -4
  428. package/dist/data-table-explorer/DataTableExplorer.js.map +1 -1
  429. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +3 -2
  430. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -1
  431. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +4 -3
  432. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -1
  433. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +3 -1
  434. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -1
  435. package/dist/data-table-explorer/DataTableExplorerCountClient.js +3 -3
  436. package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -1
  437. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +3 -2
  438. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -1
  439. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +4 -4
  440. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -1
  441. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +3 -1
  442. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -1
  443. package/dist/data-table-explorer/DataTableExplorerPageClient.js +3 -1
  444. package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -1
  445. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +3 -2
  446. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -1
  447. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +3 -3
  448. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -1
  449. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +3 -0
  450. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -1
  451. package/dist/data-table-explorer/createDataTableExplorerStore.js +6 -0
  452. package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -1
  453. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
  454. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
  455. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
  456. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
  457. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -1
  458. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +26 -8
  459. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -1
  460. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
  461. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
  462. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
  463. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
  464. package/dist/data-table-explorer/dataTableExplorerController.d.ts +63 -3
  465. package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -1
  466. package/dist/data-table-explorer/dataTableExplorerController.js +73 -10
  467. package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -1
  468. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
  469. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
  470. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
  471. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
  472. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +52 -0
  473. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
  474. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +153 -0
  475. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
  476. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +42 -0
  477. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
  478. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +43 -0
  479. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
  480. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
  481. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
  482. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
  483. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
  484. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
  485. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
  486. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
  487. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
  488. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
  489. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
  490. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
  491. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
  492. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
  493. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
  494. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
  495. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
  496. package/dist/data-table-explorer/types.d.ts +16 -3
  497. package/dist/data-table-explorer/types.d.ts.map +1 -1
  498. package/dist/data-table-explorer/types.js.map +1 -1
  499. package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -1
  500. package/dist/data-table-explorer/useDataTableExplorer.js +20 -279
  501. package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -1
  502. package/dist/data-table-explorer/utils.d.ts +64 -6
  503. package/dist/data-table-explorer/utils.d.ts.map +1 -1
  504. package/dist/data-table-explorer/utils.js +58 -0
  505. package/dist/data-table-explorer/utils.js.map +1 -1
  506. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +1 -0
  507. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -1
  508. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +4 -2
  509. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -1
  510. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -1
  511. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +4 -4
  512. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -1
  513. package/dist/index.d.ts +55 -31
  514. package/dist/index.d.ts.map +1 -1
  515. package/dist/index.js +86 -26
  516. package/dist/index.js.map +1 -1
  517. package/dist/mosaicTableReference.d.ts +59 -0
  518. package/dist/mosaicTableReference.d.ts.map +1 -0
  519. package/dist/mosaicTableReference.js +68 -0
  520. package/dist/mosaicTableReference.js.map +1 -0
  521. package/dist/useVgPlotChartRender.d.ts.map +1 -1
  522. package/dist/useVgPlotChartRender.js +151 -25
  523. package/dist/useVgPlotChartRender.js.map +1 -1
  524. package/dist/useVgPlotChartRetention.d.ts +11 -0
  525. package/dist/useVgPlotChartRetention.d.ts.map +1 -1
  526. package/dist/useVgPlotChartRetention.js.map +1 -1
  527. package/dist/utils/table-lookup.d.ts +7 -0
  528. package/dist/utils/table-lookup.d.ts.map +1 -0
  529. package/dist/utils/table-lookup.js +10 -0
  530. package/dist/utils/table-lookup.js.map +1 -0
  531. package/package.json +14 -14
  532. package/dist/ai/ai.d.ts +0 -103
  533. package/dist/ai/ai.d.ts.map +0 -1
  534. package/dist/ai/ai.js +0 -419
  535. package/dist/ai/ai.js.map +0 -1
  536. package/dist/ai/data-table-explorer-tool.d.ts +0 -40
  537. package/dist/ai/data-table-explorer-tool.d.ts.map +0 -1
  538. package/dist/ai/data-table-explorer-tool.js +0 -75
  539. package/dist/ai/data-table-explorer-tool.js.map +0 -1
  540. package/dist/ai/list-panels-tool.d.ts +0 -35
  541. package/dist/ai/list-panels-tool.d.ts.map +0 -1
  542. package/dist/ai/list-panels-tool.js +0 -66
  543. package/dist/ai/list-panels-tool.js.map +0 -1
  544. package/dist/ai/remove-panel-tool.d.ts +0 -31
  545. package/dist/ai/remove-panel-tool.d.ts.map +0 -1
  546. package/dist/ai/remove-panel-tool.js +0 -55
  547. package/dist/ai/remove-panel-tool.js.map +0 -1
  548. package/dist/ai/tool-validation.d.ts +0 -3
  549. package/dist/ai/tool-validation.d.ts.map +0 -1
  550. package/dist/ai/tool-validation.js +0 -11
  551. package/dist/ai/tool-validation.js.map +0 -1
  552. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
  553. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
  554. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
  555. package/dist/charts/chart-types/bubble-chart/definition.d.ts +0 -4
  556. package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +0 -1
  557. package/dist/charts/chart-types/bubble-chart/definition.js +0 -24
  558. package/dist/charts/chart-types/bubble-chart/definition.js.map +0 -1
  559. package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +0 -1
  560. package/dist/charts/chart-types/bubble-chart/schema.js.map +0 -1
  561. package/dist/charts/chart-types/bubble-chart/spec.d.ts +0 -4
  562. package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +0 -1
  563. package/dist/charts/chart-types/bubble-chart/spec.js +0 -31
  564. package/dist/charts/chart-types/bubble-chart/spec.js.map +0 -1
  565. package/dist/charts/chart-types/bubble-chart/tool.d.ts +0 -42
  566. package/dist/charts/chart-types/bubble-chart/tool.d.ts.map +0 -1
  567. package/dist/charts/chart-types/bubble-chart/tool.js +0 -66
  568. package/dist/charts/chart-types/bubble-chart/tool.js.map +0 -1
  569. package/dist/hooks/useDataTable.d.ts +0 -3
  570. package/dist/hooks/useDataTable.d.ts.map +0 -1
  571. package/dist/hooks/useDataTable.js +0 -28
  572. package/dist/hooks/useDataTable.js.map +0 -1
@@ -1,35 +0,0 @@
1
- import { z } from 'zod';
2
- import type { DashboardToolDeps } from '../charts/chart-types/base-types';
3
- export declare const ListPanelsToolParameters: z.ZodObject<{
4
- artifactId: z.ZodOptional<z.ZodString>;
5
- reasoning: z.ZodString;
6
- }, z.core.$strip>;
7
- export type ListPanelsToolParams = z.infer<typeof ListPanelsToolParameters>;
8
- export declare function createListPanelsTool(deps: DashboardToolDeps): import("ai").Tool<{
9
- reasoning: string;
10
- artifactId?: string | undefined;
11
- }, {
12
- llmResult: {
13
- success: boolean;
14
- errorMessage: string;
15
- details?: undefined;
16
- data?: undefined;
17
- };
18
- } | {
19
- llmResult: {
20
- success: boolean;
21
- details: string;
22
- data: {
23
- artifactId: string;
24
- panels: {
25
- issue?: import("..").ChartRuntimeIssue | undefined;
26
- id: any;
27
- type: any;
28
- title: any;
29
- config: any;
30
- }[];
31
- };
32
- errorMessage?: undefined;
33
- };
34
- }>;
35
- //# sourceMappingURL=list-panels-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-panels-tool.d.ts","sourceRoot":"","sources":["../../src/ai/list-panels-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;iBAQnC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE5E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;GAwD3D"}
@@ -1,66 +0,0 @@
1
- import { tool } from 'ai';
2
- import { z } from 'zod';
3
- export const ListPanelsToolParameters = z.object({
4
- artifactId: z
5
- .string()
6
- .optional()
7
- .describe('Optional dashboard artifact ID. Defaults to current dashboard.'),
8
- reasoning: z
9
- .string()
10
- .describe('Brief rationale for listing dashboard panels.'),
11
- });
12
- export function createListPanelsTool(deps) {
13
- return tool({
14
- description: `List dashboard panels: returns all panels in the current dashboard with their IDs, types, titles, configurations, and any current runtime issue.
15
-
16
- Use when: you need to discover panel IDs before updating or removing panels, or when user asks "what's on this dashboard".
17
-
18
- Runtime issues are transient chart diagnostics such as too-much-data or sql-error. If a panel has an issue, use the panel ID to update it in place with a safer chart configuration.
19
-
20
- Returns array of: {id, type, title, config, issue?} for each panel.`,
21
- inputSchema: ListPanelsToolParameters,
22
- execute: async (params) => {
23
- try {
24
- const artifactId = deps.resolveArtifact(params.artifactId);
25
- const dashboard = deps.getDashboard(artifactId);
26
- if (!dashboard) {
27
- return {
28
- llmResult: {
29
- success: false,
30
- errorMessage: `Dashboard "${artifactId}" not found.`,
31
- },
32
- };
33
- }
34
- const panels = dashboard.panels.map((panel) => {
35
- const issue = deps.getPanelIssue?.(artifactId, panel.id);
36
- return {
37
- id: panel.id,
38
- type: panel.type,
39
- title: panel.title,
40
- config: panel.config,
41
- ...(issue ? { issue } : {}),
42
- };
43
- });
44
- return {
45
- llmResult: {
46
- success: true,
47
- details: `Found ${panels.length} panel(s) in dashboard.`,
48
- data: {
49
- artifactId,
50
- panels,
51
- },
52
- },
53
- };
54
- }
55
- catch (error) {
56
- return {
57
- llmResult: {
58
- success: false,
59
- errorMessage: error instanceof Error ? error.message : String(error),
60
- },
61
- };
62
- }
63
- },
64
- });
65
- }
66
- //# sourceMappingURL=list-panels-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-panels-tool.js","sourceRoot":"","sources":["../../src/ai/list-panels-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;CAC7D,CAAC,CAAC;AAIH,MAAM,UAAU,oBAAoB,CAAC,IAAuB;IAC1D,OAAO,IAAI,CAAC;QACV,WAAW,EAAE;;;;;;oEAMmD;QAChE,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACxB,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAE3D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;gBAChD,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,OAAO;wBACL,SAAS,EAAE;4BACT,OAAO,EAAE,KAAK;4BACd,YAAY,EAAE,cAAc,UAAU,cAAc;yBACrD;qBACF,CAAC;gBACJ,CAAC;gBAED,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE;oBACjD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;oBACzD,OAAO;wBACL,EAAE,EAAE,KAAK,CAAC,EAAE;wBACZ,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;wBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;wBACpB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;qBAC1B,CAAC;gBACJ,CAAC,CAAC,CAAC;gBAEH,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,SAAS,MAAM,CAAC,MAAM,yBAAyB;wBACxD,IAAI,EAAE;4BACJ,UAAU;4BACV,MAAM;yBACP;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,KAAK;wBACd,YAAY,EACV,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACzD;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport type {DashboardToolDeps} from '../charts/chart-types/base-types';\n\nexport const ListPanelsToolParameters = z.object({\n artifactId: z\n .string()\n .optional()\n .describe('Optional dashboard artifact ID. Defaults to current dashboard.'),\n reasoning: z\n .string()\n .describe('Brief rationale for listing dashboard panels.'),\n});\n\nexport type ListPanelsToolParams = z.infer<typeof ListPanelsToolParameters>;\n\nexport function createListPanelsTool(deps: DashboardToolDeps) {\n return tool({\n description: `List dashboard panels: returns all panels in the current dashboard with their IDs, types, titles, configurations, and any current runtime issue.\n\nUse when: you need to discover panel IDs before updating or removing panels, or when user asks \"what's on this dashboard\".\n\nRuntime issues are transient chart diagnostics such as too-much-data or sql-error. If a panel has an issue, use the panel ID to update it in place with a safer chart configuration.\n\nReturns array of: {id, type, title, config, issue?} for each panel.`,\n inputSchema: ListPanelsToolParameters,\n execute: async (params) => {\n try {\n const artifactId = deps.resolveArtifact(params.artifactId);\n\n const dashboard = deps.getDashboard(artifactId);\n if (!dashboard) {\n return {\n llmResult: {\n success: false,\n errorMessage: `Dashboard \"${artifactId}\" not found.`,\n },\n };\n }\n\n const panels = dashboard.panels.map((panel: any) => {\n const issue = deps.getPanelIssue?.(artifactId, panel.id);\n return {\n id: panel.id,\n type: panel.type,\n title: panel.title,\n config: panel.config,\n ...(issue ? {issue} : {}),\n };\n });\n\n return {\n llmResult: {\n success: true,\n details: `Found ${panels.length} panel(s) in dashboard.`,\n data: {\n artifactId,\n panels,\n },\n },\n };\n } catch (error) {\n return {\n llmResult: {\n success: false,\n errorMessage:\n error instanceof Error ? error.message : String(error),\n },\n };\n }\n },\n });\n}\n"]}
@@ -1,31 +0,0 @@
1
- import { z } from 'zod';
2
- import type { DashboardToolDeps } from '../charts/chart-types/base-types';
3
- export declare const RemovePanelToolParameters: z.ZodObject<{
4
- artifactId: z.ZodOptional<z.ZodString>;
5
- panelId: z.ZodString;
6
- reasoning: z.ZodString;
7
- }, z.core.$strip>;
8
- export type RemovePanelToolParams = z.infer<typeof RemovePanelToolParameters>;
9
- export declare function createRemovePanelTool(deps: DashboardToolDeps): import("ai").Tool<{
10
- panelId: string;
11
- reasoning: string;
12
- artifactId?: string | undefined;
13
- }, {
14
- llmResult: {
15
- success: boolean;
16
- details: string;
17
- data: {
18
- artifactId: string;
19
- panelId: string;
20
- };
21
- errorMessage?: undefined;
22
- };
23
- } | {
24
- llmResult: {
25
- success: boolean;
26
- errorMessage: string;
27
- details?: undefined;
28
- data?: undefined;
29
- };
30
- }>;
31
- //# sourceMappingURL=remove-panel-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-panel-tool.d.ts","sourceRoot":"","sources":["../../src/ai/remove-panel-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAExE,eAAO,MAAM,yBAAyB;;;;iBAWpC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;GA+C5D"}
@@ -1,55 +0,0 @@
1
- import { tool } from 'ai';
2
- import { z } from 'zod';
3
- export const RemovePanelToolParameters = z.object({
4
- artifactId: z
5
- .string()
6
- .optional()
7
- .describe('Optional dashboard artifact ID. Defaults to current dashboard.'),
8
- panelId: z
9
- .string()
10
- .describe('ID of the panel to remove. Use list_dashboard_panels to discover panel IDs.'),
11
- reasoning: z.string().describe('Brief rationale for removing this panel.'),
12
- });
13
- export function createRemovePanelTool(deps) {
14
- return tool({
15
- description: `Remove dashboard panel: deletes a panel from the dashboard by its ID.
16
-
17
- Use when: user asks to "remove", "delete", "get rid of" a specific panel.
18
-
19
- Use list_dashboard_panels first to discover panel IDs.`,
20
- inputSchema: RemovePanelToolParameters,
21
- execute: async (params) => {
22
- try {
23
- const artifactId = deps.resolveArtifact(params.artifactId);
24
- const dashboard = deps.getDashboard(artifactId);
25
- if (!dashboard) {
26
- throw new Error(`Dashboard "${artifactId}" not found.`);
27
- }
28
- const panelExists = dashboard.panels.some((panel) => panel.id === params.panelId);
29
- if (!panelExists) {
30
- throw new Error(`Panel "${params.panelId}" not found in dashboard "${artifactId}". Cannot remove.`);
31
- }
32
- deps.removePanel(artifactId, params.panelId);
33
- return {
34
- llmResult: {
35
- success: true,
36
- details: `Removed panel "${params.panelId}" from dashboard.`,
37
- data: {
38
- artifactId,
39
- panelId: params.panelId,
40
- },
41
- },
42
- };
43
- }
44
- catch (error) {
45
- return {
46
- llmResult: {
47
- success: false,
48
- errorMessage: error instanceof Error ? error.message : String(error),
49
- },
50
- };
51
- }
52
- },
53
- });
54
- }
55
- //# sourceMappingURL=remove-panel-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-panel-tool.js","sourceRoot":"","sources":["../../src/ai/remove-panel-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,6EAA6E,CAC9E;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAC3E,CAAC,CAAC;AAIH,MAAM,UAAU,qBAAqB,CAAC,IAAuB;IAC3D,OAAO,IAAI,CAAC;QACV,WAAW,EAAE;;;;uDAIsC;QACnD,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACxB,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;gBAChD,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,MAAM,IAAI,KAAK,CAAC,cAAc,UAAU,cAAc,CAAC,CAAC;gBAC1D,CAAC;gBACD,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CACvC,CAAC,KAAmB,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC,OAAO,CACrD,CAAC;gBACF,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,MAAM,IAAI,KAAK,CACb,UAAU,MAAM,CAAC,OAAO,6BAA6B,UAAU,mBAAmB,CACnF,CAAC;gBACJ,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;gBAE7C,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,kBAAkB,MAAM,CAAC,OAAO,mBAAmB;wBAC5D,IAAI,EAAE;4BACJ,UAAU;4BACV,OAAO,EAAE,MAAM,CAAC,OAAO;yBACxB;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,KAAK;wBACd,YAAY,EACV,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACzD;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport type {DashboardToolDeps} from '../charts/chart-types/base-types';\n\nexport const RemovePanelToolParameters = z.object({\n artifactId: z\n .string()\n .optional()\n .describe('Optional dashboard artifact ID. Defaults to current dashboard.'),\n panelId: z\n .string()\n .describe(\n 'ID of the panel to remove. Use list_dashboard_panels to discover panel IDs.',\n ),\n reasoning: z.string().describe('Brief rationale for removing this panel.'),\n});\n\nexport type RemovePanelToolParams = z.infer<typeof RemovePanelToolParameters>;\n\nexport function createRemovePanelTool(deps: DashboardToolDeps) {\n return tool({\n description: `Remove dashboard panel: deletes a panel from the dashboard by its ID.\n\nUse when: user asks to \"remove\", \"delete\", \"get rid of\" a specific panel.\n\nUse list_dashboard_panels first to discover panel IDs.`,\n inputSchema: RemovePanelToolParameters,\n execute: async (params) => {\n try {\n const artifactId = deps.resolveArtifact(params.artifactId);\n const dashboard = deps.getDashboard(artifactId);\n if (!dashboard) {\n throw new Error(`Dashboard \"${artifactId}\" not found.`);\n }\n const panelExists = dashboard.panels.some(\n (panel: {id: string}) => panel.id === params.panelId,\n );\n if (!panelExists) {\n throw new Error(\n `Panel \"${params.panelId}\" not found in dashboard \"${artifactId}\". Cannot remove.`,\n );\n }\n\n deps.removePanel(artifactId, params.panelId);\n\n return {\n llmResult: {\n success: true,\n details: `Removed panel \"${params.panelId}\" from dashboard.`,\n data: {\n artifactId,\n panelId: params.panelId,\n },\n },\n };\n } catch (error) {\n return {\n llmResult: {\n success: false,\n errorMessage:\n error instanceof Error ? error.message : String(error),\n },\n };\n }\n },\n });\n}\n"]}
@@ -1,3 +0,0 @@
1
- import type { ChartBuilderColumn } from '../charts/chart-types/base-types';
2
- export declare function validateColumnExists(columnName: string, expectedTypes: string[] | undefined, columns: ChartBuilderColumn[], fieldKey: string): void;
3
- //# sourceMappingURL=tool-validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-validation.d.ts","sourceRoot":"","sources":["../../src/ai/tool-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAEzE,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EAAE,GAAG,SAAS,EACnC,OAAO,EAAE,kBAAkB,EAAE,EAC7B,QAAQ,EAAE,MAAM,GACf,IAAI,CAkBN"}
@@ -1,11 +0,0 @@
1
- export function validateColumnExists(columnName, expectedTypes, columns, fieldKey) {
2
- const column = columns.find((candidate) => candidate.name === columnName);
3
- if (!column) {
4
- throw new Error(`Unknown column "${columnName}" for field "${fieldKey}". Available columns: ${columns.map((c) => c.name).join(', ') || '(none)'}.`);
5
- }
6
- if (expectedTypes?.length &&
7
- !expectedTypes.some((type) => type.toUpperCase() === column.type.toUpperCase())) {
8
- throw new Error(`Column "${columnName}" has type ${column.type} but field "${fieldKey}" expects ${expectedTypes.join(', ')}.`);
9
- }
10
- }
11
- //# sourceMappingURL=tool-validation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-validation.js","sourceRoot":"","sources":["../../src/ai/tool-validation.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAClC,UAAkB,EAClB,aAAmC,EACnC,OAA6B,EAC7B,QAAgB;IAEhB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAC1E,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,mBAAmB,UAAU,gBAAgB,QAAQ,yBAAyB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,GAAG,CACnI,CAAC;IACJ,CAAC;IAED,IACE,aAAa,EAAE,MAAM;QACrB,CAAC,aAAa,CAAC,IAAI,CACjB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAC3D,EACD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,WAAW,UAAU,cAAc,MAAM,CAAC,IAAI,eAAe,QAAQ,aAAa,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC9G,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import type {ChartBuilderColumn} from '../charts/chart-types/base-types';\n\nexport function validateColumnExists(\n columnName: string,\n expectedTypes: string[] | undefined,\n columns: ChartBuilderColumn[],\n fieldKey: string,\n): void {\n const column = columns.find((candidate) => candidate.name === columnName);\n if (!column) {\n throw new Error(\n `Unknown column \"${columnName}\" for field \"${fieldKey}\". Available columns: ${columns.map((c) => c.name).join(', ') || '(none)'}.`,\n );\n }\n\n if (\n expectedTypes?.length &&\n !expectedTypes.some(\n (type) => type.toUpperCase() === column.type.toUpperCase(),\n )\n ) {\n throw new Error(\n `Column \"${columnName}\" has type ${column.type} but field \"${fieldKey}\" expects ${expectedTypes.join(', ')}.`,\n );\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
- import { type FC } from 'react';
2
- export declare const BubbleChartSettingsComponent: FC;
3
- //# sourceMappingURL=BubbleChartSettings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BubbleChartSettings.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/BubbleChartSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,EAAC,MAAM,OAAO,CAAC;AAK9B,eAAO,MAAM,4BAA4B,EAAE,EAqB1C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BubbleChartSettings.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/BubbleChartSettings.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAC,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAC,6BAA6B,EAAC,MAAM,iDAAiD,CAAC;AAE9F,MAAM,CAAC,MAAM,4BAA4B,GAAO,GAAG,EAAE;IACnD,MAAM,EAAC,cAAc,EAAE,MAAM,EAAC,GAC5B,6BAA6B,CAAC,cAAc,CAAC,CAAC;IAEhD,OAAO,CACL,eAAK,SAAS,EAAC,WAAW,aACxB,KAAC,KAAK,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,kBAC7B,KAAC,cAAc,CAAC,OAAO,IACrB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GACvC,GACI,EAER,KAAC,KAAK,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,kBAC7B,KAAC,cAAc,CAAC,OAAO,IACrB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GACvC,GACI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {type FC} from 'react';\nimport {Field} from '../../../components/Field';\nimport {ColumnSelector} from '../../../components/ColumnSelector';\nimport {useMosaicChartSettingsContext} from '../../chart-settings/MosaicChartSettingsContext';\n\nexport const BubbleChartSettingsComponent: FC = () => {\n const {onChangeConfig, config} =\n useMosaicChartSettingsContext('bubble-chart');\n\n return (\n <div className=\"space-y-4\">\n <Field label=\"X Field\" required>\n <ColumnSelector.Numeric\n value={config.settings.x}\n onChange={(x) => onChangeConfig('x', x)}\n />\n </Field>\n\n <Field label=\"Y Field\" required>\n <ColumnSelector.Numeric\n value={config.settings.y}\n onChange={(y) => onChangeConfig('y', y)}\n />\n </Field>\n </div>\n );\n};\n"]}
@@ -1,4 +0,0 @@
1
- import type { SpecChartTypeDefinition } from '../base-types';
2
- import { BubbleChartConfig } from './schema';
3
- export declare const bubbleChartChartType: SpecChartTypeDefinition<BubbleChartConfig>;
4
- //# sourceMappingURL=definition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAsB,MAAM,UAAU,CAAC;AAUhE,eAAO,MAAM,oBAAoB,EAAE,uBAAuB,CAAC,iBAAiB,CAgBzE,CAAC"}
@@ -1,24 +0,0 @@
1
- import { BubbleChartSettings } from './schema';
2
- import { titleFromDescription } from '../../../chart-builders/chartTypeUtils';
3
- import { BubbleChartSettingsComponent } from './BubbleChartSettings';
4
- import { createBubbleChartAiTool } from './tool';
5
- import { Workflow } from 'lucide-react';
6
- import { createBubbleChartSpec } from './spec';
7
- import { DEFAULT_CHART_MAX_DATA_POINTS } from '../../../chart-runtime';
8
- const DESCRIPTION = 'Create a bubble chart';
9
- export const bubbleChartChartType = {
10
- id: 'bubble-chart',
11
- label: 'Bubble Chart',
12
- description: DESCRIPTION,
13
- icon: Workflow,
14
- schema: BubbleChartSettings,
15
- settingsComponent: BubbleChartSettingsComponent,
16
- buildTitle: titleFromDescription(DESCRIPTION),
17
- createTool: createBubbleChartAiTool,
18
- getDataPolicy: () => ({
19
- maxRows: DEFAULT_CHART_MAX_DATA_POINTS,
20
- reason: 'Bubble charts render one point per row. Use a heatmap or another aggregated chart for larger datasets.',
21
- }),
22
- createSpec: createBubbleChartSpec,
23
- };
24
- //# sourceMappingURL=definition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAChE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAC,4BAA4B,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AACtC,OAAO,EAAC,qBAAqB,EAAC,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAE5C,MAAM,CAAC,MAAM,oBAAoB,GAC/B;IACE,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,mBAAmB;IAC3B,iBAAiB,EAAE,4BAA4B;IAC/C,UAAU,EAAE,oBAAoB,CAAC,WAAW,CAAC;IAC7C,UAAU,EAAE,uBAAuB;IACnC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;QACpB,OAAO,EAAE,6BAA6B;QACtC,MAAM,EACJ,wGAAwG;KAC3G,CAAC;IACF,UAAU,EAAE,qBAAqB;CAClC,CAAC","sourcesContent":["import type {SpecChartTypeDefinition} from '../base-types';\nimport {BubbleChartConfig, BubbleChartSettings} from './schema';\nimport {titleFromDescription} from '../../../chart-builders/chartTypeUtils';\nimport {BubbleChartSettingsComponent} from './BubbleChartSettings';\nimport {createBubbleChartAiTool} from './tool';\nimport {Workflow} from 'lucide-react';\nimport {createBubbleChartSpec} from './spec';\nimport {DEFAULT_CHART_MAX_DATA_POINTS} from '../../../chart-runtime';\n\nconst DESCRIPTION = 'Create a bubble chart';\n\nexport const bubbleChartChartType: SpecChartTypeDefinition<BubbleChartConfig> =\n {\n id: 'bubble-chart',\n label: 'Bubble Chart',\n description: DESCRIPTION,\n icon: Workflow,\n schema: BubbleChartSettings,\n settingsComponent: BubbleChartSettingsComponent,\n buildTitle: titleFromDescription(DESCRIPTION),\n createTool: createBubbleChartAiTool,\n getDataPolicy: () => ({\n maxRows: DEFAULT_CHART_MAX_DATA_POINTS,\n reason:\n 'Bubble charts render one point per row. Use a heatmap or another aggregated chart for larger datasets.',\n }),\n createSpec: createBubbleChartSpec,\n };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,mBAAmB;;;;iBAO9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAK5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AAEpE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACvE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACvE,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,CAAC;CACzD,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACpC,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC","sourcesContent":["import {z} from 'zod';\nimport {ChartDataPolicyOverrideConfig} from '../data-policy-schema';\n\nexport const BubbleChartSettings = z.object({\n x: z.string().optional().describe('Numeric column for X axis position'),\n y: z.string().optional().describe('Numeric column for Y axis position'),\n size: z\n .string()\n .optional()\n .describe('Numeric column for bubble size (optional)'),\n});\n\nexport type BubbleChartSettings = z.infer<typeof BubbleChartSettings>;\n\nexport const BubbleChartConfig = z.object({\n chartType: z.literal('bubble-chart'),\n settings: BubbleChartSettings,\n settingsOpen: z.boolean().optional(),\n dataPolicy: ChartDataPolicyOverrideConfig.optional(),\n});\n\nexport type BubbleChartConfig = z.infer<typeof BubbleChartConfig>;\n"]}
@@ -1,4 +0,0 @@
1
- import type { Spec } from '@uwdata/mosaic-spec';
2
- import { BubbleChartSettings } from './schema';
3
- export declare function createBubbleChartSpec(tableName: string, { x, y }: BubbleChartSettings): Spec;
4
- //# sourceMappingURL=spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAK7C,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,EAAC,CAAC,EAAE,CAAC,EAAC,EAAE,mBAAmB,GAC1B,IAAI,CA2BN"}
@@ -1,31 +0,0 @@
1
- import { ChartSpecError } from '../errors';
2
- const FG_COLOR = 'var(--color-chart-1)';
3
- export function createBubbleChartSpec(tableName, { x, y }) {
4
- if (!x) {
5
- throw new ChartSpecError('X field is required for bubble chart');
6
- }
7
- if (!y) {
8
- throw new ChartSpecError('Y field is required for bubble chart');
9
- }
10
- return {
11
- plot: [
12
- {
13
- mark: 'dot',
14
- data: { from: tableName, filterBy: '$brush' },
15
- x,
16
- y,
17
- fill: FG_COLOR,
18
- fillOpacity: 0.5,
19
- r: 3,
20
- },
21
- { select: 'intervalXY', as: '$brush' },
22
- ],
23
- xLabel: x,
24
- yLabel: y,
25
- height: 250,
26
- width: 380,
27
- margins: { left: 50, right: 20, top: 20, bottom: 50 },
28
- params: { brush: { select: 'crossfilter' } },
29
- };
30
- }
31
- //# sourceMappingURL=spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAExC,MAAM,UAAU,qBAAqB,CACnC,SAAiB,EACjB,EAAC,CAAC,EAAE,CAAC,EAAsB;IAE3B,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,cAAc,CAAC,sCAAsC,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,cAAc,CAAC,sCAAsC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC;gBAC3C,CAAC;gBACD,CAAC;gBACD,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,GAAG;gBAChB,CAAC,EAAE,CAAC;aACL;YACD,EAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAC;SACrC;QACD,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAC;QACnD,MAAM,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAC;KACjC,CAAC;AACZ,CAAC","sourcesContent":["import type {Spec} from '@uwdata/mosaic-spec';\nimport {BubbleChartSettings} from './schema';\nimport {ChartSpecError} from '../errors';\n\nconst FG_COLOR = 'var(--color-chart-1)';\n\nexport function createBubbleChartSpec(\n tableName: string,\n {x, y}: BubbleChartSettings,\n): Spec {\n if (!x) {\n throw new ChartSpecError('X field is required for bubble chart');\n }\n if (!y) {\n throw new ChartSpecError('Y field is required for bubble chart');\n }\n return {\n plot: [\n {\n mark: 'dot',\n data: {from: tableName, filterBy: '$brush'},\n x,\n y,\n fill: FG_COLOR,\n fillOpacity: 0.5,\n r: 3,\n },\n {select: 'intervalXY', as: '$brush'},\n ],\n xLabel: x,\n yLabel: y,\n height: 250,\n width: 380,\n margins: {left: 50, right: 20, top: 20, bottom: 50},\n params: {brush: {select: 'crossfilter'}},\n } as Spec;\n}\n"]}
@@ -1,42 +0,0 @@
1
- import { z } from 'zod';
2
- import { type DashboardToolDeps } from '../base-types';
3
- export declare const BubbleChartToolParameters: z.ZodObject<{
4
- artifactId: z.ZodOptional<z.ZodString>;
5
- tableName: z.ZodOptional<z.ZodString>;
6
- createArtifactIfMissing: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
7
- panelId: z.ZodOptional<z.ZodString>;
8
- reasoning: z.ZodString;
9
- settings: z.ZodObject<{
10
- x: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
11
- y: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
12
- size: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
13
- }, z.core.$strip>;
14
- }, z.core.$strip>;
15
- export type BubbleChartToolParams = z.infer<typeof BubbleChartToolParameters>;
16
- export declare function createBubbleChartAiTool(deps: DashboardToolDeps): import("ai").Tool<{
17
- createArtifactIfMissing: boolean;
18
- reasoning: string;
19
- settings: {
20
- x: string;
21
- y: string;
22
- size: string;
23
- };
24
- artifactId?: string | undefined;
25
- tableName?: string | undefined;
26
- panelId?: string | undefined;
27
- }, {
28
- llmResult: {
29
- success: boolean;
30
- details: string;
31
- data: import("..").PanelResult;
32
- errorMessage?: undefined;
33
- };
34
- } | {
35
- llmResult: {
36
- success: boolean;
37
- errorMessage: string;
38
- details?: undefined;
39
- data?: undefined;
40
- };
41
- }>;
42
- //# sourceMappingURL=tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAKrD,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAEpC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE9E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;GA6E9D"}
@@ -1,66 +0,0 @@
1
- import { tool } from 'ai';
2
- import { BubbleChartSettings } from './schema';
3
- import { BaseChartToolParameters } from '../../../ai/tool-schemas';
4
- import { validateColumnExists } from '../../../ai/tool-validation';
5
- import { NUMERIC_COLUMN_TYPES } from '../../../column-types-utils';
6
- import { createOrUpdateChartPanel } from '../../../ai/tool-helpers';
7
- export const BubbleChartToolParameters = BaseChartToolParameters.extend({
8
- settings: BubbleChartSettings.required(),
9
- });
10
- export function createBubbleChartAiTool(deps) {
11
- return tool({
12
- description: `Bubble/scatter chart: plots individual points positioned by two numeric columns (x, y), with optional size dimension.
13
-
14
- Use when: user asks to "plot X vs Y", "show relationship between", "scatter plot", "correlation", "compare two numeric columns".
15
- Example queries: "plot latitude vs longitude", "show correlation between elevation and temperature", "visualize coordinates sized by population", "plot area vs population density".
16
-
17
- Required: x and y must be numeric (${NUMERIC_COLUMN_TYPES.join(', ')}).
18
- Optional: size can encode a third numeric dimension (magnitude, frequency, count).
19
-
20
- IMPORTANT: Bubble charts render ALL rows as individual points. Do NOT create bubble charts for tables with more than ${deps.maxDataPoints.toLocaleString()} rows - use aggregated visualizations instead (histogram, count-plot, line-chart with time intervals, or heatmap).
21
-
22
- To UPDATE an existing bubble chart: provide the panelId parameter. Otherwise creates new panel.
23
-
24
- Do NOT use for: distributions (use histogram), categorical counts (use count-plot), trends over time (use line-chart), or large datasets (>${deps.maxDataPoints.toLocaleString()} rows).`,
25
- inputSchema: BubbleChartToolParameters,
26
- execute: async (params, context) => {
27
- try {
28
- const artifactId = deps.resolveArtifact(params.artifactId, params.createArtifactIfMissing, context);
29
- const { tableName, columns } = deps.resolveTable(artifactId, params.tableName);
30
- // Validate settings
31
- validateColumnExists(params.settings.x, NUMERIC_COLUMN_TYPES, columns, 'x');
32
- validateColumnExists(params.settings.y, NUMERIC_COLUMN_TYPES, columns, 'y');
33
- const result = createOrUpdateChartPanel(deps, {
34
- panelId: params.panelId,
35
- dashboardId: artifactId,
36
- tableName,
37
- title: params.settings.x && params.settings.y
38
- ? `Bubble chart - ${params.settings.x} vs ${params.settings.y}`
39
- : 'Bubble chart',
40
- config: {
41
- chartType: 'bubble-chart',
42
- settings: params.settings,
43
- },
44
- });
45
- return {
46
- llmResult: {
47
- success: true,
48
- details: params.panelId
49
- ? `Updated bubble chart "${result.title}".`
50
- : `Created bubble chart "${result.title}".`,
51
- data: result,
52
- },
53
- };
54
- }
55
- catch (error) {
56
- return {
57
- llmResult: {
58
- success: false,
59
- errorMessage: error instanceof Error ? error.message : String(error),
60
- },
61
- };
62
- }
63
- },
64
- });
65
- }
66
- //# sourceMappingURL=tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/bubble-chart/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AAExB,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACtE,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAIH,MAAM,UAAU,uBAAuB,CAAC,IAAuB;IAC7D,OAAO,IAAI,CAAC;QACV,WAAW,EAAE;;;;;qCAKoB,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;;;uHAGmD,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE;;;;6IAIb,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE,SAAS;QACrL,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;YACjC,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CACrC,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,uBAAuB,EAC9B,OAAO,CACR,CAAC;gBACF,MAAM,EAAC,SAAS,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,YAAY,CAC5C,UAAU,EACV,MAAM,CAAC,SAAS,CACjB,CAAC;gBAEF,oBAAoB;gBACpB,oBAAoB,CAClB,MAAM,CAAC,QAAQ,CAAC,CAAC,EACjB,oBAAoB,EACpB,OAAO,EACP,GAAG,CACJ,CAAC;gBAEF,oBAAoB,CAClB,MAAM,CAAC,QAAQ,CAAC,CAAC,EACjB,oBAAoB,EACpB,OAAO,EACP,GAAG,CACJ,CAAC;gBAEF,MAAM,MAAM,GAAG,wBAAwB,CAAC,IAAI,EAAE;oBAC5C,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,WAAW,EAAE,UAAU;oBACvB,SAAS;oBACT,KAAK,EACH,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;wBACpC,CAAC,CAAC,kBAAkB,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE;wBAC/D,CAAC,CAAC,cAAc;oBACpB,MAAM,EAAE;wBACN,SAAS,EAAE,cAAc;wBACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;qBAC1B;iBACF,CAAC,CAAC;gBAEH,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,MAAM,CAAC,OAAO;4BACrB,CAAC,CAAC,yBAAyB,MAAM,CAAC,KAAK,IAAI;4BAC3C,CAAC,CAAC,yBAAyB,MAAM,CAAC,KAAK,IAAI;wBAC7C,IAAI,EAAE,MAAM;qBACb;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE;wBACT,OAAO,EAAE,KAAK;wBACd,YAAY,EACV,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACzD;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport {BubbleChartSettings} from './schema';\nimport {BaseChartToolParameters} from '../../../ai/tool-schemas';\nimport {type DashboardToolDeps} from '../base-types';\nimport {validateColumnExists} from '../../../ai/tool-validation';\nimport {NUMERIC_COLUMN_TYPES} from '../../../column-types-utils';\nimport {createOrUpdateChartPanel} from '../../../ai/tool-helpers';\n\nexport const BubbleChartToolParameters = BaseChartToolParameters.extend({\n settings: BubbleChartSettings.required(),\n});\n\nexport type BubbleChartToolParams = z.infer<typeof BubbleChartToolParameters>;\n\nexport function createBubbleChartAiTool(deps: DashboardToolDeps) {\n return tool({\n description: `Bubble/scatter chart: plots individual points positioned by two numeric columns (x, y), with optional size dimension.\n\nUse when: user asks to \"plot X vs Y\", \"show relationship between\", \"scatter plot\", \"correlation\", \"compare two numeric columns\".\nExample queries: \"plot latitude vs longitude\", \"show correlation between elevation and temperature\", \"visualize coordinates sized by population\", \"plot area vs population density\".\n\nRequired: x and y must be numeric (${NUMERIC_COLUMN_TYPES.join(', ')}).\nOptional: size can encode a third numeric dimension (magnitude, frequency, count).\n\nIMPORTANT: Bubble charts render ALL rows as individual points. Do NOT create bubble charts for tables with more than ${deps.maxDataPoints.toLocaleString()} rows - use aggregated visualizations instead (histogram, count-plot, line-chart with time intervals, or heatmap).\n\nTo UPDATE an existing bubble chart: provide the panelId parameter. Otherwise creates new panel.\n\nDo NOT use for: distributions (use histogram), categorical counts (use count-plot), trends over time (use line-chart), or large datasets (>${deps.maxDataPoints.toLocaleString()} rows).`,\n inputSchema: BubbleChartToolParameters,\n execute: async (params, context) => {\n try {\n const artifactId = deps.resolveArtifact(\n params.artifactId,\n params.createArtifactIfMissing,\n context,\n );\n const {tableName, columns} = deps.resolveTable(\n artifactId,\n params.tableName,\n );\n\n // Validate settings\n validateColumnExists(\n params.settings.x,\n NUMERIC_COLUMN_TYPES,\n columns,\n 'x',\n );\n\n validateColumnExists(\n params.settings.y,\n NUMERIC_COLUMN_TYPES,\n columns,\n 'y',\n );\n\n const result = createOrUpdateChartPanel(deps, {\n panelId: params.panelId,\n dashboardId: artifactId,\n tableName,\n title:\n params.settings.x && params.settings.y\n ? `Bubble chart - ${params.settings.x} vs ${params.settings.y}`\n : 'Bubble chart',\n config: {\n chartType: 'bubble-chart',\n settings: params.settings,\n },\n });\n\n return {\n llmResult: {\n success: true,\n details: params.panelId\n ? `Updated bubble chart \"${result.title}\".`\n : `Created bubble chart \"${result.title}\".`,\n data: result,\n },\n };\n } catch (error) {\n return {\n llmResult: {\n success: false,\n errorMessage:\n error instanceof Error ? error.message : String(error),\n },\n };\n }\n },\n });\n}\n"]}
@@ -1,3 +0,0 @@
1
- import type { DataTable } from '@sqlrooms/db';
2
- export declare function useDataTable(tableName: string | undefined): DataTable | undefined;
3
- //# sourceMappingURL=useDataTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDataTable.d.ts","sourceRoot":"","sources":["../../src/hooks/useDataTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAkC5C,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,SAAS,GAAG,SAAS,CAIvB"}
@@ -1,28 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { useTablesWithColumns } from './useTablesWithColumns';
3
- /**
4
- * Returns the full table reference (database.schema.table) as a string,
5
- * without SQL escaping (for UI display and matching).
6
- */
7
- function getTableReference(table) {
8
- return [table.table.database, table.table.schema, table.table.table]
9
- .filter((part) => Boolean(part))
10
- .join('.');
11
- }
12
- /**
13
- * Finds a table by name, checking multiple naming formats.
14
- */
15
- function findTableByName(tables, tableName) {
16
- if (!tableName) {
17
- return undefined;
18
- }
19
- return tables.find((table) => getTableReference(table) === tableName ||
20
- table.table.table === tableName ||
21
- table.tableName === tableName ||
22
- table.table.toString() === tableName);
23
- }
24
- export function useDataTable(tableName) {
25
- const tables = useTablesWithColumns();
26
- return useMemo(() => findTableByName(tables, tableName), [tables, tableName]);
27
- }
28
- //# sourceMappingURL=useDataTable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDataTable.js","sourceRoot":"","sources":["../../src/hooks/useDataTable.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAAgB;IACzC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;SACjE,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAC/C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CACtB,MAAmB,EACnB,SAA6B;IAE7B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,KAAK,EAAE,EAAE,CACR,iBAAiB,CAAC,KAAK,CAAC,KAAK,SAAS;QACtC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS;QAC/B,KAAK,CAAC,SAAS,KAAK,SAAS;QAC7B,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,SAAS,CACvC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,SAA6B;IAE7B,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAEtC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import type {DataTable} from '@sqlrooms/db';\nimport {useMemo} from 'react';\nimport {useTablesWithColumns} from './useTablesWithColumns';\n\n/**\n * Returns the full table reference (database.schema.table) as a string,\n * without SQL escaping (for UI display and matching).\n */\nfunction getTableReference(table: DataTable): string {\n return [table.table.database, table.table.schema, table.table.table]\n .filter((part): part is string => Boolean(part))\n .join('.');\n}\n\n/**\n * Finds a table by name, checking multiple naming formats.\n */\nfunction findTableByName(\n tables: DataTable[],\n tableName: string | undefined,\n): DataTable | undefined {\n if (!tableName) {\n return undefined;\n }\n\n return tables.find(\n (table) =>\n getTableReference(table) === tableName ||\n table.table.table === tableName ||\n table.tableName === tableName ||\n table.table.toString() === tableName,\n );\n}\n\nexport function useDataTable(\n tableName: string | undefined,\n): DataTable | undefined {\n const tables = useTablesWithColumns();\n\n return useMemo(() => findTableByName(tables, tableName), [tables, tableName]);\n}\n"]}