@marimo-team/islands 0.19.10-dev5 → 0.19.10-dev51

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 (441) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BAeQ8DWw.js → ConnectedDataExplorerComponent-CkXO-pKy.js} +6 -6
  2. package/dist/Plot-C9vQQj4X.js +172249 -0
  3. package/dist/{any-language-editor-D0UQItkS.js → any-language-editor-t_VsTNa-.js} +16 -16
  4. package/dist/apl-C1bki_dE.js +4 -0
  5. package/dist/{arc-CEWBr4jc.js → arc-9nABupDE.js} +2 -2
  6. package/dist/{architectureDiagram-VXUJARFQ-DPPYVq8H.js → architectureDiagram-VXUJARFQ-DmJQhcJb.js} +6 -6
  7. package/dist/asciiarmor-BdlkCCRr.js +4 -0
  8. package/dist/asn1-CvE30hox.js +4 -0
  9. package/dist/{blockDiagram-VD42YOAC-BA5N05Y9.js → blockDiagram-VD42YOAC-CRofISJs.js} +10 -10
  10. package/dist/brainfuck-BalwWy1a.js +4 -0
  11. package/dist/{c4Diagram-YG6GDRKO-DJLzuGJJ.js → c4Diagram-YG6GDRKO-Deqoag4I.js} +4 -4
  12. package/dist/{channel-Dob5kWXR.js → channel-CMsnebrL.js} +1 -1
  13. package/dist/{chunk-4BX2VUAB-DZQibjKA.js → chunk-4BX2VUAB-WmXmzRBr.js} +1 -1
  14. package/dist/{chunk-55IACEB6-C3BASkh4.js → chunk-55IACEB6-irYMvHJu.js} +1 -1
  15. package/dist/{chunk-5FQGJX7Z-BEb20Lzt.js → chunk-5FQGJX7Z-pOElJy8t.js} +2 -2
  16. package/dist/{chunk-ABZYJK2D-BXTC53mt.js → chunk-ABZYJK2D-BGWvKte3.js} +2 -2
  17. package/dist/{chunk-ATLVNIR6-BJDjUR_c.js → chunk-ATLVNIR6-BYZB6C5T.js} +2 -2
  18. package/dist/{chunk-B4BG7PRW-DzmUUpfH.js → chunk-B4BG7PRW-CwYUp6Uj.js} +7 -7
  19. package/dist/{chunk-CVBHYZKI-Dhc_e3rA.js → chunk-CVBHYZKI-Bb2XMuXJ.js} +1 -1
  20. package/dist/{chunk-DI55MBZ5-gTd3J8Tu.js → chunk-DI55MBZ5-Gyro6dvN.js} +6 -6
  21. package/dist/{chunk-EXTU4WIE-DyoOs5QX.js → chunk-EXTU4WIE-BlA7aWEw.js} +2 -2
  22. package/dist/{chunk-FMBD7UC4-geNUIndh.js → chunk-FMBD7UC4-C0DZU_4q.js} +1 -1
  23. package/dist/{chunk-HN2XXSSU-CqPwpolw.js → chunk-HN2XXSSU-BsB4dtgF.js} +1 -1
  24. package/dist/{chunk-JA3XYJ7Z-BGnAIbOP.js → chunk-JA3XYJ7Z-Cm-pccR-.js} +3 -3
  25. package/dist/{chunk-JZLCHNYA-CIRgweVQ.js → chunk-JZLCHNYA-CoLqqXMe.js} +6 -6
  26. package/dist/{chunk-MI3HLSF2-DOJkNER1.js → chunk-MI3HLSF2-DeDZS-tQ.js} +1 -1
  27. package/dist/{chunk-N4CR4FBY-DKSvXAIS.js → chunk-N4CR4FBY-ByLbY9L-.js} +7 -7
  28. package/dist/{chunk-QN33PNHL-B6zC8BTi.js → chunk-QN33PNHL-eodIiY9F.js} +2 -2
  29. package/dist/{chunk-QXUST7PY-C7750n_u.js → chunk-QXUST7PY-CuJlDW6A.js} +10 -10
  30. package/dist/{chunk-QZHKN3VN-BF_oGUlG.js → chunk-QZHKN3VN-Diy_Cdek.js} +1 -1
  31. package/dist/{chunk-S3R3BYOJ-CBkH6JZZ.js → chunk-S3R3BYOJ-CwDGYMVf.js} +3 -3
  32. package/dist/{chunk-TZMSLE5B-DObGL7xi.js → chunk-TZMSLE5B-DFDr5FCr.js} +2 -2
  33. package/dist/classDiagram-2ON5EDUG-BDBX9etk.js +30 -0
  34. package/dist/classDiagram-v2-WZHVMYZB-Bzj_L_BF.js +30 -0
  35. package/dist/{clike-B1zispTy.js → clike-B90WKs4D.js} +1 -1
  36. package/dist/clojure-CUC2I1hM.js +4 -0
  37. package/dist/cmake-8PcMxXnB.js +4 -0
  38. package/dist/cobol-DkkkDz5v.js +4 -0
  39. package/dist/{code-block-37QAKDTI-u5kgjqmr.js → code-block-37QAKDTI-zh5AeoJo.js} +1 -1
  40. package/dist/coffeescript-CCupxOZf.js +4 -0
  41. package/dist/commonlisp-DhUfGX6b.js +4 -0
  42. package/dist/{cose-bilkent-S5V4N54A-CO4ORQHF.js → cose-bilkent-S5V4N54A-BK1nIR2J.js} +1 -1
  43. package/dist/crystal-DSaw6rFQ.js +4 -0
  44. package/dist/css-D4QDewkG.js +4 -0
  45. package/dist/cypher-CrYVqw_F.js +4 -0
  46. package/dist/d-Cr3H3pPx.js +4 -0
  47. package/dist/{dagre-6UL2VRFP-C2C2XxsB.js → dagre-6UL2VRFP-r2rSdJYL.js} +9 -9
  48. package/dist/{data-grid-overlay-editor-BXqtz1ia.js → data-grid-overlay-editor-BVFT970w.js} +2 -2
  49. package/dist/{diagram-PSM6KHXK-DHBY-94p.js → diagram-PSM6KHXK-BpxVUe9U.js} +10 -10
  50. package/dist/{diagram-QEK2KX5R-CgMshOwn.js → diagram-QEK2KX5R-q3dHUcp6.js} +5 -5
  51. package/dist/{diagram-S2PKOQOG-F1KPva3Y.js → diagram-S2PKOQOG-MDBKrxSC.js} +5 -5
  52. package/dist/diff-ODiZJGls.js +4 -0
  53. package/dist/dist-4YNZxwMI.js +8 -0
  54. package/dist/dist-7nR3r2kG.js +5 -0
  55. package/dist/{dist-CBA36Nuy.js → dist-B2-r9y-0.js} +109 -109
  56. package/dist/dist-B2gkyT3r.js +5 -0
  57. package/dist/{dist--JwRU9u5.js → dist-B4tYJP_i.js} +2 -2
  58. package/dist/{dist-DA1J6LvO.js → dist-B5ATpkxy.js} +2 -2
  59. package/dist/dist-B8G3I6vJ.js +8 -0
  60. package/dist/{dist-DKnxaCRl.js → dist-B94MxrQS.js} +2 -2
  61. package/dist/dist-BJ96Ykfp.js +8 -0
  62. package/dist/dist-BKLIWGw4.js +5 -0
  63. package/dist/{dist-l0KayR2-.js → dist-BLwfpZD-.js} +2 -2
  64. package/dist/{dist-C_Kw_Kc0.js → dist-BYmtF1W6.js} +2 -2
  65. package/dist/{dist-Cpj5BHNP.js → dist-BbBnU4tG.js} +1 -1
  66. package/dist/dist-Bf3ou00A.js +6 -0
  67. package/dist/{dist-CITQGRtG.js → dist-BfactX3G.js} +4 -4
  68. package/dist/{dist-CsN7lsea.js → dist-BoAHOW2l.js} +2 -2
  69. package/dist/{dist-BcXuIt-h.js → dist-Bsv_ARko.js} +4 -4
  70. package/dist/dist-BvkKXuPm.js +5 -0
  71. package/dist/{dist-DsqQCNKw.js → dist-C2-m5aEk.js} +119 -119
  72. package/dist/dist-C6NJ3n6r.js +5 -0
  73. package/dist/{dist-DIVeCGlI.js → dist-CC9VUnXd.js} +1 -1
  74. package/dist/{dist-BKGWAN8J.js → dist-CE43BRmt.js} +1 -1
  75. package/dist/{dist-COp5dkis.js → dist-CJrHMxlI.js} +31 -31
  76. package/dist/{dist-BbQ-5HAA.js → dist-CPTE45iS.js} +1 -1
  77. package/dist/{dist-9trj4p6n.js → dist-CcOGT46m.js} +27 -27
  78. package/dist/dist-CecLPYY5.js +5 -0
  79. package/dist/{dist-BSMZYwqW.js → dist-Cgf353Ki.js} +1 -1
  80. package/dist/dist-Ch0SwRzK.js +5 -0
  81. package/dist/{dist-C6p7UKkB.js → dist-CkEUrAus.js} +2 -2
  82. package/dist/{dist-MFzhAmKV.js → dist-CmZYrgd_.js} +1 -1
  83. package/dist/{dist-b7Sc3Tj8.js → dist-Crk9ejOy.js} +4 -4
  84. package/dist/dist-D6eWHiFh.js +6 -0
  85. package/dist/dist-DCQ710Bv.js +5 -0
  86. package/dist/{dist-r6N_0WG-.js → dist-DOil6y-3.js} +4 -4
  87. package/dist/{dist-CPd_adhw.js → dist-Dc1SFk5I.js} +2 -2
  88. package/dist/dist-Dit9tk8a.js +1242 -0
  89. package/dist/{dist-B7NoEgR4.js → dist-DqJdzAYM.js} +2 -2
  90. package/dist/dist-P_pkS5f-.js +8 -0
  91. package/dist/{dist--Em7gfgX.js → dist-T4g7Sr6e.js} +3 -3
  92. package/dist/{dist-BhBtK2sL.js → dist-glA_fIK_.js} +2 -2
  93. package/dist/{dist-9J8_3DZN.js → dist-iiugPhCC.js} +1 -1
  94. package/dist/{dist-D7jHtwN8.js → dist-r8ecBV-v.js} +135 -65
  95. package/dist/{dist-BlRm4v0e.js → dist-yVJ4xE5n.js} +5 -5
  96. package/dist/{dockerfile-BBT_Ira6.js → dockerfile-D1Q_4uCN.js} +1 -1
  97. package/dist/dtd-C-t2Rk7F.js +4 -0
  98. package/dist/dylan-B4ctBLGp.js +4 -0
  99. package/dist/ecl-DqWfymni.js +4 -0
  100. package/dist/eiffel-DjBKKAr7.js +4 -0
  101. package/dist/elm--fxeC0FV.js +4 -0
  102. package/dist/{erDiagram-Q2GNP2WA-18gGng8V.js → erDiagram-Q2GNP2WA-CX1XdqVD.js} +13 -13
  103. package/dist/erlang-CaKXCX6H.js +4 -0
  104. package/dist/{esm-CgRNPmz8.js → esm-BAS2d2Ad.js} +1503 -1536
  105. package/dist/{factor-DdqWbSyy.js → factor--4HHM8Rw.js} +1 -1
  106. package/dist/factor-DlLO5EFS.js +4 -0
  107. package/dist/{flowDiagram-NV44I4VS-iHFiHYe0.js → flowDiagram-NV44I4VS-BCj-ONTw.js} +15 -15
  108. package/dist/forth-rOO6LVj_.js +4 -0
  109. package/dist/fortran-CUg15VGR.js +4 -0
  110. package/dist/{ganttDiagram-JELNMOA3-D7GixxiF.js → ganttDiagram-JELNMOA3-D1l5ewiQ.js} +8 -8
  111. package/dist/gas-BMRJspiW.js +4 -0
  112. package/dist/gherkin-DRxzijZU.js +4 -0
  113. package/dist/{gitGraphDiagram-NY62KEGX-CJFHytRK.js → gitGraphDiagram-NY62KEGX-KdZh0iiW.js} +5 -5
  114. package/dist/{glide-data-editor-BYwb17Bf.js → glide-data-editor-2RvcPqmc.js} +75 -76
  115. package/dist/groovy-BmrQ8pUP.js +4 -0
  116. package/dist/haskell-BuaYfKOz.js +4 -0
  117. package/dist/haxe-DcH9eA0a.js +5 -0
  118. package/dist/idl-DGlcm4Ls.js +4 -0
  119. package/dist/{infoDiagram-WHAUD3N6-B5Lkh3A9.js → infoDiagram-WHAUD3N6-PSH7lQ0D.js} +3 -3
  120. package/dist/javascript-CeTk7rzr.js +4 -0
  121. package/dist/{journeyDiagram-XKPGCS4Q-CV_9R9iP.js → journeyDiagram-XKPGCS4Q-BrTAxQ1J.js} +5 -5
  122. package/dist/julia-BoP_q1gm.js +4 -0
  123. package/dist/{kanban-definition-3W4ZIXB7-Dp21D5Ym.js → kanban-definition-3W4ZIXB7-BoYCDp_9.js} +10 -10
  124. package/dist/{katex-CX2BKujk.js → katex-DaGuLbVh.js} +1 -1
  125. package/dist/{line-LK_5q2B9.js → line-Bc27KE1D.js} +3 -3
  126. package/dist/{linear-vWf1Qj0e.js → linear-Bnc6E9kA.js} +4 -4
  127. package/dist/livescript-B7IMN-ba.js +4 -0
  128. package/dist/{loader-B0KEFFi-.js → loader-C0-eIoas.js} +1 -1
  129. package/dist/lua-q1InavKb.js +4 -0
  130. package/dist/main.js +572 -534
  131. package/dist/mathematica-DvR8-_EI.js +4 -0
  132. package/dist/mbox-7h5MNBS_.js +4 -0
  133. package/dist/{mermaid-4DMBBIKO-BhDCqnO1.js → mermaid-4DMBBIKO-BmJdHPwx.js} +1 -1
  134. package/dist/{mermaid-B__BZSXU.js → mermaid-C2cSe5YL.js} +40 -40
  135. package/dist/{mhchem-w1tkUnWr.js → mhchem-B_tiMbKF.js} +1 -1
  136. package/dist/{mindmap-definition-VGOIOE7T-B_5mfdYp.js → mindmap-definition-VGOIOE7T-CmRjsKEt.js} +12 -12
  137. package/dist/mirc-D-XM8A5c.js +4 -0
  138. package/dist/mllike-BQGkkbmf.js +6 -0
  139. package/dist/modelica-D_yRj_WU.js +4 -0
  140. package/dist/mscgen-B-rltAjp.js +6 -0
  141. package/dist/mumps-2kh8TU2b.js +4 -0
  142. package/dist/{nsis-CunMjZ_n.js → nsis-B6EN9LWI.js} +1 -1
  143. package/dist/nsis-CtusEqwb.js +4 -0
  144. package/dist/ntriples-BdAXw6zV.js +4 -0
  145. package/dist/{number-overlay-editor-D-4WQAGX.js → number-overlay-editor-DKVJgXpp.js} +1 -1
  146. package/dist/octave-CsNFmVp5.js +4 -0
  147. package/dist/{ordinal-IlASfRja.js → ordinal-DLLbwLkP.js} +1 -1
  148. package/dist/oz-odIXCrKd.js +4 -0
  149. package/dist/pascal-B9Mfk3Fo.js +4 -0
  150. package/dist/perl-C48inLcz.js +4 -0
  151. package/dist/{pieDiagram-ADFJNKIX-B-DGEopK.js → pieDiagram-ADFJNKIX-CtxQlnsU.js} +10 -10
  152. package/dist/pig-uwRtAssU.js +4 -0
  153. package/dist/powershell-CXqlca-i.js +4 -0
  154. package/dist/{precisionRound-CGLoV26P.js → precisionRound-Duzbr5ur.js} +1 -1
  155. package/dist/properties-D6Zu1rpK.js +4 -0
  156. package/dist/protobuf-BlNNWZaR.js +4 -0
  157. package/dist/pug-DytcK7bv.js +4 -0
  158. package/dist/{pug-Dr-sA_9V.js → pug-xrm7jQ2R.js} +1 -1
  159. package/dist/puppet-lJ8Ok3iY.js +4 -0
  160. package/dist/python-cMaF7kUp.js +4 -0
  161. package/dist/q-Dgt2HYQh.js +4 -0
  162. package/dist/{quadrantDiagram-AYHSOK5B-M_yRSIZn.js → quadrantDiagram-AYHSOK5B-DllnB2Hl.js} +4 -4
  163. package/dist/r-Bm4S4awf.js +4 -0
  164. package/dist/react-vega-1ub36dPZ.js +9 -0
  165. package/dist/{react-vega-DLFvGrpJ.js → react-vega-CCNu2JE0.js} +18 -18
  166. package/dist/{requirementDiagram-UZGBJVZJ-9Wt82hOZ.js → requirementDiagram-UZGBJVZJ-D36MI1k0.js} +12 -12
  167. package/dist/rpm-_8LbzMVc.js +5 -0
  168. package/dist/ruby-Cr8IJ5VZ.js +4 -0
  169. package/dist/{sankeyDiagram-TZEHDZUN-x_aTXZeN.js → sankeyDiagram-TZEHDZUN-D1mygNPC.js} +4 -4
  170. package/dist/sas-CFcSfo2_.js +4 -0
  171. package/dist/scheme-N4XRoKgc.js +4 -0
  172. package/dist/{sequenceDiagram-WL72ISMW-CXXmJqiQ.js → sequenceDiagram-WL72ISMW-CWdn91Rf.js} +6 -6
  173. package/dist/shell-B4L7f_ds.js +4 -0
  174. package/dist/sieve-UI6J3Gm0.js +4 -0
  175. package/dist/smalltalk-BuaPZAZU.js +4 -0
  176. package/dist/sparql-1rKrq463.js +4 -0
  177. package/dist/{src-szye8OCw.js → src-jICM_d2B.js} +1 -1
  178. package/dist/{stateDiagram-FKZM4ZOC-CiSKS_Mx.js → stateDiagram-FKZM4ZOC-CPxroWXd.js} +15 -15
  179. package/dist/{stateDiagram-v2-4FDKWEC3-A43Itnjp.js → stateDiagram-v2-4FDKWEC3-BpM9Q54b.js} +13 -13
  180. package/dist/{step-1PmBKr2y.js → step-BqVgkWtk.js} +1 -1
  181. package/dist/stylus-DvSovJEP.js +4 -0
  182. package/dist/swift-D-_E7Yyb.js +4 -0
  183. package/dist/tcl-Di5sAVHN.js +4 -0
  184. package/dist/textile-Benwt66z.js +4 -0
  185. package/dist/{time-DC4qQGmA.js → time-CrYsYnQU.js} +4 -4
  186. package/dist/{timeline-definition-IT6M3QCI-DR26eWb4.js → timeline-definition-IT6M3QCI-CVnRHx_t.js} +3 -3
  187. package/dist/toml-CeOvPOkY.js +4 -0
  188. package/dist/troff-DJN9hfgu.js +4 -0
  189. package/dist/ttcn-DQW2Psjf.js +4 -0
  190. package/dist/ttcn-cfg-zFG_MNpg.js +4 -0
  191. package/dist/turtle-DHRyNlSc.js +4 -0
  192. package/dist/{types-Bb-6p8hv.js → types-Ckva8JJq.js} +203 -156
  193. package/dist/{useDeepCompareMemoize-BhZZsis0.js → useDeepCompareMemoize-ChviuF5n.js} +1 -1
  194. package/dist/vb-CXWH9DD-.js +4 -0
  195. package/dist/vbscript-qr8qVck5.js +4 -0
  196. package/dist/{vega-component-DCxUyPnb.js → vega-component-CnG0vAjf.js} +7 -7
  197. package/dist/{vega-loader.browser-BJ1uJidF.js → vega-loader.browser-DqHiiBeQ.js} +3 -3
  198. package/dist/velocity-C_9pUJRx.js +4 -0
  199. package/dist/verilog-DxBstgBa.js +4 -0
  200. package/dist/vhdl-odUxAbE6.js +4 -0
  201. package/dist/webidl-Dfn5Rku4.js +4 -0
  202. package/dist/xquery-CrJs6SXr.js +4 -0
  203. package/dist/{xychartDiagram-PRI3JC2R-BcVxCRox.js → xychartDiagram-PRI3JC2R-BltwMWKC.js} +11 -11
  204. package/dist/yacas-B-uDDLZe.js +4 -0
  205. package/dist/z80-51gxgAXE.js +4 -0
  206. package/package.json +12 -13
  207. package/src/components/data-table/TableActions.tsx +8 -1
  208. package/src/components/data-table/__tests__/columns.test.tsx +47 -0
  209. package/src/components/data-table/column-header.tsx +3 -0
  210. package/src/components/data-table/columns.tsx +17 -2
  211. package/src/components/data-table/data-table.tsx +2 -0
  212. package/src/components/data-table/download-actions.tsx +6 -1
  213. package/src/components/dependency-graph/dependency-graph-tree.tsx +10 -1
  214. package/src/components/dependency-graph/dependency-graph.tsx +1 -0
  215. package/src/components/dependency-graph/elements.ts +20 -9
  216. package/src/components/dependency-graph/panels.tsx +27 -11
  217. package/src/components/dependency-graph/types.ts +1 -0
  218. package/src/components/editor/chrome/wrapper/app-chrome.tsx +3 -0
  219. package/src/components/editor/package-alert.tsx +4 -4
  220. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +3 -5
  221. package/src/core/codemirror/misc/__tests__/paste.test.ts +18 -0
  222. package/src/core/codemirror/misc/paste.ts +14 -10
  223. package/src/core/kernel/messages.ts +1 -0
  224. package/src/core/static/static-state.ts +5 -0
  225. package/src/core/static/types.ts +2 -0
  226. package/src/core/wasm/__tests__/store.test.ts +33 -0
  227. package/src/core/wasm/bridge.ts +2 -1
  228. package/src/core/wasm/store.ts +13 -1
  229. package/src/mount.tsx +23 -1
  230. package/src/plugins/impl/DataTablePlugin.tsx +4 -0
  231. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +7 -5
  232. package/src/plugins/impl/anywidget/__tests__/model.test.ts +53 -0
  233. package/src/plugins/impl/anywidget/model.ts +13 -10
  234. package/src/plugins/impl/chat/ChatPlugin.tsx +2 -0
  235. package/src/plugins/impl/chat/chat-ui.tsx +10 -1
  236. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +4 -0
  237. package/src/plugins/impl/plotly/Plot.tsx +173 -0
  238. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +41 -10
  239. package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +1 -0
  240. package/src/plugins/impl/plotly/__tests__/usePlotlyLayout.test.ts +2 -1
  241. package/src/plugins/impl/plotly/parse-from-template.ts +1 -0
  242. package/src/plugins/impl/plotly/usePlotlyLayout.ts +2 -1
  243. package/src/theme/ThemeProvider.tsx +2 -0
  244. package/dist/apl-BuwKwesW.js +0 -4
  245. package/dist/asciiarmor-zAEd_wtn.js +0 -4
  246. package/dist/asn1-DWEA66J4.js +0 -4
  247. package/dist/brainfuck-mIPR6Ong.js +0 -4
  248. package/dist/classDiagram-2ON5EDUG-B9pkKjjc.js +0 -30
  249. package/dist/classDiagram-v2-WZHVMYZB-CRhhA0tV.js +0 -30
  250. package/dist/clojure-DkhhNHNQ.js +0 -4
  251. package/dist/cmake-1obPvqtc.js +0 -4
  252. package/dist/cobol-oWNTiXPE.js +0 -4
  253. package/dist/coffeescript-LtYUvf6r.js +0 -4
  254. package/dist/commonlisp-C_06qBYF.js +0 -4
  255. package/dist/crystal-CDJkbx14.js +0 -4
  256. package/dist/css-Bi_Nk0uN.js +0 -4
  257. package/dist/cypher-TrG0NvZ0.js +0 -4
  258. package/dist/d-CFKOrZsi.js +0 -4
  259. package/dist/diff-CfnSF48q.js +0 -4
  260. package/dist/dist-2OSzSqy2.js +0 -5
  261. package/dist/dist-B1H2TQGB.js +0 -8
  262. package/dist/dist-BNvasp6N.js +0 -5
  263. package/dist/dist-CFi_P6cs.js +0 -5
  264. package/dist/dist-CG4LWTPv.js +0 -8
  265. package/dist/dist-CHWVQZ6Z.js +0 -6
  266. package/dist/dist-C_8-swED.js +0 -5
  267. package/dist/dist-DIhtur5b.js +0 -5
  268. package/dist/dist-DoQ7RS4e.js +0 -5
  269. package/dist/dist-DsMd-F9h.js +0 -5
  270. package/dist/dist-DurmUshd.js +0 -8
  271. package/dist/dist-PZgrh2z6.js +0 -6
  272. package/dist/dist-g1p2PEVs.js +0 -1242
  273. package/dist/dist-wudNDAiO.js +0 -5
  274. package/dist/dist-zVskjQcA.js +0 -8
  275. package/dist/dtd-Ctw8_JkU.js +0 -4
  276. package/dist/dylan-f7rMBKDP.js +0 -4
  277. package/dist/ecl-C2h3oBMY.js +0 -4
  278. package/dist/eiffel-Ce81wv20.js +0 -4
  279. package/dist/elm-BVV8QQcc.js +0 -4
  280. package/dist/erlang-DjB35ZUh.js +0 -4
  281. package/dist/factor-CIcp3U2B.js +0 -4
  282. package/dist/forth-CVgjsHhD.js +0 -4
  283. package/dist/fortran-CcTXj0d_.js +0 -4
  284. package/dist/gas-JWpamkLf.js +0 -4
  285. package/dist/gherkin-BveSCSJV.js +0 -4
  286. package/dist/groovy-Np3AZt00.js +0 -4
  287. package/dist/haskell-CVfmFALm.js +0 -4
  288. package/dist/haxe-C10xkMLg.js +0 -5
  289. package/dist/idl-CKBSGnKC.js +0 -4
  290. package/dist/javascript-Cur-15Bn.js +0 -4
  291. package/dist/julia-BZZH2Gnx.js +0 -4
  292. package/dist/livescript-D_rTTm_U.js +0 -4
  293. package/dist/lua-Mf_Of7eV.js +0 -4
  294. package/dist/mathematica-DCYjugDb.js +0 -4
  295. package/dist/mbox-KBWrT8JD.js +0 -4
  296. package/dist/mirc-JwEQJ8Fb.js +0 -4
  297. package/dist/mllike-C7TxLvh6.js +0 -6
  298. package/dist/modelica-uvNgvUyw.js +0 -4
  299. package/dist/mscgen-CGnokp5x.js +0 -6
  300. package/dist/mumps-Dl9QdOZz.js +0 -4
  301. package/dist/nsis-BbDhbgPN.js +0 -4
  302. package/dist/ntriples-ChL1mlp7.js +0 -4
  303. package/dist/octave-B9ZGG6zv.js +0 -4
  304. package/dist/oz-XHEu31wr.js +0 -4
  305. package/dist/pascal-BxtYw-iH.js +0 -4
  306. package/dist/perl-Br5BgHPb.js +0 -4
  307. package/dist/pig-BByO2hBz.js +0 -4
  308. package/dist/powershell-Cd4Zaef3.js +0 -4
  309. package/dist/prop-types-C9QZf2SY.js +0 -51
  310. package/dist/properties-B-BOCIOl.js +0 -4
  311. package/dist/protobuf-CaLimlho.js +0 -4
  312. package/dist/pug-bonARSG6.js +0 -4
  313. package/dist/puppet-BSlT-3sc.js +0 -4
  314. package/dist/python-BIJhGYYP.js +0 -4
  315. package/dist/q-D9TX8A0B.js +0 -4
  316. package/dist/r-BXelX7Rl.js +0 -4
  317. package/dist/react-plotly-BuRa9xtI.js +0 -169447
  318. package/dist/react-vega-3WcLHYC7.js +0 -9
  319. package/dist/rpm-BxAh9B1A.js +0 -5
  320. package/dist/ruby-BCZLQyhc.js +0 -4
  321. package/dist/sas-Bo7lsyNX.js +0 -4
  322. package/dist/scheme-Brhptkt-.js +0 -4
  323. package/dist/shell-fWWb8_qx.js +0 -4
  324. package/dist/sieve-Ba8_hMLn.js +0 -4
  325. package/dist/smalltalk-7sHxwMDT.js +0 -4
  326. package/dist/sparql-BBFrPJ7z.js +0 -4
  327. package/dist/stylus-CIB0KT46.js +0 -4
  328. package/dist/swift-CZinekXz.js +0 -4
  329. package/dist/tcl-DCHZJVq_.js +0 -4
  330. package/dist/textile-ThTMxgkN.js +0 -4
  331. package/dist/toml-DK17wlJ7.js +0 -4
  332. package/dist/troff-CuUAOgMy.js +0 -4
  333. package/dist/ttcn-DS2tj6rW.js +0 -4
  334. package/dist/ttcn-cfg-CdZGarnc.js +0 -4
  335. package/dist/turtle-Bkz-FLZ7.js +0 -4
  336. package/dist/vb-ITdOmxvR.js +0 -4
  337. package/dist/vbscript-B7oeGyfL.js +0 -4
  338. package/dist/velocity-D__EkuSd.js +0 -4
  339. package/dist/verilog-CPH50gr9.js +0 -4
  340. package/dist/vhdl-CQAwKCk_.js +0 -4
  341. package/dist/webidl-BnEptfVX.js +0 -4
  342. package/dist/xquery-D7eTv-CR.js +0 -4
  343. package/dist/yacas-0x1rX89s.js +0 -4
  344. package/dist/z80-B25SJVDf.js +0 -4
  345. /package/dist/{ImageComparisonComponent-DkEXPki_.js → ImageComparisonComponent-CRbA-1eg.js} +0 -0
  346. /package/dist/{apl-D9gTcP3Q.js → apl-Oc3bL26_.js} +0 -0
  347. /package/dist/{array-D7wW5QoO.js → array-CEIRxyh3.js} +0 -0
  348. /package/dist/{asciiarmor-mLyg-Z5h.js → asciiarmor-DTbPh2VI.js} +0 -0
  349. /package/dist/{asn1-AE7eHomk.js → asn1-CGhwu1Ri.js} +0 -0
  350. /package/dist/{brainfuck-Bdd6NcL6.js → brainfuck-CA0L8lRq.js} +0 -0
  351. /package/dist/{click-outside-container-DNfggvIW.js → click-outside-container-C_k38vlR.js} +0 -0
  352. /package/dist/{clike-D_s3fKg5.js → clike-CEtUBPHD.js} +0 -0
  353. /package/dist/{clojure-zTYBCd80.js → clojure-BszjvdGo.js} +0 -0
  354. /package/dist/{cmake-BnJV90fC.js → cmake-B2Gvps8b.js} +0 -0
  355. /package/dist/{cobol-CH0OZO8A.js → cobol-DuMch8nn.js} +0 -0
  356. /package/dist/{coffeescript-CLhc1U6Q.js → coffeescript-L9aKXVsJ.js} +0 -0
  357. /package/dist/{colors-6DRQ0kEF.js → colors-DR_aHfmQ.js} +0 -0
  358. /package/dist/{commonlisp-8K2-IkUD.js → commonlisp-CrtdssxB.js} +0 -0
  359. /package/dist/{crystal-8to4H-ep.js → crystal-vvNY0LpY.js} +0 -0
  360. /package/dist/{css-BVo-JOy5.js → css-B1GdzqT1.js} +0 -0
  361. /package/dist/{cypher-BTFaDDd_.js → cypher-BtZvV7bW.js} +0 -0
  362. /package/dist/{d-c9bddW2W.js → d-B0UN3V-Z.js} +0 -0
  363. /package/dist/{defaultLocale-Bxoo2-30.js → defaultLocale-B_A76Zpk.js} +0 -0
  364. /package/dist/{defaultLocale-qS7DaAmi.js → defaultLocale-DjFHq3Xk.js} +0 -0
  365. /package/dist/{diff-PA28xMKg.js → diff-DOpgjj1W.js} +0 -0
  366. /package/dist/{dist-BBYTEAvO.js → dist-DF_77D2B.js} +0 -0
  367. /package/dist/{dtd-DRlC7Bx8.js → dtd-Ctnjxrle.js} +0 -0
  368. /package/dist/{dylan-d5ufc25E.js → dylan-DFXkoaZy.js} +0 -0
  369. /package/dist/{ecl-Ci3afVKc.js → ecl-C1NExZip.js} +0 -0
  370. /package/dist/{eiffel-G6DmeEi3.js → eiffel-uXVGgleg.js} +0 -0
  371. /package/dist/{elm-ByYWHu8b.js → elm-CBOFnnib.js} +0 -0
  372. /package/dist/{erlang-C7_LcVDw.js → erlang-DMnrT8XK.js} +0 -0
  373. /package/dist/{esm-CAd2HmbR.js → esm-0_ieXYNc.js} +0 -0
  374. /package/dist/{forth-BgUerAyz.js → forth-DDpxS4nw.js} +0 -0
  375. /package/dist/{fortran-BCXxm4xF.js → fortran-B6uYqQMz.js} +0 -0
  376. /package/dist/{gas-CKTQRKLl.js → gas-BKnWzuFz.js} +0 -0
  377. /package/dist/{gherkin-ByVP9cY_.js → gherkin-pBt0wT4X.js} +0 -0
  378. /package/dist/{groovy-BPbrw0GZ.js → groovy-DKsn4ppB.js} +0 -0
  379. /package/dist/{haskell-B8fq1DW4.js → haskell-BJVBJQcy.js} +0 -0
  380. /package/dist/{haxe-B7SHQmJo.js → haxe-rLN5UZU5.js} +0 -0
  381. /package/dist/{idl-CeJBDjsl.js → idl-B4mwMAo-.js} +0 -0
  382. /package/dist/{init-BfRhston.js → init-TaqZJsBY.js} +0 -0
  383. /package/dist/{javascript-dCv9_Kn8.js → javascript-Hf2NLNC0.js} +0 -0
  384. /package/dist/{julia-CD5lO88_.js → julia-GGpx21YN.js} +0 -0
  385. /package/dist/{katex-Db0k5oV_.js → katex-Ba7xZPrx.js} +0 -0
  386. /package/dist/{livescript-Cc8RvFBv.js → livescript-CSvXMspZ.js} +0 -0
  387. /package/dist/{lua-4nedfnvd.js → lua-CVMR5LMW.js} +0 -0
  388. /package/dist/{math-BbMyrONz.js → math-CTnb-N1W.js} +0 -0
  389. /package/dist/{mathematica-BIufdZr2.js → mathematica-JENNt-p4.js} +0 -0
  390. /package/dist/{mbox-DQkYSHKe.js → mbox-mzifoc8E.js} +0 -0
  391. /package/dist/{mirc-CI-RWqUR.js → mirc-BXoiItvN.js} +0 -0
  392. /package/dist/{mllike-DQzbf1xo.js → mllike-H-KR9OuH.js} +0 -0
  393. /package/dist/{modelica-BnF_cDWj.js → modelica-B6Hm3mMl.js} +0 -0
  394. /package/dist/{mscgen-MirFrDhW.js → mscgen-D8TF_Hei.js} +0 -0
  395. /package/dist/{mumps-eNRTuWOD.js → mumps-CD-kNPt4.js} +0 -0
  396. /package/dist/{ntriples-BLneip4i.js → ntriples-DgnpxU40.js} +0 -0
  397. /package/dist/{octave-C0eG-pKq.js → octave-CkobqyVm.js} +0 -0
  398. /package/dist/{oz-BPMLow2T.js → oz-ChDLd9tS.js} +0 -0
  399. /package/dist/{pascal-5eb9v5Dl.js → pascal-CvlkwK7E.js} +0 -0
  400. /package/dist/{path-C_x2ySFi.js → path-7gr7eZmp.js} +0 -0
  401. /package/dist/{perl-DOu6rCkF.js → perl-BNEFTNbM.js} +0 -0
  402. /package/dist/{pig-CRW0kne3.js → pig-Cd1DMS7P.js} +0 -0
  403. /package/dist/{powershell-CWgJhiiJ.js → powershell-CPxA0zpc.js} +0 -0
  404. /package/dist/{properties-CHxpmfXW.js → properties-BaFBm-Xa.js} +0 -0
  405. /package/dist/{protobuf-DGUXb_-T.js → protobuf-BQV_-X0H.js} +0 -0
  406. /package/dist/{puppet-C7uSiW6_.js → puppet-LXLST0mx.js} +0 -0
  407. /package/dist/{python-DAbhVcUr.js → python-DLjLzX4k.js} +0 -0
  408. /package/dist/{q-DKjWHias.js → q-DswTX1Y9.js} +0 -0
  409. /package/dist/{r-KD2KhyeL.js → r-CO7NpMwE.js} +0 -0
  410. /package/dist/{range-BYuZFTbA.js → range-DwpxnYuB.js} +0 -0
  411. /package/dist/{rpm-GFtnpQ6M.js → rpm-BlmEDT6r.js} +0 -0
  412. /package/dist/{ruby-CBAewzLY.js → ruby-BTPKgeZZ.js} +0 -0
  413. /package/dist/{sas-CCi_AaZi.js → sas-DTDTiNO8.js} +0 -0
  414. /package/dist/{scheme-CGGGD6kR.js → scheme-UzAAg4GJ.js} +0 -0
  415. /package/dist/{shell-b7vZ8ucI.js → shell-DQ0hQCsB.js} +0 -0
  416. /package/dist/{sieve-ClXOUV85.js → sieve-BVyYIx9u.js} +0 -0
  417. /package/dist/{simple-mode-Uad4lEG7.js → simple-mode-Dryu-fC9.js} +0 -0
  418. /package/dist/{slides-component-Dp-y50K9.js → slides-component-DfwLApNr.js} +0 -0
  419. /package/dist/{smalltalk-_PFt9_gp.js → smalltalk-DAdMAHTu.js} +0 -0
  420. /package/dist/{sparql-BCF6qcHt.js → sparql-Bi7quYgw.js} +0 -0
  421. /package/dist/{stylus-DMFZWz-G.js → stylus-jhpzcQ6Y.js} +0 -0
  422. /package/dist/{swift-De2YpSxT.js → swift-BrO8qThZ.js} +0 -0
  423. /package/dist/{tcl-jV8Xs_1k.js → tcl-s5QI5gv3.js} +0 -0
  424. /package/dist/{textile-D_zo778l.js → textile-ClhvJrxM.js} +0 -0
  425. /package/dist/{timer-pEiW44EO.js → timer-DV8t68ti.js} +0 -0
  426. /package/dist/{toml-_M0gsKn5.js → toml-TFa3EJQE.js} +0 -0
  427. /package/dist/{treemap-BzS5cW_6.js → treemap-CQJ0bIDy.js} +0 -0
  428. /package/dist/{troff-B06gyD33.js → troff-SqLg0heF.js} +0 -0
  429. /package/dist/{ttcn-DoQoQNUM.js → ttcn-Cfrap7HJ.js} +0 -0
  430. /package/dist/{ttcn-cfg-l_6PksD2.js → ttcn-cfg-Dopc-iwE.js} +0 -0
  431. /package/dist/{turtle-zEnD4bpn.js → turtle-Dt52DvVH.js} +0 -0
  432. /package/dist/{useAsyncData-Dyq3DyOF.js → useAsyncData-dr8GazGv.js} +0 -0
  433. /package/dist/{vb-fUsnAuzb.js → vb-D1pAvfDe.js} +0 -0
  434. /package/dist/{vbscript-CVlD7uZQ.js → vbscript-DZ7RBxn5.js} +0 -0
  435. /package/dist/{velocity-CHkEIdMC.js → velocity-Csau7eZy.js} +0 -0
  436. /package/dist/{verilog-B3ctZTB4.js → verilog-gXlZACs5.js} +0 -0
  437. /package/dist/{vhdl-rXdBgR5O.js → vhdl-NaUWbI1B.js} +0 -0
  438. /package/dist/{webidl-Cv9aQfcc.js → webidl-BJmPjW01.js} +0 -0
  439. /package/dist/{xquery-Du0w47aa.js → xquery-CJIPsC0g.js} +0 -0
  440. /package/dist/{yacas-Eq4p_g3L.js → yacas-8f2Vjiiz.js} +0 -0
  441. /package/dist/{z80-Dz4HTTRf.js → z80-s5Xk2hCP.js} +0 -0
