@marimo-team/islands 0.17.2 → 0.17.3

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 (580) hide show
  1. package/dist/{Combination-De9yoNY5.js → Combination-DrSsMSEB.js} +860 -816
  2. package/dist/{ConnectedDataExplorerComponent-DuvpJOKp.js → ConnectedDataExplorerComponent-DY9cADKc.js} +2282 -2232
  3. package/dist/{ImageComparisonComponent--etUl2pp.js → ImageComparisonComponent-CJvR7Qzp.js} +3 -2
  4. package/dist/{_baseIsEqual-BFlyFUxC.js → _baseIsEqual-DbBiwJP8.js} +1 -1
  5. package/dist/{_basePickBy-gCCvtjgp.js → _basePickBy-ChFDiIEt.js} +3 -3
  6. package/dist/{_baseProperty-BuqBC0Ie.js → _baseProperty-Bf09f9Ee.js} +5 -5
  7. package/dist/_baseUniq-D5kohCWB.js +59 -0
  8. package/dist/any-language-editor-Bs2c1bKU.js +156 -0
  9. package/dist/apl-Bp8pgLcx.js +4 -0
  10. package/dist/{arc-C_O2hc-b.js → arc-DM-UhhIs.js} +2 -2
  11. package/dist/architecture-O4VJ6CD3-SVEfQWDz.js +24 -0
  12. package/dist/{architectureDiagram-W76B3OCA-CrK99pJi.js → architectureDiagram-W76B3OCA-GKSiVAlH.js} +41 -38
  13. package/dist/asciiarmor-IoNSjDv9.js +4 -0
  14. package/dist/asn1-B1GnbkOF.js +4 -0
  15. package/dist/{blockDiagram-QIGZ2CNN-BJOEyO6w.js → blockDiagram-QIGZ2CNN-wX8KWoV2.js} +30 -29
  16. package/dist/brainfuck-TRxEs4B5.js +4 -0
  17. package/dist/{button-ADXOb_gX.js → button-B8zS4Mtw.js} +5 -4
  18. package/dist/{c4Diagram-FPNF74CW-7Pz_X9wF.js → c4Diagram-FPNF74CW-Ns4C9pNn.js} +12 -12
  19. package/dist/{channel-X-wRUxX6.js → channel-Dgla_oqe.js} +1 -1
  20. package/dist/{check-COlaG7Ss.js → check-BZnPxXnd.js} +1 -1
  21. package/dist/{chunk-3AY6CYHV-BQH2fFpA.js → chunk-3AY6CYHV-HfZ-8MFM.js} +10 -10
  22. package/dist/{chunk-4BX2VUAB-D-QtDCKM.js → chunk-4BX2VUAB-CV5cUTmw.js} +1 -1
  23. package/dist/{chunk-4KMFLZZN-BirZvvJS.js → chunk-4KMFLZZN-Cbgb64pE.js} +17 -18
  24. package/dist/{chunk-55IACEB6-DjtPYZKs.js → chunk-55IACEB6--aEkhs1O.js} +1 -1
  25. package/dist/{chunk-6OXUPJBA-CTnnqlzw.js → chunk-6OXUPJBA-DQZp24uZ.js} +7 -7
  26. package/dist/{chunk-7GE3RBXV-CT47hCrL.js → chunk-7GE3RBXV-D0K_8mbM.js} +1 -1
  27. package/dist/{chunk-ABZYJK2D-B6ZsU6SR.js → chunk-ABZYJK2D-BwKkjFgF.js} +3 -3
  28. package/dist/{chunk-BN7GFLIU-DYWEsrG4.js → chunk-BN7GFLIU-93ktvOI2.js} +1 -1
  29. package/dist/{chunk-CVBHYZKI-BuzDGXz0.js → chunk-CVBHYZKI-tTpx9vm_.js} +1 -1
  30. package/dist/{chunk-CXMOBAN2-Bas2S5w1.js → chunk-CXMOBAN2-CagHnxl1.js} +6 -6
  31. package/dist/{chunk-EXTU4WIE-DXwNSukz.js → chunk-EXTU4WIE-Ve2vgn5X.js} +2 -2
  32. package/dist/{chunk-FMBD7UC4-CYKEpuPr.js → chunk-FMBD7UC4-CCvcIQpJ.js} +1 -1
  33. package/dist/{chunk-JA3XYJ7Z-DcxfkcDC.js → chunk-JA3XYJ7Z-CrQC4eYr.js} +4 -4
  34. package/dist/{chunk-JEIROHC2-C01ZIcIG.js → chunk-JEIROHC2-tuJLHPKk.js} +1 -1
  35. package/dist/{chunk-K7UQS3LO-CmbT97MV.js → chunk-K7UQS3LO-BzsTVREe.js} +7 -7
  36. package/dist/{chunk-KMC2YHZD-D64m-1E1.js → chunk-KMC2YHZD-CdKOlVi0.js} +1 -1
  37. package/dist/{chunk-QN33PNHL-DjB0j8Dr.js → chunk-QN33PNHL-CbdYySGk.js} +2 -2
  38. package/dist/{chunk-QYVHNE3D-VA4W4oxG.js → chunk-QYVHNE3D-BDj4udRH.js} +2 -2
  39. package/dist/{chunk-QZHKN3VN-KT0fl3Em.js → chunk-QZHKN3VN-E6VBm6ir.js} +1 -1
  40. package/dist/{chunk-S3R3BYOJ-C5zmcMvn.js → chunk-S3R3BYOJ-DuumGJ4u.js} +6 -6
  41. package/dist/{chunk-T44TD3VJ-BMOgu-Hk.js → chunk-T44TD3VJ-Bc-UhG4i.js} +1 -1
  42. package/dist/{chunk-TVAH2DTR-eKm8SKnH.js → chunk-TVAH2DTR-s8skdWqT.js} +6 -6
  43. package/dist/{chunk-TZMSLE5B-CQxFRiI2.js → chunk-TZMSLE5B-CUfRRoFb.js} +3 -3
  44. package/dist/{chunk-WFRQ32O7-Dg51o277.js → chunk-WFRQ32O7-BquRwCCj.js} +1 -1
  45. package/dist/{chunk-WFWHJNB7-DVLO98ge.js → chunk-WFWHJNB7-CHl0gCzu.js} +1 -1
  46. package/dist/{chunk-XRWGC2XP-UNFKdWQh.js → chunk-XRWGC2XP-CoSEoOcO.js} +1 -1
  47. package/dist/{chunk-ZPAFE4SF-DbCSwfLK.js → chunk-ZPAFE4SF-Bf1fn8cY.js} +1 -1
  48. package/dist/classDiagram-KNZD7YFC-ONLi1fgN.js +40 -0
  49. package/dist/classDiagram-v2-RKCZMP56-Ceij_i8m.js +40 -0
  50. package/dist/{clike-CytFO-kN.js → clike-Cbszc5XU.js} +1 -1
  51. package/dist/clojure-BNTL3o8Z.js +4 -0
  52. package/dist/{clone-CCgVUJ6x.js → clone-DE59DFkY.js} +1 -1
  53. package/dist/cmake-Bp6uEjiS.js +4 -0
  54. package/dist/cobol-CtS_R__A.js +4 -0
  55. package/dist/coffeescript-D5u5aYAu.js +4 -0
  56. package/dist/commonlisp-BvLWy9eh.js +4 -0
  57. package/dist/compiler-runtime-5MdCVm0X.js +13 -0
  58. package/dist/{constants-BaCMVd12.js → constants-BlvmN57i.js} +3 -3
  59. package/dist/{copy-GNcK40wy.js → copy-bxQOKABs.js} +2 -2
  60. package/dist/{cose-bilkent-S5V4N54A-BnvuJG6Y.js → cose-bilkent-S5V4N54A-DZE8LVzQ.js} +3 -3
  61. package/dist/crystal-CaTWnt-Z.js +4 -0
  62. package/dist/css-BMUPibQH.js +5 -0
  63. package/dist/cypher-PopjPg_G.js +4 -0
  64. package/dist/d-Ds7bO8W5.js +4 -0
  65. package/dist/{dagre-5GWH7T2D-rn7tZYaQ.js → dagre-5GWH7T2D-g2ShbPGy.js} +39 -37
  66. package/dist/{dagre-Bghq6VKO.js → dagre-TBn9HZB0.js} +14 -13
  67. package/dist/{data-grid-overlay-editor-B4_Caieu.js → data-grid-overlay-editor-BuhjNOgs.js} +4 -4
  68. package/dist/{diagram-N5W7TBWH-lbF94o-g.js → diagram-N5W7TBWH-BYhyeV0B.js} +44 -41
  69. package/dist/{diagram-QEK2KX5R-CKBhSzsO.js → diagram-QEK2KX5R-CiuUIBpl.js} +38 -35
  70. package/dist/{diagram-S2PKOQOG-161_1f53.js → diagram-S2PKOQOG-D0Z2Q5P-.js} +38 -35
  71. package/dist/diff-C_xR-pxD.js +4 -0
  72. package/dist/{dist-BSyYM1Gi.js → dist-7CqcJssH.js} +6 -6
  73. package/dist/{dist-C9-uHBqC.js → dist-8v4BI_h_.js} +1 -1
  74. package/dist/{dist-71jYYbWP.js → dist-B3CNaJau.js} +2 -2
  75. package/dist/dist-B9JCXzyv.js +6 -0
  76. package/dist/{dist-DzJem5xc.js → dist-BMhv6XDi.js} +1 -1
  77. package/dist/{dist-CWh5ZwcC.js → dist-BYS0EtbC.js} +2 -2
  78. package/dist/{dist-BaPjLM6s.js → dist-BgsDu-bU.js} +1 -1
  79. package/dist/{dist-CNAkUyxv.js → dist-BxmsyHv5.js} +1 -1
  80. package/dist/{dist-CWqB4bg8.js → dist-C02gS--y.js} +3 -3
  81. package/dist/{dist-C76MUPD3.js → dist-C5Iu9a3-.js} +2 -2
  82. package/dist/{dist-DxESp2-T.js → dist-C5Ns3q-m.js} +3 -3
  83. package/dist/dist-C6QrJGYr.js +10 -0
  84. package/dist/{dist-BAqp4Vtl.js → dist-CBu8cgzz.js} +8 -4
  85. package/dist/dist-CFZ32udY.js +6 -0
  86. package/dist/{dist-DaTVdKJa.js → dist-CXimnGhI.js} +2 -2
  87. package/dist/{dist-CtOeHDJp.js → dist-CawOxmKh.js} +5 -5
  88. package/dist/dist-CmgxQNWN.js +10 -0
  89. package/dist/dist-Cr6Cu8sC.js +6 -0
  90. package/dist/{dist-BBhmkni2.js → dist-CxRajUZ6.js} +1 -1
  91. package/dist/{dist-CPNnKuPh.js → dist-D08oiinq.js} +12 -10
  92. package/dist/{dist-BNRdMfJH.js → dist-D4LUTYHc.js} +2 -2
  93. package/dist/{dist-C2IEc8og.js → dist-DGKjHTv9.js} +5 -5
  94. package/dist/{dist-4dtbqf8A.js → dist-DGnWQOnS.js} +3 -3
  95. package/dist/{dist-BqdQPWpQ.js → dist-DSDOMDNR.js} +2 -2
  96. package/dist/{dist-_4cudra1.js → dist-DTNqkRGE.js} +3 -3
  97. package/dist/{dist-28HYzERB.js → dist-D_GkrgWD.js} +2 -2
  98. package/dist/{dist-Cw0F6l-7.js → dist-DbHWFmjZ.js} +1 -1
  99. package/dist/{dist-B_wjJqqS.js → dist-Dh7gw0Ay.js} +2 -2
  100. package/dist/{dist-B8Pbw5ln.js → dist-DiO9ni9a.js} +2 -2
  101. package/dist/{dist-BYHiiJB-.js → dist-DlSZED-1.js} +2 -2
  102. package/dist/{dist-Da046MhT.js → dist-DvsjKDQ4.js} +1 -1
  103. package/dist/{dist-O0zVziwn.js → dist-DzKKEoge.js} +3 -3
  104. package/dist/{dist-CwZcC4om.js → dist-HKzG1oF6.js} +1 -1
  105. package/dist/{dist-CJb8EiFO.js → dist-K_AqLCfS.js} +3 -3
  106. package/dist/dist-NxHLuq7w.js +6 -0
  107. package/dist/dist-S2JcqPPB.js +12 -0
  108. package/dist/{dist-CNvMOZu9.js → dist-XkGsOiy0.js} +2 -2
  109. package/dist/{dist-Drf3cyIW.js → dist-_tHnp24J.js} +3 -3
  110. package/dist/{dist-xLN9qCAp.js → dist-eSnWVS11.js} +3 -3
  111. package/dist/dist-hcPlrsR9.js +6 -0
  112. package/dist/{dist-DlK420ke.js → dist-owpR56zn.js} +1 -1
  113. package/dist/dist-poXa8G8m.js +6 -0
  114. package/dist/{dist-CTIyD_KU.js → dist-qGpLTiEi.js} +3 -3
  115. package/dist/{dockerfile-Cmlcqk35.js → dockerfile-CWWeWT3z.js} +1 -1
  116. package/dist/dtd-CGRYzaHQ.js +4 -0
  117. package/dist/dylan-Ctfki5HL.js +4 -0
  118. package/dist/ecl--gmEivzz.js +4 -0
  119. package/dist/eiffel-o31DRAP-.js +4 -0
  120. package/dist/elm-Dqa6TVIh.js +4 -0
  121. package/dist/{erDiagram-AWTI2OKA-BU7Qig7n.js → erDiagram-AWTI2OKA-BeadFjpg.js} +25 -25
  122. package/dist/erlang-BtVO_vQG.js +4 -0
  123. package/dist/error-banner-B7LmpmGT.js +1013 -0
  124. package/dist/{esm-Oo8OvZ6m.js → esm-CQIOyi5v.js} +579 -564
  125. package/dist/{factor-BZnBK3CG.js → factor-7tQNNEWF.js} +1 -1
  126. package/dist/factor-CNLvRc__.js +5 -0
  127. package/dist/{flowDiagram-PVAE7QVJ-JKJebWeY.js → flowDiagram-PVAE7QVJ-GgklUvqn.js} +27 -27
  128. package/dist/{formats-DOEuF6TR.js → formats-kyFd0DPJ.js} +23 -22
  129. package/dist/forth-Bp2zDfH-.js +4 -0
  130. package/dist/fortran-B3A-KieX.js +4 -0
  131. package/dist/{ganttDiagram-OWAHRB6G-BvWRfg05.js → ganttDiagram-OWAHRB6G-D5wYR6WK.js} +17 -17
  132. package/dist/gas-_Xt_kGOG.js +4 -0
  133. package/dist/gherkin-DzZpg8Ls.js +4 -0
  134. package/dist/gitGraph-ZV4HHKMB-DFGD7PPm.js +24 -0
  135. package/dist/{gitGraphDiagram-NY62KEGX-VEJJBf5L.js → gitGraphDiagram-NY62KEGX-DCwA-g9b.js} +38 -35
  136. package/dist/{glide-data-editor-Bne10icG.js → glide-data-editor-1bUl_mRe.js} +515 -515
  137. package/dist/graphlib-R11f1son.js +228 -0
  138. package/dist/groovy-BtD10jRQ.js +4 -0
  139. package/dist/haskell-C-JVWnIV.js +4 -0
  140. package/dist/haxe-Del5TcJQ.js +5 -0
  141. package/dist/idl-BLlRatde.js +4 -0
  142. package/dist/info-63CPKGFF-eZyiEu_4.js +24 -0
  143. package/dist/infoDiagram-STP46IZ2-CUr2vZlE.js +48 -0
  144. package/dist/{isEmpty-Do_v2sls.js → isEmpty-CIFmGKJN.js} +2 -2
  145. package/dist/isString-BsphYkXQ.js +9 -0
  146. package/dist/{isSymbol-CtkA8Y0a.js → isSymbol-BnxbuvDK.js} +1 -1
  147. package/dist/javascript-Bm7QL4E3.js +5 -0
  148. package/dist/jinja2-BxbImxq2.js +4 -0
  149. package/dist/{journeyDiagram-BIP6EPQ6-CsgEQgxh.js → journeyDiagram-BIP6EPQ6-DtjQC_m1.js} +10 -10
  150. package/dist/jsx-runtime-CvL6gNI-.js +22 -0
  151. package/dist/julia-DV1Vz9mw.js +4 -0
  152. package/dist/{kanban-definition-6OIFK2YF-Bi8Ete2P.js → kanban-definition-6OIFK2YF-U3q5gvb8.js} +19 -19
  153. package/dist/{katex-C-g3rKKt.js → katex-BWgzyQrl.js} +1 -1
  154. package/dist/{label-BiVIU_wb.js → label-Wr-xTlW7.js} +463 -453
  155. package/dist/{line-B7-GoF1m.js → line-C7OvOvNm.js} +3 -3
  156. package/dist/{linear-DeGGALuc.js → linear-CgANSWNu.js} +4 -4
  157. package/dist/livescript-9UMSMMrl.js +4 -0
  158. package/dist/{loader-BBqwtZWj.js → loader-Dj9XWZTh.js} +164 -4
  159. package/dist/lua-Bcbc7wWe.js +4 -0
  160. package/dist/main.js +40719 -41544
  161. package/dist/mathematica-DG4QUwYU.js +4 -0
  162. package/dist/mbox--auqAoPc.js +4 -0
  163. package/dist/{memoize-D7eDkf3R.js → memoize-XkDn33QI.js} +1 -1
  164. package/dist/{merge-C_6cGM6o.js → merge-dMlizkC5.js} +1 -1
  165. package/dist/{mermaid-BmtvsZ2m.js → mermaid-DIjoC4T4.js} +67 -66
  166. package/dist/{mermaid-parser.core-geyG_6o0.js → mermaid-parser.core-B433qyUL.js} +8 -8
  167. package/dist/{mhchem-OhAaJ0fA.js → mhchem-1x4KnXMF.js} +1 -1
  168. package/dist/min-WjLsUjBa.js +89 -0
  169. package/dist/{mindmap-definition-Q6HEUPPD-B-wmX1oG.js → mindmap-definition-Q6HEUPPD-LFgV4R8y.js} +24 -24
  170. package/dist/mirc-9dVcMicH.js +4 -0
  171. package/dist/mllike-Di9N4E3Q.js +6 -0
  172. package/dist/modelica-S3adENkL.js +4 -0
  173. package/dist/mscgen-DAG0zH4w.js +6 -0
  174. package/dist/mumps-afzuy08D.js +4 -0
  175. package/dist/{now-DumxsrcX.js → now-8WTe-KKa.js} +1 -1
  176. package/dist/nsis-Bzwy0lPH.js +5 -0
  177. package/dist/{nsis-D4bLR_Y1.js → nsis-CFb2Zrib.js} +1 -1
  178. package/dist/ntriples-D9oM8s3v.js +4 -0
  179. package/dist/{number-overlay-editor-D6r-48ka.js → number-overlay-editor-DYjnpjXo.js} +2 -2
  180. package/dist/octave-BMLCk2qM.js +4 -0
  181. package/dist/{once-3OSMKEsL.js → once-rI5AYku5.js} +1 -1
  182. package/dist/{ordinal-DpEbSVPc.js → ordinal-pQYxWJYN.js} +1 -1
  183. package/dist/oz-CX5JTWTK.js +4 -0
  184. package/dist/packet-HUATNLJX-BvWMmF9U.js +24 -0
  185. package/dist/pascal-BeZmsfFX.js +4 -0
  186. package/dist/perl-CZ_HryPN.js +4 -0
  187. package/dist/pie-WTHONI2E-BCXZJKz0.js +24 -0
  188. package/dist/{pieDiagram-ADFJNKIX-C3GvPNUL.js → pieDiagram-ADFJNKIX-CsZmho0o.js} +43 -40
  189. package/dist/pig-OPEEOu6V.js +4 -0
  190. package/dist/powershell-DyR-5LnA.js +4 -0
  191. package/dist/{precisionRound-7YYJq2rW.js → precisionRound-DMLkFNYv.js} +1 -1
  192. package/dist/properties-Cl4tecfb.js +4 -0
  193. package/dist/protobuf-B8X247vV.js +4 -0
  194. package/dist/pug-Kmpa-Pbv.js +5 -0
  195. package/dist/{pug-Dv3gE36O.js → pug-ZDYeT34w.js} +1 -1
  196. package/dist/puppet-Pl07qkSO.js +4 -0
  197. package/dist/python-DQgTXBpp.js +5 -0
  198. package/dist/q-D7uiP00h.js +4 -0
  199. package/dist/{quadrantDiagram-LMRXKWRM-DPXwGNVa.js → quadrantDiagram-LMRXKWRM-CY6GTOgM.js} +8 -8
  200. package/dist/r-DbUoToEd.js +4 -0
  201. package/dist/radar-NJJJXTRR-8kjOeCwx.js +24 -0
  202. package/dist/{range-CIbLpsrs.js → range-CTMc_Qhu.js} +3 -3
  203. package/dist/{react-plotly-DYyvxcRD.js → react-plotly-Cs07wkly.js} +2 -2
  204. package/dist/react-vega-B9eMrRW1.js +32035 -0
  205. package/dist/react-vega-DM3e8kar.js +25 -0
  206. package/dist/reduce-C-jV7KRY.js +268 -0
  207. package/dist/{requirementDiagram-4UW4RH46-Cs3Hqnm0.js → requirementDiagram-4UW4RH46-CfLWneBF.js} +24 -24
  208. package/dist/rpm-BjQFZZ1e.js +5 -0
  209. package/dist/ruby-BXpop5ZX.js +4 -0
  210. package/dist/{sankeyDiagram-GR3RE2ED-Be1d_Xf7.js → sankeyDiagram-GR3RE2ED-Dkxfzm6f.js} +7 -7
  211. package/dist/sas-CzFr9Hlz.js +4 -0
  212. package/dist/scheme-C6QRPvcm.js +4 -0
  213. package/dist/{sequenceDiagram-C3RYC4MD-lbtovKTa.js → sequenceDiagram-C3RYC4MD-hSi31Kfa.js} +14 -14
  214. package/dist/shell-Bs7FrcsL.js +4 -0
  215. package/dist/sieve-D39XRya9.js +4 -0
  216. package/dist/{slides-component-BoeQU7-s.js → slides-component-Ct11erUn.js} +9 -8
  217. package/dist/smalltalk-CdAwDOFE.js +4 -0
  218. package/dist/sparql-DsDWhEhN.js +4 -0
  219. package/dist/spec-rqRnkIf4.js +1256 -0
  220. package/dist/{src-BTqT1mA1.js → src-CKr0QbVy.js} +1 -1
  221. package/dist/{stateDiagram-KXAO66HF-BmbR-Rol.js → stateDiagram-KXAO66HF-DJsLA_DN.js} +42 -40
  222. package/dist/stateDiagram-v2-UMBNRL4Z-D-p_ngHt.js +39 -0
  223. package/dist/{step-2RJrMSSG.js → step-BsM8YHun.js} +1 -1
  224. package/dist/stex-DvqvBdH8.js +5 -0
  225. package/dist/style.css +1 -1
  226. package/dist/stylus-DxzxWmvV.js +4 -0
  227. package/dist/swift-DTC4Wg4z.js +4 -0
  228. package/dist/tcl-DantlS-i.js +4 -0
  229. package/dist/textile-pOphaahD.js +4 -0
  230. package/dist/{time-BB30r1tK.js → time-U9NHhrDC.js} +4 -4
  231. package/dist/{timeline-definition-XQNQX7LJ-1mv5caPW.js → timeline-definition-XQNQX7LJ-rojWjX6M.js} +7 -7
  232. package/dist/{toNumber-D3Ystr3y.js → toNumber-CUG0Hyhp.js} +2 -2
  233. package/dist/{toString-CbuxCRDG.js → toString-CT4n1k2E.js} +2 -2
  234. package/dist/toml-hgYsPM5p.js +4 -0
  235. package/dist/treemap-75Q7IDZK-Do1WIR9v.js +24 -0
  236. package/dist/troff-BwevrEUZ.js +4 -0
  237. package/dist/{dtd-RplB6hDg.js → ttcn-C5gJcxta.js} +2 -2
  238. package/dist/ttcn-cfg-CPKlfqST.js +4 -0
  239. package/dist/turtle-EH0lMhMf.js +4 -0
  240. package/dist/{types-BPohCsA7.js → types-Bt7p5SYB.js} +1028 -1038
  241. package/dist/uniq-DgSyegN3.js +8 -0
  242. package/dist/{useAsyncData-DHBqeb9a.js → useAsyncData-Dp2V69OV.js} +3 -3
  243. package/dist/{useIframeCapabilities-BEvvwlwt.js → useIframeCapabilities-B9u0SmJ4.js} +2 -2
  244. package/dist/{useTheme-CnMbo-iq.js → useTheme-D7vlj42b.js} +4 -4
  245. package/dist/vb-DNk7gts-.js +4 -0
  246. package/dist/vbscript-znK_5PUS.js +4 -0
  247. package/dist/vega-component-C58Jk3ub.js +633 -0
  248. package/dist/{vega-loader.browser.module-CFMtdrNw.js → vega-loader.browser-BK7-IO9k.js} +91 -99
  249. package/dist/velocity-DmPhlhdp.js +4 -0
  250. package/dist/verilog-CePnwf4S.js +4 -0
  251. package/dist/vhdl-Ckdh8uiO.js +4 -0
  252. package/dist/webidl-8N8qbzRd.js +4 -0
  253. package/dist/xquery-Cocyk-z0.js +4 -0
  254. package/dist/{xychartDiagram-6GGTOJPD-njc-naaw.js → xychartDiagram-6GGTOJPD-CiC1eONZ.js} +23 -23
  255. package/dist/yacas-CPmShRg-.js +4 -0
  256. package/dist/z80-B500UaFh.js +4 -0
  257. package/package.json +12 -9
  258. package/src/components/ai/ai-provider-icon.tsx +2 -1
  259. package/src/components/app-config/constants.ts +25 -1
  260. package/src/components/charts/lazy.tsx +7 -0
  261. package/src/components/charts/tooltip.ts +5 -0
  262. package/src/components/charts/types.ts +8 -0
  263. package/src/components/chat/acp/__tests__/state.test.ts +0 -13
  264. package/src/components/chat/acp/agent-panel.tsx +7 -1
  265. package/src/components/chat/acp/agent-selector.tsx +5 -0
  266. package/src/components/chat/acp/blocks.tsx +51 -8
  267. package/src/components/chat/acp/state.ts +8 -2
  268. package/src/components/chat/acp/thread.tsx +10 -3
  269. package/src/components/chat/chat-panel.tsx +7 -1
  270. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +473 -184
  271. package/src/components/data-table/__tests__/chart-spec-model.test.ts +32 -28
  272. package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +1 -1
  273. package/src/components/data-table/charts/__tests__/altair-generator.test.ts +162 -0
  274. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +1 -1
  275. package/src/components/data-table/charts/__tests__/spec.test.ts +145 -6
  276. package/src/components/data-table/charts/chart-spec/altair-generator.ts +6 -1
  277. package/src/components/data-table/charts/chart-spec/encodings.ts +11 -7
  278. package/src/components/data-table/charts/chart-spec/spec.ts +9 -8
  279. package/src/components/data-table/charts/chart-spec/tooltips.ts +4 -3
  280. package/src/components/data-table/charts/chart-spec/types.ts +1 -1
  281. package/src/components/data-table/charts/chart-spec/utils.ts +23 -0
  282. package/src/components/data-table/charts/components/form-fields.tsx +2 -2
  283. package/src/components/data-table/charts/constants.ts +7 -3
  284. package/src/components/data-table/charts/lazy-chart.tsx +15 -11
  285. package/src/components/data-table/charts/types.ts +6 -14
  286. package/src/components/data-table/column-summary/chart-spec-model.tsx +112 -269
  287. package/src/components/data-table/column-summary/column-summary.tsx +12 -12
  288. package/src/components/data-table/column-summary/legacy-chart-spec.ts +78 -2
  289. package/src/components/data-table/column-summary/utils.ts +1 -1
  290. package/src/components/datasources/__tests__/utils.test.ts +339 -138
  291. package/src/components/datasources/column-preview.tsx +9 -9
  292. package/src/components/datasources/datasources.tsx +4 -0
  293. package/src/components/datasources/utils.ts +94 -4
  294. package/src/components/editor/Output.tsx +9 -6
  295. package/src/components/editor/ai/ai-completion-editor.tsx +2 -2
  296. package/src/components/editor/code/readonly-diff.tsx +4 -0
  297. package/src/components/editor/output/ConsoleOutput.tsx +14 -11
  298. package/src/components/editor/renderers/slides-layout/types.ts +1 -1
  299. package/src/components/tracing/tracing-spec.ts +2 -2
  300. package/src/components/tracing/tracing.test.tsx +1 -1
  301. package/src/components/tracing/tracing.tsx +57 -74
  302. package/src/components/tracing/utils.ts +22 -0
  303. package/src/components/ui/query-param-preserving-link.tsx +48 -0
  304. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +12 -1
  305. package/src/core/ai/context/providers/cell-output.ts +2 -8
  306. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +1 -1
  307. package/src/core/ai/tools/edit-notebook-tool.ts +15 -7
  308. package/src/core/ai/tools/run-cells-tool.ts +60 -26
  309. package/src/core/cells/ids.ts +1 -1
  310. package/src/core/codemirror/language/__tests__/extension.test.ts +6 -12
  311. package/src/core/codemirror/language/__tests__/markdown.test.ts +23 -36
  312. package/src/core/codemirror/language/languages/python.ts +40 -6
  313. package/src/core/codemirror/language/languages/sql/completion-store.ts +2 -2
  314. package/src/core/codemirror/language/languages/sql/sql.ts +14 -0
  315. package/src/core/codemirror/language/languages/sql/utils.ts +54 -3
  316. package/src/core/codemirror/lsp/notebook-lsp.ts +52 -4
  317. package/src/core/codemirror/lsp/transports.ts +3 -0
  318. package/src/core/datasets/__tests__/data-source.test.ts +6 -0
  319. package/src/core/datasets/data-source-connections.ts +1 -0
  320. package/src/core/dom/__tests__/outline.test.ts +43 -0
  321. package/src/core/dom/outline.ts +1 -1
  322. package/src/core/islands/main.ts +2 -0
  323. package/src/core/lsp/__tests__/transport.test.ts +57 -0
  324. package/src/core/lsp/transport.ts +16 -0
  325. package/src/plugins/core/RenderHTML.tsx +26 -0
  326. package/src/plugins/core/sanitize.ts +8 -1
  327. package/src/plugins/impl/DataTablePlugin.tsx +21 -27
  328. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +26 -22
  329. package/src/plugins/impl/data-explorer/functions/function.ts +1 -2
  330. package/src/plugins/impl/data-explorer/functions/types.ts +65 -14
  331. package/src/plugins/impl/data-explorer/queries/queries.ts +9 -9
  332. package/src/plugins/impl/data-explorer/queries/types.ts +23 -5
  333. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +2 -1
  334. package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +2309 -0
  335. package/src/plugins/impl/vega/__tests__/encodings.test.ts +93 -0
  336. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +621 -0
  337. package/src/plugins/impl/vega/__tests__/params.test.ts +121 -1
  338. package/src/plugins/impl/vega/encodings.ts +16 -2
  339. package/src/plugins/impl/vega/make-selectable.ts +339 -10
  340. package/src/plugins/impl/vega/params.ts +76 -14
  341. package/src/plugins/impl/vega/types.ts +32 -13
  342. package/src/plugins/impl/vega/vega-component.tsx +74 -26
  343. package/src/plugins/impl/vega/vega.css +1 -0
  344. package/src/stories/__fixtures__/vega.ts +1 -1
  345. package/src/utils/arrays.ts +16 -0
  346. package/dist/_baseUniq-CKN9mEDq.js +0 -324
  347. package/dist/any-language-editor-Du2Q_6IK.js +0 -156
  348. package/dist/apl-CUm2DGqh.js +0 -4
  349. package/dist/architecture-O4VJ6CD3-PFw3eFBY.js +0 -21
  350. package/dist/asciiarmor-lqJ78U01.js +0 -4
  351. package/dist/asn1-CjwpSTlW.js +0 -4
  352. package/dist/brainfuck-ClvDI1dq.js +0 -4
  353. package/dist/classDiagram-KNZD7YFC-HUFFxNdk.js +0 -40
  354. package/dist/classDiagram-v2-RKCZMP56-Dw7Acmuf.js +0 -40
  355. package/dist/clojure-8GefCgPe.js +0 -4
  356. package/dist/cmake-yAhT9H0F.js +0 -4
  357. package/dist/cobol-BmltueOY.js +0 -4
  358. package/dist/coffeescript-C7KEQBcH.js +0 -4
  359. package/dist/commonlisp-CNbiJRU-.js +0 -4
  360. package/dist/crystal-OdjZZ8bc.js +0 -4
  361. package/dist/css-DhTxMmL_.js +0 -5
  362. package/dist/cypher-CgN8E3YI.js +0 -4
  363. package/dist/d-g41sJcBC.js +0 -4
  364. package/dist/diff-ViRYYhhg.js +0 -4
  365. package/dist/dist-BfJO8Bm9.js +0 -12
  366. package/dist/dist-CLuF3AtO.js +0 -6
  367. package/dist/dist-CU04U4NL.js +0 -10
  368. package/dist/dist-DNUT6b47.js +0 -6
  369. package/dist/dist-DbAb2sY7.js +0 -6
  370. package/dist/dist-DiDFQ2Rk.js +0 -6
  371. package/dist/dist-SNAyAOJ-.js +0 -6
  372. package/dist/dist-cbW5xJNV.js +0 -6
  373. package/dist/dist-h8eGLSbK.js +0 -10
  374. package/dist/dylan-BX8KJufP.js +0 -4
  375. package/dist/ecl-CWtLaNMH.js +0 -4
  376. package/dist/eiffel-C-mlZPMn.js +0 -4
  377. package/dist/elm-CWp06vcb.js +0 -4
  378. package/dist/erlang-pfp22AZM.js +0 -4
  379. package/dist/error-banner-BAWlXn49.js +0 -1012
  380. package/dist/esm-B2pocBPL.js +0 -26
  381. package/dist/esm-YVnxJqkD.js +0 -33066
  382. package/dist/factor-CEn53jua.js +0 -5
  383. package/dist/forth-CL8vu_y8.js +0 -4
  384. package/dist/fortran-DsmXkYtE.js +0 -4
  385. package/dist/gas-mYt9Rtlx.js +0 -4
  386. package/dist/gherkin-DHNCKBNj.js +0 -4
  387. package/dist/gitGraph-ZV4HHKMB-Cpd6k0O8.js +0 -21
  388. package/dist/graphlib-DRS8CrjA.js +0 -227
  389. package/dist/groovy-DzRtOS5a.js +0 -4
  390. package/dist/haskell-Bl9iT_Mp.js +0 -4
  391. package/dist/haxe-DqA0ED6k.js +0 -5
  392. package/dist/idl-WU2hil4i.js +0 -4
  393. package/dist/info-63CPKGFF-CG-xzUJo.js +0 -21
  394. package/dist/infoDiagram-STP46IZ2-zoRBGoup.js +0 -45
  395. package/dist/javascript-QY2BGJeV.js +0 -5
  396. package/dist/jinja2-Czleq7Sk.js +0 -4
  397. package/dist/jsx-runtime-DZyWJV5b.js +0 -31
  398. package/dist/julia-Dru3Qi0y.js +0 -4
  399. package/dist/livescript-Dxqi_HLT.js +0 -4
  400. package/dist/lua-ByH1cUQZ.js +0 -4
  401. package/dist/mathematica-CWJIFuES.js +0 -4
  402. package/dist/mbox-qhPIGaUI.js +0 -4
  403. package/dist/min-Dwa_NbP6.js +0 -93
  404. package/dist/mirc-yYcXhXBY.js +0 -4
  405. package/dist/mllike-BfT_Nl9x.js +0 -6
  406. package/dist/modelica-lVDtz1Rm.js +0 -4
  407. package/dist/mscgen-DvwdD1QJ.js +0 -6
  408. package/dist/mumps-BiY3GwKd.js +0 -4
  409. package/dist/nsis-Dk18Sq_4.js +0 -5
  410. package/dist/ntriples-Cj-8VqKF.js +0 -4
  411. package/dist/octave-BgFAaYjU.js +0 -4
  412. package/dist/oz-IsEG1I1m.js +0 -4
  413. package/dist/packet-HUATNLJX-Cafuo3IG.js +0 -21
  414. package/dist/pascal-BVf7FtIE.js +0 -4
  415. package/dist/perl-BM0-y4mZ.js +0 -4
  416. package/dist/pie-WTHONI2E-BE0pHBwB.js +0 -21
  417. package/dist/pig-CLBjzQmc.js +0 -4
  418. package/dist/powershell-B_qvE33J.js +0 -4
  419. package/dist/properties-CUTpsH2y.js +0 -4
  420. package/dist/protobuf-DqCP8a-0.js +0 -4
  421. package/dist/pug-BvexKkw4.js +0 -5
  422. package/dist/puppet-CoIi0R3f.js +0 -4
  423. package/dist/python-C-11-YMh.js +0 -5
  424. package/dist/q-CCVgEip7.js +0 -4
  425. package/dist/r-CIdR0Sfs.js +0 -4
  426. package/dist/radar-NJJJXTRR-0adgjw0u.js +0 -21
  427. package/dist/rpm-Dwvm039g.js +0 -5
  428. package/dist/ruby-DpTnO5gb.js +0 -4
  429. package/dist/sas-CK9boxgv.js +0 -4
  430. package/dist/scheme-Y1aYL-Qq.js +0 -4
  431. package/dist/shell-D3eXGsHd.js +0 -4
  432. package/dist/sieve-BdwSFdWJ.js +0 -4
  433. package/dist/smalltalk-BTYJquCm.js +0 -4
  434. package/dist/sparql-CYF0g4Cc.js +0 -4
  435. package/dist/stateDiagram-v2-UMBNRL4Z-DdJ7qVWc.js +0 -39
  436. package/dist/stex-CyWhoWHt.js +0 -5
  437. package/dist/stylus-BBiKaI2h.js +0 -4
  438. package/dist/swift-COb15qFR.js +0 -4
  439. package/dist/tcl-Jik1LXu9.js +0 -4
  440. package/dist/textile-BFHPD3wr.js +0 -4
  441. package/dist/toml-Brp9fBXs.js +0 -4
  442. package/dist/treemap-75Q7IDZK-CyBT8_Wh.js +0 -21
  443. package/dist/troff-CcZRW4vg.js +0 -4
  444. package/dist/tslib.es6-3ZL768sZ.js +0 -49
  445. package/dist/ttcn-Bz_6ifRd.js +0 -4
  446. package/dist/ttcn-cfg-v-yi2rKc.js +0 -4
  447. package/dist/turtle-CDOsZYhB.js +0 -4
  448. package/dist/useDateFormatter-BkbjKw83.js +0 -543
  449. package/dist/vb-CL7fRwRw.js +0 -4
  450. package/dist/vbscript-CR2xfxpw.js +0 -4
  451. package/dist/vega-component-BfFcXZxw.js +0 -465
  452. package/dist/velocity-CfuZoxPt.js +0 -4
  453. package/dist/verilog-CySTkzw_.js +0 -4
  454. package/dist/vhdl-Dvcd8KHW.js +0 -4
  455. package/dist/webidl-tbJt7sKk.js +0 -4
  456. package/dist/xquery-DJQVztyc.js +0 -4
  457. package/dist/yacas-BbgBReEH.js +0 -4
  458. package/dist/z80-DPyb8VGz.js +0 -4
  459. /package/dist/{_arrayReduce-Cd9xQjbl.js → _arrayReduce-CmsTTAw1.js} +0 -0
  460. /package/dist/{_baseSlice-CE9WsQZm.js → _baseSlice-CAnpEJwx.js} +0 -0
  461. /package/dist/{_hasUnicode-DkEebvtD.js → _hasUnicode-CbmCTPAa.js} +0 -0
  462. /package/dist/{apl-aGhy11IM.js → apl-Css595_H.js} +0 -0
  463. /package/dist/{array-DYSXIreg.js → array-D3smvOQ_.js} +0 -0
  464. /package/dist/{asciiarmor-DJKJ3Gkn.js → asciiarmor-BTCuJwxh.js} +0 -0
  465. /package/dist/{asn1-C6f5IeNs.js → asn1-DXjhS5QI.js} +0 -0
  466. /package/dist/{asterisk-DB1poX9_.js → asterisk-5HlmsIaw.js} +0 -0
  467. /package/dist/{brainfuck-Ch9vjun0.js → brainfuck--WlEc-iG.js} +0 -0
  468. /package/dist/{chunk-57QY23SG-BpXU7ph4.js → chunk-57QY23SG-D7ymhFFp.js} +0 -0
  469. /package/dist/{click-outside-container-2BH589Bq.js → click-outside-container-DSVM9sZw.js} +0 -0
  470. /package/dist/{clike-Bc2PZzZQ.js → clike-DDIJB_R8.js} +0 -0
  471. /package/dist/{clojure-B_lpr3zt.js → clojure-Z-GPBZyY.js} +0 -0
  472. /package/dist/{cmake-DaocNF4I.js → cmake-DncBqspt.js} +0 -0
  473. /package/dist/{cobol-suTPtt7c.js → cobol-DqUe0gl7.js} +0 -0
  474. /package/dist/{coffeescript-CPLIvtqJ.js → coffeescript-CH5_OO0H.js} +0 -0
  475. /package/dist/{colors-BXlG8Lmz.js → colors-DQmMCNWX.js} +0 -0
  476. /package/dist/{common-keywords-Bhll7O3b.js → common-keywords-CAEsQSF5.js} +0 -0
  477. /package/dist/{commonlisp-BqM3qFK7.js → commonlisp-UmhR9BfE.js} +0 -0
  478. /package/dist/{crystal-AsSFu4ke.js → crystal-5Sqf7MXt.js} +0 -0
  479. /package/dist/{css-Df7Sdeyh.js → css-bDybSxwf.js} +0 -0
  480. /package/dist/{cypher-CaVKL6Gu.js → cypher-PIeAFhrd.js} +0 -0
  481. /package/dist/{cytoscape.esm-BFEMljQI.js → cytoscape.esm-DclyBJ4D.js} +0 -0
  482. /package/dist/{d-DCGWK7NQ.js → d-Bd8EVRQt.js} +0 -0
  483. /package/dist/{defaultLocale-Cto8YOmX.js → defaultLocale-BPzjWfXP.js} +0 -0
  484. /package/dist/{defaultLocale-CYgZlqDF.js → defaultLocale-Om7Wxg5c.js} +0 -0
  485. /package/dist/{diff-CsxOM4Tr.js → diff-CAQdgtD6.js} +0 -0
  486. /package/dist/{dtd-Dwr0Jmks.js → dtd-eKW3pZj_.js} +0 -0
  487. /package/dist/{duckdb-keywords-7wAWf848.js → duckdb-keywords-BC3kWZZM.js} +0 -0
  488. /package/dist/{dylan-A7-ZBSey.js → dylan-CIO7R9Tr.js} +0 -0
  489. /package/dist/{ebnf-9_SaGDUz.js → ebnf-Pr4a9I6n.js} +0 -0
  490. /package/dist/{ecl-BzJVIQDc.js → ecl-BqYW-aOJ.js} +0 -0
  491. /package/dist/{eiffel-CO9eC_Op.js → eiffel-BOKM91eM.js} +0 -0
  492. /package/dist/{elm-CVAWj8SB.js → elm-3sobs3PV.js} +0 -0
  493. /package/dist/{emotion-is-prop-valid.esm-C3Yi5GQt.js → emotion-is-prop-valid.esm-Cm1uulbm.js} +0 -0
  494. /package/dist/{erlang-DWbZP546.js → erlang-C5EBzhP1.js} +0 -0
  495. /package/dist/{esm-AtKNNGYO.js → esm-CopBBL2y.js} +0 -0
  496. /package/dist/{fcl-CM9t2iay.js → fcl-Brh8s8q_.js} +0 -0
  497. /package/dist/{forth-BTYqUuu3.js → forth-DneRHr4K.js} +0 -0
  498. /package/dist/{fortran-DgAjHcCq.js → fortran-DsdmZbwQ.js} +0 -0
  499. /package/dist/{gas-BjDSWPZd.js → gas-DaoJ65Z9.js} +0 -0
  500. /package/dist/{gherkin-ClRqqpKv.js → gherkin-DUP_UlW-.js} +0 -0
  501. /package/dist/{groovy-BzNjnc8x.js → groovy-Rvyan8yX.js} +0 -0
  502. /package/dist/{haskell-DLdk34Jq.js → haskell-DIvpY54L.js} +0 -0
  503. /package/dist/{haxe-l6gaY_IS.js → haxe-Da_5bBNs.js} +0 -0
  504. /package/dist/{http-6Qg7z_h2.js → http-CMvcwl3E.js} +0 -0
  505. /package/dist/{idl-hlWT4D26.js → idl-DvL3aO0N.js} +0 -0
  506. /package/dist/{init-tZ42Torz.js → init-BNp5RczD.js} +0 -0
  507. /package/dist/{invariant-D3JoRb4I.js → invariant-Cl2wkkjN.js} +0 -0
  508. /package/dist/{isArrayLikeObject-DU5MCuQM.js → isArrayLikeObject-1qkWxZbL.js} +0 -0
  509. /package/dist/{javascript-DGukg1sB.js → javascript-DoyAP8vn.js} +0 -0
  510. /package/dist/{jinja2-DI5k_Er3.js → jinja2-Veqp7mFj.js} +0 -0
  511. /package/dist/{julia-BvDZDiIT.js → julia-Gi684CX7.js} +0 -0
  512. /package/dist/{katex-DgfMWJY9.js → katex-U6RPAuWM.js} +0 -0
  513. /package/dist/{livescript-2YMQfkfI.js → livescript-BKj_Zhvo.js} +0 -0
  514. /package/dist/{lua-DIUrQRfA.js → lua-CDA7hreG.js} +0 -0
  515. /package/dist/{main-BMTpe7M0.js → main-63eIj2Yx.js} +0 -0
  516. /package/dist/{marked.esm-DkVwEwtO.js → marked.esm-DE8HU3tw.js} +0 -0
  517. /package/dist/{math-qsHyz2Eo.js → math-C2iLT5gz.js} +0 -0
  518. /package/dist/{mathematica-Dqmg_BwL.js → mathematica-GWfSHReY.js} +0 -0
  519. /package/dist/{mbox-Cng-P-F1.js → mbox-Dwsrc4Ak.js} +0 -0
  520. /package/dist/{mirc-CNDqOVhQ.js → mirc-B2JE5ype.js} +0 -0
  521. /package/dist/{mllike-C1n2UDyX.js → mllike-BkBh4PFX.js} +0 -0
  522. /package/dist/{modelica-QqQC2pFj.js → modelica-C0hNlKgR.js} +0 -0
  523. /package/dist/{mscgen-C3fl8uhp.js → mscgen-DWWpdZnb.js} +0 -0
  524. /package/dist/{mumps-BeCUbMej.js → mumps-CMePAlSe.js} +0 -0
  525. /package/dist/{nginx-ejv7DsBz.js → nginx-GurZbX0E.js} +0 -0
  526. /package/dist/{node-sql-parser-CoPWN4hn.js → node-sql-parser-IKID_dZE.js} +0 -0
  527. /package/dist/{ntriples-CUgUpcma.js → ntriples-BnE6tX0Y.js} +0 -0
  528. /package/dist/{octave-BD652tGl.js → octave-Dfu3PmNP.js} +0 -0
  529. /package/dist/{oz-DrRsFa0K.js → oz-DqNpAjpZ.js} +0 -0
  530. /package/dist/{pascal-hpcx9sVn.js → pascal-GP_8jbNL.js} +0 -0
  531. /package/dist/{path-Bbv2tLY1.js → path-BeMi_1Je.js} +0 -0
  532. /package/dist/{perl-DW8XHeFc.js → perl-DUDEqQOD.js} +0 -0
  533. /package/dist/{pig-Cv7Nxbfo.js → pig-Csr4LnKs.js} +0 -0
  534. /package/dist/{powershell-Dr7WZMDU.js → powershell-Cw4tDKZx.js} +0 -0
  535. /package/dist/{prop-types-Bd16OEUP.js → prop-types-CzOfzj9N.js} +0 -0
  536. /package/dist/{properties-D-qJDXAM.js → properties-CUhUGfHR.js} +0 -0
  537. /package/dist/{protobuf-B48QZbd3.js → protobuf-CPZe957V.js} +0 -0
  538. /package/dist/{puppet-15JDyiY2.js → puppet-BP1AOwo6.js} +0 -0
  539. /package/dist/{purify.es-CrfFzTyi.js → purify.es-CDFkadZl.js} +0 -0
  540. /package/dist/{python-DWkQA94h.js → python-BMcMimC3.js} +0 -0
  541. /package/dist/{q-BzRpKgfd.js → q-BNfSHUci.js} +0 -0
  542. /package/dist/{r-dcNRe_Q8.js → r-DiJzLRZc.js} +0 -0
  543. /package/dist/{range-CQvYp_qE.js → range-sX2tw-Jz.js} +0 -0
  544. /package/dist/{react-dom-CpBooCbY.js → react-dom-BTjywDxo.js} +0 -0
  545. /package/dist/{rpm-Djl3Dsf1.js → rpm-CywAxCKo.js} +0 -0
  546. /package/dist/{ruby-Dd2CZTip.js → ruby-B0a4mSSU.js} +0 -0
  547. /package/dist/{sas-DYF5_Iqu.js → sas-DTh30wZQ.js} +0 -0
  548. /package/dist/{scheme-YtWcji1H.js → scheme-CsOlAIFf.js} +0 -0
  549. /package/dist/{shell-C3uC3Y0Z.js → shell-7w75P-tg.js} +0 -0
  550. /package/dist/{sieve-DHB17sQG.js → sieve-BphUEMa4.js} +0 -0
  551. /package/dist/{simple-mode-BMmwP_vI.js → simple-mode-BcThS5Pa.js} +0 -0
  552. /package/dist/{smalltalk-Y5v1Np3H.js → smalltalk-CHwdNey_.js} +0 -0
  553. /package/dist/{solr-DvRJLlRD.js → solr-CuWbYJLt.js} +0 -0
  554. /package/dist/{sparql-BEt3GJwM.js → sparql-BtwCqUvT.js} +0 -0
  555. /package/dist/{spreadsheet-Dp4B9_rc.js → spreadsheet-C1JzeuKn.js} +0 -0
  556. /package/dist/{sql-DBsUs8nQ.js → sql-wv_2DQzf.js} +0 -0
  557. /package/dist/{stex-C6-x52ei.js → stex-BmcrV7cx.js} +0 -0
  558. /package/dist/{stylus-DroA8via.js → stylus-SVJ7TGPh.js} +0 -0
  559. /package/dist/{swift-DR0x1ESK.js → swift-f7KaABxm.js} +0 -0
  560. /package/dist/{tcl-BeuTFc_c.js → tcl-CbTFkeHJ.js} +0 -0
  561. /package/dist/{textile-C0ikhHN3.js → textile-CFn6QLRy.js} +0 -0
  562. /package/dist/{tiddlywiki-C_2Nvsgu.js → tiddlywiki-DBhMcdVM.js} +0 -0
  563. /package/dist/{tiki-CKQlhmQQ.js → tiki-CqcXr_YN.js} +0 -0
  564. /package/dist/{timer-CcUhugb0.js → timer-ly0jlpkr.js} +0 -0
  565. /package/dist/{toml-BqNUJWRI.js → toml-YgDIoI1n.js} +0 -0
  566. /package/dist/{treemap-BYLUKIzA.js → treemap-D5sUCpbF.js} +0 -0
  567. /package/dist/{troff-DkK0f2ZH.js → troff-CIp_4RXg.js} +0 -0
  568. /package/dist/{ttcn-Bf8vrg-_.js → ttcn-Yn_uOBYK.js} +0 -0
  569. /package/dist/{ttcn-cfg-DjCKzd95.js → ttcn-cfg-BVum2rmM.js} +0 -0
  570. /package/dist/{turtle-SSc84S9m.js → turtle-BeWx-YoQ.js} +0 -0
  571. /package/dist/{vb-CQ6DC3cL.js → vb-DKEmSA_2.js} +0 -0
  572. /package/dist/{vbscript-Dw0gFssg.js → vbscript-BPsxuP0n.js} +0 -0
  573. /package/dist/{velocity-BvJQyBmj.js → velocity-ycm1NvlO.js} +0 -0
  574. /package/dist/{verilog-CKGAvQjj.js → verilog-ogjm0Ytr.js} +0 -0
  575. /package/dist/{vhdl-B40_x6fM.js → vhdl-BvjyOM9y.js} +0 -0
  576. /package/dist/{webidl-Bi9hczCv.js → webidl-QdwcTYEu.js} +0 -0
  577. /package/dist/{xquery-DwWUXvP3.js → xquery-BErHIIc-.js} +0 -0
  578. /package/dist/{yacas-ClUs0mmH.js → yacas-BBBJNs0h.js} +0 -0
  579. /package/dist/{z80-DPC4UGzR.js → z80-nG9RRukG.js} +0 -0
  580. /package/dist/{zod-mAEs2ITo.js → zod-0AbTN3Cg.js} +0 -0
