@marimo-team/islands 0.21.2-dev92 → 0.21.2-dev94
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-B_FmEi05.js → Combination-B--d1_LV.js} +8 -8
- package/dist/{ConnectedDataExplorerComponent-CLLlotD4.js → ConnectedDataExplorerComponent-CTfvzyMi.js} +74 -75
- 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-CSvBdMtG.js → any-language-editor-Bj-3432h.js} +20 -20
- package/dist/apl-Y7yFAg6_.js +4 -0
- package/dist/{arc-CHF8PiiF.js → arc-CEWBr4jc.js} +2 -2
- package/dist/architecture-7HQA4BMR-SvLOcNCN.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-CIl7H_7A.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-Bxg4bo7H.js → blockDiagram-VD42YOAC-DvgBlX1D.js} +14 -14
- package/dist/brainfuck-BuqydWe3.js +4 -0
- package/dist/{button-B1ZgJ7Cc.js → button-qsiIHncQ.js} +15 -11
- package/dist/{c4Diagram-YG6GDRKO-k4TEDUb8.js → c4Diagram-YG6GDRKO-BN-xpNUK.js} +6 -6
- package/dist/{capabilities-DAGZLwa6.js → capabilities-BC3mzKnw.js} +2 -2
- package/dist/{channel-CCR8wXOx.js → channel-Dz_ka_DS.js} +1 -1
- package/dist/{chat-ui-CN_DUtLR.js → chat-ui-BvK3aDSR.js} +2803 -2804
- package/dist/{check-B2OoWw2h.js → check-D_YwHEgY.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BwfrWBqN.js → chunk-4BX2VUAB-BChPAwlt.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-BigWQaTs.js → chunk-4F5CHEZ2-9eJ5uB6a.js} +1 -1
- package/dist/{chunk-55IACEB6-D8THf2mi.js → chunk-55IACEB6-wWyiO7Qo.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-Cz2QbNIw.js → chunk-5FQGJX7Z-DHiDX6JT.js} +3 -3
- package/dist/{chunk-ABZYJK2D-NPoevJcI.js → chunk-ABZYJK2D-DYZpeLRO.js} +3 -3
- package/dist/{chunk-ATLVNIR6-DAhC1FCG.js → chunk-ATLVNIR6-9VSIMo3q.js} +2 -2
- package/dist/{chunk-B2363JML-DOYwB798.js → chunk-B2363JML-CkfqLBeZ.js} +1 -1
- package/dist/{chunk-B4BG7PRW-BDmytgmO.js → chunk-B4BG7PRW-CyIVj-RO.js} +7 -7
- package/dist/{chunk-CVBHYZKI-B6xhgaBd.js → chunk-CVBHYZKI-DqdOZevv.js} +1 -1
- package/dist/{chunk-DI55MBZ5-C6iNEV8U.js → chunk-DI55MBZ5-kmoX4_PJ.js} +6 -6
- package/dist/{chunk-EXTU4WIE-BtA6WdD4.js → chunk-EXTU4WIE-anbpETeD.js} +2 -2
- package/dist/{chunk-FMBD7UC4-CHdus51S.js → chunk-FMBD7UC4-WPL5C7Yr.js} +1 -1
- package/dist/{chunk-FRFDVMJY-Bo7Hv3UF.js → chunk-FRFDVMJY-DiBbw2aO.js} +1 -1
- package/dist/{chunk-HN2XXSSU-2Vfbq-kU.js → chunk-HN2XXSSU-GC9oeSst.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-BeXqAsc9.js → chunk-JA3XYJ7Z-DT9thFja.js} +3 -3
- package/dist/{chunk-JZLCHNYA-ibE7xTEx.js → chunk-JZLCHNYA-CoUG-3_5.js} +6 -6
- package/dist/{chunk-MI3HLSF2-Do0-KRc0.js → chunk-MI3HLSF2-CAUClZTk.js} +1 -1
- package/dist/{chunk-N4CR4FBY-CHAcubAf.js → chunk-N4CR4FBY-CgZCueW4.js} +7 -7
- package/dist/{chunk-PL6DKKU2-D3wYz-iW.js → chunk-PL6DKKU2-B93gSUY5.js} +1 -1
- package/dist/{chunk-QN33PNHL-CDWJY_kT.js → chunk-QN33PNHL-T-uF7h40.js} +2 -2
- package/dist/{chunk-QXUST7PY-CV37xRZd.js → chunk-QXUST7PY-D1a8s9iP.js} +10 -10
- package/dist/{chunk-QZHKN3VN-B_Mdb8GC.js → chunk-QZHKN3VN-cTJMhkeY.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-CGlk8NH-.js → chunk-S3R3BYOJ-KAv7zltL.js} +6 -6
- package/dist/{chunk-SJTYNZTY-Bauwp2-p.js → chunk-SJTYNZTY-CxP2rIlm.js} +1 -1
- package/dist/{chunk-TCCFYFTB-C5_FjmXA.js → chunk-TCCFYFTB-BrhaBdR8.js} +17 -14
- package/dist/{chunk-TQ3KTPDO-TjHW8xfv.js → chunk-TQ3KTPDO-C0j_j938.js} +1 -1
- package/dist/{chunk-TZMSLE5B-DfY6C3FB.js → chunk-TZMSLE5B-BY2BhygM.js} +3 -3
- package/dist/{chunk-UMXZTB3W-DdRiIIOF.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-7lgyEYRk.js → clike-D8Yzpo0X.js} +1 -1
- package/dist/clojure-CAHAWK5H.js +4 -0
- package/dist/{clone-BM9_Wkaf.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-DW3JC11U.js → code-block-37QAKDTI-CdeP6GC3.js} +1 -1
- package/dist/coffeescript-9MgX7RN8.js +4 -0
- package/dist/commonlisp-CVz2KONN.js +4 -0
- package/dist/{constants-LmeAawHa.js → constants-CXiS0vdr.js} +1 -1
- package/dist/{copy-B7XqFjF_.js → copy-CBo9JcJW.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-DXHZkJKX.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-B8UW0fXE.js → dagre-6UL2VRFP-CblBywCi.js} +33 -33
- package/dist/{dagre-B3-rUlCT.js → dagre-lLfkMavw.js} +36 -15
- package/dist/{data-grid-overlay-editor-CpL5Zajy.js → data-grid-overlay-editor-nQBPvGNe.js} +2 -2
- package/dist/{diagram-PSM6KHXK-DGD-j1bM.js → diagram-PSM6KHXK-CEWNAeex.js} +22 -22
- package/dist/{diagram-QEK2KX5R-DgsT6ZW4.js → diagram-QEK2KX5R-DvNPI6r6.js} +17 -17
- package/dist/{diagram-S2PKOQOG-CDh5Ij8z.js → diagram-S2PKOQOG-Bd8sWp1V.js} +17 -17
- package/dist/diff-D9CplOBj.js +4 -0
- package/dist/{dist-CpNdP46s.js → dist-5XnuIjzQ.js} +2 -2
- package/dist/{dist-DKr1M-ru.js → dist-B4HRhSlD.js} +1 -1
- package/dist/{dist-B6ZvKwIz.js → dist-B5pakFbT.js} +1 -1
- package/dist/{dist-DNSJBJI7.js → dist-B7Wxocl4.js} +2 -2
- package/dist/{dist-CsToCMcA.js → dist-B7pzGu3v.js} +2 -2
- package/dist/{dist-CwEBZkrQ.js → dist-BKKbDTix.js} +2 -2
- 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-Bg1YGq2b.js → dist-BmqJ8_Hr.js} +1 -1
- package/dist/{dist-B771Ewvn.js → dist-BnCNDnA7.js} +3 -3
- package/dist/{dist-mpvRA2Bc.js → dist-BnIjtwRq.js} +3 -3
- package/dist/dist-BoHuwe5C.js +5 -0
- package/dist/{dist-DlacJSaE.js → dist-BqO6WmbK.js} +2 -2
- package/dist/{dist-fRW2mZtS.js → dist-C-8pSTml.js} +2 -2
- package/dist/{dist-Bc-mOFlk.js → dist-C6R5LnmH.js} +2 -2
- package/dist/{dist-TuFHGVp2.js → dist-CD0aazOL.js} +1 -1
- package/dist/{dist-D2nC1On3.js → dist-CDXh0OSg.js} +2 -2
- package/dist/dist-CJ-2wW2z.js +8 -0
- package/dist/{dist-DSSPn3fP.js → dist-C_tLMuB0.js} +2 -2
- package/dist/dist-Ccbo2rCF.js +8 -0
- package/dist/{dist-Dl9_0tkc.js → dist-CgCO1-j-.js} +1 -1
- package/dist/{dist-QxBlbqgj.js → dist-Ck4gp1Wp.js} +3 -3
- package/dist/dist-CwayJLIO.js +5 -0
- package/dist/dist-D-jpfI6q.js +6 -0
- package/dist/{dist-BiNtCiQ9.js → dist-D2Rk1j4R.js} +2 -2
- package/dist/{dist-CwP9oyR8.js → dist-DFBgTyQ4.js} +2 -2
- package/dist/{dist-CJEfzjG5.js → dist-DInzmbT2.js} +4 -4
- package/dist/{dist-DqweMfpO.js → dist-DJ3EjUNc.js} +1 -1
- package/dist/{dist-DoO66t8e.js → dist-DM6PPTtq.js} +1 -1
- package/dist/{dist--MUqhsBh.js → dist-DS6k03oP.js} +1 -1
- package/dist/dist-DShjplLu.js +8 -0
- package/dist/{dist-DEmPLkH9.js → dist-DUY_SIWT.js} +4 -4
- package/dist/dist-DhBqFguQ.js +5 -0
- package/dist/dist-DiCgMCy4.js +6 -0
- package/dist/{dist-8-jPFKws.js → dist-DqWKkHpR.js} +2 -2
- package/dist/dist-Dqa-QKVa.js +5 -0
- package/dist/{dist-CXsGjNbR.js → dist-DqezbmBd.js} +2 -2
- package/dist/{dist-DvjVNme1.js → dist-Dv7FDx1_.js} +1 -1
- package/dist/dist-OFv2DOPe.js +5 -0
- package/dist/{dist-BsyHyGqX.js → dist-_k5rxRQI.js} +2 -2
- package/dist/{dist-BjYGwQ65.js → dist-n5m_P2Mr.js} +1 -1
- package/dist/{dist-DqT0O-4m.js → dist-nggqqIVv.js} +5 -5
- package/dist/{dist-CEmSeYaL.js → dist-xzh9kCE-.js} +2 -2
- package/dist/{dockerfile-DG6A2DdH.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-CGK0SUdu.js → erDiagram-Q2GNP2WA-C5bM6dcx.js} +15 -15
- package/dist/erlang-Dw4PDZV_.js +4 -0
- package/dist/{error-banner-D-KBGvBj.js → error-banner-DkDzvax3.js} +25 -25
- package/dist/{esm-B_4hpmV_.js → esm-BBsFNcPe.js} +105 -105
- package/dist/{esm-Bcbo0Yvz.js → esm-C9_jY_wu.js} +6 -6
- package/dist/factor-C9JRv63g.js +4 -0
- package/dist/{factor-Bq2mGIHt.js → factor-Nva0iSXt.js} +1 -1
- package/dist/{flowDiagram-NV44I4VS-PjhviPI_.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-CUVtQqgT.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-B6b-Z3mr.js → gitGraph-G5XIXVHT-S7ypWRtz.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-CNdrlK1I.js → gitGraphDiagram-V2S2FVAM-BGDZsLhF.js} +17 -17
- package/dist/{glide-data-editor-DQEuWuu_.js → glide-data-editor-D0IYL4_F.js} +72 -72
- 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-DfFl0Z8H.js → info-VBDWY6EO-CRCLLsdb.js} +3 -3
- package/dist/infoDiagram-HS3SLOUP-fkZhmVE7.js +30 -0
- package/dist/{input-B8CM-AuM.js → input-C5uUN4xL.js} +87 -87
- package/dist/isEmpty-D_Jzlmqv.js +42 -0
- package/dist/javascript-SNhUvTcB.js +4 -0
- package/dist/{journeyDiagram-XKPGCS4Q-CyoESVVb.js → journeyDiagram-XKPGCS4Q-DUANVNzR.js} +7 -7
- package/dist/julia-CGZzaDyk.js +4 -0
- package/dist/{kanban-definition-3W4ZIXB7-Doc2YV80.js → kanban-definition-3W4ZIXB7-dEyZPMAd.js} +12 -12
- package/dist/{katex-qPqrBHZ8.js → katex-Ckd8lBne.js} +1 -1
- package/dist/{label-e5-84vsp.js → label-DwSVaniz.js} +73 -80
- package/dist/{line-BWRi3U3S.js → line-LK_5q2B9.js} +3 -3
- package/dist/{linear-DZ8_CGCd.js → linear-CJ6ctpF3.js} +4 -4
- package/dist/livescript-Cj6cX-Ys.js +4 -0
- package/dist/{loader-C51Irhxm.js → loader-DrMJeyDu.js} +29 -35
- package/dist/lua-BcVHrD8f.js +4 -0
- package/dist/main.js +17474 -17436
- package/dist/mathematica-DLY8ZGoJ.js +4 -0
- package/dist/mbox-BNTsMWS5.js +4 -0
- package/dist/{mermaid-4DMBBIKO-DQdI9xDR.js → mermaid-4DMBBIKO-C2ajbN0u.js} +1 -1
- package/dist/{mermaid-CzWpf81s.js → mermaid-Bwy7OYzI.js} +48 -48
- package/dist/{mermaid-parser.core-CrrqF1ZZ.js → mermaid-parser.core-DDGHdNnp.js} +8 -8
- package/dist/{mhchem-BwoRNwg_.js → mhchem-DAXq6Zll.js} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-L2ybicpO.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/{nsis-i9_sgigf.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-D2Y0RpcH.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-B4zYMadD.js → ordinal-COPPjmMz.js} +1 -1
- package/dist/oz-yI7U9eVH.js +4 -0
- package/dist/{packet-DYOGHKS2-DIf3Dotq.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-Dj_gvPcD.js → pie-VRWISCQL-DfbgsrV5.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-x5w7q6Yp.js → pieDiagram-ADFJNKIX-BiAFdzOP.js} +22 -22
- package/dist/pig-DLLCqQaR.js +4 -0
- package/dist/powershell-CtjMkVO_.js +4 -0
- package/dist/{precisionRound-C-DW449D.js → precisionRound-Duzbr5ur.js} +1 -1
- package/dist/{process-output-BfgNdve9.js → process-output-CT8hHGp6.js} +2349 -2387
- 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-BhE2JRSg.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-D5j_5qG_.js → quadrantDiagram-AYHSOK5B-CZjWO4oG.js} +5 -5
- package/dist/r-DavzTuPU.js +4 -0
- package/dist/{radar-ZZBFDIW7-DXDVq3gi.js → radar-ZZBFDIW7-B5Hwx2a8.js} +3 -3
- package/dist/react-vega-DfxWeueH.js +9 -0
- package/dist/{react-vega-BBUxfZoV.js → react-vega-JMnqwKtN.js} +18 -18
- package/dist/{requirementDiagram-UZGBJVZJ-3SoJH6yP.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-fGkFNe5q.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-BE2uTn_d.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-Cjo6LzW9.js → slides-component-BsaaAy66.js} +2 -2
- package/dist/smalltalk-BXZ14pkr.js +4 -0
- package/dist/sparql-Boyc0wkb.js +4 -0
- package/dist/{spec-UGFYIDJb.js → spec-BLAZSydG.js} +3 -3
- package/dist/{src-BY0BGg6V.js → src-szye8OCw.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-Dmk9IAOx.js → stateDiagram-FKZM4ZOC-CmZfv4_-.js} +19 -19
- package/dist/stateDiagram-v2-4FDKWEC3-BpOH8Bgl.js +29 -0
- package/dist/{step-DGAGWg3y.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-C_pvjzP0.js → time-B8tcX_hU.js} +4 -4
- package/dist/{timeline-definition-IT6M3QCI-CvB4yGrN.js → timeline-definition-IT6M3QCI-C7yv4fEk.js} +4 -4
- package/dist/{toDate-COI3hP-5.js → toDate-BWaG12Pv.js} +4 -4
- package/dist/toml-DCDKACLL.js +4 -0
- package/dist/{tooltip-DnI4CwIS.js → tooltip-DGHTbHl5.js} +3 -3
- package/dist/{treemap-GDKQZRPO-CIG6WH-x.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-BtHYXgXF.js → useAsyncData-Dqt2tV1E.js} +2 -2
- package/dist/useDeepCompareMemoize-D2PKDkrk.js +85 -0
- package/dist/{useIframeCapabilities-CzVvBDe8.js → useIframeCapabilities-DlwLttZw.js} +1 -1
- package/dist/useLifecycle-CJ_5Z4Mk.js +173 -0
- package/dist/{useTheme-5GTtjXjy.js → useTheme-BIAKDAh6.js} +47 -12
- package/dist/vb-C9rpn9hN.js +4 -0
- package/dist/vbscript-BQ7rxQU0.js +4 -0
- package/dist/{vega-component-BQNW4qnB.js → vega-component-CTOT0vRO.js} +16 -16
- package/dist/{vega-loader.browser-DnqN5nbz.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-BbEInSqY.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 +1 -1
- package/src/components/ai/ai-model-dropdown.tsx +1 -1
- 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/tool-call-accordion.tsx +1 -0
- package/src/components/data-table/TableActions.tsx +25 -50
- 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/data-table.tsx +11 -9
- 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/pagination.tsx +1 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +53 -44
- package/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx +161 -0
- package/src/components/datasources/datasources.tsx +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +2 -2
- 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/renderers/grid-layout/grid-layout.tsx +2 -2
- package/src/components/editor/renderers/layout-select.tsx +2 -2
- package/src/components/variables/variables-table.tsx +1 -1
- package/src/core/cells/cells.ts +1 -1
- package/src/core/codemirror/rtc/extension.ts +1 -1
- package/src/core/network/requests-network.ts +1 -1
- 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/plugins/impl/DataTablePlugin.tsx +19 -22
- package/src/plugins/impl/RangeSliderPlugin.tsx +1 -1
- 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 -1
- 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/utils/__tests__/arrays.test.ts +118 -0
- 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/objects.ts +14 -0
- package/src/utils/strings.ts +39 -19
- package/dist/_arrayReduce-6BJAuN54.js +0 -9
- package/dist/_baseIsEqual-QWfxbVqg.js +0 -226
- package/dist/_basePickBy-Do49cXgl.js +0 -34
- package/dist/_baseSlice-bwIVgwNq.js +0 -10
- package/dist/_baseUniq-vFmWNipH.js +0 -59
- package/dist/_hasUnicode-DOFcQHhs.js +0 -8
- package/dist/apl-e1B5LPEL.js +0 -4
- package/dist/architecture-7HQA4BMR-KeUc82D1.js +0 -6
- package/dist/asciiarmor-B-gwgesP.js +0 -4
- package/dist/asn1-DF2ckRB4.js +0 -4
- package/dist/brainfuck-4G-7_gq_.js +0 -4
- package/dist/classDiagram-2ON5EDUG-DbWOiPgs.js +0 -30
- package/dist/classDiagram-v2-WZHVMYZB-COnXBrRA.js +0 -30
- package/dist/clojure-CUybM11R.js +0 -4
- package/dist/cmake-BPjGcuDL.js +0 -4
- package/dist/cobol-BETk_nb6.js +0 -4
- package/dist/coffeescript-CManZxXL.js +0 -4
- package/dist/commonlisp-DWkn7GW8.js +0 -4
- package/dist/crystal-CCbg5EUH.js +0 -4
- package/dist/css-By8eo-XS.js +0 -4
- package/dist/cypher-DwfHg3nP.js +0 -4
- package/dist/d-Brs1wNbw.js +0 -4
- package/dist/diff-DJIRmJ1g.js +0 -4
- package/dist/dist-BK8Ch8me.js +0 -5
- package/dist/dist-BPlAe3w3.js +0 -6
- package/dist/dist-BQnLGf1A.js +0 -8
- package/dist/dist-BZRBnAnM.js +0 -5
- package/dist/dist-BmTKj-5m.js +0 -5
- package/dist/dist-C1UyhB0b.js +0 -5
- package/dist/dist-C1uqqTuH.js +0 -5
- package/dist/dist-CCeSY9xv.js +0 -5
- package/dist/dist-CMWhb0s1.js +0 -5
- package/dist/dist-DYoFz28E.js +0 -8
- package/dist/dist-DeSnQwvL.js +0 -6
- package/dist/dist-e8VqCQ_P.js +0 -5
- package/dist/dist-kGaha3sX.js +0 -8
- package/dist/dist-wQD8nhf9.js +0 -8
- package/dist/dtd-Dyiazv4N.js +0 -4
- package/dist/dylan-D8Fcw7NA.js +0 -4
- package/dist/ecl-CjKp8Vii.js +0 -4
- package/dist/eiffel-K9ViOX5r.js +0 -4
- package/dist/elm-B5NVtRco.js +0 -4
- package/dist/erlang-BnLzgk7R.js +0 -4
- package/dist/factor-C7f9Jz5R.js +0 -4
- package/dist/forth-rGM8jLao.js +0 -4
- package/dist/fortran-B3acSe0i.js +0 -4
- package/dist/gas-Bb1Vmv_N.js +0 -4
- package/dist/gherkin-C9Lyidgd.js +0 -4
- package/dist/graphlib-CIQjMxKw.js +0 -228
- package/dist/groovy-DQk6XcGH.js +0 -4
- package/dist/hasIn-eLCPDloT.js +0 -86
- package/dist/haskell-mV0Vw9gv.js +0 -4
- package/dist/haxe-DqxN89zH.js +0 -5
- package/dist/idl-ya8W561J.js +0 -4
- package/dist/infoDiagram-HS3SLOUP-DGimKb9k.js +0 -30
- package/dist/isEmpty-CI9akcsL.js +0 -16
- package/dist/isString-xiQUcgm4.js +0 -9
- package/dist/javascript-CgqgptVu.js +0 -4
- package/dist/julia-CFQ-HusI.js +0 -4
- package/dist/livescript-D__3TmDo.js +0 -4
- package/dist/lua-Bytcgj_W.js +0 -4
- package/dist/mathematica-DJhvVKvl.js +0 -4
- package/dist/mbox-IGHPCjfR.js +0 -4
- package/dist/min-IJGSWMpU.js +0 -89
- package/dist/mirc-tcwvVugm.js +0 -4
- package/dist/mllike-Dx91i62r.js +0 -6
- package/dist/modelica-_SRt-yU5.js +0 -4
- package/dist/mscgen-GZrGS9gt.js +0 -6
- package/dist/mumps-Cv3ygyod.js +0 -4
- package/dist/nsis-BU7GeGbI.js +0 -4
- package/dist/ntriples-CL-FCYXb.js +0 -4
- package/dist/octave-Dc6_3DIu.js +0 -4
- package/dist/once-DjP4Kbhy.js +0 -74
- package/dist/oz-DpUAJCXf.js +0 -4
- package/dist/pascal-B17mncXs.js +0 -4
- package/dist/perl-BTpK97q9.js +0 -4
- package/dist/pig-CFb638Ap.js +0 -4
- package/dist/powershell-Cxo-_2A5.js +0 -4
- package/dist/properties-BPgT1xTB.js +0 -4
- package/dist/protobuf-BgHBaIIK.js +0 -4
- package/dist/pug-25-oS0SG.js +0 -4
- package/dist/puppet-DarIr20S.js +0 -4
- package/dist/python-BqmOsBsi.js +0 -4
- package/dist/q-D3QJCTup.js +0 -4
- package/dist/r-Cz_yBX4z.js +0 -4
- package/dist/range-DffmqG6L.js +0 -31
- package/dist/react-vega-Cs3lfDw8.js +0 -9
- package/dist/reduce-CGwzfrDo.js +0 -275
- package/dist/rpm-DGOtYwAI.js +0 -5
- package/dist/ruby-DBZu4rPc.js +0 -4
- package/dist/sas-Dd1D9qTq.js +0 -4
- package/dist/scheme-BmDjvTHX.js +0 -4
- package/dist/shell-BL8zFSaj.js +0 -4
- package/dist/sieve-BAx2WqUP.js +0 -4
- package/dist/smalltalk-CYRzF7VV.js +0 -4
- package/dist/sparql-YWaDRO4A.js +0 -4
- package/dist/stateDiagram-v2-4FDKWEC3-BGF0BvU6.js +0 -29
- package/dist/stex-BvZqVamL.js +0 -4
- package/dist/stylus-lYsyLFc1.js +0 -4
- package/dist/swift-ClQz9z1n.js +0 -4
- package/dist/tcl-B3jhsfqY.js +0 -4
- package/dist/textile-Cb1Dw7Aq.js +0 -4
- package/dist/toInteger-BUeg_O0F.js +0 -15
- package/dist/toString-CtXX84W6.js +0 -23
- package/dist/toml-nHZhetdO.js +0 -4
- package/dist/troff-DuJAGWKH.js +0 -4
- package/dist/ttcn-BxrcwP21.js +0 -4
- package/dist/ttcn-cfg-BAg_9dcc.js +0 -4
- package/dist/turtle-zCq949as.js +0 -4
- package/dist/types-BqLAaq-i.js +0 -209
- package/dist/uniq-CCKqEs7T.js +0 -8
- package/dist/useDeepCompareMemoize-9dXEtK7u.js +0 -124
- package/dist/useLifecycle-Be1LUuEg.js +0 -427
- package/dist/vb-De5hElus.js +0 -4
- package/dist/vbscript-Cypcpv4F.js +0 -4
- package/dist/velocity-Di7l-yhe.js +0 -4
- package/dist/verilog-Bzi-S3g2.js +0 -4
- package/dist/vhdl-B0ZZITaW.js +0 -4
- package/dist/webidl-0sviiRcN.js +0 -4
- package/dist/xquery-B4qMVWaB.js +0 -4
- package/dist/yacas-Jt25Fuv8.js +0 -4
- package/dist/z80-CrcbYzmp.js +0 -4
- /package/dist/{ImageComparisonComponent-BC00mJmw.js → ImageComparisonComponent-B5q26YVi.js} +0 -0
- /package/dist/{Plot-B1ahrLui.js → Plot-syRHsk-l.js} +0 -0
- /package/dist/{apl-99A7dLQe.js → apl-BqjtmlWW.js} +0 -0
- /package/dist/{array-B-MVxRIF.js → array-D7wW5QoO.js} +0 -0
- /package/dist/{asciiarmor-DLEhpFDx.js → asciiarmor-D9C9bbeV.js} +0 -0
- /package/dist/{asn1-CMrcTsT4.js → asn1-D_zR1ubK.js} +0 -0
- /package/dist/{asterisk-BUZwqih-.js → asterisk-B0dLLA8Z.js} +0 -0
- /package/dist/{brainfuck-ChPt5yBe.js → brainfuck-79SC7EYA.js} +0 -0
- /package/dist/{chunk-DR5Q36YT-CP69aZS_.js → chunk-DR5Q36YT-BxPcQ21t.js} +0 -0
- /package/dist/{click-outside-container-DB_bTXRG.js → click-outside-container-DNfggvIW.js} +0 -0
- /package/dist/{clike-CE0fXfM_.js → clike-DFDX2jWq.js} +0 -0
- /package/dist/{clojure-QkBEMU-g.js → clojure-Bb3Od9By.js} +0 -0
- /package/dist/{cmake-CU1jX7Mo.js → cmake-DYGUYEtU.js} +0 -0
- /package/dist/{cobol-DMOKzzky.js → cobol-CcWmcAFT.js} +0 -0
- /package/dist/{coffeescript-DjnjLyfk.js → coffeescript-BVa1qoL6.js} +0 -0
- /package/dist/{colors-Cn2p_FA3.js → colors-6DRQ0kEF.js} +0 -0
- /package/dist/{common-keywords-hbLeU7VU.js → common-keywords-Bz8dNfWa.js} +0 -0
- /package/dist/{commonlisp-CYd9iOSe.js → commonlisp-zi51jgUH.js} +0 -0
- /package/dist/{crystal-Dy55yoYG.js → crystal-QjpegJHM.js} +0 -0
- /package/dist/{css-CNU8w3HJ.js → css-B_GfJtcK.js} +0 -0
- /package/dist/{cypher-q47DGzK7.js → cypher-BVuYJpGf.js} +0 -0
- /package/dist/{cytoscape.esm-WbbDoCfu.js → cytoscape.esm-BYAuS6uS.js} +0 -0
- /package/dist/{d-jEkaLvxX.js → d-BT97RiQI.js} +0 -0
- /package/dist/{defaultLocale-Dr6Bz4JK.js → defaultLocale-B_A76Zpk.js} +0 -0
- /package/dist/{defaultLocale-I3_GfJ4U.js → defaultLocale-DjFHq3Xk.js} +0 -0
- /package/dist/{diff-vb2-unFN.js → diff-CHd93v7L.js} +0 -0
- /package/dist/{dist-N1lm7LVK.js → dist-CORAUsE1.js} +0 -0
- /package/dist/{dist-C89sHDXk.js → dist-CqR8FBcH.js} +0 -0
- /package/dist/{dtd-C9kR-bXa.js → dtd-akLFIRuZ.js} +0 -0
- /package/dist/{duckdb-keywords-CZ_ZTscu.js → duckdb-keywords-CQAIHMbC.js} +0 -0
- /package/dist/{dylan-BLckrK-V.js → dylan-Iy-rgNOc.js} +0 -0
- /package/dist/{ebnf-WEXPLEWb.js → ebnf-CTkZpZPT.js} +0 -0
- /package/dist/{ecl-CEsf6XVg.js → ecl-BhUXC_aR.js} +0 -0
- /package/dist/{eiffel-2KGZNzx6.js → eiffel-DIRAlWPD.js} +0 -0
- /package/dist/{elm-D2s3K5wF.js → elm-BDgVzkJ4.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-CflmeIys.js → emotion-is-prop-valid.esm-DdzHpbbG.js} +0 -0
- /package/dist/{erlang-0PMFOndk.js → erlang-Djcs_NwB.js} +0 -0
- /package/dist/{esm-Bb_hbWan.js → esm-BRwAuUu2.js} +0 -0
- /package/dist/{fcl-B_Gv5Jfx.js → fcl-OXoT8w4k.js} +0 -0
- /package/dist/{forth-DG89iUsu.js → forth-c_NTahPv.js} +0 -0
- /package/dist/{fortran-ytKsAVvu.js → fortran-Bpxt27dn.js} +0 -0
- /package/dist/{gas-Cg2Fm0N2.js → gas-RVBts6ZK.js} +0 -0
- /package/dist/{gherkin-B87FEnZ-.js → gherkin-Hf6PTauh.js} +0 -0
- /package/dist/{groovy-Dcs08AWD.js → groovy-CKjO-cRi.js} +0 -0
- /package/dist/{haskell-cwkOuhx6.js → haskell-DC1Gan6v.js} +0 -0
- /package/dist/{haxe-DWEo4q10.js → haxe-Bpne--ot.js} +0 -0
- /package/dist/{http-Dc2fv19V.js → http-CPVO27fZ.js} +0 -0
- /package/dist/{idl-WWQwDcRV.js → idl-GRIbMIEq.js} +0 -0
- /package/dist/{init-D-g0ONX1.js → init-BfRhston.js} +0 -0
- /package/dist/{invariant-Ctm_8TNZ.js → invariant-CzjtdzpE.js} +0 -0
- /package/dist/{javascript-BeR74dxD.js → javascript-nS0zxWNO.js} +0 -0
- /package/dist/{julia-UlvCUYGL.js → julia-CQpdTxmO.js} +0 -0
- /package/dist/{katex-B7pMJpE0.js → katex-Dg42UEnr.js} +0 -0
- /package/dist/{livescript-GPmFcmYV.js → livescript-D5kqrQol.js} +0 -0
- /package/dist/{lua-DYoT_0zM.js → lua-CKifrpGK.js} +0 -0
- /package/dist/{main-sxFlUO_N.js → main-C01_ic0d.js} +0 -0
- /package/dist/{math-BYK36kWZ.js → math-BbMyrONz.js} +0 -0
- /package/dist/{mathematica-DSFIQlbG.js → mathematica-CxT3f_fi.js} +0 -0
- /package/dist/{mbox-ej8lFMdL.js → mbox-C2_n_I9h.js} +0 -0
- /package/dist/{memoize-zYM53m8l.js → memoize-CwWm-NpB.js} +0 -0
- /package/dist/{merge-CqBPpP0q.js → merge-Byt9w-nO.js} +0 -0
- /package/dist/{micromark-factory-space-DQCQsiYz.js → micromark-factory-space-YUxUai1y.js} +0 -0
- /package/dist/{mirc-CAdIdvHQ.js → mirc-BTQeASBH.js} +0 -0
- /package/dist/{mllike-CjTB1lHF.js → mllike-BxO6Hl5N.js} +0 -0
- /package/dist/{modelica-BB68FYMa.js → modelica-DuivZReX.js} +0 -0
- /package/dist/{mscgen-BkbzgGGI.js → mscgen-DwD83FOm.js} +0 -0
- /package/dist/{mumps-Cu-28E9F.js → mumps-CdVjp3OE.js} +0 -0
- /package/dist/{nginx-ComVAAGN.js → nginx-Bi9TuNqb.js} +0 -0
- /package/dist/{node-sql-parser-DNGGJ-Rw.js → node-sql-parser-Bet3kHkt.js} +0 -0
- /package/dist/{now-CnuN5fN5.js → now-uNLDfbuW.js} +0 -0
- /package/dist/{ntriples-D9cQiZxZ.js → ntriples-DBS60qLp.js} +0 -0
- /package/dist/{octave-BvtAnPX0.js → octave-BL0tQUFC.js} +0 -0
- /package/dist/{oz-COaVHk2E.js → oz-DBrG4vwi.js} +0 -0
- /package/dist/{pascal-BFpqVD2x.js → pascal-BWV9h8yS.js} +0 -0
- /package/dist/{path-Du6n3sOU.js → path-C_x2ySFi.js} +0 -0
- /package/dist/{perl-DaiORxHP.js → perl-Bm5a83JW.js} +0 -0
- /package/dist/{pig-DFzRhmsF.js → pig-CbJDoHaE.js} +0 -0
- /package/dist/{powershell-BG2LQNKN.js → powershell-tG44m5Cy.js} +0 -0
- /package/dist/{properties-CqJJR5QY.js → properties-DUZGzdb1.js} +0 -0
- /package/dist/{protobuf-WwDYV1yY.js → protobuf-CcoKXY0d.js} +0 -0
- /package/dist/{puppet-QNY3w_uN.js → puppet-BH73L_Gw.js} +0 -0
- /package/dist/{purify.es-Co_dANLh.js → purify.es-BwXbuO3r.js} +0 -0
- /package/dist/{python-4QrQ3Ugi.js → python-NJIxLTZp.js} +0 -0
- /package/dist/{q-DhwXuxE2.js → q-MotBNA65.js} +0 -0
- /package/dist/{r-Df-nkR25.js → r-BUgBPae7.js} +0 -0
- /package/dist/{range-Bn3no95s.js → range-DwpxnYuB.js} +0 -0
- /package/dist/{rpm-Cokue07s.js → rpm-C_PaGodG.js} +0 -0
- /package/dist/{ruby-DrYcL3qF.js → ruby-DFLM2XD8.js} +0 -0
- /package/dist/{sas-CoiPirA5.js → sas-BMyyu8oO.js} +0 -0
- /package/dist/{scheme-CwFLjzHv.js → scheme-Qet9zYAe.js} +0 -0
- /package/dist/{shell-BFV-R24I.js → shell-BKHx4Jjo.js} +0 -0
- /package/dist/{sieve-CxwXF5T9.js → sieve-CVo7dc4j.js} +0 -0
- /package/dist/{simple-mode-DTaJtKPt.js → simple-mode-CVFBIo6d.js} +0 -0
- /package/dist/{smalltalk-QivVOCtX.js → smalltalk-BHr2nCth.js} +0 -0
- /package/dist/{solr-DTkyqJ-Z.js → solr-Bt9XtM2H.js} +0 -0
- /package/dist/{sparql-nKsFk8j7.js → sparql-QSu0ZCcc.js} +0 -0
- /package/dist/{spreadsheet-CER0raqY.js → spreadsheet-BWfuwc0V.js} +0 -0
- /package/dist/{sql-ByOoEONQ.js → sql-BdV3YOCG.js} +0 -0
- /package/dist/{stex-7yEw16Ww.js → stex-Btoi8e7I.js} +0 -0
- /package/dist/{stylus-BLKQAycn.js → stylus-CLZH9-Ps.js} +0 -0
- /package/dist/{swift-CJoKqiKj.js → swift-JNDJdNIE.js} +0 -0
- /package/dist/{tcl-YTeYFNUc.js → tcl-J5aE7aj5.js} +0 -0
- /package/dist/{textile-C6rKQqMQ.js → textile-6Hn05XQM.js} +0 -0
- /package/dist/{tiddlywiki-Cr9xyOY1.js → tiddlywiki-BWn8rSwJ.js} +0 -0
- /package/dist/{tiki-D5JONyfZ.js → tiki-XORjA1c3.js} +0 -0
- /package/dist/{timer-D7JVdX9U.js → timer-pEiW44EO.js} +0 -0
- /package/dist/{toml-DxlPGbRy.js → toml-BceyeuiF.js} +0 -0
- /package/dist/{treemap-qFGzn7xk.js → treemap-BzS5cW_6.js} +0 -0
- /package/dist/{troff-DFCfH7Ku.js → troff-DeMyd5Pf.js} +0 -0
- /package/dist/{ttcn-DAW-ERVP.js → ttcn-DurvvcB-.js} +0 -0
- /package/dist/{ttcn-cfg-CpJ8b7EN.js → ttcn-cfg-BuYui6Rv.js} +0 -0
- /package/dist/{turtle-BneV2f8L.js → turtle-CD8Qf-tp.js} +0 -0
- /package/dist/{vb-D973Vxxh.js → vb-BklM-Nqk.js} +0 -0
- /package/dist/{vbscript-Dckaq3YO.js → vbscript-DbMEEX0d.js} +0 -0
- /package/dist/{velocity-DKty-GUC.js → velocity-CERL-_vq.js} +0 -0
- /package/dist/{verilog-aNaK_biA.js → verilog-BD6jNce6.js} +0 -0
- /package/dist/{vhdl-CQuehnQy.js → vhdl-U-1_N98i.js} +0 -0
- /package/dist/{webidl-Bhg8vaMr.js → webidl-IUn0dzoa.js} +0 -0
- /package/dist/{xquery-D2q16GaM.js → xquery-QeeHdSO2.js} +0 -0
- /package/dist/{yacas-DHGOHnNa.js → yacas-C9XcEPAJ.js} +0 -0
- /package/dist/{z80-BPhTmO22.js → z80-C-nD1oRy.js} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Extension } from "@codemirror/state";
|
|
4
4
|
import { EditorView, ViewPlugin } from "@codemirror/view";
|
|
5
|
+
import { dequal as isEqual } from "dequal";
|
|
5
6
|
import { atom } from "jotai";
|
|
6
|
-
import { isEqual } from "lodash-es";
|
|
7
7
|
import { Awareness, LoroDoc, LoroMap, LoroText } from "loro-crdt";
|
|
8
8
|
import ReconnectingWebSocket from "partysocket/ws";
|
|
9
9
|
import type { CellId } from "@/core/cells/ids";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { once } from "
|
|
3
|
+
import { once } from "@/utils/once";
|
|
4
4
|
import { getRuntimeManager } from "../runtime/config";
|
|
5
5
|
import { API, createClientWithRuntimeManager } from "./api";
|
|
6
6
|
import { waitForConnectionOpen } from "./connection";
|
package/src/core/rtc/state.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { atomWithStorage } from "jotai/utils";
|
|
3
|
-
import { once } from "
|
|
3
|
+
import { once } from "@/utils/once";
|
|
4
4
|
import { jotaiJsonStorage } from "@/utils/storage/jotai";
|
|
5
5
|
import { getFeatureFlag } from "../config/feature-flag";
|
|
6
6
|
|
package/src/core/saving/state.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { dequal as isEqual } from "dequal";
|
|
2
4
|
import { atom } from "jotai";
|
|
3
|
-
import { isEqual } from "lodash-es";
|
|
4
5
|
import { arrayShallowEquals } from "@/utils/arrays";
|
|
5
6
|
import { type NotebookState, notebookAtom } from "../cells/cells";
|
|
6
7
|
import { type LayoutState, layoutStateAtom } from "../layout/layout";
|
package/src/core/slots/slots.ts
CHANGED
package/src/core/state/jotai.ts
CHANGED
|
@@ -26,7 +26,6 @@ import type { CellSelectionState } from "@/components/data-table/cell-selection/
|
|
|
26
26
|
import type { CellStyleState } from "@/components/data-table/cell-styling/types";
|
|
27
27
|
import { TablePanel } from "@/components/data-table/charts/charts";
|
|
28
28
|
import { hasChart } from "@/components/data-table/charts/storage";
|
|
29
|
-
import { ColumnExplorerPanel } from "@/components/data-table/column-explorer-panel/column-explorer";
|
|
30
29
|
import { ColumnChartSpecModel } from "@/components/data-table/column-summary/chart-spec-model";
|
|
31
30
|
import { ColumnChartContext } from "@/components/data-table/column-summary/column-summary";
|
|
32
31
|
import {
|
|
@@ -35,11 +34,11 @@ import {
|
|
|
35
34
|
} from "@/components/data-table/filters";
|
|
36
35
|
import { usePanelOwnership } from "@/components/data-table/hooks/use-panel-ownership";
|
|
37
36
|
import { LoadingTable } from "@/components/data-table/loading-table";
|
|
38
|
-
import { RowViewerPanel } from "@/components/data-table/row-viewer-panel/row-viewer";
|
|
39
37
|
import {
|
|
40
38
|
type DownloadAsArgs,
|
|
41
39
|
DownloadAsSchema,
|
|
42
40
|
} from "@/components/data-table/schemas";
|
|
41
|
+
import { TableExplorerPanel } from "@/components/data-table/table-explorer-panel/table-explorer-panel";
|
|
43
42
|
import {
|
|
44
43
|
type BinValues,
|
|
45
44
|
type ColumnHeaderStats,
|
|
@@ -839,7 +838,8 @@ const DataTableComponent = ({
|
|
|
839
838
|
}): JSX.Element => {
|
|
840
839
|
const id = useId();
|
|
841
840
|
const [viewedRowIdx, setViewedRowIdx] = useState(0);
|
|
842
|
-
const { isPanelOpen, togglePanel } =
|
|
841
|
+
const { isPanelOpen, isAnyPanelOpen, togglePanel, panelType, setPanelType } =
|
|
842
|
+
usePanelOwnership(id, cellId);
|
|
843
843
|
|
|
844
844
|
const chartSpecModel = useMemo(() => {
|
|
845
845
|
if (!columnSummaries) {
|
|
@@ -1002,8 +1002,7 @@ const DataTableComponent = ({
|
|
|
1002
1002
|
);
|
|
1003
1003
|
|
|
1004
1004
|
const isSelectable = selection === "multi" || selection === "single";
|
|
1005
|
-
const
|
|
1006
|
-
showColumnExplorer && preview_column && isPanelOpen("column-explorer");
|
|
1005
|
+
const canShowColumnExplorer = showColumnExplorer && !!preview_column;
|
|
1007
1006
|
|
|
1008
1007
|
const isInVscode = isInVscodeExtension();
|
|
1009
1008
|
|
|
@@ -1032,28 +1031,24 @@ const DataTableComponent = ({
|
|
|
1032
1031
|
</Banner>
|
|
1033
1032
|
)}
|
|
1034
1033
|
|
|
1035
|
-
{
|
|
1034
|
+
{isAnyPanelOpen && (showRowExplorer || canShowColumnExplorer) && (
|
|
1036
1035
|
<ContextAwarePanelItem>
|
|
1037
|
-
<
|
|
1038
|
-
getRow={getRow}
|
|
1039
|
-
fieldTypes={memoizedUnclampedFieldTypes}
|
|
1040
|
-
totalRows={totalRows}
|
|
1036
|
+
<TableExplorerPanel
|
|
1041
1037
|
rowIdx={viewedRowIdx}
|
|
1042
1038
|
setRowIdx={setViewedRow}
|
|
1039
|
+
totalRows={totalRows}
|
|
1040
|
+
fieldTypes={memoizedUnclampedFieldTypes}
|
|
1041
|
+
getRow={getRow}
|
|
1043
1042
|
isSelectable={isSelectable}
|
|
1044
|
-
isRowSelected={rowSelection[viewedRowIdx]}
|
|
1043
|
+
isRowSelected={Boolean(rowSelection[viewedRowIdx])}
|
|
1045
1044
|
handleRowSelectionChange={handleRowSelectionChange}
|
|
1046
|
-
/>
|
|
1047
|
-
</ContextAwarePanelItem>
|
|
1048
|
-
)}
|
|
1049
|
-
{showColExplorer && (
|
|
1050
|
-
<ContextAwarePanelItem>
|
|
1051
|
-
<ColumnExplorerPanel
|
|
1052
1045
|
previewColumn={preview_column}
|
|
1053
|
-
fieldTypes={memoizedUnclampedFieldTypes}
|
|
1054
|
-
totalRows={totalRows}
|
|
1055
1046
|
totalColumns={totalColumns}
|
|
1056
1047
|
tableId={id}
|
|
1048
|
+
showRowExplorer={showRowExplorer && !isInVscode}
|
|
1049
|
+
showColumnExplorer={canShowColumnExplorer && !isInVscode}
|
|
1050
|
+
activeTab={panelType}
|
|
1051
|
+
onTabChange={setPanelType}
|
|
1057
1052
|
/>
|
|
1058
1053
|
</ContextAwarePanelItem>
|
|
1059
1054
|
)}
|
|
@@ -1099,11 +1094,13 @@ const DataTableComponent = ({
|
|
|
1099
1094
|
showChartBuilder={showChartBuilder}
|
|
1100
1095
|
showPageSizeSelector={showPageSizeSelector}
|
|
1101
1096
|
// Hidden in VSCode (for now) because we don't have a panel to show
|
|
1102
|
-
// the
|
|
1103
|
-
|
|
1104
|
-
|
|
1097
|
+
// the table explorer.
|
|
1098
|
+
showTableExplorer={
|
|
1099
|
+
(showRowExplorer || canShowColumnExplorer) && !isInVscode
|
|
1100
|
+
}
|
|
1105
1101
|
togglePanel={togglePanel}
|
|
1106
1102
|
isPanelOpen={isPanelOpen}
|
|
1103
|
+
isAnyPanelOpen={isAnyPanelOpen}
|
|
1107
1104
|
viewedRowIdx={viewedRowIdx}
|
|
1108
1105
|
onViewedRowChange={(rowIdx) => setViewedRowIdx(rowIdx)}
|
|
1109
1106
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { isEqual } from "
|
|
3
|
+
import { dequal as isEqual } from "dequal";
|
|
4
4
|
import { type JSX, useEffect, useId, useState } from "react";
|
|
5
5
|
import { useLocale } from "react-aria";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
type TextUIPart,
|
|
11
11
|
type UIMessageChunk,
|
|
12
12
|
} from "ai";
|
|
13
|
-
import { startCase } from "lodash-es";
|
|
14
13
|
import {
|
|
15
14
|
BotMessageSquareIcon,
|
|
16
15
|
HelpCircleIcon,
|
|
@@ -57,6 +56,7 @@ import {
|
|
|
57
56
|
import { cn } from "@/utils/cn";
|
|
58
57
|
import { Logger } from "@/utils/Logger";
|
|
59
58
|
import { Objects } from "@/utils/objects";
|
|
59
|
+
import { Strings } from "@/utils/strings";
|
|
60
60
|
import { ErrorBanner } from "../common/error-banner";
|
|
61
61
|
import type { PluginFunctions } from "./ChatPlugin";
|
|
62
62
|
import type { ChatConfig } from "./types";
|
|
@@ -670,7 +670,7 @@ const ConfigPopup: React.FC<{
|
|
|
670
670
|
htmlFor={key}
|
|
671
671
|
className="flex w-full justify-between col-span-3 align-end"
|
|
672
672
|
>
|
|
673
|
-
{startCase(key)}
|
|
673
|
+
{Strings.startCase(key)}
|
|
674
674
|
<Tooltip
|
|
675
675
|
delayDuration={200}
|
|
676
676
|
side="top"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { capitalize } from "lodash-es";
|
|
4
3
|
import { PencilIcon, PlusIcon } from "lucide-react";
|
|
5
4
|
import { useState } from "react";
|
|
6
5
|
import { Button } from "@/components/ui/button";
|
|
@@ -20,6 +19,7 @@ import {
|
|
|
20
19
|
SelectValue,
|
|
21
20
|
} from "@/components/ui/select";
|
|
22
21
|
import type { DataType } from "@/core/kernel/messages";
|
|
22
|
+
import { capitalize } from "@/utils/strings";
|
|
23
23
|
|
|
24
24
|
interface RenameColumnSubProps {
|
|
25
25
|
currentColumnName: string;
|
|
@@ -5,7 +5,6 @@ import { ExpandedType } from "compassql/build/src/query/expandedtype";
|
|
|
5
5
|
import { PrimitiveType, type Schema } from "compassql/build/src/schema";
|
|
6
6
|
import { SHORT_WILDCARD } from "compassql/build/src/wildcard";
|
|
7
7
|
import { useAtomValue } from "jotai";
|
|
8
|
-
import { startCase } from "lodash-es";
|
|
9
8
|
import { FunctionSquareIcon } from "lucide-react";
|
|
10
9
|
import React from "react";
|
|
11
10
|
import { Label } from "@/components/ui/label";
|
|
@@ -19,6 +18,7 @@ import {
|
|
|
19
18
|
SelectTrigger,
|
|
20
19
|
SelectValue,
|
|
21
20
|
} from "@/components/ui/select";
|
|
21
|
+
import { Strings } from "@/utils/strings";
|
|
22
22
|
import type { EncodingChannel, FieldDefinition } from "../encoding";
|
|
23
23
|
import {
|
|
24
24
|
MULTI_TEMPORAL_FUNCTIONS,
|
|
@@ -281,7 +281,7 @@ const FieldOptions = ({
|
|
|
281
281
|
{label && <SelectLabel>{label}</SelectLabel>}
|
|
282
282
|
{fns.map((fn) => (
|
|
283
283
|
<SelectItem key={fn} value={fn ?? NONE_FN}>
|
|
284
|
-
{startCase(fn)}
|
|
284
|
+
{Strings.startCase(fn)}
|
|
285
285
|
</SelectItem>
|
|
286
286
|
))}
|
|
287
287
|
</SelectGroup>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { isString } from "lodash-es";
|
|
4
3
|
import type {
|
|
5
4
|
ArgmaxDef,
|
|
6
5
|
ArgminDef,
|
|
@@ -59,7 +58,7 @@ type SupportedAggregateOp = (typeof SUPPORTED_AGGREGATE_OPS)[number];
|
|
|
59
58
|
export const isAggregateOp: typeof isAggregateOpVega = (
|
|
60
59
|
a: string | ArgminDef | ArgmaxDef,
|
|
61
60
|
): a is AggregateOp => {
|
|
62
|
-
if (
|
|
61
|
+
if (typeof a !== "string") {
|
|
63
62
|
return false;
|
|
64
63
|
}
|
|
65
64
|
|
|
@@ -8,12 +8,13 @@ import type { Figure } from "./Plot";
|
|
|
8
8
|
|
|
9
9
|
import "./plotly.css";
|
|
10
10
|
import "./mapbox.css";
|
|
11
|
-
import {
|
|
11
|
+
import { set } from "lodash-es";
|
|
12
12
|
import { type JSX, lazy, memo, useMemo } from "react";
|
|
13
13
|
import useEvent from "react-use-event-hook";
|
|
14
14
|
import { useDeepCompareMemoize } from "@/hooks/useDeepCompareMemoize";
|
|
15
15
|
import { useScript } from "@/hooks/useScript";
|
|
16
16
|
import { Arrays } from "@/utils/arrays";
|
|
17
|
+
import { Objects } from "@/utils/objects";
|
|
17
18
|
import { createParser, type PlotlyTemplateParser } from "./parse-from-template";
|
|
18
19
|
import { usePlotlyLayout } from "./usePlotlyLayout";
|
|
19
20
|
|
|
@@ -179,7 +180,9 @@ export const PlotlyComponent = memo(
|
|
|
179
180
|
|
|
180
181
|
setValue((prev) => ({
|
|
181
182
|
...prev,
|
|
182
|
-
points: evt.points.map((point) =>
|
|
183
|
+
points: evt.points.map((point) =>
|
|
184
|
+
Objects.pick(point, TREE_MAP_DATA_KEYS),
|
|
185
|
+
),
|
|
183
186
|
}));
|
|
184
187
|
})}
|
|
185
188
|
onSunburstClick={useEvent((evt: Readonly<Plotly.PlotMouseEvent>) => {
|
|
@@ -189,7 +192,9 @@ export const PlotlyComponent = memo(
|
|
|
189
192
|
|
|
190
193
|
setValue((prev) => ({
|
|
191
194
|
...prev,
|
|
192
|
-
points: evt.points.map((point) =>
|
|
195
|
+
points: evt.points.map((point) =>
|
|
196
|
+
Objects.pick(point, SUNBURST_DATA_KEYS),
|
|
197
|
+
),
|
|
193
198
|
}));
|
|
194
199
|
})}
|
|
195
200
|
config={plotlyConfig}
|
|
@@ -264,7 +269,7 @@ function extractPoints(
|
|
|
264
269
|
let parser: PlotlyTemplateParser | undefined;
|
|
265
270
|
|
|
266
271
|
return points.map((point) => {
|
|
267
|
-
const standardPointFields = pick(point, STANDARD_POINT_KEYS);
|
|
272
|
+
const standardPointFields = Objects.pick(point, STANDARD_POINT_KEYS);
|
|
268
273
|
|
|
269
274
|
// Get the first hovertemplate
|
|
270
275
|
const hovertemplate = Array.isArray(point.data.hovertemplate)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { usePrevious } from "@uidotdev/usehooks";
|
|
4
|
-
import { isEqual
|
|
4
|
+
import { dequal as isEqual } from "dequal";
|
|
5
5
|
import type * as Plotly from "plotly.js";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
import { Objects } from "@/utils/objects";
|
|
@@ -50,7 +50,7 @@ export function computeLayoutOnFigureChange(
|
|
|
50
50
|
): Partial<Plotly.Layout> {
|
|
51
51
|
return {
|
|
52
52
|
...createInitialLayout(nextFigure),
|
|
53
|
-
...pick(prevLayout, PERSISTED_LAYOUT_KEYS),
|
|
53
|
+
...Objects.pick(prevLayout, PERSISTED_LAYOUT_KEYS),
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { tableFromIPC } from "@uwdata/flechette";
|
|
4
|
-
import { isNumber } from "lodash-es";
|
|
5
4
|
import { Logger } from "@/utils/Logger";
|
|
6
5
|
import { Objects } from "@/utils/objects";
|
|
7
6
|
import { batchedArrowLoader, createBatchedLoader } from "./batched";
|
|
@@ -42,7 +41,9 @@ const BIG_INT_MIDDLEWARE: Middleware = () => {
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
const parsedInt = Number.parseInt(v, 10);
|
|
45
|
-
if (
|
|
44
|
+
if (Number.isNaN(parsedInt)) {
|
|
45
|
+
return v;
|
|
46
|
+
} else {
|
|
46
47
|
const needsBigInt = Math.abs(parsedInt) > Number.MAX_SAFE_INTEGER;
|
|
47
48
|
if (!needsBigInt) {
|
|
48
49
|
return previousIntegerParserWithoutNaN(v);
|
|
@@ -54,8 +55,6 @@ const BIG_INT_MIDDLEWARE: Middleware = () => {
|
|
|
54
55
|
// as BigInt
|
|
55
56
|
return previousIntegerParserWithoutNaN(v);
|
|
56
57
|
}
|
|
57
|
-
} else {
|
|
58
|
-
return "";
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
60
|
typeParsers.number = (v: string) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { uniq } from "lodash-es";
|
|
4
3
|
import type { TopLevelSpec } from "vega-lite";
|
|
5
4
|
import type { NonNormalizedSpec } from "vega-lite/types_unstable/spec/index.js";
|
|
5
|
+
import { uniq } from "@/utils/arrays";
|
|
6
6
|
import { Marks } from "./marks";
|
|
7
7
|
import {
|
|
8
8
|
type Field,
|
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
arrayShallowEquals,
|
|
10
10
|
arrayToggle,
|
|
11
11
|
getNextIndex,
|
|
12
|
+
partition,
|
|
13
|
+
range,
|
|
14
|
+
sortBy,
|
|
15
|
+
uniq,
|
|
12
16
|
} from "../arrays";
|
|
13
17
|
|
|
14
18
|
describe("arrays", () => {
|
|
@@ -130,6 +134,120 @@ describe("arrays", () => {
|
|
|
130
134
|
});
|
|
131
135
|
});
|
|
132
136
|
|
|
137
|
+
describe("range", () => {
|
|
138
|
+
it("should create an array of numbers from 0 to length - 1", () => {
|
|
139
|
+
expect(range(5)).toEqual([0, 1, 2, 3, 4]);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("should return empty array for 0", () => {
|
|
143
|
+
expect(range(0)).toEqual([]);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it("should return single element for 1", () => {
|
|
147
|
+
expect(range(1)).toEqual([0]);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
describe("uniq", () => {
|
|
152
|
+
it("should remove duplicate numbers", () => {
|
|
153
|
+
expect(uniq([1, 2, 2, 3, 1])).toEqual([1, 2, 3]);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it("should remove duplicate strings", () => {
|
|
157
|
+
expect(uniq(["a", "b", "a", "c"])).toEqual(["a", "b", "c"]);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it("should handle empty array", () => {
|
|
161
|
+
expect(uniq([])).toEqual([]);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("should preserve order of first occurrence", () => {
|
|
165
|
+
expect(uniq([3, 1, 2, 1, 3])).toEqual([3, 1, 2]);
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
describe("sortBy", () => {
|
|
170
|
+
it("should sort by a numeric key", () => {
|
|
171
|
+
const items = [{ n: 3 }, { n: 1 }, { n: 2 }];
|
|
172
|
+
expect(sortBy(items, (x) => x.n)).toEqual([{ n: 1 }, { n: 2 }, { n: 3 }]);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it("should sort by a string key", () => {
|
|
176
|
+
const items = [{ name: "charlie" }, { name: "alice" }, { name: "bob" }];
|
|
177
|
+
expect(sortBy(items, (x) => x.name)).toEqual([
|
|
178
|
+
{ name: "alice" },
|
|
179
|
+
{ name: "bob" },
|
|
180
|
+
{ name: "charlie" },
|
|
181
|
+
]);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("should not mutate the original array", () => {
|
|
185
|
+
const arr = [3, 1, 2];
|
|
186
|
+
sortBy(arr, (x) => x);
|
|
187
|
+
expect(arr).toEqual([3, 1, 2]);
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
it("should handle empty array", () => {
|
|
191
|
+
expect(sortBy([], (x) => x)).toEqual([]);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("should sort null/undefined keys last", () => {
|
|
195
|
+
const items = [
|
|
196
|
+
{ name: "b", v: undefined },
|
|
197
|
+
{ name: "a", v: 1 },
|
|
198
|
+
{ name: "c", v: null },
|
|
199
|
+
{ name: "d", v: 2 },
|
|
200
|
+
];
|
|
201
|
+
const result = sortBy(items, (x) => x.v);
|
|
202
|
+
expect(result.map((x) => x.name)).toEqual(["a", "d", "b", "c"]);
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it("should sort numeric keys correctly", () => {
|
|
206
|
+
const items = [{ v: 10 }, { v: 2 }, { v: 1 }, { v: 20 }];
|
|
207
|
+
expect(sortBy(items, (x) => x.v)).toEqual([
|
|
208
|
+
{ v: 1 },
|
|
209
|
+
{ v: 2 },
|
|
210
|
+
{ v: 10 },
|
|
211
|
+
{ v: 20 },
|
|
212
|
+
]);
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
describe("partition", () => {
|
|
217
|
+
it("should split array by predicate", () => {
|
|
218
|
+
const [evens, odds] = partition([1, 2, 3, 4, 5], (n) => n % 2 === 0);
|
|
219
|
+
expect(evens).toEqual([2, 4]);
|
|
220
|
+
expect(odds).toEqual([1, 3, 5]);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it("should handle all matching", () => {
|
|
224
|
+
const [pass, fail] = partition([2, 4, 6], (n) => n % 2 === 0);
|
|
225
|
+
expect(pass).toEqual([2, 4, 6]);
|
|
226
|
+
expect(fail).toEqual([]);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("should handle none matching", () => {
|
|
230
|
+
const [pass, fail] = partition([1, 3, 5], (n) => n % 2 === 0);
|
|
231
|
+
expect(pass).toEqual([]);
|
|
232
|
+
expect(fail).toEqual([1, 3, 5]);
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it("should handle empty array", () => {
|
|
236
|
+
const [pass, fail] = partition([], () => true);
|
|
237
|
+
expect(pass).toEqual([]);
|
|
238
|
+
expect(fail).toEqual([]);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it("should work with string predicates", () => {
|
|
242
|
+
const [long, short] = partition(
|
|
243
|
+
["hi", "hello", "yo", "greetings"],
|
|
244
|
+
(s) => s.length > 3,
|
|
245
|
+
);
|
|
246
|
+
expect(long).toEqual(["hello", "greetings"]);
|
|
247
|
+
expect(short).toEqual(["hi", "yo"]);
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
|
|
133
251
|
describe("getNextIndex", () => {
|
|
134
252
|
it("should return 0 if listLength is 0", () => {
|
|
135
253
|
expect(getNextIndex(null, 0, "up")).toBe(0);
|
|
@@ -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/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
|
};
|