@marimo-team/islands 0.23.15-dev6 → 0.23.15-dev62

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 (578) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CU4fZJzG.js → ConnectedDataExplorerComponent-CJaUI-S-.js} +85 -84
  2. package/dist/{ErrorBoundary-DE6tzZf-.js → ErrorBoundary-DXlxsrTF.js} +3 -3
  3. package/dist/{ImageComparisonComponent-CHrI72em.js → ImageComparisonComponent-C3y7L3eJ.js} +173 -129
  4. package/dist/{any-language-editor-DN1R-1KZ.js → any-language-editor-P9tjkj4n.js} +21 -21
  5. package/dist/apl-e1B5LPEL.js +4 -0
  6. package/dist/{arc-DfkSnvZm.js → arc-CTIpFoOn.js} +2 -2
  7. package/dist/architecture-7HQA4BMR-DHUrQjL4.js +6 -0
  8. package/dist/{architectureDiagram-VXUJARFQ-CT2SuxNw.js → architectureDiagram-VXUJARFQ-DXwkyAaM.js} +19 -19
  9. package/dist/asciiarmor-B-gwgesP.js +4 -0
  10. package/dist/asn1-DF2ckRB4.js +4 -0
  11. package/dist/assets/__vite-browser-external-CjNAy01L.js +1 -0
  12. package/dist/assets/worker-B3XPCb6y.js +98 -0
  13. package/dist/{blockDiagram-VD42YOAC-Dy7hlFla.js → blockDiagram-VD42YOAC-CIOjvxeD.js} +12 -12
  14. package/dist/brainfuck-4G-7_gq_.js +4 -0
  15. package/dist/{button-BacYv-bE.js → button-BcSml68y.js} +12 -65
  16. package/dist/{c4Diagram-YG6GDRKO-BXlAmZ8Z.js → c4Diagram-YG6GDRKO-B6dZC_oU.js} +6 -6
  17. package/dist/{capabilities-D_4LYhSU.js → capabilities-BYLFYTYv.js} +2 -2
  18. package/dist/{channel-D_PHgcig.js → channel-BN070S0F.js} +1 -1
  19. package/dist/{chat-ui-DinOvbWu.js → chat-ui-BdSDiVjk.js} +3122 -3116
  20. package/dist/{check-C9OoNtR4.js → check-Cs-KV5XY.js} +1 -1
  21. package/dist/{chunk-4BX2VUAB-CzXltWHN.js → chunk-4BX2VUAB-iU5lQTDI.js} +1 -1
  22. package/dist/{chunk-4F5CHEZ2-D9nGEHV8.js → chunk-4F5CHEZ2-VlodlEGo.js} +1 -1
  23. package/dist/{chunk-55IACEB6-B-1mjMMC.js → chunk-55IACEB6-7h71GwyW.js} +1 -1
  24. package/dist/{chunk-5FQGJX7Z-BbqSm5gU.js → chunk-5FQGJX7Z-B9WoXK1R.js} +3 -3
  25. package/dist/{chunk-ABZYJK2D-Dz0-H2B5.js → chunk-ABZYJK2D-BxBDji1u.js} +3 -3
  26. package/dist/{chunk-ATLVNIR6-o0Z5MZLd.js → chunk-ATLVNIR6-qFiszptQ.js} +2 -2
  27. package/dist/{chunk-B2363JML-KEJpLGGP.js → chunk-B2363JML-zL3VngtH.js} +1 -1
  28. package/dist/{chunk-B4BG7PRW-BL98U9B4.js → chunk-B4BG7PRW-B_z2FEHm.js} +7 -7
  29. package/dist/{chunk-CVBHYZKI-B_c5YBcW.js → chunk-CVBHYZKI-CwazXVlJ.js} +1 -1
  30. package/dist/{chunk-DI55MBZ5-Dwkn0LWm.js → chunk-DI55MBZ5-D4Y8yV8B.js} +6 -6
  31. package/dist/{chunk-EXTU4WIE-9sNjmQrB.js → chunk-EXTU4WIE-BQPBhApE.js} +2 -2
  32. package/dist/{chunk-FMBD7UC4-Ie8M9q0W.js → chunk-FMBD7UC4-quJmebXa.js} +1 -1
  33. package/dist/{chunk-FRFDVMJY-DzQqMWrl.js → chunk-FRFDVMJY-BHBqN-vD.js} +1 -1
  34. package/dist/{chunk-HN2XXSSU-E3n-Ys7Z.js → chunk-HN2XXSSU-Bv0QkeMr.js} +1 -1
  35. package/dist/{chunk-JA3XYJ7Z-C32Y7Epf.js → chunk-JA3XYJ7Z-CY4CRbV5.js} +3 -3
  36. package/dist/{chunk-JZLCHNYA-C6ftyVMN.js → chunk-JZLCHNYA-DWIR9m5O.js} +6 -6
  37. package/dist/{chunk-MI3HLSF2-CUYEasXO.js → chunk-MI3HLSF2-HGWI-8Pg.js} +1 -1
  38. package/dist/{chunk-N4CR4FBY-DUhGZhZs.js → chunk-N4CR4FBY-Bw2HcMNc.js} +7 -7
  39. package/dist/{chunk-PL6DKKU2-D7km-08O.js → chunk-PL6DKKU2-CAHKc95s.js} +1 -1
  40. package/dist/{chunk-QN33PNHL-0K6SDYn3.js → chunk-QN33PNHL-DPBNNzpR.js} +2 -2
  41. package/dist/{chunk-QXUST7PY-DMhsRpYK.js → chunk-QXUST7PY-DtC2t9Mk.js} +10 -10
  42. package/dist/{chunk-QZHKN3VN-DRjXVwuJ.js → chunk-QZHKN3VN-Dym5BS7y.js} +1 -1
  43. package/dist/{chunk-S3R3BYOJ-oAe3dEbO.js → chunk-S3R3BYOJ-BdgLc8AM.js} +4 -4
  44. package/dist/{chunk-SJTYNZTY-BkJrPRFC.js → chunk-SJTYNZTY-DnXoKWpW.js} +1 -1
  45. package/dist/{chunk-TCCFYFTB-D58KeXnC.js → chunk-TCCFYFTB-DPWJa9zL.js} +1 -1
  46. package/dist/{chunk-TQ3KTPDO-D_yA_wAb.js → chunk-TQ3KTPDO-CsDx6v37.js} +1 -1
  47. package/dist/{chunk-TZMSLE5B-yBKS_DQU.js → chunk-TZMSLE5B-BzSHcq-K.js} +3 -3
  48. package/dist/{chunk-UMXZTB3W-D7uwvNjd.js → chunk-UMXZTB3W-D1uHz8MN.js} +1 -1
  49. package/dist/classDiagram-2ON5EDUG-BiQPjMNY.js +30 -0
  50. package/dist/classDiagram-v2-WZHVMYZB-YHdR8fqM.js +30 -0
  51. package/dist/{clike-DTxNUn7l.js → clike-7lgyEYRk.js} +1 -1
  52. package/dist/clojure-CUybM11R.js +4 -0
  53. package/dist/cmake-BPjGcuDL.js +4 -0
  54. package/dist/cobol-BETk_nb6.js +4 -0
  55. package/dist/{code-block-37QAKDTI-O6IH6wAi.js → code-block-37QAKDTI-MSxEjskJ.js} +1 -1
  56. package/dist/{code-visibility-Dpab3kCj.js → code-visibility-D7Oaafvl.js} +1554 -1471
  57. package/dist/coffeescript-CManZxXL.js +4 -0
  58. package/dist/commonlisp-DWkn7GW8.js +4 -0
  59. package/dist/{copy-COam1EG7.js → copy-Cs3yt6Vt.js} +2 -2
  60. package/dist/{cose-bilkent-S5V4N54A-kjoZoid4.js → cose-bilkent-S5V4N54A-BYj0aL7z.js} +2 -2
  61. package/dist/crystal-CCbg5EUH.js +4 -0
  62. package/dist/css-By8eo-XS.js +4 -0
  63. package/dist/cypher-DwfHg3nP.js +4 -0
  64. package/dist/d-Brs1wNbw.js +4 -0
  65. package/dist/{dagre-6UL2VRFP-J0JKgwOt.js → dagre-6UL2VRFP-DpYjBqQs.js} +11 -11
  66. package/dist/{data-grid-overlay-editor-C6lxUJp-.js → data-grid-overlay-editor-BWRG2b_o.js} +2 -2
  67. package/dist/{constants-T20xxyNf.js → debounce-BOD3DbfP.js} +1 -24
  68. package/dist/{diagram-PSM6KHXK-DYgJuNk9.js → diagram-PSM6KHXK-D4ftnaua.js} +22 -22
  69. package/dist/{diagram-QEK2KX5R-CKdBR2sb.js → diagram-QEK2KX5R-DVlUOgs1.js} +17 -17
  70. package/dist/{diagram-S2PKOQOG-Dpi7mo5W.js → diagram-S2PKOQOG-CGh4OMEV.js} +17 -17
  71. package/dist/diff-DJIRmJ1g.js +4 -0
  72. package/dist/{dist-DyyjKEYf.js → dist-3NCqaWjt.js} +2 -2
  73. package/dist/{dist-D-W5ny5a.js → dist-4lVIWUT3.js} +1 -1
  74. package/dist/dist-5o9uz19x.js +5 -0
  75. package/dist/{dist-GZXUmt0b.js → dist-B2jmQKKx.js} +2 -2
  76. package/dist/{dist--2Bqjvs0.js → dist-B96tMAst.js} +2 -2
  77. package/dist/{dist-BaoDKvdy.js → dist-BCX980mU.js} +2 -2
  78. package/dist/{dist-DMjWuVs8.js → dist-BIEt-mlF.js} +1 -1
  79. package/dist/{dist-BR_gyG9L.js → dist-BO5HRiTf.js} +2 -2
  80. package/dist/{dist-Dv_Y15yk.js → dist-BOMbzyb3.js} +85 -85
  81. package/dist/{dist-CIYBwstr.js → dist-BP39XM8u.js} +1 -1
  82. package/dist/{dist-DZo4nSS0.js → dist-BPF0gTRZ.js} +6 -6
  83. package/dist/{dist-BSAt6RhH.js → dist-BTdrwBWP.js} +22 -22
  84. package/dist/{dist-BY018Paw.js → dist-BdqCKQ1O.js} +2 -2
  85. package/dist/dist-BpDH0DEP.js +5 -0
  86. package/dist/dist-BpXhbQXO.js +8 -0
  87. package/dist/{dist-CcWX6tmx.js → dist-BpeiYpG2.js} +2 -2
  88. package/dist/{dist-A2846XWO.js → dist-BwhXBwMd.js} +1 -1
  89. package/dist/dist-ByadAk_L.js +5 -0
  90. package/dist/{dist-abid3KgM.js → dist-C18MUWTj.js} +2 -2
  91. package/dist/{dist-DZORgqKY.js → dist-C2_4pjuS.js} +1 -1
  92. package/dist/{dist-BzEzfugY.js → dist-CFSb_Frm.js} +1 -1
  93. package/dist/dist-CK0g7JvP.js +8 -0
  94. package/dist/{dist-C_Y3oV3C.js → dist-CRmSjkLP.js} +2 -2
  95. package/dist/{dist-hT4QzYX-.js → dist-CSlJrrAw.js} +86 -81
  96. package/dist/{dist-Du8WkPuU.js → dist-CV79CsQ0.js} +2 -2
  97. package/dist/dist-CfzCtiq2.js +5 -0
  98. package/dist/{dist-CoXAujgg.js → dist-D3bdsa1d.js} +4 -4
  99. package/dist/dist-D8JtVFrW.js +8 -0
  100. package/dist/dist-DK2Oocpu.js +6 -0
  101. package/dist/{dist-LTU8Hdvn.js → dist-DZwp8lro.js} +3 -3
  102. package/dist/{dist-t9Kf7xqC.js → dist-DaXJPX8F.js} +2 -2
  103. package/dist/{dist-U4F-tbMs.js → dist-De-GlSAs.js} +246 -184
  104. package/dist/{dist-M9Vag9Y0.js → dist-DgjbnqTg.js} +125 -125
  105. package/dist/dist-DnSu977r.js +5 -0
  106. package/dist/{dist-CxJDU6Bh.js → dist-DviUBLUp.js} +4 -4
  107. package/dist/{dist-CpxNdDkw.js → dist-DwqBJ014.js} +2 -2
  108. package/dist/{dist-Bf7SHuNp.js → dist-JGehap7K.js} +5 -5
  109. package/dist/{dist-Bk75fBZA.js → dist-LpLXa9Lb.js} +2 -2
  110. package/dist/{dist-Bf9f8MuT.js → dist-SXNmlE8A.js} +1 -1
  111. package/dist/dist-UmxJm6sW.js +8 -0
  112. package/dist/dist-aYSBQSyM.js +5 -0
  113. package/dist/dist-kkZ1Ztlh.js +6 -0
  114. package/dist/dist-ngPczwNi.js +5 -0
  115. package/dist/{dist-DgGbNavJ.js → dist-pqIwD8VD.js} +2 -2
  116. package/dist/dist-wQRyxyTV.js +5 -0
  117. package/dist/{dist-Dax--nl9.js → dist-w_gWE5Wf.js} +1 -1
  118. package/dist/{dockerfile-twL37N91.js → dockerfile-B82Pkz_V.js} +1 -1
  119. package/dist/dtd-Dyiazv4N.js +4 -0
  120. package/dist/dylan-D8Fcw7NA.js +4 -0
  121. package/dist/ecl-CjKp8Vii.js +4 -0
  122. package/dist/eiffel-K9ViOX5r.js +4 -0
  123. package/dist/elm-B5NVtRco.js +4 -0
  124. package/dist/{erDiagram-Q2GNP2WA-BU-m41EQ.js → erDiagram-Q2GNP2WA-BcKAHFqF.js} +15 -15
  125. package/dist/erlang-BnLzgk7R.js +4 -0
  126. package/dist/{error-banner-DFPfz_Qf.js → error-banner-DR7o3CbX.js} +68 -68
  127. package/dist/{esm-ga2Bf3O2.js → esm-DKOv6P2M.js} +424 -424
  128. package/dist/esm-k8PIvuZW.js +1180 -0
  129. package/dist/{extends-9MVIxxRo.js → extends-Cq2JYHKy.js} +36 -20
  130. package/dist/{factor-CajWS6mS.js → factor-Bq2mGIHt.js} +1 -1
  131. package/dist/factor-C7f9Jz5R.js +4 -0
  132. package/dist/{flowDiagram-NV44I4VS-CRoXKjGq.js → flowDiagram-NV44I4VS-BRhSg-ro.js} +17 -17
  133. package/dist/{formats-Dzx4J_z1.js → formats-BFhkZJwd.js} +3 -3
  134. package/dist/forth-rGM8jLao.js +4 -0
  135. package/dist/fortran-B3acSe0i.js +4 -0
  136. package/dist/{ganttDiagram-JELNMOA3-7mq5f9cO.js → ganttDiagram-JELNMOA3-CXXCN7LN.js} +10 -10
  137. package/dist/gas-Bb1Vmv_N.js +4 -0
  138. package/dist/gherkin-C9Lyidgd.js +4 -0
  139. package/dist/{gitGraph-G5XIXVHT-DiniR35k.js → gitGraph-G5XIXVHT-BjTx0kww.js} +3 -3
  140. package/dist/{gitGraphDiagram-V2S2FVAM-Dfuokq6w.js → gitGraphDiagram-V2S2FVAM-BOlkMSqK.js} +17 -17
  141. package/dist/{glide-data-editor-CjTu7ukN.js → glide-data-editor--CaN-f27.js} +13 -13
  142. package/dist/groovy-DQk6XcGH.js +4 -0
  143. package/dist/haskell-mV0Vw9gv.js +4 -0
  144. package/dist/haxe-DqxN89zH.js +5 -0
  145. package/dist/{html-to-image-_wGfk8V-.js → html-to-image-DDENewl2.js} +2649 -2607
  146. package/dist/idl-ya8W561J.js +4 -0
  147. package/dist/{info-VBDWY6EO-DVZvGhkQ.js → info-VBDWY6EO-CA67FznA.js} +3 -3
  148. package/dist/infoDiagram-HS3SLOUP-D3TyKnL_.js +30 -0
  149. package/dist/{input-DtsN7xm-.js → input-DStQIuqD.js} +51 -51
  150. package/dist/javascript-CgqgptVu.js +4 -0
  151. package/dist/{journeyDiagram-XKPGCS4Q-8XYSU1GI.js → journeyDiagram-XKPGCS4Q-DEal0aT1.js} +7 -7
  152. package/dist/julia-CFQ-HusI.js +4 -0
  153. package/dist/{kanban-definition-3W4ZIXB7--9pT9z1R.js → kanban-definition-3W4ZIXB7-Dl90wENN.js} +12 -12
  154. package/dist/{katex-9-9QRhxz.js → katex-C4t-BmrK.js} +1 -1
  155. package/dist/{label-WfTSU8L4.js → label-DIk0QoFe.js} +2 -2
  156. package/dist/{line-C5s_12ee.js → line-C43FIPBd.js} +3 -3
  157. package/dist/{linear-B5-AFRiR.js → linear-H_vsH9ao.js} +4 -4
  158. package/dist/livescript-D__3TmDo.js +4 -0
  159. package/dist/{loader-Boph2xIS.js → loader-CTHCI-qe.js} +5 -16
  160. package/dist/lua-Bytcgj_W.js +4 -0
  161. package/dist/main.js +2217 -2116
  162. package/dist/mathematica-DJhvVKvl.js +4 -0
  163. package/dist/mbox-IGHPCjfR.js +4 -0
  164. package/dist/{mermaid-4DMBBIKO-Eg3D4FVz.js → mermaid-4DMBBIKO-FXbOziy9.js} +1 -1
  165. package/dist/{mermaid-BYqXy_NE.js → mermaid-CdSvixW2.js} +47 -47
  166. package/dist/{mermaid-parser.core-C3XRsazI.js → mermaid-parser.core-DoivvxPd.js} +8 -8
  167. package/dist/{mhchem-yiCCuiEF.js → mhchem-EGhUZR1V.js} +1 -1
  168. package/dist/{mindmap-definition-VGOIOE7T-B-4mnfFG.js → mindmap-definition-VGOIOE7T-CCDupjWW.js} +14 -14
  169. package/dist/mirc-tcwvVugm.js +4 -0
  170. package/dist/mllike-Dx91i62r.js +6 -0
  171. package/dist/modelica-_SRt-yU5.js +4 -0
  172. package/dist/mscgen-GZrGS9gt.js +6 -0
  173. package/dist/mumps-Cv3ygyod.js +4 -0
  174. package/dist/nsis-BU7GeGbI.js +4 -0
  175. package/dist/{nsis-ClF3r5Tr.js → nsis-i9_sgigf.js} +1 -1
  176. package/dist/ntriples-CL-FCYXb.js +4 -0
  177. package/dist/{number-overlay-editor-BLJXvX9c.js → number-overlay-editor-Ck_mc_gT.js} +1 -1
  178. package/dist/objects-De59twF-.js +56 -0
  179. package/dist/octave-Dc6_3DIu.js +4 -0
  180. package/dist/{ordinal-ArJavP1Q.js → ordinal-Bkv2-veX.js} +1 -1
  181. package/dist/oz-DpUAJCXf.js +4 -0
  182. package/dist/{packet-DYOGHKS2-34raHOiB.js → packet-DYOGHKS2-Bkgofxf3.js} +3 -3
  183. package/dist/pascal-B17mncXs.js +4 -0
  184. package/dist/perl-BTpK97q9.js +4 -0
  185. package/dist/{pie-VRWISCQL-BaLlzZa3.js → pie-VRWISCQL-B1AMhN_7.js} +3 -3
  186. package/dist/{pieDiagram-ADFJNKIX-Cr3cNpZY.js → pieDiagram-ADFJNKIX-JvXG_6hk.js} +22 -22
  187. package/dist/pig-CFb638Ap.js +4 -0
  188. package/dist/powershell-Cxo-_2A5.js +4 -0
  189. package/dist/{precisionRound-Tqb4mg-H.js → precisionRound-CnHPY_5v.js} +1 -1
  190. package/dist/{process-output-Mh4UrjwM.js → process-output-2QPcgBQg.js} +4 -4
  191. package/dist/properties-BPgT1xTB.js +4 -0
  192. package/dist/protobuf-BgHBaIIK.js +4 -0
  193. package/dist/pug-25-oS0SG.js +4 -0
  194. package/dist/{pug-B_rby2yb.js → pug-BhE2JRSg.js} +1 -1
  195. package/dist/puppet-DarIr20S.js +4 -0
  196. package/dist/purify.es-EnR5yhgI.js +783 -0
  197. package/dist/python-BqmOsBsi.js +4 -0
  198. package/dist/q-D3QJCTup.js +4 -0
  199. package/dist/{quadrantDiagram-AYHSOK5B-BuNL8Q93.js → quadrantDiagram-AYHSOK5B-BqDB9tUC.js} +5 -5
  200. package/dist/r-Cz_yBX4z.js +4 -0
  201. package/dist/{radar-ZZBFDIW7-Ci7bfoZa.js → radar-ZZBFDIW7-C2b7A32s.js} +3 -3
  202. package/dist/{react-vega-B0sAlDTL.js → react-vega-BazDALhI.js} +469 -469
  203. package/dist/{requirementDiagram-UZGBJVZJ-BG2lLUN1.js → requirementDiagram-UZGBJVZJ-KbVt8SPH.js} +14 -14
  204. package/dist/{reveal-component-BfYO8h-9.js → reveal-component-TK3vi1Xl.js} +629 -622
  205. package/dist/rpm-DGOtYwAI.js +5 -0
  206. package/dist/ruby-DBZu4rPc.js +4 -0
  207. package/dist/{sankeyDiagram-TZEHDZUN-DMal8sps.js → sankeyDiagram-TZEHDZUN-DgkF38jx.js} +5 -5
  208. package/dist/sas-Dd1D9qTq.js +4 -0
  209. package/dist/scheme-BmDjvTHX.js +4 -0
  210. package/dist/{sequenceDiagram-WL72ISMW-DT6Tk-Eo.js → sequenceDiagram-WL72ISMW-BDmx9n95.js} +8 -8
  211. package/dist/shell-BL8zFSaj.js +4 -0
  212. package/dist/sieve-BAx2WqUP.js +4 -0
  213. package/dist/smalltalk-CYRzF7VV.js +4 -0
  214. package/dist/sparql-YWaDRO4A.js +4 -0
  215. package/dist/{spec-Cz-Bj1JI.js → spec-CnaxwDqy.js} +4 -4
  216. package/dist/{src-Bf2iLOlr.js → src-DV3ha_nA.js} +1 -1
  217. package/dist/{stateDiagram-FKZM4ZOC-CB_lodq3.js → stateDiagram-FKZM4ZOC-ByOvQf2n.js} +17 -17
  218. package/dist/stateDiagram-v2-4FDKWEC3-C3xqeavR.js +29 -0
  219. package/dist/{step-CWipAYTY.js → step-BqHnkgWE.js} +1 -1
  220. package/dist/stex-B5O-env2.js +4 -0
  221. package/dist/{strings-Dq_j3Rxw.js → strings-BYAhZnQi.js} +354 -354
  222. package/dist/style.css +1 -1
  223. package/dist/stylus-lYsyLFc1.js +4 -0
  224. package/dist/swift-ClQz9z1n.js +4 -0
  225. package/dist/{swiper-component-5HoSsPi1.js → swiper-component-DE94711u.js} +4 -4
  226. package/dist/tcl-B3jhsfqY.js +4 -0
  227. package/dist/textile-Cb1Dw7Aq.js +4 -0
  228. package/dist/{time-CsmIF9YZ.js → time-Bb4A7I6a.js} +4 -4
  229. package/dist/{timeline-definition-IT6M3QCI-NfSKRvH0.js → timeline-definition-IT6M3QCI-CkD_trIn.js} +4 -4
  230. package/dist/{toDate-CWNNlFEX.js → toDate-B3IRfHhw.js} +16 -7
  231. package/dist/toml-nHZhetdO.js +4 -0
  232. package/dist/{tooltip-Czds6Qr8.js → tooltip-B-qh7UPB.js} +3 -3
  233. package/dist/{treemap-GDKQZRPO-Cl6OQh8D.js → treemap-GDKQZRPO-SDux0AV8.js} +3 -3
  234. package/dist/troff-DuJAGWKH.js +4 -0
  235. package/dist/ttcn-BxrcwP21.js +4 -0
  236. package/dist/ttcn-cfg-BAg_9dcc.js +4 -0
  237. package/dist/turtle-zCq949as.js +4 -0
  238. package/dist/{types-C2Ir191_.js → types-DQl7jVYK.js} +1 -1
  239. package/dist/use-vega-container-remeasure-DGNrIQSk.js +27 -0
  240. package/dist/{useAsyncData-KfHB8wQR.js → useAsyncData-CvO8WUy3.js} +1 -1
  241. package/dist/{useDateFormatter-CMnRuVmN.js → useDateFormatter-BSoGim-G.js} +2 -2
  242. package/dist/{useDeepCompareMemoize-nJMtxhm4.js → useDeepCompareMemoize-J3MKRdA4.js} +1 -1
  243. package/dist/{useIframeCapabilities-DWIYvDh7.js → useIframeCapabilities-POcFXHbw.js} +1 -1
  244. package/dist/{useLifecycle-DegSo0lV.js → useLifecycle-DqPxHgAN.js} +3 -3
  245. package/dist/{useTheme-6eZ3GOTS.js → useTheme-XMq9mNf_.js} +65 -29
  246. package/dist/vb-De5hElus.js +4 -0
  247. package/dist/vbscript-Cypcpv4F.js +4 -0
  248. package/dist/{vega-component-DzyyM9fc.js → vega-component-CrFoZT1S.js} +225 -223
  249. package/dist/vega-embed-container-DAQAMjiO.js +22 -0
  250. package/dist/vega-loader.browser-DmpxCJqx.js +1353 -0
  251. package/dist/velocity-Di7l-yhe.js +4 -0
  252. package/dist/verilog-Bzi-S3g2.js +4 -0
  253. package/dist/vhdl-B0ZZITaW.js +4 -0
  254. package/dist/webidl-0sviiRcN.js +4 -0
  255. package/dist/xquery-B4qMVWaB.js +4 -0
  256. package/dist/{xychartDiagram-PRI3JC2R-BvwftqMA.js → xychartDiagram-PRI3JC2R-BSkNxYNw.js} +13 -13
  257. package/dist/yacas-Jt25Fuv8.js +4 -0
  258. package/dist/z80-CrcbYzmp.js +4 -0
  259. package/dist/{zod-CijjQh4u.js → zod-D0yOqoGe.js} +26 -26
  260. package/package.json +3 -1
  261. package/src/__mocks__/requests.ts +3 -0
  262. package/src/components/charts/lazy.tsx +3 -1
  263. package/src/components/charts/vega-embed-container.tsx +18 -0
  264. package/src/components/chat/__tests__/chat-utils.test.ts +244 -1
  265. package/src/components/chat/__tests__/message-queue.test.tsx +121 -0
  266. package/src/components/chat/chat-panel.tsx +196 -67
  267. package/src/components/chat/chat-utils.ts +111 -2
  268. package/src/components/editor/RecoveryButton.tsx +2 -2
  269. package/src/components/editor/SortableCell.tsx +6 -2
  270. package/src/components/editor/__tests__/output-persistence.test.tsx +241 -0
  271. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +153 -0
  272. package/src/components/editor/actions/pair-with-agent-commands.ts +109 -0
  273. package/src/components/editor/actions/pair-with-agent-modal.tsx +20 -64
  274. package/src/components/editor/actions/useNotebookActions.tsx +8 -0
  275. package/src/components/editor/ai/add-cell-with-ai.tsx +14 -5
  276. package/src/components/editor/ai/ai-completion-editor.tsx +4 -1
  277. package/src/components/editor/cell/cell-context-menu.tsx +7 -0
  278. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +221 -0
  279. package/src/components/editor/chrome/components/feedback-button.tsx +308 -77
  280. package/src/components/editor/chrome/panels/packages-panel.tsx +11 -1
  281. package/src/components/editor/chrome/panels/write-secret-modal.tsx +3 -2
  282. package/src/components/editor/columns/__tests__/cell-column.test.tsx +105 -0
  283. package/src/components/editor/columns/cell-column.tsx +34 -4
  284. package/src/components/editor/columns/sortable-column.tsx +24 -4
  285. package/src/components/editor/connections/__tests__/secret-combobox.test.ts +134 -0
  286. package/src/components/editor/connections/database/schemas.ts +35 -27
  287. package/src/components/editor/connections/form-renderers.tsx +42 -110
  288. package/src/components/editor/connections/secret-combobox.tsx +253 -0
  289. package/src/components/editor/connections/storage/schemas.ts +12 -6
  290. package/src/components/editor/file-tree/download.ts +46 -0
  291. package/src/components/editor/file-tree/file-explorer.tsx +3 -21
  292. package/src/components/editor/file-tree/file-viewer.tsx +4 -27
  293. package/src/components/editor/navigation/__tests__/navigation.test.ts +33 -0
  294. package/src/components/editor/navigation/navigation.ts +8 -1
  295. package/src/components/editor/notebook-cell.tsx +203 -106
  296. package/src/components/editor/renderers/__tests__/cells-renderer.test.tsx +66 -0
  297. package/src/components/editor/renderers/cell-array.tsx +26 -13
  298. package/src/components/editor/renderers/cells-renderer.tsx +8 -2
  299. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +29 -0
  300. package/src/components/editor/renderers/slides-layout/types.ts +4 -0
  301. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +19 -19
  302. package/src/components/slides/reveal-component.tsx +37 -17
  303. package/src/components/slides/slide-form.tsx +72 -0
  304. package/src/components/ui/toast.tsx +11 -3
  305. package/src/components/ui/toaster.tsx +65 -9
  306. package/src/core/ai/context/providers/error.ts +6 -158
  307. package/src/core/cells/__tests__/utils.test.ts +59 -0
  308. package/src/core/cells/utils.ts +51 -0
  309. package/src/core/codemirror/completion/__tests__/signature-hint.test.ts +97 -3
  310. package/src/core/codemirror/completion/signature-hint.ts +78 -11
  311. package/src/core/constants.ts +8 -0
  312. package/src/core/diagnostics/__tests__/issue-details.test.ts +173 -0
  313. package/src/core/diagnostics/issue-details.ts +139 -0
  314. package/src/core/errors/__tests__/error-entries.test.ts +25 -0
  315. package/src/core/errors/error-entries.ts +176 -0
  316. package/src/core/islands/__tests__/bridge.test.ts +341 -46
  317. package/src/core/islands/__tests__/main.test.ts +176 -0
  318. package/src/core/islands/__tests__/parse.test.ts +105 -0
  319. package/src/core/islands/bootstrap.ts +8 -3
  320. package/src/core/islands/bridge.ts +117 -23
  321. package/src/core/islands/components/__tests__/web-components.test.tsx +214 -0
  322. package/src/core/islands/components/web-components.tsx +76 -15
  323. package/src/core/islands/constants.ts +1 -0
  324. package/src/core/islands/main.ts +69 -3
  325. package/src/core/islands/parse.ts +70 -23
  326. package/src/core/islands/worker/__tests__/controller.test.ts +173 -0
  327. package/src/core/islands/worker/worker.tsx +145 -57
  328. package/src/core/network/__tests__/requests-lazy.test.ts +18 -0
  329. package/src/core/network/__tests__/requests-network.test.ts +7 -0
  330. package/src/core/network/requests-lazy.ts +13 -1
  331. package/src/core/network/requests-network.ts +3 -0
  332. package/src/core/network/requests-static.ts +1 -0
  333. package/src/core/network/requests-toasting.tsx +1 -0
  334. package/src/core/network/types.ts +3 -0
  335. package/src/core/runtime/__tests__/runtime.test.ts +64 -0
  336. package/src/core/runtime/runtime.ts +30 -10
  337. package/src/core/wasm/bridge.ts +8 -0
  338. package/src/core/wasm/worker/bootstrap.ts +113 -20
  339. package/src/core/wasm/worker/types.ts +2 -0
  340. package/src/css/app/Cell.css +10 -0
  341. package/src/hooks/__tests__/useHotkey.test.tsx +88 -0
  342. package/src/hooks/useHotkey.ts +29 -4
  343. package/src/plugins/impl/anywidget/__tests__/host.test.ts +6 -9
  344. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +3 -1
  345. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +32 -61
  346. package/src/plugins/impl/anywidget/model-proxy.ts +0 -13
  347. package/src/plugins/impl/anywidget/runtime.ts +1 -0
  348. package/src/plugins/impl/anywidget/widget-binding.ts +8 -34
  349. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +53 -2
  350. package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +71 -0
  351. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +102 -0
  352. package/src/plugins/impl/vega/use-vega-container-remeasure.ts +39 -0
  353. package/src/plugins/impl/vega/vega-component.tsx +5 -4
  354. package/src/theme/__tests__/useTheme.test.ts +68 -0
  355. package/src/theme/useTheme.ts +16 -1
  356. package/dist/apl-Bdc61P1y.js +0 -4
  357. package/dist/architecture-7HQA4BMR-Kyc44TmC.js +0 -6
  358. package/dist/asciiarmor-DVRHDGzT.js +0 -4
  359. package/dist/asn1-BmuKfkfu.js +0 -4
  360. package/dist/assets/__vite-browser-external-BQCLNwri.js +0 -1
  361. package/dist/assets/worker-DAWRHcPq.js +0 -73
  362. package/dist/brainfuck-DPrRpyTV.js +0 -4
  363. package/dist/classDiagram-2ON5EDUG-QjoAcuFE.js +0 -30
  364. package/dist/classDiagram-v2-WZHVMYZB-bUCv4gu2.js +0 -30
  365. package/dist/clojure-DEttQW5T.js +0 -4
  366. package/dist/cmake-jNlx_DaM.js +0 -4
  367. package/dist/cobol-BvvIm5MJ.js +0 -4
  368. package/dist/coffeescript-DTpBMyFU.js +0 -4
  369. package/dist/commonlisp-BmmUG8jb.js +0 -4
  370. package/dist/crystal-BxyqmEWC.js +0 -4
  371. package/dist/css-BGoCtuG3.js +0 -4
  372. package/dist/cypher-BmCbdl3u.js +0 -4
  373. package/dist/d-CFrlbjZt.js +0 -4
  374. package/dist/diff-D6XwL6P8.js +0 -4
  375. package/dist/dist-7QfXoMdB.js +0 -5
  376. package/dist/dist-BEXXyZig.js +0 -5
  377. package/dist/dist-BYj57OV4.js +0 -5
  378. package/dist/dist-BlSvQzNr.js +0 -5
  379. package/dist/dist-CCBlxAgS.js +0 -8
  380. package/dist/dist-CIDTVIUf.js +0 -5
  381. package/dist/dist-CqQyhAM8.js +0 -8
  382. package/dist/dist-CwRu2Xzh.js +0 -5
  383. package/dist/dist-D8CDTVgf.js +0 -6
  384. package/dist/dist-D8DNB0nO.js +0 -8
  385. package/dist/dist-DL6N_q-A.js +0 -5
  386. package/dist/dist-DOFbNV_b.js +0 -8
  387. package/dist/dist-DPrYzMY0.js +0 -6
  388. package/dist/dist-cdmMjgsn.js +0 -5
  389. package/dist/dtd-Bw0lRN0-.js +0 -4
  390. package/dist/dylan-B55eBHTt.js +0 -4
  391. package/dist/ecl-C8G4p0wn.js +0 -4
  392. package/dist/eiffel-BmH46VJl.js +0 -4
  393. package/dist/elm-DhzeFqkl.js +0 -4
  394. package/dist/erlang-CY-wdlsU.js +0 -4
  395. package/dist/esm-M837UxV5.js +0 -1171
  396. package/dist/factor-DWkgl0xw.js +0 -4
  397. package/dist/forth-Cij_ie2t.js +0 -4
  398. package/dist/fortran-Br3X9cfm.js +0 -4
  399. package/dist/gas-DYsGcMN2.js +0 -4
  400. package/dist/gherkin-eVgXQ0fQ.js +0 -4
  401. package/dist/groovy-_NFHIXG7.js +0 -4
  402. package/dist/haskell-D6xNG_bH.js +0 -4
  403. package/dist/haxe-sU_rzAwn.js +0 -5
  404. package/dist/idl-Ds_VbrUx.js +0 -4
  405. package/dist/infoDiagram-HS3SLOUP-CEnzWruK.js +0 -30
  406. package/dist/javascript-CztfIl0i.js +0 -4
  407. package/dist/julia-DDv40QMV.js +0 -4
  408. package/dist/livescript-BEOngLLc.js +0 -4
  409. package/dist/lua-9-7BhQ4Y.js +0 -4
  410. package/dist/mathematica-DDa0Pfxm.js +0 -4
  411. package/dist/mbox-iO03mmoE.js +0 -4
  412. package/dist/mirc-C9z5LT4X.js +0 -4
  413. package/dist/mllike-jGJbdm_C.js +0 -6
  414. package/dist/modelica-DzF7oIEL.js +0 -4
  415. package/dist/mscgen-DB-u125o.js +0 -6
  416. package/dist/mumps-CRTFHhzh.js +0 -4
  417. package/dist/nsis-C4NPTuox.js +0 -4
  418. package/dist/ntriples-BCOoGph1.js +0 -4
  419. package/dist/octave-DTwNlazz.js +0 -4
  420. package/dist/oz-DD38AzSz.js +0 -4
  421. package/dist/pascal-BohSp9jV.js +0 -4
  422. package/dist/perl-f5OutoPM.js +0 -4
  423. package/dist/pig-Dv7wSmHb.js +0 -4
  424. package/dist/powershell-rYgjKB39.js +0 -4
  425. package/dist/properties-BFUNLRDN.js +0 -4
  426. package/dist/protobuf-B9QJQPPv.js +0 -4
  427. package/dist/pug-DzvWpaMC.js +0 -4
  428. package/dist/puppet-B_K-n_xK.js +0 -4
  429. package/dist/purify.es-H92eMd9-.js +0 -557
  430. package/dist/python-CAiFcaA2.js +0 -4
  431. package/dist/q-cLeFIBLK.js +0 -4
  432. package/dist/r-04Y-Wco3.js +0 -4
  433. package/dist/react-vega-B6ncY2Tp.js +0 -9
  434. package/dist/rpm-FUdrIia9.js +0 -5
  435. package/dist/ruby-DMjFXuEW.js +0 -4
  436. package/dist/sas-DzHZxjXK.js +0 -4
  437. package/dist/scheme-DxHd_Rb9.js +0 -4
  438. package/dist/shell-C8Kwypgf.js +0 -4
  439. package/dist/sieve-DdyqOKXZ.js +0 -4
  440. package/dist/smalltalk-pB7X1D9y.js +0 -4
  441. package/dist/sparql-NhBO6oOa.js +0 -4
  442. package/dist/stateDiagram-v2-4FDKWEC3-E0RGjKsm.js +0 -29
  443. package/dist/stex-KfRnSHzF.js +0 -4
  444. package/dist/stylus-SfWSnzPv.js +0 -4
  445. package/dist/swift-jRPdq2zR.js +0 -4
  446. package/dist/tcl-_hpTHGX3.js +0 -4
  447. package/dist/textile-C9h8slqH.js +0 -4
  448. package/dist/toml-DWvtinD4.js +0 -4
  449. package/dist/troff-Dwo_A0y7.js +0 -4
  450. package/dist/ttcn-V--CPFKq.js +0 -4
  451. package/dist/ttcn-cfg-CPSMchTG.js +0 -4
  452. package/dist/turtle-B4rPGBWu.js +0 -4
  453. package/dist/vb-DaMBBd4j.js +0 -4
  454. package/dist/vbscript-BMJQqcE2.js +0 -4
  455. package/dist/vega-loader.browser-CZ-J8Py3.js +0 -1321
  456. package/dist/velocity-CGq2QRq2.js +0 -4
  457. package/dist/verilog-CUNo8F5u.js +0 -4
  458. package/dist/vhdl-CCzA0msW.js +0 -4
  459. package/dist/webidl-CqIMDIBL.js +0 -4
  460. package/dist/xquery-XC5Kbr-1.js +0 -4
  461. package/dist/yacas-CGOv7Dzy.js +0 -4
  462. package/dist/z80-CXhVmi-f.js +0 -4
  463. /package/dist/{Plot-CAYS29h9.js → Plot-YQOuVIei.js} +0 -0
  464. /package/dist/{apl-BCgCq9iM.js → apl-99A7dLQe.js} +0 -0
  465. /package/dist/{array-tvvEqPy7.js → array-O78LT16Y.js} +0 -0
  466. /package/dist/{asciiarmor-BtqU-KJQ.js → asciiarmor-DLEhpFDx.js} +0 -0
  467. /package/dist/{asn1-Dmb-dTMx.js → asn1-CMrcTsT4.js} +0 -0
  468. /package/dist/{asterisk-DaVJJDnV.js → asterisk-CqykImq7.js} +0 -0
  469. /package/dist/{brainfuck-C1HoZKlE.js → brainfuck-ChPt5yBe.js} +0 -0
  470. /package/dist/{chunk-DR5Q36YT-BflwErH1.js → chunk-DR5Q36YT-5Yp2GWwR.js} +0 -0
  471. /package/dist/{click-outside-container-BLPjMamz.js → click-outside-container-BSIeYt4y.js} +0 -0
  472. /package/dist/{clike-CdT0yHjt.js → clike-CE0fXfM_.js} +0 -0
  473. /package/dist/{clojure-CdyrCpUv.js → clojure-QkBEMU-g.js} +0 -0
  474. /package/dist/{cmake-BFlPxym7.js → cmake-CU1jX7Mo.js} +0 -0
  475. /package/dist/{cobol-CcJXewp8.js → cobol-DMOKzzky.js} +0 -0
  476. /package/dist/{coffeescript-DnKuIKRo.js → coffeescript-DjnjLyfk.js} +0 -0
  477. /package/dist/{colors-CQAOa8cK.js → colors-DmiH1bIH.js} +0 -0
  478. /package/dist/{common-keywords-FBrXPTcz.js → common-keywords-D3nPJNQP.js} +0 -0
  479. /package/dist/{commonlisp-B-kok83Z.js → commonlisp-CYd9iOSe.js} +0 -0
  480. /package/dist/{crystal-FYRYjI1I.js → crystal-Dy55yoYG.js} +0 -0
  481. /package/dist/{css-B45lc2V3.js → css-CNU8w3HJ.js} +0 -0
  482. /package/dist/{cypher-DZMLyVY_.js → cypher-q47DGzK7.js} +0 -0
  483. /package/dist/{cytoscape.esm-ayF70frT.js → cytoscape.esm-Dr8XzXWK.js} +0 -0
  484. /package/dist/{d-x-VVT4o9.js → d-jEkaLvxX.js} +0 -0
  485. /package/dist/{defaultLocale-u-3osm0P.js → defaultLocale-BpsHxBd7.js} +0 -0
  486. /package/dist/{defaultLocale-BoHTsDG6.js → defaultLocale-DoeErsX2.js} +0 -0
  487. /package/dist/{diff-Dxe2mpXk.js → diff-vb2-unFN.js} +0 -0
  488. /package/dist/{dist-BGdYVvOu.js → dist-DsoKosxi.js} +0 -0
  489. /package/dist/{dtd-C9VM_Wfu.js → dtd-C9kR-bXa.js} +0 -0
  490. /package/dist/{duckdb-keywords-CvJhR_Yd.js → duckdb-keywords-B6HYCMOT.js} +0 -0
  491. /package/dist/{dylan-DTSnEIFO.js → dylan-BLckrK-V.js} +0 -0
  492. /package/dist/{ebnf-2D4Ctp3y.js → ebnf-Cnp3L9jg.js} +0 -0
  493. /package/dist/{ecl-N04ptnRK.js → ecl-CEsf6XVg.js} +0 -0
  494. /package/dist/{eiffel-Dd8rpqr_.js → eiffel-2KGZNzx6.js} +0 -0
  495. /package/dist/{elm-GT2E866W.js → elm-D2s3K5wF.js} +0 -0
  496. /package/dist/{emotion-is-prop-valid.esm-DzSb5hsH.js → emotion-is-prop-valid.esm-DdVSF4FD.js} +0 -0
  497. /package/dist/{erlang-Cf0Bp5pY.js → erlang-0PMFOndk.js} +0 -0
  498. /package/dist/{esm-BaaaPNGl.js → esm-CuQHjs36.js} +0 -0
  499. /package/dist/{fcl-Ccj8Z5Xd.js → fcl-D9nccAWI.js} +0 -0
  500. /package/dist/{forth-wd_XzGTg.js → forth-DG89iUsu.js} +0 -0
  501. /package/dist/{fortran-DcwUTZFe.js → fortran-ytKsAVvu.js} +0 -0
  502. /package/dist/{gas-DeALIER3.js → gas-Cg2Fm0N2.js} +0 -0
  503. /package/dist/{gherkin-CKTqaJNX.js → gherkin-B87FEnZ-.js} +0 -0
  504. /package/dist/{groovy-Bwdp_d8D.js → groovy-Dcs08AWD.js} +0 -0
  505. /package/dist/{haskell-DCdCcPLK.js → haskell-cwkOuhx6.js} +0 -0
  506. /package/dist/{haxe-DAyktQWJ.js → haxe-DWEo4q10.js} +0 -0
  507. /package/dist/{http-_DVAYWoR.js → http-B8jdG64J.js} +0 -0
  508. /package/dist/{idl-CBuZiRYu.js → idl-WWQwDcRV.js} +0 -0
  509. /package/dist/{init-uv0kkh4g.js → init-DNBbYZd_.js} +0 -0
  510. /package/dist/{javascript-DzigE11c.js → javascript-BeR74dxD.js} +0 -0
  511. /package/dist/{julia-PwfB-0Cm.js → julia-UlvCUYGL.js} +0 -0
  512. /package/dist/{katex-C_XRmjAP.js → katex-Bld7b-fk.js} +0 -0
  513. /package/dist/{livescript-BJLz1EbT.js → livescript-GPmFcmYV.js} +0 -0
  514. /package/dist/{lua-ZC-XC2jf.js → lua-DYoT_0zM.js} +0 -0
  515. /package/dist/{main-Tj_-QTyF.js → main-B1Jo_8pC.js} +0 -0
  516. /package/dist/{math-DFcdCCU8.js → math-CBNc2Ib0.js} +0 -0
  517. /package/dist/{mathematica-DCYMx6qB.js → mathematica-DSFIQlbG.js} +0 -0
  518. /package/dist/{mbox-OxMK_9XI.js → mbox-ej8lFMdL.js} +0 -0
  519. /package/dist/{micromark-factory-space-DF2w36zS.js → micromark-factory-space-CwHmg6iz.js} +0 -0
  520. /package/dist/{mirc-nJVyhA0H.js → mirc-CAdIdvHQ.js} +0 -0
  521. /package/dist/{mllike-DRO89bsU.js → mllike-CjTB1lHF.js} +0 -0
  522. /package/dist/{modelica-Don3E6ZD.js → modelica-BB68FYMa.js} +0 -0
  523. /package/dist/{mscgen-DJfqD3bN.js → mscgen-BkbzgGGI.js} +0 -0
  524. /package/dist/{mumps-SjGTvDYL.js → mumps-Cu-28E9F.js} +0 -0
  525. /package/dist/{nginx-DasThI7R.js → nginx-C1ofKPst.js} +0 -0
  526. /package/dist/{node-sql-parser-B8nBD36q.js → node-sql-parser-DLl_zNw0.js} +0 -0
  527. /package/dist/{ntriples-CNBKRl3I.js → ntriples-D9cQiZxZ.js} +0 -0
  528. /package/dist/{octave-DdeVHNlx.js → octave-BvtAnPX0.js} +0 -0
  529. /package/dist/{once-DPuqGUeo.js → once-B60G2fuJ.js} +0 -0
  530. /package/dist/{oz-CcKSoNvN.js → oz-COaVHk2E.js} +0 -0
  531. /package/dist/{pascal-6leftwNj.js → pascal-BFpqVD2x.js} +0 -0
  532. /package/dist/{path-BGaWgPKg.js → path-DwWbhZFI.js} +0 -0
  533. /package/dist/{perl-BhJIwWzN.js → perl-DaiORxHP.js} +0 -0
  534. /package/dist/{pig-r-xDHqRf.js → pig-DFzRhmsF.js} +0 -0
  535. /package/dist/{powershell-D-BELeNi.js → powershell-BG2LQNKN.js} +0 -0
  536. /package/dist/{properties-CnuDhbll.js → properties-CqJJR5QY.js} +0 -0
  537. /package/dist/{protobuf-CO8RBhvX.js → protobuf-WwDYV1yY.js} +0 -0
  538. /package/dist/{puppet-NmXHjLy8.js → puppet-QNY3w_uN.js} +0 -0
  539. /package/dist/{python-DAQXi720.js → python-4QrQ3Ugi.js} +0 -0
  540. /package/dist/{q-DlikXfV0.js → q-DhwXuxE2.js} +0 -0
  541. /package/dist/{r-CuohilwT.js → r-Df-nkR25.js} +0 -0
  542. /package/dist/{range-C-rmrM1O.js → range-BOiA8qqU.js} +0 -0
  543. /package/dist/{rpm-0Pjwp0Pb.js → rpm-Cokue07s.js} +0 -0
  544. /package/dist/{ruby-Dq8NJTDG.js → ruby-DrYcL3qF.js} +0 -0
  545. /package/dist/{sas-CuwonyVP.js → sas-CoiPirA5.js} +0 -0
  546. /package/dist/{scheme-CYU-RRIf.js → scheme-CwFLjzHv.js} +0 -0
  547. /package/dist/{semaphore-CNDGTzkX.js → semaphore-C8rmHdhj.js} +0 -0
  548. /package/dist/{shell-COPmX2qE.js → shell-BFV-R24I.js} +0 -0
  549. /package/dist/{sieve-B_3zyLne.js → sieve-CxwXF5T9.js} +0 -0
  550. /package/dist/{simple-mode-DSBniks8.js → simple-mode-DTaJtKPt.js} +0 -0
  551. /package/dist/{smalltalk-DRft7iPv.js → smalltalk-QivVOCtX.js} +0 -0
  552. /package/dist/{solr-RZ9uTl59.js → solr-BLvysN-c.js} +0 -0
  553. /package/dist/{sparql-CN6qj55H.js → sparql-nKsFk8j7.js} +0 -0
  554. /package/dist/{spreadsheet-BNNUNXA2.js → spreadsheet-BWc8C2FT.js} +0 -0
  555. /package/dist/{sql-B4x8IkwU.js → sql-CWfUjlV1.js} +0 -0
  556. /package/dist/{stex-BIsgBmK4.js → stex-DtMAhV4-.js} +0 -0
  557. /package/dist/{stylus-Bn_ZjOQ3.js → stylus-BLKQAycn.js} +0 -0
  558. /package/dist/{swift-BLUJhMbz.js → swift-CJoKqiKj.js} +0 -0
  559. /package/dist/{tcl-C86fxecl.js → tcl-YTeYFNUc.js} +0 -0
  560. /package/dist/{textile-DmHh2rsK.js → textile-C6rKQqMQ.js} +0 -0
  561. /package/dist/{tiddlywiki-DI0mF2WJ.js → tiddlywiki-ZXwTHGNT.js} +0 -0
  562. /package/dist/{tiki-2HU6XLLn.js → tiki-C628O_u4.js} +0 -0
  563. /package/dist/{timer-YZl28NYN.js → timer-BpI_FKSA.js} +0 -0
  564. /package/dist/{toml-GWANRNAD.js → toml-DxlPGbRy.js} +0 -0
  565. /package/dist/{treemap-D-ka1hvx.js → treemap-DY3NBr79.js} +0 -0
  566. /package/dist/{troff-BHTsomIy.js → troff-DFCfH7Ku.js} +0 -0
  567. /package/dist/{ttcn-DQuhn5Mn.js → ttcn-DAW-ERVP.js} +0 -0
  568. /package/dist/{ttcn-cfg-HjFYtdB-.js → ttcn-cfg-CpJ8b7EN.js} +0 -0
  569. /package/dist/{turtle-nCay33Nv.js → turtle-BneV2f8L.js} +0 -0
  570. /package/dist/{vb-BG-XlqqJ.js → vb-D973Vxxh.js} +0 -0
  571. /package/dist/{vbscript-B6vyW0-D.js → vbscript-Dckaq3YO.js} +0 -0
  572. /package/dist/{velocity-CWegueqO.js → velocity-DKty-GUC.js} +0 -0
  573. /package/dist/{verilog-CzSQm4cG.js → verilog-aNaK_biA.js} +0 -0
  574. /package/dist/{vhdl-DqnNVL7r.js → vhdl-CQuehnQy.js} +0 -0
  575. /package/dist/{webidl-DXEUpDWH.js → webidl-Bhg8vaMr.js} +0 -0
  576. /package/dist/{xquery-Ba_NB5bD.js → xquery-D2q16GaM.js} +0 -0
  577. /package/dist/{yacas-HKQU6hyk.js → yacas-DHGOHnNa.js} +0 -0
  578. /package/dist/{z80-CXkHXLdj.js → z80-BPhTmO22.js} +0 -0
