@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.
Files changed (578) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CU4fZJzG.js → ConnectedDataExplorerComponent-CJaUI-S-.js} +85 -84
  2. package/dist/{ErrorBoundary-DE6tzZf-.js → ErrorBoundary-DXlxsrTF.js} +3 -3
  3. package/dist/{ImageComparisonComponent-CHrI72em.js → ImageComparisonComponent-C3y7L3eJ.js} +173 -129
  4. package/dist/{any-language-editor-DN1R-1KZ.js → any-language-editor-P9tjkj4n.js} +21 -21
  5. package/dist/apl-e1B5LPEL.js +4 -0
  6. package/dist/{arc-DfkSnvZm.js → arc-CTIpFoOn.js} +2 -2
  7. package/dist/architecture-7HQA4BMR-DHUrQjL4.js +6 -0
  8. package/dist/{architectureDiagram-VXUJARFQ-CT2SuxNw.js → architectureDiagram-VXUJARFQ-DXwkyAaM.js} +19 -19
  9. package/dist/asciiarmor-B-gwgesP.js +4 -0
  10. package/dist/asn1-DF2ckRB4.js +4 -0
  11. package/dist/assets/__vite-browser-external-CjNAy01L.js +1 -0
  12. package/dist/assets/worker-B3XPCb6y.js +98 -0
  13. package/dist/{blockDiagram-VD42YOAC-Dy7hlFla.js → blockDiagram-VD42YOAC-CIOjvxeD.js} +12 -12
  14. package/dist/brainfuck-4G-7_gq_.js +4 -0
  15. package/dist/{button-BacYv-bE.js → button-BcSml68y.js} +12 -65
  16. package/dist/{c4Diagram-YG6GDRKO-BXlAmZ8Z.js → c4Diagram-YG6GDRKO-B6dZC_oU.js} +6 -6
  17. package/dist/{capabilities-D_4LYhSU.js → capabilities-BYLFYTYv.js} +2 -2
  18. package/dist/{channel-D_PHgcig.js → channel-BN070S0F.js} +1 -1
  19. package/dist/{chat-ui-DinOvbWu.js → chat-ui-BdSDiVjk.js} +3122 -3116
  20. package/dist/{check-C9OoNtR4.js → check-Cs-KV5XY.js} +1 -1
  21. package/dist/{chunk-4BX2VUAB-CzXltWHN.js → chunk-4BX2VUAB-iU5lQTDI.js} +1 -1
  22. package/dist/{chunk-4F5CHEZ2-D9nGEHV8.js → chunk-4F5CHEZ2-VlodlEGo.js} +1 -1
  23. package/dist/{chunk-55IACEB6-B-1mjMMC.js → chunk-55IACEB6-7h71GwyW.js} +1 -1
  24. package/dist/{chunk-5FQGJX7Z-BbqSm5gU.js → chunk-5FQGJX7Z-B9WoXK1R.js} +3 -3
  25. package/dist/{chunk-ABZYJK2D-Dz0-H2B5.js → chunk-ABZYJK2D-BxBDji1u.js} +3 -3
  26. package/dist/{chunk-ATLVNIR6-o0Z5MZLd.js → chunk-ATLVNIR6-qFiszptQ.js} +2 -2
  27. package/dist/{chunk-B2363JML-KEJpLGGP.js → chunk-B2363JML-zL3VngtH.js} +1 -1
  28. package/dist/{chunk-B4BG7PRW-BL98U9B4.js → chunk-B4BG7PRW-B_z2FEHm.js} +7 -7
  29. package/dist/{chunk-CVBHYZKI-B_c5YBcW.js → chunk-CVBHYZKI-CwazXVlJ.js} +1 -1
  30. package/dist/{chunk-DI55MBZ5-Dwkn0LWm.js → chunk-DI55MBZ5-D4Y8yV8B.js} +6 -6
  31. package/dist/{chunk-EXTU4WIE-9sNjmQrB.js → chunk-EXTU4WIE-BQPBhApE.js} +2 -2
  32. package/dist/{chunk-FMBD7UC4-Ie8M9q0W.js → chunk-FMBD7UC4-quJmebXa.js} +1 -1
  33. package/dist/{chunk-FRFDVMJY-DzQqMWrl.js → chunk-FRFDVMJY-BHBqN-vD.js} +1 -1
  34. package/dist/{chunk-HN2XXSSU-E3n-Ys7Z.js → chunk-HN2XXSSU-Bv0QkeMr.js} +1 -1
  35. package/dist/{chunk-JA3XYJ7Z-C32Y7Epf.js → chunk-JA3XYJ7Z-CY4CRbV5.js} +3 -3
  36. package/dist/{chunk-JZLCHNYA-C6ftyVMN.js → chunk-JZLCHNYA-DWIR9m5O.js} +6 -6
  37. package/dist/{chunk-MI3HLSF2-CUYEasXO.js → chunk-MI3HLSF2-HGWI-8Pg.js} +1 -1
  38. package/dist/{chunk-N4CR4FBY-DUhGZhZs.js → chunk-N4CR4FBY-Bw2HcMNc.js} +7 -7
  39. package/dist/{chunk-PL6DKKU2-D7km-08O.js → chunk-PL6DKKU2-CAHKc95s.js} +1 -1
  40. package/dist/{chunk-QN33PNHL-0K6SDYn3.js → chunk-QN33PNHL-DPBNNzpR.js} +2 -2
  41. package/dist/{chunk-QXUST7PY-DMhsRpYK.js → chunk-QXUST7PY-DtC2t9Mk.js} +10 -10
  42. package/dist/{chunk-QZHKN3VN-DRjXVwuJ.js → chunk-QZHKN3VN-Dym5BS7y.js} +1 -1
  43. package/dist/{chunk-S3R3BYOJ-oAe3dEbO.js → chunk-S3R3BYOJ-BdgLc8AM.js} +4 -4
  44. package/dist/{chunk-SJTYNZTY-BkJrPRFC.js → chunk-SJTYNZTY-DnXoKWpW.js} +1 -1
  45. package/dist/{chunk-TCCFYFTB-D58KeXnC.js → chunk-TCCFYFTB-DPWJa9zL.js} +1 -1
  46. package/dist/{chunk-TQ3KTPDO-D_yA_wAb.js → chunk-TQ3KTPDO-CsDx6v37.js} +1 -1
  47. package/dist/{chunk-TZMSLE5B-yBKS_DQU.js → chunk-TZMSLE5B-BzSHcq-K.js} +3 -3
  48. package/dist/{chunk-UMXZTB3W-D7uwvNjd.js → chunk-UMXZTB3W-D1uHz8MN.js} +1 -1
  49. package/dist/classDiagram-2ON5EDUG-BiQPjMNY.js +30 -0
  50. package/dist/classDiagram-v2-WZHVMYZB-YHdR8fqM.js +30 -0
  51. package/dist/{clike-DTxNUn7l.js → clike-7lgyEYRk.js} +1 -1
  52. package/dist/clojure-CUybM11R.js +4 -0
  53. package/dist/cmake-BPjGcuDL.js +4 -0
  54. package/dist/cobol-BETk_nb6.js +4 -0
  55. package/dist/{code-block-37QAKDTI-O6IH6wAi.js → code-block-37QAKDTI-MSxEjskJ.js} +1 -1
  56. package/dist/{code-visibility-Dpab3kCj.js → code-visibility-yIEEWI5w.js} +1554 -1471
  57. package/dist/coffeescript-CManZxXL.js +4 -0
  58. package/dist/commonlisp-DWkn7GW8.js +4 -0
  59. package/dist/{copy-COam1EG7.js → copy-Cs3yt6Vt.js} +2 -2
  60. package/dist/{cose-bilkent-S5V4N54A-kjoZoid4.js → cose-bilkent-S5V4N54A-BYj0aL7z.js} +2 -2
  61. package/dist/crystal-CCbg5EUH.js +4 -0
  62. package/dist/css-By8eo-XS.js +4 -0
  63. package/dist/cypher-DwfHg3nP.js +4 -0
  64. package/dist/d-Brs1wNbw.js +4 -0
  65. package/dist/{dagre-6UL2VRFP-J0JKgwOt.js → dagre-6UL2VRFP-DpYjBqQs.js} +11 -11
  66. package/dist/{data-grid-overlay-editor-C6lxUJp-.js → data-grid-overlay-editor-BWRG2b_o.js} +2 -2
  67. package/dist/{constants-T20xxyNf.js → debounce-BOD3DbfP.js} +1 -24
  68. package/dist/{diagram-PSM6KHXK-DYgJuNk9.js → diagram-PSM6KHXK-D4ftnaua.js} +22 -22
  69. package/dist/{diagram-QEK2KX5R-CKdBR2sb.js → diagram-QEK2KX5R-DVlUOgs1.js} +17 -17
  70. package/dist/{diagram-S2PKOQOG-Dpi7mo5W.js → diagram-S2PKOQOG-CGh4OMEV.js} +17 -17
  71. package/dist/diff-DJIRmJ1g.js +4 -0
  72. package/dist/{dist-DyyjKEYf.js → dist-3NCqaWjt.js} +2 -2
  73. package/dist/{dist-D-W5ny5a.js → dist-4lVIWUT3.js} +1 -1
  74. package/dist/dist-5o9uz19x.js +5 -0
  75. package/dist/{dist-GZXUmt0b.js → dist-B2jmQKKx.js} +2 -2
  76. package/dist/{dist--2Bqjvs0.js → dist-B96tMAst.js} +2 -2
  77. package/dist/{dist-BaoDKvdy.js → dist-BCX980mU.js} +2 -2
  78. package/dist/{dist-DMjWuVs8.js → dist-BIEt-mlF.js} +1 -1
  79. package/dist/{dist-BR_gyG9L.js → dist-BO5HRiTf.js} +2 -2
  80. package/dist/{dist-Dv_Y15yk.js → dist-BOMbzyb3.js} +85 -85
  81. package/dist/{dist-CIYBwstr.js → dist-BP39XM8u.js} +1 -1
  82. package/dist/{dist-DZo4nSS0.js → dist-BPF0gTRZ.js} +6 -6
  83. package/dist/{dist-BSAt6RhH.js → dist-BTdrwBWP.js} +22 -22
  84. package/dist/{dist-BY018Paw.js → dist-BdqCKQ1O.js} +2 -2
  85. package/dist/dist-BpDH0DEP.js +5 -0
  86. package/dist/dist-BpXhbQXO.js +8 -0
  87. package/dist/{dist-CcWX6tmx.js → dist-BpeiYpG2.js} +2 -2
  88. package/dist/{dist-A2846XWO.js → dist-BwhXBwMd.js} +1 -1
  89. package/dist/dist-ByadAk_L.js +5 -0
  90. package/dist/{dist-abid3KgM.js → dist-C18MUWTj.js} +2 -2
  91. package/dist/{dist-DZORgqKY.js → dist-C2_4pjuS.js} +1 -1
  92. package/dist/{dist-BzEzfugY.js → dist-CFSb_Frm.js} +1 -1
  93. package/dist/dist-CK0g7JvP.js +8 -0
  94. package/dist/{dist-C_Y3oV3C.js → dist-CRmSjkLP.js} +2 -2
  95. package/dist/{dist-hT4QzYX-.js → dist-CSlJrrAw.js} +86 -81
  96. package/dist/{dist-Du8WkPuU.js → dist-CV79CsQ0.js} +2 -2
  97. package/dist/dist-CfzCtiq2.js +5 -0
  98. package/dist/{dist-CoXAujgg.js → dist-D3bdsa1d.js} +4 -4
  99. package/dist/dist-D8JtVFrW.js +8 -0
  100. package/dist/dist-DK2Oocpu.js +6 -0
  101. package/dist/{dist-LTU8Hdvn.js → dist-DZwp8lro.js} +3 -3
  102. package/dist/{dist-t9Kf7xqC.js → dist-DaXJPX8F.js} +2 -2
  103. package/dist/{dist-U4F-tbMs.js → dist-De-GlSAs.js} +246 -184
  104. package/dist/{dist-M9Vag9Y0.js → dist-DgjbnqTg.js} +125 -125
  105. package/dist/dist-DnSu977r.js +5 -0
  106. package/dist/{dist-CxJDU6Bh.js → dist-DviUBLUp.js} +4 -4
  107. package/dist/{dist-CpxNdDkw.js → dist-DwqBJ014.js} +2 -2
  108. package/dist/{dist-Bf7SHuNp.js → dist-JGehap7K.js} +5 -5
  109. package/dist/{dist-Bk75fBZA.js → dist-LpLXa9Lb.js} +2 -2
  110. package/dist/{dist-Bf9f8MuT.js → dist-SXNmlE8A.js} +1 -1
  111. package/dist/dist-UmxJm6sW.js +8 -0
  112. package/dist/dist-aYSBQSyM.js +5 -0
  113. package/dist/dist-kkZ1Ztlh.js +6 -0
  114. package/dist/dist-ngPczwNi.js +5 -0
  115. package/dist/{dist-DgGbNavJ.js → dist-pqIwD8VD.js} +2 -2
  116. package/dist/dist-wQRyxyTV.js +5 -0
  117. package/dist/{dist-Dax--nl9.js → dist-w_gWE5Wf.js} +1 -1
  118. package/dist/{dockerfile-twL37N91.js → dockerfile-B82Pkz_V.js} +1 -1
  119. package/dist/dtd-Dyiazv4N.js +4 -0
  120. package/dist/dylan-D8Fcw7NA.js +4 -0
  121. package/dist/ecl-CjKp8Vii.js +4 -0
  122. package/dist/eiffel-K9ViOX5r.js +4 -0
  123. package/dist/elm-B5NVtRco.js +4 -0
  124. package/dist/{erDiagram-Q2GNP2WA-BU-m41EQ.js → erDiagram-Q2GNP2WA-BcKAHFqF.js} +15 -15
  125. package/dist/erlang-BnLzgk7R.js +4 -0
  126. package/dist/{error-banner-DFPfz_Qf.js → error-banner-DR7o3CbX.js} +68 -68
  127. package/dist/{esm-ga2Bf3O2.js → esm-DKOv6P2M.js} +424 -424
  128. package/dist/esm-k8PIvuZW.js +1180 -0
  129. package/dist/{extends-9MVIxxRo.js → extends-Cq2JYHKy.js} +36 -20
  130. package/dist/{factor-CajWS6mS.js → factor-Bq2mGIHt.js} +1 -1
  131. package/dist/factor-C7f9Jz5R.js +4 -0
  132. package/dist/{flowDiagram-NV44I4VS-CRoXKjGq.js → flowDiagram-NV44I4VS-BRhSg-ro.js} +17 -17
  133. package/dist/{formats-Dzx4J_z1.js → formats-BFhkZJwd.js} +3 -3
  134. package/dist/forth-rGM8jLao.js +4 -0
  135. package/dist/fortran-B3acSe0i.js +4 -0
  136. package/dist/{ganttDiagram-JELNMOA3-7mq5f9cO.js → ganttDiagram-JELNMOA3-CXXCN7LN.js} +10 -10
  137. package/dist/gas-Bb1Vmv_N.js +4 -0
  138. package/dist/gherkin-C9Lyidgd.js +4 -0
  139. package/dist/{gitGraph-G5XIXVHT-DiniR35k.js → gitGraph-G5XIXVHT-BjTx0kww.js} +3 -3
  140. package/dist/{gitGraphDiagram-V2S2FVAM-Dfuokq6w.js → gitGraphDiagram-V2S2FVAM-BOlkMSqK.js} +17 -17
  141. package/dist/{glide-data-editor-CjTu7ukN.js → glide-data-editor--CaN-f27.js} +13 -13
  142. package/dist/groovy-DQk6XcGH.js +4 -0
  143. package/dist/haskell-mV0Vw9gv.js +4 -0
  144. package/dist/haxe-DqxN89zH.js +5 -0
  145. package/dist/{html-to-image-_wGfk8V-.js → html-to-image-DDENewl2.js} +2649 -2607
  146. package/dist/idl-ya8W561J.js +4 -0
  147. package/dist/{info-VBDWY6EO-DVZvGhkQ.js → info-VBDWY6EO-CA67FznA.js} +3 -3
  148. package/dist/infoDiagram-HS3SLOUP-D3TyKnL_.js +30 -0
  149. package/dist/{input-DtsN7xm-.js → input-DStQIuqD.js} +51 -51
  150. package/dist/javascript-CgqgptVu.js +4 -0
  151. package/dist/{journeyDiagram-XKPGCS4Q-8XYSU1GI.js → journeyDiagram-XKPGCS4Q-DEal0aT1.js} +7 -7
  152. package/dist/julia-CFQ-HusI.js +4 -0
  153. package/dist/{kanban-definition-3W4ZIXB7--9pT9z1R.js → kanban-definition-3W4ZIXB7-Dl90wENN.js} +12 -12
  154. package/dist/{katex-9-9QRhxz.js → katex-C4t-BmrK.js} +1 -1
  155. package/dist/{label-WfTSU8L4.js → label-DIk0QoFe.js} +2 -2
  156. package/dist/{line-C5s_12ee.js → line-C43FIPBd.js} +3 -3
  157. package/dist/{linear-B5-AFRiR.js → linear-H_vsH9ao.js} +4 -4
  158. package/dist/livescript-D__3TmDo.js +4 -0
  159. package/dist/{loader-Boph2xIS.js → loader-CTHCI-qe.js} +5 -16
  160. package/dist/lua-Bytcgj_W.js +4 -0
  161. package/dist/main.js +2217 -2116
  162. package/dist/mathematica-DJhvVKvl.js +4 -0
  163. package/dist/mbox-IGHPCjfR.js +4 -0
  164. package/dist/{mermaid-4DMBBIKO-Eg3D4FVz.js → mermaid-4DMBBIKO-FXbOziy9.js} +1 -1
  165. package/dist/{mermaid-BYqXy_NE.js → mermaid-CdSvixW2.js} +47 -47
  166. package/dist/{mermaid-parser.core-C3XRsazI.js → mermaid-parser.core-DoivvxPd.js} +8 -8
  167. package/dist/{mhchem-yiCCuiEF.js → mhchem-EGhUZR1V.js} +1 -1
  168. package/dist/{mindmap-definition-VGOIOE7T-B-4mnfFG.js → mindmap-definition-VGOIOE7T-CCDupjWW.js} +14 -14
  169. package/dist/mirc-tcwvVugm.js +4 -0
  170. package/dist/mllike-Dx91i62r.js +6 -0
  171. package/dist/modelica-_SRt-yU5.js +4 -0
  172. package/dist/mscgen-GZrGS9gt.js +6 -0
  173. package/dist/mumps-Cv3ygyod.js +4 -0
  174. package/dist/nsis-BU7GeGbI.js +4 -0
  175. package/dist/{nsis-ClF3r5Tr.js → nsis-i9_sgigf.js} +1 -1
  176. package/dist/ntriples-CL-FCYXb.js +4 -0
  177. package/dist/{number-overlay-editor-BLJXvX9c.js → number-overlay-editor-Ck_mc_gT.js} +1 -1
  178. package/dist/objects-De59twF-.js +56 -0
  179. package/dist/octave-Dc6_3DIu.js +4 -0
  180. package/dist/{ordinal-ArJavP1Q.js → ordinal-Bkv2-veX.js} +1 -1
  181. package/dist/oz-DpUAJCXf.js +4 -0
  182. package/dist/{packet-DYOGHKS2-34raHOiB.js → packet-DYOGHKS2-Bkgofxf3.js} +3 -3
  183. package/dist/pascal-B17mncXs.js +4 -0
  184. package/dist/perl-BTpK97q9.js +4 -0
  185. package/dist/{pie-VRWISCQL-BaLlzZa3.js → pie-VRWISCQL-B1AMhN_7.js} +3 -3
  186. package/dist/{pieDiagram-ADFJNKIX-Cr3cNpZY.js → pieDiagram-ADFJNKIX-JvXG_6hk.js} +22 -22
  187. package/dist/pig-CFb638Ap.js +4 -0
  188. package/dist/powershell-Cxo-_2A5.js +4 -0
  189. package/dist/{precisionRound-Tqb4mg-H.js → precisionRound-CnHPY_5v.js} +1 -1
  190. package/dist/{process-output-Mh4UrjwM.js → process-output-2QPcgBQg.js} +4 -4
  191. package/dist/properties-BPgT1xTB.js +4 -0
  192. package/dist/protobuf-BgHBaIIK.js +4 -0
  193. package/dist/pug-25-oS0SG.js +4 -0
  194. package/dist/{pug-B_rby2yb.js → pug-BhE2JRSg.js} +1 -1
  195. package/dist/puppet-DarIr20S.js +4 -0
  196. package/dist/purify.es-EnR5yhgI.js +783 -0
  197. package/dist/python-BqmOsBsi.js +4 -0
  198. package/dist/q-D3QJCTup.js +4 -0
  199. package/dist/{quadrantDiagram-AYHSOK5B-BuNL8Q93.js → quadrantDiagram-AYHSOK5B-BqDB9tUC.js} +5 -5
  200. package/dist/r-Cz_yBX4z.js +4 -0
  201. package/dist/{radar-ZZBFDIW7-Ci7bfoZa.js → radar-ZZBFDIW7-C2b7A32s.js} +3 -3
  202. package/dist/{react-vega-B0sAlDTL.js → react-vega-BazDALhI.js} +469 -469
  203. package/dist/{requirementDiagram-UZGBJVZJ-BG2lLUN1.js → requirementDiagram-UZGBJVZJ-KbVt8SPH.js} +14 -14
  204. package/dist/{reveal-component-BfYO8h-9.js → reveal-component-CCyp8KHw.js} +629 -622
  205. package/dist/rpm-DGOtYwAI.js +5 -0
  206. package/dist/ruby-DBZu4rPc.js +4 -0
  207. package/dist/{sankeyDiagram-TZEHDZUN-DMal8sps.js → sankeyDiagram-TZEHDZUN-DgkF38jx.js} +5 -5
  208. package/dist/sas-Dd1D9qTq.js +4 -0
  209. package/dist/scheme-BmDjvTHX.js +4 -0
  210. package/dist/{sequenceDiagram-WL72ISMW-DT6Tk-Eo.js → sequenceDiagram-WL72ISMW-BDmx9n95.js} +8 -8
  211. package/dist/shell-BL8zFSaj.js +4 -0
  212. package/dist/sieve-BAx2WqUP.js +4 -0
  213. package/dist/smalltalk-CYRzF7VV.js +4 -0
  214. package/dist/sparql-YWaDRO4A.js +4 -0
  215. package/dist/{spec-Cz-Bj1JI.js → spec-CnaxwDqy.js} +4 -4
  216. package/dist/{src-Bf2iLOlr.js → src-DV3ha_nA.js} +1 -1
  217. package/dist/{stateDiagram-FKZM4ZOC-CB_lodq3.js → stateDiagram-FKZM4ZOC-ByOvQf2n.js} +17 -17
  218. package/dist/stateDiagram-v2-4FDKWEC3-C3xqeavR.js +29 -0
  219. package/dist/{step-CWipAYTY.js → step-BqHnkgWE.js} +1 -1
  220. package/dist/stex-B5O-env2.js +4 -0
  221. package/dist/{strings-Dq_j3Rxw.js → strings-BYAhZnQi.js} +354 -354
  222. package/dist/style.css +1 -1
  223. package/dist/stylus-lYsyLFc1.js +4 -0
  224. package/dist/swift-ClQz9z1n.js +4 -0
  225. package/dist/{swiper-component-5HoSsPi1.js → swiper-component-DE94711u.js} +4 -4
  226. package/dist/tcl-B3jhsfqY.js +4 -0
  227. package/dist/textile-Cb1Dw7Aq.js +4 -0
  228. package/dist/{time-CsmIF9YZ.js → time-Bb4A7I6a.js} +4 -4
  229. package/dist/{timeline-definition-IT6M3QCI-NfSKRvH0.js → timeline-definition-IT6M3QCI-CkD_trIn.js} +4 -4
  230. package/dist/{toDate-CWNNlFEX.js → toDate-B3IRfHhw.js} +16 -7
  231. package/dist/toml-nHZhetdO.js +4 -0
  232. package/dist/{tooltip-Czds6Qr8.js → tooltip-B-qh7UPB.js} +3 -3
  233. package/dist/{treemap-GDKQZRPO-Cl6OQh8D.js → treemap-GDKQZRPO-SDux0AV8.js} +3 -3
  234. package/dist/troff-DuJAGWKH.js +4 -0
  235. package/dist/ttcn-BxrcwP21.js +4 -0
  236. package/dist/ttcn-cfg-BAg_9dcc.js +4 -0
  237. package/dist/turtle-zCq949as.js +4 -0
  238. package/dist/{types-C2Ir191_.js → types-DQl7jVYK.js} +1 -1
  239. package/dist/use-vega-container-remeasure-DGNrIQSk.js +27 -0
  240. package/dist/{useAsyncData-KfHB8wQR.js → useAsyncData-CvO8WUy3.js} +1 -1
  241. package/dist/{useDateFormatter-CMnRuVmN.js → useDateFormatter-BSoGim-G.js} +2 -2
  242. package/dist/{useDeepCompareMemoize-nJMtxhm4.js → useDeepCompareMemoize-J3MKRdA4.js} +1 -1
  243. package/dist/{useIframeCapabilities-DWIYvDh7.js → useIframeCapabilities-POcFXHbw.js} +1 -1
  244. package/dist/{useLifecycle-DegSo0lV.js → useLifecycle-DqPxHgAN.js} +3 -3
  245. package/dist/{useTheme-6eZ3GOTS.js → useTheme-XMq9mNf_.js} +65 -29
  246. package/dist/vb-De5hElus.js +4 -0
  247. package/dist/vbscript-Cypcpv4F.js +4 -0
  248. package/dist/{vega-component-DzyyM9fc.js → vega-component-CrFoZT1S.js} +225 -223
  249. package/dist/vega-embed-container-DAQAMjiO.js +22 -0
  250. package/dist/vega-loader.browser-DmpxCJqx.js +1353 -0
  251. package/dist/velocity-Di7l-yhe.js +4 -0
  252. package/dist/verilog-Bzi-S3g2.js +4 -0
  253. package/dist/vhdl-B0ZZITaW.js +4 -0
  254. package/dist/webidl-0sviiRcN.js +4 -0
  255. package/dist/xquery-B4qMVWaB.js +4 -0
  256. package/dist/{xychartDiagram-PRI3JC2R-BvwftqMA.js → xychartDiagram-PRI3JC2R-BSkNxYNw.js} +13 -13
  257. package/dist/yacas-Jt25Fuv8.js +4 -0
  258. package/dist/z80-CrcbYzmp.js +4 -0
  259. package/dist/{zod-CijjQh4u.js → zod-D0yOqoGe.js} +26 -26
  260. package/package.json +3 -1
  261. package/src/__mocks__/requests.ts +3 -0
  262. package/src/components/charts/lazy.tsx +3 -1
  263. package/src/components/charts/vega-embed-container.tsx +18 -0
  264. package/src/components/chat/__tests__/chat-utils.test.ts +244 -1
  265. package/src/components/chat/__tests__/message-queue.test.tsx +121 -0
  266. package/src/components/chat/chat-panel.tsx +196 -67
  267. package/src/components/chat/chat-utils.ts +111 -2
  268. package/src/components/editor/RecoveryButton.tsx +2 -2
  269. package/src/components/editor/SortableCell.tsx +6 -2
  270. package/src/components/editor/__tests__/output-persistence.test.tsx +241 -0
  271. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +153 -0
  272. package/src/components/editor/actions/pair-with-agent-commands.ts +109 -0
  273. package/src/components/editor/actions/pair-with-agent-modal.tsx +20 -64
  274. package/src/components/editor/actions/useNotebookActions.tsx +8 -0
  275. package/src/components/editor/ai/add-cell-with-ai.tsx +14 -5
  276. package/src/components/editor/ai/ai-completion-editor.tsx +4 -1
  277. package/src/components/editor/cell/cell-context-menu.tsx +7 -0
  278. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +221 -0
  279. package/src/components/editor/chrome/components/feedback-button.tsx +308 -77
  280. package/src/components/editor/chrome/panels/packages-panel.tsx +11 -1
  281. package/src/components/editor/chrome/panels/write-secret-modal.tsx +3 -2
  282. package/src/components/editor/columns/__tests__/cell-column.test.tsx +105 -0
  283. package/src/components/editor/columns/cell-column.tsx +34 -4
  284. package/src/components/editor/columns/sortable-column.tsx +24 -4
  285. package/src/components/editor/connections/__tests__/secret-combobox.test.ts +134 -0
  286. package/src/components/editor/connections/database/schemas.ts +35 -27
  287. package/src/components/editor/connections/form-renderers.tsx +42 -110
  288. package/src/components/editor/connections/secret-combobox.tsx +253 -0
  289. package/src/components/editor/connections/storage/schemas.ts +12 -6
  290. package/src/components/editor/file-tree/download.ts +46 -0
  291. package/src/components/editor/file-tree/file-explorer.tsx +3 -21
  292. package/src/components/editor/file-tree/file-viewer.tsx +4 -27
  293. package/src/components/editor/navigation/__tests__/navigation.test.ts +33 -0
  294. package/src/components/editor/navigation/navigation.ts +8 -1
  295. package/src/components/editor/notebook-cell.tsx +203 -106
  296. package/src/components/editor/renderers/__tests__/cells-renderer.test.tsx +66 -0
  297. package/src/components/editor/renderers/cell-array.tsx +26 -13
  298. package/src/components/editor/renderers/cells-renderer.tsx +8 -2
  299. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +29 -0
  300. package/src/components/editor/renderers/slides-layout/types.ts +4 -0
  301. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +19 -19
  302. package/src/components/slides/reveal-component.tsx +37 -17
  303. package/src/components/slides/slide-form.tsx +72 -0
  304. package/src/components/ui/toast.tsx +11 -3
  305. package/src/components/ui/toaster.tsx +65 -9
  306. package/src/core/ai/context/providers/error.ts +6 -158
  307. package/src/core/cells/__tests__/utils.test.ts +59 -0
  308. package/src/core/cells/utils.ts +51 -0
  309. package/src/core/codemirror/completion/__tests__/signature-hint.test.ts +97 -3
  310. package/src/core/codemirror/completion/signature-hint.ts +78 -11
  311. package/src/core/constants.ts +8 -0
  312. package/src/core/diagnostics/__tests__/issue-details.test.ts +173 -0
  313. package/src/core/diagnostics/issue-details.ts +139 -0
  314. package/src/core/errors/__tests__/error-entries.test.ts +25 -0
  315. package/src/core/errors/error-entries.ts +176 -0
  316. package/src/core/islands/__tests__/bridge.test.ts +341 -46
  317. package/src/core/islands/__tests__/main.test.ts +176 -0
  318. package/src/core/islands/__tests__/parse.test.ts +105 -0
  319. package/src/core/islands/bootstrap.ts +8 -3
  320. package/src/core/islands/bridge.ts +117 -23
  321. package/src/core/islands/components/__tests__/web-components.test.tsx +214 -0
  322. package/src/core/islands/components/web-components.tsx +76 -15
  323. package/src/core/islands/constants.ts +1 -0
  324. package/src/core/islands/main.ts +69 -3
  325. package/src/core/islands/parse.ts +70 -23
  326. package/src/core/islands/worker/__tests__/controller.test.ts +173 -0
  327. package/src/core/islands/worker/worker.tsx +145 -57
  328. package/src/core/network/__tests__/requests-lazy.test.ts +18 -0
  329. package/src/core/network/__tests__/requests-network.test.ts +7 -0
  330. package/src/core/network/requests-lazy.ts +13 -1
  331. package/src/core/network/requests-network.ts +3 -0
  332. package/src/core/network/requests-static.ts +1 -0
  333. package/src/core/network/requests-toasting.tsx +1 -0
  334. package/src/core/network/types.ts +3 -0
  335. package/src/core/runtime/__tests__/runtime.test.ts +64 -0
  336. package/src/core/runtime/runtime.ts +30 -10
  337. package/src/core/wasm/bridge.ts +8 -0
  338. package/src/core/wasm/worker/bootstrap.ts +113 -20
  339. package/src/core/wasm/worker/types.ts +2 -0
  340. package/src/css/app/Cell.css +10 -0
  341. package/src/hooks/__tests__/useHotkey.test.tsx +88 -0
  342. package/src/hooks/useHotkey.ts +29 -4
  343. package/src/plugins/impl/anywidget/__tests__/host.test.ts +6 -9
  344. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +3 -1
  345. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +32 -61
  346. package/src/plugins/impl/anywidget/model-proxy.ts +0 -13
  347. package/src/plugins/impl/anywidget/runtime.ts +1 -0
  348. package/src/plugins/impl/anywidget/widget-binding.ts +8 -34
  349. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +53 -2
  350. package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +71 -0
  351. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +102 -0
  352. package/src/plugins/impl/vega/use-vega-container-remeasure.ts +39 -0
  353. package/src/plugins/impl/vega/vega-component.tsx +5 -4
  354. package/src/theme/__tests__/useTheme.test.ts +68 -0
  355. package/src/theme/useTheme.ts +16 -1
  356. package/dist/apl-Bdc61P1y.js +0 -4
  357. package/dist/architecture-7HQA4BMR-Kyc44TmC.js +0 -6
  358. package/dist/asciiarmor-DVRHDGzT.js +0 -4
  359. package/dist/asn1-BmuKfkfu.js +0 -4
  360. package/dist/assets/__vite-browser-external-BQCLNwri.js +0 -1
  361. package/dist/assets/worker-DAWRHcPq.js +0 -73
  362. package/dist/brainfuck-DPrRpyTV.js +0 -4
  363. package/dist/classDiagram-2ON5EDUG-QjoAcuFE.js +0 -30
  364. package/dist/classDiagram-v2-WZHVMYZB-bUCv4gu2.js +0 -30
  365. package/dist/clojure-DEttQW5T.js +0 -4
  366. package/dist/cmake-jNlx_DaM.js +0 -4
  367. package/dist/cobol-BvvIm5MJ.js +0 -4
  368. package/dist/coffeescript-DTpBMyFU.js +0 -4
  369. package/dist/commonlisp-BmmUG8jb.js +0 -4
  370. package/dist/crystal-BxyqmEWC.js +0 -4
  371. package/dist/css-BGoCtuG3.js +0 -4
  372. package/dist/cypher-BmCbdl3u.js +0 -4
  373. package/dist/d-CFrlbjZt.js +0 -4
  374. package/dist/diff-D6XwL6P8.js +0 -4
  375. package/dist/dist-7QfXoMdB.js +0 -5
  376. package/dist/dist-BEXXyZig.js +0 -5
  377. package/dist/dist-BYj57OV4.js +0 -5
  378. package/dist/dist-BlSvQzNr.js +0 -5
  379. package/dist/dist-CCBlxAgS.js +0 -8
  380. package/dist/dist-CIDTVIUf.js +0 -5
  381. package/dist/dist-CqQyhAM8.js +0 -8
  382. package/dist/dist-CwRu2Xzh.js +0 -5
  383. package/dist/dist-D8CDTVgf.js +0 -6
  384. package/dist/dist-D8DNB0nO.js +0 -8
  385. package/dist/dist-DL6N_q-A.js +0 -5
  386. package/dist/dist-DOFbNV_b.js +0 -8
  387. package/dist/dist-DPrYzMY0.js +0 -6
  388. package/dist/dist-cdmMjgsn.js +0 -5
  389. package/dist/dtd-Bw0lRN0-.js +0 -4
  390. package/dist/dylan-B55eBHTt.js +0 -4
  391. package/dist/ecl-C8G4p0wn.js +0 -4
  392. package/dist/eiffel-BmH46VJl.js +0 -4
  393. package/dist/elm-DhzeFqkl.js +0 -4
  394. package/dist/erlang-CY-wdlsU.js +0 -4
  395. package/dist/esm-M837UxV5.js +0 -1171
  396. package/dist/factor-DWkgl0xw.js +0 -4
  397. package/dist/forth-Cij_ie2t.js +0 -4
  398. package/dist/fortran-Br3X9cfm.js +0 -4
  399. package/dist/gas-DYsGcMN2.js +0 -4
  400. package/dist/gherkin-eVgXQ0fQ.js +0 -4
  401. package/dist/groovy-_NFHIXG7.js +0 -4
  402. package/dist/haskell-D6xNG_bH.js +0 -4
  403. package/dist/haxe-sU_rzAwn.js +0 -5
  404. package/dist/idl-Ds_VbrUx.js +0 -4
  405. package/dist/infoDiagram-HS3SLOUP-CEnzWruK.js +0 -30
  406. package/dist/javascript-CztfIl0i.js +0 -4
  407. package/dist/julia-DDv40QMV.js +0 -4
  408. package/dist/livescript-BEOngLLc.js +0 -4
  409. package/dist/lua-9-7BhQ4Y.js +0 -4
  410. package/dist/mathematica-DDa0Pfxm.js +0 -4
  411. package/dist/mbox-iO03mmoE.js +0 -4
  412. package/dist/mirc-C9z5LT4X.js +0 -4
  413. package/dist/mllike-jGJbdm_C.js +0 -6
  414. package/dist/modelica-DzF7oIEL.js +0 -4
  415. package/dist/mscgen-DB-u125o.js +0 -6
  416. package/dist/mumps-CRTFHhzh.js +0 -4
  417. package/dist/nsis-C4NPTuox.js +0 -4
  418. package/dist/ntriples-BCOoGph1.js +0 -4
  419. package/dist/octave-DTwNlazz.js +0 -4
  420. package/dist/oz-DD38AzSz.js +0 -4
  421. package/dist/pascal-BohSp9jV.js +0 -4
  422. package/dist/perl-f5OutoPM.js +0 -4
  423. package/dist/pig-Dv7wSmHb.js +0 -4
  424. package/dist/powershell-rYgjKB39.js +0 -4
  425. package/dist/properties-BFUNLRDN.js +0 -4
  426. package/dist/protobuf-B9QJQPPv.js +0 -4
  427. package/dist/pug-DzvWpaMC.js +0 -4
  428. package/dist/puppet-B_K-n_xK.js +0 -4
  429. package/dist/purify.es-H92eMd9-.js +0 -557
  430. package/dist/python-CAiFcaA2.js +0 -4
  431. package/dist/q-cLeFIBLK.js +0 -4
  432. package/dist/r-04Y-Wco3.js +0 -4
  433. package/dist/react-vega-B6ncY2Tp.js +0 -9
  434. package/dist/rpm-FUdrIia9.js +0 -5
  435. package/dist/ruby-DMjFXuEW.js +0 -4
  436. package/dist/sas-DzHZxjXK.js +0 -4
  437. package/dist/scheme-DxHd_Rb9.js +0 -4
  438. package/dist/shell-C8Kwypgf.js +0 -4
  439. package/dist/sieve-DdyqOKXZ.js +0 -4
  440. package/dist/smalltalk-pB7X1D9y.js +0 -4
  441. package/dist/sparql-NhBO6oOa.js +0 -4
  442. package/dist/stateDiagram-v2-4FDKWEC3-E0RGjKsm.js +0 -29
  443. package/dist/stex-KfRnSHzF.js +0 -4
  444. package/dist/stylus-SfWSnzPv.js +0 -4
  445. package/dist/swift-jRPdq2zR.js +0 -4
  446. package/dist/tcl-_hpTHGX3.js +0 -4
  447. package/dist/textile-C9h8slqH.js +0 -4
  448. package/dist/toml-DWvtinD4.js +0 -4
  449. package/dist/troff-Dwo_A0y7.js +0 -4
  450. package/dist/ttcn-V--CPFKq.js +0 -4
  451. package/dist/ttcn-cfg-CPSMchTG.js +0 -4
  452. package/dist/turtle-B4rPGBWu.js +0 -4
  453. package/dist/vb-DaMBBd4j.js +0 -4
  454. package/dist/vbscript-BMJQqcE2.js +0 -4
  455. package/dist/vega-loader.browser-CZ-J8Py3.js +0 -1321
  456. package/dist/velocity-CGq2QRq2.js +0 -4
  457. package/dist/verilog-CUNo8F5u.js +0 -4
  458. package/dist/vhdl-CCzA0msW.js +0 -4
  459. package/dist/webidl-CqIMDIBL.js +0 -4
  460. package/dist/xquery-XC5Kbr-1.js +0 -4
  461. package/dist/yacas-CGOv7Dzy.js +0 -4
  462. package/dist/z80-CXhVmi-f.js +0 -4
  463. /package/dist/{Plot-CAYS29h9.js → Plot-YQOuVIei.js} +0 -0
  464. /package/dist/{apl-BCgCq9iM.js → apl-99A7dLQe.js} +0 -0
  465. /package/dist/{array-tvvEqPy7.js → array-O78LT16Y.js} +0 -0
  466. /package/dist/{asciiarmor-BtqU-KJQ.js → asciiarmor-DLEhpFDx.js} +0 -0
  467. /package/dist/{asn1-Dmb-dTMx.js → asn1-CMrcTsT4.js} +0 -0
  468. /package/dist/{asterisk-DaVJJDnV.js → asterisk-CqykImq7.js} +0 -0
  469. /package/dist/{brainfuck-C1HoZKlE.js → brainfuck-ChPt5yBe.js} +0 -0
  470. /package/dist/{chunk-DR5Q36YT-BflwErH1.js → chunk-DR5Q36YT-5Yp2GWwR.js} +0 -0
  471. /package/dist/{click-outside-container-BLPjMamz.js → click-outside-container-BSIeYt4y.js} +0 -0
  472. /package/dist/{clike-CdT0yHjt.js → clike-CE0fXfM_.js} +0 -0
  473. /package/dist/{clojure-CdyrCpUv.js → clojure-QkBEMU-g.js} +0 -0
  474. /package/dist/{cmake-BFlPxym7.js → cmake-CU1jX7Mo.js} +0 -0
  475. /package/dist/{cobol-CcJXewp8.js → cobol-DMOKzzky.js} +0 -0
  476. /package/dist/{coffeescript-DnKuIKRo.js → coffeescript-DjnjLyfk.js} +0 -0
  477. /package/dist/{colors-CQAOa8cK.js → colors-DmiH1bIH.js} +0 -0
  478. /package/dist/{common-keywords-FBrXPTcz.js → common-keywords-D3nPJNQP.js} +0 -0
  479. /package/dist/{commonlisp-B-kok83Z.js → commonlisp-CYd9iOSe.js} +0 -0
  480. /package/dist/{crystal-FYRYjI1I.js → crystal-Dy55yoYG.js} +0 -0
  481. /package/dist/{css-B45lc2V3.js → css-CNU8w3HJ.js} +0 -0
  482. /package/dist/{cypher-DZMLyVY_.js → cypher-q47DGzK7.js} +0 -0
  483. /package/dist/{cytoscape.esm-ayF70frT.js → cytoscape.esm-Dr8XzXWK.js} +0 -0
  484. /package/dist/{d-x-VVT4o9.js → d-jEkaLvxX.js} +0 -0
  485. /package/dist/{defaultLocale-u-3osm0P.js → defaultLocale-BpsHxBd7.js} +0 -0
  486. /package/dist/{defaultLocale-BoHTsDG6.js → defaultLocale-DoeErsX2.js} +0 -0
  487. /package/dist/{diff-Dxe2mpXk.js → diff-vb2-unFN.js} +0 -0
  488. /package/dist/{dist-BGdYVvOu.js → dist-DsoKosxi.js} +0 -0
  489. /package/dist/{dtd-C9VM_Wfu.js → dtd-C9kR-bXa.js} +0 -0
  490. /package/dist/{duckdb-keywords-CvJhR_Yd.js → duckdb-keywords-B6HYCMOT.js} +0 -0
  491. /package/dist/{dylan-DTSnEIFO.js → dylan-BLckrK-V.js} +0 -0
  492. /package/dist/{ebnf-2D4Ctp3y.js → ebnf-Cnp3L9jg.js} +0 -0
  493. /package/dist/{ecl-N04ptnRK.js → ecl-CEsf6XVg.js} +0 -0
  494. /package/dist/{eiffel-Dd8rpqr_.js → eiffel-2KGZNzx6.js} +0 -0
  495. /package/dist/{elm-GT2E866W.js → elm-D2s3K5wF.js} +0 -0
  496. /package/dist/{emotion-is-prop-valid.esm-DzSb5hsH.js → emotion-is-prop-valid.esm-DdVSF4FD.js} +0 -0
  497. /package/dist/{erlang-Cf0Bp5pY.js → erlang-0PMFOndk.js} +0 -0
  498. /package/dist/{esm-BaaaPNGl.js → esm-CuQHjs36.js} +0 -0
  499. /package/dist/{fcl-Ccj8Z5Xd.js → fcl-D9nccAWI.js} +0 -0
  500. /package/dist/{forth-wd_XzGTg.js → forth-DG89iUsu.js} +0 -0
  501. /package/dist/{fortran-DcwUTZFe.js → fortran-ytKsAVvu.js} +0 -0
  502. /package/dist/{gas-DeALIER3.js → gas-Cg2Fm0N2.js} +0 -0
  503. /package/dist/{gherkin-CKTqaJNX.js → gherkin-B87FEnZ-.js} +0 -0
  504. /package/dist/{groovy-Bwdp_d8D.js → groovy-Dcs08AWD.js} +0 -0
  505. /package/dist/{haskell-DCdCcPLK.js → haskell-cwkOuhx6.js} +0 -0
  506. /package/dist/{haxe-DAyktQWJ.js → haxe-DWEo4q10.js} +0 -0
  507. /package/dist/{http-_DVAYWoR.js → http-B8jdG64J.js} +0 -0
  508. /package/dist/{idl-CBuZiRYu.js → idl-WWQwDcRV.js} +0 -0
  509. /package/dist/{init-uv0kkh4g.js → init-DNBbYZd_.js} +0 -0
  510. /package/dist/{javascript-DzigE11c.js → javascript-BeR74dxD.js} +0 -0
  511. /package/dist/{julia-PwfB-0Cm.js → julia-UlvCUYGL.js} +0 -0
  512. /package/dist/{katex-C_XRmjAP.js → katex-Bld7b-fk.js} +0 -0
  513. /package/dist/{livescript-BJLz1EbT.js → livescript-GPmFcmYV.js} +0 -0
  514. /package/dist/{lua-ZC-XC2jf.js → lua-DYoT_0zM.js} +0 -0
  515. /package/dist/{main-Tj_-QTyF.js → main-B1Jo_8pC.js} +0 -0
  516. /package/dist/{math-DFcdCCU8.js → math-CBNc2Ib0.js} +0 -0
  517. /package/dist/{mathematica-DCYMx6qB.js → mathematica-DSFIQlbG.js} +0 -0
  518. /package/dist/{mbox-OxMK_9XI.js → mbox-ej8lFMdL.js} +0 -0
  519. /package/dist/{micromark-factory-space-DF2w36zS.js → micromark-factory-space-CwHmg6iz.js} +0 -0
  520. /package/dist/{mirc-nJVyhA0H.js → mirc-CAdIdvHQ.js} +0 -0
  521. /package/dist/{mllike-DRO89bsU.js → mllike-CjTB1lHF.js} +0 -0
  522. /package/dist/{modelica-Don3E6ZD.js → modelica-BB68FYMa.js} +0 -0
  523. /package/dist/{mscgen-DJfqD3bN.js → mscgen-BkbzgGGI.js} +0 -0
  524. /package/dist/{mumps-SjGTvDYL.js → mumps-Cu-28E9F.js} +0 -0
  525. /package/dist/{nginx-DasThI7R.js → nginx-C1ofKPst.js} +0 -0
  526. /package/dist/{node-sql-parser-B8nBD36q.js → node-sql-parser-DLl_zNw0.js} +0 -0
  527. /package/dist/{ntriples-CNBKRl3I.js → ntriples-D9cQiZxZ.js} +0 -0
  528. /package/dist/{octave-DdeVHNlx.js → octave-BvtAnPX0.js} +0 -0
  529. /package/dist/{once-DPuqGUeo.js → once-B60G2fuJ.js} +0 -0
  530. /package/dist/{oz-CcKSoNvN.js → oz-COaVHk2E.js} +0 -0
  531. /package/dist/{pascal-6leftwNj.js → pascal-BFpqVD2x.js} +0 -0
  532. /package/dist/{path-BGaWgPKg.js → path-DwWbhZFI.js} +0 -0
  533. /package/dist/{perl-BhJIwWzN.js → perl-DaiORxHP.js} +0 -0
  534. /package/dist/{pig-r-xDHqRf.js → pig-DFzRhmsF.js} +0 -0
  535. /package/dist/{powershell-D-BELeNi.js → powershell-BG2LQNKN.js} +0 -0
  536. /package/dist/{properties-CnuDhbll.js → properties-CqJJR5QY.js} +0 -0
  537. /package/dist/{protobuf-CO8RBhvX.js → protobuf-WwDYV1yY.js} +0 -0
  538. /package/dist/{puppet-NmXHjLy8.js → puppet-QNY3w_uN.js} +0 -0
  539. /package/dist/{python-DAQXi720.js → python-4QrQ3Ugi.js} +0 -0
  540. /package/dist/{q-DlikXfV0.js → q-DhwXuxE2.js} +0 -0
  541. /package/dist/{r-CuohilwT.js → r-Df-nkR25.js} +0 -0
  542. /package/dist/{range-C-rmrM1O.js → range-BOiA8qqU.js} +0 -0
  543. /package/dist/{rpm-0Pjwp0Pb.js → rpm-Cokue07s.js} +0 -0
  544. /package/dist/{ruby-Dq8NJTDG.js → ruby-DrYcL3qF.js} +0 -0
  545. /package/dist/{sas-CuwonyVP.js → sas-CoiPirA5.js} +0 -0
  546. /package/dist/{scheme-CYU-RRIf.js → scheme-CwFLjzHv.js} +0 -0
  547. /package/dist/{semaphore-CNDGTzkX.js → semaphore-C8rmHdhj.js} +0 -0
  548. /package/dist/{shell-COPmX2qE.js → shell-BFV-R24I.js} +0 -0
  549. /package/dist/{sieve-B_3zyLne.js → sieve-CxwXF5T9.js} +0 -0
  550. /package/dist/{simple-mode-DSBniks8.js → simple-mode-DTaJtKPt.js} +0 -0
  551. /package/dist/{smalltalk-DRft7iPv.js → smalltalk-QivVOCtX.js} +0 -0
  552. /package/dist/{solr-RZ9uTl59.js → solr-BLvysN-c.js} +0 -0
  553. /package/dist/{sparql-CN6qj55H.js → sparql-nKsFk8j7.js} +0 -0
  554. /package/dist/{spreadsheet-BNNUNXA2.js → spreadsheet-BWc8C2FT.js} +0 -0
  555. /package/dist/{sql-B4x8IkwU.js → sql-CWfUjlV1.js} +0 -0
  556. /package/dist/{stex-BIsgBmK4.js → stex-DtMAhV4-.js} +0 -0
  557. /package/dist/{stylus-Bn_ZjOQ3.js → stylus-BLKQAycn.js} +0 -0
  558. /package/dist/{swift-BLUJhMbz.js → swift-CJoKqiKj.js} +0 -0
  559. /package/dist/{tcl-C86fxecl.js → tcl-YTeYFNUc.js} +0 -0
  560. /package/dist/{textile-DmHh2rsK.js → textile-C6rKQqMQ.js} +0 -0
  561. /package/dist/{tiddlywiki-DI0mF2WJ.js → tiddlywiki-ZXwTHGNT.js} +0 -0
  562. /package/dist/{tiki-2HU6XLLn.js → tiki-C628O_u4.js} +0 -0
  563. /package/dist/{timer-YZl28NYN.js → timer-BpI_FKSA.js} +0 -0
  564. /package/dist/{toml-GWANRNAD.js → toml-DxlPGbRy.js} +0 -0
  565. /package/dist/{treemap-D-ka1hvx.js → treemap-DY3NBr79.js} +0 -0
  566. /package/dist/{troff-BHTsomIy.js → troff-DFCfH7Ku.js} +0 -0
  567. /package/dist/{ttcn-DQuhn5Mn.js → ttcn-DAW-ERVP.js} +0 -0
  568. /package/dist/{ttcn-cfg-HjFYtdB-.js → ttcn-cfg-CpJ8b7EN.js} +0 -0
  569. /package/dist/{turtle-nCay33Nv.js → turtle-BneV2f8L.js} +0 -0
  570. /package/dist/{vb-BG-XlqqJ.js → vb-D973Vxxh.js} +0 -0
  571. /package/dist/{vbscript-B6vyW0-D.js → vbscript-Dckaq3YO.js} +0 -0
  572. /package/dist/{velocity-CWegueqO.js → velocity-DKty-GUC.js} +0 -0
  573. /package/dist/{verilog-CzSQm4cG.js → verilog-aNaK_biA.js} +0 -0
  574. /package/dist/{vhdl-DqnNVL7r.js → vhdl-CQuehnQy.js} +0 -0
  575. /package/dist/{webidl-DXEUpDWH.js → webidl-Bhg8vaMr.js} +0 -0
  576. /package/dist/{xquery-Ba_NB5bD.js → xquery-D2q16GaM.js} +0 -0
  577. /package/dist/{yacas-HKQU6hyk.js → yacas-DHGOHnNa.js} +0 -0
  578. /package/dist/{z80-CXkHXLdj.js → z80-BPhTmO22.js} +0 -0
