@marimo-team/islands 0.23.7-dev0 → 0.23.7-dev10

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 (432) hide show
  1. package/dist/{ConnectedDataExplorerComponent-PmilQqXR.js → ConnectedDataExplorerComponent-DnRhpPMJ.js} +1 -1
  2. package/dist/{any-language-editor-BVR0l12r.js → any-language-editor-DDubl8YH.js} +10 -10
  3. package/dist/apl-Bdc61P1y.js +4 -0
  4. package/dist/{arc-CHF8PiiF.js → arc-DfkSnvZm.js} +2 -2
  5. package/dist/{architecture-7HQA4BMR-D0JB_3hE.js → architecture-7HQA4BMR-CS9jOrqM.js} +1 -1
  6. package/dist/{architectureDiagram-VXUJARFQ-BXQEUDtK.js → architectureDiagram-VXUJARFQ-CXVJxFhH.js} +16 -16
  7. package/dist/asciiarmor-DVRHDGzT.js +4 -0
  8. package/dist/asn1-BmuKfkfu.js +4 -0
  9. package/dist/{blockDiagram-VD42YOAC-DhJe-Y9i.js → blockDiagram-VD42YOAC-DGDaxR8I.js} +11 -11
  10. package/dist/brainfuck-DPrRpyTV.js +4 -0
  11. package/dist/{c4Diagram-YG6GDRKO-9dSfzOFR.js → c4Diagram-YG6GDRKO-C2hc6ne8.js} +5 -5
  12. package/dist/{channel-MqYIiKgS.js → channel-BBoIVUrJ.js} +1 -1
  13. package/dist/{chat-ui-B-gbqk_F.js → chat-ui-BmWZZ3mE.js} +3 -3
  14. package/dist/{chunk-4BX2VUAB-BwfrWBqN.js → chunk-4BX2VUAB-CzXltWHN.js} +1 -1
  15. package/dist/{chunk-55IACEB6-D8THf2mi.js → chunk-55IACEB6-B-1mjMMC.js} +1 -1
  16. package/dist/{chunk-5FQGJX7Z-CO1e63h_.js → chunk-5FQGJX7Z-BOg95xG5.js} +2 -2
  17. package/dist/{chunk-ABZYJK2D-BrBb_0yY.js → chunk-ABZYJK2D-D0cLy8Bb.js} +2 -2
  18. package/dist/{chunk-ATLVNIR6-D-0XqNah.js → chunk-ATLVNIR6-BXsEjlHF.js} +2 -2
  19. package/dist/{chunk-B4BG7PRW-8iRKvugR.js → chunk-B4BG7PRW-Q1usn6T3.js} +7 -7
  20. package/dist/{chunk-CVBHYZKI-B6xhgaBd.js → chunk-CVBHYZKI-B_c5YBcW.js} +1 -1
  21. package/dist/{chunk-DI55MBZ5-C0_2D4m4.js → chunk-DI55MBZ5-D1qLYNrb.js} +6 -6
  22. package/dist/{chunk-EXTU4WIE-Jiw9ca1u.js → chunk-EXTU4WIE-BKNXdLmD.js} +2 -2
  23. package/dist/{chunk-FMBD7UC4-CHdus51S.js → chunk-FMBD7UC4-Ie8M9q0W.js} +1 -1
  24. package/dist/{chunk-HN2XXSSU-2Vfbq-kU.js → chunk-HN2XXSSU-E3n-Ys7Z.js} +1 -1
  25. package/dist/{chunk-JA3XYJ7Z-6wbaigKe.js → chunk-JA3XYJ7Z-D6c6cOBG.js} +3 -3
  26. package/dist/{chunk-JZLCHNYA-_rfptlUP.js → chunk-JZLCHNYA-BvsPHJmL.js} +6 -6
  27. package/dist/{chunk-MI3HLSF2-Do0-KRc0.js → chunk-MI3HLSF2-CUYEasXO.js} +1 -1
  28. package/dist/{chunk-N4CR4FBY-DIZG9dVD.js → chunk-N4CR4FBY-8ycT-O9a.js} +7 -7
  29. package/dist/{chunk-QN33PNHL-Cc64y40m.js → chunk-QN33PNHL-Bb-eUBW3.js} +2 -2
  30. package/dist/{chunk-QXUST7PY-BDG0-0Or.js → chunk-QXUST7PY-DV8yRwBd.js} +10 -10
  31. package/dist/{chunk-QZHKN3VN-B_Mdb8GC.js → chunk-QZHKN3VN-DRjXVwuJ.js} +1 -1
  32. package/dist/{chunk-S3R3BYOJ-DphMP0FA.js → chunk-S3R3BYOJ-mQeCz5CE.js} +4 -4
  33. package/dist/{chunk-TZMSLE5B-C9LUoYkc.js → chunk-TZMSLE5B-BqW10dHe.js} +3 -3
  34. package/dist/classDiagram-2ON5EDUG--Yh__LHb.js +30 -0
  35. package/dist/classDiagram-v2-WZHVMYZB-BC7X7Xtc.js +30 -0
  36. package/dist/{clike-sBZrGeF8.js → clike-DTxNUn7l.js} +1 -1
  37. package/dist/clojure-DEttQW5T.js +4 -0
  38. package/dist/cmake-jNlx_DaM.js +4 -0
  39. package/dist/cobol-BvvIm5MJ.js +4 -0
  40. package/dist/{code-block-37QAKDTI-0JNwiPGv.js → code-block-37QAKDTI-BsGy1AOJ.js} +1 -1
  41. package/dist/{code-visibility-B-Q3ImOe.js → code-visibility-DSOij00M.js} +1018 -833
  42. package/dist/coffeescript-DTpBMyFU.js +4 -0
  43. package/dist/commonlisp-BmmUG8jb.js +4 -0
  44. package/dist/{cose-bilkent-S5V4N54A-DXHZkJKX.js → cose-bilkent-S5V4N54A-kjoZoid4.js} +2 -2
  45. package/dist/crystal-BxyqmEWC.js +4 -0
  46. package/dist/css-BGoCtuG3.js +4 -0
  47. package/dist/cypher-BmCbdl3u.js +4 -0
  48. package/dist/d-CFrlbjZt.js +4 -0
  49. package/dist/{dagre-6UL2VRFP-tH87fkPA.js → dagre-6UL2VRFP-DRBWoQUw.js} +10 -10
  50. package/dist/{data-grid-overlay-editor-CWUN78-s.js → data-grid-overlay-editor-efe5ZagF.js} +2 -2
  51. package/dist/{diagram-PSM6KHXK-2VjPSCDn.js → diagram-PSM6KHXK-H66ATWP2.js} +18 -18
  52. package/dist/{diagram-QEK2KX5R-CiLmNyta.js → diagram-QEK2KX5R-DItl5Wns.js} +14 -14
  53. package/dist/{diagram-S2PKOQOG-Zha_1CLx.js → diagram-S2PKOQOG-CtuW_ZuL.js} +14 -14
  54. package/dist/diff-D6XwL6P8.js +4 -0
  55. package/dist/{dist-Brkazupz.js → dist--sWVZwjW.js} +1 -1
  56. package/dist/{dist-FN0ZA_8F.js → dist-21ButRCu.js} +1 -1
  57. package/dist/{dist-BetEKbPG.js → dist-B8RaFTRF.js} +1 -1
  58. package/dist/dist-BoHGySTM.js +5 -0
  59. package/dist/dist-ByAz19Qc.js +5 -0
  60. package/dist/dist-C93EysN4.js +5 -0
  61. package/dist/{dist-BHnX0ia_.js → dist-CY-lVor6.js} +1 -1
  62. package/dist/{dist-YP-G7W0f.js → dist-CYDuv4bR.js} +1 -1
  63. package/dist/{dist-CMjD5MQb.js → dist-Cfo5EE2t.js} +1 -1
  64. package/dist/dist-CjivSDvN.js +5 -0
  65. package/dist/dist-Cqwx-MH7.js +5 -0
  66. package/dist/{dist-DkC6YEo0.js → dist-DMZNjfX4.js} +1 -1
  67. package/dist/{dist-ChC1BhqM.js → dist-DbpcoFAV.js} +1 -1
  68. package/dist/dist-FUNenbiQ.js +5 -0
  69. package/dist/{dist-BEOU2g1b.js → dist-zhSud5X3.js} +1 -1
  70. package/dist/{dockerfile-COvlVLcE.js → dockerfile-twL37N91.js} +1 -1
  71. package/dist/dtd-Bw0lRN0-.js +4 -0
  72. package/dist/dylan-B55eBHTt.js +4 -0
  73. package/dist/ecl-C8G4p0wn.js +4 -0
  74. package/dist/eiffel-BmH46VJl.js +4 -0
  75. package/dist/elm-DhzeFqkl.js +4 -0
  76. package/dist/{erDiagram-Q2GNP2WA-biHZS05w.js → erDiagram-Q2GNP2WA--19X2kU5.js} +14 -14
  77. package/dist/erlang-CY-wdlsU.js +4 -0
  78. package/dist/{esm-CYEyrE3Y.js → esm-DjNnlmpf.js} +96 -96
  79. package/dist/{factor-C2GT7jfQ.js → factor-CajWS6mS.js} +1 -1
  80. package/dist/factor-DWkgl0xw.js +4 -0
  81. package/dist/{flowDiagram-NV44I4VS-CWWlUpBR.js → flowDiagram-NV44I4VS-DQmWlo7f.js} +16 -16
  82. package/dist/forth-Cij_ie2t.js +4 -0
  83. package/dist/fortran-Br3X9cfm.js +4 -0
  84. package/dist/{ganttDiagram-JELNMOA3-D7B2c4Z9.js → ganttDiagram-JELNMOA3-BOGXJ8Lk.js} +7 -7
  85. package/dist/gas-DYsGcMN2.js +4 -0
  86. package/dist/gherkin-eVgXQ0fQ.js +4 -0
  87. package/dist/{gitGraph-G5XIXVHT-BdepdFa_.js → gitGraph-G5XIXVHT-DGlbae5m.js} +1 -1
  88. package/dist/{gitGraphDiagram-V2S2FVAM-CtLvNR1S.js → gitGraphDiagram-V2S2FVAM-DjzxfF0P.js} +14 -14
  89. package/dist/{glide-data-editor-CvlvtPWJ.js → glide-data-editor-B-3A3G02.js} +4 -4
  90. package/dist/groovy-_NFHIXG7.js +4 -0
  91. package/dist/haskell-D6xNG_bH.js +4 -0
  92. package/dist/haxe-sU_rzAwn.js +5 -0
  93. package/dist/{html-to-image-hMMPiNe_.js → html-to-image-BwZL1Pkk.js} +140 -140
  94. package/dist/idl-Ds_VbrUx.js +4 -0
  95. package/dist/{info-VBDWY6EO--JNA2rNu.js → info-VBDWY6EO-D2lvLLw5.js} +1 -1
  96. package/dist/{infoDiagram-HS3SLOUP-BbZyOxsP.js → infoDiagram-HS3SLOUP-ChNufFsP.js} +12 -12
  97. package/dist/javascript-CztfIl0i.js +4 -0
  98. package/dist/{journeyDiagram-XKPGCS4Q-BU2mjjzl.js → journeyDiagram-XKPGCS4Q-BO_O4Ij1.js} +6 -6
  99. package/dist/julia-DDv40QMV.js +4 -0
  100. package/dist/{kanban-definition-3W4ZIXB7-BlmczUuw.js → kanban-definition-3W4ZIXB7-CPpiiiWk.js} +11 -11
  101. package/dist/{katex-qPqrBHZ8.js → katex-9-9QRhxz.js} +1 -1
  102. package/dist/{line-BWRi3U3S.js → line-C5s_12ee.js} +3 -3
  103. package/dist/{linear-DnHwODZa.js → linear-2NnK4cxi.js} +2 -2
  104. package/dist/livescript-BEOngLLc.js +4 -0
  105. package/dist/lua-9-7BhQ4Y.js +4 -0
  106. package/dist/main.js +1767 -1816
  107. package/dist/mathematica-DDa0Pfxm.js +4 -0
  108. package/dist/mbox-iO03mmoE.js +4 -0
  109. package/dist/{mermaid-4DMBBIKO-CG1ECj5W.js → mermaid-4DMBBIKO-B7VQMwJx.js} +1 -1
  110. package/dist/{mermaid-DJ1NyBGw.js → mermaid-cXSZ1pfD.js} +67 -64
  111. package/dist/{mermaid-parser.core-CleJseNW.js → mermaid-parser.core-DreccfmS.js} +7 -7
  112. package/dist/{mhchem-BwoRNwg_.js → mhchem-yiCCuiEF.js} +1 -1
  113. package/dist/{mindmap-definition-VGOIOE7T-CcSYqYP9.js → mindmap-definition-VGOIOE7T-CC1_Vl0f.js} +13 -13
  114. package/dist/mirc-C9z5LT4X.js +4 -0
  115. package/dist/mllike-jGJbdm_C.js +6 -0
  116. package/dist/modelica-DzF7oIEL.js +4 -0
  117. package/dist/mscgen-DB-u125o.js +6 -0
  118. package/dist/mumps-CRTFHhzh.js +4 -0
  119. package/dist/nsis-C4NPTuox.js +4 -0
  120. package/dist/{nsis-B5K1qoyo.js → nsis-ClF3r5Tr.js} +1 -1
  121. package/dist/ntriples-BCOoGph1.js +4 -0
  122. package/dist/{number-overlay-editor-_GnlYFHC.js → number-overlay-editor-CpKi64Fy.js} +1 -1
  123. package/dist/octave-DTwNlazz.js +4 -0
  124. package/dist/{ordinal-2jIulmcR.js → ordinal-B43ZeR68.js} +1 -1
  125. package/dist/oz-DD38AzSz.js +4 -0
  126. package/dist/{packet-DYOGHKS2-CBxXGWNr.js → packet-DYOGHKS2-CmWtF3uO.js} +1 -1
  127. package/dist/pascal-BohSp9jV.js +4 -0
  128. package/dist/perl-f5OutoPM.js +4 -0
  129. package/dist/{pie-VRWISCQL-Bmdnqjip.js → pie-VRWISCQL-B6u8vus8.js} +1 -1
  130. package/dist/{pieDiagram-ADFJNKIX-DNyLF5H2.js → pieDiagram-ADFJNKIX-Di34MOFQ.js} +19 -19
  131. package/dist/pig-Dv7wSmHb.js +4 -0
  132. package/dist/powershell-rYgjKB39.js +4 -0
  133. package/dist/{process-output-Bza_GK7Q.js → process-output-lpVrk7d5.js} +28 -23
  134. package/dist/properties-BFUNLRDN.js +4 -0
  135. package/dist/protobuf-B9QJQPPv.js +4 -0
  136. package/dist/{pug-tjbzJCFk.js → pug-B_rby2yb.js} +1 -1
  137. package/dist/pug-DzvWpaMC.js +4 -0
  138. package/dist/puppet-B_K-n_xK.js +4 -0
  139. package/dist/python-CAiFcaA2.js +4 -0
  140. package/dist/q-cLeFIBLK.js +4 -0
  141. package/dist/{quadrantDiagram-AYHSOK5B-rXwjifrj.js → quadrantDiagram-AYHSOK5B-B9kVk1ny.js} +3 -3
  142. package/dist/r-04Y-Wco3.js +4 -0
  143. package/dist/{radar-ZZBFDIW7-BmCWDffL.js → radar-ZZBFDIW7-XAmXSa8s.js} +1 -1
  144. package/dist/{react-vega-B-rkEqtS.js → react-vega-Cavbrg4l.js} +1 -1
  145. package/dist/{react-vega-k9ODWPlI.js → react-vega-Dh6-UKKe.js} +13 -13
  146. package/dist/{requirementDiagram-UZGBJVZJ-DBdrMVbs.js → requirementDiagram-UZGBJVZJ-BxGfGYEx.js} +13 -13
  147. package/dist/{reveal-component-b-V5_i9A.js → reveal-component-DV-3dusq.js} +3 -3
  148. package/dist/rpm-FUdrIia9.js +5 -0
  149. package/dist/ruby-DMjFXuEW.js +4 -0
  150. package/dist/{sankeyDiagram-TZEHDZUN-CxmzalGv.js → sankeyDiagram-TZEHDZUN-D09PBJ-n.js} +4 -4
  151. package/dist/sas-DzHZxjXK.js +4 -0
  152. package/dist/scheme-DxHd_Rb9.js +4 -0
  153. package/dist/semaphore-CNDGTzkX.js +46 -0
  154. package/dist/{sequenceDiagram-WL72ISMW-CVCDsJ9h.js → sequenceDiagram-WL72ISMW-t_Dpemj0.js} +7 -7
  155. package/dist/shell-C8Kwypgf.js +4 -0
  156. package/dist/sieve-DdyqOKXZ.js +4 -0
  157. package/dist/smalltalk-pB7X1D9y.js +4 -0
  158. package/dist/sparql-NhBO6oOa.js +4 -0
  159. package/dist/{src-BY0BGg6V.js → src-Bf2iLOlr.js} +1 -1
  160. package/dist/{stateDiagram-FKZM4ZOC-D_2djEhW.js → stateDiagram-FKZM4ZOC-B18gTP_j.js} +16 -16
  161. package/dist/stateDiagram-v2-4FDKWEC3-B6e_t14A.js +29 -0
  162. package/dist/{step-DGAGWg3y.js → step-CWipAYTY.js} +1 -1
  163. package/dist/style.css +1 -1
  164. package/dist/stylus-SfWSnzPv.js +4 -0
  165. package/dist/swift-jRPdq2zR.js +4 -0
  166. package/dist/tcl-_hpTHGX3.js +4 -0
  167. package/dist/textile-C9h8slqH.js +4 -0
  168. package/dist/{time-CMdrp3hw.js → time-C1SGcFMH.js} +2 -2
  169. package/dist/{timeline-definition-IT6M3QCI-E4NzxCs3.js → timeline-definition-IT6M3QCI-DJnh1ks5.js} +3 -3
  170. package/dist/toml-DWvtinD4.js +4 -0
  171. package/dist/{treemap-GDKQZRPO-CoKHPxa7.js → treemap-GDKQZRPO-Du95DV6u.js} +1 -1
  172. package/dist/troff-Dwo_A0y7.js +4 -0
  173. package/dist/ttcn-V--CPFKq.js +4 -0
  174. package/dist/ttcn-cfg-CPSMchTG.js +4 -0
  175. package/dist/turtle-B4rPGBWu.js +4 -0
  176. package/dist/vb-DaMBBd4j.js +4 -0
  177. package/dist/vbscript-BMJQqcE2.js +4 -0
  178. package/dist/{vega-component-CC8TqWWV.js → vega-component-C2BYPkfd.js} +16 -14
  179. package/dist/velocity-CGq2QRq2.js +4 -0
  180. package/dist/verilog-CUNo8F5u.js +4 -0
  181. package/dist/vhdl-CCzA0msW.js +4 -0
  182. package/dist/webidl-CqIMDIBL.js +4 -0
  183. package/dist/xquery-XC5Kbr-1.js +4 -0
  184. package/dist/{xychartDiagram-PRI3JC2R-CuxTvjw5.js → xychartDiagram-PRI3JC2R-Dk2d_bX0.js} +10 -10
  185. package/dist/yacas-CGOv7Dzy.js +4 -0
  186. package/dist/z80-CXhVmi-f.js +4 -0
  187. package/package.json +1 -1
  188. package/src/components/data-table/TableTopBar.tsx +5 -1
  189. package/src/components/data-table/data-table.tsx +5 -0
  190. package/src/components/data-table/download-policy/atoms.ts +10 -0
  191. package/src/components/data-table/export-actions.tsx +120 -76
  192. package/src/components/editor/file-tree/requesting-tree.tsx +27 -25
  193. package/src/components/editor/file-tree/upload.tsx +23 -24
  194. package/src/core/codemirror/markdown/__tests__/commands.test.ts +3 -3
  195. package/src/core/codemirror/markdown/commands.ts +1 -2
  196. package/src/core/network/requests-network.ts +21 -3
  197. package/src/core/network/types.ts +12 -1
  198. package/src/core/wasm/bridge.ts +14 -1
  199. package/src/plugins/core/__test__/sanitize.test.ts +8 -0
  200. package/src/plugins/impl/DataTablePlugin.tsx +12 -0
  201. package/src/plugins/impl/TabsPlugin.tsx +35 -7
  202. package/src/plugins/impl/__tests__/TabsPlugin.test.tsx +154 -0
  203. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +6 -0
  204. package/src/plugins/impl/vega/resolve-data.ts +8 -1
  205. package/src/plugins/layout/__test__/MermaidPlugin.test.ts +50 -0
  206. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +11 -1
  207. package/src/plugins/layout/mermaid/mermaid.tsx +7 -3
  208. package/src/utils/__tests__/semaphore.test.ts +218 -0
  209. package/src/utils/fileToBase64.ts +8 -7
  210. package/src/utils/semaphore.ts +88 -0
  211. package/dist/apl-BKoVld9y.js +0 -4
  212. package/dist/asciiarmor-DQrKIjoo.js +0 -4
  213. package/dist/asn1-BZvnj0dq.js +0 -4
  214. package/dist/brainfuck-D558nlUv.js +0 -4
  215. package/dist/classDiagram-2ON5EDUG-CBHMR6ZU.js +0 -30
  216. package/dist/classDiagram-v2-WZHVMYZB-BsUtUGM_.js +0 -30
  217. package/dist/clojure-Cq8mTSrE.js +0 -4
  218. package/dist/cmake-D8HCovWK.js +0 -4
  219. package/dist/cobol-UolN-9iU.js +0 -4
  220. package/dist/coffeescript-VdNuWrt5.js +0 -4
  221. package/dist/commonlisp-ALX7fpDc.js +0 -4
  222. package/dist/crystal-PbyO9Q_s.js +0 -4
  223. package/dist/css-DFklJkr_.js +0 -4
  224. package/dist/cypher-BifNeYlv.js +0 -4
  225. package/dist/d-BA-JP4PJ.js +0 -4
  226. package/dist/diff-CtkDpav4.js +0 -4
  227. package/dist/dist-BuBwsFva.js +0 -5
  228. package/dist/dist-BzmEQ9u7.js +0 -5
  229. package/dist/dist-Cih01ssx.js +0 -5
  230. package/dist/dist-CqfONiY9.js +0 -5
  231. package/dist/dist-D0iD0Fi9.js +0 -5
  232. package/dist/dist-DtNLXm8d.js +0 -5
  233. package/dist/dtd-DW3_UFEG.js +0 -4
  234. package/dist/dylan-pDhodO2N.js +0 -4
  235. package/dist/ecl-BJT8-YD7.js +0 -4
  236. package/dist/eiffel-Dmns-9vS.js +0 -4
  237. package/dist/elm-Da4sO4Bz.js +0 -4
  238. package/dist/erlang-C-zBsDi7.js +0 -4
  239. package/dist/factor-4xPWlWB5.js +0 -4
  240. package/dist/forth-l-c75zSd.js +0 -4
  241. package/dist/fortran-DIujSODW.js +0 -4
  242. package/dist/gas-CXnG5g_b.js +0 -4
  243. package/dist/gherkin-VPeqd4-X.js +0 -4
  244. package/dist/groovy-CphhZQgg.js +0 -4
  245. package/dist/haskell-CCvlS5Iq.js +0 -4
  246. package/dist/haxe-C_bi66fP.js +0 -5
  247. package/dist/idl-1DcP4Dm8.js +0 -4
  248. package/dist/javascript-DUIGhBvO.js +0 -4
  249. package/dist/julia-Cs2G4PQi.js +0 -4
  250. package/dist/livescript-DMtVFaAN.js +0 -4
  251. package/dist/lua-BAoLtdJg.js +0 -4
  252. package/dist/mathematica-C_NoFtbo.js +0 -4
  253. package/dist/mbox-DcFJFYrH.js +0 -4
  254. package/dist/mirc-71dccf_u.js +0 -4
  255. package/dist/mllike-CWcOFVDq.js +0 -6
  256. package/dist/modelica-Ape2VXxx.js +0 -4
  257. package/dist/mscgen-Cc6TwbSN.js +0 -6
  258. package/dist/mumps-h-ZbdkJ9.js +0 -4
  259. package/dist/nsis-C0p3m7JW.js +0 -4
  260. package/dist/ntriples-c9lEeT5w.js +0 -4
  261. package/dist/octave-DzEgB_74.js +0 -4
  262. package/dist/oz-CAxvHkyQ.js +0 -4
  263. package/dist/pascal-BJzu1sgP.js +0 -4
  264. package/dist/perl--IrOzZ2Z.js +0 -4
  265. package/dist/pig-CiBKKNhC.js +0 -4
  266. package/dist/powershell-KY0j6Qop.js +0 -4
  267. package/dist/properties-BW8q3ziV.js +0 -4
  268. package/dist/protobuf-BGaeuTGV.js +0 -4
  269. package/dist/pug-DjOKK-4J.js +0 -4
  270. package/dist/puppet-DWm2o6zX.js +0 -4
  271. package/dist/python-Bp2gezZy.js +0 -4
  272. package/dist/q-DljPshos.js +0 -4
  273. package/dist/r-BajPMnEu.js +0 -4
  274. package/dist/rpm-BKx-ZZ62.js +0 -5
  275. package/dist/ruby-DJq_HNKc.js +0 -4
  276. package/dist/sas-WANvpcOU.js +0 -4
  277. package/dist/scheme-CliBbhGF.js +0 -4
  278. package/dist/shell-BwhrNUvM.js +0 -4
  279. package/dist/sieve-BIVePvMp.js +0 -4
  280. package/dist/smalltalk-D6G48JmY.js +0 -4
  281. package/dist/sparql-jjc3BmEP.js +0 -4
  282. package/dist/stateDiagram-v2-4FDKWEC3-Cv9Av10H.js +0 -29
  283. package/dist/stylus-WPBPQ4PE.js +0 -4
  284. package/dist/swift-O1Qy6iCm.js +0 -4
  285. package/dist/tcl-BAFdhvsi.js +0 -4
  286. package/dist/textile-DFuzhNLG.js +0 -4
  287. package/dist/toml-DRSTeely.js +0 -4
  288. package/dist/troff-B_ZjwBW0.js +0 -4
  289. package/dist/ttcn-CAyiB3ic.js +0 -4
  290. package/dist/ttcn-cfg-BS5_BGBJ.js +0 -4
  291. package/dist/turtle-CUBEDy3E.js +0 -4
  292. package/dist/vb-DY9S6-U2.js +0 -4
  293. package/dist/vbscript-gaHC39Jq.js +0 -4
  294. package/dist/velocity-TfCOtJZ_.js +0 -4
  295. package/dist/verilog-c2JOX8mv.js +0 -4
  296. package/dist/vhdl-dHBirRiO.js +0 -4
  297. package/dist/webidl-Bauj-i07.js +0 -4
  298. package/dist/xquery-CtaEAOt8.js +0 -4
  299. package/dist/yacas-BZ85agQP.js +0 -4
  300. package/dist/z80-hCgR-L4U.js +0 -4
  301. /package/dist/{ImageComparisonComponent-DaocPIse.js → ImageComparisonComponent-CNHIsPDj.js} +0 -0
  302. /package/dist/{Plot-PIeIvFnD.js → Plot-4wn-lMVn.js} +0 -0
  303. /package/dist/{apl-Dt8GMXYg.js → apl-BCgCq9iM.js} +0 -0
  304. /package/dist/{array-B-MVxRIF.js → array-tvvEqPy7.js} +0 -0
  305. /package/dist/{asciiarmor-CitDQ85h.js → asciiarmor-BtqU-KJQ.js} +0 -0
  306. /package/dist/{asn1-abrf9SMK.js → asn1-Dmb-dTMx.js} +0 -0
  307. /package/dist/{asterisk-BUZwqih-.js → asterisk-DaVJJDnV.js} +0 -0
  308. /package/dist/{brainfuck-BL-Boof0.js → brainfuck-C1HoZKlE.js} +0 -0
  309. /package/dist/{chunk-4F5CHEZ2-C6tO9vjs.js → chunk-4F5CHEZ2-BZq7Kom7.js} +0 -0
  310. /package/dist/{chunk-B2363JML-Ds8wZXyP.js → chunk-B2363JML-D9-XOau1.js} +0 -0
  311. /package/dist/{chunk-DR5Q36YT-CP69aZS_.js → chunk-DR5Q36YT-BflwErH1.js} +0 -0
  312. /package/dist/{chunk-FRFDVMJY-BgQv1HBE.js → chunk-FRFDVMJY-BSBUAX7r.js} +0 -0
  313. /package/dist/{chunk-PL6DKKU2-DHfTUHy8.js → chunk-PL6DKKU2-B0MTXvyc.js} +0 -0
  314. /package/dist/{chunk-SJTYNZTY-Diciw4sx.js → chunk-SJTYNZTY-CEG4F0pB.js} +0 -0
  315. /package/dist/{chunk-TQ3KTPDO-CQfP9npd.js → chunk-TQ3KTPDO-DiCtqVSi.js} +0 -0
  316. /package/dist/{chunk-UMXZTB3W-MSKeGL7W.js → chunk-UMXZTB3W-97iS1iEl.js} +0 -0
  317. /package/dist/{click-outside-container-BZgN7xS_.js → click-outside-container-BDd67_1U.js} +0 -0
  318. /package/dist/{clike-RWg7anhx.js → clike-CdT0yHjt.js} +0 -0
  319. /package/dist/{clojure-DaojKHow.js → clojure-CdyrCpUv.js} +0 -0
  320. /package/dist/{cmake-DN-_v0XE.js → cmake-BFlPxym7.js} +0 -0
  321. /package/dist/{cobol-C3VpMyux.js → cobol-CcJXewp8.js} +0 -0
  322. /package/dist/{coffeescript-DIkz3Tbt.js → coffeescript-DnKuIKRo.js} +0 -0
  323. /package/dist/{colors-Cn2p_FA3.js → colors-CQAOa8cK.js} +0 -0
  324. /package/dist/{common-keywords-hbLeU7VU.js → common-keywords-FBrXPTcz.js} +0 -0
  325. /package/dist/{commonlisp-CB1boOiP.js → commonlisp-B-kok83Z.js} +0 -0
  326. /package/dist/{crystal-DI2oCml6.js → crystal-FYRYjI1I.js} +0 -0
  327. /package/dist/{css-BdEVwQDV.js → css-B45lc2V3.js} +0 -0
  328. /package/dist/{cypher-BNHToqxU.js → cypher-DZMLyVY_.js} +0 -0
  329. /package/dist/{cytoscape.esm-WbbDoCfu.js → cytoscape.esm-ayF70frT.js} +0 -0
  330. /package/dist/{d-D7we7I1b.js → d-x-VVT4o9.js} +0 -0
  331. /package/dist/{diff-Cia6fzjN.js → diff-Dxe2mpXk.js} +0 -0
  332. /package/dist/{dist-BK-3fF4P.js → dist-B4LJpMEg.js} +0 -0
  333. /package/dist/{dist-CxdUraQr.js → dist-B507mf_I.js} +0 -0
  334. /package/dist/{dist-C89sHDXk.js → dist-BGdYVvOu.js} +0 -0
  335. /package/dist/{dist-DquyVv5H.js → dist-BNyrZfqT.js} +0 -0
  336. /package/dist/{dist-Zn0KNbo9.js → dist-Bc5pmZIw.js} +0 -0
  337. /package/dist/{dist-C-J0pt5p.js → dist-BvCfQQQE.js} +0 -0
  338. /package/dist/{dist-D9r7Cmw7.js → dist-C2ej4eOH.js} +0 -0
  339. /package/dist/{dist-HVuryI1a.js → dist-C34oIrQ9.js} +0 -0
  340. /package/dist/{dist-CGLzXdrt.js → dist-CDFZi-QD.js} +0 -0
  341. /package/dist/{dist-C9fmTOin.js → dist-CYEylvZA.js} +0 -0
  342. /package/dist/{dist-DadjmS-4.js → dist-DJ6zJQZ4.js} +0 -0
  343. /package/dist/{dist-CtCY55Jf.js → dist-Dh3wkoyH.js} +0 -0
  344. /package/dist/{dist-C474qFoq.js → dist-Dhk6FMb0.js} +0 -0
  345. /package/dist/{dist-DZjQ_MBo.js → dist-KnujRhFL.js} +0 -0
  346. /package/dist/{dist-CinA9Enb.js → dist-WdPUFc56.js} +0 -0
  347. /package/dist/{dist-DBLeRrPp.js → dist-t_qL7eB8.js} +0 -0
  348. /package/dist/{dist-CyFFzJTb.js → dist-usPCDYx8.js} +0 -0
  349. /package/dist/{dtd-H4Hubdwp.js → dtd-C9VM_Wfu.js} +0 -0
  350. /package/dist/{duckdb-keywords-CZ_ZTscu.js → duckdb-keywords-CvJhR_Yd.js} +0 -0
  351. /package/dist/{dylan-fVO6rnq3.js → dylan-DTSnEIFO.js} +0 -0
  352. /package/dist/{ebnf-WEXPLEWb.js → ebnf-2D4Ctp3y.js} +0 -0
  353. /package/dist/{ecl-B94VPjNR.js → ecl-N04ptnRK.js} +0 -0
  354. /package/dist/{eiffel-C_R6TusS.js → eiffel-Dd8rpqr_.js} +0 -0
  355. /package/dist/{elm-DzCHbO2g.js → elm-GT2E866W.js} +0 -0
  356. /package/dist/{erlang-BGNkx6JU.js → erlang-Cf0Bp5pY.js} +0 -0
  357. /package/dist/{esm-Bb_hbWan.js → esm-BaaaPNGl.js} +0 -0
  358. /package/dist/{fcl-B_Gv5Jfx.js → fcl-Ccj8Z5Xd.js} +0 -0
  359. /package/dist/{forth-Bybw0cJ7.js → forth-wd_XzGTg.js} +0 -0
  360. /package/dist/{fortran-C6PoCLkI.js → fortran-DcwUTZFe.js} +0 -0
  361. /package/dist/{gas-BBlhenj4.js → gas-DeALIER3.js} +0 -0
  362. /package/dist/{gherkin-NXtNG85X.js → gherkin-CKTqaJNX.js} +0 -0
  363. /package/dist/{groovy-BoFYK9xM.js → groovy-Bwdp_d8D.js} +0 -0
  364. /package/dist/{haskell-BtBdvQ1n.js → haskell-DCdCcPLK.js} +0 -0
  365. /package/dist/{haxe-D--o6dr0.js → haxe-DAyktQWJ.js} +0 -0
  366. /package/dist/{http-Dc2fv19V.js → http-_DVAYWoR.js} +0 -0
  367. /package/dist/{idl-AqTq5l7e.js → idl-CBuZiRYu.js} +0 -0
  368. /package/dist/{init-D-g0ONX1.js → init-uv0kkh4g.js} +0 -0
  369. /package/dist/{javascript-DvwNVye9.js → javascript-DzigE11c.js} +0 -0
  370. /package/dist/{julia-DoKiagZC.js → julia-PwfB-0Cm.js} +0 -0
  371. /package/dist/{katex-B7pMJpE0.js → katex-C_XRmjAP.js} +0 -0
  372. /package/dist/{livescript-DxBZMiWB.js → livescript-BJLz1EbT.js} +0 -0
  373. /package/dist/{lua-DmS_0NTu.js → lua-ZC-XC2jf.js} +0 -0
  374. /package/dist/{math-BYK36kWZ.js → math-DFcdCCU8.js} +0 -0
  375. /package/dist/{mathematica-ChlDFeIC.js → mathematica-DCYMx6qB.js} +0 -0
  376. /package/dist/{mbox-CguZuODr.js → mbox-OxMK_9XI.js} +0 -0
  377. /package/dist/{mirc-CFtY8dqz.js → mirc-nJVyhA0H.js} +0 -0
  378. /package/dist/{mllike-C0EJrEOk.js → mllike-DRO89bsU.js} +0 -0
  379. /package/dist/{modelica-C1kO1nfS.js → modelica-Don3E6ZD.js} +0 -0
  380. /package/dist/{mscgen-DEYdr7AY.js → mscgen-DJfqD3bN.js} +0 -0
  381. /package/dist/{mumps-B3NVJs2V.js → mumps-SjGTvDYL.js} +0 -0
  382. /package/dist/{nginx-ComVAAGN.js → nginx-DasThI7R.js} +0 -0
  383. /package/dist/{node-sql-parser-DNGGJ-Rw.js → node-sql-parser-B8nBD36q.js} +0 -0
  384. /package/dist/{ntriples-DHol9X9H.js → ntriples-CNBKRl3I.js} +0 -0
  385. /package/dist/{octave-CYGz0bfo.js → octave-DdeVHNlx.js} +0 -0
  386. /package/dist/{oz-kPxb2ni5.js → oz-CcKSoNvN.js} +0 -0
  387. /package/dist/{pascal-bZ0yrJKy.js → pascal-6leftwNj.js} +0 -0
  388. /package/dist/{path-Du6n3sOU.js → path-BGaWgPKg.js} +0 -0
  389. /package/dist/{perl-z4hvqyqz.js → perl-BhJIwWzN.js} +0 -0
  390. /package/dist/{pig-DZO8QDF9.js → pig-r-xDHqRf.js} +0 -0
  391. /package/dist/{powershell-BSuaDQEC.js → powershell-D-BELeNi.js} +0 -0
  392. /package/dist/{properties-BXhGLlIx.js → properties-CnuDhbll.js} +0 -0
  393. /package/dist/{protobuf-DM6iybWV.js → protobuf-CO8RBhvX.js} +0 -0
  394. /package/dist/{puppet-Bn05sQT8.js → puppet-NmXHjLy8.js} +0 -0
  395. /package/dist/{python-Cvnhm0g7.js → python-DAQXi720.js} +0 -0
  396. /package/dist/{q-B9V8hzex.js → q-DlikXfV0.js} +0 -0
  397. /package/dist/{r-Cf0gFqmq.js → r-CuohilwT.js} +0 -0
  398. /package/dist/{rpm-D-LMkTV1.js → rpm-0Pjwp0Pb.js} +0 -0
  399. /package/dist/{ruby-DeuPikpK.js → ruby-Dq8NJTDG.js} +0 -0
  400. /package/dist/{sas-C9tjgAo9.js → sas-CuwonyVP.js} +0 -0
  401. /package/dist/{scheme-D1_bUF0G.js → scheme-CYU-RRIf.js} +0 -0
  402. /package/dist/{shell-CJBmnks3.js → shell-COPmX2qE.js} +0 -0
  403. /package/dist/{sieve-1fSV75CF.js → sieve-B_3zyLne.js} +0 -0
  404. /package/dist/{simple-mode-B90Wdavj.js → simple-mode-DSBniks8.js} +0 -0
  405. /package/dist/{smalltalk-sZNPD0HO.js → smalltalk-DRft7iPv.js} +0 -0
  406. /package/dist/{solr-DTkyqJ-Z.js → solr-RZ9uTl59.js} +0 -0
  407. /package/dist/{sparql-oHc1nm77.js → sparql-CN6qj55H.js} +0 -0
  408. /package/dist/{spreadsheet-CER0raqY.js → spreadsheet-BNNUNXA2.js} +0 -0
  409. /package/dist/{sql-ByOoEONQ.js → sql-B4x8IkwU.js} +0 -0
  410. /package/dist/{stylus-KzkX6zRB.js → stylus-Bn_ZjOQ3.js} +0 -0
  411. /package/dist/{swift-DqVxZvKo.js → swift-BLUJhMbz.js} +0 -0
  412. /package/dist/{swiper-component-KkEVUDd3.js → swiper-component-BHs0PWwp.js} +0 -0
  413. /package/dist/{tcl-BtWSwXfA.js → tcl-C86fxecl.js} +0 -0
  414. /package/dist/{textile-CWDbn9Ql.js → textile-DmHh2rsK.js} +0 -0
  415. /package/dist/{tiddlywiki-Cr9xyOY1.js → tiddlywiki-DI0mF2WJ.js} +0 -0
  416. /package/dist/{tiki-D5JONyfZ.js → tiki-2HU6XLLn.js} +0 -0
  417. /package/dist/{timer-D7JVdX9U.js → timer-YZl28NYN.js} +0 -0
  418. /package/dist/{toml-BfehlgmL.js → toml-GWANRNAD.js} +0 -0
  419. /package/dist/{treemap-qFGzn7xk.js → treemap-D-ka1hvx.js} +0 -0
  420. /package/dist/{troff-BZBk6AAu.js → troff-BHTsomIy.js} +0 -0
  421. /package/dist/{ttcn-DVwvXg0_.js → ttcn-DQuhn5Mn.js} +0 -0
  422. /package/dist/{ttcn-cfg-gjbVLf1L.js → ttcn-cfg-HjFYtdB-.js} +0 -0
  423. /package/dist/{turtle-CgxKXorV.js → turtle-nCay33Nv.js} +0 -0
  424. /package/dist/{vb-B9kSwTdM.js → vb-BG-XlqqJ.js} +0 -0
  425. /package/dist/{vbscript-DrUKSCdb.js → vbscript-B6vyW0-D.js} +0 -0
  426. /package/dist/{velocity-AlMYTnMy.js → velocity-CWegueqO.js} +0 -0
  427. /package/dist/{verilog-DLUaM05j.js → verilog-CzSQm4cG.js} +0 -0
  428. /package/dist/{vhdl-DUJOtSmO.js → vhdl-DqnNVL7r.js} +0 -0
  429. /package/dist/{webidl-CQp4aHk_.js → webidl-DXEUpDWH.js} +0 -0
  430. /package/dist/{xquery-IxkjlwOD.js → xquery-Ba_NB5bD.js} +0 -0
  431. /package/dist/{yacas-Bnctn5w8.js → yacas-HKQU6hyk.js} +0 -0
  432. /package/dist/{z80-DrFwhx53.js → z80-CXkHXLdj.js} +0 -0
