@marimo-team/islands 0.24.1-dev99 → 0.24.1

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 (245) hide show
  1. package/dist/{ConnectedDataExplorerComponent-D9EG584s.js → ConnectedDataExplorerComponent-qIKbwYin.js} +12 -12
  2. package/dist/{ErrorBoundary-D-EKz8oE.js → ErrorBoundary-CR-ZQN_c.js} +3 -3
  3. package/dist/any-language-editor-CpTnK43-.js +76 -0
  4. package/dist/{apl-DbeWBitN.js → apl-BYaaig9_.js} +1 -1
  5. package/dist/{asciiarmor-DVGcwGvr.js → asciiarmor-GKQFJXQG.js} +1 -1
  6. package/dist/{asn1-C7ZkyMi3.js → asn1-BsSb7HP5.js} +1 -1
  7. package/dist/assets/__vite-browser-external-BdKGjRZ4.js +1 -0
  8. package/dist/assets/{worker-C3TCEtlU.js → worker-DlIBfp9S.js} +2 -2
  9. package/dist/{asterisk-4f1CDJJt.js → asterisk-B3I8SNb5.js} +1 -1
  10. package/dist/{brainfuck-Cr9wPNgk.js → brainfuck-DXjk3bQe.js} +1 -1
  11. package/dist/{button-DlqUC8W-.js → button-CKBkqR9J.js} +6 -1
  12. package/dist/{capabilities-CGBDXz_E.js → capabilities-CMBBJTcc.js} +1 -1
  13. package/dist/{chat-ui-CHoI65Rg.js → chat-ui-DttQ-5Ut.js} +27 -27
  14. package/dist/{check-BcJDmQdF.js → check-CHig47QV.js} +1 -1
  15. package/dist/{clike-BqAajeY2.js → clike-E2lFbGVj.js} +1 -1
  16. package/dist/{clojure-Bug5Gc5H.js → clojure-Dn_K4RlK.js} +1 -1
  17. package/dist/{cmake-R8uEfQdt.js → cmake-DpN2Top5.js} +1 -1
  18. package/dist/{cobol-DCX3p7Cj.js → cobol-Chf22-GM.js} +1 -1
  19. package/dist/{coffeescript-CA08GUrM.js → coffeescript-BVe1OiD9.js} +1 -1
  20. package/dist/{common-BTbFryuV.js → common-Df6nRS7d.js} +6846 -6695
  21. package/dist/{commonlisp-CUlYkvkK.js → commonlisp-DxoBG7fU.js} +1 -1
  22. package/dist/{copy-D9h0DuU7.js → copy-CD7S58CY.js} +2 -2
  23. package/dist/{crystal-CHw9Y8bp.js → crystal-DCM3yc4r.js} +1 -1
  24. package/dist/{css-BR752P21.js → css-DkZ9mMyI.js} +1 -1
  25. package/dist/{cypher-CGXYVdtR.js → cypher-Drw_8U5I.js} +1 -1
  26. package/dist/{d-B3Jeg95D.js → d-CsVGcKMF.js} +1 -1
  27. package/dist/{diff-BskCEFEO.js → diff-CBikYCUF.js} +1 -1
  28. package/dist/{dist-wdOJ5T7-.js → dist-3_o3T78I.js} +15 -15
  29. package/dist/{dist-C2unEUWZ.js → dist-BEmkrGoQ.js} +1492 -1484
  30. package/dist/{dist-3YfamrHv.js → dist-BVRM2y1P.js} +2 -2
  31. package/dist/{dist-cnCt-QhO.js → dist-BbSMhhD2.js} +2 -2
  32. package/dist/{dist-C9fJPKPl.js → dist-BrQGcfQ9.js} +4 -4
  33. package/dist/{dist-Bsa-FD4p.js → dist-Byj2bV8o.js} +1 -1
  34. package/dist/{dist-t3GZQZfR.js → dist-BzN60Z2s.js} +1 -1
  35. package/dist/{dist-CDiyTpo-.js → dist-C5Bn52W4.js} +3 -3
  36. package/dist/{dist-C1_Y0fKn.js → dist-C7v-9nUK.js} +3 -3
  37. package/dist/{dist-B59W3SQC.js → dist-CGAxEiaM.js} +2 -2
  38. package/dist/{dist-wGdFe2i2.js → dist-CO5R6VMi.js} +2 -2
  39. package/dist/{dist-CkF6zgs_.js → dist-CRjAdnqF.js} +14 -12
  40. package/dist/{dist-BDP-ZzBX.js → dist-D4Z_qdP4.js} +1 -1
  41. package/dist/{dist-CdoyP1Fz.js → dist-DEeLqRlU.js} +1 -1
  42. package/dist/{dist-TouP85Vh.js → dist-DJFiGP2k.js} +2 -2
  43. package/dist/{dist-Ceegh7bg.js → dist-DVFbIwc5.js} +1 -1
  44. package/dist/{dist-xIlsWj6K.js → dist-DcgzXCfy.js} +2 -2
  45. package/dist/{dist-BywyHJ0k.js → dist-Re9sOPOx.js} +2 -2
  46. package/dist/{dist-CN2pQuxD.js → dist-VdvbxG72.js} +1 -1
  47. package/dist/{dist-Bwzl7sp6.js → dist-_XvgytiS.js} +1 -1
  48. package/dist/{dist-BdxSRiPP.js → dist-dAqZAPcF.js} +3 -3
  49. package/dist/{dist-Cri9-7UA.js → dist-hXd65f0_.js} +1 -1
  50. package/dist/{dist-BmR-cjzI.js → dist-jWUab2d1.js} +1 -1
  51. package/dist/{dist-CeTE0w_x.js → dist-qhLI-SHd.js} +2 -2
  52. package/dist/{dockerfile-HPpWCSsC.js → dockerfile-DJnSntVB.js} +2 -2
  53. package/dist/{dropdown-menu-Baf29jmS.js → dropdown-menu-DhCfcscX.js} +726 -716
  54. package/dist/{dtd-9Bm4j20r.js → dtd-BHa4v0Bn.js} +1 -1
  55. package/dist/{dylan-BOpu3dto.js → dylan-BypL2Zz8.js} +1 -1
  56. package/dist/{ebnf-BogGWV2V.js → ebnf-5guncNu-.js} +1 -1
  57. package/dist/{ecl-DAcPDOW1.js → ecl-iRcVIKYZ.js} +1 -1
  58. package/dist/{eiffel-C4NgXX-Y.js → eiffel-BEqF9aU4.js} +1 -1
  59. package/dist/{elm-BiY4zCKH.js → elm-DYcfNE9c.js} +1 -1
  60. package/dist/{erlang-Dg5zi-Qk.js → erlang-BtAuIoF0.js} +1 -1
  61. package/dist/{error-banner-xVkWHg51.js → error-banner-WDhUzJyg.js} +203 -203
  62. package/dist/{esm-ElfO9dV2.js → esm-CR1nhb1c.js} +108 -107
  63. package/dist/{esm-DkklGms7.js → esm-CesmlDrs.js} +5 -5
  64. package/dist/{extends-KH0CV__g.js → extends-BPB6_lTK.js} +8 -7
  65. package/dist/{factor-B0-OaK4k.js → factor-3nzOwLuN.js} +2 -2
  66. package/dist/{fcl-DwSn1rXM.js → fcl-C90TGnJJ.js} +1 -1
  67. package/dist/{formats-nPPeLOk2.js → formats-CJMVUfb3.js} +3 -3
  68. package/dist/{forth-BGTlwczu.js → forth-DEaRrLUi.js} +1 -1
  69. package/dist/{fortran-UUzzVROb.js → fortran-Bv6JRUjY.js} +1 -1
  70. package/dist/{gas-CjkVDeev.js → gas-JNerWj3-.js} +1 -1
  71. package/dist/{gherkin-CF2G_sqt.js → gherkin-CSrl-H70.js} +1 -1
  72. package/dist/{glide-data-editor-n5E9BAD8.js → glide-data-editor-sPZ8fUFn.js} +8 -8
  73. package/dist/{glide-utils-C0dRuWI_.js → glide-utils-NShAPPtn.js} +3 -3
  74. package/dist/{groovy-YcvlOKLA.js → groovy-X7euO_vE.js} +1 -1
  75. package/dist/{haskell-BdvVmmhX.js → haskell-C48Z70Az.js} +1 -1
  76. package/dist/{haxe-Dkk4Avys.js → haxe-CAUWMmwR.js} +1 -1
  77. package/dist/{html-to-image-B09MiZT1.js → html-to-image-BTYnN4ev.js} +3782 -3784
  78. package/dist/{http-Cncc-AcB.js → http-BrSBnhDH.js} +1 -1
  79. package/dist/{idl-D5eSUN-2.js → idl-BXuPleZv.js} +1 -1
  80. package/dist/{javascript-DV7jbCN7.js → javascript-B4EPWJf_.js} +1 -1
  81. package/dist/{julia-DRMVPyrg.js → julia-ke9Kh8b7.js} +1 -1
  82. package/dist/{label-CEgg1Ymb.js → label-lwzzBHUW.js} +2 -2
  83. package/dist/{livescript-3tVlEl0n.js → livescript-Ce4uqGAC.js} +1 -1
  84. package/dist/{loader-D8jS1unC.js → loader-VZ__bv4g.js} +1 -1
  85. package/dist/{lua-DvuDcwhK.js → lua-D6fti_Jk.js} +2 -2
  86. package/dist/main.js +6189 -6189
  87. package/dist/{mathematica-DeUYrmDQ.js → mathematica-DcEpZ3Vj.js} +1 -1
  88. package/dist/{mbox-CP8ncY6Y.js → mbox-DFBbOu0X.js} +1 -1
  89. package/dist/{mermaid-CKjZUiG7.js → mermaid-BsHdQeQf.js} +4 -4
  90. package/dist/{mirc-D0BFuM5A.js → mirc-CqeibO3N.js} +1 -1
  91. package/dist/{mllike-EW0YU24D.js → mllike-D54QZYTP.js} +1 -1
  92. package/dist/{modelica-0c53v3vH.js → modelica-DuML2-8V.js} +1 -1
  93. package/dist/{mscgen-DXtnmkk0.js → mscgen-CJmKwp3b.js} +1 -1
  94. package/dist/{mumps-DuZvAoq5.js → mumps-DaVgFtkd.js} +1 -1
  95. package/dist/{nginx-BgxmKoMB.js → nginx-BXN1rqI0.js} +1 -1
  96. package/dist/{nsis-CXKR4weY.js → nsis-CMfRqf0V.js} +2 -2
  97. package/dist/{ntriples-BvwIFlGB.js → ntriples-BiOGlMDR.js} +1 -1
  98. package/dist/{octave-Ddh8-k4Y.js → octave-CgVnzxKk.js} +1 -1
  99. package/dist/{oz-DASBLPdZ.js → oz-B2mky97X.js} +1 -1
  100. package/dist/{pascal-DKEHBGVg.js → pascal-BoZhBf6s.js} +1 -1
  101. package/dist/{perl-CG83_G1y.js → perl-DjzMqXtt.js} +1 -1
  102. package/dist/{pig-C1IvQ7dn.js → pig-B2mB-01d.js} +1 -1
  103. package/dist/{powershell-Mh2j_Y9A.js → powershell-D0zT88Aj.js} +1 -1
  104. package/dist/{process-output-kUlWbyzk.js → process-output-CsALk6tp.js} +3 -3
  105. package/dist/{properties-Cr3dDyK_.js → properties-3_5qCgOj.js} +1 -1
  106. package/dist/{protobuf-5RkBxiY2.js → protobuf-Dgoxfi1H.js} +1 -1
  107. package/dist/{pug-CZBnH0wJ.js → pug-CNRdd8oG.js} +2 -2
  108. package/dist/{puppet-CjiD4zLe.js → puppet-DzILxZfz.js} +1 -1
  109. package/dist/{python-n5psJoQh.js → python-AfVdMn_l.js} +1 -1
  110. package/dist/{q-tF-lfOc1.js → q-C6p-CGWh.js} +1 -1
  111. package/dist/{r-E-Ox73Cl.js → r-CzKF1D2X.js} +1 -1
  112. package/dist/{reveal-component-AkbqvWB3.js → reveal-component-A_wZqLF9.js} +446 -446
  113. package/dist/{rpm-6OeX6y2d.js → rpm-Bx7FkjTO.js} +1 -1
  114. package/dist/{ruby-BfKhtJ9W.js → ruby-BMzgq2bf.js} +1 -1
  115. package/dist/{sas-BXINOUe8.js → sas-ClGVnK3F.js} +1 -1
  116. package/dist/{schemas-JTyiKlcH.js → schemas-DzK6U94N.js} +1380 -1364
  117. package/dist/{scheme-Bl28UhhC.js → scheme-C0MXqXep.js} +1 -1
  118. package/dist/{select-DQ9jU_B_.js → select-3qHpFKF9.js} +295 -295
  119. package/dist/{shell-C6dbyRNm.js → shell-CiQZv6oG.js} +1 -1
  120. package/dist/{sieve-CtzpqaVa.js → sieve-BiIMePvV.js} +1 -1
  121. package/dist/{simple-mode-Fa0cHplh.js → simple-mode-8ETW2RS6.js} +1 -1
  122. package/dist/{smalltalk-SWUbrj2a.js → smalltalk-9-llftyG.js} +1 -1
  123. package/dist/{solr-DrqND0L5.js → solr-CxCKEuwq.js} +1 -1
  124. package/dist/{sparql-DNeyanaw.js → sparql-BRmy7pzx.js} +1 -1
  125. package/dist/{spec-DNZWpXiu.js → spec-CutWdqo3.js} +4 -4
  126. package/dist/{spreadsheet-DUXiDdBd.js → spreadsheet-UCNUIGsn.js} +1 -1
  127. package/dist/{sql-BKgWZE5S.js → sql-D0hSGZ-H.js} +1 -1
  128. package/dist/{stex-DylRJo9v.js → stex-UeT_Aofp.js} +1 -1
  129. package/dist/style.css +1 -1
  130. package/dist/{stylus-dWe8kzGp.js → stylus-Fi4waA2H.js} +1 -1
  131. package/dist/{swift-BmWs7LJc.js → swift-NqPyaBye.js} +1 -1
  132. package/dist/{swiper-component-deYugN58.js → swiper-component-C90YjhaV.js} +2 -2
  133. package/dist/{tcl-DxdPnAuD.js → tcl-B4f0xfmM.js} +1 -1
  134. package/dist/{textile-CJnP1piA.js → textile-CnNbnPTe.js} +1 -1
  135. package/dist/{tiddlywiki-DwhP379Y.js → tiddlywiki-CSGSOg38.js} +1 -1
  136. package/dist/{tiki-1YDPYy3B.js → tiki-9F02WBA6.js} +1 -1
  137. package/dist/{toDate-DfFzRDkN.js → toDate-D-Rx3ux5.js} +3 -3
  138. package/dist/{toml-Cm-dCBP-.js → toml-AesZ6RBt.js} +1 -1
  139. package/dist/{tooltip-7p_32zdw.js → tooltip-Dt77sBeT.js} +88 -88
  140. package/dist/{troff-DNWcQdLA.js → troff-DlfvveK1.js} +1 -1
  141. package/dist/{ttcn-CaUsDYVT.js → ttcn--YVSkGs_.js} +1 -1
  142. package/dist/{ttcn-cfg-BqNhpRrY.js → ttcn-cfg-Bb1Knl_J.js} +1 -1
  143. package/dist/{turtle-CK42qVcQ.js → turtle-DC24v1bz.js} +1 -1
  144. package/dist/{useAsyncData-Cyh2jLTR.js → useAsyncData-CH6-CgJF.js} +1 -1
  145. package/dist/{useDateFormatter-CcY1uXEk.js → useDateFormatter-Cp9Jdxls.js} +2 -2
  146. package/dist/{useDeepCompareMemoize-BqcHK9ZZ.js → useDeepCompareMemoize-JC87C_jO.js} +1 -1
  147. package/dist/{useIframeCapabilities-BmYPLMe1.js → useIframeCapabilities-De3C-9b4.js} +1 -1
  148. package/dist/{useLifecycle-foJH5Q8T.js → useLifecycle-B4RGlyf0.js} +10 -10
  149. package/dist/{useTheme-C2ZreN00.js → useTheme-CVJ0UOf2.js} +3 -2
  150. package/dist/{vb-DUEXFGmn.js → vb-Dpc8vhvF.js} +1 -1
  151. package/dist/{vbscript-O6Mq-1Bt.js → vbscript-B-Y1XnZe.js} +1 -1
  152. package/dist/{vega-component-LgU-A6O9.js → vega-component-D-IXRnlx.js} +9 -9
  153. package/dist/{velocity-DTlmtsPi.js → velocity-DHMu9kc-.js} +1 -1
  154. package/dist/{verilog-prDoxOJS.js → verilog-DhiEaoUl.js} +1 -1
  155. package/dist/{vhdl-BAJ9qF1C.js → vhdl-D4X23YKO.js} +1 -1
  156. package/dist/{webidl-ybLbdZxR.js → webidl-SyzNxWpJ.js} +1 -1
  157. package/dist/{xquery-81N7rqzd.js → xquery-BC2R4Hk6.js} +1 -1
  158. package/dist/{yacas-BwVftjEP.js → yacas-DLNXPMmH.js} +1 -1
  159. package/dist/{z80-CmT0MNUO.js → z80-CDXWHOO6.js} +1 -1
  160. package/package.json +26 -26
  161. package/src/components/ai/ai-provider-icon.tsx +2 -2
  162. package/src/components/ai/ai-utils.ts +1 -1
  163. package/src/components/app-config/ai-config.tsx +33 -37
  164. package/src/components/app-config/user-config-form.tsx +1 -1
  165. package/src/components/data-table/__tests__/column-explorer.test.tsx +64 -4
  166. package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +137 -4
  167. package/src/components/data-table/__tests__/url-detector.test.tsx +1 -1
  168. package/src/components/data-table/__tests__/useColumnVisibility.test.ts +153 -1
  169. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +54 -25
  170. package/src/components/data-table/column-visibility-dropdown.tsx +62 -14
  171. package/src/components/data-table/date-popover.tsx +2 -1
  172. package/src/components/data-table/hooks/use-column-visibility.ts +76 -0
  173. package/src/components/data-table/renderers.tsx +4 -8
  174. package/src/components/data-table/show-only-column-button.tsx +58 -0
  175. package/src/components/dependency-graph/__tests__/elements.test.ts +151 -0
  176. package/src/components/dependency-graph/custom-edge.tsx +68 -0
  177. package/src/components/dependency-graph/custom-node.tsx +54 -26
  178. package/src/components/dependency-graph/dependency-graph-tree.tsx +110 -21
  179. package/src/components/dependency-graph/elements.ts +225 -31
  180. package/src/components/dependency-graph/panels.tsx +23 -2
  181. package/src/components/dependency-graph/utils/__tests__/layout.test.ts +78 -0
  182. package/src/components/dependency-graph/utils/layout.ts +108 -18
  183. package/src/components/editor/Output.tsx +40 -0
  184. package/src/components/editor/__tests__/Output.test.tsx +85 -2
  185. package/src/components/editor/connections/secret-combobox.tsx +3 -1
  186. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +832 -0
  187. package/src/components/editor/file-tree/__tests__/file-viewer.test.tsx +27 -0
  188. package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +130 -0
  189. package/src/components/editor/file-tree/file-browser-row.tsx +82 -0
  190. package/src/components/editor/file-tree/file-explorer.tsx +377 -159
  191. package/src/components/editor/file-tree/file-operations.tsx +1 -1
  192. package/src/components/editor/file-tree/file-search-results.tsx +142 -0
  193. package/src/components/editor/file-tree/file-tree-row.tsx +40 -0
  194. package/src/components/editor/file-tree/file-viewer.tsx +2 -1
  195. package/src/components/editor/file-tree/renderers.tsx +4 -2
  196. package/src/components/editor/file-tree/requesting-tree.tsx +162 -32
  197. package/src/components/editor/file-tree/use-file-search.ts +142 -0
  198. package/src/components/editor/file-tree/use-hover-expand.ts +34 -0
  199. package/src/components/editor/navigation/__tests__/navigation.test.ts +30 -0
  200. package/src/components/editor/navigation/navigation.ts +20 -0
  201. package/src/components/forms/form.tsx +6 -4
  202. package/src/components/home/components.tsx +1 -0
  203. package/src/components/static-html/share-modal.tsx +3 -2
  204. package/src/components/ui/__tests__/badge.test.ts +63 -0
  205. package/src/components/ui/__tests__/button.test.ts +19 -0
  206. package/src/components/ui/__tests__/fullscreen.test.tsx +88 -0
  207. package/src/components/ui/__tests__/menu-items.test.ts +31 -0
  208. package/src/components/ui/badge.tsx +9 -7
  209. package/src/components/ui/button.tsx +1 -0
  210. package/src/components/ui/combobox.tsx +1 -1
  211. package/src/components/ui/date-input.tsx +1 -1
  212. package/src/components/ui/dialog.tsx +3 -1
  213. package/src/components/ui/fullscreen.tsx +43 -1
  214. package/src/components/ui/input.tsx +5 -1
  215. package/src/components/ui/links.tsx +2 -1
  216. package/src/components/ui/menu-items.tsx +9 -9
  217. package/src/components/ui/native-select.tsx +2 -2
  218. package/src/components/ui/navigation.tsx +1 -1
  219. package/src/components/ui/range-slider.tsx +5 -3
  220. package/src/components/ui/select.tsx +1 -1
  221. package/src/components/ui/sheet.tsx +1 -1
  222. package/src/components/ui/toast.tsx +8 -5
  223. package/src/components/ui/toaster.tsx +2 -2
  224. package/src/core/ai/ids/__tests__/ids.test.ts +0 -8
  225. package/src/core/ai/ids/ids.ts +1 -1
  226. package/src/core/cells/__tests__/add-missing-import.test.ts +20 -0
  227. package/src/core/codemirror/language/__tests__/utils.test.ts +1 -1
  228. package/src/core/config/config-schema.ts +1 -0
  229. package/src/core/hotkeys/hotkeys.ts +5 -0
  230. package/src/core/network/__tests__/requests-toasting.test.tsx +14 -0
  231. package/src/core/network/requests-toasting.tsx +1 -1
  232. package/src/css/globals.css +28 -0
  233. package/src/hooks/useEventListener.ts +1 -1
  234. package/src/plugins/core/RenderHTML.tsx +6 -4
  235. package/src/plugins/impl/MatrixPlugin.tsx +1 -1
  236. package/src/plugins/impl/code/any-language-editor.tsx +7 -4
  237. package/src/plugins/impl/data-frames/__tests__/schema.test.ts +34 -1
  238. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +25 -25
  239. package/src/plugins/impl/data-frames/schema.ts +5 -11
  240. package/src/plugins/impl/panel/__tests__/utils.test.ts +4 -4
  241. package/src/plugins/impl/vega/__tests__/vega.test.ts +1 -1
  242. package/src/stories/cell.stories.tsx +15 -11
  243. package/src/utils/__tests__/events.test.ts +1 -1
  244. package/dist/any-language-editor-D751ztAP.js +0 -76
  245. package/dist/assets/__vite-browser-external-Cf4O9gnt.js +0 -1
