@marimo-team/islands 0.17.0 → 0.17.2

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 (616) hide show
  1. package/dist/{fullscreen-blsKUrtN.js → Combination-De9yoNY5.js} +132 -69
  2. package/dist/{ConnectedDataExplorerComponent-DJEUH6Bb.js → ConnectedDataExplorerComponent-DuvpJOKp.js} +45 -44
  3. package/dist/{ImageComparisonComponent-D4Tv9QzJ.js → ImageComparisonComponent--etUl2pp.js} +2 -2
  4. package/dist/{_baseIsEqual-CN4oFUZ4.js → _baseIsEqual-BFlyFUxC.js} +1 -1
  5. package/dist/{_basePickBy-CzSvE_-f.js → _basePickBy-gCCvtjgp.js} +3 -3
  6. package/dist/{_baseProperty-DbbUiyUD.js → _baseProperty-BuqBC0Ie.js} +5 -5
  7. package/dist/{_baseUniq-DwoC-LVO.js → _baseUniq-CKN9mEDq.js} +5 -5
  8. package/dist/any-language-editor-Du2Q_6IK.js +156 -0
  9. package/dist/apl-CUm2DGqh.js +4 -0
  10. package/dist/{arc-B1iVbHTB.js → arc-C_O2hc-b.js} +2 -2
  11. package/dist/architecture-O4VJ6CD3-PFw3eFBY.js +21 -0
  12. package/dist/{architectureDiagram-W76B3OCA-CoBORy6u.js → architectureDiagram-W76B3OCA-CrK99pJi.js} +38 -37
  13. package/dist/asciiarmor-lqJ78U01.js +4 -0
  14. package/dist/asn1-CjwpSTlW.js +4 -0
  15. package/dist/assets/__vite-browser-external-DHoMWs4M.js +1 -0
  16. package/dist/assets/{worker-vPn7gxWj.js → worker-B6tH8gPO.js} +3 -3
  17. package/dist/{blockDiagram-QIGZ2CNN-0yzoLIar.js → blockDiagram-QIGZ2CNN-BJOEyO6w.js} +47 -46
  18. package/dist/brainfuck-ClvDI1dq.js +4 -0
  19. package/dist/{button-DcnBVpVa.js → button-ADXOb_gX.js} +27 -27
  20. package/dist/{c4Diagram-FPNF74CW-CKsIA_DD.js → c4Diagram-FPNF74CW-7Pz_X9wF.js} +12 -11
  21. package/dist/{channel-3LVvQZcD.js → channel-X-wRUxX6.js} +1 -1
  22. package/dist/{check-D7ifz5op.js → check-COlaG7Ss.js} +1 -1
  23. package/dist/{chunk-3AY6CYHV-B2C-aVc3.js → chunk-3AY6CYHV-BQH2fFpA.js} +10 -10
  24. package/dist/{chunk-4BX2VUAB-DEd4VI9L.js → chunk-4BX2VUAB-D-QtDCKM.js} +1 -1
  25. package/dist/{chunk-4KMFLZZN-DnvP3O4K.js → chunk-4KMFLZZN-BirZvvJS.js} +13 -13
  26. package/dist/{chunk-55IACEB6-BcCzwOOl.js → chunk-55IACEB6-DjtPYZKs.js} +1 -1
  27. package/dist/{chunk-6OXUPJBA-eNAAfJ3Q.js → chunk-6OXUPJBA-CTnnqlzw.js} +7 -7
  28. package/dist/{chunk-7GE3RBXV-CSAeQvLz.js → chunk-7GE3RBXV-CT47hCrL.js} +1 -1
  29. package/dist/{chunk-ABZYJK2D-CZcb_1iM.js → chunk-ABZYJK2D-B6ZsU6SR.js} +484 -1039
  30. package/dist/{chunk-BN7GFLIU-pBc5O5Rh.js → chunk-BN7GFLIU-DYWEsrG4.js} +1 -1
  31. package/dist/{chunk-CVBHYZKI-CivHZg9P.js → chunk-CVBHYZKI-BuzDGXz0.js} +1 -1
  32. package/dist/{chunk-CXMOBAN2-Dd0E6qb0.js → chunk-CXMOBAN2-Bas2S5w1.js} +6 -6
  33. package/dist/{chunk-EXTU4WIE-GQ2ZWfJo.js → chunk-EXTU4WIE-DXwNSukz.js} +2 -2
  34. package/dist/{chunk-FMBD7UC4-C6YcisV6.js → chunk-FMBD7UC4-CYKEpuPr.js} +1 -1
  35. package/dist/{chunk-JA3XYJ7Z-DYeQaT57.js → chunk-JA3XYJ7Z-DcxfkcDC.js} +4 -4
  36. package/dist/{chunk-JEIROHC2-B-EZMP4V.js → chunk-JEIROHC2-C01ZIcIG.js} +1 -1
  37. package/dist/{chunk-K7UQS3LO-DENzlS-M.js → chunk-K7UQS3LO-CmbT97MV.js} +7 -7
  38. package/dist/{chunk-KMC2YHZD-SckhHdEh.js → chunk-KMC2YHZD-D64m-1E1.js} +1 -1
  39. package/dist/{chunk-QN33PNHL-Cjq5b604.js → chunk-QN33PNHL-DjB0j8Dr.js} +2 -2
  40. package/dist/{chunk-QYVHNE3D-CNUuivie.js → chunk-QYVHNE3D-VA4W4oxG.js} +2 -2
  41. package/dist/{chunk-QZHKN3VN-DugEU_bA.js → chunk-QZHKN3VN-KT0fl3Em.js} +1 -1
  42. package/dist/{chunk-S3R3BYOJ-itCT6Vif.js → chunk-S3R3BYOJ-C5zmcMvn.js} +6 -6
  43. package/dist/{chunk-T44TD3VJ-BLdfTX8J.js → chunk-T44TD3VJ-BMOgu-Hk.js} +1 -1
  44. package/dist/{chunk-TVAH2DTR-BOnwF9d8.js → chunk-TVAH2DTR-eKm8SKnH.js} +6 -6
  45. package/dist/{chunk-TZMSLE5B-DGs66AlL.js → chunk-TZMSLE5B-CQxFRiI2.js} +3 -3
  46. package/dist/{chunk-WFRQ32O7-CPsipkmJ.js → chunk-WFRQ32O7-Dg51o277.js} +1 -1
  47. package/dist/{chunk-WFWHJNB7-Cmed18Pk.js → chunk-WFWHJNB7-DVLO98ge.js} +1 -1
  48. package/dist/{chunk-XRWGC2XP-DH5GDaY8.js → chunk-XRWGC2XP-UNFKdWQh.js} +1 -1
  49. package/dist/{chunk-ZPAFE4SF-DPDwaqZm.js → chunk-ZPAFE4SF-DbCSwfLK.js} +1 -1
  50. package/dist/classDiagram-KNZD7YFC-HUFFxNdk.js +40 -0
  51. package/dist/classDiagram-v2-RKCZMP56-Dw7Acmuf.js +40 -0
  52. package/dist/{click-outside-container-CL_FkgGY.js → click-outside-container-2BH589Bq.js} +2 -2
  53. package/dist/{clike-DYfRWWXk.js → clike-CytFO-kN.js} +1 -1
  54. package/dist/clojure-8GefCgPe.js +4 -0
  55. package/dist/{clone-Msbhmn2a.js → clone-CCgVUJ6x.js} +1 -1
  56. package/dist/cmake-yAhT9H0F.js +4 -0
  57. package/dist/cobol-BmltueOY.js +4 -0
  58. package/dist/coffeescript-C7KEQBcH.js +4 -0
  59. package/dist/commonlisp-CNbiJRU-.js +4 -0
  60. package/dist/{constants-BCOEQoEQ.js → constants-BaCMVd12.js} +3 -3
  61. package/dist/{copy-BkZ8PkBM.js → copy-GNcK40wy.js} +2 -2
  62. package/dist/{cose-bilkent-S5V4N54A-BZnbwyVD.js → cose-bilkent-S5V4N54A-BnvuJG6Y.js} +3 -3
  63. package/dist/crystal-OdjZZ8bc.js +4 -0
  64. package/dist/css-DhTxMmL_.js +5 -0
  65. package/dist/cypher-CgN8E3YI.js +4 -0
  66. package/dist/d-g41sJcBC.js +4 -0
  67. package/dist/{dagre-5GWH7T2D-BGaiSZZO.js → dagre-5GWH7T2D-rn7tZYaQ.js} +37 -36
  68. package/dist/{dagre-pyfDIOWJ.js → dagre-Bghq6VKO.js} +13 -13
  69. package/dist/{data-grid-overlay-editor-867aBz0Y.js → data-grid-overlay-editor-B4_Caieu.js} +4 -4
  70. package/dist/{diagram-N5W7TBWH-CzLE0jZB.js → diagram-N5W7TBWH-lbF94o-g.js} +41 -40
  71. package/dist/{diagram-QEK2KX5R-AGS60xEZ.js → diagram-QEK2KX5R-CKBhSzsO.js} +35 -34
  72. package/dist/{diagram-S2PKOQOG-BxRoG6yW.js → diagram-S2PKOQOG-161_1f53.js} +35 -34
  73. package/dist/diff-ViRYYhhg.js +4 -0
  74. package/dist/{dist-PGgOcwbF.js → dist-28HYzERB.js} +2 -2
  75. package/dist/{dist-CfQHSIQC.js → dist-4dtbqf8A.js} +3 -3
  76. package/dist/{dist-CYhQCVru.js → dist-71jYYbWP.js} +2 -2
  77. package/dist/{dist-Cacac5HV.js → dist-B8Pbw5ln.js} +2 -2
  78. package/dist/{dist-z_iuDES7.js → dist-BAqp4Vtl.js} +1 -1
  79. package/dist/{dist-RwqAqkpG.js → dist-BBhmkni2.js} +1 -1
  80. package/dist/{dist-DMxl6Qbu.js → dist-BNRdMfJH.js} +2 -2
  81. package/dist/{dist-Doiq_KIP.js → dist-BSyYM1Gi.js} +6 -6
  82. package/dist/{dist-NUdHX0XE.js → dist-BYHiiJB-.js} +2 -2
  83. package/dist/{dist-B0YD1aXi.js → dist-B_wjJqqS.js} +2 -2
  84. package/dist/{dist-DBhEu3-F.js → dist-BaPjLM6s.js} +1 -1
  85. package/dist/dist-BfJO8Bm9.js +12 -0
  86. package/dist/{dist-BFkr6kAQ.js → dist-BqdQPWpQ.js} +2 -2
  87. package/dist/{dist-DlHkZUnY.js → dist-C2IEc8og.js} +5 -5
  88. package/dist/{dist-DS6nuHYK.js → dist-C9-uHBqC.js} +1 -1
  89. package/dist/{dist-B1Dv8Sdk.js → dist-CJb8EiFO.js} +3 -3
  90. package/dist/dist-CLuF3AtO.js +6 -0
  91. package/dist/{dist-CId4IPXu.js → dist-CNAkUyxv.js} +1 -1
  92. package/dist/{dist-RdxOJbBw.js → dist-CNvMOZu9.js} +2 -2
  93. package/dist/{dist-C7zhQ7K0.js → dist-CPNnKuPh.js} +1 -1
  94. package/dist/{dist-ivwkJchV.js → dist-CTIyD_KU.js} +3 -3
  95. package/dist/dist-CU04U4NL.js +10 -0
  96. package/dist/{dist-D-3fICwh.js → dist-CWh5ZwcC.js} +2 -2
  97. package/dist/{dist-d5NxvX2s.js → dist-CWqB4bg8.js} +3 -3
  98. package/dist/{dist-biZ846D9.js → dist-CtOeHDJp.js} +5 -5
  99. package/dist/{dist-BL2DSY0P.js → dist-Cw0F6l-7.js} +1 -1
  100. package/dist/{dist-wHVprCkn.js → dist-CwZcC4om.js} +1 -1
  101. package/dist/dist-DNUT6b47.js +6 -0
  102. package/dist/{dist-CZq5-ZyD.js → dist-Da046MhT.js} +1 -1
  103. package/dist/{dist-reo2kYlN.js → dist-DaTVdKJa.js} +2 -2
  104. package/dist/dist-DbAb2sY7.js +6 -0
  105. package/dist/dist-DiDFQ2Rk.js +6 -0
  106. package/dist/{dist-BpzZrRd6.js → dist-DlK420ke.js} +1 -1
  107. package/dist/{dist-CvyfRaIr.js → dist-Drf3cyIW.js} +3 -3
  108. package/dist/{dist-2Ne-33Xy.js → dist-DxESp2-T.js} +3 -3
  109. package/dist/{dist-CkvGMBAS.js → dist-DzJem5xc.js} +1 -1
  110. package/dist/{dist-y8uoXYaE.js → dist-O0zVziwn.js} +3 -3
  111. package/dist/dist-SNAyAOJ-.js +6 -0
  112. package/dist/{dist-BhVFggab.js → dist-_4cudra1.js} +3 -3
  113. package/dist/dist-cbW5xJNV.js +6 -0
  114. package/dist/dist-h8eGLSbK.js +10 -0
  115. package/dist/{dist-CBhnQKQ4.js → dist-xLN9qCAp.js} +3 -3
  116. package/dist/{dockerfile-sZMPcXVY.js → dockerfile-Cmlcqk35.js} +1 -1
  117. package/dist/dtd-RplB6hDg.js +4 -0
  118. package/dist/dylan-BX8KJufP.js +4 -0
  119. package/dist/ecl-CWtLaNMH.js +4 -0
  120. package/dist/eiffel-C-mlZPMn.js +4 -0
  121. package/dist/elm-CWp06vcb.js +4 -0
  122. package/dist/{erDiagram-AWTI2OKA-CTxzb-U8.js → erDiagram-AWTI2OKA-BU7Qig7n.js} +30 -29
  123. package/dist/erlang-pfp22AZM.js +4 -0
  124. package/dist/error-banner-BAWlXn49.js +1012 -0
  125. package/dist/{esm-CAWW9sum.js → esm-AtKNNGYO.js} +1 -1
  126. package/dist/esm-B2pocBPL.js +26 -0
  127. package/dist/{esm-BdiY4QsX.js → esm-Oo8OvZ6m.js} +110 -110
  128. package/dist/{esm-YY5zh7KV.js → esm-YVnxJqkD.js} +20 -20
  129. package/dist/{factor-CRFTmP_a.js → factor-BZnBK3CG.js} +1 -1
  130. package/dist/factor-CEn53jua.js +5 -0
  131. package/dist/{flowDiagram-PVAE7QVJ-Dck2hiJe.js → flowDiagram-PVAE7QVJ-JKJebWeY.js} +39 -38
  132. package/dist/{formats-BnqXUb1V.js → formats-DOEuF6TR.js} +8 -8
  133. package/dist/forth-CL8vu_y8.js +4 -0
  134. package/dist/fortran-DsmXkYtE.js +4 -0
  135. package/dist/{ganttDiagram-OWAHRB6G-AWzfzpup.js → ganttDiagram-OWAHRB6G-BvWRfg05.js} +17 -16
  136. package/dist/gas-mYt9Rtlx.js +4 -0
  137. package/dist/gherkin-DHNCKBNj.js +4 -0
  138. package/dist/gitGraph-ZV4HHKMB-Cpd6k0O8.js +21 -0
  139. package/dist/{gitGraphDiagram-NY62KEGX-GyNboWSV.js → gitGraphDiagram-NY62KEGX-VEJJBf5L.js} +35 -34
  140. package/dist/{glide-data-editor-DHuN8kQ8.js → glide-data-editor-Bne10icG.js} +87 -85
  141. package/dist/{graphlib-hb3zmtVD.js → graphlib-DRS8CrjA.js} +5 -5
  142. package/dist/groovy-DzRtOS5a.js +4 -0
  143. package/dist/haskell-Bl9iT_Mp.js +4 -0
  144. package/dist/haxe-DqA0ED6k.js +5 -0
  145. package/dist/{hotkeys-Ct2T3e9O.js → hotkeys-DVxFjl2s.js} +12 -0
  146. package/dist/idl-WU2hil4i.js +4 -0
  147. package/dist/info-63CPKGFF-CG-xzUJo.js +21 -0
  148. package/dist/infoDiagram-STP46IZ2-zoRBGoup.js +45 -0
  149. package/dist/invariant-D3JoRb4I.js +6 -0
  150. package/dist/{isEmpty--odfYjh1.js → isEmpty-Do_v2sls.js} +2 -2
  151. package/dist/{isSymbol-Cb1f2HgO.js → isSymbol-CtkA8Y0a.js} +1 -1
  152. package/dist/javascript-QY2BGJeV.js +5 -0
  153. package/dist/jinja2-Czleq7Sk.js +4 -0
  154. package/dist/{journeyDiagram-BIP6EPQ6-TmXYCUbT.js → journeyDiagram-BIP6EPQ6-CsgEQgxh.js} +10 -9
  155. package/dist/julia-Dru3Qi0y.js +4 -0
  156. package/dist/{kanban-definition-6OIFK2YF-B6ozleHo.js → kanban-definition-6OIFK2YF-Bi8Ete2P.js} +42 -41
  157. package/dist/{katex-mPzRsXEy.js → katex-C-g3rKKt.js} +1 -1
  158. package/dist/{label-VVRKZmrP.js → label-BiVIU_wb.js} +245 -243
  159. package/dist/{line-C6-zz71o.js → line-B7-GoF1m.js} +3 -3
  160. package/dist/{linear-iebAbJVD.js → linear-DeGGALuc.js} +4 -4
  161. package/dist/livescript-Dxqi_HLT.js +4 -0
  162. package/dist/{loader-CM0VALo9.js → loader-BBqwtZWj.js} +3 -3
  163. package/dist/lua-ByH1cUQZ.js +4 -0
  164. package/dist/main.js +11785 -11529
  165. package/dist/mathematica-CWJIFuES.js +4 -0
  166. package/dist/mbox-qhPIGaUI.js +4 -0
  167. package/dist/{memoize-DYoRBSLn.js → memoize-D7eDkf3R.js} +1 -1
  168. package/dist/{merge-BjuR6j_w.js → merge-C_6cGM6o.js} +1 -1
  169. package/dist/{mermaid-YPPMBmhk.js → mermaid-BmtvsZ2m.js} +323 -321
  170. package/dist/{mermaid-parser.core-BLkyTSZj.js → mermaid-parser.core-geyG_6o0.js} +8 -8
  171. package/dist/{mhchem-Dw7wvXtr.js → mhchem-OhAaJ0fA.js} +1 -1
  172. package/dist/{min-B_i2ahn4.js → min-Dwa_NbP6.js} +7 -7
  173. package/dist/{mindmap-definition-Q6HEUPPD-F6-JnXwq.js → mindmap-definition-Q6HEUPPD-B-wmX1oG.js} +29 -28
  174. package/dist/mirc-yYcXhXBY.js +4 -0
  175. package/dist/mllike-BfT_Nl9x.js +6 -0
  176. package/dist/modelica-lVDtz1Rm.js +4 -0
  177. package/dist/mscgen-DvwdD1QJ.js +6 -0
  178. package/dist/mumps-BiY3GwKd.js +4 -0
  179. package/dist/{now-CwRqw0nS.js → now-DumxsrcX.js} +1 -1
  180. package/dist/{nsis-BWJEeUyS.js → nsis-D4bLR_Y1.js} +1 -1
  181. package/dist/nsis-Dk18Sq_4.js +5 -0
  182. package/dist/ntriples-Cj-8VqKF.js +4 -0
  183. package/dist/{number-overlay-editor-CeyruAX4.js → number-overlay-editor-D6r-48ka.js} +2 -2
  184. package/dist/octave-BgFAaYjU.js +4 -0
  185. package/dist/once-3OSMKEsL.js +74 -0
  186. package/dist/{ordinal-BXk5xAj2.js → ordinal-DpEbSVPc.js} +1 -1
  187. package/dist/oz-IsEG1I1m.js +4 -0
  188. package/dist/packet-HUATNLJX-Cafuo3IG.js +21 -0
  189. package/dist/pascal-BVf7FtIE.js +4 -0
  190. package/dist/perl-BM0-y4mZ.js +4 -0
  191. package/dist/pie-WTHONI2E-BE0pHBwB.js +21 -0
  192. package/dist/{pieDiagram-ADFJNKIX-C5dSQVCn.js → pieDiagram-ADFJNKIX-C3GvPNUL.js} +40 -39
  193. package/dist/pig-CLBjzQmc.js +4 -0
  194. package/dist/powershell-B_qvE33J.js +4 -0
  195. package/dist/{precisionRound-DbP73hkf.js → precisionRound-7YYJq2rW.js} +1 -1
  196. package/dist/properties-CUTpsH2y.js +4 -0
  197. package/dist/protobuf-DqCP8a-0.js +4 -0
  198. package/dist/pug-BvexKkw4.js +5 -0
  199. package/dist/{pug-PJh82u1M.js → pug-Dv3gE36O.js} +1 -1
  200. package/dist/puppet-CoIi0R3f.js +4 -0
  201. package/dist/purify.es-CrfFzTyi.js +536 -0
  202. package/dist/python-C-11-YMh.js +5 -0
  203. package/dist/q-CCVgEip7.js +4 -0
  204. package/dist/{quadrantDiagram-LMRXKWRM-DlahxNiy.js → quadrantDiagram-LMRXKWRM-DPXwGNVa.js} +8 -7
  205. package/dist/r-CIdR0Sfs.js +4 -0
  206. package/dist/radar-NJJJXTRR-0adgjw0u.js +21 -0
  207. package/dist/{range-DxfkexCE.js → range-CIbLpsrs.js} +3 -3
  208. package/dist/{react-plotly-D_IAfR8f.js → react-plotly-DYyvxcRD.js} +1 -1
  209. package/dist/{requirementDiagram-4UW4RH46-DTkinyvU.js → requirementDiagram-4UW4RH46-Cs3Hqnm0.js} +24 -23
  210. package/dist/rpm-Dwvm039g.js +5 -0
  211. package/dist/ruby-DpTnO5gb.js +4 -0
  212. package/dist/{sankeyDiagram-GR3RE2ED-CsLnEnnq.js → sankeyDiagram-GR3RE2ED-Be1d_Xf7.js} +7 -6
  213. package/dist/sas-CK9boxgv.js +4 -0
  214. package/dist/scheme-Y1aYL-Qq.js +4 -0
  215. package/dist/{sequenceDiagram-C3RYC4MD-BdEOR6SC.js → sequenceDiagram-C3RYC4MD-lbtovKTa.js} +14 -13
  216. package/dist/shell-D3eXGsHd.js +4 -0
  217. package/dist/sieve-BdwSFdWJ.js +4 -0
  218. package/dist/{slides-component-2bbal1YJ.js → slides-component-BoeQU7-s.js} +999 -998
  219. package/dist/smalltalk-BTYJquCm.js +4 -0
  220. package/dist/sparql-CYF0g4Cc.js +4 -0
  221. package/dist/{src-DZkaBUmt.js → src-BTqT1mA1.js} +1 -1
  222. package/dist/{stateDiagram-KXAO66HF-DQLH2jhP.js → stateDiagram-KXAO66HF-BmbR-Rol.js} +40 -39
  223. package/dist/stateDiagram-v2-UMBNRL4Z-DdJ7qVWc.js +39 -0
  224. package/dist/{step-IHYrujTc.js → step-2RJrMSSG.js} +1 -1
  225. package/dist/stex-CyWhoWHt.js +5 -0
  226. package/dist/style.css +1 -1
  227. package/dist/stylus-BBiKaI2h.js +4 -0
  228. package/dist/swift-COb15qFR.js +4 -0
  229. package/dist/tcl-Jik1LXu9.js +4 -0
  230. package/dist/textile-BFHPD3wr.js +4 -0
  231. package/dist/{time-CFkXkVrt.js → time-BB30r1tK.js} +4 -4
  232. package/dist/{timeline-definition-XQNQX7LJ-bToVq14i.js → timeline-definition-XQNQX7LJ-1mv5caPW.js} +16 -15
  233. package/dist/{toNumber-EFF1Z9T1.js → toNumber-D3Ystr3y.js} +2 -2
  234. package/dist/{toString-C2mCkasT.js → toString-CbuxCRDG.js} +2 -2
  235. package/dist/toml-Brp9fBXs.js +4 -0
  236. package/dist/treemap-75Q7IDZK-CyBT8_Wh.js +21 -0
  237. package/dist/troff-CcZRW4vg.js +4 -0
  238. package/dist/ttcn-Bz_6ifRd.js +4 -0
  239. package/dist/ttcn-cfg-v-yi2rKc.js +4 -0
  240. package/dist/turtle-CDOsZYhB.js +4 -0
  241. package/dist/{types-CRXV0KD5.js → types-BPohCsA7.js} +141 -210
  242. package/dist/{useAsyncData-uMVTsDI9.js → useAsyncData-DHBqeb9a.js} +3 -2
  243. package/dist/{useDateFormatter-Dcz7jstn.js → useDateFormatter-BkbjKw83.js} +9 -9
  244. package/dist/useIframeCapabilities-BEvvwlwt.js +46 -0
  245. package/dist/{useTheme-NbEx-ZNV.js → useTheme-CnMbo-iq.js} +23 -23
  246. package/dist/vb-CL7fRwRw.js +4 -0
  247. package/dist/vbscript-CR2xfxpw.js +4 -0
  248. package/dist/{vega-component-hegVmfuS.js → vega-component-BfFcXZxw.js} +40 -39
  249. package/dist/{vega-loader.browser.module-DcW8jnKp.js → vega-loader.browser.module-CFMtdrNw.js} +3 -3
  250. package/dist/velocity-CfuZoxPt.js +4 -0
  251. package/dist/verilog-CySTkzw_.js +4 -0
  252. package/dist/vhdl-Dvcd8KHW.js +4 -0
  253. package/dist/webidl-tbJt7sKk.js +4 -0
  254. package/dist/xquery-DJQVztyc.js +4 -0
  255. package/dist/{xychartDiagram-6GGTOJPD-C7Bhm_yt.js → xychartDiagram-6GGTOJPD-njc-naaw.js} +23 -22
  256. package/dist/yacas-BbgBReEH.js +4 -0
  257. package/dist/z80-DPyb8VGz.js +4 -0
  258. package/package.json +10 -6
  259. package/src/components/app-config/ai-config.tsx +1 -3
  260. package/src/components/app-config/common.tsx +14 -0
  261. package/src/components/app-config/data-form.tsx +282 -0
  262. package/src/components/app-config/user-config-form.tsx +36 -223
  263. package/src/components/chat/acp/__tests__/state.test.ts +75 -2
  264. package/src/components/chat/acp/agent-panel.tsx +143 -89
  265. package/src/components/chat/acp/blocks.tsx +77 -34
  266. package/src/components/chat/acp/state.ts +5 -1
  267. package/src/components/chat/acp/thread.tsx +12 -1
  268. package/src/components/chat/chat-panel.tsx +38 -5
  269. package/src/components/chat/chat-utils.ts +5 -1
  270. package/src/components/chat/markdown-renderer.css +1 -0
  271. package/src/components/chat/tool-call-accordion.tsx +7 -1
  272. package/src/components/data-table/charts/__tests__/storage.test.ts +12 -6
  273. package/src/components/data-table/charts/charts.tsx +8 -2
  274. package/src/components/data-table/charts/storage.ts +1 -1
  275. package/src/components/data-table/column-wrapping/feature.ts +2 -0
  276. package/src/components/data-table/columns.tsx +10 -2
  277. package/src/components/data-table/renderers.tsx +3 -2
  278. package/src/components/editor/Output.tsx +28 -24
  279. package/src/components/editor/actions/useCellActionButton.tsx +20 -4
  280. package/src/components/editor/ai/add-cell-with-ai.tsx +17 -3
  281. package/src/components/editor/ai/ai-completion-editor.tsx +79 -32
  282. package/src/components/editor/ai/completion-handlers.tsx +26 -7
  283. package/src/components/editor/cell/StagedAICell.tsx +81 -12
  284. package/src/components/editor/cell/code/cell-editor.tsx +2 -3
  285. package/src/components/editor/cell/useRunCells.ts +62 -30
  286. package/src/components/editor/chrome/panels/cache-panel.tsx +2 -2
  287. package/src/components/editor/chrome/panels/packages-panel.tsx +1 -1
  288. package/src/components/editor/chrome/state.ts +1 -1
  289. package/src/components/editor/chrome/wrapper/app-chrome.tsx +2 -0
  290. package/src/components/editor/chrome/wrapper/minimap.tsx +2 -0
  291. package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +108 -0
  292. package/src/components/editor/chrome/wrapper/sidebar.tsx +1 -1
  293. package/src/components/editor/code/readonly-diff.tsx +49 -0
  294. package/src/components/editor/columns/storage.ts +1 -1
  295. package/src/components/editor/errors/fix-mode.ts +6 -1
  296. package/src/components/editor/inputs/Inputs.styles.ts +1 -1
  297. package/src/components/editor/output/CalloutOutput.tsx +1 -1
  298. package/src/components/editor/output/HtmlOutput.tsx +3 -2
  299. package/src/components/editor/output/JsonOutput.tsx +6 -1
  300. package/src/components/editor/output/MarimoTracebackOutput.tsx +59 -45
  301. package/src/components/editor/output/__tests__/HtmlOutput.test.tsx +134 -0
  302. package/src/components/editor/output/__tests__/traceback.test.tsx +8 -1
  303. package/src/components/editor/output/useWrapText.ts +6 -1
  304. package/src/components/editor/package-alert.tsx +34 -32
  305. package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +5 -2
  306. package/src/components/home/state.ts +3 -2
  307. package/src/components/scratchpad/scratchpad-history.ts +6 -1
  308. package/src/components/slides/slides-component.tsx +25 -21
  309. package/src/components/ui/confirmation-button.tsx +1 -1
  310. package/src/components/ui/context-menu.tsx +14 -4
  311. package/src/components/ui/dropdown-menu.tsx +14 -4
  312. package/src/components/ui/fullscreen.tsx +115 -1
  313. package/src/components/ui/popover.tsx +11 -3
  314. package/src/components/ui/range-slider.tsx +1 -1
  315. package/src/components/ui/select.tsx +7 -3
  316. package/src/components/ui/slider.tsx +1 -1
  317. package/src/components/ui/tooltip.tsx +10 -3
  318. package/src/core/ai/__tests__/staged-cells.test.ts +189 -64
  319. package/src/core/ai/config.ts +6 -2
  320. package/src/core/ai/context/providers/__tests__/__snapshots__/cell-output.test.ts.snap +17 -0
  321. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +194 -10
  322. package/src/core/ai/context/providers/cell-output.ts +170 -112
  323. package/src/core/ai/context/providers/tables.ts +2 -2
  324. package/src/core/ai/staged-cells.ts +32 -16
  325. package/src/core/ai/state.ts +2 -1
  326. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +556 -0
  327. package/src/core/ai/tools/__tests__/registry.test.ts +12 -4
  328. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +450 -0
  329. package/src/core/ai/tools/__tests__/utils.test.ts +87 -0
  330. package/src/core/ai/tools/base.ts +31 -8
  331. package/src/core/ai/tools/edit-notebook-tool.ts +239 -0
  332. package/src/core/ai/tools/registry.ts +13 -6
  333. package/src/core/ai/tools/run-cells-tool.ts +233 -0
  334. package/src/core/ai/tools/sample-tool.ts +10 -8
  335. package/src/core/ai/tools/utils.ts +23 -0
  336. package/src/core/cells/__tests__/cells.test.ts +19 -1
  337. package/src/core/cells/__tests__/session.test.ts +20 -3
  338. package/src/core/cells/cells.ts +12 -7
  339. package/src/core/cells/session.ts +1 -1
  340. package/src/core/codemirror/ai/resources.ts +13 -2
  341. package/src/core/codemirror/copilot/state.ts +4 -2
  342. package/src/core/codemirror/language/__tests__/extension.test.ts +10 -2
  343. package/src/core/codemirror/language/languages/markdown.ts +16 -153
  344. package/src/core/codemirror/language/languages/python.ts +12 -7
  345. package/src/core/codemirror/language/languages/sql/sql-mode.ts +6 -1
  346. package/src/core/codemirror/language/languages/sql/sql.ts +20 -293
  347. package/src/core/codemirror/language/panel/markdown.tsx +2 -1
  348. package/src/core/codemirror/language/panel/panel.tsx +1 -1
  349. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  350. package/src/core/codemirror/lsp/transports.ts +7 -13
  351. package/src/core/config/config-schema.ts +4 -1
  352. package/src/core/hotkeys/hotkeys.ts +12 -0
  353. package/src/core/lsp/__tests__/transport.test.ts +233 -0
  354. package/src/core/lsp/transport.ts +139 -0
  355. package/src/core/rtc/state.ts +6 -1
  356. package/src/core/vscode/is-in-vscode.ts +9 -0
  357. package/src/core/wasm/store.ts +1 -1
  358. package/src/css/app/Cell.css +31 -0
  359. package/src/css/globals.css +5 -0
  360. package/src/hooks/useIframeCapabilities.ts +14 -0
  361. package/src/hooks/useLocalStorage.ts +1 -1
  362. package/src/plugins/core/RenderHTML.tsx +65 -5
  363. package/src/plugins/core/__test__/RenderHTML.test.ts +25 -23
  364. package/src/plugins/core/__test__/renderHTML-sanitization.test.tsx +131 -0
  365. package/src/plugins/core/__test__/sanitize.test.ts +465 -0
  366. package/src/plugins/core/registerReactComponent.tsx +14 -1
  367. package/src/plugins/core/sanitize.ts +76 -0
  368. package/src/plugins/impl/DataTablePlugin.tsx +1 -0
  369. package/src/plugins/impl/FileBrowserPlugin.tsx +1 -3
  370. package/src/plugins/impl/FileUploadPlugin.tsx +1 -3
  371. package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +8 -1
  372. package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +6 -0
  373. package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +8 -1
  374. package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +3 -0
  375. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +9 -2
  376. package/src/plugins/impl/plotly/parse-from-template.ts +1 -1
  377. package/src/utils/__tests__/arrays.test.ts +42 -0
  378. package/src/utils/__tests__/capabilities.test.ts +453 -0
  379. package/src/utils/__tests__/formatting.test.ts +13 -13
  380. package/src/utils/__tests__/local-storage.test.ts +1 -1
  381. package/src/utils/__tests__/storage.test.ts +21 -21
  382. package/src/utils/arrays.ts +25 -0
  383. package/src/utils/capabilities.ts +114 -0
  384. package/src/utils/numbers.ts +2 -2
  385. package/src/utils/{storage.ts → storage/jotai.ts} +16 -4
  386. package/src/utils/storage/storage.ts +57 -0
  387. package/src/utils/{localStorage.ts → storage/typed.ts} +22 -12
  388. package/dist/any-language-editor-CEXn1vFs.js +0 -156
  389. package/dist/apl-DuVfHsPc.js +0 -4
  390. package/dist/architecture-O4VJ6CD3-lp-opOaL.js +0 -21
  391. package/dist/asciiarmor-qIVWsi4F.js +0 -4
  392. package/dist/asn1-BjPqARr7.js +0 -4
  393. package/dist/assets/__vite-browser-external-lX-sn9m2.js +0 -1
  394. package/dist/brainfuck-DPGTVfkE.js +0 -4
  395. package/dist/classDiagram-KNZD7YFC-azuS_99k.js +0 -39
  396. package/dist/classDiagram-v2-RKCZMP56-CQpyQQOR.js +0 -39
  397. package/dist/clojure-ATksAecl.js +0 -4
  398. package/dist/cmake-CWylaz2C.js +0 -4
  399. package/dist/cobol-BiLLCZIQ.js +0 -4
  400. package/dist/coffeescript-Ca4jipi8.js +0 -4
  401. package/dist/commonlisp-BwFjyEC7.js +0 -4
  402. package/dist/crystal-BhUsQHbh.js +0 -4
  403. package/dist/css-Cf4wlIyV.js +0 -5
  404. package/dist/cypher-Dj8Hzgxa.js +0 -4
  405. package/dist/d-DZI7tbTy.js +0 -4
  406. package/dist/diff-WQISUHG5.js +0 -4
  407. package/dist/dist-BawZu0ix.js +0 -10
  408. package/dist/dist-BiOF7987.js +0 -6
  409. package/dist/dist-Cs3McXEj.js +0 -6
  410. package/dist/dist-D3aaithT.js +0 -6
  411. package/dist/dist-DELcMSpJ.js +0 -6
  412. package/dist/dist-Dgts3WXd.js +0 -6
  413. package/dist/dist-DtpUiDG_.js +0 -6
  414. package/dist/dist-ZjnJq_jD.js +0 -10
  415. package/dist/dist-mof3iuBu.js +0 -12
  416. package/dist/dtd-B2M8dhfC.js +0 -4
  417. package/dist/dylan-CU3Vt8SC.js +0 -4
  418. package/dist/ecl-B8ESAVq4.js +0 -4
  419. package/dist/eiffel-DDfMIKeA.js +0 -4
  420. package/dist/elm-Bj6rj8jf.js +0 -4
  421. package/dist/erlang-BxyshZUq.js +0 -4
  422. package/dist/error-banner-npbEfanI.js +0 -1012
  423. package/dist/esm-svAVli9f.js +0 -26
  424. package/dist/factor-CYk6XT8r.js +0 -5
  425. package/dist/forth-fcoJkd-f.js +0 -4
  426. package/dist/fortran-IxZHu4wc.js +0 -4
  427. package/dist/gas-B8rmKcim.js +0 -4
  428. package/dist/gherkin-BTm-jIdJ.js +0 -4
  429. package/dist/gitGraph-ZV4HHKMB-DFg_OLQb.js +0 -21
  430. package/dist/groovy-01kRHFMD.js +0 -4
  431. package/dist/haskell-B3PhE05w.js +0 -4
  432. package/dist/haxe-DEoAm8oA.js +0 -5
  433. package/dist/idl-DsDJU9cV.js +0 -4
  434. package/dist/info-63CPKGFF-D3DZmDBa.js +0 -21
  435. package/dist/infoDiagram-STP46IZ2-ec08vi_U.js +0 -44
  436. package/dist/javascript-gwczVhuU.js +0 -5
  437. package/dist/jinja2-AkZRdFk3.js +0 -4
  438. package/dist/julia-_s6qe3bf.js +0 -4
  439. package/dist/livescript-CwPHQdv5.js +0 -4
  440. package/dist/lua-s7nRxkCP.js +0 -4
  441. package/dist/mathematica-Ci36yd1q.js +0 -4
  442. package/dist/mbox-DbOYMNCO.js +0 -4
  443. package/dist/mirc-VmNe8AwF.js +0 -4
  444. package/dist/mllike-BdD7SJEa.js +0 -6
  445. package/dist/modelica-BA4VqzC3.js +0 -4
  446. package/dist/mscgen-DF-5WHJm.js +0 -6
  447. package/dist/mumps-c_Uia_QN.js +0 -4
  448. package/dist/nsis-BAANGODV.js +0 -5
  449. package/dist/ntriples-Bslqh2Ki.js +0 -4
  450. package/dist/octave-DYn5ltia.js +0 -4
  451. package/dist/oz-B_N-StZq.js +0 -4
  452. package/dist/packet-HUATNLJX-CkqjFdAv.js +0 -21
  453. package/dist/pascal-DU4CtAUu.js +0 -4
  454. package/dist/perl-Bae6k32u.js +0 -4
  455. package/dist/pie-WTHONI2E-D0rWwX5P.js +0 -21
  456. package/dist/pig-DSIxUEgX.js +0 -4
  457. package/dist/powershell-31lcPgIF.js +0 -4
  458. package/dist/properties-lmYbntDG.js +0 -4
  459. package/dist/protobuf-BTYoCEpV.js +0 -4
  460. package/dist/pug-DMFM7zzO.js +0 -5
  461. package/dist/puppet-B0ub07d-.js +0 -4
  462. package/dist/python-C4jT87Nt.js +0 -5
  463. package/dist/q-YbPYlqRI.js +0 -4
  464. package/dist/r-OfNu6HAI.js +0 -4
  465. package/dist/radar-NJJJXTRR-Bxqv4O5a.js +0 -21
  466. package/dist/rpm-D_3b5peD.js +0 -5
  467. package/dist/ruby-CehsJy_T.js +0 -4
  468. package/dist/sas-DwQHzPoF.js +0 -4
  469. package/dist/scheme-B6ArxiQu.js +0 -4
  470. package/dist/shell-AHmQgDfc.js +0 -4
  471. package/dist/sieve-CgodKOcx.js +0 -4
  472. package/dist/smalltalk-BeFzDkbo.js +0 -4
  473. package/dist/sparql-BWxq-Lnx.js +0 -4
  474. package/dist/stateDiagram-v2-UMBNRL4Z-D9v8fKjF.js +0 -38
  475. package/dist/stex-Dvaq0qsm.js +0 -5
  476. package/dist/stylus-Ge0ofWlZ.js +0 -4
  477. package/dist/swift-CjQfbVxV.js +0 -4
  478. package/dist/tcl-CAGDF11K.js +0 -4
  479. package/dist/textile-CrXreJtf.js +0 -4
  480. package/dist/toml-AdLXKwEi.js +0 -4
  481. package/dist/treemap-75Q7IDZK-Da9Jv6a_.js +0 -21
  482. package/dist/troff-C-LaM2ex.js +0 -4
  483. package/dist/ttcn-DTclUi6T.js +0 -4
  484. package/dist/ttcn-cfg-BtBPbmLX.js +0 -4
  485. package/dist/turtle-BODDDg5O.js +0 -4
  486. package/dist/vb-Cb1HQHii.js +0 -4
  487. package/dist/vbscript-CpXOP4wZ.js +0 -4
  488. package/dist/velocity-Dz0rBQIk.js +0 -4
  489. package/dist/verilog-6Di9aLKw.js +0 -4
  490. package/dist/vhdl-BRNesXYc.js +0 -4
  491. package/dist/webidl-BpRNYIYn.js +0 -4
  492. package/dist/xquery-DXWcJ7b6.js +0 -4
  493. package/dist/yacas-DbSARPz4.js +0 -4
  494. package/dist/z80-DzslPj_l.js +0 -4
  495. package/src/core/codemirror/language/__tests__/ast.test.ts +0 -124
  496. package/src/core/codemirror/language/utils/ast.ts +0 -84
  497. package/src/core/codemirror/language/utils/quotes.ts +0 -18
  498. /package/dist/{_arrayReduce-CVwxyrBP.js → _arrayReduce-Cd9xQjbl.js} +0 -0
  499. /package/dist/{_baseSlice-OgpvpOOJ.js → _baseSlice-CE9WsQZm.js} +0 -0
  500. /package/dist/{_hasUnicode-BgIggCqE.js → _hasUnicode-DkEebvtD.js} +0 -0
  501. /package/dist/{apl-CEHentF4.js → apl-aGhy11IM.js} +0 -0
  502. /package/dist/{array-aAxy08hN.js → array-DYSXIreg.js} +0 -0
  503. /package/dist/{asciiarmor-DURYiCS0.js → asciiarmor-DJKJ3Gkn.js} +0 -0
  504. /package/dist/{asn1-ETAiEoXY.js → asn1-C6f5IeNs.js} +0 -0
  505. /package/dist/{asterisk-DTpbbXPb.js → asterisk-DB1poX9_.js} +0 -0
  506. /package/dist/{brainfuck-BWQep-SA.js → brainfuck-Ch9vjun0.js} +0 -0
  507. /package/dist/{chunk-57QY23SG-0TxCfmy_.js → chunk-57QY23SG-BpXU7ph4.js} +0 -0
  508. /package/dist/{clike-bzZTreP4.js → clike-Bc2PZzZQ.js} +0 -0
  509. /package/dist/{clojure-BzFapDkA.js → clojure-B_lpr3zt.js} +0 -0
  510. /package/dist/{cmake-DvlbIC8x.js → cmake-DaocNF4I.js} +0 -0
  511. /package/dist/{cobol-BrEI4cPR.js → cobol-suTPtt7c.js} +0 -0
  512. /package/dist/{coffeescript-B6cvu8mO.js → coffeescript-CPLIvtqJ.js} +0 -0
  513. /package/dist/{colors-Cr_mZ2aH.js → colors-BXlG8Lmz.js} +0 -0
  514. /package/dist/{common-keywords-WqQm7W8t.js → common-keywords-Bhll7O3b.js} +0 -0
  515. /package/dist/{commonlisp-BIT8PQqi.js → commonlisp-BqM3qFK7.js} +0 -0
  516. /package/dist/{crystal-B_UcPArT.js → crystal-AsSFu4ke.js} +0 -0
  517. /package/dist/{css-dHbnt_zl.js → css-Df7Sdeyh.js} +0 -0
  518. /package/dist/{cypher-Dh3FOpL7.js → cypher-CaVKL6Gu.js} +0 -0
  519. /package/dist/{cytoscape.esm-BTpRoPd2.js → cytoscape.esm-BFEMljQI.js} +0 -0
  520. /package/dist/{d-CQD1IHee.js → d-DCGWK7NQ.js} +0 -0
  521. /package/dist/{defaultLocale-BAgEOGks.js → defaultLocale-CYgZlqDF.js} +0 -0
  522. /package/dist/{defaultLocale-471SYAPk.js → defaultLocale-Cto8YOmX.js} +0 -0
  523. /package/dist/{diff-CpF_IDx0.js → diff-CsxOM4Tr.js} +0 -0
  524. /package/dist/{dist-CK8Gj3GX.js → dist-C76MUPD3.js} +0 -0
  525. /package/dist/{dtd-DYoNpy6c.js → dtd-Dwr0Jmks.js} +0 -0
  526. /package/dist/{duckdb-keywords-CdIsl9L0.js → duckdb-keywords-7wAWf848.js} +0 -0
  527. /package/dist/{dylan-Bc_2G1E-.js → dylan-A7-ZBSey.js} +0 -0
  528. /package/dist/{ebnf-jGVT_YpN.js → ebnf-9_SaGDUz.js} +0 -0
  529. /package/dist/{ecl-UIU-P-Ar.js → ecl-BzJVIQDc.js} +0 -0
  530. /package/dist/{eiffel-C90Oyuix.js → eiffel-CO9eC_Op.js} +0 -0
  531. /package/dist/{elm-B9fWSySj.js → elm-CVAWj8SB.js} +0 -0
  532. /package/dist/{emotion-is-prop-valid.esm-BHMWayAG.js → emotion-is-prop-valid.esm-C3Yi5GQt.js} +0 -0
  533. /package/dist/{erlang-Ccff0UAn.js → erlang-DWbZP546.js} +0 -0
  534. /package/dist/{fcl-CGR8NxAg.js → fcl-CM9t2iay.js} +0 -0
  535. /package/dist/{forth-U1ROGcBY.js → forth-BTYqUuu3.js} +0 -0
  536. /package/dist/{fortran-3nOkjDmc.js → fortran-DgAjHcCq.js} +0 -0
  537. /package/dist/{gas-B_4H5FzV.js → gas-BjDSWPZd.js} +0 -0
  538. /package/dist/{gherkin-B0eru5Uz.js → gherkin-ClRqqpKv.js} +0 -0
  539. /package/dist/{groovy-dqjtZUVf.js → groovy-BzNjnc8x.js} +0 -0
  540. /package/dist/{haskell-DFzCCQzo.js → haskell-DLdk34Jq.js} +0 -0
  541. /package/dist/{haxe-Da8Pj5RT.js → haxe-l6gaY_IS.js} +0 -0
  542. /package/dist/{http-1HACL_9s.js → http-6Qg7z_h2.js} +0 -0
  543. /package/dist/{idl-D3NXs5iM.js → idl-hlWT4D26.js} +0 -0
  544. /package/dist/{init-D6eDd7H0.js → init-tZ42Torz.js} +0 -0
  545. /package/dist/{isArrayLikeObject-BlvK28do.js → isArrayLikeObject-DU5MCuQM.js} +0 -0
  546. /package/dist/{javascript-BfCTmOnk.js → javascript-DGukg1sB.js} +0 -0
  547. /package/dist/{jinja2-gBHAxUdF.js → jinja2-DI5k_Er3.js} +0 -0
  548. /package/dist/{julia-bG-6nJ-_.js → julia-BvDZDiIT.js} +0 -0
  549. /package/dist/{katex-mkWmhPUh.js → katex-DgfMWJY9.js} +0 -0
  550. /package/dist/{livescript-BlsRC8UJ.js → livescript-2YMQfkfI.js} +0 -0
  551. /package/dist/{lua-BbDC0_5w.js → lua-DIUrQRfA.js} +0 -0
  552. /package/dist/{main-Czi9-LVy.js → main-BMTpe7M0.js} +0 -0
  553. /package/dist/{marked.esm-DJM8la36.js → marked.esm-DkVwEwtO.js} +0 -0
  554. /package/dist/{math-C7wLpe9K.js → math-qsHyz2Eo.js} +0 -0
  555. /package/dist/{mathematica-YZTe3-PF.js → mathematica-Dqmg_BwL.js} +0 -0
  556. /package/dist/{mbox-CY5idp08.js → mbox-Cng-P-F1.js} +0 -0
  557. /package/dist/{mirc-CbQuFZKk.js → mirc-CNDqOVhQ.js} +0 -0
  558. /package/dist/{mllike-DsbHMX-5.js → mllike-C1n2UDyX.js} +0 -0
  559. /package/dist/{modelica-CQuvsOQk.js → modelica-QqQC2pFj.js} +0 -0
  560. /package/dist/{mscgen-LIpBP9VR.js → mscgen-C3fl8uhp.js} +0 -0
  561. /package/dist/{mumps-Ct5NXoaG.js → mumps-BeCUbMej.js} +0 -0
  562. /package/dist/{nginx-Dvc62C8z.js → nginx-ejv7DsBz.js} +0 -0
  563. /package/dist/{node-sql-parser-BqKV-TpL.js → node-sql-parser-CoPWN4hn.js} +0 -0
  564. /package/dist/{ntriples-jVkxWUuv.js → ntriples-CUgUpcma.js} +0 -0
  565. /package/dist/{octave-jGOImUB0.js → octave-BD652tGl.js} +0 -0
  566. /package/dist/{oz-Y0FKDMS2.js → oz-DrRsFa0K.js} +0 -0
  567. /package/dist/{pascal-BaLtPWWB.js → pascal-hpcx9sVn.js} +0 -0
  568. /package/dist/{path-VDkDgx1I.js → path-Bbv2tLY1.js} +0 -0
  569. /package/dist/{perl-CjfE0JLo.js → perl-DW8XHeFc.js} +0 -0
  570. /package/dist/{pig-DE4epV99.js → pig-Cv7Nxbfo.js} +0 -0
  571. /package/dist/{powershell-BZx53Ujw.js → powershell-Dr7WZMDU.js} +0 -0
  572. /package/dist/{prop-types-0wNc-99T.js → prop-types-Bd16OEUP.js} +0 -0
  573. /package/dist/{properties-CLyCG5C-.js → properties-D-qJDXAM.js} +0 -0
  574. /package/dist/{protobuf-BjBBs_V4.js → protobuf-B48QZbd3.js} +0 -0
  575. /package/dist/{puppet-ZImLuomA.js → puppet-15JDyiY2.js} +0 -0
  576. /package/dist/{python-C9YN71pR.js → python-DWkQA94h.js} +0 -0
  577. /package/dist/{q-CMoUHJ5Q.js → q-BzRpKgfd.js} +0 -0
  578. /package/dist/{r-DILmKWWW.js → r-dcNRe_Q8.js} +0 -0
  579. /package/dist/{range-PcytnUSJ.js → range-CQvYp_qE.js} +0 -0
  580. /package/dist/{rpm-fpIsm1Kr.js → rpm-Djl3Dsf1.js} +0 -0
  581. /package/dist/{ruby-BuiQI41h.js → ruby-Dd2CZTip.js} +0 -0
  582. /package/dist/{sas-C76sJ1zF.js → sas-DYF5_Iqu.js} +0 -0
  583. /package/dist/{scheme-DHjM-txv.js → scheme-YtWcji1H.js} +0 -0
  584. /package/dist/{shell--7NmGJ9p.js → shell-C3uC3Y0Z.js} +0 -0
  585. /package/dist/{sieve-DaPvBv1M.js → sieve-DHB17sQG.js} +0 -0
  586. /package/dist/{simple-mode-BP3Jd4vf.js → simple-mode-BMmwP_vI.js} +0 -0
  587. /package/dist/{smalltalk-KPvwrjCs.js → smalltalk-Y5v1Np3H.js} +0 -0
  588. /package/dist/{solr-PvZUtEDb.js → solr-DvRJLlRD.js} +0 -0
  589. /package/dist/{sparql-CXSUIQer.js → sparql-BEt3GJwM.js} +0 -0
  590. /package/dist/{spreadsheet-DPJdGPkx.js → spreadsheet-Dp4B9_rc.js} +0 -0
  591. /package/dist/{sql-Dp4ZLSIa.js → sql-DBsUs8nQ.js} +0 -0
  592. /package/dist/{stex-CeXW4zzk.js → stex-C6-x52ei.js} +0 -0
  593. /package/dist/{stylus-BXcmrg9w.js → stylus-DroA8via.js} +0 -0
  594. /package/dist/{swift-DD8I7hKP.js → swift-DR0x1ESK.js} +0 -0
  595. /package/dist/{tcl-B9Lp4GtA.js → tcl-BeuTFc_c.js} +0 -0
  596. /package/dist/{textile-qdiY0teq.js → textile-C0ikhHN3.js} +0 -0
  597. /package/dist/{tiddlywiki-t32lkubq.js → tiddlywiki-C_2Nvsgu.js} +0 -0
  598. /package/dist/{tiki-B0qKrSMl.js → tiki-CKQlhmQQ.js} +0 -0
  599. /package/dist/{timer-CzOhIJuk.js → timer-CcUhugb0.js} +0 -0
  600. /package/dist/{toml-eSl4PUAH.js → toml-BqNUJWRI.js} +0 -0
  601. /package/dist/{treemap-BpgMKHv-.js → treemap-BYLUKIzA.js} +0 -0
  602. /package/dist/{troff-105XJOEu.js → troff-DkK0f2ZH.js} +0 -0
  603. /package/dist/{tslib.es6-DofFyd9S.js → tslib.es6-3ZL768sZ.js} +0 -0
  604. /package/dist/{ttcn-1_BxDcM8.js → ttcn-Bf8vrg-_.js} +0 -0
  605. /package/dist/{ttcn-cfg-Cn_XgXiw.js → ttcn-cfg-DjCKzd95.js} +0 -0
  606. /package/dist/{turtle-BI6LyfEu.js → turtle-SSc84S9m.js} +0 -0
  607. /package/dist/{vb-BecoBfmr.js → vb-CQ6DC3cL.js} +0 -0
  608. /package/dist/{vbscript-De-zpA4i.js → vbscript-Dw0gFssg.js} +0 -0
  609. /package/dist/{velocity-DhlYJTrD.js → velocity-BvJQyBmj.js} +0 -0
  610. /package/dist/{verilog-BDZgxDOW.js → verilog-CKGAvQjj.js} +0 -0
  611. /package/dist/{vhdl-CV0OKTbp.js → vhdl-B40_x6fM.js} +0 -0
  612. /package/dist/{webidl-BOM1Fs0O.js → webidl-Bi9hczCv.js} +0 -0
  613. /package/dist/{xquery-CltP_CGh.js → xquery-DwWUXvP3.js} +0 -0
  614. /package/dist/{yacas-Dch4E2Dg.js → yacas-ClUs0mmH.js} +0 -0
  615. /package/dist/{z80-B5Yly27o.js → z80-DPC4UGzR.js} +0 -0
  616. /package/dist/{zod-ChY6miG5.js → zod-mAEs2ITo.js} +0 -0