@@ -11,6 +11,9 @@ import { prettyError } from "@/utils/errors";
11
11
  import { Functions } from "@/utils/functions";
12
12
  import { type FilePath, PathBuilder } from "@/utils/paths";
13
13
  import { resolvePaths } from "@/utils/pathUtils";
14
+ import { mapWithConcurrency } from "@/utils/semaphore";
15
+
16
+ const FILE_OP_CONCURRENCY = 5;
14
17
 
15
18
  /**
16
19
  * Normalized result of a file mutation: the server response when successful,
@@ -159,28 +162,26 @@ export class RequestingTree {
159
162
  ? (this.delegate.find(parentId)?.data.path ?? parentId)
160
163
  : this.rootPath;
161
164
 
162
- await Promise.all(
163
- fromIds.map(async (id) => {
164
- const node = this.delegate.find(id);
165
- if (!node) {
166
- return;
167
- }
168
- const originalPath = node.data.path;
169
- const newPath = this.path.join(
170
- parentPath,
171
- this.path.basename(originalPath as FilePath),
172
- );
173
- const result = await this.callbacks
174
- .renameFileOrFolder({ path: originalPath, newPath })
175
- .then(handleFileResponse);
176
- if (!result) {
177
- return;
178
- }
165
+ await mapWithConcurrency(fromIds, FILE_OP_CONCURRENCY, async (id) => {
166
+ const node = this.delegate.find(id);
167
+ if (!node) {
168
+ return;
169
+ }
170
+ const originalPath = node.data.path;
171
+ const newPath = this.path.join(
172
+ parentPath,
173
+ this.path.basename(originalPath as FilePath),
174
+ );
175
+ const result = await this.callbacks
176
+ .renameFileOrFolder({ path: originalPath, newPath })
177
+ .then(handleFileResponse);
178
+ if (!result) {
179
+ return;
180
+ }
179
181
 
180
- this.delegate.move({ id, parentId, index: 0 });
181
- this.delegate.update({ id, changes: { path: newPath } });
182
- }),
183
- );
182
+ this.delegate.move({ id, parentId, index: 0 });
183
+ this.delegate.update({ id, changes: { path: newPath } });
184
+ });
184
185
 
185
186
  this.onChange(this.delegate.data);
186
187
 
@@ -262,11 +263,12 @@ export class RequestingTree {
262
263
  this.rootPath,
263
264
  ...ids.map((id) => this.delegate.find(id)?.data.path),
264
265
  ].filter(Boolean);
265
- // Request all folders in parallel, and catch any errors
266
- const data = await Promise.all(
267
- openFolders.map((path) =>
266
+ // Request open folders with bounded concurrency; swallow per-folder errors.
267
+ const data = await mapWithConcurrency(
268
+ openFolders,
269
+ FILE_OP_CONCURRENCY,
270
+ (path) =>
268
271
  this.callbacks.listFiles({ path: path }).catch(() => ({ files: [] })),
269
- ),
270
272
  );
271
273
 
272
274
  for (const [idx, openFolder] of openFolders.entries()) {
@@ -3,13 +3,14 @@
3
3
  import { type DropzoneOptions, useDropzone } from "react-dropzone";
4
4
  import { toast } from "@/components/ui/use-toast";
5
5
  import { useRequestClient } from "@/core/network/requests";
6
- import { serializeBlob } from "@/utils/blob";
7
6
  import { withLoadingToast } from "@/utils/download";
8
7
  import { Logger } from "@/utils/Logger";
9
8
  import { type FilePath, PathBuilder } from "@/utils/paths";
9
+ import { mapWithConcurrency } from "@/utils/semaphore";
10
10
  import { refreshRoot } from "./state";
11
11
 
12
12
  const MAX_SIZE = 1024 * 1024 * 100; // 100MB
13
+ const UPLOAD_CONCURRENCY = 5;
13
14
 
14
15
  export function useFileExplorerUpload(options: DropzoneOptions = {}) {
15
16
  const { sendCreateFileOrFolder } = useRequestClient();
@@ -59,30 +60,28 @@ export function useFileExplorerUpload(options: DropzoneOptions = {}) {
59
60
  loadingTitle,
60
61
  async (progress) => {
61
62
  progress.addTotal(acceptedFiles.length);
62
- for (const file of acceptedFiles) {
63
- // We strip the leading slash since File.path can return
64
- // `/path/to/file`.
65
- const filePath = stripLeadingSlash(getPath(file));
66
- let directoryPath = "" as FilePath;
67
- if (filePath) {
68
- directoryPath =
69
- PathBuilder.guessDeliminator(filePath).dirname(filePath);
70
- }
63
+ await mapWithConcurrency(
64
+ acceptedFiles,
65
+ UPLOAD_CONCURRENCY,
66
+ async (file) => {
67
+ // We strip the leading slash since File.path can return
68
+ // `/path/to/file`.
69
+ const filePath = stripLeadingSlash(getPath(file));
70
+ let directoryPath = "" as FilePath;
71
+ if (filePath) {
72
+ directoryPath =
73
+ PathBuilder.guessDeliminator(filePath).dirname(filePath);
74
+ }
71
75
 
72
- // File contents are sent base64-encoded to support arbitrary
73
- // bytes data
74
- //
75
- // get the raw base64-encoded data from a string starting with
76
- // data:*/*;base64,
77
- const base64 = (await serializeBlob(file)).split(",")[1];
78
- await sendCreateFileOrFolder({
79
- path: directoryPath,
80
- type: "file",
81
- name: file.name,
82
- contents: base64,
83
- });
84
- progress.increment(1);
85
- }
76
+ await sendCreateFileOrFolder({
77
+ path: directoryPath,
78
+ type: "file",
79
+ name: file.name,
80
+ file,
81
+ });
82
+ progress.increment(1);
83
+ },
84
+ );
86
85
  await refreshRoot();
