@marimo-team/frontend 0.16.0-dev96986 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-BErMbWvG.js +19 -0
  2. package/dist/assets/{ImageComparisonComponent-SX7fDaTK.js → ImageComparisonComponent-fTHv1Ih0.js} +1 -1
  3. package/dist/assets/{VegaLite-MJUW3b7C.js → VegaLite-Bdi-TyfY.js} +1 -1
  4. package/dist/assets/_baseEach-CNBxBxvS.js +1 -0
  5. package/dist/assets/_baseMap-D1WHjKrd.js +1 -0
  6. package/dist/assets/_baseUniq-CCgDNtZb.js +1 -0
  7. package/dist/assets/{_createAggregator-ZRm2b6Zm.js → _createAggregator-DcD0kTA5.js} +1 -1
  8. package/dist/assets/{agent-panel-BBd11wNX.js → agent-panel-Crv430aI.js} +57 -76
  9. package/dist/assets/{any-language-editor-DwAaEQfS.js → any-language-editor-CQh552Wu.js} +1 -1
  10. package/dist/assets/{architectureDiagram-W76B3OCA-BJmVXUoW.js → architectureDiagram-W76B3OCA-BAJeBxzt.js} +1 -1
  11. package/dist/assets/{between-horizontal-start-KiwU-a3C.js → between-horizontal-start-Boxgxbt_.js} +1 -1
  12. package/dist/assets/{blockDiagram-QIGZ2CNN-DzxZjE7B.js → blockDiagram-QIGZ2CNN-CL-1svEK.js} +1 -1
  13. package/dist/assets/{c4Diagram-FPNF74CW-DjmldG_J.js → c4Diagram-FPNF74CW-BbEqbCTl.js} +1 -1
  14. package/dist/assets/channel-_2eNSz0n.js +1 -0
  15. package/dist/assets/chat-panel-CXh5Wl6C.js +3 -0
  16. package/dist/assets/{chunk-4BX2VUAB-EUTQThiZ.js → chunk-4BX2VUAB-C--8TXeE.js} +1 -1
  17. package/dist/assets/{chunk-55IACEB6-DZAiDJxy.js → chunk-55IACEB6-Bj00HDqq.js} +1 -1
  18. package/dist/assets/{chunk-FMBD7UC4-Bd0Czs-J.js → chunk-FMBD7UC4-C-lhB6hN.js} +1 -1
  19. package/dist/assets/{chunk-K7UQS3LO-DEKMIknX.js → chunk-K7UQS3LO-B-pGTXPt.js} +1 -1
  20. package/dist/assets/{chunk-QN33PNHL-E0jwHU_n.js → chunk-QN33PNHL-DqUzGhvm.js} +1 -1
  21. package/dist/assets/{chunk-QZHKN3VN-BzaIHJbq.js → chunk-QZHKN3VN-TntJHfSk.js} +1 -1
  22. package/dist/assets/{chunk-TVAH2DTR-CZFYvqnm.js → chunk-TVAH2DTR-HUJb1psV.js} +1 -1
  23. package/dist/assets/{chunk-TZMSLE5B-BNqnFjtv.js → chunk-TZMSLE5B-BK3C__t3.js} +1 -1
  24. package/dist/assets/{circle-play-D3J_mYrF.js → circle-play-DBLOv1Yu.js} +1 -1
  25. package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +1 -0
  26. package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +1 -0
  27. package/dist/assets/{clear-button-ifzRuAR3.js → clear-button-BeoFbEKH.js} +1 -1
  28. package/dist/assets/clone-BFDSPAj3.js +1 -0
  29. package/dist/assets/{command-palette-D2fdVSET.js → command-palette-CXZiSv0I.js} +1 -1
  30. package/dist/assets/{common-Ku-cF_2J.js → common-C7oJcmCT.js} +1 -1
  31. package/dist/assets/{compile-BgZlHW1c.js → compile-7L0MwhyI.js} +1 -1
  32. package/dist/assets/{cose-bilkent-S5V4N54A-CVM83SqK.js → cose-bilkent-S5V4N54A-BMkGLcVC.js} +1 -1
  33. package/dist/assets/{dagre-5GWH7T2D-ouQPkxT3.js → dagre-5GWH7T2D-BJtRienS.js} +1 -1
  34. package/dist/assets/{data-grid-overlay-editor-B47j5GJJ.js → data-grid-overlay-editor-DBkmGtNs.js} +1 -1
  35. package/dist/assets/datasources-panel-B7FbYLiy.js +1 -0
  36. package/dist/assets/{dependency-graph-panel-CZC_B7pK.js → dependency-graph-panel-DEdOxp2X.js} +1 -1
  37. package/dist/assets/{diagram-N5W7TBWH-CQ817ZdR.js → diagram-N5W7TBWH-CmECY3nb.js} +1 -1
  38. package/dist/assets/{diagram-QEK2KX5R-DOK_psUO.js → diagram-QEK2KX5R-DMOVSNKD.js} +1 -1
  39. package/dist/assets/{diagram-S2PKOQOG-CVljmOW8.js → diagram-S2PKOQOG-BiJ96PNQ.js} +1 -1
  40. package/dist/assets/{documentation-panel-C7yIvGg1.js → documentation-panel-xULhaEv3.js} +1 -1
  41. package/dist/assets/edit-page-BrYda9VE.js +129 -0
  42. package/dist/assets/{ellipsis-vertical-C7FjlUsY.js → ellipsis-vertical-BBqXIlc2.js} +1 -1
  43. package/dist/assets/{empty-state-DIOGM_CU.js → empty-state-B3dA3G5P.js} +1 -1
  44. package/dist/assets/{erDiagram-AWTI2OKA-DYu8cEdc.js → erDiagram-AWTI2OKA-MP1DiFRo.js} +1 -1
  45. package/dist/assets/{error-panel-Ddb8RkFG.js → error-panel-Cc1sv-Ag.js} +1 -1
  46. package/dist/assets/file-explorer-panel-Bw59Kva1.js +1 -0
  47. package/dist/assets/{flowDiagram-PVAE7QVJ-CmvW5iTb.js → flowDiagram-PVAE7QVJ-BX7caPp7.js} +1 -1
  48. package/dist/assets/{ganttDiagram-OWAHRB6G-BaKQlCaT.js → ganttDiagram-OWAHRB6G-B462g4Yf.js} +4 -4
  49. package/dist/assets/{gitGraphDiagram-NY62KEGX-CWO24eP6.js → gitGraphDiagram-NY62KEGX-CGgvZ9-9.js} +1 -1
  50. package/dist/assets/{glide-data-editor-CNDLEJ9a.js → glide-data-editor-C0gUFZON.js} +11 -11
  51. package/dist/assets/{graph-BZKTtxsc.js → graph-CHRVBzY5.js} +1 -1
  52. package/dist/assets/home-page-Fb2osjys.js +9 -0
  53. package/dist/assets/{index-zrSUQXha.js → index-BVgAenPd.js} +1 -1
  54. package/dist/assets/{index-Brf2DwUM.js → index-BY93Ejhl.js} +1 -1
  55. package/dist/assets/{index-CerjupfZ.js → index-C-8WADat.js} +1 -1
  56. package/dist/assets/{index-DZhOPkOB.js → index-C-GhZ7ti.js} +1 -1
  57. package/dist/assets/{index-CZaurnA9.js → index-C1v_Z9et.js} +1 -1
  58. package/dist/assets/{index-0XOUPdwT.js → index-C4Tn5NvJ.js} +1 -1
  59. package/dist/assets/{index-B_d_JZGI.js → index-C77h_TXN.js} +1 -1
  60. package/dist/assets/{index-BJVyzkx5.js → index-CQDrxQ0j.js} +1 -1
  61. package/dist/assets/{index-DFrGFNW1.js → index-CWMgowgL.js} +1 -1
  62. package/dist/assets/{index-DmgwT3sx.js → index-Clbi_Yaq.js} +1 -1
  63. package/dist/assets/{index-D-tZfElD.js → index-CpTPJo4k.js} +1 -1
  64. package/dist/assets/index-Cx0bsY1w.css +1 -0
  65. package/dist/assets/{index-DkntzpX4.js → index-D1vmG6DS.js} +1 -1
  66. package/dist/assets/{index-D3PqGupX.js → index-D9UKkrr2.js} +1 -1
  67. package/dist/assets/{index-BgXbBA39.js → index-DEQvTChO.js} +1 -1
  68. package/dist/assets/index-DKEudB02.js +578 -0
  69. package/dist/assets/{index-DCkzth56.js → index-DRMm6SNo.js} +1 -1
  70. package/dist/assets/{index-WXJFkQHg.js → index-DoRmcrKM.js} +1 -1
  71. package/dist/assets/{index-qE8lHQ-N.js → index-lYa_leQE.js} +1 -1
  72. package/dist/assets/{index-CXrWwFX6.js → index-vmICa5KN.js} +1 -1
  73. package/dist/assets/{index-BH7f3aiU.js → index-z9bohSQJ.js} +1 -1
  74. package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +2 -0
  75. package/dist/assets/{isEmpty-D1t7Gran.js → isEmpty-DU_ogP_D.js} +1 -1
  76. package/dist/assets/{journeyDiagram-BIP6EPQ6-D4Rp6H_h.js → journeyDiagram-BIP6EPQ6-C6EgLP_Q.js} +1 -1
  77. package/dist/assets/{kanban-definition-6OIFK2YF-DFt9DftA.js → kanban-definition-6OIFK2YF-BXzYO1yj.js} +1 -1
  78. package/dist/assets/{layout-D8WXi2_g.js → layout-jihVw5-i.js} +1 -1
  79. package/dist/assets/{linear-BwY8e5hA.js → linear-C4blANlC.js} +1 -1
  80. package/dist/assets/links-D59GIweI.js +7 -0
  81. package/dist/assets/{logs-panel-Dxiyt7dO.js → logs-panel-D401qzZh.js} +1 -1
  82. package/dist/assets/{markdown-renderer-VDu-NBKB.js → markdown-renderer-Cd9eYyaL.js} +20 -20
  83. package/dist/assets/{mermaid-B-O-Puyi.js → mermaid-BEVuRz_O.js} +1 -1
  84. package/dist/assets/{mermaid.core-BFFCqfOn.js → mermaid.core-CaSnaLH0.js} +4 -4
  85. package/dist/assets/min-DUMu_zeK.js +1 -0
  86. package/dist/assets/{mindmap-definition-Q6HEUPPD-kyvIY8Dg.js → mindmap-definition-Q6HEUPPD-BXUM5MT2.js} +1 -1
  87. package/dist/assets/{number-overlay-editor-GjLB2UK4.js → number-overlay-editor-4uWXGlPG.js} +1 -1
  88. package/dist/assets/outline-panel-DIzkvm2I.js +1 -0
  89. package/dist/assets/{packages-panel-nfXB-bKW.js → packages-panel-CJL0MVlj.js} +1 -1
  90. package/dist/assets/{pieDiagram-ADFJNKIX-D8JFQcWR.js → pieDiagram-ADFJNKIX-Dxt5PVNo.js} +1 -1
  91. package/dist/assets/{quadrantDiagram-LMRXKWRM-Nf8GzxXG.js → quadrantDiagram-LMRXKWRM-D4pUaA31.js} +1 -1
  92. package/dist/assets/{react-plotly-CnW9p7ZA.js → react-plotly-cJZ0VWBq.js} +1 -1
  93. package/dist/assets/{requirementDiagram-4UW4RH46-CCUxF8BZ.js → requirementDiagram-4UW4RH46-DVRTjgas.js} +1 -1
  94. package/dist/assets/{run-page-Bl4p3AbZ.js → run-page-BUEnMC9w.js} +1 -1
  95. package/dist/assets/{sankeyDiagram-GR3RE2ED-Sr8kDwP1.js → sankeyDiagram-GR3RE2ED-CVFnD9C-.js} +1 -1
  96. package/dist/assets/{scratchpad-panel-Ja1Mu-W3.js → scratchpad-panel-BIgRENkI.js} +1 -1
  97. package/dist/assets/{secrets-panel-B-3fcSyP.js → secrets-panel-xY5-V_BD.js} +1 -1
  98. package/dist/assets/{sequenceDiagram-C3RYC4MD-CBJ152Q3.js → sequenceDiagram-C3RYC4MD-_lY4ZN_S.js} +1 -1
  99. package/dist/assets/{slides-component-C-LoGC1U.css → slides-component-DMjQomc3.css} +1 -1
  100. package/dist/assets/{slides-component-DGtsVP5o.js → slides-component-Xjymwj7X.js} +1 -1
  101. package/dist/assets/snippets-panel-CTPYW41n.js +1 -0
  102. package/dist/assets/sortBy-BNZKwiq_.js +1 -0
  103. package/dist/assets/{state-B_RCHTH5.js → state-C4NiC9tO.js} +1 -1
  104. package/dist/assets/{stateDiagram-KXAO66HF-BlBFSAZr.js → stateDiagram-KXAO66HF-Da0JQWCn.js} +1 -1
  105. package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +1 -0
  106. package/dist/assets/storage-CMdLzB_c.js +26 -0
  107. package/dist/assets/{terminal-CATzv5Hd.js → terminal-BPwTkXae.js} +1 -1
  108. package/dist/assets/{time-CsYqILfB.js → time-Dv5_Ouz_.js} +1 -1
  109. package/dist/assets/{timeline-definition-XQNQX7LJ-CGrhjuAs.js → timeline-definition-XQNQX7LJ-Dxh5Zu2e.js} +1 -1
  110. package/dist/assets/tracing-BCIurUfa.js +2 -0
  111. package/dist/assets/{tracing-panel-DmzqPUtc.js → tracing-panel-DAzrzNmm.js} +2 -2
  112. package/dist/assets/{trash-rxdjLzkf.js → trash-Dc6DSjz_.js} +1 -1
  113. package/dist/assets/{tree-C2Ul1h1C.js → tree-jheoerAX.js} +1 -1
  114. package/dist/assets/{treemap-75Q7IDZK-N9hyUpyj.js → treemap-75Q7IDZK-IgpxeGaf.js} +27 -27
  115. package/dist/assets/variable-panel-DYAiLBmF.js +1 -0
  116. package/dist/assets/{vega-component-CR_MHOBT.js → vega-component-BpfpiPKI.js} +1 -1
  117. package/dist/assets/worker-X5rxzQGQ.js +1 -0
  118. package/dist/assets/{xychartDiagram-6GGTOJPD-jdLZsMb2.js → xychartDiagram-6GGTOJPD-CmNigJ31.js} +1 -1
  119. package/dist/index.html +2 -2
  120. package/package.json +2 -3
  121. package/src/components/app-config/user-config-form.tsx +1 -46
  122. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +43 -62
  123. package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
  124. package/src/components/chat/acp/__tests__/state.test.ts +36 -36
  125. package/src/components/chat/acp/agent-panel.tsx +27 -24
  126. package/src/components/chat/acp/blocks.tsx +6 -6
  127. package/src/components/chat/acp/prompt.ts +43 -62
  128. package/src/components/chat/chat-panel.tsx +1 -5
  129. package/src/components/chat/markdown-renderer.tsx +10 -6
  130. package/src/components/chat/tool-call-accordion.tsx +20 -52
  131. package/src/components/data-table/SearchBar.tsx +7 -8
  132. package/src/components/data-table/__tests__/column_formatting.test.ts +35 -50
  133. package/src/components/data-table/__tests__/data-table.test.tsx +1 -39
  134. package/src/components/data-table/charts/components/form-fields.tsx +37 -41
  135. package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
  136. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +2 -5
  137. package/src/components/data-table/column-formatting/feature.ts +29 -62
  138. package/src/components/data-table/column-formatting/types.ts +0 -1
  139. package/src/components/data-table/column-header.tsx +1 -3
  140. package/src/components/data-table/column-summary/chart-spec-model.tsx +7 -24
  141. package/src/components/data-table/column-summary/column-summary.tsx +9 -18
  142. package/src/components/data-table/columns.tsx +18 -42
  143. package/src/components/data-table/data-table.tsx +2 -10
  144. package/src/components/data-table/date-popover.tsx +75 -85
  145. package/src/components/data-table/filter-pills.tsx +9 -14
  146. package/src/components/data-table/header-items.tsx +1 -5
  147. package/src/components/data-table/pagination.tsx +13 -20
  148. package/src/components/data-table/renderers.tsx +0 -28
  149. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +8 -10
  150. package/src/components/datasources/column-preview.tsx +2 -6
  151. package/src/components/datasources/datasources.tsx +12 -8
  152. package/src/components/editor/ai/transport/chat-transport.tsx +1 -4
  153. package/src/components/editor/cell/CellStatus.tsx +20 -23
  154. package/src/components/editor/cell/CreateCellButton.tsx +4 -3
  155. package/src/components/editor/cell/code/language-toggle.tsx +4 -3
  156. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +28 -39
  157. package/src/components/editor/controls/notebook-menu-dropdown.tsx +2 -4
  158. package/src/components/editor/file-tree/requesting-tree.tsx +8 -14
  159. package/src/components/editor/renderers/CellArray.tsx +4 -3
  160. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
  161. package/src/components/editor/renderers/slides-layout/types.ts +0 -1
  162. package/src/components/pages/home-page.tsx +1 -4
  163. package/src/components/slides/slides-component.tsx +1 -1
  164. package/src/components/slides/slides.css +0 -6
  165. package/src/components/terminal/theme.tsx +0 -1
  166. package/src/components/tracing/tracing-spec.ts +4 -5
  167. package/src/components/ui/range-slider.tsx +2 -4
  168. package/src/components/ui/slider.tsx +1 -3
  169. package/src/components/variables/variables-table.tsx +0 -3
  170. package/src/core/MarimoApp.tsx +6 -9
  171. package/src/core/ai/context/__tests__/registry.test.ts +4 -6
  172. package/src/core/ai/context/providers/cell-output.ts +2 -3
  173. package/src/core/ai/context/providers/error.ts +1 -3
  174. package/src/core/ai/context/providers/file.ts +2 -7
  175. package/src/core/ai/context/providers/tables.ts +2 -3
  176. package/src/core/ai/context/providers/variable.ts +4 -6
  177. package/src/core/cells/logs.ts +1 -1
  178. package/src/core/codemirror/find-replace/search-highlight.ts +1 -3
  179. package/src/core/codemirror/language/LanguageAdapters.ts +3 -9
  180. package/src/core/codemirror/lsp/notebook-lsp.ts +2 -8
  181. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  182. package/src/core/codemirror/rtc/loro/awareness.ts +17 -52
  183. package/src/core/codemirror/rtc/loro/sync.ts +4 -12
  184. package/src/core/config/config-schema.ts +0 -1
  185. package/src/core/config/config.ts +0 -4
  186. package/src/core/hotkeys/hotkeys.ts +4 -8
  187. package/src/core/islands/components/web-components.tsx +10 -13
  188. package/src/core/kernel/RuntimeState.ts +1 -4
  189. package/src/core/kernel/messages.ts +2 -2
  190. package/src/core/network/DeferredRequestRegistry.ts +4 -16
  191. package/src/core/runtime/runtime.ts +4 -5
  192. package/src/core/wasm/bridge.ts +1 -5
  193. package/src/core/wasm/store.ts +1 -4
  194. package/src/core/wasm/worker/message-buffer.ts +2 -3
  195. package/src/core/websocket/types.ts +16 -22
  196. package/src/hooks/useTimer.ts +5 -8
  197. package/src/plugins/core/registerReactComponent.tsx +10 -16
  198. package/src/plugins/impl/DataTablePlugin.tsx +0 -4
  199. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -5
  200. package/src/plugins/impl/SliderPlugin.tsx +1 -3
  201. package/src/plugins/impl/anywidget/model.ts +5 -16
  202. package/src/plugins/impl/data-editor/types.ts +5 -7
  203. package/src/plugins/impl/data-explorer/components/column-summary.tsx +13 -20
  204. package/src/plugins/impl/panel/utils.ts +4 -6
  205. package/src/plugins/layout/StatPlugin.tsx +1 -4
  206. package/src/plugins/plugins.ts +0 -2
  207. package/src/utils/__tests__/dates.test.ts +24 -45
  208. package/src/utils/__tests__/numbers.test.ts +30 -42
  209. package/src/utils/dates.ts +10 -15
  210. package/src/utils/edit-distance.ts +6 -8
  211. package/src/utils/errors.ts +1 -1
  212. package/src/utils/id-tree.tsx +10 -21
  213. package/src/utils/localStorage.ts +4 -13
  214. package/src/utils/numbers.ts +11 -11
  215. package/src/utils/once.ts +0 -32
  216. package/src/utils/paths.ts +1 -4
  217. package/src/utils/pluralize.ts +5 -12
  218. package/src/utils/python-poet/poet.ts +15 -30
  219. package/src/utils/time.ts +1 -5
  220. package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +0 -19
  221. package/dist/assets/_baseEach-9_logFrf.js +0 -1
  222. package/dist/assets/_baseMap-NzEbKt5c.js +0 -1
  223. package/dist/assets/_baseUniq-C5LFcyNC.js +0 -1
  224. package/dist/assets/channel-DHcKBVM4.js +0 -1
  225. package/dist/assets/chat-panel-DgJZr0eS.js +0 -3
  226. package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +0 -1
  227. package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +0 -1
  228. package/dist/assets/clone-CSxIll62.js +0 -1
  229. package/dist/assets/datasources-panel-Bt41Zir-.js +0 -1
  230. package/dist/assets/edit-page-CyTMQV2u.js +0 -129
  231. package/dist/assets/file-explorer-panel-Oy9DbyFP.js +0 -1
  232. package/dist/assets/home-page-Bvwppn9N.js +0 -9
  233. package/dist/assets/index-DadI618h.css +0 -1
  234. package/dist/assets/index-PmY0x4Zd.js +0 -578
  235. package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +0 -2
  236. package/dist/assets/links-4B6ldZ5P.js +0 -7
  237. package/dist/assets/min-DtVSfYKl.js +0 -1
  238. package/dist/assets/outline-panel-CMJjOoN7.js +0 -1
  239. package/dist/assets/snippets-panel-ClNnwKBM.js +0 -1
  240. package/dist/assets/sortBy-D47H6Vyl.js +0 -1
  241. package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +0 -1
  242. package/dist/assets/storage-BNcWOH3-.js +0 -26
  243. package/dist/assets/tracing-DUbJtOyq.js +0 -2
  244. package/dist/assets/variable-panel-BbgupOdG.js +0 -1
  245. package/dist/assets/worker-fHbtoWvT.js +0 -1
  246. package/src/components/data-table/cell-hover-template/feature.ts +0 -14
  247. package/src/components/data-table/cell-hover-template/types.ts +0 -11
  248. package/src/core/i18n/__tests__/locale-provider.test.tsx +0 -176
  249. package/src/core/i18n/locale-provider.tsx +0 -35
  250. package/src/core/i18n/with-locale.tsx +0 -12
  251. package/src/hooks/useFormatting.ts +0 -97
  252. package/src/plugins/layout/OutlinePlugin.tsx +0 -69
  253. package/src/utils/__tests__/once.test.ts +0 -187
