@marimo-team/islands 0.17.2 → 0.17.3
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-De9yoNY5.js → Combination-DrSsMSEB.js} +860 -816
- package/dist/{ConnectedDataExplorerComponent-DuvpJOKp.js → ConnectedDataExplorerComponent-DY9cADKc.js} +2282 -2232
- package/dist/{ImageComparisonComponent--etUl2pp.js → ImageComparisonComponent-CJvR7Qzp.js} +3 -2
- package/dist/{_baseIsEqual-BFlyFUxC.js → _baseIsEqual-DbBiwJP8.js} +1 -1
- package/dist/{_basePickBy-gCCvtjgp.js → _basePickBy-ChFDiIEt.js} +3 -3
- package/dist/{_baseProperty-BuqBC0Ie.js → _baseProperty-Bf09f9Ee.js} +5 -5
- package/dist/_baseUniq-D5kohCWB.js +59 -0
- package/dist/any-language-editor-Bs2c1bKU.js +156 -0
- package/dist/apl-Bp8pgLcx.js +4 -0
- package/dist/{arc-C_O2hc-b.js → arc-DM-UhhIs.js} +2 -2
- package/dist/architecture-O4VJ6CD3-SVEfQWDz.js +24 -0
- package/dist/{architectureDiagram-W76B3OCA-CrK99pJi.js → architectureDiagram-W76B3OCA-GKSiVAlH.js} +41 -38
- package/dist/asciiarmor-IoNSjDv9.js +4 -0
- package/dist/asn1-B1GnbkOF.js +4 -0
- package/dist/{blockDiagram-QIGZ2CNN-BJOEyO6w.js → blockDiagram-QIGZ2CNN-wX8KWoV2.js} +30 -29
- package/dist/brainfuck-TRxEs4B5.js +4 -0
- package/dist/{button-ADXOb_gX.js → button-B8zS4Mtw.js} +5 -4
- package/dist/{c4Diagram-FPNF74CW-7Pz_X9wF.js → c4Diagram-FPNF74CW-Ns4C9pNn.js} +12 -12
- package/dist/{channel-X-wRUxX6.js → channel-Dgla_oqe.js} +1 -1
- package/dist/{check-COlaG7Ss.js → check-BZnPxXnd.js} +1 -1
- package/dist/{chunk-3AY6CYHV-BQH2fFpA.js → chunk-3AY6CYHV-HfZ-8MFM.js} +10 -10
- package/dist/{chunk-4BX2VUAB-D-QtDCKM.js → chunk-4BX2VUAB-CV5cUTmw.js} +1 -1
- package/dist/{chunk-4KMFLZZN-BirZvvJS.js → chunk-4KMFLZZN-Cbgb64pE.js} +17 -18
- package/dist/{chunk-55IACEB6-DjtPYZKs.js → chunk-55IACEB6--aEkhs1O.js} +1 -1
- package/dist/{chunk-6OXUPJBA-CTnnqlzw.js → chunk-6OXUPJBA-DQZp24uZ.js} +7 -7
- package/dist/{chunk-7GE3RBXV-CT47hCrL.js → chunk-7GE3RBXV-D0K_8mbM.js} +1 -1
- package/dist/{chunk-ABZYJK2D-B6ZsU6SR.js → chunk-ABZYJK2D-BwKkjFgF.js} +3 -3
- package/dist/{chunk-BN7GFLIU-DYWEsrG4.js → chunk-BN7GFLIU-93ktvOI2.js} +1 -1
- package/dist/{chunk-CVBHYZKI-BuzDGXz0.js → chunk-CVBHYZKI-tTpx9vm_.js} +1 -1
- package/dist/{chunk-CXMOBAN2-Bas2S5w1.js → chunk-CXMOBAN2-CagHnxl1.js} +6 -6
- package/dist/{chunk-EXTU4WIE-DXwNSukz.js → chunk-EXTU4WIE-Ve2vgn5X.js} +2 -2
- package/dist/{chunk-FMBD7UC4-CYKEpuPr.js → chunk-FMBD7UC4-CCvcIQpJ.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-DcxfkcDC.js → chunk-JA3XYJ7Z-CrQC4eYr.js} +4 -4
- package/dist/{chunk-JEIROHC2-C01ZIcIG.js → chunk-JEIROHC2-tuJLHPKk.js} +1 -1
- package/dist/{chunk-K7UQS3LO-CmbT97MV.js → chunk-K7UQS3LO-BzsTVREe.js} +7 -7
- package/dist/{chunk-KMC2YHZD-D64m-1E1.js → chunk-KMC2YHZD-CdKOlVi0.js} +1 -1
- package/dist/{chunk-QN33PNHL-DjB0j8Dr.js → chunk-QN33PNHL-CbdYySGk.js} +2 -2
- package/dist/{chunk-QYVHNE3D-VA4W4oxG.js → chunk-QYVHNE3D-BDj4udRH.js} +2 -2
- package/dist/{chunk-QZHKN3VN-KT0fl3Em.js → chunk-QZHKN3VN-E6VBm6ir.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-C5zmcMvn.js → chunk-S3R3BYOJ-DuumGJ4u.js} +6 -6
- package/dist/{chunk-T44TD3VJ-BMOgu-Hk.js → chunk-T44TD3VJ-Bc-UhG4i.js} +1 -1
- package/dist/{chunk-TVAH2DTR-eKm8SKnH.js → chunk-TVAH2DTR-s8skdWqT.js} +6 -6
- package/dist/{chunk-TZMSLE5B-CQxFRiI2.js → chunk-TZMSLE5B-CUfRRoFb.js} +3 -3
- package/dist/{chunk-WFRQ32O7-Dg51o277.js → chunk-WFRQ32O7-BquRwCCj.js} +1 -1
- package/dist/{chunk-WFWHJNB7-DVLO98ge.js → chunk-WFWHJNB7-CHl0gCzu.js} +1 -1
- package/dist/{chunk-XRWGC2XP-UNFKdWQh.js → chunk-XRWGC2XP-CoSEoOcO.js} +1 -1
- package/dist/{chunk-ZPAFE4SF-DbCSwfLK.js → chunk-ZPAFE4SF-Bf1fn8cY.js} +1 -1
- package/dist/classDiagram-KNZD7YFC-ONLi1fgN.js +40 -0
- package/dist/classDiagram-v2-RKCZMP56-Ceij_i8m.js +40 -0
- package/dist/{clike-CytFO-kN.js → clike-Cbszc5XU.js} +1 -1
- package/dist/clojure-BNTL3o8Z.js +4 -0
- package/dist/{clone-CCgVUJ6x.js → clone-DE59DFkY.js} +1 -1
- package/dist/cmake-Bp6uEjiS.js +4 -0
- package/dist/cobol-CtS_R__A.js +4 -0
- package/dist/coffeescript-D5u5aYAu.js +4 -0
- package/dist/commonlisp-BvLWy9eh.js +4 -0
- package/dist/compiler-runtime-5MdCVm0X.js +13 -0
- package/dist/{constants-BaCMVd12.js → constants-BlvmN57i.js} +3 -3
- package/dist/{copy-GNcK40wy.js → copy-bxQOKABs.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BnvuJG6Y.js → cose-bilkent-S5V4N54A-DZE8LVzQ.js} +3 -3
- package/dist/crystal-CaTWnt-Z.js +4 -0
- package/dist/css-BMUPibQH.js +5 -0
- package/dist/cypher-PopjPg_G.js +4 -0
- package/dist/d-Ds7bO8W5.js +4 -0
- package/dist/{dagre-5GWH7T2D-rn7tZYaQ.js → dagre-5GWH7T2D-g2ShbPGy.js} +39 -37
- package/dist/{dagre-Bghq6VKO.js → dagre-TBn9HZB0.js} +14 -13
- package/dist/{data-grid-overlay-editor-B4_Caieu.js → data-grid-overlay-editor-BuhjNOgs.js} +4 -4
- package/dist/{diagram-N5W7TBWH-lbF94o-g.js → diagram-N5W7TBWH-BYhyeV0B.js} +44 -41
- package/dist/{diagram-QEK2KX5R-CKBhSzsO.js → diagram-QEK2KX5R-CiuUIBpl.js} +38 -35
- package/dist/{diagram-S2PKOQOG-161_1f53.js → diagram-S2PKOQOG-D0Z2Q5P-.js} +38 -35
- package/dist/diff-C_xR-pxD.js +4 -0
- package/dist/{dist-BSyYM1Gi.js → dist-7CqcJssH.js} +6 -6
- package/dist/{dist-C9-uHBqC.js → dist-8v4BI_h_.js} +1 -1
- package/dist/{dist-71jYYbWP.js → dist-B3CNaJau.js} +2 -2
- package/dist/dist-B9JCXzyv.js +6 -0
- package/dist/{dist-DzJem5xc.js → dist-BMhv6XDi.js} +1 -1
- package/dist/{dist-CWh5ZwcC.js → dist-BYS0EtbC.js} +2 -2
- package/dist/{dist-BaPjLM6s.js → dist-BgsDu-bU.js} +1 -1
- package/dist/{dist-CNAkUyxv.js → dist-BxmsyHv5.js} +1 -1
- package/dist/{dist-CWqB4bg8.js → dist-C02gS--y.js} +3 -3
- package/dist/{dist-C76MUPD3.js → dist-C5Iu9a3-.js} +2 -2
- package/dist/{dist-DxESp2-T.js → dist-C5Ns3q-m.js} +3 -3
- package/dist/dist-C6QrJGYr.js +10 -0
- package/dist/{dist-BAqp4Vtl.js → dist-CBu8cgzz.js} +8 -4
- package/dist/dist-CFZ32udY.js +6 -0
- package/dist/{dist-DaTVdKJa.js → dist-CXimnGhI.js} +2 -2
- package/dist/{dist-CtOeHDJp.js → dist-CawOxmKh.js} +5 -5
- package/dist/dist-CmgxQNWN.js +10 -0
- package/dist/dist-Cr6Cu8sC.js +6 -0
- package/dist/{dist-BBhmkni2.js → dist-CxRajUZ6.js} +1 -1
- package/dist/{dist-CPNnKuPh.js → dist-D08oiinq.js} +12 -10
- package/dist/{dist-BNRdMfJH.js → dist-D4LUTYHc.js} +2 -2
- package/dist/{dist-C2IEc8og.js → dist-DGKjHTv9.js} +5 -5
- package/dist/{dist-4dtbqf8A.js → dist-DGnWQOnS.js} +3 -3
- package/dist/{dist-BqdQPWpQ.js → dist-DSDOMDNR.js} +2 -2
- package/dist/{dist-_4cudra1.js → dist-DTNqkRGE.js} +3 -3
- package/dist/{dist-28HYzERB.js → dist-D_GkrgWD.js} +2 -2
- package/dist/{dist-Cw0F6l-7.js → dist-DbHWFmjZ.js} +1 -1
- package/dist/{dist-B_wjJqqS.js → dist-Dh7gw0Ay.js} +2 -2
- package/dist/{dist-B8Pbw5ln.js → dist-DiO9ni9a.js} +2 -2
- package/dist/{dist-BYHiiJB-.js → dist-DlSZED-1.js} +2 -2
- package/dist/{dist-Da046MhT.js → dist-DvsjKDQ4.js} +1 -1
- package/dist/{dist-O0zVziwn.js → dist-DzKKEoge.js} +3 -3
- package/dist/{dist-CwZcC4om.js → dist-HKzG1oF6.js} +1 -1
- package/dist/{dist-CJb8EiFO.js → dist-K_AqLCfS.js} +3 -3
- package/dist/dist-NxHLuq7w.js +6 -0
- package/dist/dist-S2JcqPPB.js +12 -0
- package/dist/{dist-CNvMOZu9.js → dist-XkGsOiy0.js} +2 -2
- package/dist/{dist-Drf3cyIW.js → dist-_tHnp24J.js} +3 -3
- package/dist/{dist-xLN9qCAp.js → dist-eSnWVS11.js} +3 -3
- package/dist/dist-hcPlrsR9.js +6 -0
- package/dist/{dist-DlK420ke.js → dist-owpR56zn.js} +1 -1
- package/dist/dist-poXa8G8m.js +6 -0
- package/dist/{dist-CTIyD_KU.js → dist-qGpLTiEi.js} +3 -3
- package/dist/{dockerfile-Cmlcqk35.js → dockerfile-CWWeWT3z.js} +1 -1
- package/dist/dtd-CGRYzaHQ.js +4 -0
- package/dist/dylan-Ctfki5HL.js +4 -0
- package/dist/ecl--gmEivzz.js +4 -0
- package/dist/eiffel-o31DRAP-.js +4 -0
- package/dist/elm-Dqa6TVIh.js +4 -0
- package/dist/{erDiagram-AWTI2OKA-BU7Qig7n.js → erDiagram-AWTI2OKA-BeadFjpg.js} +25 -25
- package/dist/erlang-BtVO_vQG.js +4 -0
- package/dist/error-banner-B7LmpmGT.js +1013 -0
- package/dist/{esm-Oo8OvZ6m.js → esm-CQIOyi5v.js} +579 -564
- package/dist/{factor-BZnBK3CG.js → factor-7tQNNEWF.js} +1 -1
- package/dist/factor-CNLvRc__.js +5 -0
- package/dist/{flowDiagram-PVAE7QVJ-JKJebWeY.js → flowDiagram-PVAE7QVJ-GgklUvqn.js} +27 -27
- package/dist/{formats-DOEuF6TR.js → formats-kyFd0DPJ.js} +23 -22
- package/dist/forth-Bp2zDfH-.js +4 -0
- package/dist/fortran-B3A-KieX.js +4 -0
- package/dist/{ganttDiagram-OWAHRB6G-BvWRfg05.js → ganttDiagram-OWAHRB6G-D5wYR6WK.js} +17 -17
- package/dist/gas-_Xt_kGOG.js +4 -0
- package/dist/gherkin-DzZpg8Ls.js +4 -0
- package/dist/gitGraph-ZV4HHKMB-DFGD7PPm.js +24 -0
- package/dist/{gitGraphDiagram-NY62KEGX-VEJJBf5L.js → gitGraphDiagram-NY62KEGX-DCwA-g9b.js} +38 -35
- package/dist/{glide-data-editor-Bne10icG.js → glide-data-editor-1bUl_mRe.js} +515 -515
- package/dist/graphlib-R11f1son.js +228 -0
- package/dist/groovy-BtD10jRQ.js +4 -0
- package/dist/haskell-C-JVWnIV.js +4 -0
- package/dist/haxe-Del5TcJQ.js +5 -0
- package/dist/idl-BLlRatde.js +4 -0
- package/dist/info-63CPKGFF-eZyiEu_4.js +24 -0
- package/dist/infoDiagram-STP46IZ2-CUr2vZlE.js +48 -0
- package/dist/{isEmpty-Do_v2sls.js → isEmpty-CIFmGKJN.js} +2 -2
- package/dist/isString-BsphYkXQ.js +9 -0
- package/dist/{isSymbol-CtkA8Y0a.js → isSymbol-BnxbuvDK.js} +1 -1
- package/dist/javascript-Bm7QL4E3.js +5 -0
- package/dist/jinja2-BxbImxq2.js +4 -0
- package/dist/{journeyDiagram-BIP6EPQ6-CsgEQgxh.js → journeyDiagram-BIP6EPQ6-DtjQC_m1.js} +10 -10
- package/dist/jsx-runtime-CvL6gNI-.js +22 -0
- package/dist/julia-DV1Vz9mw.js +4 -0
- package/dist/{kanban-definition-6OIFK2YF-Bi8Ete2P.js → kanban-definition-6OIFK2YF-U3q5gvb8.js} +19 -19
- package/dist/{katex-C-g3rKKt.js → katex-BWgzyQrl.js} +1 -1
- package/dist/{label-BiVIU_wb.js → label-Wr-xTlW7.js} +463 -453
- package/dist/{line-B7-GoF1m.js → line-C7OvOvNm.js} +3 -3
- package/dist/{linear-DeGGALuc.js → linear-CgANSWNu.js} +4 -4
- package/dist/livescript-9UMSMMrl.js +4 -0
- package/dist/{loader-BBqwtZWj.js → loader-Dj9XWZTh.js} +164 -4
- package/dist/lua-Bcbc7wWe.js +4 -0
- package/dist/main.js +40719 -41544
- package/dist/mathematica-DG4QUwYU.js +4 -0
- package/dist/mbox--auqAoPc.js +4 -0
- package/dist/{memoize-D7eDkf3R.js → memoize-XkDn33QI.js} +1 -1
- package/dist/{merge-C_6cGM6o.js → merge-dMlizkC5.js} +1 -1
- package/dist/{mermaid-BmtvsZ2m.js → mermaid-DIjoC4T4.js} +67 -66
- package/dist/{mermaid-parser.core-geyG_6o0.js → mermaid-parser.core-B433qyUL.js} +8 -8
- package/dist/{mhchem-OhAaJ0fA.js → mhchem-1x4KnXMF.js} +1 -1
- package/dist/min-WjLsUjBa.js +89 -0
- package/dist/{mindmap-definition-Q6HEUPPD-B-wmX1oG.js → mindmap-definition-Q6HEUPPD-LFgV4R8y.js} +24 -24
- package/dist/mirc-9dVcMicH.js +4 -0
- package/dist/mllike-Di9N4E3Q.js +6 -0
- package/dist/modelica-S3adENkL.js +4 -0
- package/dist/mscgen-DAG0zH4w.js +6 -0
- package/dist/mumps-afzuy08D.js +4 -0
- package/dist/{now-DumxsrcX.js → now-8WTe-KKa.js} +1 -1
- package/dist/nsis-Bzwy0lPH.js +5 -0
- package/dist/{nsis-D4bLR_Y1.js → nsis-CFb2Zrib.js} +1 -1
- package/dist/ntriples-D9oM8s3v.js +4 -0
- package/dist/{number-overlay-editor-D6r-48ka.js → number-overlay-editor-DYjnpjXo.js} +2 -2
- package/dist/octave-BMLCk2qM.js +4 -0
- package/dist/{once-3OSMKEsL.js → once-rI5AYku5.js} +1 -1
- package/dist/{ordinal-DpEbSVPc.js → ordinal-pQYxWJYN.js} +1 -1
- package/dist/oz-CX5JTWTK.js +4 -0
- package/dist/packet-HUATNLJX-BvWMmF9U.js +24 -0
- package/dist/pascal-BeZmsfFX.js +4 -0
- package/dist/perl-CZ_HryPN.js +4 -0
- package/dist/pie-WTHONI2E-BCXZJKz0.js +24 -0
- package/dist/{pieDiagram-ADFJNKIX-C3GvPNUL.js → pieDiagram-ADFJNKIX-CsZmho0o.js} +43 -40
- package/dist/pig-OPEEOu6V.js +4 -0
- package/dist/powershell-DyR-5LnA.js +4 -0
- package/dist/{precisionRound-7YYJq2rW.js → precisionRound-DMLkFNYv.js} +1 -1
- package/dist/properties-Cl4tecfb.js +4 -0
- package/dist/protobuf-B8X247vV.js +4 -0
- package/dist/pug-Kmpa-Pbv.js +5 -0
- package/dist/{pug-Dv3gE36O.js → pug-ZDYeT34w.js} +1 -1
- package/dist/puppet-Pl07qkSO.js +4 -0
- package/dist/python-DQgTXBpp.js +5 -0
- package/dist/q-D7uiP00h.js +4 -0
- package/dist/{quadrantDiagram-LMRXKWRM-DPXwGNVa.js → quadrantDiagram-LMRXKWRM-CY6GTOgM.js} +8 -8
- package/dist/r-DbUoToEd.js +4 -0
- package/dist/radar-NJJJXTRR-8kjOeCwx.js +24 -0
- package/dist/{range-CIbLpsrs.js → range-CTMc_Qhu.js} +3 -3
- package/dist/{react-plotly-DYyvxcRD.js → react-plotly-Cs07wkly.js} +2 -2
- package/dist/react-vega-B9eMrRW1.js +32035 -0
- package/dist/react-vega-DM3e8kar.js +25 -0
- package/dist/reduce-C-jV7KRY.js +268 -0
- package/dist/{requirementDiagram-4UW4RH46-Cs3Hqnm0.js → requirementDiagram-4UW4RH46-CfLWneBF.js} +24 -24
- package/dist/rpm-BjQFZZ1e.js +5 -0
- package/dist/ruby-BXpop5ZX.js +4 -0
- package/dist/{sankeyDiagram-GR3RE2ED-Be1d_Xf7.js → sankeyDiagram-GR3RE2ED-Dkxfzm6f.js} +7 -7
- package/dist/sas-CzFr9Hlz.js +4 -0
- package/dist/scheme-C6QRPvcm.js +4 -0
- package/dist/{sequenceDiagram-C3RYC4MD-lbtovKTa.js → sequenceDiagram-C3RYC4MD-hSi31Kfa.js} +14 -14
- package/dist/shell-Bs7FrcsL.js +4 -0
- package/dist/sieve-D39XRya9.js +4 -0
- package/dist/{slides-component-BoeQU7-s.js → slides-component-Ct11erUn.js} +9 -8
- package/dist/smalltalk-CdAwDOFE.js +4 -0
- package/dist/sparql-DsDWhEhN.js +4 -0
- package/dist/spec-rqRnkIf4.js +1256 -0
- package/dist/{src-BTqT1mA1.js → src-CKr0QbVy.js} +1 -1
- package/dist/{stateDiagram-KXAO66HF-BmbR-Rol.js → stateDiagram-KXAO66HF-DJsLA_DN.js} +42 -40
- package/dist/stateDiagram-v2-UMBNRL4Z-D-p_ngHt.js +39 -0
- package/dist/{step-2RJrMSSG.js → step-BsM8YHun.js} +1 -1
- package/dist/stex-DvqvBdH8.js +5 -0
- package/dist/style.css +1 -1
- package/dist/stylus-DxzxWmvV.js +4 -0
- package/dist/swift-DTC4Wg4z.js +4 -0
- package/dist/tcl-DantlS-i.js +4 -0
- package/dist/textile-pOphaahD.js +4 -0
- package/dist/{time-BB30r1tK.js → time-U9NHhrDC.js} +4 -4
- package/dist/{timeline-definition-XQNQX7LJ-1mv5caPW.js → timeline-definition-XQNQX7LJ-rojWjX6M.js} +7 -7
- package/dist/{toNumber-D3Ystr3y.js → toNumber-CUG0Hyhp.js} +2 -2
- package/dist/{toString-CbuxCRDG.js → toString-CT4n1k2E.js} +2 -2
- package/dist/toml-hgYsPM5p.js +4 -0
- package/dist/treemap-75Q7IDZK-Do1WIR9v.js +24 -0
- package/dist/troff-BwevrEUZ.js +4 -0
- package/dist/{dtd-RplB6hDg.js → ttcn-C5gJcxta.js} +2 -2
- package/dist/ttcn-cfg-CPKlfqST.js +4 -0
- package/dist/turtle-EH0lMhMf.js +4 -0
- package/dist/{types-BPohCsA7.js → types-Bt7p5SYB.js} +1028 -1038
- package/dist/uniq-DgSyegN3.js +8 -0
- package/dist/{useAsyncData-DHBqeb9a.js → useAsyncData-Dp2V69OV.js} +3 -3
- package/dist/{useIframeCapabilities-BEvvwlwt.js → useIframeCapabilities-B9u0SmJ4.js} +2 -2
- package/dist/{useTheme-CnMbo-iq.js → useTheme-D7vlj42b.js} +4 -4
- package/dist/vb-DNk7gts-.js +4 -0
- package/dist/vbscript-znK_5PUS.js +4 -0
- package/dist/vega-component-C58Jk3ub.js +633 -0
- package/dist/{vega-loader.browser.module-CFMtdrNw.js → vega-loader.browser-BK7-IO9k.js} +91 -99
- package/dist/velocity-DmPhlhdp.js +4 -0
- package/dist/verilog-CePnwf4S.js +4 -0
- package/dist/vhdl-Ckdh8uiO.js +4 -0
- package/dist/webidl-8N8qbzRd.js +4 -0
- package/dist/xquery-Cocyk-z0.js +4 -0
- package/dist/{xychartDiagram-6GGTOJPD-njc-naaw.js → xychartDiagram-6GGTOJPD-CiC1eONZ.js} +23 -23
- package/dist/yacas-CPmShRg-.js +4 -0
- package/dist/z80-B500UaFh.js +4 -0
- package/package.json +12 -9
- package/src/components/ai/ai-provider-icon.tsx +2 -1
- package/src/components/app-config/constants.ts +25 -1
- package/src/components/charts/lazy.tsx +7 -0
- package/src/components/charts/tooltip.ts +5 -0
- package/src/components/charts/types.ts +8 -0
- package/src/components/chat/acp/__tests__/state.test.ts +0 -13
- package/src/components/chat/acp/agent-panel.tsx +7 -1
- package/src/components/chat/acp/agent-selector.tsx +5 -0
- package/src/components/chat/acp/blocks.tsx +51 -8
- package/src/components/chat/acp/state.ts +8 -2
- package/src/components/chat/acp/thread.tsx +10 -3
- package/src/components/chat/chat-panel.tsx +7 -1
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +473 -184
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +32 -28
- package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +1 -1
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +162 -0
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +1 -1
- package/src/components/data-table/charts/__tests__/spec.test.ts +145 -6
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +6 -1
- package/src/components/data-table/charts/chart-spec/encodings.ts +11 -7
- package/src/components/data-table/charts/chart-spec/spec.ts +9 -8
- package/src/components/data-table/charts/chart-spec/tooltips.ts +4 -3
- package/src/components/data-table/charts/chart-spec/types.ts +1 -1
- package/src/components/data-table/charts/chart-spec/utils.ts +23 -0
- package/src/components/data-table/charts/components/form-fields.tsx +2 -2
- package/src/components/data-table/charts/constants.ts +7 -3
- package/src/components/data-table/charts/lazy-chart.tsx +15 -11
- package/src/components/data-table/charts/types.ts +6 -14
- package/src/components/data-table/column-summary/chart-spec-model.tsx +112 -269
- package/src/components/data-table/column-summary/column-summary.tsx +12 -12
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +78 -2
- package/src/components/data-table/column-summary/utils.ts +1 -1
- package/src/components/datasources/__tests__/utils.test.ts +339 -138
- package/src/components/datasources/column-preview.tsx +9 -9
- package/src/components/datasources/datasources.tsx +4 -0
- package/src/components/datasources/utils.ts +94 -4
- package/src/components/editor/Output.tsx +9 -6
- package/src/components/editor/ai/ai-completion-editor.tsx +2 -2
- package/src/components/editor/code/readonly-diff.tsx +4 -0
- package/src/components/editor/output/ConsoleOutput.tsx +14 -11
- package/src/components/editor/renderers/slides-layout/types.ts +1 -1
- package/src/components/tracing/tracing-spec.ts +2 -2
- package/src/components/tracing/tracing.test.tsx +1 -1
- package/src/components/tracing/tracing.tsx +57 -74
- package/src/components/tracing/utils.ts +22 -0
- package/src/components/ui/query-param-preserving-link.tsx +48 -0
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +12 -1
- package/src/core/ai/context/providers/cell-output.ts +2 -8
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +1 -1
- package/src/core/ai/tools/edit-notebook-tool.ts +15 -7
- package/src/core/ai/tools/run-cells-tool.ts +60 -26
- package/src/core/cells/ids.ts +1 -1
- package/src/core/codemirror/language/__tests__/extension.test.ts +6 -12
- package/src/core/codemirror/language/__tests__/markdown.test.ts +23 -36
- package/src/core/codemirror/language/languages/python.ts +40 -6
- package/src/core/codemirror/language/languages/sql/completion-store.ts +2 -2
- package/src/core/codemirror/language/languages/sql/sql.ts +14 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +54 -3
- package/src/core/codemirror/lsp/notebook-lsp.ts +52 -4
- package/src/core/codemirror/lsp/transports.ts +3 -0
- package/src/core/datasets/__tests__/data-source.test.ts +6 -0
- package/src/core/datasets/data-source-connections.ts +1 -0
- package/src/core/dom/__tests__/outline.test.ts +43 -0
- package/src/core/dom/outline.ts +1 -1
- package/src/core/islands/main.ts +2 -0
- package/src/core/lsp/__tests__/transport.test.ts +57 -0
- package/src/core/lsp/transport.ts +16 -0
- package/src/plugins/core/RenderHTML.tsx +26 -0
- package/src/plugins/core/sanitize.ts +8 -1
- package/src/plugins/impl/DataTablePlugin.tsx +21 -27
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +26 -22
- package/src/plugins/impl/data-explorer/functions/function.ts +1 -2
- package/src/plugins/impl/data-explorer/functions/types.ts +65 -14
- package/src/plugins/impl/data-explorer/queries/queries.ts +9 -9
- package/src/plugins/impl/data-explorer/queries/types.ts +23 -5
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +2 -1
- package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +2309 -0
- package/src/plugins/impl/vega/__tests__/encodings.test.ts +93 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +621 -0
- package/src/plugins/impl/vega/__tests__/params.test.ts +121 -1
- package/src/plugins/impl/vega/encodings.ts +16 -2
- package/src/plugins/impl/vega/make-selectable.ts +339 -10
- package/src/plugins/impl/vega/params.ts +76 -14
- package/src/plugins/impl/vega/types.ts +32 -13
- package/src/plugins/impl/vega/vega-component.tsx +74 -26
- package/src/plugins/impl/vega/vega.css +1 -0
- package/src/stories/__fixtures__/vega.ts +1 -1
- package/src/utils/arrays.ts +16 -0
- package/dist/_baseUniq-CKN9mEDq.js +0 -324
- package/dist/any-language-editor-Du2Q_6IK.js +0 -156
- package/dist/apl-CUm2DGqh.js +0 -4
- package/dist/architecture-O4VJ6CD3-PFw3eFBY.js +0 -21
- package/dist/asciiarmor-lqJ78U01.js +0 -4
- package/dist/asn1-CjwpSTlW.js +0 -4
- package/dist/brainfuck-ClvDI1dq.js +0 -4
- package/dist/classDiagram-KNZD7YFC-HUFFxNdk.js +0 -40
- package/dist/classDiagram-v2-RKCZMP56-Dw7Acmuf.js +0 -40
- package/dist/clojure-8GefCgPe.js +0 -4
- package/dist/cmake-yAhT9H0F.js +0 -4
- package/dist/cobol-BmltueOY.js +0 -4
- package/dist/coffeescript-C7KEQBcH.js +0 -4
- package/dist/commonlisp-CNbiJRU-.js +0 -4
- package/dist/crystal-OdjZZ8bc.js +0 -4
- package/dist/css-DhTxMmL_.js +0 -5
- package/dist/cypher-CgN8E3YI.js +0 -4
- package/dist/d-g41sJcBC.js +0 -4
- package/dist/diff-ViRYYhhg.js +0 -4
- package/dist/dist-BfJO8Bm9.js +0 -12
- package/dist/dist-CLuF3AtO.js +0 -6
- package/dist/dist-CU04U4NL.js +0 -10
- package/dist/dist-DNUT6b47.js +0 -6
- package/dist/dist-DbAb2sY7.js +0 -6
- package/dist/dist-DiDFQ2Rk.js +0 -6
- package/dist/dist-SNAyAOJ-.js +0 -6
- package/dist/dist-cbW5xJNV.js +0 -6
- package/dist/dist-h8eGLSbK.js +0 -10
- package/dist/dylan-BX8KJufP.js +0 -4
- package/dist/ecl-CWtLaNMH.js +0 -4
- package/dist/eiffel-C-mlZPMn.js +0 -4
- package/dist/elm-CWp06vcb.js +0 -4
- package/dist/erlang-pfp22AZM.js +0 -4
- package/dist/error-banner-BAWlXn49.js +0 -1012
- package/dist/esm-B2pocBPL.js +0 -26
- package/dist/esm-YVnxJqkD.js +0 -33066
- package/dist/factor-CEn53jua.js +0 -5
- package/dist/forth-CL8vu_y8.js +0 -4
- package/dist/fortran-DsmXkYtE.js +0 -4
- package/dist/gas-mYt9Rtlx.js +0 -4
- package/dist/gherkin-DHNCKBNj.js +0 -4
- package/dist/gitGraph-ZV4HHKMB-Cpd6k0O8.js +0 -21
- package/dist/graphlib-DRS8CrjA.js +0 -227
- package/dist/groovy-DzRtOS5a.js +0 -4
- package/dist/haskell-Bl9iT_Mp.js +0 -4
- package/dist/haxe-DqA0ED6k.js +0 -5
- package/dist/idl-WU2hil4i.js +0 -4
- package/dist/info-63CPKGFF-CG-xzUJo.js +0 -21
- package/dist/infoDiagram-STP46IZ2-zoRBGoup.js +0 -45
- package/dist/javascript-QY2BGJeV.js +0 -5
- package/dist/jinja2-Czleq7Sk.js +0 -4
- package/dist/jsx-runtime-DZyWJV5b.js +0 -31
- package/dist/julia-Dru3Qi0y.js +0 -4
- package/dist/livescript-Dxqi_HLT.js +0 -4
- package/dist/lua-ByH1cUQZ.js +0 -4
- package/dist/mathematica-CWJIFuES.js +0 -4
- package/dist/mbox-qhPIGaUI.js +0 -4
- package/dist/min-Dwa_NbP6.js +0 -93
- package/dist/mirc-yYcXhXBY.js +0 -4
- package/dist/mllike-BfT_Nl9x.js +0 -6
- package/dist/modelica-lVDtz1Rm.js +0 -4
- package/dist/mscgen-DvwdD1QJ.js +0 -6
- package/dist/mumps-BiY3GwKd.js +0 -4
- package/dist/nsis-Dk18Sq_4.js +0 -5
- package/dist/ntriples-Cj-8VqKF.js +0 -4
- package/dist/octave-BgFAaYjU.js +0 -4
- package/dist/oz-IsEG1I1m.js +0 -4
- package/dist/packet-HUATNLJX-Cafuo3IG.js +0 -21
- package/dist/pascal-BVf7FtIE.js +0 -4
- package/dist/perl-BM0-y4mZ.js +0 -4
- package/dist/pie-WTHONI2E-BE0pHBwB.js +0 -21
- package/dist/pig-CLBjzQmc.js +0 -4
- package/dist/powershell-B_qvE33J.js +0 -4
- package/dist/properties-CUTpsH2y.js +0 -4
- package/dist/protobuf-DqCP8a-0.js +0 -4
- package/dist/pug-BvexKkw4.js +0 -5
- package/dist/puppet-CoIi0R3f.js +0 -4
- package/dist/python-C-11-YMh.js +0 -5
- package/dist/q-CCVgEip7.js +0 -4
- package/dist/r-CIdR0Sfs.js +0 -4
- package/dist/radar-NJJJXTRR-0adgjw0u.js +0 -21
- package/dist/rpm-Dwvm039g.js +0 -5
- package/dist/ruby-DpTnO5gb.js +0 -4
- package/dist/sas-CK9boxgv.js +0 -4
- package/dist/scheme-Y1aYL-Qq.js +0 -4
- package/dist/shell-D3eXGsHd.js +0 -4
- package/dist/sieve-BdwSFdWJ.js +0 -4
- package/dist/smalltalk-BTYJquCm.js +0 -4
- package/dist/sparql-CYF0g4Cc.js +0 -4
- package/dist/stateDiagram-v2-UMBNRL4Z-DdJ7qVWc.js +0 -39
- package/dist/stex-CyWhoWHt.js +0 -5
- package/dist/stylus-BBiKaI2h.js +0 -4
- package/dist/swift-COb15qFR.js +0 -4
- package/dist/tcl-Jik1LXu9.js +0 -4
- package/dist/textile-BFHPD3wr.js +0 -4
- package/dist/toml-Brp9fBXs.js +0 -4
- package/dist/treemap-75Q7IDZK-CyBT8_Wh.js +0 -21
- package/dist/troff-CcZRW4vg.js +0 -4
- package/dist/tslib.es6-3ZL768sZ.js +0 -49
- package/dist/ttcn-Bz_6ifRd.js +0 -4
- package/dist/ttcn-cfg-v-yi2rKc.js +0 -4
- package/dist/turtle-CDOsZYhB.js +0 -4
- package/dist/useDateFormatter-BkbjKw83.js +0 -543
- package/dist/vb-CL7fRwRw.js +0 -4
- package/dist/vbscript-CR2xfxpw.js +0 -4
- package/dist/vega-component-BfFcXZxw.js +0 -465
- package/dist/velocity-CfuZoxPt.js +0 -4
- package/dist/verilog-CySTkzw_.js +0 -4
- package/dist/vhdl-Dvcd8KHW.js +0 -4
- package/dist/webidl-tbJt7sKk.js +0 -4
- package/dist/xquery-DJQVztyc.js +0 -4
- package/dist/yacas-BbgBReEH.js +0 -4
- package/dist/z80-DPyb8VGz.js +0 -4
- /package/dist/{_arrayReduce-Cd9xQjbl.js → _arrayReduce-CmsTTAw1.js} +0 -0
- /package/dist/{_baseSlice-CE9WsQZm.js → _baseSlice-CAnpEJwx.js} +0 -0
- /package/dist/{_hasUnicode-DkEebvtD.js → _hasUnicode-CbmCTPAa.js} +0 -0
- /package/dist/{apl-aGhy11IM.js → apl-Css595_H.js} +0 -0
- /package/dist/{array-DYSXIreg.js → array-D3smvOQ_.js} +0 -0
- /package/dist/{asciiarmor-DJKJ3Gkn.js → asciiarmor-BTCuJwxh.js} +0 -0
- /package/dist/{asn1-C6f5IeNs.js → asn1-DXjhS5QI.js} +0 -0
- /package/dist/{asterisk-DB1poX9_.js → asterisk-5HlmsIaw.js} +0 -0
- /package/dist/{brainfuck-Ch9vjun0.js → brainfuck--WlEc-iG.js} +0 -0
- /package/dist/{chunk-57QY23SG-BpXU7ph4.js → chunk-57QY23SG-D7ymhFFp.js} +0 -0
- /package/dist/{click-outside-container-2BH589Bq.js → click-outside-container-DSVM9sZw.js} +0 -0
- /package/dist/{clike-Bc2PZzZQ.js → clike-DDIJB_R8.js} +0 -0
- /package/dist/{clojure-B_lpr3zt.js → clojure-Z-GPBZyY.js} +0 -0
- /package/dist/{cmake-DaocNF4I.js → cmake-DncBqspt.js} +0 -0
- /package/dist/{cobol-suTPtt7c.js → cobol-DqUe0gl7.js} +0 -0
- /package/dist/{coffeescript-CPLIvtqJ.js → coffeescript-CH5_OO0H.js} +0 -0
- /package/dist/{colors-BXlG8Lmz.js → colors-DQmMCNWX.js} +0 -0
- /package/dist/{common-keywords-Bhll7O3b.js → common-keywords-CAEsQSF5.js} +0 -0
- /package/dist/{commonlisp-BqM3qFK7.js → commonlisp-UmhR9BfE.js} +0 -0
- /package/dist/{crystal-AsSFu4ke.js → crystal-5Sqf7MXt.js} +0 -0
- /package/dist/{css-Df7Sdeyh.js → css-bDybSxwf.js} +0 -0
- /package/dist/{cypher-CaVKL6Gu.js → cypher-PIeAFhrd.js} +0 -0
- /package/dist/{cytoscape.esm-BFEMljQI.js → cytoscape.esm-DclyBJ4D.js} +0 -0
- /package/dist/{d-DCGWK7NQ.js → d-Bd8EVRQt.js} +0 -0
- /package/dist/{defaultLocale-Cto8YOmX.js → defaultLocale-BPzjWfXP.js} +0 -0
- /package/dist/{defaultLocale-CYgZlqDF.js → defaultLocale-Om7Wxg5c.js} +0 -0
- /package/dist/{diff-CsxOM4Tr.js → diff-CAQdgtD6.js} +0 -0
- /package/dist/{dtd-Dwr0Jmks.js → dtd-eKW3pZj_.js} +0 -0
- /package/dist/{duckdb-keywords-7wAWf848.js → duckdb-keywords-BC3kWZZM.js} +0 -0
- /package/dist/{dylan-A7-ZBSey.js → dylan-CIO7R9Tr.js} +0 -0
- /package/dist/{ebnf-9_SaGDUz.js → ebnf-Pr4a9I6n.js} +0 -0
- /package/dist/{ecl-BzJVIQDc.js → ecl-BqYW-aOJ.js} +0 -0
- /package/dist/{eiffel-CO9eC_Op.js → eiffel-BOKM91eM.js} +0 -0
- /package/dist/{elm-CVAWj8SB.js → elm-3sobs3PV.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-C3Yi5GQt.js → emotion-is-prop-valid.esm-Cm1uulbm.js} +0 -0
- /package/dist/{erlang-DWbZP546.js → erlang-C5EBzhP1.js} +0 -0
- /package/dist/{esm-AtKNNGYO.js → esm-CopBBL2y.js} +0 -0
- /package/dist/{fcl-CM9t2iay.js → fcl-Brh8s8q_.js} +0 -0
- /package/dist/{forth-BTYqUuu3.js → forth-DneRHr4K.js} +0 -0
- /package/dist/{fortran-DgAjHcCq.js → fortran-DsdmZbwQ.js} +0 -0
- /package/dist/{gas-BjDSWPZd.js → gas-DaoJ65Z9.js} +0 -0
- /package/dist/{gherkin-ClRqqpKv.js → gherkin-DUP_UlW-.js} +0 -0
- /package/dist/{groovy-BzNjnc8x.js → groovy-Rvyan8yX.js} +0 -0
- /package/dist/{haskell-DLdk34Jq.js → haskell-DIvpY54L.js} +0 -0
- /package/dist/{haxe-l6gaY_IS.js → haxe-Da_5bBNs.js} +0 -0
- /package/dist/{http-6Qg7z_h2.js → http-CMvcwl3E.js} +0 -0
- /package/dist/{idl-hlWT4D26.js → idl-DvL3aO0N.js} +0 -0
- /package/dist/{init-tZ42Torz.js → init-BNp5RczD.js} +0 -0
- /package/dist/{invariant-D3JoRb4I.js → invariant-Cl2wkkjN.js} +0 -0
- /package/dist/{isArrayLikeObject-DU5MCuQM.js → isArrayLikeObject-1qkWxZbL.js} +0 -0
- /package/dist/{javascript-DGukg1sB.js → javascript-DoyAP8vn.js} +0 -0
- /package/dist/{jinja2-DI5k_Er3.js → jinja2-Veqp7mFj.js} +0 -0
- /package/dist/{julia-BvDZDiIT.js → julia-Gi684CX7.js} +0 -0
- /package/dist/{katex-DgfMWJY9.js → katex-U6RPAuWM.js} +0 -0
- /package/dist/{livescript-2YMQfkfI.js → livescript-BKj_Zhvo.js} +0 -0
- /package/dist/{lua-DIUrQRfA.js → lua-CDA7hreG.js} +0 -0
- /package/dist/{main-BMTpe7M0.js → main-63eIj2Yx.js} +0 -0
- /package/dist/{marked.esm-DkVwEwtO.js → marked.esm-DE8HU3tw.js} +0 -0
- /package/dist/{math-qsHyz2Eo.js → math-C2iLT5gz.js} +0 -0
- /package/dist/{mathematica-Dqmg_BwL.js → mathematica-GWfSHReY.js} +0 -0
- /package/dist/{mbox-Cng-P-F1.js → mbox-Dwsrc4Ak.js} +0 -0
- /package/dist/{mirc-CNDqOVhQ.js → mirc-B2JE5ype.js} +0 -0
- /package/dist/{mllike-C1n2UDyX.js → mllike-BkBh4PFX.js} +0 -0
- /package/dist/{modelica-QqQC2pFj.js → modelica-C0hNlKgR.js} +0 -0
- /package/dist/{mscgen-C3fl8uhp.js → mscgen-DWWpdZnb.js} +0 -0
- /package/dist/{mumps-BeCUbMej.js → mumps-CMePAlSe.js} +0 -0
- /package/dist/{nginx-ejv7DsBz.js → nginx-GurZbX0E.js} +0 -0
- /package/dist/{node-sql-parser-CoPWN4hn.js → node-sql-parser-IKID_dZE.js} +0 -0
- /package/dist/{ntriples-CUgUpcma.js → ntriples-BnE6tX0Y.js} +0 -0
- /package/dist/{octave-BD652tGl.js → octave-Dfu3PmNP.js} +0 -0
- /package/dist/{oz-DrRsFa0K.js → oz-DqNpAjpZ.js} +0 -0
- /package/dist/{pascal-hpcx9sVn.js → pascal-GP_8jbNL.js} +0 -0
- /package/dist/{path-Bbv2tLY1.js → path-BeMi_1Je.js} +0 -0
- /package/dist/{perl-DW8XHeFc.js → perl-DUDEqQOD.js} +0 -0
- /package/dist/{pig-Cv7Nxbfo.js → pig-Csr4LnKs.js} +0 -0
- /package/dist/{powershell-Dr7WZMDU.js → powershell-Cw4tDKZx.js} +0 -0
- /package/dist/{prop-types-Bd16OEUP.js → prop-types-CzOfzj9N.js} +0 -0
- /package/dist/{properties-D-qJDXAM.js → properties-CUhUGfHR.js} +0 -0
- /package/dist/{protobuf-B48QZbd3.js → protobuf-CPZe957V.js} +0 -0
- /package/dist/{puppet-15JDyiY2.js → puppet-BP1AOwo6.js} +0 -0
- /package/dist/{purify.es-CrfFzTyi.js → purify.es-CDFkadZl.js} +0 -0
- /package/dist/{python-DWkQA94h.js → python-BMcMimC3.js} +0 -0
- /package/dist/{q-BzRpKgfd.js → q-BNfSHUci.js} +0 -0
- /package/dist/{r-dcNRe_Q8.js → r-DiJzLRZc.js} +0 -0
- /package/dist/{range-CQvYp_qE.js → range-sX2tw-Jz.js} +0 -0
- /package/dist/{react-dom-CpBooCbY.js → react-dom-BTjywDxo.js} +0 -0
- /package/dist/{rpm-Djl3Dsf1.js → rpm-CywAxCKo.js} +0 -0
- /package/dist/{ruby-Dd2CZTip.js → ruby-B0a4mSSU.js} +0 -0
- /package/dist/{sas-DYF5_Iqu.js → sas-DTh30wZQ.js} +0 -0
- /package/dist/{scheme-YtWcji1H.js → scheme-CsOlAIFf.js} +0 -0
- /package/dist/{shell-C3uC3Y0Z.js → shell-7w75P-tg.js} +0 -0
- /package/dist/{sieve-DHB17sQG.js → sieve-BphUEMa4.js} +0 -0
- /package/dist/{simple-mode-BMmwP_vI.js → simple-mode-BcThS5Pa.js} +0 -0
- /package/dist/{smalltalk-Y5v1Np3H.js → smalltalk-CHwdNey_.js} +0 -0
- /package/dist/{solr-DvRJLlRD.js → solr-CuWbYJLt.js} +0 -0
- /package/dist/{sparql-BEt3GJwM.js → sparql-BtwCqUvT.js} +0 -0
- /package/dist/{spreadsheet-Dp4B9_rc.js → spreadsheet-C1JzeuKn.js} +0 -0
- /package/dist/{sql-DBsUs8nQ.js → sql-wv_2DQzf.js} +0 -0
- /package/dist/{stex-C6-x52ei.js → stex-BmcrV7cx.js} +0 -0
- /package/dist/{stylus-DroA8via.js → stylus-SVJ7TGPh.js} +0 -0
- /package/dist/{swift-DR0x1ESK.js → swift-f7KaABxm.js} +0 -0
- /package/dist/{tcl-BeuTFc_c.js → tcl-CbTFkeHJ.js} +0 -0
- /package/dist/{textile-C0ikhHN3.js → textile-CFn6QLRy.js} +0 -0
- /package/dist/{tiddlywiki-C_2Nvsgu.js → tiddlywiki-DBhMcdVM.js} +0 -0
- /package/dist/{tiki-CKQlhmQQ.js → tiki-CqcXr_YN.js} +0 -0
- /package/dist/{timer-CcUhugb0.js → timer-ly0jlpkr.js} +0 -0
- /package/dist/{toml-BqNUJWRI.js → toml-YgDIoI1n.js} +0 -0
- /package/dist/{treemap-BYLUKIzA.js → treemap-D5sUCpbF.js} +0 -0
- /package/dist/{troff-DkK0f2ZH.js → troff-CIp_4RXg.js} +0 -0
- /package/dist/{ttcn-Bf8vrg-_.js → ttcn-Yn_uOBYK.js} +0 -0
- /package/dist/{ttcn-cfg-DjCKzd95.js → ttcn-cfg-BVum2rmM.js} +0 -0
- /package/dist/{turtle-SSc84S9m.js → turtle-BeWx-YoQ.js} +0 -0
- /package/dist/{vb-CQ6DC3cL.js → vb-DKEmSA_2.js} +0 -0
- /package/dist/{vbscript-Dw0gFssg.js → vbscript-BPsxuP0n.js} +0 -0
- /package/dist/{velocity-BvJQyBmj.js → velocity-ycm1NvlO.js} +0 -0
- /package/dist/{verilog-CKGAvQjj.js → verilog-ogjm0Ytr.js} +0 -0
- /package/dist/{vhdl-B40_x6fM.js → vhdl-BvjyOM9y.js} +0 -0
- /package/dist/{webidl-Bi9hczCv.js → webidl-QdwcTYEu.js} +0 -0
- /package/dist/{xquery-DwWUXvP3.js → xquery-BErHIIc-.js} +0 -0
- /package/dist/{yacas-ClUs0mmH.js → yacas-BBBJNs0h.js} +0 -0
- /package/dist/{z80-DPC4UGzR.js → z80-nG9RRukG.js} +0 -0
- /package/dist/{zod-mAEs2ITo.js → zod-0AbTN3Cg.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { getDirectionOfBar } from "../params";
|
|
3
|
+
import { getBinnedFields, getDirectionOfBar, ParamNames } from "../params";
|
|
4
4
|
import type { VegaLiteUnitSpec } from "../types";
|
|
5
5
|
|
|
6
6
|
describe("getDirectionOfBar", () => {
|
|
@@ -50,3 +50,123 @@ describe("getDirectionOfBar", () => {
|
|
|
50
50
|
expect(getDirectionOfBar(spec)).toBeUndefined();
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
+
|
|
54
|
+
describe("getBinnedFields", () => {
|
|
55
|
+
it("should return empty array if spec has no encoding", () => {
|
|
56
|
+
const spec = { mark: "point" } as VegaLiteUnitSpec;
|
|
57
|
+
expect(getBinnedFields(spec)).toEqual([]);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("should return empty array if no fields are binned", () => {
|
|
61
|
+
const spec = {
|
|
62
|
+
mark: "point",
|
|
63
|
+
encoding: {
|
|
64
|
+
x: { field: "x", type: "quantitative" },
|
|
65
|
+
y: { field: "y", type: "quantitative" },
|
|
66
|
+
},
|
|
67
|
+
} as VegaLiteUnitSpec;
|
|
68
|
+
expect(getBinnedFields(spec)).toEqual([]);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("should return binned field name for x encoding", () => {
|
|
72
|
+
const spec = {
|
|
73
|
+
mark: "bar",
|
|
74
|
+
encoding: {
|
|
75
|
+
x: { field: "x", bin: true, type: "quantitative" },
|
|
76
|
+
y: { aggregate: "count", type: "quantitative" },
|
|
77
|
+
},
|
|
78
|
+
} as VegaLiteUnitSpec;
|
|
79
|
+
expect(getBinnedFields(spec)).toEqual(["x"]);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("should return binned field name for y encoding", () => {
|
|
83
|
+
const spec = {
|
|
84
|
+
mark: "bar",
|
|
85
|
+
encoding: {
|
|
86
|
+
x: { aggregate: "count", type: "quantitative" },
|
|
87
|
+
y: { field: "y", bin: true, type: "quantitative" },
|
|
88
|
+
},
|
|
89
|
+
} as VegaLiteUnitSpec;
|
|
90
|
+
expect(getBinnedFields(spec)).toEqual(["y"]);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("should return multiple binned fields", () => {
|
|
94
|
+
const spec = {
|
|
95
|
+
mark: "rect",
|
|
96
|
+
encoding: {
|
|
97
|
+
x: { field: "x", bin: true, type: "quantitative" },
|
|
98
|
+
y: { field: "y", bin: true, type: "quantitative" },
|
|
99
|
+
color: { aggregate: "count", type: "quantitative" },
|
|
100
|
+
},
|
|
101
|
+
} as VegaLiteUnitSpec;
|
|
102
|
+
expect(getBinnedFields(spec)).toEqual(["x", "y"]);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("should handle bin with custom configuration", () => {
|
|
106
|
+
const spec = {
|
|
107
|
+
mark: "bar",
|
|
108
|
+
encoding: {
|
|
109
|
+
x: {
|
|
110
|
+
field: "temperature",
|
|
111
|
+
bin: { maxbins: 20 },
|
|
112
|
+
type: "quantitative",
|
|
113
|
+
},
|
|
114
|
+
y: { aggregate: "count", type: "quantitative" },
|
|
115
|
+
},
|
|
116
|
+
} as VegaLiteUnitSpec;
|
|
117
|
+
expect(getBinnedFields(spec)).toEqual(["temperature"]);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("should ignore encodings without field property", () => {
|
|
121
|
+
const spec = {
|
|
122
|
+
mark: "bar",
|
|
123
|
+
encoding: {
|
|
124
|
+
x: { bin: true, type: "quantitative" },
|
|
125
|
+
y: { field: "y", type: "quantitative" },
|
|
126
|
+
},
|
|
127
|
+
} as VegaLiteUnitSpec;
|
|
128
|
+
expect(getBinnedFields(spec)).toEqual([]);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe("ParamNames", () => {
|
|
133
|
+
describe("binColoring", () => {
|
|
134
|
+
it("should generate bin_coloring for undefined layer", () => {
|
|
135
|
+
expect(ParamNames.binColoring(undefined)).toBe("bin_coloring");
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it("should generate bin_coloring_0 for layer 0", () => {
|
|
139
|
+
expect(ParamNames.binColoring(0)).toBe("bin_coloring_0");
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("should generate bin_coloring_1 for layer 1", () => {
|
|
143
|
+
expect(ParamNames.binColoring(1)).toBe("bin_coloring_1");
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
describe("isBinColoring", () => {
|
|
148
|
+
it("should return true for bin_coloring", () => {
|
|
149
|
+
expect(ParamNames.isBinColoring("bin_coloring")).toBe(true);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it("should return true for bin_coloring_0", () => {
|
|
153
|
+
expect(ParamNames.isBinColoring("bin_coloring_0")).toBe(true);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it("should return true for bin_coloring_123", () => {
|
|
157
|
+
expect(ParamNames.isBinColoring("bin_coloring_123")).toBe(true);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it("should return false for select_point", () => {
|
|
161
|
+
expect(ParamNames.isBinColoring("select_point")).toBe(false);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("should return false for select_interval", () => {
|
|
165
|
+
expect(ParamNames.isBinColoring("select_interval")).toBe(false);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it("should return false for legend_selection_field", () => {
|
|
169
|
+
expect(ParamNames.isBinColoring("legend_selection_field")).toBe(false);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
import { Marks } from "./marks";
|
|
3
|
+
import { ParamNames } from "./params";
|
|
3
4
|
import type {
|
|
4
5
|
AnyMark,
|
|
5
6
|
Encodings,
|
|
@@ -45,7 +46,7 @@ export function findEncodedFields(spec: VegaLiteSpec): string[] {
|
|
|
45
46
|
if (!encoding) {
|
|
46
47
|
return [];
|
|
47
48
|
}
|
|
48
|
-
if (!ALLOWED_ENCODING_TYPES.has(key
|
|
49
|
+
if (!ALLOWED_ENCODING_TYPES.has(key)) {
|
|
49
50
|
return [];
|
|
50
51
|
}
|
|
51
52
|
|
|
@@ -84,8 +85,21 @@ export function makeEncodingInteractive(
|
|
|
84
85
|
paramNames: string[],
|
|
85
86
|
mark: AnyMark | undefined,
|
|
86
87
|
): SharedCompositeEncoding<Field> {
|
|
88
|
+
// For binned charts, we only use the bin_coloring param for opacity.
|
|
89
|
+
// The regular selection params (point/interval) are used for backend filtering only.
|
|
90
|
+
// This separation allows us to control which params trigger visual feedback vs data filtering.
|
|
91
|
+
// NOTE: Bin + interval selection does not change the opacity at all.
|
|
92
|
+
const opacityParams = paramNames.filter((paramName) =>
|
|
93
|
+
ParamNames.isBinColoring(paramName),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
// If we have bin_coloring params, use only those for opacity.
|
|
97
|
+
// Otherwise, use all params (non-binned chart behavior).
|
|
98
|
+
const relevantParams = opacityParams.length > 0 ? opacityParams : paramNames;
|
|
99
|
+
|
|
100
|
+
// Use AND so all conditions must be met
|
|
87
101
|
const test = {
|
|
88
|
-
and:
|
|
102
|
+
and: relevantParams.map((paramName) => ({
|
|
89
103
|
param: paramName,
|
|
90
104
|
})),
|
|
91
105
|
};
|
|
@@ -1,16 +1,283 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { TopLevelSpec } from "vega-lite";
|
|
4
|
+
import type { NonNormalizedSpec } from "vega-lite/types_unstable/spec/index.js";
|
|
5
|
+
import type { TopLevelParameter } from "vega-lite/types_unstable/spec/toplevel.js";
|
|
6
|
+
|
|
3
7
|
import { findEncodedFields, makeEncodingInteractive } from "./encodings";
|
|
4
8
|
import { Marks } from "./marks";
|
|
5
|
-
import { Params } from "./params";
|
|
9
|
+
import { getBinnedFields, Params } from "./params";
|
|
6
10
|
import type {
|
|
11
|
+
Field,
|
|
7
12
|
GenericVegaSpec,
|
|
13
|
+
LayerSpec,
|
|
8
14
|
Mark,
|
|
15
|
+
SelectionParameter,
|
|
9
16
|
SelectionType,
|
|
17
|
+
UnitSpec,
|
|
10
18
|
VegaLiteSpec,
|
|
11
19
|
VegaLiteUnitSpec,
|
|
12
20
|
} from "./types";
|
|
13
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Creates a unique signature for a param based on its select properties.
|
|
24
|
+
* Params with the same signature are considered "common" candidates for hoisting.
|
|
25
|
+
*/
|
|
26
|
+
function getParamSignature(param: TParams): string {
|
|
27
|
+
// For non-selection params, use the whole param as signature
|
|
28
|
+
if (!("select" in param) || !param.select) {
|
|
29
|
+
return JSON.stringify(param);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const select = param.select;
|
|
33
|
+
|
|
34
|
+
// Handle string selections (type shortcuts)
|
|
35
|
+
if (typeof select === "string") {
|
|
36
|
+
return JSON.stringify({ type: select, bind: param.bind });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const signature = {
|
|
40
|
+
type: select.type,
|
|
41
|
+
encodings:
|
|
42
|
+
"encodings" in select && select.encodings
|
|
43
|
+
? [...select.encodings].sort()
|
|
44
|
+
: undefined,
|
|
45
|
+
fields:
|
|
46
|
+
"fields" in select && select.fields
|
|
47
|
+
? [...select.fields].sort()
|
|
48
|
+
: undefined,
|
|
49
|
+
bind: param.bind,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return JSON.stringify(signature);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Recursively collects all params from nested specs and hoists ONLY common params to the top level.
|
|
57
|
+
* Common params are those with the same select.type, select.encodings, select.fields, and bind
|
|
58
|
+
* that appear in ALL unit specs.
|
|
59
|
+
*/
|
|
60
|
+
function hoistParamsAndApplyOpacity<T extends VegaLiteSpec>(spec: T): T {
|
|
61
|
+
// Collect params from all unit specs
|
|
62
|
+
const allUnitSpecParams = collectAllUnitSpecParams(spec);
|
|
63
|
+
|
|
64
|
+
if (allUnitSpecParams.length === 0) {
|
|
65
|
+
return spec;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Find common params (params with same signature that appear in all unit specs)
|
|
69
|
+
const commonParams = findCommonParams(allUnitSpecParams);
|
|
70
|
+
|
|
71
|
+
if (commonParams.length === 0) {
|
|
72
|
+
return spec;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Remove only common params from nested specs
|
|
76
|
+
const commonParamNames = new Set(commonParams.map((p) => p.name));
|
|
77
|
+
const specWithoutCommonParams = removeSpecificParamsFromNestedSpecs(
|
|
78
|
+
spec,
|
|
79
|
+
commonParamNames,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Apply opacity to all nested unit specs based on hoisted params
|
|
83
|
+
const specWithOpacity = applyOpacityToNestedSpecs(
|
|
84
|
+
specWithoutCommonParams,
|
|
85
|
+
commonParams.map((p) => p.name),
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
// Add common params to top level
|
|
89
|
+
return {
|
|
90
|
+
...specWithOpacity,
|
|
91
|
+
params: [...(spec.params || []), ...commonParams],
|
|
92
|
+
} as T;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
type SpecWithParams =
|
|
96
|
+
| TopLevelSpec
|
|
97
|
+
| LayerSpec<Field>
|
|
98
|
+
| UnitSpec<Field>
|
|
99
|
+
| NonNormalizedSpec;
|
|
100
|
+
|
|
101
|
+
type TParams = SelectionParameter | TopLevelParameter;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Collects params from all unit specs (not concat specs).
|
|
105
|
+
* Returns array of { params } for each unit spec.
|
|
106
|
+
*/
|
|
107
|
+
function collectAllUnitSpecParams(spec: SpecWithParams): {
|
|
108
|
+
params: TParams[];
|
|
109
|
+
}[] {
|
|
110
|
+
const results: { params: TParams[] }[] = [];
|
|
111
|
+
|
|
112
|
+
if ("vconcat" in spec && Array.isArray(spec.vconcat)) {
|
|
113
|
+
for (const subSpec of spec.vconcat) {
|
|
114
|
+
results.push(...collectAllUnitSpecParams(subSpec));
|
|
115
|
+
}
|
|
116
|
+
} else if ("hconcat" in spec && Array.isArray(spec.hconcat)) {
|
|
117
|
+
for (const subSpec of spec.hconcat) {
|
|
118
|
+
results.push(...collectAllUnitSpecParams(subSpec));
|
|
119
|
+
}
|
|
120
|
+
} else if ("layer" in spec) {
|
|
121
|
+
// Don't collect from layers, as they handle their own params
|
|
122
|
+
return [];
|
|
123
|
+
} else if (
|
|
124
|
+
"mark" in spec && // This is a unit spec
|
|
125
|
+
"params" in spec &&
|
|
126
|
+
spec.params &&
|
|
127
|
+
spec.params.length > 0
|
|
128
|
+
) {
|
|
129
|
+
results.push({ params: spec.params });
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return results;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Finds params that are common across all unit specs.
|
|
137
|
+
* A param is common if it has the same signature and appears in all unit specs.
|
|
138
|
+
*/
|
|
139
|
+
function findCommonParams(
|
|
140
|
+
allUnitSpecParams: { params: TParams[] }[],
|
|
141
|
+
): TParams[] {
|
|
142
|
+
if (allUnitSpecParams.length === 0) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Count occurrences of each param signature
|
|
147
|
+
const signatureCounts = new Map<string, { count: number; param: TParams }>();
|
|
148
|
+
const totalUnitSpecs = allUnitSpecParams.length;
|
|
149
|
+
|
|
150
|
+
for (const { params } of allUnitSpecParams) {
|
|
151
|
+
const seenSignatures = new Set<string>();
|
|
152
|
+
|
|
153
|
+
for (const param of params) {
|
|
154
|
+
const signature = getParamSignature(param);
|
|
155
|
+
|
|
156
|
+
// Only count once per unit spec (avoid duplicates within same spec)
|
|
157
|
+
if (!seenSignatures.has(signature)) {
|
|
158
|
+
seenSignatures.add(signature);
|
|
159
|
+
|
|
160
|
+
if (!signatureCounts.has(signature)) {
|
|
161
|
+
signatureCounts.set(signature, { count: 0, param });
|
|
162
|
+
}
|
|
163
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
164
|
+
signatureCounts.get(signature)!.count++;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Return params that appear in ALL unit specs
|
|
170
|
+
const commonParams: TParams[] = [];
|
|
171
|
+
for (const [, { count, param }] of signatureCounts) {
|
|
172
|
+
if (count === totalUnitSpecs) {
|
|
173
|
+
commonParams.push(param);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return commonParams;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Recursively removes specific params (by name) from nested specs.
|
|
182
|
+
*/
|
|
183
|
+
function removeSpecificParamsFromNestedSpecs(
|
|
184
|
+
spec: SpecWithParams,
|
|
185
|
+
paramNamesToRemove: Set<string>,
|
|
186
|
+
): SpecWithParams {
|
|
187
|
+
if ("vconcat" in spec && Array.isArray(spec.vconcat)) {
|
|
188
|
+
return {
|
|
189
|
+
...spec,
|
|
190
|
+
vconcat: spec.vconcat.map((subSpec) =>
|
|
191
|
+
removeSpecificParamsFromNestedSpecs(subSpec, paramNamesToRemove),
|
|
192
|
+
),
|
|
193
|
+
} as SpecWithParams;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if ("hconcat" in spec && Array.isArray(spec.hconcat)) {
|
|
197
|
+
return {
|
|
198
|
+
...spec,
|
|
199
|
+
hconcat: spec.hconcat.map((subSpec) =>
|
|
200
|
+
removeSpecificParamsFromNestedSpecs(subSpec, paramNamesToRemove),
|
|
201
|
+
),
|
|
202
|
+
} as SpecWithParams;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if ("mark" in spec && "params" in spec && spec.params) {
|
|
206
|
+
// This is a unit spec, filter out params that should be hoisted
|
|
207
|
+
const currentParams = spec.params;
|
|
208
|
+
const filteredParams: TParams[] = [];
|
|
209
|
+
|
|
210
|
+
for (const param of currentParams) {
|
|
211
|
+
if (!param || typeof param !== "object" || !("name" in param)) {
|
|
212
|
+
filteredParams.push(param);
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (!paramNamesToRemove.has(param.name)) {
|
|
216
|
+
filteredParams.push(param);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (filteredParams.length === 0) {
|
|
221
|
+
const { params, ...rest } = spec;
|
|
222
|
+
return rest as SpecWithParams;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
...spec,
|
|
227
|
+
params: filteredParams,
|
|
228
|
+
} as SpecWithParams;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return spec;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Recursively applies opacity encoding to all unit specs based on param names.
|
|
236
|
+
*/
|
|
237
|
+
function applyOpacityToNestedSpecs<T extends SpecWithParams>(
|
|
238
|
+
spec: T,
|
|
239
|
+
paramNames: string[],
|
|
240
|
+
): T {
|
|
241
|
+
if ("vconcat" in spec && Array.isArray(spec.vconcat)) {
|
|
242
|
+
return {
|
|
243
|
+
...spec,
|
|
244
|
+
vconcat: spec.vconcat.map((subSpec) =>
|
|
245
|
+
applyOpacityToNestedSpecs(subSpec, paramNames),
|
|
246
|
+
),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if ("hconcat" in spec && Array.isArray(spec.hconcat)) {
|
|
251
|
+
return {
|
|
252
|
+
...spec,
|
|
253
|
+
hconcat: spec.hconcat.map((subSpec) =>
|
|
254
|
+
applyOpacityToNestedSpecs(subSpec, paramNames),
|
|
255
|
+
),
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if ("layer" in spec) {
|
|
260
|
+
// Don't apply to layers, they handle their own opacity
|
|
261
|
+
return spec;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if ("mark" in spec && Marks.isInteractive(spec.mark)) {
|
|
265
|
+
// This is a unit spec, apply opacity
|
|
266
|
+
return {
|
|
267
|
+
...spec,
|
|
268
|
+
mark: Marks.makeClickable(spec.mark),
|
|
269
|
+
encoding: makeEncodingInteractive(
|
|
270
|
+
"opacity",
|
|
271
|
+
spec.encoding || {},
|
|
272
|
+
paramNames,
|
|
273
|
+
spec.mark,
|
|
274
|
+
),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
return spec;
|
|
279
|
+
}
|
|
280
|
+
|
|
14
281
|
export function makeSelectable<T extends VegaLiteSpec>(
|
|
15
282
|
spec: T,
|
|
16
283
|
opts: {
|
|
@@ -38,26 +305,71 @@ export function makeSelectable<T extends VegaLiteSpec>(
|
|
|
38
305
|
|
|
39
306
|
if ("vconcat" in spec) {
|
|
40
307
|
const subSpecs = spec.vconcat.map((subSpec) =>
|
|
41
|
-
"mark" in subSpec
|
|
308
|
+
"mark" in subSpec
|
|
309
|
+
? makeSelectable(subSpec as VegaLiteUnitSpec, {
|
|
310
|
+
chartSelection,
|
|
311
|
+
fieldSelection,
|
|
312
|
+
})
|
|
313
|
+
: subSpec,
|
|
42
314
|
);
|
|
43
|
-
//
|
|
44
|
-
return { ...spec, vconcat: subSpecs };
|
|
315
|
+
// Hoist params to top level and apply opacity to all nested specs
|
|
316
|
+
return hoistParamsAndApplyOpacity({ ...spec, vconcat: subSpecs });
|
|
45
317
|
}
|
|
46
318
|
|
|
47
319
|
if ("hconcat" in spec) {
|
|
48
320
|
const subSpecs = spec.hconcat.map((subSpec) =>
|
|
49
|
-
"mark" in subSpec
|
|
321
|
+
"mark" in subSpec
|
|
322
|
+
? makeSelectable(subSpec as VegaLiteUnitSpec, {
|
|
323
|
+
chartSelection,
|
|
324
|
+
fieldSelection,
|
|
325
|
+
})
|
|
326
|
+
: subSpec,
|
|
50
327
|
);
|
|
51
|
-
//
|
|
52
|
-
return { ...spec, hconcat: subSpecs };
|
|
328
|
+
// Hoist params to top level and apply opacity to all nested specs
|
|
329
|
+
return hoistParamsAndApplyOpacity({ ...spec, hconcat: subSpecs });
|
|
53
330
|
}
|
|
54
331
|
|
|
55
332
|
if ("layer" in spec) {
|
|
333
|
+
// Check if has top-level params already (not just legend). If so, we don't add any more as it
|
|
334
|
+
// will cause conflicts.
|
|
335
|
+
const hasTopLevelParams = spec.params && spec.params.length > 0;
|
|
336
|
+
const shouldAddLegendSelection =
|
|
337
|
+
fieldSelection !== false && !hasTopLevelParams;
|
|
338
|
+
|
|
339
|
+
// Collect all unique legend fields from all layers to avoid duplicates
|
|
340
|
+
let legendFields: string[] = [];
|
|
341
|
+
if (shouldAddLegendSelection) {
|
|
342
|
+
const allFields = spec.layer.flatMap((subSpec) => {
|
|
343
|
+
if (!("mark" in subSpec)) {
|
|
344
|
+
return [];
|
|
345
|
+
}
|
|
346
|
+
return findEncodedFields(subSpec as VegaLiteUnitSpec);
|
|
347
|
+
});
|
|
348
|
+
legendFields = [...new Set(allFields)]; // Remove duplicates
|
|
349
|
+
|
|
350
|
+
// If fieldSelection is an array, filter the fields
|
|
351
|
+
if (Array.isArray(fieldSelection)) {
|
|
352
|
+
legendFields = legendFields.filter((field) =>
|
|
353
|
+
fieldSelection.includes(field),
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
56
358
|
const subSpecs = spec.layer.map((subSpec, idx) => {
|
|
57
359
|
if (!("mark" in subSpec)) {
|
|
58
360
|
return subSpec;
|
|
59
361
|
}
|
|
60
362
|
let resolvedSpec = subSpec as VegaLiteUnitSpec;
|
|
363
|
+
|
|
364
|
+
// Only add legend params to first
|
|
365
|
+
if (idx === 0 && legendFields.length > 0) {
|
|
366
|
+
const legendParams = legendFields.map((field) => Params.legend(field));
|
|
367
|
+
resolvedSpec = {
|
|
368
|
+
...resolvedSpec,
|
|
369
|
+
params: [...(resolvedSpec.params || []), ...legendParams],
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
61
373
|
resolvedSpec = makeChartSelectable(resolvedSpec, chartSelection, idx);
|
|
62
374
|
resolvedSpec = makeChartInteractive(resolvedSpec);
|
|
63
375
|
if (idx === 0) {
|
|
@@ -147,10 +459,19 @@ function makeChartSelectable(
|
|
|
147
459
|
return spec;
|
|
148
460
|
}
|
|
149
461
|
|
|
150
|
-
const
|
|
151
|
-
|
|
462
|
+
const binnedFields = getBinnedFields(spec);
|
|
463
|
+
|
|
464
|
+
// If chartSelection is true, we use the best selection for based on the spec
|
|
465
|
+
// For binned charts, we use point selection
|
|
466
|
+
// Otherwise, we use the best selection for the mark
|
|
467
|
+
const resolvedChartSelection: SelectionType[] | undefined =
|
|
468
|
+
chartSelection === true
|
|
469
|
+
? binnedFields.length > 0
|
|
470
|
+
? ["point"]
|
|
471
|
+
: getBestSelectionForMark(mark)
|
|
472
|
+
: [chartSelection];
|
|
152
473
|
|
|
153
|
-
if (!resolvedChartSelection) {
|
|
474
|
+
if (!resolvedChartSelection || resolvedChartSelection.length === 0) {
|
|
154
475
|
return spec;
|
|
155
476
|
}
|
|
156
477
|
|
|
@@ -162,6 +483,14 @@ function makeChartSelectable(
|
|
|
162
483
|
|
|
163
484
|
const nextParams = [...(spec.params || []), ...params];
|
|
164
485
|
|
|
486
|
+
// For binned charts, we need TWO params:
|
|
487
|
+
// 1. The regular selection param (point/interval) - sends signals to backend for filtering
|
|
488
|
+
// 2. The bin_coloring param - controls opacity/coloring, NO signal listener
|
|
489
|
+
// This separation allows us to filter on binned ranges while providing visual feedback
|
|
490
|
+
if (binnedFields.length > 0 && resolvedChartSelection.includes("point")) {
|
|
491
|
+
nextParams.push(Params.binColoring(layerNum));
|
|
492
|
+
}
|
|
493
|
+
|
|
165
494
|
return {
|
|
166
495
|
...spec,
|
|
167
496
|
params: nextParams,
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { uniq } from "lodash-es";
|
|
2
4
|
import type { TopLevelSpec } from "vega-lite";
|
|
3
|
-
import type {
|
|
5
|
+
import type { NonNormalizedSpec } from "vega-lite/types_unstable/spec/index.js";
|
|
4
6
|
import { Marks } from "./marks";
|
|
5
7
|
import {
|
|
6
8
|
type Field,
|
|
9
|
+
type LayerSpec,
|
|
7
10
|
Mark,
|
|
8
11
|
type SelectionParameter,
|
|
9
12
|
type SingleDefUnitChannel,
|
|
13
|
+
type UnitSpec,
|
|
10
14
|
type VegaLiteUnitSpec,
|
|
11
15
|
} from "./types";
|
|
12
16
|
|
|
@@ -20,6 +24,14 @@ export const ParamNames = {
|
|
|
20
24
|
legendSelection(field: string) {
|
|
21
25
|
return `legend_selection_${field}`;
|
|
22
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* Special param for binned charts that controls opacity/coloring.
|
|
29
|
+
* This param is used for visual feedback only and does NOT send signals to the backend.
|
|
30
|
+
* The actual selection param (point/interval) handles backend filtering.
|
|
31
|
+
*/
|
|
32
|
+
binColoring(layerNum: number | undefined) {
|
|
33
|
+
return layerNum == null ? "bin_coloring" : `bin_coloring_${layerNum}`;
|
|
34
|
+
},
|
|
23
35
|
HIGHLIGHT: "highlight",
|
|
24
36
|
PAN_ZOOM: "pan_zoom",
|
|
25
37
|
hasPoint(names: string[]) {
|
|
@@ -34,6 +46,9 @@ export const ParamNames = {
|
|
|
34
46
|
hasPanZoom(names: string[]) {
|
|
35
47
|
return names.some((name) => name.startsWith("pan_zoom"));
|
|
36
48
|
},
|
|
49
|
+
isBinColoring(name: string) {
|
|
50
|
+
return name.startsWith("bin_coloring");
|
|
51
|
+
},
|
|
37
52
|
};
|
|
38
53
|
|
|
39
54
|
export const Params = {
|
|
@@ -78,6 +93,20 @@ export const Params = {
|
|
|
78
93
|
},
|
|
79
94
|
};
|
|
80
95
|
},
|
|
96
|
+
/**
|
|
97
|
+
* Creates a param for binned charts that controls opacity/coloring only.
|
|
98
|
+
* This param does NOT send signals to the backend - it's purely for visual feedback.
|
|
99
|
+
* The regular selection param (point/interval) handles backend filtering.
|
|
100
|
+
*/
|
|
101
|
+
binColoring(layerNum: number | undefined): SelectionParameter<"point"> {
|
|
102
|
+
return {
|
|
103
|
+
name: ParamNames.binColoring(layerNum),
|
|
104
|
+
select: {
|
|
105
|
+
type: "point",
|
|
106
|
+
on: "click[!event.metaKey]",
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
},
|
|
81
110
|
legend(field: string): SelectionParameter<"point"> {
|
|
82
111
|
return {
|
|
83
112
|
name: ParamNames.legendSelection(field),
|
|
@@ -136,25 +165,30 @@ export function getEncodingAxisForMark(
|
|
|
136
165
|
}
|
|
137
166
|
|
|
138
167
|
export function getSelectionParamNames(
|
|
139
|
-
spec: TopLevelSpec | LayerSpec<Field> | UnitSpec<Field
|
|
168
|
+
spec: TopLevelSpec | LayerSpec<Field> | UnitSpec<Field> | NonNormalizedSpec,
|
|
140
169
|
): string[] {
|
|
141
170
|
if ("params" in spec && spec.params && spec.params.length > 0) {
|
|
142
171
|
const params = spec.params;
|
|
143
|
-
|
|
144
|
-
|
|
172
|
+
const paramNames = params
|
|
173
|
+
// @ts-expect-error TS doesn't know that `param` is an object
|
|
174
|
+
.filter((param) => {
|
|
175
|
+
if (param == null) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
145
178
|
// @ts-expect-error TS doesn't know that `param` is an object
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
// @ts-expect-error TS doesn't know that `param` is an object
|
|
151
|
-
return "select" in param && param.select !== undefined;
|
|
152
|
-
})
|
|
153
|
-
.map((param) => param.name)
|
|
154
|
-
);
|
|
179
|
+
return "select" in param && param.select !== undefined;
|
|
180
|
+
})
|
|
181
|
+
.map((param) => param.name);
|
|
182
|
+
return uniq(paramNames);
|
|
155
183
|
}
|
|
156
184
|
if ("layer" in spec) {
|
|
157
|
-
return
|
|
185
|
+
return uniq(spec.layer.flatMap(getSelectionParamNames));
|
|
186
|
+
}
|
|
187
|
+
if ("vconcat" in spec) {
|
|
188
|
+
return uniq(spec.vconcat.flatMap(getSelectionParamNames));
|
|
189
|
+
}
|
|
190
|
+
if ("hconcat" in spec) {
|
|
191
|
+
return uniq(spec.hconcat.flatMap(getSelectionParamNames));
|
|
158
192
|
}
|
|
159
193
|
return [];
|
|
160
194
|
}
|
|
@@ -190,3 +224,31 @@ export function getDirectionOfBar(
|
|
|
190
224
|
|
|
191
225
|
return undefined;
|
|
192
226
|
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Returns the binned field names from the spec.
|
|
230
|
+
* For binned charts, selections need to use fields instead of encodings.
|
|
231
|
+
*/
|
|
232
|
+
export function getBinnedFields(spec: VegaLiteUnitSpec): string[] {
|
|
233
|
+
if (!spec.encoding) {
|
|
234
|
+
return [];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const fields: string[] = [];
|
|
238
|
+
|
|
239
|
+
for (const channel of Object.values(spec.encoding)) {
|
|
240
|
+
// Check for binning
|
|
241
|
+
if (
|
|
242
|
+
channel &&
|
|
243
|
+
typeof channel === "object" &&
|
|
244
|
+
"bin" in channel &&
|
|
245
|
+
channel.bin &&
|
|
246
|
+
"field" in channel &&
|
|
247
|
+
typeof channel.field === "string"
|
|
248
|
+
) {
|
|
249
|
+
fields.push(channel.field);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return fields;
|
|
254
|
+
}
|