87
86
  },
88
87
  onFinish,
@@ -246,7 +246,7 @@ describe("insertImage", () => {
246
246
  path: "public",
247
247
  type: "file",
248
248
  name: "hello.png",
249
- contents: "AQID",
249
+ file: expect.any(File),
250
250
  });
251
251
 
252
252
  expect(view.state.doc.toString()).toMatchInlineSnapshot(
@@ -291,7 +291,7 @@ describe("insertImage", () => {
291
291
  path: "nested/public", // store in public folder of notebook directory
292
292
  type: "file",
293
293
  name: "hello.png",
294
- contents: "AQID",
294
+ file: expect.any(File),
295
295
  });
296
296
 
297
297
  expect(view.state.doc.toString()).toMatchInlineSnapshot(
@@ -337,7 +337,7 @@ describe("insertImage", () => {
337
337
  path: "/Users/user/Development/project/public",
338
338
  type: "file",
339
339
  name: "hello.png",
340
- contents: "AQID",
340
+ file: expect.any(File),
341
341
  });
342
342
 
343
343
  // Should convert absolute path to relative path
@@ -313,7 +313,6 @@ export async function insertImage(view: EditorView, file: File) {
313
313
  // If the file is base64 encoded, we can save it locally to prevent large file strings
314
314
  try {
315
315
  if (dataUrl.startsWith("data:")) {
316
- const base64 = dataUrl.split(",")[1];
317
316
  let inputFilename = prompt(
318
317
  "We can save your image as a file. Enter a filename.",
319
318
  file.name,
@@ -348,7 +347,7 @@ export async function insertImage(view: EditorView, file: File) {
348
347
  path: publicFolderPath as FilePath,
349
348
  type: "file",
350
349
  name: inputFilename,
351
- contents: base64,
350
+ file,
352
351
  });
353
352
 
354
353
  if (createFileRes.success) {
@@ -6,6 +6,19 @@ import { API, createClientWithRuntimeManager } from "./api";
6
6
  import { waitForConnectionOpen } from "./connection";
7
7
  import type { EditRequests, RunRequests } from "./types";
8
8
 
9
+ /**
10
+ * Options for POSTing FormData via openapi-fetch. openapi-fetch types
11
+ * request bodies from the JSON schema, so we bypass the body type and
12
+ * override the serializer to pass the FormData through unchanged; the
13
+ * browser then sets the multipart Content-Type with boundary.
14
+ */
15
+ function multipartInit(formData: FormData) {
16
+ return {
17
+ body: formData as never,
18
+ bodySerializer: (body: unknown) => body as never,
19
+ };
20
+ }
21
+
9
22
  const { handleResponse, handleResponseReturnNull } = API;
10
23
 
11
24
  export function createNetworkRequests(): EditRequests & RunRequests {
@@ -298,10 +311,15 @@ export function createNetworkRequests(): EditRequests & RunRequests {
298
311
  },
299
312
  sendCreateFileOrFolder: async (request) => {
300
313
  await waitForConnectionOpen();
314
+ const formData = new FormData();
315
+ formData.append("path", request.path);
316
+ formData.append("type", request.type);
317
+ formData.append("name", request.name);
318
+ if (request.file) {
319
+ formData.append("file", request.file, request.name);
320
+ }
301
321
  return getClient()
302
- .POST("/api/files/create", {
303
- body: request,
304
- })
322
+ .POST("/api/files/create", multipartInit(formData))
305
323
  .then(handleResponse);
306
324
  },
307
325
  sendDeleteFileOrFolder: async (request) => {
@@ -80,6 +80,17 @@ export type SaveUserConfigurationRequest =
80
80
  export interface SetCellConfigRequest {
81
81
  configs: Record<CellId, Partial<CellConfig>>;
82
82
  }
83
+ /**
84
+ * Client-side shape for creating a file/directory/notebook. The HTTP
85
+ * transport sends this as multipart/form-data; the WASM bridge base64-encodes
86
+ * `file` internally and crosses the JS<->Py boundary as JSON.
87
+ */
88
+ export interface FileCreateInput {
89
+ path: string;
90
+ type: "file" | "directory" | "notebook";
91
+ name: string;
92
+ file?: Blob;
93
+ }
83
94
  export type UpdateUIElementRequest = schemas["UpdateUIElementRequest"];
84
95
  export type ModelRequest = schemas["ModelRequest"];
85
96
  export type NotebookDocumentTransactionRequest =
@@ -165,7 +176,7 @@ export interface EditRequests {
165
176
  sendListFiles: (request: FileListRequest) => Promise<FileListResponse>;
166
177
  sendSearchFiles: (request: FileSearchRequest) => Promise<FileSearchResponse>;
167
178
  sendCreateFileOrFolder: (
168
- request: FileCreateRequest,
179
+ request: FileCreateInput,
169
180
  ) => Promise<FileCreateResponse>;
170
181
  sendDeleteFileOrFolder: (
171
182
  request: FileDeleteRequest,
@@ -3,6 +3,7 @@
3
3
 
4
4
  import { toast } from "@/components/ui/use-toast";
5
5
  import { userConfigAtom } from "@/core/config/config";
6
+ import { serializeBlob } from "@/utils/blob";
6
7
  import { Deferred } from "@/utils/Deferred";
7
8
  import { throwNotImplemented } from "@/utils/functions";
8
9
  import { Logger } from "@/utils/Logger";
@@ -431,9 +432,21 @@ export class PyodideBridge implements RunRequests, EditRequests {
431
432
  sendCreateFileOrFolder: EditRequests["sendCreateFileOrFolder"] = async (
432
433
  request,
433
434
  ) => {
435
+ // The WASM RPC boundary can only carry JSON, so we base64-encode the
436
+ // file bytes here. The HTTP transport uses multipart/form-data instead.
437
+ let contents: string | null = null;
438
+ if (request.file) {
439
+ const dataUrl = await serializeBlob(request.file);
440
+ contents = dataUrl.split(",")[1] ?? "";
441
+ }
434
442
  const response = await this.rpc.proxy.request.bridge({
435
443
  functionName: "create_file_or_directory",
436
- payload: request,
444
+ payload: {
445
+ path: request.path,
446
+ type: request.type,
447
+ name: request.name,
448
+ contents,
449
+ },
437
450
  });
438
451
  return response as FileCreateResponse;
439
452
  };
@@ -145,6 +145,14 @@ describe("sanitizeHtml", () => {
145
145
  );
146
146
  });
147
147
 
148
+ test("preserves marimo-mermaid with theme attributes", () => {
149
+ const html =
150
+ "<marimo-mermaid data-diagram='&quot;graph TD\\nA --&gt; B&quot;' data-theme='&quot;base&quot;' data-theme_variables='{&quot;primaryColor&quot;: &quot;#E8EEF5&quot;, &quot;lineColor&quot;: &quot;#475569&quot;}'></marimo-mermaid>";
151
+ expect(sanitizeHtml(html)).toMatchInlineSnapshot(
152
+ `"<marimo-mermaid data-diagram="&quot;graph TD\\nA --> B&quot;" data-theme="&quot;base&quot;" data-theme_variables="{&quot;primaryColor&quot;: &quot;#E8EEF5&quot;, &quot;lineColor&quot;: &quot;#475569&quot;}"></marimo-mermaid>"`,
153
+ );
154
+ });
155
+
148
156
  test("keeps style tags with FORCE_BODY", () => {
149
157
  const html = "<style>body { color: red; }</style><p>Text</p>";
150
158
  expect(sanitizeHtml(html)).toMatchInlineSnapshot(
@@ -194,6 +194,7 @@ interface Data<T> {
194
194
  wrappedColumns?: string[];
195
195
  headerTooltip?: Record<string, string>;
196
196
  totalColumns: number;
197
+ sizeBytes?: number | null;
197
198
  maxColumns: number | "all";
198
199
  hasStableRowId: boolean;
199
200
  lazy: boolean;
@@ -220,6 +221,7 @@ type DataTableFunctions = {
220
221
  cell_styles?: CellStyleState | null;
221
222
  cell_hover_texts?: Record<string, Record<string, string | null>> | null;
222
223
  raw_data?: TableData<T> | null;
224
+ size_bytes?: number | null;
223
225
  }>;
224
226
  get_data_url?: GetDataUrl;
225
227
  get_row_ids?: GetRowIds;
@@ -270,6 +272,7 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
270
272
  headerTooltip: z.record(z.string(), z.string()).optional(),
271
273
  fieldTypes: columnToFieldTypesSchema.nullish(),
272
274
  totalColumns: z.number(),
275
+ sizeBytes: z.number().nullish(),
273
276
  maxColumns: z.union([z.number(), z.literal("all")]).default("all"),
274
277
  hasStableRowId: z.boolean().default(false),
275
278
  maxHeight: z.number().optional(),
@@ -327,6 +330,7 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
327
330
  .nullable(),
328
331
  cell_hover_texts: cellHoverTextSchema.nullable(),
329
332
  raw_data: z.union([z.string(), z.array(z.looseObject({}))]).nullish(),
333
+ size_bytes: z.number().nullish(),
330
334
  }),
331
335
  ),
332
336
  get_row_ids: rpc.input(z.object({}).passthrough()).output(
@@ -532,6 +536,7 @@ export const LoadingDataTableComponent = memo(
532
536
  rows: T[];
533
537
  rawRows?: T[];
534
538
  totalRows: number | TooManyRows;
539
+ sizeBytes?: number | null;
535
540
  cellStyles: CellStyleState | undefined | null;
536
541
  cellHoverTexts?: Record<string, Record<string, string | null>> | null;
537
542
  }>(async () => {
@@ -548,6 +553,7 @@ export const LoadingDataTableComponent = memo(
548
553
  let tableData = props.data;
549
554
  let rawTableData: TableData<T> | undefined | null = props.rawData;
550
555
  let totalRows = props.totalRows;
556
+ let sizeBytes = props.sizeBytes ?? null;
551
557
  let cellStyles = props.cellStyles;
552
558
  let cellHoverTexts = props.cellHoverTexts;
553
559
 
@@ -591,6 +597,7 @@ export const LoadingDataTableComponent = memo(
591
597
  tableData = searchResults.data;
592
598
  rawTableData = searchResults.raw_data;
593
599
  totalRows = searchResults.total_rows;
600
+ sizeBytes = searchResults.size_bytes ?? null;
594
601
  cellStyles = searchResults.cell_styles || {};
595
602
  cellHoverTexts = searchResults.cell_hover_texts || {};
596
603
  }
@@ -603,6 +610,7 @@ export const LoadingDataTableComponent = memo(
603
610
  rows: tableData,
604
611
  rawRows: rawData,
605
612
  totalRows: totalRows,
613
+ sizeBytes,
606
614
  cellStyles,
607
615
  cellHoverTexts,
608
616
  };
@@ -614,6 +622,7 @@ export const LoadingDataTableComponent = memo(
614
622
  useDeepCompareMemoize(props.fieldTypes),
615
623
  props.data,
616
624
  props.totalRows,
625
+ props.sizeBytes,
617
626
  props.lazy,
618
627
  props.cellHoverTexts,
619
628
  props.cellStyles,
@@ -728,6 +737,7 @@ export const LoadingDataTableComponent = memo(
728
737
  setFilters={setFilters}
729
738
  reloading={isFetching && !isPending}
730
739
  totalRows={data?.totalRows ?? props.totalRows}
740
+ sizeBytes={data?.sizeBytes ?? props.sizeBytes ?? null}
731
741
  paginationState={paginationState}
732
742
  setPaginationState={setPaginationState}
733
743
  cellStyles={data?.cellStyles ?? props.cellStyles}
@@ -774,6 +784,7 @@ const DataTableComponent = ({
774
784
  data,
775
785
  rawData,
776
786
  totalRows,
787
+ sizeBytes,
777
788
  maxColumns,
778
789
  pagination,
779
790
  selection,
@@ -1053,6 +1064,7 @@ const DataTableComponent = ({
1053
1064
  maxHeight={maxHeight}
1054
1065
  sorting={sorting}
1055
1066
  totalRows={totalRows}
1067
+ sizeBytes={sizeBytes}
1056
1068
  totalColumns={totalColumns}
1057
1069
  manualSorting={true}
1058
1070
  setSorting={setSorting}
@@ -7,6 +7,7 @@ import {
7
7
  TabsList,
8
8
  TabsTrigger,
9
9
  } from "../../components/ui/tabs";
10
+ import { cn } from "../../utils/cn";
10
11
  import { renderHTML } from "../core/RenderHTML";
11
12
  import type { IPlugin, IPluginProps } from "../types";
12
13
  import { Labeled } from "./common/labeled";
@@ -17,6 +18,7 @@ interface Data {
17
18
  */
18
19
  tabs: string[];
19
20
  label: string | null;
21
+ orientation: "horizontal" | "vertical";
20
22
  }
21
23
 
22
24
  // Selected tab index
@@ -28,6 +30,7 @@ export class TabsPlugin implements IPlugin<T, Data> {
28
30
  validator = z.object({
29
31
  tabs: z.array(z.string()),
30
32
  label: z.string().nullable(),
33
+ orientation: z.enum(["horizontal", "vertical"]).default("horizontal"),
31
34
  });
32
35
 
33
36
  render(props: IPluginProps<T, Data>): JSX.Element {
@@ -51,6 +54,7 @@ interface TabComponentProps extends Data {
51
54
  const TabComponent = ({
52
55
  tabs,
53
56
  label,
57
+ orientation,
54
58
  value,
55
59
  setValue,
56
60
  children,
@@ -70,19 +74,43 @@ const TabComponent = ({
70
74
  setInternalValue(value);
71
75
  }
72
76
 
77
+ const isVertical = orientation === "vertical";
78
+ const childArray =
79
+ children == null ? [] : Array.isArray(children) ? children : [children];
80
+
73
81
  return (
74
- <Labeled label={label} align="top">
75
- <Tabs value={internalValue} onValueChange={handleChange}>
76
- <TabsList>
82
+ <Labeled label={label} align="top" fullWidth={true}>
83
+ <Tabs
84
+ value={internalValue}
85
+ onValueChange={handleChange}
86
+ orientation={orientation}
87
+ className={cn(isVertical && "flex flex-row gap-3")}
88
+ >
89
+ <TabsList
90
+ className={cn(
91
+ "scrollbar-thin",
92
+ isVertical
93
+ ? "flex flex-col items-stretch justify-start h-auto max-h-none shrink-0 min-w-[10rem] overflow-y-auto"
94
+ : "max-w-full overflow-x-auto justify-start",
95
+ )}
96
+ >
77
97
  {tabs.map((tab, index) => (
78
- <TabsTrigger key={index} value={index.toString()}>
98
+ <TabsTrigger
99
+ key={index}
100
+ value={index.toString()}
101
+ className={cn(isVertical && "w-full justify-start")}
102
+ >
79
103
  {renderHTML({ html: tab })}
80
104
  </TabsTrigger>
81
105
  ))}
82
106
  </TabsList>
83
- {React.Children.map(children, (child, index) => {
84
- return <TabsContent value={index.toString()}>{child}</TabsContent>;
85
- })}
107
+ <div className={cn(isVertical && "flex-1 min-w-0")}>
108
+ {childArray.map((child, index) => (
109
+ <TabsContent key={index} value={index.toString()}>
110
+ {child}
111
+ </TabsContent>
112
+ ))}
113
+ </div>
86
114
  </Tabs>
87
115
  </Labeled>
88
116
  );
@@ -0,0 +1,154 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { fireEvent, render, screen } from "@testing-library/react";
4
+ import { beforeAll, describe, expect, it, vi } from "vitest";
5
+ import type { z } from "zod";
6
+ import { initialModeAtom } from "@/core/mode";
7
+ import { store } from "@/core/state/jotai";
8
+ import type { IPluginProps } from "../../types";
9
+ import { TabsPlugin } from "../TabsPlugin";
10
+
11
+ describe("TabsPlugin", () => {
12
+ beforeAll(() => {
13
+ store.set(initialModeAtom, "edit");
14
+ });
15
+
16
+ const renderPlugin = (
17
+ data: z.input<TabsPlugin["validator"]>,
18
+ initialValue = "0",
19
+ ) => {
20
+ const plugin = new TabsPlugin();
21
+ const host = document.createElement("div");
22
+ const setValue = vi.fn();
23
+ const children = [
24
+ <span key="0">Content 0</span>,
25
+ <span key="1">Content 1</span>,
26
+ <span key="2">Content 2</span>,
27
+ ];
28
+ const makeProps = (
29
+ value: string,
30
+ ): IPluginProps<string, z.infer<TabsPlugin["validator"]>> => ({
31
+ data: plugin.validator.parse(data),
32
+ value,
33
+ setValue,
34
+ host,
35
+ functions: {},
36
+ children,
37
+ });
38
+ const result = render(plugin.render(makeProps(initialValue)));
39
+ return {
40
+ ...result,
41
+ setValue,
42
+ rerenderWithValue: (newValue: string) =>
43
+ result.rerender(plugin.render(makeProps(newValue))),
44
+ };
45
+ };
46
+
47
+ it("renders all tab triggers", () => {
48
+ renderPlugin({
49
+ tabs: ["First", "Second", "Third"],
50
+ label: null,
51
+ });
52
+ expect(screen.getByRole("tab", { name: "First" })).toBeInTheDocument();
53
+ expect(screen.getByRole("tab", { name: "Second" })).toBeInTheDocument();
54
+ expect(screen.getByRole("tab", { name: "Third" })).toBeInTheDocument();
55
+ });
56
+
57
+ it("supports vertical orientation", () => {
58
+ renderPlugin({
59
+ tabs: ["First", "Second"],
60
+ label: null,
61
+ orientation: "vertical",
62
+ });
63
+ const tablist = screen.getByRole("tablist");
64
+ expect(tablist).toHaveAttribute("data-orientation", "vertical");
65
+ expect(tablist.className).toMatch(/flex-col/);
66
+ // Horizontal scroll classes should not be applied in vertical mode.
67
+ expect(tablist.className).not.toMatch(/overflow-x-auto/);
68
+ });
69
+
70
+ it("falls back to horizontal when orientation is omitted (back-compat)", () => {
71
+ // Older Python kernels won't send `orientation` — make sure the validator
72
+ // defaults it so the frontend keeps working.
73
+ const plugin = new TabsPlugin();
74
+ const parsed = plugin.validator.parse({
75
+ tabs: ["First"],
76
+ label: null,
77
+ });
78
+ expect(parsed.orientation).toBe("horizontal");
79
+ });
80
+
81
+ it("selects the tab matching the initial value", () => {
82
+ renderPlugin({ tabs: ["First", "Second", "Third"], label: null }, "1");
83
+ const tabs = screen.getAllByRole("tab");
84
+ expect(tabs[0]).toHaveAttribute("data-state", "inactive");
85
+ expect(tabs[1]).toHaveAttribute("data-state", "active");
86
+ expect(tabs[2]).toHaveAttribute("data-state", "inactive");
87
+ });
88
+
89
+ it("defaults to the first tab when value is empty", () => {
90
+ renderPlugin({ tabs: ["First", "Second"], label: null }, "");
91
+ const tabs = screen.getAllByRole("tab");
92
+ expect(tabs[0]).toHaveAttribute("data-state", "active");
93
+ expect(tabs[1]).toHaveAttribute("data-state", "inactive");
94
+ });
95
+
96
+ it("calls setValue with the clicked tab's index", () => {
97
+ const { setValue } = renderPlugin({
98
+ tabs: ["First", "Second", "Third"],
99
+ label: null,
100
+ });
101
+ // Radix Tabs' trigger reacts to mousedown (left button), not click —
102
+ // see https://github.com/radix-ui/primitives/blob/main/packages/react/tabs/src/Tabs.tsx
103
+ fireEvent.mouseDown(screen.getByRole("tab", { name: "Third" }), {
104
+ button: 0,
105
+ });
106
+ expect(setValue).toHaveBeenCalledWith("2");
107
+ });
108
+
109
+ it("syncs selection when value is updated externally", () => {
110
+ const { rerenderWithValue } = renderPlugin(
111
+ { tabs: ["First", "Second", "Third"], label: null },
112
+ "0",
113
+ );
114
+ expect(screen.getAllByRole("tab")[0]).toHaveAttribute(
115
+ "data-state",
116
+ "active",
117
+ );
118
+
119
+ rerenderWithValue("2");
120
+ const tabs = screen.getAllByRole("tab");
121
+ expect(tabs[0]).toHaveAttribute("data-state", "inactive");
122
+ expect(tabs[2]).toHaveAttribute("data-state", "active");
123
+ });
124
+
125
+ it("renders HTML in tab labels via renderHTML", () => {
126
+ renderPlugin({
127
+ tabs: ["<strong>Bold</strong>", "Plain"],
128
+ label: null,
129
+ });
130
+ const boldTab = screen.getByRole("tab", { name: "Bold" });
131
+ // The label markup is preserved (not escaped as text), so the trigger
132
+ // contains a real <strong> element.
133
+ expect(boldTab.querySelector("strong")).not.toBeNull();
134
+ });
135
+
136
+ it("renders no tabpanels when tabs and children are empty", () => {
137
+ // When the Python side passes `tabs={}`, slotted HTML is empty and the
138
+ // resulting React children are null/undefined. We should render zero
139
+ // `TabsContent`s — not a stray one paired to a non-existent trigger.
140
+ const plugin = new TabsPlugin();
141
+ const host = document.createElement("div");
142
+ const props: IPluginProps<string, z.infer<TabsPlugin["validator"]>> = {
143
+ data: plugin.validator.parse({ tabs: [], label: null }),
144
+ value: "",
145
+ setValue: vi.fn(),
146
+ host,
147
+ functions: {},
148
+ children: null,
149
+ };
150
+ render(plugin.render(props));
151
+ expect(screen.queryAllByRole("tab")).toHaveLength(0);
152
+ expect(screen.queryAllByRole("tabpanel")).toHaveLength(0);
153
+ });
154
+ });
@@ -64,6 +64,7 @@ type PluginFunctions = {
64
64
  column_types_per_step: FieldTypesWithExternalType[];
65
65
  python_code?: string | null;
66
66
  sql_code?: string | null;
67
+ size_bytes?: number | null;
67
68
  }>;
68
69
  get_column_values: (req: { column: string }) => Promise<{
69
70
  values: unknown[];
@@ -81,6 +82,7 @@ type PluginFunctions = {
81
82
  }) => Promise<{
82
83
  data: TableData<T>;
83
84
  total_rows: number;
85
+ size_bytes?: number | null;
84
86
  }>;
85
87
  download_as: DownloadAsArgs;
86
88
  };
@@ -118,6 +120,7 @@ export const DataFramePlugin = createPlugin<S>("marimo-dataframe")
118
120
  column_types_per_step: z.array(columnToFieldTypesSchema),
119
121
  python_code: z.string().nullish(),
120
122
  sql_code: z.string().nullish(),
123
+ size_bytes: z.number().nullish(),
121
124
  }),
122
125
  ),
123
126
  get_column_values: rpc.input(z.object({ column: z.string() })).output(
@@ -147,6 +150,7 @@ export const DataFramePlugin = createPlugin<S>("marimo-dataframe")
147
150
  z.object({
148
151
  data: z.union([z.string(), z.array(z.object({}).passthrough())]),
149
152
  total_rows: z.number(),
153
+ size_bytes: z.number().nullish(),
150
154
  }),
151
155
  ),
152
156
  download_as: DownloadAsSchema,
@@ -203,6 +207,7 @@ export const DataFrameComponent = memo(
203
207
  column_types_per_step,
204
208
  python_code,
205
209
  sql_code,
210
+ size_bytes,
206
211
  } = data || {};
207
212
 
208
213
  const totalColumns = field_types?.length;
@@ -322,6 +327,7 @@ export const DataFrameComponent = memo(
322
327
  data={url || ""}
323
328
  hasStableRowId={false}
324
329
  totalRows={total_rows ?? 0}
330
+ sizeBytes={size_bytes ?? null}
325
331
  totalColumns={totalColumns ?? 0}
326
332
  maxColumns="all"
327
333
  pageSize={pageSize}