@marimo-team/islands 0.23.15-dev6 → 0.23.15-dev63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-CU4fZJzG.js → ConnectedDataExplorerComponent-CJaUI-S-.js} +85 -84
- package/dist/{ErrorBoundary-DE6tzZf-.js → ErrorBoundary-DXlxsrTF.js} +3 -3
- package/dist/{ImageComparisonComponent-CHrI72em.js → ImageComparisonComponent-C3y7L3eJ.js} +173 -129
- package/dist/{any-language-editor-DN1R-1KZ.js → any-language-editor-P9tjkj4n.js} +21 -21
- package/dist/apl-e1B5LPEL.js +4 -0
- package/dist/{arc-DfkSnvZm.js → arc-CTIpFoOn.js} +2 -2
- package/dist/architecture-7HQA4BMR-DHUrQjL4.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-CT2SuxNw.js → architectureDiagram-VXUJARFQ-DXwkyAaM.js} +19 -19
- package/dist/asciiarmor-B-gwgesP.js +4 -0
- package/dist/asn1-DF2ckRB4.js +4 -0
- package/dist/assets/__vite-browser-external-CjNAy01L.js +1 -0
- package/dist/assets/worker-B3XPCb6y.js +98 -0
- package/dist/{blockDiagram-VD42YOAC-Dy7hlFla.js → blockDiagram-VD42YOAC-CIOjvxeD.js} +12 -12
- package/dist/brainfuck-4G-7_gq_.js +4 -0
- package/dist/{button-BacYv-bE.js → button-BcSml68y.js} +12 -65
- package/dist/{c4Diagram-YG6GDRKO-BXlAmZ8Z.js → c4Diagram-YG6GDRKO-B6dZC_oU.js} +6 -6
- package/dist/{capabilities-D_4LYhSU.js → capabilities-BYLFYTYv.js} +2 -2
- package/dist/{channel-D_PHgcig.js → channel-BN070S0F.js} +1 -1
- package/dist/{chat-ui-DinOvbWu.js → chat-ui-BdSDiVjk.js} +3122 -3116
- package/dist/{check-C9OoNtR4.js → check-Cs-KV5XY.js} +1 -1
- package/dist/{chunk-4BX2VUAB-CzXltWHN.js → chunk-4BX2VUAB-iU5lQTDI.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-D9nGEHV8.js → chunk-4F5CHEZ2-VlodlEGo.js} +1 -1
- package/dist/{chunk-55IACEB6-B-1mjMMC.js → chunk-55IACEB6-7h71GwyW.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-BbqSm5gU.js → chunk-5FQGJX7Z-B9WoXK1R.js} +3 -3
- package/dist/{chunk-ABZYJK2D-Dz0-H2B5.js → chunk-ABZYJK2D-BxBDji1u.js} +3 -3
- package/dist/{chunk-ATLVNIR6-o0Z5MZLd.js → chunk-ATLVNIR6-qFiszptQ.js} +2 -2
- package/dist/{chunk-B2363JML-KEJpLGGP.js → chunk-B2363JML-zL3VngtH.js} +1 -1
- package/dist/{chunk-B4BG7PRW-BL98U9B4.js → chunk-B4BG7PRW-B_z2FEHm.js} +7 -7
- package/dist/{chunk-CVBHYZKI-B_c5YBcW.js → chunk-CVBHYZKI-CwazXVlJ.js} +1 -1
- package/dist/{chunk-DI55MBZ5-Dwkn0LWm.js → chunk-DI55MBZ5-D4Y8yV8B.js} +6 -6
- package/dist/{chunk-EXTU4WIE-9sNjmQrB.js → chunk-EXTU4WIE-BQPBhApE.js} +2 -2
- package/dist/{chunk-FMBD7UC4-Ie8M9q0W.js → chunk-FMBD7UC4-quJmebXa.js} +1 -1
- package/dist/{chunk-FRFDVMJY-DzQqMWrl.js → chunk-FRFDVMJY-BHBqN-vD.js} +1 -1
- package/dist/{chunk-HN2XXSSU-E3n-Ys7Z.js → chunk-HN2XXSSU-Bv0QkeMr.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-C32Y7Epf.js → chunk-JA3XYJ7Z-CY4CRbV5.js} +3 -3
- package/dist/{chunk-JZLCHNYA-C6ftyVMN.js → chunk-JZLCHNYA-DWIR9m5O.js} +6 -6
- package/dist/{chunk-MI3HLSF2-CUYEasXO.js → chunk-MI3HLSF2-HGWI-8Pg.js} +1 -1
- package/dist/{chunk-N4CR4FBY-DUhGZhZs.js → chunk-N4CR4FBY-Bw2HcMNc.js} +7 -7
- package/dist/{chunk-PL6DKKU2-D7km-08O.js → chunk-PL6DKKU2-CAHKc95s.js} +1 -1
- package/dist/{chunk-QN33PNHL-0K6SDYn3.js → chunk-QN33PNHL-DPBNNzpR.js} +2 -2
- package/dist/{chunk-QXUST7PY-DMhsRpYK.js → chunk-QXUST7PY-DtC2t9Mk.js} +10 -10
- package/dist/{chunk-QZHKN3VN-DRjXVwuJ.js → chunk-QZHKN3VN-Dym5BS7y.js} +1 -1
- package/dist/{chunk-S3R3BYOJ-oAe3dEbO.js → chunk-S3R3BYOJ-BdgLc8AM.js} +4 -4
- package/dist/{chunk-SJTYNZTY-BkJrPRFC.js → chunk-SJTYNZTY-DnXoKWpW.js} +1 -1
- package/dist/{chunk-TCCFYFTB-D58KeXnC.js → chunk-TCCFYFTB-DPWJa9zL.js} +1 -1
- package/dist/{chunk-TQ3KTPDO-D_yA_wAb.js → chunk-TQ3KTPDO-CsDx6v37.js} +1 -1
- package/dist/{chunk-TZMSLE5B-yBKS_DQU.js → chunk-TZMSLE5B-BzSHcq-K.js} +3 -3
- package/dist/{chunk-UMXZTB3W-D7uwvNjd.js → chunk-UMXZTB3W-D1uHz8MN.js} +1 -1
- package/dist/classDiagram-2ON5EDUG-BiQPjMNY.js +30 -0
- package/dist/classDiagram-v2-WZHVMYZB-YHdR8fqM.js +30 -0
- package/dist/{clike-DTxNUn7l.js → clike-7lgyEYRk.js} +1 -1
- package/dist/clojure-CUybM11R.js +4 -0
- package/dist/cmake-BPjGcuDL.js +4 -0
- package/dist/cobol-BETk_nb6.js +4 -0
- package/dist/{code-block-37QAKDTI-O6IH6wAi.js → code-block-37QAKDTI-MSxEjskJ.js} +1 -1
- package/dist/{code-visibility-Dpab3kCj.js → code-visibility-yIEEWI5w.js} +1554 -1471
- package/dist/coffeescript-CManZxXL.js +4 -0
- package/dist/commonlisp-DWkn7GW8.js +4 -0
- package/dist/{copy-COam1EG7.js → copy-Cs3yt6Vt.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-kjoZoid4.js → cose-bilkent-S5V4N54A-BYj0aL7z.js} +2 -2
- package/dist/crystal-CCbg5EUH.js +4 -0
- package/dist/css-By8eo-XS.js +4 -0
- package/dist/cypher-DwfHg3nP.js +4 -0
- package/dist/d-Brs1wNbw.js +4 -0
- package/dist/{dagre-6UL2VRFP-J0JKgwOt.js → dagre-6UL2VRFP-DpYjBqQs.js} +11 -11
- package/dist/{data-grid-overlay-editor-C6lxUJp-.js → data-grid-overlay-editor-BWRG2b_o.js} +2 -2
- package/dist/{constants-T20xxyNf.js → debounce-BOD3DbfP.js} +1 -24
- package/dist/{diagram-PSM6KHXK-DYgJuNk9.js → diagram-PSM6KHXK-D4ftnaua.js} +22 -22
- package/dist/{diagram-QEK2KX5R-CKdBR2sb.js → diagram-QEK2KX5R-DVlUOgs1.js} +17 -17
- package/dist/{diagram-S2PKOQOG-Dpi7mo5W.js → diagram-S2PKOQOG-CGh4OMEV.js} +17 -17
- package/dist/diff-DJIRmJ1g.js +4 -0
- package/dist/{dist-DyyjKEYf.js → dist-3NCqaWjt.js} +2 -2
- package/dist/{dist-D-W5ny5a.js → dist-4lVIWUT3.js} +1 -1
- package/dist/dist-5o9uz19x.js +5 -0
- package/dist/{dist-GZXUmt0b.js → dist-B2jmQKKx.js} +2 -2
- package/dist/{dist--2Bqjvs0.js → dist-B96tMAst.js} +2 -2
- package/dist/{dist-BaoDKvdy.js → dist-BCX980mU.js} +2 -2
- package/dist/{dist-DMjWuVs8.js → dist-BIEt-mlF.js} +1 -1
- package/dist/{dist-BR_gyG9L.js → dist-BO5HRiTf.js} +2 -2
- package/dist/{dist-Dv_Y15yk.js → dist-BOMbzyb3.js} +85 -85
- package/dist/{dist-CIYBwstr.js → dist-BP39XM8u.js} +1 -1
- package/dist/{dist-DZo4nSS0.js → dist-BPF0gTRZ.js} +6 -6
- package/dist/{dist-BSAt6RhH.js → dist-BTdrwBWP.js} +22 -22
- package/dist/{dist-BY018Paw.js → dist-BdqCKQ1O.js} +2 -2
- package/dist/dist-BpDH0DEP.js +5 -0
- package/dist/dist-BpXhbQXO.js +8 -0
- package/dist/{dist-CcWX6tmx.js → dist-BpeiYpG2.js} +2 -2
- package/dist/{dist-A2846XWO.js → dist-BwhXBwMd.js} +1 -1
- package/dist/dist-ByadAk_L.js +5 -0
- package/dist/{dist-abid3KgM.js → dist-C18MUWTj.js} +2 -2
- package/dist/{dist-DZORgqKY.js → dist-C2_4pjuS.js} +1 -1
- package/dist/{dist-BzEzfugY.js → dist-CFSb_Frm.js} +1 -1
- package/dist/dist-CK0g7JvP.js +8 -0
- package/dist/{dist-C_Y3oV3C.js → dist-CRmSjkLP.js} +2 -2
- package/dist/{dist-hT4QzYX-.js → dist-CSlJrrAw.js} +86 -81
- package/dist/{dist-Du8WkPuU.js → dist-CV79CsQ0.js} +2 -2
- package/dist/dist-CfzCtiq2.js +5 -0
- package/dist/{dist-CoXAujgg.js → dist-D3bdsa1d.js} +4 -4
- package/dist/dist-D8JtVFrW.js +8 -0
- package/dist/dist-DK2Oocpu.js +6 -0
- package/dist/{dist-LTU8Hdvn.js → dist-DZwp8lro.js} +3 -3
- package/dist/{dist-t9Kf7xqC.js → dist-DaXJPX8F.js} +2 -2
- package/dist/{dist-U4F-tbMs.js → dist-De-GlSAs.js} +246 -184
- package/dist/{dist-M9Vag9Y0.js → dist-DgjbnqTg.js} +125 -125
- package/dist/dist-DnSu977r.js +5 -0
- package/dist/{dist-CxJDU6Bh.js → dist-DviUBLUp.js} +4 -4
- package/dist/{dist-CpxNdDkw.js → dist-DwqBJ014.js} +2 -2
- package/dist/{dist-Bf7SHuNp.js → dist-JGehap7K.js} +5 -5
- package/dist/{dist-Bk75fBZA.js → dist-LpLXa9Lb.js} +2 -2
- package/dist/{dist-Bf9f8MuT.js → dist-SXNmlE8A.js} +1 -1
- package/dist/dist-UmxJm6sW.js +8 -0
- package/dist/dist-aYSBQSyM.js +5 -0
- package/dist/dist-kkZ1Ztlh.js +6 -0
- package/dist/dist-ngPczwNi.js +5 -0
- package/dist/{dist-DgGbNavJ.js → dist-pqIwD8VD.js} +2 -2
- package/dist/dist-wQRyxyTV.js +5 -0
- package/dist/{dist-Dax--nl9.js → dist-w_gWE5Wf.js} +1 -1
- package/dist/{dockerfile-twL37N91.js → dockerfile-B82Pkz_V.js} +1 -1
- package/dist/dtd-Dyiazv4N.js +4 -0
- package/dist/dylan-D8Fcw7NA.js +4 -0
- package/dist/ecl-CjKp8Vii.js +4 -0
- package/dist/eiffel-K9ViOX5r.js +4 -0
- package/dist/elm-B5NVtRco.js +4 -0
- package/dist/{erDiagram-Q2GNP2WA-BU-m41EQ.js → erDiagram-Q2GNP2WA-BcKAHFqF.js} +15 -15
- package/dist/erlang-BnLzgk7R.js +4 -0
- package/dist/{error-banner-DFPfz_Qf.js → error-banner-DR7o3CbX.js} +68 -68
- package/dist/{esm-ga2Bf3O2.js → esm-DKOv6P2M.js} +424 -424
- package/dist/esm-k8PIvuZW.js +1180 -0
- package/dist/{extends-9MVIxxRo.js → extends-Cq2JYHKy.js} +36 -20
- package/dist/{factor-CajWS6mS.js → factor-Bq2mGIHt.js} +1 -1
- package/dist/factor-C7f9Jz5R.js +4 -0
- package/dist/{flowDiagram-NV44I4VS-CRoXKjGq.js → flowDiagram-NV44I4VS-BRhSg-ro.js} +17 -17
- package/dist/{formats-Dzx4J_z1.js → formats-BFhkZJwd.js} +3 -3
- package/dist/forth-rGM8jLao.js +4 -0
- package/dist/fortran-B3acSe0i.js +4 -0
- package/dist/{ganttDiagram-JELNMOA3-7mq5f9cO.js → ganttDiagram-JELNMOA3-CXXCN7LN.js} +10 -10
- package/dist/gas-Bb1Vmv_N.js +4 -0
- package/dist/gherkin-C9Lyidgd.js +4 -0
- package/dist/{gitGraph-G5XIXVHT-DiniR35k.js → gitGraph-G5XIXVHT-BjTx0kww.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-Dfuokq6w.js → gitGraphDiagram-V2S2FVAM-BOlkMSqK.js} +17 -17
- package/dist/{glide-data-editor-CjTu7ukN.js → glide-data-editor--CaN-f27.js} +13 -13
- package/dist/groovy-DQk6XcGH.js +4 -0
- package/dist/haskell-mV0Vw9gv.js +4 -0
- package/dist/haxe-DqxN89zH.js +5 -0
- package/dist/{html-to-image-_wGfk8V-.js → html-to-image-DDENewl2.js} +2649 -2607
- package/dist/idl-ya8W561J.js +4 -0
- package/dist/{info-VBDWY6EO-DVZvGhkQ.js → info-VBDWY6EO-CA67FznA.js} +3 -3
- package/dist/infoDiagram-HS3SLOUP-D3TyKnL_.js +30 -0
- package/dist/{input-DtsN7xm-.js → input-DStQIuqD.js} +51 -51
- package/dist/javascript-CgqgptVu.js +4 -0
- package/dist/{journeyDiagram-XKPGCS4Q-8XYSU1GI.js → journeyDiagram-XKPGCS4Q-DEal0aT1.js} +7 -7
- package/dist/julia-CFQ-HusI.js +4 -0
- package/dist/{kanban-definition-3W4ZIXB7--9pT9z1R.js → kanban-definition-3W4ZIXB7-Dl90wENN.js} +12 -12
- package/dist/{katex-9-9QRhxz.js → katex-C4t-BmrK.js} +1 -1
- package/dist/{label-WfTSU8L4.js → label-DIk0QoFe.js} +2 -2
- package/dist/{line-C5s_12ee.js → line-C43FIPBd.js} +3 -3
- package/dist/{linear-B5-AFRiR.js → linear-H_vsH9ao.js} +4 -4
- package/dist/livescript-D__3TmDo.js +4 -0
- package/dist/{loader-Boph2xIS.js → loader-CTHCI-qe.js} +5 -16
- package/dist/lua-Bytcgj_W.js +4 -0
- package/dist/main.js +2217 -2116
- package/dist/mathematica-DJhvVKvl.js +4 -0
- package/dist/mbox-IGHPCjfR.js +4 -0
- package/dist/{mermaid-4DMBBIKO-Eg3D4FVz.js → mermaid-4DMBBIKO-FXbOziy9.js} +1 -1
- package/dist/{mermaid-BYqXy_NE.js → mermaid-CdSvixW2.js} +47 -47
- package/dist/{mermaid-parser.core-C3XRsazI.js → mermaid-parser.core-DoivvxPd.js} +8 -8
- package/dist/{mhchem-yiCCuiEF.js → mhchem-EGhUZR1V.js} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-B-4mnfFG.js → mindmap-definition-VGOIOE7T-CCDupjWW.js} +14 -14
- package/dist/mirc-tcwvVugm.js +4 -0
- package/dist/mllike-Dx91i62r.js +6 -0
- package/dist/modelica-_SRt-yU5.js +4 -0
- package/dist/mscgen-GZrGS9gt.js +6 -0
- package/dist/mumps-Cv3ygyod.js +4 -0
- package/dist/nsis-BU7GeGbI.js +4 -0
- package/dist/{nsis-ClF3r5Tr.js → nsis-i9_sgigf.js} +1 -1
- package/dist/ntriples-CL-FCYXb.js +4 -0
- package/dist/{number-overlay-editor-BLJXvX9c.js → number-overlay-editor-Ck_mc_gT.js} +1 -1
- package/dist/objects-De59twF-.js +56 -0
- package/dist/octave-Dc6_3DIu.js +4 -0
- package/dist/{ordinal-ArJavP1Q.js → ordinal-Bkv2-veX.js} +1 -1
- package/dist/oz-DpUAJCXf.js +4 -0
- package/dist/{packet-DYOGHKS2-34raHOiB.js → packet-DYOGHKS2-Bkgofxf3.js} +3 -3
- package/dist/pascal-B17mncXs.js +4 -0
- package/dist/perl-BTpK97q9.js +4 -0
- package/dist/{pie-VRWISCQL-BaLlzZa3.js → pie-VRWISCQL-B1AMhN_7.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-Cr3cNpZY.js → pieDiagram-ADFJNKIX-JvXG_6hk.js} +22 -22
- package/dist/pig-CFb638Ap.js +4 -0
- package/dist/powershell-Cxo-_2A5.js +4 -0
- package/dist/{precisionRound-Tqb4mg-H.js → precisionRound-CnHPY_5v.js} +1 -1
- package/dist/{process-output-Mh4UrjwM.js → process-output-2QPcgBQg.js} +4 -4
- package/dist/properties-BPgT1xTB.js +4 -0
- package/dist/protobuf-BgHBaIIK.js +4 -0
- package/dist/pug-25-oS0SG.js +4 -0
- package/dist/{pug-B_rby2yb.js → pug-BhE2JRSg.js} +1 -1
- package/dist/puppet-DarIr20S.js +4 -0
- package/dist/purify.es-EnR5yhgI.js +783 -0
- package/dist/python-BqmOsBsi.js +4 -0
- package/dist/q-D3QJCTup.js +4 -0
- package/dist/{quadrantDiagram-AYHSOK5B-BuNL8Q93.js → quadrantDiagram-AYHSOK5B-BqDB9tUC.js} +5 -5
- package/dist/r-Cz_yBX4z.js +4 -0
- package/dist/{radar-ZZBFDIW7-Ci7bfoZa.js → radar-ZZBFDIW7-C2b7A32s.js} +3 -3
- package/dist/{react-vega-B0sAlDTL.js → react-vega-BazDALhI.js} +469 -469
- package/dist/{requirementDiagram-UZGBJVZJ-BG2lLUN1.js → requirementDiagram-UZGBJVZJ-KbVt8SPH.js} +14 -14
- package/dist/{reveal-component-BfYO8h-9.js → reveal-component-CCyp8KHw.js} +629 -622
- package/dist/rpm-DGOtYwAI.js +5 -0
- package/dist/ruby-DBZu4rPc.js +4 -0
- package/dist/{sankeyDiagram-TZEHDZUN-DMal8sps.js → sankeyDiagram-TZEHDZUN-DgkF38jx.js} +5 -5
- package/dist/sas-Dd1D9qTq.js +4 -0
- package/dist/scheme-BmDjvTHX.js +4 -0
- package/dist/{sequenceDiagram-WL72ISMW-DT6Tk-Eo.js → sequenceDiagram-WL72ISMW-BDmx9n95.js} +8 -8
- package/dist/shell-BL8zFSaj.js +4 -0
- package/dist/sieve-BAx2WqUP.js +4 -0
- package/dist/smalltalk-CYRzF7VV.js +4 -0
- package/dist/sparql-YWaDRO4A.js +4 -0
- package/dist/{spec-Cz-Bj1JI.js → spec-CnaxwDqy.js} +4 -4
- package/dist/{src-Bf2iLOlr.js → src-DV3ha_nA.js} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-CB_lodq3.js → stateDiagram-FKZM4ZOC-ByOvQf2n.js} +17 -17
- package/dist/stateDiagram-v2-4FDKWEC3-C3xqeavR.js +29 -0
- package/dist/{step-CWipAYTY.js → step-BqHnkgWE.js} +1 -1
- package/dist/stex-B5O-env2.js +4 -0
- package/dist/{strings-Dq_j3Rxw.js → strings-BYAhZnQi.js} +354 -354
- package/dist/style.css +1 -1
- package/dist/stylus-lYsyLFc1.js +4 -0
- package/dist/swift-ClQz9z1n.js +4 -0
- package/dist/{swiper-component-5HoSsPi1.js → swiper-component-DE94711u.js} +4 -4
- package/dist/tcl-B3jhsfqY.js +4 -0
- package/dist/textile-Cb1Dw7Aq.js +4 -0
- package/dist/{time-CsmIF9YZ.js → time-Bb4A7I6a.js} +4 -4
- package/dist/{timeline-definition-IT6M3QCI-NfSKRvH0.js → timeline-definition-IT6M3QCI-CkD_trIn.js} +4 -4
- package/dist/{toDate-CWNNlFEX.js → toDate-B3IRfHhw.js} +16 -7
- package/dist/toml-nHZhetdO.js +4 -0
- package/dist/{tooltip-Czds6Qr8.js → tooltip-B-qh7UPB.js} +3 -3
- package/dist/{treemap-GDKQZRPO-Cl6OQh8D.js → treemap-GDKQZRPO-SDux0AV8.js} +3 -3
- package/dist/troff-DuJAGWKH.js +4 -0
- package/dist/ttcn-BxrcwP21.js +4 -0
- package/dist/ttcn-cfg-BAg_9dcc.js +4 -0
- package/dist/turtle-zCq949as.js +4 -0
- package/dist/{types-C2Ir191_.js → types-DQl7jVYK.js} +1 -1
- package/dist/use-vega-container-remeasure-DGNrIQSk.js +27 -0
- package/dist/{useAsyncData-KfHB8wQR.js → useAsyncData-CvO8WUy3.js} +1 -1
- package/dist/{useDateFormatter-CMnRuVmN.js → useDateFormatter-BSoGim-G.js} +2 -2
- package/dist/{useDeepCompareMemoize-nJMtxhm4.js → useDeepCompareMemoize-J3MKRdA4.js} +1 -1
- package/dist/{useIframeCapabilities-DWIYvDh7.js → useIframeCapabilities-POcFXHbw.js} +1 -1
- package/dist/{useLifecycle-DegSo0lV.js → useLifecycle-DqPxHgAN.js} +3 -3
- package/dist/{useTheme-6eZ3GOTS.js → useTheme-XMq9mNf_.js} +65 -29
- package/dist/vb-De5hElus.js +4 -0
- package/dist/vbscript-Cypcpv4F.js +4 -0
- package/dist/{vega-component-DzyyM9fc.js → vega-component-CrFoZT1S.js} +225 -223
- package/dist/vega-embed-container-DAQAMjiO.js +22 -0
- package/dist/vega-loader.browser-DmpxCJqx.js +1353 -0
- package/dist/velocity-Di7l-yhe.js +4 -0
- package/dist/verilog-Bzi-S3g2.js +4 -0
- package/dist/vhdl-B0ZZITaW.js +4 -0
- package/dist/webidl-0sviiRcN.js +4 -0
- package/dist/xquery-B4qMVWaB.js +4 -0
- package/dist/{xychartDiagram-PRI3JC2R-BvwftqMA.js → xychartDiagram-PRI3JC2R-BSkNxYNw.js} +13 -13
- package/dist/yacas-Jt25Fuv8.js +4 -0
- package/dist/z80-CrcbYzmp.js +4 -0
- package/dist/{zod-CijjQh4u.js → zod-D0yOqoGe.js} +26 -26
- package/package.json +3 -1
- package/src/__mocks__/requests.ts +3 -0
- package/src/components/charts/lazy.tsx +3 -1
- package/src/components/charts/vega-embed-container.tsx +18 -0
- package/src/components/chat/__tests__/chat-utils.test.ts +244 -1
- package/src/components/chat/__tests__/message-queue.test.tsx +121 -0
- package/src/components/chat/chat-panel.tsx +196 -67
- package/src/components/chat/chat-utils.ts +111 -2
- package/src/components/editor/RecoveryButton.tsx +2 -2
- package/src/components/editor/SortableCell.tsx +6 -2
- package/src/components/editor/__tests__/output-persistence.test.tsx +241 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +153 -0
- package/src/components/editor/actions/pair-with-agent-commands.ts +109 -0
- package/src/components/editor/actions/pair-with-agent-modal.tsx +20 -64
- package/src/components/editor/actions/useNotebookActions.tsx +8 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +14 -5
- package/src/components/editor/ai/ai-completion-editor.tsx +4 -1
- package/src/components/editor/cell/cell-context-menu.tsx +7 -0
- package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +221 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +308 -77
- package/src/components/editor/chrome/panels/packages-panel.tsx +11 -1
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +3 -2
- package/src/components/editor/columns/__tests__/cell-column.test.tsx +105 -0
- package/src/components/editor/columns/cell-column.tsx +34 -4
- package/src/components/editor/columns/sortable-column.tsx +24 -4
- package/src/components/editor/connections/__tests__/secret-combobox.test.ts +134 -0
- package/src/components/editor/connections/database/schemas.ts +35 -27
- package/src/components/editor/connections/form-renderers.tsx +42 -110
- package/src/components/editor/connections/secret-combobox.tsx +253 -0
- package/src/components/editor/connections/storage/schemas.ts +12 -6
- package/src/components/editor/file-tree/download.ts +46 -0
- package/src/components/editor/file-tree/file-explorer.tsx +3 -21
- package/src/components/editor/file-tree/file-viewer.tsx +4 -27
- package/src/components/editor/navigation/__tests__/navigation.test.ts +33 -0
- package/src/components/editor/navigation/navigation.ts +8 -1
- package/src/components/editor/notebook-cell.tsx +203 -106
- package/src/components/editor/renderers/__tests__/cells-renderer.test.tsx +66 -0
- package/src/components/editor/renderers/cell-array.tsx +26 -13
- package/src/components/editor/renderers/cells-renderer.tsx +8 -2
- package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +29 -0
- package/src/components/editor/renderers/slides-layout/types.ts +4 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +19 -19
- package/src/components/slides/reveal-component.tsx +37 -17
- package/src/components/slides/slide-form.tsx +72 -0
- package/src/components/ui/toast.tsx +11 -3
- package/src/components/ui/toaster.tsx +65 -9
- package/src/core/ai/context/providers/error.ts +6 -158
- package/src/core/cells/__tests__/utils.test.ts +59 -0
- package/src/core/cells/utils.ts +51 -0
- package/src/core/codemirror/completion/__tests__/signature-hint.test.ts +97 -3
- package/src/core/codemirror/completion/signature-hint.ts +78 -11
- package/src/core/constants.ts +8 -0
- package/src/core/diagnostics/__tests__/issue-details.test.ts +173 -0
- package/src/core/diagnostics/issue-details.ts +139 -0
- package/src/core/errors/__tests__/error-entries.test.ts +25 -0
- package/src/core/errors/error-entries.ts +176 -0
- package/src/core/islands/__tests__/bridge.test.ts +341 -46
- package/src/core/islands/__tests__/main.test.ts +176 -0
- package/src/core/islands/__tests__/parse.test.ts +105 -0
- package/src/core/islands/bootstrap.ts +8 -3
- package/src/core/islands/bridge.ts +117 -23
- package/src/core/islands/components/__tests__/web-components.test.tsx +214 -0
- package/src/core/islands/components/web-components.tsx +76 -15
- package/src/core/islands/constants.ts +1 -0
- package/src/core/islands/main.ts +69 -3
- package/src/core/islands/parse.ts +70 -23
- package/src/core/islands/worker/__tests__/controller.test.ts +173 -0
- package/src/core/islands/worker/worker.tsx +145 -57
- package/src/core/network/__tests__/requests-lazy.test.ts +18 -0
- package/src/core/network/__tests__/requests-network.test.ts +7 -0
- package/src/core/network/requests-lazy.ts +13 -1
- package/src/core/network/requests-network.ts +3 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +3 -0
- package/src/core/runtime/__tests__/runtime.test.ts +64 -0
- package/src/core/runtime/runtime.ts +30 -10
- package/src/core/wasm/bridge.ts +8 -0
- package/src/core/wasm/worker/bootstrap.ts +113 -20
- package/src/core/wasm/worker/types.ts +2 -0
- package/src/css/app/Cell.css +10 -0
- package/src/hooks/__tests__/useHotkey.test.tsx +88 -0
- package/src/hooks/useHotkey.ts +29 -4
- package/src/plugins/impl/anywidget/__tests__/host.test.ts +6 -9
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +3 -1
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +32 -61
- package/src/plugins/impl/anywidget/model-proxy.ts +0 -13
- package/src/plugins/impl/anywidget/runtime.ts +1 -0
- package/src/plugins/impl/anywidget/widget-binding.ts +8 -34
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +53 -2
- package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +71 -0
- package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +102 -0
- package/src/plugins/impl/vega/use-vega-container-remeasure.ts +39 -0
- package/src/plugins/impl/vega/vega-component.tsx +5 -4
- package/src/theme/__tests__/useTheme.test.ts +68 -0
- package/src/theme/useTheme.ts +16 -1
- package/dist/apl-Bdc61P1y.js +0 -4
- package/dist/architecture-7HQA4BMR-Kyc44TmC.js +0 -6
- package/dist/asciiarmor-DVRHDGzT.js +0 -4
- package/dist/asn1-BmuKfkfu.js +0 -4
- package/dist/assets/__vite-browser-external-BQCLNwri.js +0 -1
- package/dist/assets/worker-DAWRHcPq.js +0 -73
- package/dist/brainfuck-DPrRpyTV.js +0 -4
- package/dist/classDiagram-2ON5EDUG-QjoAcuFE.js +0 -30
- package/dist/classDiagram-v2-WZHVMYZB-bUCv4gu2.js +0 -30
- package/dist/clojure-DEttQW5T.js +0 -4
- package/dist/cmake-jNlx_DaM.js +0 -4
- package/dist/cobol-BvvIm5MJ.js +0 -4
- package/dist/coffeescript-DTpBMyFU.js +0 -4
- package/dist/commonlisp-BmmUG8jb.js +0 -4
- package/dist/crystal-BxyqmEWC.js +0 -4
- package/dist/css-BGoCtuG3.js +0 -4
- package/dist/cypher-BmCbdl3u.js +0 -4
- package/dist/d-CFrlbjZt.js +0 -4
- package/dist/diff-D6XwL6P8.js +0 -4
- package/dist/dist-7QfXoMdB.js +0 -5
- package/dist/dist-BEXXyZig.js +0 -5
- package/dist/dist-BYj57OV4.js +0 -5
- package/dist/dist-BlSvQzNr.js +0 -5
- package/dist/dist-CCBlxAgS.js +0 -8
- package/dist/dist-CIDTVIUf.js +0 -5
- package/dist/dist-CqQyhAM8.js +0 -8
- package/dist/dist-CwRu2Xzh.js +0 -5
- package/dist/dist-D8CDTVgf.js +0 -6
- package/dist/dist-D8DNB0nO.js +0 -8
- package/dist/dist-DL6N_q-A.js +0 -5
- package/dist/dist-DOFbNV_b.js +0 -8
- package/dist/dist-DPrYzMY0.js +0 -6
- package/dist/dist-cdmMjgsn.js +0 -5
- package/dist/dtd-Bw0lRN0-.js +0 -4
- package/dist/dylan-B55eBHTt.js +0 -4
- package/dist/ecl-C8G4p0wn.js +0 -4
- package/dist/eiffel-BmH46VJl.js +0 -4
- package/dist/elm-DhzeFqkl.js +0 -4
- package/dist/erlang-CY-wdlsU.js +0 -4
- package/dist/esm-M837UxV5.js +0 -1171
- package/dist/factor-DWkgl0xw.js +0 -4
- package/dist/forth-Cij_ie2t.js +0 -4
- package/dist/fortran-Br3X9cfm.js +0 -4
- package/dist/gas-DYsGcMN2.js +0 -4
- package/dist/gherkin-eVgXQ0fQ.js +0 -4
- package/dist/groovy-_NFHIXG7.js +0 -4
- package/dist/haskell-D6xNG_bH.js +0 -4
- package/dist/haxe-sU_rzAwn.js +0 -5
- package/dist/idl-Ds_VbrUx.js +0 -4
- package/dist/infoDiagram-HS3SLOUP-CEnzWruK.js +0 -30
- package/dist/javascript-CztfIl0i.js +0 -4
- package/dist/julia-DDv40QMV.js +0 -4
- package/dist/livescript-BEOngLLc.js +0 -4
- package/dist/lua-9-7BhQ4Y.js +0 -4
- package/dist/mathematica-DDa0Pfxm.js +0 -4
- package/dist/mbox-iO03mmoE.js +0 -4
- package/dist/mirc-C9z5LT4X.js +0 -4
- package/dist/mllike-jGJbdm_C.js +0 -6
- package/dist/modelica-DzF7oIEL.js +0 -4
- package/dist/mscgen-DB-u125o.js +0 -6
- package/dist/mumps-CRTFHhzh.js +0 -4
- package/dist/nsis-C4NPTuox.js +0 -4
- package/dist/ntriples-BCOoGph1.js +0 -4
- package/dist/octave-DTwNlazz.js +0 -4
- package/dist/oz-DD38AzSz.js +0 -4
- package/dist/pascal-BohSp9jV.js +0 -4
- package/dist/perl-f5OutoPM.js +0 -4
- package/dist/pig-Dv7wSmHb.js +0 -4
- package/dist/powershell-rYgjKB39.js +0 -4
- package/dist/properties-BFUNLRDN.js +0 -4
- package/dist/protobuf-B9QJQPPv.js +0 -4
- package/dist/pug-DzvWpaMC.js +0 -4
- package/dist/puppet-B_K-n_xK.js +0 -4
- package/dist/purify.es-H92eMd9-.js +0 -557
- package/dist/python-CAiFcaA2.js +0 -4
- package/dist/q-cLeFIBLK.js +0 -4
- package/dist/r-04Y-Wco3.js +0 -4
- package/dist/react-vega-B6ncY2Tp.js +0 -9
- package/dist/rpm-FUdrIia9.js +0 -5
- package/dist/ruby-DMjFXuEW.js +0 -4
- package/dist/sas-DzHZxjXK.js +0 -4
- package/dist/scheme-DxHd_Rb9.js +0 -4
- package/dist/shell-C8Kwypgf.js +0 -4
- package/dist/sieve-DdyqOKXZ.js +0 -4
- package/dist/smalltalk-pB7X1D9y.js +0 -4
- package/dist/sparql-NhBO6oOa.js +0 -4
- package/dist/stateDiagram-v2-4FDKWEC3-E0RGjKsm.js +0 -29
- package/dist/stex-KfRnSHzF.js +0 -4
- package/dist/stylus-SfWSnzPv.js +0 -4
- package/dist/swift-jRPdq2zR.js +0 -4
- package/dist/tcl-_hpTHGX3.js +0 -4
- package/dist/textile-C9h8slqH.js +0 -4
- package/dist/toml-DWvtinD4.js +0 -4
- package/dist/troff-Dwo_A0y7.js +0 -4
- package/dist/ttcn-V--CPFKq.js +0 -4
- package/dist/ttcn-cfg-CPSMchTG.js +0 -4
- package/dist/turtle-B4rPGBWu.js +0 -4
- package/dist/vb-DaMBBd4j.js +0 -4
- package/dist/vbscript-BMJQqcE2.js +0 -4
- package/dist/vega-loader.browser-CZ-J8Py3.js +0 -1321
- package/dist/velocity-CGq2QRq2.js +0 -4
- package/dist/verilog-CUNo8F5u.js +0 -4
- package/dist/vhdl-CCzA0msW.js +0 -4
- package/dist/webidl-CqIMDIBL.js +0 -4
- package/dist/xquery-XC5Kbr-1.js +0 -4
- package/dist/yacas-CGOv7Dzy.js +0 -4
- package/dist/z80-CXhVmi-f.js +0 -4
- /package/dist/{Plot-CAYS29h9.js → Plot-YQOuVIei.js} +0 -0
- /package/dist/{apl-BCgCq9iM.js → apl-99A7dLQe.js} +0 -0
- /package/dist/{array-tvvEqPy7.js → array-O78LT16Y.js} +0 -0
- /package/dist/{asciiarmor-BtqU-KJQ.js → asciiarmor-DLEhpFDx.js} +0 -0
- /package/dist/{asn1-Dmb-dTMx.js → asn1-CMrcTsT4.js} +0 -0
- /package/dist/{asterisk-DaVJJDnV.js → asterisk-CqykImq7.js} +0 -0
- /package/dist/{brainfuck-C1HoZKlE.js → brainfuck-ChPt5yBe.js} +0 -0
- /package/dist/{chunk-DR5Q36YT-BflwErH1.js → chunk-DR5Q36YT-5Yp2GWwR.js} +0 -0
- /package/dist/{click-outside-container-BLPjMamz.js → click-outside-container-BSIeYt4y.js} +0 -0
- /package/dist/{clike-CdT0yHjt.js → clike-CE0fXfM_.js} +0 -0
- /package/dist/{clojure-CdyrCpUv.js → clojure-QkBEMU-g.js} +0 -0
- /package/dist/{cmake-BFlPxym7.js → cmake-CU1jX7Mo.js} +0 -0
- /package/dist/{cobol-CcJXewp8.js → cobol-DMOKzzky.js} +0 -0
- /package/dist/{coffeescript-DnKuIKRo.js → coffeescript-DjnjLyfk.js} +0 -0
- /package/dist/{colors-CQAOa8cK.js → colors-DmiH1bIH.js} +0 -0
- /package/dist/{common-keywords-FBrXPTcz.js → common-keywords-D3nPJNQP.js} +0 -0
- /package/dist/{commonlisp-B-kok83Z.js → commonlisp-CYd9iOSe.js} +0 -0
- /package/dist/{crystal-FYRYjI1I.js → crystal-Dy55yoYG.js} +0 -0
- /package/dist/{css-B45lc2V3.js → css-CNU8w3HJ.js} +0 -0
- /package/dist/{cypher-DZMLyVY_.js → cypher-q47DGzK7.js} +0 -0
- /package/dist/{cytoscape.esm-ayF70frT.js → cytoscape.esm-Dr8XzXWK.js} +0 -0
- /package/dist/{d-x-VVT4o9.js → d-jEkaLvxX.js} +0 -0
- /package/dist/{defaultLocale-u-3osm0P.js → defaultLocale-BpsHxBd7.js} +0 -0
- /package/dist/{defaultLocale-BoHTsDG6.js → defaultLocale-DoeErsX2.js} +0 -0
- /package/dist/{diff-Dxe2mpXk.js → diff-vb2-unFN.js} +0 -0
- /package/dist/{dist-BGdYVvOu.js → dist-DsoKosxi.js} +0 -0
- /package/dist/{dtd-C9VM_Wfu.js → dtd-C9kR-bXa.js} +0 -0
- /package/dist/{duckdb-keywords-CvJhR_Yd.js → duckdb-keywords-B6HYCMOT.js} +0 -0
- /package/dist/{dylan-DTSnEIFO.js → dylan-BLckrK-V.js} +0 -0
- /package/dist/{ebnf-2D4Ctp3y.js → ebnf-Cnp3L9jg.js} +0 -0
- /package/dist/{ecl-N04ptnRK.js → ecl-CEsf6XVg.js} +0 -0
- /package/dist/{eiffel-Dd8rpqr_.js → eiffel-2KGZNzx6.js} +0 -0
- /package/dist/{elm-GT2E866W.js → elm-D2s3K5wF.js} +0 -0
- /package/dist/{emotion-is-prop-valid.esm-DzSb5hsH.js → emotion-is-prop-valid.esm-DdVSF4FD.js} +0 -0
- /package/dist/{erlang-Cf0Bp5pY.js → erlang-0PMFOndk.js} +0 -0
- /package/dist/{esm-BaaaPNGl.js → esm-CuQHjs36.js} +0 -0
- /package/dist/{fcl-Ccj8Z5Xd.js → fcl-D9nccAWI.js} +0 -0
- /package/dist/{forth-wd_XzGTg.js → forth-DG89iUsu.js} +0 -0
- /package/dist/{fortran-DcwUTZFe.js → fortran-ytKsAVvu.js} +0 -0
- /package/dist/{gas-DeALIER3.js → gas-Cg2Fm0N2.js} +0 -0
- /package/dist/{gherkin-CKTqaJNX.js → gherkin-B87FEnZ-.js} +0 -0
- /package/dist/{groovy-Bwdp_d8D.js → groovy-Dcs08AWD.js} +0 -0
- /package/dist/{haskell-DCdCcPLK.js → haskell-cwkOuhx6.js} +0 -0
- /package/dist/{haxe-DAyktQWJ.js → haxe-DWEo4q10.js} +0 -0
- /package/dist/{http-_DVAYWoR.js → http-B8jdG64J.js} +0 -0
- /package/dist/{idl-CBuZiRYu.js → idl-WWQwDcRV.js} +0 -0
- /package/dist/{init-uv0kkh4g.js → init-DNBbYZd_.js} +0 -0
- /package/dist/{javascript-DzigE11c.js → javascript-BeR74dxD.js} +0 -0
- /package/dist/{julia-PwfB-0Cm.js → julia-UlvCUYGL.js} +0 -0
- /package/dist/{katex-C_XRmjAP.js → katex-Bld7b-fk.js} +0 -0
- /package/dist/{livescript-BJLz1EbT.js → livescript-GPmFcmYV.js} +0 -0
- /package/dist/{lua-ZC-XC2jf.js → lua-DYoT_0zM.js} +0 -0
- /package/dist/{main-Tj_-QTyF.js → main-B1Jo_8pC.js} +0 -0
- /package/dist/{math-DFcdCCU8.js → math-CBNc2Ib0.js} +0 -0
- /package/dist/{mathematica-DCYMx6qB.js → mathematica-DSFIQlbG.js} +0 -0
- /package/dist/{mbox-OxMK_9XI.js → mbox-ej8lFMdL.js} +0 -0
- /package/dist/{micromark-factory-space-DF2w36zS.js → micromark-factory-space-CwHmg6iz.js} +0 -0
- /package/dist/{mirc-nJVyhA0H.js → mirc-CAdIdvHQ.js} +0 -0
- /package/dist/{mllike-DRO89bsU.js → mllike-CjTB1lHF.js} +0 -0
- /package/dist/{modelica-Don3E6ZD.js → modelica-BB68FYMa.js} +0 -0
- /package/dist/{mscgen-DJfqD3bN.js → mscgen-BkbzgGGI.js} +0 -0
- /package/dist/{mumps-SjGTvDYL.js → mumps-Cu-28E9F.js} +0 -0
- /package/dist/{nginx-DasThI7R.js → nginx-C1ofKPst.js} +0 -0
- /package/dist/{node-sql-parser-B8nBD36q.js → node-sql-parser-DLl_zNw0.js} +0 -0
- /package/dist/{ntriples-CNBKRl3I.js → ntriples-D9cQiZxZ.js} +0 -0
- /package/dist/{octave-DdeVHNlx.js → octave-BvtAnPX0.js} +0 -0
- /package/dist/{once-DPuqGUeo.js → once-B60G2fuJ.js} +0 -0
- /package/dist/{oz-CcKSoNvN.js → oz-COaVHk2E.js} +0 -0
- /package/dist/{pascal-6leftwNj.js → pascal-BFpqVD2x.js} +0 -0
- /package/dist/{path-BGaWgPKg.js → path-DwWbhZFI.js} +0 -0
- /package/dist/{perl-BhJIwWzN.js → perl-DaiORxHP.js} +0 -0
- /package/dist/{pig-r-xDHqRf.js → pig-DFzRhmsF.js} +0 -0
- /package/dist/{powershell-D-BELeNi.js → powershell-BG2LQNKN.js} +0 -0
- /package/dist/{properties-CnuDhbll.js → properties-CqJJR5QY.js} +0 -0
- /package/dist/{protobuf-CO8RBhvX.js → protobuf-WwDYV1yY.js} +0 -0
- /package/dist/{puppet-NmXHjLy8.js → puppet-QNY3w_uN.js} +0 -0
- /package/dist/{python-DAQXi720.js → python-4QrQ3Ugi.js} +0 -0
- /package/dist/{q-DlikXfV0.js → q-DhwXuxE2.js} +0 -0
- /package/dist/{r-CuohilwT.js → r-Df-nkR25.js} +0 -0
- /package/dist/{range-C-rmrM1O.js → range-BOiA8qqU.js} +0 -0
- /package/dist/{rpm-0Pjwp0Pb.js → rpm-Cokue07s.js} +0 -0
- /package/dist/{ruby-Dq8NJTDG.js → ruby-DrYcL3qF.js} +0 -0
- /package/dist/{sas-CuwonyVP.js → sas-CoiPirA5.js} +0 -0
- /package/dist/{scheme-CYU-RRIf.js → scheme-CwFLjzHv.js} +0 -0
- /package/dist/{semaphore-CNDGTzkX.js → semaphore-C8rmHdhj.js} +0 -0
- /package/dist/{shell-COPmX2qE.js → shell-BFV-R24I.js} +0 -0
- /package/dist/{sieve-B_3zyLne.js → sieve-CxwXF5T9.js} +0 -0
- /package/dist/{simple-mode-DSBniks8.js → simple-mode-DTaJtKPt.js} +0 -0
- /package/dist/{smalltalk-DRft7iPv.js → smalltalk-QivVOCtX.js} +0 -0
- /package/dist/{solr-RZ9uTl59.js → solr-BLvysN-c.js} +0 -0
- /package/dist/{sparql-CN6qj55H.js → sparql-nKsFk8j7.js} +0 -0
- /package/dist/{spreadsheet-BNNUNXA2.js → spreadsheet-BWc8C2FT.js} +0 -0
- /package/dist/{sql-B4x8IkwU.js → sql-CWfUjlV1.js} +0 -0
- /package/dist/{stex-BIsgBmK4.js → stex-DtMAhV4-.js} +0 -0
- /package/dist/{stylus-Bn_ZjOQ3.js → stylus-BLKQAycn.js} +0 -0
- /package/dist/{swift-BLUJhMbz.js → swift-CJoKqiKj.js} +0 -0
- /package/dist/{tcl-C86fxecl.js → tcl-YTeYFNUc.js} +0 -0
- /package/dist/{textile-DmHh2rsK.js → textile-C6rKQqMQ.js} +0 -0
- /package/dist/{tiddlywiki-DI0mF2WJ.js → tiddlywiki-ZXwTHGNT.js} +0 -0
- /package/dist/{tiki-2HU6XLLn.js → tiki-C628O_u4.js} +0 -0
- /package/dist/{timer-YZl28NYN.js → timer-BpI_FKSA.js} +0 -0
- /package/dist/{toml-GWANRNAD.js → toml-DxlPGbRy.js} +0 -0
- /package/dist/{treemap-D-ka1hvx.js → treemap-DY3NBr79.js} +0 -0
- /package/dist/{troff-BHTsomIy.js → troff-DFCfH7Ku.js} +0 -0
- /package/dist/{ttcn-DQuhn5Mn.js → ttcn-DAW-ERVP.js} +0 -0
- /package/dist/{ttcn-cfg-HjFYtdB-.js → ttcn-cfg-CpJ8b7EN.js} +0 -0
- /package/dist/{turtle-nCay33Nv.js → turtle-BneV2f8L.js} +0 -0
- /package/dist/{vb-BG-XlqqJ.js → vb-D973Vxxh.js} +0 -0
- /package/dist/{vbscript-B6vyW0-D.js → vbscript-Dckaq3YO.js} +0 -0
- /package/dist/{velocity-CWegueqO.js → velocity-DKty-GUC.js} +0 -0
- /package/dist/{verilog-CzSQm4cG.js → verilog-aNaK_biA.js} +0 -0
- /package/dist/{vhdl-DqnNVL7r.js → vhdl-CQuehnQy.js} +0 -0
- /package/dist/{webidl-DXEUpDWH.js → webidl-Bhg8vaMr.js} +0 -0
- /package/dist/{xquery-Ba_NB5bD.js → xquery-D2q16GaM.js} +0 -0
- /package/dist/{yacas-HKQU6hyk.js → yacas-DHGOHnNa.js} +0 -0
- /package/dist/{z80-CXkHXLdj.js → z80-BPhTmO22.js} +0 -0
package/dist/esm-M837UxV5.js
DELETED
|
@@ -1,1171 +0,0 @@
|
|
|
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-DebpN0FN.js";
|
|
4
|
-
import { l as historyKeymap, o as defaultKeymap, r as lintKeymap, s as history, t as _extends, u as indentWithTab } from "./extends-9MVIxxRo.js";
|
|
5
|
-
import { $ as EditorView, At as Facet, Bt as codePointAt, C as foldKeymap, Ct as Annotation, Et as CharCategory, F as syntaxHighlighting, Gt as fromCodePoint, H as tags, Ht as combineConfig, It as StateEffect, Lt as StateField, Mt as Prec, Ot as EditorSelection, Pt as RangeSetBuilder, St as crelt, Vt as codePointSize, Wt as findClusterBreak, Z as Decoration, _t as rectangularSelection, a as HighlightStyle, at as dropCursor, bt as showPanel, dt as highlightSpecialChars, g as defaultHighlightStyle, gt as placeholder, it as drawSelection, j as indentUnit, k as indentOnInput, kt as EditorState, lt as highlightActiveLine, mt as lineNumbers, ot as getPanel, p as bracketMatching, pt as keymap, rt as crosshairCursor, tt as ViewPlugin, ut as highlightActiveLineGutter, vt as runScopeHandlers, x as foldGutter, yt as showDialog } from "./dist-U4F-tbMs.js";
|
|
6
|
-
import { a as closeBracketsKeymap, c as completionKeymap, i as closeBrackets, r as autocompletion } from "./dist-hT4QzYX-.js";
|
|
7
|
-
var basicNormalize = typeof String.prototype.normalize == "function" ? (e2) => e2.normalize("NFKD") : (e2) => e2, SearchCursor = class {
|
|
8
|
-
constructor(e2, b, x = 0, S = e2.length, C, w) {
|
|
9
|
-
this.test = w, this.value = {
|
|
10
|
-
from: 0,
|
|
11
|
-
to: 0
|
|
12
|
-
}, this.done = false, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e2.iterRange(x, S), this.bufferStart = x, this.normalize = C ? (e3) => C(basicNormalize(e3)) : basicNormalize, this.query = this.normalize(b);
|
|
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 b = fromCodePoint(e2), x = this.bufferStart + this.bufferPos;
|
|
30
|
-
this.bufferPos += codePointSize(e2);
|
|
31
|
-
let S = this.normalize(b);
|
|
32
|
-
if (S.length) for (let e3 = 0, C = x; ; e3++) {
|
|
33
|
-
let w = S.charCodeAt(e3), T = this.match(w, C, this.bufferPos + this.bufferStart);
|
|
34
|
-
if (e3 == S.length - 1) {
|
|
35
|
-
if (T) return this.value = T, this;
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
C == x && e3 < b.length && b.charCodeAt(e3) == w && C++;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
match(e2, b, x) {
|
|
43
|
-
let S = null;
|
|
44
|
-
for (let b2 = 0; b2 < this.matches.length; b2 += 2) {
|
|
45
|
-
let C = this.matches[b2], w = false;
|
|
46
|
-
this.query.charCodeAt(C) == e2 && (C == this.query.length - 1 ? S = {
|
|
47
|
-
from: this.matches[b2 + 1],
|
|
48
|
-
to: x
|
|
49
|
-
} : (this.matches[b2]++, w = true)), w || (this.matches.splice(b2, 2), b2 -= 2);
|
|
50
|
-
}
|
|
51
|
-
return this.query.charCodeAt(0) == e2 && (this.query.length == 1 ? S = {
|
|
52
|
-
from: b,
|
|
53
|
-
to: x
|
|
54
|
-
} : this.matches.push(1, b)), S && this.test && !this.test(S.from, S.to, this.buffer, this.bufferStart) && (S = null), S;
|
|
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, b, x, S = 0, C = e2.length) {
|
|
66
|
-
if (this.text = e2, this.to = C, this.curLine = "", this.done = false, this.value = empty, /\\[sWDnr]|\n|\r|\[\^/.test(b)) return new MultilineRegExpCursor(e2, b, x, S, C);
|
|
67
|
-
this.re = new RegExp(b, baseFlags + ((x == null ? void 0 : x.ignoreCase) ? "i" : "")), this.test = x == null ? void 0 : x.test, this.iter = e2.iter(), this.curLineStart = e2.lineAt(S).from, this.matchPos = toCharEnd(e2, S), 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 b = this.matchPos <= this.to && this.re.exec(this.curLine);
|
|
79
|
-
if (b) {
|
|
80
|
-
let x = this.curLineStart + b.index, S = x + b[0].length;
|
|
81
|
-
if (this.matchPos = toCharEnd(this.text, S + (x == S ? 1 : 0)), x == this.curLineStart + this.curLine.length && this.nextLine(), (x < S || x > this.value.to) && (!this.test || this.test(x, S, b))) return this.value = {
|
|
82
|
-
from: x,
|
|
83
|
-
to: S,
|
|
84
|
-
match: b
|
|
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, b) {
|
|
93
|
-
this.from = e2, this.text = b;
|
|
94
|
-
}
|
|
95
|
-
get to() {
|
|
96
|
-
return this.from + this.text.length;
|
|
97
|
-
}
|
|
98
|
-
static get(b, x, S) {
|
|
99
|
-
let C = flattened.get(b);
|
|
100
|
-
if (!C || C.from >= S || C.to <= x) {
|
|
101
|
-
let C2 = new e(x, b.sliceString(x, S));
|
|
102
|
-
return flattened.set(b, C2), C2;
|
|
103
|
-
}
|
|
104
|
-
if (C.from == x && C.to == S) return C;
|
|
105
|
-
let { text: w, from: T } = C;
|
|
106
|
-
return T > x && (w = b.sliceString(x, T) + w, T = x), C.to < S && (w += b.sliceString(C.to, S)), flattened.set(b, new e(T, w)), new e(x, w.slice(x - T, S - T));
|
|
107
|
-
}
|
|
108
|
-
}, MultilineRegExpCursor = class {
|
|
109
|
-
constructor(e2, b, x, S, C) {
|
|
110
|
-
this.text = e2, this.to = C, this.done = false, this.value = empty, this.matchPos = toCharEnd(e2, S), this.re = new RegExp(b, baseFlags + ((x == null ? void 0 : x.ignoreCase) ? "i" : "")), this.test = x == null ? void 0 : x.test, this.flat = FlattenedDoc.get(e2, S, this.chunkEnd(S + 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, b = this.re.exec(this.flat.text);
|
|
118
|
-
if (b && !b[0] && b.index == e2 && (this.re.lastIndex = e2 + 1, b = this.re.exec(this.flat.text)), b) {
|
|
119
|
-
let e3 = this.flat.from + b.index, x = e3 + b[0].length;
|
|
120
|
-
if ((this.flat.to >= this.to || b.index + b[0].length <= this.flat.text.length - 10) && (!this.test || this.test(e3, x, b))) return this.value = {
|
|
121
|
-
from: e3,
|
|
122
|
-
to: x,
|
|
123
|
-
match: b
|
|
124
|
-
}, this.matchPos = toCharEnd(this.text, x + (e3 == x ? 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, b) {
|
|
142
|
-
if (b >= e2.length) return b;
|
|
143
|
-
let x = e2.lineAt(b), S;
|
|
144
|
-
for (; b < x.to && (S = x.text.charCodeAt(b - x.from)) >= 56320 && S < 57344; ) b++;
|
|
145
|
-
return b;
|
|
146
|
-
}
|
|
147
|
-
var gotoLine = (e2) => {
|
|
148
|
-
let { state: b } = e2, x = String(b.doc.lineAt(e2.state.selection.main.head).number), { close: S, result: C } = showDialog(e2, {
|
|
149
|
-
label: b.phrase("Go to line"),
|
|
150
|
-
input: {
|
|
151
|
-
type: "text",
|
|
152
|
-
name: "line",
|
|
153
|
-
value: x
|
|
154
|
-
},
|
|
155
|
-
focus: true,
|
|
156
|
-
submitLabel: b.phrase("go")
|
|
157
|
-
});
|
|
158
|
-
return C.then((x2) => {
|
|
159
|
-
let C2 = x2 && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(x2.elements.line.value);
|
|
160
|
-
if (!C2) {
|
|
161
|
-
e2.dispatch({ effects: S });
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
let w = b.doc.lineAt(b.selection.main.head), [, T, E, D, k] = C2, A = D ? +D.slice(1) : 0, j = E ? +E : w.number;
|
|
165
|
-
if (E && k) {
|
|
166
|
-
let e3 = j / 100;
|
|
167
|
-
T && (e3 = e3 * (T == "-" ? -1 : 1) + w.number / b.doc.lines), j = Math.round(b.doc.lines * e3);
|
|
168
|
-
} else E && T && (j = j * (T == "-" ? -1 : 1) + w.number);
|
|
169
|
-
let M = b.doc.line(Math.max(1, Math.min(b.doc.lines, j))), N = EditorSelection.cursor(M.from + Math.max(0, Math.min(A, M.length)));
|
|
170
|
-
e2.dispatch({
|
|
171
|
-
effects: [S, EditorView.scrollIntoView(N.from, { y: "center" })],
|
|
172
|
-
selection: N
|
|
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, b) => e3 || b,
|
|
183
|
-
minSelectionLength: Math.min,
|
|
184
|
-
maxMatches: Math.min
|
|
185
|
-
});
|
|
186
|
-
} });
|
|
187
|
-
function highlightSelectionMatches(e2) {
|
|
188
|
-
let b = [defaultTheme, matchHighlighter];
|
|
189
|
-
return e2 && b.push(highlightConfig.of(e2)), b;
|
|
190
|
-
}
|
|
191
|
-
var matchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch" }), mainMatchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
192
|
-
function insideWordBoundaries(e2, b, x, S) {
|
|
193
|
-
return (x == 0 || e2(b.sliceDoc(x - 1, x)) != CharCategory.Word) && (S == b.doc.length || e2(b.sliceDoc(S, S + 1)) != CharCategory.Word);
|
|
194
|
-
}
|
|
195
|
-
function insideWord(e2, b, x, S) {
|
|
196
|
-
return e2(b.sliceDoc(x, x + 1)) == CharCategory.Word && e2(b.sliceDoc(S - 1, S)) == 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 b = e2.state.facet(highlightConfig), { state: x } = e2, S = x.selection;
|
|
207
|
-
if (S.ranges.length > 1) return Decoration.none;
|
|
208
|
-
let C = S.main, w, T = null;
|
|
209
|
-
if (C.empty) {
|
|
210
|
-
if (!b.highlightWordAroundCursor) return Decoration.none;
|
|
211
|
-
let e3 = x.wordAt(C.head);
|
|
212
|
-
if (!e3) return Decoration.none;
|
|
213
|
-
T = x.charCategorizer(C.head), w = x.sliceDoc(e3.from, e3.to);
|
|
214
|
-
} else {
|
|
215
|
-
let e3 = C.to - C.from;
|
|
216
|
-
if (e3 < b.minSelectionLength || e3 > 200) return Decoration.none;
|
|
217
|
-
if (b.wholeWords) {
|
|
218
|
-
if (w = x.sliceDoc(C.from, C.to), T = x.charCategorizer(C.head), !(insideWordBoundaries(T, x, C.from, C.to) && insideWord(T, x, C.from, C.to))) return Decoration.none;
|
|
219
|
-
} else if (w = x.sliceDoc(C.from, C.to), !w) return Decoration.none;
|
|
220
|
-
}
|
|
221
|
-
let E = [];
|
|
222
|
-
for (let S2 of e2.visibleRanges) {
|
|
223
|
-
let e3 = new SearchCursor(x.doc, w, S2.from, S2.to);
|
|
224
|
-
for (; !e3.next().done; ) {
|
|
225
|
-
let { from: S3, to: w2 } = e3.value;
|
|
226
|
-
if ((!T || insideWordBoundaries(T, x, S3, w2)) && (C.empty && S3 <= C.from && w2 >= C.to ? E.push(mainMatchDeco.range(S3, w2)) : (S3 >= C.to || w2 <= C.from) && E.push(matchDeco.range(S3, w2)), E.length > b.maxMatches)) return Decoration.none;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return Decoration.set(E);
|
|
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: b }) => {
|
|
235
|
-
let { selection: x } = e2, S = EditorSelection.create(x.ranges.map((b2) => e2.wordAt(b2.head) || EditorSelection.cursor(b2.head)), x.mainIndex);
|
|
236
|
-
return S.eq(x) ? false : (b(e2.update({ selection: S })), true);
|
|
237
|
-
};
|
|
238
|
-
function findNextOccurrence(e2, b) {
|
|
239
|
-
let { main: x, ranges: S } = e2.selection, C = e2.wordAt(x.head), w = C && C.from == x.from && C.to == x.to;
|
|
240
|
-
for (let x2 = false, C2 = new SearchCursor(e2.doc, b, S[S.length - 1].to); ; ) if (C2.next(), C2.done) {
|
|
241
|
-
if (x2) return null;
|
|
242
|
-
C2 = new SearchCursor(e2.doc, b, 0, Math.max(0, S[S.length - 1].from - 1)), x2 = true;
|
|
243
|
-
} else {
|
|
244
|
-
if (x2 && S.some((e3) => e3.from == C2.value.from)) continue;
|
|
245
|
-
if (w) {
|
|
246
|
-
let b2 = e2.wordAt(C2.value.from);
|
|
247
|
-
if (!b2 || b2.from != C2.value.from || b2.to != C2.value.to) continue;
|
|
248
|
-
}
|
|
249
|
-
return C2.value;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
var selectNextOccurrence = ({ state: e2, dispatch: b }) => {
|
|
253
|
-
let { ranges: x } = e2.selection;
|
|
254
|
-
if (x.some((e3) => e3.from === e3.to)) return selectWord({
|
|
255
|
-
state: e2,
|
|
256
|
-
dispatch: b
|
|
257
|
-
});
|
|
258
|
-
let S = e2.sliceDoc(x[0].from, x[0].to);
|
|
259
|
-
if (e2.selection.ranges.some((b2) => e2.sliceDoc(b2.from, b2.to) != S)) return false;
|
|
260
|
-
let C = findNextOccurrence(e2, S);
|
|
261
|
-
return C ? (b(e2.update({
|
|
262
|
-
selection: e2.selection.addRange(EditorSelection.range(C.from, C.to), false),
|
|
263
|
-
effects: EditorView.scrollIntoView(C.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, b) => b == "n" ? "\n" : b == "r" ? "\r" : b == "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, b = 0, x) {
|
|
289
|
-
let S = e2.doc ? e2 : EditorState.create({ doc: e2 });
|
|
290
|
-
return x ?? (x = S.doc.length), this.regexp ? regexpCursor(this, S, b, x) : stringCursor(this, S, b, x);
|
|
291
|
-
}
|
|
292
|
-
}, QueryType = class {
|
|
293
|
-
constructor(e2) {
|
|
294
|
-
this.spec = e2;
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
function wrapStringTest(e2, b, x) {
|
|
298
|
-
return (S, C, w, T) => x && !x(S, C, w, T) ? false : e2(S >= T && C <= T + w.length ? w.slice(S - T, C - T) : b.doc.sliceString(S, C), b, S, C);
|
|
299
|
-
}
|
|
300
|
-
function stringCursor(e2, b, x, S) {
|
|
301
|
-
let C;
|
|
302
|
-
return e2.wholeWord && (C = stringWordTest(b.doc, b.charCategorizer(b.selection.main.head))), e2.test && (C = wrapStringTest(e2.test, b, C)), new SearchCursor(b.doc, e2.unquoted, x, S, e2.caseSensitive ? void 0 : (e3) => e3.toLowerCase(), C);
|
|
303
|
-
}
|
|
304
|
-
function stringWordTest(e2, b) {
|
|
305
|
-
return (x, S, C, w) => ((w > x || w + C.length < S) && (w = Math.max(0, x - 2), C = e2.sliceString(w, Math.min(e2.length, S + 2))), (b(charBefore(C, x - w)) != CharCategory.Word || b(charAfter(C, x - w)) != CharCategory.Word) && (b(charAfter(C, S - w)) != CharCategory.Word || b(charBefore(C, S - w)) != CharCategory.Word));
|
|
306
|
-
}
|
|
307
|
-
var StringQuery = class extends QueryType {
|
|
308
|
-
constructor(e2) {
|
|
309
|
-
super(e2);
|
|
310
|
-
}
|
|
311
|
-
nextMatch(e2, b, x) {
|
|
312
|
-
let S = stringCursor(this.spec, e2, x, e2.doc.length).nextOverlapping();
|
|
313
|
-
if (S.done) {
|
|
314
|
-
let x2 = Math.min(e2.doc.length, b + this.spec.unquoted.length);
|
|
315
|
-
S = stringCursor(this.spec, e2, 0, x2).nextOverlapping();
|
|
316
|
-
}
|
|
317
|
-
return S.done || S.value.from == b && S.value.to == x ? null : S.value;
|
|
318
|
-
}
|
|
319
|
-
prevMatchInRange(e2, b, x) {
|
|
320
|
-
for (let S = x; ; ) {
|
|
321
|
-
let x2 = Math.max(b, S - 1e4 - this.spec.unquoted.length), C = stringCursor(this.spec, e2, x2, S), w = null;
|
|
322
|
-
for (; !C.nextOverlapping().done; ) w = C.value;
|
|
323
|
-
if (w) return w;
|
|
324
|
-
if (x2 == b) return null;
|
|
325
|
-
S -= 1e4;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
prevMatch(e2, b, x) {
|
|
329
|
-
let S = this.prevMatchInRange(e2, 0, b);
|
|
330
|
-
return S || (S = this.prevMatchInRange(e2, Math.max(0, x - this.spec.unquoted.length), e2.doc.length)), S && (S.from != b || S.to != x) ? S : null;
|
|
331
|
-
}
|
|
332
|
-
getReplacement(e2) {
|
|
333
|
-
return this.spec.unquote(this.spec.replace);
|
|
334
|
-
}
|
|
335
|
-
matchAll(e2, b) {
|
|
336
|
-
let x = stringCursor(this.spec, e2, 0, e2.doc.length), S = [];
|
|
337
|
-
for (; !x.next().done; ) {
|
|
338
|
-
if (S.length >= b) return null;
|
|
339
|
-
S.push(x.value);
|
|
340
|
-
}
|
|
341
|
-
return S;
|
|
342
|
-
}
|
|
343
|
-
highlight(e2, b, x, S) {
|
|
344
|
-
let C = stringCursor(this.spec, e2, Math.max(0, b - this.spec.unquoted.length), Math.min(x + this.spec.unquoted.length, e2.doc.length));
|
|
345
|
-
for (; !C.next().done; ) S(C.value.from, C.value.to);
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
function wrapRegexpTest(e2, b, x) {
|
|
349
|
-
return (S, C, w) => (!x || x(S, C, w)) && e2(w[0], b, S, C);
|
|
350
|
-
}
|
|
351
|
-
function regexpCursor(e2, b, x, S) {
|
|
352
|
-
let C;
|
|
353
|
-
return e2.wholeWord && (C = regexpWordTest(b.charCategorizer(b.selection.main.head))), e2.test && (C = wrapRegexpTest(e2.test, b, C)), new RegExpCursor(b.doc, e2.search, {
|
|
354
|
-
ignoreCase: !e2.caseSensitive,
|
|
355
|
-
test: C
|
|
356
|
-
}, x, S);
|
|
357
|
-
}
|
|
358
|
-
function charBefore(e2, b) {
|
|
359
|
-
return e2.slice(findClusterBreak(e2, b, false), b);
|
|
360
|
-
}
|
|
361
|
-
function charAfter(e2, b) {
|
|
362
|
-
return e2.slice(b, findClusterBreak(e2, b));
|
|
363
|
-
}
|
|
364
|
-
function regexpWordTest(e2) {
|
|
365
|
-
return (b, x, S) => !S[0].length || (e2(charBefore(S.input, S.index)) != CharCategory.Word || e2(charAfter(S.input, S.index)) != CharCategory.Word) && (e2(charAfter(S.input, S.index + S[0].length)) != CharCategory.Word || e2(charBefore(S.input, S.index + S[0].length)) != CharCategory.Word);
|
|
366
|
-
}
|
|
367
|
-
var RegExpQuery = class extends QueryType {
|
|
368
|
-
nextMatch(e2, b, x) {
|
|
369
|
-
let S = regexpCursor(this.spec, e2, x, e2.doc.length).next();
|
|
370
|
-
return S.done && (S = regexpCursor(this.spec, e2, 0, b).next()), S.done ? null : S.value;
|
|
371
|
-
}
|
|
372
|
-
prevMatchInRange(e2, b, x) {
|
|
373
|
-
for (let S = 1; ; S++) {
|
|
374
|
-
let C = Math.max(b, x - S * 1e4), w = regexpCursor(this.spec, e2, C, x), T = null;
|
|
375
|
-
for (; !w.next().done; ) T = w.value;
|
|
376
|
-
if (T && (C == b || T.from > C + 10)) return T;
|
|
377
|
-
if (C == b) return null;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
prevMatch(e2, b, x) {
|
|
381
|
-
return this.prevMatchInRange(e2, 0, b) || this.prevMatchInRange(e2, x, e2.doc.length);
|
|
382
|
-
}
|
|
383
|
-
getReplacement(e2) {
|
|
384
|
-
return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (b, x) => {
|
|
385
|
-
if (x == "&") return e2.match[0];
|
|
386
|
-
if (x == "$") return "$";
|
|
387
|
-
for (let b2 = x.length; b2 > 0; b2--) {
|
|
388
|
-
let S = +x.slice(0, b2);
|
|
389
|
-
if (S > 0 && S < e2.match.length) return e2.match[S] + x.slice(b2);
|
|
390
|
-
}
|
|
391
|
-
return b;
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
matchAll(e2, b) {
|
|
395
|
-
let x = regexpCursor(this.spec, e2, 0, e2.doc.length), S = [];
|
|
396
|
-
for (; !x.next().done; ) {
|
|
397
|
-
if (S.length >= b) return null;
|
|
398
|
-
S.push(x.value);
|
|
399
|
-
}
|
|
400
|
-
return S;
|
|
401
|
-
}
|
|
402
|
-
highlight(e2, b, x, S) {
|
|
403
|
-
let C = regexpCursor(this.spec, e2, Math.max(0, b - 250), Math.min(x + 250, e2.doc.length));
|
|
404
|
-
for (; !C.next().done; ) S(C.value.from, C.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, b) {
|
|
411
|
-
for (let x of b.effects) x.is(setSearchQuery) ? e2 = new SearchState(x.value.create(), e2.panel) : x.is(togglePanel) && (e2 = new SearchState(e2.query, x.value ? createSearchPanel : null));
|
|
412
|
-
return e2;
|
|
413
|
-
},
|
|
414
|
-
provide: (e2) => showPanel.from(e2, (e3) => e3.panel)
|
|
415
|
-
}), SearchState = class {
|
|
416
|
-
constructor(e2, b) {
|
|
417
|
-
this.query = e2, this.panel = b;
|
|
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 b = e2.state.field(searchState);
|
|
425
|
-
(b != e2.startState.field(searchState) || e2.docChanged || e2.selectionSet || e2.viewportChanged) && (this.decorations = this.highlight(b));
|
|
426
|
-
}
|
|
427
|
-
highlight({ query: e2, panel: b }) {
|
|
428
|
-
if (!b || !e2.spec.valid) return Decoration.none;
|
|
429
|
-
let { view: x } = this, S = new RangeSetBuilder();
|
|
430
|
-
for (let b2 = 0, C = x.visibleRanges, w = C.length; b2 < w; b2++) {
|
|
431
|
-
let { from: T, to: E } = C[b2];
|
|
432
|
-
for (; b2 < w - 1 && E > C[b2 + 1].from - 500; ) E = C[++b2].to;
|
|
433
|
-
e2.highlight(x.state, T, E, (e3, b3) => {
|
|
434
|
-
let C2 = x.state.selection.ranges.some((x2) => x2.from == e3 && x2.to == b3);
|
|
435
|
-
S.add(e3, b3, C2 ? selectedMatchMark : matchMark);
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
return S.finish();
|
|
439
|
-
}
|
|
440
|
-
}, { decorations: (e2) => e2.decorations });
|
|
441
|
-
function searchCommand(e2) {
|
|
442
|
-
return (b) => {
|
|
443
|
-
let x = b.state.field(searchState, false);
|
|
444
|
-
return x && x.query.spec.valid ? e2(b, x) : openSearchPanel(b);
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
var findNext = /* @__PURE__ */ searchCommand((e2, { query: b }) => {
|
|
448
|
-
let { to: x } = e2.state.selection.main, S = b.nextMatch(e2.state, x, x);
|
|
449
|
-
if (!S) return false;
|
|
450
|
-
let C = EditorSelection.single(S.from, S.to), w = e2.state.facet(searchConfigFacet);
|
|
451
|
-
return e2.dispatch({
|
|
452
|
-
selection: C,
|
|
453
|
-
effects: [announceMatch(e2, S), w.scrollToMatch(C.main, e2)],
|
|
454
|
-
userEvent: "select.search"
|
|
455
|
-
}), selectSearchInput(e2), true;
|
|
456
|
-
}), findPrevious = /* @__PURE__ */ searchCommand((e2, { query: b }) => {
|
|
457
|
-
let { state: x } = e2, { from: S } = x.selection.main, C = b.prevMatch(x, S, S);
|
|
458
|
-
if (!C) return false;
|
|
459
|
-
let w = EditorSelection.single(C.from, C.to), T = e2.state.facet(searchConfigFacet);
|
|
460
|
-
return e2.dispatch({
|
|
461
|
-
selection: w,
|
|
462
|
-
effects: [announceMatch(e2, C), T.scrollToMatch(w.main, e2)],
|
|
463
|
-
userEvent: "select.search"
|
|
464
|
-
}), selectSearchInput(e2), true;
|
|
465
|
-
}), selectMatches = /* @__PURE__ */ searchCommand((e2, { query: b }) => {
|
|
466
|
-
let x = b.matchAll(e2.state, 1e3);
|
|
467
|
-
return !x || !x.length ? false : (e2.dispatch({
|
|
468
|
-
selection: EditorSelection.create(x.map((e3) => EditorSelection.range(e3.from, e3.to))),
|
|
469
|
-
userEvent: "select.search.matches"
|
|
470
|
-
}), true);
|
|
471
|
-
}), selectSelectionMatches = ({ state: e2, dispatch: b }) => {
|
|
472
|
-
let x = e2.selection;
|
|
473
|
-
if (x.ranges.length > 1 || x.main.empty) return false;
|
|
474
|
-
let { from: S, to: C } = x.main, w = [], T = 0;
|
|
475
|
-
for (let b2 = new SearchCursor(e2.doc, e2.sliceDoc(S, C)); !b2.next().done; ) {
|
|
476
|
-
if (w.length > 1e3) return false;
|
|
477
|
-
b2.value.from == S && (T = w.length), w.push(EditorSelection.range(b2.value.from, b2.value.to));
|
|
478
|
-
}
|
|
479
|
-
return b(e2.update({
|
|
480
|
-
selection: EditorSelection.create(w, T),
|
|
481
|
-
userEvent: "select.search.matches"
|
|
482
|
-
})), true;
|
|
483
|
-
}, replaceNext = /* @__PURE__ */ searchCommand((e2, { query: b }) => {
|
|
484
|
-
let { state: x } = e2, { from: S, to: C } = x.selection.main;
|
|
485
|
-
if (x.readOnly) return false;
|
|
486
|
-
let w = b.nextMatch(x, S, S);
|
|
487
|
-
if (!w) return false;
|
|
488
|
-
let T = w, E = [], D, k, A = [];
|
|
489
|
-
T.from == S && T.to == C && (k = x.toText(b.getReplacement(T)), E.push({
|
|
490
|
-
from: T.from,
|
|
491
|
-
to: T.to,
|
|
492
|
-
insert: k
|
|
493
|
-
}), T = b.nextMatch(x, T.from, T.to), A.push(EditorView.announce.of(x.phrase("replaced match on line $", x.doc.lineAt(S).number) + ".")));
|
|
494
|
-
let j = e2.state.changes(E);
|
|
495
|
-
return T && (D = EditorSelection.single(T.from, T.to).map(j), A.push(announceMatch(e2, T)), A.push(x.facet(searchConfigFacet).scrollToMatch(D.main, e2))), e2.dispatch({
|
|
496
|
-
changes: j,
|
|
497
|
-
selection: D,
|
|
498
|
-
effects: A,
|
|
499
|
-
userEvent: "input.replace"
|
|
500
|
-
}), true;
|
|
501
|
-
}), replaceAll = /* @__PURE__ */ searchCommand((e2, { query: b }) => {
|
|
502
|
-
if (e2.state.readOnly) return false;
|
|
503
|
-
let x = b.matchAll(e2.state, 1e9).map((e3) => {
|
|
504
|
-
let { from: x2, to: S2 } = e3;
|
|
505
|
-
return {
|
|
506
|
-
from: x2,
|
|
507
|
-
to: S2,
|
|
508
|
-
insert: b.getReplacement(e3)
|
|
509
|
-
};
|
|
510
|
-
});
|
|
511
|
-
if (!x.length) return false;
|
|
512
|
-
let S = e2.state.phrase("replaced $ matches", x.length) + ".";
|
|
513
|
-
return e2.dispatch({
|
|
514
|
-
changes: x,
|
|
515
|
-
effects: EditorView.announce.of(S),
|
|
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, b) {
|
|
523
|
-
let x = e2.selection.main, S = x.empty || x.to > x.from + 100 ? "" : e2.sliceDoc(x.from, x.to);
|
|
524
|
-
if (b && !S) return b;
|
|
525
|
-
let C = e2.facet(searchConfigFacet);
|
|
526
|
-
return new SearchQuery({
|
|
527
|
-
search: (b == null ? void 0 : b.literal) ?? C.literal ? S : S.replace(/\n/g, "\\n"),
|
|
528
|
-
caseSensitive: (b == null ? void 0 : b.caseSensitive) ?? C.caseSensitive,
|
|
529
|
-
literal: (b == null ? void 0 : b.literal) ?? C.literal,
|
|
530
|
-
regexp: (b == null ? void 0 : b.regexp) ?? C.regexp,
|
|
531
|
-
wholeWord: (b == null ? void 0 : b.wholeWord) ?? C.wholeWord
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
function getSearchInput(e2) {
|
|
535
|
-
let b = getPanel(e2, createSearchPanel);
|
|
536
|
-
return b && b.dom.querySelector("[main-field]");
|
|
537
|
-
}
|
|
538
|
-
function selectSearchInput(e2) {
|
|
539
|
-
let b = getSearchInput(e2);
|
|
540
|
-
b && b == e2.root.activeElement && b.select();
|
|
541
|
-
}
|
|
542
|
-
var openSearchPanel = (e2) => {
|
|
543
|
-
let b = e2.state.field(searchState, false);
|
|
544
|
-
if (b && b.panel) {
|
|
545
|
-
let x = getSearchInput(e2);
|
|
546
|
-
if (x && x != e2.root.activeElement) {
|
|
547
|
-
let S = defaultQuery(e2.state, b.query.spec);
|
|
548
|
-
S.valid && e2.dispatch({ effects: setSearchQuery.of(S) }), x.focus(), x.select();
|
|
549
|
-
}
|
|
550
|
-
} else e2.dispatch({ effects: [togglePanel.of(true), b ? setSearchQuery.of(defaultQuery(e2.state, b.query.spec)) : StateEffect.appendConfig.of(searchExtensions)] });
|
|
551
|
-
return true;
|
|
552
|
-
}, closeSearchPanel = (e2) => {
|
|
553
|
-
let b = e2.state.field(searchState, false);
|
|
554
|
-
if (!b || !b.panel) return false;
|
|
555
|
-
let x = getPanel(e2, createSearchPanel);
|
|
556
|
-
return x && x.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 b = this.query = e2.state.field(searchState).query.spec;
|
|
599
|
-
this.commit = this.commit.bind(this), this.searchField = crelt("input", {
|
|
600
|
-
value: b.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: b.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: b.caseSensitive,
|
|
623
|
-
onchange: this.commit
|
|
624
|
-
}), this.reField = crelt("input", {
|
|
625
|
-
type: "checkbox",
|
|
626
|
-
name: "re",
|
|
627
|
-
form: "",
|
|
628
|
-
checked: b.regexp,
|
|
629
|
-
onchange: this.commit
|
|
630
|
-
}), this.wordField = crelt("input", {
|
|
631
|
-
type: "checkbox",
|
|
632
|
-
name: "word",
|
|
633
|
-
form: "",
|
|
634
|
-
checked: b.wholeWord,
|
|
635
|
-
onchange: this.commit
|
|
636
|
-
});
|
|
637
|
-
function x(e3, b2, x2) {
|
|
638
|
-
return crelt("button", {
|
|
639
|
-
class: "cm-button",
|
|
640
|
-
name: e3,
|
|
641
|
-
onclick: b2,
|
|
642
|
-
type: "button"
|
|
643
|
-
}, x2);
|
|
644
|
-
}
|
|
645
|
-
this.dom = crelt("div", {
|
|
646
|
-
onkeydown: (e3) => this.keydown(e3),
|
|
647
|
-
class: "cm-search"
|
|
648
|
-
}, [
|
|
649
|
-
this.searchField,
|
|
650
|
-
x("next", () => findNext(e2), [phrase(e2, "next")]),
|
|
651
|
-
x("prev", () => findPrevious(e2), [phrase(e2, "previous")]),
|
|
652
|
-
x("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
|
-
x("replace", () => replaceNext(e2), [phrase(e2, "replace")]),
|
|
660
|
-
x("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 b of e2.transactions) for (let e3 of b.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, b) {
|
|
700
|
-
return e2.state.phrase(b);
|
|
701
|
-
}
|
|
702
|
-
var AnnounceMargin = 30, Break = /[\s\.,:;?!]/;
|
|
703
|
-
function announceMatch(e2, { from: b, to: x }) {
|
|
704
|
-
let S = e2.state.doc.lineAt(b), C = e2.state.doc.lineAt(x).to, w = Math.max(S.from, b - AnnounceMargin), T = Math.min(C, x + AnnounceMargin), E = e2.state.sliceDoc(w, T);
|
|
705
|
-
if (w != S.from) {
|
|
706
|
-
for (let e3 = 0; e3 < AnnounceMargin; e3++) if (!Break.test(E[e3 + 1]) && Break.test(E[e3])) {
|
|
707
|
-
E = E.slice(e3);
|
|
708
|
-
break;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
if (T != C) {
|
|
712
|
-
for (let e3 = E.length - 1; e3 > E.length - AnnounceMargin; e3--) if (!Break.test(E[e3 - 1]) && Break.test(E[e3])) {
|
|
713
|
-
E = E.slice(0, e3);
|
|
714
|
-
break;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
return EditorView.announce.of(`${e2.state.phrase("current match")}. ${E} ${e2.state.phrase("on line")} ${S.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, b) {
|
|
750
|
-
if (e2 == null) return {};
|
|
751
|
-
var x = {};
|
|
752
|
-
for (var S in e2) if ({}.hasOwnProperty.call(e2, S)) {
|
|
753
|
-
if (b.indexOf(S) !== -1) continue;
|
|
754
|
-
x[S] = e2[S];
|
|
755
|
-
}
|
|
756
|
-
return x;
|
|
757
|
-
}
|
|
758
|
-
var basicSetup = function(e2) {
|
|
759
|
-
e2 === void 0 && (e2 = {});
|
|
760
|
-
var { crosshairCursor: b = false } = e2, x = [];
|
|
761
|
-
e2.closeBracketsKeymap !== false && (x = x.concat(closeBracketsKeymap)), e2.defaultKeymap !== false && (x = x.concat(defaultKeymap)), e2.searchKeymap !== false && (x = x.concat(searchKeymap)), e2.historyKeymap !== false && (x = x.concat(historyKeymap)), e2.foldKeymap !== false && (x = x.concat(foldKeymap)), e2.completionKeymap !== false && (x = x.concat(completionKeymap)), e2.lintKeymap !== false && (x = x.concat(lintKeymap));
|
|
762
|
-
var E = [];
|
|
763
|
-
return e2.lineNumbers !== false && E.push(lineNumbers()), e2.highlightActiveLineGutter !== false && E.push(highlightActiveLineGutter()), e2.highlightSpecialChars !== false && E.push(highlightSpecialChars()), e2.history !== false && E.push(history()), e2.foldGutter !== false && E.push(foldGutter()), e2.drawSelection !== false && E.push(drawSelection()), e2.dropCursor !== false && E.push(dropCursor()), e2.allowMultipleSelections !== false && E.push(EditorState.allowMultipleSelections.of(true)), e2.indentOnInput !== false && E.push(indentOnInput()), e2.syntaxHighlighting !== false && E.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true })), e2.bracketMatching !== false && E.push(bracketMatching()), e2.closeBrackets !== false && E.push(closeBrackets()), e2.autocompletion !== false && E.push(autocompletion()), e2.rectangularSelection !== false && E.push(rectangularSelection()), b !== false && E.push(crosshairCursor()), e2.highlightActiveLine !== false && E.push(highlightActiveLine()), e2.highlightSelectionMatches !== false && E.push(highlightSelectionMatches()), e2.tabSize && typeof e2.tabSize == "number" && E.push(indentUnit.of(" ".repeat(e2.tabSize))), E.concat([keymap.of(x.flat())]).filter(Boolean);
|
|
764
|
-
}, minimalSetup = function(e2) {
|
|
765
|
-
e2 === void 0 && (e2 = {});
|
|
766
|
-
var b = [];
|
|
767
|
-
e2.defaultKeymap !== false && (b = b.concat(defaultKeymap)), e2.historyKeymap !== false && (b = b.concat(historyKeymap));
|
|
768
|
-
var x = [];
|
|
769
|
-
return e2.highlightSpecialChars !== false && x.push(highlightSpecialChars()), e2.history !== false && x.push(history()), e2.drawSelection !== false && x.push(drawSelection()), e2.syntaxHighlighting !== false && x.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true })), x.concat([keymap.of(b.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: b = true, editable: x = true, readOnly: S = false, theme: C = "light", placeholder: w = "", basicSetup: T = true } = e2, E = [];
|
|
924
|
-
switch (b && E.unshift(keymap.of([indentWithTab])), T && (typeof T == "boolean" ? E.unshift(basicSetup()) : E.unshift(basicSetup(T))), w && E.unshift(placeholder(w)), C) {
|
|
925
|
-
case "light":
|
|
926
|
-
E.push(defaultLightThemeOption);
|
|
927
|
-
break;
|
|
928
|
-
case "dark":
|
|
929
|
-
E.push(oneDark);
|
|
930
|
-
break;
|
|
931
|
-
case "none":
|
|
932
|
-
break;
|
|
933
|
-
default:
|
|
934
|
-
E.push(C);
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
return x === false && E.push(EditorView.editable.of(false)), S && E.push(EditorState.readOnly.of(true)), [...E];
|
|
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((b) => e2.state.sliceDoc(b.from, b.to)),
|
|
950
|
-
selectedText: e2.state.selection.ranges.some((e3) => !e3.empty)
|
|
951
|
-
}), TimeoutLatch = class {
|
|
952
|
-
constructor(e2, b) {
|
|
953
|
-
this.timeLeftMS = void 0, this.timeoutMS = void 0, this.isCancelled = false, this.isTimeExhausted = false, this.callbacks = [], this.timeLeftMS = b, this.timeoutMS = b, 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: b, selection: x, onChange: S, onStatistics: C, onCreateEditor: w, onUpdate: T, extensions: E = emptyExtensions, autoFocus: D, theme: k = "light", height: A = null, minHeight: j = null, maxHeight: M = null, width: N = null, minWidth: P = null, maxWidth: F = null, placeholder: I = "", editable: L = true, readOnly: z = false, indentWithTab: B = true, basicSetup: V = true, root: H, initialState: U } = 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: A,
|
|
1002
|
-
minHeight: j,
|
|
1003
|
-
maxHeight: M,
|
|
1004
|
-
width: N,
|
|
1005
|
-
minWidth: P,
|
|
1006
|
-
maxWidth: F
|
|
1007
|
-
},
|
|
1008
|
-
"& .cm-scroller": { height: "100% !important" }
|
|
1009
|
-
}), $ = [
|
|
1010
|
-
EditorView.updateListener.of((e3) => {
|
|
1011
|
-
e3.docChanged && typeof S == "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)), S(e3.state.doc.toString(), e3)), C && C(getStatistics(e3));
|
|
1018
|
-
}),
|
|
1019
|
-
Q,
|
|
1020
|
-
...getDefaultExtensions({
|
|
1021
|
-
theme: k,
|
|
1022
|
-
editable: L,
|
|
1023
|
-
readOnly: z,
|
|
1024
|
-
placeholder: I,
|
|
1025
|
-
indentWithTab: B,
|
|
1026
|
-
basicSetup: V
|
|
1027
|
-
})
|
|
1028
|
-
];
|
|
1029
|
-
return T && typeof T == "function" && $.push(EditorView.updateListener.of(T)), $ = $.concat(E), (0, import_react.useLayoutEffect)(() => {
|
|
1030
|
-
if (W && !J) {
|
|
1031
|
-
var e3 = {
|
|
1032
|
-
doc: b,
|
|
1033
|
-
selection: x,
|
|
1034
|
-
extensions: $
|
|
1035
|
-
}, S2 = U ? EditorState.fromJSON(U.json, e3, U.fields) : EditorState.create(e3);
|
|
1036
|
-
if (Y(S2), !K) {
|
|
1037
|
-
var C2 = new EditorView({
|
|
1038
|
-
state: S2,
|
|
1039
|
-
parent: W,
|
|
1040
|
-
root: H
|
|
1041
|
-
});
|
|
1042
|
-
q(C2), w && w(C2, S2);
|
|
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
|
-
D && K && K.focus();
|
|
1054
|
-
}, [D, K]), (0, import_react.useEffect)(() => {
|
|
1055
|
-
K && K.dispatch({ effects: StateEffect.reconfigure.of($) });
|
|
1056
|
-
}, [
|
|
1057
|
-
k,
|
|
1058
|
-
E,
|
|
1059
|
-
A,
|
|
1060
|
-
j,
|
|
1061
|
-
M,
|
|
1062
|
-
N,
|
|
1063
|
-
P,
|
|
1064
|
-
F,
|
|
1065
|
-
I,
|
|
1066
|
-
L,
|
|
1067
|
-
z,
|
|
1068
|
-
B,
|
|
1069
|
-
V,
|
|
1070
|
-
S,
|
|
1071
|
-
T
|
|
1072
|
-
]), (0, import_react.useEffect)(() => {
|
|
1073
|
-
if (b !== void 0) {
|
|
1074
|
-
var e3 = K ? K.state.doc.toString() : "";
|
|
1075
|
-
if (K && b !== e3) {
|
|
1076
|
-
var x2 = X.current && !X.current.isDone, S2 = () => {
|
|
1077
|
-
K && b !== K.state.doc.toString() && K.dispatch({
|
|
1078
|
-
changes: {
|
|
1079
|
-
from: 0,
|
|
1080
|
-
to: K.state.doc.toString().length,
|
|
1081
|
-
insert: b || ""
|
|
1082
|
-
},
|
|
1083
|
-
annotations: [ExternalChange.of(true)]
|
|
1084
|
-
});
|
|
1085
|
-
};
|
|
1086
|
-
x2 ? Z.current = S2 : S2();
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
}, [b, 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, b) => {
|
|
1123
|
-
var { className: x, value: S = "", selection: C, extensions: w = [], onChange: T, onStatistics: D, onCreateEditor: O, onUpdate: k, autoFocus: A, theme: j = "light", height: M, minHeight: N, maxHeight: P, width: F, minWidth: I, maxWidth: L, basicSetup: R, placeholder: z, indentWithTab: B, editable: V, readOnly: H, root: U, initialState: W } = e2, G = _objectWithoutPropertiesLoose(e2, _excluded), K = (0, import_react.useRef)(null), { state: q, view: J, container: Y, setContainer: X } = useCodeMirror({
|
|
1124
|
-
root: U,
|
|
1125
|
-
value: S,
|
|
1126
|
-
autoFocus: A,
|
|
1127
|
-
theme: j,
|
|
1128
|
-
height: M,
|
|
1129
|
-
minHeight: N,
|
|
1130
|
-
maxHeight: P,
|
|
1131
|
-
width: F,
|
|
1132
|
-
minWidth: I,
|
|
1133
|
-
maxWidth: L,
|
|
1134
|
-
basicSetup: R,
|
|
1135
|
-
placeholder: z,
|
|
1136
|
-
indentWithTab: B,
|
|
1137
|
-
editable: V,
|
|
1138
|
-
readOnly: H,
|
|
1139
|
-
selection: C,
|
|
1140
|
-
onChange: T,
|
|
1141
|
-
onStatistics: D,
|
|
1142
|
-
onCreateEditor: O,
|
|
1143
|
-
onUpdate: k,
|
|
1144
|
-
extensions: w,
|
|
1145
|
-
initialState: W
|
|
1146
|
-
});
|
|
1147
|
-
(0, import_react.useImperativeHandle)(b, () => ({
|
|
1148
|
-
editor: K.current,
|
|
1149
|
-
state: q,
|
|
1150
|
-
view: J
|
|
1151
|
-
}), [
|
|
1152
|
-
K,
|
|
1153
|
-
Y,
|
|
1154
|
-
q,
|
|
1155
|
-
J
|
|
1156
|
-
]);
|
|
1157
|
-
var Z = (0, import_react.useCallback)((e3) => {
|
|
1158
|
-
K.current = e3, X(e3);
|
|
1159
|
-
}, [X]);
|
|
1160
|
-
if (typeof S != "string") throw Error("value must be typeof string but got " + typeof S);
|
|
1161
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _extends({
|
|
1162
|
-
ref: Z,
|
|
1163
|
-
className: (typeof j == "string" ? "cm-theme-" + j : "cm-theme") + (x ? " " + x : "")
|
|
1164
|
-
}, G));
|
|
1165
|
-
});
|
|
1166
|
-
ReactCodeMirror.displayName = "CodeMirror";
|
|
1167
|
-
var esm_default = ReactCodeMirror;
|
|
1168
|
-
export {
|
|
1169
|
-
minimalSetup as n,
|
|
1170
|
-
esm_default as t
|
|
1171
|
-
};
|