@@ -1,7 +1,11 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ import { BigQueryDialect } from "@marimo-team/codemirror-sql/dialects";
4
+ import { isKnownDialect } from "@/core/codemirror/language/languages/sql/utils";
2
5
  import type { SQLTableContext } from "@/core/datasets/data-source-connections";
3
6
  import { DUCKDB_ENGINE } from "@/core/datasets/engines";
4
7
  import type { DataTable, DataType } from "@/core/kernel/messages";
8
+ import { logNever } from "@/utils/assertNever";
5
9
  import type { ColumnHeaderStatsKey } from "../data-table/types";
6
10
 
7
11
  // Some databases have no schemas, so we don't show it (eg. Clickhouse)
@@ -9,6 +13,79 @@ export function isSchemaless(schemaName: string) {
9
13
  return schemaName === "";
10
14
  }
11
15
 
16
+ interface SqlCodeFormatter {
17
+ /**
18
+ * Format the table name based on dialect-specific rules
19
+ */
20
+ formatTableName: (tableName: string) => string;
21
+ /**
22
+ * Format the SELECT clause
23
+ */
24
+ formatSelectClause: (columnName: string, tableName: string) => string;
25
+ }
26
+
27
+ const defaultFormatter: SqlCodeFormatter = {
28
+ formatTableName: (tableName: string) => tableName,
29
+ formatSelectClause: (columnName: string, tableName: string) =>
30
+ `SELECT ${columnName} FROM ${tableName} LIMIT 100`,
31
+ };
32
+
33
+ function getFormatter(dialect: string): SqlCodeFormatter {
34
+ dialect = dialect.toLowerCase();
35
+ if (!isKnownDialect(dialect)) {
36
+ return defaultFormatter;
37
+ }
38
+
39
+ switch (dialect) {
40
+ case "bigquery": {
41
+ const quote = BigQueryDialect.spec.identifierQuotes;
42
+ return {
43
+ // BigQuery uses backticks for identifiers
44
+ formatTableName: (tableName: string) => `${quote}${tableName}${quote}`,
45
+ formatSelectClause: defaultFormatter.formatSelectClause,
46
+ };
47
+ }
48
+ case "mssql":
49
+ case "sqlserver":
50
+ return {
51
+ formatTableName: defaultFormatter.formatTableName,
52
+ formatSelectClause: (columnName: string, tableName: string) =>
53
+ `SELECT TOP 100 ${columnName} FROM ${tableName}`,
54
+ };
55
+ case "timescaledb":
56
+ case "postgres":
57
+ case "postgresql":
58
+ case "duckdb":
59
+ // Quote column and table names to avoid raising errors on weird characters
60
+ return {
61
+ formatTableName: (tableName: string) => {
62
+ const parts = tableName.split(".");
63
+ return parts.map((part) => `"${part}"`).join(".");
64
+ },
65
+ formatSelectClause: (columnName: string, tableName: string) =>
66
+ `SELECT ${columnName === "*" ? "*" : `"${columnName}"`} FROM ${tableName} LIMIT 100`,
67
+ };
68
+ case "db2":
69
+ case "mysql":
70
+ case "sqlite":
71
+ case "mariadb":
72
+ case "cassandra":
73
+ case "noql":
74
+ case "athena":
75
+ case "hive":
76
+ case "redshift":
77
+ case "snowflake":
78
+ case "flink":
79
+ case "mongodb":
80
+ case "oracle":
81
+ case "oracledb":
82
+ return defaultFormatter;
83
+ default:
84
+ logNever(dialect);
85
+ return defaultFormatter;
86
+ }
87
+ }
88
+
12
89
  export function sqlCode({
13
90
  table,
14
91
  columnName,
@@ -19,8 +96,14 @@ export function sqlCode({
19
96
  sqlTableContext?: SQLTableContext;
20
97
  }) {
21
98
  if (sqlTableContext) {
22
- const { engine, schema, defaultSchema, defaultDatabase, database } =
23
- sqlTableContext;
99
+ const {
100
+ engine,
101
+ schema,
102
+ defaultSchema,
103
+ defaultDatabase,
104
+ database,
105
+ dialect,
106
+ } = sqlTableContext;
24
107
  let tableName = table.name;
25
108
 
26
109
  // Set the fully qualified table name based on schema and database
@@ -39,11 +122,18 @@ export function sqlCode({
39
122
  }
40
123
  }
41
124
 
125
+ const formatter = getFormatter(dialect);
126
+ const formattedTableName = formatter.formatTableName(tableName);
127
+ const selectClause = formatter.formatSelectClause(
128
+ columnName,
129
+ formattedTableName,
130
+ );
131
+
42
132
  if (engine === DUCKDB_ENGINE) {
43
- return `_df = mo.sql(f"SELECT ${columnName} FROM ${tableName} LIMIT 100")`;
133
+ return `_df = mo.sql(f"""\n${selectClause}\n""")`;
44
134
  }
45
135
 
46
- return `_df = mo.sql(f"SELECT ${columnName} FROM ${tableName} LIMIT 100", engine=${engine})`;
136
+ return `_df = mo.sql(f"""\n${selectClause}\n""", engine=${engine})`;
47
137
  }
48
138
 
49
139
  return `_df = mo.sql(f'SELECT "${columnName}" FROM ${table.name} LIMIT 100')`;
@@ -25,6 +25,7 @@ import {
25
25
  ChevronsUpDownIcon,
26
26
  ExpandIcon,
27
27
  } from "lucide-react";
28
+ import { tooltipHandler } from "@/components/charts/tooltip";
28
29
  import { useExpandedOutput } from "@/core/cells/outputs";
29
30
  import { useIframeCapabilities } from "@/hooks/useIframeCapabilities";
30
31
  import { renderHTML } from "@/plugins/core/RenderHTML";
@@ -34,6 +35,7 @@ import { useTheme } from "@/theme/useTheme";
34
35
  import { Events } from "@/utils/events";
35
36
  import { invariant } from "@/utils/invariant";
36
37
  import { Objects } from "@/utils/objects";
38
+ import { LazyVegaEmbed } from "../charts/lazy";
37
39
  import { ChartLoadingState } from "../data-table/charts/components/chart-states";
38
40
  import { Button } from "../ui/button";
39
41
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
@@ -42,10 +44,6 @@ import { CsvViewer } from "./file-tree/renderers";
42
44
  import { MarimoTracebackOutput } from "./output/MarimoTracebackOutput";
43
45
  import { renderMimeIcon } from "./renderMimeIcon";
44
46
 
45
- const LazyVegaLite = React.lazy(() =>
46
- import("react-vega").then((m) => ({ default: m.VegaLite })),
47
- );
48
-
49
47
  type MimeBundle = Record<OutputMessage["mimetype"], { [key: string]: unknown }>;
50
48
  type MimeBundleOrTuple = MimeBundle | [MimeBundle, { [key: string]: unknown }];
51
49
 
@@ -177,9 +175,14 @@ export const OutputRenderer: React.FC<{
177
175
  case "application/vnd.vega.v5+json":
178
176
  return (
179
177
  <Suspense fallback={<ChartLoadingState />}>
180
- <LazyVegaLite
178
+ <LazyVegaEmbed
181
179
  spec={parsedJsonData as TopLevelFacetedUnitSpec}
182
- theme={theme === "dark" ? "dark" : undefined}
180
+ options={{
181
+ theme: theme === "dark" ? "dark" : undefined,
182
+ mode: "vega-lite",
183
+ tooltip: tooltipHandler.call,
184
+ renderer: "canvas",
185
+ }}
183
186
  />
184
187
  </Suspense>
185
188
  );
@@ -409,14 +409,14 @@ const CompletionBanner: React.FC<CompletionBannerProps> = ({
409
409
  <div className="flex flex-row items-center gap-2">
410
410
  {isLoading ? (
411
411
  <Loader2Icon
412
- className="animate-spin text-blue-600 mb-[1px]"
412
+ className="animate-spin text-blue-600 mb-px"
413
413
  size={15}
414
414
  strokeWidth={2}
415
415
  aria-label="Generating fix"
416
416
  />
417
417
  ) : (
418
418
  <CircleCheckIcon
419
- className="text-green-600 mb-[1px]"
419
+ className="text-green-600 mb-px"
420
420
  size={15}
421
421
  strokeWidth={2}
422
422
  aria-label="Fix generated"
@@ -15,6 +15,10 @@ export const ReadonlyDiff = memo(
15
15
  unifiedMergeView({
16
16
  original: props.original,
17
17
  mergeControls: false,
18
+ collapseUnchanged: {
19
+ margin: 3,
20
+ minSize: 4,
21
+ },
18
22
  }),
19
23
  ];
20
24
  }, [props.original, props.modified, theme]);
@@ -115,17 +115,7 @@ const ConsoleOutputInternal = (props: Props): React.ReactNode => {
115
115
  const getOutputString = (): string => {
116
116
  const text = consoleOutputs
117
117
  .filter((output) => output.channel !== "pdb")
118
- .map((output) => {
119
- if (
120
- output.mimetype.startsWith("application/vnd.marimo") ||
121
- output.mimetype === "text/html"
122
- ) {
123
- return parseHtmlContent(Strings.asString(output.data));
124
- }
125
-
126
- // Convert ANSI to HTML, then parse as HTML
127
- return ansiToPlainText(Strings.asString(output.data));
128
- })
118
+ .map((output) => processOutput(output))
129
119
  .join("\n");
130
120
  return text;
131
121
  };
@@ -282,3 +272,16 @@ const renderText = (text: string | null) => {
282
272
  <span dangerouslySetInnerHTML={{ __html: ansiUp.ansi_to_html(text) }} />
283
273
  );
284
274
  };
275
+
276
+ /** Convert cell or console output to a string, while handling html and ansi codes */
277
+ export const processOutput = (output: OutputMessage): string => {
278
+ if (
279
+ output.mimetype.startsWith("application/vnd.marimo") ||
280
+ output.mimetype === "text/html"
281
+ ) {
282
+ return parseHtmlContent(Strings.asString(output.data));
283
+ }
284
+
285
+ // Convert ANSI to HTML, then parse as HTML
286
+ return ansiToPlainText(Strings.asString(output.data));
287
+ };
@@ -5,7 +5,7 @@
5
5
  * The serialized form of a slides layout.
6
6
  * This must be backwards-compatible as it is stored on the user's disk.
7
7
  */
8
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
8
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
9
9
  export type SerializedSlidesLayout = {};
10
10
 
11
11
  export interface SlidesLayout extends SerializedSlidesLayout {
@@ -1,7 +1,7 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import type { TopLevelSpec } from "vega-lite";
4
- import type { TimeUnit } from "vega-lite/build/src/timeunit";
4
+ import type { TimeUnit } from "vega-typings";
5
5
  import type { CellId } from "@/core/cells/ids";
6
6
  import type { CellRun } from "@/core/cells/runs";
7
7
  import type { ResolvedTheme } from "@/theme/useTheme";
@@ -34,7 +34,7 @@ export function createGanttBaseSpec(
34
34
  // @ts-expect-error - Supported by vega/vega-lite but invalid "TimeUnit" option from exported type
35
35
  const timeUnit: TimeUnit = "hoursminutessecondsmilliseconds";
36
36
  return {
37
- $schema: "https://vega.github.io/schema/vega-lite/v5.json",
37
+ $schema: "https://vega.github.io/schema/vega-lite/v6.json",
38
38
  background: theme === "dark" ? "black" : undefined,
39
39
  mark: {
40
40
  type: "bar",
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
  import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
3
- import { formatChartTime } from "./tracing";
3
+ import { formatChartTime } from "./utils";
4
4
 
5
5
  describe("formatChartTime", () => {
6
6
  beforeAll(() => {
@@ -10,8 +10,8 @@ import {
10
10
  CirclePlayIcon,
11
11
  CircleX,
12
12
  } from "lucide-react";
13
- import React, { type JSX, Suspense, useRef, useState } from "react";
14
- import type { SignalListeners, VisualizationSpec } from "react-vega";
13
+ import React, { type JSX, Suspense, useEffect, useRef, useState } from "react";
14
+ import { useVegaEmbed } from "react-vega";
15
15
  import useResizeObserver from "use-resize-observer";
16
16
  import { compile } from "vega-lite";
17
17
  import { Tooltip } from "@/components/ui/tooltip";
@@ -28,6 +28,7 @@ import {
28
28
  import { type ResolvedTheme, useTheme } from "@/theme/useTheme";
29
29
  import { cn } from "@/utils/cn";
30
30
  import { ClearButton } from "../buttons/clear-button";
31
+ import type { SignalListener } from "../charts/types";
31
32
  import { ElapsedTime, formatElapsedTime } from "../editor/cell/CellStatus";
32
33
  import { PanelEmptyState } from "../editor/chrome/panels/empty-state";
33
34
  import { CellLink } from "../editor/links/cell-link";
@@ -37,6 +38,7 @@ import {
37
38
  createGanttBaseSpec,
38
39
  VEGA_HOVER_SIGNAL,
39
40
  } from "./tracing-spec";
41
+ import { formatChartTime } from "./utils";
40
42
 
41
43
  const expandedRunsAtom = atom<Map<RunId, boolean>>(new Map<RunId, boolean>());
42
44
 
@@ -101,42 +103,13 @@ export const Tracing: React.FC = () => {
101
103
  />
102
104
  );
103
105
  }
106
+ return null;
104
107
  })}
105
108
  </div>
106
109
  </div>
107
110
  );
108
111
  };
109
112
 
110
- // Using vega instead of vegaLite as some parts of the spec get interpreted as vega & will throw warnings
111
- const LazyVega = React.lazy(() =>
112
- import("react-vega").then((m) => ({ default: m.Vega })),
113
- );
114
- interface ChartProps {
115
- className?: string;
116
- height: number;
117
- vegaSpec: VisualizationSpec;
118
- signalListeners: SignalListeners;
119
- theme: ResolvedTheme;
120
- }
121
-
122
- const Chart: React.FC<ChartProps> = (props: ChartProps) => {
123
- const { ref, width = 300 } = useResizeObserver<HTMLDivElement>();
124
- return (
125
- <div className={props.className} ref={ref}>
126
- <Suspense>
127
- <LazyVega
128
- spec={props.vegaSpec}
129
- theme={props.theme === "dark" ? "dark" : undefined}
130
- width={width - 50}
131
- height={props.height}
132
- signalListeners={props.signalListeners}
133
- actions={false}
134
- />
135
- </Suspense>
136
- </div>
137
- );
138
- };
139
-
140
113
  interface VegaHoverCellSignal {
141
114
  cell: string[];
142
115
  vlPoint: unknown;
@@ -201,14 +174,8 @@ const TraceBlockBody: React.FC<{
201
174
  title: React.ReactNode;
202
175
  }> = ({ run, chartPosition, theme, title }) => {
203
176
  const [hoveredCellId, setHoveredCellId] = useState<CellId | null>();
204
-
205
- const handleVegaSignal = {
206
- [VEGA_HOVER_SIGNAL]: (_name: string, value: unknown) => {
207
- const signalValue = value as VegaHoverCellSignal;
208
- const hoveredCell = signalValue.cell?.[0] as CellId | undefined;
209
- setHoveredCellId(hoveredCell ?? null);
210
- },
211
- };
177
+ const vegaRef = useRef<HTMLDivElement>(null);
178
+ const { ref, width = 300 } = useResizeObserver<HTMLDivElement>();
212
179
 
213
180
  const cellIds = useCellIds();
214
181
 
@@ -236,6 +203,43 @@ const TraceBlockBody: React.FC<{
236
203
  ),
237
204
  ).spec;
238
205
 
206
+ const embed = useVegaEmbed({
207
+ ref: vegaRef,
208
+ spec: vegaSpec,
209
+ options: {
210
+ theme: theme === "dark" ? "dark" : undefined,
211
+ width: width - 50,
212
+ height: chartPosition === "above" ? 120 : 100,
213
+ actions: false,
214
+ // Using vega instead of vegaLite as some parts of the spec get interpreted as vega & will throw warnings
215
+ mode: "vega",
216
+ renderer: "canvas",
217
+ },
218
+ });
219
+
220
+ useEffect(() => {
221
+ const signalListeners: SignalListener[] = [
222
+ {
223
+ signalName: VEGA_HOVER_SIGNAL,
224
+ handler: (_name: string, value: unknown) => {
225
+ const signalValue = value as VegaHoverCellSignal;
226
+ const hoveredCell = signalValue.cell?.[0] as CellId | undefined;
227
+ setHoveredCellId(hoveredCell ?? null);
228
+ },
229
+ },
230
+ ];
231
+
232
+ signalListeners.forEach(({ signalName, handler }) => {
233
+ embed?.view.addSignalListener(signalName, handler);
234
+ });
235
+
236
+ return () => {
237
+ signalListeners.forEach(({ signalName, handler }) => {
238
+ embed?.view.removeSignalListener(signalName, handler);
239
+ });
240
+ };
241
+ }, [embed]);
242
+
239
243
  const traceRows = (
240
244
  <TraceRows
241
245
  run={run}
@@ -244,17 +248,23 @@ const TraceBlockBody: React.FC<{
244
248
  />
245
249
  );
246
250
 
251
+ const chartElement = (
252
+ <div
253
+ className={chartPosition === "sideBySide" ? "-mt-0.5 flex-1" : ""}
254
+ ref={ref}
255
+ >
256
+ <Suspense>
257
+ <div ref={vegaRef} />
258
+ </Suspense>
259
+ </div>
260
+ );
261
+
247
262
  if (chartPosition === "above") {
248
263
  return (
249
264
  <div key={run.runId} className="flex flex-col">
250
265
  <pre className="font-mono font-semibold">
251
266
  {title}
252
- <Chart
253
- vegaSpec={vegaSpec}
254
- height={120}
255
- signalListeners={handleVegaSignal}
256
- theme={theme}
257
- />
267
+ {chartElement}
258
268
  {traceRows}
259
269
  </pre>
260
270
  </div>
@@ -267,13 +277,7 @@ const TraceBlockBody: React.FC<{
267
277
  {title}
268
278
  {traceRows}
269
279
  </pre>
270
- <Chart
271
- className="-mt-0.5 flex-1"
272
- vegaSpec={vegaSpec}
273
- height={100}
274
- signalListeners={handleVegaSignal}
275
- theme={theme}
276
- />
280
+ {chartElement}
277
281
  </div>
278
282
  );
279
283
  };
@@ -387,24 +391,3 @@ const TraceRow: React.FC<TraceRowProps> = ({
387
391
  </div>
388
392
  );
389
393
  };
390
-
391
- export function formatChartTime(timestamp: number): string {
392
- try {
393
- // Multiply by 1000 to convert seconds to milliseconds
394
- const date = new Date(timestamp * 1000);
395
-
396
- const year = date.getFullYear();
397
- const month = String(date.getMonth() + 1).padStart(2, "0"); // getMonth() is 0-indexed
398
- const day = String(date.getDate()).padStart(2, "0");
399
-
400
- const hours = String(date.getHours()).padStart(2, "0");
401
- const minutes = String(date.getMinutes()).padStart(2, "0");
402
- const seconds = String(date.getSeconds()).padStart(2, "0");
403
-
404
- const milliseconds = String(date.getMilliseconds()).padStart(3, "0");
405
-
406
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds}`;
407
- } catch {
408
- return "";
409
- }
410
- }
@@ -0,0 +1,22 @@
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ export function formatChartTime(timestamp: number): string {
4
+ try {
5
+ // Multiply by 1000 to convert seconds to milliseconds
6
+ const date = new Date(timestamp * 1000);
7
+
8
+ const year = date.getFullYear();
9
+ const month = String(date.getMonth() + 1).padStart(2, "0"); // getMonth() is 0-indexed
10
+ const day = String(date.getDate()).padStart(2, "0");
11
+
12
+ const hours = String(date.getHours()).padStart(2, "0");
13
+ const minutes = String(date.getMinutes()).padStart(2, "0");
14
+ const seconds = String(date.getSeconds()).padStart(2, "0");
15
+
16
+ const milliseconds = String(date.getMilliseconds()).padStart(3, "0");
17
+
18
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds}`;
19
+ } catch {
20
+ return "";
21
+ }
22
+ }
@@ -0,0 +1,48 @@
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ import React, { useRef } from "react";
4
+ import { usePress } from "react-aria";
5
+
6
+ interface QueryParamPreservingLinkProps
7
+ extends Omit<React.HTMLAttributes<HTMLAnchorElement>, "href"> {
8
+ href: string;
9
+ children: React.ReactNode;
10
+ }
11
+
12
+ export const QueryParamPreservingLink: React.FC<
13
+ QueryParamPreservingLinkProps
14
+ > = ({ href, children, ...props }) => {
15
+ const ref = useRef<HTMLAnchorElement>(null);
16
+
17
+ const navigateWithQueryParams = () => {
18
+ const currentUrl = new URL(globalThis.location.href);
19
+ // Preserve existing query parameters and update the hash
20
+ currentUrl.hash = href;
21
+ globalThis.history.pushState({}, "", currentUrl.toString());
22
+
23
+ // Scroll to the anchor
24
+ const targetId = href.slice(1);
25
+ const targetElement = document.getElementById(targetId);
26
+ if (targetElement) {
27
+ targetElement.scrollIntoView({ behavior: "smooth", block: "start" });
28
+ }
29
+ };
30
+
31
+ const { pressProps } = usePress({
32
+ onPress: () => {
33
+ navigateWithQueryParams();
34
+ },
35
+ });
36
+
37
+ // For anchor links, we need to prevent default navigation
38
+ const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
39
+ e.preventDefault();
40
+ navigateWithQueryParams();
41
+ };
42
+
43
+ return (
44
+ <a ref={ref} href={href} {...pressProps} onClick={handleClick} {...props}>
45
+ {children}
46
+ </a>
47
+ );
48
+ };
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
- import { beforeEach, describe, expect, it, vi } from "vitest";
3
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
4
  import { Mocks } from "@/__mocks__/common";
5
5
 
6
6
  // Mock the external dependencies
@@ -320,8 +320,12 @@ describe("Cell output utility functions", () => {
320
320
  describe("HTML content parsing", () => {
321
321
  let provider: CellOutputContextProvider;
322
322
  let mockStore: JotaiStore;
323
+ let originalCreateElement: typeof document.createElement;
323
324
 
324
325
  beforeEach(() => {
326
+ // Save original createElement
327
+ originalCreateElement = document.createElement;
328
+
325
329
  // Mock DOM methods for HTML parsing
326
330
  const mockDiv = {
327
331
  innerHTML: "",
@@ -343,6 +347,13 @@ describe("Cell output utility functions", () => {
343
347
  provider = new CellOutputContextProvider(mockStore);
344
348
  });
345
349
 
350
+ afterEach(() => {
351
+ // Restore original createElement to prevent mock pollution
352
+ if (originalCreateElement) {
353
+ document.createElement = originalCreateElement;
354
+ }
355
+ });
356
+
346
357
  it("should extract text content from HTML", () => {
347
358
  const htmlContent = "<p>Hello <strong>world</strong>!</p>";
348
359
 
@@ -3,13 +3,13 @@
3
3
  import type { Completion } from "@codemirror/autocomplete";
4
4
  import type { FileUIPart } from "ai";
5
5
  import { toPng } from "html-to-image";
6
+ import { processOutput } from "@/components/editor/output/ConsoleOutput";
6
7
  import { type NotebookState, notebookAtom } from "@/core/cells/cells";
7
8
  import { type CellId, CellOutputId } from "@/core/cells/ids";
8
9
  import { displayCellName } from "@/core/cells/names";
9
10
  import { isOutputEmpty } from "@/core/cells/outputs";
10
11
  import type { OutputMessage } from "@/core/kernel/messages";
11
12
  import type { JotaiStore } from "@/core/state/jotai";
12
- import { parseHtmlContent } from "@/utils/dom";
13
13
  import { Logger } from "@/utils/Logger";
14
14
  import { type AIContextItem, AIContextProvider } from "../registry";
15
15
  import { contextToXml } from "../utils";
@@ -320,16 +320,10 @@ function getBaseOutput(output: OutputMessage): BaseOutput | null {
320
320
  const isMedia = isMediaMimetype(mimetype, String(output.data));
321
321
  const outputType = isMedia ? "media" : "text";
322
322
 
323
- let processedContent: string | undefined;
323
+ const processedContent = processOutput(output);
324
324
  let imageUrl: string | undefined;
325
325
  let shouldDownloadImage = false;
326
326
 
327
- // Process text content
328
- if (outputType === "text" && typeof output.data === "string") {
329
- processedContent =
330
- mimetype === "text/html" ? parseHtmlContent(output.data) : output.data;
331
- }
332
-
333
327
  // Process media content - for now, we'll just note that it's media
334
328
  if (outputType === "media") {
335
329
  if (typeof output.data === "string" && output.data.startsWith("data:")) {
@@ -44,7 +44,7 @@ describe("RunStaleCellsTool", () => {
44
44
  store,
45
45
  };
46
46
 
47
- tool = new RunStaleCellsTool();
47
+ tool = new RunStaleCellsTool({ postExecutionDelay: 0 });
48
48
 
49
49
  cellId1 = "cell-1" as CellId;
50
50
  cellId2 = "cell-2" as CellId;
@@ -109,15 +109,19 @@ export class EditNotebookTool
109
109
 
110
110
  scrollAndHighlightCell(cellId);
111
111
 
112
- // If previous code exists, we don't want to replace it, it means there is a new edit on top of the previous edit
112
+ const existingStagedCell = store.get(stagedAICellsAtom).get(cellId);
113
+
114
+ // If previous edit was from a new cell, just replace editor code with the new code
115
+ if (existingStagedCell?.type === "add_cell") {
116
+ updateEditorCodeFromPython(editorView, code);
117
+ break;
118
+ }
119
+
120
+ // If previous code exists, we don't want to replace it, it means there is a new edit on top of the previous update
113
121
  // Keep the original code
114
- const stagedCell = store.get(stagedAICellsAtom).get(cellId);
115
122
  const currentCellCode = editorView.state.doc.toString();
116
123
  const previousCode =
117
- stagedCell?.type === "update_cell" ||
118
- stagedCell?.type === "delete_cell"
119
- ? stagedCell.previousCode
120
- : currentCellCode;
124
+ existingStagedCell?.previousCode ?? currentCellCode;
121
125
 
122
126
  addStagedCell({
123
127
  cellId,
@@ -186,7 +190,11 @@ export class EditNotebookTool
186
190
  }
187
191
  return {
188
192
  status: "success",
189
- next_steps: ["If you need to perform more edits, call this tool again."],
193
+ next_steps: [
194
+ "If you need to perform more edits, call this tool again.",
195
+ "You should use the lint notebook tool to check for errors and lint issues. Fix them by editing the notebook.",
196
+ "You should use the run stale cells tool to run the cells that have been edited or newly added. This allows you to see the output of the cells and fix any errors.",
197
+ ],
190
198
  };
191
199
  };
192
200