@@ -140,6 +140,24 @@ def _(
140
140
  expect(extractCells(input)).toEqual(["x = a + b + c"]);
141
141
  });
142
142
 
143
+ it("preserves return statements inside nested functions", () => {
144
+ const input = `
145
+ @app.cell
146
+ def _(mo, px):
147
+ def make_fig():
148
+ data = {'category': ['foo', 'bar'], 'value': [10, 20]}
149
+ fig = px.bar(data, x='category', y='value')
150
+ return fig
151
+
152
+ fig = make_fig()
153
+ mo.ui.plotly(fig)
154
+ return
155
+ `;
156
+ expect(extractCells(input)).toEqual([
157
+ "def make_fig():\n data = {'category': ['foo', 'bar'], 'value': [10, 20]}\n fig = px.bar(data, x='category', y='value')\n return fig\n\nfig = make_fig()\nmo.ui.plotly(fig)",
158
+ ]);
159
+ });
160
+
143
161
  it("handles cells with config", () => {
144
162
  const input = `
145
163
  @app.cell(hide_code=True, column=2)
@@ -42,6 +42,7 @@ export function extractCells(text: string): string[] {
42
42
  let inMultilineArgs = false;
43
43
  let inMultilineReturn = false;
44
44
  let parenCount = 0;
45
+ let cellBaseIndent: number | null = null;
45
46
 
46
47
  // Pre-compile regex patterns
47
48
  const leadingParenRegex = /\(/g;
@@ -55,19 +56,16 @@ export function extractCells(text: string): string[] {
55
56
  );
56
57
  }
57
58
 
59
+ function getIndent(line: string): number {
60
+ const match = line.match(/^\s*/);
61
+ return match ? match[0].length : 0;
62
+ }
63
+
58
64
  function finalizeCellIfNeeded() {
59
65
  if (currentCell.length === 0) {
60
66
  return;
61
67
  }
62
68
 
63
- // Remove trailing returns
64
- while (
65
- currentCell.length > 0 &&
66
- currentCell[currentCell.length - 1].trim().startsWith("return")
67
- ) {
68
- currentCell.pop();
69
- }
70
-
71
69
  // Only add non-empty cells
72
70
  if (currentCell.some((l) => l.trim() !== "")) {
73
71
  cells.push(dedent(currentCell.join("\n")));
@@ -88,6 +86,7 @@ export function extractCells(text: string): string[] {
88
86
  finalizeCellIfNeeded();
89
87
  inCell = true;
90
88
  skipLines = 1; // Skip the def line
89
+ cellBaseIndent = null;
91
90
  continue;
92
91
  }
93
92
 
@@ -125,8 +124,13 @@ export function extractCells(text: string): string[] {
125
124
  continue;
126
125
  }
127
126
 
128
- // Handle return statements
129
- if (trimmed.startsWith("return")) {
127
+ // Detect base indentation of cell body from first content line
128
+ if (cellBaseIndent === null && trimmed) {
129
+ cellBaseIndent = getIndent(line);
130
+ }
131
+
132
+ // Handle return statements — only strip cell-level returns
133
+ if (trimmed.startsWith("return") && getIndent(line) === cellBaseIndent) {
130
134
  if (trimmed.includes("(") && !trimmed.endsWith(")")) {
131
135
  inMultilineReturn = true;
132
136
  parenCount = countParens(trimmed);
@@ -13,6 +13,7 @@ export const DATA_TYPES = [
13
13
  "time",
14
14
  "unknown",
15
15
  ] as const;
16
+ export type ModelLifecycle = NotificationMessageData<"model-lifecycle">;
16
17
  export type Banner = NotificationMessageData<"banner">;
17
18
  export type AiInlineCompletionRequest = schemas["AiInlineCompletionRequest"];
18
19
  export type DataTableColumn = schemas["DataTableColumn"];
@@ -1,5 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  import { invariant } from "@/utils/invariant";
3
+ import type { ModelLifecycle } from "../kernel/messages";
3
4
  import type { MarimoStaticState, StaticVirtualFiles } from "./types";
4
5
 
5
6
  declare global {
@@ -17,3 +18,7 @@ export function getStaticVirtualFiles(): StaticVirtualFiles {
17
18
 
18
19
  return window.__MARIMO_STATIC__.files;
19
20
  }
21
+
22
+ export function getStaticModelNotifications(): ModelLifecycle[] | undefined {
23
+ return window?.__MARIMO_STATIC__?.modelNotifications;
24
+ }
@@ -1,8 +1,10 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  import type { DataURLString } from "@/utils/json/base64";
3
+ import type { ModelLifecycle } from "../kernel/messages";
3
4
 
4
5
  export type StaticVirtualFiles = Record<string, DataURLString>;
5
6
 
6
7
  export interface MarimoStaticState {
7
8
  files: StaticVirtualFiles;
9
+ modelNotifications?: ModelLifecycle[];
8
10
  }
@@ -1,9 +1,13 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  import { describe, expect, it, vi } from "vitest";
3
+ import { codeAtom } from "../../saving/file-state";
4
+ import { store } from "../../state/jotai";
3
5
  import {
4
6
  CompositeFileStore,
5
7
  domElementFileStore,
6
8
  localStorageFileStore,
9
+ mountConfigFileStore,
10
+ notebookFileStore,
7
11
  } from "../store";
8
12
 
9
13
  describe("localStorageFileStore", () => {
@@ -53,3 +57,32 @@ describe("CompositeFileStore", () => {
53
57
  expect(saved).toHaveBeenCalledTimes(3);
54
58
  });
55
59
  });
60
+
61
+ describe("mountConfigFileStore", () => {
62
+ it("returns null when no code is set", () => {
63
+ store.set(codeAtom, undefined);
64
+ expect(mountConfigFileStore.readFile()).toBeNull();
65
+ });
66
+
67
+ it("returns code when set", () => {
68
+ store.set(codeAtom, "print('hello')");
69
+ expect(mountConfigFileStore.readFile()).toBe("print('hello')");
70
+ });
71
+
72
+ it("does not save files", () => {
73
+ store.set(codeAtom, "original");
74
+ mountConfigFileStore.saveFile("new content");
75
+ expect(mountConfigFileStore.readFile()).toBe("original");
76
+ });
77
+ });
78
+
79
+ describe("notebookFileStore priority", () => {
80
+ it("prefers mount config over marimo-code and URL", () => {
81
+ store.set(codeAtom, "mount config code");
82
+ const element = document.createElement("marimo-code");
83
+ element.textContent = "marimo-code element";
84
+ document.body.replaceChildren(element);
85
+
86
+ expect(notebookFileStore.readFile()).toBe("mount config code");
87
+ });
88
+ });
@@ -29,6 +29,7 @@ import type {
29
29
  SaveUserConfigurationRequest,
30
30
  Snippets,
31
31
  } from "../network/types";
32
+ import { filenameAtom } from "../saving/file-state";
32
33
  import { store } from "../state/jotai";
33
34
  import { BasicTransport } from "../websocket/transports/basic";
34
35
  import type { IConnectionTransport } from "../websocket/transports/transport";
@@ -146,7 +147,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
146
147
 
147
148
  const code = await notebookFileStore.readFile();
148
149
  const fallbackCode = await fallbackFileStore.readFile();
149
- const filename = PyodideRouter.getFilename();
150
+ const filename = store.get(filenameAtom) ?? PyodideRouter.getFilename();
150
151
  const userConfig = store.get(userConfigAtom);
151
152
 
152
153
  const queryParameters: Record<string, string | string[]> = {};
@@ -4,6 +4,8 @@ import {
4
4
  compressToEncodedURIComponent,
5
5
  decompressFromEncodedURIComponent,
6
6
  } from "lz-string";
7
+ import { codeAtom } from "@/core/saving/file-state";
8
+ import { store } from "@/core/state/jotai";
7
9
  import { TypedLocalStorage } from "@/utils/storage/typed";
8
10
  import { PyodideRouter } from "./router";
9
11
 
@@ -67,6 +69,15 @@ const remoteDefaultFileStore: FileStore = {
67
69
  },
68
70
  };
69
71
 
72
+ export const mountConfigFileStore: FileStore = {
73
+ saveFile(_contents: string) {
74
+ // Read-only: mount config code is set via codeAtom
75
+ },
76
+ readFile() {
77
+ return store.get(codeAtom) ?? null;
78
+ },
79
+ };
80
+
70
81
  const emptyFileStore: FileStore = {
71
82
  saveFile(contents: string) {
72
83
  // Do nothing
@@ -112,7 +123,8 @@ export class CompositeFileStore implements FileStore {
112
123
  }
113
124
 
114
125
  export const notebookFileStore = new CompositeFileStore([
115
- // Prefer <marimo-code>, then URL
126
+ // Prefer mount config, then <marimo-code>, then URL
127
+ mountConfigFileStore,
116
128
  domElementFileStore,
117
129
  urlFileStore,
118
130
  ]);
package/src/mount.tsx CHANGED
@@ -39,11 +39,18 @@ import {
39
39
  import { codeAtom, filenameAtom } from "./core/saving/file-state";
40
40
  import { store } from "./core/state/jotai";
41
41
  import { patchFetch, patchVegaLoader } from "./core/static/files";
42
- import { isStaticNotebook } from "./core/static/static-state";
42
+ import {
43
+ getStaticModelNotifications,
44
+ isStaticNotebook,
45
+ } from "./core/static/static-state";
43
46
  import { maybeRegisterVSCodeBindings } from "./core/vscode/vscode-bindings";
44
47
  import type { FileStore } from "./core/wasm/store";
45
48
  import { notebookFileStore } from "./core/wasm/store";
46
49
  import { WebSocketState } from "./core/websocket/types";
50
+ import {
51
+ handleWidgetMessage,
52
+ MODEL_MANAGER,
53
+ } from "./plugins/impl/anywidget/model";
47
54
  import { vegaLoader } from "./plugins/impl/vega/loader";
48
55
  import { initializePlugins } from "./plugins/plugins";
49
56
  import { ThemeProvider } from "./theme/ThemeProvider";
@@ -77,6 +84,7 @@ export function mount(options: unknown, el: Element): Error | undefined {
77
84
  // If we're in static mode, we need to patch fetch to use the virtual file
78
85
  patchFetch();
79
86
  patchVegaLoader(vegaLoader);
87
+ hydrateStaticModels();
80
88
  }
81
89
 
82
90
  // Init store
@@ -330,6 +338,20 @@ function initStore(options: unknown) {
330
338
  }
331
339
  }
332
340
 
341
+ /**
342
+ * Hydrate anywidget models from embedded static state so widgets
343
+ * render immediately without a kernel connection.
344
+ */
345
+ function hydrateStaticModels(): void {
346
+ const notifications = getStaticModelNotifications();
347
+ if (!notifications) {
348
+ return;
349
+ }
350
+ for (const notification of notifications) {
351
+ handleWidgetMessage(MODEL_MANAGER, notification);
352
+ }
353
+ }
354
+
333
355
  export const visibleForTesting = {
334
356
  reset: () => {
335
357
  hasMounted = false;
@@ -195,6 +195,7 @@ interface Data<T> {
195
195
  hasStableRowId: boolean;
196
196
  lazy: boolean;
197
197
  cellHoverTexts?: Record<string, Record<string, string | null>> | null;
198
+ downloadFileName?: string;
198
199
  }
199
200
 
200
201
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
@@ -278,6 +279,7 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
278
279
  // If lazy, this will preload the first page of data
279
280
  // without user confirmation.
280
281
  preload: z.boolean().default(false),
282
+ downloadFileName: z.string().optional(),
281
283
  }),
282
284
  )
283
285
  .withFunctions<DataTableFunctions>({
@@ -752,6 +754,7 @@ const DataTableComponent = ({
752
754
  cellStyles,
753
755
  hoverTemplate,
754
756
  cellHoverTexts,
757
+ downloadFileName,
755
758
  toggleDisplayHeader,
756
759
  calculate_top_k_rows,
757
760
  preview_column,
@@ -981,6 +984,7 @@ const DataTableComponent = ({
981
984
  hoverTemplate={hoverTemplate}
982
985
  cellHoverTexts={cellHoverTexts}
983
986
  downloadAs={showDownload ? downloadAs : undefined}
987
+ downloadFileName={downloadFileName}
984
988
  enableSearch={enableSearch}
985
989
  searchQuery={searchQuery}
986
990
  onSearchQueryChange={setSearchQuery}
@@ -21,7 +21,6 @@ import { BINDING_MANAGER, WIDGET_DEF_REGISTRY } from "./widget-binding";
21
21
  interface Data {
22
22
  jsUrl: string;
23
23
  jsHash: string;
24
- css?: string | null;
25
24
  }
26
25
 
27
26
  type AnyWidgetState = ModelState;
@@ -118,21 +117,18 @@ export const AnyWidgetPlugin = createPlugin<ModelIdRef>("marimo-anywidget")
118
117
  z.object({
119
118
  jsUrl: z.string(),
120
119
  jsHash: z.string(),
121
- css: z.string().nullish(),
122
120
  }),
123
121
  )
124
122
  .withFunctions({})
125
123
  .renderer((props) => <AnyWidgetSlot {...props} />);
126
124
 
127
125
  const AnyWidgetSlot = (props: IPluginProps<ModelIdRef, Data>) => {
128
- const { css, jsUrl, jsHash } = props.data;
126
+ const { jsUrl, jsHash } = props.data;
129
127
  const { model_id: modelId } = props.value;
130
128
  const host = props.host as HTMLElementNotDerivedFromRef;
131
129
 
132
130
  const { jsModule, error } = useAnyWidgetModule({ jsUrl, jsHash });
133
131
 
134
- useMountCss(css, host);
135
-
136
132
  if (error) {
137
133
  return <ErrorBanner error={error} />;
138
134
  }
@@ -160,6 +156,7 @@ const AnyWidgetSlot = (props: IPluginProps<ModelIdRef, Data>) => {
160
156
  key={key}
161
157
  widget={jsModule.default}
162
158
  modelId={modelId}
159
+ host={host}
163
160
  />
164
161
  );
165
162
  };
@@ -207,11 +204,13 @@ function isAnyWidgetModule(mod: any): mod is { default: AnyWidget } {
207
204
  interface Props<T extends AnyWidgetState> {
208
205
  widget: AnyWidget<T>;
209
206
  modelId: WidgetModelId;
207
+ host: HTMLElementNotDerivedFromRef;
210
208
  }
211
209
 
212
210
  const LoadedSlot = <T extends AnyWidgetState>({
213
211
  widget,
214
212
  modelId,
213
+ host,
215
214
  }: Props<T> & { widget: AnyWidget<T> }) => {
216
215
  const htmlRef = useRef<HTMLDivElement>(null);
217
216
 
@@ -222,6 +221,9 @@ const LoadedSlot = <T extends AnyWidgetState>({
222
221
  Logger.error("Model not found for modelId", modelId);
223
222
  }
224
223
 
224
+ const css = model?.get("_css");
225
+ useMountCss(css, host);
226
+
225
227
  useEffect(() => {
226
228
  if (!htmlRef.current || !model) {
227
229
  return;
@@ -31,6 +31,12 @@ vi.mock("@/core/network/requests", () => ({
31
31
  }),
32
32
  }));
33
33
 
34
+ // Mock isStaticNotebook — default to false (normal mode)
35
+ const mockIsStatic = vi.fn().mockReturnValue(false);
36
+ vi.mock("@/core/static/static-state", () => ({
37
+ isStaticNotebook: () => mockIsStatic(),
38
+ }));
39
+
34
40
  // Helper to create a mock MarimoComm
35
41
  function createMockComm<T>() {
36
42
  return {
@@ -393,4 +399,51 @@ describe("ModelManager", () => {
393
399
 
394
400
  expect(BINDING_MANAGER.has(testId)).toBe(false);
395
401
  });
402
+
403
+ describe("static mode", () => {
404
+ beforeEach(() => {
405
+ mockIsStatic.mockReturnValue(true);
406
+ });
407
+
408
+ afterAll(() => {
409
+ mockIsStatic.mockReturnValue(false);
410
+ });
411
+
412
+ it("should create model with no-op comm in static mode", async () => {
413
+ await handleWidgetMessage(modelManager, {
414
+ model_id: testId,
415
+ message: {
416
+ method: "open",
417
+ state: { count: 42 },
418
+ buffer_paths: [],
419
+ buffers: [],
420
+ },
421
+ });
422
+
423
+ const model = await modelManager.get(testId);
424
+ expect(model.get("count")).toBe(42);
425
+
426
+ // save_changes should not call the real request client
427
+ model.set("count", 100);
428
+ model.save_changes();
429
+ expect(mockSendModelValue).not.toHaveBeenCalled();
430
+ });
431
+
432
+ it("should not throw on send in static mode", async () => {
433
+ await handleWidgetMessage(modelManager, {
434
+ model_id: testId,
435
+ message: {
436
+ method: "open",
437
+ state: { count: 0 },
438
+ buffer_paths: [],
439
+ buffers: [],
440
+ },
441
+ });
442
+
443
+ const model = await modelManager.get(testId);
444
+ // send() should silently no-op
445
+ await expect(model.send({ test: true })).resolves.toBeUndefined();
446
+ expect(mockSendModelValue).not.toHaveBeenCalled();
447
+ });
448
+ });
396
449
  });
@@ -5,6 +5,7 @@ import type { AnyModel } from "@anywidget/types";
5
5
  import { debounce } from "lodash-es";
6
6
  import type { NotificationMessageData } from "@/core/kernel/messages";
7
7
  import { getRequestClient } from "@/core/network/requests";
8
+ import { isStaticNotebook } from "@/core/static/static-state";
8
9
  import {
9
10
  decodeFromWire,
10
11
  serializeBuffersToBase64,
@@ -343,12 +344,14 @@ export async function handleWidgetMessage(
343
344
  return;
344
345
  }
345
346
 
346
- modelManager.create(
347
- modelId,
348
- (signal) =>
349
- new Model(
350
- stateWithBuffers,
351
- {
347
+ modelManager.create(modelId, (signal) => {
348
+ // In static exports there is no kernel, so comm calls are no-ops.
349
+ const comm: MarimoComm<ModelState> = isStaticNotebook()
350
+ ? {
351
+ sendUpdate: async () => undefined,
352
+ sendCustomMessage: async () => undefined,
353
+ }
354
+ : {
352
355
  async sendUpdate(changeData) {
353
356
  if (signal.aborted) {
354
357
  Logger.debug(
@@ -377,10 +380,10 @@ export async function handleWidgetMessage(
377
380
  buffers: buffers.map(dataViewToBase64),
378
381
  });
379
382
  },
380
- },
381
- signal,
382
- ),
383
- );
383
+ };
384
+
385
+ return new Model(stateWithBuffers, comm, signal);
386
+ });
384
387
  return;
385
388
  }
386
389
 
@@ -47,6 +47,7 @@ export const ChatPlugin = createPlugin<{ messages: UIMessage[] }>(
47
47
  maxHeight: z.number().optional(),
48
48
  config: configSchema,
49
49
  allowAttachments: z.union([z.boolean(), z.string().array()]),
50
+ disabled: z.boolean().default(false),
50
51
  }),
51
52
  )
52
53
  .withFunctions<PluginFunctions>({
@@ -76,6 +77,7 @@ export const ChatPlugin = createPlugin<{ messages: UIMessage[] }>(
76
77
  showConfigurationControls={props.data.showConfigurationControls}
77
78
  maxHeight={props.data.maxHeight}
78
79
  allowAttachments={props.data.allowAttachments}
80
+ disabled={props.data.disabled}
79
81
  config={props.data.config}
80
82
  get_chat_history={props.functions.get_chat_history}
81
83
  delete_chat_history={props.functions.delete_chat_history}
@@ -67,6 +67,7 @@ interface Props extends PluginFunctions {
67
67
  showConfigurationControls: boolean;
68
68
  maxHeight: number | undefined;
69
69
  allowAttachments: boolean | string[];
70
+ disabled: boolean;
70
71
  value: UIMessage[];
71
72
  setValue: (messages: UIMessage[]) => void;
72
73
  host: HTMLElement;
@@ -450,6 +451,9 @@ export const Chatbot: React.FC<Props> = (props) => {
450
451
  <form
451
452
  onSubmit={async (evt) => {
452
453
  evt.preventDefault();
454
+ if (props.disabled) {
455
+ return;
456
+ }
453
457
 
454
458
  const fileParts = files
455
459
  ? await convertToFileUIPart(files)
@@ -462,7 +466,12 @@ export const Chatbot: React.FC<Props> = (props) => {
462
466
  resetInput();
463
467
  }}
464
468
  ref={formRef}
465
- className="flex w-full border-t border-(--slate-6) px-2 py-1 items-center"
469
+ // biome-ignore lint/a11y/useSemanticElements: inert is used to disable the entire form
470
+ inert={props.disabled || undefined}
471
+ className={cn(
472
+ "flex w-full border-t border-(--slate-6) px-2 py-1 items-center",
473
+ props.disabled && "opacity-50 cursor-not-allowed",
474
+ )}
466
475
  >
467
476
  {props.showConfigurationControls && (
468
477
  <ConfigPopup config={config} onChange={setConfig} />
@@ -48,6 +48,7 @@ type TableData<T> = T[] | CsvURL;
48
48
  interface Data {
49
49
  label?: string | null;
50
50
  columns: ColumnDataTypes;
51
+ dataframeName?: string;
51
52
  pageSize: number;
52
53
  showDownload: boolean;
53
54
  lazy: boolean;
@@ -93,6 +94,7 @@ export const DataFramePlugin = createPlugin<S>("marimo-dataframe")
93
94
  label: z.string().nullish(),
94
95
  pageSize: z.number().default(5),
95
96
  showDownload: z.boolean().default(true),
97
+ dataframeName: z.string().optional(),
96
98
  columns: z
97
99
  .array(z.tuple([z.string().or(z.number()), z.string(), z.string()]))
98
100
  .transform((value) => {
@@ -176,6 +178,7 @@ const EMPTY: Transformations = {
176
178
  export const DataFrameComponent = memo(
177
179
  ({
178
180
  columns,
181
+ dataframeName,
179
182
  pageSize,
180
183
  showDownload,
181
184
  lazy,
@@ -326,6 +329,7 @@ export const DataFrameComponent = memo(
326
329
  fieldTypes={field_types}
327
330
  rowHeaders={row_headers || Arrays.EMPTY}
328
331
  showDownload={showDownload}
332
+ downloadFileName={dataframeName}
329
333
  download_as={download_as}
330
334
  enableSearch={false}
331
335
  showFilters={false}