@@ -18,10 +18,12 @@ import {
18
18
  ChevronsDownUpIcon,
19
19
  ChevronsUpDownIcon,
20
20
  ExpandIcon,
21
+ ShrinkIcon,
21
22
  } from "lucide-react";
22
23
  import { tooltipHandler } from "@/components/charts/tooltip";
23
24
  import { useExpandedOutput } from "@/core/cells/outputs";
24
25
  import { viewStateAtom } from "@/core/mode";
26
+ import { useEventListener } from "@/hooks/useEventListener";
25
27
  import { useIframeCapabilities } from "@/hooks/useIframeCapabilities";
26
28
  import { useOverflowDetection } from "@/hooks/useOverflowDetection";
27
29
  import { renderHTML } from "@/plugins/core/RenderHTML";
@@ -31,11 +33,13 @@ import { getContainerWidth } from "@/plugins/impl/vega/utils";
31
33
  import { useTheme } from "@/theme/useTheme";
32
34
  import { Events } from "@/utils/events";
33
35
  import { invariant } from "@/utils/invariant";
36
+ import { Logger } from "@/utils/Logger";
34
37
  import { processMimeBundle } from "@/utils/mime-types";
35
38
  import { Objects } from "@/utils/objects";
36
39
  import { LazyVegaEmbed } from "../charts/lazy";
