@inkeep/open-knowledge 0.24.0-beta.10 → 0.24.0-beta.2

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 (242) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/cli.mjs +44 -56
  4. package/dist/constants-Jd_kvbOj.mjs +2 -0
  5. package/dist/{dist-BGSaL7p3.mjs → dist-CcTqmmvR.mjs} +1 -1
  6. package/dist/{dist-BE7wFbsP.mjs → dist-OXU4D9x4.mjs} +9 -15
  7. package/dist/{gh-detect-B4gJX6Zo.mjs → gh-detect-DR8F3B_q.mjs} +2 -2
  8. package/dist/index.mjs +1 -1
  9. package/dist/init-CLPAj9nJ.mjs +1 -0
  10. package/dist/init-DHl0CYBU.mjs +317 -0
  11. package/dist/loader-BXc9EiKD.mjs +1 -0
  12. package/dist/{loader-BPD9hW0l.mjs → loader-D_x_IyoA.mjs} +2 -2
  13. package/dist/{preview-CqcQ1aZg.mjs → preview-B5IyC5t-.mjs} +2 -2
  14. package/dist/preview-Cro7ZQz9.mjs +1 -0
  15. package/dist/public/assets/{ActivityModeContent-D3kLnSnB.js → ActivityModeContent-DEiciTSd.js} +2 -2
  16. package/dist/public/assets/{ConsentDialogBody-DCI_Zz2q.js → ConsentDialogBody-BLdl7bD4.js} +1 -1
  17. package/dist/public/assets/DocumentContext-C-wDVnFV.js +34 -0
  18. package/dist/public/assets/{GraphPanel-Dtitc1eX.js → GraphPanel-B7rLBrzx.js} +2 -2
  19. package/dist/public/assets/{ManagedArtifactProperties-BkeB_fXl.js → ManagedArtifactProperties-gE2PmAzV.js} +1 -1
  20. package/dist/public/assets/{McpConsentDialogBody-BbLcmrpa.js → McpConsentDialogBody-CIYpdlED.js} +1 -1
  21. package/dist/public/assets/PropertyPanel-DeDmWUyq.js +2 -0
  22. package/dist/public/assets/{SettingsDialogBody-BLFBdN9z.js → SettingsDialogBody-B1Ey0zo3.js} +2 -2
  23. package/dist/public/assets/{SkillEditorActions-6BIs3QJ2.js → SkillEditorActions-CMgQx71p.js} +1 -1
  24. package/dist/public/assets/{SourceEditor-DxYl978n.js → SourceEditor-Baen8H9p.js} +2 -2
  25. package/dist/public/assets/{TerminalPanel-BZfQlHIU.js → TerminalPanel-DBiCU03J.js} +5 -5
  26. package/dist/public/assets/{_baseFor-D25oCqSU.js → _baseFor-D54ddCgV.js} +1 -1
  27. package/dist/public/assets/{agent-presence-CkVdjA8f.js → agent-presence-CPRnxEOl.js} +1 -1
  28. package/dist/public/assets/{arc-CiaWvt2w.js → arc-CX8VzsKv.js} +1 -1
  29. package/dist/public/assets/architecture-YZFGNWBL-LCAJUs2E.js +1 -0
  30. package/dist/public/assets/{architectureDiagram-Q4EWVU46-NxFvfkUm.js → architectureDiagram-Q4EWVU46-COjsIxjs.js} +1 -1
  31. package/dist/public/assets/{blockDiagram-DXYQGD6D-BeV4XK8L.js → blockDiagram-DXYQGD6D-DGJUDn9H.js} +1 -1
  32. package/dist/public/assets/{c4Diagram-AHTNJAMY-DMxcpW8j.js → c4Diagram-AHTNJAMY-CRV9SgJm.js} +1 -1
  33. package/dist/public/assets/calendar-BOfR9Wel.js +1 -0
  34. package/dist/public/assets/channel-D5KDsooX.js +1 -0
  35. package/dist/public/assets/{checkbox-Br2wN2O0.js → checkbox-DBdFRrZg.js} +1 -1
  36. package/dist/public/assets/{chunk-2KRD3SAO-tPsWTtQ8.js → chunk-2KRD3SAO-BADJbdsA.js} +1 -1
  37. package/dist/public/assets/{chunk-336JU56O-D1-vm4Aq.js → chunk-336JU56O-QSmC96Rs.js} +2 -2
  38. package/dist/public/assets/chunk-426QAEUC-DLJUx4YH.js +1 -0
  39. package/dist/public/assets/{chunk-4BX2VUAB-BBbXBHik.js → chunk-4BX2VUAB-CHAo1-t1.js} +1 -1
  40. package/dist/public/assets/{chunk-4TB4RGXK-8_DPOE46.js → chunk-4TB4RGXK-_pOPhRB4.js} +1 -1
  41. package/dist/public/assets/chunk-55IACEB6--4MoDq_6.js +1 -0
  42. package/dist/public/assets/{chunk-5FUZZQ4R-Dcjz8zV3.js → chunk-5FUZZQ4R-D6HYk55Z.js} +1 -1
  43. package/dist/public/assets/{chunk-5PVQY5BW-zd6E2AwX.js → chunk-5PVQY5BW-DIn4cbvq.js} +1 -1
  44. package/dist/public/assets/{chunk-67CJDMHE-DhsO5dA4.js → chunk-67CJDMHE-C14F5sRw.js} +1 -1
  45. package/dist/public/assets/{chunk-7N4EOEYR-_OPnqGDq.js → chunk-7N4EOEYR-Dw-Bq2eG.js} +1 -1
  46. package/dist/public/assets/{chunk-AA7GKIK3-CmQNMaMq.js → chunk-AA7GKIK3-C8uhEWlv.js} +1 -1
  47. package/dist/public/assets/{chunk-BSJP7CBP-COD3jCAD.js → chunk-BSJP7CBP-BW2v_2o9.js} +1 -1
  48. package/dist/public/assets/{chunk-CIAEETIT-B6L60eSe.js → chunk-CIAEETIT-BRhCdt9D.js} +1 -1
  49. package/dist/public/assets/{chunk-EDXVE4YY-DJpiytWA.js → chunk-EDXVE4YY-UzWuBV_O.js} +1 -1
  50. package/dist/public/assets/{chunk-ENJZ2VHE-BRL63elo.js → chunk-ENJZ2VHE-CJjgYRyL.js} +1 -1
  51. package/dist/public/assets/{chunk-FMBD7UC4-8FaPWUe0.js → chunk-FMBD7UC4-BpjuUpyo.js} +1 -1
  52. package/dist/public/assets/{chunk-FOC6F5B3-R--gjWDw.js → chunk-FOC6F5B3-UKBey2zk.js} +1 -1
  53. package/dist/public/assets/{chunk-ICPOFSXX-CBTIINX7.js → chunk-ICPOFSXX-DY9nFxrX.js} +2 -2
  54. package/dist/public/assets/{chunk-K5T4RW27-kfFBI7dm.js → chunk-K5T4RW27-CpMfAm3b.js} +1 -1
  55. package/dist/public/assets/{chunk-KGLVRYIC-MGoiNxXR.js → chunk-KGLVRYIC-rrqQGbOL.js} +1 -1
  56. package/dist/public/assets/{chunk-LIHQZDEY-3OBi6RFi.js → chunk-LIHQZDEY-yFR0cKbH.js} +1 -1
  57. package/dist/public/assets/{chunk-ORNJ4GCN-D1jJqGHz.js → chunk-ORNJ4GCN-BtPodknv.js} +1 -1
  58. package/dist/public/assets/{chunk-OYMX7WX6-CZN76u5O.js → chunk-OYMX7WX6-CnSRtGDg.js} +1 -1
  59. package/dist/public/assets/chunk-QZHKN3VN-CmNIolyF.js +1 -0
  60. package/dist/public/assets/{chunk-U2HBQHQK-DEerLjEq.js → chunk-U2HBQHQK-DdsCe4K6.js} +1 -1
  61. package/dist/public/assets/{chunk-X2U36JSP-B_Aoz3Bs.js → chunk-X2U36JSP-DHnVr_BK.js} +1 -1
  62. package/dist/public/assets/{chunk-XPW4576I-Cfo5EZ2y.js → chunk-XPW4576I-BwkqUpw2.js} +1 -1
  63. package/dist/public/assets/{chunk-YZCP3GAM-D8IyN6od.js → chunk-YZCP3GAM-BJ-fc2Rg.js} +1 -1
  64. package/dist/public/assets/{chunk-ZZ45TVLE-CtHOqhsK.js → chunk-ZZ45TVLE-BCp9ngvG.js} +1 -1
  65. package/dist/public/assets/classDiagram-6PBFFD2Q-CcsZam4p.js +1 -0
  66. package/dist/public/assets/classDiagram-v2-HSJHXN6E-DETyEa0B.js +1 -0
  67. package/dist/public/assets/clone-BbgQKnGZ.js +1 -0
  68. package/dist/public/assets/{collapsible-FSPLRtBn.js → collapsible-B9pRLq8V.js} +1 -1
  69. package/dist/public/assets/{config-validation-events-Cl8H7Sg2.js → config-validation-events-QwSBoIEm.js} +4 -4
  70. package/dist/public/assets/{cose-bilkent-S5V4N54A-D7s2A-mt.js → cose-bilkent-S5V4N54A-fa7N9UIg.js} +1 -1
  71. package/dist/public/assets/{dagre-Bdh4z066.js → dagre-COqttKg6.js} +1 -1
  72. package/dist/public/assets/{dagre-KV5264BT-CnfZ6fw7.js → dagre-KV5264BT-D-MCTUUw.js} +1 -1
  73. package/dist/public/assets/{diagram-5BDNPKRD-DH8DUt-N.js → diagram-5BDNPKRD-DQc8ouPM.js} +1 -1
  74. package/dist/public/assets/{diagram-G4DWMVQ6-D7Y2TMQn.js → diagram-G4DWMVQ6-kua0kYmN.js} +1 -1
  75. package/dist/public/assets/{diagram-MMDJMWI5-_CTgdNhE.js → diagram-MMDJMWI5-UabkDa4C.js} +1 -1
  76. package/dist/public/assets/{diagram-TYMM5635-yAT3IgDs.js → diagram-TYMM5635-BHqAOmX9.js} +1 -1
  77. package/dist/public/assets/{dialog-C_TDJ6cj.js → dialog-Bt8vN5IM.js} +1 -1
  78. package/dist/public/assets/{dist-Bqo1ZTng.js → dist-5njPzycn.js} +1 -1
  79. package/dist/public/assets/{dist-BdwnfcKi.js → dist-B-_AIBU7.js} +1 -1
  80. package/dist/public/assets/{dist-C3ftUzLd.js → dist-BGwzEJ7I.js} +1 -1
  81. package/dist/public/assets/{dist-znFZQjzE.js → dist-BfNYKL0c2.js} +1 -1
  82. package/dist/public/assets/{dist-E5KjgWw7.js → dist-Bvyh5TDV.js} +1 -1
  83. package/dist/public/assets/{dist-3l3ADjEo.js → dist-CZ8juU19.js} +1 -1
  84. package/dist/public/assets/{dist-Di2l3Ssa.js → dist-Cmfs-Ydn.js} +65 -65
  85. package/dist/public/assets/{dist-BZEgBj4N.js → dist-CtqWzamV2.js} +1 -1
  86. package/dist/public/assets/{dist-ICp_3rWY.js → dist-DEyMVsLW.js} +1 -1
  87. package/dist/public/assets/{dist-AQSp7Qij.js → dist-Dpgw_p7D.js} +1 -1
  88. package/dist/public/assets/{dist-CHEQzAl9.js → dist-FGpiMDYQ.js} +1 -1
  89. package/dist/public/assets/dist-GsKSyQg-.js +1 -0
  90. package/dist/public/assets/{dist-Dtxdqotp.js → dist-H4xHjwbu.js} +1 -1
  91. package/dist/public/assets/{dist-DWaLpHcz.js → dist-ctJT8lVd.js} +1 -1
  92. package/dist/public/assets/{documents-events-BYd41PCA.js → documents-events-BZ-NuT20.js} +1 -1
  93. package/dist/public/assets/{erDiagram-SMLLAGMA-B2N-rX7W.js → erDiagram-SMLLAGMA-BJ6mJb4X.js} +1 -1
  94. package/dist/public/assets/{file-tree-adapter-D5GTz2ID.js → file-tree-adapter-k_pkZ3zh.js} +1 -1
  95. package/dist/public/assets/{flatten-sS3L8FSH.js → flatten-_XsqzTi6.js} +1 -1
  96. package/dist/public/assets/{flowDiagram-DWJPFMVM-BokUmIjd.js → flowDiagram-DWJPFMVM-CqNbEdTQ.js} +1 -1
  97. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-BildKT2S.js → ganttDiagram-T4ZO3ILL-C0OJIv4u.js} +1 -1
  98. package/dist/public/assets/gitGraph-7Q5UKJZL-B7OVJvX8.js +1 -0
  99. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-DN7mmlx1.js → gitGraphDiagram-UUTBAWPF-BIvRakNL.js} +1 -1
  100. package/dist/public/assets/{graphlib-Ev7xYInR.js → graphlib-Ndup9edl.js} +1 -1
  101. package/dist/public/assets/index-B360dC7D.css +1 -0
  102. package/dist/public/assets/index-R2qGh526.js +2004 -0
  103. package/dist/public/assets/info-OMHHGYJF-1noYtGam.js +1 -0
  104. package/dist/public/assets/{infoDiagram-42DDH7IO-DLEmjvKE.js → infoDiagram-42DDH7IO-BZDO7AiE.js} +1 -1
  105. package/dist/public/assets/{isEmpty-DKKUMPPC.js → isEmpty-aix63sna.js} +1 -1
  106. package/dist/public/assets/isSymbol-DNCAG2i9.js +1 -0
  107. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-86ybJ4r7.js → ishikawaDiagram-UXIWVN3A-1ASGrOot.js} +1 -1
  108. package/dist/public/assets/{journeyDiagram-VCZTEJTY-Cjv_3O7y.js → journeyDiagram-VCZTEJTY-kiFyWa4j.js} +1 -1
  109. package/dist/public/assets/{kanban-definition-6JOO6SKY-DY3-b8O-.js → kanban-definition-6JOO6SKY-DK89HltM.js} +1 -1
  110. package/dist/public/assets/{keyboard-shortcuts-BsTuVge8.js → keyboard-shortcuts-DdtsPkF4.js} +1 -1
  111. package/dist/public/assets/{label-DyT4OD9H.js → label-Bg6tgeFh.js} +1 -1
  112. package/dist/public/assets/{line-7O-RVBuT.js → line-BntNoGZG.js} +1 -1
  113. package/dist/public/assets/{linear-k9FggNF1.js → linear-N_t9yEQX.js} +1 -1
  114. package/dist/public/assets/{mermaid-parser.core-BD_vM2ET.js → mermaid-parser.core-Bt_9ZpQF.js} +2 -2
  115. package/dist/public/assets/{mermaid.core-skHi15xD.js → mermaid.core-CMx0_yN5.js} +3 -3
  116. package/dist/public/assets/{mindmap-definition-QFDTVHPH-IB_V4uN7.js → mindmap-definition-QFDTVHPH-CmIKuiAN.js} +1 -1
  117. package/dist/public/assets/{navigation-targets-JmelDbnG.js → navigation-targets-DosY_GDn.js} +1 -1
  118. package/dist/public/assets/{now-cVYsjiQf.js → now-BcKw8pEx.js} +1 -1
  119. package/dist/public/assets/{open-managed-artifact-tab-C1P5ckzv.js → open-managed-artifact-tab-HL4UJ8d1.js} +1 -1
  120. package/dist/public/assets/{ordinal-CswHjkoW.js → ordinal-BAx3IfMd.js} +1 -1
  121. package/dist/public/assets/packet-4T2RLAQJ-D3fc6s9_.js +1 -0
  122. package/dist/public/assets/pie-ZZUOXDRM-DaAgDyo7.js +1 -0
  123. package/dist/public/assets/{pieDiagram-DEJITSTG-DGtP3wwq.js → pieDiagram-DEJITSTG-DACrQaif.js} +1 -1
  124. package/dist/public/assets/{project-paths-CFOqTfJj.js → project-paths-CK_36JyE.js} +1 -1
  125. package/dist/public/assets/prop-types-BpxMt5L_.js +1 -0
  126. package/dist/public/assets/{propagation-api-CR2CQW4x.js → propagation-api-Dhdns5D6.js} +1 -1
  127. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-B9rxVP0b.js → quadrantDiagram-34T5L4WZ-DoxwJYr7.js} +1 -1
  128. package/dist/public/assets/radar-PYXPWWZC-DspSpQh4.js +1 -0
  129. package/dist/public/assets/{radio-group-BFP076-0.js → radio-group-_aqBV1Ev.js} +1 -1
  130. package/dist/public/assets/{reduce-CrpTR7cO.js → reduce-UKQOnjSn.js} +1 -1
  131. package/dist/public/assets/{requirementDiagram-MS252O5E-G580V0tZ.js → requirementDiagram-MS252O5E-0wPfI6QY.js} +1 -1
  132. package/dist/public/assets/{sankeyDiagram-XADWPNL6-DXuXPtkv.js → sankeyDiagram-XADWPNL6-LAE0chGZ.js} +1 -1
  133. package/dist/public/assets/{selection-context-LYo_sTfZ.js → selection-context-ud0S7IiG.js} +1 -1
  134. package/dist/public/assets/{sequenceDiagram-FGHM5R23-D3sq9jQw.js → sequenceDiagram-FGHM5R23-Chc9csZX.js} +1 -1
  135. package/dist/public/assets/{skill-actions-DGnNQ-ww.js → skill-actions-DMtg_juC.js} +1 -1
  136. package/dist/public/assets/{skills-api-DlAIvvy9.js → skills-api-C9-REwRl.js} +1 -1
  137. package/dist/public/assets/{src-E0Xmdnkn.js → src-BdihqH02.js} +1 -1
  138. package/dist/public/assets/{stateDiagram-FHFEXIEX-D0_mYY7n.js → stateDiagram-FHFEXIEX-QcyLuGMN.js} +1 -1
  139. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CwmZULOI.js +1 -0
  140. package/dist/public/assets/{target-navigation-intent-DgYVkH6P.js → target-navigation-intent-CdbY7hfn.js} +1 -1
  141. package/dist/public/assets/{telemetry-impl-DBczuMUj.js → telemetry-impl-BvXatK9v.js} +2 -2
  142. package/dist/public/assets/{timeline-definition-GMOUNBTQ-CMpZyEzW.js → timeline-definition-GMOUNBTQ-Cu9O4nWX.js} +1 -1
  143. package/dist/public/assets/{toggle-group--3vcPCRI.js → toggle-group-Bwdb9pNj.js} +1 -1
  144. package/dist/public/assets/{tooltip-DiL7DBhT.js → tooltip-D-omjYEX.js} +1 -1
  145. package/dist/public/assets/treeView-SZITEDCU-fP9uY0On.js +1 -0
  146. package/dist/public/assets/treemap-W4RFUUIX-BXJeI_YU.js +1 -0
  147. package/dist/public/assets/{typing-burst-detector-9lw_ne71.js → typing-burst-detector-D1mkuIxr.js} +3 -3
  148. package/dist/public/assets/{vennDiagram-DHZGUBPP-x72Dx_Vy.js → vennDiagram-DHZGUBPP-eH5Exbd9.js} +1 -1
  149. package/dist/public/assets/wardley-RL74JXVD-EnPRi_dh.js +1 -0
  150. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-QMd5rM-2.js → wardleyDiagram-NUSXRM2D-DW41OqxK.js} +1 -1
  151. package/dist/public/assets/{xychartDiagram-5P7HB3ND-Cbqm8fTK.js → xychartDiagram-5P7HB3ND-BT6ib8xM.js} +1 -1
  152. package/dist/public/index.html +53 -55
  153. package/dist/{repair-launch-json-9p39vwzB.mjs → repair-launch-json-C4uScfpn.mjs} +2 -2
  154. package/dist/{repair-mcp-configs-C1Sy2U7o.mjs → repair-mcp-configs-DcaKFTls.mjs} +2 -2
  155. package/dist/{repair-skills-BTS6TSPc.mjs → repair-skills-FrkWG5cZ.mjs} +2 -2
  156. package/dist/repair-skills-j0WYxmG7.mjs +1 -0
  157. package/dist/server-lock-8Lv6A-Xa-DCBoMd9v.mjs +1 -0
  158. package/dist/{server-lock-CN2YHwpP-DwE4XXIS.mjs → server-lock-CN2YHwpP-DiysUpvV.mjs} +28 -28
  159. package/dist/{src-Bl4diSbA.mjs → src-eMqWaGox.mjs} +3 -3
  160. package/dist/{start-gFjoCo6B.mjs → start-Bj0kpLUR.mjs} +2 -2
  161. package/dist/start-CZmqGXp6.mjs +1 -0
  162. package/dist/{write-project-skill-0Z8n-AaN.mjs → write-project-skill-DkyeK6BK.mjs} +2 -2
  163. package/package.json +1 -1
  164. package/dist/constants-BaS9E92U.mjs +0 -2
  165. package/dist/init-VMqajw-H.mjs +0 -1
  166. package/dist/init-g9VY6ZeQ.mjs +0 -317
  167. package/dist/loader-B1gwOwc0.mjs +0 -1
  168. package/dist/preview-CKZ5iMM5.mjs +0 -1
  169. package/dist/public/assets/DocumentContext-0Bw7mkAF.js +0 -34
  170. package/dist/public/assets/PropertyPanel-CHVCXVP7.js +0 -2
  171. package/dist/public/assets/architecture-YZFGNWBL-0pWnpYMK.js +0 -1
  172. package/dist/public/assets/calendar-hJvUCxTp.js +0 -1
  173. package/dist/public/assets/channel-Bc7iw-1z.js +0 -1
  174. package/dist/public/assets/chevron-left-CGj9PTYZ.js +0 -1
  175. package/dist/public/assets/chunk-426QAEUC-56v0L0jI.js +0 -1
  176. package/dist/public/assets/chunk-55IACEB6-C-vOsSCw.js +0 -1
  177. package/dist/public/assets/chunk-QZHKN3VN-L8ovJpy0.js +0 -1
  178. package/dist/public/assets/classDiagram-6PBFFD2Q-BKJjlIFa.js +0 -1
  179. package/dist/public/assets/classDiagram-v2-HSJHXN6E-C4fGwvjG.js +0 -1
  180. package/dist/public/assets/clone-rB6I880i.js +0 -1
  181. package/dist/public/assets/dist-BgLh90uo2.js +0 -1
  182. package/dist/public/assets/gitGraph-7Q5UKJZL-DNLE-2Tt.js +0 -1
  183. package/dist/public/assets/index-DW1SapJW.js +0 -2004
  184. package/dist/public/assets/index-DX6_m6Bm.css +0 -1
  185. package/dist/public/assets/info-OMHHGYJF-BiaOigFV.js +0 -1
  186. package/dist/public/assets/isSymbol-BgthEULk.js +0 -1
  187. package/dist/public/assets/packet-4T2RLAQJ-v1yqEdTP.js +0 -1
  188. package/dist/public/assets/pie-ZZUOXDRM-pmbX_rAr.js +0 -1
  189. package/dist/public/assets/prop-types-BI50tqle.js +0 -1
  190. package/dist/public/assets/radar-PYXPWWZC-CQRfh76o.js +0 -1
  191. package/dist/public/assets/startup-marks-CWTDb1CP.js +0 -1
  192. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BpKIOQ1k.js +0 -1
  193. package/dist/public/assets/telemetry-startup-Cg7C20ZM.js +0 -1
  194. package/dist/public/assets/treeView-SZITEDCU-iExObZ_v.js +0 -1
  195. package/dist/public/assets/treemap-W4RFUUIX-B-jRsyTq.js +0 -1
  196. package/dist/public/assets/wardley-RL74JXVD-DGsNLwY0.js +0 -1
  197. package/dist/repair-skills-9djvOEM4.mjs +0 -1
  198. package/dist/server-lock-8Lv6A-Xa-Cxe-7wxJ.mjs +0 -1
  199. package/dist/start-BYghjZPE.mjs +0 -1
  200. /package/dist/public/assets/{ActivityPanelDiffView-PUPu9fFq.js → ActivityPanelDiffView-D4MHJpV0.js} +0 -0
  201. /package/dist/public/assets/{__vite-browser-external-DIAygczV.js → __vite-browser-external-MOMtgHYZ.js} +0 -0
  202. /package/dist/public/assets/{array-B6ZTlsco.js → array-CBLp81Ex.js} +0 -0
  203. /package/dist/public/assets/{chevron-right-CVuQ_gVm.js → chevron-right-jyIhGBkw.js} +0 -0
  204. /package/dist/public/assets/{clike-kHME1xsl.js → clike-B_I7LHuO.js} +0 -0
  205. /package/dist/public/assets/{colors-7nNIGUOn.js → colors-DzdyOq8I.js} +0 -0
  206. /package/dist/public/assets/{config-context-tA-88vUT.js → config-context-DhhN0rlf.js} +0 -0
  207. /package/dist/public/assets/{cursor-BrtPotfZ.js → cursor-CpjEfgnv.js} +0 -0
  208. /package/dist/public/assets/{cytoscape.esm-rD9G3Tw9.js → cytoscape.esm-SCoi-wuq.js} +0 -0
  209. /package/dist/public/assets/{defaultLocale-jKqPDDbE.js → defaultLocale-BrXSu2JC.js} +0 -0
  210. /package/dist/public/assets/{diff-B_7QuALZ.js → diff-Crh7dhXT.js} +0 -0
  211. /package/dist/public/assets/{dist-KBKQayVB.js → dist-BLu8fLv5.js} +0 -0
  212. /package/dist/public/assets/{dist-BXd_K33i.js → dist-CPXhSDT0.js} +0 -0
  213. /package/dist/public/assets/{dist-ug68MPTZ.js → dist-KER3mSN7.js} +0 -0
  214. /package/dist/public/assets/{dist-CPqf4XEL.js → dist-oXbGii4W.js} +0 -0
  215. /package/dist/public/assets/{external-link-Bc6KvE1i.js → external-link-CJXR-UFu.js} +0 -0
  216. /package/dist/public/assets/{file-tree-rename-validation-BqGkSO9-.js → file-tree-rename-validation-OmIq2tUW.js} +0 -0
  217. /package/dist/public/assets/{format-Fsxus_sZ.js → format-CFMm5Ng-.js} +0 -0
  218. /package/dist/public/assets/{go-DlHfV6Cv.js → go-Z3wE98-I.js} +0 -0
  219. /package/dist/public/assets/{init-TpXo0TbV.js → init-BgBNAjap.js} +0 -0
  220. /package/dist/public/assets/{input-DkQ8Zmzd.js → input-CFm7DcvJ.js} +0 -0
  221. /package/dist/public/assets/{isObjectLike-0yTn5bno.js → isObjectLike-BdoalOjb.js} +0 -0
  222. /package/dist/public/assets/{katex-gTwLOSI2.js → katex-zjckjCBG.js} +0 -0
  223. /package/dist/public/assets/{lua-Cpo6SgEb.js → lua-Cqdgy56L.js} +0 -0
  224. /package/dist/public/assets/{mcp-consent-store-Q_heVQ86.js → mcp-consent-store-DZJQdxaS.js} +0 -0
  225. /package/dist/public/assets/{min-qPYEXls6.js → min-NHChNRX9.js} +0 -0
  226. /package/dist/public/assets/{path-CF3Q1cYH.js → path-p9xFZuMn.js} +0 -0
  227. /package/dist/public/assets/{pdf-D2qYqk1m.js → pdf-BIhr1Krc.js} +0 -0
  228. /package/dist/public/assets/{pdf.worker-BkdiOOpP.js → pdf.worker-BO0LPxWN.js} +0 -0
  229. /package/dist/public/assets/{perl-uq5LpsPX.js → perl-CE2S8U7m.js} +0 -0
  230. /package/dist/public/assets/{properties-DuLkwqft.js → properties-BbIafFRL.js} +0 -0
  231. /package/dist/public/assets/{r-DcEDABBa.js → r-DxZPApDG.js} +0 -0
  232. /package/dist/public/assets/{rough.esm-DwjmZEWq.js → rough.esm-5Tjchx1D.js} +0 -0
  233. /package/dist/public/assets/{ruby-C6V5dDsD.js → ruby-BgDu4VVp.js} +0 -0
  234. /package/dist/public/assets/{shell-CVvCNjui.js → shell-C7sKG-gh.js} +0 -0
  235. /package/dist/public/assets/{sql-CQQBnjZX.js → sql-Bm8-ThVq.js} +0 -0
  236. /package/dist/public/assets/{src-GEZz0zf_.js → src-CldOY_w0.js} +0 -0
  237. /package/dist/public/assets/{stex-coA_FIxI.js → stex-C863jojy.js} +0 -0
  238. /package/dist/public/assets/{swift-BBOV2SBg.js → swift-BMkXMkx2.js} +0 -0
  239. /package/dist/public/assets/{textarea-BQFFQ9_l.js → textarea-D3MecMx5.js} +0 -0
  240. /package/dist/public/assets/{toml-lQGk0tnp.js → toml-Bt_dL0dK.js} +0 -0
  241. /package/dist/public/assets/{trace-api-MhJXZpsM.js → trace-api-D2bW5RZv.js} +0 -0
  242. /package/dist/public/assets/{w3c-keyname-beU76Hfb.js → w3c-keyname-CO1Sq6Ug.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$ as i,An as a,Dn as o,Fn as s,G as c,In as l,Ln as u,M as d,Mn as f,Mt as p,N as m,Nn as h,On as g,P as _,Pn as v,Tn as y,Z as ee,jn as b,jt as te,kn as x}from"./DocumentContext-0Bw7mkAF.js";import{Ki as ne,ei as re,j as S,on as C}from"./dist-Di2l3Ssa.js";import{n as ie}from"./config-context-tA-88vUT.js";import{l as ae}from"./keyboard-shortcuts-BsTuVge8.js";import{$ as w,Dt as oe,Et as T,Ft as E,J as D,Ot as O,P as k,Q as A,Tt as j,X as M,jt as N,pt as P,ut as se,xt as F}from"./dist-DWaLpHcz.js";import{a as ce,d as le,f as I,h as ue,i as L,m as de,t as fe,u as pe}from"./typing-burst-detector-9lw_ne71.js";import{o as R,r as z}from"./selection-context-LYo_sTfZ.js";var B=e(t(),1),me=r(),V=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:f(this.yanchor),yhead:f(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},H=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new o(e)}toYPos(e,t=0){return b(this.ytext,e,t)}fromYPos(e){let t=x(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new V(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?T.cursor(n.pos,n.assoc):T.range(t.pos,n.pos)}},U=O.define({combine(e){return e[e.length-1]}}),W=F.define(),G=class{constructor(e){this.view=e,this.conf=e.state.facet(U),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[W.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(W)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
- `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},he=A.fromClass(G),ge=M.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),_e=F.define(),ve=class extends w{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return h(`span`,[s(`class`,`cm-ySelectionCaret`),s(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionCaretDot`)]),v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionInfo`)],[v(this.name)]),v(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},ye=class{constructor(e){this.conf=e.state.facet(U),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[_e.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=N.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,s=o.cursor==null?null:a(o.cursor.anchor),c=o.cursor==null?null:a(o.cursor.head);if(i!=null){let e=b(t,i.anchor),n=b(t,i.head);(o.cursor==null||!g(s,e)||!g(c,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=x(s.anchor,n),d=x(s.head,n);if(c==null||d==null||c.type!==t||d.type!==t)return;let{color:f=`#30bced`,name:p=`Anonymous`}=a.user||{},m=a.user&&a.user.colorLight||f+`33`,h=u(c.index,d.index),g=l(c.index,d.index),_=e.view.state.doc.lineAt(h),v=e.view.state.doc.lineAt(g);if(_.number===v.number)i.push({from:h,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});else{i.push({from:h,to:_.from+_.length,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})}),i.push({from:v.from,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});for(let t=_.number+1;t<v.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:D.line({attributes:{style:`background-color: ${m}`,class:`cm-yLineSelection`}})})}}i.push({from:d.index,to:d.index,value:D.widget({side:d.index-c.index>0?-1:1,block:!1,widget:new ve(f,p)})})}),this.decorations=D.set(i,!0)}},be=A.fromClass(ye,{decorations:e=>e.decorations}),xe=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},K=O.define({combine(e){return e[e.length-1]}});F.define();var Se=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=y(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[M.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(W)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Ce=A.fromClass(Se),we=({state:e,dispatch:t})=>e.facet(K).undo()||!0,Te=({state:e,dispatch:t})=>e.facet(K).redo()||!0,Ee=(e,t,{undoManager:n=new o(e)}={})=>{let r=new H(e,t),i=[U.of(r),he];return t&&i.push(ge,be),n!==!1&&i.push(K.of(new xe(n)),Ce,M.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?we(t):e.inputType===`historyRedo`?Te(t):!1}})),i},De=D.mark({class:`cm-link-ref-broken`}),q=/^\s{0,3}\[([^\]]+)\]:\s/,J=/\[([^\]]*)\]\[([^\]]*)\]/g,Oe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function Y(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function ke(e){let t=[];return k(e).iterate({enter(e){if(Oe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function X(e){let t=new Set,n=[],r=e.doc,i=ke(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(Y(n.from,i))continue;let a=q.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!Y(t.from,i)&&!q.test(t.text))for(J.lastIndex=0;;){let e=J.exec(t.text);if(!e)break;let r=t.from+e.index;if(Y(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(De.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),D.set(a)}var Ae=E.define({create(e){return X(e)},update(e,t){return t.docChanged?X(t.state):e},provide:e=>M.decorations.from(e)}),je=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Me=D.mark({class:`cm-del`}),Ne=D.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Z=D.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function Pe(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Fe(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!S.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(S.test(r.text))return{from:t.from,to:r.to}}return null}function Q(e,t){let n=[],r=k(e),i=Fe(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Me.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=je.exec(r.text),a=i?i[1].length:2,o=D.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=Pe(r.text),a=D.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(Ne.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),D.set(n)}var Ie=class{decorations;constructor(e){this.decorations=Q(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||k(e.startState)!==k(e.state))&&(this.decorations=Q(e.view.state,e.view.visibleRanges))}},Le=A.fromClass(Ie,{decorations:e=>e.decorations});function Re(){return[Le,Ae]}var ze=n(),Be=56;function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&S.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(S.test(n.line(e).text)){r=e+1;break}}let i=C(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:T.cursor(r.from),effects:M.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Ve(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:T.cursor(r),effects:M.scrollIntoView(r,{y:`center`})}),e.focus()})}function He(e){let t=(0,me.c)(33),{docName:n,ytext:r,provider:a,placeholder:o,isSourceModeActive:s}=e,c=(0,B.useRef)(null),l=(0,B.useRef)(null),[u,f]=(0,B.useState)(null);if(u)throw u;let{resolvedTheme:h}=ne(),{merged:g}=ie(),v=(0,B.useRef)(s),y=g?.editor?.wordWrap??!0,b,x;t[0]===s?(b=t[1],x=t[2]):(b=()=>{v.current=s},x=[s],t[0]=s,t[1]=b,t[2]=x),(0,B.useEffect)(b,x);let S=(0,B.useRef)(null),C;t[3]!==o||t[4]!==a||t[5]!==h||t[6]!==y||t[7]!==r?(C=()=>{let e=c.current;if(!e)return;let t=a.configuration.name??``,n,s=Ge;try{n=te({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,c=i({ydoc:a.document,ytext:r}),l=new j,u=new j,f=new j,p=new M({state:oe.create({doc:r.toString(),extensions:[pe,le({scrollToMatch:We}),se.of([ee]),Ee(r,a.awareness),...d({themeCompartment:l,resolvedTheme:h,ydoc:a.document,wordWrapCompartment:u,wordWrap:y,currentDocName:t}),Re(),c,M.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,L(t,`source`,ce(e.view)),z(t,`source`,R(e.view,t))},120))}),M.domEventHandlers({keydown:(e,t)=>!v.current||!re()||!ae(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),fe(),!0)}),f.of(P(o??``)),M.theme({"&":{height:`100%`}}),M.scrollMargins.of(Ue)]}),parent:e});L(t,`source`,ce(p)),z(t,`source`,R(p,t));let m=p.contentDOM;return m.addEventListener(`keydown`,s),m.addEventListener(`paste`,s),m.addEventListener(`drop`,s),m.addEventListener(`cut`,s),{view:p,ydoc:a.document,ytext:r,provider:a,themeCompartment:l,wordWrapCompartment:u,placeholderCompartment:f}}}),S.current=n,l.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),S.current=null,l.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=S.current;e&&p(e),S.current=null,l.current=null}},t[3]=o,t[4]=a,t[5]=h,t[6]=y,t[7]=r,t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==r?(w=[r,a],t[9]=a,t[10]=r,t[11]=w):w=t[11],(0,B.useEffect)(C,w);let T,E;t[12]===n?(T=t[13],E=t[14]):(T=()=>{},E=[n],t[12]=n,t[13]=T,t[14]=E),(0,B.useEffect)(T,E);let D,O;t[15]===h?(D=t[16],O=t[17]):(D=()=>{let e=S.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?m:_)})},O=[h],t[15]=h,t[16]=D,t[17]=O),(0,B.useEffect)(D,O);let k,A;t[18]===y?(k=t[19],A=t[20]):(A=()=>{let e=S.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(y?M.lineWrapping:[])})},k=[y],t[18]=y,t[19]=k,t[20]=A),(0,B.useEffect)(A,k);let N,F;t[21]===o?(N=t[22],F=t[23]):(N=()=>{let e=S.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(P(o??``))})},F=[o],t[21]=o,t[22]=N,t[23]=F),(0,B.useEffect)(N,F);let V,H;t[24]!==n||t[25]!==s?(V=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!s)return;let r=l.current;r&&($(r,t),de(n))};return window.addEventListener(I,e),()=>window.removeEventListener(I,e)},H=[n,s],t[24]=n,t[25]=s,t[26]=V,t[27]=H):(V=t[26],H=t[27]),(0,B.useEffect)(V,H);let U,W;t[28]!==n||t[29]!==s?(U=()=>{if(!s)return;let e=l.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ve(e,t.detail)}},W=[n,s],t[28]=n,t[29]=s,t[30]=U,t[31]=W):(U=t[30],W=t[31]),(0,B.useEffect)(U,W);let G;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,ze.jsx)(`div`,{ref:c,className:`source-editor h-full pb-3`}),t[32]=G):G=t[32],G}function Ue(){return{top:Be}}function We(e){return M.scrollIntoView(e,{y:`start`})}function Ge(){return c()}export{He as SourceEditor};
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{$ as i,An as a,Dn as o,Fn as s,G as c,In as l,Ln as u,M as d,Mn as f,Mt as p,N as m,Nn as h,On as g,P as _,Pn as v,Tn as y,Z as ee,jn as b,jt as te,kn as x}from"./DocumentContext-C-wDVnFV.js";import{$r as ne,Gi as re,j as S,on as C}from"./dist-Cmfs-Ydn.js";import{n as ie}from"./config-context-DhhN0rlf.js";import{l as ae}from"./keyboard-shortcuts-DdtsPkF4.js";import{$ as w,Dt as oe,Et as T,Ft as E,J as D,Ot as O,P as k,Q as A,Tt as j,X as M,jt as N,pt as P,ut as se,xt as F}from"./dist-ctJT8lVd.js";import{a as ce,d as le,f as I,h as ue,i as L,m as de,t as fe,u as pe}from"./typing-burst-detector-D1mkuIxr.js";import{o as R,r as z}from"./selection-context-ud0S7IiG.js";var B=e(t(),1),me=r(),V=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:f(this.yanchor),yhead:f(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},H=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new o(e)}toYPos(e,t=0){return b(this.ytext,e,t)}fromYPos(e){let t=x(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new V(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?T.cursor(n.pos,n.assoc):T.range(t.pos,n.pos)}},U=O.define({combine(e){return e[e.length-1]}}),W=F.define(),G=class{constructor(e){this.view=e,this.conf=e.state.facet(U),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[W.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(W)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
+ `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},he=A.fromClass(G),ge=M.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),_e=F.define(),ve=class extends w{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return h(`span`,[s(`class`,`cm-ySelectionCaret`),s(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionCaretDot`)]),v(`⁠`),h(`div`,[s(`class`,`cm-ySelectionInfo`)],[v(this.name)]),v(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},ye=class{constructor(e){this.conf=e.state.facet(U),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[_e.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=N.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,s=o.cursor==null?null:a(o.cursor.anchor),c=o.cursor==null?null:a(o.cursor.head);if(i!=null){let e=b(t,i.anchor),n=b(t,i.head);(o.cursor==null||!g(s,e)||!g(c,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=x(s.anchor,n),d=x(s.head,n);if(c==null||d==null||c.type!==t||d.type!==t)return;let{color:f=`#30bced`,name:p=`Anonymous`}=a.user||{},m=a.user&&a.user.colorLight||f+`33`,h=u(c.index,d.index),g=l(c.index,d.index),_=e.view.state.doc.lineAt(h),v=e.view.state.doc.lineAt(g);if(_.number===v.number)i.push({from:h,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});else{i.push({from:h,to:_.from+_.length,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})}),i.push({from:v.from,to:g,value:D.mark({attributes:{style:`background-color: ${m}`},class:`cm-ySelection`})});for(let t=_.number+1;t<v.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:D.line({attributes:{style:`background-color: ${m}`,class:`cm-yLineSelection`}})})}}i.push({from:d.index,to:d.index,value:D.widget({side:d.index-c.index>0?-1:1,block:!1,widget:new ve(f,p)})})}),this.decorations=D.set(i,!0)}},be=A.fromClass(ye,{decorations:e=>e.decorations}),xe=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},K=O.define({combine(e){return e[e.length-1]}});F.define();var Se=class{constructor(e){this.view=e,this.conf=e.state.facet(K),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=y(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[M.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(W)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Ce=A.fromClass(Se),we=({state:e,dispatch:t})=>e.facet(K).undo()||!0,Te=({state:e,dispatch:t})=>e.facet(K).redo()||!0,Ee=(e,t,{undoManager:n=new o(e)}={})=>{let r=new H(e,t),i=[U.of(r),he];return t&&i.push(ge,be),n!==!1&&i.push(K.of(new xe(n)),Ce,M.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?we(t):e.inputType===`historyRedo`?Te(t):!1}})),i},De=D.mark({class:`cm-link-ref-broken`}),q=/^\s{0,3}\[([^\]]+)\]:\s/,J=/\[([^\]]*)\]\[([^\]]*)\]/g,Oe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function Y(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function ke(e){let t=[];return k(e).iterate({enter(e){if(Oe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function X(e){let t=new Set,n=[],r=e.doc,i=ke(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(Y(n.from,i))continue;let a=q.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!Y(t.from,i)&&!q.test(t.text))for(J.lastIndex=0;;){let e=J.exec(t.text);if(!e)break;let r=t.from+e.index;if(Y(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(De.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),D.set(a)}var Ae=E.define({create(e){return X(e)},update(e,t){return t.docChanged?X(t.state):e},provide:e=>M.decorations.from(e)}),je=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Me=D.mark({class:`cm-del`}),Ne=D.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Z=D.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function Pe(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Fe(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!S.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(S.test(r.text))return{from:t.from,to:r.to}}return null}function Q(e,t){let n=[],r=k(e),i=Fe(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Me.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=je.exec(r.text),a=i?i[1].length:2,o=D.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=Pe(r.text),a=D.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(Ne.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Z.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),D.set(n)}var Ie=class{decorations;constructor(e){this.decorations=Q(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||k(e.startState)!==k(e.state))&&(this.decorations=Q(e.view.state,e.view.visibleRanges))}},Le=A.fromClass(Ie,{decorations:e=>e.decorations});function Re(){return[Le,Ae]}var ze=n(),Be=56;function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&S.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(S.test(n.line(e).text)){r=e+1;break}}let i=C(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:T.cursor(r.from),effects:M.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Ve(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:T.cursor(r),effects:M.scrollIntoView(r,{y:`center`})}),e.focus()})}function He(e){let t=(0,me.c)(33),{docName:n,ytext:r,provider:a,placeholder:o,isSourceModeActive:s}=e,c=(0,B.useRef)(null),l=(0,B.useRef)(null),[u,f]=(0,B.useState)(null);if(u)throw u;let{resolvedTheme:h}=re(),{merged:g}=ie(),v=(0,B.useRef)(s),y=g?.editor?.wordWrap??!0,b,x;t[0]===s?(b=t[1],x=t[2]):(b=()=>{v.current=s},x=[s],t[0]=s,t[1]=b,t[2]=x),(0,B.useEffect)(b,x);let S=(0,B.useRef)(null),C;t[3]!==o||t[4]!==a||t[5]!==h||t[6]!==y||t[7]!==r?(C=()=>{let e=c.current;if(!e)return;let t=a.configuration.name??``,n,s=Ge;try{n=te({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,c=i({ydoc:a.document,ytext:r}),l=new j,u=new j,f=new j,p=new M({state:oe.create({doc:r.toString(),extensions:[pe,le({scrollToMatch:We}),se.of([ee]),Ee(r,a.awareness),...d({themeCompartment:l,resolvedTheme:h,ydoc:a.document,wordWrapCompartment:u,wordWrap:y,currentDocName:t}),Re(),c,M.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,L(t,`source`,ce(e.view)),z(t,`source`,R(e.view,t))},120))}),M.domEventHandlers({keydown:(e,t)=>!v.current||!ne()||!ae(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),fe(),!0)}),f.of(P(o??``)),M.theme({"&":{height:`100%`}}),M.scrollMargins.of(Ue)]}),parent:e});L(t,`source`,ce(p)),z(t,`source`,R(p,t));let m=p.contentDOM;return m.addEventListener(`keydown`,s),m.addEventListener(`paste`,s),m.addEventListener(`drop`,s),m.addEventListener(`cut`,s),{view:p,ydoc:a.document,ytext:r,provider:a,themeCompartment:l,wordWrapCompartment:u,placeholderCompartment:f}}}),S.current=n,l.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),S.current=null,l.current=null,f(t instanceof Error?t:Error(String(t)))}return()=>{let e=S.current;e&&p(e),S.current=null,l.current=null}},t[3]=o,t[4]=a,t[5]=h,t[6]=y,t[7]=r,t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==r?(w=[r,a],t[9]=a,t[10]=r,t[11]=w):w=t[11],(0,B.useEffect)(C,w);let T,E;t[12]===n?(T=t[13],E=t[14]):(T=()=>{},E=[n],t[12]=n,t[13]=T,t[14]=E),(0,B.useEffect)(T,E);let D,O;t[15]===h?(D=t[16],O=t[17]):(D=()=>{let e=S.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?m:_)})},O=[h],t[15]=h,t[16]=D,t[17]=O),(0,B.useEffect)(D,O);let k,A;t[18]===y?(k=t[19],A=t[20]):(A=()=>{let e=S.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(y?M.lineWrapping:[])})},k=[y],t[18]=y,t[19]=k,t[20]=A),(0,B.useEffect)(A,k);let N,F;t[21]===o?(N=t[22],F=t[23]):(N=()=>{let e=S.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(P(o??``))})},F=[o],t[21]=o,t[22]=N,t[23]=F),(0,B.useEffect)(N,F);let V,H;t[24]!==n||t[25]!==s?(V=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!s)return;let r=l.current;r&&($(r,t),de(n))};return window.addEventListener(I,e),()=>window.removeEventListener(I,e)},H=[n,s],t[24]=n,t[25]=s,t[26]=V,t[27]=H):(V=t[26],H=t[27]),(0,B.useEffect)(V,H);let U,W;t[28]!==n||t[29]!==s?(U=()=>{if(!s)return;let e=l.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ve(e,t.detail)}},W=[n,s],t[28]=n,t[29]=s,t[30]=U,t[31]=W):(U=t[30],W=t[31]),(0,B.useEffect)(U,W);let G;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,ze.jsx)(`div`,{ref:c,className:`source-editor h-full pb-3`}),t[32]=G):G=t[32],G}function Ue(){return{top:Be}}function We(e){return M.scrollIntoView(e,{y:`start`})}function Ge(){return c()}export{He as SourceEditor};