@@ -0,0 +1,1180 @@
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-Cq2JYHKy.js";
5
+ import { $ as EditorView, At as EditorState, C as foldKeymap, Ct as crelt, Dt as CharCategory, F as syntaxHighlighting, Ft as RangeSetBuilder, Gt as findClusterBreak, H as tags, Ht as codePointSize, Kt as fromCodePoint, Lt as StateEffect, Nt as Prec, Rt as StateField, Ut as combineConfig, Vt as codePointAt, Z as Decoration, _t as placeholder, a as HighlightStyle, at as drawSelection, bt as showDialog, dt as highlightActiveLineGutter, ft as highlightSpecialChars, g as defaultHighlightStyle, ht as lineNumbers, it as crosshairCursor, j as indentUnit, jt as Facet, k as indentOnInput, kt as EditorSelection, mt as keymap, ot as dropCursor, p as bracketMatching, st as getPanel, tt as ViewPlugin, ut as highlightActiveLine, vt as rectangularSelection, wt as Annotation, x as foldGutter, xt as showPanel, yt as runScopeHandlers } from "./dist-De-GlSAs.js";
6
+ import { a as closeBracketsKeymap, c as completionKeymap, i as closeBrackets, r as autocompletion } from "./dist-CSlJrrAw.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
+ precise: false
13
+ }, 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);
14
+ }
15
+ peek() {
16
+ if (this.bufferPos == this.buffer.length) {
17
+ if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done) return -1;
18
+ this.bufferPos = 0, this.buffer = this.iter.value;
19
+ }
20
+ return codePointAt(this.buffer, this.bufferPos);
21
+ }
22
+ next() {
23
+ for (; this.matches.length; ) this.matches.pop();
24
+ return this.nextOverlapping();
25
+ }
26
+ nextOverlapping() {
27
+ for (; ; ) {
28
+ let e2 = this.peek();
29
+ if (e2 < 0) return this.done = true, this;
30
+ let y = fromCodePoint(e2), b = this.bufferStart + this.bufferPos;
31
+ this.bufferPos += codePointSize(e2);
32
+ let x = this.normalize(y);
33
+ if (x.length) for (let e3 = 0, S = b, C = true; ; e3++) {
34
+ let b2 = x.charCodeAt(e3), w = this.match(b2, S, C, this.bufferPos + this.bufferStart, e3 == x.length - 1);
35
+ if (w) return this.value = w, this;
36
+ if (e3 == x.length - 1) break;
37
+ C && e3 < y.length && y.charCodeAt(e3) == b2 ? S++ : C = false;
38
+ }
39
+ }
40
+ }
41
+ match(e2, y, b, x, S) {
42
+ let C = null;
43
+ for (let y2 = 0; y2 < this.matches.length; ) {
44
+ let b2 = this.matches[y2], w = false;
45
+ this.query.charCodeAt(b2.index) == e2 && (b2.index == this.query.length - 1 ? C = {
46
+ from: b2.from,
47
+ to: x,
48
+ precise: S && b2.precise
49
+ } : (b2.index++, w = true)), w ? y2++ : this.matches.splice(y2, 1);
50
+ }
51
+ return this.query.charCodeAt(0) == e2 && (this.query.length == 1 ? C = {
52
+ from: y,
53
+ to: x,
54
+ precise: b && S
55
+ } : this.matches.push({
56
+ from: y,
57
+ index: 1,
58
+ precise: b
59
+ })), C && this.test && !this.test(C.from, C.to, this.buffer, this.bufferStart) && (C = null), C;
60
+ }
61
+ };
62
+ typeof Symbol < "u" && (SearchCursor.prototype[Symbol.iterator] = function() {
63
+ return this;
64
+ });
65
+ var empty = {
66
+ from: -1,
67
+ to: -1,
68
+ match: /* @__PURE__ */ /.*/.exec(""),
69
+ precise: true
70
+ }, baseFlags = "gm" + (/x/.unicode == null ? "" : "u"), RegExpCursor = class {
71
+ constructor(e2, y, b, x = 0, S = e2.length) {
72
+ 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);
73
+ 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);
74
+ }
75
+ getLine(e2) {
76
+ 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());
77
+ }
78
+ nextLine() {
79
+ this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
80
+ }
81
+ next() {
82
+ for (let e2 = this.matchPos - this.curLineStart; ; ) {
83
+ this.re.lastIndex = e2;
84
+ let y = this.matchPos <= this.to && this.re.exec(this.curLine);
85
+ if (y) {
86
+ let b = this.curLineStart + y.index, x = b + y[0].length;
87
+ 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 = {
88
+ from: b,
89
+ to: x,
90
+ precise: true,
91
+ match: y
92
+ }, this;
93
+ e2 = this.matchPos - this.curLineStart;
94
+ } else if (this.curLineStart + this.curLine.length < this.to) this.nextLine(), e2 = 0;
95
+ else return this.done = true, this;
96
+ }
97
+ }
98
+ }, flattened = /* @__PURE__ */ new WeakMap(), FlattenedDoc = class e {
99
+ constructor(e2, y) {
100
+ this.from = e2, this.text = y;
101
+ }
102
+ get to() {
103
+ return this.from + this.text.length;
104
+ }
105
+ static get(y, b, x) {
106
+ let S = flattened.get(y);
107
+ if (!S || S.from >= x || S.to <= b) {
108
+ let S2 = new e(b, y.sliceString(b, x));
109
+ return flattened.set(y, S2), S2;
110
+ }
111
+ if (S.from == b && S.to == x) return S;
112
+ let { text: C, from: w } = S;
113
+ 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));
114
+ }
115
+ }, MultilineRegExpCursor = class {
116
+ constructor(e2, y, b, x, S) {
117
+ 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));
118
+ }
119
+ chunkEnd(e2) {
120
+ return e2 >= this.to ? this.to : this.text.lineAt(e2).to;
121
+ }
122
+ next() {
123
+ for (; ; ) {
124
+ let e2 = this.re.lastIndex = this.matchPos - this.flat.from, y = this.re.exec(this.flat.text);
125
+ if (y && !y[0] && y.index == e2 && (this.re.lastIndex = e2 + 1, y = this.re.exec(this.flat.text)), y) {
126
+ let e3 = this.flat.from + y.index, b = e3 + y[0].length;
127
+ 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 = {
128
+ from: e3,
129
+ to: b,
130
+ precise: true,
131
+ match: y
132
+ }, this.matchPos = toCharEnd(this.text, b + (e3 == b ? 1 : 0)), this;
133
+ }
134
+ if (this.flat.to == this.to) return this.done = true, this;
135
+ this.flat = FlattenedDoc.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
136
+ }
137
+ }
138
+ };
139
+ typeof Symbol < "u" && (RegExpCursor.prototype[Symbol.iterator] = MultilineRegExpCursor.prototype[Symbol.iterator] = function() {
140
+ return this;
141
+ });
142
+ function validRegExp(e2) {
143
+ try {
144
+ return new RegExp(e2, baseFlags), true;
145
+ } catch {
146
+ return false;
147
+ }
148
+ }
149
+ function toCharEnd(e2, y) {
150
+ if (y >= e2.length) return y;
151
+ let b = e2.lineAt(y), x;
152
+ for (; y < b.to && (x = b.text.charCodeAt(y - b.from)) >= 56320 && x < 57344; ) y++;
153
+ return y;
154
+ }
155
+ var gotoLine = (e2) => {
156
+ let { state: y } = e2, b = String(y.doc.lineAt(e2.state.selection.main.head).number), { close: x, result: S } = showDialog(e2, {
157
+ label: y.phrase("Go to line"),
158
+ input: {
159
+ type: "text",
160
+ name: "line",
161
+ value: b
162
+ },
163
+ focus: true,
164
+ submitLabel: y.phrase("go")
165
+ });
166
+ return S.then((b2) => {
167
+ let S2 = b2 && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(b2.elements.line.value);
168
+ if (!S2) {
169
+ e2.dispatch({ effects: x });
170
+ return;
171
+ }
172
+ let C = y.doc.lineAt(y.selection.main.head), [, w, T, E, O] = S2, k = E ? +E.slice(1) : 0, A = T ? +T : C.number;
173
+ if (T && O) {
174
+ let e3 = A / 100;
175
+ w && (e3 = e3 * (w == "-" ? -1 : 1) + C.number / y.doc.lines), A = Math.round(y.doc.lines * e3);
176
+ } else T && w && (A = A * (w == "-" ? -1 : 1) + C.number);
177
+ let j = y.doc.line(Math.max(1, Math.min(y.doc.lines, A))), M = EditorSelection.cursor(j.from + Math.max(0, Math.min(k, j.length)));
178
+ e2.dispatch({
179
+ effects: [x, EditorView.scrollIntoView(M.from, { y: "center" })],
180
+ selection: M
181
+ });
182
+ }), true;
183
+ }, defaultHighlightOptions = {
184
+ highlightWordAroundCursor: false,
185
+ minSelectionLength: 1,
186
+ maxMatches: 100,
187
+ wholeWords: false
188
+ }, highlightConfig = /* @__PURE__ */ Facet.define({ combine(e2) {
189
+ return combineConfig(e2, defaultHighlightOptions, {
190
+ highlightWordAroundCursor: (e3, y) => e3 || y,
191
+ minSelectionLength: Math.min,
192
+ maxMatches: Math.min
193
+ });
194
+ } });
195
+ function highlightSelectionMatches(e2) {
196
+ let y = [defaultTheme, matchHighlighter];
197
+ return e2 && y.push(highlightConfig.of(e2)), y;
198
+ }
199
+ var matchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch" }), mainMatchDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
200
+ function insideWordBoundaries(e2, y, b, x) {
201
+ return (b == 0 || e2(y.sliceDoc(b - 1, b)) != CharCategory.Word) && (x == y.doc.length || e2(y.sliceDoc(x, x + 1)) != CharCategory.Word);
202
+ }
203
+ function insideWord(e2, y, b, x) {
204
+ return e2(y.sliceDoc(b, b + 1)) == CharCategory.Word && e2(y.sliceDoc(x - 1, x)) == CharCategory.Word;
205
+ }
206
+ var matchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
207
+ constructor(e2) {
208
+ this.decorations = this.getDeco(e2);
209
+ }
210
+ update(e2) {
211
+ (e2.selectionSet || e2.docChanged || e2.viewportChanged) && (this.decorations = this.getDeco(e2.view));
212
+ }
213
+ getDeco(e2) {
214
+ let y = e2.state.facet(highlightConfig), { state: b } = e2, x = b.selection;
215
+ if (x.ranges.length > 1) return Decoration.none;
216
+ let S = x.main, C, w = null;
217
+ if (S.empty) {
218
+ if (!y.highlightWordAroundCursor) return Decoration.none;
219
+ let e3 = b.wordAt(S.head);
220
+ if (!e3) return Decoration.none;
221
+ w = b.charCategorizer(S.head), C = b.sliceDoc(e3.from, e3.to);
222
+ } else {
223
+ let e3 = S.to - S.from;
224
+ if (e3 < y.minSelectionLength || e3 > 200) return Decoration.none;
225
+ if (y.wholeWords) {
226
+ 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;
227
+ } else if (C = b.sliceDoc(S.from, S.to), !C) return Decoration.none;
228
+ }
229
+ let T = [];
230
+ for (let x2 of e2.visibleRanges) {
231
+ let e3 = new SearchCursor(b.doc, C, x2.from, x2.to);
232
+ for (; !e3.next().done; ) {
233
+ let { from: x3, to: C2 } = e3.value;
234
+ 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;
235
+ }
236
+ }
237
+ return Decoration.set(T);
238
+ }
239
+ }, { decorations: (e2) => e2.decorations }), defaultTheme = /* @__PURE__ */ EditorView.baseTheme({
240
+ ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
241
+ ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
242
+ }), selectWord = ({ state: e2, dispatch: y }) => {
243
+ let { selection: b } = e2, x = EditorSelection.create(b.ranges.map((y2) => e2.wordAt(y2.head) || EditorSelection.cursor(y2.head)), b.mainIndex);
244
+ return x.eq(b) ? false : (y(e2.update({ selection: x })), true);
245
+ };
246
+ function findNextOccurrence(e2, y) {
247
+ let { main: b, ranges: x } = e2.selection, S = e2.wordAt(b.head), C = S && S.from == b.from && S.to == b.to;
248
+ for (let b2 = false, S2 = new SearchCursor(e2.doc, y, x[x.length - 1].to); ; ) if (S2.next(), S2.done) {
249
+ if (b2) return null;
250
+ S2 = new SearchCursor(e2.doc, y, 0, Math.max(0, x[x.length - 1].from - 1)), b2 = true;
251
+ } else {
252
+ if (b2 && x.some((e3) => e3.from == S2.value.from)) continue;
253
+ if (C) {
254
+ let y2 = e2.wordAt(S2.value.from);
255
+ if (!y2 || y2.from != S2.value.from || y2.to != S2.value.to) continue;
256
+ }
257
+ return S2.value;
258
+ }
259
+ }
260
+ var selectNextOccurrence = ({ state: e2, dispatch: y }) => {
261
+ let { ranges: b } = e2.selection;
262
+ if (b.some((e3) => e3.from === e3.to)) return selectWord({
263
+ state: e2,
264
+ dispatch: y
265
+ });
266
+ let x = e2.sliceDoc(b[0].from, b[0].to);
267
+ if (e2.selection.ranges.some((y2) => e2.sliceDoc(y2.from, y2.to) != x)) return false;
268
+ let S = findNextOccurrence(e2, x);
269
+ return S ? (y(e2.update({
270
+ selection: e2.selection.addRange(EditorSelection.range(S.from, S.to), false),
271
+ effects: EditorView.scrollIntoView(S.to)
272
+ })), true) : false;
273
+ }, searchConfigFacet = /* @__PURE__ */ Facet.define({ combine(e2) {
274
+ return combineConfig(e2, {
275
+ top: false,
276
+ caseSensitive: false,
277
+ literal: false,
278
+ regexp: false,
279
+ wholeWord: false,
280
+ createPanel: (e3) => new SearchPanel(e3),
281
+ scrollToMatch: (e3) => EditorView.scrollIntoView(e3)
282
+ });
283
+ } }), SearchQuery = class {
284
+ constructor(e2) {
285
+ 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;
286
+ }
287
+ unquote(e2) {
288
+ return this.literal ? e2 : e2.replace(/\\([nrt\\])/g, (e3, y) => y == "n" ? "\n" : y == "r" ? "\r" : y == "t" ? " " : "\\");
289
+ }
290
+ eq(e2) {
291
+ 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;
292
+ }
293
+ create() {
294
+ return this.regexp ? new RegExpQuery(this) : new StringQuery(this);
295
+ }
296
+ getCursor(e2, y = 0, b) {
297
+ let x = e2.doc ? e2 : EditorState.create({ doc: e2 });
298
+ return b ?? (b = x.doc.length), this.regexp ? regexpCursor(this, x, y, b) : stringCursor(this, x, y, b);
299
+ }
300
+ }, QueryType = class {
301
+ constructor(e2) {
302
+ this.spec = e2;
303
+ }
304
+ };
305
+ function wrapStringTest(e2, y, b) {
306
+ 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);
307
+ }
308
+ function stringCursor(e2, y, b, x) {
309
+ let S;
310
+ 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);
311
+ }
312
+ function stringWordTest(e2, y) {
313
+ 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));
314
+ }
315
+ var StringQuery = class extends QueryType {
316
+ constructor(e2) {
317
+ super(e2);
318
+ }
319
+ nextMatch(e2, y, b) {
320
+ let x = stringCursor(this.spec, e2, b, e2.doc.length).nextOverlapping();
321
+ if (x.done) {
322
+ let b2 = Math.min(e2.doc.length, y + this.spec.unquoted.length);
323
+ x = stringCursor(this.spec, e2, 0, b2).nextOverlapping();
324
+ }
325
+ return x.done || x.value.from == y && x.value.to == b ? null : x.value;
326
+ }
327
+ prevMatchInRange(e2, y, b) {
328
+ for (let x = b; ; ) {
329
+ let b2 = Math.max(y, x - 1e4 - this.spec.unquoted.length), S = stringCursor(this.spec, e2, b2, x), C = null;
330
+ for (; !S.nextOverlapping().done; ) C = S.value;
331
+ if (C) return C;
332
+ if (b2 == y) return null;
333
+ x -= 1e4;
334
+ }
335
+ }
336
+ prevMatch(e2, y, b) {
337
+ let x = this.prevMatchInRange(e2, 0, y);
338
+ 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;
339
+ }
340
+ getReplacement(e2) {
341
+ return this.spec.unquote(this.spec.replace);
342
+ }
343
+ matchAll(e2, y) {
344
+ let b = stringCursor(this.spec, e2, 0, e2.doc.length), x = [];
345
+ for (; !b.next().done; ) {
346
+ if (x.length >= y) return null;
347
+ x.push(b.value);
348
+ }
349
+ return x;
350
+ }
351
+ highlight(e2, y, b, x) {
352
+ let S = stringCursor(this.spec, e2, Math.max(0, y - this.spec.unquoted.length), Math.min(b + this.spec.unquoted.length, e2.doc.length));
353
+ for (; !S.next().done; ) x(S.value.from, S.value.to);
354
+ }
355
+ };
356
+ function wrapRegexpTest(e2, y, b) {
357
+ return (x, S, C) => (!b || b(x, S, C)) && e2(C[0], y, x, S);
358
+ }
359
+ function regexpCursor(e2, y, b, x) {
360
+ let S;
361
+ 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, {
362
+ ignoreCase: !e2.caseSensitive,
363
+ test: S
364
+ }, b, x);
365
+ }
366
+ function charBefore(e2, y) {
367
+ return e2.slice(findClusterBreak(e2, y, false), y);
368
+ }
369
+ function charAfter(e2, y) {
370
+ return e2.slice(y, findClusterBreak(e2, y));
371
+ }
372
+ function regexpWordTest(e2) {
373
+ 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);
374
+ }
375
+ var RegExpQuery = class extends QueryType {
376
+ nextMatch(e2, y, b) {
377
+ let x = regexpCursor(this.spec, e2, b, e2.doc.length).next();
378
+ return x.done && (x = regexpCursor(this.spec, e2, 0, y).next()), x.done ? null : x.value;
379
+ }
380
+ prevMatchInRange(e2, y, b) {
381
+ for (let x = 1; ; x++) {
382
+ let S = Math.max(y, b - x * 1e4), C = regexpCursor(this.spec, e2, S, b), w = null;
383
+ for (; !C.next().done; ) w = C.value;
384
+ if (w && (S == y || w.from > S + 10)) return w;
385
+ if (S == y) return null;
386
+ }
387
+ }
388
+ prevMatch(e2, y, b) {
389
+ return this.prevMatchInRange(e2, 0, y) || this.prevMatchInRange(e2, b, e2.doc.length);
390
+ }
391
+ getReplacement(e2) {
392
+ return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (y, b) => {
393
+ if (b == "&") return e2.match[0];
394
+ if (b == "$") return "$";
395
+ for (let y2 = b.length; y2 > 0; y2--) {
396
+ let x = +b.slice(0, y2);
397
+ if (x > 0 && x < e2.match.length) return e2.match[x] + b.slice(y2);
398
+ }
399
+ return y;
400
+ });
401
+ }
402
+ matchAll(e2, y) {
403
+ let b = regexpCursor(this.spec, e2, 0, e2.doc.length), x = [];
404
+ for (; !b.next().done; ) {
405
+ if (x.length >= y) return null;
406
+ x.push(b.value);
407
+ }
408
+ return x;
409
+ }
410
+ highlight(e2, y, b, x) {
411
+ let S = regexpCursor(this.spec, e2, Math.max(0, y - 250), Math.min(b + 250, e2.doc.length));
412
+ for (; !S.next().done; ) x(S.value.from, S.value.to);
413
+ }
414
+ }, setSearchQuery = /* @__PURE__ */ StateEffect.define(), togglePanel = /* @__PURE__ */ StateEffect.define(), searchState = /* @__PURE__ */ StateField.define({
415
+ create(e2) {
416
+ return new SearchState(defaultQuery(e2).create(), null);
417
+ },
418
+ update(e2, y) {
419
+ 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));
420
+ return e2;
421
+ },
422
+ provide: (e2) => showPanel.from(e2, (e3) => e3.panel)
423
+ }), SearchState = class {
424
+ constructor(e2, y) {
425
+ this.query = e2, this.panel = y;
426
+ }
427
+ }, matchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch" }), selectedMatchMark = /* @__PURE__ */ Decoration.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), searchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
428
+ constructor(e2) {
429
+ this.view = e2, this.decorations = this.highlight(e2.state.field(searchState));
430
+ }
431
+ update(e2) {
432
+ let y = e2.state.field(searchState);
433
+ (y != e2.startState.field(searchState) || e2.docChanged || e2.selectionSet || e2.viewportChanged) && (this.decorations = this.highlight(y));
434
+ }
435
+ highlight({ query: e2, panel: y }) {
436
+ if (!y || !e2.spec.valid) return Decoration.none;
437
+ let { view: b } = this, x = new RangeSetBuilder();
438
+ for (let y2 = 0, S = b.visibleRanges, C = S.length; y2 < C; y2++) {
439
+ let { from: w, to: T } = S[y2];
440
+ for (; y2 < C - 1 && T > S[y2 + 1].from - 500; ) T = S[++y2].to;
441
+ e2.highlight(b.state, w, T, (e3, y3) => {
442
+ let S2 = b.state.selection.ranges.some((b2) => b2.from == e3 && b2.to == y3);
443
+ x.add(e3, y3, S2 ? selectedMatchMark : matchMark);
444
+ });
445
+ }
446
+ return x.finish();
447
+ }
448
+ }, { decorations: (e2) => e2.decorations });
449
+ function searchCommand(e2) {
450
+ return (y) => {
451
+ let b = y.state.field(searchState, false);
452
+ return b && b.query.spec.valid ? e2(y, b) : openSearchPanel(y);
453
+ };
454
+ }
455
+ var findNext = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
456
+ let { to: b } = e2.state.selection.main, x = y.nextMatch(e2.state, b, b);
457
+ if (!x) return false;
458
+ let S = EditorSelection.single(x.from, x.to), C = e2.state.facet(searchConfigFacet);
459
+ return e2.dispatch({
460
+ selection: S,
461
+ effects: [announceMatch(e2, x), C.scrollToMatch(S.main, e2)],
462
+ userEvent: "select.search"
463
+ }), selectSearchInput(e2), true;
464
+ }), findPrevious = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
465
+ let { state: b } = e2, { from: x } = b.selection.main, S = y.prevMatch(b, x, x);
466
+ if (!S) return false;
467
+ let C = EditorSelection.single(S.from, S.to), w = e2.state.facet(searchConfigFacet);
468
+ return e2.dispatch({
469
+ selection: C,
470
+ effects: [announceMatch(e2, S), w.scrollToMatch(C.main, e2)],
471
+ userEvent: "select.search"
472
+ }), selectSearchInput(e2), true;
473
+ }), selectMatches = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
474
+ let b = y.matchAll(e2.state, 1e3);
475
+ return !b || !b.length ? false : (e2.dispatch({
476
+ selection: EditorSelection.create(b.map((e3) => EditorSelection.range(e3.from, e3.to))),
477
+ userEvent: "select.search.matches"
478
+ }), true);
479
+ }), selectSelectionMatches = ({ state: e2, dispatch: y }) => {
480
+ let b = e2.selection;
481
+ if (b.ranges.length > 1 || b.main.empty) return false;
482
+ let { from: x, to: S } = b.main, C = [], w = 0;
483
+ for (let y2 = new SearchCursor(e2.doc, e2.sliceDoc(x, S)); !y2.next().done; ) {
484
+ if (C.length > 1e3) return false;
485
+ y2.value.from == x && (w = C.length), C.push(EditorSelection.range(y2.value.from, y2.value.to));
486
+ }
487
+ return y(e2.update({
488
+ selection: EditorSelection.create(C, w),
489
+ userEvent: "select.search.matches"
490
+ })), true;
491
+ }, replaceNext = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
492
+ let { state: b } = e2, { from: x, to: S } = b.selection.main;
493
+ if (b.readOnly) return false;
494
+ let C = y.nextMatch(b, x, x);
495
+ if (!C) return false;
496
+ let w = C, T = [], E, O, k = [];
497
+ w.precise ? w.from == x && w.to == S && (O = b.toText(y.getReplacement(w)), T.push({
498
+ from: w.from,
499
+ to: w.to,
500
+ insert: O
501
+ }), w = y.nextMatch(b, w.from, w.to), k.push(EditorView.announce.of(b.phrase("replaced match on line $", b.doc.lineAt(x).number) + "."))) : w = y.nextMatch(b, w.from, w.to);
502
+ let A = e2.state.changes(T);
503
+ return w && (E = EditorSelection.single(w.from, w.to).map(A), k.push(announceMatch(e2, w)), k.push(b.facet(searchConfigFacet).scrollToMatch(E.main, e2))), e2.dispatch({
504
+ changes: A,
505
+ selection: E,
506
+ effects: k,
507
+ userEvent: "input.replace"
508
+ }), true;
509
+ }), replaceAll = /* @__PURE__ */ searchCommand((e2, { query: y }) => {
510
+ if (e2.state.readOnly) return false;
511
+ let b = [];
512
+ for (let x2 of y.matchAll(e2.state, 1e9)) {
513
+ let { from: e3, to: S, precise: C } = x2;
514
+ C && b.push({
515
+ from: e3,
516
+ to: S,
517
+ insert: y.getReplacement(x2)
518
+ });
519
+ }
520
+ if (!b.length) return false;
521
+ let x = e2.state.phrase("replaced $ matches", b.length) + ".";
522
+ return e2.dispatch({
523
+ changes: b,
524
+ effects: EditorView.announce.of(x),
525
+ userEvent: "input.replace.all"
526
+ }), true;
527
+ });
528
+ function createSearchPanel(e2) {
529
+ return e2.state.facet(searchConfigFacet).createPanel(e2);
530
+ }
531
+ function defaultQuery(e2, y) {
532
+ let b = e2.selection.main, x = b.empty || b.to > b.from + 100 ? "" : e2.sliceDoc(b.from, b.to);
533
+ if (y && !x) return y;
534
+ let S = e2.facet(searchConfigFacet);
535
+ return new SearchQuery({
536
+ search: (y == null ? void 0 : y.literal) ?? S.literal ? x : x.replace(/\n/g, "\\n"),
537
+ caseSensitive: (y == null ? void 0 : y.caseSensitive) ?? S.caseSensitive,
538
+ literal: (y == null ? void 0 : y.literal) ?? S.literal,
539
+ regexp: (y == null ? void 0 : y.regexp) ?? S.regexp,
540
+ wholeWord: (y == null ? void 0 : y.wholeWord) ?? S.wholeWord
541
+ });
542
+ }
543
+ function getSearchInput(e2) {
544
+ let y = getPanel(e2, createSearchPanel);
545
+ return y && y.dom.querySelector("[main-field]");
546
+ }
547
+ function selectSearchInput(e2) {
548
+ let y = getSearchInput(e2);
549
+ y && y == e2.root.activeElement && y.select();
550
+ }
551
+ var openSearchPanel = (e2) => {
552
+ let y = e2.state.field(searchState, false);
553
+ if (y && y.panel) {
554
+ let b = getSearchInput(e2);
555
+ if (b && b != e2.root.activeElement) {
556
+ let x = defaultQuery(e2.state, y.query.spec);
557
+ x.valid && e2.dispatch({ effects: setSearchQuery.of(x) }), b.focus(), b.select();
558
+ }
559
+ } else e2.dispatch({ effects: [togglePanel.of(true), y ? setSearchQuery.of(defaultQuery(e2.state, y.query.spec)) : StateEffect.appendConfig.of(searchExtensions)] });
560
+ return true;
561
+ }, closeSearchPanel = (e2) => {
562
+ let y = e2.state.field(searchState, false);
563
+ if (!y || !y.panel) return false;
564
+ let b = getPanel(e2, createSearchPanel);
565
+ return b && b.dom.contains(e2.root.activeElement) && e2.focus(), e2.dispatch({ effects: togglePanel.of(false) }), true;
566
+ }, searchKeymap = [
567
+ {
568
+ key: "Mod-f",
569
+ run: openSearchPanel,
570
+ scope: "editor search-panel"
571
+ },
572
+ {
573
+ key: "F3",
574
+ run: findNext,
575
+ shift: findPrevious,
576
+ scope: "editor search-panel",
577
+ preventDefault: true
578
+ },
579
+ {
580
+ key: "Mod-g",
581
+ run: findNext,
582
+ shift: findPrevious,
583
+ scope: "editor search-panel",
584
+ preventDefault: true
585
+ },
586
+ {
587
+ key: "Escape",
588
+ run: closeSearchPanel,
589
+ scope: "editor search-panel"
590
+ },
591
+ {
592
+ key: "Mod-Shift-l",
593
+ run: selectSelectionMatches
594
+ },
595
+ {
596
+ key: "Mod-Alt-g",
597
+ run: gotoLine
598
+ },
599
+ {
600
+ key: "Mod-d",
601
+ run: selectNextOccurrence,
602
+ preventDefault: true
603
+ }
604
+ ], SearchPanel = class {
605
+ constructor(e2) {
606
+ this.view = e2;
607
+ let y = this.query = e2.state.field(searchState).query.spec;
608
+ this.commit = this.commit.bind(this), this.searchField = crelt("input", {
609
+ value: y.search,
610
+ placeholder: phrase(e2, "Find"),
611
+ "aria-label": phrase(e2, "Find"),
612
+ class: "cm-textfield",
613
+ name: "search",
614
+ form: "",
615
+ "main-field": "true",
616
+ onchange: this.commit,
617
+ onkeyup: this.commit
618
+ }), this.replaceField = crelt("input", {
619
+ value: y.replace,
620
+ placeholder: phrase(e2, "Replace"),
621
+ "aria-label": phrase(e2, "Replace"),
622
+ class: "cm-textfield",
623
+ name: "replace",
624
+ form: "",
625
+ onchange: this.commit,
626
+ onkeyup: this.commit
627
+ }), this.caseField = crelt("input", {
628
+ type: "checkbox",
629
+ name: "case",
630
+ form: "",
631
+ checked: y.caseSensitive,
632
+ onchange: this.commit
633
+ }), this.reField = crelt("input", {
634
+ type: "checkbox",
635
+ name: "re",
636
+ form: "",
637
+ checked: y.regexp,
638
+ onchange: this.commit
639
+ }), this.wordField = crelt("input", {
640
+ type: "checkbox",
641
+ name: "word",
642
+ form: "",
643
+ checked: y.wholeWord,
644
+ onchange: this.commit
645
+ });
646
+ function b(e3, y2, b2) {
647
+ return crelt("button", {
648
+ class: "cm-button",
649
+ name: e3,
650
+ onclick: y2,
651
+ type: "button"
652
+ }, b2);
653
+ }
654
+ this.dom = crelt("div", {
655
+ onkeydown: (e3) => this.keydown(e3),
656
+ class: "cm-search"
657
+ }, [
658
+ this.searchField,
659
+ b("next", () => findNext(e2), [phrase(e2, "next")]),
660
+ b("prev", () => findPrevious(e2), [phrase(e2, "previous")]),
661
+ b("select", () => selectMatches(e2), [phrase(e2, "all")]),
662
+ crelt("label", null, [this.caseField, phrase(e2, "match case")]),
663
+ crelt("label", null, [this.reField, phrase(e2, "regexp")]),
664
+ crelt("label", null, [this.wordField, phrase(e2, "by word")]),
665
+ ...e2.state.readOnly ? [] : [
666
+ crelt("br"),
667
+ this.replaceField,
668
+ b("replace", () => replaceNext(e2), [phrase(e2, "replace")]),
669
+ b("replaceAll", () => replaceAll(e2), [phrase(e2, "replace all")])
670
+ ],
671
+ crelt("button", {
672
+ name: "close",
673
+ onclick: () => closeSearchPanel(e2),
674
+ "aria-label": phrase(e2, "close"),
675
+ type: "button"
676
+ }, ["\xD7"])
677
+ ]);
678
+ }
679
+ commit() {
680
+ let e2 = new SearchQuery({
681
+ search: this.searchField.value,
682
+ caseSensitive: this.caseField.checked,
683
+ regexp: this.reField.checked,
684
+ wholeWord: this.wordField.checked,
685
+ replace: this.replaceField.value
686
+ });
687
+ e2.eq(this.query) || (this.query = e2, this.view.dispatch({ effects: setSearchQuery.of(e2) }));
688
+ }
689
+ keydown(e2) {
690
+ 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));
691
+ }
692
+ update(e2) {
693
+ for (let y of e2.transactions) for (let e3 of y.effects) e3.is(setSearchQuery) && !e3.value.eq(this.query) && this.setQuery(e3.value);
694
+ }
695
+ setQuery(e2) {
696
+ 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;
697
+ }
698
+ mount() {
699
+ this.searchField.select();
700
+ }
701
+ get pos() {
702
+ return 80;
703
+ }
704
+ get top() {
705
+ return this.view.state.facet(searchConfigFacet).top;
706
+ }
707
+ };
708
+ function phrase(e2, y) {
709
+ return e2.state.phrase(y);
710
+ }
711
+ var AnnounceMargin = 30, Break = /[\s\.,:;?!]/;
712
+ function announceMatch(e2, { from: y, to: b }) {
713
+ 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);
714
+ if (C != x.from) {
715
+ for (let e3 = 0; e3 < AnnounceMargin; e3++) if (!Break.test(T[e3 + 1]) && Break.test(T[e3])) {
716
+ T = T.slice(e3);
717
+ break;
718
+ }
719
+ }
720
+ if (w != S) {
721
+ for (let e3 = T.length - 1; e3 > T.length - AnnounceMargin; e3--) if (!Break.test(T[e3 - 1]) && Break.test(T[e3])) {
722
+ T = T.slice(0, e3);
723
+ break;
724
+ }
725
+ }
726
+ return EditorView.announce.of(`${e2.state.phrase("current match")}. ${T} ${e2.state.phrase("on line")} ${x.number}.`);
727
+ }
728
+ var baseTheme = /* @__PURE__ */ EditorView.baseTheme({
729
+ ".cm-panel.cm-search": {
730
+ padding: "2px 6px 4px",
731
+ position: "relative",
732
+ "& [name=close]": {
733
+ position: "absolute",
734
+ top: "0",
735
+ right: "4px",
736
+ backgroundColor: "inherit",
737
+ border: "none",
738
+ font: "inherit",
739
+ padding: 0,
740
+ margin: 0
741
+ },
742
+ "& input, & button, & label": { margin: ".2em .6em .2em 0" },
743
+ "& input[type=checkbox]": { marginRight: ".2em" },
744
+ "& label": {
745
+ fontSize: "80%",
746
+ whiteSpace: "pre"
747
+ }
748
+ },
749
+ "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
750
+ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
751
+ "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
752
+ "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
753
+ }), searchExtensions = [
754
+ searchState,
755
+ /* @__PURE__ */ Prec.low(searchHighlighter),
756
+ baseTheme
757
+ ];
758
+ function _objectWithoutPropertiesLoose(e2, y) {
759
+ if (e2 == null) return {};
760
+ var b = {};
761
+ for (var x in e2) if ({}.hasOwnProperty.call(e2, x)) {
762
+ if (y.indexOf(x) !== -1) continue;
763
+ b[x] = e2[x];
764
+ }
765
+ return b;
766
+ }
767
+ var basicSetup = function(e2) {
768
+ e2 === void 0 && (e2 = {});
769
+ var { crosshairCursor: y = false } = e2, b = [];
770
+ 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));
771
+ var T = [];
772
+ 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);
773
+ }, minimalSetup = function(e2) {
774
+ e2 === void 0 && (e2 = {});
775
+ var y = [];
776
+ e2.defaultKeymap !== false && (y = y.concat(defaultKeymap)), e2.historyKeymap !== false && (y = y.concat(historyKeymap));
777
+ var b = [];
778
+ 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);
779
+ }, 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({
780
+ "&": {
781
+ color: ivory,
782
+ backgroundColor: background
783
+ },
784
+ ".cm-content": { caretColor: cursor },
785
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: cursor },
786
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: selection },
787
+ ".cm-panels": {
788
+ backgroundColor: darkBackground,
789
+ color: ivory
790
+ },
791
+ ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
792
+ ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
793
+ ".cm-searchMatch": {
794
+ backgroundColor: "#72a1ff59",
795
+ outline: "1px solid #457dff"
796
+ },
797
+ ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: "#6199ff2f" },
798
+ ".cm-activeLine": { backgroundColor: "#6699ff0b" },
799
+ ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
800
+ "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bad0f847" },
801
+ ".cm-gutters": {
802
+ backgroundColor: background,
803
+ color: stone,
804
+ border: "none"
805
+ },
806
+ ".cm-activeLineGutter": { backgroundColor: highlightBackground },
807
+ ".cm-foldPlaceholder": {
808
+ backgroundColor: "transparent",
809
+ border: "none",
810
+ color: "#ddd"
811
+ },
812
+ ".cm-tooltip": {
813
+ border: "none",
814
+ backgroundColor: tooltipBackground
815
+ },
816
+ ".cm-tooltip .cm-tooltip-arrow:before": {
817
+ borderTopColor: "transparent",
818
+ borderBottomColor: "transparent"
819
+ },
820
+ ".cm-tooltip .cm-tooltip-arrow:after": {
821
+ borderTopColor: tooltipBackground,
822
+ borderBottomColor: tooltipBackground
823
+ },
824
+ ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": {
825
+ backgroundColor: highlightBackground,
826
+ color: ivory
827
+ } }
828
+ }, { dark: true }), /* @__PURE__ */ syntaxHighlighting(/* @__PURE__ */ HighlightStyle.define([
829
+ {
830
+ tag: tags.keyword,
831
+ color: violet
832
+ },
833
+ {
834
+ tag: [
835
+ tags.name,
836
+ tags.deleted,
837
+ tags.character,
838
+ tags.propertyName,
839
+ tags.macroName
840
+ ],
841
+ color: coral
842
+ },
843
+ {
844
+ tag: [/* @__PURE__ */ tags.function(tags.variableName), tags.labelName],
845
+ color: malibu
846
+ },
847
+ {
848
+ tag: [
849
+ tags.color,
850
+ /* @__PURE__ */ tags.constant(tags.name),
851
+ /* @__PURE__ */ tags.standard(tags.name)
852
+ ],
853
+ color: whiskey
854
+ },
855
+ {
856
+ tag: [/* @__PURE__ */ tags.definition(tags.name), tags.separator],
857
+ color: ivory
858
+ },
859
+ {
860
+ tag: [
861
+ tags.typeName,
862
+ tags.className,
863
+ tags.number,
864
+ tags.changed,
865
+ tags.annotation,
866
+ tags.modifier,
867
+ tags.self,
868
+ tags.namespace
869
+ ],
870
+ color: chalky
871
+ },
872
+ {
873
+ tag: [
874
+ tags.operator,
875
+ tags.operatorKeyword,
876
+ tags.url,
877
+ tags.escape,
878
+ tags.regexp,
879
+ tags.link,
880
+ /* @__PURE__ */ tags.special(tags.string)
881
+ ],
882
+ color: cyan
883
+ },
884
+ {
885
+ tag: [tags.meta, tags.comment],
886
+ color: stone
887
+ },
888
+ {
889
+ tag: tags.strong,
890
+ fontWeight: "bold"
891
+ },
892
+ {
893
+ tag: tags.emphasis,
894
+ fontStyle: "italic"
895
+ },
896
+ {
897
+ tag: tags.strikethrough,
898
+ textDecoration: "line-through"
899
+ },
900
+ {
901
+ tag: tags.link,
902
+ color: stone,
903
+ textDecoration: "underline"
904
+ },
905
+ {
906
+ tag: tags.heading,
907
+ fontWeight: "bold",
908
+ color: coral
909
+ },
910
+ {
911
+ tag: [
912
+ tags.atom,
913
+ tags.bool,
914
+ /* @__PURE__ */ tags.special(tags.variableName)
915
+ ],
916
+ color: whiskey
917
+ },
918
+ {
919
+ tag: [
920
+ tags.processingInstruction,
921
+ tags.string,
922
+ tags.inserted
923
+ ],
924
+ color: sage
925
+ },
926
+ {
927
+ tag: tags.invalid,
928
+ color: invalid
929
+ }
930
+ ]))], defaultLightThemeOption = EditorView.theme({ "&": { backgroundColor: "#fff" } }, { dark: false }), getDefaultExtensions = function(e2) {
931
+ e2 === void 0 && (e2 = {});
932
+ var { indentWithTab: y = true, editable: b = true, readOnly: x = false, theme: S = "light", placeholder: C = "", basicSetup: w = true } = e2, T = [];
933
+ switch (y && T.unshift(keymap.of([indentWithTab])), w && (typeof w == "boolean" ? T.unshift(basicSetup()) : T.unshift(basicSetup(w))), C && T.unshift(placeholder(C)), S) {
934
+ case "light":
935
+ T.push(defaultLightThemeOption);
936
+ break;
937
+ case "dark":
938
+ T.push(oneDark);
939
+ break;
940
+ case "none":
941
+ break;
942
+ default:
943
+ T.push(S);
944
+ break;
945
+ }
946
+ return b === false && T.push(EditorView.editable.of(false)), x && T.push(EditorState.readOnly.of(true)), [...T];
947
+ }, getStatistics = (e2) => ({
948
+ line: e2.state.doc.lineAt(e2.state.selection.main.from),
949
+ lineCount: e2.state.doc.lines,
950
+ lineBreak: e2.state.lineBreak,
951
+ length: e2.state.doc.length,
952
+ readOnly: e2.state.readOnly,
953
+ tabSize: e2.state.tabSize,
954
+ selection: e2.state.selection,
955
+ selectionAsSingle: e2.state.selection.asSingle().main,
956
+ ranges: e2.state.selection.ranges,
957
+ selectionCode: e2.state.sliceDoc(e2.state.selection.main.from, e2.state.selection.main.to),
958
+ selections: e2.state.selection.ranges.map((y) => e2.state.sliceDoc(y.from, y.to)),
959
+ selectedText: e2.state.selection.ranges.some((e3) => !e3.empty)
960
+ }), TimeoutLatch = class {
961
+ constructor(e2, y) {
962
+ 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);
963
+ }
964
+ tick() {
965
+ if (!this.isCancelled && !this.isTimeExhausted && (this.timeLeftMS--, this.timeLeftMS <= 0)) {
966
+ this.isTimeExhausted = true;
967
+ var e2 = this.callbacks.slice();
968
+ this.callbacks.length = 0, e2.forEach((e3) => {
969
+ try {
970
+ e3();
971
+ } catch (e4) {
972
+ console.error("TimeoutLatch callback error:", e4);
973
+ }
974
+ });
975
+ }
976
+ }
977
+ cancel() {
978
+ this.isCancelled = true, this.callbacks.length = 0;
979
+ }
980
+ reset() {
981
+ this.timeLeftMS = this.timeoutMS, this.isCancelled = false, this.isTimeExhausted = false;
982
+ }
983
+ get isDone() {
984
+ return this.isCancelled || this.isTimeExhausted;
985
+ }
986
+ }, Scheduler = class {
987
+ constructor() {
988
+ this.interval = null, this.latches = /* @__PURE__ */ new Set();
989
+ }
990
+ add(e2) {
991
+ this.latches.add(e2), this.start();
992
+ }
993
+ remove(e2) {
994
+ this.latches.delete(e2), this.latches.size === 0 && this.stop();
995
+ }
996
+ start() {
997
+ this.interval === null && (this.interval = setInterval(() => {
998
+ this.latches.forEach((e2) => {
999
+ e2.tick(), e2.isDone && this.remove(e2);
1000
+ });
1001
+ }, 1));
1002
+ }
1003
+ stop() {
1004
+ this.interval !== null && (clearInterval(this.interval), this.interval = null);
1005
+ }
1006
+ }, 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 = [];
1007
+ function useCodeMirror(e2) {
1008
+ var { value: y, selection: b, onChange: x, onStatistics: S, onCreateEditor: C, onUpdate: w, extensions: T = emptyExtensions, autoFocus: E, 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({
1009
+ "&": {
1010
+ height: A,
1011
+ minHeight: j,
1012
+ maxHeight: M,
1013
+ width: N,
1014
+ minWidth: P,
1015
+ maxWidth: F
1016
+ },
1017
+ "& .cm-scroller": { height: "100% !important" }
1018
+ }), $ = [
1019
+ EditorView.updateListener.of((e3) => {
1020
+ e3.docChanged && typeof x == "function" && !e3.transactions.some((e4) => e4.annotation(ExternalChange)) && (X.current ? X.current.reset() : (X.current = new TimeoutLatch(() => {
1021
+ if (Z.current) {
1022
+ var e4 = Z.current;
1023
+ Z.current = null, e4();
1024
+ }
1025
+ X.current = null;
1026
+ }, TYPING_TIMOUT), getScheduler().add(X.current)), x(e3.state.doc.toString(), e3)), S && S(getStatistics(e3));
1027
+ }),
1028
+ Q,
1029
+ ...getDefaultExtensions({
1030
+ theme: k,
1031
+ editable: L,
1032
+ readOnly: z,
1033
+ placeholder: I,
1034
+ indentWithTab: B,
1035
+ basicSetup: V
1036
+ })
1037
+ ];
1038
+ return w && typeof w == "function" && $.push(EditorView.updateListener.of(w)), $ = $.concat(T), (0, import_react.useLayoutEffect)(() => {
1039
+ if (W && !J) {
1040
+ var e3 = {
1041
+ doc: y,
1042
+ selection: b,
1043
+ extensions: $
1044
+ }, x2 = U ? EditorState.fromJSON(U.json, e3, U.fields) : EditorState.create(e3);
1045
+ if (Y(x2), !K) {
1046
+ var S2 = new EditorView({
1047
+ state: x2,
1048
+ parent: W,
1049
+ root: H
1050
+ });
1051
+ q(S2), C && C(S2, x2);
1052
+ }
1053
+ }
1054
+ return () => {
1055
+ K && (Y(void 0), q(void 0));
1056
+ };
1057
+ }, [W, J]), (0, import_react.useEffect)(() => {
1058
+ e2.container && G(e2.container);
1059
+ }, [e2.container]), (0, import_react.useEffect)(() => () => {
1060
+ K && (K.destroy(), q(void 0)), X.current && (X.current = (X.current.cancel(), null));
1061
+ }, [K]), (0, import_react.useEffect)(() => {
1062
+ E && K && K.focus();
1063
+ }, [E, K]), (0, import_react.useEffect)(() => {
1064
+ K && K.dispatch({ effects: StateEffect.reconfigure.of($) });
1065
+ }, [
1066
+ k,
1067
+ T,
1068
+ A,
1069
+ j,
1070
+ M,
1071
+ N,
1072
+ P,
1073
+ F,
1074
+ I,
1075
+ L,
1076
+ z,
1077
+ B,
1078
+ V,
1079
+ x,
1080
+ w
1081
+ ]), (0, import_react.useEffect)(() => {
1082
+ if (y !== void 0) {
1083
+ var e3 = K ? K.state.doc.toString() : "";
1084
+ if (K && y !== e3) {
1085
+ var b2 = X.current && !X.current.isDone, x2 = () => {
1086
+ K && y !== K.state.doc.toString() && K.dispatch({
1087
+ changes: {
1088
+ from: 0,
1089
+ to: K.state.doc.toString().length,
1090
+ insert: y || ""
1091
+ },
1092
+ annotations: [ExternalChange.of(true)]
1093
+ });
1094
+ };
1095
+ b2 ? Z.current = x2 : x2();
1096
+ }
1097
+ }
1098
+ }, [y, K]), {
1099
+ state: J,
1100
+ setState: Y,
1101
+ view: K,
1102
+ setView: q,
1103
+ container: W,
1104
+ setContainer: G
1105
+ };
1106
+ }
1107
+ var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime()), _excluded = [
1108
+ "className",
1109
+ "value",
1110
+ "selection",
1111
+ "extensions",
1112
+ "onChange",
1113
+ "onStatistics",
1114
+ "onCreateEditor",
1115
+ "onUpdate",
1116
+ "autoFocus",
1117
+ "theme",
1118
+ "height",
1119
+ "minHeight",
1120
+ "maxHeight",
1121
+ "width",
1122
+ "minWidth",
1123
+ "maxWidth",
1124
+ "basicSetup",
1125
+ "placeholder",
1126
+ "indentWithTab",
1127
+ "editable",
1128
+ "readOnly",
1129
+ "root",
1130
+ "initialState"
1131
+ ], ReactCodeMirror = /* @__PURE__ */ (0, import_react.forwardRef)((e2, y) => {
1132
+ 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({
1133
+ root: H,
1134
+ value: x,
1135
+ autoFocus: k,
1136
+ theme: A,
1137
+ height: j,
1138
+ minHeight: M,
1139
+ maxHeight: N,
1140
+ width: P,
1141
+ minWidth: F,
1142
+ maxWidth: I,
1143
+ basicSetup: L,
1144
+ placeholder: R,
1145
+ indentWithTab: z,
1146
+ editable: B,
1147
+ readOnly: V,
1148
+ selection: S,
1149
+ onChange: w,
1150
+ onStatistics: E,
1151
+ onCreateEditor: D,
1152
+ onUpdate: O,
1153
+ extensions: C,
1154
+ initialState: U
1155
+ });
1156
+ (0, import_react.useImperativeHandle)(y, () => ({
1157
+ editor: G.current,
1158
+ state: K,
1159
+ view: q
1160
+ }), [
1161
+ G,
1162
+ J,
1163
+ K,
1164
+ q
1165
+ ]);
1166
+ var X = (0, import_react.useCallback)((e3) => {
1167
+ G.current = e3, Y(e3);
1168
+ }, [Y]);
1169
+ if (typeof x != "string") throw Error("value must be typeof string but got " + typeof x);
1170
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _extends({
1171
+ ref: X,
1172
+ className: (typeof A == "string" ? "cm-theme-" + A : "cm-theme") + (b ? " " + b : "")
1173
+ }, W));
1174
+ });
1175
+ ReactCodeMirror.displayName = "CodeMirror";
1176
+ var esm_default = ReactCodeMirror;
1177
+ export {
1178
+ minimalSetup as n,
1179
+ esm_default as t
1180
+ };