@marimo-team/islands 0.25.1-dev4 → 0.25.1-dev40

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 (274) hide show
  1. package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
  2. package/dist/{ErrorBoundary-pV36lYEK.js → ErrorBoundary-CAJO-M56.js} +1 -1
  3. package/dist/{ImageComparisonComponent-Dlm5aWnH.js → ImageComparisonComponent-Cpfz30OZ.js} +51 -52
  4. package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
  5. package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
  6. package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
  7. package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
  8. package/dist/{cells-B5-y5EY3.js → cells-Cv93oav_.js} +3 -3
  9. package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
  10. package/dist/{chat-ui-HJZsTl7o.js → chat-ui-DLSF8a04.js} +4 -4
  11. package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
  12. package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
  13. package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
  14. package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
  15. package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
  16. package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
  17. package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
  18. package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
  19. package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
  20. package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
  21. package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
  22. package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
  23. package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
  24. package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
  25. package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
  26. package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
  27. package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
  28. package/dist/{code-visibility-CgZS2a3W.js → code-visibility-XU9RAJNV.js} +2 -2
  29. package/dist/{common-DnMDPPaW.js → common-C0fbrgB8.js} +13 -13
  30. package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
  31. package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
  32. package/dist/{data-grid-overlay-editor-hHYgD_Sm.js → data-grid-overlay-editor-BnhbJgoq.js} +1 -1
  33. package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
  34. package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
  35. package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
  36. package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
  37. package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
  38. package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
  39. package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
  40. package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
  41. package/dist/{error-entries-Bkbpx0T0.js → error-entries-DLl0XqoW.js} +1 -1
  42. package/dist/{feedback-button-CvKssdG_.js → feedback-button-B0QSkbSp.js} +4 -4
  43. package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
  44. package/dist/{formats-C8rLgZT9.js → formats-Cl_67ghI.js} +1 -1
  45. package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
  46. package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
  47. package/dist/{glide-data-editor-Ohetlgag.js → glide-data-editor-ymIQdwrb.js} +3 -3
  48. package/dist/{globals-CPNNcOJI.js → globals-B0S3-e_D.js} +1 -1
  49. package/dist/{html-to-image-BAgJOlSW.js → html-to-image-CGVgroef.js} +2 -2
  50. package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
  51. package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
  52. package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
  53. package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
  54. package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
  55. package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
  56. package/dist/main.js +72 -69
  57. package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
  58. package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
  59. package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
  60. package/dist/{number-overlay-editor-CHWg5gGO.js → number-overlay-editor-DB3HJDI1.js} +1 -1
  61. package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
  62. package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
  63. package/dist/{process-output-zDX4jbhd.js → process-output-CGfg-JmZ.js} +2 -2
  64. package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
  65. package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
  66. package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
  67. package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
  68. package/dist/{reveal-component-BujcZI2B.js → reveal-component-CfTzIkA2.js} +3 -3
  69. package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
  70. package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
  71. package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
  72. package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
  73. package/dist/style.css +1 -1
  74. package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
  75. package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
  76. package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
  77. package/dist/{vega-component-CNf5gcrm.js → vega-component-tFOzgarw.js} +4 -4
  78. package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
  79. package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
  80. package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
  81. package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
  82. package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
  83. package/package.json +1 -2
  84. package/src/__mocks__/common.ts +3 -3
  85. package/src/__tests__/CellStatus.test.tsx +1 -1
  86. package/src/__tests__/setup.ts +7 -7
  87. package/src/components/app-config/ai-config.tsx +2 -0
  88. package/src/components/app-config/optional-features.tsx +1 -1
  89. package/src/components/chat/chat-panel.tsx +19 -8
  90. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
  91. package/src/components/data-table/charts/charts.tsx +26 -13
  92. package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
  93. package/src/components/dependency-graph/elements.ts +2 -2
  94. package/src/components/editor/__tests__/package-alert.test.tsx +140 -0
  95. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +107 -0
  96. package/src/components/editor/actions/pair-with-agent.tsx +119 -0
  97. package/src/components/editor/actions/useNotebookActions.tsx +2 -1
  98. package/src/components/editor/ai/add-cell-with-ai.tsx +2 -0
  99. package/src/components/editor/ai/staged-cell-submission.ts +2 -2
  100. package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
  101. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
  102. package/src/components/editor/connections/database/as-code.ts +44 -44
  103. package/src/components/editor/connections/storage/as-code.ts +3 -3
  104. package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
  105. package/src/components/editor/navigation/clipboard.ts +2 -2
  106. package/src/components/editor/notebook-cell.tsx +2 -2
  107. package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
  108. package/src/components/editor/output/VideoOutput.tsx +1 -1
  109. package/src/components/editor/output/ansi-reduce.ts +21 -17
  110. package/src/components/editor/output/console/ConsoleOutput.tsx +3 -3
  111. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +59 -0
  112. package/src/components/editor/output/console/text-rendering.tsx +3 -1
  113. package/src/components/editor/package-alert.tsx +20 -7
  114. package/src/components/home/components.tsx +1 -0
  115. package/src/components/pages/run-page.tsx +1 -0
  116. package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
  117. package/src/components/slides/__tests__/minimap.test.ts +12 -12
  118. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
  119. package/src/components/static-html/share-modal.tsx +2 -1
  120. package/src/components/static-html/static-banner.tsx +2 -2
  121. package/src/components/ui/links.tsx +6 -1
  122. package/src/components/ui/typography.tsx +16 -8
  123. package/src/core/ai/context/__tests__/registry.test.ts +31 -28
  124. package/src/core/ai/context/providers/cell-output.ts +8 -8
  125. package/src/core/ai/context/providers/datasource.ts +10 -7
  126. package/src/core/ai/context/providers/error.ts +7 -7
  127. package/src/core/ai/context/providers/file.ts +8 -8
  128. package/src/core/ai/context/providers/tables.ts +7 -7
  129. package/src/core/ai/context/providers/variable.ts +7 -7
  130. package/src/core/ai/context/registry.ts +18 -18
  131. package/src/core/ai/ids/ids.ts +5 -5
  132. package/src/core/ai/model-registry.ts +12 -9
  133. package/src/core/ai/staged-cells.ts +6 -6
  134. package/src/core/ai/tools/base.ts +6 -6
  135. package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
  136. package/src/core/ai/tools/registry.ts +4 -4
  137. package/src/core/ai/tools/run-cells-tool.ts +7 -7
  138. package/src/core/ai/tools/sample-tool.ts +6 -6
  139. package/src/core/cells/__tests__/cells.test.ts +27 -0
  140. package/src/core/cells/cells.ts +2 -1
  141. package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
  142. package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
  143. package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
  144. package/src/core/codemirror/code-lens/extension.ts +13 -13
  145. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
  146. package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
  147. package/src/core/codemirror/copilot/language-server.ts +13 -13
  148. package/src/core/codemirror/copilot/transport.ts +1 -1
  149. package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
  150. package/src/core/codemirror/go-to-definition/underline.ts +3 -3
  151. package/src/core/codemirror/keymaps/vim.ts +3 -3
  152. package/src/core/codemirror/language/languages/markdown.ts +8 -8
  153. package/src/core/codemirror/language/languages/python.ts +7 -7
  154. package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
  155. package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
  156. package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
  157. package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
  158. package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
  159. package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
  160. package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
  161. package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
  162. package/src/core/codemirror/reactive-references/extension.ts +3 -3
  163. package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
  164. package/src/core/codemirror/rtc/loro/sync.ts +5 -5
  165. package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
  166. package/src/core/dom/ui-element.ts +5 -5
  167. package/src/core/dom/uiregistry.ts +10 -10
  168. package/src/core/hotkeys/hotkeys.ts +9 -9
  169. package/src/core/islands/__tests__/bridge.test.ts +4 -4
  170. package/src/core/islands/__tests__/test-utils.tsx +4 -4
  171. package/src/core/islands/bridge.ts +85 -82
  172. package/src/core/islands/components/web-components.tsx +7 -7
  173. package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
  174. package/src/core/islands/worker/controller.ts +6 -3
  175. package/src/core/islands/worker-factory.ts +2 -2
  176. package/src/core/kernel/RuntimeState.ts +4 -4
  177. package/src/core/lsp/__tests__/transport.test.ts +19 -19
  178. package/src/core/lsp/transport.ts +5 -5
  179. package/src/core/network/CachingRequestRegistry.ts +2 -2
  180. package/src/core/network/DeferredRequestRegistry.ts +4 -4
  181. package/src/core/runtime/runtime.ts +25 -20
  182. package/src/core/static/virtual-file-tracker.ts +5 -5
  183. package/src/core/wasm/__tests__/bridge.test.ts +2 -2
  184. package/src/core/wasm/bridge.ts +130 -126
  185. package/src/core/wasm/router.ts +5 -5
  186. package/src/core/wasm/store.ts +4 -4
  187. package/src/core/wasm/worker/bootstrap.ts +8 -5
  188. package/src/core/wasm/worker/message-buffer.ts +3 -3
  189. package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
  190. package/src/core/websocket/transports/basic.ts +15 -8
  191. package/src/core/websocket/transports/sse.ts +7 -7
  192. package/src/core/websocket/transports/transport.ts +3 -3
  193. package/src/core/websocket/transports/ws.ts +9 -7
  194. package/src/css/globals.css +18 -21
  195. package/src/css/katex.min.css +260 -241
  196. package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
  197. package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
  198. package/src/plugins/core/registerReactComponent.tsx +5 -5
  199. package/src/plugins/core/sidebar-element.tsx +2 -2
  200. package/src/plugins/impl/ButtonPlugin.tsx +3 -3
  201. package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
  202. package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
  203. package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
  204. package/src/plugins/impl/DateRangePlugin.tsx +3 -3
  205. package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
  206. package/src/plugins/impl/DictPlugin.tsx +3 -3
  207. package/src/plugins/impl/DropdownPlugin.tsx +3 -3
  208. package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
  209. package/src/plugins/impl/MatrixPlugin.tsx +4 -4
  210. package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
  211. package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
  212. package/src/plugins/impl/NumberPlugin.tsx +3 -3
  213. package/src/plugins/impl/RadioPlugin.tsx +9 -5
  214. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
  215. package/src/plugins/impl/RefreshPlugin.tsx +3 -3
  216. package/src/plugins/impl/SliderPlugin.tsx +3 -3
  217. package/src/plugins/impl/SwitchPlugin.tsx +3 -3
  218. package/src/plugins/impl/TabsPlugin.tsx +3 -3
  219. package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
  220. package/src/plugins/impl/TextInputPlugin.tsx +3 -3
  221. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
  222. package/src/plugins/impl/anywidget/model.ts +10 -10
  223. package/src/plugins/impl/anywidget/registry.ts +12 -9
  224. package/src/plugins/impl/anywidget/runtime.ts +11 -9
  225. package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
  226. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
  227. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
  228. package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
  229. package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
  230. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
  231. package/src/plugins/impl/panel/utils.ts +5 -5
  232. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  233. package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
  234. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
  235. package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
  236. package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
  237. package/src/plugins/impl/vega/loader.ts +23 -1
  238. package/src/plugins/impl/vega/utils.ts +5 -4
  239. package/src/plugins/layout/AccordionPlugin.tsx +3 -3
  240. package/src/plugins/layout/CalloutPlugin.tsx +3 -3
  241. package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
  242. package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
  243. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
  244. package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
  245. package/src/plugins/layout/OutlinePlugin.tsx +3 -3
  246. package/src/plugins/layout/ProgressPlugin.tsx +3 -3
  247. package/src/plugins/layout/RoutesPlugin.tsx +6 -8
  248. package/src/plugins/layout/StatPlugin.tsx +3 -3
  249. package/src/plugins/layout/TexPlugin.tsx +3 -3
  250. package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
  251. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
  252. package/src/utils/Deferred.ts +6 -6
  253. package/src/utils/async-capture-tracker.ts +10 -7
  254. package/src/utils/errors.ts +5 -5
  255. package/src/utils/id-tree.tsx +83 -80
  256. package/src/utils/lru.ts +1 -1
  257. package/src/utils/multi-map.ts +14 -12
  258. package/src/utils/paths.ts +6 -6
  259. package/src/utils/pluralize.ts +3 -3
  260. package/src/utils/progress.ts +6 -6
  261. package/src/utils/python-poet/poet.ts +14 -14
  262. package/src/utils/routes.ts +4 -2
  263. package/src/utils/semaphore.ts +6 -6
  264. package/src/utils/storage/storage.ts +6 -6
  265. package/src/utils/storage/typed.ts +16 -12
  266. package/src/utils/time.ts +9 -9
  267. package/src/utils/timed-cache.ts +4 -4
  268. package/src/utils/tracer.ts +9 -6
  269. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
  270. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
  271. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
  272. package/dist/katex-DFBiSucW.js +0 -21840
  273. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
  274. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
