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

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 (280) hide show
  1. package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
  2. package/dist/{ErrorBoundary-pV36lYEK.js → ErrorBoundary-vRGgXmad.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-5wuTKcAD.js} +2 -2
  29. package/dist/{common-DnMDPPaW.js → common-PL37o7BX.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-CWqzAL_P.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-BwKWcLqp.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-DdDhX9sS.js} +3 -3
  48. package/dist/{globals-CPNNcOJI.js → globals-D07l3kcu.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-DerHT6Rq.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-sfZwts_E.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/__tests__/share-modal.test.tsx +154 -0
  120. package/src/components/static-html/__tests__/stage-for-publish.test.ts +111 -0
  121. package/src/components/static-html/share-modal.tsx +114 -144
  122. package/src/components/static-html/stage-for-publish.ts +56 -0
  123. package/src/components/static-html/static-banner.tsx +2 -2
  124. package/src/components/ui/links.tsx +6 -1
  125. package/src/components/ui/typography.tsx +16 -8
  126. package/src/core/ai/context/__tests__/registry.test.ts +31 -28
  127. package/src/core/ai/context/providers/cell-output.ts +8 -8
  128. package/src/core/ai/context/providers/datasource.ts +10 -7
  129. package/src/core/ai/context/providers/error.ts +7 -7
  130. package/src/core/ai/context/providers/file.ts +8 -8
  131. package/src/core/ai/context/providers/tables.ts +7 -7
  132. package/src/core/ai/context/providers/variable.ts +7 -7
  133. package/src/core/ai/context/registry.ts +18 -18
  134. package/src/core/ai/ids/ids.ts +5 -5
  135. package/src/core/ai/model-registry.ts +12 -9
  136. package/src/core/ai/staged-cells.ts +6 -6
  137. package/src/core/ai/tools/base.ts +6 -6
  138. package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
  139. package/src/core/ai/tools/registry.ts +4 -4
  140. package/src/core/ai/tools/run-cells-tool.ts +7 -7
  141. package/src/core/ai/tools/sample-tool.ts +6 -6
  142. package/src/core/cells/__tests__/cells.test.ts +27 -0
  143. package/src/core/cells/cells.ts +2 -1
  144. package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
  145. package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
  146. package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
  147. package/src/core/codemirror/code-lens/extension.ts +13 -13
  148. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
  149. package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
  150. package/src/core/codemirror/copilot/language-server.ts +13 -13
  151. package/src/core/codemirror/copilot/transport.ts +1 -1
  152. package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
  153. package/src/core/codemirror/go-to-definition/underline.ts +3 -3
  154. package/src/core/codemirror/keymaps/vim.ts +3 -3
  155. package/src/core/codemirror/language/languages/markdown.ts +8 -8
  156. package/src/core/codemirror/language/languages/python.ts +7 -7
  157. package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
  158. package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
  159. package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
  160. package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
  161. package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
  162. package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
  163. package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
  164. package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
  165. package/src/core/codemirror/reactive-references/extension.ts +3 -3
  166. package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
  167. package/src/core/codemirror/rtc/loro/sync.ts +5 -5
  168. package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
  169. package/src/core/dom/ui-element.ts +5 -5
  170. package/src/core/dom/uiregistry.ts +10 -10
  171. package/src/core/hotkeys/hotkeys.ts +9 -9
  172. package/src/core/islands/__tests__/bridge.test.ts +4 -4
  173. package/src/core/islands/__tests__/test-utils.tsx +4 -4
  174. package/src/core/islands/bridge.ts +85 -82
  175. package/src/core/islands/components/web-components.tsx +7 -7
  176. package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
  177. package/src/core/islands/worker/controller.ts +6 -3
  178. package/src/core/islands/worker-factory.ts +2 -2
  179. package/src/core/kernel/RuntimeState.ts +4 -4
  180. package/src/core/lsp/__tests__/transport.test.ts +19 -19
  181. package/src/core/lsp/transport.ts +5 -5
  182. package/src/core/network/CachingRequestRegistry.ts +2 -2
  183. package/src/core/network/DeferredRequestRegistry.ts +4 -4
  184. package/src/core/network/__tests__/export-asset-url.test.ts +45 -0
  185. package/src/core/network/export-asset-url.ts +19 -0
  186. package/src/core/network/requests-network.ts +2 -7
  187. package/src/core/runtime/runtime.ts +25 -20
  188. package/src/core/static/virtual-file-tracker.ts +5 -5
  189. package/src/core/wasm/__tests__/bridge.test.ts +2 -2
  190. package/src/core/wasm/bridge.ts +132 -133
  191. package/src/core/wasm/router.ts +5 -5
  192. package/src/core/wasm/store.ts +4 -4
  193. package/src/core/wasm/worker/bootstrap.ts +8 -5
  194. package/src/core/wasm/worker/message-buffer.ts +3 -3
  195. package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
  196. package/src/core/websocket/transports/basic.ts +15 -8
  197. package/src/core/websocket/transports/sse.ts +7 -7
  198. package/src/core/websocket/transports/transport.ts +3 -3
  199. package/src/core/websocket/transports/ws.ts +9 -7
  200. package/src/css/globals.css +18 -21
  201. package/src/css/katex.min.css +260 -241
  202. package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
  203. package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
  204. package/src/plugins/core/registerReactComponent.tsx +5 -5
  205. package/src/plugins/core/sidebar-element.tsx +2 -2
  206. package/src/plugins/impl/ButtonPlugin.tsx +3 -3
  207. package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
  208. package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
  209. package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
  210. package/src/plugins/impl/DateRangePlugin.tsx +3 -3
  211. package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
  212. package/src/plugins/impl/DictPlugin.tsx +3 -3
  213. package/src/plugins/impl/DropdownPlugin.tsx +3 -3
  214. package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
  215. package/src/plugins/impl/MatrixPlugin.tsx +4 -4
  216. package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
  217. package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
  218. package/src/plugins/impl/NumberPlugin.tsx +3 -3
  219. package/src/plugins/impl/RadioPlugin.tsx +9 -5
  220. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
  221. package/src/plugins/impl/RefreshPlugin.tsx +3 -3
  222. package/src/plugins/impl/SliderPlugin.tsx +3 -3
  223. package/src/plugins/impl/SwitchPlugin.tsx +3 -3
  224. package/src/plugins/impl/TabsPlugin.tsx +3 -3
  225. package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
  226. package/src/plugins/impl/TextInputPlugin.tsx +3 -3
  227. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
  228. package/src/plugins/impl/anywidget/model.ts +10 -10
  229. package/src/plugins/impl/anywidget/registry.ts +12 -9
  230. package/src/plugins/impl/anywidget/runtime.ts +11 -9
  231. package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
  232. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
  233. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
  234. package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
  235. package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
  236. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
  237. package/src/plugins/impl/panel/utils.ts +5 -5
  238. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  239. package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
  240. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
  241. package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
  242. package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
  243. package/src/plugins/impl/vega/loader.ts +23 -1
  244. package/src/plugins/impl/vega/utils.ts +5 -4
  245. package/src/plugins/layout/AccordionPlugin.tsx +3 -3
  246. package/src/plugins/layout/CalloutPlugin.tsx +3 -3
  247. package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
  248. package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
  249. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
  250. package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
  251. package/src/plugins/layout/OutlinePlugin.tsx +3 -3
  252. package/src/plugins/layout/ProgressPlugin.tsx +3 -3
  253. package/src/plugins/layout/RoutesPlugin.tsx +6 -8
  254. package/src/plugins/layout/StatPlugin.tsx +3 -3
  255. package/src/plugins/layout/TexPlugin.tsx +3 -3
  256. package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
  257. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
  258. package/src/utils/Deferred.ts +6 -6
  259. package/src/utils/async-capture-tracker.ts +10 -7
  260. package/src/utils/errors.ts +5 -5
  261. package/src/utils/id-tree.tsx +83 -80
  262. package/src/utils/lru.ts +1 -1
  263. package/src/utils/multi-map.ts +14 -12
  264. package/src/utils/paths.ts +6 -6
  265. package/src/utils/pluralize.ts +3 -3
  266. package/src/utils/progress.ts +6 -6
  267. package/src/utils/python-poet/poet.ts +14 -14
  268. package/src/utils/routes.ts +4 -2
  269. package/src/utils/semaphore.ts +6 -6
  270. package/src/utils/storage/storage.ts +6 -6
  271. package/src/utils/storage/typed.ts +16 -12
  272. package/src/utils/time.ts +9 -9
  273. package/src/utils/timed-cache.ts +4 -4
  274. package/src/utils/tracer.ts +9 -6
  275. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
  276. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
  277. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
  278. package/dist/katex-DFBiSucW.js +0 -21840
  279. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
  280. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
@@ -14,6 +14,7 @@ import { notebookIsRunningAtom } from "../cells/cells";
14
14
  import type { CommandMessage } from "../kernel/messages";
15
15
  import { getInitialAppMode } from "../mode";
16
16
  import { API } from "../network/api";
17
+ import { withDevAssetUrl } from "../network/export-asset-url";
17
18
  import type {
18
19
  EditRequests,
19
20
  EnvironmentInfo,
@@ -57,7 +58,7 @@ type SaveWorker = ReturnType<
57
58
  >["proxy"]["request"];
58
59
 
59
60
  export class PyodideBridge implements RunRequests, EditRequests {
60
- static get INSTANCE(): PyodideBridge {
61
+ public static get INSTANCE(): PyodideBridge {
61
62
  const KEY = "_marimo_private_PyodideBridge";
62
63
  if (!window[KEY]) {
63
64
  window[KEY] = new PyodideBridge();
@@ -207,12 +208,14 @@ export class PyodideBridge implements RunRequests, EditRequests {
207
208
  }
208
209
  }
209
210
 
210
- attachMessageConsumer(consumer: (message: MessageEvent<string>) => void) {
211
+ public attachMessageConsumer(
212
+ consumer: (message: MessageEvent<string>) => void,
213
+ ) {
211
214
  this.messageConsumer = consumer;
212
215
  this.rpc.proxy.send.consumerReady({});
213
216
  }
214
217
 
215
- sendRename: EditRequests["sendRename"] = async ({ filename }) => {
218
+ public sendRename: EditRequests["sendRename"] = async ({ filename }) => {
216
219
  if (filename === null) {
217
220
  return null;
218
221
  }
@@ -227,7 +230,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
227
230
  return null;
228
231
  };
229
232
 
230
- sendSave: EditRequests["sendSave"] = async (request) => {
233
+ public sendSave: EditRequests["sendSave"] = async (request) => {
231
234
  if (!this.saveRpc) {
232
235
  Logger.warn("Save RPC not initialized");
233
236
  return null;
@@ -254,11 +257,11 @@ export class PyodideBridge implements RunRequests, EditRequests {
254
257
  return null;
255
258
  };
256
259
 
257
- sendCopy: EditRequests["sendCopy"] = async () => {
260
+ public sendCopy: EditRequests["sendCopy"] = async () => {
258
261
  throwNotImplemented();
259
262
  };
260
263
 
261
- sendStdin: EditRequests["sendStdin"] = async (request) => {
264
+ public sendStdin: EditRequests["sendStdin"] = async (request) => {
262
265
  await this.rpc.proxy.request.bridge({
263
266
  functionName: "put_input",
264
267
  payload: request.text,
@@ -266,15 +269,15 @@ export class PyodideBridge implements RunRequests, EditRequests {
266
269
  return null;
267
270
  };
268
271
 
269
- sendPdb: EditRequests["sendPdb"] = async () => {
272
+ public sendPdb: EditRequests["sendPdb"] = async () => {
270
273
  throwNotImplemented();
271
274
  };
272
275
 
273
- sendSetBreakpoints: EditRequests["sendSetBreakpoints"] = async () => {
276
+ public sendSetBreakpoints: EditRequests["sendSetBreakpoints"] = async () => {
274
277
  throwNotImplemented();
275
278
  };
276
279
 
277
- sendRun: EditRequests["sendRun"] = async (request) => {
280
+ public sendRun: EditRequests["sendRun"] = async (request) => {
278
281
  await this.rpc.proxy.request.loadPackages(request.codes.join("\n"));
279
282
 
280
283
  await this.putControlRequest({
@@ -283,7 +286,9 @@ export class PyodideBridge implements RunRequests, EditRequests {
283
286
  });
284
287
  return null;
285
288
  };
286
- sendRunScratchpad: EditRequests["sendRunScratchpad"] = async (request) => {
289
+ public sendRunScratchpad: EditRequests["sendRunScratchpad"] = async (
290
+ request,
291
+ ) => {
287
292
  await this.rpc.proxy.request.loadPackages(request.code);
288
293
 
289
294
  await this.putControlRequest({
@@ -292,18 +297,18 @@ export class PyodideBridge implements RunRequests, EditRequests {
292
297
  });
293
298
  return null;
294
299
  };
295
- sendInterrupt: EditRequests["sendInterrupt"] = async () => {
300
+ public sendInterrupt: EditRequests["sendInterrupt"] = async () => {
296
301
  if (this.interruptBuffer !== undefined) {
297
302
  // 2 sends a SIGINT
298
303
  this.interruptBuffer[0] = 2;
299
304
  }
300
305
  return null;
301
306
  };
302
- sendShutdown: EditRequests["sendShutdown"] = async () => {
307
+ public sendShutdown: EditRequests["sendShutdown"] = async () => {
303
308
  window.close();
304
309
  return null;
305
310
  };
306
- sendFormat: EditRequests["sendFormat"] = async (request) => {
311
+ public sendFormat: EditRequests["sendFormat"] = async (request) => {
307
312
  const response = await this.rpc.proxy.request.bridge({
308
313
  functionName: "format",
309
314
  payload: request,
@@ -311,7 +316,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
311
316
  return response as FormatResponse;
312
317
  };
313
318
 
314
- sendDeleteCell: EditRequests["sendDeleteCell"] = async (request) => {
319
+ public sendDeleteCell: EditRequests["sendDeleteCell"] = async (request) => {
315
320
  await this.putControlRequest({
316
321
  type: "delete-cell",
317
322
  ...request,
@@ -319,7 +324,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
319
324
  return null;
320
325
  };
321
326
 
322
- sendInstallMissingPackages: EditRequests["sendInstallMissingPackages"] =
327
+ public sendInstallMissingPackages: EditRequests["sendInstallMissingPackages"] =
323
328
  async (request) => {
324
329
  this.putControlRequest({
325
330
  type: "install-packages",
@@ -327,23 +332,22 @@ export class PyodideBridge implements RunRequests, EditRequests {
327
332
  });
328
333
  return null;
329
334
  };
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
- };
335
+ public sendCodeCompletionRequest: EditRequests["sendCodeCompletionRequest"] =
336
+ async (request) => {
337
+ // Because the Pyodide worker is single-threaded, sending
338
+ // code completion requests while the kernel is running is useless
339
+ // and runs the risk of choking the kernel
340
+ const isRunning = store.get(notebookIsRunningAtom);
341
+ if (!isRunning) {
342
+ await this.rpc.proxy.request.bridge({
343
+ functionName: "code_complete",
344
+ payload: request,
345
+ });
346
+ }
347
+ return null;
348
+ };
345
349
 
346
- saveUserConfig: EditRequests["saveUserConfig"] = async (request) => {
350
+ public saveUserConfig: EditRequests["saveUserConfig"] = async (request) => {
347
351
  await this.rpc.proxy.request.bridge({
348
352
  functionName: "save_user_config",
349
353
  payload: request,
@@ -361,7 +365,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
361
365
  });
362
366
  };
363
367
 
364
- saveAppConfig: EditRequests["saveAppConfig"] = async (request) => {
368
+ public saveAppConfig: EditRequests["saveAppConfig"] = async (request) => {
365
369
  await this.rpc.proxy.request.bridge({
366
370
  functionName: "save_app_config",
367
371
  payload: request,
@@ -369,7 +373,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
369
373
  return null;
370
374
  };
371
375
 
372
- saveCellConfig: EditRequests["saveCellConfig"] = async (request) => {
376
+ public saveCellConfig: EditRequests["saveCellConfig"] = async (request) => {
373
377
  await this.putControlRequest({
374
378
  type: "update-cell-config",
375
379
  ...request,
@@ -377,7 +381,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
377
381
  return null;
378
382
  };
379
383
 
380
- sendRestart = async (): Promise<null> => {
384
+ public sendRestart = async (): Promise<null> => {
381
385
  // Save first
382
386
  const code = await this.readCode();
383
387
  if (code.contents) {
@@ -388,7 +392,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
388
392
  return null;
389
393
  };
390
394
 
391
- readCode: EditRequests["readCode"] = async () => {
395
+ public readCode: EditRequests["readCode"] = async () => {
392
396
  if (!this.saveRpc) {
393
397
  Logger.warn("Save RPC not initialized");
394
398
  return { contents: "" };
@@ -397,7 +401,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
397
401
  return { contents };
398
402
  };
399
403
 
400
- readSnippets: EditRequests["readSnippets"] = async () => {
404
+ public readSnippets: EditRequests["readSnippets"] = async () => {
401
405
  const response = await this.rpc.proxy.request.bridge({
402
406
  functionName: "read_snippets",
403
407
  payload: undefined,
@@ -405,7 +409,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
405
409
  return response as Snippets;
406
410
  };
407
411
 
408
- openFile: EditRequests["openFile"] = async ({ path }) => {
412
+ public openFile: EditRequests["openFile"] = async ({ path }) => {
409
413
  const url = createShareableLink({
410
414
  code: null,
411
415
  baseUrl: window.location.origin,
@@ -414,7 +418,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
414
418
  return null;
415
419
  };
416
420
 
417
- sendListFiles: EditRequests["sendListFiles"] = async (request) => {
421
+ public sendListFiles: EditRequests["sendListFiles"] = async (request) => {
418
422
  const response = await this.rpc.proxy.request.bridge({
419
423
  functionName: "list_files",
420
424
  payload: request,
@@ -422,7 +426,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
422
426
  return response as FileListResponse;
423
427
  };
424
428
 
425
- getFileRoots: EditRequests["getFileRoots"] = async () => {
429
+ public getFileRoots: EditRequests["getFileRoots"] = async () => {
426
430
  const response = await this.rpc.proxy.request.bridge({
427
431
  functionName: "file_roots",
428
432
  payload: undefined,
@@ -430,7 +434,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
430
434
  return response as FileRootsResponse;
431
435
  };
432
436
 
433
- sendSearchFiles: EditRequests["sendSearchFiles"] = async (request) => {
437
+ public sendSearchFiles: EditRequests["sendSearchFiles"] = async (request) => {
434
438
  const response = await this.rpc.proxy.request.bridge({
435
439
  functionName: "search_files",
436
440
  payload: request,
@@ -438,7 +442,9 @@ export class PyodideBridge implements RunRequests, EditRequests {
438
442
  return response as FileSearchResponse;
439
443
  };
440
444
 
441
- sendComponentValues: RunRequests["sendComponentValues"] = async (request) => {
445
+ public sendComponentValues: RunRequests["sendComponentValues"] = async (
446
+ request,
447
+ ) => {
442
448
  await this.putControlRequest({
443
449
  type: "update-ui-element",
444
450
  ...request,
@@ -447,11 +453,13 @@ export class PyodideBridge implements RunRequests, EditRequests {
447
453
  return null;
448
454
  };
449
455
 
450
- sendInstantiate: RunRequests["sendInstantiate"] = async (request) => {
456
+ public sendInstantiate: RunRequests["sendInstantiate"] = async (request) => {
451
457
  return null;
452
458
  };
453
459
 
454
- sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (request) => {
460
+ public sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (
461
+ request,
462
+ ) => {
455
463
  await this.putControlRequest({
456
464
  type: "invoke-function",
457
465
  ...request,
@@ -459,39 +467,37 @@ export class PyodideBridge implements RunRequests, EditRequests {
459
467
  return null;
460
468
  };
461
469
 
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
- };
470
+ public sendCreateFileOrFolder: EditRequests["sendCreateFileOrFolder"] =
471
+ async (request) => {
472
+ // The WASM RPC boundary can only carry JSON, so we base64-encode the
473
+ // file bytes here. The HTTP transport uses multipart/form-data instead.
474
+ let contents: string | null = null;
475
+ if (request.file) {
476
+ const dataUrl = await serializeBlob(request.file);
477
+ contents = dataUrl.split(",")[1] ?? "";
478
+ }
479
+ const response = await this.rpc.proxy.request.bridge({
480
+ functionName: "create_file_or_directory",
481
+ payload: {
482
+ path: request.path,
483
+ type: request.type,
484
+ name: request.name,
485
+ contents,
486
+ },
487
+ });
488
+ return response as FileCreateResponse;
489
+ };
483
490
 
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
- };
491
+ public sendDeleteFileOrFolder: EditRequests["sendDeleteFileOrFolder"] =
492
+ async (request) => {
493
+ const response = await this.rpc.proxy.request.bridge({
494
+ functionName: "delete_file_or_directory",
495
+ payload: request,
496
+ });
497
+ return response as FileDeleteResponse;
498
+ };
493
499
 
494
- sendCopyFileOrFolder: EditRequests["sendCopyFileOrFolder"] = async (
500
+ public sendCopyFileOrFolder: EditRequests["sendCopyFileOrFolder"] = async (
495
501
  request,
496
502
  ) => {
497
503
  const response = await this.rpc.proxy.request.bridge({
@@ -501,17 +507,16 @@ export class PyodideBridge implements RunRequests, EditRequests {
501
507
  return response as FileCopyResponse;
502
508
  };
503
509
 
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
- };
510
+ public sendRenameFileOrFolder: EditRequests["sendRenameFileOrFolder"] =
511
+ async (request) => {
512
+ const response = await this.rpc.proxy.request.bridge({
513
+ functionName: "move_file_or_directory",
514
+ payload: request,
515
+ });
516
+ return response as FileMoveResponse;
517
+ };
513
518
 
514
- sendUpdateFile: EditRequests["sendUpdateFile"] = async (request) => {
519
+ public sendUpdateFile: EditRequests["sendUpdateFile"] = async (request) => {
515
520
  const response = await this.rpc.proxy.request.bridge({
516
521
  functionName: "update_file",
517
522
  payload: request,
@@ -519,7 +524,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
519
524
  return response as FileUpdateResponse;
520
525
  };
521
526
 
522
- sendFileDetails: EditRequests["sendFileDetails"] = async (request) => {
527
+ public sendFileDetails: EditRequests["sendFileDetails"] = async (request) => {
523
528
  const response = await this.rpc.proxy.request.bridge({
524
529
  functionName: "file_details",
525
530
  payload: request,
@@ -527,24 +532,18 @@ export class PyodideBridge implements RunRequests, EditRequests {
527
532
  return response as FileDetailsResponse;
528
533
  };
529
534
 
530
- exportAsHTML: EditRequests["exportAsHTML"] = async (
535
+ public exportAsHTML: EditRequests["exportAsHTML"] = async (
531
536
  request: ExportAsHTMLRequest,
532
537
  ) => {
533
538
  await this.pendingSessionSave;
534
- if (
535
- process.env.NODE_ENV === "development" ||
536
- process.env.NODE_ENV === "test"
537
- ) {
538
- request.assetUrl = window.location.origin;
539
- }
540
539
  const response = await this.rpc.proxy.request.bridge({
541
540
  functionName: "export_html",
542
- payload: request,
541
+ payload: withDevAssetUrl(request),
543
542
  });
544
543
  return response as ExportedFile<string>;
545
544
  };
546
545
 
547
- exportAsMarkdown: EditRequests["exportAsMarkdown"] = async (
546
+ public exportAsMarkdown: EditRequests["exportAsMarkdown"] = async (
548
547
  request: ExportAsMarkdownRequest,
549
548
  ) => {
550
549
  await this.pendingSessionSave;
@@ -555,7 +554,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
555
554
  return response as ExportedFile<string>;
556
555
  };
557
556
 
558
- exportAsScript: EditRequests["exportAsScript"] = async (
557
+ public exportAsScript: EditRequests["exportAsScript"] = async (
559
558
  request: ExportAsScriptRequest,
560
559
  ) => {
561
560
  await this.pendingSessionSave;
@@ -566,7 +565,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
566
565
  return response as ExportedFile<string>;
567
566
  };
568
567
 
569
- previewDatasetColumn: EditRequests["previewDatasetColumn"] = async (
568
+ public previewDatasetColumn: EditRequests["previewDatasetColumn"] = async (
570
569
  request,
571
570
  ) => {
572
571
  await this.putControlRequest({
@@ -576,7 +575,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
576
575
  return null;
577
576
  };
578
577
 
579
- previewSQLTable: EditRequests["previewSQLTable"] = async (request) => {
578
+ public previewSQLTable: EditRequests["previewSQLTable"] = async (request) => {
580
579
  await this.putControlRequest({
581
580
  type: "preview-sql-table",
582
581
  ...request,
@@ -584,7 +583,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
584
583
  return null;
585
584
  };
586
585
 
587
- previewSQLTableList: EditRequests["previewSQLTableList"] = async (
586
+ public previewSQLTableList: EditRequests["previewSQLTableList"] = async (
588
587
  request,
589
588
  ) => {
590
589
  await this.putControlRequest({
@@ -594,7 +593,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
594
593
  return null;
595
594
  };
596
595
 
597
- previewSQLSchemaList: EditRequests["previewSQLSchemaList"] = async (
596
+ public previewSQLSchemaList: EditRequests["previewSQLSchemaList"] = async (
598
597
  request,
599
598
  ) => {
600
599
  await this.putControlRequest({
@@ -604,7 +603,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
604
603
  return null;
605
604
  };
606
605
 
607
- previewDataSourceConnection: EditRequests["previewDataSourceConnection"] =
606
+ public previewDataSourceConnection: EditRequests["previewDataSourceConnection"] =
608
607
  async (request) => {
609
608
  await this.putControlRequest({
610
609
  type: "list-data-source-connection",
@@ -613,7 +612,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
613
612
  return null;
614
613
  };
615
614
 
616
- validateSQL: EditRequests["validateSQL"] = async (request) => {
615
+ public validateSQL: EditRequests["validateSQL"] = async (request) => {
617
616
  await this.putControlRequest({
618
617
  type: "validate-sql",
619
618
  ...request,
@@ -621,7 +620,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
621
620
  return null;
622
621
  };
623
622
 
624
- sendModelValue: RunRequests["sendModelValue"] = async (request) => {
623
+ public sendModelValue: RunRequests["sendModelValue"] = async (request) => {
625
624
  await this.putControlRequest({
626
625
  type: "model",
627
626
  ...request,
@@ -629,31 +628,31 @@ export class PyodideBridge implements RunRequests, EditRequests {
629
628
  return null;
630
629
  };
631
630
 
632
- sendDocumentTransaction = () => Promise.resolve(null);
631
+ public sendDocumentTransaction = () => Promise.resolve(null);
633
632
 
634
- addPackage: EditRequests["addPackage"] = async (request) => {
633
+ public addPackage: EditRequests["addPackage"] = async (request) => {
635
634
  return this.rpc.proxy.request.addPackage(request);
636
635
  };
637
- removePackage: EditRequests["removePackage"] = async (request) => {
636
+ public removePackage: EditRequests["removePackage"] = async (request) => {
638
637
  return this.rpc.proxy.request.removePackage(request);
639
638
  };
640
- getPackageList = async () => {
639
+ public getPackageList = async () => {
641
640
  const response = await this.rpc.proxy.request.listPackages();
642
641
  return response;
643
642
  };
644
643
 
645
- getSandbox: EditRequests["getSandbox"] = async () => ({
644
+ public getSandbox: EditRequests["getSandbox"] = async () => ({
646
645
  backend: null,
647
646
  manifest: null,
648
647
  filename: null,
649
648
  });
650
- updateManifest: EditRequests["updateManifest"] = async () => {
649
+ public updateManifest: EditRequests["updateManifest"] = async () => {
651
650
  throw new Error("Sandboxes are not supported in WebAssembly");
652
651
  };
653
- syncSandbox: EditRequests["syncSandbox"] = async () => {
652
+ public syncSandbox: EditRequests["syncSandbox"] = async () => {
654
653
  throw new Error("Sandboxes are not supported in WebAssembly");
655
654
  };
656
- getDependencyTree: EditRequests["getDependencyTree"] = async () => {
655
+ public getDependencyTree: EditRequests["getDependencyTree"] = async () => {
657
656
  // WASM doesn't support dependency trees yet
658
657
  return {
659
658
  tree: {
@@ -666,7 +665,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
666
665
  };
667
666
  };
668
667
 
669
- listSecretKeys: EditRequests["listSecretKeys"] = async (request) => {
668
+ public listSecretKeys: EditRequests["listSecretKeys"] = async (request) => {
670
669
  await this.putControlRequest({
671
670
  type: "list-secret-keys",
672
671
  ...request,
@@ -674,7 +673,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
674
673
  return null;
675
674
  };
676
675
 
677
- discoverDataSources: EditRequests["discoverDataSources"] = async (
676
+ public discoverDataSources: EditRequests["discoverDataSources"] = async (
678
677
  request,
679
678
  ) => {
680
679
  await this.putControlRequest({
@@ -684,33 +683,33 @@ export class PyodideBridge implements RunRequests, EditRequests {
684
683
  return null;
685
684
  };
686
685
 
687
- getUsageStats = throwNotImplemented;
688
- getEnvironmentInfo: EditRequests["getEnvironmentInfo"] = async () => {
686
+ public getUsageStats = throwNotImplemented;
687
+ public getEnvironmentInfo: EditRequests["getEnvironmentInfo"] = async () => {
689
688
  const response = await this.rpc.proxy.request.bridge({
690
689
  functionName: "get_environment_info",
691
690
  payload: undefined,
692
691
  });
693
692
  return response as EnvironmentInfo;
694
693
  };
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;
694
+ public openTutorial = throwNotImplemented;
695
+ public getRecentFiles = throwNotImplemented;
696
+ public getWorkspaceFiles = throwNotImplemented;
697
+ public getRunningNotebooks = throwNotImplemented;
698
+ public shutdownSession = throwNotImplemented;
699
+ public getExportAvailability = throwNotImplemented;
700
+ public installExportRequirements = throwNotImplemented;
701
+ public exportAsIPYNB = throwNotImplemented;
702
+ public exportAsPDF = throwNotImplemented;
703
+ public autoExportAsHTML = throwNotImplemented;
704
+ public autoExportAsMarkdown = throwNotImplemented;
705
+ public autoExportAsIPYNB = throwNotImplemented;
706
+ public updateCellOutputs = throwNotImplemented;
707
+ public writeSecret = throwNotImplemented;
708
+ public invokeAiTool = throwNotImplemented;
709
+ public clearCache = throwNotImplemented;
710
+ public getCacheInfo = throwNotImplemented;
711
+ public listStorageEntries = throwNotImplemented;
712
+ public downloadStorage = throwNotImplemented;
714
713
 
715
714
  private async putControlRequest(operation: CommandMessage) {
716
715
  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) {