@@ -52,7 +52,7 @@ export function getAgentPrompt(filename: string) {
52
52
  ## Best Practices
53
53
 
54
54
  <data_handling>
55
- - Use polars for data manipulation
55
+ - Use pandas for data manipulation
56
56
  - Implement proper data validation
57
57
  - Handle missing values appropriately
58
58
  - Use efficient data structures
@@ -62,7 +62,7 @@ export function getAgentPrompt(filename: string) {
62
62
  <visualization>
63
63
  - For matplotlib: use plt.gca() as the last expression instead of plt.show()
64
64
  - For plotly: return the figure object directly
65
- - For altair: return the chart object directly. Add tooltips where appropriate. You can pass polars dataframes directly to altair.
65
+ - For altair: return the chart object directly
66
66
  - Include proper labels, titles, and color schemes
67
67
  - Make visualizations interactive where appropriate
68
68
  </visualization>
@@ -76,7 +76,7 @@ export function getAgentPrompt(filename: string) {
76
76
  </ui_elements>
77
77
 
78
78
  <sql>
79
- - When writing duckdb, prefer using marimo's SQL cells, which start with df = mo.sql(f"""<your query>""") for DuckDB, or df = mo.sql(f"""<your query>""", engine=engine) for other SQL engines.
79
+ - When writing duckdb, prefer using marimo's SQL cells, which start with _df = mo.sql(query)
80
80
  - See the SQL with duckdb example for an example on how to do this
81
81
  - Don't add comments in cells that use mo.sql()
82
82
  - Consider using \`vega_datasets\` for common example datasets
@@ -144,8 +144,7 @@ export function getAgentPrompt(filename: string) {
144
144
  ${formatCells([
145
145
  `
146
146
  import marimo as mo
147
- import altair as alt
148
- import polars as pl
147
+ import matplotlib.pyplot as plt
149
148
  import numpy as np
150
149
  `,
151
150
  `
@@ -156,18 +155,12 @@ export function getAgentPrompt(filename: string) {
156
155
  x = np.random.rand(n_points.value)
157
156
  y = np.random.rand(n_points.value)
158
157
 
159
- df = pl.DataFrame({"x": x, "y": y})
160
-
161
- chart = alt.Chart(df).mark_circle(opacity=0.7).encode(
162
- x=alt.X('x', title='X axis'),
163
- y=alt.Y('y', title='Y axis')
164
- ).properties(
165
- title=f"Scatter plot with {n_points.value} points",
166
- width=400,
167
- height=300
168
- )
169
-
170
- chart
158
+ plt.figure(figsize=(8, 6))
159
+ plt.scatter(x, y, alpha=0.7)
160
+ plt.title(f"Scatter plot with {n_points.value} points")
161
+ plt.xlabel("X axis")
162
+ plt.ylabel("Y axis")
163
+ plt.gca()
171
164
  `,
172
165
  ])}
173
166
  </example>
@@ -176,11 +169,11 @@ export function getAgentPrompt(filename: string) {
176
169
  ${formatCells([
177
170
  `
178
171
  import marimo as mo
179
- import polars as pl
172
+ import pandas as pd
180
173
  from vega_datasets import data
181
174
  `,
182
175
  `
183
- cars_df = pl.DataFrame(data.cars())
176
+ cars_df = data.cars()
184
177
  mo.ui.data_explorer(cars_df)
185
178
  `,
186
179
  ])}
@@ -190,44 +183,43 @@ export function getAgentPrompt(filename: string) {
190
183
  ${formatCells([
191
184
  `
192
185
  import marimo as mo
193
- import polars as pl
194
- import altair as alt
186
+ import pandas as pd
187
+ import matplotlib.pyplot as plt
188
+ import seaborn as sns
195
189
  `,
196
190
  `
197
- iris = pl.read_csv("hf://datasets/scikit-learn/iris/Iris.csv")
191
+ iris = sns.load_dataset('iris')
198
192
  `,
199
193
  `
200
194
  species_selector = mo.ui.dropdown(
201
- options=["All"] + iris["Species"].unique().to_list(),
195
+ options=["All"] + iris["species"].unique().tolist(),
202
196
  value="All",
203
- label="Species",
197
+ label="Species"
204
198
  )
205
199
  x_feature = mo.ui.dropdown(
206
- options=iris.select(pl.col(pl.Float64, pl.Int64)).columns,
207
- value="SepalLengthCm",
208
- label="X Feature",
200
+ options=iris.select_dtypes('number').columns.tolist(),
201
+ value="sepal_length",
202
+ label="X Feature"
209
203
  )
210
204
  y_feature = mo.ui.dropdown(
211
- options=iris.select(pl.col(pl.Float64, pl.Int64)).columns,
212
- value="SepalWidthCm",
213
- label="Y Feature",
205
+ options=iris.select_dtypes('number').columns.tolist(),
206
+ value="sepal_width",
207
+ label="Y Feature"
214
208
  )
215
209
  mo.hstack([species_selector, x_feature, y_feature])
216
210
  `,
217
211
  `
218
- filtered_data = iris if species_selector.value == "All" else iris.filter(pl.col("Species") == species_selector.value)
219
-
220
- chart = alt.Chart(filtered_data).mark_circle().encode(
221
- x=alt.X(x_feature.value, title=x_feature.value),
222
- y=alt.Y(y_feature.value, title=y_feature.value),
223
- color='Species'
224
- ).properties(
225
- title=f"{y_feature.value} vs {x_feature.value}",
226
- width=500,
227
- height=400
212
+ filtered_data = iris if species_selector.value == "All" else iris[iris["species"] == species_selector.value]
213
+
214
+ plt.figure(figsize=(10, 6))
215
+ sns.scatterplot(
216
+ data=filtered_data,
217
+ x=x_feature.value,
218
+ y=y_feature.value,
219
+ hue="species"
228
220
  )
229
-
230
- chart
221
+ plt.title(f"{y_feature.value} vs {x_feature.value}")
222
+ plt.gca()
231
223
  `,
232
224
  ])}
233
225
  </example>
@@ -250,21 +242,14 @@ export function getAgentPrompt(filename: string) {
250
242
  `
251
243
  import marimo as mo
252
244
  import altair as alt
253
- import polars as pl
245
+ import pandas as pd
254
246
  `,
255
247
  `# Load dataset
256
- weather = pl.read_csv("https://raw.githubusercontent.com/vega/vega-datasets/refs/heads/main/data/weather.csv")
257
- weather_dates = weather.with_columns(
258
- pl.col("date").str.strptime(pl.Date, format="%Y-%m-%d")
259
- )
260
- _chart = (
261
- alt.Chart(weather_dates)
262
- .mark_point()
263
- .encode(
264
- x="date:T",
265
- y="temp_max",
266
- color="location",
267
- )
248
+ cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
249
+ _chart = alt.Chart(cars_df).mark_point().encode(
250
+ x='Horsepower',
251
+ y='Miles_per_Gallon',
252
+ color='Origin',
268
253
  )
269
254
  `,
270
255
  "chart = mo.ui.altair_chart(_chart)\nchart",
@@ -293,13 +278,9 @@ export function getAgentPrompt(filename: string) {
293
278
 
294
279
  <example title="SQL with duckdb">
295
280
  ${formatCells([
296
- "import marimo as mo\n import polars as pl",
297
- `weather = pl.read_csv('https://raw.githubusercontent.com/vega/vega-datasets/refs/heads/main/data/weather.csv')`,
298
- `seattle_weather_df = mo.sql(
299
- f"""
300
- SELECT * FROM weather WHERE location = 'Seattle';
301
- """
302
- )`,
281
+ "import marimo as mo\nimport pandas as pd",
282
+ `cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')`,
283
+ `_df = mo.sql("SELECT * from cars_df WHERE Miles_per_Gallon > 20")`,
303
284
  ])}
304
285
  </example>`;
305
286
  }
@@ -18,7 +18,6 @@ import {
18
18
  SquareIcon,
19
19
  } from "lucide-react";
20
20
  import { memo, useEffect, useMemo, useRef, useState } from "react";
21
- import { useLocale } from "react-aria";
22
21
  import useEvent from "react-use-event-hook";
23
22
  import { Button } from "@/components/ui/button";
24
23
  import {
@@ -104,7 +103,6 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
104
103
  }) => {
105
104
  const { handleClick } = useOpenSettingsToTab();
106
105
  const chatState = useAtomValue(chatStateAtom);
107
- const { locale } = useLocale();
108
106
  const chats = useMemo(() => {
109
107
  return [...chatState.chats.values()].sort(
110
108
  (a, b) => b.updatedAt - a.updatedAt,
@@ -161,7 +159,7 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
161
159
  >
162
160
  <div className="font-medium">{chat.title}</div>
163
161
  <div className="text-sm text-muted-foreground">
164
- {timeAgo(chat.updatedAt, locale)}
162
+ {timeAgo(chat.updatedAt)}
165
163
  </div>
166
164
  </button>
167
165
  ))}
@@ -238,7 +236,6 @@ const ChatMessageDisplay: React.FC<ChatMessageProps> = memo(
238
236
  result={part.output}
239
237
  className="my-2"
240
238
  state={part.state}
241
- input={part.input}
242
239
  />
243
240
  );
244
241
  }
@@ -270,7 +267,6 @@ const ChatMessageDisplay: React.FC<ChatMessageProps> = memo(
270
267
  toolName={part.type}
271
268
  result={part.output}
272
269
  state={part.state}
273
- input={part.input}
274
270
  className="my-2"
275
271
  />
276
272
  );
@@ -3,7 +3,7 @@
3
3
  import { EditorView } from "@codemirror/view";
4
4
  import { useAtomValue } from "jotai";
5
5
  import { BetweenHorizontalStartIcon } from "lucide-react";
6
- import { memo, Suspense, useState } from "react";
6
+ import { memo, Suspense, useEffect, useState } from "react";
7
7
  import { Streamdown, type StreamdownProps } from "streamdown";
8
8
  import { Button, type ButtonProps } from "@/components/ui/button";
9
9
  import { maybeAddMarimoImport } from "@/core/cells/add-missing-import";
@@ -114,9 +114,9 @@ const CodeBlock = ({ code, language }: CodeBlockProps) => {
114
114
  const { theme } = useTheme();
115
115
  const [value, setValue] = useState(code);
116
116
 
117
- if (value !== code) {
117
+ useEffect(() => {
118
118
  setValue(code);
119
- }
119
+ }, [code]);
120
120
 
121
121
  const handleCopyCode = async () => {
122
122
  await copyToClipboard(value);
@@ -150,13 +150,18 @@ const CodeBlock = ({ code, language }: CodeBlockProps) => {
150
150
  const CopyButton: React.FC<ButtonProps> = ({ onClick, ...props }) => {
151
151
  const [copied, setCopied] = useState(false);
152
152
 
153
+ useEffect(() => {
154
+ if (copied) {
155
+ setTimeout(() => setCopied(false), 1000);
156
+ }
157
+ }, [copied]);
158
+
153
159
  return (
154
160
  <Button
155
161
  {...props}
156
162
  onClick={(e) => {
157
163
  onClick?.(e);
158
164
  setCopied(true);
159
- setTimeout(() => setCopied(false), 1000);
160
165
  }}
161
166
  >
162
167
  {copied ? "Copied" : "Copy"}
@@ -170,11 +175,10 @@ const COMPONENTS: Components = {
170
175
  code: ({ children, className }) => {
171
176
  const language = className?.replace("language-", "");
172
177
  if (language && typeof children === "string") {
173
- const code = children.trim();
174
178
  return (
175
179
  <div>
176
180
  <div className="text-xs text-muted-foreground pl-1">{language}</div>
177
- <CodeBlock code={code} language={language} />
181
+ <CodeBlock code={children.trim()} language={language} />
178
182
  </div>
179
183
  );
180
184
  }
@@ -45,21 +45,17 @@ const PrettySuccessResult: React.FC<{ data: SuccessResult }> = ({ data }) => {
45
45
  } = data;
46
46
 
47
47
  return (
48
- <div className="flex flex-col gap-1.5">
49
- <div className="flex items-center justify-between">
50
- <h3 className="text-xs font-semibold text-muted-foreground">
51
- Tool Result
52
- </h3>
53
- <div className="flex items-center gap-2">
54
- <span className="text-xs px-2 py-0.5 bg-[var(--grass-2)] text-[var(--grass-11)] rounded-full font-medium capitalize">
55
- {status}
48
+ <div className="py-1 flex flex-col gap-1">
49
+ {/* Status */}
50
+ <div className="flex items-center gap-2">
51
+ <span className="text-xs font-medium text-[var(--grass-11)] capitalize">
52
+ {status}
53
+ </span>
54
+ {auth_required && (
55
+ <span className="text-xs px-2 py-0.5 bg-[var(--amber-2)] text-[var(--amber-11)] rounded-full">
56
+ Auth Required
56
57
  </span>
57
- {auth_required && (
58
- <span className="text-xs px-2 py-0.5 bg-[var(--amber-2)] text-[var(--amber-11)] rounded-full">
59
- Auth Required
60
- </span>
61
- )}
62
- </div>
58
+ )}
63
59
  </div>
64
60
 
65
61
  {/* Message */}
@@ -72,18 +68,17 @@ const PrettySuccessResult: React.FC<{ data: SuccessResult }> = ({ data }) => {
72
68
 
73
69
  {/* Data */}
74
70
  {rest && (
75
- <div className="space-y-3">
71
+ <div className="flex flex-col gap-1">
76
72
  {Object.entries(rest).map(([key, value]) => {
77
73
  if (isEmpty(value)) {
78
74
  return null;
79
75
  }
80
76
  return (
81
- <div key={key} className="space-y-1.5">
82
- <div className="text-xs font-medium text-muted-foreground capitalize flex items-center gap-2">
83
- <div className="w-1.5 h-1.5 bg-[var(--blue-9)] rounded-full" />
84
- {key}
77
+ <div key={key}>
78
+ <div className="text-xs font-medium text-muted-foreground mb-1 capitalize">
79
+ {key}:
85
80
  </div>
86
- <pre className="bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64">
81
+ <pre className="bg-[var(--slate-2)] p-1 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64">
87
82
  {JSON.stringify(value, null, 2)}
88
83
  </pre>
89
84
  </div>
@@ -112,29 +107,6 @@ const ResultRenderer: React.FC<{ result: unknown }> = ({ result }) => {
112
107
  );
113
108
  };
114
109
 
115
- const ToolArgsRenderer: React.FC<{ input: unknown }> = ({ input }) => {
116
- const hasinput = input && input !== null;
117
-
118
- if (!hasinput) {
119
- return null;
120
- }
121
-
122
- const isObject =
123
- typeof input === "object" &&
124
- Object.keys(input as Record<string, unknown>).length > 0;
125
-
126
- return (
127
- <div className="space-y-2">
128
- <h3 className="text-xs font-semibold text-muted-foreground">
129
- Tool Request
130
- </h3>
131
- <pre className="bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64">
132
- {isObject ? JSON.stringify(input, null, 2) : String(input)}
133
- </pre>
134
- </div>
135
- );
136
- };
137
-
138
110
  interface ToolCallAccordionProps {
139
111
  toolName: string;
140
112
  result: unknown;
@@ -142,7 +114,6 @@ interface ToolCallAccordionProps {
142
114
  index?: number;
143
115
  state?: ToolUIPart["state"];
144
116
  className?: string;
145
- input?: unknown;
146
117
  }
147
118
 
148
119
  export const ToolCallAccordion: React.FC<ToolCallAccordionProps> = ({
@@ -152,7 +123,6 @@ export const ToolCallAccordion: React.FC<ToolCallAccordionProps> = ({
152
123
  index = 0,
153
124
  state,
154
125
  className,
155
- input,
156
126
  }) => {
157
127
  const hasResult = state === "output-available" && (result || error);
158
128
  const status = error ? "error" : hasResult ? "success" : "loading";
@@ -206,23 +176,21 @@ export const ToolCallAccordion: React.FC<ToolCallAccordionProps> = ({
206
176
  </code>
207
177
  </span>
208
178
  </AccordionTrigger>
209
- <AccordionContent className="py-2 px-2">
179
+ <AccordionContent className="pb-2 px-2">
210
180
  {/* Only show content when tool is complete */}
211
181
  {hasResult && (
212
182
  <div className="space-y-3">
213
- <ToolArgsRenderer input={input} />
214
183
  {result !== undefined && result !== null && (
215
184
  <ResultRenderer result={result} />
216
185
  )}
217
186
 
218
187
  {/* Error */}
219
188
  {error && (
220
- <div className="bg-[var(--red-2)] border border-[var(--red-6)] rounded-lg p-3">
221
- <div className="text-xs font-semibold text-[var(--red-11)] mb-2 flex items-center gap-2">
222
- <div className="w-1.5 h-1.5 bg-[var(--red-9)] rounded-full" />
223
- Error
189
+ <div>
190
+ <div className="text-xs font-medium text-[var(--red-11)] mb-1">
191
+ Error:
224
192
  </div>
225
- <div className="text-sm text-[var(--red-11)] leading-relaxed">
193
+ <div className="bg-[var(--red-2)] border border-[var(--red-6)] rounded-md p-3 text-sm text-[var(--red-11)]">
226
194
  {error}
227
195
  </div>
228
196
  </div>
@@ -31,14 +31,13 @@ export const SearchBar = ({
31
31
  onSearch(debouncedSearch);
32
32
  }, [debouncedSearch, onSearch]);
33
33
 
34
- if (!hidden) {
35
- ref.current?.focus();
36
- }
37
-
38
- // Reset internal value when hidden becomes true
39
- if (hidden && internalValue !== "") {
40
- setInternalValue("");
41
- }
34
+ useEffect(() => {
35
+ if (hidden) {
36
+ setInternalValue("");
37
+ } else {
38
+ ref.current?.focus();
39
+ }
40
+ }, [hidden]);
42
41
 
43
42
  return (
44
43
  <div
@@ -6,44 +6,37 @@ import {
6
6
  } from "@/utils/numbers";
7
7
  import { applyFormat } from "../column-formatting/feature";
8
8
 
9
- const locale = "en-US";
10
-
11
9
  describe("applyFormat", () => {
12
10
  it("should return an empty string for null, undefined, or empty string values", () => {
13
- expect(
14
- applyFormat(null, { format: "Date", dataType: "date", locale }),
15
- ).toBe("");
16
- expect(
17
- applyFormat(undefined, { format: "Date", dataType: "date", locale }),
18
- ).toBe("");
19
- expect(applyFormat("", { format: "Date", dataType: "date", locale })).toBe(
11
+ expect(applyFormat(null, { format: "Date", dataType: "date" })).toBe("");
12
+ expect(applyFormat(undefined, { format: "Date", dataType: "date" })).toBe(
20
13
  "",
21
14
  );
15
+ expect(applyFormat("", { format: "Date", dataType: "date" })).toBe("");
22
16
  });
23
17
 
24
18
  describe("date formatting", () => {
25
19
  it("should format date values correctly", () => {
26
20
  const date = "2023-10-01T12:00:00Z";
27
- expect(
28
- applyFormat(date, { format: "Date", dataType: "date", locale }),
29
- ).toBe("10/1/23");
30
- expect(
31
- applyFormat(date, { format: "Datetime", dataType: "date", locale }),
32
- ).toBe("10/1/23, 12:00:00 PM UTC");
21
+ expect(applyFormat(date, { format: "Date", dataType: "date" })).toBe(
22
+ "10/1/23",
23
+ );
24
+ expect(applyFormat(date, { format: "Datetime", dataType: "date" })).toBe(
25
+ "10/1/23, 12:00:00 PM UTC",
26
+ );
33
27
  });
34
28
 
35
29
  it("should format time values correctly", () => {
36
30
  const time = "12:00:00Z";
37
- expect(
38
- applyFormat(time, { format: "Time", dataType: "time", locale }),
39
- ).toBe("12:00:00Z");
31
+ expect(applyFormat(time, { format: "Time", dataType: "time" })).toBe(
32
+ "12:00:00Z",
33
+ );
40
34
  });
41
35
 
42
36
  it("should format datetime values correctly", () => {
43
37
  const datetime = "2023-10-01T12:00:00Z";
44
38
  expect(
45
39
  applyFormat(datetime, {
46
- locale,
47
40
  format: "Datetime",
48
41
  dataType: "datetime",
49
42
  }),
@@ -54,28 +47,26 @@ describe("applyFormat", () => {
54
47
  describe("number formatting", () => {
55
48
  it("should format number values correctly", () => {
56
49
  const number = "1234.567";
50
+ expect(applyFormat(number, { format: "Auto", dataType: "number" })).toBe(
51
+ "1,234.57",
52
+ );
57
53
  expect(
58
- applyFormat(number, { format: "Auto", dataType: "number", locale }),
59
- ).toBe("1,234.57");
60
- expect(
61
- applyFormat(number, { format: "Percent", dataType: "number", locale }),
54
+ applyFormat(number, { format: "Percent", dataType: "number" }),
62
55
  ).toBe("123,456.7%");
63
56
  expect(
64
57
  applyFormat(number, {
65
- locale,
66
58
  format: "Scientific",
67
59
  dataType: "number",
68
60
  }),
69
- ).toBe(prettyScientificNumber(1234.567, { shouldRound: true, locale }));
61
+ ).toBe(prettyScientificNumber(1234.567, { shouldRound: true }));
70
62
  expect(
71
63
  applyFormat(number, {
72
64
  format: "Engineering",
73
65
  dataType: "number",
74
- locale,
75
66
  }),
76
- ).toBe(prettyEngineeringNumber(1234.567, locale));
67
+ ).toBe(prettyEngineeringNumber(1234.567));
77
68
  expect(
78
- applyFormat(number, { format: "Integer", dataType: "number", locale }),
69
+ applyFormat(number, { format: "Integer", dataType: "number" }),
79
70
  ).toBe("1,235");
80
71
  });
81
72
  });
@@ -84,47 +75,41 @@ describe("applyFormat", () => {
84
75
  it("should format string values correctly", () => {
85
76
  const str = "hello world";
86
77
  expect(
87
- applyFormat(str, { format: "Uppercase", dataType: "string", locale }),
78
+ applyFormat(str, { format: "Uppercase", dataType: "string" }),
88
79
  ).toBe("HELLO WORLD");
89
80
  expect(
90
- applyFormat(str, { format: "Lowercase", dataType: "string", locale }),
81
+ applyFormat(str, { format: "Lowercase", dataType: "string" }),
91
82
  ).toBe("hello world");
92
83
  expect(
93
- applyFormat(str, { format: "Capitalize", dataType: "string", locale }),
84
+ applyFormat(str, { format: "Capitalize", dataType: "string" }),
94
85
  ).toBe("Hello world");
95
- expect(
96
- applyFormat(str, { format: "Title", dataType: "string", locale }),
97
- ).toBe("Hello World");
86
+ expect(applyFormat(str, { format: "Title", dataType: "string" })).toBe(
87
+ "Hello World",
88
+ );
98
89
  });
99
90
  });
100
91
 
101
92
  describe("boolean formatting", () => {
102
93
  it("should format boolean values correctly", () => {
94
+ expect(applyFormat(true, { format: "Yes/No", dataType: "boolean" })).toBe(
95
+ "Yes",
96
+ );
103
97
  expect(
104
- applyFormat(true, { format: "Yes/No", dataType: "boolean", locale }),
105
- ).toBe("Yes");
106
- expect(
107
- applyFormat(false, { format: "Yes/No", dataType: "boolean", locale }),
98
+ applyFormat(false, { format: "Yes/No", dataType: "boolean" }),
108
99
  ).toBe("No");
100
+ expect(applyFormat(true, { format: "On/Off", dataType: "boolean" })).toBe(
101
+ "On",
102
+ );
109
103
  expect(
110
- applyFormat(true, { format: "On/Off", dataType: "boolean", locale }),
111
- ).toBe("On");
112
- expect(
113
- applyFormat(false, { format: "On/Off", dataType: "boolean", locale }),
104
+ applyFormat(false, { format: "On/Off", dataType: "boolean" }),
114
105
  ).toBe("Off");
115
106
  });
116
107
  });
117
108
 
118
109
  it("should return the original value for unknown data types or formats", () => {
119
110
  expect(
120
- applyFormat("some value", {
121
- format: "Auto",
122
- dataType: "unknown",
123
- locale,
124
- }),
111
+ applyFormat("some value", { format: "Auto", dataType: "unknown" }),
125
112
  ).toBe("some value");
126
- expect(
127
- applyFormat(123, { format: "Auto", dataType: "unknown", locale }),
128
- ).toBe(123);
113
+ expect(applyFormat(123, { format: "Auto", dataType: "unknown" })).toBe(123);
129
114
  });
130
115
  });
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
  import type { ColumnDef, RowSelectionState } from "@tanstack/react-table";
3
- import { render, screen } from "@testing-library/react";
3
+ import { render } from "@testing-library/react";
4
4
  import { describe, expect, it, vi } from "vitest";
5
5
  import { TooltipProvider } from "@/components/ui/tooltip";
6
6
  import { DataTable } from "../data-table";
@@ -57,42 +57,4 @@ describe("DataTable", () => {
57
57
  // Verify the rowSelection prop is maintained
58
58
  expect(commonProps.rowSelection).toEqual(initialRowSelection);
59
59
  });
60
-
61
- it("applies hoverTemplate to the row title using row values", () => {
62
- interface RowData {
63
- id: number;
64
- first: string;
65
- last: string;
66
- }
67
-
68
- const testData: RowData[] = [
69
- { id: 1, first: "Michael", last: "Scott" },
70
- { id: 2, first: "Jim", last: "Halpert" },
71
- ];
72
-
73
- const columns: Array<ColumnDef<RowData>> = [
74
- { accessorKey: "first", header: "First" },
75
- { accessorKey: "last", header: "Last" },
76
- ];
77
-
78
- render(
79
- <TooltipProvider>
80
- <DataTable
81
- data={testData}
82
- columns={columns}
83
- selection={null}
84
- totalRows={2}
85
- totalColumns={2}
86
- pagination={false}
87
- hoverTemplate={"{{first}} {{last}}"}
88
- />
89
- </TooltipProvider>,
90
- );
91
-
92
- // Grab all rows and assert title attribute computed from template
93
- const rows = screen.getAllByRole("row");
94
- // The first row is header; subsequent rows correspond to data
95
- expect(rows[1]).toHaveAttribute("title", "Michael Scott");
96
- expect(rows[2]).toHaveAttribute("title", "Jim Halpert");
97
- });
98
60
  });