@@ -0,0 +1,214 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { act } from "react";
4
+ import {
5
+ afterAll,
6
+ afterEach,
7
+ beforeAll,
8
+ beforeEach,
9
+ describe,
10
+ expect,
11
+ it,
12
+ } from "vitest";
13
+ import { cellId } from "@/__tests__/branded";
14
+ import { MockNotebook } from "@/__mocks__/notebook";
15
+ import { MockRequestClient } from "@/__mocks__/requests";
16
+ import { notebookAtom } from "@/core/cells/cells";
17
+ import {
18
+ ISLAND_DATA_ATTRIBUTES,
19
+ ISLAND_TAG_NAMES,
20
+ ISLANDS_JSON_SCRIPT_TYPE,
21
+ } from "@/core/islands/constants";
22
+ import { requestClientAtom } from "@/core/network/requests";
23
+ import { store } from "@/core/state/jotai";
24
+ import { parseMarimoIslandApps } from "../../parse";
25
+ import { MarimoIslandElement } from "../web-components";
26
+
27
+ beforeAll(() => {
28
+ setReactActEnvironment(true);
29
+ if (!customElements.get(ISLAND_TAG_NAMES.ISLAND)) {
30
+ customElements.define(ISLAND_TAG_NAMES.ISLAND, MarimoIslandElement);
31
+ }
32
+ });
33
+
34
+ afterAll(() => {
35
+ setReactActEnvironment(false);
36
+ });
37
+
38
+ beforeEach(() => {
39
+ store.set(notebookAtom, MockNotebook.notebookState({ cellData: {} }));
40
+ store.set(requestClientAtom, MockRequestClient.create());
41
+ });
42
+
43
+ afterEach(async () => {
44
+ await actAndFlush(() => document.body.replaceChildren());
45
+ store.set(requestClientAtom, null);
46
+ });
47
+
48
+ describe("MarimoIslandElement lifecycle", () => {
49
+ it("binds a reactive island after its runtime cell index is materialized", async () => {
50
+ setNotebook("outgoing-cell", "outgoing runtime output");
51
+ const container = document.createElement("div");
52
+ container.innerHTML = `
53
+ <marimo-island data-app-id="app-1" data-reactive="true">
54
+ <marimo-cell-output><div>initial output</div></marimo-cell-output>
55
+ <marimo-cell-code hidden>${encodeURIComponent("value = 1")}</marimo-cell-code>
56
+ </marimo-island>
57
+ `;
58
+ await actAndFlush(() => document.body.append(container));
59
+
60
+ const island = container.querySelector<HTMLElement>(
61
+ ISLAND_TAG_NAMES.ISLAND,
62
+ );
63
+ expect(island).not.toBeNull();
64
+ expect(island?.getAttribute("data-status")).toBeNull();
65
+
66
+ await actAndFlush(() => {
67
+ parseMarimoIslandApps(container);
68
+ });
69
+
70
+ expect(island?.textContent).toContain("outgoing runtime output");
71
+
72
+ await actAndFlush(() => {
73
+ setNotebook("runtime-cell");
74
+ });
75
+
76
+ expect(island?.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX)).toBe("0");
77
+ expect(island?.getAttribute("data-status")).toBe("idle");
78
+
79
+ await actAndFlush(() => {
80
+ island?.remove();
81
+ if (island) {
82
+ container.append(island);
83
+ }
84
+ });
85
+ expect(island?.textContent).toContain("initial output");
86
+
87
+ island?.setAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID, "source-cell");
88
+ island?.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "false");
89
+ expect((island as MarimoIslandElement | null)?.cellId).toBeUndefined();
90
+ });
91
+
92
+ it("refreshes a reused payload island and clears an old app binding", async () => {
93
+ const container = document.createElement("div");
94
+ container.innerHTML = `
95
+ <marimo-island
96
+ data-app-id="app-1"
97
+ data-cell-id="cell-1"
98
+ data-reactive="true"
99
+ >
100
+ <marimo-cell-output><div>old output</div></marimo-cell-output>
101
+ <marimo-cell-code hidden>${encodeURIComponent('print("old")')}</marimo-cell-code>
102
+ </marimo-island>
103
+ `;
104
+ const script = document.createElement("script");
105
+ script.type = ISLANDS_JSON_SCRIPT_TYPE;
106
+ script.textContent = payloadSource({
107
+ code: 'print("unchanged")',
108
+ outputHtml: "<div>old output</div>",
109
+ });
110
+ container.append(script);
111
+ await actAndFlush(() => document.body.append(container));
112
+
113
+ await actAndFlush(() => {
114
+ parseMarimoIslandApps(container);
115
+ script.textContent = payloadSource({
116
+ code: 'print("unchanged")',
117
+ outputHtml: "<div>updated output</div>",
118
+ });
119
+ parseMarimoIslandApps(container);
120
+ });
121
+
122
+ const island = container.querySelector<HTMLElement>(
123
+ ISLAND_TAG_NAMES.ISLAND,
124
+ );
125
+ expect(island?.textContent).toContain("updated output");
126
+ expect(island?.textContent).not.toContain("old output");
127
+ expect(island?.querySelector(ISLAND_TAG_NAMES.CELL_OUTPUT)).toBeNull();
128
+
129
+ await actAndFlush(() => {
130
+ setNotebook("outgoing-cell", "outgoing runtime output");
131
+ });
132
+ expect(island?.textContent).toContain("outgoing runtime output");
133
+
134
+ await actAndFlush(() => {
135
+ island?.setAttribute(ISLAND_DATA_ATTRIBUTES.APP_ID, "app-2");
136
+ island?.setAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID, "cell-2");
137
+ script.textContent = payloadSource({
138
+ appId: "app-2",
139
+ cellId: "cell-2",
140
+ code: 'print("next")',
141
+ outputHtml: "<div>next app output</div>",
142
+ });
143
+ parseMarimoIslandApps(container);
144
+ });
145
+
146
+ expect(island?.textContent).toContain("next app output");
147
+ expect(island?.textContent).not.toContain("outgoing runtime output");
148
+ });
149
+ });
150
+
151
+ function setNotebook(id: string, output?: string): void {
152
+ const runtimeCellId = cellId(id);
153
+ store.set(
154
+ notebookAtom,
155
+ MockNotebook.notebookState({
156
+ cellData: { [runtimeCellId]: {} },
157
+ cellRuntime: output
158
+ ? {
159
+ [runtimeCellId]: {
160
+ output: {
161
+ channel: "output",
162
+ data: `<div>${output}</div>`,
163
+ mimetype: "text/html",
164
+ timestamp: 0,
165
+ },
166
+ },
167
+ }
168
+ : undefined,
169
+ }),
170
+ );
171
+ }
172
+
173
+ function payloadSource({
174
+ appId = "app-1",
175
+ cellId = "cell-1",
176
+ code,
177
+ outputHtml,
178
+ }: {
179
+ appId?: string;
180
+ cellId?: string;
181
+ code: string;
182
+ outputHtml: string;
183
+ }): string {
184
+ return JSON.stringify({
185
+ schemaVersion: 1,
186
+ appId,
187
+ cells: [
188
+ {
189
+ cellId,
190
+ code,
191
+ outputHtml,
192
+ outputMimetype: "text/html",
193
+ reactive: true,
194
+ displayCode: false,
195
+ displayOutput: true,
196
+ },
197
+ ],
198
+ });
199
+ }
200
+
201
+ async function actAndFlush(action: () => void): Promise<void> {
202
+ await act(async () => {
203
+ action();
204
+ await Promise.resolve();
205
+ });
206
+ }
207
+
208
+ function setReactActEnvironment(value: boolean): void {
209
+ (
210
+ globalThis as typeof globalThis & {
211
+ IS_REACT_ACT_ENVIRONMENT: boolean;
212
+ }
213
+ ).IS_REACT_ACT_ENVIRONMENT = value;
214
+ }
@@ -5,7 +5,7 @@ import { isValidElement, type JSX } from "react";
5
5
  import ReactDOM, { type Root } from "react-dom/client";