@@ -45,21 +45,22 @@ function toArray<T>(value: T | T[] | undefined): T[] {
45
45
 
46
46
  export function getVegaFieldTypes(
47
47
  types: Record<string, DataType> | undefined | null,
48
+ { parseDates = false }: { parseDates?: boolean } = {},
48
49
  ): FieldTypes | "auto" {
49
50
  if (!types || Object.keys(types).length === 0) {
50
51
  // If fieldTypes is provided, use it to parse the data
51
52
  // Otherwise, infer the data types
52
53
  return "auto";
53
54
  }
54
- // Convert all 'date' to 'string', because dates don't format back to
55
- // the correct formatting. For example, a date like '2024-01-01' will
56
- // be formatted to '2024-01-01T00:00:00.000Z'.
55
+ // Preserve date-only strings for callers such as the data editor.
56
+ // Parsing creates Date objects that JSON serializes as full timestamps.
57
+ // Charts opt into date parsing for temporal axes.
57
58
  return Objects.mapValues(types, (type): VegaDataType => {
58
59
  if (type === "geometry") {
59
60
  return "string";
60
61
  }
61
62
  if (type === "date") {
62
- return "string";
63
+ return parseDates ? "date" : "string";
63
64
  }
64
65
  if (type === "time") {
65
66
  return "string";
@@ -27,15 +27,15 @@ interface Data {
27
27
  }
28
28
 
29
29
  export class AccordionPlugin implements IStatelessPlugin<Data> {
30
- tagName = "marimo-accordion";
30
+ public tagName = "marimo-accordion";
31
31
 
32
- validator = z.object({
32
+ public validator = z.object({
33
33
  labels: z.array(z.string()),
34
34
  multiple: z.boolean(),
35
35
  expanded: z.array(z.string()).default([]),
36
36
  });
37
37
 
38
- render(props: IStatelessPluginProps<Data>): JSX.Element {
38
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
39
39
  return (
40
40
  <AccordionComponent {...props.data}>{props.children}</AccordionComponent>
41
41
  );
@@ -25,15 +25,15 @@ interface Data {
25
25
  }
26
26
 
27
27
  export class CalloutPlugin implements IStatelessPlugin<Data> {
28
- tagName = "marimo-callout-output";
28
+ public tagName = "marimo-callout-output";
29
29
 
30
- validator = z.object({
30
+ public validator = z.object({
31
31
  html: z.string(),
32
32
  kind: zodIntent,
33
33
  title: z.string().optional(),
34
34
  });
35
35
 
36
- render({ data }: IStatelessPluginProps<Data>): JSX.Element {
36
+ public render({ data }: IStatelessPluginProps<Data>): JSX.Element {
37
37
  return (
38
38
  <CalloutOutput html={data.html} kind={data.kind} title={data.title} />
39
39
  );
@@ -12,9 +12,9 @@ const LazyImageComparisonComponent = React.lazy(
12
12
  );
13
13
 
14
14
  export class ImageComparisonPlugin implements IStatelessPlugin<ImageComparisonData> {
15
- tagName = "marimo-image-comparison";
15
+ public tagName = "marimo-image-comparison";
16
16
 
17
- validator = z.object({
17
+ public validator = z.object({
18
18
  beforeSrc: z.string(),
19
19
  afterSrc: z.string(),
20
20
  value: z.number().min(0).max(100).default(50),
@@ -23,7 +23,9 @@ export class ImageComparisonPlugin implements IStatelessPlugin<ImageComparisonDa
23
23
  height: z.string().optional(),
24
24
  });
25
25
 
26
- render(props: IStatelessPluginProps<ImageComparisonData>): JSX.Element {
26
+ public render(
27
+ props: IStatelessPluginProps<ImageComparisonData>,
28
+ ): JSX.Element {
27
29
  return (
28
30
  <React.Suspense fallback={<div>Loading image comparison...</div>}>
29
31
  <LazyImageComparisonComponent {...props.data} />
@@ -21,15 +21,15 @@ interface Data {
21
21
  }
22
22
 
23
23
  export class JsonOutputPlugin implements IStatelessPlugin<Data> {
24
- tagName = "marimo-json-output";
24
+ public tagName = "marimo-json-output";
25
25
 
26
- validator = z.object({
26
+ public validator = z.object({
27
27
  name: z.string().nullish(),
28
28
  jsonData: z.unknown(),
29
29
  valueTypes: z.enum(["json", "python"]).default("python"),
30
30
  });
31
31
 
32
- render({ data }: IStatelessPluginProps<Data>): JSX.Element {
32
+ public render({ data }: IStatelessPluginProps<Data>): JSX.Element {
33
33
  // `false` defaults to no text label
34
34
  const name = data.name === undefined ? false : data.name || "";
35
35
  return (
@@ -15,9 +15,9 @@ interface Data {
15
15
  }
16
16
 
17
17
  export class MimeRendererPlugin implements IStatelessPlugin<Data> {
18
- tagName = "marimo-mime-renderer";
18
+ public tagName = "marimo-mime-renderer";
19
19
 
20
- validator = z.object({
20
+ public validator = z.object({
21
21
  mime: z.string().transform((val) => val as OutputMessage["mimetype"]),
22
22
  data: z
23
23
  .union([
@@ -29,7 +29,7 @@ export class MimeRendererPlugin implements IStatelessPlugin<Data> {
29
29
  .transform((val) => val as OutputMessage["data"]),
30
30
  });
31
31
 
32
- render({ data }: IStatelessPluginProps<Data>): JSX.Element {
32
+ public render({ data }: IStatelessPluginProps<Data>): JSX.Element {
33
33
  if (!data.data) {
34
34
  return <div />;
35
35
  }
@@ -195,7 +195,7 @@ const NavigationMenuViewportPortal = ({
195
195
  };
196
196
 
197
197
  export class NavigationMenuPlugin implements IStatelessPlugin<Data> {
198
- tagName = "marimo-nav-menu";
198
+ public tagName = "marimo-nav-menu";
199
199
 
200
200
  private menuItemValidator = z.object({
201
201
  label: z.string(),
@@ -208,14 +208,14 @@ export class NavigationMenuPlugin implements IStatelessPlugin<Data> {
208
208
  items: z.array(this.menuItemValidator),
209
209
  });
210
210
 
211
- validator = z.object({
211
+ public validator = z.object({
212
212
  items: z.array(
213
213
  z.union([this.menuItemValidator, this.menuItemGroupValidator]),
214
214
  ),
215
215
  orientation: z.enum(["horizontal", "vertical"]),
216
216
  });
217
217
 
218
- render(props: IStatelessPluginProps<Data>): JSX.Element {
218
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
219
219
  return <NavMenuComponent {...props.data} />;
220
220
  }
221
221
  }
@@ -51,13 +51,13 @@ const OutlineContent: React.FC<{ label?: string }> = ({ label }) => {
51
51
  };
52
52
 
53
53
  export class OutlinePlugin implements IStatelessPlugin<Data> {
54
- tagName = "marimo-outline";
54
+ public tagName = "marimo-outline";
55
55
 
56
- validator = z.object({
56
+ public validator = z.object({
57
57
  label: z.string().optional(),
58
58
  });
59
59
 
60
- render(props: IStatelessPluginProps<Data>): JSX.Element {
60
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
61
61
  const { label } = props.data;
62
62
 
63
63
  return (
@@ -41,9 +41,9 @@ interface Data {
41
41
  }
42
42
 
43
43
  export class ProgressPlugin implements IStatelessPlugin<Data> {
44
- tagName = "marimo-progress";
44
+ public tagName = "marimo-progress";
45
45
 
46
- validator = z.object({
46
+ public validator = z.object({
47
47
  title: z.string().optional(),
48
48
  subtitle: z.string().optional(),
49
49
  progress: z.union([z.number(), z.boolean()]),
@@ -52,7 +52,7 @@ export class ProgressPlugin implements IStatelessPlugin<Data> {
52
52
  rate: z.number().optional(),
53
53
  });
54
54
 
55
- render(props: IStatelessPluginProps<Data>): JSX.Element {
55
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
56
56
  return <ProgressComponent {...props.data} />;
57
57
  }
58
58
  }
@@ -1,6 +1,5 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  import React, {
3
- type JSX,
4
3
  type PropsWithChildren,
5
4
  useEffect,
6
5
  useMemo,
@@ -22,13 +21,13 @@ interface Data {
22
21
  }
23
22
 
24
23
  export class RoutesPlugin implements IStatelessPlugin<Data> {
25
- tagName = "marimo-routes";
24
+ public tagName = "marimo-routes";
26
25
 
27
- validator = z.object({
26
+ public validator = z.object({
28
27
  routes: z.array(z.string()),
29
28
  });
30
29
 
31
- render(props: IStatelessPluginProps<Data>): JSX.Element {
30
+ public render(props: IStatelessPluginProps<Data>): React.ReactElement {
32
31
  return <RoutesComponent {...props.data}>{props.children}</RoutesComponent>;
33
32
  }
34
33
  }
@@ -36,7 +35,7 @@ export class RoutesPlugin implements IStatelessPlugin<Data> {
36
35
  const RoutesComponent = ({
37
36
  routes,
38
37
  children,
39
- }: PropsWithChildren<Data>): JSX.Element => {
38
+ }: PropsWithChildren<Data>): React.ReactNode => {
40
39
  const childCount = React.Children.count(children);
41
40
  if (childCount !== routes.length) {
42
41
  throw new Error(
@@ -69,12 +68,11 @@ const RoutesComponent = ({
69
68
  }, [handleFindMatch]);
70
69
 
71
70
  if (!matched) {
72
- // oxlint-disable-next-line react/jsx-no-useless-fragment
73
- return <></>;
71
+ return null;
74
72
  }
75
73
 
76
74
  const matchedIndex = routes.indexOf(matched);
77
75
  const child = React.Children.toArray(children)[matchedIndex];
78
76
 
79
- return <>{child}</>;
77
+ return child;
80
78
  };
@@ -25,9 +25,9 @@ interface Data {
25
25
  }
26
26
 
27
27
  export class StatPlugin implements IStatelessPlugin<Data> {
28
- tagName = "marimo-stat";
28
+ public tagName = "marimo-stat";
29
29
 
30
- validator = z.object({
30
+ public validator = z.object({
31
31
  value: z.union([z.string(), z.number(), z.boolean()]).optional(),
32
32
  label: z.string().optional(),
33
33
  caption: z.string().optional(),
@@ -37,7 +37,7 @@ export class StatPlugin implements IStatelessPlugin<Data> {
37
37
  slot: z.any().optional(),
38
38
  });
39
39
 
40
- render({ data }: IStatelessPluginProps<Data>): JSX.Element {
40
+ public render({ data }: IStatelessPluginProps<Data>): JSX.Element {
41
41
  return <StatComponent {...data} />;
42
42
  }
43
43
  }
@@ -15,11 +15,11 @@ import type {
15
15
  * LaTeX.
16
16
  */
17
17
  export class TexPlugin implements IStatelessPlugin<{}> {
18
- tagName = "marimo-tex";
18
+ public tagName = "marimo-tex";
19
19
 
20
- validator = z.object({});
20
+ public validator = z.object({});
21
21
 
22
- render(props: IStatelessPluginProps<{}>): JSX.Element {
22
+ public render(props: IStatelessPluginProps<{}>): JSX.Element {
23
23
  return (
24
24
  <TexComponent
25
25
  host={props.host}
@@ -20,15 +20,15 @@ interface Data {
20
20
  }
21
21
 
22
22
  export class CarouselPlugin implements IStatelessPlugin<Data> {
23
- tagName = "marimo-carousel";
23
+ public tagName = "marimo-carousel";
24
24
 
25
- validator = z.object({
25
+ public validator = z.object({
26
26
  index: z.string().nullish(),
27
27
  height: z.union([z.string(), z.number()]).nullish(),
28
28
  });
29
29
 
30
30
  // TODO: Move async when we support async css
31
- cssStyles = [
31
+ public cssStyles = [
32
32
  swiperCss,
33
33
  swiperCssVirtual,
34
34
  swiperCssNavigation,
@@ -38,7 +38,7 @@ export class CarouselPlugin implements IStatelessPlugin<Data> {
38
38
  swiperSlidesCss,
39
39
  ];
40
40
 
41
- render(props: IStatelessPluginProps<Data>): JSX.Element {
41
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
42
42
  return (
43
43
  <LazySlidesComponent {...props.data} wrapAround={true}>
44
44
  {props.children}
@@ -14,15 +14,15 @@ interface Data {
14
14
  }
15
15
 
16
16
  export class MermaidPlugin implements IStatelessPlugin<Data> {
17
- tagName = "marimo-mermaid";
17
+ public tagName = "marimo-mermaid";
18
18
 
19
- validator = z.object({
19
+ public validator = z.object({
20
20
  diagram: z.string(),
21
21
  theme: z.string().optional(),
22
22
  theme_variables: z.record(z.string(), z.string()).optional(),
23
23
  });
24
24
 
25
- render(props: IStatelessPluginProps<Data>): JSX.Element {
25
+ public render(props: IStatelessPluginProps<Data>): JSX.Element {
26
26
  return (
27
27
  <LazyMermaid
28
28
  diagram={props.data.diagram}
@@ -7,13 +7,13 @@
7
7
  * cases where you need to check if a promise has settled without awaiting it.
8
8
  */
9
9
  export class Deferred<T> {
10
- promise: Promise<T>;
11
- resolve!: (value: T | PromiseLike<T>) => void;
12
- reject!: (reason?: unknown) => void;
13
- status: "pending" | "resolved" | "rejected" = "pending";
14
- value: T | undefined = undefined;
10
+ public promise: Promise<T>;
11
+ public resolve!: (value: T | PromiseLike<T>) => void;
12
+ public reject!: (reason?: unknown) => void;
13
+ public status: "pending" | "resolved" | "rejected" = "pending";
14
+ public value: T | undefined = undefined;
15
15
 
16
- constructor() {
16
+ public constructor() {
17
17
  this.promise = new Promise<T>((resolve, reject) => {
18
18
  this.reject = (reason: unknown) => {
19
19
  this.status = "rejected";
@@ -66,7 +66,7 @@ export class AsyncCaptureTracker<K, R = unknown> {
66
66
  * - Captured with a different value
67
67
  * - In-flight with a different value (will be aborted on {@link startCapture})
68
68
  */
69
- needsCapture(key: K, inputValue: unknown): boolean {
69
+ public needsCapture(key: K, inputValue: unknown): boolean {
70
70
  if (this.capturedInputs.get(key) === inputValue) {
71
71
  return false;
72
72
  }
@@ -82,7 +82,10 @@ export class AsyncCaptureTracker<K, R = unknown> {
82
82
  * that resolves when the capture completes (with the result, or `undefined`
83
83
  * on failure/abort). Returns `null` otherwise.
84
84
  */
85
- waitForInFlight(key: K, inputValue: unknown): Promise<R | undefined> | null {
85
+ public waitForInFlight(
86
+ key: K,
87
+ inputValue: unknown,
88
+ ): Promise<R | undefined> | null {
86
89
  const flight = this.inFlight.get(key);
87
90
  if (flight && flight.inputValue === inputValue) {
88
91
  return flight.deferred.promise;
@@ -97,7 +100,7 @@ export class AsyncCaptureTracker<K, R = unknown> {
97
100
  *
98
101
  * @returns A {@link CaptureHandle} scoped to this attempt.
99
102
  */
100
- startCapture(key: K, inputValue: unknown): CaptureHandle<R> {
103
+ public startCapture(key: K, inputValue: unknown): CaptureHandle<R> {
101
104
  const prev = this.inFlight.get(key);
102
105
  if (prev) {
103
106
  this.cancelEntry(prev);
@@ -133,7 +136,7 @@ export class AsyncCaptureTracker<K, R = unknown> {
133
136
  * Remove tracking for keys not in the given set.
134
137
  * Aborts in-flight captures and resolves their waiters with `undefined`.
135
138
  */
136
- prune(currentKeys: Set<K>): void {
139
+ public prune(currentKeys: Set<K>): void {
137
140
  for (const key of this.capturedInputs.keys()) {
138
141
  if (!currentKeys.has(key)) {
139
142
  this.capturedInputs.delete(key);
@@ -148,12 +151,12 @@ export class AsyncCaptureTracker<K, R = unknown> {
148
151
  }
149
152
 
150
153
  /** Whether any captures are currently in-flight. */
151
- get isCapturing(): boolean {
154
+ public get isCapturing(): boolean {
152
155
  return this.inFlight.size > 0;
153
156
  }
154
157
 
155
158
  /** Abort all in-flight captures. Resolves all waiters with `undefined`. */
156
- abort(): void {
159
+ public abort(): void {
157
160
  for (const entry of this.inFlight.values()) {
158
161
  this.cancelEntry(entry);
159
162
  }
@@ -161,7 +164,7 @@ export class AsyncCaptureTracker<K, R = unknown> {
161
164
  }
162
165
 
163
166
  /** Reset all state. */
164
- reset(): void {
167
+ public reset(): void {
165
168
  this.abort();
166
169
  this.capturedInputs.clear();
167
170
  }
@@ -68,9 +68,9 @@ function safeJSONParse(message: string): unknown {
68
68
  * kept as `cause` so `prettyError` can surface its `detail`.
69
69
  */
70
70
  export class HTTPError extends Error {
71
- readonly status: number;
71
+ public readonly status: number;
72
72
 
73
- constructor(status: number, statusText: string, body?: unknown) {
73
+ public constructor(status: number, statusText: string, body?: unknown) {
74
74
  super(statusText, { cause: body });
75
75
  this.name = "HTTPError";
76
76
  this.status = status;
@@ -78,7 +78,7 @@ export class HTTPError extends Error {
78
78
  }
79
79
 
80
80
  export class CellNotInitializedError extends Error {
81
- constructor(
81
+ public constructor(
82
82
  message = "The cell containing this UI element has not been run yet. Please run the cell first.",
83
83
  ) {
84
84
  super(message);
@@ -87,7 +87,7 @@ export class CellNotInitializedError extends Error {
87
87
  }
88
88
 
89
89
  export class FunctionNotFoundError extends Error {
90
- constructor(
90
+ public constructor(
91
91
  message = "This UI element could not reach its function on the kernel. Try re-running the cell.",
92
92
  ) {
93
93
  super(message);
@@ -96,7 +96,7 @@ export class FunctionNotFoundError extends Error {
96
96
  }
97
97
 
98
98
  export class NoKernelConnectedError extends Error {
99
- constructor(message = "Not yet connected to a kernel.") {
99
+ public constructor(message = "Not yet connected to a kernel.") {
100
100
  super(message);
101
101
  this.name = "NoKernelConnectedError";
102
102
  }