37
40
  import { ChartLoadingState } from "../data-table/charts/components/chart-states";
38
41
  import { Button } from "../ui/button";
42
+ import { useIsFullScreen } from "../ui/fullscreen";
39
43
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
40
44
  import { Tooltip } from "../ui/tooltip";
41
45
  import { CsvViewer } from "./file-tree/renderers";
@@ -408,6 +412,12 @@ const Div = React.forwardRef<
408
412
  >((props, ref) => <div ref={ref} {...props} />);
409
413
  Div.displayName = "Div";
410
414
 
415
+ function exitFullscreen() {
416
+ document.exitFullscreen().catch((error) => {
417
+ Logger.warn("Failed to exit fullscreen", error);
418
+ });
419
+ }
420
+
411
421
  /**
412
422
  * Detects if there is overflow in the output area and adds a button to optionally expand
413
423
  */
@@ -425,6 +435,16 @@ const ExpandableOutput = React.memo(
425
435
  const [isExpanded, setIsExpanded] = useExpandedOutput(cellId);
426
436
  const isOverflowing = useOverflowDetection(containerRef);
427
437
  const { hasFullscreen } = useIframeCapabilities();
438
+ const isFullscreen = useIsFullScreen(containerRef);
439
+
440
+ // Not every host exits fullscreen on Escape by itself. A null target keeps
441
+ // the listener off every output that is not fullscreen.
442
+ useEventListener(isFullscreen ? document : null, "keydown", (event) => {
443
+ if (event.key !== "Escape" || !document.fullscreenElement) {
444
+ return;
445
+ }
446
+ exitFullscreen();
447
+ });
428
448
 
429
449
  return (
430
450
  <>
@@ -488,6 +508,26 @@ const ExpandableOutput = React.memo(
488
508
  isExpanded || forceExpand ? { maxHeight: "none" } : undefined
489
509
  }
490
510
  >
511
+ {/* Fullscreen paints this element only, and the action buttons sit
512
+ outside it. A host does not always draw an exit overlay, so the
513
+ output carries its own exit control. */}
514
+ {isFullscreen && (
515
+ <Tooltip content="Exit fullscreen" side="left">
516
+ <Button
517
+ data-testid="exit-fullscreen-output-button"
518
+ aria-label="Exit fullscreen"
519
+ className="absolute right-2 top-2 z-2 p-1 bg-background/90 border border-border hover:bg-muted print:hidden"
520
+ onClick={exitFullscreen}
521
+ size="xs"
522
+ variant="text"
523
+ >
524
+ <ShrinkIcon
525
+ className="size-4 opacity-60 hover:opacity-80"
526
+ strokeWidth={1.25}
527
+ />
528
+ </Button>
529
+ </Tooltip>
530
+ )}
491
531
  {children}
492
532
  </div>
493
533
  </div>
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
- import { render, screen } from "@testing-library/react";
3
- import { describe, expect, it } from "vitest";
2
+ import { act, fireEvent, render, screen } from "@testing-library/react";
3
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
4
  import { cellId } from "@/__tests__/branded";
5
5
  import { TooltipProvider } from "@/components/ui/tooltip";
6
6
  import { OutputArea, OutputRenderer } from "../Output";
@@ -158,3 +158,86 @@ describe("OutputRenderer image and SVG rendering", () => {
158
158
  expect(imgElement).toHaveAttribute("src", base64PngDataUrl);
159
159
  });
160
160
  });
