@marimo-team/islands 0.20.5-dev9 → 0.20.5-dev90

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 (253) hide show
  1. package/dist/{Combination-Du-o_hC9.js → Combination-Dk6JxauT.js} +1 -1
  2. package/dist/{ConnectedDataExplorerComponent-DUS-zJoR.js → ConnectedDataExplorerComponent-Bh11efrC.js} +17 -17
  3. package/dist/{_baseIsEqual-5cAxzk6f.js → _baseIsEqual-CvgsjYoW.js} +38 -38
  4. package/dist/{_basePickBy-3JVb5wYm.js → _basePickBy-pTDW2_2A.js} +6 -6
  5. package/dist/{_baseUniq-DSSiFuIJ.js → _baseUniq-BUFhl85h.js} +1 -1
  6. package/dist/{any-language-editor-BL9o7y0_.js → any-language-editor-BIj11a2e.js} +19 -19
  7. package/dist/{architecture-7HQA4BMR-BxkNpYRp.js → architecture-7HQA4BMR-BmtmhGMc.js} +2 -2
  8. package/dist/{architectureDiagram-VXUJARFQ-DrJeyFHq.js → architectureDiagram-VXUJARFQ-Df0FNeBR.js} +14 -14
  9. package/dist/assets/__vite-browser-external-Us1ds95c.js +1 -0
  10. package/dist/assets/{worker-DUYMdbtA.js → worker-D10K3OOz.js} +2 -2
  11. package/dist/{blockDiagram-VD42YOAC-BJrP6qKc.js → blockDiagram-VD42YOAC-DszWqlLz.js} +7 -7
  12. package/dist/{button-KYalaJYu.js → button-DQpBib29.js} +24 -11
  13. package/dist/{c4Diagram-YG6GDRKO-Bo4gytQ5.js → c4Diagram-YG6GDRKO-Dyj8LoUX.js} +4 -4
  14. package/dist/{channel-IWLGkaBE.js → channel-CUFaIkTh.js} +1 -1
  15. package/dist/{check-C50jsehH.js → check-DpqPQmzz.js} +1 -1
  16. package/dist/{chunk-4F5CHEZ2-CxKDFd-t.js → chunk-4F5CHEZ2-CRwwZ2ED.js} +1 -1
  17. package/dist/{chunk-ABZYJK2D-CRwanrkd.js → chunk-ABZYJK2D-7QYXAAhe.js} +1 -1
  18. package/dist/{chunk-ATLVNIR6-CMMCMvOK.js → chunk-ATLVNIR6-pmHPAPSd.js} +1 -1
  19. package/dist/{chunk-B2363JML-e_W7KW1D.js → chunk-B2363JML-BuBMltZc.js} +1 -1
  20. package/dist/{chunk-B4BG7PRW-BNsHrGHG.js → chunk-B4BG7PRW-Dbta9cTX.js} +4 -4
  21. package/dist/{chunk-DI55MBZ5-DQeYbfMV.js → chunk-DI55MBZ5-DyKB35wC.js} +4 -4
  22. package/dist/{chunk-EXTU4WIE-CV_DQeaX.js → chunk-EXTU4WIE-BRFl4iNd.js} +1 -1
  23. package/dist/{chunk-FRFDVMJY-C7q09nvl.js → chunk-FRFDVMJY-Bk2LD5Te.js} +1 -1
  24. package/dist/{chunk-JA3XYJ7Z-Cmt--e0q.js → chunk-JA3XYJ7Z-BkrY9SdL.js} +2 -2
  25. package/dist/{chunk-JZLCHNYA-CkyMJnI9.js → chunk-JZLCHNYA-Bk_Lil-q.js} +4 -4
  26. package/dist/{chunk-N4CR4FBY-BJfHtJbD.js → chunk-N4CR4FBY-f5n6meOd.js} +5 -5
  27. package/dist/{chunk-PL6DKKU2-ChKBqnoD.js → chunk-PL6DKKU2-DiFkzMfM.js} +1 -1
  28. package/dist/{chunk-QN33PNHL-WOLIPUAJ.js → chunk-QN33PNHL-CXfJywHv.js} +1 -1
  29. package/dist/{chunk-QXUST7PY-DYuD50pU.js → chunk-QXUST7PY-D7-26sj3.js} +5 -5
  30. package/dist/{chunk-S3R3BYOJ-CsnX6RKs.js → chunk-S3R3BYOJ-BRT9vd1R.js} +3 -3
  31. package/dist/{chunk-SJTYNZTY-j6_1s5om.js → chunk-SJTYNZTY-BvVkbShU.js} +1 -1
  32. package/dist/{chunk-TCCFYFTB-DdLCbCTn.js → chunk-TCCFYFTB-DqxhgXG0.js} +31 -31
  33. package/dist/{chunk-TQ3KTPDO-CGsUIC73.js → chunk-TQ3KTPDO-CPkEruAA.js} +1 -1
  34. package/dist/{chunk-TZMSLE5B-B3eYTGCw.js → chunk-TZMSLE5B-DSfBOnzx.js} +1 -1
  35. package/dist/{chunk-UMXZTB3W--LdAK3Bv.js → chunk-UMXZTB3W-C4ypIY3V.js} +1 -1
  36. package/dist/{classDiagram-v2-WZHVMYZB-UTw37Gg8.js → classDiagram-2ON5EDUG-DphiMW3Y.js} +10 -10
  37. package/dist/{classDiagram-2ON5EDUG-C7C-oefv.js → classDiagram-v2-WZHVMYZB-BH1x5h4a.js} +10 -10
  38. package/dist/{clone-BJrS4PdE.js → clone-CEQ-pda1.js} +1 -1
  39. package/dist/{constants-D1Tbg_6B.js → constants-CytQ_3LM.js} +3 -3
  40. package/dist/{copy-oc-FcZzt.js → copy-BkBF0Xgk.js} +2 -2
  41. package/dist/{dagre-6UL2VRFP-BgsUhJrV.js → dagre-6UL2VRFP-DGEbtmgU.js} +12 -12
  42. package/dist/{dagre-CyZCGfV_.js → dagre-BVnNvbvD.js} +37 -37
  43. package/dist/{diagram-PSM6KHXK-BIUUOfKo.js → diagram-PSM6KHXK-CG_usglE.js} +15 -15
  44. package/dist/{diagram-QEK2KX5R-BFjolZQv.js → diagram-QEK2KX5R-CtGFEwzJ.js} +13 -13
  45. package/dist/{diagram-S2PKOQOG-4jfkWoZw.js → diagram-S2PKOQOG-ClKAGmbv.js} +13 -13
  46. package/dist/dist-B4MxkKHf.js +8 -0
  47. package/dist/{dist-De9X_Des.js → dist-B9EjSb9T.js} +1 -1
  48. package/dist/{dist-IW_ARJ3S.js → dist-BFxYppVR.js} +4 -4
  49. package/dist/{dist-D7ZGWV_9.js → dist-BGZ7TWS9.js} +3 -3
  50. package/dist/{dist-CwtEWuFb.js → dist-BSfYc7vq.js} +2 -2
  51. package/dist/{dist-DMS81OrU.js → dist-BUrWeMEP.js} +1 -1
  52. package/dist/dist-BYghZv6b.js +5 -0
  53. package/dist/dist-Be-uQhz5.js +6 -0
  54. package/dist/{dist-Ch_JuCvc.js → dist-BpMlUdNO.js} +3 -3
  55. package/dist/{dist-C6z8U-ms.js → dist-Bq5eYK43.js} +2 -2
  56. package/dist/{dist-BFL9TlzD.js → dist-Bq9zYwJs.js} +5 -5
  57. package/dist/{dist-7ZF--V_D.js → dist-C4K7pumm.js} +2 -2
  58. package/dist/{dist-Qjf6pcqK.js → dist-CAKwXCWI.js} +2 -2
  59. package/dist/dist-CB_xf0ju.js +5 -0
  60. package/dist/{dist-BwQHkjA9.js → dist-CDHl2i1x.js} +4 -4
  61. package/dist/dist-CK0qFAbF.js +8 -0
  62. package/dist/{dist-C4XMUaob.js → dist-CPlGUbk-.js} +2 -2
  63. package/dist/{dist-BT6_J2eq.js → dist-CSEWGuDq.js} +7 -2
  64. package/dist/dist-CYEk-qrr.js +8 -0
  65. package/dist/{dist-CYo3w-nC.js → dist-Cl5iM8xL.js} +3 -3
  66. package/dist/dist-CmKoWpMk.js +5 -0
  67. package/dist/{dist-I8MQW60_.js → dist-CseYuPtL.js} +2 -2
  68. package/dist/dist-D1nf4IQl.js +5 -0
  69. package/dist/{dist-CsqiXw7J.js → dist-D4gcY469.js} +2 -2
  70. package/dist/{dist-DUxS2paD.js → dist-D5NMgbbv.js} +2 -2
  71. package/dist/{dist-UYm1IE5s.js → dist-DERtJN02.js} +2 -2
  72. package/dist/{dist-CFToYDWO.js → dist-DEj2X26M.js} +2 -2
  73. package/dist/{dist-BuapEdlD.js → dist-DOoqn-VL.js} +70 -67
  74. package/dist/{dist-BLThQiU4.js → dist-DUretbKK.js} +2 -2
  75. package/dist/{dist-DEFZ7dnD.js → dist-D_-CGmlh.js} +2 -2
  76. package/dist/dist-Df3AcKpt.js +6 -0
  77. package/dist/dist-DgaFHt_I.js +5 -0
  78. package/dist/dist-Dk10C3ui.js +5 -0
  79. package/dist/{dist-D0f6Yrrb.js → dist-DodLQWPg.js} +1 -1
  80. package/dist/dist-DtyPVMHR.js +5 -0
  81. package/dist/{dist-Cb3cLT39.js → dist-HoZO6brh.js} +2 -2
  82. package/dist/{dist-Cqpjy6bK.js → dist-RNGn_-uD.js} +1 -1
  83. package/dist/{dist-BBcqvpvP.js → dist-Ux6dL_VB.js} +1 -1
  84. package/dist/{dist-B8Y11RWn.js → dist-WIWVvdBh.js} +2 -2
  85. package/dist/{dist-CB6qhQ8K.js → dist-gc9KgJuA.js} +1 -1
  86. package/dist/{dist-ovDpXuSB.js → dist-i-ud9aCA.js} +1 -1
  87. package/dist/dist-ko7WnHAO.js +5 -0
  88. package/dist/{dist-BTQbjEKU.js → dist-lNe4i1Nm.js} +1 -1
  89. package/dist/dist-of7gLRFK.js +8 -0
  90. package/dist/{erDiagram-Q2GNP2WA-Cq5Bz5lG.js → erDiagram-Q2GNP2WA-DPMseVVp.js} +10 -10
  91. package/dist/{error-banner-D0tXnwl4.js → error-banner-BctofTCP.js} +2 -2
  92. package/dist/{esm-BxMbHo0y.js → esm-BBkPJL8N.js} +29 -27
  93. package/dist/{flowDiagram-NV44I4VS-6WPJVFl7.js → flowDiagram-NV44I4VS-BpAIFwW7.js} +10 -10
  94. package/dist/{ganttDiagram-JELNMOA3-AfDhh9CI.js → ganttDiagram-JELNMOA3-DXYghZ9C.js} +3 -3
  95. package/dist/{gitGraph-G5XIXVHT-C0o6gecv.js → gitGraph-G5XIXVHT-ChHUSAop.js} +2 -2
  96. package/dist/{gitGraphDiagram-V2S2FVAM-BRSwuj0Q.js → gitGraphDiagram-V2S2FVAM-CBL-7g3_.js} +12 -12
  97. package/dist/{glide-data-editor-ByPNTNVG.js → glide-data-editor-DqxJOnJk.js} +63 -63
  98. package/dist/{graphlib-DZnBMcsX.js → graphlib-D18eZCT4.js} +10 -10
  99. package/dist/hasIn-B9AbGLj3.js +86 -0
  100. package/dist/{info-VBDWY6EO-Bzsods6X.js → info-VBDWY6EO-CwyXEo8E.js} +2 -2
  101. package/dist/{infoDiagram-HS3SLOUP-Cmxo6jKx.js → infoDiagram-HS3SLOUP-BXGbfBss.js} +12 -12
  102. package/dist/{isArrayLikeObject-Btu-i6_P.js → isArrayLikeObject-BrYl-ETg.js} +25 -26
  103. package/dist/{isEmpty-CZvUtYFp.js → isEmpty-C-xMag79.js} +2 -2
  104. package/dist/{isString-CBr7TEb7.js → isString-D-vNYDBA.js} +1 -1
  105. package/dist/{isSymbol-BuQsMXhk.js → isSymbol-Dyt2NSnN.js} +1 -1
  106. package/dist/{journeyDiagram-XKPGCS4Q-CKYr8cSR.js → journeyDiagram-XKPGCS4Q-D5BIjS4N.js} +3 -3
  107. package/dist/{kanban-definition-3W4ZIXB7-DVvAZzQD.js → kanban-definition-3W4ZIXB7-DhDkqxFB.js} +7 -7
  108. package/dist/{label-CV0KYhtH.js → label-BLDcDYdI.js} +6 -6
  109. package/dist/{loader-eJCvvApN.js → loader-DsE3MiYo.js} +2 -2
  110. package/dist/main.js +1673 -1163
  111. package/dist/{memoize-P1T1IGb9.js → memoize-Cs8aS5RW.js} +1 -1
  112. package/dist/merge-NuyC7LN7.js +51 -0
  113. package/dist/{mermaid-COOB_abB.js → mermaid-DkdSmFY8.js} +42 -42
  114. package/dist/{mermaid-parser.core-Cd-wu4tE.js → mermaid-parser.core-OkWZ8nr-.js} +8 -8
  115. package/dist/{min-CMDDtXJP.js → min-ECVRnCdn.js} +30 -30
  116. package/dist/{mindmap-definition-VGOIOE7T-1ExmnvYy.js → mindmap-definition-VGOIOE7T-BxQi78Vl.js} +9 -9
  117. package/dist/{now-BxlRp0OQ.js → now-BC2mX0ZT.js} +1 -1
  118. package/dist/{packet-DYOGHKS2-Bf1CvFco.js → packet-DYOGHKS2-C62XQjZh.js} +2 -2
  119. package/dist/{pie-VRWISCQL-LY_wbqji.js → pie-VRWISCQL-nfAKQJw3.js} +2 -2
  120. package/dist/{pieDiagram-ADFJNKIX-CJlIsdsU.js → pieDiagram-ADFJNKIX-DfSJXUHa.js} +13 -13
  121. package/dist/{purify.es-CyOIw8ru.js → purify.es-DGenX2XH.js} +67 -67
  122. package/dist/{quadrantDiagram-AYHSOK5B-BU78RiaH.js → quadrantDiagram-AYHSOK5B-CAcVWXc-.js} +2 -2
  123. package/dist/{radar-ZZBFDIW7-Ro3iXZCk.js → radar-ZZBFDIW7-lopS8_4j.js} +2 -2
  124. package/dist/{range-Dh0_-r8P.js → range-BKaWvVUE.js} +8 -8
  125. package/dist/reduce-CqQo8ppc.js +275 -0
  126. package/dist/{requirementDiagram-UZGBJVZJ-DACHtrFr.js → requirementDiagram-UZGBJVZJ-BU7dwzFM.js} +9 -9
  127. package/dist/{sankeyDiagram-TZEHDZUN-Bzg7_UWs.js → sankeyDiagram-TZEHDZUN-BVJnR4_b.js} +2 -2
  128. package/dist/{sequenceDiagram-WL72ISMW-agybEe9J.js → sequenceDiagram-WL72ISMW-CQcFQTwX.js} +4 -4
  129. package/dist/{slides-component-B0yK5GXP.js → slides-component-DwvL_HJi.js} +2 -2
  130. package/dist/{spec-Dq_reDGM.js → spec-CbYkiXG3.js} +5 -5
  131. package/dist/{stateDiagram-FKZM4ZOC-DehQAt8g.js → stateDiagram-FKZM4ZOC-Dx9AIGDe.js} +12 -12
  132. package/dist/{stateDiagram-v2-4FDKWEC3-8VzeREl9.js → stateDiagram-v2-4FDKWEC3-BIeUs-Ed.js} +10 -10
  133. package/dist/style.css +1 -1
  134. package/dist/{timeline-definition-IT6M3QCI-CdCfdaCF.js → timeline-definition-IT6M3QCI-D8B3p7ID.js} +2 -2
  135. package/dist/{toNumber-By7s5JC_.js → toNumber-CbZ70FdN.js} +2 -2
  136. package/dist/{toString-Ckpb50uw.js → toString-DbIAWQpF.js} +2 -2
  137. package/dist/{tooltip-CL8m4f9y.js → tooltip-SPkubVH3.js} +3 -3
  138. package/dist/{treemap-GDKQZRPO-DRxfDG65.js → treemap-GDKQZRPO-CkR-5ai2.js} +2 -2
  139. package/dist/{types-BwnzGcE4.js → types-0FB-N7AA.js} +519 -408
  140. package/dist/{uniq-cCc07Q8K.js → uniq-H2E5nMLq.js} +1 -1
  141. package/dist/{useAsyncData-B4hMFGnF.js → useAsyncData-D7-oahg5.js} +1 -1
  142. package/dist/{useDeepCompareMemoize-DuPhOXzr.js → useDeepCompareMemoize-DLS-bHHT.js} +5 -5
  143. package/dist/{useIframeCapabilities-CAt6D2EI.js → useIframeCapabilities-DFGZKWkO.js} +1 -1
  144. package/dist/{useTheme-BNYQnvu-.js → useTheme-D0rdoMBF.js} +6 -5
  145. package/dist/{vega-component-DouPy8AI.js → vega-component-CnO3mkFC.js} +11 -11
  146. package/dist/{xychartDiagram-PRI3JC2R-rEm_SIsC.js → xychartDiagram-PRI3JC2R-XO8FiQjU.js} +5 -5
  147. package/package.json +9 -9
  148. package/src/__mocks__/common.ts +41 -8
  149. package/src/__mocks__/requests.ts +1 -0
  150. package/src/components/chat/__tests__/useFileState.test.tsx +2 -3
  151. package/src/components/chat/acp/__tests__/context-utils.test.ts +2 -6
  152. package/src/components/datasources/components.tsx +3 -6
  153. package/src/components/datasources/datasources.tsx +8 -21
  154. package/src/components/editor/__tests__/data-attributes.test.tsx +2 -11
  155. package/src/components/editor/actions/types.ts +6 -1
  156. package/src/components/editor/actions/useNotebookActions.tsx +50 -13
  157. package/src/components/editor/cell/cell-context-menu.tsx +2 -6
  158. package/src/components/editor/chrome/types.ts +17 -0
  159. package/src/components/editor/connections/add-connection-dialog.tsx +27 -2
  160. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +105 -6
  161. package/src/components/editor/connections/database/__tests__/as-code.test.ts +101 -8
  162. package/src/components/editor/connections/database/as-code.ts +115 -25
  163. package/src/components/editor/connections/database/schemas.ts +49 -2
  164. package/src/components/editor/connections/storage/as-code.ts +1 -1
  165. package/src/components/editor/controls/command-palette.tsx +7 -0
  166. package/src/components/editor/controls/keyboard-shortcuts.tsx +3 -1
  167. package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +2 -3
  168. package/src/components/editor/file-tree/file-explorer.tsx +48 -62
  169. package/src/components/editor/file-tree/file-icons.tsx +132 -0
  170. package/src/components/editor/file-tree/file-viewer.tsx +1 -1
  171. package/src/components/editor/file-tree/tree-actions.tsx +107 -0
  172. package/src/components/editor/file-tree/types.ts +2 -96
  173. package/src/components/editor/header/filename-input.tsx +4 -1
  174. package/src/components/editor/navigation/__tests__/clipboard.test.ts +2 -4
  175. package/src/components/editor/output/console/ConsoleOutput.tsx +51 -2
  176. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +97 -16
  177. package/src/components/editor/package-alert.tsx +4 -0
  178. package/src/components/icons/marimo-icons.tsx +2 -2
  179. package/src/components/pages/home-page.tsx +5 -5
  180. package/src/components/storage/__tests__/storage-snippets.test.ts +253 -0
  181. package/src/components/storage/components.tsx +0 -38
  182. package/src/components/storage/storage-file-viewer.tsx +1 -1
  183. package/src/components/storage/storage-inspector.tsx +66 -51
  184. package/src/components/storage/storage-snippets.ts +67 -0
  185. package/src/components/ui/command.tsx +2 -0
  186. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +206 -0
  187. package/src/core/ai/tools/run-cells-tool.ts +75 -40
  188. package/src/core/alerts/state.ts +1 -0
  189. package/src/core/cells/__tests__/cells.test.ts +62 -0
  190. package/src/core/cells/__tests__/session.test.ts +2 -7
  191. package/src/core/cells/cells.ts +25 -3
  192. package/src/core/cells/ids.ts +2 -1
  193. package/src/core/codemirror/compat/__tests__/jupyter.test.ts +2 -3
  194. package/src/core/codemirror/keymaps/vim.ts +32 -3
  195. package/src/core/codemirror/markdown/__tests__/commands.test.ts +2 -3
  196. package/src/core/config/__tests__/config-schema.test.ts +6 -2
  197. package/src/core/config/config-schema.ts +1 -0
  198. package/src/core/config/feature-flag.tsx +1 -1
  199. package/src/core/dom/ui-element-constants.ts +15 -0
  200. package/src/core/dom/ui-element.ts +3 -2
  201. package/src/core/export/__tests__/hooks.test.ts +3 -10
  202. package/src/core/hotkeys/__tests__/hotkeys.test.ts +64 -1
  203. package/src/core/hotkeys/hotkeys.ts +29 -3
  204. package/src/core/islands/bridge.ts +1 -0
  205. package/src/core/islands/components/web-components.tsx +2 -1
  206. package/src/core/network/__tests__/requests-network.test.ts +17 -0
  207. package/src/core/network/requests-lazy.ts +1 -0
  208. package/src/core/network/requests-network.ts +9 -0
  209. package/src/core/network/requests-static.ts +1 -0
  210. package/src/core/network/requests-toasting.tsx +1 -0
  211. package/src/core/network/types.ts +1 -0
  212. package/src/core/runtime/__tests__/runtime.test.ts +2 -8
  213. package/src/core/storage/__tests__/state.test.ts +1 -0
  214. package/src/core/wasm/bridge.ts +1 -0
  215. package/src/core/websocket/useMarimoKernelConnection.tsx +2 -0
  216. package/src/plugins/impl/DataTablePlugin.tsx +53 -3
  217. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -5
  218. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +2 -11
  219. package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +2 -11
  220. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +4 -1
  221. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +8 -1
  222. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +309 -0
  223. package/src/plugins/impl/mpl-interactive/__tests__/mpl-websocket-shim.test.ts +110 -0
  224. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +57 -0
  225. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +8 -2
  226. package/src/plugins/impl/vega/vega-component.tsx +7 -1
  227. package/src/plugins/impl/vega/vega.css +4 -11
  228. package/src/plugins/plugins.ts +2 -0
  229. package/src/utils/__tests__/copy.test.ts +129 -0
  230. package/src/utils/__tests__/download.test.tsx +12 -14
  231. package/src/utils/__tests__/filenames.test.ts +7 -0
  232. package/src/utils/__tests__/smartMatch.test.ts +61 -0
  233. package/src/utils/copy.ts +43 -0
  234. package/src/utils/filenames.ts +3 -0
  235. package/src/utils/smartMatch.ts +62 -0
  236. package/dist/_baseProperty-D1nWkRMz.js +0 -93
  237. package/dist/assets/__vite-browser-external-WSlCcXn_.js +0 -1
  238. package/dist/dist-BAeGo2rp.js +0 -5
  239. package/dist/dist-BqwCMSEa.js +0 -5
  240. package/dist/dist-Bum8FwTO.js +0 -6
  241. package/dist/dist-C0YiOwt_.js +0 -5
  242. package/dist/dist-C2uPv4iU.js +0 -5
  243. package/dist/dist-C5hOLsJN.js +0 -8
  244. package/dist/dist-C9NIAKMs.js +0 -8
  245. package/dist/dist-CCrzTtvk.js +0 -5
  246. package/dist/dist-CFS9i1rS.js +0 -8
  247. package/dist/dist-CyHZuhPH.js +0 -5
  248. package/dist/dist-CzcjWdIk.js +0 -6
  249. package/dist/dist-DaYyUSNC.js +0 -5
  250. package/dist/dist-DpDcJYNh.js +0 -8
  251. package/dist/dist-U_BfxcPn.js +0 -5
  252. package/dist/merge-CGQkMGzr.js +0 -51
  253. package/dist/reduce-BXFHs7IQ.js +0 -268
