@marimo-team/islands 0.25.1-dev4 → 0.25.1-dev40

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 (274) hide show
  1. package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
  2. package/dist/{ErrorBoundary-pV36lYEK.js → ErrorBoundary-CAJO-M56.js} +1 -1
  3. package/dist/{ImageComparisonComponent-Dlm5aWnH.js → ImageComparisonComponent-Cpfz30OZ.js} +51 -52
  4. package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
  5. package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
  6. package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
  7. package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
  8. package/dist/{cells-B5-y5EY3.js → cells-Cv93oav_.js} +3 -3
  9. package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
  10. package/dist/{chat-ui-HJZsTl7o.js → chat-ui-DLSF8a04.js} +4 -4
  11. package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
  12. package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
  13. package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
  14. package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
  15. package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
  16. package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
  17. package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
  18. package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
  19. package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
  20. package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
  21. package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
  22. package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
  23. package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
  24. package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
  25. package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
  26. package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
  27. package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
  28. package/dist/{code-visibility-CgZS2a3W.js → code-visibility-XU9RAJNV.js} +2 -2
  29. package/dist/{common-DnMDPPaW.js → common-C0fbrgB8.js} +13 -13
  30. package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
  31. package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
  32. package/dist/{data-grid-overlay-editor-hHYgD_Sm.js → data-grid-overlay-editor-BnhbJgoq.js} +1 -1
  33. package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
  34. package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
  35. package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
  36. package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
  37. package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
  38. package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
  39. package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
  40. package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
  41. package/dist/{error-entries-Bkbpx0T0.js → error-entries-DLl0XqoW.js} +1 -1
  42. package/dist/{feedback-button-CvKssdG_.js → feedback-button-B0QSkbSp.js} +4 -4
  43. package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
  44. package/dist/{formats-C8rLgZT9.js → formats-Cl_67ghI.js} +1 -1
  45. package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
  46. package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
  47. package/dist/{glide-data-editor-Ohetlgag.js → glide-data-editor-ymIQdwrb.js} +3 -3
  48. package/dist/{globals-CPNNcOJI.js → globals-B0S3-e_D.js} +1 -1
  49. package/dist/{html-to-image-BAgJOlSW.js → html-to-image-CGVgroef.js} +2 -2
  50. package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
  51. package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
  52. package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
  53. package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
  54. package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
  55. package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
  56. package/dist/main.js +72 -69
  57. package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
  58. package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
  59. package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
  60. package/dist/{number-overlay-editor-CHWg5gGO.js → number-overlay-editor-DB3HJDI1.js} +1 -1
  61. package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
  62. package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
  63. package/dist/{process-output-zDX4jbhd.js → process-output-CGfg-JmZ.js} +2 -2
  64. package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
  65. package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
  66. package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
  67. package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
  68. package/dist/{reveal-component-BujcZI2B.js → reveal-component-CfTzIkA2.js} +3 -3
  69. package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
  70. package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
  71. package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
  72. package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
  73. package/dist/style.css +1 -1
  74. package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
  75. package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
  76. package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
  77. package/dist/{vega-component-CNf5gcrm.js → vega-component-tFOzgarw.js} +4 -4
  78. package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
  79. package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
  80. package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
  81. package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
  82. package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
  83. package/package.json +1 -2
  84. package/src/__mocks__/common.ts +3 -3
  85. package/src/__tests__/CellStatus.test.tsx +1 -1
  86. package/src/__tests__/setup.ts +7 -7
  87. package/src/components/app-config/ai-config.tsx +2 -0
  88. package/src/components/app-config/optional-features.tsx +1 -1
  89. package/src/components/chat/chat-panel.tsx +19 -8
  90. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
  91. package/src/components/data-table/charts/charts.tsx +26 -13
  92. package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
  93. package/src/components/dependency-graph/elements.ts +2 -2
  94. package/src/components/editor/__tests__/package-alert.test.tsx +140 -0
  95. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +107 -0
  96. package/src/components/editor/actions/pair-with-agent.tsx +119 -0
  97. package/src/components/editor/actions/useNotebookActions.tsx +2 -1
  98. package/src/components/editor/ai/add-cell-with-ai.tsx +2 -0
  99. package/src/components/editor/ai/staged-cell-submission.ts +2 -2
  100. package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
  101. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
  102. package/src/components/editor/connections/database/as-code.ts +44 -44
  103. package/src/components/editor/connections/storage/as-code.ts +3 -3
  104. package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
  105. package/src/components/editor/navigation/clipboard.ts +2 -2
  106. package/src/components/editor/notebook-cell.tsx +2 -2
  107. package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
  108. package/src/components/editor/output/VideoOutput.tsx +1 -1
  109. package/src/components/editor/output/ansi-reduce.ts +21 -17
  110. package/src/components/editor/output/console/ConsoleOutput.tsx +3 -3
  111. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +59 -0
  112. package/src/components/editor/output/console/text-rendering.tsx +3 -1
  113. package/src/components/editor/package-alert.tsx +20 -7
  114. package/src/components/home/components.tsx +1 -0
  115. package/src/components/pages/run-page.tsx +1 -0
  116. package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
  117. package/src/components/slides/__tests__/minimap.test.ts +12 -12
  118. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
  119. package/src/components/static-html/share-modal.tsx +2 -1
  120. package/src/components/static-html/static-banner.tsx +2 -2
  121. package/src/components/ui/links.tsx +6 -1
  122. package/src/components/ui/typography.tsx +16 -8
  123. package/src/core/ai/context/__tests__/registry.test.ts +31 -28
  124. package/src/core/ai/context/providers/cell-output.ts +8 -8
  125. package/src/core/ai/context/providers/datasource.ts +10 -7
  126. package/src/core/ai/context/providers/error.ts +7 -7
  127. package/src/core/ai/context/providers/file.ts +8 -8
  128. package/src/core/ai/context/providers/tables.ts +7 -7
  129. package/src/core/ai/context/providers/variable.ts +7 -7
  130. package/src/core/ai/context/registry.ts +18 -18
  131. package/src/core/ai/ids/ids.ts +5 -5
  132. package/src/core/ai/model-registry.ts +12 -9
  133. package/src/core/ai/staged-cells.ts +6 -6
  134. package/src/core/ai/tools/base.ts +6 -6
  135. package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
  136. package/src/core/ai/tools/registry.ts +4 -4
  137. package/src/core/ai/tools/run-cells-tool.ts +7 -7
  138. package/src/core/ai/tools/sample-tool.ts +6 -6
  139. package/src/core/cells/__tests__/cells.test.ts +27 -0
  140. package/src/core/cells/cells.ts +2 -1
  141. package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
  142. package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
  143. package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
  144. package/src/core/codemirror/code-lens/extension.ts +13 -13
  145. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
  146. package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
  147. package/src/core/codemirror/copilot/language-server.ts +13 -13
  148. package/src/core/codemirror/copilot/transport.ts +1 -1
  149. package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
  150. package/src/core/codemirror/go-to-definition/underline.ts +3 -3
  151. package/src/core/codemirror/keymaps/vim.ts +3 -3
  152. package/src/core/codemirror/language/languages/markdown.ts +8 -8
  153. package/src/core/codemirror/language/languages/python.ts +7 -7
  154. package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
  155. package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
  156. package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
  157. package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
  158. package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
  159. package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
  160. package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
  161. package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
  162. package/src/core/codemirror/reactive-references/extension.ts +3 -3
  163. package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
  164. package/src/core/codemirror/rtc/loro/sync.ts +5 -5
  165. package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
  166. package/src/core/dom/ui-element.ts +5 -5
  167. package/src/core/dom/uiregistry.ts +10 -10
  168. package/src/core/hotkeys/hotkeys.ts +9 -9
  169. package/src/core/islands/__tests__/bridge.test.ts +4 -4
  170. package/src/core/islands/__tests__/test-utils.tsx +4 -4
  171. package/src/core/islands/bridge.ts +85 -82
  172. package/src/core/islands/components/web-components.tsx +7 -7
  173. package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
  174. package/src/core/islands/worker/controller.ts +6 -3
  175. package/src/core/islands/worker-factory.ts +2 -2
  176. package/src/core/kernel/RuntimeState.ts +4 -4
  177. package/src/core/lsp/__tests__/transport.test.ts +19 -19
  178. package/src/core/lsp/transport.ts +5 -5
  179. package/src/core/network/CachingRequestRegistry.ts +2 -2
  180. package/src/core/network/DeferredRequestRegistry.ts +4 -4
  181. package/src/core/runtime/runtime.ts +25 -20
  182. package/src/core/static/virtual-file-tracker.ts +5 -5
  183. package/src/core/wasm/__tests__/bridge.test.ts +2 -2
  184. package/src/core/wasm/bridge.ts +130 -126
  185. package/src/core/wasm/router.ts +5 -5
  186. package/src/core/wasm/store.ts +4 -4
  187. package/src/core/wasm/worker/bootstrap.ts +8 -5
  188. package/src/core/wasm/worker/message-buffer.ts +3 -3
  189. package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
  190. package/src/core/websocket/transports/basic.ts +15 -8
  191. package/src/core/websocket/transports/sse.ts +7 -7
  192. package/src/core/websocket/transports/transport.ts +3 -3
  193. package/src/core/websocket/transports/ws.ts +9 -7
  194. package/src/css/globals.css +18 -21
  195. package/src/css/katex.min.css +260 -241
  196. package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
  197. package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
  198. package/src/plugins/core/registerReactComponent.tsx +5 -5
  199. package/src/plugins/core/sidebar-element.tsx +2 -2
  200. package/src/plugins/impl/ButtonPlugin.tsx +3 -3
  201. package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
  202. package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
  203. package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
  204. package/src/plugins/impl/DateRangePlugin.tsx +3 -3
  205. package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
  206. package/src/plugins/impl/DictPlugin.tsx +3 -3
  207. package/src/plugins/impl/DropdownPlugin.tsx +3 -3
  208. package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
  209. package/src/plugins/impl/MatrixPlugin.tsx +4 -4
  210. package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
  211. package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
  212. package/src/plugins/impl/NumberPlugin.tsx +3 -3
  213. package/src/plugins/impl/RadioPlugin.tsx +9 -5
  214. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
  215. package/src/plugins/impl/RefreshPlugin.tsx +3 -3
  216. package/src/plugins/impl/SliderPlugin.tsx +3 -3
  217. package/src/plugins/impl/SwitchPlugin.tsx +3 -3
  218. package/src/plugins/impl/TabsPlugin.tsx +3 -3
  219. package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
  220. package/src/plugins/impl/TextInputPlugin.tsx +3 -3
  221. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
  222. package/src/plugins/impl/anywidget/model.ts +10 -10
  223. package/src/plugins/impl/anywidget/registry.ts +12 -9
  224. package/src/plugins/impl/anywidget/runtime.ts +11 -9
  225. package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
  226. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
  227. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
  228. package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
  229. package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
  230. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
  231. package/src/plugins/impl/panel/utils.ts +5 -5
  232. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  233. package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
  234. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
  235. package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
  236. package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
  237. package/src/plugins/impl/vega/loader.ts +23 -1
  238. package/src/plugins/impl/vega/utils.ts +5 -4
  239. package/src/plugins/layout/AccordionPlugin.tsx +3 -3
  240. package/src/plugins/layout/CalloutPlugin.tsx +3 -3
  241. package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
  242. package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
  243. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
  244. package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
  245. package/src/plugins/layout/OutlinePlugin.tsx +3 -3
  246. package/src/plugins/layout/ProgressPlugin.tsx +3 -3
  247. package/src/plugins/layout/RoutesPlugin.tsx +6 -8
  248. package/src/plugins/layout/StatPlugin.tsx +3 -3
  249. package/src/plugins/layout/TexPlugin.tsx +3 -3
  250. package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
  251. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
  252. package/src/utils/Deferred.ts +6 -6
  253. package/src/utils/async-capture-tracker.ts +10 -7
  254. package/src/utils/errors.ts +5 -5
  255. package/src/utils/id-tree.tsx +83 -80
  256. package/src/utils/lru.ts +1 -1
  257. package/src/utils/multi-map.ts +14 -12
  258. package/src/utils/paths.ts +6 -6
  259. package/src/utils/pluralize.ts +3 -3
  260. package/src/utils/progress.ts +6 -6
  261. package/src/utils/python-poet/poet.ts +14 -14
  262. package/src/utils/routes.ts +4 -2
  263. package/src/utils/semaphore.ts +6 -6
  264. package/src/utils/storage/storage.ts +6 -6
  265. package/src/utils/storage/typed.ts +16 -12
  266. package/src/utils/time.ts +9 -9
  267. package/src/utils/timed-cache.ts +4 -4
  268. package/src/utils/tracer.ts +9 -6
  269. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
  270. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
  271. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
  272. package/dist/katex-DFBiSucW.js +0 -21840
  273. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
  274. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
