@marimo-team/islands 0.16.1 → 0.16.3

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 (238) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DyqLQGPc.js → ConnectedDataExplorerComponent-CareOso9.js} +2 -2
  2. package/dist/{ImageComparisonComponent-CQDGJfUA.js → ImageComparisonComponent-I_Z738Uj.js} +1 -1
  3. package/dist/{_baseUniq-B2Nna6Kt.js → _baseUniq-D-Kb4EU4.js} +1 -1
  4. package/dist/{any-language-editor-D-wq0tOG.js → any-language-editor-BRWmYor8.js} +1 -1
  5. package/dist/{architectureDiagram-W76B3OCA-C6tdnMBf.js → architectureDiagram-W76B3OCA-bZJcJYGH.js} +4 -4
  6. package/dist/assets/{worker-B0C57BK8.js → worker-DMlIUTIq.js} +18 -17
  7. package/dist/{blockDiagram-QIGZ2CNN-IagL8LCN.js → blockDiagram-QIGZ2CNN-DyXjO8fR.js} +5 -5
  8. package/dist/{c4Diagram-FPNF74CW-D3_lIWUP.js → c4Diagram-FPNF74CW-Bfs9ui2r.js} +2 -2
  9. package/dist/{channel-DCJI_DKk.js → channel-CMup9X3Z.js} +1 -1
  10. package/dist/{chunk-4BX2VUAB-B2DrODwN.js → chunk-4BX2VUAB-CW-ni6M_.js} +1 -1
  11. package/dist/{chunk-55IACEB6-BUWDsQ-t.js → chunk-55IACEB6-Bj-Indya.js} +1 -1
  12. package/dist/{chunk-FMBD7UC4-BExPNFv1.js → chunk-FMBD7UC4-9IC8qSSk.js} +1 -1
  13. package/dist/{chunk-K7UQS3LO-Cixi-Yko.js → chunk-K7UQS3LO-aapkEuWN.js} +4 -4
  14. package/dist/{chunk-QN33PNHL-B83MtvER.js → chunk-QN33PNHL-Bo5dJ5T5.js} +1 -1
  15. package/dist/{chunk-QZHKN3VN-CXvbu85X.js → chunk-QZHKN3VN-BkMzjJYY.js} +1 -1
  16. package/dist/{chunk-TVAH2DTR-CpiumCHg.js → chunk-TVAH2DTR-Wqy_C_Rn.js} +3 -3
  17. package/dist/{chunk-TZMSLE5B-DIzaZjcI.js → chunk-TZMSLE5B-DjBmEAUz.js} +1 -1
  18. package/dist/{classDiagram-v2-RKCZMP56-DyN5HPdk.js → classDiagram-KNZD7YFC-DUsaN1O4.js} +2 -2
  19. package/dist/{classDiagram-KNZD7YFC-DyN5HPdk.js → classDiagram-v2-RKCZMP56-DUsaN1O4.js} +2 -2
  20. package/dist/{clone-DrJYap2i.js → clone-Dkt_7KOK.js} +1 -1
  21. package/dist/{cose-bilkent-S5V4N54A-D39b4WrQ.js → cose-bilkent-S5V4N54A-ClBuGZWI.js} +2 -2
  22. package/dist/{dagre-5GWH7T2D-BLjRxDpS.js → dagre-5GWH7T2D-BzmDIGaM.js} +6 -6
  23. package/dist/{data-grid-overlay-editor-DTALqerV.js → data-grid-overlay-editor-NiU9Ea77.js} +2 -2
  24. package/dist/{diagram-N5W7TBWH-MM8AIKGR.js → diagram-N5W7TBWH-BlO1yw_g.js} +5 -5
  25. package/dist/{diagram-QEK2KX5R-BZGarWuJ.js → diagram-QEK2KX5R-BvK83LUx.js} +3 -3
  26. package/dist/{diagram-S2PKOQOG-CnPinN9Q.js → diagram-S2PKOQOG-DvBzRYd7.js} +3 -3
  27. package/dist/{dockerfile-U8DnCJ4X.js → dockerfile-CPQG2tLO.js} +1 -1
  28. package/dist/{erDiagram-AWTI2OKA-CvDVbxOO.js → erDiagram-AWTI2OKA-Doy9FRTX.js} +4 -4
  29. package/dist/{flowDiagram-PVAE7QVJ-C2uuBTZS.js → flowDiagram-PVAE7QVJ-D_tX_HU1.js} +5 -5
  30. package/dist/{ganttDiagram-OWAHRB6G-BEff10RF.js → ganttDiagram-OWAHRB6G-CV03BHVY.js} +4 -4
  31. package/dist/{gitGraphDiagram-NY62KEGX-wggu0kb2.js → gitGraphDiagram-NY62KEGX-w3szEguZ.js} +4 -4
  32. package/dist/{glide-data-editor-Bqh5_dzJ.js → glide-data-editor-akznFrmp.js} +3 -3
  33. package/dist/{graph-DKpp_wzf.js → graph-CjrrDHdT.js} +3 -3
  34. package/dist/index-CIJJs0Tu.js +40382 -0
  35. package/dist/{index-DzJ_YPCG.js → index-DMo6cbcV.js} +3 -3
  36. package/dist/{index-4XruEJkp.js → index-DlV2CtJb.js} +1 -1
  37. package/dist/{index-DdfF_cLK.js → index-Y-Vbae6Z.js} +1 -1
  38. package/dist/{infoDiagram-STP46IZ2-DF7KW-Op.js → infoDiagram-STP46IZ2-BcBV2j75.js} +2 -2
  39. package/dist/{journeyDiagram-BIP6EPQ6-B_jmhmqd.js → journeyDiagram-BIP6EPQ6-BTGMSgvB.js} +3 -3
  40. package/dist/{kanban-definition-6OIFK2YF-B-M9FTyw.js → kanban-definition-6OIFK2YF-aopNqZ1Y.js} +2 -2
  41. package/dist/{layout-C4oVYZZD.js → layout-Dvo9pb_w.js} +4 -4
  42. package/dist/{linear-C-HCGr0T.js → linear-CHnELER9.js} +1 -1
  43. package/dist/{main-B9x2-9f2.js → main-kLZGkzVQ.js} +41787 -40423
  44. package/dist/main.js +1 -1
  45. package/dist/{mermaid-BE4cM3Qs.js → mermaid-DgM4_4bD.js} +30 -30
  46. package/dist/{min-DTpHJ698.js → min-cX4DuL_n.js} +2 -2
  47. package/dist/{mindmap-definition-Q6HEUPPD-Cpd-hO1E.js → mindmap-definition-Q6HEUPPD-DZjbYryy.js} +3 -3
  48. package/dist/{number-overlay-editor-CvURA2Ud.js → number-overlay-editor-8MpIObf7.js} +2 -2
  49. package/dist/{pieDiagram-ADFJNKIX-D9f_f6fn.js → pieDiagram-ADFJNKIX-D6L1IYAc.js} +3 -3
  50. package/dist/{quadrantDiagram-LMRXKWRM-DgllE7xw.js → quadrantDiagram-LMRXKWRM-nOyuc3Bf.js} +2 -2
  51. package/dist/{react-plotly-BU-JRJSi.js → react-plotly-ChkfYiVe.js} +1 -1
  52. package/dist/{requirementDiagram-4UW4RH46-Dk_G8eUb.js → requirementDiagram-4UW4RH46-OVV8wsju.js} +3 -3
  53. package/dist/{sankeyDiagram-GR3RE2ED-BhLIhDc1.js → sankeyDiagram-GR3RE2ED-qZHMdnE_.js} +1 -1
  54. package/dist/{sequenceDiagram-C3RYC4MD-DHoZdMFJ.js → sequenceDiagram-C3RYC4MD-D0bOqf-t.js} +3 -3
  55. package/dist/{slides-component-DXAgdf7K.js → slides-component-CNzLDdA3.js} +1 -1
  56. package/dist/{stateDiagram-KXAO66HF-C1Ie-7Xf.js → stateDiagram-KXAO66HF-CFNCnNJS.js} +4 -4
  57. package/dist/{stateDiagram-v2-UMBNRL4Z--CRuIHtM.js → stateDiagram-v2-UMBNRL4Z-CnIh27m8.js} +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/{time-yQjlGPwa.js → time-Z7CJSfOW.js} +2 -2
  60. package/dist/{timeline-definition-XQNQX7LJ-D_PjxB1B.js → timeline-definition-XQNQX7LJ-BYLMfrvK.js} +1 -1
  61. package/dist/{treemap-75Q7IDZK--NYqQjUZ.js → treemap-75Q7IDZK-BEh1HacP.js} +5 -5
  62. package/dist/{vega-component-CCUOMM5K.js → vega-component-iMjXd3tD.js} +2 -2
  63. package/dist/{xychartDiagram-6GGTOJPD-WLKsEnzs.js → xychartDiagram-6GGTOJPD-Bmi13ZSG.js} +2 -2
  64. package/package.json +8 -8
  65. package/src/__mocks__/common.ts +5 -3
  66. package/src/__mocks__/notebook.ts +2 -2
  67. package/src/__mocks__/requests.ts +1 -0
  68. package/src/__tests__/main.test.tsx +2 -2
  69. package/src/components/ai/ai-provider-icon.tsx +2 -0
  70. package/src/components/app-config/ai-config.tsx +32 -1
  71. package/src/components/app-config/common.tsx +2 -2
  72. package/src/components/app-config/user-config-form.tsx +26 -0
  73. package/src/components/audio/audio-recorder.tsx +0 -1
  74. package/src/components/chat/acp/blocks.tsx +2 -2
  75. package/src/components/chat/acp/thread.tsx +3 -5
  76. package/src/components/chat/acp/utils.ts +5 -5
  77. package/src/components/chat/chat-panel.tsx +1 -1
  78. package/src/components/data-table/__tests__/columns.test.tsx +38 -0
  79. package/src/components/data-table/__tests__/data-table.test.tsx +2 -2
  80. package/src/components/data-table/cell-hover-template/feature.ts +1 -1
  81. package/src/components/data-table/cell-hover-template/types.ts +1 -1
  82. package/src/components/data-table/charts/__tests__/altair-generator.test.ts +1 -1
  83. package/src/components/data-table/charts/chart-spec/tooltips.ts +3 -3
  84. package/src/components/data-table/charts/components/chart-items.tsx +1 -1
  85. package/src/components/data-table/charts/components/form-fields.tsx +2 -2
  86. package/src/components/data-table/charts/constants.ts +1 -1
  87. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
  88. package/src/components/data-table/column-summary/chart-spec-model.tsx +2 -2
  89. package/src/components/data-table/columns.tsx +22 -3
  90. package/src/components/data-table/data-table.tsx +35 -3
  91. package/src/components/data-table/date-popover.tsx +1 -1
  92. package/src/components/data-table/download-actions.tsx +1 -1
  93. package/src/components/data-table/range-focus/__tests__/utils.test.ts +5 -5
  94. package/src/components/data-table/renderers.tsx +22 -13
  95. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +1 -1
  96. package/src/components/data-table/schemas.ts +16 -0
  97. package/src/components/data-table/types.ts +4 -3
  98. package/src/components/datasources/column-preview.tsx +9 -6
  99. package/src/components/debugger/debugger-code.tsx +1 -1
  100. package/src/components/dependency-graph/custom-node.tsx +15 -6
  101. package/src/components/dependency-graph/dependency-graph-minimap.tsx +2 -2
  102. package/src/components/dependency-graph/dependency-graph-tree.tsx +2 -2
  103. package/src/components/dependency-graph/dependency-graph.tsx +1 -1
  104. package/src/components/dependency-graph/elements.ts +7 -7
  105. package/src/components/dependency-graph/utils/changes.ts +4 -4
  106. package/src/components/editor/Cell.tsx +7 -1
  107. package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
  108. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +1 -1
  109. package/src/components/editor/chrome/panels/packages-panel.tsx +1 -1
  110. package/src/components/editor/columns/storage.ts +1 -1
  111. package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +36 -0
  112. package/src/components/editor/database/__tests__/as-code.test.ts +30 -7
  113. package/src/components/editor/database/add-database-form.tsx +11 -0
  114. package/src/components/editor/database/as-code.ts +104 -5
  115. package/src/components/editor/database/schemas.ts +36 -18
  116. package/src/components/editor/errors/auto-fix.tsx +12 -2
  117. package/src/components/editor/errors/sql-validation-errors.tsx +40 -0
  118. package/src/components/editor/navigation/clipboard.ts +2 -2
  119. package/src/components/editor/output/ConsoleOutput.tsx +14 -2
  120. package/src/components/editor/output/JsonOutput.tsx +1 -1
  121. package/src/components/editor/output/MarimoErrorOutput.tsx +60 -1
  122. package/src/components/editor/output/MarimoTracebackOutput.tsx +17 -2
  123. package/src/components/editor/renderers/grid-layout/types.ts +2 -2
  124. package/src/components/editor/renderers/plugins.ts +1 -1
  125. package/src/components/editor/renderers/types.ts +1 -1
  126. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +7 -7
  127. package/src/components/forms/form.tsx +5 -5
  128. package/src/components/ui/links.tsx +1 -0
  129. package/src/core/ai/__tests__/model-registry.test.ts +0 -10
  130. package/src/core/ai/context/providers/cell-output.ts +1 -18
  131. package/src/core/ai/context/providers/error.ts +2 -2
  132. package/src/core/ai/ids/ids.ts +1 -0
  133. package/src/core/ai/model-registry.ts +2 -1
  134. package/src/core/cells/cells.ts +5 -5
  135. package/src/core/cells/logs.ts +1 -1
  136. package/src/core/cells/types.ts +1 -1
  137. package/src/core/codemirror/__tests__/format.test.ts +6 -0
  138. package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
  139. package/src/core/codemirror/editing/commands.ts +2 -2
  140. package/src/core/codemirror/find-replace/navigate.ts +1 -1
  141. package/src/core/codemirror/language/__tests__/extension.test.ts +24 -0
  142. package/src/core/codemirror/language/__tests__/sql-validation.test.ts +133 -0
  143. package/src/core/codemirror/language/__tests__/sql.test.ts +764 -79
  144. package/src/core/codemirror/language/languages/markdown.ts +4 -1
  145. package/src/core/codemirror/language/languages/sql/banner-validation-errors.ts +85 -0
  146. package/src/core/codemirror/language/languages/sql/completion-builder.ts +160 -0
  147. package/src/core/codemirror/language/languages/sql/completion-sources.tsx +9 -3
  148. package/src/core/codemirror/language/languages/sql/completion-store.ts +46 -50
  149. package/src/core/codemirror/language/languages/sql/renderers.tsx +485 -0
  150. package/src/core/codemirror/language/languages/sql/sql-mode.ts +20 -0
  151. package/src/core/codemirror/language/languages/sql/sql.ts +218 -4
  152. package/src/core/codemirror/language/languages/sql/utils.ts +4 -1
  153. package/src/core/codemirror/language/panel/panel.tsx +8 -2
  154. package/src/core/codemirror/language/panel/sql.tsx +86 -4
  155. package/src/core/codemirror/language/utils/ast.ts +3 -3
  156. package/src/core/codemirror/lsp/federated-lsp.ts +4 -4
  157. package/src/core/codemirror/lsp/lens.ts +4 -4
  158. package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
  159. package/src/core/codemirror/lsp/types.ts +1 -1
  160. package/src/core/codemirror/markdown/completions.ts +1 -1
  161. package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
  162. package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
  163. package/src/core/config/config-schema.ts +1 -0
  164. package/src/core/config/feature-flag.tsx +6 -2
  165. package/src/core/datasets/request-registry.ts +24 -1
  166. package/src/core/dom/events.ts +1 -1
  167. package/src/core/dom/outline.ts +2 -2
  168. package/src/core/dom/uiregistry.ts +2 -8
  169. package/src/core/errors/__tests__/errors.test.ts +22 -4
  170. package/src/core/errors/errors.ts +29 -1
  171. package/src/core/errors/state.ts +1 -1
  172. package/src/core/islands/bridge.ts +1 -0
  173. package/src/core/islands/main.ts +3 -2
  174. package/src/core/islands/parse.ts +1 -3
  175. package/src/core/kernel/messages.ts +2 -1
  176. package/src/core/network/CachingRequestRegistry.ts +74 -0
  177. package/src/core/network/DeferredRequestRegistry.ts +3 -1
  178. package/src/core/network/__tests__/CachingRequestRegistry.test.ts +73 -0
  179. package/src/core/network/requests-network.ts +7 -0
  180. package/src/core/network/requests-static.ts +1 -0
  181. package/src/core/network/requests-toasting.ts +1 -0
  182. package/src/core/network/types.ts +3 -1
  183. package/src/core/variables/state.ts +2 -2
  184. package/src/core/wasm/__tests__/state.test.ts +1 -1
  185. package/src/core/wasm/bridge.ts +5 -0
  186. package/src/core/websocket/useMarimoWebSocket.tsx +9 -2
  187. package/src/custom.d.ts +1 -1
  188. package/src/hooks/useCellRenderCount.ts +1 -0
  189. package/src/hooks/useResizeHandle.ts +4 -1
  190. package/src/plugins/core/RenderHTML.tsx +1 -2
  191. package/src/plugins/core/registerReactComponent.tsx +23 -19
  192. package/src/plugins/impl/DataTablePlugin.tsx +18 -6
  193. package/src/plugins/impl/FileUploadPlugin.tsx +1 -1
  194. package/src/plugins/impl/RefreshPlugin.tsx +1 -1
  195. package/src/plugins/impl/SliderPlugin.tsx +4 -0
  196. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +27 -9
  197. package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +58 -2
  198. package/src/plugins/impl/anywidget/__tests__/model.test.ts +3 -4
  199. package/src/plugins/impl/anywidget/model.ts +2 -3
  200. package/src/plugins/impl/data-editor/types.ts +1 -1
  201. package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
  202. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +17 -5
  203. package/src/plugins/impl/data-frames/types.ts +1 -1
  204. package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
  205. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  206. package/src/plugins/impl/vega/__tests__/loader.test.ts +2 -2
  207. package/src/plugins/impl/vega/loader.ts +1 -1
  208. package/src/plugins/impl/vega/vega-component.tsx +1 -1
  209. package/src/plugins/impl/vega/vega-loader.ts +2 -2
  210. package/src/plugins/layout/NavigationMenuPlugin.tsx +1 -1
  211. package/src/plugins/layout/RoutesPlugin.tsx +1 -2
  212. package/src/plugins/plugins.ts +2 -2
  213. package/src/stories/dataframe.stories.tsx +2 -0
  214. package/src/utils/Logger.ts +1 -1
  215. package/src/utils/__tests__/data-views.test.ts +30 -68
  216. package/src/utils/__tests__/dom.test.ts +167 -0
  217. package/src/utils/__tests__/id-tree.test.ts +49 -1
  218. package/src/utils/__tests__/storage.test.ts +1 -1
  219. package/src/utils/__tests__/traceback.test.ts +13 -2
  220. package/src/utils/arrays.ts +1 -1
  221. package/src/utils/createReducer.ts +1 -5
  222. package/src/utils/data-views.ts +6 -19
  223. package/src/utils/dom.ts +55 -0
  224. package/src/utils/edit-distance.ts +1 -1
  225. package/src/utils/fileToBase64.ts +1 -1
  226. package/src/utils/id-tree.tsx +20 -18
  227. package/src/utils/json/base64.ts +13 -0
  228. package/src/utils/json/json-parser.ts +2 -2
  229. package/src/utils/lru.ts +4 -0
  230. package/src/utils/mergeRefs.ts +1 -1
  231. package/src/utils/objects.ts +3 -3
  232. package/src/utils/pluralize.ts +1 -1
  233. package/src/utils/routes.ts +2 -2
  234. package/src/utils/sets.ts +1 -1
  235. package/src/utils/traceback.ts +45 -15
  236. package/src/utils/tracer.ts +11 -9
  237. package/dist/index-DW0BCGJE.js +0 -40315
  238. package/src/__tests__/lru.test.ts +0 -74
