@marimo-team/frontend 0.20.5-dev3 → 0.20.5-dev33

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 (381) hide show
  1. package/dist/assets/{CellStatus-DRjSVmK4.js → CellStatus-rawm41sF.js} +1 -1
  2. package/dist/assets/{Combination-tjZP3FH6.js → Combination-lAuBMOg4.js} +1 -1
  3. package/dist/assets/{ConnectedDataExplorerComponent-BmYLGaEV.js → ConnectedDataExplorerComponent-BmrDShEI.js} +1 -1
  4. package/dist/assets/{DeferredRequestRegistry-CMZsNx4R.js → DeferredRequestRegistry-TekxUirp.js} +1 -1
  5. package/dist/assets/{ErrorBoundary-dVj6GVNE.js → ErrorBoundary-BfF3Lb5I.js} +1 -1
  6. package/dist/assets/{ImperativeModal-CRNJOvqT.js → ImperativeModal-BvRpI5NU.js} +1 -1
  7. package/dist/assets/{JsonOutput-GlMQ3aLA.js → JsonOutput-D8vxudTc.js} +11 -11
  8. package/dist/assets/{LazyAnyLanguageCodeMirror-BdX_Y5NA.js → LazyAnyLanguageCodeMirror-BpSKccWW.js} +2 -2
  9. package/dist/assets/{MarimoErrorOutput-B0ZtYqUC.js → MarimoErrorOutput-ThxhEC9x.js} +1 -1
  10. package/dist/assets/{RenderHTML-qh-NzTWO.js → RenderHTML-Ci0Pb1aU.js} +1 -1
  11. package/dist/assets/{add-cell-with-ai--4VOMvH8.js → add-cell-with-ai-C9Xp-2Lu.js} +28 -26
  12. package/dist/assets/add-connection-dialog-C0_z2T_b.js +138 -0
  13. package/dist/assets/{agent-panel-BX_iKZeN.js → agent-panel-CFmSkdtw.js} +15 -15
  14. package/dist/assets/ai-model-dropdown-DJoBltN-.js +5 -0
  15. package/dist/assets/{alert-dialog-DsNfSYaw.js → alert-dialog-CfirwkMl.js} +1 -1
  16. package/dist/assets/{any-language-editor-Drlg63ge.js → any-language-editor-C_73jLC-.js} +1 -1
  17. package/dist/assets/{app-config-button-bnipxY5L.js → app-config-button-Cw2wXNR2.js} +1 -1
  18. package/dist/assets/{architectureDiagram-VXUJARFQ-KOgWVxSC.js → architectureDiagram-VXUJARFQ-PitjPG8V.js} +1 -1
  19. package/dist/assets/{assertNever-Dw9aFN4h.js → assertNever-Dg4AnA3p.js} +1 -1
  20. package/dist/assets/{azure-Ddr1pZpW.js → azure-V83ZU8Sp.js} +1 -1
  21. package/dist/assets/{blockDiagram-VD42YOAC-DjazSe-Z.js → blockDiagram-VD42YOAC-BIJ4EhZR.js} +1 -1
  22. package/dist/assets/{button-BmOH9agK.js → button-BwamPDJi.js} +1 -1
  23. package/dist/assets/{c4Diagram-YG6GDRKO-CkwpyaIV.js → c4Diagram-YG6GDRKO-DM49Cvfe.js} +1 -1
  24. package/dist/assets/{cache-panel-DRhH4wqG.js → cache-panel-B4TWdLE9.js} +1 -1
  25. package/dist/assets/{capabilities-CeYo4YI0.js → capabilities-yFZOze7r.js} +1 -1
  26. package/dist/assets/{capitalize-irHJCpFh.js → capitalize-DeCS9UqV.js} +1 -1
  27. package/dist/assets/{cell-editor-B1x4zkBp.js → cell-editor-BoDTqwYs.js} +6 -6
  28. package/dist/assets/{cell-link-B59Kn5nL.js → cell-link-TWNu2IkO.js} +1 -1
  29. package/dist/assets/{cells-CCtxWKxf.js → cells-DJj8ja0V.js} +4 -4
  30. package/dist/assets/channel-DNdp-eCE.js +1 -0
  31. package/dist/assets/{chat-display-Co6iGNSx.js → chat-display-Dwlgqtli.js} +1 -1
  32. package/dist/assets/{chat-panel-70sjqZuy.js → chat-panel-DP052nQF.js} +1 -1
  33. package/dist/assets/{chunk-5FQGJX7Z-BJDu6jwt.js → chunk-5FQGJX7Z-Cyze_Wbx.js} +3 -3
  34. package/dist/assets/{chunk-ABZYJK2D-B4uBM2QW.js → chunk-ABZYJK2D-CIP2m5SK.js} +3 -3
  35. package/dist/assets/{chunk-ATLVNIR6-Du2yaFpm.js → chunk-ATLVNIR6-dCnEfemD.js} +1 -1
  36. package/dist/assets/{chunk-B4BG7PRW-CyuK4uRN.js → chunk-B4BG7PRW-sXSaKV4v.js} +1 -1
  37. package/dist/assets/{chunk-DI55MBZ5-BwWd5dH1.js → chunk-DI55MBZ5-DjV-ScSc.js} +1 -1
  38. package/dist/assets/{chunk-EXTU4WIE-KqUhNQvn.js → chunk-EXTU4WIE-PLvknOI8.js} +1 -1
  39. package/dist/assets/{chunk-JA3XYJ7Z-C-v9pa_-.js → chunk-JA3XYJ7Z-BM9i2UKq.js} +1 -1
  40. package/dist/assets/{chunk-JZLCHNYA-DNCs8LM0.js → chunk-JZLCHNYA-m6YUUy9x.js} +1 -1
  41. package/dist/assets/{chunk-N4CR4FBY-CT58_cui.js → chunk-N4CR4FBY-C1lKPnWl.js} +2 -2
  42. package/dist/assets/{chunk-QN33PNHL-BboxAxJa.js → chunk-QN33PNHL-Czx-c7tW.js} +1 -1
  43. package/dist/assets/{chunk-QXUST7PY-BlINr7uS.js → chunk-QXUST7PY-CcYtOR78.js} +1 -1
  44. package/dist/assets/{chunk-S3R3BYOJ-DI9xzpBm.js → chunk-S3R3BYOJ-JNQMgAH6.js} +1 -1
  45. package/dist/assets/{chunk-TZMSLE5B-C4sxb3v-.js → chunk-TZMSLE5B-C9T1sILA.js} +1 -1
  46. package/dist/assets/classDiagram-2ON5EDUG-BqtRsi1m.js +1 -0
  47. package/dist/assets/classDiagram-v2-WZHVMYZB-CVoqYiM8.js +1 -0
  48. package/dist/assets/{code-block-37QAKDTI-Cl0NTdrS.js → code-block-37QAKDTI-BeUkwW5f.js} +1 -1
  49. package/dist/assets/{column-preview-BhU5Ow0e.js → column-preview-CPJFpq_q.js} +1 -1
  50. package/dist/assets/command-DQqPawJf.js +1 -0
  51. package/dist/assets/command-palette-BM1QAZTW.js +1 -0
  52. package/dist/assets/{common-CKAiz8xx.js → common-Df9UcCs1.js} +1 -1
  53. package/dist/assets/components-CwZhf0Ag.js +1 -0
  54. package/dist/assets/{components-BZCdnYSp.js → components-D8LTuNe_.js} +1 -1
  55. package/dist/assets/{config-D9X9QKiL.js → config-BH98g9qk.js} +1 -1
  56. package/dist/assets/context-CRmPPhx9.js +1 -0
  57. package/dist/assets/context-aware-panel-Bs4Vepkp.js +3 -0
  58. package/dist/assets/{copy-DMCkK2TI.js → copy-ICN7wGy0.js} +1 -1
  59. package/dist/assets/{copy-icon-6RnnFDPt.js → copy-icon-DNppAsmd.js} +1 -1
  60. package/dist/assets/{createReducer-BcTiTw8T.js → createReducer-BrKCfm9t.js} +1 -1
  61. package/dist/assets/{dagre-6UL2VRFP-BrBSRtN5.js → dagre-6UL2VRFP-D-I1QR9s.js} +1 -1
  62. package/dist/assets/{data-grid-overlay-editor-NBBEPhQq.js → data-grid-overlay-editor-DXzdnLZF.js} +1 -1
  63. package/dist/assets/{datasource-B2Fl6iYU.js → datasource-MEu_GjcC.js} +1 -1
  64. package/dist/assets/{dates-CzBDvj6R.js → dates-BFWtdOCb.js} +1 -1
  65. package/dist/assets/{dependency-graph-panel-Dk4iQGft.js → dependency-graph-panel-DddysMUS.js} +1 -1
  66. package/dist/assets/{diagram-PSM6KHXK-DPC85L-O.js → diagram-PSM6KHXK-DcjdxOTC.js} +1 -1
  67. package/dist/assets/{diagram-QEK2KX5R-CRPLkmdi.js → diagram-QEK2KX5R-Dx1WtjkT.js} +1 -1
  68. package/dist/assets/{diagram-S2PKOQOG-Bsc6mZUW.js → diagram-S2PKOQOG-CXJzGs3_.js} +1 -1
  69. package/dist/assets/{dialog-BXzvlof-.js → dialog-ChkDhlMQ.js} +1 -1
  70. package/dist/assets/{dist-i0ilBbwP.js → dist-0PMxXIr6.js} +1 -1
  71. package/dist/assets/{dist-DGPCoel5.js → dist-6HEOc3hy.js} +1 -1
  72. package/dist/assets/{dist-CEQIJ2pn.js → dist-B7Qj0ClH.js} +1 -1
  73. package/dist/assets/{dist-C30-xTdI.js → dist-BIYYQefO.js} +1 -1
  74. package/dist/assets/{dist-Dg61kQNR.js → dist-BQ7MrVoG.js} +1 -1
  75. package/dist/assets/{dist-CU-Ty5ht.js → dist-BUr9VSV4.js} +1 -1
  76. package/dist/assets/{dist-BjtLy-VA.js → dist-Bagw3W9X.js} +1 -1
  77. package/dist/assets/dist-BbkZJt99.js +1 -0
  78. package/dist/assets/{dist-BTEPE6IB.js → dist-BosZYCjH.js} +1 -1
  79. package/dist/assets/{dist-Q0--6AMp.js → dist-BrDOLuMx.js} +1 -1
  80. package/dist/assets/dist-BvqRyXNf.js +1 -0
  81. package/dist/assets/{dist-DFv45CtW.js → dist-C1g0ZQqM.js} +1 -1
  82. package/dist/assets/dist-C88PeA-j.js +1 -0
  83. package/dist/assets/{dist-DQgu-tmt.js → dist-C8DU7LS7.js} +1 -1
  84. package/dist/assets/dist-CT29HpLU.js +1 -0
  85. package/dist/assets/dist-CaN3pnGY.js +1 -0
  86. package/dist/assets/dist-CdZrtzmM.js +1 -0
  87. package/dist/assets/{dist-Dq_iQ08e.js → dist-Cf47zp7b.js} +1 -1
  88. package/dist/assets/dist-CiBv1uBX.js +1 -0
  89. package/dist/assets/dist-Cn-s3n4_.js +1 -0
  90. package/dist/assets/{dist-DVh79TGS.js → dist-CrFxmtyb.js} +1 -1
  91. package/dist/assets/{dist-y6DTGoUH.js → dist-CsQrBXB1.js} +1 -1
  92. package/dist/assets/{dist-BjnzbwCx.js → dist-D-tCQoCo.js} +1 -1
  93. package/dist/assets/{dist-51xFOPFs.js → dist-D3OoaVQX.js} +1 -1
  94. package/dist/assets/dist-DHmVMXm2.js +1 -0
  95. package/dist/assets/dist-DHn8amAr.js +1 -0
  96. package/dist/assets/dist-DK2oA8K0.js +1 -0
  97. package/dist/assets/{dist-Bq1BhBMA.js → dist-DKPpxz2S.js} +1 -1
  98. package/dist/assets/{dist-DwtQnQ8D.js → dist-DPW-YadP.js} +1 -1
  99. package/dist/assets/{dist-Bbmd3uCi.js → dist-D_4TSZPK.js} +1 -1
  100. package/dist/assets/dist-Ddx3eonB.js +1 -0
  101. package/dist/assets/dist-DnPN36vC.js +1 -0
  102. package/dist/assets/dist-Doi_61Lm.js +1 -0
  103. package/dist/assets/{dist-Dy5EHuDu.js → dist-Dq1aTs7B.js} +1 -1
  104. package/dist/assets/dist-Dr9qtoId.js +13 -0
  105. package/dist/assets/dist-EtvDr9lo.js +1 -0
  106. package/dist/assets/dist-JYMkroTn.js +1 -0
  107. package/dist/assets/{dist-DfBASypd.js → dist-Jp_4M-Ei.js} +1 -1
  108. package/dist/assets/dist-QoV0fohO.js +1 -0
  109. package/dist/assets/dist-SDO5K7hA.js +3 -0
  110. package/dist/assets/dist-TtVOJU5I.js +1 -0
  111. package/dist/assets/dist-doJt8agZ.js +1 -0
  112. package/dist/assets/{dist-CIuh_TIk.js → dist-etSPFHi_.js} +1 -1
  113. package/dist/assets/{dist-CqnPIH_S.js → dist-f-ru44Xm.js} +1 -1
  114. package/dist/assets/{dist-CIU0Lack.js → dist-qkIhd7iG.js} +1 -1
  115. package/dist/assets/{dist-odxAaH5Z.js → dist-t1vdhOX_.js} +1 -1
  116. package/dist/assets/{dist-6QbI72oM.js → dist-wBVaU_K6.js} +1 -1
  117. package/dist/assets/{dist-C-_581uo.js → dist-ykiUNgjx.js} +1 -1
  118. package/dist/assets/{documentation-panel-DSqxsEBu.js → documentation-panel-Bs1zlxdM.js} +1 -1
  119. package/dist/assets/download-C06P9lnP.js +9 -0
  120. package/dist/assets/{dropdown-menu-CKhrfxsx.js → dropdown-menu-Bc2d7Nej.js} +1 -1
  121. package/dist/assets/edit-page-D7VD6LD4.js +13 -0
  122. package/dist/assets/{erDiagram-Q2GNP2WA-B7kZxL-n.js → erDiagram-Q2GNP2WA-BQUYpiEQ.js} +1 -1
  123. package/dist/assets/{error-banner-R2OkQKR0.js → error-banner-C2nW22mN.js} +1 -1
  124. package/dist/assets/{error-panel-CtyexAW6.js → error-panel-B_vII0VN.js} +1 -1
  125. package/dist/assets/{es-1hBRXVlM.js → es-EPBuIa5m.js} +1 -1
  126. package/dist/assets/{esm-BQUzYly2.js → esm-Hlfcqnf0.js} +1 -1
  127. package/dist/assets/{esm-BTyesPLl.js → esm-MvMf2P5n.js} +1 -1
  128. package/dist/assets/{field-DGtw6Lae.js → field-D-izY3ud.js} +1 -1
  129. package/dist/assets/file-explorer-panel-BIzyNOVs.js +17 -0
  130. package/dist/assets/{file-video-camera-Fa5c_iPb.js → file-headphone-daOQzJg0.js} +1 -1
  131. package/dist/assets/file-icons-C-oatBuk.js +1 -0
  132. package/dist/assets/{floating-outline-BWK_nLJy.js → floating-outline-BPmtgKWs.js} +1 -1
  133. package/dist/assets/{flowDiagram-NV44I4VS-DR-64sse.js → flowDiagram-NV44I4VS-xMIxed1s.js} +1 -1
  134. package/dist/assets/{focus-ShrwcKIv.js → focus-j9zawi1p.js} +1 -1
  135. package/dist/assets/{form-B7_NRa34.js → form-DrpSpDea.js} +1 -1
  136. package/dist/assets/{formats-C3K3rlAZ.js → formats-CkafgGfe.js} +1 -1
  137. package/dist/assets/{formatting-8bP-RDnl.js → formatting-By3b5Lx8.js} +1 -1
  138. package/dist/assets/{gallery-page-DRBZRnaN.js → gallery-page-BrljeBFe.js} +1 -1
  139. package/dist/assets/{ganttDiagram-JELNMOA3-BWuQMrGd.js → ganttDiagram-JELNMOA3-Be16Pv8U.js} +1 -1
  140. package/dist/assets/{gitGraphDiagram-V2S2FVAM-Mr5-PYgM.js → gitGraphDiagram-V2S2FVAM-DQ4scp6S.js} +1 -1
  141. package/dist/assets/{glide-data-editor-BurnHmgR.js → glide-data-editor-8kdd_nPE.js} +4 -4
  142. package/dist/assets/{globals-BlB0Ba6E.js → globals-D2ulvntX.js} +1 -1
  143. package/dist/assets/home-page-O_c6IiAp.js +4 -0
  144. package/dist/assets/{hooks-BY6oGAlX.js → hooks-Z1j4FmRH.js} +1 -1
  145. package/dist/assets/html-to-image-D-FY7miL.js +2 -0
  146. package/dist/assets/image-CBwHq93J.js +1 -0
  147. package/dist/assets/index-B7vfm6Sw.js +38 -0
  148. package/dist/assets/{index-Dzwe9vKA.css → index-fYvRsNGP.css} +1 -1
  149. package/dist/assets/{infoDiagram-HS3SLOUP-Bs8aKpuZ.js → infoDiagram-HS3SLOUP-DzsICEl9.js} +1 -1
  150. package/dist/assets/input-GLbHj4DF.js +1 -0
  151. package/dist/assets/{journeyDiagram-XKPGCS4Q-aCZRxOHn.js → journeyDiagram-XKPGCS4Q-Dt4UItaM.js} +1 -1
  152. package/dist/assets/{kanban-definition-3W4ZIXB7-BlOJJ-5B.js → kanban-definition-3W4ZIXB7-Do_8fQeU.js} +1 -1
  153. package/dist/assets/katex-BalO4WMU.js +1 -0
  154. package/dist/assets/{kiosk-mode-BBqwMND1.js → kiosk-mode-BuLLP9k3.js} +1 -1
  155. package/dist/assets/{label-DmqkEXI4.js → label-CDwJXweF.js} +1 -1
  156. package/dist/assets/layout-DQhzfSJn.js +5 -0
  157. package/dist/assets/{linear-2A1iDmqT.js → linear-c4WCYuol.js} +1 -1
  158. package/dist/assets/{links-syPBpTLO.js → links-C9QsxOBC.js} +1 -1
  159. package/dist/assets/{logs-panel-BHFI-jG1.js → logs-panel-BKhNdCxG.js} +1 -1
  160. package/dist/assets/{maps-8VTEe-0T.js → maps-CTMzJkSk.js} +1 -1
  161. package/dist/assets/{marimo-icons-BDAuIiW5.js → marimo-icons-BmYE_Rrf.js} +1 -1
  162. package/dist/assets/{markdown-renderer-B6a5ZAwT.js → markdown-renderer-D02U2W2X.js} +4 -4
  163. package/dist/assets/{menu-items-Bs2e3wuf.js → menu-items-CRjHRaiu.js} +1 -1
  164. package/dist/assets/mermaid-4DMBBIKO-C2MO8Ayk.js +1 -0
  165. package/dist/assets/{mermaid-Cq8ttjss.js → mermaid-DJfb-vZs.js} +3 -3
  166. package/dist/assets/{mermaid-parser.core-DbGD2gKa.js → mermaid-parser.core-C-MdXFgl.js} +1 -1
  167. package/dist/assets/{mhchem-BJZpIgRF.js → mhchem-DqNBdKjC.js} +1 -1
  168. package/dist/assets/{mindmap-definition-VGOIOE7T-Dt6ZRws3.js → mindmap-definition-VGOIOE7T-YOE4okXd.js} +1 -1
  169. package/dist/assets/{multi-map-kCmlVJ-5.js → multi-map-BubyGH4K.js} +1 -1
  170. package/dist/assets/{name-cell-input-BRHlWy2Y.js → name-cell-input-DOyCua0o.js} +1 -1
  171. package/dist/assets/{number-overlay-editor-BDnI-mwa.js → number-overlay-editor-zZDGu9D2.js} +1 -1
  172. package/dist/assets/{numbers-44Cj1Me-.js → numbers-Eb1pfDec.js} +1 -1
  173. package/dist/assets/{outline-panel-uyRmU3NX.js → outline-panel-CgQ2GmbX.js} +1 -1
  174. package/dist/assets/{packages-panel-D8d46YWc.js → packages-panel-n8Ssm9M8.js} +1 -1
  175. package/dist/assets/{panels-Do1_ry1k.js → panels-B4wExe_l.js} +1 -1
  176. package/dist/assets/{pieDiagram-ADFJNKIX-3GEmpmfg.js → pieDiagram-ADFJNKIX-CjRyNR5b.js} +1 -1
  177. package/dist/assets/{popover-Cvl9xY6R.js → popover-XNIX-rv1.js} +1 -1
  178. package/dist/assets/{precisionRound-BOmLQIKI.js → precisionRound-CCOoIlcP.js} +1 -1
  179. package/dist/assets/{process-output-4yip1nZE.js → process-output-BwkCApeo.js} +1 -1
  180. package/dist/assets/purify.es-BBn8CPhf.js +2 -0
  181. package/dist/assets/{quadrantDiagram-AYHSOK5B-Dela17qb.js → quadrantDiagram-AYHSOK5B-ZvWY20UO.js} +1 -1
  182. package/dist/assets/{react-vega-C6zUovDg.js → react-vega-DzWik59S.js} +1 -1
  183. package/dist/assets/react-vega-plcnUXVG.js +1 -0
  184. package/dist/assets/{readonly-python-code-DmjbJYSq.js → readonly-python-code-BFyASvPB.js} +1 -1
  185. package/dist/assets/{renderShortcut-BJEd-iA7.js → renderShortcut-BjTUrvc5.js} +1 -1
  186. package/dist/assets/{request-registry-CN4oD1xn.js → request-registry-LM8kl4Xv.js} +1 -1
  187. package/dist/assets/{requirementDiagram-UZGBJVZJ-CjimGyZ2.js → requirementDiagram-UZGBJVZJ-4LJ2QyR9.js} +1 -1
  188. package/dist/assets/{run-page-BGijCqbR.js → run-page-BYEyHIaG.js} +1 -1
  189. package/dist/assets/{runs-BMpRKQKC.js → runs-B4QSIylk.js} +1 -1
  190. package/dist/assets/{sankeyDiagram-TZEHDZUN-CBE98yUR.js → sankeyDiagram-TZEHDZUN-7OqUpHYR.js} +1 -1
  191. package/dist/assets/{scratchpad-panel-ByOWj9u_.js → scratchpad-panel-BRTSBHvd.js} +1 -1
  192. package/dist/assets/{secrets-panel-C2n4dedt.js → secrets-panel-DAnccD-S.js} +1 -1
  193. package/dist/assets/{select-DygbgNTD.js → select-DMX8tcVe.js} +1 -1
  194. package/dist/assets/{sequenceDiagram-WL72ISMW-DSgG0Zyn.js → sequenceDiagram-WL72ISMW-C4sGREOt.js} +1 -1
  195. package/dist/assets/{session-DnMOyddG.js → session-iz9BPeTp.js} +1 -1
  196. package/dist/assets/session-panel-k6_Gni4X.js +1 -0
  197. package/dist/assets/{share-sD4fbzpH.js → share-BWMZuJWY.js} +1 -1
  198. package/dist/assets/{slides-component-B6-Jz3p0.js → slides-component-6o8TgsRv.js} +1 -1
  199. package/dist/assets/{snippets-panel-Bzz2M38q.js → snippets-panel-mGo3M47p.js} +1 -1
  200. package/dist/assets/{spec-Be-iRLAY.js → spec-BQ0QuStT.js} +1 -1
  201. package/dist/assets/{state-Xu6bDsJl.js → state-CGR3DB1q.js} +1 -1
  202. package/dist/assets/{state-D2jTOQOG.js → state-CsNC_7dZ.js} +1 -1
  203. package/dist/assets/{state-B_fNn_z_.js → state-Dj88xOmZ.js} +1 -1
  204. package/dist/assets/{stateDiagram-FKZM4ZOC-By2PSLiJ.js → stateDiagram-FKZM4ZOC-4PvEH0nH.js} +1 -1
  205. package/dist/assets/stateDiagram-v2-4FDKWEC3-CpKgwrjU.js +1 -0
  206. package/dist/assets/stex-BBWVYm-R.js +1 -0
  207. package/dist/assets/{switch-tdkZNn4k.js → switch-BMqCO9bm.js} +1 -1
  208. package/dist/assets/{terminal-CGmjeYqa.js → terminal-qMuurRSM.js} +1 -1
  209. package/dist/assets/{time-BLCpKsnL.js → time-BuGE4zW4.js} +1 -1
  210. package/dist/assets/{timeline-definition-IT6M3QCI-rq80_nVa.js → timeline-definition-IT6M3QCI-D9wk3zrs.js} +1 -1
  211. package/dist/assets/{toggle-BhEcsHTu.js → toggle-BYx0fN9n.js} +1 -1
  212. package/dist/assets/{tooltip-DOQlecCr.js → tooltip-CKZGcDDd.js} +1 -1
  213. package/dist/assets/{tooltip-D_HRHf_c.js → tooltip-CQeE9o7x.js} +1 -1
  214. package/dist/assets/{tracing-BZx6nEPl.js → tracing-DTCuFbVV.js} +1 -1
  215. package/dist/assets/tracing-panel-B1EJu6-W.js +2 -0
  216. package/dist/assets/{tree-D0AxVJ_I.js → tree-82qhH45u.js} +1 -1
  217. package/dist/assets/{useAddCell-BRlAqdmq.js → useAddCell-BdUpg_Ta.js} +1 -1
  218. package/dist/assets/useBoolean-2eWc7NX-.js +1 -0
  219. package/dist/assets/useCellActionButton-CJ_LAoma.js +1 -0
  220. package/dist/assets/{useDateFormatter-CmtFqjqu.js → useDateFormatter-DOoVZUts.js} +1 -1
  221. package/dist/assets/{useDeleteCell-BAfiIxKf.js → useDeleteCell-C1uMlYZu.js} +1 -1
  222. package/dist/assets/{useDependencyPanelTab-jTu3L200.js → useDependencyPanelTab-nuk9kUr_.js} +1 -1
  223. package/dist/assets/useEventListener-DP66hBzA.js +1 -0
  224. package/dist/assets/{useIframeCapabilities-T3alJPda.js → useIframeCapabilities-BhFmTPLk.js} +1 -1
  225. package/dist/assets/{useInstallPackage-jGxNsOWc.js → useInstallPackage-CyTwCrsi.js} +1 -1
  226. package/dist/assets/{useInterval-lamrIyKJ.js → useInterval-Ct4FP8Tw.js} +1 -1
  227. package/dist/assets/{useLifecycle-BDXC6oVR.js → useLifecycle-BRklGKFJ.js} +1 -1
  228. package/dist/assets/useNotebookActions-Bh8YMrlo.js +1 -0
  229. package/dist/assets/{useNumberFormatter-DMA_kIIZ.js → useNumberFormatter-BXZcbTzH.js} +1 -1
  230. package/dist/assets/usePress-G817DpBk.js +7 -0
  231. package/dist/assets/{useSplitCell-CB32IpFa.js → useSplitCell-D7EHwIIE.js} +1 -1
  232. package/dist/assets/{useTheme-CwdqVOYu.js → useTheme-Co8bbxoC.js} +1 -1
  233. package/dist/assets/{utils-CORJ8yYa.js → utils-C1ZciZbF.js} +1 -1
  234. package/dist/assets/{vega-component-BLW2fY7v.js → vega-component-CoUjMYqz.js} +1 -1
  235. package/dist/assets/{vega-loader.browser-CZV6_g2i.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
  236. package/dist/assets/{write-secret-modal-DuxmGjDn.js → write-secret-modal-DOyKonZB.js} +1 -1
  237. package/dist/assets/{xychartDiagram-PRI3JC2R-Bnjm0Q9u.js → xychartDiagram-PRI3JC2R-CTDFOoiw.js} +1 -1
  238. package/dist/index.html +131 -130
  239. package/package.json +9 -9
  240. package/src/__mocks__/requests.ts +1 -0
  241. package/src/components/app-config/ai-config.tsx +10 -0
  242. package/src/components/data-table/pagination.tsx +36 -30
  243. package/src/components/datasources/components.tsx +3 -6
  244. package/src/components/datasources/datasources.tsx +8 -21
  245. package/src/components/editor/actions/types.ts +6 -1
  246. package/src/components/editor/actions/useNotebookActions.tsx +50 -13
  247. package/src/components/editor/chrome/types.ts +17 -0
  248. package/src/components/editor/controls/command-palette.tsx +7 -0
  249. package/src/components/editor/controls/keyboard-shortcuts.tsx +3 -1
  250. package/src/components/editor/file-tree/file-explorer.tsx +48 -62
  251. package/src/components/editor/file-tree/file-icons.tsx +132 -0
  252. package/src/components/editor/file-tree/file-viewer.tsx +1 -1
  253. package/src/components/editor/file-tree/tree-actions.tsx +107 -0
  254. package/src/components/editor/file-tree/types.ts +2 -96
  255. package/src/components/editor/header/filename-input.tsx +4 -1
  256. package/src/components/icons/marimo-icons.tsx +2 -2
  257. package/src/components/pages/home-page.tsx +5 -5
  258. package/src/components/storage/components.tsx +0 -38
  259. package/src/components/storage/storage-file-viewer.tsx +1 -1
  260. package/src/components/storage/storage-inspector.tsx +28 -45
  261. package/src/components/ui/command.tsx +2 -0
  262. package/src/components/ui/links.tsx +1 -0
  263. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +79 -0
  264. package/src/core/ai/tools/run-cells-tool.ts +63 -17
  265. package/src/core/hotkeys/__tests__/hotkeys.test.ts +64 -1
  266. package/src/core/hotkeys/hotkeys.ts +29 -3
  267. package/src/core/islands/bridge.ts +1 -0
  268. package/src/core/network/__tests__/requests-network.test.ts +17 -0
  269. package/src/core/network/requests-lazy.ts +1 -0
  270. package/src/core/network/requests-network.ts +9 -0
  271. package/src/core/network/requests-static.ts +1 -0
  272. package/src/core/network/requests-toasting.tsx +1 -0
  273. package/src/core/network/types.ts +1 -0
  274. package/src/core/wasm/bridge.ts +1 -0
  275. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -4
  276. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +309 -0
  277. package/src/plugins/impl/mpl-interactive/__tests__/mpl-websocket-shim.test.ts +110 -0
  278. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +57 -0
  279. package/src/plugins/plugins.ts +2 -0
  280. package/src/utils/__tests__/filenames.test.ts +7 -0
  281. package/src/utils/__tests__/smartMatch.test.ts +61 -0
  282. package/src/utils/filenames.ts +3 -0
  283. package/src/utils/smartMatch.ts +62 -0
  284. package/dist/assets/add-connection-dialog-9CzjZlY9.js +0 -138
  285. package/dist/assets/ai-model-dropdown-C3Y44M85.js +0 -5
  286. package/dist/assets/channel-k8gMdpPa.js +0 -1
  287. package/dist/assets/classDiagram-2ON5EDUG-DDFZaNDy.js +0 -1
  288. package/dist/assets/classDiagram-v2-WZHVMYZB-CEbmnHKU.js +0 -1
  289. package/dist/assets/command-DQqqP-WF.js +0 -1
  290. package/dist/assets/command-palette-BSS73m03.js +0 -1
  291. package/dist/assets/components-CF9x5raB.js +0 -1
  292. package/dist/assets/context-B1_BdDTF.js +0 -1
  293. package/dist/assets/context-aware-panel-HnyO4-L2.js +0 -3
  294. package/dist/assets/dist-B8osAFLA.js +0 -1
  295. package/dist/assets/dist-BYtATjzn.js +0 -1
  296. package/dist/assets/dist-Bb40mZM7.js +0 -1
  297. package/dist/assets/dist-C3z6pMsI.js +0 -1
  298. package/dist/assets/dist-CA6NQs25.js +0 -1
  299. package/dist/assets/dist-CCW85AP3.js +0 -1
  300. package/dist/assets/dist-CCnNQVp_.js +0 -1
  301. package/dist/assets/dist-CRVvx8nD.js +0 -1
  302. package/dist/assets/dist-CdZb2Grj.js +0 -1
  303. package/dist/assets/dist-ClLHDbNP.js +0 -1
  304. package/dist/assets/dist-CtKltiBh.js +0 -1
  305. package/dist/assets/dist-D-_c0KFz.js +0 -1
  306. package/dist/assets/dist-D6kWc2hF.js +0 -1
  307. package/dist/assets/dist-D89dID68.js +0 -1
  308. package/dist/assets/dist-DU2EJ7el.js +0 -3
  309. package/dist/assets/dist-DUY6xZX8.js +0 -13
  310. package/dist/assets/dist-DVHYieHl.js +0 -1
  311. package/dist/assets/dist-Q0mIwD1V.js +0 -1
  312. package/dist/assets/dist-aBuSkHFR.js +0 -1
  313. package/dist/assets/dist-gm5AeuIM.js +0 -1
  314. package/dist/assets/dist-p-IM2PMR.js +0 -1
  315. package/dist/assets/download-BTm4CTKr.js +0 -9
  316. package/dist/assets/edit-page-26-lDVMB.js +0 -13
  317. package/dist/assets/file-code-D9wtWSiR.js +0 -1
  318. package/dist/assets/file-explorer-panel-Bv8lRdKl.js +0 -1
  319. package/dist/assets/home-page-BXQp6S6h.js +0 -4
  320. package/dist/assets/html-to-image-b9BimK8l.js +0 -2
  321. package/dist/assets/index-B8ImLAg8.js +0 -38
  322. package/dist/assets/input-BPldEXfy.js +0 -1
  323. package/dist/assets/katex-YDobqqVd.js +0 -1
  324. package/dist/assets/layout-DVAA7kHH.js +0 -5
  325. package/dist/assets/mermaid-4DMBBIKO-C0QemhGt.js +0 -1
  326. package/dist/assets/purify.es-CPplrWRQ.js +0 -2
  327. package/dist/assets/react-vega-1nuO-sn0.js +0 -1
  328. package/dist/assets/session-panel-B_8ny7jh.js +0 -1
  329. package/dist/assets/stateDiagram-v2-4FDKWEC3-ct96_mle.js +0 -1
  330. package/dist/assets/stex-pjf-hOob.js +0 -1
  331. package/dist/assets/tracing-panel-Dz9mRjXj.js +0 -2
  332. package/dist/assets/types-DFiYrN2w.js +0 -17
  333. package/dist/assets/useBoolean-eWwLICkT.js +0 -1
  334. package/dist/assets/useCellActionButton-DFgACqVf.js +0 -1
  335. package/dist/assets/useEventListener-CjXriKgk.js +0 -1
  336. package/dist/assets/useNotebookActions-XGX8NzaB.js +0 -1
  337. package/dist/assets/usePress-DsLftN-x.js +0 -7
  338. /package/dist/assets/{Deferred-D2igisxY.js → Deferred-BMfCOLaw.js} +0 -0
  339. /package/dist/assets/{SSRProvider-DC7ElCZZ.js → SSRProvider-CwqN9FWV.js} +0 -0
  340. /package/dist/assets/{alert-0YTlkh9P.js → alert-Bs8tbZo_.js} +0 -0
  341. /package/dist/assets/{badge-CNBv2dAU.js → badge-BUFDGZ04.js} +0 -0
  342. /package/dist/assets/{blob-CObhN-9g.js → blob-DgooIGjS.js} +0 -0
  343. /package/dist/assets/{defaultLocale-DK1MWd7f.js → defaultLocale-CGfP-Ye3.js} +0 -0
  344. /package/dist/assets/{defaultLocale-OkOxlkkM.js → defaultLocale-CuYNS33t.js} +0 -0
  345. /package/dist/assets/{emotion-is-prop-valid.esm-D7FeWASw.js → emotion-is-prop-valid.esm-lG8j6oqk.js} +0 -0
  346. /package/dist/assets/{en-US-DBqDb4Nb.js → en-US-k6sS5Nab.js} +0 -0
  347. /package/dist/assets/{errors-Bfogio62.js → errors-0IrrdfSG.js} +0 -0
  348. /package/dist/assets/{extends-aq1t6BkR.js → extends-B9D0JO9U.js} +0 -0
  349. /package/dist/assets/{github-BrsjF9dp.js → github-BY6XM4ej.js} +0 -0
  350. /package/dist/assets/{isValid-D3F4nmET.js → isValid-CUXKlcrM.js} +0 -0
  351. /package/dist/assets/{katex-rvFxOCU-.js → katex-FSdXOW5Y.js} +0 -0
  352. /package/dist/assets/{kbd-CVbqSkT8.js → kbd-Rn7tWvNg.js} +0 -0
  353. /package/dist/assets/{link-Cpo6yhBB.js → link-BmtFffTv.js} +0 -0
  354. /package/dist/assets/{links-BKV6zi_7.js → links-MkDbmF2p.js} +0 -0
  355. /package/dist/assets/{objectWithoutPropertiesLoose-Dxmp_Bd_.js → objectWithoutPropertiesLoose-CboCOq4o.js} +0 -0
  356. /package/dist/assets/{ordinal-BEKpVWu-.js → ordinal-DMIExrUm.js} +0 -0
  357. /package/dist/assets/{paths-bMgYkaP2.js → paths-D2lG83Oh.js} +0 -0
  358. /package/dist/assets/{play-D4Tdvkms.js → play-CkqWG85-.js} +0 -0
  359. /package/dist/assets/{plus-B-s-VRHt.js → plus-C9B_qWUi.js} +0 -0
  360. /package/dist/assets/{preload-helper-TXkS1QI3.js → preload-helper-BW0IMuFq.js} +0 -0
  361. /package/dist/assets/{prop-types-DRf51_gT.js → prop-types-C638SUfx.js} +0 -0
  362. /package/dist/assets/{range-DNqFcYmr.js → range-ClqUI25v.js} +0 -0
  363. /package/dist/assets/{refresh-ccw-BOzRCrXK.js → refresh-ccw-B3lGEyQm.js} +0 -0
  364. /package/dist/assets/{refresh-cw-DeCFDX1B.js → refresh-cw-fLeDriQe.js} +0 -0
  365. /package/dist/assets/{rotate-ccw-BG5BZyzw.js → rotate-ccw-DgH8qERb.js} +0 -0
  366. /package/dist/assets/{save-I_RGv5p0.js → save-C91FTnFa.js} +0 -0
  367. /package/dist/assets/{settings-DD8FJvQ_.js → settings-DRfuuLRT.js} +0 -0
  368. /package/dist/assets/{spinner-DCSoZZhh.js → spinner-Dt4SmUsI.js} +0 -0
  369. /package/dist/assets/{square-oV8Csj8Y.js → square-DZpWT_hp.js} +0 -0
  370. /package/dist/assets/{square-function-4zY5Dv0P.js → square-function-DEp1ozoA.js} +0 -0
  371. /package/dist/assets/{stex-FMMSUPAS.js → stex-0ac7Aukl.js} +0 -0
  372. /package/dist/assets/{trash-2-DtQaB9NM.js → trash-2-CrA4LwJ2.js} +0 -0
  373. /package/dist/assets/{trash-Basz0Kvc.js → trash-ZGxZ3QGq.js} +0 -0
  374. /package/dist/assets/{triangle-alert-n1-FF7zs.js → triangle-alert-CzmxsxFO.js} +0 -0
  375. /package/dist/assets/{types-BhvWC48z.js → types-CswNghXe.js} +0 -0
  376. /package/dist/assets/{use-toast-BhMe50aT.js → use-toast-Hc8CXlvz.js} +0 -0
  377. /package/dist/assets/{useAsyncData-DVm0BCFt.js → useAsyncData-CI3ntihq.js} +0 -0
  378. /package/dist/assets/{useDebounce-BUC67G8E.js → useDebounce-S9zaMzrr.js} +0 -0
  379. /package/dist/assets/{uuid-ImXS-885.js → uuid-ClFZlR7U.js} +0 -0
  380. /package/dist/assets/{workflow-CU6kAL_h.js → workflow-DgZ_19fF.js} +0 -0
  381. /package/dist/assets/{youtube-fKFch587.js → youtube-DfMgNU9-.js} +0 -0
@@ -113,5 +113,22 @@ describe("createNetworkRequests", () => {
113
113
  }),
114
114
  );