6
6
  import { ErrorBoundary } from "@/components/editor/boundary/ErrorBoundary";
7
7
  import { TooltipProvider } from "@/components/ui/tooltip";
8
- import { notebookAtom } from "@/core/cells/cells";
8
+ import { cellIdsAtom, notebookAtom } from "@/core/cells/cells";
9
9
  import { OBJECT_ID_ATTR } from "@/core/dom/ui-element-constants";
10
10
  import { UI_ELEMENT_REGISTRY } from "@/core/dom/uiregistry";
11
11
  import { LocaleProvider } from "@/core/i18n/locale-provider";
@@ -16,9 +16,10 @@ import { store } from "../../state/jotai";
16
16
  import {
17
17
  ISLAND_CSS_CLASSES,
18
18
  ISLAND_DATA_ATTRIBUTES,
19
+ ISLAND_SOURCE_CHANGED_EVENT,
19
20
  ISLAND_TAG_NAMES,
20
21
  } from "../constants";
21
- import { extractIslandCodeFromEmbed } from "../parse";
22
+ import { extractIslandCodeFromEmbed, retainIslandSource } from "../parse";
22
23
  import { MarimoOutputWrapper } from "./output-wrapper";
23
24
 
24
25
  /**
@@ -28,7 +29,6 @@ export interface IslandRenderConfig {
28
29
  html: string;
29
30
  codeCallback: () => string;
30
31
  editor: JSX.Element | null;
31
- cellId: CellId | undefined;
32
32
  }
33
33
 
34
34
  /**
@@ -38,7 +38,12 @@ export interface IslandRenderConfig {
38
38
  * functionality like re-running cells and copying code.
39
39
  */