@@ -1,7 +1,7 @@
1
1
  import { R as q, r as ln, o as P, q as X, C as Z, u as D, v as fn } from "./timer-B0-z63CM.js";
2
- import { c as hn, a as on } from "./linear-C-HCGr0T.js";
2
+ import { c as hn, a as on } from "./linear-CHnELER9.js";
3
3
  import { i as bn } from "./init-DxzjmxYy.js";
4
- import { W as gn, X as d, Y as v, Z as k, _ as x, $ as L, a0 as yn, a1 as R, a2 as H, a3 as W, a4 as pn, a5 as mn, a6 as wn, a7 as Mn, a8 as dn, a9 as vn, aa as kn, ab as $, ac as A, ad as B, ae as K, af as _, ag as j, ah as xn } from "./main-B9x2-9f2.js";
4
+ import { W as gn, X as d, Y as v, Z as k, _ as x, $ as L, a0 as yn, a1 as R, a2 as H, a3 as W, a4 as pn, a5 as mn, a6 as wn, a7 as Mn, a8 as dn, a9 as vn, aa as kn, ab as $, ac as A, ad as B, ae as K, af as _, ag as j, ah as xn } from "./main-kLZGkzVQ.js";
5
5
  function Pn(n, t) {
6
6
  let i;
7
7
  if (t === void 0)
@@ -1,4 +1,4 @@
1
- import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, D as wt, $ as St, z as Et } from "./mermaid-BE4cM3Qs.js";
1
+ import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, D as wt, $ as St, z as Et } from "./mermaid-DgM4_4bD.js";
2
2
  import { d as nt } from "./arc-BOhn-m2C.js";