115
115
  });
116
+
117
+ it("exportAsIPYNB should call the new endpoint as text", async () => {
118
+ const requests = createNetworkRequests();
119
+ await requests.exportAsIPYNB({
120
+ download: false,
121
+ } as any);
122
+
123
+ expect(mockClient.POST).toHaveBeenCalledWith(
124
+ "/api/export/ipynb",
125
+ expect.objectContaining({
126
+ body: expect.objectContaining({
127
+ download: false,
128
+ }),
129
+ parseAs: "text",
130
+ }),
131
+ );
132
+ });
116
133
  });
117
134
  });
@@ -49,6 +49,7 @@ const ACTIONS: Record<keyof AllRequests, Action> = {
49
49
 
50
50
  // Export operations start a connection
51
51
  exportAsHTML: "startConnection",
52
+ exportAsIPYNB: "startConnection",
52
53
  exportAsMarkdown: "startConnection",
53
54
  exportAsPDF: "startConnection",
54
55
  readCode: "startConnection",
@@ -381,6 +381,15 @@ export function createNetworkRequests(): EditRequests & RunRequests {
381
381
  })
382
382
  .then(handleResponse);
383
383
  },
384
+ exportAsIPYNB: async (request) => {
385
+ return getClient()
386
+ .POST("/api/export/ipynb", {
387
+ body: request,
388
+ parseAs: "text",
389
+ params: getParams(),
390
+ })
391
+ .then(handleResponse);
392
+ },
384
393
  exportAsPDF: async (request) => {
385
394
  return getClient()
386
395
  .POST("/api/export/pdf", {
@@ -75,6 +75,7 @@ export function createStaticRequests(): EditRequests & RunRequests {
75
75
  getRunningNotebooks: throwNotInEditMode,
76
76
  shutdownSession: throwNotInEditMode,
77
77
  exportAsHTML: throwNotInEditMode,
78
+ exportAsIPYNB: throwNotInEditMode,
78
79
  exportAsMarkdown: throwNotInEditMode,
79
80
  exportAsPDF: throwNotInEditMode,
80
81
  autoExportAsHTML: throwNotInEditMode,
@@ -60,6 +60,7 @@ export function createErrorToastingRequests(
60
60
  getRunningNotebooks: "Failed to get running notebooks",
61
61
  shutdownSession: "Failed to shutdown session",
62
62
  exportAsHTML: "Failed to export HTML",
63
+ exportAsIPYNB: "Failed to export ipynb",
63
64
  exportAsMarkdown: "Failed to export Markdown",
64
65
  exportAsPDF: "Failed to export PDF",
65
66
  autoExportAsHTML: "", // No toast
@@ -180,6 +180,7 @@ export interface EditRequests {
180
180
  ) => Promise<RunningNotebooksResponse>;
181
181
  // Export requests
182
182
  exportAsHTML: (request: ExportAsHTMLRequest) => Promise<string>;
183
+ exportAsIPYNB: (request: ExportAsIPYNBRequest) => Promise<string>;
183
184
  exportAsMarkdown: (request: ExportAsMarkdownRequest) => Promise<string>;
184
185
  exportAsPDF: (request: ExportAsPDFRequest) => Promise<Blob>;
185
186
  autoExportAsHTML: (request: ExportAsHTMLRequest) => Promise<null>;
@@ -587,6 +587,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
587
587
  getWorkspaceFiles = throwNotImplemented;
588
588
  getRunningNotebooks = throwNotImplemented;
589
589
  shutdownSession = throwNotImplemented;
590
+ exportAsIPYNB = throwNotImplemented;
590
591
  exportAsPDF = throwNotImplemented;
591
592
  autoExportAsHTML = throwNotImplemented;
592
593
  autoExportAsMarkdown = throwNotImplemented;
@@ -4,10 +4,10 @@ import { CornerLeftUp } from "lucide-react";
4
4
  import { type JSX, useEffect, useState } from "react";
5
5
  import { z } from "zod";
6
6
  import {
7
- FILE_TYPE_ICONS,
8
- type FileType,
9
- guessFileType,
10
- } from "@/components/editor/file-tree/types";
7
+ FILE_ICON as FILE_TYPE_ICONS,
8
+ type FileIconType as FileType,
9
+ guessFileIconType as guessFileType,
10
+ } from "@/components/editor/file-tree/file-icons";
11
11
  import { Spinner } from "@/components/icons/spinner";
12
12
  import { Button } from "@/components/ui/button";
13
13
  import { Checkbox } from "@/components/ui/checkbox";
@@ -0,0 +1,309 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+
4
+ import { useCallback, useEffect, useRef } from "react";
5
+ import { z } from "zod";
6
+ import { useEventListener } from "@/hooks/useEventListener";
7
+ import { createPlugin } from "@/plugins/core/builder";
8
+ import { MODEL_MANAGER, type Model } from "@/plugins/impl/anywidget/model";
9
+ import type { ModelState, WidgetModelId } from "@/plugins/impl/anywidget/types";
10
+ import type { IPluginProps } from "@/plugins/types";
11
+ import { downloadBlob } from "@/utils/download";
12
+ import { Logger } from "@/utils/Logger";
13
+ import { MplCommWebSocket } from "./mpl-websocket-shim";
14
+
15
+ const MPL_SCOPE_CLASS = "mpl-interactive-figure";
16
+
17
+ interface Data {
18
+ mplJsUrl: string;
19
+ cssUrl: string;
20
+ toolbarImages: Record<string, string>;
21
+ width: number;
22
+ height: number;
23
+ }
24
+
25
+ interface ModelIdRef {
26
+ model_id: WidgetModelId;
27
+ }
28
+
29
+ declare global {
30
+ interface Window {
31
+ mpl: {
32
+ figure: new (
33
+ id: string,
34
+ ws: MplCommWebSocket,
35
+ ondownload: (figure: MplFigure, format: string) => void,
36
+ element: HTMLElement,
37
+ ) => MplFigure;
38
+ toolbar_items: [
39
+ string | null,
40
+ string | null,
41
+ string | null,
42
+ string | null,
43
+ ][];
44
+ };
45
+ }
46
+ }
47
+
48
+ interface MplFigure {
49
+ id: string;
50
+ ws: MplCommWebSocket;
51
+ root: HTMLElement;
52
+ send_message: (type: string, properties: Record<string, unknown>) => void;
53
+ }
54
+
55
+ export const MplInteractivePlugin = createPlugin<ModelIdRef>(
56
+ "marimo-mpl-interactive",
57
+ )
58
+ .withData(
59
+ z.object({
60
+ mplJsUrl: z.string(),
61
+ cssUrl: z.string(),
62
+ toolbarImages: z.record(z.string(), z.string()),
63
+ width: z.number(),
64
+ height: z.number(),
65
+ }),
66
+ )
67
+ .withFunctions({})
68
+ .renderer((props) => <MplInteractiveSlot {...props} />);
69
+
70
+ let mplJsLoading: Promise<void> | null = null;
71
+
72
+ async function ensureMplJs(jsUrl: string): Promise<void> {
73
+ if (window.mpl) {
74
+ return;
75
+ }
76
+ if (mplJsLoading) {
77
+ return mplJsLoading;
78
+ }
79
+ mplJsLoading = new Promise<void>((resolve, reject) => {
80
+ const script = document.createElement("script");
81
+ script.src = jsUrl;
82
+ script.onload = () => resolve();
83
+ script.onerror = () => {
84
+ mplJsLoading = null;
85
+ reject(new Error("Failed to load mpl.js"));
86
+ };
87
+ document.head.append(script);
88
+ });
89
+ return mplJsLoading;
90
+ }
91
+
92
+ /**
93
+ * Patch mpl.js toolbar image references to use inline data URIs.
94
+ *
95
+ * mpl.js sets `icon_img.src = '_images/' + image + '.png'` and
96
+ * `icon_img.srcset = '_images/' + image + '_large.png 2x'`.
97
+ *
98
+ * We observe the container for new <img> elements and rewrite their
99
+ * src/srcset to the inlined base64 data URIs.
100
+ */
101
+ function patchToolbarImages(
102
+ container: HTMLElement,
103
+ toolbarImages: Record<string, string>,
104
+ ): () => void {
105
+ const patchImg = (img: HTMLImageElement) => {
106
+ const src = img.getAttribute("src") || "";
107
+ const match = src.match(/_images\/(.+)\.png$/);
108
+ if (match) {
109
+ const name = match[1];
110
+ const dataUri = toolbarImages[name];
111
+ if (dataUri) {
112
+ img.src = dataUri;
113
+ }
114
+ }
115
+ const srcset = img.getAttribute("srcset") || "";
116
+ const srcsetMatch = srcset.match(/_images\/(.+)\.png\s+2x$/);
117
+ if (srcsetMatch) {
118
+ const name = srcsetMatch[1];
119
+ const dataUri = toolbarImages[name];
120
+ if (dataUri) {
121
+ img.srcset = `${dataUri} 2x`;
122
+ }
123
+ }
124
+ };
125
+
126
+ // Patch any existing images
127
+ for (const img of container.querySelectorAll("img")) {
128
+ patchImg(img);
129
+ }
130
+
131
+ // Observe for new images added by mpl.js
132
+ const observer = new MutationObserver((mutations) => {
133
+ for (const mutation of mutations) {
134
+ for (const node of mutation.addedNodes) {
135
+ if (node instanceof HTMLImageElement) {
136
+ patchImg(node);
137
+ } else if (node instanceof HTMLElement) {
138
+ for (const img of node.querySelectorAll("img")) {
139
+ patchImg(img);
140
+ }
141
+ }
142
+ }
143
+ }
144
+ });
145
+
146
+ observer.observe(container, { childList: true, subtree: true });
147
+ return () => observer.disconnect();
148
+ }
149
+
150
+ function injectCss(container: HTMLElement, cssUrl: string): () => void {
151
+ const link = document.createElement("link");
152
+ link.rel = "stylesheet";
153
+ link.href = cssUrl;
154
+ container.append(link);
155
+ return () => link.remove();
156
+ }
157
+
158
+ const MplInteractiveSlot = (props: IPluginProps<ModelIdRef, Data>) => {
159
+ const { mplJsUrl, cssUrl, toolbarImages, width, height } = props.data;
160
+ const { model_id: modelId } = props.value;
161
+ const containerRef = useRef<HTMLDivElement>(null);
162
+ const figureRef = useRef<MplFigure | null>(null);
163
+ const wsRef = useRef<MplCommWebSocket | null>(null);
164
+
165
+ const setupFigure = useCallback(
166
+ async (container: HTMLElement) => {
167
+ // Load mpl.js globally (only once, via <script src>)
168
+ await ensureMplJs(mplJsUrl);
169
+
170
+ if (!window.mpl) {
171
+ Logger.error("mpl.js failed to load");
172
+ return;
173
+ }
174
+
175
+ // Get the model from MODEL_MANAGER
176
+ let model: Model<ModelState>;
177
+ try {
178
+ model = await MODEL_MANAGER.get(modelId);
179
+ } catch {
180
+ Logger.error("Failed to get model for mpl interactive", modelId);
181
+ return;
182
+ }
183
+
184
+ // Create the fake WebSocket
185
+ const fakeWs = new MplCommWebSocket((msg: unknown) => {
186
+ // Send from frontend → backend via model custom message
187
+ model.send(msg);
188
+ });
189
+ wsRef.current = fakeWs;
190
+
191
+ // Listen for backend → frontend messages via model custom events
192
+ const handleCustomMessage = (
193
+ content: { type: string; data?: unknown; format?: string },
194
+ buffers?: readonly DataView[],
195
+ ) => {
196
+ if (!content) {
197
+ return;
198
+ }
199
+
200
+ if (content.type === "json") {
201
+ fakeWs.receiveJson(content.data);
202
+ } else if (content.type === "binary" && buffers && buffers.length > 0) {
203
+ fakeWs.receiveBinary(buffers[0]);
204
+ } else if (
205
+ content.type === "download" &&
206
+ buffers &&
207
+ buffers.length > 0
208
+ ) {
209
+ const fmt = content.format || "png";
210
+ const dv = buffers[0];
211
+ const ab = dv.buffer.slice(
212
+ dv.byteOffset,
213
+ dv.byteOffset + dv.byteLength,
214
+ ) as ArrayBuffer;
215
+ downloadBlob(
216
+ new Blob([ab], { type: `image/${fmt}` }),
217
+ `figure.${fmt}`,
218
+ );
219
+ }
220
+ };
221
+
222
+ model.on("msg:custom", handleCustomMessage as any);
223
+
224
+ // Create the mpl figure
225
+ const figId = modelId;
226
+ const ondownload = (_figure: MplFigure, format: string) => {
227
+ // Send download request to backend
228
+ model.send({ type: "download", format });
229
+ };
230
+
231
+ const fig = new window.mpl.figure(figId, fakeWs, ondownload, container);
232
+ figureRef.current = fig;
233
+
234
+ // Set the canvas_div to the backend's figure size so the
235
+ // ResizeObserver doesn't trigger an immediate resize cycle.
236
+ // mpl.js creates: fig.root > [titlebar, canvas_div, toolbar]
237
+ const canvasDiv = fig.root.querySelector<HTMLElement>("div[tabindex]");
238
+ if (canvasDiv) {
239
+ canvasDiv.style.width = `${width}px`;
240
+ canvasDiv.style.height = `${height}px`;
241
+ }
242
+
243
+ // Trigger the onopen callback to start communication
244
+ // mpl.js sends initial messages in onopen
245
+ setTimeout(() => {
246
+ fakeWs.onopen?.();
247
+ }, 0);
248
+
249
+ return () => {
250
+ model.off("msg:custom", handleCustomMessage as any);
251
+ fakeWs.close();
252
+ };
253
+ },
254
+ [modelId, mplJsUrl, width, height],
255
+ );
256
+
257
+ useEffect(() => {
258
+ const container = containerRef.current;
259
+ if (!container) {
260
+ return;
261
+ }
262
+
263
+ // Clear any previous content (handles re-render / cell re-run)
264
+ container.innerHTML = "";
265
+
266
+ // Inject CSS
267
+ const removeCss = injectCss(container, cssUrl);
268
+
269
+ // Patch toolbar images
270
+ const removeImageObserver = patchToolbarImages(container, toolbarImages);
271
+
272
+ let cleanup: (() => void) | undefined;
273
+ let cancelled = false;
274
+
275
+ setupFigure(container)
276
+ .then((cleanupFn) => {
277
+ if (cancelled) {
278
+ cleanupFn?.();
279
+ return;
280
+ }
281
+ cleanup = cleanupFn;
282
+ })
283
+ .catch((error) => {
284
+ if (!cancelled) {
285
+ Logger.error("Failed to set up MPL interactive figure", error);
286
+ }
287
+ });
288
+
289
+ return () => {
290
+ cancelled = true;
291
+ removeCss();
292
+ removeImageObserver();
293
+ cleanup?.();
294
+ // Clear DOM on unmount so stale content doesn't linger
295
+ container.innerHTML = "";
296
+ };
297
+ }, [modelId, cssUrl, toolbarImages, setupFigure]);
298
+
299
+ // Re-request figure when tab becomes visible
300
+ useEventListener(document, "visibilitychange", () => {
301
+ const fig = figureRef.current;
302
+ if (!document.hidden && fig?.ws?.readyState === WebSocket.OPEN) {
303
+ fig.send_message("refresh", {});
304
+ }
305
+ });
306
+
307
+ // Must match _MPL_SCOPE in from_mpl_interactive.py
308
+ return <div ref={containerRef} className={MPL_SCOPE_CLASS} />;
309
+ };
@@ -0,0 +1,110 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { describe, expect, it, vi } from "vitest";
3
+ import { MplCommWebSocket } from "../mpl-websocket-shim";
4
+
5
+ describe("MplCommWebSocket", () => {
6
+ it("starts in OPEN state", () => {
7
+ const ws = new MplCommWebSocket(vi.fn());
8
+ expect(ws.readyState).toBe(WebSocket.OPEN);
9
+ });
10
+
11
+ it("send() parses JSON and calls sendFn with parsed object", () => {
12
+ const sendFn = vi.fn();
13
+ const ws = new MplCommWebSocket(sendFn);
14
+
15
+ ws.send(JSON.stringify({ type: "resize", width: 640, height: 480 }));
16
+
17
+ expect(sendFn).toHaveBeenCalledOnce();
18
+ expect(sendFn).toHaveBeenCalledWith({
19
+ type: "resize",
20
+ width: 640,
21
+ height: 480,
22
+ });
23
+ });
24
+
25
+ it("receiveJson() dispatches MessageEvent with JSON string data", () => {
26
+ const ws = new MplCommWebSocket(vi.fn());
27
+ const handler = vi.fn();
28
+ ws.onmessage = handler;
29
+
30
+ ws.receiveJson({ type: "figure_size", size: [640, 480] });
31
+
32
+ expect(handler).toHaveBeenCalledOnce();
33
+ const event: MessageEvent = handler.mock.calls[0][0];
34
+ expect(event).toBeInstanceOf(MessageEvent);
35
+ expect(event.type).toBe("message");
36
+ expect(JSON.parse(event.data as string)).toEqual({
37
+ type: "figure_size",
38
+ size: [640, 480],
39
+ });
40
+ });
41
+
42
+ it("receiveJson() is a no-op if onmessage is not set", () => {
43
+ const ws = new MplCommWebSocket(vi.fn());
44
+ ws.receiveJson({ type: "test" });
45
+ expect(ws.onmessage).toBeNull();
46
+ });
47
+
48
+ it("receiveBinary() dispatches MessageEvent with Blob data", () => {
49
+ const ws = new MplCommWebSocket(vi.fn());
50
+ const handler = vi.fn();
51
+ ws.onmessage = handler;
52
+
53
+ // Simulate a PNG-like binary buffer
54
+ const bytes = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0, 1, 2, 3]);
55
+ const dv = new DataView(bytes.buffer);
56
+
57
+ ws.receiveBinary(dv);
58
+
59
+ expect(handler).toHaveBeenCalledOnce();
60
+ const event: MessageEvent = handler.mock.calls[0][0];
61
+ expect(event).toBeInstanceOf(MessageEvent);
62
+ expect(event.data).toBeInstanceOf(Blob);
63
+ expect((event.data as Blob).size).toBe(8);
64
+ });
65
+
66
+ it("receiveBinary() handles DataView with offset", () => {
67
+ const ws = new MplCommWebSocket(vi.fn());
68
+ const handler = vi.fn();
69
+ ws.onmessage = handler;
70
+
71
+ // Create a DataView that's a slice of a larger buffer
72
+ const fullBuffer = new ArrayBuffer(16);
73
+ const fullView = new Uint8Array(fullBuffer);
74
+ fullView.set([0, 0, 0, 0, 0x89, 0x50, 0x4e, 0x47, 0, 1, 2, 3, 0, 0, 0, 0]);
75
+ const dv = new DataView(fullBuffer, 4, 8);
76
+
77
+ ws.receiveBinary(dv);
78
+
79
+ expect(handler).toHaveBeenCalledOnce();
80
+ const blob = handler.mock.calls[0][0].data as Blob;
81
+ expect(blob.size).toBe(8);
82
+ });
83
+
84
+ it("close() sets readyState to CLOSED and fires onclose", () => {
85
+ const ws = new MplCommWebSocket(vi.fn());
86
+ const closeHandler = vi.fn();
87
+ ws.onclose = closeHandler;
88
+
89
+ ws.close();
90
+
91
+ expect(ws.readyState).toBe(WebSocket.CLOSED);
92
+ expect(closeHandler).toHaveBeenCalledOnce();
93
+ });
94
+
95
+ it("close() does not throw if onclose is not set", () => {
96
+ const ws = new MplCommWebSocket(vi.fn());
97
+ ws.close();
98
+ expect(ws.readyState).toBe(WebSocket.CLOSED);
99
+ });
100
+
101
+ it("onopen can be triggered externally", () => {
102
+ const ws = new MplCommWebSocket(vi.fn());
103
+ const openHandler = vi.fn();
104
+ ws.onopen = openHandler;
105
+
106
+ ws.onopen?.();
107
+
108
+ expect(openHandler).toHaveBeenCalledOnce();
109
+ });
110
+ });
@@ -0,0 +1,57 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ /**
4
+ * Fake WebSocket that routes messages through MarimoComm / MODEL_MANAGER
5
+ * instead of a real network WebSocket.
6
+ *
7
+ * mpl.js expects a WebSocket-like object with:
8
+ * - readyState
9
+ * - send(data: string)
10
+ * - onopen / onmessage / onclose callbacks
11
+ */
12
+ export class MplCommWebSocket {
13
+ readyState: number = WebSocket.OPEN;
14
+ private sendFn: (msg: unknown) => void;
15
+
16
+ onopen: (() => void) | null = null;
17
+ onmessage: ((evt: MessageEvent) => void) | null = null;
18
+ onclose: (() => void) | null = null;
19
+
20
+ constructor(sendFn: (msg: unknown) => void) {
21
+ this.sendFn = sendFn;
22
+ }
23
+
24
+ /**
25
+ * Called by mpl.js to send a message to the backend.
26
+ * mpl.js always sends JSON strings.
27
+ */
28
+ send(data: string): void {
29
+ this.sendFn(JSON.parse(data));
30
+ }
31
+
32
+ /**
33
+ * Called when the backend pushes a JSON message via the model custom event.
34
+ */
35
+ receiveJson(data: unknown): void {
36
+ this.onmessage?.(
37
+ new MessageEvent("message", { data: JSON.stringify(data) }),
38
+ );
39
+ }
40
+
41
+ /**
42
+ * Called when the backend pushes binary data (PNG render) via model custom event.
43
+ */
44
+ receiveBinary(buffer: DataView): void {
45
+ const ab = buffer.buffer.slice(
46
+ buffer.byteOffset,
47
+ buffer.byteOffset + buffer.byteLength,
48
+ ) as ArrayBuffer;
49
+ const blob = new Blob([ab]);
50
+ this.onmessage?.(new MessageEvent("message", { data: blob }));
51
+ }
52
+
53
+ close(): void {
54
+ this.readyState = WebSocket.CLOSED;
55
+ this.onclose?.();
56
+ }
57
+ }
@@ -26,6 +26,7 @@ import { MatrixPlugin } from "./impl/MatrixPlugin";
26
26
  import { MicrophonePlugin } from "./impl/MicrophonePlugin";
27
27
  import { MultiselectPlugin } from "./impl/MultiselectPlugin";
28
28
  import { MatplotlibPlugin } from "./impl/matplotlib/MatplotlibPlugin";
29
+ import { MplInteractivePlugin } from "./impl/mpl-interactive/MplInteractivePlugin";
29
30
  import { NumberPlugin } from "./impl/NumberPlugin";
30
31
  import { PanelPlugin } from "./impl/panel/PanelPlugin";
31
32
  import { PlotlyPlugin } from "./impl/plotly/PlotlyPlugin";
@@ -92,6 +93,7 @@ export const UI_PLUGINS: IPlugin<any, unknown>[] = [
92
93
  AnyWidgetPlugin,
93
94
  DataEditorPlugin,
94
95
  PanelPlugin,
96
+ MplInteractivePlugin,
95
97
  ];
96
98
 
97
99
  // List of output / layout plugins
@@ -23,6 +23,12 @@ describe("Filenames", () => {
23
23
  expect(Filenames.toPNG("test.foo.py")).toEqual("test.foo.png");
24
24
  });
25
25
 
26
+ it("should convert filename to ipynb", () => {
27
+ expect(Filenames.toIPYNB("test")).toEqual("test.ipynb");
28
+ expect(Filenames.toIPYNB("test.txt")).toEqual("test.ipynb");
29
+ expect(Filenames.toIPYNB("test.foo.py")).toEqual("test.foo.ipynb");
30
+ });
31
+
26
32
  it("should remove extension from filename", () => {
27
33
  expect(Filenames.withoutExtension("test")).toEqual("test");
28
34
  expect(Filenames.withoutExtension("test.txt")).toEqual("test");
@@ -39,6 +45,7 @@ describe("Filenames", () => {
39
45
  expect(Filenames.toHTML(filename)).toEqual(`${withoutExt}.html`);
40
46
  expect(Filenames.toPNG(filename)).toEqual(`${withoutExt}.png`);
41
47
  expect(Filenames.toPY(filename)).toEqual(`${withoutExt}.py`);
48
+ expect(Filenames.toIPYNB(filename)).toEqual(`${withoutExt}.ipynb`);
42
49
 
43
50
  // Ensure operations preserve unicode and special characters in base name
44
51
  expect(withoutExt).not.toEqual("");
@@ -0,0 +1,61 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { describe, expect, it } from "vitest";
3
+ import { smartMatch, smartMatchFilter } from "../smartMatch";
4
+
5
+ describe("smartMatch", () => {
6
+ it("matches exact word", () => {
7
+ expect(smartMatch("run", "Run cell")).toBe(true);
8
+ });
9
+
10
+ it("matches word prefix", () => {
11
+ expect(smartMatch("exe", "execute start")).toBe(true);
12
+ });
13
+
14
+ it("matches across array of haystacks", () => {
15
+ expect(smartMatch("exe", ["Run", "execute start"])).toBe(true);
16
+ });
17
+
18
+ it("does not match unrelated terms", () => {
19
+ expect(smartMatch("xyz", "Run cell")).toBe(false);
20
+ });
21
+
22
+ it("empty search matches everything", () => {
23
+ expect(smartMatch("", "anything")).toBe(true);
24
+ });
25
+
26
+ it("multi-word needle requires all words to match", () => {
27
+ expect(smartMatch("run cell", "Run cell")).toBe(true);
28
+ expect(smartMatch("run xyz", "Run cell")).toBe(false);
29
+ });
30
+
31
+ it("is case-insensitive", () => {
32
+ expect(smartMatch("RUN", "run cell")).toBe(true);
33
+ });
34
+
35
+ it("skips null/undefined haystacks", () => {
36
+ expect(smartMatch("run", [null, undefined, "Run cell"])).toBe(true);
37
+ expect(smartMatch("run", [null, undefined])).toBe(false);
38
+ });
39
+ });
40
+
41
+ describe("smartMatchFilter", () => {
42
+ it("returns 1 for value match", () => {
43
+ expect(smartMatchFilter("Run cell", "run")).toBe(1);
44
+ });
45
+
46
+ it("returns 0 for no match", () => {
47
+ expect(smartMatchFilter("Run cell", "xyz")).toBe(0);
48
+ });
49
+
50
+ it("returns 0.8 for keyword-only match", () => {
51
+ expect(smartMatchFilter("Run", "execute", ["execute", "start"])).toBe(0.8);
52
+ });
53
+
54
+ it("returns 1 when value matches even if keywords also match", () => {
55
+ expect(smartMatchFilter("Run", "run", ["execute", "start"])).toBe(1);
56
+ });
57
+
58
+ it("does not match without relevant keywords", () => {
59
+ expect(smartMatchFilter("Run", "preferences", ["execute"])).toBe(0);
60
+ });
61
+ });
@@ -15,6 +15,9 @@ export const Filenames = {
15
15
  toPY: (filename: string): string => {
16
16
  return Filenames.replace(filename, "py");
17
17
  },
18
+ toIPYNB: (filename: string): string => {
19
+ return Filenames.replace(filename, "ipynb");
20
+ },
18
21
  withoutExtension: (filename: string): string => {
19
22
  // Just remove the last extension
20
23
  const parts = filename.split(".");