@@ -1,4 +1,4 @@
1
- import { t as _baseUniq_default } from "./_baseUniq-DSSiFuIJ.js";
1
+ import { t as _baseUniq_default } from "./_baseUniq-BUFhl85h.js";
2
2
  function uniq(n) {
3
3
  return n && n.length ? _baseUniq_default(n) : [];
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { C as useEvent_default } from "./useTheme-BNYQnvu-.js";
4
+ import { C as useEvent_default } from "./useTheme-D0rdoMBF.js";
5
5
  import { t as invariant } from "./invariant-D9QLJ4SZ.js";
6
6
  var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
7
7
  error(e, s) {
@@ -4,12 +4,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
5
  import { t as require_react } from "./react-Bs6Z0kvn.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
7
- import { l as createLucideIcon } from "./dist-B8Y11RWn.js";
8
- import { a as cva, g as Logger, y as cn } from "./button-KYalaJYu.js";
7
+ import { l as createLucideIcon } from "./dist-WIWVvdBh.js";
8
+ import { a as cva, g as Logger, y as cn } from "./button-DQpBib29.js";
9
9
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
10
- import { r as KnownQueryParams } from "./constants-D1Tbg_6B.js";
11
- import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-BNYQnvu-.js";
12
- import { i as tableFromIPC } from "./loader-eJCvvApN.js";
10
+ import { r as KnownQueryParams } from "./constants-CytQ_3LM.js";
11
+ import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-D0rdoMBF.js";
12
+ import { i as tableFromIPC } from "./loader-DsE3MiYo.js";
13
13
  var CircleQuestionMark = createLucideIcon("circle-question-mark", [
14
14
  ["circle", {
15
15
  cx: "12",
@@ -1,7 +1,7 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { g as Logger } from "./button-KYalaJYu.js";
4
+ import { g as Logger } from "./button-DQpBib29.js";
5
5
  import { n as once } from "./once-BqS42WgZ.js";
6
6
  function testStorage(e) {
7
7
  try {
@@ -1,10 +1,10 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-KYalaJYu.js";
5
- import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-Du-o_hC9.js";
6
- import { t as _baseIsEqual_default } from "./_baseIsEqual-5cAxzk6f.js";
7
- import { t as merge_default } from "./merge-CGQkMGzr.js";
4
+ import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-DQpBib29.js";
5
+ import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-Dk6JxauT.js";
6
+ import { t as _baseIsEqual_default } from "./_baseIsEqual-CvgsjYoW.js";
7
+ import { t as merge_default } from "./merge-NuyC7LN7.js";
8
8
  function isEqual(e, A) {
9
9
  return _baseIsEqual_default(e, A);
10
10
  }
@@ -594,7 +594,8 @@ const UserConfigSchema = looseObject({
594
594
  }).prefault({}),
595
595
  experimental: looseObject({
596
596
  markdown: boolean().optional(),
597
- rtc: boolean().optional()
597
+ rtc: boolean().optional(),
598
+ storage_inspector: boolean().prefault(true)
598
599
  }).prefault(() => ({})),
599
600
  server: looseObject({ disable_file_downloads: boolean().optional() }).prefault(() => ({})),
600
601
  diagnostics: looseObject({
@@ -1,19 +1,19 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-DuPhOXzr.js";
5
- import { d as Objects, g as Logger, h as Events } from "./button-KYalaJYu.js";
6
- import "./Combination-Du-o_hC9.js";
4
+ import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-DLS-bHHT.js";
5
+ import { d as Objects, g as Logger, h as Events, y as cn } from "./button-DQpBib29.js";
6
+ import "./Combination-Dk6JxauT.js";
7
7
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
8
8
  import "./react-dom-CqtLRVZP.js";
9
- import { t as Tooltip } from "./tooltip-CL8m4f9y.js";
10
- import { i as debounce_default } from "./constants-D1Tbg_6B.js";
11
- import { C as useEvent_default, n as useTheme } from "./useTheme-BNYQnvu-.js";
12
- import { a as tooltipHandler, n as vegaLoadData } from "./loader-eJCvvApN.js";
13
- import { t as uniq_default } from "./uniq-cCc07Q8K.js";
14
- import { n as ErrorBanner } from "./error-banner-D0tXnwl4.js";
9
+ import { t as Tooltip } from "./tooltip-SPkubVH3.js";
10
+ import { i as debounce_default } from "./constants-CytQ_3LM.js";
11
+ import { C as useEvent_default, n as useTheme } from "./useTheme-D0rdoMBF.js";
12
+ import { a as tooltipHandler, n as vegaLoadData } from "./loader-DsE3MiYo.js";
13
+ import { t as uniq_default } from "./uniq-H2E5nMLq.js";
14
+ import { n as ErrorBanner } from "./error-banner-BctofTCP.js";
15
15
  import { n as formats } from "./vega-loader.browser-CQ-lnUkI.js";
16
- import { t as useAsyncData } from "./useAsyncData-B4hMFGnF.js";
16
+ import { t as useAsyncData } from "./useAsyncData-D7-oahg5.js";
17
17
  import { t as j } from "./react-vega-C6kwcd86.js";
18
18
  import "./defaultLocale-Bklbu-Tp.js";
19
19
  import "./defaultLocale-CfQ4kBaV.js";
@@ -598,7 +598,7 @@ var VegaComponent = (e) => {
598
598
  children: B.stack
599
599
  })]
600
600
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
601
- className: "relative",
601
+ className: cn("relative", "width" in W && W.width === "container" && "vega-container-width"),
602
602
  onPointerDown: Events.stopPropagation(),
603
603
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: R }), Q()]
604
604
  })] });