40
40
  export class MarimoIslandElement extends HTMLElement {
41
+ private connectionGeneration = 0;
41
42
  private root?: Root;
43
+ private renderConfig?: IslandRenderConfig;
44
+ private runtimeAppId?: string;
45
+ private runtimeCellId?: CellId;
46
+ private unsubscribeCellIds?: () => void;
42
47
 
43
48
  public static readonly tagName = ISLAND_TAG_NAMES.ISLAND;
44
49
  public static readonly outputTagName = ISLAND_TAG_NAMES.CELL_OUTPUT;
@@ -72,6 +77,9 @@ export class MarimoIslandElement extends HTMLElement {
72
77
  * Returns undefined for non-reactive islands (they have no corresponding cell).
73
78
  */
74
79
  get cellId(): CellId | undefined {
80
+ if (!this.isReactive) {
81
+ return undefined;
82
+ }
75
83
  const cellId = this.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID);
76
84
  if (cellId) {
77
85
  return cellId as CellId;
@@ -94,11 +102,9 @@ export class MarimoIslandElement extends HTMLElement {
94
102
  /**
95
103
  * Looks up a cell ID from the notebook state by index
96
104
  */
97
- private getCellIdFromIndex(idx: number): CellId {
105
+ private getCellIdFromIndex(idx: number): CellId | undefined {
98
106
  const { cellIds } = store.get(notebookAtom);
99
- const cellId = cellIds.inOrderIds.at(idx);
100
- invariant(cellId, `Missing cell ID at index ${idx}`);
101
- return cellId;
107
+ return cellIds.inOrderIds.at(idx);
102
108
  }
103
109
 
104
110
  /**
@@ -110,18 +116,62 @@ export class MarimoIslandElement extends HTMLElement {
110
116
  * synchronously from there causes "unmount during render" warnings.
111
117
  */
112
118
  connectedCallback(): void {
113
- // Capture config synchronously (before children get cleared by createRoot)
114
- const config = this.extractRenderConfig();
119
+ const connectionGeneration = ++this.connectionGeneration;
120
+ this.addEventListener(
121
+ ISLAND_SOURCE_CHANGED_EVENT,
122
+ this.handleSourceChanged,
123
+ );
124
+ // Capture config synchronously (before children get cleared by createRoot).
125
+ // A reconnected element reuses the source captured on its first mount.
126
+ if (this.querySelector(MarimoIslandElement.outputTagName)) {
127
+ this.renderConfig = this.extractRenderConfig();
128
+ }
129
+ invariant(this.renderConfig, "Missing island render source");
130
+ this.runtimeAppId = this.appId;
131
+ this.runtimeCellId = this.hasAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX)
132
+ ? this.cellId
133
+ : undefined;
134
+ this.syncCellIdsSubscription();
115
135
  queueMicrotask(() => {
116
136
  // Guard against disconnect between connectedCallback and microtask
117
- if (!this.isConnected) {
137
+ if (
138
+ !this.isConnected ||
139
+ connectionGeneration !== this.connectionGeneration
140
+ ) {
118
141
  return;
119
142
  }
120
143
  this.root = ReactDOM.createRoot(this);
121
- this.renderIsland(config);
144
+ this.renderIsland();
122
145
  });
123
146
  }
124
147
 
148
+ private handleSourceChanged = (): void => {
149
+ if (this.querySelector(MarimoIslandElement.outputTagName)) {
150
+ this.renderConfig = this.extractRenderConfig();
151
+ this.querySelector(MarimoIslandElement.outputTagName)?.remove();
152
+ this.querySelector(MarimoIslandElement.codeTagName)?.remove();
153
+ }
154
+ this.runtimeCellId =
155
+ this.isReactive && this.runtimeAppId === this.appId
156
+ ? this.cellId
157
+ : undefined;
158
+ this.runtimeAppId = this.appId;
159
+ this.syncCellIdsSubscription();
160
+ this.renderIsland();
161
+ };
162
+
163
+ private syncCellIdsSubscription(): void {
164
+ if (this.isReactive) {
165
+ this.unsubscribeCellIds ??= store.sub(cellIdsAtom, () => {
166
+ this.runtimeCellId = this.cellId;
167
+ this.renderIsland();
168
+ });
169
+ return;
170
+ }
171
+ this.unsubscribeCellIds?.();
172
+ this.unsubscribeCellIds = undefined;
173
+ }
174
+
125
175
  /**
126
176
  * Extracts configuration needed for rendering
127
177
  */
@@ -130,7 +180,7 @@ export class MarimoIslandElement extends HTMLElement {
130
180
  const initialOutput = output.innerHTML;
131
181
  const optionalEditor = this.getOptionalEditor();
132
182
  const code = this.code;
133
- const cellId = this.cellId;
183
+ retainIslandSource(this, { code, output: initialOutput });
134
184
 
135
185
  // Read objectId directly from the DOM before createRoot clears children.
136
186
  // optionalEditor is a <RenderHTML> wrapper, so its .props don't carry the
@@ -152,15 +202,19 @@ export class MarimoIslandElement extends HTMLElement {
152
202
  html: initialOutput,
153
203
  codeCallback,
154
204
  editor: optionalEditor,
155
- cellId,
156
205
  };
157
206
  }
158
207
 
159
208
  /**
160
209
  * Renders the island with React
161
210
  */
162
- private renderIsland(config: IslandRenderConfig): void {
163
- const { html, codeCallback, editor, cellId } = config;
211
+ private renderIsland(): void {
212
+ const config = this.renderConfig;
213
+ if (!config) {
214
+ return;
215
+ }
216
+ const { html, codeCallback, editor } = config;
217
+ const cellId = this.runtimeCellId;
164
218
  const alwaysShowRun = !!editor;
165
219
  const trimmedHtml = html.trim();
166
220
  const isEmpty = trimmedHtml === "<span></span>" || trimmedHtml === "";
@@ -168,6 +222,7 @@ export class MarimoIslandElement extends HTMLElement {
168
222
 
169
223
  // Non-reactive islands have no cell in the kernel — just render static HTML
170
224
  if (!cellId) {
225
+ this.removeAttribute("data-status");
171
226
  this.root?.render(
172
227
  <ErrorBoundary>
173
228
  <Provider store={store}>
@@ -242,6 +297,12 @@ export class MarimoIslandElement extends HTMLElement {
242
297
  * Cleanup when element is removed from DOM
243
298
  */
244
299
  disconnectedCallback(): void {
300
+ this.removeEventListener(
301
+ ISLAND_SOURCE_CHANGED_EVENT,
302
+ this.handleSourceChanged,
303
+ );
304
+ this.unsubscribeCellIds?.();
305
+ this.unsubscribeCellIds = undefined;
245
306
  const root = this.root;
246
307
  this.root = undefined;
247
308
  // Defer unmount to avoid "unmount during render" race
@@ -11,6 +11,7 @@ export const ISLAND_TAG_NAMES = {
11
11
  } as const;
12
12
 
13
13
  export const ISLANDS_JSON_SCRIPT_TYPE = "application/vnd.marimo.islands+json";
14
+ export const ISLAND_SOURCE_CHANGED_EVENT = "marimo-island-source-changed";
14
15
 
15
16
  /**
16
17
  * Data attributes for islands
@@ -14,12 +14,78 @@ import "iconify-icon";
14
14
  import { Logger } from "@/utils/Logger";
15
15
  import { initializeIslands } from "./bootstrap";
16
16
  import { getGlobalBridge } from "./bridge";
17
+ import { ISLAND_CSS_CLASSES, ISLAND_TAG_NAMES } from "./constants";
18
+ import { parseMarimoIslandApps } from "./parse";
19
+
20
+ const bridge = getGlobalBridge();
21
+ let bootstrapPromise: Promise<void> | undefined;
22
+
23
+ /**
24
+ * Public entry point for the islands bundle.
25
+ *
26
+ * Islands auto-initialize on load. Hosts that keep the browser realm alive
27
+ * across client-side navigation (retaining this worker and its Pyodide
28
+ * environment) can drive page transitions with:
29
+ *
30
+ * ```ts
31
+ * if (canReplaceApp()) {
32
+ * await stopApp();
33
+ * updatePage();
34
+ * await initialize();
35
+ * }
36
+ * ```
37
+ *
38
+ * The retained lifecycle (`canReplaceApp`/`stopApp`) only applies to pages
39
+ * whose islands resolve to a single app; multi-app pages are not replaceable.
40
+ */
41
+
42
+ /**
43
+ * Returns whether the current document can replace its app in this worker.
44
+ *
45
+ * True only when the document contains exactly one replaceable app. This is a
46
+ * read-only probe: it does not materialize island payloads or mutate the DOM.
47
+ */
48
+ export function canReplaceApp(): boolean {
49
+ if (!document.querySelector(ISLAND_TAG_NAMES.ISLAND)) {
50
+ return false;
51
+ }
52
+ return parseMarimoIslandApps(document, { materialize: false }).length === 1;
53
+ }
54
+
55
+ /**
56
+ * Mounts marimo custom elements and starts the apps in the current document.
57
+ *
58
+ * Safe to call repeatedly, including after client-side navigation: the worker
59
+ * bootstrap is memoized (and cleared if it fails, so a later call retries),
60
+ * while app discovery re-runs on every call to pick up the current DOM.
61
+ */
62
+ export async function initialize(): Promise<void> {
63
+ const islands = document.querySelectorAll<HTMLElement>(
64
+ ISLAND_TAG_NAMES.ISLAND,
65
+ );
66
+ if (islands.length === 0) {
67
+ return;
68
+ }
69
+ for (const island of islands) {
70
+ island.classList.add(ISLAND_CSS_CLASSES.NAMESPACE);
71
+ }
72
+ bootstrapPromise ??= initializeIslands({ bridge }).catch((error: unknown) => {
73
+ bootstrapPromise = undefined;
74
+ throw error;
75
+ });
76
+ await bootstrapPromise;
77
+ await bridge.initializeApps();
78
+ }
17
79
 
18
80
  /**
19
- * Main entry point for the js bundle for embedded marimo apps.
81
+ * Stops the matching active app session.
82
+ *
83
+ * With no `appId`, stops the current retained single-app session; with an
84
+ * `appId`, stops it only if it matches the active app. No-op when there is no
85
+ * retained session to stop.
20
86
  */
21
- export async function initialize() {
22
- await initializeIslands({ bridge: getGlobalBridge() });
87
+ export async function stopApp(appId?: string): Promise<void> {
88
+ await bridge.stopSession(appId);
23
89
  }
24
90
 
25
91
  // Auto-initialize on module load
@@ -2,6 +2,7 @@
2
2
 
3
3
  import {
4
4
  ISLAND_DATA_ATTRIBUTES,
5
+ ISLAND_SOURCE_CHANGED_EVENT,
5
6
  ISLAND_TAG_NAMES,
6
7
  ISLANDS_JSON_SCRIPT_TYPE,
7
8
  } from "@/core/islands/constants";
@@ -74,12 +75,15 @@ interface MarimoIslandPayloadCell {
74
75
  displayOutput: boolean;
75
76
  }
76
77
 
78
+ const retainedPayloadCellIds = new WeakMap<HTMLElement, string>();
79
+
77
80
  /**
78
81
  * Parses marimo island apps from the DOM
79
82
  * @param root - Root element to search within (defaults to document)
80
83
  */
81
84
  export function parseMarimoIslandApps(
82
85
  root: Document | Element = document,
86
+ options: { materialize?: boolean } = {},
83
87
  ): MarimoIslandApp[] {
84
88
  const embeds = [
85
89
  ...root.querySelectorAll<HTMLElement>(ISLAND_TAG_NAMES.ISLAND),
@@ -90,11 +94,12 @@ export function parseMarimoIslandApps(
90
94
  return [];
91
95
  }
92
96
 
97
+ const materialize = options.materialize ?? true;
93
98
  if (payloads.length > 0) {
94
- return parsePayloadBackedApps(embeds, payloads);
99
+ return parsePayloadBackedApps({ embeds, materialize, payloads });
95
100
  }
96
101
 
97
- return parseIslandElementsIntoApps(embeds);
102
+ return parseIslandElementsIntoApps(embeds, materialize);
98
103
  }
99
104
 
100
105
  /**
@@ -103,6 +108,7 @@ export function parseMarimoIslandApps(
103
108
  */
104
109
  export function parseIslandElementsIntoApps(
105
110
  embeds: HTMLElement[],
111
+ materialize = true,
106
112
  ): MarimoIslandApp[] {
107
113
  const apps = new Map<string, MarimoIslandApp>();
108
114
 
@@ -140,16 +146,24 @@ export function parseIslandElementsIntoApps(
140
146
  });
141
147
 
142
148
  // Add data-cell-idx attribute to the island element
143
- embed.setAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX, idx.toString());
149
+ if (materialize) {
150
+ embed.setAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX, idx.toString());
151
+ embed.dispatchEvent(new Event(ISLAND_SOURCE_CHANGED_EVENT));
152
+ }
144
153
  }
145
154
 
146
155
  return [...apps.values()];
147
156
  }
148
157
 
149
- function parsePayloadBackedApps(
150
- embeds: HTMLElement[],
151
- payloads: MarimoIslandPayload[],
152
- ): MarimoIslandApp[] {
158
+ function parsePayloadBackedApps({
159
+ embeds,
160
+ materialize,
161
+ payloads,
162
+ }: {
163
+ embeds: HTMLElement[];
164
+ materialize: boolean;
165
+ payloads: MarimoIslandPayload[];
166
+ }): MarimoIslandApp[] {
153
167
  const apps = new Map<string, MarimoIslandApp>();
154
168
  const matchedPayloadCells = new Map<MarimoIslandPayloadCell, HTMLElement>();
155
169
  const consumedEmbeds = new Set<HTMLElement>();
@@ -169,7 +183,9 @@ function parsePayloadBackedApps(
169
183
  }
170
184
  consumedEmbeds.add(embed);
171
185
  matchedPayloadCells.set(cell, embed);
172
- materializeIslandPayload(embed, cell);
186
+ if (materialize) {
187
+ materializeIslandPayload(embed, cell);
188
+ }
173
189
  hasMatchedIsland = true;
174
190
  }
175
191
  // Only payloads matched to island anchors can start runtime apps.
@@ -215,7 +231,7 @@ function parsePayloadBackedApps(
215
231
  appCell.disabled = true;
216
232
  }
217
233
  app.cells.push(appCell);
218
- if (cell.reactive) {
234
+ if (materialize && cell.reactive) {
219
235
  embed?.setAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX, idx.toString());
220
236
  }
221
237
  }
@@ -223,12 +239,15 @@ function parsePayloadBackedApps(
223
239
 
224
240
  // A supported payload is the runtime source for its app. Extra same-app DOM
225
241
  // islands are disconnected from runtime binding.
226
- for (const embed of embeds) {
227
- const appId = embed.getAttribute(ISLAND_DATA_ATTRIBUTES.APP_ID);
228
- if (appId && payloadAppIds.has(appId) && !consumedEmbeds.has(embed)) {
229
- embed.removeAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID);
230
- embed.removeAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX);
231
- embed.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "false");
242
+ if (materialize) {
243
+ for (const embed of embeds) {
244
+ const appId = embed.getAttribute(ISLAND_DATA_ATTRIBUTES.APP_ID);
245
+ if (appId && payloadAppIds.has(appId) && !consumedEmbeds.has(embed)) {
246
+ embed.removeAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID);
247
+ embed.removeAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX);
248
+ embed.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "false");
249
+ consumedEmbeds.add(embed);
250
+ }
232
251
  }
233
252
  }
234
253
 
@@ -237,7 +256,16 @@ function parsePayloadBackedApps(
237
256
  return !appId || !payloadAppIds.has(appId);
238
257
  });
239
258
 
240
- return [...apps.values(), ...parseIslandElementsIntoApps(domOnlyEmbeds)];
259
+ if (materialize) {
260
+ for (const embed of consumedEmbeds) {
261
+ embed.dispatchEvent(new Event(ISLAND_SOURCE_CHANGED_EVENT));
262
+ }
263
+ }
264
+
265
+ return [
266
+ ...apps.values(),
267
+ ...parseIslandElementsIntoApps(domOnlyEmbeds, materialize),
268
+ ];
241
269
  }
242
270
 
243
271
  function findMatchingIsland({
@@ -257,7 +285,8 @@ function findMatchingIsland({
257
285
  }
258
286
  return (
259
287
  embed.getAttribute(ISLAND_DATA_ATTRIBUTES.APP_ID) === appId &&
260
- embed.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID) === cell.cellId
288
+ (embed.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID) ??
289
+ retainedPayloadCellIds.get(embed)) === cell.cellId
261
290
  );
262
291
  });
263
292
  }
@@ -266,6 +295,7 @@ function materializeIslandPayload(
266
295
  embed: HTMLElement,
267
296
  cell: MarimoIslandPayloadCell,
268
297
  ): void {
298
+ retainedPayloadCellIds.set(embed, cell.cellId);
269
299
  embed.setAttribute(
270
300
  ISLAND_DATA_ATTRIBUTES.REACTIVE,
271
301
  JSON.stringify(cell.reactive),
@@ -304,6 +334,22 @@ function ensureIslandChild(embed: HTMLElement, tagName: string): HTMLElement {
304
334
  * @param embed - The island HTML element
305
335
  * @returns Cell data or null if invalid
306
336
  */
337
+ const retainedIslandSources = new WeakMap<
338
+ HTMLElement,
339
+ { output: string; code: string }
340
+ >();
341
+
342
+ export function retainIslandSource(
343
+ embed: HTMLElement,
344
+ source: { output: string; code: string },
345
+ ): void {
346
+ if (source.code) {
347
+ retainedIslandSources.set(embed, source);
348
+ } else {
349
+ retainedIslandSources.delete(embed);
350
+ }
351
+ }
352
+
307
353
  export function parseIslandElement(
308
354
  embed: HTMLElement,
309
355
  ): { output: string; code: string } | null {
@@ -312,14 +358,15 @@ export function parseIslandElement(
312
358
  );
313
359
  const code = extractIslandCodeFromEmbed(embed);
314
360
 
315
- if (!cellOutput || !code) {
316
- return null;
361
+ if (cellOutput && code) {
362
+ return {
363
+ output: cellOutput.innerHTML,
364
+ code: code,
365
+ };
317
366
  }
318
367
 
319
- return {
320
- output: cellOutput.innerHTML,
321
- code: code,
322
- };
368
+ const retained = retainedIslandSources.get(embed);
369
+ return retained?.code ? retained : null;
323
370
  }
324
371
 
325
372
  export function createMarimoFile(app: {