@marimo-team/islands 0.23.15-dev7 → 0.23.15-dev72
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-CU4fZJzG.js → ConnectedDataExplorerComponent-CJaUI-S-.js} +85 -84
- package/dist/{ErrorBoundary-DE6tzZf-.js → ErrorBoundary-DXlxsrTF.js} +3 -3
- package/dist/{ImageComparisonComponent-CHrI72em.js → ImageComparisonComponent-C3y7L3eJ.js} +173 -129
- package/dist/{any-language-editor-DN1R-1KZ.js → any-language-editor-P9tjkj4n.js} +21 -21
- package/dist/apl-e1B5LPEL.js +4 -0
- package/dist/{arc-DfkSnvZm.js → arc-CTIpFoOn.js} +2 -2
- package/dist/architecture-7HQA4BMR-DHUrQjL4.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-CT2SuxNw.js → architectureDiagram-VXUJARFQ-DXwkyAaM.js} +19 -19
- package/dist/asciiarmor-B-gwgesP.js +4 -0
- package/dist/asn1-DF2ckRB4.js +4 -0
- package/dist/assets/__vite-browser-external-DltVXDv7.js +1 -0
- package/dist/assets/worker-CDEKsBgX.js +98 -0
- package/dist/{blockDiagram-VD42YOAC-Dy7hlFla.js → blockDiagram-VD42YOAC-CIOjvxeD.js} +12 -12
- package/dist/brainfuck-4G-7_gq_.js +4 -0
- package/dist/{button-BacYv-bE.js → button-BcSml68y.js} +12 -65
- package/dist/{c4Diagram-YG6GDRKO-BXlAmZ8Z.js → c4Diagram-YG6GDRKO-B6dZC_oU.js} +6 -6
- package/dist/{capabilities-D_4LYhSU.js → capabilities-BYLFYTYv.js} +2 -2
- package/dist/{channel-D_PHgcig.js → channel-BN070S0F.js} +1 -1
- package/dist/{chat-ui-DinOvbWu.js → chat-ui-BdSDiVjk.js} +3122 -3116
- package/dist/{check-C9OoNtR4.js → check-Cs-KV5XY.js} +1 -1
- package/dist/{chunk-4BX2VUAB-CzXltWHN.js → chunk-4BX2VUAB-iU5lQTDI.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-D9nGEHV8.js → chunk-4F5CHEZ2-VlodlEGo.js} +1 -1
- package/dist/{chunk-55IACEB6-B-1mjMMC.js → chunk-55IACEB6-7h71GwyW.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-BbqSm5gU.js → chunk-5FQGJX7Z-B9WoXK1R.js} +3 -3
- package/dist/{chunk-ABZYJK2D-Dz0-H2B5.js → chunk-ABZYJK2D-BxBDji1u.js} +3 -3
- package/dist/{chunk-ATLVNIR6-o0Z5MZLd.js → chunk-ATLVNIR6-qFiszptQ.js} +2 -2
- package/dist/{chunk-B2363JML-KEJpLGGP.js → chunk-B2363JML-zL3VngtH.js} +1 -1
- package/dist/{chunk-B4BG7PRW-BL98U9B4.js → chunk-B4BG7PRW-B_z2FEHm.js} +7 -7
- package/dist/{chunk-CVBHYZKI-B_c5YBcW.js → chunk-CVBHYZKI-CwazXVlJ.js} +1 -1
- package/dist/{chunk-DI55MBZ5-Dwkn0LWm.js → chunk-DI55MBZ5-D4Y8yV8B.js} +6 -6
- package/dist/{chunk-EXTU4WIE-9sNjmQrB.js → chunk-EXTU4WIE-BQPBhApE.js} +2 -2
- package/dist/{chunk-FMBD7UC4-Ie8M9q0W.js → chunk-FMBD7UC4-quJmebXa.js} +1 -1
- package/dist/{chunk-FRFDVMJY-DzQqMWrl.js → chunk-FRFDVMJY-BHBqN-vD.js} +1 -1
- package/dist/{chunk-HN2XXSSU-E3n-Ys7Z.js → chunk-HN2XXSSU-Bv0QkeMr.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-C32Y7Epf.js → chunk-JA3XYJ7Z-CY4CRbV5.js} +3 -3
- package/dist/{chunk-JZLCHNYA-C6ftyVMN.js → chunk-JZLCHNYA-DWIR9m5O.js} +6 -6
- package/dist/{chunk-MI3HLSF2-CUYEasXO.js → chunk-MI3HLSF2-HGWI-8Pg.js} +1 -1
- package/dist/{chunk-N4CR4FBY-DUhGZhZs.js → chunk-N4CR4FBY-Bw2HcMNc.js} +7 -7
- package/dist/{chunk-PL6DKKU2-D7km-08O.js → chunk-PL6DKKU2-CAHKc95s.js} +1 -1
- package/dist/{chunk-QN33PNHL-0K6SDYn3.js → chunk-QN33PNHL-DPBNNzpR.js} +2 -2
- package/dist/{chunk-QXUST7PY-DMhsRpYK.js → chunk-QXUST7PY-DtC2t9Mk.js} +10 -10
- package/dist/{chunk-QZHKN3VN-DRjXVwuJ.js → chunk-QZHKN3VN-Dym5BS7y.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-oAe3dEbO.js → chunk-S3R3BYOJ-BdgLc8AM.js} +4 -4
- package/dist/{chunk-SJTYNZTY-BkJrPRFC.js → chunk-SJTYNZTY-DnXoKWpW.js} +1 -1
- package/dist/{chunk-TCCFYFTB-D58KeXnC.js → chunk-TCCFYFTB-DPWJa9zL.js} +1 -1
- package/dist/{chunk-TQ3KTPDO-D_yA_wAb.js → chunk-TQ3KTPDO-CsDx6v37.js} +1 -1
- package/dist/{chunk-TZMSLE5B-yBKS_DQU.js → chunk-TZMSLE5B-BzSHcq-K.js} +3 -3
- package/dist/{chunk-UMXZTB3W-D7uwvNjd.js → chunk-UMXZTB3W-D1uHz8MN.js} +1 -1
- package/dist/classDiagram-2ON5EDUG-BiQPjMNY.js +30 -0
- package/dist/classDiagram-v2-WZHVMYZB-YHdR8fqM.js +30 -0
- package/dist/{clike-DTxNUn7l.js → clike-7lgyEYRk.js} +1 -1
- package/dist/clojure-CUybM11R.js +4 -0
- package/dist/cmake-BPjGcuDL.js +4 -0
- package/dist/cobol-BETk_nb6.js +4 -0
- package/dist/{code-block-37QAKDTI-O6IH6wAi.js → code-block-37QAKDTI-MSxEjskJ.js} +1 -1
- package/dist/{code-visibility-B8b6lh5X.js → code-visibility-i9MrZhpb.js} +1554 -1471
- package/dist/coffeescript-CManZxXL.js +4 -0
- package/dist/commonlisp-DWkn7GW8.js +4 -0
- package/dist/{copy-COam1EG7.js → copy-Cs3yt6Vt.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-kjoZoid4.js → cose-bilkent-S5V4N54A-BYj0aL7z.js} +2 -2
- package/dist/crystal-CCbg5EUH.js +4 -0
- package/dist/css-By8eo-XS.js +4 -0
- package/dist/cypher-DwfHg3nP.js +4 -0
- package/dist/d-Brs1wNbw.js +4 -0
- package/dist/{dagre-6UL2VRFP-J0JKgwOt.js → dagre-6UL2VRFP-DpYjBqQs.js} +11 -11
- package/dist/{data-grid-overlay-editor-C6lxUJp-.js → data-grid-overlay-editor-BWRG2b_o.js} +2 -2
- package/dist/{constants-T20xxyNf.js → debounce-BOD3DbfP.js} +1 -24
- package/dist/{diagram-PSM6KHXK-DYgJuNk9.js → diagram-PSM6KHXK-D4ftnaua.js} +22 -22
- package/dist/{diagram-QEK2KX5R-CKdBR2sb.js → diagram-QEK2KX5R-DVlUOgs1.js} +17 -17
- package/dist/{diagram-S2PKOQOG-Dpi7mo5W.js → diagram-S2PKOQOG-CGh4OMEV.js} +17 -17
- package/dist/diff-DJIRmJ1g.js +4 -0
- package/dist/{dist-DyyjKEYf.js → dist-3NCqaWjt.js} +2 -2
- package/dist/{dist-D-W5ny5a.js → dist-4lVIWUT3.js} +1 -1
- package/dist/dist-5o9uz19x.js +5 -0
- package/dist/{dist-GZXUmt0b.js → dist-B2jmQKKx.js} +2 -2
- package/dist/{dist--2Bqjvs0.js → dist-B96tMAst.js} +2 -2
- package/dist/{dist-BaoDKvdy.js → dist-BCX980mU.js} +2 -2
- package/dist/{dist-DMjWuVs8.js → dist-BIEt-mlF.js} +1 -1
- package/dist/{dist-BR_gyG9L.js → dist-BO5HRiTf.js} +2 -2
- package/dist/{dist-Dv_Y15yk.js → dist-BOMbzyb3.js} +85 -85
- package/dist/{dist-CIYBwstr.js → dist-BP39XM8u.js} +1 -1
- package/dist/{dist-DZo4nSS0.js → dist-BPF0gTRZ.js} +6 -6
- package/dist/{dist-BSAt6RhH.js → dist-BTdrwBWP.js} +22 -22
- package/dist/{dist-BY018Paw.js → dist-BdqCKQ1O.js} +2 -2
- package/dist/dist-BpDH0DEP.js +5 -0
- package/dist/dist-BpXhbQXO.js +8 -0
- package/dist/{dist-CcWX6tmx.js → dist-BpeiYpG2.js} +2 -2
- package/dist/{dist-A2846XWO.js → dist-BwhXBwMd.js} +1 -1
- package/dist/dist-ByadAk_L.js +5 -0
- package/dist/{dist-abid3KgM.js → dist-C18MUWTj.js} +2 -2
- package/dist/{dist-DZORgqKY.js → dist-C2_4pjuS.js} +1 -1
- package/dist/{dist-BzEzfugY.js → dist-CFSb_Frm.js} +1 -1
- package/dist/dist-CK0g7JvP.js +8 -0
- package/dist/{dist-C_Y3oV3C.js → dist-CRmSjkLP.js} +2 -2
- package/dist/{dist-hT4QzYX-.js → dist-CSlJrrAw.js} +86 -81
- package/dist/{dist-Du8WkPuU.js → dist-CV79CsQ0.js} +2 -2
- package/dist/dist-CfzCtiq2.js +5 -0
- package/dist/{dist-CoXAujgg.js → dist-D3bdsa1d.js} +4 -4
- package/dist/dist-D8JtVFrW.js +8 -0
- package/dist/dist-DK2Oocpu.js +6 -0
- package/dist/{dist-LTU8Hdvn.js → dist-DZwp8lro.js} +3 -3
- package/dist/{dist-t9Kf7xqC.js → dist-DaXJPX8F.js} +2 -2
- package/dist/{dist-U4F-tbMs.js → dist-De-GlSAs.js} +246 -184
- package/dist/{dist-M9Vag9Y0.js → dist-DgjbnqTg.js} +125 -125
- package/dist/dist-DnSu977r.js +5 -0
- package/dist/{dist-CxJDU6Bh.js → dist-DviUBLUp.js} +4 -4
- package/dist/{dist-CpxNdDkw.js → dist-DwqBJ014.js} +2 -2
- package/dist/{dist-Bf7SHuNp.js → dist-JGehap7K.js} +5 -5
- package/dist/{dist-Bk75fBZA.js → dist-LpLXa9Lb.js} +2 -2
- package/dist/{dist-Bf9f8MuT.js → dist-SXNmlE8A.js} +1 -1
- package/dist/dist-UmxJm6sW.js +8 -0
- package/dist/dist-aYSBQSyM.js +5 -0
- package/dist/dist-kkZ1Ztlh.js +6 -0
- package/dist/dist-ngPczwNi.js +5 -0
- package/dist/{dist-DgGbNavJ.js → dist-pqIwD8VD.js} +2 -2
- package/dist/dist-wQRyxyTV.js +5 -0
- package/dist/{dist-Dax--nl9.js → dist-w_gWE5Wf.js} +1 -1
- package/dist/{dockerfile-twL37N91.js → dockerfile-B82Pkz_V.js} +1 -1
- package/dist/dtd-Dyiazv4N.js +4 -0
- package/dist/dylan-D8Fcw7NA.js +4 -0
- package/dist/ecl-CjKp8Vii.js +4 -0
- package/dist/eiffel-K9ViOX5r.js +4 -0
- package/dist/elm-B5NVtRco.js +4 -0
- package/dist/{erDiagram-Q2GNP2WA-BU-m41EQ.js → erDiagram-Q2GNP2WA-BcKAHFqF.js} +15 -15
- package/dist/erlang-BnLzgk7R.js +4 -0
- package/dist/{error-banner-DFPfz_Qf.js → error-banner-DR7o3CbX.js} +68 -68
- package/dist/{esm-ga2Bf3O2.js → esm-DKOv6P2M.js} +424 -424
- package/dist/esm-k8PIvuZW.js +1180 -0
- package/dist/{extends-9MVIxxRo.js → extends-Cq2JYHKy.js} +36 -20
- package/dist/{factor-CajWS6mS.js → factor-Bq2mGIHt.js} +1 -1
- package/dist/factor-C7f9Jz5R.js +4 -0
- package/dist/{flowDiagram-NV44I4VS-CRoXKjGq.js → flowDiagram-NV44I4VS-BRhSg-ro.js} +17 -17
- package/dist/{formats-Dzx4J_z1.js → formats-BFhkZJwd.js} +3 -3
- package/dist/forth-rGM8jLao.js +4 -0
- package/dist/fortran-B3acSe0i.js +4 -0
- package/dist/{ganttDiagram-JELNMOA3-7mq5f9cO.js → ganttDiagram-JELNMOA3-CXXCN7LN.js} +10 -10
- package/dist/gas-Bb1Vmv_N.js +4 -0
- package/dist/gherkin-C9Lyidgd.js +4 -0
- package/dist/{gitGraph-G5XIXVHT-DiniR35k.js → gitGraph-G5XIXVHT-BjTx0kww.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-Dfuokq6w.js → gitGraphDiagram-V2S2FVAM-BOlkMSqK.js} +17 -17
- package/dist/{glide-data-editor-CjTu7ukN.js → glide-data-editor--CaN-f27.js} +13 -13
- package/dist/groovy-DQk6XcGH.js +4 -0
- package/dist/haskell-mV0Vw9gv.js +4 -0
- package/dist/haxe-DqxN89zH.js +5 -0
- package/dist/{html-to-image-_wGfk8V-.js → html-to-image-DDENewl2.js} +2649 -2607
- package/dist/idl-ya8W561J.js +4 -0
- package/dist/{info-VBDWY6EO-DVZvGhkQ.js → info-VBDWY6EO-CA67FznA.js} +3 -3
- package/dist/infoDiagram-HS3SLOUP-D3TyKnL_.js +30 -0
- package/dist/{input-DtsN7xm-.js → input-DStQIuqD.js} +51 -51
- package/dist/javascript-CgqgptVu.js +4 -0
- package/dist/{journeyDiagram-XKPGCS4Q-8XYSU1GI.js → journeyDiagram-XKPGCS4Q-DEal0aT1.js} +7 -7
- package/dist/julia-CFQ-HusI.js +4 -0
- package/dist/{kanban-definition-3W4ZIXB7--9pT9z1R.js → kanban-definition-3W4ZIXB7-Dl90wENN.js} +12 -12
- package/dist/{katex-9-9QRhxz.js → katex-C4t-BmrK.js} +1 -1
- package/dist/{label-WfTSU8L4.js → label-DIk0QoFe.js} +2 -2
- package/dist/{line-C5s_12ee.js → line-C43FIPBd.js} +3 -3
- package/dist/{linear-B5-AFRiR.js → linear-H_vsH9ao.js} +4 -4
- package/dist/livescript-D__3TmDo.js +4 -0
- package/dist/{loader-Boph2xIS.js → loader-CTHCI-qe.js} +5 -16
- package/dist/lua-Bytcgj_W.js +4 -0
- package/dist/main.js +2439 -2199
- package/dist/mathematica-DJhvVKvl.js +4 -0
- package/dist/mbox-IGHPCjfR.js +4 -0
- package/dist/{mermaid-4DMBBIKO-Eg3D4FVz.js → mermaid-4DMBBIKO-FXbOziy9.js} +1 -1
- package/dist/{mermaid-BYqXy_NE.js → mermaid-CdSvixW2.js} +47 -47
- package/dist/{mermaid-parser.core-C3XRsazI.js → mermaid-parser.core-DoivvxPd.js} +8 -8
- package/dist/{mhchem-yiCCuiEF.js → mhchem-EGhUZR1V.js} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-B-4mnfFG.js → mindmap-definition-VGOIOE7T-CCDupjWW.js} +14 -14
- package/dist/mirc-tcwvVugm.js +4 -0
- package/dist/mllike-Dx91i62r.js +6 -0
- package/dist/modelica-_SRt-yU5.js +4 -0
- package/dist/mscgen-GZrGS9gt.js +6 -0
- package/dist/mumps-Cv3ygyod.js +4 -0
- package/dist/nsis-BU7GeGbI.js +4 -0
- package/dist/{nsis-ClF3r5Tr.js → nsis-i9_sgigf.js} +1 -1
- package/dist/ntriples-CL-FCYXb.js +4 -0
- package/dist/{number-overlay-editor-BLJXvX9c.js → number-overlay-editor-Ck_mc_gT.js} +1 -1
- package/dist/objects-De59twF-.js +56 -0
- package/dist/octave-Dc6_3DIu.js +4 -0
- package/dist/{ordinal-ArJavP1Q.js → ordinal-Bkv2-veX.js} +1 -1
- package/dist/oz-DpUAJCXf.js +4 -0
- package/dist/{packet-DYOGHKS2-34raHOiB.js → packet-DYOGHKS2-Bkgofxf3.js} +3 -3
- package/dist/pascal-B17mncXs.js +4 -0
- package/dist/perl-BTpK97q9.js +4 -0
- package/dist/{pie-VRWISCQL-BaLlzZa3.js → pie-VRWISCQL-B1AMhN_7.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-Cr3cNpZY.js → pieDiagram-ADFJNKIX-JvXG_6hk.js} +22 -22
- package/dist/pig-CFb638Ap.js +4 -0
- package/dist/powershell-Cxo-_2A5.js +4 -0
- package/dist/{precisionRound-Tqb4mg-H.js → precisionRound-CnHPY_5v.js} +1 -1
- package/dist/{process-output-Mh4UrjwM.js → process-output-2QPcgBQg.js} +4 -4
- package/dist/properties-BPgT1xTB.js +4 -0
- package/dist/protobuf-BgHBaIIK.js +4 -0
- package/dist/pug-25-oS0SG.js +4 -0
- package/dist/{pug-B_rby2yb.js → pug-BhE2JRSg.js} +1 -1
- package/dist/puppet-DarIr20S.js +4 -0
- package/dist/purify.es-EnR5yhgI.js +783 -0
- package/dist/python-BqmOsBsi.js +4 -0
- package/dist/q-D3QJCTup.js +4 -0
- package/dist/{quadrantDiagram-AYHSOK5B-BuNL8Q93.js → quadrantDiagram-AYHSOK5B-BqDB9tUC.js} +5 -5
- package/dist/r-Cz_yBX4z.js +4 -0
- package/dist/{radar-ZZBFDIW7-Ci7bfoZa.js → radar-ZZBFDIW7-C2b7A32s.js} +3 -3
- package/dist/{react-vega-B0sAlDTL.js → react-vega-BazDALhI.js} +469 -469
- package/dist/{requirementDiagram-UZGBJVZJ-BG2lLUN1.js → requirementDiagram-UZGBJVZJ-KbVt8SPH.js} +14 -14
- package/dist/{reveal-component-D0fwa0Mk.js → reveal-component-BQQIEJqn.js} +629 -622
- package/dist/rpm-DGOtYwAI.js +5 -0
- package/dist/ruby-DBZu4rPc.js +4 -0
- package/dist/{sankeyDiagram-TZEHDZUN-DMal8sps.js → sankeyDiagram-TZEHDZUN-DgkF38jx.js} +5 -5
- package/dist/sas-Dd1D9qTq.js +4 -0
- package/dist/scheme-BmDjvTHX.js +4 -0
- package/dist/{sequenceDiagram-WL72ISMW-DT6Tk-Eo.js → sequenceDiagram-WL72ISMW-BDmx9n95.js} +8 -8
- package/dist/shell-BL8zFSaj.js +4 -0
- package/dist/sieve-BAx2WqUP.js +4 -0
- package/dist/smalltalk-CYRzF7VV.js +4 -0
- package/dist/sparql-YWaDRO4A.js +4 -0
- package/dist/{spec-Cz-Bj1JI.js → spec-CnaxwDqy.js} +4 -4
- package/dist/{src-Bf2iLOlr.js → src-DV3ha_nA.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-CB_lodq3.js → stateDiagram-FKZM4ZOC-ByOvQf2n.js} +17 -17
- package/dist/stateDiagram-v2-4FDKWEC3-C3xqeavR.js +29 -0
- package/dist/{step-CWipAYTY.js → step-BqHnkgWE.js} +1 -1
- package/dist/stex-B5O-env2.js +4 -0
- package/dist/{strings-Dq_j3Rxw.js → strings-BYAhZnQi.js} +354 -354
- package/dist/style.css +1 -1
- package/dist/stylus-lYsyLFc1.js +4 -0
- package/dist/swift-ClQz9z1n.js +4 -0
- package/dist/{swiper-component-5HoSsPi1.js → swiper-component-DE94711u.js} +4 -4
- package/dist/tcl-B3jhsfqY.js +4 -0
- package/dist/textile-Cb1Dw7Aq.js +4 -0
- package/dist/{time-CsmIF9YZ.js → time-Bb4A7I6a.js} +4 -4
- package/dist/{timeline-definition-IT6M3QCI-NfSKRvH0.js → timeline-definition-IT6M3QCI-CkD_trIn.js} +4 -4
- package/dist/{toDate-CWNNlFEX.js → toDate-B3IRfHhw.js} +16 -7
- package/dist/toml-nHZhetdO.js +4 -0
- package/dist/{tooltip-Czds6Qr8.js → tooltip-B-qh7UPB.js} +3 -3
- package/dist/{treemap-GDKQZRPO-Cl6OQh8D.js → treemap-GDKQZRPO-SDux0AV8.js} +3 -3
- package/dist/troff-DuJAGWKH.js +4 -0
- package/dist/ttcn-BxrcwP21.js +4 -0
- package/dist/ttcn-cfg-BAg_9dcc.js +4 -0
- package/dist/turtle-zCq949as.js +4 -0
- package/dist/{types-C2Ir191_.js → types-DQl7jVYK.js} +1 -1
- package/dist/use-vega-container-remeasure-DGNrIQSk.js +27 -0
- package/dist/{useAsyncData-KfHB8wQR.js → useAsyncData-CvO8WUy3.js} +1 -1
- package/dist/{useDateFormatter-CMnRuVmN.js → useDateFormatter-BSoGim-G.js} +2 -2
- package/dist/{useDeepCompareMemoize-nJMtxhm4.js → useDeepCompareMemoize-J3MKRdA4.js} +1 -1
- package/dist/{useIframeCapabilities-DWIYvDh7.js → useIframeCapabilities-POcFXHbw.js} +1 -1
- package/dist/{useLifecycle-DegSo0lV.js → useLifecycle-DqPxHgAN.js} +3 -3
- package/dist/{useTheme-6eZ3GOTS.js → useTheme-XMq9mNf_.js} +65 -29
- package/dist/vb-De5hElus.js +4 -0
- package/dist/vbscript-Cypcpv4F.js +4 -0
- package/dist/{vega-component-DzyyM9fc.js → vega-component-CrFoZT1S.js} +225 -223
- package/dist/vega-embed-container-DAQAMjiO.js +22 -0
- package/dist/vega-loader.browser-DmpxCJqx.js +1353 -0
- package/dist/velocity-Di7l-yhe.js +4 -0
- package/dist/verilog-Bzi-S3g2.js +4 -0
- package/dist/vhdl-B0ZZITaW.js +4 -0
- package/dist/webidl-0sviiRcN.js +4 -0
- package/dist/xquery-B4qMVWaB.js +4 -0
- package/dist/{xychartDiagram-PRI3JC2R-BvwftqMA.js → xychartDiagram-PRI3JC2R-BSkNxYNw.js} +13 -13
- package/dist/yacas-Jt25Fuv8.js +4 -0
- package/dist/z80-CrcbYzmp.js +4 -0
- package/dist/{zod-CijjQh4u.js → zod-D0yOqoGe.js} +26 -26
- package/package.json +3 -1
- package/src/__mocks__/requests.ts +3 -0
- package/src/components/charts/lazy.tsx +3 -1
- package/src/components/charts/vega-embed-container.tsx +18 -0
- package/src/components/chat/__tests__/chat-utils.test.ts +244 -1
- package/src/components/chat/__tests__/message-queue.test.tsx +121 -0
- package/src/components/chat/chat-panel.tsx +196 -67
- package/src/components/chat/chat-utils.ts +111 -2
- package/src/components/editor/RecoveryButton.tsx +2 -2
- package/src/components/editor/SortableCell.tsx +6 -2
- package/src/components/editor/__tests__/output-persistence.test.tsx +241 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +153 -0
- package/src/components/editor/actions/pair-with-agent-commands.ts +109 -0
- package/src/components/editor/actions/pair-with-agent-modal.tsx +20 -64
- package/src/components/editor/actions/useNotebookActions.tsx +8 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +14 -5
- package/src/components/editor/ai/ai-completion-editor.tsx +4 -1
- package/src/components/editor/cell/cell-context-menu.tsx +7 -0
- package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +221 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +308 -77
- package/src/components/editor/chrome/panels/packages-panel.tsx +11 -1
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +3 -2
- package/src/components/editor/columns/__tests__/cell-column.test.tsx +105 -0
- package/src/components/editor/columns/cell-column.tsx +34 -4
- package/src/components/editor/columns/sortable-column.tsx +24 -4
- package/src/components/editor/connections/__tests__/secret-combobox.test.ts +134 -0
- package/src/components/editor/connections/database/schemas.ts +35 -27
- package/src/components/editor/connections/form-renderers.tsx +42 -110
- package/src/components/editor/connections/secret-combobox.tsx +253 -0
- package/src/components/editor/connections/storage/schemas.ts +12 -6
- package/src/components/editor/file-tree/download.ts +46 -0
- package/src/components/editor/file-tree/file-explorer.tsx +3 -21
- package/src/components/editor/file-tree/file-viewer.tsx +4 -27
- package/src/components/editor/navigation/__tests__/navigation.test.ts +33 -0
- package/src/components/editor/navigation/navigation.ts +8 -1
- package/src/components/editor/notebook-cell.tsx +203 -106
- package/src/components/editor/renderers/__tests__/cells-renderer.test.tsx +66 -0
- package/src/components/editor/renderers/cell-array.tsx +26 -13
- package/src/components/editor/renderers/cells-renderer.tsx +8 -2
- package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +29 -0
- package/src/components/editor/renderers/slides-layout/types.ts +4 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +19 -19
- package/src/components/slides/reveal-component.tsx +37 -17
- package/src/components/slides/slide-form.tsx +72 -0
- package/src/components/ui/toast.tsx +11 -3
- package/src/components/ui/toaster.tsx +65 -9
- package/src/core/ai/context/providers/error.ts +6 -158
- package/src/core/cells/__tests__/utils.test.ts +59 -0
- package/src/core/cells/utils.ts +51 -0
- package/src/core/codemirror/completion/__tests__/signature-hint.test.ts +97 -3
- package/src/core/codemirror/completion/signature-hint.ts +78 -11
- package/src/core/constants.ts +8 -0
- package/src/core/diagnostics/__tests__/issue-details.test.ts +173 -0
- package/src/core/diagnostics/issue-details.ts +139 -0
- package/src/core/errors/__tests__/error-entries.test.ts +25 -0
- package/src/core/errors/error-entries.ts +176 -0
- package/src/core/islands/__tests__/bootstrap.test.ts +61 -0
- package/src/core/islands/__tests__/bridge.test.ts +373 -47
- package/src/core/islands/__tests__/main.test.ts +176 -0
- package/src/core/islands/__tests__/parse.test.ts +105 -0
- package/src/core/islands/bootstrap.ts +28 -5
- package/src/core/islands/bridge.ts +140 -39
- package/src/core/islands/components/__tests__/web-components.test.tsx +248 -0
- package/src/core/islands/components/output-wrapper.tsx +4 -1
- package/src/core/islands/components/web-components.tsx +76 -15
- package/src/core/islands/constants.ts +1 -0
- package/src/core/islands/main.ts +69 -3
- package/src/core/islands/parse.ts +70 -23
- package/src/core/islands/state.ts +9 -0
- package/src/core/islands/worker/__tests__/controller.test.ts +173 -0
- package/src/core/islands/worker/worker.tsx +159 -63
- package/src/core/network/__tests__/requests-lazy.test.ts +18 -0
- package/src/core/network/__tests__/requests-network.test.ts +7 -0
- package/src/core/network/requests-lazy.ts +13 -1
- package/src/core/network/requests-network.ts +3 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +3 -0
- package/src/core/runtime/__tests__/runtime.test.ts +64 -0
- package/src/core/runtime/runtime.ts +30 -10
- package/src/core/wasm/bridge.ts +8 -0
- package/src/core/wasm/worker/bootstrap.ts +113 -20
- package/src/core/wasm/worker/types.ts +2 -0
- package/src/css/app/Cell.css +10 -0
- package/src/hooks/__tests__/useHotkey.test.tsx +88 -0
- package/src/hooks/useHotkey.ts +29 -4
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +7 -1
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +26 -1
- package/src/plugins/impl/anywidget/__tests__/host.test.ts +6 -9
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +3 -1
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +32 -61
- package/src/plugins/impl/anywidget/model-proxy.ts +0 -13
- package/src/plugins/impl/anywidget/runtime.ts +1 -0
- package/src/plugins/impl/anywidget/widget-binding.ts +8 -34
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +53 -2
- package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +71 -0
- package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +102 -0
- package/src/plugins/impl/vega/use-vega-container-remeasure.ts +39 -0
- package/src/plugins/impl/vega/vega-component.tsx +5 -4
- package/src/plugins/layout/NavigationMenuPlugin.tsx +156 -25
- package/src/theme/__tests__/useTheme.test.ts +68 -0
- package/src/theme/useTheme.ts +16 -1
- package/dist/apl-Bdc61P1y.js +0 -4
- package/dist/architecture-7HQA4BMR-Kyc44TmC.js +0 -6
- package/dist/asciiarmor-DVRHDGzT.js +0 -4
- package/dist/asn1-BmuKfkfu.js +0 -4
- package/dist/assets/__vite-browser-external-BQCLNwri.js +0 -1
- package/dist/assets/worker-DAWRHcPq.js +0 -73
- package/dist/brainfuck-DPrRpyTV.js +0 -4
- package/dist/classDiagram-2ON5EDUG-QjoAcuFE.js +0 -30
- package/dist/classDiagram-v2-WZHVMYZB-bUCv4gu2.js +0 -30
- package/dist/clojure-DEttQW5T.js +0 -4
- package/dist/cmake-jNlx_DaM.js +0 -4
- package/dist/cobol-BvvIm5MJ.js +0 -4
- package/dist/coffeescript-DTpBMyFU.js +0 -4
- package/dist/commonlisp-BmmUG8jb.js +0 -4
- package/dist/crystal-BxyqmEWC.js +0 -4
- package/dist/css-BGoCtuG3.js +0 -4
- package/dist/cypher-BmCbdl3u.js +0 -4
- package/dist/d-CFrlbjZt.js +0 -4
- package/dist/diff-D6XwL6P8.js +0 -4
- package/dist/dist-7QfXoMdB.js +0 -5
- package/dist/dist-BEXXyZig.js +0 -5
- package/dist/dist-BYj57OV4.js +0 -5
- package/dist/dist-BlSvQzNr.js +0 -5
- package/dist/dist-CCBlxAgS.js +0 -8
- package/dist/dist-CIDTVIUf.js +0 -5
- package/dist/dist-CqQyhAM8.js +0 -8
- package/dist/dist-CwRu2Xzh.js +0 -5
- package/dist/dist-D8CDTVgf.js +0 -6
- package/dist/dist-D8DNB0nO.js +0 -8
- package/dist/dist-DL6N_q-A.js +0 -5
- package/dist/dist-DOFbNV_b.js +0 -8
- package/dist/dist-DPrYzMY0.js +0 -6
- package/dist/dist-cdmMjgsn.js +0 -5
- package/dist/dtd-Bw0lRN0-.js +0 -4
- package/dist/dylan-B55eBHTt.js +0 -4
- package/dist/ecl-C8G4p0wn.js +0 -4
- package/dist/eiffel-BmH46VJl.js +0 -4
- package/dist/elm-DhzeFqkl.js +0 -4
- package/dist/erlang-CY-wdlsU.js +0 -4
- package/dist/esm-M837UxV5.js +0 -1171
- package/dist/factor-DWkgl0xw.js +0 -4
- package/dist/forth-Cij_ie2t.js +0 -4
- package/dist/fortran-Br3X9cfm.js +0 -4
- package/dist/gas-DYsGcMN2.js +0 -4
- package/dist/gherkin-eVgXQ0fQ.js +0 -4
- package/dist/groovy-_NFHIXG7.js +0 -4
- package/dist/haskell-D6xNG_bH.js +0 -4
- package/dist/haxe-sU_rzAwn.js +0 -5
- package/dist/idl-Ds_VbrUx.js +0 -4
- package/dist/infoDiagram-HS3SLOUP-CEnzWruK.js +0 -30
- package/dist/javascript-CztfIl0i.js +0 -4
- package/dist/julia-DDv40QMV.js +0 -4
- package/dist/livescript-BEOngLLc.js +0 -4
- package/dist/lua-9-7BhQ4Y.js +0 -4
- package/dist/mathematica-DDa0Pfxm.js +0 -4
- package/dist/mbox-iO03mmoE.js +0 -4
- package/dist/mirc-C9z5LT4X.js +0 -4
- package/dist/mllike-jGJbdm_C.js +0 -6
- package/dist/modelica-DzF7oIEL.js +0 -4
- package/dist/mscgen-DB-u125o.js +0 -6
- package/dist/mumps-CRTFHhzh.js +0 -4
- package/dist/nsis-C4NPTuox.js +0 -4
- package/dist/ntriples-BCOoGph1.js +0 -4
- package/dist/octave-DTwNlazz.js +0 -4
- package/dist/oz-DD38AzSz.js +0 -4
- package/dist/pascal-BohSp9jV.js +0 -4
- package/dist/perl-f5OutoPM.js +0 -4
- package/dist/pig-Dv7wSmHb.js +0 -4
- package/dist/powershell-rYgjKB39.js +0 -4
- package/dist/properties-BFUNLRDN.js +0 -4
- package/dist/protobuf-B9QJQPPv.js +0 -4
- package/dist/pug-DzvWpaMC.js +0 -4
- package/dist/puppet-B_K-n_xK.js +0 -4
- package/dist/purify.es-H92eMd9-.js +0 -557
- package/dist/python-CAiFcaA2.js +0 -4
- package/dist/q-cLeFIBLK.js +0 -4
- package/dist/r-04Y-Wco3.js +0 -4
- package/dist/react-vega-B6ncY2Tp.js +0 -9
- package/dist/rpm-FUdrIia9.js +0 -5
- package/dist/ruby-DMjFXuEW.js +0 -4
- package/dist/sas-DzHZxjXK.js +0 -4
- package/dist/scheme-DxHd_Rb9.js +0 -4
- package/dist/shell-C8Kwypgf.js +0 -4
- package/dist/sieve-DdyqOKXZ.js +0 -4
- package/dist/smalltalk-pB7X1D9y.js +0 -4
- package/dist/sparql-NhBO6oOa.js +0 -4
- package/dist/stateDiagram-v2-4FDKWEC3-E0RGjKsm.js +0 -29
- package/dist/stex-KfRnSHzF.js +0 -4
- package/dist/stylus-SfWSnzPv.js +0 -4
- package/dist/swift-jRPdq2zR.js +0 -4
- package/dist/tcl-_hpTHGX3.js +0 -4
- package/dist/textile-C9h8slqH.js +0 -4
- package/dist/toml-DWvtinD4.js +0 -4
- package/dist/troff-Dwo_A0y7.js +0 -4
- package/dist/ttcn-V--CPFKq.js +0 -4
- package/dist/ttcn-cfg-CPSMchTG.js +0 -4
- package/dist/turtle-B4rPGBWu.js +0 -4
- package/dist/vb-DaMBBd4j.js +0 -4
- package/dist/vbscript-BMJQqcE2.js +0 -4
- package/dist/vega-loader.browser-CZ-J8Py3.js +0 -1321
- package/dist/velocity-CGq2QRq2.js +0 -4
- package/dist/verilog-CUNo8F5u.js +0 -4
- package/dist/vhdl-CCzA0msW.js +0 -4
- package/dist/webidl-CqIMDIBL.js +0 -4
- package/dist/xquery-XC5Kbr-1.js +0 -4
- package/dist/yacas-CGOv7Dzy.js +0 -4
- package/dist/z80-CXhVmi-f.js +0 -4
- /package/dist/{Plot-CAYS29h9.js → Plot-YQOuVIei.js} +0 -0
- /package/dist/{apl-BCgCq9iM.js → apl-99A7dLQe.js} +0 -0
- /package/dist/{array-tvvEqPy7.js → array-O78LT16Y.js} +0 -0
- /package/dist/{asciiarmor-BtqU-KJQ.js → asciiarmor-DLEhpFDx.js} +0 -0
- /package/dist/{asn1-Dmb-dTMx.js → asn1-CMrcTsT4.js} +0 -0
- /package/dist/{asterisk-DaVJJDnV.js → asterisk-CqykImq7.js} +0 -0
- /package/dist/{brainfuck-C1HoZKlE.js → brainfuck-ChPt5yBe.js} +0 -0
- /package/dist/{chunk-DR5Q36YT-BflwErH1.js → chunk-DR5Q36YT-5Yp2GWwR.js} +0 -0
- /package/dist/{click-outside-container-BLPjMamz.js → click-outside-container-BSIeYt4y.js} +0 -0
- /package/dist/{clike-CdT0yHjt.js → clike-CE0fXfM_.js} +0 -0
- /package/dist/{clojure-CdyrCpUv.js → clojure-QkBEMU-g.js} +0 -0
- /package/dist/{cmake-BFlPxym7.js → cmake-CU1jX7Mo.js} +0 -0
- /package/dist/{cobol-CcJXewp8.js → cobol-DMOKzzky.js} +0 -0
- /package/dist/{coffeescript-DnKuIKRo.js → coffeescript-DjnjLyfk.js} +0 -0
- /package/dist/{colors-CQAOa8cK.js → colors-DmiH1bIH.js} +0 -0
- /package/dist/{common-keywords-FBrXPTcz.js → common-keywords-D3nPJNQP.js} +0 -0
- /package/dist/{commonlisp-B-kok83Z.js → commonlisp-CYd9iOSe.js} +0 -0
- /package/dist/{crystal-FYRYjI1I.js → crystal-Dy55yoYG.js} +0 -0
- /package/dist/{css-B45lc2V3.js → css-CNU8w3HJ.js} +0 -0
- /package/dist/{cypher-DZMLyVY_.js → cypher-q47DGzK7.js} +0 -0
- /package/dist/{cytoscape.esm-ayF70frT.js → cytoscape.esm-Dr8XzXWK.js} +0 -0
- /package/dist/{d-x-VVT4o9.js → d-jEkaLvxX.js} +0 -0
- /package/dist/{defaultLocale-u-3osm0P.js → defaultLocale-BpsHxBd7.js} +0 -0
- /package/dist/{defaultLocale-BoHTsDG6.js → defaultLocale-DoeErsX2.js} +0 -0
- /package/dist/{diff-Dxe2mpXk.js → diff-vb2-unFN.js} +0 -0
- /package/dist/{dist-BGdYVvOu.js → dist-DsoKosxi.js} +0 -0
- /package/dist/{dtd-C9VM_Wfu.js → dtd-C9kR-bXa.js} +0 -0
- /package/dist/{duckdb-keywords-CvJhR_Yd.js → duckdb-keywords-B6HYCMOT.js} +0 -0
- /package/dist/{dylan-DTSnEIFO.js → dylan-BLckrK-V.js} +0 -0
- /package/dist/{ebnf-2D4Ctp3y.js → ebnf-Cnp3L9jg.js} +0 -0
- /package/dist/{ecl-N04ptnRK.js → ecl-CEsf6XVg.js} +0 -0
- /package/dist/{eiffel-Dd8rpqr_.js → eiffel-2KGZNzx6.js} +0 -0
- /package/dist/{elm-GT2E866W.js → elm-D2s3K5wF.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-DzSb5hsH.js → emotion-is-prop-valid.esm-DdVSF4FD.js} +0 -0
- /package/dist/{erlang-Cf0Bp5pY.js → erlang-0PMFOndk.js} +0 -0
- /package/dist/{esm-BaaaPNGl.js → esm-CuQHjs36.js} +0 -0
- /package/dist/{fcl-Ccj8Z5Xd.js → fcl-D9nccAWI.js} +0 -0
- /package/dist/{forth-wd_XzGTg.js → forth-DG89iUsu.js} +0 -0
- /package/dist/{fortran-DcwUTZFe.js → fortran-ytKsAVvu.js} +0 -0
- /package/dist/{gas-DeALIER3.js → gas-Cg2Fm0N2.js} +0 -0
- /package/dist/{gherkin-CKTqaJNX.js → gherkin-B87FEnZ-.js} +0 -0
- /package/dist/{groovy-Bwdp_d8D.js → groovy-Dcs08AWD.js} +0 -0
- /package/dist/{haskell-DCdCcPLK.js → haskell-cwkOuhx6.js} +0 -0
- /package/dist/{haxe-DAyktQWJ.js → haxe-DWEo4q10.js} +0 -0
- /package/dist/{http-_DVAYWoR.js → http-B8jdG64J.js} +0 -0
- /package/dist/{idl-CBuZiRYu.js → idl-WWQwDcRV.js} +0 -0
- /package/dist/{init-uv0kkh4g.js → init-DNBbYZd_.js} +0 -0
- /package/dist/{javascript-DzigE11c.js → javascript-BeR74dxD.js} +0 -0
- /package/dist/{julia-PwfB-0Cm.js → julia-UlvCUYGL.js} +0 -0
- /package/dist/{katex-C_XRmjAP.js → katex-Bld7b-fk.js} +0 -0
- /package/dist/{livescript-BJLz1EbT.js → livescript-GPmFcmYV.js} +0 -0
- /package/dist/{lua-ZC-XC2jf.js → lua-DYoT_0zM.js} +0 -0
- /package/dist/{main-Tj_-QTyF.js → main-B1Jo_8pC.js} +0 -0
- /package/dist/{math-DFcdCCU8.js → math-CBNc2Ib0.js} +0 -0
- /package/dist/{mathematica-DCYMx6qB.js → mathematica-DSFIQlbG.js} +0 -0
- /package/dist/{mbox-OxMK_9XI.js → mbox-ej8lFMdL.js} +0 -0
- /package/dist/{micromark-factory-space-DF2w36zS.js → micromark-factory-space-CwHmg6iz.js} +0 -0
- /package/dist/{mirc-nJVyhA0H.js → mirc-CAdIdvHQ.js} +0 -0
- /package/dist/{mllike-DRO89bsU.js → mllike-CjTB1lHF.js} +0 -0
- /package/dist/{modelica-Don3E6ZD.js → modelica-BB68FYMa.js} +0 -0
- /package/dist/{mscgen-DJfqD3bN.js → mscgen-BkbzgGGI.js} +0 -0
- /package/dist/{mumps-SjGTvDYL.js → mumps-Cu-28E9F.js} +0 -0
- /package/dist/{nginx-DasThI7R.js → nginx-C1ofKPst.js} +0 -0
- /package/dist/{node-sql-parser-B8nBD36q.js → node-sql-parser-DLl_zNw0.js} +0 -0
- /package/dist/{ntriples-CNBKRl3I.js → ntriples-D9cQiZxZ.js} +0 -0
- /package/dist/{octave-DdeVHNlx.js → octave-BvtAnPX0.js} +0 -0
- /package/dist/{once-DPuqGUeo.js → once-B60G2fuJ.js} +0 -0
- /package/dist/{oz-CcKSoNvN.js → oz-COaVHk2E.js} +0 -0
- /package/dist/{pascal-6leftwNj.js → pascal-BFpqVD2x.js} +0 -0
- /package/dist/{path-BGaWgPKg.js → path-DwWbhZFI.js} +0 -0
- /package/dist/{perl-BhJIwWzN.js → perl-DaiORxHP.js} +0 -0
- /package/dist/{pig-r-xDHqRf.js → pig-DFzRhmsF.js} +0 -0
- /package/dist/{powershell-D-BELeNi.js → powershell-BG2LQNKN.js} +0 -0
- /package/dist/{properties-CnuDhbll.js → properties-CqJJR5QY.js} +0 -0
- /package/dist/{protobuf-CO8RBhvX.js → protobuf-WwDYV1yY.js} +0 -0
- /package/dist/{puppet-NmXHjLy8.js → puppet-QNY3w_uN.js} +0 -0
- /package/dist/{python-DAQXi720.js → python-4QrQ3Ugi.js} +0 -0
- /package/dist/{q-DlikXfV0.js → q-DhwXuxE2.js} +0 -0
- /package/dist/{r-CuohilwT.js → r-Df-nkR25.js} +0 -0
- /package/dist/{range-C-rmrM1O.js → range-BOiA8qqU.js} +0 -0
- /package/dist/{rpm-0Pjwp0Pb.js → rpm-Cokue07s.js} +0 -0
- /package/dist/{ruby-Dq8NJTDG.js → ruby-DrYcL3qF.js} +0 -0
- /package/dist/{sas-CuwonyVP.js → sas-CoiPirA5.js} +0 -0
- /package/dist/{scheme-CYU-RRIf.js → scheme-CwFLjzHv.js} +0 -0
- /package/dist/{semaphore-CNDGTzkX.js → semaphore-C8rmHdhj.js} +0 -0
- /package/dist/{shell-COPmX2qE.js → shell-BFV-R24I.js} +0 -0
- /package/dist/{sieve-B_3zyLne.js → sieve-CxwXF5T9.js} +0 -0
- /package/dist/{simple-mode-DSBniks8.js → simple-mode-DTaJtKPt.js} +0 -0
- /package/dist/{smalltalk-DRft7iPv.js → smalltalk-QivVOCtX.js} +0 -0
- /package/dist/{solr-RZ9uTl59.js → solr-BLvysN-c.js} +0 -0
- /package/dist/{sparql-CN6qj55H.js → sparql-nKsFk8j7.js} +0 -0
- /package/dist/{spreadsheet-BNNUNXA2.js → spreadsheet-BWc8C2FT.js} +0 -0
- /package/dist/{sql-B4x8IkwU.js → sql-CWfUjlV1.js} +0 -0
- /package/dist/{stex-BIsgBmK4.js → stex-DtMAhV4-.js} +0 -0
- /package/dist/{stylus-Bn_ZjOQ3.js → stylus-BLKQAycn.js} +0 -0
- /package/dist/{swift-BLUJhMbz.js → swift-CJoKqiKj.js} +0 -0
- /package/dist/{tcl-C86fxecl.js → tcl-YTeYFNUc.js} +0 -0
- /package/dist/{textile-DmHh2rsK.js → textile-C6rKQqMQ.js} +0 -0
- /package/dist/{tiddlywiki-DI0mF2WJ.js → tiddlywiki-ZXwTHGNT.js} +0 -0
- /package/dist/{tiki-2HU6XLLn.js → tiki-C628O_u4.js} +0 -0
- /package/dist/{timer-YZl28NYN.js → timer-BpI_FKSA.js} +0 -0
- /package/dist/{toml-GWANRNAD.js → toml-DxlPGbRy.js} +0 -0
- /package/dist/{treemap-D-ka1hvx.js → treemap-DY3NBr79.js} +0 -0
- /package/dist/{troff-BHTsomIy.js → troff-DFCfH7Ku.js} +0 -0
- /package/dist/{ttcn-DQuhn5Mn.js → ttcn-DAW-ERVP.js} +0 -0
- /package/dist/{ttcn-cfg-HjFYtdB-.js → ttcn-cfg-CpJ8b7EN.js} +0 -0
- /package/dist/{turtle-nCay33Nv.js → turtle-BneV2f8L.js} +0 -0
- /package/dist/{vb-BG-XlqqJ.js → vb-D973Vxxh.js} +0 -0
- /package/dist/{vbscript-B6vyW0-D.js → vbscript-Dckaq3YO.js} +0 -0
- /package/dist/{velocity-CWegueqO.js → velocity-DKty-GUC.js} +0 -0
- /package/dist/{verilog-CzSQm4cG.js → verilog-aNaK_biA.js} +0 -0
- /package/dist/{vhdl-DqnNVL7r.js → vhdl-CQuehnQy.js} +0 -0
- /package/dist/{webidl-DXEUpDWH.js → webidl-Bhg8vaMr.js} +0 -0
- /package/dist/{xquery-Ba_NB5bD.js → xquery-D2q16GaM.js} +0 -0
- /package/dist/{yacas-HKQU6hyk.js → yacas-DHGOHnNa.js} +0 -0
- /package/dist/{z80-CXkHXLdj.js → z80-BPhTmO22.js} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { beforeEach, describe, expect, expectTypeOf, it, vi } from "vitest";
|
|
4
|
+
import type * as MainModule from "../main";
|
|
5
|
+
|
|
6
|
+
// `main.ts` is the public islands entry point (see islands/vite.config.mts),
|
|
7
|
+
// so this suite snapshots its export surface + signatures and covers each
|
|
8
|
+
// entry point. The real bridge/bootstrap spin up a Web Worker and the plugin
|
|
9
|
+
// runtime, so we mock them.
|
|
10
|
+
const mockInitializeApps = vi.fn(() => Promise.resolve());
|
|
11
|
+
const mockStopSession = vi.fn((_appId?: string) => Promise.resolve());
|
|
12
|
+
const mockInitializeIslands = vi.fn(() => Promise.resolve());
|
|
13
|
+
const mockParseMarimoIslandApps = vi.fn(() => [] as Array<{ id: string }>);
|
|
14
|
+
|
|
15
|
+
vi.mock("@/core/islands/bridge", () => ({
|
|
16
|
+
getGlobalBridge: () => ({
|
|
17
|
+
initializeApps: mockInitializeApps,
|
|
18
|
+
stopSession: mockStopSession,
|
|
19
|
+
}),
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
vi.mock("@/core/islands/bootstrap", () => ({
|
|
23
|
+
initializeIslands: mockInitializeIslands,
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
vi.mock("@/core/islands/parse", () => ({
|
|
27
|
+
parseMarimoIslandApps: mockParseMarimoIslandApps,
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Re-import a fresh copy of `main.ts` so the module-level `bootstrapPromise`
|
|
32
|
+
* memoization does not leak between tests. The module auto-runs `initialize()`
|
|
33
|
+
* on load, so we clear the DOM first to keep that a no-op.
|
|
34
|
+
*/
|
|
35
|
+
async function importMain(): Promise<typeof MainModule> {
|
|
36
|
+
vi.resetModules();
|
|
37
|
+
return import("../main");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
document.body.replaceChildren();
|
|
42
|
+
mockInitializeApps.mockClear();
|
|
43
|
+
mockStopSession.mockClear();
|
|
44
|
+
mockInitializeIslands.mockClear();
|
|
45
|
+
mockParseMarimoIslandApps.mockReset();
|
|
46
|
+
mockParseMarimoIslandApps.mockReturnValue([]);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe("islands public API surface", () => {
|
|
50
|
+
it("exposes a stable set of exports and signatures", async () => {
|
|
51
|
+
const mod = await importMain();
|
|
52
|
+
const surface = Object.fromEntries(
|
|
53
|
+
Object.keys(mod)
|
|
54
|
+
.toSorted()
|
|
55
|
+
.map((key) => {
|
|
56
|
+
const value = (mod as Record<string, unknown>)[key];
|
|
57
|
+
return [
|
|
58
|
+
key,
|
|
59
|
+
typeof value === "function"
|
|
60
|
+
? `function(arity ${value.length})`
|
|
61
|
+
: typeof value,
|
|
62
|
+
];
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
expect(surface).toMatchInlineSnapshot(`
|
|
67
|
+
{
|
|
68
|
+
"canReplaceApp": "function(arity 0)",
|
|
69
|
+
"initialize": "function(arity 0)",
|
|
70
|
+
"stopApp": "function(arity 1)",
|
|
71
|
+
}
|
|
72
|
+
`);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it("matches the declared TypeScript signatures", () => {
|
|
76
|
+
expectTypeOf<typeof MainModule.canReplaceApp>().toEqualTypeOf<
|
|
77
|
+
() => boolean
|
|
78
|
+
>();
|
|
79
|
+
expectTypeOf<typeof MainModule.initialize>().toEqualTypeOf<
|
|
80
|
+
() => Promise<void>
|
|
81
|
+
>();
|
|
82
|
+
expectTypeOf<typeof MainModule.stopApp>().toEqualTypeOf<
|
|
83
|
+
(appId?: string) => Promise<void>
|
|
84
|
+
>();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
describe("canReplaceApp", () => {
|
|
89
|
+
it("returns false when the document has no island element", async () => {
|
|
90
|
+
const mod = await importMain();
|
|
91
|
+
|
|
92
|
+
expect(mod.canReplaceApp()).toBe(false);
|
|
93
|
+
// Short-circuits on the DOM guard before parsing.
|
|
94
|
+
expect(mockParseMarimoIslandApps).not.toHaveBeenCalled();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("returns true for exactly one app without materializing the DOM", async () => {
|
|
98
|
+
const mod = await importMain();
|
|
99
|
+
document.body.innerHTML = `<marimo-island data-app-id="app-1"></marimo-island>`;
|
|
100
|
+
mockParseMarimoIslandApps.mockReturnValue([{ id: "app-1" }]);
|
|
101
|
+
|
|
102
|
+
expect(mod.canReplaceApp()).toBe(true);
|
|
103
|
+
// A probe must not mutate island attributes.
|
|
104
|
+
expect(mockParseMarimoIslandApps).toHaveBeenCalledWith(document, {
|
|
105
|
+
materialize: false,
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it("returns false when more than one app is present", async () => {
|
|
110
|
+
const mod = await importMain();
|
|
111
|
+
document.body.innerHTML = `<marimo-island data-app-id="app-1"></marimo-island>`;
|
|
112
|
+
mockParseMarimoIslandApps.mockReturnValue([
|
|
113
|
+
{ id: "app-1" },
|
|
114
|
+
{ id: "app-2" },
|
|
115
|
+
]);
|
|
116
|
+
|
|
117
|
+
expect(mod.canReplaceApp()).toBe(false);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("returns false when the island parses into zero apps", async () => {
|
|
121
|
+
const mod = await importMain();
|
|
122
|
+
document.body.innerHTML = `<marimo-island></marimo-island>`;
|
|
123
|
+
mockParseMarimoIslandApps.mockReturnValue([]);
|
|
124
|
+
|
|
125
|
+
expect(mod.canReplaceApp()).toBe(false);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
describe("stopApp", () => {
|
|
130
|
+
it("forwards the requested app id to the bridge", async () => {
|
|
131
|
+
const mod = await importMain();
|
|
132
|
+
|
|
133
|
+
await mod.stopApp("app-7");
|
|
134
|
+
expect(mockStopSession).toHaveBeenCalledWith("app-7");
|
|
135
|
+
|
|
136
|
+
await mod.stopApp();
|
|
137
|
+
expect(mockStopSession).toHaveBeenLastCalledWith(undefined);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
describe("initialize", () => {
|
|
142
|
+
it("skips bootstrap and app start when no islands are present", async () => {
|
|
143
|
+
const mod = await importMain();
|
|
144
|
+
|
|
145
|
+
await mod.initialize();
|
|
146
|
+
|
|
147
|
+
expect(mockInitializeIslands).not.toHaveBeenCalled();
|
|
148
|
+
expect(mockInitializeApps).not.toHaveBeenCalled();
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it("bootstraps once, marks islands, and starts apps on each call", async () => {
|
|
152
|
+
const mod = await importMain();
|
|
153
|
+
document.body.innerHTML = `<marimo-island></marimo-island>`;
|
|
154
|
+
|
|
155
|
+
await mod.initialize();
|
|
156
|
+
await mod.initialize();
|
|
157
|
+
|
|
158
|
+
expect(mockInitializeIslands).toHaveBeenCalledOnce();
|
|
159
|
+
expect(mockInitializeApps).toHaveBeenCalledTimes(2);
|
|
160
|
+
expect(
|
|
161
|
+
document.querySelector("marimo-island")?.classList.contains("marimo"),
|
|
162
|
+
).toBe(true);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("clears the memoized bootstrap when it fails so it can be retried", async () => {
|
|
166
|
+
const mod = await importMain();
|
|
167
|
+
document.body.innerHTML = `<marimo-island></marimo-island>`;
|
|
168
|
+
mockInitializeIslands.mockRejectedValueOnce(new Error("bootstrap failed"));
|
|
169
|
+
|
|
170
|
+
await expect(mod.initialize()).rejects.toThrow("bootstrap failed");
|
|
171
|
+
await mod.initialize();
|
|
172
|
+
|
|
173
|
+
expect(mockInitializeIslands).toHaveBeenCalledTimes(2);
|
|
174
|
+
expect(mockInitializeApps).toHaveBeenCalledOnce();
|
|
175
|
+
});
|
|
176
|
+
});
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
parseIslandElement,
|
|
16
16
|
parseIslandElementsIntoApps,
|
|
17
17
|
parseMarimoIslandApps,
|
|
18
|
+
retainIslandSource,
|
|
18
19
|
} from "../parse";
|
|
19
20
|
import { createMockIslandElement, createMockIslands } from "./test-utils.tsx";
|
|
20
21
|
|
|
@@ -53,6 +54,7 @@ function appendPayload(
|
|
|
53
54
|
script.type = ISLANDS_JSON_SCRIPT_TYPE;
|
|
54
55
|
script.textContent = JSON.stringify(payload);
|
|
55
56
|
root.appendChild(script);
|
|
57
|
+
return script;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
describe("createMarimoFile", () => {
|
|
@@ -317,6 +319,39 @@ describe("parseIslandElement", () => {
|
|
|
317
319
|
|
|
318
320
|
expect(result).toBeNull();
|
|
319
321
|
});
|
|
322
|
+
|
|
323
|
+
it("uses retained source after the custom element renders", () => {
|
|
324
|
+
const element = document.createElement(ISLAND_TAG_NAMES.ISLAND);
|
|
325
|
+
retainIslandSource(element, {
|
|
326
|
+
code: 'print("retained")',
|
|
327
|
+
output: "<div>retained output</div>",
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
expect(parseIslandElement(element)).toEqual({
|
|
331
|
+
code: 'print("retained")',
|
|
332
|
+
output: "<div>retained output</div>",
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
retainIslandSource(element, { code: "", output: "<div>static</div>" });
|
|
336
|
+
expect(parseIslandElement(element)).toBeNull();
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
it("prefers new live source when an island element is reused", () => {
|
|
340
|
+
const element = createMockIslandElement({
|
|
341
|
+
code: 'print("new")',
|
|
342
|
+
innerHTML: "<div>new output</div>",
|
|
343
|
+
});
|
|
344
|
+
element.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "true");
|
|
345
|
+
retainIslandSource(element, {
|
|
346
|
+
code: 'print("retained")',
|
|
347
|
+
output: "<div>retained output</div>",
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
expect(parseIslandElement(element)).toEqual({
|
|
351
|
+
code: 'print("new")',
|
|
352
|
+
output: "<div>new output</div>",
|
|
353
|
+
});
|
|
354
|
+
});
|
|
320
355
|
});
|
|
321
356
|
|
|
322
357
|
describe("parseIslandElementsIntoApps", () => {
|
|
@@ -630,6 +665,76 @@ describe("parseMarimoIslandApps", () => {
|
|
|
630
665
|
);
|
|
631
666
|
});
|
|
632
667
|
|
|
668
|
+
it("preserves payload-backed cells after a non-materializing capability probe", () => {
|
|
669
|
+
const island = createMockIslandElement({
|
|
670
|
+
appId: "app1",
|
|
671
|
+
cellId: "cell-2",
|
|
672
|
+
code: "dom_code = True",
|
|
673
|
+
innerHTML: "<div>dom output</div>",
|
|
674
|
+
});
|
|
675
|
+
island.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "true");
|
|
676
|
+
container.appendChild(island);
|
|
677
|
+
appendPayload(container, {
|
|
678
|
+
schemaVersion: 1,
|
|
679
|
+
appId: "app1",
|
|
680
|
+
cells: [createPayloadCell({ cellId: "cell-2" })],
|
|
681
|
+
});
|
|
682
|
+
const originalIsland = island.outerHTML;
|
|
683
|
+
|
|
684
|
+
const probed = parseMarimoIslandApps(container, { materialize: false });
|
|
685
|
+
|
|
686
|
+
expect(probed).toHaveLength(1);
|
|
687
|
+
expect(island.outerHTML).toBe(originalIsland);
|
|
688
|
+
|
|
689
|
+
expect(parseMarimoIslandApps(container)).toEqual(probed);
|
|
690
|
+
expect(island.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_ID)).toBeNull();
|
|
691
|
+
expect(island.getAttribute(ISLAND_DATA_ATTRIBUTES.CELL_IDX)).toBe("0");
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
it("refreshes a reused payload anchor when its content changes", () => {
|
|
695
|
+
const island = createMockIslandElement({
|
|
696
|
+
appId: "app1",
|
|
697
|
+
cellId: "cell-1",
|
|
698
|
+
code: 'print("dom")',
|
|
699
|
+
innerHTML: "<div>dom output</div>",
|
|
700
|
+
});
|
|
701
|
+
island.insertAdjacentHTML(
|
|
702
|
+
"beforeend",
|
|
703
|
+
'<div data-marimo-element><marimo-code-editor data-initial-value="old"></marimo-code-editor></div>',
|
|
704
|
+
);
|
|
705
|
+
island.setAttribute(ISLAND_DATA_ATTRIBUTES.REACTIVE, "true");
|
|
706
|
+
container.appendChild(island);
|
|
707
|
+
const script = appendPayload(container, {
|
|
708
|
+
schemaVersion: 1,
|
|
709
|
+
appId: "app1",
|
|
710
|
+
cells: [createPayloadCell()],
|
|
711
|
+
});
|
|
712
|
+
parseMarimoIslandApps(container);
|
|
713
|
+
|
|
714
|
+
script.textContent = JSON.stringify({
|
|
715
|
+
schemaVersion: 1,
|
|
716
|
+
appId: "app1",
|
|
717
|
+
cells: [
|
|
718
|
+
createPayloadCell({
|
|
719
|
+
code: 'print("updated")',
|
|
720
|
+
outputHtml: "<div>updated output</div>",
|
|
721
|
+
}),
|
|
722
|
+
],
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
parseMarimoIslandApps(container);
|
|
726
|
+
|
|
727
|
+
expect(extractIslandCodeFromEmbed(island)).toBe('print("updated")');
|
|
728
|
+
expect(island.querySelector(ISLAND_TAG_NAMES.CELL_OUTPUT)?.innerHTML).toBe(
|
|
729
|
+
"<div>updated output</div>",
|
|
730
|
+
);
|
|
731
|
+
expect(
|
|
732
|
+
island
|
|
733
|
+
.querySelector(ISLAND_TAG_NAMES.CODE_EDITOR)
|
|
734
|
+
?.getAttribute("data-initial-value"),
|
|
735
|
+
).toBe(JSON.stringify('print("updated")'));
|
|
736
|
+
});
|
|
737
|
+
|
|
633
738
|
it("should parse Python-generated island payload snapshots", () => {
|
|
634
739
|
const html = readFileSync(
|
|
635
740
|
new URL(
|
|
@@ -42,6 +42,7 @@ import { store as defaultStore } from "../state/jotai";
|
|
|
42
42
|
import type { IslandsPyodideBridge } from "./bridge";
|
|
43
43
|
import { MarimoIslandElement } from "./components/web-components";
|
|
44
44
|
import {
|
|
45
|
+
islandsPendingInitialRunsAtom,
|
|
45
46
|
shouldShowIslandsWarningIndicatorAtom,
|
|
46
47
|
userTriedToInteractWithIslandsAtom,
|
|
47
48
|
} from "./state";
|
|
@@ -74,6 +75,7 @@ export async function initializeIslands(
|
|
|
74
75
|
// Setup networking
|
|
75
76
|
store.set(requestClientAtom, bridge);
|
|
76
77
|
store.set(initialModeAtom, "read");
|
|
78
|
+
store.set(islandsPendingInitialRunsAtom, null);
|
|
77
79
|
|
|
78
80
|
// Initialize plugins for rendering static HTML
|
|
79
81
|
if (config.autoInitializePlugins !== false) {
|
|
@@ -108,14 +110,17 @@ export async function initializeIslands(
|
|
|
108
110
|
// Loading indicator: dim islands while Pyodide initializes
|
|
109
111
|
store.sub(shouldShowIslandsWarningIndicatorAtom, () => {
|
|
110
112
|
const showing = store.get(shouldShowIslandsWarningIndicatorAtom);
|
|
113
|
+
const currentIslands = root.querySelectorAll<HTMLElement>(
|
|
114
|
+
ISLAND_TAG_NAMES.ISLAND,
|
|
115
|
+
);
|
|
111
116
|
if (showing) {
|
|
112
117
|
toastIslandsLoading();
|
|
113
|
-
for (const island of
|
|
118
|
+
for (const island of currentIslands) {
|
|
114
119
|
island.style.setProperty("opacity", "0.5");
|
|
115
120
|
}
|
|
116
121
|
} else {
|
|
117
122
|
dismissIslandsLoadingToast();
|
|
118
|
-
for (const island of
|
|
123
|
+
for (const island of currentIslands) {
|
|
119
124
|
island.style.removeProperty("opacity");
|
|
120
125
|
}
|
|
121
126
|
}
|
|
@@ -126,10 +131,13 @@ export async function initializeIslands(
|
|
|
126
131
|
// the envelope and the payload carry the op. The bridge types the message
|
|
127
132
|
// as NotificationPayload (just {data}), but the actual wire format
|
|
128
133
|
// includes the outer op too.
|
|
129
|
-
|
|
134
|
+
// Worker metadata identifies the session that emitted the message.
|
|
135
|
+
bridge.consumeMessages(({ message, sessionGeneration }) => {
|
|
130
136
|
handleMessage(
|
|
131
137
|
message as unknown as JsonString<IslandsNotificationMessage>,
|
|
132
138
|
actions,
|
|
139
|
+
store,
|
|
140
|
+
sessionGeneration,
|
|
133
141
|
);
|
|
134
142
|
});
|
|
135
143
|
|
|
@@ -158,9 +166,12 @@ type IslandsNotificationMessage = {
|
|
|
158
166
|
*
|
|
159
167
|
* Wire format from Python: {"op": "<name>", "data": {"op": "<name>", ...}}
|
|
160
168
|
*/
|
|
169
|
+
// oxlint-disable-next-line marimo/prefer-object-params
|
|
161
170
|
function handleMessage(
|
|
162
171
|
message: JsonString<IslandsNotificationMessage>,
|
|
163
172
|
actions: NotebookActions,
|
|
173
|
+
store: Store,
|
|
174
|
+
sessionGeneration: number,
|
|
164
175
|
): void {
|
|
165
176
|
try {
|
|
166
177
|
const msg = jsonParseWithSpecialChar(message);
|
|
@@ -189,7 +200,6 @@ function handleMessage(
|
|
|
189
200
|
case "storage-download-ready":
|
|
190
201
|
case "secret-keys-result":
|
|
191
202
|
case "startup-logs":
|
|
192
|
-
case "completed-run":
|
|
193
203
|
case "interrupted":
|
|
194
204
|
case "reconnected":
|
|
195
205
|
case "cache-cleared":
|
|
@@ -198,6 +208,17 @@ function handleMessage(
|
|
|
198
208
|
case "notebook-document-transaction":
|
|
199
209
|
return;
|
|
200
210
|
|
|
211
|
+
case "completed-run":
|
|
212
|
+
store.set(islandsPendingInitialRunsAtom, (pending) => {
|
|
213
|
+
if (!pending?.has(sessionGeneration)) {
|
|
214
|
+
return pending;
|
|
215
|
+
}
|
|
216
|
+
const next = new Set(pending);
|
|
217
|
+
next.delete(sessionGeneration);
|
|
218
|
+
return next;
|
|
219
|
+
});
|
|
220
|
+
return;
|
|
221
|
+
|
|
201
222
|
case "kernel-ready":
|
|
202
223
|
handleKernelReady(msg.data, {
|
|
203
224
|
autoInstantiate: true,
|
|
@@ -208,7 +229,9 @@ function handleMessage(
|
|
|
208
229
|
setKernelState: Functions.NOOP,
|
|
209
230
|
onError: Logger.error,
|
|
210
231
|
});
|
|
211
|
-
|
|
232
|
+
if (!window.customElements?.get(ISLAND_TAG_NAMES.ISLAND)) {
|
|
233
|
+
defineCustomElement(ISLAND_TAG_NAMES.ISLAND, MarimoIslandElement);
|
|
234
|
+
}
|
|
212
235
|
return;
|
|
213
236
|
|
|
214
237
|
case "send-ui-element-message":
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
import { getWorkerRPC } from "@/core/wasm/rpc";
|
|
5
5
|
import { Deferred } from "@/utils/Deferred";
|
|
6
6
|
import { throwNotImplemented } from "@/utils/functions";
|
|
7
|
-
import type { JsonString } from "@/utils/json/base64";
|
|
8
7
|
import { Logger } from "@/utils/Logger";
|
|
9
8
|
import { generateUUID } from "@/utils/uuid";
|
|
10
|
-
import
|
|
9
|
+
import { initialNotebookState, notebookAtom } from "../cells/cells";
|
|
10
|
+
import type { CommandMessage } from "../kernel/messages";
|
|
11
11
|
import type { EditRequests, RunRequests } from "../network/types";
|
|
12
12
|
import { store as defaultStore } from "../state/jotai";
|
|
13
13
|
import { getMarimoExportContext } from "../static/export-context";
|
|
14
14
|
import { createMarimoFile, parseMarimoIslandApps } from "./parse";
|
|
15
|
-
import { islandsInitializedAtom } from "./state";
|
|
16
|
-
import type { WorkerSchema } from "./worker/worker";
|
|
15
|
+
import { islandsInitializedAtom, islandsPendingInitialRunsAtom } from "./state";
|
|
16
|
+
import type { IslandsKernelMessage, WorkerSchema } from "./worker/worker";
|
|
17
17
|
import type { WorkerFactory } from "./worker-factory";
|
|
18
18
|
import { DefaultWorkerFactory } from "./worker-factory";
|
|
19
19
|
|
|
@@ -35,11 +35,12 @@ export interface IslandsBridgeConfig {
|
|
|
35
35
|
* Optional root element for parsing islands (for testing)
|
|
36
36
|
*/
|
|
37
37
|
root?: Document | Element;
|
|
38
|
+
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
interface AppSession {
|
|
41
|
+
appId: string;
|
|
42
|
+
code?: string;
|
|
43
|
+
sessionGeneration: number;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -51,25 +52,28 @@ export interface IslandsBridgeConfig {
|
|
|
51
52
|
* @example
|
|
52
53
|
* ```ts
|
|
53
54
|
* const bridge = new IslandsPyodideBridge();
|
|
54
|
-
* await bridge.initialized;
|
|
55
55
|
* bridge.consumeMessages(message => console.log(message));
|
|
56
|
+
* await bridge.initializeApps();
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
59
|
export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
59
60
|
private rpc: ReturnType<typeof getWorkerRPC<WorkerSchema>>;
|
|
60
61
|
private messageConsumer:
|
|
61
|
-
| ((message:
|
|
62
|
+
| ((message: IslandsKernelMessage) => void)
|
|
62
63
|
| undefined;
|
|
63
64
|
private readonly store: typeof defaultStore;
|
|
64
65
|
private readonly root: Document | Element;
|
|
65
|
-
private
|
|
66
|
+
private session: AppSession | undefined;
|
|
67
|
+
private sessionReady = new Deferred<AppSession>();
|
|
68
|
+
private nextSessionGeneration = 0;
|
|
69
|
+
private appTransition = Promise.resolve();
|
|
70
|
+
private workerReady = new Deferred<void>();
|
|
66
71
|
|
|
67
72
|
public initialized = new Deferred<void>();
|
|
68
73
|
|
|
69
74
|
constructor(config: IslandsBridgeConfig = {}) {
|
|
70
75
|
this.store = config.store || defaultStore;
|
|
71
76
|
this.root = config.root || document;
|
|
72
|
-
this.autoStartSessions = config.autoStartSessions ?? true;
|
|
73
77
|
|
|
74
78
|
try {
|
|
75
79
|
const factory = config.workerFactory || new DefaultWorkerFactory();
|
|
@@ -88,9 +92,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
88
92
|
*/
|
|
89
93
|
private setupMessageListeners(): void {
|
|
90
94
|
this.rpc.addMessageListener("ready", () => {
|
|
91
|
-
|
|
92
|
-
this.startSessionsForAllApps();
|
|
93
|
-
}
|
|
95
|
+
this.workerReady.resolve();
|
|
94
96
|
});
|
|
95
97
|
|
|
96
98
|
this.rpc.addMessageListener("initialized", () => {
|
|
@@ -107,19 +109,21 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
107
109
|
},
|
|
108
110
|
);
|
|
109
111
|
|
|
110
|
-
this.rpc.addMessageListener(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.messageConsumer?.(message);
|
|
114
|
-
},
|
|
115
|
-
);
|
|
112
|
+
this.rpc.addMessageListener("kernelMessage", (message) => {
|
|
113
|
+
this.messageConsumer?.(message);
|
|
114
|
+
});
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
async initializeApps(): Promise<void> {
|
|
118
|
+
await this.enqueueAppTransition(async () => {
|
|
119
|
+
await this.workerReady.promise;
|
|
120
|
+
await this.startApps();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private async startApps(): Promise<void> {
|
|
125
|
+
const apps = parseMarimoIslandApps(this.root, { materialize: false });
|
|
126
|
+
const managesSingleApp = apps.length === 1;
|
|
123
127
|
Logger.debug(
|
|
124
128
|
`Starting sessions for ${apps.length} app(s):`,
|
|
125
129
|
apps.map((a) => `${a.id} (${a.cells.length} cells)`),
|
|
@@ -132,31 +136,105 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
132
136
|
? getMarimoExportContext()
|
|
133
137
|
: undefined;
|
|
134
138
|
const notebookCode = exportContext?.notebookCode;
|
|
139
|
+
const singleApp = managesSingleApp ? apps[0] : undefined;
|
|
140
|
+
const singleAppFile = singleApp
|
|
141
|
+
? notebookCode || createMarimoFile(singleApp)
|
|
142
|
+
: undefined;
|
|
143
|
+
if (
|
|
144
|
+
singleApp &&
|
|
145
|
+
this.session?.appId === singleApp.id &&
|
|
146
|
+
this.session.code === singleAppFile
|
|
147
|
+
) {
|
|
148
|
+
parseMarimoIslandApps(this.root);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (apps.length > 0) {
|
|
152
|
+
this.store.set(
|
|
153
|
+
islandsPendingInitialRunsAtom,
|
|
154
|
+
new Set(apps.map((_, index) => this.nextSessionGeneration + index + 1)),
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
parseMarimoIslandApps(this.root);
|
|
135
158
|
for (const app of apps) {
|
|
136
|
-
const file =
|
|
159
|
+
const file = singleAppFile || createMarimoFile(app);
|
|
137
160
|
Logger.debug(`App ${app.id} marimo file:\n`, file);
|
|
138
|
-
|
|
161
|
+
const request = {
|
|
139
162
|
code: file,
|
|
140
163
|
appId: app.id,
|
|
141
|
-
|
|
164
|
+
sessionGeneration: ++this.nextSessionGeneration,
|
|
165
|
+
};
|
|
166
|
+
const previousSession = this.session;
|
|
167
|
+
const replacesSession = managesSingleApp && previousSession !== undefined;
|
|
168
|
+
if (replacesSession) {
|
|
169
|
+
this.store.set(notebookAtom, initialNotebookState());
|
|
170
|
+
}
|
|
171
|
+
if (managesSingleApp || !previousSession) {
|
|
172
|
+
if (managesSingleApp && this.sessionReady.status !== "pending") {
|
|
173
|
+
this.sessionReady = new Deferred<AppSession>();
|
|
174
|
+
}
|
|
175
|
+
this.session = {
|
|
176
|
+
...request,
|
|
177
|
+
code: managesSingleApp ? file : undefined,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const operation = replacesSession
|
|
181
|
+
? this.rpc.proxy.request.replaceSession(request)
|
|
182
|
+
: this.startSession(request);
|
|
183
|
+
try {
|
|
184
|
+
await operation;
|
|
185
|
+
if (this.sessionReady.status === "pending" && this.session) {
|
|
186
|
+
this.sessionReady.resolve(this.session);
|
|
187
|
+
}
|
|
188
|
+
} catch (error) {
|
|
189
|
+
if (this.session?.sessionGeneration === request.sessionGeneration) {
|
|
190
|
+
this.session = previousSession;
|
|
191
|
+
}
|
|
142
192
|
Logger.error(`Failed to start session for app ${app.id}:`, error);
|
|
143
|
-
|
|
193
|
+
if (managesSingleApp) {
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
144
197
|
}
|
|
145
198
|
}
|
|
146
199
|
|
|
200
|
+
async stopSession(appId?: string): Promise<void> {
|
|
201
|
+
await this.enqueueAppTransition(async () => {
|
|
202
|
+
const session = this.session;
|
|
203
|
+
if (session?.code === undefined || (appId && session.appId !== appId)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
await this.rpc.proxy.request.stopSession({
|
|
207
|
+
appId: session.appId,
|
|
208
|
+
sessionGeneration: session.sessionGeneration,
|
|
209
|
+
});
|
|
210
|
+
this.store.set(islandsPendingInitialRunsAtom, null);
|
|
211
|
+
this.session = undefined;
|
|
212
|
+
this.sessionReady = new Deferred<AppSession>();
|
|
213
|
+
this.store.set(notebookAtom, initialNotebookState());
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private enqueueAppTransition(operation: () => Promise<void>): Promise<void> {
|
|
218
|
+
const result = this.appTransition.then(operation);
|
|
219
|
+
this.appTransition = result.catch(() => undefined);
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
|
|
147
223
|
/**
|
|
148
224
|
* Starts a new Python session for an app
|
|
149
225
|
*/
|
|
150
|
-
async startSession(opts: {
|
|
226
|
+
async startSession(opts: {
|
|
227
|
+
code: string;
|
|
228
|
+
appId: string;
|
|
229
|
+
sessionGeneration: number;
|
|
230
|
+
}): Promise<void> {
|
|
151
231
|
await this.rpc.proxy.request.startSession(opts);
|
|
152
232
|
}
|
|
153
233
|
|
|
154
234
|
/**
|
|
155
235
|
* Sets up a consumer for kernel messages
|
|
156
236
|
*/
|
|
157
|
-
consumeMessages(
|
|
158
|
-
consumer: (message: JsonString<NotificationPayload>) => void,
|
|
159
|
-
): void {
|
|
237
|
+
consumeMessages(consumer: (message: IslandsKernelMessage) => void): void {
|
|
160
238
|
this.messageConsumer = consumer;
|
|
161
239
|
this.rpc.proxy.send.consumerReady({});
|
|
162
240
|
}
|
|
@@ -203,11 +281,19 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
203
281
|
// ============================================================================
|
|
204
282
|
|
|
205
283
|
sendRun: EditRequests["sendRun"] = async (request): Promise<null> => {
|
|
206
|
-
await this.
|
|
207
|
-
await this.
|
|
208
|
-
|
|
209
|
-
|
|
284
|
+
const session = await this.getActiveSession();
|
|
285
|
+
await this.rpc.proxy.request.loadPackages({
|
|
286
|
+
appId: session.appId,
|
|
287
|
+
code: request.codes.join("\n"),
|
|
288
|
+
sessionGeneration: session.sessionGeneration,
|
|
210
289
|
});
|
|
290
|
+
await this.putControlRequest(
|
|
291
|
+
{
|
|
292
|
+
type: "execute-cells",
|
|
293
|
+
...request,
|
|
294
|
+
},
|
|
295
|
+
session,
|
|
296
|
+
);
|
|
211
297
|
return null;
|
|
212
298
|
};
|
|
213
299
|
|
|
@@ -216,6 +302,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
216
302
|
// ============================================================================
|
|
217
303
|
|
|
218
304
|
getUsageStats = throwNotImplemented;
|
|
305
|
+
getEnvironmentInfo = throwNotImplemented;
|
|
219
306
|
sendRename = throwNotImplemented;
|
|
220
307
|
sendSave = throwNotImplemented;
|
|
221
308
|
sendCopy = throwNotImplemented;
|
|
@@ -278,13 +365,27 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
278
365
|
|
|
279
366
|
// The kernel uses msgspec to parse control requests, which requires a 'type'
|
|
280
367
|
// field for discriminated union deserialization.
|
|
281
|
-
private async putControlRequest(
|
|
368
|
+
private async putControlRequest(
|
|
369
|
+
operation: CommandMessage,
|
|
370
|
+
session?: AppSession,
|
|
371
|
+
): Promise<void> {
|
|
372
|
+
session ??= await this.getActiveSession();
|
|
282
373
|
await this.rpc.proxy.request.bridge({
|
|
374
|
+
appId: session.appId,
|
|
283
375
|
functionName: "put_control_request",
|
|
284
376
|
payload: operation,
|
|
377
|
+
sessionGeneration: session.sessionGeneration,
|
|
285
378
|
});
|
|
286
379
|
}
|
|
287
380
|
|
|
381
|
+
private async getActiveSession(): Promise<AppSession> {
|
|
382
|
+
const transition = this.appTransition;
|
|
383
|
+
const session = this.session;
|
|
384
|
+
const ready = this.sessionReady;
|
|
385
|
+
await transition;
|
|
386
|
+
return session ?? ready.promise;
|
|
387
|
+
}
|
|
388
|
+
|
|
288
389
|
/**
|
|
289
390
|
* Cleans up resources (for testing)
|
|
290
391
|
*/
|