@@ -1,17 +1,17 @@
1
1
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2
- import "./purify.es-CyOIw8ru.js";
2
+ import "./purify.es-DGenX2XH.js";
3
3
  import { t as linear } from "./linear-DIp6l9sg.js";
4
4
  import { n as ordinal } from "./ordinal-Dcvf4J1m.js";
5
5
  import { t as range } from "./range-BToS7LsA.js";
6
6
  import "./defaultLocale-Bklbu-Tp.js";
7
7
  import { t as line_default } from "./line-C1k1rG3Z.js";
8
- import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-CsnX6RKs.js";
8
+ import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-BRT9vd1R.js";
9
9
  import { n as initRange } from "./init-Ci8VD8ZH.js";
10
10
  import { i as log, r as __name } from "./src-CHUphWwL.js";
11
- import { B as setAccTitle, C as getDiagramTitle, I as sanitizeText, T as getThemeVariables3, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-CRwanrkd.js";
12
- import { t as selectSvgElement } from "./chunk-EXTU4WIE-CV_DQeaX.js";
11
+ import { B as setAccTitle, C as getDiagramTitle, I as sanitizeText, T as getThemeVariables3, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-7QYXAAhe.js";
12
+ import { t as selectSvgElement } from "./chunk-EXTU4WIE-BRFl4iNd.js";
13
13
  import "./dist-Bymy0kEH.js";
14
- import { t as computeDimensionOfText } from "./chunk-JA3XYJ7Z-Cmt--e0q.js";
14
+ import { t as computeDimensionOfText } from "./chunk-JA3XYJ7Z-BkrY9SdL.js";
15
15
  function band() {
16
16
  var e = ordinal().unknown(void 0), w = e.domain, T = e.range, D = 0, O = 1, k, A, j = false, M = 0, N = 0, P = 0.5;
17
17
  delete e.unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.20.5-dev9",
3
+ "version": "0.20.5-dev90",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -23,20 +23,20 @@
23
23
  "dependencies": {
24
24
  "@ai-sdk/react": "^2.0.125",
25
25
  "@anywidget/types": "^0.2.0",
26
- "@codemirror/autocomplete": "^6.20.0",
26
+ "@codemirror/autocomplete": "^6.20.1",
27
27
  "@codemirror/commands": "^6.10.2",
28
28
  "@codemirror/lang-markdown": "^6.5.0",
29
29
  "@codemirror/lang-python": "^6.2.1",
30
30
  "@codemirror/lang-sql": "^6.10.0",
31
- "@codemirror/language": "^6.12.1",
31
+ "@codemirror/language": "^6.12.2",
32
32
  "@codemirror/language-data": "^6.5.2",
33
33
  "@codemirror/legacy-modes": "^6.5.2",
34
- "@codemirror/lint": "^6.9.3",
35
- "@codemirror/merge": "^6.11.2",
34
+ "@codemirror/lint": "^6.9.5",
35
+ "@codemirror/merge": "^6.12.0",
36
36
  "@codemirror/search": "^6.6.0",
37
37
  "@codemirror/state": "^6.5.4",
38
38
  "@codemirror/theme-one-dark": "^6.1.3",
39
- "@codemirror/view": "^6.39.12",
39
+ "@codemirror/view": "^6.39.16",
40
40
  "@dagrejs/dagre": "^1.1.8",
41
41
  "@date-fns/tz": "^1.4.1",
42
42
  "@dnd-kit/core": "^6.3.1",
@@ -102,7 +102,7 @@
102
102
  "@types/jsdom": "^21.1.7",
103
103
  "@types/react-grid-layout": "^1.3.6",
104
104
  "@uidotdev/usehooks": "^2.4.1",
105
- "@uiw/codemirror-extensions-langs": "^4.25.4",
105
+ "@uiw/codemirror-extensions-langs": "^4.25.7",
106
106
  "@uiw/react-codemirror": "4.25.4",
107
107
  "@uwdata/flechette": "^1.1.2",
108
108
  "@valtown/codemirror-codeium": "^1.1.1",
@@ -147,8 +147,8 @@
147
147
  "plotly.js": "^3.3.1",
148
148
  "pyodide": "0.27.7",
149
149
  "react-arborist": "^3.4.3",
150
- "react-aria": "3.44.0",
151
- "react-aria-components": "1.13.0",
150
+ "react-aria": "3.47.0",
151
+ "react-aria-components": "1.16.0",
152
152
  "react-codemirror-merge": "4.25.4",
153
153
  "react-dnd": "^16.0.1",
154
154
  "react-dnd-html5-backend": "^16.0.1",
@@ -3,9 +3,19 @@
3
3
  import { type Mock, vi } from "vitest";
4
4
  import { invariant } from "@/utils/invariant";
5
5
 
6
+ interface MockLogger {
7
+ debug: Mock;
8
+ log: Mock;
9
+ warn: Mock;
10
+ error: Mock;
11
+ trace: Mock;
12
+ get: Mock;
13
+ disabled: Mock;
14
+ }
15
+
6
16
  // Common mock factories
7
17
  export const Mocks = {
8
- quietLogger: () => ({
18
+ quietLogger: (): MockLogger => ({
9
19
  debug: vi.fn(),
10
20
  log: vi.fn(),
11
21
  warn: vi.fn(),
@@ -15,7 +25,7 @@ export const Mocks = {
15
25
  disabled: vi.fn(),
16
26
  }),
17
27
 
18
- logger: () => ({
28
+ logger: (): MockLogger => ({
19
29
  debug: vi.fn().mockImplementation(console.debug),
20
30
  log: vi.fn().mockImplementation(console.log),
21
31
  warn: vi.fn().mockImplementation(console.warn),
@@ -70,8 +80,33 @@ export const Mocks = {
70
80
  },
71
81
  };
72
82
 
83
+ // Common mock modules for vi.mock() calls
84
+ export const MockModules = {
85
+ toast: () => ({ toast: vi.fn() }),
86
+ toastWithControls: () => {
87
+ const dismiss = vi.fn();
88
+ const update = vi.fn();
89
+ return {
90
+ mock: { toast: vi.fn(() => ({ dismiss, update })) },
91
+ dismiss,
92
+ update,
93
+ };
94
+ },
95
+ };
96
+
73
97
  // Global mock setup functions
74
98
  export const SetupMocks = {
99
+ resizeObserver: () => {
100
+ const observe = vi.fn();
101
+ const unobserve = vi.fn();
102
+ const disconnect = vi.fn();
103
+ global.ResizeObserver = class MockResizeObserver {
104
+ observe = observe;
105
+ unobserve = unobserve;
106
+ disconnect = disconnect;
107
+ } as unknown as typeof ResizeObserver;
108
+ return { observe, unobserve, disconnect };
109
+ },
75
110
  clipboard: (mockClipboard = Mocks.clipboard()) => {
76
111
  Object.defineProperty(navigator, "clipboard", {
77
112
  value: mockClipboard,
@@ -79,12 +114,10 @@ export const SetupMocks = {
79
114
  });
80
115
 
81
116
  // Mock ClipboardItem
82
- // @ts-expect-error - ClipboardItem types not exact
83
- global.ClipboardItem = vi
84
- .fn()
85
- .mockImplementation((data) => Mocks.clipboardItem(data));
86
-
87
- global.ClipboardItem.supports = vi.fn().mockReturnValue(true);
117
+ global.ClipboardItem = Object.assign(
118
+ vi.fn().mockImplementation((data) => Mocks.clipboardItem(data)),
119
+ { supports: vi.fn().mockReturnValue(true) },
120
+ ) as unknown as typeof ClipboardItem;
88
121
 
89
122
  // Mock Blob
90
123
  global.Blob = vi
@@ -59,6 +59,7 @@ export const MockRequestClient = {
59
59
  getRunningNotebooks: vi.fn().mockResolvedValue({ files: [] }),
60
60
  shutdownSession: vi.fn().mockResolvedValue({}),
61
61
  exportAsHTML: vi.fn().mockResolvedValue({ html: "" }),
62
+ exportAsIPYNB: vi.fn().mockResolvedValue(""),
62
63
  exportAsMarkdown: vi.fn().mockResolvedValue({ markdown: "" }),
63
64
  exportAsPDF: vi.fn().mockResolvedValue(new Blob()),
64
65
  autoExportAsHTML: vi.fn().mockResolvedValue({}),
@@ -2,12 +2,11 @@
2
2
 
3
3
  import { act, renderHook } from "@testing-library/react";
4
4
  import { beforeEach, describe, expect, it, vi } from "vitest";
5
+ import { MockModules } from "@/__mocks__/common";
5
6
  import { toast } from "@/components/ui/use-toast";
6
7
  import { useFileState } from "../chat-utils";
7
8
 
8
- vi.mock("@/components/ui/use-toast", () => ({
9
- toast: vi.fn(),
10
- }));
9
+ vi.mock("@/components/ui/use-toast", () => MockModules.toast());
11
10
 
12
11
  describe("useFileState", () => {
13
12
  beforeEach(() => {
@@ -1,6 +1,7 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
3
  import { beforeEach, describe, expect, it, type Mocked, vi } from "vitest";
4
+ import { Mocks } from "@/__mocks__/common";
4
5
  import {
5
6
  convertFilesToResourceLinks,
6
7
  parseContextFromPrompt,
@@ -19,12 +20,7 @@ vi.mock("@/core/state/jotai", () => ({
19
20
  store: {},
20
21
  }));
21
22
 
22
- vi.mock("@/utils/Logger", () => ({
23
- Logger: {
24
- error: vi.fn(),
25
- debug: vi.fn(),
26
- },
27
- }));
23
+ vi.mock("@/utils/Logger", () => ({ Logger: Mocks.quietLogger() }));
28
24
 
29
25
  import { getAIContextRegistry } from "@/core/ai/context/context";
30
26
  import type {
@@ -1,18 +1,15 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
- import { ChevronRightIcon, LoaderCircle, XIcon } from "lucide-react";
3
+ import { LoaderCircle, XIcon } from "lucide-react";
4
4
  import type { CSSProperties } from "react";
5
+ import { TreeChevron } from "@/components/editor/file-tree/tree-actions";
5
6
  import type { DataType } from "@/core/kernel/messages";
6
7
  import { cn } from "@/utils/cn";
7
8
  import { DATA_TYPE_ICON, getDataTypeColor } from "../datasets/icons";
8
9
 
9
10
  export const RotatingChevron: React.FC<{ isExpanded: boolean }> = ({
10
11
  isExpanded,
11
- }) => (
12
- <ChevronRightIcon
13
- className={cn("h-3 w-3 transition-transform", isExpanded && "rotate-90")}
14
- />
15
- );
12
+ }) => <TreeChevron isExpanded={isExpanded} className="h-3 w-3" />;
16
13
 
17
14
  export const DatasourceLabel: React.FC<{
18
15
  children: React.ReactNode;
@@ -3,11 +3,12 @@
3
3
  import { CommandList } from "cmdk";
4
4
  import { atom, useAtomValue, useSetAtom } from "jotai";
5
5
  import { sortBy } from "lodash-es";
6
- import { PlusIcon, PlusSquareIcon, RefreshCwIcon, XIcon } from "lucide-react";
6
+ import { PlusIcon, PlusSquareIcon, XIcon } from "lucide-react";
7
7
  import React from "react";
8
8
  import { dbDisplayName } from "@/components/databases/display";
9
9
  import { EngineVariable } from "@/components/databases/engine-variable";
10
10
  import { DatabaseLogo } from "@/components/databases/icon";
11
+ import { RefreshIconButton } from "@/components/editor/file-tree/tree-actions";
11
12
  import { CopyClipboardIcon } from "@/components/icons/copy-icon";
12
13
  import { Button } from "@/components/ui/button";
13
14
  import { Command, CommandInput, CommandItem } from "@/components/ui/command";
@@ -265,15 +266,10 @@ const Engine: React.FC<{
265
266
  const engineName = internalEngine ? "In-Memory" : connection.name;
266
267
  const { previewDataSourceConnection } = useRequestClient();
267
268
 
268
- const [isSpinning, setIsSpinning] = React.useState(false);
269
-
270
269
  const handleRefreshConnection = async () => {
271
- setIsSpinning(true);
272
270
  await previewDataSourceConnection({
273
271
  engine: connection.name,
274
272
  });
275
- // Artificially spin the icon if the request is really fast
276
- setTimeout(() => setIsSpinning(false), 500);
277
273
  };
278
274
 
279
275
  return (
@@ -288,21 +284,12 @@ const Engine: React.FC<{
288
284
  (<EngineVariable variableName={engineName as VariableName} />)
289
285
  </span>
290
286
  {!internalEngine && (
291
- <Tooltip content="Refresh connection">
292
- <Button
293
- variant="ghost"
294
- size="icon"
295
- className="ml-auto hover:bg-transparent hover:shadow-none"
296
- onClick={handleRefreshConnection}
297
- >
298
- <RefreshCwIcon
299
- className={cn(
300
- "h-4 w-4 text-muted-foreground hover:text-foreground",
301
- isSpinning && "animate-[spin_0.5s]",
302
- )}
303
- />
304
- </Button>
305
- </Tooltip>
287
+ <RefreshIconButton
288
+ onClick={handleRefreshConnection}
289
+ tooltip="Refresh connection"
290
+ className="ml-auto h-4 p-0"
291
+ iconClassName="h-3.5 w-3.5"
292
+ />
306
293
  )}
307
294
  </DatasourceLabel>
308
295
  {hasChildren ? (
@@ -2,6 +2,7 @@
2
2
  import { render } from "@testing-library/react";
3
3
  import { createStore, Provider } from "jotai";
4
4
  import { beforeAll, describe, expect, it } from "vitest";
5
+ import { SetupMocks } from "@/__mocks__/common";
5
6
  import { MockNotebook } from "@/__mocks__/notebook";
6
7
  import { MockRequestClient } from "@/__mocks__/requests";
7
8
  import { TooltipProvider } from "@/components/ui/tooltip";
@@ -25,17 +26,7 @@ function createTestWrapper() {
25
26
  }
26
27
 
27
28
  beforeAll(() => {
28
- global.ResizeObserver = class ResizeObserver {
29
- observe() {
30
- // do nothing
31
- }
32
- unobserve() {
33
- // do nothing
34
- }
35
- disconnect() {
36
- // do nothing
37
- }
38
- };
29
+ SetupMocks.resizeObserver();
39
30
  global.HTMLDivElement.prototype.scrollIntoView = () => {
40
31
  // do nothing
41
32
  };
@@ -27,6 +27,7 @@ export interface ActionButton {
27
27
  handleHeadless?: (event?: Event) => void;
28
28
  divider?: boolean;
29
29
  dropdown?: ActionButton[];
30
+ additionalKeywords?: string[];
30
31
  }
31
32
 
32
33
  export function isParentAction(
@@ -51,6 +52,10 @@ export function flattenActions(
51
52
  if (isParentAction(action)) {
52
53
  return flattenActions(action.dropdown, `${prevLabel + action.label} > `);
53
54
  }
54
- return { ...action, label: prevLabel + action.label };
55
+ return {
56
+ ...action,
57
+ label: prevLabel + action.label,
58
+ additionalKeywords: action.additionalKeywords,
59
+ };
55
60
  });
56
61
  }
@@ -31,6 +31,7 @@ import {
31
31
  LayoutTemplateIcon,
32
32
  LinkIcon,
33
33
  MessagesSquareIcon,
34
+ NotebookIcon,
34
35
  PanelLeftIcon,
35
36
  PowerSquareIcon,
36
37
  PresentationIcon,
@@ -123,8 +124,13 @@ export function useNotebookActions() {
123
124
  const setCommandPaletteOpen = useSetAtom(commandPaletteAtom);
124
125
  const setSettingsDialogOpen = useSetAtom(settingDialogAtom);
125
126
  const setKeyboardShortcutsOpen = useSetAtom(keyboardShortcutsAtom);
126
- const { exportAsMarkdown, readCode, saveCellConfig, updateCellOutputs } =
127
- useRequestClient();
127
+ const {
128
+ exportAsIPYNB,
129
+ exportAsMarkdown,
130
+ readCode,
131
+ saveCellConfig,
132
+ updateCellOutputs,
133
+ } = useRequestClient();
128
134
  const takeScreenshots = useEnrichCellOutputs();
129
135
 
130
136
  const hasDisabledCells = useAtomValue(hasDisabledCellsAtom);
@@ -199,6 +205,27 @@ export function useNotebookActions() {
199
205
  setTimeout(() => window.dispatchEvent(afterprint), 0);
200
206
  };
201
207
 
208
+ const handleDownloadAsIPYNB = async () => {
209
+ if (!filename) {
210
+ toastNotebookMustBeNamed();
211
+ return;
212
+ }
213
+
214
+ const runDownload = async (progress: ProgressState) => {
215
+ await updateCellOutputsWithScreenshots({
216
+ takeScreenshots: () => takeScreenshots({ progress }),
217
+ updateCellOutputs,
218
+ });
219
+ const ipynb = await exportAsIPYNB({ download: false });
220
+ downloadBlob(
221
+ new Blob([ipynb], { type: "application/x-ipynb+json" }),
222
+ Filenames.toIPYNB(document.title),
223
+ );
224
+ };
225
+
226
+ await withLoadingToast("Downloading IPYNB...", runDownload);
227
+ };
228
+
202
229
  const actions: ActionButton[] = [
203
230
  {
204
231
  icon: <DownloadIcon size={14} strokeWidth={1.5} />,
@@ -240,6 +267,11 @@ export function useNotebookActions() {
240
267
  );
241
268
  },
242
269
  },
270
+ {
271
+ icon: <NotebookIcon size={14} strokeWidth={1.5} />,
272
+ label: "Download as ipynb",
273
+ handle: handleDownloadAsIPYNB,
274
+ },
243
275
  {
244
276
  icon: <CodeIcon size={14} strokeWidth={1.5} />,
245
277
  label: "Download Python code",
@@ -347,17 +379,20 @@ export function useNotebookActions() {
347
379
  label: "Helper panel",
348
380
  redundant: true,
349
381
  handle: NOOP_HANDLER,
350
- dropdown: PANELS.flatMap(({ type: id, Icon, hidden }) => {
351
- if (hidden) {
352
- return [];
353
- }
354
- return {
355
- label: startCase(id),
356
- rightElement: renderCheckboxElement(selectedPanel === id),
357
- icon: <Icon size={14} strokeWidth={1.5} />,
358
- handle: () => toggleApplication(id),
359
- };
360
- }),
382
+ dropdown: PANELS.flatMap(
383
+ ({ type: id, Icon, hidden, additionalKeywords }) => {
384
+ if (hidden) {
385
+ return [];
386
+ }
387
+ return {
388
+ label: startCase(id),
389
+ rightElement: renderCheckboxElement(selectedPanel === id),
390
+ icon: <Icon size={14} strokeWidth={1.5} />,
391
+ handle: () => toggleApplication(id),
392
+ additionalKeywords,
393
+ };
394
+ },
395
+ ),
361
396
  },
362
397
 
363
398
  {
@@ -478,6 +513,7 @@ export function useNotebookActions() {
478
513
  label: "Restart kernel",
479
514
  variant: "danger",
480
515
  handle: restartKernel,
516
+ additionalKeywords: ["reset", "reload", "restart"],
481
517
  },
482
518
  {
483
519
  icon: <FastForwardIcon size={14} strokeWidth={1.5} />,
@@ -535,6 +571,7 @@ export function useNotebookActions() {
535
571
  label: "User settings",
536
572
  handle: () => setSettingsDialogOpen((open) => !open),
537
573
  redundant: true,
574
+ additionalKeywords: ["preferences", "options", "configuration"],
538
575
  },
539
576
  {
540
577
  icon: <ExternalLinkIcon size={14} strokeWidth={1.5} />,
@@ -25,7 +25,7 @@ import { CellOutputId } from "@/core/cells/ids";
25
25
  import { isOutputEmpty } from "@/core/cells/outputs";
26
26
  import { goToDefinitionAtCursorPosition } from "@/core/codemirror/go-to-definition/utils";
27
27
  import { sendToPanelManager } from "@/core/vscode/vscode-bindings";
28
- import { copyToClipboard } from "@/utils/copy";
28
+ import { copyImageToClipboard, copyToClipboard } from "@/utils/copy";
29
29
  import { getImageExtension } from "@/utils/filenames";
30
30
  import { Logger } from "@/utils/Logger";
31
31
  import type { ActionButton } from "../actions/types";
@@ -127,11 +127,7 @@ export const CellActionsContextMenu = ({
127
127
  icon: <ClipboardCopyIcon size={13} strokeWidth={1.5} />,
128
128
  handle: async () => {
129
129
  if (imageRightClicked) {
130
- const response = await fetch(imageRightClicked.src);
131
- const blob = await response.blob();
132
- const item = new ClipboardItem({ [blob.type]: blob });
133
- await navigator.clipboard
134
- .write([item])
130
+ await copyImageToClipboard(imageRightClicked.src)
135
131
  .then(() => {
136
132
  toast({
137
133
  title: "Copied image to clipboard",