@@ -57,7 +57,7 @@ type SaveWorker = ReturnType<
57
57
  >["proxy"]["request"];
58
58
 
59
59
  export class PyodideBridge implements RunRequests, EditRequests {
60
- static get INSTANCE(): PyodideBridge {
60
+ public static get INSTANCE(): PyodideBridge {
61
61
  const KEY = "_marimo_private_PyodideBridge";
62
62
  if (!window[KEY]) {
63
63
  window[KEY] = new PyodideBridge();
@@ -207,12 +207,14 @@ export class PyodideBridge implements RunRequests, EditRequests {
207
207
  }
208
208
  }
209
209
 
210
- attachMessageConsumer(consumer: (message: MessageEvent<string>) => void) {
210
+ public attachMessageConsumer(
211
+ consumer: (message: MessageEvent<string>) => void,
212
+ ) {
211
213
  this.messageConsumer = consumer;
212
214
  this.rpc.proxy.send.consumerReady({});
213
215
  }
214
216
 
215
- sendRename: EditRequests["sendRename"] = async ({ filename }) => {
217
+ public sendRename: EditRequests["sendRename"] = async ({ filename }) => {
216
218
  if (filename === null) {
217
219
  return null;
218
220
  }
@@ -227,7 +229,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
227
229
  return null;
228
230
  };
229
231
 
230
- sendSave: EditRequests["sendSave"] = async (request) => {
232
+ public sendSave: EditRequests["sendSave"] = async (request) => {
231
233
  if (!this.saveRpc) {
232
234
  Logger.warn("Save RPC not initialized");
233
235
  return null;
@@ -254,11 +256,11 @@ export class PyodideBridge implements RunRequests, EditRequests {
254
256
  return null;
255
257
  };
256
258
 
257
- sendCopy: EditRequests["sendCopy"] = async () => {
259
+ public sendCopy: EditRequests["sendCopy"] = async () => {
258
260
  throwNotImplemented();
259
261
  };
260
262
 
261
- sendStdin: EditRequests["sendStdin"] = async (request) => {
263
+ public sendStdin: EditRequests["sendStdin"] = async (request) => {
262
264
  await this.rpc.proxy.request.bridge({
263
265
  functionName: "put_input",
264
266
  payload: request.text,
@@ -266,15 +268,15 @@ export class PyodideBridge implements RunRequests, EditRequests {
266
268
  return null;
267
269
  };
268
270
 
269
- sendPdb: EditRequests["sendPdb"] = async () => {
271
+ public sendPdb: EditRequests["sendPdb"] = async () => {
270
272
  throwNotImplemented();
271
273
  };
272
274
 
273
- sendSetBreakpoints: EditRequests["sendSetBreakpoints"] = async () => {
275
+ public sendSetBreakpoints: EditRequests["sendSetBreakpoints"] = async () => {
274
276
  throwNotImplemented();
275
277
  };
276
278
 
277
- sendRun: EditRequests["sendRun"] = async (request) => {
279
+ public sendRun: EditRequests["sendRun"] = async (request) => {
278
280
  await this.rpc.proxy.request.loadPackages(request.codes.join("\n"));
279
281
 
280
282
  await this.putControlRequest({
@@ -283,7 +285,9 @@ export class PyodideBridge implements RunRequests, EditRequests {
283
285
  });
284
286
  return null;
285
287
  };
286
- sendRunScratchpad: EditRequests["sendRunScratchpad"] = async (request) => {
288
+ public sendRunScratchpad: EditRequests["sendRunScratchpad"] = async (
289
+ request,
290
+ ) => {
287
291
  await this.rpc.proxy.request.loadPackages(request.code);
288
292
 
289
293
  await this.putControlRequest({
@@ -292,18 +296,18 @@ export class PyodideBridge implements RunRequests, EditRequests {
292
296
  });
293
297
  return null;
294
298
  };
295
- sendInterrupt: EditRequests["sendInterrupt"] = async () => {
299
+ public sendInterrupt: EditRequests["sendInterrupt"] = async () => {
296
300
  if (this.interruptBuffer !== undefined) {
297
301
  // 2 sends a SIGINT
298
302
  this.interruptBuffer[0] = 2;
299
303
  }
300
304
  return null;
301
305
  };
302
- sendShutdown: EditRequests["sendShutdown"] = async () => {
306
+ public sendShutdown: EditRequests["sendShutdown"] = async () => {
303
307
  window.close();
304
308
  return null;
305
309
  };
306
- sendFormat: EditRequests["sendFormat"] = async (request) => {
310
+ public sendFormat: EditRequests["sendFormat"] = async (request) => {
307
311
  const response = await this.rpc.proxy.request.bridge({
308
312
  functionName: "format",
309
313
  payload: request,
@@ -311,7 +315,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
311
315
  return response as FormatResponse;
312
316
  };
313
317
 
314
- sendDeleteCell: EditRequests["sendDeleteCell"] = async (request) => {
318
+ public sendDeleteCell: EditRequests["sendDeleteCell"] = async (request) => {
315
319
  await this.putControlRequest({
316
320
  type: "delete-cell",
317
321
  ...request,
@@ -319,7 +323,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
319
323
  return null;
320
324
  };
321
325
 
322
- sendInstallMissingPackages: EditRequests["sendInstallMissingPackages"] =
326
+ public sendInstallMissingPackages: EditRequests["sendInstallMissingPackages"] =
323
327
  async (request) => {
324
328
  this.putControlRequest({
325
329
  type: "install-packages",
@@ -327,23 +331,22 @@ export class PyodideBridge implements RunRequests, EditRequests {
327
331
  });
328
332
  return null;
329
333
  };
330
- sendCodeCompletionRequest: EditRequests["sendCodeCompletionRequest"] = async (
331
- request,
332
- ) => {
333
- // Because the Pyodide worker is single-threaded, sending
334
- // code completion requests while the kernel is running is useless
335
- // and runs the risk of choking the kernel
336
- const isRunning = store.get(notebookIsRunningAtom);
337
- if (!isRunning) {
338
- await this.rpc.proxy.request.bridge({
339
- functionName: "code_complete",
340
- payload: request,
341
- });
342
- }
343
- return null;
344
- };
334
+ public sendCodeCompletionRequest: EditRequests["sendCodeCompletionRequest"] =
335
+ async (request) => {
336
+ // Because the Pyodide worker is single-threaded, sending
337
+ // code completion requests while the kernel is running is useless
338
+ // and runs the risk of choking the kernel
339
+ const isRunning = store.get(notebookIsRunningAtom);
340
+ if (!isRunning) {
341
+ await this.rpc.proxy.request.bridge({
342
+ functionName: "code_complete",
343
+ payload: request,
344
+ });
345
+ }
346
+ return null;
347
+ };
345
348
 
346
- saveUserConfig: EditRequests["saveUserConfig"] = async (request) => {
349
+ public saveUserConfig: EditRequests["saveUserConfig"] = async (request) => {
347
350
  await this.rpc.proxy.request.bridge({
348
351
  functionName: "save_user_config",
349
352
  payload: request,
@@ -361,7 +364,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
361
364
  });
362
365
  };
363
366
 
364
- saveAppConfig: EditRequests["saveAppConfig"] = async (request) => {
367
+ public saveAppConfig: EditRequests["saveAppConfig"] = async (request) => {
365
368
  await this.rpc.proxy.request.bridge({
366
369
  functionName: "save_app_config",
367
370
  payload: request,
@@ -369,7 +372,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
369
372
  return null;
370
373
  };
371
374
 
372
- saveCellConfig: EditRequests["saveCellConfig"] = async (request) => {
375
+ public saveCellConfig: EditRequests["saveCellConfig"] = async (request) => {
373
376
  await this.putControlRequest({
374
377
  type: "update-cell-config",
375
378
  ...request,
@@ -377,7 +380,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
377
380
  return null;
378
381
  };
379
382
 
380
- sendRestart = async (): Promise<null> => {
383
+ public sendRestart = async (): Promise<null> => {
381
384
  // Save first
382
385
  const code = await this.readCode();
383
386
  if (code.contents) {
@@ -388,7 +391,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
388
391
  return null;
389
392
  };
390
393
 
391
- readCode: EditRequests["readCode"] = async () => {
394
+ public readCode: EditRequests["readCode"] = async () => {
392
395
  if (!this.saveRpc) {
393
396
  Logger.warn("Save RPC not initialized");
394
397
  return { contents: "" };
@@ -397,7 +400,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
397
400
  return { contents };
398
401
  };
399
402
 
400
- readSnippets: EditRequests["readSnippets"] = async () => {
403
+ public readSnippets: EditRequests["readSnippets"] = async () => {
401
404
  const response = await this.rpc.proxy.request.bridge({
402
405
  functionName: "read_snippets",
403
406
  payload: undefined,
@@ -405,7 +408,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
405
408
  return response as Snippets;
406
409
  };
407
410
 
408
- openFile: EditRequests["openFile"] = async ({ path }) => {
411
+ public openFile: EditRequests["openFile"] = async ({ path }) => {
409
412
  const url = createShareableLink({
410
413
  code: null,
411
414
  baseUrl: window.location.origin,
@@ -414,7 +417,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
414
417
  return null;
415
418
  };
416
419
 
417
- sendListFiles: EditRequests["sendListFiles"] = async (request) => {
420
+ public sendListFiles: EditRequests["sendListFiles"] = async (request) => {
418
421
  const response = await this.rpc.proxy.request.bridge({
419
422
  functionName: "list_files",
420
423
  payload: request,
@@ -422,7 +425,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
422
425
  return response as FileListResponse;
423
426
  };
424
427
 
425
- getFileRoots: EditRequests["getFileRoots"] = async () => {
428
+ public getFileRoots: EditRequests["getFileRoots"] = async () => {
426
429
  const response = await this.rpc.proxy.request.bridge({
427
430
  functionName: "file_roots",
428
431
  payload: undefined,
@@ -430,7 +433,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
430
433
  return response as FileRootsResponse;
431
434
  };
432
435
 
433
- sendSearchFiles: EditRequests["sendSearchFiles"] = async (request) => {
436
+ public sendSearchFiles: EditRequests["sendSearchFiles"] = async (request) => {
434
437
  const response = await this.rpc.proxy.request.bridge({
435
438
  functionName: "search_files",
436
439
  payload: request,
@@ -438,7 +441,9 @@ export class PyodideBridge implements RunRequests, EditRequests {
438
441
  return response as FileSearchResponse;
439
442
  };
440
443
 
441
- sendComponentValues: RunRequests["sendComponentValues"] = async (request) => {
444
+ public sendComponentValues: RunRequests["sendComponentValues"] = async (
445
+ request,
446
+ ) => {
442
447
  await this.putControlRequest({
443
448
  type: "update-ui-element",
444
449
  ...request,
@@ -447,11 +452,13 @@ export class PyodideBridge implements RunRequests, EditRequests {
447
452
  return null;
448
453
  };
449
454
 
450
- sendInstantiate: RunRequests["sendInstantiate"] = async (request) => {
455
+ public sendInstantiate: RunRequests["sendInstantiate"] = async (request) => {
451
456
  return null;
452
457
  };
453
458
 
454
- sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (request) => {
459
+ public sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (
460
+ request,
461
+ ) => {
455
462
  await this.putControlRequest({
456
463
  type: "invoke-function",
457
464
  ...request,
@@ -459,39 +466,37 @@ export class PyodideBridge implements RunRequests, EditRequests {
459
466
  return null;
460
467
  };
461
468
 
462
- sendCreateFileOrFolder: EditRequests["sendCreateFileOrFolder"] = async (
463
- request,
464
- ) => {
465
- // The WASM RPC boundary can only carry JSON, so we base64-encode the
466
- // file bytes here. The HTTP transport uses multipart/form-data instead.
467
- let contents: string | null = null;
468
- if (request.file) {
469
- const dataUrl = await serializeBlob(request.file);
470
- contents = dataUrl.split(",")[1] ?? "";
471
- }
472
- const response = await this.rpc.proxy.request.bridge({
473
- functionName: "create_file_or_directory",
474
- payload: {
475
- path: request.path,
476
- type: request.type,
477
- name: request.name,
478
- contents,
479
- },
480
- });
481
- return response as FileCreateResponse;
482
- };
469
+ public sendCreateFileOrFolder: EditRequests["sendCreateFileOrFolder"] =
470
+ async (request) => {
471
+ // The WASM RPC boundary can only carry JSON, so we base64-encode the
472
+ // file bytes here. The HTTP transport uses multipart/form-data instead.
473
+ let contents: string | null = null;
474
+ if (request.file) {
475
+ const dataUrl = await serializeBlob(request.file);
476
+ contents = dataUrl.split(",")[1] ?? "";
477
+ }
478
+ const response = await this.rpc.proxy.request.bridge({
479
+ functionName: "create_file_or_directory",
480
+ payload: {
481
+ path: request.path,
482
+ type: request.type,
483
+ name: request.name,
484
+ contents,
485
+ },
486
+ });
487
+ return response as FileCreateResponse;
488
+ };
483
489
 
484
- sendDeleteFileOrFolder: EditRequests["sendDeleteFileOrFolder"] = async (
485
- request,
486
- ) => {
487
- const response = await this.rpc.proxy.request.bridge({
488
- functionName: "delete_file_or_directory",
489
- payload: request,
490
- });
491
- return response as FileDeleteResponse;
492
- };
490
+ public sendDeleteFileOrFolder: EditRequests["sendDeleteFileOrFolder"] =
491
+ async (request) => {
492
+ const response = await this.rpc.proxy.request.bridge({
493
+ functionName: "delete_file_or_directory",
494
+ payload: request,
495
+ });
496
+ return response as FileDeleteResponse;
497
+ };
493
498
 
494
- sendCopyFileOrFolder: EditRequests["sendCopyFileOrFolder"] = async (
499
+ public sendCopyFileOrFolder: EditRequests["sendCopyFileOrFolder"] = async (
495
500
  request,
496
501
  ) => {
497
502
  const response = await this.rpc.proxy.request.bridge({
@@ -501,17 +506,16 @@ export class PyodideBridge implements RunRequests, EditRequests {
501
506
  return response as FileCopyResponse;
502
507
  };
503
508
 
504
- sendRenameFileOrFolder: EditRequests["sendRenameFileOrFolder"] = async (
505
- request,
506
- ) => {
507
- const response = await this.rpc.proxy.request.bridge({
508
- functionName: "move_file_or_directory",
509
- payload: request,
510
- });
511
- return response as FileMoveResponse;
512
- };
509
+ public sendRenameFileOrFolder: EditRequests["sendRenameFileOrFolder"] =
510
+ async (request) => {
511
+ const response = await this.rpc.proxy.request.bridge({
512
+ functionName: "move_file_or_directory",
513
+ payload: request,
514
+ });
515
+ return response as FileMoveResponse;
516
+ };
513
517
 
514
- sendUpdateFile: EditRequests["sendUpdateFile"] = async (request) => {
518
+ public sendUpdateFile: EditRequests["sendUpdateFile"] = async (request) => {
515
519
  const response = await this.rpc.proxy.request.bridge({
516
520
  functionName: "update_file",
517
521
  payload: request,
@@ -519,7 +523,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
519
523
  return response as FileUpdateResponse;
520
524
  };
521
525
 
522
- sendFileDetails: EditRequests["sendFileDetails"] = async (request) => {
526
+ public sendFileDetails: EditRequests["sendFileDetails"] = async (request) => {
523
527
  const response = await this.rpc.proxy.request.bridge({
524
528
  functionName: "file_details",
525
529
  payload: request,
@@ -527,7 +531,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
527
531
  return response as FileDetailsResponse;
528
532
  };
529
533
 
530
- exportAsHTML: EditRequests["exportAsHTML"] = async (
534
+ public exportAsHTML: EditRequests["exportAsHTML"] = async (
531
535
  request: ExportAsHTMLRequest,
532
536
  ) => {
533
537
  await this.pendingSessionSave;
@@ -544,7 +548,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
544
548
  return response as ExportedFile<string>;
545
549
  };
546
550
 
547
- exportAsMarkdown: EditRequests["exportAsMarkdown"] = async (
551
+ public exportAsMarkdown: EditRequests["exportAsMarkdown"] = async (
548
552
  request: ExportAsMarkdownRequest,
549
553
  ) => {
550
554
  await this.pendingSessionSave;
@@ -555,7 +559,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
555
559
  return response as ExportedFile<string>;
556
560
  };
557
561
 
558
- exportAsScript: EditRequests["exportAsScript"] = async (
562
+ public exportAsScript: EditRequests["exportAsScript"] = async (
559
563
  request: ExportAsScriptRequest,
560
564
  ) => {
561
565
  await this.pendingSessionSave;
@@ -566,7 +570,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
566
570
  return response as ExportedFile<string>;
567
571
  };
568
572
 
569
- previewDatasetColumn: EditRequests["previewDatasetColumn"] = async (
573
+ public previewDatasetColumn: EditRequests["previewDatasetColumn"] = async (
570
574
  request,
571
575
  ) => {
572
576
  await this.putControlRequest({
@@ -576,7 +580,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
576
580
  return null;
577
581
  };
578
582
 
579
- previewSQLTable: EditRequests["previewSQLTable"] = async (request) => {
583
+ public previewSQLTable: EditRequests["previewSQLTable"] = async (request) => {
580
584
  await this.putControlRequest({
581
585
  type: "preview-sql-table",
582
586
  ...request,
@@ -584,7 +588,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
584
588
  return null;
585
589
  };
586
590
 
587
- previewSQLTableList: EditRequests["previewSQLTableList"] = async (
591
+ public previewSQLTableList: EditRequests["previewSQLTableList"] = async (
588
592
  request,
589
593
  ) => {
590
594
  await this.putControlRequest({
@@ -594,7 +598,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
594
598
  return null;
595
599
  };
596
600
 
597
- previewSQLSchemaList: EditRequests["previewSQLSchemaList"] = async (
601
+ public previewSQLSchemaList: EditRequests["previewSQLSchemaList"] = async (
598
602
  request,
599
603
  ) => {
600
604
  await this.putControlRequest({
@@ -604,7 +608,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
604
608
  return null;
605
609
  };
606
610
 
607
- previewDataSourceConnection: EditRequests["previewDataSourceConnection"] =
611
+ public previewDataSourceConnection: EditRequests["previewDataSourceConnection"] =
608
612
  async (request) => {
609
613
  await this.putControlRequest({
610
614
  type: "list-data-source-connection",
@@ -613,7 +617,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
613
617
  return null;
614
618
  };
615
619
 
616
- validateSQL: EditRequests["validateSQL"] = async (request) => {
620
+ public validateSQL: EditRequests["validateSQL"] = async (request) => {
617
621
  await this.putControlRequest({
618
622
  type: "validate-sql",
619
623
  ...request,
@@ -621,7 +625,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
621
625
  return null;
622
626
  };
623
627
 
624
- sendModelValue: RunRequests["sendModelValue"] = async (request) => {
628
+ public sendModelValue: RunRequests["sendModelValue"] = async (request) => {
625
629
  await this.putControlRequest({
626
630
  type: "model",
627
631
  ...request,
@@ -629,31 +633,31 @@ export class PyodideBridge implements RunRequests, EditRequests {
629
633
  return null;
630
634
  };
631
635
 
632
- sendDocumentTransaction = () => Promise.resolve(null);
636
+ public sendDocumentTransaction = () => Promise.resolve(null);
633
637
 
634
- addPackage: EditRequests["addPackage"] = async (request) => {
638
+ public addPackage: EditRequests["addPackage"] = async (request) => {
635
639
  return this.rpc.proxy.request.addPackage(request);
636
640
  };
637
- removePackage: EditRequests["removePackage"] = async (request) => {
641
+ public removePackage: EditRequests["removePackage"] = async (request) => {
638
642
  return this.rpc.proxy.request.removePackage(request);
639
643
  };
640
- getPackageList = async () => {
644
+ public getPackageList = async () => {
641
645
  const response = await this.rpc.proxy.request.listPackages();
642
646
  return response;
643
647
  };
644
648
 
645
- getSandbox: EditRequests["getSandbox"] = async () => ({
649
+ public getSandbox: EditRequests["getSandbox"] = async () => ({
646
650
  backend: null,
647
651
  manifest: null,
648
652
  filename: null,
649
653
  });
650
- updateManifest: EditRequests["updateManifest"] = async () => {
654
+ public updateManifest: EditRequests["updateManifest"] = async () => {
651
655
  throw new Error("Sandboxes are not supported in WebAssembly");
652
656
  };
653
- syncSandbox: EditRequests["syncSandbox"] = async () => {
657
+ public syncSandbox: EditRequests["syncSandbox"] = async () => {
654
658
  throw new Error("Sandboxes are not supported in WebAssembly");
655
659
  };
656
- getDependencyTree: EditRequests["getDependencyTree"] = async () => {
660
+ public getDependencyTree: EditRequests["getDependencyTree"] = async () => {
657
661
  // WASM doesn't support dependency trees yet
658
662
  return {
659
663
  tree: {
@@ -666,7 +670,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
666
670
  };
667
671
  };
668
672
 
669
- listSecretKeys: EditRequests["listSecretKeys"] = async (request) => {
673
+ public listSecretKeys: EditRequests["listSecretKeys"] = async (request) => {
670
674
  await this.putControlRequest({
671
675
  type: "list-secret-keys",
672
676
  ...request,
@@ -674,7 +678,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
674
678
  return null;
675
679
  };
676
680
 
677
- discoverDataSources: EditRequests["discoverDataSources"] = async (
681
+ public discoverDataSources: EditRequests["discoverDataSources"] = async (
678
682
  request,
679
683
  ) => {
680
684
  await this.putControlRequest({
@@ -684,33 +688,33 @@ export class PyodideBridge implements RunRequests, EditRequests {
684
688
  return null;
685
689
  };
686
690
 
687
- getUsageStats = throwNotImplemented;
688
- getEnvironmentInfo: EditRequests["getEnvironmentInfo"] = async () => {
691
+ public getUsageStats = throwNotImplemented;
692
+ public getEnvironmentInfo: EditRequests["getEnvironmentInfo"] = async () => {
689
693
  const response = await this.rpc.proxy.request.bridge({
690
694
  functionName: "get_environment_info",
691
695
  payload: undefined,
692
696
  });
693
697
  return response as EnvironmentInfo;
694
698
  };
695
- openTutorial = throwNotImplemented;
696
- getRecentFiles = throwNotImplemented;
697
- getWorkspaceFiles = throwNotImplemented;
698
- getRunningNotebooks = throwNotImplemented;
699
- shutdownSession = throwNotImplemented;
700
- getExportAvailability = throwNotImplemented;
701
- installExportRequirements = throwNotImplemented;
702
- exportAsIPYNB = throwNotImplemented;
703
- exportAsPDF = throwNotImplemented;
704
- autoExportAsHTML = throwNotImplemented;
705
- autoExportAsMarkdown = throwNotImplemented;
706
- autoExportAsIPYNB = throwNotImplemented;
707
- updateCellOutputs = throwNotImplemented;
708
- writeSecret = throwNotImplemented;
709
- invokeAiTool = throwNotImplemented;
710
- clearCache = throwNotImplemented;
711
- getCacheInfo = throwNotImplemented;
712
- listStorageEntries = throwNotImplemented;
713
- downloadStorage = throwNotImplemented;
699
+ public openTutorial = throwNotImplemented;
700
+ public getRecentFiles = throwNotImplemented;
701
+ public getWorkspaceFiles = throwNotImplemented;
702
+ public getRunningNotebooks = throwNotImplemented;
703
+ public shutdownSession = throwNotImplemented;
704
+ public getExportAvailability = throwNotImplemented;
705
+ public installExportRequirements = throwNotImplemented;
706
+ public exportAsIPYNB = throwNotImplemented;
707
+ public exportAsPDF = throwNotImplemented;
708
+ public autoExportAsHTML = throwNotImplemented;
709
+ public autoExportAsMarkdown = throwNotImplemented;
710
+ public autoExportAsIPYNB = throwNotImplemented;
711
+ public updateCellOutputs = throwNotImplemented;
712
+ public writeSecret = throwNotImplemented;
713
+ public invokeAiTool = throwNotImplemented;
714
+ public clearCache = throwNotImplemented;
715
+ public getCacheInfo = throwNotImplemented;
716
+ public listStorageEntries = throwNotImplemented;
717
+ public downloadStorage = throwNotImplemented;
714
718
 
715
719
  private async putControlRequest(operation: CommandMessage) {
716
720
  await this.rpc.proxy.request.bridge({
@@ -1,17 +1,17 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  class URLPyodideRouter {
3
- getFilename(): string | null {
3
+ public getFilename(): string | null {
4
4
  return this.getSearchParam("filename");
5
5
  }
6
- setFilename(filename: string) {
6
+ public setFilename(filename: string) {
7
7
  this.setSearchParam("filename", filename);
8
8
  }
9
9
 
10
- getCodeFromSearchParam(): string | null {
10
+ public getCodeFromSearchParam(): string | null {
11
11
  return this.getSearchParam("code");
12
12
  }
13
13
 
14
- getCodeFromHash(): string | null {
14
+ public getCodeFromHash(): string | null {
15
15
  const hash = window.location.hash;
16
16
  const prefix = "#code/";
17
17
  if (!hash.startsWith(prefix)) {
@@ -20,7 +20,7 @@ class URLPyodideRouter {
20
20
  return hash.slice(prefix.length);
21
21
  }
22
22
 
23
- setCodeForHash(code: string) {
23
+ public setCodeForHash(code: string) {
24
24
  window.location.hash = `#code/${code}`;
25
25
  }
26
26
 
@@ -99,19 +99,19 @@ const emptyFileStore: FileStore = {
99
99
 
100
100
  export class CompositeFileStore implements FileStore {
101
101
  private stores: FileStore[];
102
- constructor(stores: FileStore[]) {
102
+ public constructor(stores: FileStore[]) {
103
103
  this.stores = stores;
104
104
  }
105
105
 
106
- insert(index: number, store: FileStore) {
106
+ public insert(index: number, store: FileStore) {
107
107
  this.stores.splice(index, 0, store);
108
108
  }
109
109
 
110
- saveFile(contents: string) {
110
+ public saveFile(contents: string) {
111
111
  this.stores.forEach((store) => store.saveFile(contents));
112
112
  }
113
113
 
114
- readFile() {
114
+ public readFile() {
115
115
  for (const store of this.stores) {
116
116
  const contents = store.readFile();
117
117
  if (contents) {
@@ -36,12 +36,12 @@ export class DefaultWasmController implements WasmController {
36
36
  private sessionGeneration = 0;
37
37
  private activeSessionStops = new Set<PyCallable>();
38
38
 
39
- get requirePyodide() {
39
+ public get requirePyodide() {
40
40
  invariant(this.pyodide, "Pyodide not loaded");
41
41
  return this.pyodide;
42
42
  }
43
43
 
44
- async bootstrap(
44
+ public async bootstrap(
45
45
  opts: Parameters<WasmController["bootstrap"]>[0],
46
46
  ): Promise<PyodideInterface> {
47
47
  const pyodide = await this.loadPyodideAndPackages(opts);
@@ -110,7 +110,10 @@ export class DefaultWasmController implements WasmController {
110
110
  }
111
111
  }
112
112
 
113
- async mountFilesystem(opts: { code: string; filename: string | null }) {
113
+ public async mountFilesystem(opts: {
114
+ code: string;
115
+ filename: string | null;
116
+ }) {
114
117
  const span = t.startSpan("mountFilesystem");
115
118
  // Set up the filesystem
116
119
  WasmFileSystem.createHomeDir(this.requirePyodide);
@@ -124,7 +127,7 @@ export class DefaultWasmController implements WasmController {
124
127
  });
125
128
  }
126
129
 
127
- async startSession(opts: {
130
+ public async startSession(opts: {
128
131
  queryParameters: Record<string, string | string[]>;
129
132
  code: string;
130
133
  filename: string | null;
@@ -250,7 +253,7 @@ export class DefaultWasmController implements WasmController {
250
253
  return bridgeProxy as unknown as SerializedBridge;
251
254
  }
252
255
 
253
- async stopSession(): Promise<void> {
256
+ public async stopSession(): Promise<void> {
254
257
  this.sessionGeneration += 1;
255
258
  const stops = [...this.activeSessionStops];
256
259
  let hasFailure = false;