@@ -2,7 +2,13 @@
2
2
 
3
3
  import { useCompletion } from "@ai-sdk/react";
4
4
  import { EditorView } from "@codemirror/view";
5
- import { AtSignIcon, Loader2Icon, SparklesIcon, XIcon } from "lucide-react";
5
+ import {
6
+ AtSignIcon,
7
+ CircleCheckIcon,
8
+ Loader2Icon,
9
+ SparklesIcon,
10
+ XIcon,
11
+ } from "lucide-react";
6
12
  import React, { useCallback, useEffect, useId, useState } from "react";
7
13
  import CodeMirrorMerge from "react-codemirror-merge";
8
14
  import { Button } from "@/components/ui/button";
@@ -11,14 +17,16 @@ import { customPythonLanguageSupport } from "@/core/codemirror/language/language
11
17
  import "./merge-editor.css";
12
18
  import { storePrompt } from "@marimo-team/codemirror-ai";
13
19
  import type { ReactCodeMirrorRef } from "@uiw/react-codemirror";
14
- import { useAtom } from "jotai";
20
+ import { useAtom, useAtomValue } from "jotai";
15
21
  import { AIModelDropdown } from "@/components/ai/ai-model-dropdown";
16
22
  import { Checkbox } from "@/components/ui/checkbox";