3
3
  var Q = (function() {
4
4
  var n = /* @__PURE__ */ s(function(x, r, a, c) {
@@ -2,11 +2,11 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  var _a2, _b, _c2, _d2, _e, _f2, _g, _h2, _i2, _j, _k, _l2, _m2, _n2, _o2, _p2, _q;
5
- import { d_ as Kl, bQ as Vl, al as Ma, aT as Hl, u as _t, aO as Wl, ao as Z, bk as jl, bl as zl, k as ql, n as Ni, m as Da, am as Zs, d$ as Fa, aK as Yl, b0 as Ga, e0 as Ua, aM as Xl, b2 as wi, an as Jl, e1 as Ql, bg as Zl, e2 as eu, aP as Ie, q as vt, ar as _i, b3 as tu, e3 as H, e4 as Re } from "./main-B9x2-9f2.js";
6
- import { g as ei, d as bt, k as nu, v as W, l as Ba, m as ru, n as su, a as Ka, c as x, i as qe, r as ae, f as ke, o as z } from "./_baseUniq-B2Nna6Kt.js";
7
- import { m as k, f as Lt, h as I, e as ti, l as Ot, d as iu } from "./min-DTpHJ698.js";
8
- import { ad as P } from "./mermaid-BE4cM3Qs.js";
9
- import { c as te } from "./clone-DrJYap2i.js";
5
+ import { d_ as Kl, bQ as Vl, al as Ma, aT as Hl, u as _t, aO as Wl, ao as Z, bk as jl, bl as zl, k as ql, n as Ni, m as Da, am as Zs, d$ as Fa, aK as Yl, b0 as Ga, e0 as Ua, aM as Xl, b2 as wi, an as Jl, e1 as Ql, bg as Zl, e2 as eu, aP as Ie, q as vt, ar as _i, b3 as tu, e3 as H, e4 as Re } from "./main-kLZGkzVQ.js";
6
+ import { g as ei, d as bt, k as nu, v as W, l as Ba, m as ru, n as su, a as Ka, c as x, i as qe, r as ae, f as ke, o as z } from "./_baseUniq-D-Kb4EU4.js";
7
+ import { m as k, f as Lt, h as I, e as ti, l as Ot, d as iu } from "./min-cX4DuL_n.js";
8
+ import { ad as P } from "./mermaid-DgM4_4bD.js";
9
+ import { c as te } from "./clone-Dkt_7KOK.js";
10
10
  var au = Object.prototype, ou = au.hasOwnProperty, Ee = Kl(function(n, e) {
11
11
  if (Vl(e) || Ma(e)) {
12
12
  Hl(e, _t(e), n);
@@ -1,5 +1,5 @@
1
- import { D as V, F as K, A as Z, G as z, H as R, I as G, j as d, E as W, J as U, r as k, K as j, M, N as $, L as x, O as _, P as B, Q, S as q, T as J, U as Y, V as X } from "./main-B9x2-9f2.js";
2
- import { M as m, V as ee } from "./index-DzJ_YPCG.js";
1
+ import { D as V, F as K, A as Z, G as z, H as R, I as G, j as d, E as W, J as U, r as k, K as j, M, N as $, L as x, O as _, P as B, Q, S as q, T as J, U as Y, V as X } from "./main-kLZGkzVQ.js";
2
+ import { M as m, V as ee } from "./index-DMo6cbcV.js";
3
3
  function te(e) {
4
4
  return e.data && "url" in e.data && (e.data.url = V(e.data.url).href), e;
5
5
  }
@@ -1,9 +1,9 @@
1
1
  var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j;
2
- import { _ as a, s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, l as Et, K as ri, e as hi, z as li, G as xt, F as It, H as ci, M as ui, i as gi, ac as xi } from "./mermaid-BE4cM3Qs.js";
2
+ import { _ as a, s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, l as Et, K as ri, e as hi, z as li, G as xt, F as It, H as ci, M as ui, i as gi, ac as xi } from "./mermaid-DgM4_4bD.js";
3
3
  import { i as di } from "./init-DxzjmxYy.js";
4
4
  import { o as fi } from "./ordinal-CYN5qNoq.js";
5
5
  import { r as pi } from "./range-DdOGybNB.js";
6
- import { l as Tt } from "./linear-C-HCGr0T.js";
6
+ import { l as Tt } from "./linear-CHnELER9.js";
7
7
  import { l as Dt } from "./timer-B0-z63CM.js";
8
8
  function ht() {
9
9
  var t = fi().unknown(void 0), i = t.domain, e = t.range, s = 0, n = 1, d, g, m = false, S = 0, D = 0, v = 0.5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -52,7 +52,7 @@
52
52
  "@marimo-team/codemirror-ai": "^0.3.2",
53
53
  "@marimo-team/codemirror-languageserver": "1.15.24",
54
54
  "@marimo-team/codemirror-mcp": "^0.1.5",
55
- "@marimo-team/codemirror-sql": "^0.2.1",
55
+ "@marimo-team/codemirror-sql": "^0.2.3",
56
56
  "@marimo-team/llm-info": "workspace:*",
57
57
  "@marimo-team/marimo-api": "workspace:*",
58
58
  "@marimo-team/react-slotz": "^0.2.0",
@@ -205,9 +205,9 @@
205
205
  "@codecov/vite-plugin": "^1.9.1",
206
206
  "@csstools/postcss-light-dark-function": "^2.0.10",
207
207
  "@playwright/test": "^1.55.0",
208
- "@storybook/addon-docs": "^9.1.3",
209
- "@storybook/addon-links": "^9.1.3",
210
- "@storybook/react-vite": "^9.1.3",
208
+ "@storybook/addon-docs": "^9.1.8",
209
+ "@storybook/addon-links": "^9.1.8",
210
+ "@storybook/react-vite": "^9.1.8",
211
211
  "@swc-jotai/react-refresh": "^0.3.0",
212
212
  "@testing-library/jest-dom": "^6.8.0",
213
213
  "@testing-library/react": "^16.3.0",
@@ -242,11 +242,11 @@
242
242
  "react": "^19.1.1",
243
243
  "react-compiler-runtime": "19.1.0-rc.3",
244
244
  "react-dom": "^19.1.1",
245
- "storybook": "^9.1.3",
245
+ "storybook": "^9.1.8",
246
246
  "stylelint": "^16.23.1",
247
247
  "stylelint-config-standard": "^36.0.1",
248
- "tailwindcss": "^4.1.12",
249
- "vite": "^6.3.5",
248
+ "tailwindcss": "^4.1.13",
249
+ "vite": "^6.3.6",
250
250
  "vite-plugin-top-level-await": "^1.6.0",
251
251
  "vite-plugin-wasm": "^3.5.0",
252
252
  "vite-tsconfig-paths": "^5.1.4",
@@ -1,5 +1,5 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
- /* eslint-disable no-console */
2
+ /** biome-ignore-all lint/suspicious/noConsole: for debugging */
3
3
  import { type Mock, vi } from "vitest";
4
4
  import { invariant } from "@/utils/invariant";
5
5
 
@@ -108,8 +108,10 @@ export const SetupMocks = {
108
108
  delete store[key];
109
109
  }),
110
110
  clear: vi.fn(() => {
111
- // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
112
- Object.keys(store).forEach((key) => delete store[key]);
111
+ for (const key of Object.keys(store)) {
112
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
113
+ delete store[key];
114
+ }
113
115
  }),
114
116
  key: vi.fn((index: number) => Object.keys(store)[index] || null),
115
117
  get length() {
@@ -134,11 +134,11 @@ export const MockNotebook = {
134
134
  * Create a notebook state with error outputs for testing ErrorContextProvider
135
135
  */
136
136
  notebookStateWithErrors: (
137
- errors: Array<{
137
+ errors: {
138
138
  cellId: CellId;
139
139
  cellName: string;
140
140
  errorData: MarimoError[];
141
- }>,
141
+ }[],
142
142
  ): NotebookState => {
143
143
  const cellData: Record<string, Partial<CellData>> = {};
144
144
 
@@ -40,6 +40,7 @@ export const MockRequestClient = {
40
40
  previewSQLTable: vi.fn().mockResolvedValue({}),
41
41
  previewSQLTableList: vi.fn().mockResolvedValue({ tables: [] }),
42
42
  previewDataSourceConnection: vi.fn().mockResolvedValue({}),
43
+ validateSQL: vi.fn().mockResolvedValue({}),
43
44
  openFile: vi.fn().mockResolvedValue({}),
44
45
  getUsageStats: vi.fn().mockResolvedValue({}),
45
46
  sendPdb: vi.fn().mockResolvedValue({}),
@@ -23,7 +23,7 @@ vi.mock("../utils/vitals", () => ({
23
23
  }));
24
24
 
25
25
  vi.mock("react-dom/client", () => ({
26
- createRoot: vi.fn().mockImplementation((el) => {
26
+ createRoot: vi.fn().mockImplementation((_el) => {
27
27
  return {
28
28
  render: vi.fn(),
29
29
  };
@@ -47,7 +47,7 @@ describe("main", () => {
47
47
 
48
48
  it.each(["edit", "read", "home", "run"])(
49
49
  "should mount with mode %s",
50
- (mode) => {
50
+ (_mode) => {
51
51
  const el = document.createElement("div");
52
52
  mount({ mode: "edit" }, el);
53
53
 
@@ -8,6 +8,7 @@ import GitHubIcon from "@marimo-team/llm-info/icons/github.svg?inline";
8
8
  import GeminiIcon from "@marimo-team/llm-info/icons/googlegemini.svg?inline";
9
9
  import OllamaIcon from "@marimo-team/llm-info/icons/ollama.svg?inline";
10
10
  import OpenAIIcon from "@marimo-team/llm-info/icons/openai.svg?inline";
11
+ import OpenRouterIcon from "@marimo-team/llm-info/icons/openrouter.svg?inline";
11
12
  import { BotIcon } from "lucide-react";
12
13
  import * as React from "react";
13
14
  import type { ProviderId } from "@/core/ai/ids/ids";
@@ -27,6 +28,7 @@ const icons: Record<ProviderId | Aliases, string> = {
27
28
  bedrock: BedrockIcon,
28
29
  deepseek: DeepseekIcon,
29
30
  github: GitHubIcon,
31
+ openrouter: OpenRouterIcon,
30
32
  marimo: marimoIcon,
31
33
  };
32
34
 
@@ -734,6 +734,36 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({
734
734
  />
735
735
  </AccordionFormItem>
736
736
 
737
+ <AccordionFormItem
738
+ title="OpenRouter"
739
+ provider="openrouter"
740
+ isConfigured={hasValue("ai.openrouter.api_key")}
741
+ >
742
+ <ApiKey
743
+ form={form}
744
+ config={config}
745
+ name="ai.openrouter.api_key"
746
+ placeholder="or-..."
747
+ testId="ai-openrouter-api-key-input"
748
+ description={
749
+ <>
750
+ Your OpenRouter API key from {""}
751
+ <ExternalLink href="https://openrouter.ai/keys">
752
+ openrouter.ai
753
+ </ExternalLink>
754
+ .
755
+ </>
756
+ }
757
+ />
758
+ <BaseUrl
759
+ form={form}
760
+ config={config}
761
+ name="ai.openrouter.base_url"
762
+ placeholder="https://openrouter.ai/api/v1/"
763
+ testId="ai-openrouter-base-url-input"
764
+ />
765
+ </AccordionFormItem>
766
+
737
767
  <AccordionFormItem
738
768
  title="Azure"
739
769
  provider="azure"
@@ -761,7 +791,8 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({
761
791
  form={form}
762
792
  config={config}
763
793
  name="ai.azure.base_url"
764
- placeholder="https://<your-resource-name>.openai.azure.com"
794
+ placeholder="https://<your-resource-name>.openai.azure.com/openai/deployments/<deployment-name>?api-version=<api-version>"
795
+ defaultValue="https://<your-resource-name>.openai.azure.com/openai/deployments/<deployment-name>?api-version=<api-version>"
765
796
  testId="ai-azure-base-url-input"
766
797
  />
767
798
  </AccordionFormItem>
@@ -36,10 +36,10 @@ export const SettingDescription: React.FC<PropsWithChildren> = ({
36
36
  return <p className="text-sm text-muted-foreground">{children}</p>;
37
37
  };
38
38
 
39
- export const SQL_OUTPUT_SELECT_OPTIONS: Array<{
39
+ export const SQL_OUTPUT_SELECT_OPTIONS: {
40
40
  label: string;
41
41
  value: SqlOutputType;
42
- }> = [
42
+ }[] = [
43
43
  { label: "Auto (Default)", value: "auto" },
44
44
  { label: "Native", value: "native" },
45
45
  { label: "Polars", value: "polars" },
@@ -1359,6 +1359,32 @@ export const UserConfigForm: React.FC = () => {
1359
1359
  </div>
1360
1360
  )}
1361
1361
  />
1362
+ <FormField
1363
+ control={form.control}
1364
+ name="experimental.chat_modes"
1365
+ render={({ field }) => (
1366
+ <div className="flex flex-col gap-y-1">
1367
+ <FormItem className={formItemClasses}>
1368
+ <FormLabel className="font-normal">Chat Mode</FormLabel>
1369
+ <FormControl>
1370
+ <Checkbox
1371
+ data-testid="chat-mode-checkbox"
1372
+ checked={field.value === true}
1373
+ onCheckedChange={field.onChange}
1374
+ />
1375
+ </FormControl>
1376
+ </FormItem>
1377
+ <IsOverridden
1378
+ userConfig={config}
1379
+ name="experimental.chat_modes"
1380
+ />
1381
+ <FormDescription>
1382
+ Switch between different modes in the Chat sidebar, to
1383
+ enable tool use.
1384
+ </FormDescription>
1385
+ </div>
1386
+ )}
1387
+ />
1362
1388
  </SettingGroup>
1363
1389
  );
1364
1390
  }
@@ -17,7 +17,6 @@ interface AudioRecorderProps {
17
17
  export const AudioRecorder: React.FC<AudioRecorderProps> = ({
18
18
  onStart,
19
19
  onStop,
20
- onPause,
21
20
  status,
22
21
  time,
23
22
  }) => {
@@ -528,7 +528,7 @@ export const CurrentModeBlock = (props: {
528
528
  };
529
529
 
530
530
  export const ToolNotificationsBlock = (props: {
531
- data: Array<ToolCallNotificationEvent | ToolCallUpdateNotificationEvent>;
531
+ data: (ToolCallNotificationEvent | ToolCallUpdateNotificationEvent)[];
532
532
  }) => {
533
533
  const toolCalls = mergeToolCalls(props.data);
534
534
 
@@ -561,7 +561,7 @@ export const ToolNotificationsBlock = (props: {
561
561
  };
562
562
 
563
563
  export const DiffBlocks = (props: {
564
- data: Array<Extract<ToolCallContent, { type: "diff" }>>;
564
+ data: Extract<ToolCallContent, { type: "diff" }>[];
565
565
  }) => {
566
566
  return (
567
567
  <div className="flex flex-col gap-2 text-muted-foreground">
@@ -99,23 +99,21 @@ export const AgentThread = ({
99
99
 
100
100
  function isErrorGroup(
101
101
  group: NotificationEvent[],
102
- ): group is Array<Extract<NotificationEvent, { type: "error" }>> {
102
+ ): group is Extract<NotificationEvent, { type: "error" }>[] {
103
103
  // We only check the first since we know the group is the same type
104
104
  return group[0].type === "error";
105
105
  }
106
106
 
107
107
  function isConnectionChangeGroup(
108
108
  group: NotificationEvent[],
109
- ): group is Array<Extract<NotificationEvent, { type: "connection_change" }>> {
109
+ ): group is Extract<NotificationEvent, { type: "connection_change" }>[] {
110
110
  // We only check the first since we know the group is the same type
111
111
  return group[0].type === "connection_change";
112
112
  }
113
113
 
114
114
  function isSessionNotificationGroup(
115
115
  group: NotificationEvent[],
116
- ): group is Array<
117
- Extract<NotificationEvent, { type: "session_notification" }>
118
- > {
116
+ ): group is Extract<NotificationEvent, { type: "session_notification" }>[] {
119
117
  // We only check the first since we know the group is the same type
120
118
  return group[0].type === "session_notification";
121
119
  }
@@ -3,7 +3,7 @@ import type { NotificationDataOf, SessionNotificationEventData } from "./types";
3
3
 
4
4
  export function isToolCalls(
5
5
  group: SessionNotificationEventData[],
6
- ): group is Array<NotificationDataOf<"tool_call" | "tool_call_update">> {
6
+ ): group is NotificationDataOf<"tool_call" | "tool_call_update">[] {
7
7
  // We only check the first since we know the group is the same type
8
8
  const first = group[0];
9
9
  return (
@@ -14,7 +14,7 @@ export function isToolCalls(
14
14
 
15
15
  export function isAgentThoughts(
16
16
  group: SessionNotificationEventData[],
17
- ): group is Array<NotificationDataOf<"agent_thought_chunk">> {
17
+ ): group is NotificationDataOf<"agent_thought_chunk">[] {
18
18
  // We only check the first since we know the group is the same type
19
19
  const first = group[0];
20
20
  return first.sessionUpdate === "agent_thought_chunk";
@@ -22,7 +22,7 @@ export function isAgentThoughts(
22
22
 
23
23
  export function isUserMessages(
24
24
  group: SessionNotificationEventData[],
25
- ): group is Array<NotificationDataOf<"user_message_chunk">> {
25
+ ): group is NotificationDataOf<"user_message_chunk">[] {
26
26
  // We only check the first since we know the group is the same type
27
27
  const first = group[0];
28
28
  return first.sessionUpdate === "user_message_chunk";
@@ -30,7 +30,7 @@ export function isUserMessages(
30
30
 
31
31
  export function isAgentMessages(
32
32
  group: SessionNotificationEventData[],
33
- ): group is Array<NotificationDataOf<"agent_message_chunk">> {
33
+ ): group is NotificationDataOf<"agent_message_chunk">[] {
34
34
  // We only check the first since we know the group is the same type
35
35
  const first = group[0];
36
36
  return first.sessionUpdate === "agent_message_chunk";
@@ -38,7 +38,7 @@ export function isAgentMessages(
38
38
 
39
39
  export function isPlans(
40
40
  group: SessionNotificationEventData[],
41
- ): group is Array<NotificationDataOf<"plan">> {
41
+ ): group is NotificationDataOf<"plan">[] {
42
42
  // We only check the first since we know the group is the same type
43
43
  const first = group[0];
44
44
  return first.sessionUpdate === "plan";
@@ -369,7 +369,7 @@ const ChatInputFooter: React.FC<ChatInputFooterProps> = memo(
369
369
  <TooltipProvider>
370
370
  <div className="px-3 py-2 border-t border-border/20 flex flex-row items-center justify-between">
371
371
  <div className="flex items-center gap-2">
372
- <FeatureFlagged feature="mcp_docs">
372
+ <FeatureFlagged feature="chat_modes">
373
373
  <Select value={currentMode} onValueChange={saveModeChange}>
374
374
  <SelectTrigger className="h-6 text-xs border-border shadow-none! ring-0! bg-muted hover:bg-muted/30 py-0 px-2 gap-1 capitalize">
375
375
  {currentMode}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { render } from "@testing-library/react";
4
4
  import { describe, expect, it, test } from "vitest";
5
+ import { TooltipProvider } from "@/components/ui/tooltip";
5
6
  import { generateColumns, inferFieldTypes } from "../columns";
6
7
  import { getMimeValues, isMimeValue, MimeCell } from "../mime-cell";
7
8
  import type { FieldTypesWithExternalType } from "../types";
@@ -245,6 +246,43 @@ describe("generateColumns", () => {
245
246
  expect(columns[0].id).toBe("name");
246
247
  expect(columns[1].id).toBe("age");
247
248
  });
249
+
250
+ it("should render header with tooltip when headerTooltip is provided", () => {
251
+ const columns = generateColumns({
252
+ rowHeaders: [],
253
+ selection: null,
254
+ fieldTypes,
255
+ headerTooltip: { name: "Custom Name Tooltip" },
256
+ });
257
+
258
+ // Get the header function for the first column
259
+ const headerFunction = columns[0].header;
260
+ expect(headerFunction).toBeTypeOf("function");
261
+
262
+ const mockColumn = {
263
+ id: "name",
264
+ getCanSort: () => false,
265
+ getCanFilter: () => false,
266
+ columnDef: {
267
+ meta: {
268
+ dtype: "string",
269
+ dataType: "string",
270
+ },
271
+ },
272
+ };
273
+
274
+ const { container } = render(
275
+ <TooltipProvider>
276
+ {/* @ts-expect-error: mock column and header function */}
277
+ {headerFunction({ column: mockColumn })}
278
+ </TooltipProvider>,
279
+ );
280
+
281
+ expect(container.textContent).toContain("name");
282
+ // The tooltip functionality is tested by verifying that the header renders correctly
283
+ // when headerTooltip is provided.
284
+ expect(container.firstChild).toBeTruthy();
285
+ });
248
286
  });
249
287
 
250
288
  describe("MimeCell", () => {
@@ -18,7 +18,7 @@ describe("DataTable", () => {
18
18
  { id: 2, name: "Test 2" },
19
19
  ];
20
20
 
21
- const columns: Array<ColumnDef<TestData>> = [
21
+ const columns: ColumnDef<TestData>[] = [
22
22
  { accessorKey: "name", header: "Name" },
23
23
  ];
24
24
 
@@ -70,7 +70,7 @@ describe("DataTable", () => {
70
70
  { id: 2, first: "Jim", last: "Halpert" },
71
71
  ];
72
72
 
73
- const columns: Array<ColumnDef<RowData>> = [
73
+ const columns: ColumnDef<RowData>[] = [
74
74
  { accessorKey: "first", header: "First" },
75
75
  { accessorKey: "last", header: "Last" },
76
76
  ];
@@ -1,4 +1,4 @@
1
- /* Copyright 2025 Marimo. All rights reserved. */
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
2
  "use no memo";
3
3
 
4
4
  import type { InitialTableState, TableFeature } from "@tanstack/react-table";
@@ -1,4 +1,4 @@
1
- /* Copyright 2025 Marimo. All rights reserved. */
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
2
  /* eslint-disable @typescript-eslint/no-empty-interface */
3
3
 
4
4
  export interface CellHoverTemplateTableState {
@@ -11,7 +11,7 @@ function createSpec(spec: {
11
11
  encoding: Record<
12
12
  string,
13
13
  | { field: string; type?: string }
14
- | Array<{ field: string; tooltip?: Record<string, string> }>
14
+ | { field: string; tooltip?: Record<string, string> }[]
15
15
  >;
16
16
  resolve?: Record<string, unknown>;
17
17
  title?: string;
@@ -29,7 +29,7 @@ interface GetTooltipParams {
29
29
 
30
30
  export function getTooltips(
31
31
  params: GetTooltipParams,
32
- ): Array<StringFieldDef<string>> | undefined {
32
+ ): StringFieldDef<string>[] | undefined {
33
33
  const { formValues, xEncoding, yEncoding, colorByEncoding } = params;
34
34
 
35
35
  if (!formValues.tooltips) {
@@ -73,7 +73,7 @@ export function getTooltips(
73
73
 
74
74
  // If autoTooltips is enabled, we manually add the x, y, and color columns to the tooltips
75
75
  if (formValues.tooltips.auto) {
76
- const tooltips: Array<StringFieldDef<string>> = [];
76
+ const tooltips: StringFieldDef<string>[] = [];
77
77
  const xTooltip = addTooltip(
78
78
  xEncoding,
79
79
  formValues.general?.xColumn?.type || "string",
@@ -105,7 +105,7 @@ export function getTooltips(
105
105
 
106
106
  // Selected tooltips from the form.
107
107
  const selectedTooltips = formValues.tooltips.fields ?? [];
108
- const tooltips: Array<StringFieldDef<string>> = [];
108
+ const tooltips: StringFieldDef<string>[] = [];
109
109
 
110
110
  // We need to find the matching columns for the selected tooltips if they exist
111
111
  // Otherwise, we can add them without other parameters
@@ -103,7 +103,7 @@ const ColumnSelectorWithAggregation: React.FC<{
103
103
  selectedDataType?: SelectedDataType;
104
104
  };
105
105
  defaultAggregation?: AggregationFn;
106
- columns: Array<{ name: string; type: DataType }>;
106
+ columns: { name: string; type: DataType }[];
107
107
  binFieldName: FieldName;
108
108
  }> = ({
109
109
  columnFieldName,
@@ -86,7 +86,7 @@ export const ColumnSelector = ({
86
86
  includeCountField = true,
87
87
  }: {
88
88
  fieldName: FieldName;
89
- columns: Array<{ name: string; type: DataType }>;
89
+ columns: { name: string; type: DataType }[];
90
90
  onValueChange?: (fieldName: string, type: DataType | undefined) => void;
91
91
  includeCountField?: boolean;
92
92
  }) => {
@@ -197,7 +197,7 @@ export const SelectField = ({
197
197
  }: {
198
198
  fieldName: FieldName;
199
199
  label: string;
200
- options: Array<{ display: React.ReactNode; value: string }>;
200
+ options: { display: React.ReactNode; value: string }[];
201
201
  defaultValue: string;
202
202
  }) => {
203
203
  const form = useFormContext();
@@ -79,7 +79,7 @@ export const AGGREGATION_TYPE_DESCRIPTIONS: Record<AggregationFn, string> = {
79
79
  bin: "Group values into bins",
80
80
  };
81
81
 
82
- export const COLOR_SCHEMES: Array<ColorScheme | typeof DEFAULT_COLOR_SCHEME> = [
82
+ export const COLOR_SCHEMES: (ColorScheme | typeof DEFAULT_COLOR_SCHEME)[] = [
83
83
  DEFAULT_COLOR_SCHEME,
84
84
  // Categorical schemes
85
85
  "accent",
@@ -211,7 +211,7 @@ const ColumnPreview = ({
211
211
  refetchPreview,
212
212
  });
213
213
 
214
- const previewStats = stats && renderStats(stats, dataType, locale);
214
+ const previewStats = stats && renderStats({ stats, dataType, locale });
215
215
 
216
216
  const chart = chart_spec && renderChart(chart_spec, theme);
217
217
 
@@ -778,14 +778,14 @@ export class ColumnChartSpecModel<T> {
778
778
  const yField = "value";
779
779
 
780
780
  // Calculate xStart and xEnd for each value count
781
- const newValueCounts: Array<{
781
+ const newValueCounts: {
782
782
  count: number;
783
783
  value: string;
784
784
  xStart: number;
785
785
  xEnd: number;
786
786
  xMid: number;
787
787
  proportion: number;
788
- }> = [];
788
+ }[] = [];
789
789
  let xStart = 0;
790
790
  for (const valueCount of valueCounts) {
791
791
  const xEnd = xStart + valueCount.count;