@marimo-team/islands 0.21.2-dev1 → 0.21.2-dev101
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/{Combination-BBPQRrDo.js → Combination-B--d1_LV.js} +10 -10
- package/dist/{ConnectedDataExplorerComponent-D0GoOd_c.js → ConnectedDataExplorerComponent-CTfvzyMi.js} +85 -85
- package/dist/{ImageComparisonComponent-BYQfAfSR.js → ImageComparisonComponent-B5q26YVi.js} +1 -1
- package/dist/{Plot-DfUav0o0.js → Plot-syRHsk-l.js} +1 -1
- package/dist/_basePickBy-DEctY8Qy.js +117 -0
- package/dist/_baseSet-Bk810b_4.js +20 -0
- package/dist/_baseUniq-B1NzzhU7.js +557 -0
- package/dist/{any-language-editor-DlsjUw_l.js → any-language-editor-Bj-3432h.js} +22 -21
- package/dist/apl-Y7yFAg6_.js +4 -0
- package/dist/{arc-DXxE-tFl.js → arc-CEWBr4jc.js} +2 -2
- package/dist/architecture-7HQA4BMR-SvLOcNCN.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-Df0FNeBR.js → architectureDiagram-VXUJARFQ-BKlUkb-q.js} +19 -19
- package/dist/arrays--2cd0hte.js +59 -0
- package/dist/asciiarmor-Bl8b2p0w.js +4 -0
- package/dist/asn1-BF6cywqm.js +4 -0
- package/dist/{blockDiagram-VD42YOAC-DszWqlLz.js → blockDiagram-VD42YOAC-DvgBlX1D.js} +14 -14
- package/dist/brainfuck-BuqydWe3.js +4 -0
- package/dist/{button-BKkuUpZh.js → button-qsiIHncQ.js} +17 -13
- package/dist/{c4Diagram-YG6GDRKO-Dyj8LoUX.js → c4Diagram-YG6GDRKO-BN-xpNUK.js} +6 -6
- package/dist/capabilities-BC3mzKnw.js +36 -0
- package/dist/{channel-CUFaIkTh.js → channel-Dz_ka_DS.js} +1 -1
- package/dist/chat-ui-BvK3aDSR.js +7709 -0
- package/dist/{check-Diwc5emq.js → check-D_YwHEgY.js} +1 -1
- package/dist/{chunk-4BX2VUAB-CwMMQLZ_.js → chunk-4BX2VUAB-BChPAwlt.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-CRwwZ2ED.js → chunk-4F5CHEZ2-9eJ5uB6a.js} +1 -1
- package/dist/{chunk-55IACEB6-Dj8CzJvE.js → chunk-55IACEB6-wWyiO7Qo.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-BkzUmppO.js → chunk-5FQGJX7Z-DHiDX6JT.js} +1504 -2846
- package/dist/{chunk-ABZYJK2D-7QYXAAhe.js → chunk-ABZYJK2D-DYZpeLRO.js} +3 -3
- package/dist/{chunk-ATLVNIR6-pmHPAPSd.js → chunk-ATLVNIR6-9VSIMo3q.js} +2 -2
- package/dist/{chunk-B2363JML-BuBMltZc.js → chunk-B2363JML-CkfqLBeZ.js} +1 -1
- package/dist/{chunk-B4BG7PRW-Dbta9cTX.js → chunk-B4BG7PRW-CyIVj-RO.js} +7 -7
- package/dist/{chunk-CVBHYZKI-D8iwHsLF.js → chunk-CVBHYZKI-DqdOZevv.js} +1 -1
- package/dist/{chunk-DI55MBZ5-DyKB35wC.js → chunk-DI55MBZ5-kmoX4_PJ.js} +6 -6
- package/dist/{chunk-EXTU4WIE-BRFl4iNd.js → chunk-EXTU4WIE-anbpETeD.js} +2 -2
- package/dist/{chunk-FMBD7UC4-XTL4xAvH.js → chunk-FMBD7UC4-WPL5C7Yr.js} +1 -1
- package/dist/{chunk-FRFDVMJY-Bk2LD5Te.js → chunk-FRFDVMJY-DiBbw2aO.js} +1 -1
- package/dist/{chunk-HN2XXSSU-CzO5Phf0.js → chunk-HN2XXSSU-GC9oeSst.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-BkrY9SdL.js → chunk-JA3XYJ7Z-DT9thFja.js} +3 -3
- package/dist/{chunk-JZLCHNYA-Bk_Lil-q.js → chunk-JZLCHNYA-CoUG-3_5.js} +6 -6
- package/dist/{chunk-MI3HLSF2-DvCKDmpi.js → chunk-MI3HLSF2-CAUClZTk.js} +1 -1
- package/dist/{chunk-N4CR4FBY-f5n6meOd.js → chunk-N4CR4FBY-CgZCueW4.js} +7 -7
- package/dist/{chunk-PL6DKKU2-DiFkzMfM.js → chunk-PL6DKKU2-B93gSUY5.js} +1 -1
- package/dist/{chunk-QN33PNHL-CXfJywHv.js → chunk-QN33PNHL-T-uF7h40.js} +2 -2
- package/dist/{chunk-QXUST7PY-D7-26sj3.js → chunk-QXUST7PY-D1a8s9iP.js} +10 -10
- package/dist/{chunk-QZHKN3VN-CYbwZKgJ.js → chunk-QZHKN3VN-cTJMhkeY.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-BRT9vd1R.js → chunk-S3R3BYOJ-KAv7zltL.js} +6 -6
- package/dist/{chunk-SJTYNZTY-BvVkbShU.js → chunk-SJTYNZTY-CxP2rIlm.js} +1 -1
- package/dist/{chunk-TCCFYFTB-DqxhgXG0.js → chunk-TCCFYFTB-BrhaBdR8.js} +18 -14
- package/dist/{chunk-TQ3KTPDO-CPkEruAA.js → chunk-TQ3KTPDO-C0j_j938.js} +1 -1
- package/dist/{chunk-TZMSLE5B-DSfBOnzx.js → chunk-TZMSLE5B-BY2BhygM.js} +3 -3
- package/dist/{chunk-UMXZTB3W-C4ypIY3V.js → chunk-UMXZTB3W-BDwe1tzK.js} +1 -1
- package/dist/classDiagram-2ON5EDUG-LT-Hu_dE.js +30 -0
- package/dist/classDiagram-v2-WZHVMYZB-G4qrOqlY.js +30 -0
- package/dist/{clike-CLJYUAWw.js → clike-D8Yzpo0X.js} +1 -1
- package/dist/clojure-CAHAWK5H.js +4 -0
- package/dist/{clone-CEQ-pda1.js → clone-DgKKB0qR.js} +1 -1
- package/dist/cmake-BogDc4GF.js +4 -0
- package/dist/cobol-DRnpeU4u.js +4 -0
- package/dist/{code-block-37QAKDTI-DV_ZyoUh.js → code-block-37QAKDTI-CdeP6GC3.js} +2 -2
- package/dist/coffeescript-9MgX7RN8.js +4 -0
- package/dist/commonlisp-CVz2KONN.js +4 -0
- package/dist/{constants-CytQ_3LM.js → constants-CXiS0vdr.js} +3 -3
- package/dist/{copy-DIK6DiIA.js → copy-CBo9JcJW.js} +14 -4
- package/dist/{cose-bilkent-S5V4N54A-BCDTZDay.js → cose-bilkent-S5V4N54A-CFYo67PX.js} +2 -2
- package/dist/crystal-td8mwLG5.js +4 -0
- package/dist/css-BK451dBn.js +4 -0
- package/dist/cypher-DuNPR6Ie.js +4 -0
- package/dist/d-DL6oP_-2.js +4 -0
- package/dist/{dagre-6UL2VRFP-DGEbtmgU.js → dagre-6UL2VRFP-CblBywCi.js} +33 -33
- package/dist/{dagre-BVnNvbvD.js → dagre-lLfkMavw.js} +37 -16
- package/dist/{data-grid-overlay-editor-BD0BFHzy.js → data-grid-overlay-editor-nQBPvGNe.js} +3 -3
- package/dist/{diagram-PSM6KHXK-CG_usglE.js → diagram-PSM6KHXK-CEWNAeex.js} +22 -22
- package/dist/{diagram-QEK2KX5R-CtGFEwzJ.js → diagram-QEK2KX5R-DvNPI6r6.js} +17 -17
- package/dist/{diagram-S2PKOQOG-ClKAGmbv.js → diagram-S2PKOQOG-Bd8sWp1V.js} +17 -17
- package/dist/diff-D9CplOBj.js +4 -0
- package/dist/{dist-CseYuPtL.js → dist-5XnuIjzQ.js} +2 -2
- package/dist/{dist-lNe4i1Nm.js → dist-B4HRhSlD.js} +1 -1
- package/dist/{dist-i-ud9aCA.js → dist-B5pakFbT.js} +1 -1
- package/dist/{dist-D5NMgbbv.js → dist-B7Wxocl4.js} +2 -2
- package/dist/{dist-CPlGUbk-.js → dist-B7pzGu3v.js} +2 -2
- package/dist/dist-BKKbDTix.js +550 -0
- package/dist/dist-BOx8CJbo.js +5 -0
- package/dist/dist-BYoWtcAc.js +5 -0
- package/dist/dist-BaGdTXK1.js +5 -0
- package/dist/dist-BhGA2ia0.js +8 -0
- package/dist/{dist-BUrWeMEP.js → dist-BmqJ8_Hr.js} +1 -1
- package/dist/{dist-BGZ7TWS9.js → dist-BnCNDnA7.js} +3 -3
- package/dist/{dist-BpMlUdNO.js → dist-BnIjtwRq.js} +3 -3
- package/dist/dist-BoHuwe5C.js +5 -0
- package/dist/{dist-Bq5eYK43.js → dist-BqO6WmbK.js} +2 -2
- package/dist/{dist-DUretbKK.js → dist-C-8pSTml.js} +2 -2
- package/dist/{dist-D4gcY469.js → dist-C6R5LnmH.js} +2 -2
- package/dist/{dist-Ux6dL_VB.js → dist-CD0aazOL.js} +1 -1
- package/dist/{dist-C4K7pumm.js → dist-CDXh0OSg.js} +2 -2
- package/dist/dist-CJ-2wW2z.js +8 -0
- package/dist/{dist-DOoqn-VL.js → dist-CORAUsE1.js} +71 -37
- package/dist/{dist-HoZO6brh.js → dist-C_tLMuB0.js} +2 -2
- package/dist/dist-Ccbo2rCF.js +8 -0
- package/dist/{dist-COpDrwi-.js → dist-CgCO1-j-.js} +1 -1
- package/dist/{dist-Cl5iM8xL.js → dist-Ck4gp1Wp.js} +3 -3
- package/dist/dist-CwayJLIO.js +5 -0
- package/dist/dist-D-jpfI6q.js +6 -0
- package/dist/{dist-C0Rnbr-_.js → dist-D2Rk1j4R.js} +4 -4
- package/dist/{dist-DERtJN02.js → dist-DFBgTyQ4.js} +2 -2
- package/dist/{dist-CDHl2i1x.js → dist-DInzmbT2.js} +4 -4
- package/dist/{dist-CSEWGuDq.js → dist-DJ3EjUNc.js} +1 -1
- package/dist/{dist-RNGn_-uD.js → dist-DM6PPTtq.js} +1 -1
- package/dist/{dist-DodLQWPg.js → dist-DS6k03oP.js} +1 -1
- package/dist/dist-DShjplLu.js +8 -0
- package/dist/{dist-BFxYppVR.js → dist-DUY_SIWT.js} +4 -4
- package/dist/dist-DhBqFguQ.js +5 -0
- package/dist/dist-DiCgMCy4.js +6 -0
- package/dist/{dist-CAKwXCWI.js → dist-DqWKkHpR.js} +2 -2
- package/dist/dist-Dqa-QKVa.js +5 -0
- package/dist/{dist-BSfYc7vq.js → dist-DqezbmBd.js} +2 -2
- package/dist/{dist-gc9KgJuA.js → dist-Dv7FDx1_.js} +1 -1
- package/dist/dist-OFv2DOPe.js +5 -0
- package/dist/{dist-D_-CGmlh.js → dist-_k5rxRQI.js} +2 -2
- package/dist/{dist-B9EjSb9T.js → dist-n5m_P2Mr.js} +1 -1
- package/dist/{dist-Bq9zYwJs.js → dist-nggqqIVv.js} +5 -5
- package/dist/{dist-DEj2X26M.js → dist-xzh9kCE-.js} +2 -2
- package/dist/{dockerfile-BxhYdLHL.js → dockerfile-m9DOSpI5.js} +1 -1
- package/dist/dtd-Ce1c54UO.js +4 -0
- package/dist/dylan-B43wjIwg.js +4 -0
- package/dist/ecl-DK-fZmir.js +4 -0
- package/dist/eiffel-CNuvvPqD.js +4 -0
- package/dist/elm-DZEkBjgQ.js +4 -0
- package/dist/{erDiagram-Q2GNP2WA-DPMseVVp.js → erDiagram-Q2GNP2WA-C5bM6dcx.js} +15 -15
- package/dist/erlang-Dw4PDZV_.js +4 -0
- package/dist/{error-banner-Dmi5ujan.js → error-banner-DkDzvax3.js} +26 -26
- package/dist/esm-BBsFNcPe.js +1587 -0
- package/dist/esm-C9_jY_wu.js +2805 -0
- package/dist/factor-C9JRv63g.js +4 -0
- package/dist/{factor-Png_OsVt.js → factor-Nva0iSXt.js} +1 -1
- package/dist/{flowDiagram-NV44I4VS-BpAIFwW7.js → flowDiagram-NV44I4VS-CULNNnl6.js} +17 -17
- package/dist/forth-CKhoqn4e.js +4 -0
- package/dist/fortran-Do51bToK.js +4 -0
- package/dist/{ganttDiagram-JELNMOA3-DXYghZ9C.js → ganttDiagram-JELNMOA3-DIi-PAjP.js} +10 -10
- package/dist/gas-BZfL3Uwh.js +4 -0
- package/dist/get-CqYRpAGT.js +68 -0
- package/dist/gherkin-BwQh4ehw.js +4 -0
- package/dist/{gitGraph-G5XIXVHT-ChHUSAop.js → gitGraph-G5XIXVHT-S7ypWRtz.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-CBL-7g3_.js → gitGraphDiagram-V2S2FVAM-BGDZsLhF.js} +17 -17
- package/dist/{glide-data-editor-pZyd9UJ_.js → glide-data-editor-D0IYL4_F.js} +96 -95
- package/dist/graphlib-TFMRsJse.js +225 -0
- package/dist/groovy-CG5kCGiv.js +4 -0
- package/dist/haskell-BKii9uTg.js +4 -0
- package/dist/haxe-Bsz30J8x.js +5 -0
- package/dist/idl-BlxgaPKj.js +4 -0
- package/dist/{info-VBDWY6EO-CwyXEo8E.js → info-VBDWY6EO-CRCLLsdb.js} +3 -3
- package/dist/infoDiagram-HS3SLOUP-fkZhmVE7.js +30 -0
- package/dist/{types-CGc7peZV.js → input-C5uUN4xL.js} +258 -455
- package/dist/isEmpty-D_Jzlmqv.js +42 -0
- package/dist/{isSymbol-Dyt2NSnN.js → isSymbol-DFp8040B.js} +1 -1
- package/dist/javascript-SNhUvTcB.js +4 -0
- package/dist/{journeyDiagram-XKPGCS4Q-D5BIjS4N.js → journeyDiagram-XKPGCS4Q-DUANVNzR.js} +7 -7
- package/dist/julia-CGZzaDyk.js +4 -0
- package/dist/{kanban-definition-3W4ZIXB7-DhDkqxFB.js → kanban-definition-3W4ZIXB7-dEyZPMAd.js} +12 -12
- package/dist/{katex-pyO_klYC.js → katex-Ckd8lBne.js} +1 -1
- package/dist/{label-BbpGrh4j.js → label-DwSVaniz.js} +75 -82
- package/dist/{line-C1k1rG3Z.js → line-LK_5q2B9.js} +3 -3
- package/dist/{linear-DIp6l9sg.js → linear-CJ6ctpF3.js} +4 -4
- package/dist/livescript-Cj6cX-Ys.js +4 -0
- package/dist/{loader-CABJs6GU.js → loader-DrMJeyDu.js} +29 -35
- package/dist/lua-BcVHrD8f.js +4 -0
- package/dist/main.js +40319 -75347
- package/dist/mathematica-DLY8ZGoJ.js +4 -0
- package/dist/mbox-BNTsMWS5.js +4 -0
- package/dist/{memoize-Cs8aS5RW.js → memoize-CwWm-NpB.js} +1 -1
- package/dist/{merge-NuyC7LN7.js → merge-Byt9w-nO.js} +1 -1
- package/dist/mermaid-4DMBBIKO-C2ajbN0u.js +6 -0
- package/dist/{mermaid-CrKqsE2j.js → mermaid-Bwy7OYzI.js} +50 -50
- package/dist/{mermaid-parser.core-OkWZ8nr-.js → mermaid-parser.core-DDGHdNnp.js} +8 -8
- package/dist/{mhchem-DckvwtV8.js → mhchem-DAXq6Zll.js} +1 -1
- package/dist/micromark-factory-space-YUxUai1y.js +1341 -0
- package/dist/{mindmap-definition-VGOIOE7T-BxQi78Vl.js → mindmap-definition-VGOIOE7T-jZ7-PfhM.js} +14 -14
- package/dist/mirc-oyeOBir2.js +4 -0
- package/dist/mllike-ByxznKQw.js +6 -0
- package/dist/modelica-DNLhoyD8.js +4 -0
- package/dist/mscgen-DkZltsli.js +6 -0
- package/dist/mumps-TTiQB1xv.js +4 -0
- package/dist/{now-BC2mX0ZT.js → now-uNLDfbuW.js} +1 -1
- package/dist/{nsis-BrAITej_.js → nsis-DgKbDAVQ.js} +1 -1
- package/dist/nsis-RT1O1Ph8.js +4 -0
- package/dist/ntriples-CxsCiZ7Z.js +4 -0
- package/dist/{number-overlay-editor-CQrncFlP.js → number-overlay-editor-BqzX9dHu.js} +1 -1
- package/dist/octave-CkLh5tpW.js +4 -0
- package/dist/once-BfpiMcdf.js +26 -0
- package/dist/{ordinal-Dcvf4J1m.js → ordinal-COPPjmMz.js} +1 -1
- package/dist/oz-yI7U9eVH.js +4 -0
- package/dist/{packet-DYOGHKS2-C62XQjZh.js → packet-DYOGHKS2-DPTC67cY.js} +3 -3
- package/dist/pascal-CQK8sfDe.js +4 -0
- package/dist/perl-BEG8-kZl.js +4 -0
- package/dist/{pie-VRWISCQL-nfAKQJw3.js → pie-VRWISCQL-DfbgsrV5.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-DfSJXUHa.js → pieDiagram-ADFJNKIX-BiAFdzOP.js} +22 -22
- package/dist/pig-DLLCqQaR.js +4 -0
- package/dist/powershell-CtjMkVO_.js +4 -0
- package/dist/{precisionRound-BAc-kQ3q.js → precisionRound-Duzbr5ur.js} +1 -1
- package/dist/process-output-CT8hHGp6.js +27986 -0
- package/dist/properties-Domeb57z.js +4 -0
- package/dist/protobuf-0yk85TV6.js +4 -0
- package/dist/pug-B-BiNkM-.js +4 -0
- package/dist/{pug-CH-17az-.js → pug-CTpLcc1b.js} +1 -1
- package/dist/puppet-C0N4vevK.js +4 -0
- package/dist/python-BZFa8G3C.js +4 -0
- package/dist/q-gcj7dgJv.js +4 -0
- package/dist/{quadrantDiagram-AYHSOK5B-CAcVWXc-.js → quadrantDiagram-AYHSOK5B-CZjWO4oG.js} +5 -5
- package/dist/r-DavzTuPU.js +4 -0
- package/dist/{radar-ZZBFDIW7-lopS8_4j.js → radar-ZZBFDIW7-B5Hwx2a8.js} +3 -3
- package/dist/react-vega-DfxWeueH.js +9 -0
- package/dist/{react-vega-C6kwcd86.js → react-vega-JMnqwKtN.js} +19 -19
- package/dist/{requirementDiagram-UZGBJVZJ-BU7dwzFM.js → requirementDiagram-UZGBJVZJ-D9PkMDa5.js} +14 -14
- package/dist/rpm-bPj31ya8.js +5 -0
- package/dist/ruby-3UzzijjE.js +4 -0
- package/dist/{sankeyDiagram-TZEHDZUN-BVJnR4_b.js → sankeyDiagram-TZEHDZUN-DuCG1ouO.js} +5 -5
- package/dist/sas-D9upmCP9.js +4 -0
- package/dist/scheme-DqWYzIFR.js +4 -0
- package/dist/{sequenceDiagram-WL72ISMW-CQcFQTwX.js → sequenceDiagram-WL72ISMW-BLJqizTv.js} +8 -8
- package/dist/shell-w63nkNmU.js +4 -0
- package/dist/sieve-Dz_ISrl6.js +4 -0
- package/dist/{slides-component-GkilRW21.js → slides-component-BsaaAy66.js} +3 -3
- package/dist/smalltalk-BXZ14pkr.js +4 -0
- package/dist/sparql-Boyc0wkb.js +4 -0
- package/dist/{spec-Bfvf9Hre.js → spec-BLAZSydG.js} +12 -422
- package/dist/{src-CHUphWwL.js → src-szye8OCw.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-Dx9AIGDe.js → stateDiagram-FKZM4ZOC-CmZfv4_-.js} +19 -19
- package/dist/stateDiagram-v2-4FDKWEC3-BpOH8Bgl.js +29 -0
- package/dist/{step-BbmiiQdf.js → step-1PmBKr2y.js} +1 -1
- package/dist/stex-DYK84lGq.js +4 -0
- package/dist/style.css +1 -1
- package/dist/stylus-m9L_f1X1.js +4 -0
- package/dist/swift-C4TGn99K.js +4 -0
- package/dist/tcl-D_L0cfYZ.js +4 -0
- package/dist/textile-BAofYdKN.js +4 -0
- package/dist/{time-DFFVNc1Q.js → time-B8tcX_hU.js} +4 -4
- package/dist/{timeline-definition-IT6M3QCI-D8B3p7ID.js → timeline-definition-IT6M3QCI-C7yv4fEk.js} +4 -4
- package/dist/toDate-BWaG12Pv.js +637 -0
- package/dist/{toNumber-CbZ70FdN.js → toNumber-xFPoy1OI.js} +2 -2
- package/dist/toml-DCDKACLL.js +4 -0
- package/dist/{tooltip-CKG75XQa.js → tooltip-DGHTbHl5.js} +4 -4
- package/dist/{treemap-GDKQZRPO-CkR-5ai2.js → treemap-GDKQZRPO-B_LAAEIM.js} +3 -3
- package/dist/troff-JHOU2VZK.js +4 -0
- package/dist/ttcn-Cxhng3qq.js +4 -0
- package/dist/ttcn-cfg-DJgUIu5n.js +4 -0
- package/dist/turtle-DKYkKZjV.js +4 -0
- package/dist/types-Dqw69fPc.js +202 -0
- package/dist/{useAsyncData-CEjJxwFB.js → useAsyncData-Dqt2tV1E.js} +2 -2
- package/dist/useDeepCompareMemoize-D2PKDkrk.js +85 -0
- package/dist/useIframeCapabilities-DlwLttZw.js +13 -0
- package/dist/useLifecycle-CJ_5Z4Mk.js +173 -0
- package/dist/{useTheme-CPybHVFN.js → useTheme-BIAKDAh6.js} +47 -12
- package/dist/vb-C9rpn9hN.js +4 -0
- package/dist/vbscript-BQ7rxQU0.js +4 -0
- package/dist/{vega-component-CuPTCRp5.js → vega-component-CTOT0vRO.js} +199 -198
- package/dist/{vega-loader.browser-CQ-lnUkI.js → vega-loader.browser-hMqVC9bf.js} +3 -3
- package/dist/velocity-C8WXmzLz.js +4 -0
- package/dist/verilog-BUXJEyEq.js +4 -0
- package/dist/vhdl-C18YIXfF.js +4 -0
- package/dist/webidl-D97EKzDx.js +4 -0
- package/dist/xquery-BZM6yzG2.js +4 -0
- package/dist/{xychartDiagram-PRI3JC2R-XO8FiQjU.js → xychartDiagram-PRI3JC2R-DC0-6FAB.js} +13 -13
- package/dist/yacas-CXKck-Ok.js +4 -0
- package/dist/z80-BbF6ykWc.js +4 -0
- package/package.json +4 -3
- package/src/__mocks__/notebook.ts +9 -9
- package/src/__mocks__/requests.ts +2 -1
- package/src/__tests__/branded.ts +20 -0
- package/src/__tests__/setup.ts +15 -0
- package/src/components/ai/ai-model-dropdown.tsx +1 -1
- package/src/components/app-config/__tests__/get-dirty-values.test.ts +1 -1
- package/src/components/app-config/get-dirty-values.ts +100 -0
- package/src/components/app-config/user-config-form.tsx +6 -101
- package/src/components/chat/acp/agent-panel.tsx +4 -2
- package/src/components/chat/acp/blocks.tsx +1 -2
- package/src/components/chat/acp/state.ts +1 -1
- package/src/components/chat/chat-utils.ts +7 -8
- package/src/components/chat/tool-call-accordion.tsx +1 -0
- package/src/components/data-table/TableActions.tsx +34 -60
- package/src/components/data-table/__tests__/columns.test.tsx +138 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +63 -0
- package/src/components/data-table/__tests__/utils.test.ts +138 -1
- package/src/components/data-table/charts/__tests__/storage.test.ts +7 -7
- package/src/components/data-table/charts/components/chart-items.tsx +1 -1
- package/src/components/data-table/charts/components/form-fields.tsx +1 -1
- package/src/components/data-table/charts/forms/common-chart.tsx +1 -1
- package/src/components/data-table/charts/storage.ts +1 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +24 -13
- package/src/components/data-table/column-header.tsx +1 -1
- package/src/components/data-table/columns.tsx +44 -4
- package/src/components/data-table/context-menu.tsx +9 -5
- package/src/components/data-table/data-table.tsx +24 -42
- package/src/components/data-table/download-actions.tsx +18 -18
- package/src/components/data-table/filters.ts +1 -0
- package/src/components/data-table/hooks/use-column-pinning.ts +1 -1
- package/src/components/data-table/hooks/use-panel-ownership.ts +15 -5
- package/src/components/data-table/hooks/use-scroll-container-height.ts +97 -0
- package/src/components/data-table/pagination.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +8 -2
- package/src/components/data-table/range-focus/__tests__/test-utils.ts +2 -0
- package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +119 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +82 -8
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +19 -0
- package/src/components/data-table/range-focus/utils.ts +50 -12
- package/src/components/data-table/renderers.tsx +103 -46
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +53 -44
- package/src/components/data-table/schemas.ts +7 -2
- package/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx +161 -0
- package/src/components/data-table/types.ts +21 -0
- package/src/components/data-table/utils.ts +87 -0
- package/src/components/datasources/datasources.tsx +46 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +8 -8
- package/src/components/editor/actions/useNotebookActions.tsx +2 -2
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +15 -15
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +16 -9
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +2 -2
- package/src/components/editor/connections/form-renderers.tsx +1 -1
- package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +2 -2
- package/src/components/editor/connections/storage/as-code.ts +2 -2
- package/src/components/editor/file-tree/file-explorer.tsx +16 -2
- package/src/components/editor/file-tree/file-viewer.tsx +17 -3
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +2 -2
- package/src/components/editor/navigation/__tests__/selection.test.ts +7 -6
- package/src/components/editor/navigation/__tests__/state.test.ts +8 -7
- package/src/components/editor/output/MarimoErrorOutput.tsx +7 -7
- package/src/components/editor/output/__tests__/traceback.test.tsx +4 -4
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +4 -4
- package/src/components/editor/package-alert.tsx +1 -1
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +2 -2
- package/src/components/editor/renderers/layout-select.tsx +2 -2
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +8 -1
- package/src/components/markdown/markdown-renderer.tsx +18 -2
- package/src/components/storage/storage-file-viewer.tsx +35 -1
- package/src/components/storage/storage-inspector.tsx +9 -4
- package/src/components/storage/storage-snippets.ts +3 -3
- package/src/components/tracing/tracing.tsx +3 -1
- package/src/components/ui/range-slider.tsx +108 -1
- package/src/components/variables/variables-table.tsx +1 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +9 -8
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +31 -31
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +3 -3
- package/src/core/ai/context/providers/__tests__/tables.test.ts +3 -2
- package/src/core/ai/context/providers/__tests__/variable.test.ts +84 -63
- package/src/core/ai/staged-cells.ts +6 -0
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +10 -9
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +6 -6
- package/src/core/ai/tools/edit-notebook-tool.ts +3 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +3 -3
- package/src/core/cells/__tests__/apply-transaction.test.ts +279 -0
- package/src/core/cells/__tests__/cells.test.ts +198 -135
- package/src/core/cells/__tests__/document-changes.test.ts +572 -0
- package/src/core/cells/__tests__/document-roundtrip.test.ts +376 -0
- package/src/core/cells/__tests__/focus.test.ts +5 -4
- package/src/core/cells/__tests__/logs.test.ts +13 -12
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +3 -3
- package/src/core/cells/__tests__/runs.test.ts +29 -24
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +8 -7
- package/src/core/cells/__tests__/session.test.ts +23 -22
- package/src/core/cells/cells.ts +36 -9
- package/src/core/cells/document-changes.ts +644 -0
- package/src/core/cells/ids.ts +5 -5
- package/src/core/cells/logs.ts +2 -2
- package/src/core/cells/runs.ts +6 -8
- package/src/core/codemirror/__tests__/format.test.ts +34 -36
- package/src/core/codemirror/__tests__/setup.test.ts +2 -2
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +114 -0
- package/src/core/codemirror/cells/__tests__/traceback-decorations.test.ts +33 -32
- package/src/core/codemirror/cells/extensions.ts +66 -23
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +15 -35
- package/src/core/codemirror/completion/keymap.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +12 -13
- package/src/core/codemirror/language/__tests__/utils.test.ts +3 -3
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +7 -8
- package/src/core/codemirror/language/languages/python.ts +4 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +4 -3
- package/src/core/codemirror/lsp/notebook-lsp.ts +28 -2
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +7 -6
- package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
- package/src/core/codemirror/rtc/extension.ts +1 -1
- package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +52 -0
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/datasets/__tests__/data-source.test.ts +93 -7
- package/src/core/datasets/data-source-connections.ts +44 -0
- package/src/core/datasets/request-registry.ts +13 -0
- package/src/core/datasets/state.ts +1 -1
- package/src/core/edit-app.tsx +0 -5
- package/src/core/errors/__tests__/errors.test.ts +2 -1
- package/src/core/export/__tests__/hooks.test.ts +37 -36
- package/src/core/islands/bridge.ts +2 -1
- package/src/core/islands/main.ts +5 -9
- package/src/core/kernel/__tests__/handlers.test.ts +5 -4
- package/src/core/kernel/handlers.ts +7 -4
- package/src/core/kernel/messages.ts +2 -0
- package/src/core/network/DeferredRequestRegistry.ts +2 -2
- package/src/core/network/__tests__/CachingRequestRegistry.test.ts +9 -10
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +4 -6
- package/src/core/network/requests-lazy.ts +2 -1
- package/src/core/network/requests-network.ts +11 -3
- package/src/core/network/requests-static.ts +2 -1
- package/src/core/network/requests-toasting.tsx +2 -1
- package/src/core/network/types.ts +7 -2
- package/src/core/rtc/state.ts +1 -1
- package/src/core/saving/state.ts +2 -1
- package/src/core/slots/slots.ts +1 -0
- package/src/core/state/jotai.ts +2 -1
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +8 -8
- package/src/core/static/virtual-file-tracker.ts +1 -1
- package/src/core/storage/__tests__/state.test.ts +31 -21
- package/src/core/storage/state.ts +1 -1
- package/src/core/variables/__tests__/state.test.ts +6 -6
- package/src/core/variables/types.ts +2 -2
- package/src/core/wasm/__tests__/state.test.ts +8 -8
- package/src/core/wasm/bridge.ts +11 -1
- package/src/core/websocket/useMarimoKernelConnection.tsx +33 -26
- package/src/css/app/fonts.css +6 -6
- package/src/css/md-tooltip.css +4 -39
- package/src/css/md.css +17 -0
- package/src/fonts/Fira_Mono/FiraMono-Bold.woff2 +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.woff2 +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.woff2 +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.woff2 +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.woff2 +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.woff2 +0 -0
- package/src/plugins/core/RenderHTML.tsx +17 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +45 -0
- package/src/plugins/core/sanitize-html.ts +25 -18
- package/src/plugins/impl/DataTablePlugin.tsx +69 -28
- package/src/plugins/impl/RangeSliderPlugin.tsx +1 -1
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/TextInputPlugin.tsx +97 -60
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +120 -0
- package/src/plugins/impl/anywidget/model.ts +1 -2
- package/src/plugins/impl/chat/ChatPlugin.tsx +6 -3
- package/src/plugins/impl/chat/chat-ui.tsx +2 -2
- package/src/plugins/impl/data-editor/components.tsx +1 -1
- package/src/plugins/impl/data-explorer/components/query-form.tsx +2 -2
- package/src/plugins/impl/data-explorer/functions/types.ts +1 -2
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
- package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +5 -2
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +9 -4
- package/src/plugins/impl/plotly/usePlotlyLayout.ts +2 -2
- package/src/plugins/impl/vega/loader.ts +3 -4
- package/src/plugins/impl/vega/params.ts +1 -1
- package/src/stories/cell.stories.tsx +8 -8
- package/src/stories/dataframe.stories.tsx +1 -1
- package/src/stories/layout/vertical/one-column.stories.tsx +9 -8
- package/src/stories/log-viewer.stories.tsx +8 -8
- package/src/stories/variables.stories.tsx +2 -2
- package/src/utils/__tests__/arrays.test.ts +118 -0
- package/src/utils/__tests__/createReducer.test.ts +2 -1
- package/src/utils/__tests__/download.test.tsx +21 -20
- package/src/utils/__tests__/objects.test.ts +34 -0
- package/src/utils/__tests__/strings.test.ts +27 -1
- package/src/utils/arrays.ts +67 -0
- package/src/utils/copy.ts +18 -5
- package/src/utils/createReducer.ts +46 -26
- package/src/utils/download.ts +4 -3
- package/src/utils/html-to-image.ts +6 -0
- package/src/utils/json/base64.ts +3 -3
- package/src/utils/objects.ts +14 -0
- package/src/utils/strings.ts +39 -19
- package/src/utils/traceback.ts +5 -3
- package/dist/_arrayReduce-BfFy684W.js +0 -9
- package/dist/_baseIsEqual-CvgsjYoW.js +0 -226
- package/dist/_basePickBy-pTDW2_2A.js +0 -47
- package/dist/_baseSlice-BrVixxuc.js +0 -10
- package/dist/_baseUniq-BUFhl85h.js +0 -59
- package/dist/_hasUnicode-C32WqUu7.js +0 -8
- package/dist/apl-lHFVoxx7.js +0 -4
- package/dist/architecture-7HQA4BMR-BmtmhGMc.js +0 -6
- package/dist/asciiarmor-DqCdZUHI.js +0 -4
- package/dist/asn1-DEcwtw-q.js +0 -4
- package/dist/brainfuck-Bro9Oz5x.js +0 -4
- package/dist/classDiagram-2ON5EDUG-DphiMW3Y.js +0 -30
- package/dist/classDiagram-v2-WZHVMYZB-BH1x5h4a.js +0 -30
- package/dist/clojure-B2uhdQPa.js +0 -4
- package/dist/cmake-B9WXyQcc.js +0 -4
- package/dist/cobol-CPD3EJfO.js +0 -4
- package/dist/coffeescript-KD9TnEnS.js +0 -4
- package/dist/commonlisp-DNEULz_Q.js +0 -4
- package/dist/crystal-DVPNgAPQ.js +0 -4
- package/dist/css-fq3a1AH1.js +0 -4
- package/dist/cypher-Dtzq0BP7.js +0 -4
- package/dist/d-DcZudIhJ.js +0 -4
- package/dist/diff-D9BPDC3o.js +0 -4
- package/dist/dist-B4MxkKHf.js +0 -8
- package/dist/dist-BYghZv6b.js +0 -5
- package/dist/dist-Be-uQhz5.js +0 -6
- package/dist/dist-CB_xf0ju.js +0 -5
- package/dist/dist-CK0qFAbF.js +0 -8
- package/dist/dist-CYEk-qrr.js +0 -8
- package/dist/dist-CmKoWpMk.js +0 -5
- package/dist/dist-D1nf4IQl.js +0 -5
- package/dist/dist-Df3AcKpt.js +0 -6
- package/dist/dist-DgaFHt_I.js +0 -5
- package/dist/dist-Dk10C3ui.js +0 -5
- package/dist/dist-DtyPVMHR.js +0 -5
- package/dist/dist-ko7WnHAO.js +0 -5
- package/dist/dist-of7gLRFK.js +0 -8
- package/dist/dtd-FhG-tVom.js +0 -4
- package/dist/dylan-HWpZOBPw.js +0 -4
- package/dist/ecl-B_rcje1I.js +0 -4
- package/dist/eiffel-oqHyHs6f.js +0 -4
- package/dist/elm-B62RQEds.js +0 -4
- package/dist/erlang-CjRjjA-B.js +0 -4
- package/dist/esm-BLobyqMs.js +0 -4387
- package/dist/factor-CGH_TnIV.js +0 -4
- package/dist/forth-5N06oHNp.js +0 -4
- package/dist/fortran-wZ-sNg3h.js +0 -4
- package/dist/gas-3H4_FaS8.js +0 -4
- package/dist/gherkin-PEA2uy50.js +0 -4
- package/dist/graphlib-D18eZCT4.js +0 -228
- package/dist/groovy-DZzbvCP1.js +0 -4
- package/dist/hasIn-B9AbGLj3.js +0 -86
- package/dist/haskell-CExLTzho.js +0 -4
- package/dist/haxe-f3pVb8qU.js +0 -5
- package/dist/idl-BbWlJ0gk.js +0 -4
- package/dist/infoDiagram-HS3SLOUP-BXGbfBss.js +0 -30
- package/dist/isEmpty-C-xMag79.js +0 -16
- package/dist/isString-D-vNYDBA.js +0 -9
- package/dist/javascript-eMOhp6Aq.js +0 -4
- package/dist/julia-C6w3Rvqb.js +0 -4
- package/dist/livescript-ChQl9lD-.js +0 -4
- package/dist/lua-CiDvI96j.js +0 -4
- package/dist/mathematica-ClVO4k7N.js +0 -4
- package/dist/mbox-BEI7DeUg.js +0 -4
- package/dist/mermaid-4DMBBIKO-PVrJfEpX.js +0 -6
- package/dist/min-ECVRnCdn.js +0 -89
- package/dist/mirc-DwidJ3iH.js +0 -4
- package/dist/mllike-Dspdy0xJ.js +0 -6
- package/dist/modelica-CIUejP-L.js +0 -4
- package/dist/mscgen-BWXU4Omp.js +0 -6
- package/dist/mumps-PHFFoPk5.js +0 -4
- package/dist/nsis-B7xooKLf.js +0 -4
- package/dist/ntriples-DnOgtCzG.js +0 -4
- package/dist/octave-Cn5kH_QT.js +0 -4
- package/dist/once-BqS42WgZ.js +0 -74
- package/dist/oz-DR-sROpu.js +0 -4
- package/dist/pascal-CPKK1zcS.js +0 -4
- package/dist/perl-D7FuFdyd.js +0 -4
- package/dist/pig-CEXnOAnI.js +0 -4
- package/dist/powershell-BKvWab7q.js +0 -4
- package/dist/properties-7jnK_vYx.js +0 -4
- package/dist/protobuf-4rslMjEN.js +0 -4
- package/dist/pug-BVwdEv4r.js +0 -4
- package/dist/puppet-iSHg_1Z2.js +0 -4
- package/dist/python-tK3wUCn0.js +0 -4
- package/dist/q-DP_Dcoox.js +0 -4
- package/dist/r-C32wHLYu.js +0 -4
- package/dist/range-BKaWvVUE.js +0 -30
- package/dist/react-vega-CFUuchds.js +0 -9
- package/dist/reduce-CqQo8ppc.js +0 -275
- package/dist/rpm-BbDBUfs9.js +0 -5
- package/dist/ruby-COfWUiIr.js +0 -4
- package/dist/sas-y_Hue2-X.js +0 -4
- package/dist/scheme-7jTCqHw8.js +0 -4
- package/dist/shell-DAqJWXDk.js +0 -4
- package/dist/sieve-EaqnbCO3.js +0 -4
- package/dist/smalltalk-DL03YKLJ.js +0 -4
- package/dist/sparql-DTA-tQ_q.js +0 -4
- package/dist/stateDiagram-v2-4FDKWEC3-BIeUs-Ed.js +0 -29
- package/dist/stex-KfRnSHzF.js +0 -4
- package/dist/stylus-CfjeFry_.js +0 -4
- package/dist/swift-Dl0RRDbH.js +0 -4
- package/dist/tcl-wv9O7fLZ.js +0 -4
- package/dist/textile-DzMRCBcV.js +0 -4
- package/dist/toString-DbIAWQpF.js +0 -23
- package/dist/toml-CyIWqgbe.js +0 -4
- package/dist/troff-_huin_CY.js +0 -4
- package/dist/ttcn-BEiJuYYc.js +0 -4
- package/dist/ttcn-cfg-DB6Ksh67.js +0 -4
- package/dist/turtle-DzhzGEum.js +0 -4
- package/dist/uniq-H2E5nMLq.js +0 -8
- package/dist/useDeepCompareMemoize-BWUwfh37.js +0 -755
- package/dist/useIframeCapabilities-OQaMKgZl.js +0 -46
- package/dist/vb-CngKZQHu.js +0 -4
- package/dist/vbscript-BV_8nbeM.js +0 -4
- package/dist/velocity-IqE7qYKE.js +0 -4
- package/dist/verilog-xtyaWTnc.js +0 -4
- package/dist/vhdl-BaqXCtf3.js +0 -4
- package/dist/webidl-BDB8PTTO.js +0 -4
- package/dist/xquery-BIC-qj9Z.js +0 -4
- package/dist/yacas-ifv5tftd.js +0 -4
- package/dist/z80-B8zOMVNt.js +0 -4
- package/src/core/cells/effects.ts +0 -42
- package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
- package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
- package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- /package/dist/{apl-DRxKiEot.js → apl-BqjtmlWW.js} +0 -0
- /package/dist/{array-D-nrDupM.js → array-D7wW5QoO.js} +0 -0
- /package/dist/{asciiarmor-C8HoXFIm.js → asciiarmor-D9C9bbeV.js} +0 -0
- /package/dist/{asn1-9Bo0DYT-.js → asn1-D_zR1ubK.js} +0 -0
- /package/dist/{asterisk-BsiuGzWq.js → asterisk-B0dLLA8Z.js} +0 -0
- /package/dist/{brainfuck-Db8njC-p.js → brainfuck-79SC7EYA.js} +0 -0
- /package/dist/{chunk-DR5Q36YT-D4q96vNV.js → chunk-DR5Q36YT-BxPcQ21t.js} +0 -0
- /package/dist/{click-outside-container-CKfwEZqH.js → click-outside-container-DNfggvIW.js} +0 -0
- /package/dist/{clike-CFhUNtI5.js → clike-DFDX2jWq.js} +0 -0
- /package/dist/{clojure-CX7oovsp.js → clojure-Bb3Od9By.js} +0 -0
- /package/dist/{clsx-D2KVTYnW.js → clsx-yW_RAw0K.js} +0 -0
- /package/dist/{cmake-C29AR2kk.js → cmake-DYGUYEtU.js} +0 -0
- /package/dist/{cobol-CNkuRW9i.js → cobol-CcWmcAFT.js} +0 -0
- /package/dist/{coffeescript-BJAbfGam.js → coffeescript-BVa1qoL6.js} +0 -0
- /package/dist/{colors-6nB_pSln.js → colors-6DRQ0kEF.js} +0 -0
- /package/dist/{common-keywords-BAkLFdud.js → common-keywords-Bz8dNfWa.js} +0 -0
- /package/dist/{commonlisp-BTNhj2l9.js → commonlisp-zi51jgUH.js} +0 -0
- /package/dist/{crystal-CZc0nIm9.js → crystal-QjpegJHM.js} +0 -0
- /package/dist/{css-L2-0OTXc.js → css-B_GfJtcK.js} +0 -0
- /package/dist/{cypher-Dnc6MXl0.js → cypher-BVuYJpGf.js} +0 -0
- /package/dist/{cytoscape.esm-BXzSsA6N.js → cytoscape.esm-BYAuS6uS.js} +0 -0
- /package/dist/{d-C6X9iIga.js → d-BT97RiQI.js} +0 -0
- /package/dist/{defaultLocale-CfQ4kBaV.js → defaultLocale-B_A76Zpk.js} +0 -0
- /package/dist/{defaultLocale-Bklbu-Tp.js → defaultLocale-DjFHq3Xk.js} +0 -0
- /package/dist/{diff-ZzKinYqY.js → diff-CHd93v7L.js} +0 -0
- /package/dist/{dist-Bymy0kEH.js → dist-CqR8FBcH.js} +0 -0
- /package/dist/{dtd-CytEpkAo.js → dtd-akLFIRuZ.js} +0 -0
- /package/dist/{duckdb-keywords-C1WxmSfG.js → duckdb-keywords-CQAIHMbC.js} +0 -0
- /package/dist/{dylan-CZByFBEQ.js → dylan-Iy-rgNOc.js} +0 -0
- /package/dist/{ebnf-BF2FOt-m.js → ebnf-CTkZpZPT.js} +0 -0
- /package/dist/{ecl-Cp7L1F5B.js → ecl-BhUXC_aR.js} +0 -0
- /package/dist/{eiffel-C66yjnFL.js → eiffel-DIRAlWPD.js} +0 -0
- /package/dist/{elm-DtHo-73e.js → elm-BDgVzkJ4.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-DtW2o230.js → emotion-is-prop-valid.esm-DdzHpbbG.js} +0 -0
- /package/dist/{erlang-C_sj44mF.js → erlang-Djcs_NwB.js} +0 -0
- /package/dist/{esm-BWftfC-A.js → esm-BRwAuUu2.js} +0 -0
- /package/dist/{fcl-BhLcvRo_.js → fcl-OXoT8w4k.js} +0 -0
- /package/dist/{forth-CIDHh56T.js → forth-c_NTahPv.js} +0 -0
- /package/dist/{fortran-BQrDVXRU.js → fortran-Bpxt27dn.js} +0 -0
- /package/dist/{gas-D4HQPB0Q.js → gas-RVBts6ZK.js} +0 -0
- /package/dist/{gherkin-UB2gJHdT.js → gherkin-Hf6PTauh.js} +0 -0
- /package/dist/{groovy-DVz6jkOx.js → groovy-CKjO-cRi.js} +0 -0
- /package/dist/{haskell-CpUdAPCz.js → haskell-DC1Gan6v.js} +0 -0
- /package/dist/{haxe-DCV5_cqD.js → haxe-Bpne--ot.js} +0 -0
- /package/dist/{http-C_TDb8VX.js → http-CPVO27fZ.js} +0 -0
- /package/dist/{idl-D7WCIgHw.js → idl-GRIbMIEq.js} +0 -0
- /package/dist/{init-Ci8VD8ZH.js → init-BfRhston.js} +0 -0
- /package/dist/{invariant-D9QLJ4SZ.js → invariant-CzjtdzpE.js} +0 -0
- /package/dist/{isArrayLikeObject-BrYl-ETg.js → isArrayLikeObject-C-hFPChh.js} +0 -0
- /package/dist/{javascript-B2Rn0Lmd.js → javascript-nS0zxWNO.js} +0 -0
- /package/dist/{jsx-runtime-CTBg5pdT.js → jsx-runtime-9hcJiI23.js} +0 -0
- /package/dist/{julia-ApprtEaw.js → julia-CQpdTxmO.js} +0 -0
- /package/dist/{katex-Bk_FvVSR.js → katex-Dg42UEnr.js} +0 -0
- /package/dist/{livescript-BMLIlM7C.js → livescript-D5kqrQol.js} +0 -0
- /package/dist/{lua-DdDaW3tC.js → lua-CKifrpGK.js} +0 -0
- /package/dist/{main-Tj_-QTyF.js → main-C01_ic0d.js} +0 -0
- /package/dist/{math-HUZifhTs.js → math-BbMyrONz.js} +0 -0
- /package/dist/{mathematica-PnNN7c2Z.js → mathematica-CxT3f_fi.js} +0 -0
- /package/dist/{mbox-B84OtHBK.js → mbox-C2_n_I9h.js} +0 -0
- /package/dist/{mirc-BVWXJxIq.js → mirc-BTQeASBH.js} +0 -0
- /package/dist/{mllike-BawXWupH.js → mllike-BxO6Hl5N.js} +0 -0
- /package/dist/{modelica-C8-X4Hf_.js → modelica-DuivZReX.js} +0 -0
- /package/dist/{mscgen-BOM6dDj8.js → mscgen-DwD83FOm.js} +0 -0
- /package/dist/{mumps-DQOY8n05.js → mumps-CdVjp3OE.js} +0 -0
- /package/dist/{nginx-DkMgA__9.js → nginx-Bi9TuNqb.js} +0 -0
- /package/dist/{node-sql-parser-D53LM_7b.js → node-sql-parser-Bet3kHkt.js} +0 -0
- /package/dist/{ntriples-DU8VrXdW.js → ntriples-DBS60qLp.js} +0 -0
- /package/dist/{octave-BzTIBsQ8.js → octave-BL0tQUFC.js} +0 -0
- /package/dist/{oz-DKFcZsoi.js → oz-DBrG4vwi.js} +0 -0
- /package/dist/{pascal-DHBZ15pT.js → pascal-BWV9h8yS.js} +0 -0
- /package/dist/{path-BVI7RNUv.js → path-C_x2ySFi.js} +0 -0
- /package/dist/{perl-75NMI3w0.js → perl-Bm5a83JW.js} +0 -0
- /package/dist/{pig-B-HY1fo_.js → pig-CbJDoHaE.js} +0 -0
- /package/dist/{powershell-DEH22U53.js → powershell-tG44m5Cy.js} +0 -0
- /package/dist/{properties-B1MzBoJC.js → properties-DUZGzdb1.js} +0 -0
- /package/dist/{protobuf-Dr14KV0p.js → protobuf-CcoKXY0d.js} +0 -0
- /package/dist/{puppet-C4z38l7v.js → puppet-BH73L_Gw.js} +0 -0
- /package/dist/{purify.es-DGenX2XH.js → purify.es-BwXbuO3r.js} +0 -0
- /package/dist/{python-D2L7Nknt.js → python-NJIxLTZp.js} +0 -0
- /package/dist/{q-PxipHfgS.js → q-MotBNA65.js} +0 -0
- /package/dist/{r-CEMMu_Tf.js → r-BUgBPae7.js} +0 -0
- /package/dist/{range-BToS7LsA.js → range-DwpxnYuB.js} +0 -0
- /package/dist/{react-dom-CqtLRVZP.js → react-dom-BKwCWYPW.js} +0 -0
- /package/dist/{rpm-D3xyahkR.js → rpm-C_PaGodG.js} +0 -0
- /package/dist/{ruby-DwEkwdiu.js → ruby-DFLM2XD8.js} +0 -0
- /package/dist/{sas-L1W0BRft.js → sas-BMyyu8oO.js} +0 -0
- /package/dist/{scheme-CTybTrX0.js → scheme-Qet9zYAe.js} +0 -0
- /package/dist/{shell-BSx3LZnu.js → shell-BKHx4Jjo.js} +0 -0
- /package/dist/{sieve-BjUfbv-6.js → sieve-CVo7dc4j.js} +0 -0
- /package/dist/{simple-mode-IPZGFbI6.js → simple-mode-CVFBIo6d.js} +0 -0
- /package/dist/{smalltalk-BlzuYrMv.js → smalltalk-BHr2nCth.js} +0 -0
- /package/dist/{solr-Cj_9RM4d.js → solr-Bt9XtM2H.js} +0 -0
- /package/dist/{sparql-BXKjQ0cK.js → sparql-QSu0ZCcc.js} +0 -0
- /package/dist/{spreadsheet-CifI10GO.js → spreadsheet-BWfuwc0V.js} +0 -0
- /package/dist/{sql-B0bFyY1c.js → sql-BdV3YOCG.js} +0 -0
- /package/dist/{stex-BIsgBmK4.js → stex-Btoi8e7I.js} +0 -0
- /package/dist/{stylus-CqrLLVnG.js → stylus-CLZH9-Ps.js} +0 -0
- /package/dist/{swift-DIqvj3_G.js → swift-JNDJdNIE.js} +0 -0
- /package/dist/{tcl-B8bOIGVK.js → tcl-J5aE7aj5.js} +0 -0
- /package/dist/{textile-DZsjavD_.js → textile-6Hn05XQM.js} +0 -0
- /package/dist/{tiddlywiki-BbGdvEjx.js → tiddlywiki-BWn8rSwJ.js} +0 -0
- /package/dist/{tiki-BYesmRDo.js → tiki-XORjA1c3.js} +0 -0
- /package/dist/{timer-CPsmIOdm.js → timer-pEiW44EO.js} +0 -0
- /package/dist/{toml-Uc7m08nl.js → toml-BceyeuiF.js} +0 -0
- /package/dist/{treemap-DMn4tIJ7.js → treemap-BzS5cW_6.js} +0 -0
- /package/dist/{troff-GEl5wcXR.js → troff-DeMyd5Pf.js} +0 -0
- /package/dist/{ttcn-pr4FDOLT.js → ttcn-DurvvcB-.js} +0 -0
- /package/dist/{ttcn-cfg-dZQ_fWTH.js → ttcn-cfg-BuYui6Rv.js} +0 -0
- /package/dist/{turtle-TPRDOknA.js → turtle-CD8Qf-tp.js} +0 -0
- /package/dist/{vb-BJUAeTYr.js → vb-BklM-Nqk.js} +0 -0
- /package/dist/{vbscript-CcJ6Z3ic.js → vbscript-DbMEEX0d.js} +0 -0
- /package/dist/{velocity-pq4ZMzU3.js → velocity-CERL-_vq.js} +0 -0
- /package/dist/{verilog-timMNjHt.js → verilog-BD6jNce6.js} +0 -0
- /package/dist/{vhdl-DYFbVKNm.js → vhdl-U-1_N98i.js} +0 -0
- /package/dist/{webidl-pue9oqnb.js → webidl-IUn0dzoa.js} +0 -0
- /package/dist/{xquery-DeItGynK.js → xquery-QeeHdSO2.js} +0 -0
- /package/dist/{yacas-By2Qrjba.js → yacas-C9XcEPAJ.js} +0 -0
- /package/dist/{z80-C7iLsyPC.js → z80-C-nD1oRy.js} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
2
3
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
4
|
import { Mocks } from "@/__mocks__/common";
|
|
4
|
-
import
|
|
5
|
+
import { cellId } from "@/__tests__/branded";
|
|
5
6
|
import { CellOutputId } from "@/core/cells/ids";
|
|
6
7
|
import {
|
|
7
8
|
downloadAsPDF,
|
|
@@ -218,7 +219,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
218
219
|
beforeEach(() => {
|
|
219
220
|
vi.clearAllMocks();
|
|
220
221
|
mockElement = document.createElement("div");
|
|
221
|
-
mockElement.id = CellOutputId.create("cell-1"
|
|
222
|
+
mockElement.id = CellOutputId.create(cellId("cell-1"));
|
|
222
223
|
document.body.append(mockElement);
|
|
223
224
|
});
|
|
224
225
|
|
|
@@ -227,7 +228,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
227
228
|
});
|
|
228
229
|
|
|
229
230
|
it("should return undefined if element is not found", async () => {
|
|
230
|
-
const result = await getImageDataUrlForCell("nonexistent"
|
|
231
|
+
const result = await getImageDataUrlForCell(cellId("nonexistent"));
|
|
231
232
|
|
|
232
233
|
expect(result).toBeUndefined();
|
|
233
234
|
expect(Logger.error).toHaveBeenCalledWith(
|
|
@@ -238,7 +239,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
238
239
|
it("should capture screenshot and return data URL", async () => {
|
|
239
240
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
240
241
|
|
|
241
|
-
const result = await getImageDataUrlForCell("cell-1"
|
|
242
|
+
const result = await getImageDataUrlForCell(cellId("cell-1"));
|
|
242
243
|
|
|
243
244
|
expect(result).toBe(mockDataUrl);
|
|
244
245
|
expect(toPng).toHaveBeenCalledWith(
|
|
@@ -253,7 +254,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
253
254
|
it("should pass style options to prevent clipping", async () => {
|
|
254
255
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
255
256
|
|
|
256
|
-
await getImageDataUrlForCell("cell-1"
|
|
257
|
+
await getImageDataUrlForCell(cellId("cell-1"));
|
|
257
258
|
|
|
258
259
|
expect(toPng).toHaveBeenCalledWith(
|
|
259
260
|
mockElement,
|
|
@@ -274,7 +275,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
274
275
|
});
|
|
275
276
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
276
277
|
|
|
277
|
-
await getImageDataUrlForCell("cell-1"
|
|
278
|
+
await getImageDataUrlForCell(cellId("cell-1"));
|
|
278
279
|
|
|
279
280
|
expect(toPng).toHaveBeenCalledWith(
|
|
280
281
|
mockElement,
|
|
@@ -287,7 +288,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
287
288
|
it("should pass scrollbar hiding styles via extraStyleContent", async () => {
|
|
288
289
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
289
290
|
|
|
290
|
-
await getImageDataUrlForCell("cell-1"
|
|
291
|
+
await getImageDataUrlForCell(cellId("cell-1"));
|
|
291
292
|
|
|
292
293
|
expect(toPng).toHaveBeenCalledWith(
|
|
293
294
|
mockElement,
|
|
@@ -302,7 +303,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
302
303
|
mockElement.style.maxHeight = "100px";
|
|
303
304
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
304
305
|
|
|
305
|
-
await getImageDataUrlForCell("cell-1"
|
|
306
|
+
await getImageDataUrlForCell(cellId("cell-1"));
|
|
306
307
|
|
|
307
308
|
// DOM should remain unchanged
|
|
308
309
|
expect(mockElement.style.overflow).toBe("hidden");
|
|
@@ -312,7 +313,7 @@ describe("getImageDataUrlForCell", () => {
|
|
|
312
313
|
it("should throw error on failure", async () => {
|
|
313
314
|
vi.mocked(toPng).mockRejectedValue(new Error("Capture failed"));
|
|
314
315
|
|
|
315
|
-
await expect(getImageDataUrlForCell("cell-1"
|
|
316
|
+
await expect(getImageDataUrlForCell(cellId("cell-1"))).rejects.toThrow(
|
|
316
317
|
"Capture failed",
|
|
317
318
|
);
|
|
318
319
|
});
|
|
@@ -320,13 +321,13 @@ describe("getImageDataUrlForCell", () => {
|
|
|
320
321
|
it("should handle concurrent captures correctly", async () => {
|
|
321
322
|
// Create a second element
|
|
322
323
|
const mockElement2 = document.createElement("div");
|
|
323
|
-
mockElement2.id = CellOutputId.create("cell-2"
|
|
324
|
+
mockElement2.id = CellOutputId.create(cellId("cell-2"));
|
|
324
325
|
document.body.append(mockElement2);
|
|
325
326
|
|
|
326
327
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
327
328
|
|
|
328
|
-
const capture1 = getImageDataUrlForCell("cell-1"
|
|
329
|
-
const capture2 = getImageDataUrlForCell("cell-2"
|
|
329
|
+
const capture1 = getImageDataUrlForCell(cellId("cell-1"));
|
|
330
|
+
const capture2 = getImageDataUrlForCell(cellId("cell-2"));
|
|
330
331
|
|
|
331
332
|
await Promise.all([capture1, capture2]);
|
|
332
333
|
|
|
@@ -437,8 +438,8 @@ describe("downloadHTMLAsImage", () => {
|
|
|
437
438
|
await downloadHTMLAsImage({ element: mockElement, filename: "test" });
|
|
438
439
|
|
|
439
440
|
expect(toast).toHaveBeenCalledWith({
|
|
440
|
-
title: "
|
|
441
|
-
description: "Failed
|
|
441
|
+
title: "Failed to download as PNG",
|
|
442
|
+
description: "Failed",
|
|
442
443
|
variant: "danger",
|
|
443
444
|
});
|
|
444
445
|
});
|
|
@@ -461,7 +462,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
461
462
|
beforeEach(() => {
|
|
462
463
|
vi.clearAllMocks();
|
|
463
464
|
mockElement = document.createElement("div");
|
|
464
|
-
mockElement.id = CellOutputId.create("cell-1"
|
|
465
|
+
mockElement.id = CellOutputId.create(cellId("cell-1"));
|
|
465
466
|
mockAppEl = document.createElement("div");
|
|
466
467
|
mockAppEl.id = "App";
|
|
467
468
|
// Mock scrollTo since jsdom doesn't implement it
|
|
@@ -486,7 +487,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
486
487
|
});
|
|
487
488
|
|
|
488
489
|
it("should show error toast if element not found", async () => {
|
|
489
|
-
await downloadCellOutputAsImage("nonexistent"
|
|
490
|
+
await downloadCellOutputAsImage(cellId("nonexistent"), "test");
|
|
490
491
|
|
|
491
492
|
expect(toPng).not.toHaveBeenCalled();
|
|
492
493
|
expect(Logger.error).toHaveBeenCalledWith(
|
|
@@ -502,7 +503,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
502
503
|
it("should show error toast if toPng fails", async () => {
|
|
503
504
|
vi.mocked(toPng).mockRejectedValue(new Error("Screenshot failed"));
|
|
504
505
|
|
|
505
|
-
await downloadCellOutputAsImage("cell-1"
|
|
506
|
+
await downloadCellOutputAsImage(cellId("cell-1"), "result");
|
|
506
507
|
|
|
507
508
|
expect(toast).toHaveBeenCalledWith({
|
|
508
509
|
title: "Failed to download PNG",
|
|
@@ -514,7 +515,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
514
515
|
it("should download cell output as image", async () => {
|
|
515
516
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
516
517
|
|
|
517
|
-
await downloadCellOutputAsImage("cell-1"
|
|
518
|
+
await downloadCellOutputAsImage(cellId("cell-1"), "result");
|
|
518
519
|
|
|
519
520
|
expect(toPng).toHaveBeenCalledWith(
|
|
520
521
|
mockElement,
|
|
@@ -529,7 +530,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
529
530
|
it("should pass style options to toPng for full content capture", async () => {
|
|
530
531
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
531
532
|
|
|
532
|
-
await downloadCellOutputAsImage("cell-1"
|
|
533
|
+
await downloadCellOutputAsImage(cellId("cell-1"), "result");
|
|
533
534
|
|
|
534
535
|
expect(toPng).toHaveBeenCalledWith(
|
|
535
536
|
mockElement,
|
|
@@ -547,7 +548,7 @@ describe("downloadCellOutputAsImage", () => {
|
|
|
547
548
|
mockElement.style.maxHeight = "100px";
|
|
548
549
|
vi.mocked(toPng).mockResolvedValue(mockDataUrl);
|
|
549
550
|
|
|
550
|
-
await downloadCellOutputAsImage("cell-1"
|
|
551
|
+
await downloadCellOutputAsImage(cellId("cell-1"), "result");
|
|
551
552
|
|
|
552
553
|
// DOM should remain unchanged
|
|
553
554
|
expect(mockElement.style.overflow).toBe("hidden");
|
|
@@ -260,4 +260,38 @@ describe("Objects", () => {
|
|
|
260
260
|
expect(result).toEqual({ a: 1, b: 2 });
|
|
261
261
|
});
|
|
262
262
|
});
|
|
263
|
+
|
|
264
|
+
describe("pick", () => {
|
|
265
|
+
it("should pick specified keys", () => {
|
|
266
|
+
const obj = { a: 1, b: 2, c: 3 };
|
|
267
|
+
expect(Objects.pick(obj, ["a", "c"])).toEqual({ a: 1, c: 3 });
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
it("should omit keys not present on the object", () => {
|
|
271
|
+
const obj = { a: 1, b: 2 };
|
|
272
|
+
expect(Objects.pick(obj, ["a", "z"])).toEqual({ a: 1 });
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it("should preserve undefined values for existing keys", () => {
|
|
276
|
+
const obj = { a: undefined, b: 2 };
|
|
277
|
+
const result = Objects.pick(obj, ["a", "b"]);
|
|
278
|
+
expect(result).toEqual({ a: undefined, b: 2 });
|
|
279
|
+
expect("a" in result).toBe(true);
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
it("should not pick inherited properties", () => {
|
|
283
|
+
const parent = { inherited: true };
|
|
284
|
+
const obj = Object.create(parent);
|
|
285
|
+
obj.own = 1;
|
|
286
|
+
expect(Objects.pick(obj, ["own", "inherited"])).toEqual({ own: 1 });
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
it("should return empty object when picking no keys", () => {
|
|
290
|
+
expect(Objects.pick({ a: 1 }, [])).toEqual({});
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
it("should handle empty object", () => {
|
|
294
|
+
expect(Objects.pick({}, ["a"])).toEqual({});
|
|
295
|
+
});
|
|
296
|
+
});
|
|
263
297
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { decodeUtf8, Strings } from "../strings";
|
|
3
|
+
import { capitalize, decodeUtf8, Strings } from "../strings";
|
|
4
4
|
|
|
5
5
|
describe("Strings", () => {
|
|
6
6
|
describe("startCase", () => {
|
|
@@ -58,6 +58,32 @@ describe("Strings", () => {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
+
describe("capitalize", () => {
|
|
62
|
+
it("capitalizes the first character", () => {
|
|
63
|
+
expect(capitalize("hello")).toBe("Hello");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("returns empty string for empty input", () => {
|
|
67
|
+
expect(capitalize("")).toBe("");
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("handles already-capitalized strings", () => {
|
|
71
|
+
expect(capitalize("Hello")).toBe("Hello");
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("handles single character", () => {
|
|
75
|
+
expect(capitalize("a")).toBe("A");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("preserves the rest of the string", () => {
|
|
79
|
+
expect(capitalize("hELLO")).toBe("HELLO");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("handles non-letter first character", () => {
|
|
83
|
+
expect(capitalize("123abc")).toBe("123abc");
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
61
87
|
describe("decodeUtf8", () => {
|
|
62
88
|
it("decodes UTF-8 array to string", () => {
|
|
63
89
|
const encoder = new TextEncoder();
|
package/src/utils/arrays.ts
CHANGED
|
@@ -61,6 +61,73 @@ export const Arrays = {
|
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Create an array of numbers from 0 to length - 1.
|
|
66
|
+
*/
|
|
67
|
+
export function range(length: number): number[] {
|
|
68
|
+
return Array.from({ length }, (_, i) => i);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Remove duplicate values from an array.
|
|
73
|
+
*/
|
|
74
|
+
export function uniq<T>(arr: readonly T[]): T[] {
|
|
75
|
+
return [...new Set(arr)];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Sort an array by a key function, returning a new array.
|
|
80
|
+
*/
|
|
81
|
+
export function sortBy<T>(
|
|
82
|
+
arr: readonly T[],
|
|
83
|
+
key: (item: T) => string | number | undefined | null,
|
|
84
|
+
): T[] {
|
|
85
|
+
// Decorate/sort/undecorate to compute keys once per element
|
|
86
|
+
return arr
|
|
87
|
+
.map((item) => [key(item), item] as const)
|
|
88
|
+
.sort(([ka], [kb]) => {
|
|
89
|
+
// Nullish values sort last
|
|
90
|
+
if (ka == null && kb == null) {
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
if (ka == null) {
|
|
94
|
+
return 1;
|
|
95
|
+
}
|
|
96
|
+
if (kb == null) {
|
|
97
|
+
return -1;
|
|
98
|
+
}
|
|
99
|
+
if (ka < kb) {
|
|
100
|
+
return -1;
|
|
101
|
+
}
|
|
102
|
+
if (ka > kb) {
|
|
103
|
+
return 1;
|
|
104
|
+
}
|
|
105
|
+
return 0;
|
|
106
|
+
})
|
|
107
|
+
.map(([, item]) => item);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Split an array into two groups based on a predicate.
|
|
112
|
+
* Returns [pass, fail] where pass contains items that match
|
|
113
|
+
* and fail contains items that don't.
|
|
114
|
+
*/
|
|
115
|
+
export function partition<T>(
|
|
116
|
+
arr: readonly T[],
|
|
117
|
+
predicate: (item: T) => boolean,
|
|
118
|
+
): [T[], T[]] {
|
|
119
|
+
const pass: T[] = [];
|
|
120
|
+
const fail: T[] = [];
|
|
121
|
+
for (const item of arr) {
|
|
122
|
+
if (predicate(item)) {
|
|
123
|
+
pass.push(item);
|
|
124
|
+
} else {
|
|
125
|
+
fail.push(item);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return [pass, fail];
|
|
129
|
+
}
|
|
130
|
+
|
|
64
131
|
export function arrayToggle<T>(arr: T[], item: T): T[] {
|
|
65
132
|
if (!arr) {
|
|
66
133
|
return [item];
|
package/src/utils/copy.ts
CHANGED
|
@@ -2,21 +2,34 @@
|
|
|
2
2
|
import { Logger } from "./Logger";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Copy text to the clipboard. When `html` is provided, writes both
|
|
6
|
+
* text/html and text/plain so rich content (e.g. hyperlinks) is
|
|
7
|
+
* preserved when pasting into apps like Excel or Google Sheets.
|
|
7
8
|
*
|
|
8
9
|
* As of 2024-10-29, Safari does not support navigator.clipboard.writeText
|
|
9
10
|
* when running localhost http.
|
|
10
11
|
*/
|
|
11
|
-
export async function copyToClipboard(text: string) {
|
|
12
|
+
export async function copyToClipboard(text: string, html?: string) {
|
|
12
13
|
if (navigator.clipboard === undefined) {
|
|
13
14
|
Logger.warn("navigator.clipboard is not supported");
|
|
14
15
|
window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
if (html && navigator.clipboard.write) {
|
|
20
|
+
try {
|
|
21
|
+
const item = new ClipboardItem({
|
|
22
|
+
"text/html": new Blob([html], { type: "text/html" }),
|
|
23
|
+
"text/plain": new Blob([text], { type: "text/plain" }),
|
|
24
|
+
});
|
|
25
|
+
await navigator.clipboard.write([item]);
|
|
26
|
+
return;
|
|
27
|
+
} catch {
|
|
28
|
+
Logger.warn("Failed to write rich text, falling back to plain text");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
await navigator.clipboard.writeText(text).catch(() => {
|
|
20
33
|
Logger.warn("Failed to copy to clipboard using navigator.clipboard");
|
|
21
34
|
window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
|
|
22
35
|
});
|
|
@@ -7,12 +7,7 @@ import { Logger } from "@/utils/Logger";
|
|
|
7
7
|
|
|
8
8
|
export type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
type: string;
|
|
12
|
-
payload: T;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
type Dispatch = (action: ReducerAction<any>) => void;
|
|
10
|
+
type Dispatch<RH> = (action: ReducerActionOf<RH>) => void;
|
|
16
11
|
type IfUnknown<T, Y, N> = unknown extends T ? Y : N;
|
|
17
12
|
|
|
18
13
|
type ReducerHandler<State, Payload> = (state: State, payload: Payload) => State;
|
|
@@ -27,6 +22,19 @@ type ReducerActions<RH extends ReducerHandlers<any>> = {
|
|
|
27
22
|
: never;
|
|
28
23
|
};
|
|
29
24
|
|
|
25
|
+
/** Helper for typing middleware that receives dispatched actions. */
|
|
26
|
+
export type DispatchedActionOf<T> = {
|
|
27
|
+
[Key in keyof T]: T[Key] extends (payload: infer P) => any
|
|
28
|
+
? { type: Key; payload: P }
|
|
29
|
+
: never;
|
|
30
|
+
}[keyof T & string];
|
|
31
|
+
|
|
32
|
+
type ReducerActionOf<RH> = {
|
|
33
|
+
[Type in keyof RH]: RH[Type] extends ReducerHandler<any, infer Payload>
|
|
34
|
+
? { type: Type; payload: Payload }
|
|
35
|
+
: never;
|
|
36
|
+
}[keyof RH & string];
|
|
37
|
+
|
|
30
38
|
export interface ReducerCreatorResult<
|
|
31
39
|
State,
|
|
32
40
|
RH extends ReducerHandlers<State>,
|
|
@@ -38,7 +46,7 @@ export interface ReducerCreatorResult<
|
|
|
38
46
|
/**
|
|
39
47
|
* Given a dispatch function, returns an object containing all the actions.
|
|
40
48
|
*/
|
|
41
|
-
createActions: (dispatch: Dispatch) => ReducerActions<RH>;
|
|
49
|
+
createActions: (dispatch: Dispatch<RH>) => ReducerActions<RH>;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
/**
|
|
@@ -49,7 +57,7 @@ export function createReducer<
|
|
|
49
57
|
RH extends ReducerHandlers<NoInfer<State>>,
|
|
50
58
|
>(initialState: () => State, reducers: RH): ReducerCreatorResult<State, RH> {
|
|
51
59
|
return {
|
|
52
|
-
reducer: (state, action:
|
|
60
|
+
reducer: (state, action: ReducerActionOf<RH>) => {
|
|
53
61
|
state = state || initialState();
|
|
54
62
|
if (action.type in reducers) {
|
|
55
63
|
return reducers[action.type](state, action.payload);
|
|
@@ -58,11 +66,11 @@ export function createReducer<
|
|
|
58
66
|
Logger.error(`Action type ${action.type} is not defined in reducers.`);
|
|
59
67
|
return state;
|
|
60
68
|
},
|
|
61
|
-
createActions: (dispatch: Dispatch) => {
|
|
69
|
+
createActions: (dispatch: Dispatch<RH>) => {
|
|
62
70
|
const actions = {} as ReducerActions<RH>;
|
|
63
71
|
for (const type in reducers) {
|
|
64
72
|
(actions as any)[type] = (payload: any) => {
|
|
65
|
-
dispatch({ type, payload });
|
|
73
|
+
dispatch({ type, payload } as any);
|
|
66
74
|
};
|
|
67
75
|
}
|
|
68
76
|
return actions;
|
|
@@ -70,31 +78,34 @@ export function createReducer<
|
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
|
|
73
|
-
type Middleware<State> = (
|
|
81
|
+
type Middleware<State, RH> = (
|
|
74
82
|
prevState: State,
|
|
75
83
|
newState: State,
|
|
76
|
-
action:
|
|
84
|
+
action: ReducerActionOf<RH>,
|
|
77
85
|
) => void;
|
|
78
86
|
|
|
79
87
|
export function createReducerAndAtoms<
|
|
80
88
|
State,
|
|
81
89
|
RH extends ReducerHandlers<NoInfer<State>>,
|
|
82
|
-
>(
|
|
90
|
+
>(
|
|
91
|
+
initialState: () => State,
|
|
92
|
+
reducers: RH,
|
|
93
|
+
middleware?: Middleware<State, NoInfer<RH>>[],
|
|
94
|
+
) {
|
|
95
|
+
const allMiddleware = [...(middleware ?? [])];
|
|
96
|
+
const addMiddleware = (mw: Middleware<State, RH>) => {
|
|
97
|
+
allMiddleware.push(mw);
|
|
98
|
+
};
|
|
83
99
|
const { reducer, createActions } = createReducer(initialState, reducers);
|
|
84
100
|
|
|
85
|
-
const reducerWithMiddleware = (state: State, action:
|
|
101
|
+
const reducerWithMiddleware = (state: State, action: ReducerActionOf<RH>) => {
|
|
86
102
|
try {
|
|
87
103
|
const newState = reducer(state, action);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
Logger.error(
|
|
94
|
-
`Error in middleware for action ${action.type}:`,
|
|
95
|
-
error,
|
|
96
|
-
);
|
|
97
|
-
}
|
|
104
|
+
for (const mw of allMiddleware) {
|
|
105
|
+
try {
|
|
106
|
+
mw(state, newState, action);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
Logger.error(`Error in middleware for action ${action.type}:`, error);
|
|
98
109
|
}
|
|
99
110
|
}
|
|
100
111
|
return newState;
|
|
@@ -108,13 +119,21 @@ export function createReducerAndAtoms<
|
|
|
108
119
|
// map of SetAtom => Actions
|
|
109
120
|
const actionsMap = new WeakMap();
|
|
110
121
|
|
|
111
|
-
function useActions(
|
|
122
|
+
function useActions(
|
|
123
|
+
options: { skipMiddleware?: boolean } = {},
|
|
124
|
+
): ReducerActions<RH> {
|
|
112
125
|
const setState = useSetAtom(valueAtom);
|
|
113
126
|
|
|
127
|
+
if (options.skipMiddleware === true) {
|
|
128
|
+
return createActions((action: ReducerActionOf<RH>) => {
|
|
129
|
+
setState((state: State) => reducer(state, action));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
114
133
|
if (!actionsMap.has(setState)) {
|
|
115
134
|
actionsMap.set(
|
|
116
135
|
setState,
|
|
117
|
-
createActions((action:
|
|
136
|
+
createActions((action: ReducerActionOf<RH>) => {
|
|
118
137
|
setState((state: State) => reducerWithMiddleware(state, action));
|
|
119
138
|
}),
|
|
120
139
|
);
|
|
@@ -126,6 +145,7 @@ export function createReducerAndAtoms<
|
|
|
126
145
|
|
|
127
146
|
return {
|
|
128
147
|
reducer: reducerWithMiddleware,
|
|
148
|
+
addMiddleware,
|
|
129
149
|
createActions,
|
|
130
150
|
valueAtom,
|
|
131
151
|
useActions,
|
package/src/utils/download.ts
CHANGED
|
@@ -156,10 +156,11 @@ export async function downloadHTMLAsImage(opts: {
|
|
|
156
156
|
// Get screenshot
|
|
157
157
|
const dataUrl = await toPng(element);
|
|
158
158
|
downloadByURL(dataUrl, Filenames.toPNG(filename));
|
|
159
|
-
} catch {
|
|
159
|
+
} catch (error) {
|
|
160
|
+
Logger.error("Error downloading as PNG", error);
|
|
160
161
|
toast({
|
|
161
|
-
title: "
|
|
162
|
-
description:
|
|
162
|
+
title: "Failed to download as PNG",
|
|
163
|
+
description: prettyError(error),
|
|
163
164
|
variant: "danger",
|
|
164
165
|
});
|
|
165
166
|
} finally {
|
|
@@ -140,6 +140,11 @@ export const necessaryStyleProperties = [
|
|
|
140
140
|
"cursor",
|
|
141
141
|
];
|
|
142
142
|
|
|
143
|
+
// 1x1 transparent PNG as a fallback for images that fail to embed (e.g., cross-origin).
|
|
144
|
+
// Without this, failed embeds leave external URLs in the cloned DOM, which taints the canvas.
|
|
145
|
+
const TRANSPARENT_PIXEL =
|
|
146
|
+
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQABNjN9GQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAA0lEQVQI12P4z8BQDwAEgAF/QualIQAAAABJRU5ErkJggg==";
|
|
147
|
+
|
|
143
148
|
/**
|
|
144
149
|
* Default options for html-to-image conversions.
|
|
145
150
|
* These handle common edge cases like filtering out toolbars and logging errors.
|
|
@@ -162,6 +167,7 @@ export const defaultHtmlToImageOptions: HtmlToImageOptions = {
|
|
|
162
167
|
return true;
|
|
163
168
|
}
|
|
164
169
|
},
|
|
170
|
+
imagePlaceholder: TRANSPARENT_PIXEL,
|
|
165
171
|
onImageErrorHandler: (event) => {
|
|
166
172
|
Logger.error("Error loading image:", event);
|
|
167
173
|
},
|
package/src/utils/json/base64.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { components } from "@marimo-team/marimo-api";
|
|
3
4
|
import type { NotificationMessageData } from "@/core/kernel/messages";
|
|
4
5
|
import type { TypedString } from "../typed";
|
|
5
6
|
|
|
@@ -11,9 +12,9 @@ export type JsonString<T = unknown> = TypedString<"Json"> & {
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* A base64-encoded string.
|
|
15
|
+
* A base64-encoded string — derived from the generated OpenAPI schema.
|
|
15
16
|
*/
|
|
16
|
-
export type Base64String =
|
|
17
|
+
export type Base64String = components["schemas"]["Base64String"];
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* A data URL string.
|
|
@@ -120,7 +121,6 @@ export function dataViewToBase64(dataView: DataView): Base64String {
|
|
|
120
121
|
export function safeExtractSetUIElementMessageBuffers(
|
|
121
122
|
notification: NotificationMessageData<"send-ui-element-message">,
|
|
122
123
|
): readonly DataView[] {
|
|
123
|
-
// @ts-expect-error - TypeScript doesn't know that these strings are actually base64 strings
|
|
124
124
|
const strs: Base64String[] = notification.buffers ?? [];
|
|
125
125
|
return strs.map(base64ToDataView);
|
|
126
126
|
}
|
package/src/utils/objects.ts
CHANGED
|
@@ -105,4 +105,18 @@ export const Objects = {
|
|
|
105
105
|
const set = new Set<K>(keys);
|
|
106
106
|
return Objects.filter(obj, (_, key) => !set.has(key));
|
|
107
107
|
},
|
|
108
|
+
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
+
pick<V extends Record<string, any>, K extends string>(
|
|
111
|
+
obj: V,
|
|
112
|
+
keys: readonly K[],
|
|
113
|
+
): Pick<V, K & keyof V> {
|
|
114
|
+
const result = {} as Record<string, unknown>;
|
|
115
|
+
for (const key of keys) {
|
|
116
|
+
if (Object.hasOwn(obj, key)) {
|
|
117
|
+
result[key] = obj[key];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return result as Pick<V, K & keyof V>;
|
|
121
|
+
},
|
|
108
122
|
};
|
package/src/utils/strings.ts
CHANGED
|
@@ -1,28 +1,48 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
import { startCase } from "lodash-es";
|
|
3
2
|
import { Logger } from "./Logger";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Capitalize the first character of a string.
|
|
6
|
+
*/
|
|
7
|
+
export function capitalize(str: string): string {
|
|
8
|
+
if (!str) {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Convert a string to start case (capitalize each word).
|
|
16
|
+
* Handles camelCase, snake_case, kebab-case, and space-separated strings.
|
|
17
|
+
* Returns the original string unchanged if it contains no letters.
|
|
18
|
+
*/
|
|
19
|
+
export function startCase(str: string): string {
|
|
20
|
+
if (!str) {
|
|
21
|
+
return "";
|
|
22
|
+
}
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
if (typeof str !== "string") {
|
|
25
|
+
Logger.error(str);
|
|
26
|
+
throw new TypeError(`Expected string, got ${typeof str}`);
|
|
27
|
+
}
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
// If has no letters, return the string as-is
|
|
30
|
+
if (!/[A-Za-z]/.test(str)) {
|
|
31
|
+
return str;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return str
|
|
35
|
+
.replaceAll(/([\da-z])([A-Z])/g, "$1 $2") // camelCase → camel Case
|
|
36
|
+
.replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1 $2") // ABCDef → ABC Def
|
|
37
|
+
.replaceAll(/[\s_-]+/g, " ") // snake_case/kebab-case → spaces
|
|
38
|
+
.trim()
|
|
39
|
+
.split(" ")
|
|
40
|
+
.map(capitalize)
|
|
41
|
+
.join(" ");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Strings = {
|
|
45
|
+
startCase,
|
|
26
46
|
|
|
27
47
|
htmlEscape: (str: string | undefined): string | undefined => {
|
|
28
48
|
if (!str) {
|
package/src/utils/traceback.ts
CHANGED
|
@@ -98,10 +98,12 @@ export function getTracebackInfo(domNode: DOMNode): TracebackInfo | null {
|
|
|
98
98
|
10,
|
|
99
99
|
);
|
|
100
100
|
if (domNode.firstChild.nodeValue?.includes("__marimo__")) {
|
|
101
|
-
const
|
|
101
|
+
const maybeCellId = /__marimo__cell_(\w+)_/.exec(
|
|
102
102
|
domNode.firstChild.nodeValue,
|
|
103
|
-
)?.[1]
|
|
104
|
-
if (
|
|
103
|
+
)?.[1];
|
|
104
|
+
if (maybeCellId && lineNumber) {
|
|
105
|
+
// @ts-expect-error - Custom parser above will return valid cell ids
|
|
106
|
+
const cellId: CellId = maybeCellId;
|
|
105
107
|
return { kind: "cell", cellId, lineNumber };
|
|
106
108
|
}
|
|
107
109
|
} else {
|