@marimo-team/islands 0.23.2-dev54 → 0.23.2-dev55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-DShCAU06.js → ConnectedDataExplorerComponent-BS9U2zaC.js} +68 -66
- package/dist/ErrorBoundary-Da4UeYxT.js +167 -0
- package/dist/{ImageComparisonComponent-BV1jHxOP.js → ImageComparisonComponent-DaocPIse.js} +1 -1
- package/dist/{Plot-DsEy3ro_.js → Plot-PIeIvFnD.js} +1 -1
- package/dist/{_baseUniq-LxrBY6QK.js → _baseUniq-CxZRxRRo.js} +3 -3
- package/dist/{any-language-editor-CtNfsWJh.js → any-language-editor-BVR0l12r.js} +23 -22
- package/dist/apl-BKoVld9y.js +4 -0
- package/dist/{arc-CEWBr4jc.js → arc-CHF8PiiF.js} +2 -2
- package/dist/architecture-7HQA4BMR-D0JB_3hE.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-DapqVf5U.js → architectureDiagram-VXUJARFQ-BXQEUDtK.js} +19 -19
- package/dist/{arrays-Du-jRBAy.js → arrays-CldYf7p7.js} +1 -1
- package/dist/asciiarmor-DQrKIjoo.js +4 -0
- package/dist/asn1-BZvnj0dq.js +4 -0
- package/dist/{blockDiagram-VD42YOAC-CfD03O_S.js → blockDiagram-VD42YOAC-DhJe-Y9i.js} +14 -14
- package/dist/brainfuck-D558nlUv.js +4 -0
- package/dist/{button-D1C3g5GI.js → button-CA5pI2YF.js} +2 -2
- package/dist/{c4Diagram-YG6GDRKO-14WsB19A.js → c4Diagram-YG6GDRKO-9dSfzOFR.js} +6 -6
- package/dist/{capabilities-B6ae40r2.js → capabilities-6laDasij.js} +2 -2
- package/dist/{channel-DkswyS_y.js → channel-MqYIiKgS.js} +1 -1
- package/dist/{chat-ui-d0C1glXQ.js → chat-ui-CTt4WX0V.js} +2822 -2819
- package/dist/{check-BgrdTLuv.js → check-CFM2mVDr.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BChPAwlt.js → chunk-4BX2VUAB-BwfrWBqN.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-Bt9N9Ox8.js → chunk-4F5CHEZ2-C6tO9vjs.js} +1 -1
- package/dist/{chunk-55IACEB6-wWyiO7Qo.js → chunk-55IACEB6-D8THf2mi.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-DDhYtPiB.js → chunk-5FQGJX7Z-CO1e63h_.js} +5 -5
- package/dist/{chunk-ABZYJK2D-TzeWxQkr.js → chunk-ABZYJK2D-BrBb_0yY.js} +3 -3
- package/dist/{chunk-ATLVNIR6-BIyR7hDU.js → chunk-ATLVNIR6-D-0XqNah.js} +2 -2
- package/dist/{chunk-B2363JML-Db4oHCZ4.js → chunk-B2363JML-Ds8wZXyP.js} +1 -1
- package/dist/{chunk-B4BG7PRW-HwU7LyDE.js → chunk-B4BG7PRW-8iRKvugR.js} +7 -7
- package/dist/{chunk-CVBHYZKI-DqdOZevv.js → chunk-CVBHYZKI-B6xhgaBd.js} +1 -1
- package/dist/{chunk-DI55MBZ5-BpT6xu0H.js → chunk-DI55MBZ5-C0_2D4m4.js} +6 -6
- package/dist/{chunk-EXTU4WIE-XAoEZY7R.js → chunk-EXTU4WIE-Jiw9ca1u.js} +2 -2
- package/dist/{chunk-FMBD7UC4-WPL5C7Yr.js → chunk-FMBD7UC4-CHdus51S.js} +1 -1
- package/dist/{chunk-FRFDVMJY-DGahYT1S.js → chunk-FRFDVMJY-BgQv1HBE.js} +1 -1
- package/dist/{chunk-HN2XXSSU-GC9oeSst.js → chunk-HN2XXSSU-2Vfbq-kU.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-B1i4Tfcw.js → chunk-JA3XYJ7Z-6wbaigKe.js} +3 -3
- package/dist/{chunk-JZLCHNYA-CNdDVlto.js → chunk-JZLCHNYA-_rfptlUP.js} +6 -6
- package/dist/{chunk-MI3HLSF2-CAUClZTk.js → chunk-MI3HLSF2-Do0-KRc0.js} +1 -1
- package/dist/{chunk-N4CR4FBY-BTIG-LyN.js → chunk-N4CR4FBY-DIZG9dVD.js} +7 -7
- package/dist/{chunk-PL6DKKU2-CoF4omiN.js → chunk-PL6DKKU2-DHfTUHy8.js} +1 -1
- package/dist/{chunk-QN33PNHL-Bu0A3trl.js → chunk-QN33PNHL-Cc64y40m.js} +2 -2
- package/dist/{chunk-QXUST7PY-D8Zb-uHT.js → chunk-QXUST7PY-BDG0-0Or.js} +10 -10
- package/dist/{chunk-QZHKN3VN-cTJMhkeY.js → chunk-QZHKN3VN-B_Mdb8GC.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-BbDagUDj.js → chunk-S3R3BYOJ-DphMP0FA.js} +6 -6
- package/dist/{chunk-SJTYNZTY-dW9OU4qd.js → chunk-SJTYNZTY-Diciw4sx.js} +1 -1
- package/dist/{chunk-TCCFYFTB-vYPbT9fw.js → chunk-TCCFYFTB-d3HOqL2I.js} +6 -6
- package/dist/{chunk-TQ3KTPDO-Dykudlbk.js → chunk-TQ3KTPDO-CQfP9npd.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Cu-m016X.js → chunk-TZMSLE5B-C9LUoYkc.js} +3 -3
- package/dist/{chunk-UMXZTB3W-BVL6vS7M.js → chunk-UMXZTB3W-MSKeGL7W.js} +1 -1
- package/dist/classDiagram-2ON5EDUG-CBHMR6ZU.js +30 -0
- package/dist/classDiagram-v2-WZHVMYZB-BsUtUGM_.js +30 -0
- package/dist/{clike-D8Yzpo0X.js → clike-sBZrGeF8.js} +1 -1
- package/dist/clojure-Cq8mTSrE.js +4 -0
- package/dist/{clone-0b7yW5QV.js → clone-BuIIsfA8.js} +1 -1
- package/dist/cmake-D8HCovWK.js +4 -0
- package/dist/cobol-UolN-9iU.js +4 -0
- package/dist/{code-block-37QAKDTI-DP_hitFg.js → code-block-37QAKDTI-0JNwiPGv.js} +2 -2
- package/dist/coffeescript-VdNuWrt5.js +4 -0
- package/dist/commonlisp-ALX7fpDc.js +4 -0
- package/dist/{constants-C2U1Bmny.js → constants-D0gkYoE2.js} +2 -2
- package/dist/{copy-Bp6CK_Fg.js → copy-TGGAUEWp.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-CFYo67PX.js → cose-bilkent-S5V4N54A-DXHZkJKX.js} +2 -2
- package/dist/crystal-PbyO9Q_s.js +4 -0
- package/dist/css-DFklJkr_.js +4 -0
- package/dist/cypher-BifNeYlv.js +4 -0
- package/dist/d-BA-JP4PJ.js +4 -0
- package/dist/{dagre-6UL2VRFP-BGxh7S-e.js → dagre-6UL2VRFP-tH87fkPA.js} +15 -15
- package/dist/{dagre-Bc6NAu6c.js → dagre-VYEPqXIV.js} +11 -11
- package/dist/{data-grid-overlay-editor-B1mPZ5v3.js → data-grid-overlay-editor-CWUN78-s.js} +3 -3
- package/dist/{diagram-PSM6KHXK-D7YQAOqL.js → diagram-PSM6KHXK-2VjPSCDn.js} +22 -22
- package/dist/{diagram-QEK2KX5R-CCoHDhM3.js → diagram-QEK2KX5R-CiLmNyta.js} +17 -17
- package/dist/{diagram-S2PKOQOG-jSHdFOD9.js → diagram-S2PKOQOG-Zha_1CLx.js} +17 -17
- package/dist/diff-CtkDpav4.js +4 -0
- package/dist/dist-B--tLnAP.js +5 -0
- package/dist/{dist-qpWXd9bI.js → dist-B52GXZbd.js} +2 -2
- package/dist/{dist-I9ZUr7P2.js → dist-B8BjrFUE.js} +5 -5
- package/dist/dist-BEOU2g1b.js +8 -0
- package/dist/dist-BHnX0ia_.js +8 -0
- package/dist/{dist-BH67T-KO.js → dist-BK-3fF4P.js} +1 -1
- package/dist/{dist-Cf1__Ezo.js → dist-BTyJtnNg.js} +1 -1
- package/dist/{dist-Cil0kZOw.js → dist-BetEKbPG.js} +2 -2
- package/dist/{dist-HNoCppvN.js → dist-BrBucRXs.js} +2 -2
- package/dist/{dist-BKKbDTix.js → dist-Brkazupz.js} +2 -2
- package/dist/dist-BuBwsFva.js +5 -0
- package/dist/dist-BzmEQ9u7.js +5 -0
- package/dist/{dist-BKGmoFSu.js → dist-C-J0pt5p.js} +1 -1
- package/dist/dist-C1Ap5CYU.js +5 -0
- package/dist/{dist-CjFd_clf.js → dist-C474qFoq.js} +3 -3
- package/dist/{dist-5VO3ibto.js → dist-C9fmTOin.js} +1 -1
- package/dist/{dist-ZJ4KZJv-.js → dist-CGLzXdrt.js} +1 -1
- package/dist/dist-CMjD5MQb.js +6 -0
- package/dist/{dist-BWmwgyyt.js → dist-CNtV21T_.js} +4 -4
- package/dist/dist-ChC1BhqM.js +6 -0
- package/dist/dist-Cih01ssx.js +5 -0
- package/dist/{dist-BI11IEaj.js → dist-CinA9Enb.js} +1 -1
- package/dist/dist-CqfONiY9.js +5 -0
- package/dist/{dist-C-Mi2f2L.js → dist-CtCY55Jf.js} +2 -2
- package/dist/{dist-BVdq25Pp.js → dist-CxdUraQr.js} +2 -2
- package/dist/{dist-BmkybMad.js → dist-CyFFzJTb.js} +1 -1
- package/dist/{dist-vkjbtmSV.js → dist-D029TiHd.js} +2 -2
- package/dist/dist-D0iD0Fi9.js +5 -0
- package/dist/{dist-DcB6g7XM.js → dist-D9r7Cmw7.js} +2 -2
- package/dist/{dist-CtliEIOC.js → dist-DBLeRrPp.js} +2 -2
- package/dist/{dist-BrRkENbS.js → dist-DGAfI2rB.js} +2 -2
- package/dist/{dist-QzlYe8XT.js → dist-DZjQ_MBo.js} +4 -4
- package/dist/{dist-DH-coTYX.js → dist-DadjmS-4.js} +2 -2
- package/dist/{dist-4BuWWZtg.js → dist-DkC6YEo0.js} +2 -2
- package/dist/{dist-CWin4kuc.js → dist-DquyVv5H.js} +2 -2
- package/dist/dist-DtNLXm8d.js +5 -0
- package/dist/{dist-CTtLBPLZ.js → dist-ESg7xyoD.js} +4 -4
- package/dist/dist-FN0ZA_8F.js +8 -0
- package/dist/{dist-ChYkaQZ9.js → dist-HVuryI1a.js} +1 -1
- package/dist/{dist-DViRvB3t.js → dist-JEhxD_cn.js} +1 -1
- package/dist/{dist-CuT7pAjI.js → dist-UcOPnRMa.js} +3 -3
- package/dist/dist-YP-G7W0f.js +8 -0
- package/dist/{dist-Bo8Q2NZ6.js → dist-Yrfc6L0I.js} +3 -3
- package/dist/{dist-CM55yvVz.js → dist-Zn0KNbo9.js} +1 -1
- package/dist/{dist-rdefyFzZ.js → dist-nuW5EDYT.js} +2 -2
- package/dist/{dockerfile-m9DOSpI5.js → dockerfile-COvlVLcE.js} +1 -1
- package/dist/dtd-DW3_UFEG.js +4 -0
- package/dist/dylan-pDhodO2N.js +4 -0
- package/dist/ecl-BJT8-YD7.js +4 -0
- package/dist/eiffel-Dmns-9vS.js +4 -0
- package/dist/elm-Da4sO4Bz.js +4 -0
- package/dist/{erDiagram-Q2GNP2WA-C4ngo-A5.js → erDiagram-Q2GNP2WA-biHZS05w.js} +15 -15
- package/dist/erlang-C-zBsDi7.js +4 -0
- package/dist/{error-banner-B_ioHva3.js → error-banner-DnBPzEWg.js} +3 -3
- package/dist/{esm-i3cb1Eej.js → esm-CYEyrE3Y.js} +105 -105
- package/dist/esm-Dd1z1auZ.js +1171 -0
- package/dist/extends-CzJgxo2J.js +1645 -0
- package/dist/factor-4xPWlWB5.js +4 -0
- package/dist/{factor-Nva0iSXt.js → factor-C2GT7jfQ.js} +1 -1
- package/dist/{flatten-BOUk2Lcs.js → flatten-CzBvFdvC.js} +1 -1
- package/dist/{flowDiagram-NV44I4VS-BKj8B2cb.js → flowDiagram-NV44I4VS-CWWlUpBR.js} +17 -17
- package/dist/formats-Dh5M1ZRs.js +79 -0
- package/dist/forth-l-c75zSd.js +4 -0
- package/dist/fortran-DIujSODW.js +4 -0
- package/dist/{ganttDiagram-JELNMOA3-D9PIiNqf.js → ganttDiagram-JELNMOA3-D7B2c4Z9.js} +10 -10
- package/dist/gas-CXnG5g_b.js +4 -0
- package/dist/gherkin-VPeqd4-X.js +4 -0
- package/dist/{gitGraph-G5XIXVHT-DTpIjETB.js → gitGraph-G5XIXVHT-BdepdFa_.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-g28AnGRX.js → gitGraphDiagram-V2S2FVAM-CtLvNR1S.js} +17 -17
- package/dist/{glide-data-editor-BaAX1uv-.js → glide-data-editor-CVtY_KYw.js} +572 -570
- package/dist/{graphlib-DTP9cqCT.js → graphlib-CVPKjKCS.js} +5 -5
- package/dist/groovy-CphhZQgg.js +4 -0
- package/dist/{hasIn-MXhEnf0q.js → hasIn-COs6vImh.js} +3 -3
- package/dist/haskell-CCvlS5Iq.js +4 -0
- package/dist/haxe-C_bi66fP.js +5 -0
- package/dist/{process-output-DQxp17Bc.js → html-to-image-BdsDysfl.js} +2486 -2628
- package/dist/idl-1DcP4Dm8.js +4 -0
- package/dist/{info-VBDWY6EO-DcCsz2w_.js → info-VBDWY6EO--JNA2rNu.js} +3 -3
- package/dist/infoDiagram-HS3SLOUP-BbZyOxsP.js +30 -0
- package/dist/{input-L-W-RdiE.js → input-Drx1pguW.js} +70 -70
- package/dist/{isEmpty-BkHRaD4A.js → isEmpty-Dd8mx_WL.js} +1 -1
- package/dist/{isSymbol-DjQk-23F.js → isSymbol-BvIfMnn6.js} +1 -1
- package/dist/javascript-DUIGhBvO.js +4 -0
- package/dist/{journeyDiagram-XKPGCS4Q-DbVPB0Tw.js → journeyDiagram-XKPGCS4Q-BU2mjjzl.js} +7 -7
- package/dist/julia-Cs2G4PQi.js +4 -0
- package/dist/{kanban-definition-3W4ZIXB7-vHPEznuf.js → kanban-definition-3W4ZIXB7-BlmczUuw.js} +12 -12
- package/dist/{katex-Ckd8lBne.js → katex-qPqrBHZ8.js} +1 -1
- package/dist/label-BCWi-Oqu.js +31 -0
- package/dist/{line-LK_5q2B9.js → line-BWRi3U3S.js} +3 -3
- package/dist/{linear-CJ6ctpF3.js → linear-DnHwODZa.js} +4 -4
- package/dist/livescript-DMtVFaAN.js +4 -0
- package/dist/{loader-D9ktSJS7.js → loader-BvW0-YWZ.js} +2 -2
- package/dist/lua-BAoLtdJg.js +4 -0
- package/dist/main.js +14354 -37990
- package/dist/mathematica-C_NoFtbo.js +4 -0
- package/dist/mbox-DcFJFYrH.js +4 -0
- package/dist/{memoize-DxdGWSJ6.js → memoize-C9ltv0Cw.js} +1 -1
- package/dist/{merge-BEePrO2O.js → merge-CHn7Yx0N.js} +1 -1
- package/dist/mermaid-4DMBBIKO-CG1ECj5W.js +6 -0
- package/dist/{mermaid-D5eODRf-.js → mermaid-BagLPXm9.js} +50 -50
- package/dist/{mermaid-parser.core-Bn1MCv1H.js → mermaid-parser.core-CleJseNW.js} +8 -8
- package/dist/{mhchem-DAXq6Zll.js → mhchem-BwoRNwg_.js} +1 -1
- package/dist/{min-RKgAiXUl.js → min-BNz2lZfk.js} +4 -4
- package/dist/{mindmap-definition-VGOIOE7T-C-DUBd1V.js → mindmap-definition-VGOIOE7T-CcSYqYP9.js} +14 -14
- package/dist/mirc-71dccf_u.js +4 -0
- package/dist/mllike-CWcOFVDq.js +6 -0
- package/dist/modelica-Ape2VXxx.js +4 -0
- package/dist/mscgen-Cc6TwbSN.js +6 -0
- package/dist/mumps-h-ZbdkJ9.js +4 -0
- package/dist/{now-BUO7mCs3.js → now-Sgq5m3D-.js} +2 -2
- package/dist/{nsis-DgKbDAVQ.js → nsis-B5K1qoyo.js} +1 -1
- package/dist/nsis-C0p3m7JW.js +4 -0
- package/dist/ntriples-c9lEeT5w.js +4 -0
- package/dist/{number-overlay-editor-BbN3lvDI.js → number-overlay-editor-_GnlYFHC.js} +1 -1
- package/dist/octave-DzEgB_74.js +4 -0
- package/dist/{once-CZno0h-b.js → once-rJImu7SE.js} +1 -1
- package/dist/{ordinal-COPPjmMz.js → ordinal-2jIulmcR.js} +1 -1
- package/dist/oz-CAxvHkyQ.js +4 -0
- package/dist/{packet-DYOGHKS2-BpYOwBIl.js → packet-DYOGHKS2-CBxXGWNr.js} +3 -3
- package/dist/pascal-BJzu1sgP.js +4 -0
- package/dist/perl--IrOzZ2Z.js +4 -0
- package/dist/{pick-M816gWrv.js → pick-CRAXxDYn.js} +4 -4
- package/dist/{pie-VRWISCQL-narEdAtC.js → pie-VRWISCQL-Bmdnqjip.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-BHTVSAs4.js → pieDiagram-ADFJNKIX-DNyLF5H2.js} +22 -22
- package/dist/pig-CiBKKNhC.js +4 -0
- package/dist/powershell-KY0j6Qop.js +4 -0
- package/dist/{precisionRound-Duzbr5ur.js → precisionRound-CnHPY_5v.js} +1 -1
- package/dist/process-output-COL2Pf5I.js +109 -0
- package/dist/properties-BW8q3ziV.js +4 -0
- package/dist/protobuf-BGaeuTGV.js +4 -0
- package/dist/pug-DjOKK-4J.js +4 -0
- package/dist/{pug-CTpLcc1b.js → pug-tjbzJCFk.js} +1 -1
- package/dist/puppet-DWm2o6zX.js +4 -0
- package/dist/python-Bp2gezZy.js +4 -0
- package/dist/q-DljPshos.js +4 -0
- package/dist/{quadrantDiagram-AYHSOK5B-CWLD0gxi.js → quadrantDiagram-AYHSOK5B-rXwjifrj.js} +5 -5
- package/dist/r-BajPMnEu.js +4 -0
- package/dist/{radar-ZZBFDIW7-CZ6uVl9x.js → radar-ZZBFDIW7-BmCWDffL.js} +3 -3
- package/dist/{react-vega-Ov9UeJeF.js → react-vega-C2Rtgjb4.js} +19 -19
- package/dist/react-vega-jy3CfYys.js +9 -0
- package/dist/{requirementDiagram-UZGBJVZJ-G9EKZRw-.js → requirementDiagram-UZGBJVZJ-DBdrMVbs.js} +14 -14
- package/dist/reveal-component-CA7oaSt2.js +4549 -0
- package/dist/rpm-BKx-ZZ62.js +5 -0
- package/dist/ruby-DJq_HNKc.js +4 -0
- package/dist/{sankeyDiagram-TZEHDZUN-NP6aAxqw.js → sankeyDiagram-TZEHDZUN-CxmzalGv.js} +5 -5
- package/dist/sas-WANvpcOU.js +4 -0
- package/dist/scheme-CliBbhGF.js +4 -0
- package/dist/{sequenceDiagram-WL72ISMW-zuvr_4GP.js → sequenceDiagram-WL72ISMW-CVCDsJ9h.js} +8 -8
- package/dist/shell-BwhrNUvM.js +4 -0
- package/dist/sieve-BIVePvMp.js +4 -0
- package/dist/slide-BiyYep36.js +23871 -0
- package/dist/smalltalk-D6G48JmY.js +4 -0
- package/dist/sparql-jjc3BmEP.js +4 -0
- package/dist/{spec-Budha9Vn.js → spec-BKWq0wn2.js} +8 -152
- package/dist/{src-szye8OCw.js → src-BY0BGg6V.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-D4KRQjIA.js → stateDiagram-FKZM4ZOC-D_2djEhW.js} +19 -19
- package/dist/stateDiagram-v2-4FDKWEC3-Cv9Av10H.js +29 -0
- package/dist/{step-1PmBKr2y.js → step-DGAGWg3y.js} +1 -1
- package/dist/stex-ChDHQs3R.js +4 -0
- package/dist/{label-DAH3oYXB.js → strings-B_FOH6eV.js} +57 -81
- package/dist/style.css +1 -1
- package/dist/stylus-WPBPQ4PE.js +4 -0
- package/dist/swift-O1Qy6iCm.js +4 -0
- package/dist/{slides-component-B9NXzezL.js → swiper-component-KkEVUDd3.js} +5 -5
- package/dist/tcl-BAFdhvsi.js +4 -0
- package/dist/textile-DFuzhNLG.js +4 -0
- package/dist/{time-B8tcX_hU.js → time-CMdrp3hw.js} +4 -4
- package/dist/{timeline-definition-IT6M3QCI-CiTBkznn.js → timeline-definition-IT6M3QCI-E4NzxCs3.js} +4 -4
- package/dist/{toDate-Cqrm-UC4.js → toDate-yqOcZ_tY.js} +4 -4
- package/dist/toml-DRSTeely.js +4 -0
- package/dist/{tooltip-DwNnFsxZ.js → tooltip-B0mtKTXm.js} +4 -4
- package/dist/{treemap-GDKQZRPO-BxK9LkTz.js → treemap-GDKQZRPO-CoKHPxa7.js} +3 -3
- package/dist/troff-B_ZjwBW0.js +4 -0
- package/dist/ttcn-CAyiB3ic.js +4 -0
- package/dist/ttcn-cfg-BS5_BGBJ.js +4 -0
- package/dist/turtle-CUBEDy3E.js +4 -0
- package/dist/types-DBtDeUKD.js +38 -0
- package/dist/{useAsyncData-B1v_9k4L.js → useAsyncData-CKYzhCis.js} +2 -2
- package/dist/useDateFormatter-B3mCQMP3.js +150 -0
- package/dist/useDeepCompareMemoize-je76AJS_.js +11 -0
- package/dist/{useIframeCapabilities-WKJHoHW-.js → useIframeCapabilities-DbdLoEDm.js} +1 -1
- package/dist/{useLifecycle-DdNGMIjn.js → useLifecycle-smVfjLNI.js} +4 -4
- package/dist/{useTheme-CfzcSQtz.js → useTheme-CX9pPLUH.js} +3 -3
- package/dist/vb-DY9S6-U2.js +4 -0
- package/dist/vbscript-gaHC39Jq.js +4 -0
- package/dist/{vega-component-CQ88A9vN.js → vega-component-CjMUUeEZ.js} +18 -17
- package/dist/{vega-loader.browser-hMqVC9bf.js → vega-loader.browser-3_z8GoFC.js} +3 -3
- package/dist/velocity-TfCOtJZ_.js +4 -0
- package/dist/verilog-c2JOX8mv.js +4 -0
- package/dist/vhdl-dHBirRiO.js +4 -0
- package/dist/webidl-Bauj-i07.js +4 -0
- package/dist/xquery-CtaEAOt8.js +4 -0
- package/dist/{xychartDiagram-PRI3JC2R-C3c6-1Z6.js → xychartDiagram-PRI3JC2R-CuxTvjw5.js} +13 -13
- package/dist/yacas-BZ85agQP.js +4 -0
- package/dist/z80-hCgR-L4U.js +4 -0
- package/dist/{zod-W5ZEjzaE.js → zod-BxdsqRPd.js} +3 -3
- package/package.json +3 -1
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +9 -17
- package/src/components/slides/reveal-component.tsx +109 -0
- package/src/components/slides/reveal-slides.css +42 -0
- package/src/components/slides/slides.css +0 -65
- package/src/components/slides/{slides-component.tsx → swiper-component.tsx} +1 -0
- package/src/components/slides/swiper-slides.css +64 -0
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +3 -1
- package/dist/apl-Y7yFAg6_.js +0 -4
- package/dist/architecture-7HQA4BMR-CATq-AgL.js +0 -6
- package/dist/asciiarmor-Bl8b2p0w.js +0 -4
- package/dist/asn1-BF6cywqm.js +0 -4
- package/dist/brainfuck-BuqydWe3.js +0 -4
- package/dist/classDiagram-2ON5EDUG-B3w6nMDy.js +0 -30
- package/dist/classDiagram-v2-WZHVMYZB-F3IQS_LI.js +0 -30
- package/dist/clojure-CAHAWK5H.js +0 -4
- package/dist/cmake-BogDc4GF.js +0 -4
- package/dist/cobol-DRnpeU4u.js +0 -4
- package/dist/coffeescript-9MgX7RN8.js +0 -4
- package/dist/commonlisp-CVz2KONN.js +0 -4
- package/dist/crystal-td8mwLG5.js +0 -4
- package/dist/css-BK451dBn.js +0 -4
- package/dist/cypher-DuNPR6Ie.js +0 -4
- package/dist/d-DL6oP_-2.js +0 -4
- package/dist/diff-D9CplOBj.js +0 -4
- package/dist/dist-B9hNC-E9.js +0 -5
- package/dist/dist-BK1_hXFC.js +0 -5
- package/dist/dist-BSGRbj-N.js +0 -8
- package/dist/dist-C5i3bD88.js +0 -5
- package/dist/dist-C9mOdSQc.js +0 -5
- package/dist/dist-DAmwszSZ.js +0 -8
- package/dist/dist-DGgzl61R.js +0 -5
- package/dist/dist-DnGRs0FR.js +0 -5
- package/dist/dist-GBXFGpIo.js +0 -8
- package/dist/dist-H433csIN.js +0 -8
- package/dist/dist-ItCg4aSC.js +0 -6
- package/dist/dist-Mi3Li5U2.js +0 -6
- package/dist/dist-_-4VPi_T.js +0 -5
- package/dist/dist-tIur4wUM.js +0 -5
- package/dist/dtd-Ce1c54UO.js +0 -4
- package/dist/dylan-B43wjIwg.js +0 -4
- package/dist/ecl-DK-fZmir.js +0 -4
- package/dist/eiffel-CNuvvPqD.js +0 -4
- package/dist/elm-DZEkBjgQ.js +0 -4
- package/dist/erlang-Dw4PDZV_.js +0 -4
- package/dist/esm-DGjaY9EX.js +0 -2805
- package/dist/factor-C9JRv63g.js +0 -4
- package/dist/forth-CKhoqn4e.js +0 -4
- package/dist/fortran-Do51bToK.js +0 -4
- package/dist/gas-BZfL3Uwh.js +0 -4
- package/dist/gherkin-BwQh4ehw.js +0 -4
- package/dist/groovy-CG5kCGiv.js +0 -4
- package/dist/haskell-BKii9uTg.js +0 -4
- package/dist/haxe-Bsz30J8x.js +0 -5
- package/dist/idl-BlxgaPKj.js +0 -4
- package/dist/infoDiagram-HS3SLOUP-C1lXJDxe.js +0 -30
- package/dist/javascript-SNhUvTcB.js +0 -4
- package/dist/julia-CGZzaDyk.js +0 -4
- package/dist/livescript-Cj6cX-Ys.js +0 -4
- package/dist/lua-BcVHrD8f.js +0 -4
- package/dist/mathematica-DLY8ZGoJ.js +0 -4
- package/dist/mbox-BNTsMWS5.js +0 -4
- package/dist/mermaid-4DMBBIKO-DRXAUrhi.js +0 -6
- package/dist/mirc-oyeOBir2.js +0 -4
- package/dist/mllike-ByxznKQw.js +0 -6
- package/dist/modelica-DNLhoyD8.js +0 -4
- package/dist/mscgen-DkZltsli.js +0 -6
- package/dist/mumps-TTiQB1xv.js +0 -4
- package/dist/nsis-RT1O1Ph8.js +0 -4
- package/dist/ntriples-CxsCiZ7Z.js +0 -4
- package/dist/octave-CkLh5tpW.js +0 -4
- package/dist/oz-yI7U9eVH.js +0 -4
- package/dist/pascal-CQK8sfDe.js +0 -4
- package/dist/perl-BEG8-kZl.js +0 -4
- package/dist/pig-DLLCqQaR.js +0 -4
- package/dist/powershell-CtjMkVO_.js +0 -4
- package/dist/properties-Domeb57z.js +0 -4
- package/dist/protobuf-0yk85TV6.js +0 -4
- package/dist/pug-B-BiNkM-.js +0 -4
- package/dist/puppet-C0N4vevK.js +0 -4
- package/dist/python-BZFa8G3C.js +0 -4
- package/dist/q-gcj7dgJv.js +0 -4
- package/dist/r-DavzTuPU.js +0 -4
- package/dist/react-vega-BFLRzgl7.js +0 -9
- package/dist/rpm-bPj31ya8.js +0 -5
- package/dist/ruby-3UzzijjE.js +0 -4
- package/dist/sas-D9upmCP9.js +0 -4
- package/dist/scheme-DqWYzIFR.js +0 -4
- package/dist/shell-w63nkNmU.js +0 -4
- package/dist/sieve-Dz_ISrl6.js +0 -4
- package/dist/smalltalk-BXZ14pkr.js +0 -4
- package/dist/sparql-Boyc0wkb.js +0 -4
- package/dist/stateDiagram-v2-4FDKWEC3-BPz-4Aaz.js +0 -29
- package/dist/stex-CZyTRGVB.js +0 -4
- package/dist/stylus-m9L_f1X1.js +0 -4
- package/dist/swift-C4TGn99K.js +0 -4
- package/dist/tcl-D_L0cfYZ.js +0 -4
- package/dist/textile-BAofYdKN.js +0 -4
- package/dist/toml-DCDKACLL.js +0 -4
- package/dist/troff-JHOU2VZK.js +0 -4
- package/dist/ttcn-Cxhng3qq.js +0 -4
- package/dist/ttcn-cfg-DJgUIu5n.js +0 -4
- package/dist/turtle-DKYkKZjV.js +0 -4
- package/dist/types-DEY2byth.js +0 -202
- package/dist/useDeepCompareMemoize-ToNUMW7X.js +0 -85
- package/dist/vb-C9rpn9hN.js +0 -4
- package/dist/vbscript-BQ7rxQU0.js +0 -4
- package/dist/velocity-C8WXmzLz.js +0 -4
- package/dist/verilog-BUXJEyEq.js +0 -4
- package/dist/vhdl-C18YIXfF.js +0 -4
- package/dist/webidl-D97EKzDx.js +0 -4
- package/dist/xquery-BZM6yzG2.js +0 -4
- package/dist/yacas-CXKck-Ok.js +0 -4
- package/dist/z80-BbF6ykWc.js +0 -4
- /package/dist/{_baseFor-6rr1p10t.js → _baseFor-BGiY-cm1.js} +0 -0
- /package/dist/{apl-BqjtmlWW.js → apl-Dt8GMXYg.js} +0 -0
- /package/dist/{array-D7wW5QoO.js → array-B-MVxRIF.js} +0 -0
- /package/dist/{asciiarmor-D9C9bbeV.js → asciiarmor-CitDQ85h.js} +0 -0
- /package/dist/{asn1-D_zR1ubK.js → asn1-abrf9SMK.js} +0 -0
- /package/dist/{asterisk-B0dLLA8Z.js → asterisk-BUZwqih-.js} +0 -0
- /package/dist/{brainfuck-79SC7EYA.js → brainfuck-BL-Boof0.js} +0 -0
- /package/dist/{chunk-DR5Q36YT-BxPcQ21t.js → chunk-DR5Q36YT-CP69aZS_.js} +0 -0
- /package/dist/{click-outside-container-BHqXZnKi.js → click-outside-container-BZgN7xS_.js} +0 -0
- /package/dist/{clike-DFDX2jWq.js → clike-RWg7anhx.js} +0 -0
- /package/dist/{clojure-Bb3Od9By.js → clojure-DaojKHow.js} +0 -0
- /package/dist/{clsx-CwTY0BxM.js → clsx-CyyyQ8Ue.js} +0 -0
- /package/dist/{cmake-DYGUYEtU.js → cmake-DN-_v0XE.js} +0 -0
- /package/dist/{cobol-CcWmcAFT.js → cobol-C3VpMyux.js} +0 -0
- /package/dist/{coffeescript-BVa1qoL6.js → coffeescript-DIkz3Tbt.js} +0 -0
- /package/dist/{colors-6DRQ0kEF.js → colors-Cn2p_FA3.js} +0 -0
- /package/dist/{common-keywords-Bz8dNfWa.js → common-keywords-hbLeU7VU.js} +0 -0
- /package/dist/{commonlisp-zi51jgUH.js → commonlisp-CB1boOiP.js} +0 -0
- /package/dist/{crystal-QjpegJHM.js → crystal-DI2oCml6.js} +0 -0
- /package/dist/{css-B_GfJtcK.js → css-BdEVwQDV.js} +0 -0
- /package/dist/{cypher-BVuYJpGf.js → cypher-BNHToqxU.js} +0 -0
- /package/dist/{cytoscape.esm-BYAuS6uS.js → cytoscape.esm-WbbDoCfu.js} +0 -0
- /package/dist/{d-BT97RiQI.js → d-D7we7I1b.js} +0 -0
- /package/dist/{defaultLocale-DjFHq3Xk.js → defaultLocale-BpsHxBd7.js} +0 -0
- /package/dist/{defaultLocale-B_A76Zpk.js → defaultLocale-DoeErsX2.js} +0 -0
- /package/dist/{diff-CHd93v7L.js → diff-Cia6fzjN.js} +0 -0
- /package/dist/{dist-CqR8FBcH.js → dist-C89sHDXk.js} +0 -0
- /package/dist/{dist-DPAK3Dpl.js → dist-CCADb07R.js} +0 -0
- /package/dist/{dtd-akLFIRuZ.js → dtd-H4Hubdwp.js} +0 -0
- /package/dist/{duckdb-keywords-CQAIHMbC.js → duckdb-keywords-CZ_ZTscu.js} +0 -0
- /package/dist/{dylan-Iy-rgNOc.js → dylan-fVO6rnq3.js} +0 -0
- /package/dist/{ebnf-CTkZpZPT.js → ebnf-WEXPLEWb.js} +0 -0
- /package/dist/{ecl-BhUXC_aR.js → ecl-B94VPjNR.js} +0 -0
- /package/dist/{eiffel-DIRAlWPD.js → eiffel-C_R6TusS.js} +0 -0
- /package/dist/{elm-BDgVzkJ4.js → elm-DzCHbO2g.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-DdzHpbbG.js → emotion-is-prop-valid.esm-DtW2o230.js} +0 -0
- /package/dist/{erlang-Djcs_NwB.js → erlang-BGNkx6JU.js} +0 -0
- /package/dist/{esm-BRwAuUu2.js → esm-Bb_hbWan.js} +0 -0
- /package/dist/{fcl-OXoT8w4k.js → fcl-B_Gv5Jfx.js} +0 -0
- /package/dist/{forth-c_NTahPv.js → forth-Bybw0cJ7.js} +0 -0
- /package/dist/{fortran-Bpxt27dn.js → fortran-C6PoCLkI.js} +0 -0
- /package/dist/{gas-RVBts6ZK.js → gas-BBlhenj4.js} +0 -0
- /package/dist/{gherkin-Hf6PTauh.js → gherkin-NXtNG85X.js} +0 -0
- /package/dist/{groovy-CKjO-cRi.js → groovy-BoFYK9xM.js} +0 -0
- /package/dist/{haskell-DC1Gan6v.js → haskell-BtBdvQ1n.js} +0 -0
- /package/dist/{haxe-Bpne--ot.js → haxe-D--o6dr0.js} +0 -0
- /package/dist/{http-CPVO27fZ.js → http-Dc2fv19V.js} +0 -0
- /package/dist/{idl-GRIbMIEq.js → idl-AqTq5l7e.js} +0 -0
- /package/dist/{init-BfRhston.js → init-D-g0ONX1.js} +0 -0
- /package/dist/{invariant-D4hPsZFI.js → invariant-UcGKQEhF.js} +0 -0
- /package/dist/{javascript-nS0zxWNO.js → javascript-DvwNVye9.js} +0 -0
- /package/dist/{jsx-runtime-9hcJiI23.js → jsx-runtime-COBk7ree.js} +0 -0
- /package/dist/{julia-CQpdTxmO.js → julia-DoKiagZC.js} +0 -0
- /package/dist/{katex-Dg42UEnr.js → katex-B7pMJpE0.js} +0 -0
- /package/dist/{livescript-D5kqrQol.js → livescript-DxBZMiWB.js} +0 -0
- /package/dist/{lua-CKifrpGK.js → lua-DmS_0NTu.js} +0 -0
- /package/dist/{main-CvkAPtaq.js → main-CThhXnXU.js} +0 -0
- /package/dist/{math-BbMyrONz.js → math-BYK36kWZ.js} +0 -0
- /package/dist/{mathematica-CxT3f_fi.js → mathematica-ChlDFeIC.js} +0 -0
- /package/dist/{mbox-C2_n_I9h.js → mbox-CguZuODr.js} +0 -0
- /package/dist/{micromark-factory-space-YUxUai1y.js → micromark-factory-space-CwHmg6iz.js} +0 -0
- /package/dist/{mirc-BTQeASBH.js → mirc-CFtY8dqz.js} +0 -0
- /package/dist/{mllike-BxO6Hl5N.js → mllike-C0EJrEOk.js} +0 -0
- /package/dist/{modelica-DuivZReX.js → modelica-C1kO1nfS.js} +0 -0
- /package/dist/{mscgen-DwD83FOm.js → mscgen-DEYdr7AY.js} +0 -0
- /package/dist/{mumps-CdVjp3OE.js → mumps-B3NVJs2V.js} +0 -0
- /package/dist/{nginx-Bi9TuNqb.js → nginx-ComVAAGN.js} +0 -0
- /package/dist/{node-sql-parser-Bet3kHkt.js → node-sql-parser-DNGGJ-Rw.js} +0 -0
- /package/dist/{ntriples-DBS60qLp.js → ntriples-DHol9X9H.js} +0 -0
- /package/dist/{octave-BL0tQUFC.js → octave-CYGz0bfo.js} +0 -0
- /package/dist/{oz-DBrG4vwi.js → oz-kPxb2ni5.js} +0 -0
- /package/dist/{pascal-BWV9h8yS.js → pascal-bZ0yrJKy.js} +0 -0
- /package/dist/{path-C_x2ySFi.js → path-Du6n3sOU.js} +0 -0
- /package/dist/{perl-Bm5a83JW.js → perl-z4hvqyqz.js} +0 -0
- /package/dist/{pig-CbJDoHaE.js → pig-DZO8QDF9.js} +0 -0
- /package/dist/{powershell-tG44m5Cy.js → powershell-BSuaDQEC.js} +0 -0
- /package/dist/{properties-DUZGzdb1.js → properties-BXhGLlIx.js} +0 -0
- /package/dist/{protobuf-CcoKXY0d.js → protobuf-DM6iybWV.js} +0 -0
- /package/dist/{puppet-BH73L_Gw.js → puppet-Bn05sQT8.js} +0 -0
- /package/dist/{purify.es-ClMna40y.js → purify.es-DT70lfR0.js} +0 -0
- /package/dist/{python-NJIxLTZp.js → python-Cvnhm0g7.js} +0 -0
- /package/dist/{q-MotBNA65.js → q-B9V8hzex.js} +0 -0
- /package/dist/{r-BUgBPae7.js → r-Cf0gFqmq.js} +0 -0
- /package/dist/{range-DwpxnYuB.js → range-BOiA8qqU.js} +0 -0
- /package/dist/{react-dom-D5FDLRUB.js → react-dom-BWRJ_g_k.js} +0 -0
- /package/dist/{rpm-C_PaGodG.js → rpm-D-LMkTV1.js} +0 -0
- /package/dist/{ruby-DFLM2XD8.js → ruby-DeuPikpK.js} +0 -0
- /package/dist/{sas-BMyyu8oO.js → sas-C9tjgAo9.js} +0 -0
- /package/dist/{scheme-Qet9zYAe.js → scheme-D1_bUF0G.js} +0 -0
- /package/dist/{shell-BKHx4Jjo.js → shell-CJBmnks3.js} +0 -0
- /package/dist/{sieve-CVo7dc4j.js → sieve-1fSV75CF.js} +0 -0
- /package/dist/{simple-mode-CVFBIo6d.js → simple-mode-B90Wdavj.js} +0 -0
- /package/dist/{smalltalk-BHr2nCth.js → smalltalk-sZNPD0HO.js} +0 -0
- /package/dist/{solr-Bt9XtM2H.js → solr-DTkyqJ-Z.js} +0 -0
- /package/dist/{sparql-QSu0ZCcc.js → sparql-oHc1nm77.js} +0 -0
- /package/dist/{spreadsheet-BWfuwc0V.js → spreadsheet-CER0raqY.js} +0 -0
- /package/dist/{sql-BdV3YOCG.js → sql-ByOoEONQ.js} +0 -0
- /package/dist/{stex-Ze8D4R_5.js → stex-DrxP7bb3.js} +0 -0
- /package/dist/{stylus-CLZH9-Ps.js → stylus-KzkX6zRB.js} +0 -0
- /package/dist/{swift-JNDJdNIE.js → swift-DqVxZvKo.js} +0 -0
- /package/dist/{tcl-J5aE7aj5.js → tcl-BtWSwXfA.js} +0 -0
- /package/dist/{textile-6Hn05XQM.js → textile-CWDbn9Ql.js} +0 -0
- /package/dist/{tiddlywiki-BWn8rSwJ.js → tiddlywiki-Cr9xyOY1.js} +0 -0
- /package/dist/{tiki-XORjA1c3.js → tiki-D5JONyfZ.js} +0 -0
- /package/dist/{timer-pEiW44EO.js → timer-D7JVdX9U.js} +0 -0
- /package/dist/{toml-BceyeuiF.js → toml-BfehlgmL.js} +0 -0
- /package/dist/{treemap-BzS5cW_6.js → treemap-qFGzn7xk.js} +0 -0
- /package/dist/{troff-DeMyd5Pf.js → troff-BZBk6AAu.js} +0 -0
- /package/dist/{ttcn-DurvvcB-.js → ttcn-DVwvXg0_.js} +0 -0
- /package/dist/{ttcn-cfg-BuYui6Rv.js → ttcn-cfg-gjbVLf1L.js} +0 -0
- /package/dist/{turtle-CD8Qf-tp.js → turtle-CgxKXorV.js} +0 -0
- /package/dist/{vb-BklM-Nqk.js → vb-B9kSwTdM.js} +0 -0
- /package/dist/{vbscript-DbMEEX0d.js → vbscript-DrUKSCdb.js} +0 -0
- /package/dist/{velocity-CERL-_vq.js → velocity-AlMYTnMy.js} +0 -0
- /package/dist/{verilog-BD6jNce6.js → verilog-DLUaM05j.js} +0 -0
- /package/dist/{vhdl-U-1_N98i.js → vhdl-DUJOtSmO.js} +0 -0
- /package/dist/{webidl-IUn0dzoa.js → webidl-CQp4aHk_.js} +0 -0
- /package/dist/{xquery-QeeHdSO2.js → xquery-IxkjlwOD.js} +0 -0
- /package/dist/{yacas-C9XcEPAJ.js → yacas-Bnctn5w8.js} +0 -0
- /package/dist/{z80-C-nD1oRy.js → z80-DrFwhx53.js} +0 -0
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
|
+
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
|
+
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
|
|
4
|
+
import { l as historyKeymap, o as defaultKeymap, r as lintKeymap, s as history, t as _extends, u as indentWithTab } from "./extends-CzJgxo2J.js";
|
|
5
|
+
import { $ as ViewPlugin, At as Prec, B as tags, Bt as combineConfig, C as foldKeymap, Dt as EditorState, Et as EditorSelection, F as syntaxHighlighting, Ft as StateField, Ht as findClusterBreak, Mt as RangeSetBuilder, Ot as Facet, Pt as StateEffect, Rt as codePointAt, Ut as fromCodePoint, Y as Decoration, Z as EditorView, _t as showDialog, a as HighlightStyle, bt as crelt, ct as highlightActiveLineGutter, dt as keymap, ft as lineNumbers, g as defaultHighlightStyle, gt as runScopeHandlers, ht as rectangularSelection, it as getPanel, j as indentUnit, k as indentOnInput, lt as highlightSpecialChars, mt as placeholder, nt as drawSelection, p as bracketMatching, rt as dropCursor, st as highlightActiveLine, tt as crosshairCursor, vt as showPanel, wt as CharCategory, x as foldGutter, xt as Annotation, zt as codePointSize } from "./dist-CCADb07R.js";
|
|
6
|
+
import { a as closeBracketsKeymap, c as completionKeymap, i as closeBrackets, r as autocompletion } from "./dist-JEhxD_cn.js";
|
|
7
|
+
var basicNormalize = typeof String.prototype.normalize == "function" ? (e2) => e2.normalize("NFKD") : (e2) => e2, SearchCursor = class {
|
|
8
|
+
constructor(e2, y, b = 0, x = e2.length, S, C) {
|
|
9
|
+
this.test = C, this.value = {
|
|
10
|
+
from: 0,
|
|
11
|
+
to: 0
|
|
12
|
+
}, this.done = false, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e2.iterRange(b, x), this.bufferStart = b, this.normalize = S ? (e3) => S(basicNormalize(e3)) : basicNormalize, this.query = this.normalize(y);
|
|
13
|
+
}
|
|
14
|
+
peek() {
|
|
15
|
+
if (this.bufferPos == this.buffer.length) {
|
|
16
|
+
if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done) return -1;
|
|
17
|
+
this.bufferPos = 0, this.buffer = this.iter.value;
|
|
18
|
+
}
|
|
19
|
+
return codePointAt(this.buffer, this.bufferPos);
|
|
20
|
+
}
|
|
21
|
+
next() {
|
|
22
|
+
for (; this.matches.length; ) this.matches.pop();
|
|
23
|
+
return this.nextOverlapping();
|
|
24
|
+
}
|
|
25
|
+
nextOverlapping() {
|
|
26
|
+
for (; ; ) {
|
|
27
|
+
let e2 = this.peek();
|
|
28
|
+
if (e2 < 0) return this.done = true, this;
|
|
29
|
+
let y = fromCodePoint(e2), b = this.bufferStart + this.bufferPos;
|
|
30
|
+
this.bufferPos += codePointSize(e2);
|
|
31
|
+
let x = this.normalize(y);
|
|
32
|
+
if (x.length) for (let e3 = 0, S = b; ; e3++) {
|
|
33
|
+
let C = x.charCodeAt(e3), w = this.match(C, S, this.bufferPos + this.bufferStart);
|
|
34
|
+
if (e3 == x.length - 1) {
|
|
35
|
+
if (w) return this.value = w, this;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
S == b && e3 < y.length && y.charCodeAt(e3) == C && S++;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
match(e2, y, b) {
|
|
43
|
+
let x = null;
|
|
44
|
+
for (let y2 = 0; y2 < this.matches.length; y2 += 2) {
|
|
45
|
+
let S = this.matches[y2], C = false;
|
|
46
|
+
this.query.charCodeAt(S) == e2 && (S == this.query.length - 1 ? x = {
|
|
47
|
+
from: this.matches[y2 + 1],
|
|
48
|
+
to: b
|
|
49
|
+
} : (this.matches[y2]++, C = true)), C || (this.matches.splice(y2, 2), y2 -= 2);
|
|
50
|
+
}
|
|
51
|
+
return this.query.charCodeAt(0) == e2 && (this.query.length == 1 ? x = {
|
|
52
|
+
from: y,
|
|
53
|
+
to: b
|
|
54
|
+
} : this.matches.push(1, y)), x && this.test && !this.test(x.from, x.to, this.buffer, this.bufferStart) && (x = null), x;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
typeof Symbol < "u" && (SearchCursor.prototype[Symbol.iterator] = function() {
|
|
58
|
+
return this;
|
|
59
|
+
});
|
|
60
|
+
var empty = {
|
|
61
|
+
from: -1,
|
|
62
|
+
to: -1,
|
|
63
|
+
match: /* @__PURE__ */ /.*/.exec("")
|
|
64
|
+
}, baseFlags = "gm" + (/x/.unicode == null ? "" : "u"), RegExpCursor = class {
|
|
65
|
+
constructor(e2, y, b, x = 0, S = e2.length) {
|
|
66
|
+
if (this.text = e2, this.to = S, this.curLine = "", this.done = false, this.value = empty, /\\[sWDnr]|\n|\r|\[\^/.test(y)) return new MultilineRegExpCursor(e2, y, b, x, S);
|
|
67
|
+
this.re = new RegExp(y, baseFlags + ((b == null ? void 0 : b.ignoreCase) ? "i" : "")), this.test = b == null ? void 0 : b.test, this.iter = e2.iter(), this.curLineStart = e2.lineAt(x).from, this.matchPos = toCharEnd(e2, x), this.getLine(this.curLineStart);
|
|
68
|
+
}
|
|
69
|
+
getLine(e2) {
|
|
70
|
+
this.iter.next(e2), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
|
|
71
|
+
}
|
|
72
|
+
nextLine() {
|
|
73
|
+
this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
|
|
74
|
+
}
|
|
75
|
+
next() {
|
|
76
|
+
for (let e2 = this.matchPos - this.curLineStart; ; ) {
|
|
77
|
+
this.re.lastIndex = e2;
|
|
78
|
+
let y = this.matchPos <= this.to && this.re.exec(this.curLine);
|
|
79
|
+
if (y) {
|
|
80
|
+
let b = this.curLineStart + y.index, x = b + y[0].length;
|
|
81
|
+
if (this.matchPos = toCharEnd(this.text, x + (b == x ? 1 : 0)), b == this.curLineStart + this.curLine.length && this.nextLine(), (b < x || b > this.value.to) && (!this.test || this.test(b, x, y))) return this.value = {
|
|
82
|
+
from: b,
|
|
83
|
+
to: x,
|
|
84
|
+
match: y
|
|
85
|
+
}, this;
|
|
86
|
+
e2 = this.matchPos - this.curLineStart;
|
|
87
|
+
} else if (this.curLineStart + this.curLine.length < this.to) this.nextLine(), e2 = 0;
|
|
88
|
+
else return this.done = true, this;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, flattened = /* @__PURE__ */ new WeakMap(), FlattenedDoc = class e {
|
|
92
|
+
constructor(e2, y) {
|
|
93
|
+
this.from = e2, this.text = y;
|
|
94
|
+
}
|
|
95
|
+
get to() {
|
|
96
|
+
return this.from + this.text.length;
|
|
97
|
+
}
|
|
98
|
+
static get(y, b, x) {
|
|
99
|
+
let S = flattened.get(y);
|
|
100
|
+
if (!S || S.from >= x || S.to <= b) {
|
|
101
|
+
let S2 = new e(b, y.sliceString(b, x));
|
|
102
|
+
return flattened.set(y, S2), S2;
|
|
103
|
+
}
|
|
104
|
+
if (S.from == b && S.to == x) return S;
|
|
105
|
+
let { text: C, from: w } = S;
|
|
106
|
+
return w > b && (C = y.sliceString(b, w) + C, w = b), S.to < x && (C += y.sliceString(S.to, x)), flattened.set(y, new e(w, C)), new e(b, C.slice(b - w, x - w));
|
|
107
|
+
}
|
|
108
|
+
}, MultilineRegExpCursor = class {
|
|
109
|
+
constructor(e2, y, b, x, S) {
|
|
110
|
+
this.text = e2, this.to = S, this.done = false, this.value = empty, this.matchPos = toCharEnd(e2, x), this.re = new RegExp(y, baseFlags + ((b == null ? void 0 : b.ignoreCase) ? "i" : "")), this.test = b == null ? void 0 : b.test, this.flat = FlattenedDoc.get(e2, x, this.chunkEnd(x + 5e3));
|
|
111
|
+
}
|
|
112
|
+
chunkEnd(e2) {
|
|
113
|
+
return e2 >= this.to ? this.to : this.text.lineAt(e2).to;
|
|
114
|
+
}
|
|
115
|
+
next() {
|
|
116
|
+
for (; ; ) {
|
|
117
|
+
let e2 = this.re.lastIndex = this.matchPos - this.flat.from, y = this.re.exec(this.flat.text);
|
|
118
|
+
if (y && !y[0] && y.index == e2 && (this.re.lastIndex = e2 + 1, y = this.re.exec(this.flat.text)), y) {
|
|
119
|
+
let e3 = this.flat.from + y.index, b = e3 + y[0].length;
|
|
120
|
+
if ((this.flat.to >= this.to || y.index + y[0].length <= this.flat.text.length - 10) && (!this.test || this.test(e3, b, y))) return this.value = {
|
|
121
|
+
from: e3,
|
|
122
|
+
to: b,
|
|
123
|
+
match: y
|
|
124
|
+
}, this.matchPos = toCharEnd(this.text, b + (e3 == b ? 1 : 0)), this;
|
|
125
|
+
}
|
|
126
|
+
if (this.flat.to == this.to) return this.done = true, this;
|
|
127
|
+
this.flat = FlattenedDoc.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
typeof Symbol < "u" && (RegExpCursor.prototype[Symbol.iterator] = MultilineRegExpCursor.prototype[Symbol.iterator] = function() {
|
|
132
|
+
return this;
|
|
133
|
+
});
|
|
134
|
+
function validRegExp(e2) {
|
|
135
|
+
try {
|
|
136
|
+
return new RegExp(e2, baseFlags), true;
|
|
137
|
+
} catch {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function toCharEnd(e2, y) {
|
|
142
|
+
if (y >= e2.length) return y;
|
|
143
|
+
let b = e2.lineAt(y), x;
|
|
144
|
+
for (; y < b.to && (x = b.text.charCodeAt(y - b.from)) >= 56320 && x < 57344; ) y++;
|
|
145
|
+
return y;
|
|
146
|
+
}
|
|
147
|
+
var gotoLine = (e2) => {
|
|
148
|
+
let { state: y } = e2, b = String(y.doc.lineAt(e2.state.selection.main.head).number), { close: x, result: S } = showDialog(e2, {
|
|
149
|
+
label: y.phrase("Go to line"),
|
|
150
|
+
input: {
|
|
151
|
+
type: "text",
|
|
152
|
+
name: "line",
|
|
153
|
+
value: b
|
|
154
|
+
},
|
|
155
|
+
focus: true,
|
|
156
|
+
submitLabel: y.phrase("go")
|
|
157
|
+
});
|
|
158
|
+
return S.then((b2) => {
|
|
159
|
+
let S2 = b2 && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(b2.elements.line.value);
|
|
160
|
+
if (!S2) {
|
|
161
|
+
e2.dispatch({ effects: x });
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
let C = y.doc.lineAt(y.selection.main.head), [, w, T, E, D] = S2, O = E ? +E.slice(1) : 0, k = T ? +T : C.number;
|
|
165
|
+
if (T && D) {
|
|
166
|
+
let e3 = k / 100;
|
|
167
|
+
w && (e3 = e3 * (w == "-" ? -1 : 1) + C.number / y.doc.lines), k = Math.round(y.doc.lines * e3);
|
|
168
|
+
} else T && w && (k = k * (w == "-" ? -1 : 1) + C.number);
|
|
169
|
+
let A = y.doc.line(Math.max(1, Math.min(y.doc.lines, k))), j = EditorSelection.cursor(A.from + Math.max(0, Math.min(O, A.length)));
|
|
170
|
+
e2.dispatch({
|
|
171
|
+
effects: [x, EditorView.scrollIntoView(j.from, { y: "center" })],
|
|
172
|
+
selection: j
|
|
173
|
+
});
|
|
174
|
+
}), true;
|
|
175
|
+
}, defaultHighlightOptions = {
|
|
176
|
+
highlightWordAroundCursor: false,
|
|
177
|
+
minSelectionLength: 1,
|
|
178
|
+
maxMatches: 100,
|
|
179
|
+
wholeWords: false
|
|
180
|
+
}, highlightConfig = /* @__PURE__ */ Facet.define({ combine(e2) {
|
|
181
|
+
return combineConfig(e2, defaultHighlightOptions, {
|
|
182
|
+
highlightWordAroundCursor: (e3, y) => e3 || y,
|
|
183
|
+
minSelectionLength: Math.min,
|
|
184
|
+
maxMatches: Math.min
|
|
185
|
+
});
|
|
186
|
+
} });
|
|
187
|
+
function highlightSelectionMatches(e2) {
|
|
188
|
+
let y = [defaultTheme, matchHighlighter];
|
|
189
|
+
return e2 && y.push(highlightConfig.of(e2)), y;
|
|
190
|
+
}
|
|
191
|
+
var matchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch" }), mainMatchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
192
|
+
function insideWordBoundaries(e2, y, b, x) {
|
|
193
|
+
return (b == 0 || e2(y.sliceDoc(b - 1, b)) != CharCategory.Word) && (x == y.doc.length || e2(y.sliceDoc(x, x + 1)) != CharCategory.Word);
|
|
194
|
+
}
|
|
195
|
+
function insideWord(e2, y, b, x) {
|
|
196
|
+
return e2(y.sliceDoc(b, b + 1)) == CharCategory.Word && e2(y.sliceDoc(x - 1, x)) == CharCategory.Word;
|
|
197
|
+
}
|
|
198
|
+
var matchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
199
|
+
constructor(e2) {
|
|
200
|
+
this.decorations = this.getDeco(e2);
|
|
201
|
+
}
|
|
202
|
+
update(e2) {
|
|
203
|
+
(e2.selectionSet || e2.docChanged || e2.viewportChanged) && (this.decorations = this.getDeco(e2.view));
|
|
204
|
+
}
|
|
205
|
+
getDeco(e2) {
|
|
206
|
+
let y = e2.state.facet(highlightConfig), { state: b } = e2, x = b.selection;
|
|
207
|
+
if (x.ranges.length > 1) return Decoration.none;
|
|
208
|
+
let S = x.main, C, w = null;
|
|
209
|
+
if (S.empty) {
|
|
210
|
+
if (!y.highlightWordAroundCursor) return Decoration.none;
|
|
211
|
+
let e3 = b.wordAt(S.head);
|
|
212
|
+
if (!e3) return Decoration.none;
|
|
213
|
+
w = b.charCategorizer(S.head), C = b.sliceDoc(e3.from, e3.to);
|
|
214
|
+
} else {
|
|
215
|
+
let e3 = S.to - S.from;
|
|
216
|
+
if (e3 < y.minSelectionLength || e3 > 200) return Decoration.none;
|
|
217
|
+
if (y.wholeWords) {
|
|
218
|
+
if (C = b.sliceDoc(S.from, S.to), w = b.charCategorizer(S.head), !(insideWordBoundaries(w, b, S.from, S.to) && insideWord(w, b, S.from, S.to))) return Decoration.none;
|
|
219
|
+
} else if (C = b.sliceDoc(S.from, S.to), !C) return Decoration.none;
|
|
220
|
+
}
|
|
221
|
+
let T = [];
|
|
222
|
+
for (let x2 of e2.visibleRanges) {
|
|
223
|
+
let e3 = new SearchCursor(b.doc, C, x2.from, x2.to);
|
|
224
|
+
for (; !e3.next().done; ) {
|
|
225
|
+
let { from: x3, to: C2 } = e3.value;
|
|
226
|
+
if ((!w || insideWordBoundaries(w, b, x3, C2)) && (S.empty && x3 <= S.from && C2 >= S.to ? T.push(mainMatchDeco.range(x3, C2)) : (x3 >= S.to || C2 <= S.from) && T.push(matchDeco.range(x3, C2)), T.length > y.maxMatches)) return Decoration.none;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return Decoration.set(T);
|
|
230
|
+
}
|
|
231
|
+
}, { decorations: (e2) => e2.decorations }), defaultTheme = /* @__PURE__ */ EditorView.baseTheme({
|
|
232
|
+
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
233
|
+
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
234
|
+
}), selectWord = ({ state: e2, dispatch: y }) => {
|
|
235
|
+
let { selection: b } = e2, x = EditorSelection.create(b.ranges.map((y2) => e2.wordAt(y2.head) || EditorSelection.cursor(y2.head)), b.mainIndex);
|
|
236
|
+
return x.eq(b) ? false : (y(e2.update({ selection: x })), true);
|
|
237
|
+
};
|
|
238
|
+
function findNextOccurrence(e2, y) {
|
|
239
|
+
let { main: b, ranges: x } = e2.selection, S = e2.wordAt(b.head), C = S && S.from == b.from && S.to == b.to;
|
|
240
|
+
for (let b2 = false, S2 = new SearchCursor(e2.doc, y, x[x.length - 1].to); ; ) if (S2.next(), S2.done) {
|
|
241
|
+
if (b2) return null;
|
|
242
|
+
S2 = new SearchCursor(e2.doc, y, 0, Math.max(0, x[x.length - 1].from - 1)), b2 = true;
|
|
243
|
+
} else {
|
|
244
|
+
if (b2 && x.some((e3) => e3.from == S2.value.from)) continue;
|
|
245
|
+
if (C) {
|
|
246
|
+
let y2 = e2.wordAt(S2.value.from);
|
|
247
|
+
if (!y2 || y2.from != S2.value.from || y2.to != S2.value.to) continue;
|
|
248
|
+
}
|
|
249
|
+
return S2.value;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
var selectNextOccurrence = ({ state: e2, dispatch: y }) => {
|
|
253
|
+
let { ranges: b } = e2.selection;
|
|
254
|
+
if (b.some((e3) => e3.from === e3.to)) return selectWord({
|
|
255
|
+
state: e2,
|
|
256
|
+
dispatch: y
|
|
257
|
+
});
|
|
258
|
+
let x = e2.sliceDoc(b[0].from, b[0].to);
|
|
259
|
+
if (e2.selection.ranges.some((y2) => e2.sliceDoc(y2.from, y2.to) != x)) return false;
|
|
260
|
+
let S = findNextOccurrence(e2, x);
|
|
261
|
+
return S ? (y(e2.update({
|
|
262
|
+
selection: e2.selection.addRange(EditorSelection.range(S.from, S.to), false),
|
|
263
|
+
effects: EditorView.scrollIntoView(S.to)
|
|
264
|
+
})), true) : false;
|
|
265
|
+
}, searchConfigFacet = /* @__PURE__ */ Facet.define({ combine(e2) {
|
|
266
|
+
return combineConfig(e2, {
|
|
267
|
+
top: false,
|
|
268
|
+
caseSensitive: false,
|
|
269
|
+
literal: false,
|
|
270
|
+
regexp: false,
|
|
271
|
+
wholeWord: false,
|
|
272
|
+
createPanel: (e3) => new SearchPanel(e3),
|
|
273
|
+
scrollToMatch: (e3) => EditorView.scrollIntoView(e3)
|
|
274
|
+
});
|
|
275
|
+
} }), SearchQuery = class {
|
|
276
|
+
constructor(e2) {
|
|
277
|
+
this.search = e2.search, this.caseSensitive = !!e2.caseSensitive, this.literal = !!e2.literal, this.regexp = !!e2.regexp, this.replace = e2.replace || "", this.valid = !!this.search && (!this.regexp || validRegExp(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e2.wholeWord, this.test = e2.test;
|
|
278
|
+
}
|
|
279
|
+
unquote(e2) {
|
|
280
|
+
return this.literal ? e2 : e2.replace(/\\([nrt\\])/g, (e3, y) => y == "n" ? "\n" : y == "r" ? "\r" : y == "t" ? " " : "\\");
|
|
281
|
+
}
|
|
282
|
+
eq(e2) {
|
|
283
|
+
return this.search == e2.search && this.replace == e2.replace && this.caseSensitive == e2.caseSensitive && this.regexp == e2.regexp && this.wholeWord == e2.wholeWord && this.test == e2.test;
|
|
284
|
+
}
|
|
285
|
+
create() {
|
|
286
|
+
return this.regexp ? new RegExpQuery(this) : new StringQuery(this);
|
|
287
|
+
}
|
|
288
|
+
getCursor(e2, y = 0, b) {
|
|
289
|
+
let x = e2.doc ? e2 : EditorState.create({ doc: e2 });
|
|
290
|
+
return b ?? (b = x.doc.length), this.regexp ? regexpCursor(this, x, y, b) : stringCursor(this, x, y, b);
|
|
291
|
+
}
|
|
292
|
+
}, QueryType = class {
|
|
293
|
+
constructor(e2) {
|
|
294
|
+
this.spec = e2;
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
function wrapStringTest(e2, y, b) {
|
|
298
|
+
return (x, S, C, w) => b && !b(x, S, C, w) ? false : e2(x >= w && S <= w + C.length ? C.slice(x - w, S - w) : y.doc.sliceString(x, S), y, x, S);
|
|
299
|
+
}
|
|
300
|
+
function stringCursor(e2, y, b, x) {
|
|
301
|
+
let S;
|
|
302
|
+
return e2.wholeWord && (S = stringWordTest(y.doc, y.charCategorizer(y.selection.main.head))), e2.test && (S = wrapStringTest(e2.test, y, S)), new SearchCursor(y.doc, e2.unquoted, b, x, e2.caseSensitive ? void 0 : (e3) => e3.toLowerCase(), S);
|
|
303
|
+
}
|
|
304
|
+
function stringWordTest(e2, y) {
|
|
305
|
+
return (b, x, S, C) => ((C > b || C + S.length < x) && (C = Math.max(0, b - 2), S = e2.sliceString(C, Math.min(e2.length, x + 2))), (y(charBefore(S, b - C)) != CharCategory.Word || y(charAfter(S, b - C)) != CharCategory.Word) && (y(charAfter(S, x - C)) != CharCategory.Word || y(charBefore(S, x - C)) != CharCategory.Word));
|
|
306
|
+
}
|
|
307
|
+
var StringQuery = class extends QueryType {
|
|
308
|
+
constructor(e2) {
|
|
309
|
+
super(e2);
|
|
310
|
+
}
|
|
311
|
+
nextMatch(e2, y, b) {
|
|
312
|
+
let x = stringCursor(this.spec, e2, b, e2.doc.length).nextOverlapping();
|
|
313
|
+
if (x.done) {
|
|
314
|
+
let b2 = Math.min(e2.doc.length, y + this.spec.unquoted.length);
|
|
315
|
+
x = stringCursor(this.spec, e2, 0, b2).nextOverlapping();
|
|
316
|
+
}
|
|
317
|
+
return x.done || x.value.from == y && x.value.to == b ? null : x.value;
|
|
318
|
+
}
|
|
319
|
+
prevMatchInRange(e2, y, b) {
|
|
320
|
+
for (let x = b; ; ) {
|
|
321
|
+
let b2 = Math.max(y, x - 1e4 - this.spec.unquoted.length), S = stringCursor(this.spec, e2, b2, x), C = null;
|
|
322
|
+
for (; !S.nextOverlapping().done; ) C = S.value;
|
|
323
|
+
if (C) return C;
|
|
324
|
+
if (b2 == y) return null;
|
|
325
|
+
x -= 1e4;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
prevMatch(e2, y, b) {
|
|
329
|
+
let x = this.prevMatchInRange(e2, 0, y);
|
|
330
|
+
return x || (x = this.prevMatchInRange(e2, Math.max(0, b - this.spec.unquoted.length), e2.doc.length)), x && (x.from != y || x.to != b) ? x : null;
|
|
331
|
+
}
|
|
332
|
+
getReplacement(e2) {
|
|
333
|
+
return this.spec.unquote(this.spec.replace);
|
|
334
|
+
}
|
|
335
|
+
matchAll(e2, y) {
|
|
336
|
+
let b = stringCursor(this.spec, e2, 0, e2.doc.length), x = [];
|
|
337
|
+
for (; !b.next().done; ) {
|
|
338
|
+
if (x.length >= y) return null;
|
|
339
|
+
x.push(b.value);
|
|
340
|
+
}
|
|
341
|
+
return x;
|
|
342
|
+
}
|
|
343
|
+
highlight(e2, y, b, x) {
|
|
344
|
+
let S = stringCursor(this.spec, e2, Math.max(0, y - this.spec.unquoted.length), Math.min(b + this.spec.unquoted.length, e2.doc.length));
|
|
345
|
+
for (; !S.next().done; ) x(S.value.from, S.value.to);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
function wrapRegexpTest(e2, y, b) {
|
|
349
|
+
return (x, S, C) => (!b || b(x, S, C)) && e2(C[0], y, x, S);
|
|
350
|
+
}
|
|
351
|
+
function regexpCursor(e2, y, b, x) {
|
|
352
|
+
let S;
|
|
353
|
+
return e2.wholeWord && (S = regexpWordTest(y.charCategorizer(y.selection.main.head))), e2.test && (S = wrapRegexpTest(e2.test, y, S)), new RegExpCursor(y.doc, e2.search, {
|
|
354
|
+
ignoreCase: !e2.caseSensitive,
|
|
355
|
+
test: S
|
|
356
|
+
}, b, x);
|
|
357
|
+
}
|
|
358
|
+
function charBefore(e2, y) {
|
|
359
|
+
return e2.slice(findClusterBreak(e2, y, false), y);
|
|
360
|
+
}
|
|
361
|
+
function charAfter(e2, y) {
|
|
362
|
+
return e2.slice(y, findClusterBreak(e2, y));
|
|
363
|
+
}
|
|
364
|
+
function regexpWordTest(e2) {
|
|
365
|
+
return (y, b, x) => !x[0].length || (e2(charBefore(x.input, x.index)) != CharCategory.Word || e2(charAfter(x.input, x.index)) != CharCategory.Word) && (e2(charAfter(x.input, x.index + x[0].length)) != CharCategory.Word || e2(charBefore(x.input, x.index + x[0].length)) != CharCategory.Word);
|
|
366
|
+
}
|
|
367
|
+
var RegExpQuery = class extends QueryType {
|
|
368
|
+
nextMatch(e2, y, b) {
|
|
369
|
+
let x = regexpCursor(this.spec, e2, b, e2.doc.length).next();
|
|
370
|
+
return x.done && (x = regexpCursor(this.spec, e2, 0, y).next()), x.done ? null : x.value;
|
|
371
|
+
}
|
|
372
|
+
prevMatchInRange(e2, y, b) {
|
|
373
|
+
for (let x = 1; ; x++) {
|
|
374
|
+
let S = Math.max(y, b - x * 1e4), C = regexpCursor(this.spec, e2, S, b), w = null;
|
|
375
|
+
for (; !C.next().done; ) w = C.value;
|
|
376
|
+
if (w && (S == y || w.from > S + 10)) return w;
|
|
377
|
+
if (S == y) return null;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
prevMatch(e2, y, b) {
|
|
381
|
+
return this.prevMatchInRange(e2, 0, y) || this.prevMatchInRange(e2, b, e2.doc.length);
|
|
382
|
+
}
|
|
383
|
+
getReplacement(e2) {
|
|
384
|
+
return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (y, b) => {
|
|
385
|
+
if (b == "&") return e2.match[0];
|
|
386
|
+
if (b == "$") return "$";
|
|
387
|
+
for (let y2 = b.length; y2 > 0; y2--) {
|
|
388
|
+
let x = +b.slice(0, y2);
|
|
389
|
+
if (x > 0 && x < e2.match.length) return e2.match[x] + b.slice(y2);
|
|
390
|
+
}
|
|
391
|
+
return y;
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
matchAll(e2, y) {
|
|
395
|
+
let b = regexpCursor(this.spec, e2, 0, e2.doc.length), x = [];
|
|
396
|
+
for (; !b.next().done; ) {
|
|
397
|
+
if (x.length >= y) return null;
|
|
398
|
+
x.push(b.value);
|
|
399
|
+
}
|
|
400
|
+
return x;
|
|
401
|
+
}
|
|
402
|
+
highlight(e2, y, b, x) {
|
|
403
|
+
let S = regexpCursor(this.spec, e2, Math.max(0, y - 250), Math.min(b + 250, e2.doc.length));
|
|
404
|
+
for (; !S.next().done; ) x(S.value.from, S.value.to);
|
|
405
|
+
}
|
|
406
|
+
}, setSearchQuery = /* @__PURE__ */ StateEffect.define(), togglePanel = /* @__PURE__ */ StateEffect.define(), searchState = /* @__PURE__ */ StateField.define({
|
|
407
|
+
create(e2) {
|
|
408
|
+
return new SearchState(defaultQuery(e2).create(), null);
|
|
409
|
+
},
|
|
410
|
+
update(e2, y) {
|
|
411
|
+
for (let b of y.effects) b.is(setSearchQuery) ? e2 = new SearchState(b.value.create(), e2.panel) : b.is(togglePanel) && (e2 = new SearchState(e2.query, b.value ? createSearchPanel : null));
|
|
412
|
+
return e2;
|
|
413
|
+
},
|
|
414
|
+
provide: (e2) => showPanel.from(e2, (e3) => e3.panel)
|
|
415
|
+
}), SearchState = class {
|
|
416
|
+
constructor(e2, y) {
|
|
417
|
+
this.query = e2, this.panel = y;
|
|
418
|
+
}
|
|
419
|
+
}, matchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch" }), selectedMatchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), searchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
420
|
+
constructor(e2) {
|
|
421
|
+
this.view = e2, this.decorations = this.highlight(e2.state.field(searchState));
|
|
422
|
+
}
|
|
423
|
+
update(e2) {
|
|
424
|
+
let y = e2.state.field(searchState);
|
|
425
|
+
(y != e2.startState.field(searchState) || e2.docChanged || e2.selectionSet || e2.viewportChanged) && (this.decorations = this.highlight(y));
|
|
426
|
+
}
|
|
427
|
+
highlight({ query: e2, panel: y }) {
|
|
428
|
+
if (!y || !e2.spec.valid) return Decoration.none;
|
|
429
|
+
let { view: b } = this, x = new RangeSetBuilder();
|
|
430
|
+
for (let y2 = 0, S = b.visibleRanges, C = S.length; y2 < C; y2++) {
|
|
431
|
+
let { from: w, to: T } = S[y2];
|
|
432
|
+
for (; y2 < C - 1 && T > S[y2 + 1].from - 500; ) T = S[++y2].to;
|
|
433
|
+
e2.highlight(b.state, w, T, (e3, y3) => {
|
|
434
|
+
let S2 = b.state.selection.ranges.some((b2) => b2.from == e3 && b2.to == y3);
|
|
435
|
+
x.add(e3, y3, S2 ? selectedMatchMark : matchMark);
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
return x.finish();
|
|
439
|
+
}
|
|
440
|
+
}, { decorations: (e2) => e2.decorations });
|
|
441
|
+
function searchCommand(e2) {
|
|
442
|
+
return (y) => {
|
|
443
|
+
let b = y.state.field(searchState, false);
|
|
444
|
+
return b && b.query.spec.valid ? e2(y, b) : openSearchPanel(y);
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
var findNext = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
|
|
448
|
+
let { to: b } = e2.state.selection.main, x = y.nextMatch(e2.state, b, b);
|
|
449
|
+
if (!x) return false;
|
|
450
|
+
let S = EditorSelection.single(x.from, x.to), C = e2.state.facet(searchConfigFacet);
|
|
451
|
+
return e2.dispatch({
|
|
452
|
+
selection: S,
|
|
453
|
+
effects: [announceMatch(e2, x), C.scrollToMatch(S.main, e2)],
|
|
454
|
+
userEvent: "select.search"
|
|
455
|
+
}), selectSearchInput(e2), true;
|
|
456
|
+
}), findPrevious = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
|
|
457
|
+
let { state: b } = e2, { from: x } = b.selection.main, S = y.prevMatch(b, x, x);
|
|
458
|
+
if (!S) return false;
|
|
459
|
+
let C = EditorSelection.single(S.from, S.to), w = e2.state.facet(searchConfigFacet);
|
|
460
|
+
return e2.dispatch({
|
|
461
|
+
selection: C,
|
|
462
|
+
effects: [announceMatch(e2, S), w.scrollToMatch(C.main, e2)],
|
|
463
|
+
userEvent: "select.search"
|
|
464
|
+
}), selectSearchInput(e2), true;
|
|
465
|
+
}), selectMatches = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
|
|
466
|
+
let b = y.matchAll(e2.state, 1e3);
|
|
467
|
+
return !b || !b.length ? false : (e2.dispatch({
|
|
468
|
+
selection: EditorSelection.create(b.map((e3) => EditorSelection.range(e3.from, e3.to))),
|
|
469
|
+
userEvent: "select.search.matches"
|
|
470
|
+
}), true);
|
|
471
|
+
}), selectSelectionMatches = ({ state: e2, dispatch: y }) => {
|
|
472
|
+
let b = e2.selection;
|
|
473
|
+
if (b.ranges.length > 1 || b.main.empty) return false;
|
|
474
|
+
let { from: x, to: S } = b.main, C = [], w = 0;
|
|
475
|
+
for (let y2 = new SearchCursor(e2.doc, e2.sliceDoc(x, S)); !y2.next().done; ) {
|
|
476
|
+
if (C.length > 1e3) return false;
|
|
477
|
+
y2.value.from == x && (w = C.length), C.push(EditorSelection.range(y2.value.from, y2.value.to));
|
|
478
|
+
}
|
|
479
|
+
return y(e2.update({
|
|
480
|
+
selection: EditorSelection.create(C, w),
|
|
481
|
+
userEvent: "select.search.matches"
|
|
482
|
+
})), true;
|
|
483
|
+
}, replaceNext = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
|
|
484
|
+
let { state: b } = e2, { from: x, to: S } = b.selection.main;
|
|
485
|
+
if (b.readOnly) return false;
|
|
486
|
+
let C = y.nextMatch(b, x, x);
|
|
487
|
+
if (!C) return false;
|
|
488
|
+
let w = C, T = [], E, D, O = [];
|
|
489
|
+
w.from == x && w.to == S && (D = b.toText(y.getReplacement(w)), T.push({
|
|
490
|
+
from: w.from,
|
|
491
|
+
to: w.to,
|
|
492
|
+
insert: D
|
|
493
|
+
}), w = y.nextMatch(b, w.from, w.to), O.push(EditorView.announce.of(b.phrase("replaced match on line $", b.doc.lineAt(x).number) + ".")));
|
|
494
|
+
let k = e2.state.changes(T);
|
|
495
|
+
return w && (E = EditorSelection.single(w.from, w.to).map(k), O.push(announceMatch(e2, w)), O.push(b.facet(searchConfigFacet).scrollToMatch(E.main, e2))), e2.dispatch({
|
|
496
|
+
changes: k,
|
|
497
|
+
selection: E,
|
|
498
|
+
effects: O,
|
|
499
|
+
userEvent: "input.replace"
|
|
500
|
+
}), true;
|
|
501
|
+
}), replaceAll = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
|
|
502
|
+
if (e2.state.readOnly) return false;
|
|
503
|
+
let b = y.matchAll(e2.state, 1e9).map((e3) => {
|
|
504
|
+
let { from: b2, to: x2 } = e3;
|
|
505
|
+
return {
|
|
506
|
+
from: b2,
|
|
507
|
+
to: x2,
|
|
508
|
+
insert: y.getReplacement(e3)
|
|
509
|
+
};
|
|
510
|
+
});
|
|
511
|
+
if (!b.length) return false;
|
|
512
|
+
let x = e2.state.phrase("replaced $ matches", b.length) + ".";
|
|
513
|
+
return e2.dispatch({
|
|
514
|
+
changes: b,
|
|
515
|
+
effects: EditorView.announce.of(x),
|
|
516
|
+
userEvent: "input.replace.all"
|
|
517
|
+
}), true;
|
|
518
|
+
});
|
|
519
|
+
function createSearchPanel(e2) {
|
|
520
|
+
return e2.state.facet(searchConfigFacet).createPanel(e2);
|
|
521
|
+
}
|
|
522
|
+
function defaultQuery(e2, y) {
|
|
523
|
+
let b = e2.selection.main, x = b.empty || b.to > b.from + 100 ? "" : e2.sliceDoc(b.from, b.to);
|
|
524
|
+
if (y && !x) return y;
|
|
525
|
+
let S = e2.facet(searchConfigFacet);
|
|
526
|
+
return new SearchQuery({
|
|
527
|
+
search: (y == null ? void 0 : y.literal) ?? S.literal ? x : x.replace(/\n/g, "\\n"),
|
|
528
|
+
caseSensitive: (y == null ? void 0 : y.caseSensitive) ?? S.caseSensitive,
|
|
529
|
+
literal: (y == null ? void 0 : y.literal) ?? S.literal,
|
|
530
|
+
regexp: (y == null ? void 0 : y.regexp) ?? S.regexp,
|
|
531
|
+
wholeWord: (y == null ? void 0 : y.wholeWord) ?? S.wholeWord
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
function getSearchInput(e2) {
|
|
535
|
+
let y = getPanel(e2, createSearchPanel);
|
|
536
|
+
return y && y.dom.querySelector("[main-field]");
|
|
537
|
+
}
|
|
538
|
+
function selectSearchInput(e2) {
|
|
539
|
+
let y = getSearchInput(e2);
|
|
540
|
+
y && y == e2.root.activeElement && y.select();
|
|
541
|
+
}
|
|
542
|
+
var openSearchPanel = (e2) => {
|
|
543
|
+
let y = e2.state.field(searchState, false);
|
|
544
|
+
if (y && y.panel) {
|
|
545
|
+
let b = getSearchInput(e2);
|
|
546
|
+
if (b && b != e2.root.activeElement) {
|
|
547
|
+
let x = defaultQuery(e2.state, y.query.spec);
|
|
548
|
+
x.valid && e2.dispatch({ effects: setSearchQuery.of(x) }), b.focus(), b.select();
|
|
549
|
+
}
|
|
550
|
+
} else e2.dispatch({ effects: [togglePanel.of(true), y ? setSearchQuery.of(defaultQuery(e2.state, y.query.spec)) : StateEffect.appendConfig.of(searchExtensions)] });
|
|
551
|
+
return true;
|
|
552
|
+
}, closeSearchPanel = (e2) => {
|
|
553
|
+
let y = e2.state.field(searchState, false);
|
|
554
|
+
if (!y || !y.panel) return false;
|
|
555
|
+
let b = getPanel(e2, createSearchPanel);
|
|
556
|
+
return b && b.dom.contains(e2.root.activeElement) && e2.focus(), e2.dispatch({ effects: togglePanel.of(false) }), true;
|
|
557
|
+
}, searchKeymap = [
|
|
558
|
+
{
|
|
559
|
+
key: "Mod-f",
|
|
560
|
+
run: openSearchPanel,
|
|
561
|
+
scope: "editor search-panel"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
key: "F3",
|
|
565
|
+
run: findNext,
|
|
566
|
+
shift: findPrevious,
|
|
567
|
+
scope: "editor search-panel",
|
|
568
|
+
preventDefault: true
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
key: "Mod-g",
|
|
572
|
+
run: findNext,
|
|
573
|
+
shift: findPrevious,
|
|
574
|
+
scope: "editor search-panel",
|
|
575
|
+
preventDefault: true
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
key: "Escape",
|
|
579
|
+
run: closeSearchPanel,
|
|
580
|
+
scope: "editor search-panel"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
key: "Mod-Shift-l",
|
|
584
|
+
run: selectSelectionMatches
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
key: "Mod-Alt-g",
|
|
588
|
+
run: gotoLine
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
key: "Mod-d",
|
|
592
|
+
run: selectNextOccurrence,
|
|
593
|
+
preventDefault: true
|
|
594
|
+
}
|
|
595
|
+
], SearchPanel = class {
|
|
596
|
+
constructor(e2) {
|
|
597
|
+
this.view = e2;
|
|
598
|
+
let y = this.query = e2.state.field(searchState).query.spec;
|
|
599
|
+
this.commit = this.commit.bind(this), this.searchField = crelt("input", {
|
|
600
|
+
value: y.search,
|
|
601
|
+
placeholder: phrase(e2, "Find"),
|
|
602
|
+
"aria-label": phrase(e2, "Find"),
|
|
603
|
+
class: "cm-textfield",
|
|
604
|
+
name: "search",
|
|
605
|
+
form: "",
|
|
606
|
+
"main-field": "true",
|
|
607
|
+
onchange: this.commit,
|
|
608
|
+
onkeyup: this.commit
|
|
609
|
+
}), this.replaceField = crelt("input", {
|
|
610
|
+
value: y.replace,
|
|
611
|
+
placeholder: phrase(e2, "Replace"),
|
|
612
|
+
"aria-label": phrase(e2, "Replace"),
|
|
613
|
+
class: "cm-textfield",
|
|
614
|
+
name: "replace",
|
|
615
|
+
form: "",
|
|
616
|
+
onchange: this.commit,
|
|
617
|
+
onkeyup: this.commit
|
|
618
|
+
}), this.caseField = crelt("input", {
|
|
619
|
+
type: "checkbox",
|
|
620
|
+
name: "case",
|
|
621
|
+
form: "",
|
|
622
|
+
checked: y.caseSensitive,
|
|
623
|
+
onchange: this.commit
|
|
624
|
+
}), this.reField = crelt("input", {
|
|
625
|
+
type: "checkbox",
|
|
626
|
+
name: "re",
|
|
627
|
+
form: "",
|
|
628
|
+
checked: y.regexp,
|
|
629
|
+
onchange: this.commit
|
|
630
|
+
}), this.wordField = crelt("input", {
|
|
631
|
+
type: "checkbox",
|
|
632
|
+
name: "word",
|
|
633
|
+
form: "",
|
|
634
|
+
checked: y.wholeWord,
|
|
635
|
+
onchange: this.commit
|
|
636
|
+
});
|
|
637
|
+
function b(e3, y2, b2) {
|
|
638
|
+
return crelt("button", {
|
|
639
|
+
class: "cm-button",
|
|
640
|
+
name: e3,
|
|
641
|
+
onclick: y2,
|
|
642
|
+
type: "button"
|
|
643
|
+
}, b2);
|
|
644
|
+
}
|
|
645
|
+
this.dom = crelt("div", {
|
|
646
|
+
onkeydown: (e3) => this.keydown(e3),
|
|
647
|
+
class: "cm-search"
|
|
648
|
+
}, [
|
|
649
|
+
this.searchField,
|
|
650
|
+
b("next", () => findNext(e2), [phrase(e2, "next")]),
|
|
651
|
+
b("prev", () => findPrevious(e2), [phrase(e2, "previous")]),
|
|
652
|
+
b("select", () => selectMatches(e2), [phrase(e2, "all")]),
|
|
653
|
+
crelt("label", null, [this.caseField, phrase(e2, "match case")]),
|
|
654
|
+
crelt("label", null, [this.reField, phrase(e2, "regexp")]),
|
|
655
|
+
crelt("label", null, [this.wordField, phrase(e2, "by word")]),
|
|
656
|
+
...e2.state.readOnly ? [] : [
|
|
657
|
+
crelt("br"),
|
|
658
|
+
this.replaceField,
|
|
659
|
+
b("replace", () => replaceNext(e2), [phrase(e2, "replace")]),
|
|
660
|
+
b("replaceAll", () => replaceAll(e2), [phrase(e2, "replace all")])
|
|
661
|
+
],
|
|
662
|
+
crelt("button", {
|
|
663
|
+
name: "close",
|
|
664
|
+
onclick: () => closeSearchPanel(e2),
|
|
665
|
+
"aria-label": phrase(e2, "close"),
|
|
666
|
+
type: "button"
|
|
667
|
+
}, ["\xD7"])
|
|
668
|
+
]);
|
|
669
|
+
}
|
|
670
|
+
commit() {
|
|
671
|
+
let e2 = new SearchQuery({
|
|
672
|
+
search: this.searchField.value,
|
|
673
|
+
caseSensitive: this.caseField.checked,
|
|
674
|
+
regexp: this.reField.checked,
|
|
675
|
+
wholeWord: this.wordField.checked,
|
|
676
|
+
replace: this.replaceField.value
|
|
677
|
+
});
|
|
678
|
+
e2.eq(this.query) || (this.query = e2, this.view.dispatch({ effects: setSearchQuery.of(e2) }));
|
|
679
|
+
}
|
|
680
|
+
keydown(e2) {
|
|
681
|
+
runScopeHandlers(this.view, e2, "search-panel") ? e2.preventDefault() : e2.keyCode == 13 && e2.target == this.searchField ? (e2.preventDefault(), (e2.shiftKey ? findPrevious : findNext)(this.view)) : e2.keyCode == 13 && e2.target == this.replaceField && (e2.preventDefault(), replaceNext(this.view));
|
|
682
|
+
}
|
|
683
|
+
update(e2) {
|
|
684
|
+
for (let y of e2.transactions) for (let e3 of y.effects) e3.is(setSearchQuery) && !e3.value.eq(this.query) && this.setQuery(e3.value);
|
|
685
|
+
}
|
|
686
|
+
setQuery(e2) {
|
|
687
|
+
this.query = e2, this.searchField.value = e2.search, this.replaceField.value = e2.replace, this.caseField.checked = e2.caseSensitive, this.reField.checked = e2.regexp, this.wordField.checked = e2.wholeWord;
|
|
688
|
+
}
|
|
689
|
+
mount() {
|
|
690
|
+
this.searchField.select();
|
|
691
|
+
}
|
|
692
|
+
get pos() {
|
|
693
|
+
return 80;
|
|
694
|
+
}
|
|
695
|
+
get top() {
|
|
696
|
+
return this.view.state.facet(searchConfigFacet).top;
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
function phrase(e2, y) {
|
|
700
|
+
return e2.state.phrase(y);
|
|
701
|
+
}
|
|
702
|
+
var AnnounceMargin = 30, Break = /[\s\.,:;?!]/;
|
|
703
|
+
function announceMatch(e2, { from: y, to: b }) {
|
|
704
|
+
let x = e2.state.doc.lineAt(y), S = e2.state.doc.lineAt(b).to, C = Math.max(x.from, y - AnnounceMargin), w = Math.min(S, b + AnnounceMargin), T = e2.state.sliceDoc(C, w);
|
|
705
|
+
if (C != x.from) {
|
|
706
|
+
for (let e3 = 0; e3 < AnnounceMargin; e3++) if (!Break.test(T[e3 + 1]) && Break.test(T[e3])) {
|
|
707
|
+
T = T.slice(e3);
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
if (w != S) {
|
|
712
|
+
for (let e3 = T.length - 1; e3 > T.length - AnnounceMargin; e3--) if (!Break.test(T[e3 - 1]) && Break.test(T[e3])) {
|
|
713
|
+
T = T.slice(0, e3);
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return EditorView.announce.of(`${e2.state.phrase("current match")}. ${T} ${e2.state.phrase("on line")} ${x.number}.`);
|
|
718
|
+
}
|
|
719
|
+
var baseTheme = /* @__PURE__ */ EditorView.baseTheme({
|
|
720
|
+
".cm-panel.cm-search": {
|
|
721
|
+
padding: "2px 6px 4px",
|
|
722
|
+
position: "relative",
|
|
723
|
+
"& [name=close]": {
|
|
724
|
+
position: "absolute",
|
|
725
|
+
top: "0",
|
|
726
|
+
right: "4px",
|
|
727
|
+
backgroundColor: "inherit",
|
|
728
|
+
border: "none",
|
|
729
|
+
font: "inherit",
|
|
730
|
+
padding: 0,
|
|
731
|
+
margin: 0
|
|
732
|
+
},
|
|
733
|
+
"& input, & button, & label": { margin: ".2em .6em .2em 0" },
|
|
734
|
+
"& input[type=checkbox]": { marginRight: ".2em" },
|
|
735
|
+
"& label": {
|
|
736
|
+
fontSize: "80%",
|
|
737
|
+
whiteSpace: "pre"
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
|
|
741
|
+
"&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
|
|
742
|
+
"&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
|
|
743
|
+
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
|
744
|
+
}), searchExtensions = [
|
|
745
|
+
searchState,
|
|
746
|
+
/* @__PURE__ */ Prec.low(searchHighlighter),
|
|
747
|
+
baseTheme
|
|
748
|
+
];
|
|
749
|
+
function _objectWithoutPropertiesLoose(e2, y) {
|
|
750
|
+
if (e2 == null) return {};
|
|
751
|
+
var b = {};
|
|
752
|
+
for (var x in e2) if ({}.hasOwnProperty.call(e2, x)) {
|
|
753
|
+
if (y.indexOf(x) !== -1) continue;
|
|
754
|
+
b[x] = e2[x];
|
|
755
|
+
}
|
|
756
|
+
return b;
|
|
757
|
+
}
|
|
758
|
+
var basicSetup = function(e2) {
|
|
759
|
+
e2 === void 0 && (e2 = {});
|
|
760
|
+
var { crosshairCursor: y = false } = e2, b = [];
|
|
761
|
+
e2.closeBracketsKeymap !== false && (b = b.concat(closeBracketsKeymap)), e2.defaultKeymap !== false && (b = b.concat(defaultKeymap)), e2.searchKeymap !== false && (b = b.concat(searchKeymap)), e2.historyKeymap !== false && (b = b.concat(historyKeymap)), e2.foldKeymap !== false && (b = b.concat(foldKeymap)), e2.completionKeymap !== false && (b = b.concat(completionKeymap)), e2.lintKeymap !== false && (b = b.concat(lintKeymap));
|
|
762
|
+
var T = [];
|
|
763
|
+
return e2.lineNumbers !== false && T.push(lineNumbers()), e2.highlightActiveLineGutter !== false && T.push(highlightActiveLineGutter()), e2.highlightSpecialChars !== false && T.push(highlightSpecialChars()), e2.history !== false && T.push(history()), e2.foldGutter !== false && T.push(foldGutter()), e2.drawSelection !== false && T.push(drawSelection()), e2.dropCursor !== false && T.push(dropCursor()), e2.allowMultipleSelections !== false && T.push(EditorState.allowMultipleSelections.of(true)), e2.indentOnInput !== false && T.push(indentOnInput()), e2.syntaxHighlighting !== false && T.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true })), e2.bracketMatching !== false && T.push(bracketMatching()), e2.closeBrackets !== false && T.push(closeBrackets()), e2.autocompletion !== false && T.push(autocompletion()), e2.rectangularSelection !== false && T.push(rectangularSelection()), y !== false && T.push(crosshairCursor()), e2.highlightActiveLine !== false && T.push(highlightActiveLine()), e2.highlightSelectionMatches !== false && T.push(highlightSelectionMatches()), e2.tabSize && typeof e2.tabSize == "number" && T.push(indentUnit.of(" ".repeat(e2.tabSize))), T.concat([keymap.of(b.flat())]).filter(Boolean);
|
|
764
|
+
}, minimalSetup = function(e2) {
|
|
765
|
+
e2 === void 0 && (e2 = {});
|
|
766
|
+
var y = [];
|
|
767
|
+
e2.defaultKeymap !== false && (y = y.concat(defaultKeymap)), e2.historyKeymap !== false && (y = y.concat(historyKeymap));
|
|
768
|
+
var b = [];
|
|
769
|
+
return e2.highlightSpecialChars !== false && b.push(highlightSpecialChars()), e2.history !== false && b.push(history()), e2.drawSelection !== false && b.push(drawSelection()), e2.syntaxHighlighting !== false && b.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true })), b.concat([keymap.of(y.flat())]).filter(Boolean);
|
|
770
|
+
}, chalky = "#e5c07b", coral = "#e06c75", cyan = "#56b6c2", invalid = "#ffffff", ivory = "#abb2bf", stone = "#7d8799", malibu = "#61afef", sage = "#98c379", whiskey = "#d19a66", violet = "#c678dd", darkBackground = "#21252b", highlightBackground = "#2c313a", background = "#282c34", tooltipBackground = "#353a42", selection = "#3E4451", cursor = "#528bff", oneDark = [/* @__PURE__ */ EditorView.theme({
|
|
771
|
+
"&": {
|
|
772
|
+
color: ivory,
|
|
773
|
+
backgroundColor: background
|
|
774
|
+
},
|
|
775
|
+
".cm-content": { caretColor: cursor },
|
|
776
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: cursor },
|
|
777
|
+
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: selection },
|
|
778
|
+
".cm-panels": {
|
|
779
|
+
backgroundColor: darkBackground,
|
|
780
|
+
color: ivory
|
|
781
|
+
},
|
|
782
|
+
".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
|
|
783
|
+
".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
|
|
784
|
+
".cm-searchMatch": {
|
|
785
|
+
backgroundColor: "#72a1ff59",
|
|
786
|
+
outline: "1px solid #457dff"
|
|
787
|
+
},
|
|
788
|
+
".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: "#6199ff2f" },
|
|
789
|
+
".cm-activeLine": { backgroundColor: "#6699ff0b" },
|
|
790
|
+
".cm-selectionMatch": { backgroundColor: "#aafe661a" },
|
|
791
|
+
"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bad0f847" },
|
|
792
|
+
".cm-gutters": {
|
|
793
|
+
backgroundColor: background,
|
|
794
|
+
color: stone,
|
|
795
|
+
border: "none"
|
|
796
|
+
},
|
|
797
|
+
".cm-activeLineGutter": { backgroundColor: highlightBackground },
|
|
798
|
+
".cm-foldPlaceholder": {
|
|
799
|
+
backgroundColor: "transparent",
|
|
800
|
+
border: "none",
|
|
801
|
+
color: "#ddd"
|
|
802
|
+
},
|
|
803
|
+
".cm-tooltip": {
|
|
804
|
+
border: "none",
|
|
805
|
+
backgroundColor: tooltipBackground
|
|
806
|
+
},
|
|
807
|
+
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
808
|
+
borderTopColor: "transparent",
|
|
809
|
+
borderBottomColor: "transparent"
|
|
810
|
+
},
|
|
811
|
+
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
812
|
+
borderTopColor: tooltipBackground,
|
|
813
|
+
borderBottomColor: tooltipBackground
|
|
814
|
+
},
|
|
815
|
+
".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": {
|
|
816
|
+
backgroundColor: highlightBackground,
|
|
817
|
+
color: ivory
|
|
818
|
+
} }
|
|
819
|
+
}, { dark: true }), /* @__PURE__ */ syntaxHighlighting(/* @__PURE__ */ HighlightStyle.define([
|
|
820
|
+
{
|
|
821
|
+
tag: tags.keyword,
|
|
822
|
+
color: violet
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
tag: [
|
|
826
|
+
tags.name,
|
|
827
|
+
tags.deleted,
|
|
828
|
+
tags.character,
|
|
829
|
+
tags.propertyName,
|
|
830
|
+
tags.macroName
|
|
831
|
+
],
|
|
832
|
+
color: coral
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
tag: [/* @__PURE__ */ tags.function(tags.variableName), tags.labelName],
|
|
836
|
+
color: malibu
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
tag: [
|
|
840
|
+
tags.color,
|
|
841
|
+
/* @__PURE__ */ tags.constant(tags.name),
|
|
842
|
+
/* @__PURE__ */ tags.standard(tags.name)
|
|
843
|
+
],
|
|
844
|
+
color: whiskey
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
tag: [/* @__PURE__ */ tags.definition(tags.name), tags.separator],
|
|
848
|
+
color: ivory
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
tag: [
|
|
852
|
+
tags.typeName,
|
|
853
|
+
tags.className,
|
|
854
|
+
tags.number,
|
|
855
|
+
tags.changed,
|
|
856
|
+
tags.annotation,
|
|
857
|
+
tags.modifier,
|
|
858
|
+
tags.self,
|
|
859
|
+
tags.namespace
|
|
860
|
+
],
|
|
861
|
+
color: chalky
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
tag: [
|
|
865
|
+
tags.operator,
|
|
866
|
+
tags.operatorKeyword,
|
|
867
|
+
tags.url,
|
|
868
|
+
tags.escape,
|
|
869
|
+
tags.regexp,
|
|
870
|
+
tags.link,
|
|
871
|
+
/* @__PURE__ */ tags.special(tags.string)
|
|
872
|
+
],
|
|
873
|
+
color: cyan
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
tag: [tags.meta, tags.comment],
|
|
877
|
+
color: stone
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
tag: tags.strong,
|
|
881
|
+
fontWeight: "bold"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
tag: tags.emphasis,
|
|
885
|
+
fontStyle: "italic"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
tag: tags.strikethrough,
|
|
889
|
+
textDecoration: "line-through"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
tag: tags.link,
|
|
893
|
+
color: stone,
|
|
894
|
+
textDecoration: "underline"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
tag: tags.heading,
|
|
898
|
+
fontWeight: "bold",
|
|
899
|
+
color: coral
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
tag: [
|
|
903
|
+
tags.atom,
|
|
904
|
+
tags.bool,
|
|
905
|
+
/* @__PURE__ */ tags.special(tags.variableName)
|
|
906
|
+
],
|
|
907
|
+
color: whiskey
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
tag: [
|
|
911
|
+
tags.processingInstruction,
|
|
912
|
+
tags.string,
|
|
913
|
+
tags.inserted
|
|
914
|
+
],
|
|
915
|
+
color: sage
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
tag: tags.invalid,
|
|
919
|
+
color: invalid
|
|
920
|
+
}
|
|
921
|
+
]))], defaultLightThemeOption = EditorView.theme({ "&": { backgroundColor: "#fff" } }, { dark: false }), getDefaultExtensions = function(e2) {
|
|
922
|
+
e2 === void 0 && (e2 = {});
|
|
923
|
+
var { indentWithTab: y = true, editable: b = true, readOnly: x = false, theme: S = "light", placeholder: C = "", basicSetup: w = true } = e2, T = [];
|
|
924
|
+
switch (y && T.unshift(keymap.of([indentWithTab])), w && (typeof w == "boolean" ? T.unshift(basicSetup()) : T.unshift(basicSetup(w))), C && T.unshift(placeholder(C)), S) {
|
|
925
|
+
case "light":
|
|
926
|
+
T.push(defaultLightThemeOption);
|
|
927
|
+
break;
|
|
928
|
+
case "dark":
|
|
929
|
+
T.push(oneDark);
|
|
930
|
+
break;
|
|
931
|
+
case "none":
|
|
932
|
+
break;
|
|
933
|
+
default:
|
|
934
|
+
T.push(S);
|
|
935
|
+
break;
|
|
936
|
+
}
|
|
937
|
+
return b === false && T.push(EditorView.editable.of(false)), x && T.push(EditorState.readOnly.of(true)), [...T];
|
|
938
|
+
}, getStatistics = (e2) => ({
|
|
939
|
+
line: e2.state.doc.lineAt(e2.state.selection.main.from),
|
|
940
|
+
lineCount: e2.state.doc.lines,
|
|
941
|
+
lineBreak: e2.state.lineBreak,
|
|
942
|
+
length: e2.state.doc.length,
|
|
943
|
+
readOnly: e2.state.readOnly,
|
|
944
|
+
tabSize: e2.state.tabSize,
|
|
945
|
+
selection: e2.state.selection,
|
|
946
|
+
selectionAsSingle: e2.state.selection.asSingle().main,
|
|
947
|
+
ranges: e2.state.selection.ranges,
|
|
948
|
+
selectionCode: e2.state.sliceDoc(e2.state.selection.main.from, e2.state.selection.main.to),
|
|
949
|
+
selections: e2.state.selection.ranges.map((y) => e2.state.sliceDoc(y.from, y.to)),
|
|
950
|
+
selectedText: e2.state.selection.ranges.some((e3) => !e3.empty)
|
|
951
|
+
}), TimeoutLatch = class {
|
|
952
|
+
constructor(e2, y) {
|
|
953
|
+
this.timeLeftMS = void 0, this.timeoutMS = void 0, this.isCancelled = false, this.isTimeExhausted = false, this.callbacks = [], this.timeLeftMS = y, this.timeoutMS = y, this.callbacks.push(e2);
|
|
954
|
+
}
|
|
955
|
+
tick() {
|
|
956
|
+
if (!this.isCancelled && !this.isTimeExhausted && (this.timeLeftMS--, this.timeLeftMS <= 0)) {
|
|
957
|
+
this.isTimeExhausted = true;
|
|
958
|
+
var e2 = this.callbacks.slice();
|
|
959
|
+
this.callbacks.length = 0, e2.forEach((e3) => {
|
|
960
|
+
try {
|
|
961
|
+
e3();
|
|
962
|
+
} catch (e4) {
|
|
963
|
+
console.error("TimeoutLatch callback error:", e4);
|
|
964
|
+
}
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
cancel() {
|
|
969
|
+
this.isCancelled = true, this.callbacks.length = 0;
|
|
970
|
+
}
|
|
971
|
+
reset() {
|
|
972
|
+
this.timeLeftMS = this.timeoutMS, this.isCancelled = false, this.isTimeExhausted = false;
|
|
973
|
+
}
|
|
974
|
+
get isDone() {
|
|
975
|
+
return this.isCancelled || this.isTimeExhausted;
|
|
976
|
+
}
|
|
977
|
+
}, Scheduler = class {
|
|
978
|
+
constructor() {
|
|
979
|
+
this.interval = null, this.latches = /* @__PURE__ */ new Set();
|
|
980
|
+
}
|
|
981
|
+
add(e2) {
|
|
982
|
+
this.latches.add(e2), this.start();
|
|
983
|
+
}
|
|
984
|
+
remove(e2) {
|
|
985
|
+
this.latches.delete(e2), this.latches.size === 0 && this.stop();
|
|
986
|
+
}
|
|
987
|
+
start() {
|
|
988
|
+
this.interval === null && (this.interval = setInterval(() => {
|
|
989
|
+
this.latches.forEach((e2) => {
|
|
990
|
+
e2.tick(), e2.isDone && this.remove(e2);
|
|
991
|
+
});
|
|
992
|
+
}, 1));
|
|
993
|
+
}
|
|
994
|
+
stop() {
|
|
995
|
+
this.interval !== null && (clearInterval(this.interval), this.interval = null);
|
|
996
|
+
}
|
|
997
|
+
}, globalScheduler = null, getScheduler = () => typeof window > "u" ? new Scheduler() : (globalScheduler || (globalScheduler = new Scheduler()), globalScheduler), import_react = /* @__PURE__ */ __toESM(require_react()), ExternalChange = Annotation.define(), TYPING_TIMOUT = 200, emptyExtensions = [];
|
|
998
|
+
function useCodeMirror(e2) {
|
|
999
|
+
var { value: y, selection: b, onChange: x, onStatistics: S, onCreateEditor: C, onUpdate: w, extensions: T = emptyExtensions, autoFocus: E, theme: D = "light", height: O = null, minHeight: k = null, maxHeight: A = null, width: j = null, minWidth: N = null, maxWidth: P = null, placeholder: F = "", editable: I = true, readOnly: L = false, indentWithTab: R = true, basicSetup: B = true, root: V, initialState: H } = e2, [W, G] = (0, import_react.useState)(), [K, q] = (0, import_react.useState)(), [J, Y] = (0, import_react.useState)(), X = (0, import_react.useState)(() => ({ current: null }))[0], Z = (0, import_react.useState)(() => ({ current: null }))[0], Q = EditorView.theme({
|
|
1000
|
+
"&": {
|
|
1001
|
+
height: O,
|
|
1002
|
+
minHeight: k,
|
|
1003
|
+
maxHeight: A,
|
|
1004
|
+
width: j,
|
|
1005
|
+
minWidth: N,
|
|
1006
|
+
maxWidth: P
|
|
1007
|
+
},
|
|
1008
|
+
"& .cm-scroller": { height: "100% !important" }
|
|
1009
|
+
}), $ = [
|
|
1010
|
+
EditorView.updateListener.of((e3) => {
|
|
1011
|
+
e3.docChanged && typeof x == "function" && !e3.transactions.some((e4) => e4.annotation(ExternalChange)) && (X.current ? X.current.reset() : (X.current = new TimeoutLatch(() => {
|
|
1012
|
+
if (Z.current) {
|
|
1013
|
+
var e4 = Z.current;
|
|
1014
|
+
Z.current = null, e4();
|
|
1015
|
+
}
|
|
1016
|
+
X.current = null;
|
|
1017
|
+
}, TYPING_TIMOUT), getScheduler().add(X.current)), x(e3.state.doc.toString(), e3)), S && S(getStatistics(e3));
|
|
1018
|
+
}),
|
|
1019
|
+
Q,
|
|
1020
|
+
...getDefaultExtensions({
|
|
1021
|
+
theme: D,
|
|
1022
|
+
editable: I,
|
|
1023
|
+
readOnly: L,
|
|
1024
|
+
placeholder: F,
|
|
1025
|
+
indentWithTab: R,
|
|
1026
|
+
basicSetup: B
|
|
1027
|
+
})
|
|
1028
|
+
];
|
|
1029
|
+
return w && typeof w == "function" && $.push(EditorView.updateListener.of(w)), $ = $.concat(T), (0, import_react.useLayoutEffect)(() => {
|
|
1030
|
+
if (W && !J) {
|
|
1031
|
+
var e3 = {
|
|
1032
|
+
doc: y,
|
|
1033
|
+
selection: b,
|
|
1034
|
+
extensions: $
|
|
1035
|
+
}, x2 = H ? EditorState.fromJSON(H.json, e3, H.fields) : EditorState.create(e3);
|
|
1036
|
+
if (Y(x2), !K) {
|
|
1037
|
+
var S2 = new EditorView({
|
|
1038
|
+
state: x2,
|
|
1039
|
+
parent: W,
|
|
1040
|
+
root: V
|
|
1041
|
+
});
|
|
1042
|
+
q(S2), C && C(S2, x2);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return () => {
|
|
1046
|
+
K && (Y(void 0), q(void 0));
|
|
1047
|
+
};
|
|
1048
|
+
}, [W, J]), (0, import_react.useEffect)(() => {
|
|
1049
|
+
e2.container && G(e2.container);
|
|
1050
|
+
}, [e2.container]), (0, import_react.useEffect)(() => () => {
|
|
1051
|
+
K && (K.destroy(), q(void 0)), X.current && (X.current = (X.current.cancel(), null));
|
|
1052
|
+
}, [K]), (0, import_react.useEffect)(() => {
|
|
1053
|
+
E && K && K.focus();
|
|
1054
|
+
}, [E, K]), (0, import_react.useEffect)(() => {
|
|
1055
|
+
K && K.dispatch({ effects: StateEffect.reconfigure.of($) });
|
|
1056
|
+
}, [
|
|
1057
|
+
D,
|
|
1058
|
+
T,
|
|
1059
|
+
O,
|
|
1060
|
+
k,
|
|
1061
|
+
A,
|
|
1062
|
+
j,
|
|
1063
|
+
N,
|
|
1064
|
+
P,
|
|
1065
|
+
F,
|
|
1066
|
+
I,
|
|
1067
|
+
L,
|
|
1068
|
+
R,
|
|
1069
|
+
B,
|
|
1070
|
+
x,
|
|
1071
|
+
w
|
|
1072
|
+
]), (0, import_react.useEffect)(() => {
|
|
1073
|
+
if (y !== void 0) {
|
|
1074
|
+
var e3 = K ? K.state.doc.toString() : "";
|
|
1075
|
+
if (K && y !== e3) {
|
|
1076
|
+
var b2 = X.current && !X.current.isDone, x2 = () => {
|
|
1077
|
+
K && y !== K.state.doc.toString() && K.dispatch({
|
|
1078
|
+
changes: {
|
|
1079
|
+
from: 0,
|
|
1080
|
+
to: K.state.doc.toString().length,
|
|
1081
|
+
insert: y || ""
|
|
1082
|
+
},
|
|
1083
|
+
annotations: [ExternalChange.of(true)]
|
|
1084
|
+
});
|
|
1085
|
+
};
|
|
1086
|
+
b2 ? Z.current = x2 : x2();
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}, [y, K]), {
|
|
1090
|
+
state: J,
|
|
1091
|
+
setState: Y,
|
|
1092
|
+
view: K,
|
|
1093
|
+
setView: q,
|
|
1094
|
+
container: W,
|
|
1095
|
+
setContainer: G
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime()), _excluded = [
|
|
1099
|
+
"className",
|
|
1100
|
+
"value",
|
|
1101
|
+
"selection",
|
|
1102
|
+
"extensions",
|
|
1103
|
+
"onChange",
|
|
1104
|
+
"onStatistics",
|
|
1105
|
+
"onCreateEditor",
|
|
1106
|
+
"onUpdate",
|
|
1107
|
+
"autoFocus",
|
|
1108
|
+
"theme",
|
|
1109
|
+
"height",
|
|
1110
|
+
"minHeight",
|
|
1111
|
+
"maxHeight",
|
|
1112
|
+
"width",
|
|
1113
|
+
"minWidth",
|
|
1114
|
+
"maxWidth",
|
|
1115
|
+
"basicSetup",
|
|
1116
|
+
"placeholder",
|
|
1117
|
+
"indentWithTab",
|
|
1118
|
+
"editable",
|
|
1119
|
+
"readOnly",
|
|
1120
|
+
"root",
|
|
1121
|
+
"initialState"
|
|
1122
|
+
], ReactCodeMirror = /* @__PURE__ */ (0, import_react.forwardRef)((e2, y) => {
|
|
1123
|
+
var { className: b, value: x = "", selection: S, extensions: C = [], onChange: w, onStatistics: E, onCreateEditor: D, onUpdate: O, autoFocus: k, theme: A = "light", height: j, minHeight: M, maxHeight: N, width: P, minWidth: F, maxWidth: I, basicSetup: L, placeholder: R, indentWithTab: z, editable: B, readOnly: V, root: H, initialState: U } = e2, W = _objectWithoutPropertiesLoose(e2, _excluded), G = (0, import_react.useRef)(null), { state: K, view: q, container: J, setContainer: Y } = useCodeMirror({
|
|
1124
|
+
root: H,
|
|
1125
|
+
value: x,
|
|
1126
|
+
autoFocus: k,
|
|
1127
|
+
theme: A,
|
|
1128
|
+
height: j,
|
|
1129
|
+
minHeight: M,
|
|
1130
|
+
maxHeight: N,
|
|
1131
|
+
width: P,
|
|
1132
|
+
minWidth: F,
|
|
1133
|
+
maxWidth: I,
|
|
1134
|
+
basicSetup: L,
|
|
1135
|
+
placeholder: R,
|
|
1136
|
+
indentWithTab: z,
|
|
1137
|
+
editable: B,
|
|
1138
|
+
readOnly: V,
|
|
1139
|
+
selection: S,
|
|
1140
|
+
onChange: w,
|
|
1141
|
+
onStatistics: E,
|
|
1142
|
+
onCreateEditor: D,
|
|
1143
|
+
onUpdate: O,
|
|
1144
|
+
extensions: C,
|
|
1145
|
+
initialState: U
|
|
1146
|
+
});
|
|
1147
|
+
(0, import_react.useImperativeHandle)(y, () => ({
|
|
1148
|
+
editor: G.current,
|
|
1149
|
+
state: K,
|
|
1150
|
+
view: q
|
|
1151
|
+
}), [
|
|
1152
|
+
G,
|
|
1153
|
+
J,
|
|
1154
|
+
K,
|
|
1155
|
+
q
|
|
1156
|
+
]);
|
|
1157
|
+
var X = (0, import_react.useCallback)((e3) => {
|
|
1158
|
+
G.current = e3, Y(e3);
|
|
1159
|
+
}, [Y]);
|
|
1160
|
+
if (typeof x != "string") throw Error("value must be typeof string but got " + typeof x);
|
|
1161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _extends({
|
|
1162
|
+
ref: X,
|
|
1163
|
+
className: (typeof A == "string" ? "cm-theme-" + A : "cm-theme") + (b ? " " + b : "")
|
|
1164
|
+
}, W));
|
|
1165
|
+
});
|
|
1166
|
+
ReactCodeMirror.displayName = "CodeMirror";
|
|
1167
|
+
var esm_default = ReactCodeMirror;
|
|
1168
|
+
export {
|
|
1169
|
+
minimalSetup as n,
|
|
1170
|
+
esm_default as t
|
|
1171
|
+
};
|