17
23
  import { Label } from "@/components/ui/label";
18
24
  import { Switch } from "@/components/ui/switch";
19
25
  import { Tooltip } from "@/components/ui/tooltip";
20
26
  import { toast } from "@/components/ui/use-toast";
21
- import { includeOtherCellsAtom } from "@/core/ai/state";
27
+ import { stagedAICellsAtom } from "@/core/ai/staged-cells";
28
+ import { type AiCompletionCell, includeOtherCellsAtom } from "@/core/ai/state";
29
+ import type { CellId } from "@/core/cells/ids";
22
30
  import { getCodes } from "@/core/codemirror/copilot/getCodes";
23
31
  import type { LanguageAdapterType } from "@/core/codemirror/language/types";
24
32
  import { selectAllText } from "@/core/codemirror/utils";
@@ -40,15 +48,14 @@ const Original = CodeMirrorMerge.Original;
40
48
  const Modified = CodeMirrorMerge.Modified;
41
49
 
42
50
  interface Props {
51
+ cellId: CellId;
52
+ aiCompletionCell: AiCompletionCell | null;
43
53
  className?: string;
44
54
  currentCode: string;
45
55
  currentLanguageAdapter: LanguageAdapterType | undefined;
46
- initialPrompt: string | undefined;
47
56
  onChange: (code: string) => void;
48
57
  declineChange: () => void;
49
58
  acceptChange: (rightHandCode: string) => void;
50
- enabled: boolean;
51
- triggerImmediately?: boolean;
52
59
  runCell: () => void;
53
60
  outputArea?: "above" | "below";
54
61
  /**
@@ -65,15 +72,14 @@ const baseExtensions = [customPythonLanguageSupport(), EditorView.lineWrapping];
65
72
  * This shows a left/right split with the original and modified code.
66
73
  */
67
74
  export const AiCompletionEditor: React.FC<Props> = ({
75
+ cellId,
76
+ aiCompletionCell,
68
77
  className,
69
78
  onChange,
70
- initialPrompt,
71
79
  currentLanguageAdapter,
72
80
  currentCode,
73
81
  declineChange,
74
82
  acceptChange,
75
- enabled,
76
- triggerImmediately,
77
83
  runCell,
78
84
  outputArea,
79
85
  children,
@@ -88,6 +94,20 @@ export const AiCompletionEditor: React.FC<Props> = ({
88
94
 
89
95
  const runtimeManager = useRuntimeManager();
90
96
 
97
+ const {
98
+ initialPrompt,
99
+ triggerImmediately,
100
+ cellId: aiCellId,
101
+ } = aiCompletionCell ?? {};
102
+ const enabled = aiCellId === cellId;
103
+
104
+ const stagedAICells = useAtomValue(stagedAICellsAtom);
105
+ const updatedCell = stagedAICells.get(cellId);
106
+ let previousCellCode: string | undefined;
107
+ if (updatedCell?.type === "update_cell") {
108
+ previousCellCode = updatedCell.previousCode;
109
+ }
110
+
91
111
  const {
92
112
  completion: untrimmedCompletion,
93
113
  input,
@@ -178,6 +198,8 @@ export const AiCompletionEditor: React.FC<Props> = ({
178
198
 
179
199
  const showCompletionBanner =
180
200
  enabled && triggerImmediately && (completion || isLoading);
201
+ // Set default output area to below if not specified
202
+ outputArea = outputArea ?? "below";
181
203
 
182
204
  const showInput = enabled && (!triggerImmediately || showInputPrompt);
183
205
 
@@ -202,6 +224,35 @@ export const AiCompletionEditor: React.FC<Props> = ({
202
224
  </div>
203
225
  );
204
226
 
227
+ const renderMergeEditor = (originalCode: string, modifiedCode: string) => {
228
+ return (
229
+ <CodeMirrorMerge className="cm" theme={theme}>
230
+ <Original
231
+ onChange={onChange}
232
+ value={originalCode}
233
+ extensions={baseExtensions}
234
+ />
235
+ <Modified
236
+ value={modifiedCode}
237
+ editable={false}
238
+ readOnly={true}
239
+ extensions={baseExtensions}
240
+ />
241
+ </CodeMirrorMerge>
242
+ );
243
+ };
244
+
245
+ const renderCompletionEditor = () => {
246
+ if (completion && enabled) {
247
+ return renderMergeEditor(currentCode, completion);
248
+ }
249
+ // If there is no completion and there is previous cell code, it means there is an AI change to the cell.
250
+ // And we want to render the previous cell code as the original
251
+ if (!completion && previousCellCode) {
252
+ return renderMergeEditor(previousCellCode, currentCode);
253
+ }
254
+ };
255
+
205
256
  return (
206
257
  <div className={cn("flex flex-col w-full rounded-[inherit]", className)}>
207
258
  <div
@@ -318,24 +369,10 @@ export const AiCompletionEditor: React.FC<Props> = ({
318
369
  )}
319
370
  </div>
320
371
  {outputArea === "above" && completionBanner}
321
- {completion && enabled && (
322
- <CodeMirrorMerge className="cm" theme={theme}>
323
- <Original
324
- onChange={onChange}
325
- value={currentCode}
326
- extensions={baseExtensions}
327
- />
328
- <Modified
329
- value={completion}
330
- editable={false}
331
- readOnly={true}
332
- extensions={baseExtensions}
333
- />
334
- </CodeMirrorMerge>
335
- )}
336
- {(!completion || !enabled) && children}
372
+ {renderCompletionEditor()}
373
+ {(!completion || !enabled) && !previousCellCode && children}
337
374
  {/* By default, show the completion banner below the code */}
338
- {(outputArea === "below" || !outputArea) && completionBanner}
375
+ {outputArea === "below" && completionBanner}
339
376
  </div>
340
377
  );
341
378
  };
@@ -370,12 +407,22 @@ const CompletionBanner: React.FC<CompletionBannerProps> = ({
370
407
  )}
371
408
  >
372
409
  <div className="flex flex-row items-center gap-2">
373
- <div
374
- className={cn(
375
- "w-2 h-2 rounded-full",
376
- status === "loading" ? "bg-blue-500 animate-pulse" : "bg-green-500",
377
- )}
378
- />
410
+ {isLoading ? (
411
+ <Loader2Icon
412
+ className="animate-spin text-blue-600 mb-[1px]"
413
+ size={15}
414
+ strokeWidth={2}
415
+ aria-label="Generating fix"
416
+ />
417
+ ) : (
418
+ <CircleCheckIcon
419
+ className="text-green-600 mb-[1px]"
420
+ size={15}
421
+ strokeWidth={2}
422
+ aria-label="Fix generated"
423
+ />
424
+ )}
425
+
379
426
  <p className="transition-opacity duration-200 text-muted-foreground">
380
427
  {isLoading ? "Generating fix..." : "Showing fix"}
381
428
  </p>
@@ -98,13 +98,15 @@ export const CompletionActionsCellFooter: React.FC<{
98
98
  onDecline: () => void;
99
99
  size?: "xs" | "sm";
100
100
  multipleCompletions?: boolean;
101
- }> = ({ isLoading, onAccept, onDecline }) => {
101
+ runCell?: () => void;
102
+ }> = ({ isLoading, onAccept, onDecline, runCell }) => {
102
103
  return (
103
104
  <>
104
105
  <AcceptCompletionButton
105
106
  isLoading={isLoading}
106
107
  onAccept={onAccept}
107
108
  size="xs"
109
+ runCell={runCell}
108
110
  />
109
111
  <RejectCompletionButton onDecline={onDecline} size="xs" />
110
112
  </>
@@ -114,6 +116,7 @@ export const CompletionActionsCellFooter: React.FC<{
114
116
  export const AcceptCompletionButton: React.FC<{
115
117
  isLoading: boolean;
116
118
  onAccept: () => void;
119
+ multipleCompletions?: boolean;
117
120
  size?: "xs" | "sm";
118
121
  buttonStyles?: string;
119
122
  playButtonStyles?: string;
@@ -122,6 +125,7 @@ export const AcceptCompletionButton: React.FC<{
122
125
  }> = ({
123
126
  isLoading,
124
127
  onAccept,
128
+ multipleCompletions = false,
125
129
  size = "sm",
126
130
  buttonStyles,
127
131
  acceptShortcut,
@@ -135,6 +139,8 @@ export const AcceptCompletionButton: React.FC<{
135
139
  }
136
140
  };
137
141
 
142
+ const text = multipleCompletions ? "Accept all" : "Accept";
143
+
138
144
  const baseClasses = `h-6 text-(--grass-11) bg-(--grass-3)/60
139
145
  hover:bg-(--grass-3) dark:bg-(--grass-4)/80 dark:hover:bg-(--grass-3) font-semibold
140
146
  active:bg-(--grass-5) dark:active:bg-(--grass-4)
@@ -150,12 +156,18 @@ export const AcceptCompletionButton: React.FC<{
150
156
  onClick={onAccept}
151
157
  className={`${baseClasses} rounded-r-none ${buttonStyles}`}
152
158
  >
153
- Accept
159
+ {text}
154
160
  {acceptShortcut && (
155
161
  <MinimalHotkeys className="ml-1 inline" shortcut={acceptShortcut} />
156
162
  )}
157
163
  </Button>
158
- <Tooltip content="Accept and run cell">
164
+ <Tooltip
165
+ content={
166
+ multipleCompletions
167
+ ? "Accept and run all cells"
168
+ : "Accept and run cell"
169
+ }
170
+ >
159
171
  <Button
160
172
  variant="text"
161
173
  size={size}
@@ -163,7 +175,7 @@ export const AcceptCompletionButton: React.FC<{
163
175
  onClick={handleAcceptAndRun}
164
176
  className={`${baseClasses} rounded-l-none px-1.5 ${playButtonStyles}`}
165
177
  >
166
- <PlayIcon className="h-2.5 w-2.5 mt-0.5" />
178
+ <PlayIcon className="h-2.5 w-2.5" />
167
179
  </Button>
168
180
  </Tooltip>
169
181
  </div>
@@ -178,7 +190,7 @@ export const AcceptCompletionButton: React.FC<{
178
190
  onClick={onAccept}
179
191
  className={`${baseClasses} rounded px-3 ${buttonStyles}`}
180
192
  >
181
- Accept
193
+ {text}
182
194
  {acceptShortcut && (
183
195
  <MinimalHotkeys className="ml-1 inline" shortcut={acceptShortcut} />
184
196
  )}
@@ -188,10 +200,17 @@ export const AcceptCompletionButton: React.FC<{
188
200
 
189
201
  export const RejectCompletionButton: React.FC<{
190
202
  onDecline: () => void;
203
+ multipleCompletions?: boolean;
191
204
  size?: "xs" | "sm";
192
205
  className?: string;
193
206
  declineShortcut?: string;
194
- }> = ({ onDecline, size = "sm", className, declineShortcut }) => {
207
+ }> = ({
208
+ onDecline,
209
+ multipleCompletions = false,
210
+ size = "sm",
211
+ className,
212
+ declineShortcut,
213
+ }) => {
195
214
  return (
196
215
  <Button
197
216
  variant="text"
@@ -202,7 +221,7 @@ export const RejectCompletionButton: React.FC<{
202
221
  active:bg-(--red-5) dark:active:bg-(--red-4)
203
222
  border-(--red-6) border hover:shadow-xs ${className}`}
204
223
  >
205
- Reject
224
+ Reject{multipleCompletions && " all"}
206
225
  {declineShortcut && (
207
226
  <MinimalHotkeys className="ml-1 inline" shortcut={declineShortcut} />
208
227
  )}
@@ -1,22 +1,36 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import { useAtomValue, useStore } from "jotai";
4
- import { stagedAICellsAtom, useStagedCells } from "@/core/ai/staged-cells";
4
+ import {
5
+ type Edit,
6
+ stagedAICellsAtom,
7
+ useStagedCells,
8
+ } from "@/core/ai/staged-cells";
9
+ import { getCellEditorView } from "@/core/cells/cells";
5
10
  import type { CellId } from "@/core/cells/ids";
11
+ import { updateEditorCodeFromPython } from "@/core/codemirror/language/utils";
6
12
  import { cn } from "@/utils/cn";
13
+ import { Logger } from "@/utils/Logger";
7
14
  import { CompletionActionsCellFooter } from "../ai/completion-handlers";
15
+ import { useRunCell } from "./useRunCells";
8
16
 
9
17
  export const StagedAICellBackground: React.FC<{
10
18
  cellId: CellId;
11
19
  className?: string;
12
20
  }> = ({ cellId, className }) => {
13
21
  const stagedAICells = useAtomValue(stagedAICellsAtom);
22
+ const stagedCell = stagedAICells.get(cellId);
14
23
 
15
- if (!stagedAICells.has(cellId)) {
24
+ if (!stagedCell) {
16
25
  return null;
17
26
  }
18
27
 
19
- return <div className={cn("mo-ai-generated-cell", className)} />;
28
+ const cellClass =
29
+ stagedCell.type === "delete_cell"
30
+ ? "mo-ai-deleted-cell"
31
+ : "mo-ai-generated-cell";
32
+
33
+ return <div className={cn(cellClass, className)} />;
20
34
  };
21
35
 
22
36
  export const StagedAICellFooter: React.FC<{ cellId: CellId }> = ({
@@ -24,28 +38,83 @@ export const StagedAICellFooter: React.FC<{ cellId: CellId }> = ({
24
38
  }) => {
25
39
  const store = useStore();
26
40
  const stagedAICells = useAtomValue(stagedAICellsAtom);
41
+ const stagedAiCell = stagedAICells.get(cellId);
42
+ const runCell = useRunCell(cellId);
43
+
27
44
  const { deleteStagedCell, removeStagedCell } = useStagedCells(store);
28
45
 
29
- if (!stagedAICells.has(cellId)) {
46
+ if (!stagedAiCell) {
30
47
  return null;
31
48
  }
32
49
 
33
- const handleAcceptCompletion = () => {
34
- removeStagedCell(cellId);
35
- };
36
-
37
- const handleDeclineCompletion = () => {
38
- deleteStagedCell(cellId);
50
+ const handleCompletion = (type: "accept" | "reject") => {
51
+ const completionFunc =
52
+ type === "accept" ? acceptStagedCell : rejectStagedCell;
53
+ completionFunc(cellId, stagedAiCell, removeStagedCell, deleteStagedCell);
39
54
  };
40
55
 
41
56
  return (
42
57
  <div className="flex items-center justify-end gap-1.5 w-full pb-1 pt-2">
43
58
  <CompletionActionsCellFooter
44
59
  isLoading={false}
45
- onAccept={handleAcceptCompletion}
46
- onDecline={handleDeclineCompletion}
60
+ onAccept={() => handleCompletion("accept")}
61
+ onDecline={() => handleCompletion("reject")}
47
62
  size="xs"
63
+ runCell={runCell}
48
64
  />
49
65
  </div>
50
66
  );
51
67
  };
68
+
69
+ /**
70
+ * Accept a staged cell and apply the changes.
71
+ */
72
+ export function acceptStagedCell(
73
+ cellId: CellId,
74
+ edit: Edit,
75
+ removeStagedCell: (cellId: CellId) => void,
76
+ deleteStagedCell: (cellId: CellId) => void,
77
+ ): void {
78
+ switch (edit.type) {
79
+ case "delete_cell":
80
+ // For delete cells, the cell is deleted when the completion is accepted
81
+ deleteStagedCell(cellId);
82
+ break;
83
+ default:
84
+ removeStagedCell(cellId);
85
+ break;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Reject a staged cell and revert the changes.
91
+ */
92
+ export function rejectStagedCell(
93
+ cellId: CellId,
94
+ edit: Edit,
95
+ removeStagedCell: (cellId: CellId) => void,
96
+ deleteStagedCell: (cellId: CellId) => void,
97
+ ): void {
98
+ switch (edit.type) {
99
+ case "update_cell": {
100
+ // Revert cell code
101
+ const editorView = getCellEditorView(cellId);
102
+ if (!editorView) {
103
+ Logger.error("Editor for this cell not found", { cellId });
104
+ break;
105
+ }
106
+
107
+ updateEditorCodeFromPython(editorView, edit.previousCode);
108
+ removeStagedCell(cellId);
109
+ break;
110
+ }
111
+ case "add_cell":
112
+ // Delete the cell since it's newly created
113
+ deleteStagedCell(cellId);
114
+ break;
115
+ case "delete_cell":
116
+ // Just remove the deletion marker - cell stays in notebook
117
+ removeStagedCell(cellId);
118
+ break;
119
+ }
120
+ }
@@ -407,9 +407,8 @@ const CellEditorInternal = ({
407
407
 
408
408
  return (
409
409
  <AiCompletionEditor
410
- enabled={aiCompletionCell?.cellId === cellId}
411
- initialPrompt={aiCompletionCell?.initialPrompt}
412
- triggerImmediately={aiCompletionCell?.triggerImmediately}
410
+ cellId={cellId}
411
+ aiCompletionCell={aiCompletionCell}
413
412
  currentCode={editorViewRef.current?.state.doc.toString() ?? code}
414
413
  currentLanguageAdapter={languageAdapter}
415
414
  declineChange={useEvent(() => {
@@ -1,15 +1,23 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import { closeCompletion } from "@codemirror/autocomplete";
4
+ import { atom, useSetAtom } from "jotai";
4
5
  import useEvent from "react-use-event-hook";
5
- import { getNotebook, useCellActions } from "@/core/cells/cells";
6
+ import {
7
+ getNotebook,
8
+ type NotebookState,
9
+ useCellActions,
10
+ } from "@/core/cells/cells";
6
11
  import type { CellId } from "@/core/cells/ids";
7
12
  import { enabledCellIds, staleCellIds } from "@/core/cells/utils";
8
13
  import { getCurrentLanguageAdapter } from "@/core/codemirror/language/commands";
9
14
  import { getEditorCodeAsPython } from "@/core/codemirror/language/utils";
10
15
  import { useRequestClient } from "@/core/network/requests";
16
+ import type { RunRequest } from "@/core/network/types";
11
17
  import { Logger } from "@/utils/Logger";
12
18
 
19
+ export const hasRunAnyCellAtom = atom<boolean>(false);
20
+
13
21
  /**
14
22
  * Creates a function that runs all cells that have been edited or interrupted.
15
23
  */
@@ -45,42 +53,66 @@ export function useRunAllCells() {
45
53
  export function useRunCells() {
46
54
  const { prepareForRun } = useCellActions();
47
55
  const { sendRun } = useRequestClient();
56
+ const setHasRunAnyCell = useSetAtom(hasRunAnyCellAtom);
48
57
 
49
- const runCells = useEvent(async (cellIds: CellId[]) => {
58
+ const runCellsMemoized = useEvent(async (cellIds: CellId[]) => {
50
59
  if (cellIds.length === 0) {
51
60
  return;
52
61
  }
53
62
 
54
- const { cellHandles, cellData } = getNotebook();
55
-
56
- const codes: string[] = [];
57
- for (const cellId of cellIds) {
58
- const ref = cellHandles[cellId];
59
- const ev = ref?.current?.editorView;
60
- let code: string;
61
- // Performs side-effects that must run whenever the cell is run, but doesn't
62
- // actually run the cell.
63
- if (ev) {
64
- // Skip close on markdown, since we autorun, otherwise we'll close the
65
- // completion each time.
66
- if (getCurrentLanguageAdapter(ev) !== "markdown") {
67
- closeCompletion(ev);
68
- }
69
- // Prefer code from editor
70
- code = getEditorCodeAsPython(ev);
71
- } else {
72
- code = cellData[cellId]?.code || "";
73
- }
63
+ const notebook = getNotebook();
74
64
 
75
- codes.push(code);
76
- prepareForRun({ cellId });
77
- }
65
+ // Set a flag that a user has manually run at least one cell.
66
+ setHasRunAnyCell(true);
78
67
 
79
- // Send the run request to the Kernel
80
- await sendRun({ cellIds: cellIds, codes: codes }).catch((error) => {
81
- Logger.error(error);
82
- });
68
+ return runCells({ cellIds, sendRun, prepareForRun, notebook });
83
69
  });
84
70
 
85
- return runCells;
71
+ return runCellsMemoized;
72
+ }
73
+
74
+ export async function runCells({
75
+ cellIds,
76
+ sendRun,
77
+ prepareForRun,
78
+ notebook,
79
+ }: {
80
+ cellIds: CellId[];
81
+ sendRun: (request: RunRequest) => Promise<null>;
82
+ prepareForRun: (action: { cellId: CellId }) => void;
83
+ notebook: NotebookState;
84
+ }) {
85
+ if (cellIds.length === 0) {
86
+ return;
87
+ }
88
+
89
+ const { cellHandles, cellData } = notebook;
90
+
91
+ const codes: string[] = [];
92
+ for (const cellId of cellIds) {
93
+ const ref = cellHandles[cellId];
94
+ const ev = ref?.current?.editorView;
95
+ let code: string;
96
+ // Performs side-effects that must run whenever the cell is run, but doesn't
97
+ // actually run the cell.
98
+ if (ev) {
99
+ // Skip close on markdown, since we autorun, otherwise we'll close the
100
+ // completion each time.
101
+ if (getCurrentLanguageAdapter(ev) !== "markdown") {
102
+ closeCompletion(ev);
103
+ }
104
+ // Prefer code from editor
105
+ code = getEditorCodeAsPython(ev);
106
+ } else {
107
+ code = cellData[cellId]?.code || "";
108
+ }
109
+
110
+ codes.push(code);
111
+ prepareForRun({ cellId });
112
+ }
113
+
114
+ // Send the run request to the Kernel
115
+ await sendRun({ cellIds: cellIds, codes: codes }).catch((error) => {
116
+ Logger.error(error);
117
+ });
86
118
  }
@@ -38,11 +38,11 @@ const CachePanel = () => {
38
38
  });
39
39
  // Request updated cache info after purge
40
40
  refetch();
41
- } catch (err) {
41
+ } catch (error) {
42
42
  toast({
43
43
  title: "Error",
44
44
  description:
45
- err instanceof Error ? err.message : "Failed to purge cache",
45
+ error instanceof Error ? error.message : "Failed to purge cache",
46
46
  variant: "danger",
47
47
  });
48
48
  } finally {
@@ -211,7 +211,7 @@ const InstallPackageForm: React.FC<{
211
211
  ) : (
212
212
  <Tooltip content="Change package manager">
213
213
  <BoxIcon
214
- onClick={() => openSettings("packageManagement")}
214
+ onClick={() => openSettings("packageManagementAndData")}
215
215
  className="mr-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-80 cursor-pointer"
216
216
  />
217
217
  </Tooltip>
@@ -3,7 +3,7 @@
3
3
  import { useAtomValue } from "jotai";
4
4
  import { z } from "zod";
5
5
  import { createReducerAndAtoms } from "@/utils/createReducer";
6
- import { ZodLocalStorage } from "@/utils/localStorage";
6
+ import { ZodLocalStorage } from "@/utils/storage/typed";
7
7
  import type { PanelType } from "./types";
8
8
 
9
9
  export interface ChromeState {
@@ -25,6 +25,7 @@ import { ContextAwarePanel } from "../panels/context-aware-panel/context-aware-p
25
25
  import { useChromeActions, useChromeState } from "../state";
26
26
  import { Minimap } from "./minimap";
27
27
  import { PanelsWrapper } from "./panels";
28
+ import { PendingAICells } from "./pending-ai-cells";
28
29
  import { createStorage } from "./storage";
29
30
  import { handleDragging } from "./utils";
30
31
 
@@ -272,6 +273,7 @@ export const AppChrome: React.FC<PropsWithChildren> = ({ children }) => {
272
273
  <ContextAwarePanel />
273
274
  </PanelGroup>
274
275
  <Minimap />
276
+ <PendingAICells />
275
277
  <ErrorBoundary>
276
278
  <TooltipProvider>
277
279
  <Footer />
@@ -64,6 +64,7 @@ const MinimapCell: React.FC<MinimapCellProps> = (props) => {
64
64
 
65
65
  return (
66
66
  <button
67
+ type="button"
67
68
  data-node-id={cell.id}
68
69
  className={cn(
69
70
  "group bg-transparent text-left w-full flex relative justify-between items-center",
@@ -107,6 +108,7 @@ const MinimapCell: React.FC<MinimapCellProps> = (props) => {
107
108
  width="1"
108
109
  height="1"
109
110
  >
111
+ <title>Cell dependency connections for cell {cell.id}</title>
110
112
  {isSelected ? (
111
113
  <SelectedCell
112
114
  cell={cell}