@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.
- package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
- package/dist/{ErrorBoundary-pV36lYEK.js → ErrorBoundary-CAJO-M56.js} +1 -1
- package/dist/{ImageComparisonComponent-Dlm5aWnH.js → ImageComparisonComponent-Cpfz30OZ.js} +51 -52
- package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
- package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
- package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
- package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
- package/dist/{cells-B5-y5EY3.js → cells-Cv93oav_.js} +3 -3
- package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
- package/dist/{chat-ui-HJZsTl7o.js → chat-ui-DLSF8a04.js} +4 -4
- package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
- package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
- package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
- package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
- package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
- package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
- package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
- package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
- package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
- package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
- package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
- package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
- package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
- package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
- package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
- package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
- package/dist/{code-visibility-CgZS2a3W.js → code-visibility-XU9RAJNV.js} +2 -2
- package/dist/{common-DnMDPPaW.js → common-C0fbrgB8.js} +13 -13
- package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
- package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
- package/dist/{data-grid-overlay-editor-hHYgD_Sm.js → data-grid-overlay-editor-BnhbJgoq.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
- package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
- package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
- package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
- package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
- package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
- package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
- package/dist/{error-entries-Bkbpx0T0.js → error-entries-DLl0XqoW.js} +1 -1
- package/dist/{feedback-button-CvKssdG_.js → feedback-button-B0QSkbSp.js} +4 -4
- package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
- package/dist/{formats-C8rLgZT9.js → formats-Cl_67ghI.js} +1 -1
- package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
- package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
- package/dist/{glide-data-editor-Ohetlgag.js → glide-data-editor-ymIQdwrb.js} +3 -3
- package/dist/{globals-CPNNcOJI.js → globals-B0S3-e_D.js} +1 -1
- package/dist/{html-to-image-BAgJOlSW.js → html-to-image-CGVgroef.js} +2 -2
- package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
- package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
- package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
- package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
- package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
- package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
- package/dist/main.js +72 -69
- package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
- package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
- package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
- package/dist/{number-overlay-editor-CHWg5gGO.js → number-overlay-editor-DB3HJDI1.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
- package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
- package/dist/{process-output-zDX4jbhd.js → process-output-CGfg-JmZ.js} +2 -2
- package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
- package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
- package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
- package/dist/{reveal-component-BujcZI2B.js → reveal-component-CfTzIkA2.js} +3 -3
- package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
- package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
- package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
- package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
- package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
- package/dist/{vega-component-CNf5gcrm.js → vega-component-tFOzgarw.js} +4 -4
- package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
- package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
- package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
- package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
- package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
- package/package.json +1 -2
- package/src/__mocks__/common.ts +3 -3
- package/src/__tests__/CellStatus.test.tsx +1 -1
- package/src/__tests__/setup.ts +7 -7
- package/src/components/app-config/ai-config.tsx +2 -0
- package/src/components/app-config/optional-features.tsx +1 -1
- package/src/components/chat/chat-panel.tsx +19 -8
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
- package/src/components/data-table/charts/charts.tsx +26 -13
- package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
- package/src/components/dependency-graph/elements.ts +2 -2
- package/src/components/editor/__tests__/package-alert.test.tsx +140 -0
- package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +107 -0
- package/src/components/editor/actions/pair-with-agent.tsx +119 -0
- package/src/components/editor/actions/useNotebookActions.tsx +2 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +2 -0
- package/src/components/editor/ai/staged-cell-submission.ts +2 -2
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
- package/src/components/editor/connections/database/as-code.ts +44 -44
- package/src/components/editor/connections/storage/as-code.ts +3 -3
- package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
- package/src/components/editor/navigation/clipboard.ts +2 -2
- package/src/components/editor/notebook-cell.tsx +2 -2
- package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
- package/src/components/editor/output/VideoOutput.tsx +1 -1
- package/src/components/editor/output/ansi-reduce.ts +21 -17
- package/src/components/editor/output/console/ConsoleOutput.tsx +3 -3
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +59 -0
- package/src/components/editor/output/console/text-rendering.tsx +3 -1
- package/src/components/editor/package-alert.tsx +20 -7
- package/src/components/home/components.tsx +1 -0
- package/src/components/pages/run-page.tsx +1 -0
- package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
- package/src/components/slides/__tests__/minimap.test.ts +12 -12
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
- package/src/components/static-html/share-modal.tsx +2 -1
- package/src/components/static-html/static-banner.tsx +2 -2
- package/src/components/ui/links.tsx +6 -1
- package/src/components/ui/typography.tsx +16 -8
- package/src/core/ai/context/__tests__/registry.test.ts +31 -28
- package/src/core/ai/context/providers/cell-output.ts +8 -8
- package/src/core/ai/context/providers/datasource.ts +10 -7
- package/src/core/ai/context/providers/error.ts +7 -7
- package/src/core/ai/context/providers/file.ts +8 -8
- package/src/core/ai/context/providers/tables.ts +7 -7
- package/src/core/ai/context/providers/variable.ts +7 -7
- package/src/core/ai/context/registry.ts +18 -18
- package/src/core/ai/ids/ids.ts +5 -5
- package/src/core/ai/model-registry.ts +12 -9
- package/src/core/ai/staged-cells.ts +6 -6
- package/src/core/ai/tools/base.ts +6 -6
- package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
- package/src/core/ai/tools/registry.ts +4 -4
- package/src/core/ai/tools/run-cells-tool.ts +7 -7
- package/src/core/ai/tools/sample-tool.ts +6 -6
- package/src/core/cells/__tests__/cells.test.ts +27 -0
- package/src/core/cells/cells.ts +2 -1
- package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
- package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
- package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
- package/src/core/codemirror/code-lens/extension.ts +13 -13
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
- package/src/core/codemirror/copilot/language-server.ts +13 -13
- package/src/core/codemirror/copilot/transport.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
- package/src/core/codemirror/go-to-definition/underline.ts +3 -3
- package/src/core/codemirror/keymaps/vim.ts +3 -3
- package/src/core/codemirror/language/languages/markdown.ts +8 -8
- package/src/core/codemirror/language/languages/python.ts +7 -7
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
- package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
- package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
- package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
- package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
- package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
- package/src/core/codemirror/reactive-references/extension.ts +3 -3
- package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
- package/src/core/codemirror/rtc/loro/sync.ts +5 -5
- package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
- package/src/core/dom/ui-element.ts +5 -5
- package/src/core/dom/uiregistry.ts +10 -10
- package/src/core/hotkeys/hotkeys.ts +9 -9
- package/src/core/islands/__tests__/bridge.test.ts +4 -4
- package/src/core/islands/__tests__/test-utils.tsx +4 -4
- package/src/core/islands/bridge.ts +85 -82
- package/src/core/islands/components/web-components.tsx +7 -7
- package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
- package/src/core/islands/worker/controller.ts +6 -3
- package/src/core/islands/worker-factory.ts +2 -2
- package/src/core/kernel/RuntimeState.ts +4 -4
- package/src/core/lsp/__tests__/transport.test.ts +19 -19
- package/src/core/lsp/transport.ts +5 -5
- package/src/core/network/CachingRequestRegistry.ts +2 -2
- package/src/core/network/DeferredRequestRegistry.ts +4 -4
- package/src/core/runtime/runtime.ts +25 -20
- package/src/core/static/virtual-file-tracker.ts +5 -5
- package/src/core/wasm/__tests__/bridge.test.ts +2 -2
- package/src/core/wasm/bridge.ts +130 -126
- package/src/core/wasm/router.ts +5 -5
- package/src/core/wasm/store.ts +4 -4
- package/src/core/wasm/worker/bootstrap.ts +8 -5
- package/src/core/wasm/worker/message-buffer.ts +3 -3
- package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
- package/src/core/websocket/transports/basic.ts +15 -8
- package/src/core/websocket/transports/sse.ts +7 -7
- package/src/core/websocket/transports/transport.ts +3 -3
- package/src/core/websocket/transports/ws.ts +9 -7
- package/src/css/globals.css +18 -21
- package/src/css/katex.min.css +260 -241
- package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
- package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
- package/src/plugins/core/registerReactComponent.tsx +5 -5
- package/src/plugins/core/sidebar-element.tsx +2 -2
- package/src/plugins/impl/ButtonPlugin.tsx +3 -3
- package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
- package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
- package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
- package/src/plugins/impl/DateRangePlugin.tsx +3 -3
- package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
- package/src/plugins/impl/DictPlugin.tsx +3 -3
- package/src/plugins/impl/DropdownPlugin.tsx +3 -3
- package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
- package/src/plugins/impl/MatrixPlugin.tsx +4 -4
- package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
- package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
- package/src/plugins/impl/NumberPlugin.tsx +3 -3
- package/src/plugins/impl/RadioPlugin.tsx +9 -5
- package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
- package/src/plugins/impl/RefreshPlugin.tsx +3 -3
- package/src/plugins/impl/SliderPlugin.tsx +3 -3
- package/src/plugins/impl/SwitchPlugin.tsx +3 -3
- package/src/plugins/impl/TabsPlugin.tsx +3 -3
- package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
- package/src/plugins/impl/TextInputPlugin.tsx +3 -3
- package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
- package/src/plugins/impl/anywidget/model.ts +10 -10
- package/src/plugins/impl/anywidget/registry.ts +12 -9
- package/src/plugins/impl/anywidget/runtime.ts +11 -9
- package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
- package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
- package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
- package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
- package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
- package/src/plugins/impl/panel/utils.ts +5 -5
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
- package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
- package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
- package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
- package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
- package/src/plugins/impl/vega/loader.ts +23 -1
- package/src/plugins/impl/vega/utils.ts +5 -4
- package/src/plugins/layout/AccordionPlugin.tsx +3 -3
- package/src/plugins/layout/CalloutPlugin.tsx +3 -3
- package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
- package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
- package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
- package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
- package/src/plugins/layout/OutlinePlugin.tsx +3 -3
- package/src/plugins/layout/ProgressPlugin.tsx +3 -3
- package/src/plugins/layout/RoutesPlugin.tsx +6 -8
- package/src/plugins/layout/StatPlugin.tsx +3 -3
- package/src/plugins/layout/TexPlugin.tsx +3 -3
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
- package/src/utils/Deferred.ts +6 -6
- package/src/utils/async-capture-tracker.ts +10 -7
- package/src/utils/errors.ts +5 -5
- package/src/utils/id-tree.tsx +83 -80
- package/src/utils/lru.ts +1 -1
- package/src/utils/multi-map.ts +14 -12
- package/src/utils/paths.ts +6 -6
- package/src/utils/pluralize.ts +3 -3
- package/src/utils/progress.ts +6 -6
- package/src/utils/python-poet/poet.ts +14 -14
- package/src/utils/routes.ts +4 -2
- package/src/utils/semaphore.ts +6 -6
- package/src/utils/storage/storage.ts +6 -6
- package/src/utils/storage/typed.ts +16 -12
- package/src/utils/time.ts +9 -9
- package/src/utils/timed-cache.ts +4 -4
- package/src/utils/tracer.ts +9 -6
- package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
- package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
- package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
- package/dist/katex-DFBiSucW.js +0 -21840
- package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
- package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
|
@@ -208,7 +208,7 @@ export class RemoteCursorMarker implements LayerMarker {
|
|
|
208
208
|
private name: string;
|
|
209
209
|
private colorClassName: string;
|
|
210
210
|
|
|
211
|
-
constructor(
|
|
211
|
+
public constructor(
|
|
212
212
|
left: number,
|
|
213
213
|
top: number,
|
|
214
214
|
height: number,
|
|
@@ -222,18 +222,18 @@ export class RemoteCursorMarker implements LayerMarker {
|
|
|
222
222
|
this.colorClassName = colorClassName;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
draw(): HTMLElement {
|
|
225
|
+
public draw(): HTMLElement {
|
|
226
226
|
const elt = document.createElement("div");
|
|
227
227
|
this.adjust(elt);
|
|
228
228
|
return elt;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
update(elt: HTMLElement): boolean {
|
|
231
|
+
public update(elt: HTMLElement): boolean {
|
|
232
232
|
this.adjust(elt);
|
|
233
233
|
return true;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
adjust(element: HTMLElement) {
|
|
236
|
+
public adjust(element: HTMLElement) {
|
|
237
237
|
element.style.left = `${this.left}px`;
|
|
238
238
|
element.style.top = `${this.top}px`;
|
|
239
239
|
element.style.height = `${this.height}px`;
|
|
@@ -241,7 +241,7 @@ export class RemoteCursorMarker implements LayerMarker {
|
|
|
241
241
|
element.style.setProperty("--rtc-name", `"${this.name}"`);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
eq(other: RemoteCursorMarker): boolean {
|
|
244
|
+
public eq(other: RemoteCursorMarker): boolean {
|
|
245
245
|
return (
|
|
246
246
|
this.left === other.left &&
|
|
247
247
|
this.top === other.top &&
|
|
@@ -364,7 +364,7 @@ export interface CursorPosition {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
export class AwarenessPlugin implements PluginValue {
|
|
367
|
-
sub: Subscription;
|
|
367
|
+
public sub: Subscription;
|
|
368
368
|
public view: EditorView;
|
|
369
369
|
public doc: LoroDoc;
|
|
370
370
|
public user: UserState;
|
|
@@ -373,7 +373,7 @@ export class AwarenessPlugin implements PluginValue {
|
|
|
373
373
|
private scopeId: ScopeId;
|
|
374
374
|
private getUserId?: () => Uid;
|
|
375
375
|
|
|
376
|
-
constructor(
|
|
376
|
+
public constructor(
|
|
377
377
|
view: EditorView,
|
|
378
378
|
doc: LoroDoc,
|
|
379
379
|
user: UserState,
|
|
@@ -421,7 +421,7 @@ export class AwarenessPlugin implements PluginValue {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
update(update: ViewUpdate): void {
|
|
424
|
+
public update(update: ViewUpdate): void {
|
|
425
425
|
if (!update.selectionSet && !update.focusChanged && !update.docChanged) {
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
@@ -450,7 +450,7 @@ export class AwarenessPlugin implements PluginValue {
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
destroy(): void {
|
|
453
|
+
public destroy(): void {
|
|
454
454
|
this.sub?.();
|
|
455
455
|
this.awareness.setLocalState({
|
|
456
456
|
type: "delete",
|
|
@@ -460,13 +460,13 @@ export class AwarenessPlugin implements PluginValue {
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
export class RemoteAwarenessPlugin implements PluginValue {
|
|
463
|
-
_awarenessListener?: AwarenessListener;
|
|
463
|
+
public _awarenessListener?: AwarenessListener;
|
|
464
464
|
public view: EditorView;
|
|
465
465
|
public doc: LoroDoc;
|
|
466
466
|
public awareness: Awareness<AwarenessState>;
|
|
467
467
|
private scopeId: ScopeId;
|
|
468
468
|
|
|
469
|
-
constructor(
|
|
469
|
+
public constructor(
|
|
470
470
|
view: EditorView,
|
|
471
471
|
doc: LoroDoc,
|
|
472
472
|
awareness: Awareness<AwarenessState>,
|
|
@@ -493,7 +493,7 @@ export class RemoteAwarenessPlugin implements PluginValue {
|
|
|
493
493
|
this.awareness.addListener(listener);
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
destroy(): void {
|
|
496
|
+
public destroy(): void {
|
|
497
497
|
if (this._awarenessListener) {
|
|
498
498
|
this.awareness.removeListener(this._awarenessListener);
|
|
499
499
|
}
|
|
@@ -38,14 +38,14 @@ export const loroSyncPlugin = (
|
|
|
38
38
|
export const loroSyncAnnotation = Annotation.define();
|
|
39
39
|
|
|
40
40
|
export class LoroSyncPluginValue implements PluginValue {
|
|
41
|
-
sub?: Subscription;
|
|
41
|
+
public sub?: Subscription;
|
|
42
42
|
private isInitDispatch = false;
|
|
43
43
|
private view: EditorView;
|
|
44
44
|
private doc: LoroDoc;
|
|
45
45
|
private docPath: string[];
|
|
46
46
|
private getTextFromDoc: (doc: LoroDoc) => LoroText;
|
|
47
47
|
|
|
48
|
-
constructor(
|
|
48
|
+
public constructor(
|
|
49
49
|
view: EditorView,
|
|
50
50
|
doc: LoroDoc,
|
|
51
51
|
docPath: string[],
|
|
@@ -77,7 +77,7 @@ export class LoroSyncPluginValue implements PluginValue {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
onRemoteUpdate = (e: LoroEventBatch) => {
|
|
80
|
+
public onRemoteUpdate = (e: LoroEventBatch) => {
|
|
81
81
|
if (e.by === "local") {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -133,7 +133,7 @@ export class LoroSyncPluginValue implements PluginValue {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
update(update: ViewUpdate): void {
|
|
136
|
+
public update(update: ViewUpdate): void {
|
|
137
137
|
if (this.isInitDispatch) {
|
|
138
138
|
this.isInitDispatch = false;
|
|
139
139
|
return;
|
|
@@ -161,7 +161,7 @@ export class LoroSyncPluginValue implements PluginValue {
|
|
|
161
161
|
this.doc.commit();
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
destroy(): void {
|
|
164
|
+
public destroy(): void {
|
|
165
165
|
this.sub?.();
|
|
166
166
|
this.sub = undefined;
|
|
167
167
|
}
|
|
@@ -23,7 +23,7 @@ export class VimCursorVisibilityPlugin implements PluginValue {
|
|
|
23
23
|
private view: EditorView;
|
|
24
24
|
private abortController = new AbortController();
|
|
25
25
|
|
|
26
|
-
constructor(options: VimCursorVisibilityPluginOptions) {
|
|
26
|
+
public constructor(options: VimCursorVisibilityPluginOptions) {
|
|
27
27
|
this.view = options.view;
|
|
28
28
|
this.view.dom.addEventListener(
|
|
29
29
|
"focus",
|
|
@@ -38,7 +38,7 @@ export class VimCursorVisibilityPlugin implements PluginValue {
|
|
|
38
38
|
this.update();
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
update() {
|
|
41
|
+
public update() {
|
|
42
42
|
const vimCursorLayer = this.view.dom.querySelector(".cm-vimCursorLayer");
|
|
43
43
|
if (vimCursorLayer instanceof HTMLElement) {
|
|
44
44
|
// Hide all vim cursors when in command mode
|
|
@@ -52,7 +52,7 @@ export class VimCursorVisibilityPlugin implements PluginValue {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
destroy(): void {
|
|
55
|
+
public destroy(): void {
|
|
56
56
|
this.abortController.abort();
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -137,7 +137,7 @@ export function initializeUIElement() {
|
|
|
137
137
|
this.initialized = true;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
connectedCallback() {
|
|
140
|
+
public connectedCallback() {
|
|
141
141
|
this.init();
|
|
142
142
|
|
|
143
143
|
if (this.initialized) {
|
|
@@ -157,7 +157,7 @@ export function initializeUIElement() {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
disconnectedCallback() {
|
|
160
|
+
public disconnectedCallback() {
|
|
161
161
|
if (this.initialized) {
|
|
162
162
|
// Unregister everything
|
|
163
163
|
document.removeEventListener(
|
|
@@ -175,7 +175,7 @@ export function initializeUIElement() {
|
|
|
175
175
|
/**
|
|
176
176
|
* Reset the value of the child element to its initial value.
|
|
177
177
|
*/
|
|
178
|
-
reset() {
|
|
178
|
+
public reset() {
|
|
179
179
|
const child = this.firstElementChild;
|
|
180
180
|
if (isCustomMarimoElement(child)) {
|
|
181
181
|
child.reset();
|
|
@@ -189,11 +189,11 @@ export function initializeUIElement() {
|
|
|
189
189
|
// We look for changes to the random-id attribute, which is effectively
|
|
190
190
|
// used like a React key. If the random-id changes, we need to unmount and
|
|
191
191
|
// remount its child.
|
|
192
|
-
static get observedAttributes() {
|
|
192
|
+
public static get observedAttributes() {
|
|
193
193
|
return [RANDOM_ID_ATTR];
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
attributeChangedCallback(
|
|
196
|
+
public attributeChangedCallback(
|
|
197
197
|
name: string,
|
|
198
198
|
oldValue: string | null,
|
|
199
199
|
newValue: string | null,
|
|
@@ -45,12 +45,12 @@ interface UIElementEntry {
|
|
|
45
45
|
*/
|
|
46
46
|
export class UIElementRegistry {
|
|
47
47
|
// maps UIElement objectIds to entries.
|
|
48
|
-
entries: Map<UIElementId, UIElementEntry>;
|
|
48
|
+
public entries: Map<UIElementId, UIElementEntry>;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Shared instance of UIElementRegistry since this must be a singleton.
|
|
52
52
|
*/
|
|
53
|
-
static get INSTANCE(): UIElementRegistry {
|
|
53
|
+
public static get INSTANCE(): UIElementRegistry {
|
|
54
54
|
const KEY = "_marimo_private_UIElementRegistry";
|
|
55
55
|
if (!window[KEY]) {
|
|
56
56
|
window[KEY] = new UIElementRegistry();
|
|
@@ -62,11 +62,11 @@ export class UIElementRegistry {
|
|
|
62
62
|
this.entries = new Map();
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
has(objectId: UIElementId): boolean {
|
|
65
|
+
public has(objectId: UIElementId): boolean {
|
|
66
66
|
return this.entries.has(objectId);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
set(objectId: UIElementId, value: ValueType): void {
|
|
69
|
+
public set(objectId: UIElementId, value: ValueType): void {
|
|
70
70
|
if (this.entries.has(objectId)) {
|
|
71
71
|
Logger.debug(
|
|
72
72
|
"UIElementRegistry overwriting entry for objectId.",
|
|
@@ -86,7 +86,7 @@ export class UIElementRegistry {
|
|
|
86
86
|
* @param objectId - id of the UIElement
|
|
87
87
|
* @param instance - the HTMLElement that the UIElement wraps
|
|
88
88
|
*/
|
|
89
|
-
registerInstance(objectId: UIElementId, instance: HTMLElement) {
|
|
89
|
+
public registerInstance(objectId: UIElementId, instance: HTMLElement) {
|
|
90
90
|
const entry = this.entries.get(objectId);
|
|
91
91
|
if (entry === undefined) {
|
|
92
92
|
this.entries.set(objectId, {
|
|
@@ -109,7 +109,7 @@ export class UIElementRegistry {
|
|
|
109
109
|
* @param instance - the HTMLElement to remove
|
|
110
110
|
*
|
|
111
111
|
*/
|
|
112
|
-
removeInstance(objectId: UIElementId, instance: HTMLElement) {
|
|
112
|
+
public removeInstance(objectId: UIElementId, instance: HTMLElement) {
|
|
113
113
|
const entry = this.entries.get(objectId);
|
|
114
114
|
// The UIElement can be removed from the registry before all
|
|
115
115
|
// instances are removed: UIElement removal is triggered
|
|
@@ -129,7 +129,7 @@ export class UIElementRegistry {
|
|
|
129
129
|
*
|
|
130
130
|
* @param cellId - stringified cellId
|
|
131
131
|
*/
|
|
132
|
-
removeElementsByCell(cellId: CellId) {
|
|
132
|
+
public removeElementsByCell(cellId: CellId) {
|
|
133
133
|
const objectIds = [...this.entries.keys()].filter((objectId) =>
|
|
134
134
|
objectId.startsWith(`${cellId}-`),
|
|
135
135
|
);
|
|
@@ -145,12 +145,12 @@ export class UIElementRegistry {
|
|
|
145
145
|
* @param objectId - id of the UIElement
|
|
146
146
|
* @returns the value for `objectId`, or `undefined` if the object was not found.
|
|
147
147
|
*/
|
|
148
|
-
lookupValue(objectId: UIElementId): ValueType {
|
|
148
|
+
public lookupValue(objectId: UIElementId): ValueType {
|
|
149
149
|
const entry = this.entries.get(objectId);
|
|
150
150
|
return entry === undefined ? undefined : entry.value;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
broadcastMessage(
|
|
153
|
+
public broadcastMessage(
|
|
154
154
|
objectId: UIElementId,
|
|
155
155
|
message: unknown,
|
|
156
156
|
buffers: readonly DataView[],
|
|
@@ -202,7 +202,7 @@ export class UIElementRegistry {
|
|
|
202
202
|
* @param objectId - id of the UIElement
|
|
203
203
|
* @param value - value to broadcast
|
|
204
204
|
*/
|
|
205
|
-
broadcastValueUpdate(
|
|
205
|
+
public broadcastValueUpdate(
|
|
206
206
|
initiator: HTMLElement,
|
|
207
207
|
objectId: UIElementId,
|
|
208
208
|
value: ValueType,
|
|
@@ -510,13 +510,13 @@ export class HotkeyProvider implements IHotkeyProvider {
|
|
|
510
510
|
/**
|
|
511
511
|
* @param platform - See {@link HotkeyProviderOptions.platform}.
|
|
512
512
|
*/
|
|
513
|
-
static create(platform?: Platform): HotkeyProvider {
|
|
513
|
+
public static create(platform?: Platform): HotkeyProvider {
|
|
514
514
|
return new HotkeyProvider(DEFAULT_HOT_KEY, { platform });
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
private hotkeys: Record<HotkeyAction, Hotkey>;
|
|
518
518
|
|
|
519
|
-
constructor(
|
|
519
|
+
public constructor(
|
|
520
520
|
hotkeys: Record<HotkeyAction, Hotkey>,
|
|
521
521
|
options: HotkeyProviderOptions = {},
|
|
522
522
|
) {
|
|
@@ -525,11 +525,11 @@ export class HotkeyProvider implements IHotkeyProvider {
|
|
|
525
525
|
this.mod = this.platform === "mac" ? "Cmd" : "Ctrl";
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
iterate(): HotkeyAction[] {
|
|
528
|
+
public iterate(): HotkeyAction[] {
|
|
529
529
|
return Objects.keys(this.hotkeys);
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
getHotkey(action: HotkeyAction): ResolvedHotkey {
|
|
532
|
+
public getHotkey(action: HotkeyAction): ResolvedHotkey {
|
|
533
533
|
const { name, key, additionalKeywords } = this.hotkeys[action];
|
|
534
534
|
if (typeof key === "string") {
|
|
535
535
|
return {
|
|
@@ -553,15 +553,15 @@ export class HotkeyProvider implements IHotkeyProvider {
|
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
-
getHotkeyDisplay(action: HotkeyAction): string {
|
|
556
|
+
public getHotkeyDisplay(action: HotkeyAction): string {
|
|
557
557
|
return this.hotkeys[action].name;
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
isEditable(action: HotkeyAction): boolean {
|
|
560
|
+
public isEditable(action: HotkeyAction): boolean {
|
|
561
561
|
return this.hotkeys[action].editable !== false;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
getHotkeyGroups(): Record<HotkeyGroup, HotkeyAction[]> {
|
|
564
|
+
public getHotkeyGroups(): Record<HotkeyGroup, HotkeyAction[]> {
|
|
565
565
|
return Objects.groupBy(
|
|
566
566
|
Objects.entries(this.hotkeys),
|
|
567
567
|
([, hotkey]) => hotkey.group,
|
|
@@ -573,7 +573,7 @@ export class HotkeyProvider implements IHotkeyProvider {
|
|
|
573
573
|
export class OverridingHotkeyProvider extends HotkeyProvider {
|
|
574
574
|
private readonly overrides: Partial<Record<HotkeyAction, string | undefined>>;
|
|
575
575
|
|
|
576
|
-
constructor(
|
|
576
|
+
public constructor(
|
|
577
577
|
overrides: Partial<Record<HotkeyAction, string | undefined>>,
|
|
578
578
|
options: HotkeyProviderOptions = {},
|
|
579
579
|
) {
|
|
@@ -581,7 +581,7 @@ export class OverridingHotkeyProvider extends HotkeyProvider {
|
|
|
581
581
|
this.overrides = overrides;
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
-
override getHotkey(action: HotkeyAction): ResolvedHotkey {
|
|
584
|
+
public override getHotkey(action: HotkeyAction): ResolvedHotkey {
|
|
585
585
|
const base = super.getHotkey(action);
|
|
586
586
|
const override = this.overrides[action];
|
|
587
587
|
return {
|
|
@@ -38,12 +38,12 @@ vi.stubGlobal(
|
|
|
38
38
|
|
|
39
39
|
// Create a mock URL class that works as a constructor
|
|
40
40
|
class MockURL {
|
|
41
|
-
href: string;
|
|
42
|
-
constructor(url: string, base?: string | URL) {
|
|
41
|
+
public href: string;
|
|
42
|
+
public constructor(url: string, base?: string | URL) {
|
|
43
43
|
this.href = base ? `${base}/${url}` : url;
|
|
44
44
|
}
|
|
45
|
-
static createObjectURL = vi.fn(() => "blob:mock-url");
|
|
46
|
-
static revokeObjectURL = vi.fn();
|
|
45
|
+
public static createObjectURL = vi.fn(() => "blob:mock-url");
|
|
46
|
+
public static revokeObjectURL = vi.fn();
|
|
47
47
|
}
|
|
48
48
|
vi.stubGlobal("URL", MockURL);
|
|
49
49
|
|
|
@@ -236,11 +236,11 @@ export class MockWorkerFactory implements WorkerFactory {
|
|
|
236
236
|
public workers: Worker[] = [];
|
|
237
237
|
private readonly mockWorker?: Worker;
|
|
238
238
|
|
|
239
|
-
constructor(mockWorker?: Worker) {
|
|
239
|
+
public constructor(mockWorker?: Worker) {
|
|
240
240
|
this.mockWorker = mockWorker;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
create(): Worker {
|
|
243
|
+
public create(): Worker {
|
|
244
244
|
const worker = this.mockWorker || this.createMockWorker();
|
|
245
245
|
this.workers.push(worker);
|
|
246
246
|
return worker;
|
|
@@ -259,11 +259,11 @@ export class MockWorkerFactory implements WorkerFactory {
|
|
|
259
259
|
} as unknown as Worker;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
getCreatedWorkers(): Worker[] {
|
|
262
|
+
public getCreatedWorkers(): Worker[] {
|
|
263
263
|
return this.workers;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
terminateAll(): void {
|
|
266
|
+
public terminateAll(): void {
|
|
267
267
|
for (const worker of this.workers) {
|
|
268
268
|
worker.terminate();
|
|
269
269
|
}
|
|
@@ -72,7 +72,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
72
72
|
|
|
73
73
|
public initialized = new Deferred<void>();
|
|
74
74
|
|
|
75
|
-
constructor(config: IslandsBridgeConfig = {}) {
|
|
75
|
+
public constructor(config: IslandsBridgeConfig = {}) {
|
|
76
76
|
this.store = config.store || defaultStore;
|
|
77
77
|
this.root = config.root || document;
|
|
78
78
|
|
|
@@ -120,7 +120,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
async initializeApps(): Promise<void> {
|
|
123
|
+
public async initializeApps(): Promise<void> {
|
|
124
124
|
await this.enqueueAppTransition(async () => {
|
|
125
125
|
await this.workerReady.promise;
|
|
126
126
|
await this.startApps();
|
|
@@ -211,7 +211,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
async stopSession(appId?: string): Promise<void> {
|
|
214
|
+
public async stopSession(appId?: string): Promise<void> {
|
|
215
215
|
await this.enqueueAppTransition(async () => {
|
|
216
216
|
const session = this.session;
|
|
217
217
|
if (session?.code === undefined || (appId && session.appId !== appId)) {
|
|
@@ -238,7 +238,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
238
238
|
/**
|
|
239
239
|
* Starts a new Python session for an app
|
|
240
240
|
*/
|
|
241
|
-
async startSession(opts: {
|
|
241
|
+
public async startSession(opts: {
|
|
242
242
|
code: string;
|
|
243
243
|
appId: string;
|
|
244
244
|
sessionGeneration: number;
|
|
@@ -249,7 +249,9 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
249
249
|
/**
|
|
250
250
|
* Sets up a consumer for kernel messages
|
|
251
251
|
*/
|
|
252
|
-
consumeMessages(
|
|
252
|
+
public consumeMessages(
|
|
253
|
+
consumer: (message: IslandsKernelMessage) => void,
|
|
254
|
+
): void {
|
|
253
255
|
this.messageConsumer = consumer;
|
|
254
256
|
this.rpc.proxy.send.consumerReady({});
|
|
255
257
|
}
|
|
@@ -258,7 +260,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
258
260
|
// RunRequests Implementation
|
|
259
261
|
// ============================================================================
|
|
260
262
|
|
|
261
|
-
sendComponentValues: RunRequests["sendComponentValues"] = async (
|
|
263
|
+
public sendComponentValues: RunRequests["sendComponentValues"] = async (
|
|
262
264
|
request,
|
|
263
265
|
): Promise<null> => {
|
|
264
266
|
await this.putControlRequest({
|
|
@@ -269,11 +271,12 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
269
271
|
return null;
|
|
270
272
|
};
|
|
271
273
|
|
|
272
|
-
sendInstantiate: RunRequests["sendInstantiate"] =
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
public sendInstantiate: RunRequests["sendInstantiate"] =
|
|
275
|
+
async (): Promise<null> => {
|
|
276
|
+
return null;
|
|
277
|
+
};
|
|
275
278
|
|
|
276
|
-
sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (
|
|
279
|
+
public sendFunctionRequest: RunRequests["sendFunctionRequest"] = async (
|
|
277
280
|
request,
|
|
278
281
|
): Promise<null> => {
|
|
279
282
|
await this.putControlRequest({
|
|
@@ -283,7 +286,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
283
286
|
return null;
|
|
284
287
|
};
|
|
285
288
|
|
|
286
|
-
sendModelValue: RunRequests["sendModelValue"] = async (request) => {
|
|
289
|
+
public sendModelValue: RunRequests["sendModelValue"] = async (request) => {
|
|
287
290
|
await this.putControlRequest({
|
|
288
291
|
type: "model",
|
|
289
292
|
...request,
|
|
@@ -295,7 +298,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
295
298
|
// EditRequests Implementation
|
|
296
299
|
// ============================================================================
|
|
297
300
|
|
|
298
|
-
sendRun: EditRequests["sendRun"] = async (request): Promise<null> => {
|
|
301
|
+
public sendRun: EditRequests["sendRun"] = async (request): Promise<null> => {
|
|
299
302
|
const session = await this.getActiveSession();
|
|
300
303
|
await this.rpc.proxy.request.loadPackages({
|
|
301
304
|
appId: session.appId,
|
|
@@ -316,75 +319,75 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
316
319
|
// Not Implemented (Read-Only Mode)
|
|
317
320
|
// ============================================================================
|
|
318
321
|
|
|
319
|
-
getUsageStats = throwNotImplemented;
|
|
320
|
-
getEnvironmentInfo = throwNotImplemented;
|
|
321
|
-
sendRename = throwNotImplemented;
|
|
322
|
-
sendSave = throwNotImplemented;
|
|
323
|
-
sendCopy = throwNotImplemented;
|
|
324
|
-
sendRunScratchpad = throwNotImplemented;
|
|
325
|
-
sendStdin = throwNotImplemented;
|
|
326
|
-
sendInterrupt = throwNotImplemented;
|
|
327
|
-
sendShutdown = throwNotImplemented;
|
|
328
|
-
sendFormat = throwNotImplemented;
|
|
329
|
-
sendDeleteCell = throwNotImplemented;
|
|
330
|
-
sendInstallMissingPackages = throwNotImplemented;
|
|
331
|
-
sendCodeCompletionRequest = throwNotImplemented;
|
|
332
|
-
saveUserConfig = throwNotImplemented;
|
|
333
|
-
saveAppConfig = throwNotImplemented;
|
|
334
|
-
saveCellConfig = throwNotImplemented;
|
|
335
|
-
sendRestart = throwNotImplemented;
|
|
336
|
-
sendDocumentTransaction = throwNotImplemented;
|
|
337
|
-
readCode = throwNotImplemented;
|
|
338
|
-
readSnippets = throwNotImplemented;
|
|
339
|
-
previewDatasetColumn = throwNotImplemented;
|
|
340
|
-
previewSQLTable = throwNotImplemented;
|
|
341
|
-
previewSQLTableList = throwNotImplemented;
|
|
342
|
-
previewSQLSchemaList = throwNotImplemented;
|
|
343
|
-
previewDataSourceConnection = throwNotImplemented;
|
|
344
|
-
discoverDataSources = throwNotImplemented;
|
|
345
|
-
validateSQL = throwNotImplemented;
|
|
346
|
-
openFile = throwNotImplemented;
|
|
347
|
-
getFileRoots = throwNotImplemented;
|
|
348
|
-
sendListFiles = throwNotImplemented;
|
|
349
|
-
sendSearchFiles = throwNotImplemented;
|
|
350
|
-
sendPdb = throwNotImplemented;
|
|
351
|
-
sendSetBreakpoints = throwNotImplemented;
|
|
352
|
-
sendCreateFileOrFolder = throwNotImplemented;
|
|
353
|
-
sendDeleteFileOrFolder = throwNotImplemented;
|
|
354
|
-
sendCopyFileOrFolder = throwNotImplemented;
|
|
355
|
-
sendRenameFileOrFolder = throwNotImplemented;
|
|
356
|
-
sendUpdateFile = throwNotImplemented;
|
|
357
|
-
sendFileDetails = throwNotImplemented;
|
|
358
|
-
openTutorial = throwNotImplemented;
|
|
359
|
-
getExportAvailability = throwNotImplemented;
|
|
360
|
-
installExportRequirements = throwNotImplemented;
|
|
361
|
-
exportAsHTML = throwNotImplemented;
|
|
362
|
-
exportAsIPYNB = throwNotImplemented;
|
|
363
|
-
exportAsMarkdown = throwNotImplemented;
|
|
364
|
-
exportAsScript = throwNotImplemented;
|
|
365
|
-
exportAsPDF = throwNotImplemented;
|
|
366
|
-
autoExportAsHTML = throwNotImplemented;
|
|
367
|
-
autoExportAsMarkdown = throwNotImplemented;
|
|
368
|
-
autoExportAsIPYNB = throwNotImplemented;
|
|
369
|
-
updateCellOutputs = throwNotImplemented;
|
|
370
|
-
addPackage = throwNotImplemented;
|
|
371
|
-
removePackage = throwNotImplemented;
|
|
372
|
-
getPackageList = throwNotImplemented;
|
|
373
|
-
getSandbox = throwNotImplemented;
|
|
374
|
-
updateManifest = throwNotImplemented;
|
|
375
|
-
syncSandbox = throwNotImplemented;
|
|
376
|
-
getDependencyTree = throwNotImplemented;
|
|
377
|
-
getRecentFiles = throwNotImplemented;
|
|
378
|
-
getWorkspaceFiles = throwNotImplemented;
|
|
379
|
-
getRunningNotebooks = throwNotImplemented;
|
|
380
|
-
shutdownSession = throwNotImplemented;
|
|
381
|
-
listSecretKeys = throwNotImplemented;
|
|
382
|
-
writeSecret = throwNotImplemented;
|
|
383
|
-
invokeAiTool = throwNotImplemented;
|
|
384
|
-
clearCache = throwNotImplemented;
|
|
385
|
-
getCacheInfo = throwNotImplemented;
|
|
386
|
-
listStorageEntries = throwNotImplemented;
|
|
387
|
-
downloadStorage = throwNotImplemented;
|
|
322
|
+
public getUsageStats = throwNotImplemented;
|
|
323
|
+
public getEnvironmentInfo = throwNotImplemented;
|
|
324
|
+
public sendRename = throwNotImplemented;
|
|
325
|
+
public sendSave = throwNotImplemented;
|
|
326
|
+
public sendCopy = throwNotImplemented;
|
|
327
|
+
public sendRunScratchpad = throwNotImplemented;
|
|
328
|
+
public sendStdin = throwNotImplemented;
|
|
329
|
+
public sendInterrupt = throwNotImplemented;
|
|
330
|
+
public sendShutdown = throwNotImplemented;
|
|
331
|
+
public sendFormat = throwNotImplemented;
|
|
332
|
+
public sendDeleteCell = throwNotImplemented;
|
|
333
|
+
public sendInstallMissingPackages = throwNotImplemented;
|
|
334
|
+
public sendCodeCompletionRequest = throwNotImplemented;
|
|
335
|
+
public saveUserConfig = throwNotImplemented;
|
|
336
|
+
public saveAppConfig = throwNotImplemented;
|
|
337
|
+
public saveCellConfig = throwNotImplemented;
|
|
338
|
+
public sendRestart = throwNotImplemented;
|
|
339
|
+
public sendDocumentTransaction = throwNotImplemented;
|
|
340
|
+
public readCode = throwNotImplemented;
|
|
341
|
+
public readSnippets = throwNotImplemented;
|
|
342
|
+
public previewDatasetColumn = throwNotImplemented;
|
|
343
|
+
public previewSQLTable = throwNotImplemented;
|
|
344
|
+
public previewSQLTableList = throwNotImplemented;
|
|
345
|
+
public previewSQLSchemaList = throwNotImplemented;
|
|
346
|
+
public previewDataSourceConnection = throwNotImplemented;
|
|
347
|
+
public discoverDataSources = throwNotImplemented;
|
|
348
|
+
public validateSQL = throwNotImplemented;
|
|
349
|
+
public openFile = throwNotImplemented;
|
|
350
|
+
public getFileRoots = throwNotImplemented;
|
|
351
|
+
public sendListFiles = throwNotImplemented;
|
|
352
|
+
public sendSearchFiles = throwNotImplemented;
|
|
353
|
+
public sendPdb = throwNotImplemented;
|
|
354
|
+
public sendSetBreakpoints = throwNotImplemented;
|
|
355
|
+
public sendCreateFileOrFolder = throwNotImplemented;
|
|
356
|
+
public sendDeleteFileOrFolder = throwNotImplemented;
|
|
357
|
+
public sendCopyFileOrFolder = throwNotImplemented;
|
|
358
|
+
public sendRenameFileOrFolder = throwNotImplemented;
|
|
359
|
+
public sendUpdateFile = throwNotImplemented;
|
|
360
|
+
public sendFileDetails = throwNotImplemented;
|
|
361
|
+
public openTutorial = throwNotImplemented;
|
|
362
|
+
public getExportAvailability = throwNotImplemented;
|
|
363
|
+
public installExportRequirements = throwNotImplemented;
|
|
364
|
+
public exportAsHTML = throwNotImplemented;
|
|
365
|
+
public exportAsIPYNB = throwNotImplemented;
|
|
366
|
+
public exportAsMarkdown = throwNotImplemented;
|
|
367
|
+
public exportAsScript = throwNotImplemented;
|
|
368
|
+
public exportAsPDF = throwNotImplemented;
|
|
369
|
+
public autoExportAsHTML = throwNotImplemented;
|
|
370
|
+
public autoExportAsMarkdown = throwNotImplemented;
|
|
371
|
+
public autoExportAsIPYNB = throwNotImplemented;
|
|
372
|
+
public updateCellOutputs = throwNotImplemented;
|
|
373
|
+
public addPackage = throwNotImplemented;
|
|
374
|
+
public removePackage = throwNotImplemented;
|
|
375
|
+
public getPackageList = throwNotImplemented;
|
|
376
|
+
public getSandbox = throwNotImplemented;
|
|
377
|
+
public updateManifest = throwNotImplemented;
|
|
378
|
+
public syncSandbox = throwNotImplemented;
|
|
379
|
+
public getDependencyTree = throwNotImplemented;
|
|
380
|
+
public getRecentFiles = throwNotImplemented;
|
|
381
|
+
public getWorkspaceFiles = throwNotImplemented;
|
|
382
|
+
public getRunningNotebooks = throwNotImplemented;
|
|
383
|
+
public shutdownSession = throwNotImplemented;
|
|
384
|
+
public listSecretKeys = throwNotImplemented;
|
|
385
|
+
public writeSecret = throwNotImplemented;
|
|
386
|
+
public invokeAiTool = throwNotImplemented;
|
|
387
|
+
public clearCache = throwNotImplemented;
|
|
388
|
+
public getCacheInfo = throwNotImplemented;
|
|
389
|
+
public listStorageEntries = throwNotImplemented;
|
|
390
|
+
public downloadStorage = throwNotImplemented;
|
|
388
391
|
|
|
389
392
|
// The kernel uses msgspec to parse control requests, which requires a 'type'
|
|
390
393
|
// field for discriminated union deserialization.
|
|
@@ -412,7 +415,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
412
415
|
/**
|
|
413
416
|
* Cleans up resources (for testing)
|
|
414
417
|
*/
|
|
415
|
-
destroy(): void {
|
|
418
|
+
public destroy(): void {
|
|
416
419
|
// Future: terminate worker if we own it
|
|
417
420
|
}
|
|
418
421
|
}
|