161
+
162
+ describe("OutputArea fullscreen exit control", () => {
163
+ let fullscreenElement: Element | null = null;
164
+ const exitFullscreen = vi.fn(() => Promise.resolve());
165
+
166
+ beforeEach(() => {
167
+ fullscreenElement = null;
168
+ exitFullscreen.mockClear();
169
+ Object.defineProperty(document, "fullscreenElement", {
170
+ configurable: true,
171
+ get: () => fullscreenElement,
172
+ });
173
+ Object.defineProperty(document, "exitFullscreen", {
174
+ configurable: true,
175
+ value: exitFullscreen,
176
+ });
177
+ });
178
+
179
+ // Drop the stubs so that the real document properties come back.
180
+ afterEach(() => {
181
+ Reflect.deleteProperty(document, "fullscreenElement");
182
+ Reflect.deleteProperty(document, "exitFullscreen");
183
+ });
184
+
185
+ const renderOutput = () =>
186
+ render(
187
+ <TooltipProvider>
188
+ <OutputArea
189
+ output={{
190
+ channel: "output",
191
+ data: "Hello World",
192
+ mimetype: "text/plain",
193
+ }}
194
+ cellId={cellId("test")}
195
+ stale={false}
196
+ loading={false}
197
+ allowExpand={true}
198
+ />
199
+ </TooltipProvider>,
200
+ );
201
+
202
+ const enterFullscreen = (container: HTMLElement) => {
203
+ fullscreenElement = container.querySelector('[data-cell-role="output"]');
204
+ act(() => {
205
+ document.dispatchEvent(new Event("fullscreenchange"));
206
+ });
207
+ };
208
+
209
+ it("hides the exit button outside fullscreen", () => {
210
+ renderOutput();
211
+ expect(
212
+ screen.queryByTestId("exit-fullscreen-output-button"),
213
+ ).not.toBeInTheDocument();
214
+ });
215
+
216
+ it("shows the exit button when the output is the fullscreen element", () => {
217
+ const { container } = renderOutput();
218
+ enterFullscreen(container);
219
+ expect(
220
+ screen.getByTestId("exit-fullscreen-output-button"),
221
+ ).toBeInTheDocument();
222
+ });
223
+
224
+ it("exits fullscreen on click", () => {
225
+ const { container } = renderOutput();
226
+ enterFullscreen(container);
227
+ fireEvent.click(screen.getByTestId("exit-fullscreen-output-button"));
228
+ expect(exitFullscreen).toHaveBeenCalledTimes(1);
229
+ });
230
+
231
+ it("exits fullscreen on Escape", () => {
232
+ const { container } = renderOutput();
233
+ enterFullscreen(container);
234
+ fireEvent.keyDown(document, { key: "Escape" });
235
+ expect(exitFullscreen).toHaveBeenCalledTimes(1);
236
+ });
237
+
238
+ it("ignores Escape outside fullscreen", () => {
239
+ renderOutput();
240
+ fireEvent.keyDown(document, { key: "Escape" });
241
+ expect(exitFullscreen).not.toHaveBeenCalled();
242
+ });
243
+ });
@@ -68,6 +68,8 @@ interface SecretComboboxProps {
68
68
  allowCreateSecret?: (search: string) => boolean;
69
69
  }
70
70
 
71
+ const defaultCustomValueLabel = (custom: string) => `Use "${custom}"`;
72
+
71
73
  /**
72
74
  * Searchable combobox for connection fields that may reference secrets.
73
75
  *
@@ -84,7 +86,7 @@ export const SecretCombobox: React.FC<SecretComboboxProps> = ({
84
86
  onCreateSecret,
85
87
  className,
86
88
  searchPlaceholder,
87
- formatCustomValueLabel = (custom) => `Use "${custom}"`,
89
+ formatCustomValueLabel = defaultCustomValueLabel,
88
90
  createSecretLabel = "Create a new secret",
89
91
  allowCustomValue,
90
92
  allowCreateSecret,