@inkeep/open-knowledge 0.87.7 → 0.87.8

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 (187) hide show
  1. package/dist/assets/skills/project/SKILL.md +1 -1
  2. package/dist/cli.mjs +37 -37
  3. package/dist/constants-BrcY9KEq.mjs +1 -0
  4. package/dist/dist-Be8q4E8P.mjs +2224 -0
  5. package/dist/{dist-Dly9AMSy.mjs → dist-CAVfTttU.mjs} +1 -1
  6. package/dist/index.mjs +208 -208
  7. package/dist/{init-DFoAgX20.mjs → init-BezWk0T8.mjs} +31 -31
  8. package/dist/init-CoOXWehu.mjs +1 -0
  9. package/dist/{launch-json-removal-4BsSVH6y.mjs → launch-json-removal-qxuwihGl.mjs} +1 -1
  10. package/dist/{loader-DPvRxBUd.mjs → loader-CZbIslv_.mjs} +1 -1
  11. package/dist/loader-D9-GaZET.mjs +1 -0
  12. package/dist/{md-manager-BGnqyqi1-CuOBBDL0.mjs → md-manager-BGnqyqi1-CU8xHS4D.mjs} +169 -169
  13. package/dist/{open-browser-Dn4EWvoa.mjs → open-browser-BBYzWw_v.mjs} +1 -1
  14. package/dist/parse-worker.mjs +1 -1
  15. package/dist/preview-DRHbqMtM.mjs +1 -0
  16. package/dist/{preview-COOcHnbs.mjs → preview-j1VO7kT-.mjs} +1 -1
  17. package/dist/public/assets/{AccountSection-5hIj1Ywi.js → AccountSection-BC8vWAp1.js} +1 -1
  18. package/dist/public/assets/{ActivityModeContent-DxK2vP9C.js → ActivityModeContent-B37mdeyp.js} +1 -1
  19. package/dist/public/assets/{AddPropertiesButton-C8Q5GH74.js → AddPropertiesButton-BHdiLVFW.js} +2 -2
  20. package/dist/public/assets/{AgentConnectionsSection-BP4v8Jzk.js → AgentConnectionsSection-CIV6IvM9.js} +1 -1
  21. package/dist/public/assets/{AgentDiffPane-CBTJtBVL.js → AgentDiffPane-Dx5xGTXw.js} +1 -1
  22. package/dist/public/assets/{AttachmentsSection-98LztrgK.js → AttachmentsSection-tQg6H924.js} +1 -1
  23. package/dist/public/assets/{AuthModal-DR2nnIe4.js → AuthModal-BF2Z7OJL.js} +1 -1
  24. package/dist/public/assets/{CodeMirrorPropInput-Co68Qtgj.js → CodeMirrorPropInput-D-R5m5uK.js} +2 -2
  25. package/dist/public/assets/{ContentRulesSection-6_hKvwws.js → ContentRulesSection-BatV3WIb.js} +1 -1
  26. package/dist/public/assets/{DiffViewBoundary-HF9wG1D5.js → DiffViewBoundary-Ct8EAcvE.js} +1 -1
  27. package/dist/public/assets/{DocumentContext-BDehDo5h.js → DocumentContext-Cd2rvAGk.js} +3 -3
  28. package/dist/public/assets/{EditorModeToggle-DVN_dozt.js → EditorModeToggle-B0P_UWwo.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-TnqIl-Pg.js → ExcalidrawDocEditor-BxgWr5MA.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-Cpl9YQGV.js +1 -0
  31. package/dist/public/assets/{GraphPanel-D-NAOA44.js → GraphPanel-Cjjh0X-I.js} +2 -2
  32. package/dist/public/assets/{ImportSkillDialog-Bs0VIZvT.js → ImportSkillDialog-ClWgRmf0.js} +1 -1
  33. package/dist/public/assets/{LinkPreviewsSection-Dr5fmtZr.js → LinkPreviewsSection-LV_2P8LT.js} +1 -1
  34. package/dist/public/assets/{LintConfigEditor-WbVu7H_A.js → LintConfigEditor-B6LUeaZb.js} +1 -1
  35. package/dist/public/assets/{LintingSection-XMXkf-vv.js → LintingSection-BKrL48Dz.js} +1 -1
  36. package/dist/public/assets/ManagedArtifactProperties-1FTS2_7Z.js +1 -0
  37. package/dist/public/assets/ManagedArtifactProperties-DiQvC3oG.js +1 -0
  38. package/dist/public/assets/{McpConsentDialogBody-xbsziJ8M.js → McpConsentDialogBody-T-AsMqAM.js} +1 -1
  39. package/dist/public/assets/{MermaidDocEditor-DQQrPAhr.js → MermaidDocEditor-G-4SHjdp.js} +1 -1
  40. package/dist/public/assets/{NetworkAccessSection-DCs676MG.js → NetworkAccessSection-C1tHGCJv.js} +1 -1
  41. package/dist/public/assets/{OkignoreSection-CQywQkmc.js → OkignoreSection-CRFoJuYb.js} +1 -1
  42. package/dist/public/assets/{ProjectTemplatesSection-B7Ooul87.js → ProjectTemplatesSection-WddJ1lhc.js} +1 -1
  43. package/dist/public/assets/{PropertyDisplayRow-BrprDBf7.js → PropertyDisplayRow-BqggxEaP.js} +2 -2
  44. package/dist/public/assets/{PublishToGitHubDialog-Tv6p7uVq.js → PublishToGitHubDialog--6tR_4M4.js} +1 -1
  45. package/dist/public/assets/{RegisteredAgentIcon-CAJfDHjD.js → RegisteredAgentIcon-Bq2z3oRf.js} +1 -1
  46. package/dist/public/assets/{SchemaConfigEditor-Dt7B-r1C.js → SchemaConfigEditor-BsSLbnJv.js} +1 -1
  47. package/dist/public/assets/{SearchSection-LiYk8r8A.js → SearchSection-NI0n3J72.js} +1 -1
  48. package/dist/public/assets/{SessionsHost-DM1p-E_r.js → SessionsHost-DsikeGuj.js} +2 -2
  49. package/dist/public/assets/{SettingsDialogBody-gIqPA-06.js → SettingsDialogBody-4FNAhHR9.js} +2 -2
  50. package/dist/public/assets/{ShareReceiveMissDialog-Brp9IMno.js → ShareReceiveMissDialog-CMuF7vzy.js} +1 -1
  51. package/dist/public/assets/{SkillCostValue-BFJMlQId.js → SkillCostValue-DDhTa5Kn.js} +1 -1
  52. package/dist/public/assets/{SkillEditBanner-BYQhRIjd.js → SkillEditBanner-1xI4AWZN.js} +1 -1
  53. package/dist/public/assets/{SkillForkDialog-cfPQA1If.js → SkillForkDialog-BcgrUab0.js} +1 -1
  54. package/dist/public/assets/{SkillInstallMenu-CpyTgAOO.js → SkillInstallMenu-f08QXFO6.js} +1 -1
  55. package/dist/public/assets/SkillModeBanner-DJo427go.js +1 -0
  56. package/dist/public/assets/{SkillOriginInline-reReggq9.js → SkillOriginInline-BQhnp-U4.js} +1 -1
  57. package/dist/public/assets/{SkillPluginBundleDialog-Ct2pafVZ.js → SkillPluginBundleDialog-AajGslYO.js} +1 -1
  58. package/dist/public/assets/{SkillToolbarControls-HwGhpS1F.js → SkillToolbarControls-CuHFgseT.js} +1 -1
  59. package/dist/public/assets/{SkillsManagerSection-Ba3qS3d6.js → SkillsManagerSection-cOVbfp1s.js} +1 -1
  60. package/dist/public/assets/{SlidesPluginSection-dXy1hGNp.js → SlidesPluginSection-CayFA0zh.js} +1 -1
  61. package/dist/public/assets/{SlidesToolbarControls-Ctd7A4Q8.js → SlidesToolbarControls-BTg9RQ0D.js} +1 -1
  62. package/dist/public/assets/{SourceEditor-CNmpPANh.js → SourceEditor-Bh7rDwRA.js} +1 -1
  63. package/dist/public/assets/{SpellingSettings-CWteA58C.js → SpellingSettings-C3gKNkGi.js} +1 -1
  64. package/dist/public/assets/{SyncSection-C8nHOofm.js → SyncSection-ZuqAUuwo.js} +1 -1
  65. package/dist/public/assets/{SyncStatusBadge-BDTWfT7H.js → SyncStatusBadge-CoVcDuOz.js} +1 -1
  66. package/dist/public/assets/{TemplateRow-DybWEh-V.js → TemplateRow-B1g-a4Pw.js} +2 -2
  67. package/dist/public/assets/{TerminalLaunchContext-zaxrx8Ob.js → TerminalLaunchContext-CGtoVZtX.js} +1 -1
  68. package/dist/public/assets/{TerminalPanel-CzyduRsB.js → TerminalPanel-COTcQZbU.js} +1 -1
  69. package/dist/public/assets/{TerminalSection-BE6sW3r8.js → TerminalSection-cofgZ9pJ.js} +1 -1
  70. package/dist/public/assets/{TerminalWindowApp-BuA61_Qt.js → TerminalWindowApp-CEiPsUTe.js} +1 -1
  71. package/dist/public/assets/{TextDocEditor-B-4zePS8.js → TextDocEditor-CQ3aeIrD.js} +1 -1
  72. package/dist/public/assets/ThemePluginSection-Dhue16Q2.js +6 -0
  73. package/dist/public/assets/{ThreadView-Bd3MtAsq.js → ThreadView-BhXVLga9.js} +1 -1
  74. package/dist/public/assets/{TimelineDiffPane-BUs1FdYV.js → TimelineDiffPane-NcJINcU8.js} +1 -1
  75. package/dist/public/assets/{_envelope-q8XHEv4O-C-Qnl5Tu.js → _envelope-aSbxdSNI-BbmN1FUH.js} +1 -1
  76. package/dist/public/assets/{agent-connections-CKjjlHMQ.js → agent-connections-DOlRC9J4.js} +1 -1
  77. package/dist/public/assets/{agent-registry-CHWxsZbl.js → agent-registry-Dw7Mum0u.js} +1 -1
  78. package/dist/public/assets/{bridge-nc43unzY.js → bridge-C-lLcgzt.js} +3 -3
  79. package/dist/public/assets/{calendar-B0urmsQ1.js → calendar-aomRwj8d.js} +1 -1
  80. package/dist/public/assets/{catalog-B9JwWDPk.js → catalog-BNmmHvVJ.js} +1 -1
  81. package/dist/public/assets/{client-version-CLoB560i.js → client-version-Cuk7lASh.js} +1 -1
  82. package/dist/public/assets/{comment-chips-7O0rkVt9.js → comment-chips-CtNOFJws.js} +1 -1
  83. package/dist/public/assets/{config-provider-CZyNT69z.js → config-provider-D1SI9gJy.js} +1 -1
  84. package/dist/public/assets/config-schema-GlF078Yz.js +1 -0
  85. package/dist/public/assets/{css-color-to-hex-BUw_awQK.js → css-color-to-hex-Cnqvo0uF.js} +1 -1
  86. package/dist/public/assets/{doc-undo-manager-C39elvdt.js → doc-undo-manager-DiIW3uXv.js} +1 -1
  87. package/dist/public/assets/{field-controls-kKc5F9zV.js → field-controls-BwRnSCqe.js} +1 -1
  88. package/dist/public/assets/field-controls-OOVz_aSI.js +1 -0
  89. package/dist/public/assets/{handoff-DzPPe6fp.js → handoff-BDTTOcb6.js} +1 -1
  90. package/dist/public/assets/{ime-composition-sf57BdPh.js → ime-composition-C6RElBur.js} +1 -1
  91. package/dist/public/assets/index-8aCY7EBp.js +2209 -0
  92. package/dist/public/assets/{lint-config-client-CMydN46i.js → lint-config-client-CkU0vqu3.js} +1 -1
  93. package/dist/public/assets/{lint-plugins-B9Sx6T-K.js → lint-plugins-DVmKLhH2.js} +1 -1
  94. package/dist/public/assets/{markdown-lint-B8Z_0Kvy.js → markdown-lint-BDbIoz4f.js} +3 -3
  95. package/dist/public/assets/{markdownlint-rule-browser-CXbjrFdy.js → markdownlint-rule-browser-B7stW6Oh.js} +1 -1
  96. package/dist/public/assets/messages--ehzGEyL.js +1 -0
  97. package/dist/public/assets/messages-BY8vnrN5.js +1 -0
  98. package/dist/public/assets/messages-BsaUfgyT.js +1 -0
  99. package/dist/public/assets/messages-C3jyZ-tQ.js +1 -0
  100. package/dist/public/assets/messages-CRaWmTK3.js +1 -0
  101. package/dist/public/assets/messages-CjxzZ_an.js +1 -0
  102. package/dist/public/assets/messages-D9Q_Zb27.js +1 -0
  103. package/dist/public/assets/messages-Di5PZudR.js +1 -0
  104. package/dist/public/assets/messages-Dt7AN68O.js +1 -0
  105. package/dist/public/assets/messages-SQ_HVqr-.js +1 -0
  106. package/dist/public/assets/messages-VFA4QUBO.js +1 -0
  107. package/dist/public/assets/messages-kSFbJVg5.js +1 -0
  108. package/dist/public/assets/messages-mX7CV8Xh.js +1 -0
  109. package/dist/public/assets/{pending-receive-nav-store-B4VaB7tn.js → pending-receive-nav-store-CBBjDNkd.js} +1 -1
  110. package/dist/public/assets/{preferred-session-events-CrFREFZ_.js → preferred-session-events-BgwYtkI6.js} +1 -1
  111. package/dist/public/assets/{progress-18OX3ADn.js → progress-BxLURPwv.js} +1 -1
  112. package/dist/public/assets/{saved-themes-client-DmclwZ8v.js → saved-themes-client-B3RNutYm.js} +1 -1
  113. package/dist/public/assets/{schema-section-BXgkFDyQ.js → schema-section-B7Ec9YkJ.js} +1 -1
  114. package/dist/public/assets/{schemas-api-B9gBqMLK.js → schemas-api-DYoYU1Zh.js} +2 -2
  115. package/dist/public/assets/{selection-context-CfhVNTq2.js → selection-context-BEBCUDdv.js} +1 -1
  116. package/dist/public/assets/{skills-api-5TsLTlcr.js → skills-api-DPNzK8ks.js} +1 -1
  117. package/dist/public/assets/{src-CXLgOvQh.js → src-CtGzYG_O.js} +1 -1
  118. package/dist/public/assets/storage-scope-D82mTrBx.js +1 -0
  119. package/dist/public/assets/{tag-pill-input-DOxurUWT.js → tag-pill-input-CHT8aIYs.js} +1 -1
  120. package/dist/public/assets/{telemetry-impl-D7Q93UnT.js → telemetry-impl-sLhzQJdK.js} +1 -1
  121. package/dist/public/assets/{telemetry-startup-BmNczWSW.js → telemetry-startup-Cm52AVbe.js} +1 -1
  122. package/dist/public/assets/terminal-cli-display-B__FxqFM.js +1 -0
  123. package/dist/public/assets/{terminal-command-events-h-p66odT.js → terminal-command-events-DEYKqKZt.js} +1 -1
  124. package/dist/public/assets/{terminal-launch-events-BFXRsi4V.js → terminal-launch-events-Bg7uGfvu.js} +1 -1
  125. package/dist/public/assets/{typing-burst-detector-nD07A0yS.js → typing-burst-detector-Bhb9juM1.js} +1 -1
  126. package/dist/public/assets/{uninstall-DyYmGM9i.js → uninstall-DizefbDX.js} +1 -1
  127. package/dist/public/assets/{use-activity-panel-BBjBZOw4.js → use-activity-panel-B75oeFRc.js} +1 -1
  128. package/dist/public/assets/{use-apply-config-color-theme-BPRaqk9x.js → use-apply-config-color-theme-KcqN_kbT.js} +2 -2
  129. package/dist/public/assets/{use-apply-config-language-DlSviEmN.js → use-apply-config-language-CbiUoguW.js} +2 -2
  130. package/dist/public/assets/{use-conflicts-BKMO-Ys4.js → use-conflicts-2mx0_ZrI.js} +1 -1
  131. package/dist/public/assets/{use-live-xterm-theme-8O2LGwCv.js → use-live-xterm-theme-BD2co7eQ.js} +1 -1
  132. package/dist/public/assets/{use-open-skill-Cg7Qb-lN.js → use-open-skill-CHWiVY7J.js} +1 -1
  133. package/dist/public/assets/{use-semantic-search-status-lORVQFbY.js → use-semantic-search-status-DdF3HjO-.js} +1 -1
  134. package/dist/public/assets/{use-skill-origin-14pvHqaa.js → use-skill-origin-DKeppfSH.js} +1 -1
  135. package/dist/public/assets/{use-skill-targets-d0ssmszt.js → use-skill-targets-DuCl3F30.js} +1 -1
  136. package/dist/public/assets/{use-skills-CEIGHZpc.js → use-skills-BxAjFPL9.js} +1 -1
  137. package/dist/public/assets/{use-terminal-enabled-gzWlI4Jz.js → use-terminal-enabled-DNrizf3g.js} +1 -1
  138. package/dist/public/assets/{use-timeline-entry-diff-D00Cmyyj.js → use-timeline-entry-diff-BdEsfiuE.js} +1 -1
  139. package/dist/public/assets/{use-workspace-CAGIeY37.js → use-workspace-CFQdH1aL.js} +1 -1
  140. package/dist/public/index.html +60 -60
  141. package/dist/public/uninstall.html +3 -3
  142. package/dist/{registry-probes-XAh0dMwy.mjs → registry-probes-DofBspPH.mjs} +3 -3
  143. package/dist/{removal-file-path-B7jm5zS-.mjs → removal-file-path-BIGm6W-u.mjs} +1 -1
  144. package/dist/{repair-launch-json-BMHc6HTH.mjs → repair-launch-json-CsWnJUor.mjs} +1 -1
  145. package/dist/{repair-mcp-configs-q4j978ub.mjs → repair-mcp-configs-BNISibbr.mjs} +1 -1
  146. package/dist/src-CFxG8xiN.mjs +1 -0
  147. package/dist/src-GWKoGWtT.mjs +16 -0
  148. package/dist/{start-DsVVe_gU.mjs → start-Cj4MmnfB.mjs} +3 -3
  149. package/dist/start-SYFsRNxh.mjs +1 -0
  150. package/package.json +4 -4
  151. package/dist/constants-wCQfICWN.mjs +0 -1
  152. package/dist/dist-BJZIDN3k.mjs +0 -2220
  153. package/dist/init-DvoEz8sG.mjs +0 -1
  154. package/dist/loader-DdLopZ3r.mjs +0 -1
  155. package/dist/preview-D8gDYXIZ.mjs +0 -1
  156. package/dist/public/assets/FeedbackForm-DDMzZj0T.js +0 -1
  157. package/dist/public/assets/ManagedArtifactProperties-DA7a-weA.js +0 -1
  158. package/dist/public/assets/ManagedArtifactProperties-DqShcsiZ.js +0 -1
  159. package/dist/public/assets/SkillModeBanner-CmfPlHVL.js +0 -1
  160. package/dist/public/assets/ThemePluginSection-GfXRIsMz.js +0 -6
  161. package/dist/public/assets/config-schema-B9u6M8He.js +0 -1
  162. package/dist/public/assets/field-controls-CKK_bzDT.js +0 -1
  163. package/dist/public/assets/index-BVDqMhbr.js +0 -2209
  164. package/dist/public/assets/messages-BDCxJPx2.js +0 -1
  165. package/dist/public/assets/messages-BEW0uPVX.js +0 -1
  166. package/dist/public/assets/messages-BO-eBk9m.js +0 -1
  167. package/dist/public/assets/messages-BaDp2_Fp.js +0 -1
  168. package/dist/public/assets/messages-CDO-xexo.js +0 -1
  169. package/dist/public/assets/messages-CRHWN_nJ.js +0 -1
  170. package/dist/public/assets/messages-CVuWmrbN.js +0 -1
  171. package/dist/public/assets/messages-C_w7Btlk.js +0 -1
  172. package/dist/public/assets/messages-CtVlTdzP.js +0 -1
  173. package/dist/public/assets/messages-Cz11LTJA.js +0 -1
  174. package/dist/public/assets/messages-D3qz2TwL.js +0 -1
  175. package/dist/public/assets/messages-DHXe_6Gj.js +0 -1
  176. package/dist/public/assets/messages-DKWtuhsU.js +0 -1
  177. package/dist/public/assets/storage-scope-Cnm-5Aal.js +0 -1
  178. package/dist/public/assets/terminal-cli-display-nVuidfOl.js +0 -1
  179. package/dist/src-CcMRvSRU.mjs +0 -1
  180. package/dist/src-RPvkOvVk.mjs +0 -16
  181. package/dist/start-C4Tih_DW.mjs +0 -1
  182. /package/dist/public/assets/{DeleteConfirmationDialog-B0lltyMh.js → DeleteConfirmationDialog-BsTU-OWm.js} +0 -0
  183. /package/dist/public/assets/{alert-RmVFIy8D.js → alert-Bb4K23ol.js} +0 -0
  184. /package/dist/public/assets/{folder-config-api-BDhEYA86.js → folder-config-api-oMYXBtrq.js} +0 -0
  185. /package/dist/public/assets/{format-CJ1bI5np.js → format-eyy9pWAn.js} +0 -0
  186. /package/dist/public/assets/{settings-section-labels-VKfUFuEe.js → settings-section-labels-DX7VF2VJ.js} +0 -0
  187. /package/dist/public/assets/{sortable.esm-CFAacZUM.js → sortable.esm-CtrUfCv8.js} +0 -0
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{n as a}from"./dist-PQ5KMVDh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{i as c,n as l,t as u}from"./tooltip-Bz6z4_se.js";import{n as d,t as f}from"./toggle-group-B7p69Qfd.js";import{t as p}from"./button-DzgjsZzC.js";import{a as m,v as h}from"./constants-upload-CVKO8P4d.js";import{n as g}from"./dist-BGzUo_18.js";import{n as _}from"./config-errors-DDAH9fqy.js";import{i as v}from"./use-apply-config-theme-CYFG76sS.js";import{o as y}from"./ime-composition-sf57BdPh.js";import"./config-provider-CZyNT69z.js";import{t as b}from"./file-tree-utils-CiVz_BRk.js";import{J as x,M as S,Tt as C}from"./dist-B8KZUrr_.js";import{i as w,n as T,r as E,t as D}from"./cm-theme-DY245iRg.js";import{t as O}from"./dist-8cadZTcN.js";import{t as k}from"./text-viewer-languages-CKtwqOI2.js";var A=o(),j=e(n(),1),M=class extends Error{httpStatus;constructor(e,t){super(e),this.name=`ViewerTextLoadError`,this.httpStatus=t}};function N(e){let t=(0,A.c)(10),{_:n}=i(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let a=r,{src:o,loadText:s}=e,c=(0,j.useRef)(s),l=(0,j.useRef)(a),u;t[2]!==s||t[3]!==a?(u=()=>{c.current=s,l.current=a},t[2]=s,t[3]=a,t[4]=u):u=t[4],(0,j.useEffect)(u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={status:`loading`},t[5]=d):d=t[5];let[f,p]=(0,j.useState)(d),m,h;return t[6]!==n||t[7]!==o?(m=()=>{let e=!1,t=new AbortController;p({status:`loading`});let r=c.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){p({status:`loaded`,content:t.text});return}p({status:`error`,message:t.message??l.current(t.status),httpStatus:t.status})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(o??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw new M(l.current(e.status),e.status);return e.text()}).then(t=>{e||p({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`}),httpStatus:t instanceof M?t.httpStatus:void 0})}),()=>{e=!0,t.abort()})},h=[o,n],t[6]=n,t[7]=o,t[8]=m,t[9]=h):(m=t[8],h=t[9]),(0,j.useEffect)(m,h),f}var P=t();function F(e){let t=(0,A.c)(10),{fileName:n,dataAttr:i,extraAttrs:a}=e,o=`${i}-state`,s;t[0]!==i||t[1]!==o?(s={[i]:``,[o]:`loading`},t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,P.jsx)(`span`,{children:(0,P.jsx)(r,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==n||t[7]!==s||t[8]!==c?(l=(0,P.jsx)(`section`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...s,...a,children:c}),t[5]=a,t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function I(e){let t=(0,A.c)(16),{fileName:n,dataAttr:i,extraAttrs:a,message:o,openFile:s}=e,c=`${i}-state`,l;t[0]!==i||t[1]!==c?(l={[i]:``,[c]:`error`},t[0]=i,t[1]=c,t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,P.jsx)(`div`,{className:`font-medium text-sm`,children:(0,P.jsx)(r,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=u);let d;t[5]===o?d=t[6]:(d=(0,P.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=d);let f;t[7]===s?f=t[8]:(f=s?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`mt-2`,"data-testid":`viewer-open-file`,onClick:()=>{E({url:s.url,projectRelPath:s.projectRelPath,ext:s.ext,title:s.title,forceOsDelegation:!0})},children:(0,P.jsx)(r,{id:`9npOH9`})}):null,t[7]=s,t[8]=f);let m;return t[9]!==a||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==d||t[14]!==f?(m=(0,P.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...l,...a,children:[u,d,f]}),t[9]=a,t[10]=n,t[11]=l,t[12]=u,t[13]=d,t[14]=f,t[15]=m):m=t[15],m}function L({assetPath:e,fileName:t,extension:n,httpStatus:r}){if(!e||r===404)return;let i=n.toLowerCase();return{projectRelPath:e,ext:i,title:t,url:w(`${m.has(i)?`/api/asset`:`/api/asset-text`}?path=${encodeURIComponent(e)}`)}}var R=D({dark:!0,background:`var(--background)`,gutterBackground:`var(--muted)`}),z=D({dark:!1,background:`var(--background)`,gutterBackground:`var(--muted)`});function B(e){let t=(0,A.c)(28),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=(0,j.useRef)(null),s=(0,j.useRef)(null),{resolvedTheme:c}=a(),l=N(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!o.current||u===null)return;let e=n.toLowerCase(),t=h(e),r=c===`dark`?R:z,i=!1,a=null;return k(e,t).then(e=>{if(i||!o.current)return;let t=[O,S(T),...e?[e]:[],x.editable.of(!0),C.readOnly.of(!0),x.lineWrapping,r];a=new x({state:C.create({doc:u,extensions:t}),parent:o.current}),s.current=a}),()=>{i=!0,a?.destroy(),s.current=null}},f=[u,n,c],t[4]=n,t[5]=u,t[6]=c,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,j.useEffect)(d,f);let p;t[9]===n?p=t[10]:(p={"data-text-viewer-extension":n},t[9]=n,t[10]=p);let m=p;if(l.status===`loading`){let e;return t[11]!==m||t[12]!==r?(e=(0,P.jsx)(F,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m}),t[11]=m,t[12]=r,t[13]=e):e=t[13],e}if(l.status===`error`){let e=l.message,a;t[14]!==n||t[15]!==l.httpStatus||t[16]!==r||t[17]!==i.assetPath?(a=L({assetPath:i.assetPath,fileName:r,extension:n,httpStatus:l.httpStatus}),t[14]=n,t[15]=l.httpStatus,t[16]=r,t[17]=i.assetPath,t[18]=a):a=t[18];let o;return t[19]!==m||t[20]!==l.message||t[21]!==r||t[22]!==a?(o=(0,P.jsx)(I,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:e,openFile:a}),t[19]=m,t[20]=l.message,t[21]=r,t[22]=a,t[23]=o):o=t[23],o}let g;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,P.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-auto`}),t[24]=g):g=t[24];let _;return t[25]!==n||t[26]!==r?(_=(0,P.jsx)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:g}),t[25]=n,t[26]=r,t[27]=_):_=t[27],_}function V(e){let t=(0,A.c)(29),{entry:n,className:r}=e,{_:a}=i(),{projectLocalBinding:o,projectLocalSynced:c,merged:l}=v();if(l===null||!c)return null;let u=l?.appearance?.sidebar,d=u?.showHiddenFiles??!1,f=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==f?(m=b(n,{showHiddenFiles:d,showOnlyMarkdownFiles:f}),t[0]=n,t[1]=d,t[2]=f,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let x;t[4]!==a||t[5]!==o?(x=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,_(t.error)),g.error(a({id:`P47EWZ`}),{description:_(t.error)}))},t[4]=a,t[5]=o,t[6]=x):x=t[6];let S=x,C;t[7]===r?C=t[8]:(C=s(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=C);let w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,P.jsx)(y,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=w):w=t[9];let T;t[10]===a?T=t[11]:(T=a({id:`j9tqwO`}),t[10]=a,t[11]=T);let E;t[12]===T?E=t[13]:(E=(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:T}),t[12]=T,t[13]=E);let D;t[14]!==a||t[15]!==h.hiddenFiles||t[16]!==S||t[17]!==o?(D=h.hiddenFiles?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showHiddenFiles:!0}),"aria-label":a({id:`XcGbim`}),title:a({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:a({id:`6KCH4m`})}):null,t[14]=a,t[15]=h.hiddenFiles,t[16]=S,t[17]=o,t[18]=D):D=t[18];let O;t[19]!==a||t[20]!==h.onlyMarkdownFiles||t[21]!==S||t[22]!==o?(O=h.onlyMarkdownFiles?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showOnlyMarkdownFiles:!1}),"aria-label":a({id:`10g8I_`}),title:a({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:a({id:`5-o4kO`})}):null,t[19]=a,t[20]=h.onlyMarkdownFiles,t[21]=S,t[22]=o,t[23]=O):O=t[23];let k;return t[24]!==O||t[25]!==C||t[26]!==E||t[27]!==D?(k=(0,P.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:C,children:[w,E,D,O]}),t[24]=O,t[25]=C,t[26]=E,t[27]=D,t[28]=k):k=t[28],k}var H={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},U=e=>{let t=(0,A.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,P.jsx)(`svg`,{"aria-hidden":`true`,...H,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},W=e=>{let t=(0,A.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(`title`,{children:`Markdown`}),r=(0,P.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,P.jsxs)(U,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},G=e=>{let t=(0,A.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(`title`,{children:`Textbox`}),r=(0,P.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,P.jsxs)(U,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function K(e){let t=(0,A.c)(48),{isSourceMode:n,onModeChange:a,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:p,sourceLabel:m,wysiwygDisabledReason:h}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=i(),y;t[0]!==v||t[1]!==p?(y=p??v({id:`ur2XSb`}),t[0]=v,t[1]=p,t[2]=y):y=t[2];let b=y,x;t[3]!==v||t[4]!==m?(x=m??v({id:`xbdtfY`}),t[3]=v,t[4]=m,t[5]=x):x=t[5];let S=x,C=(0,j.useId)(),w=_&&h?h:null,T=n?`source`:`wysiwyg`,E;t[6]===a?E=t[7]:(E=e=>{e&&a(e)},t[6]=a,t[7]=E);let D;t[8]===v?D=t[9]:(D=v({id:`n7aopT`}),t[8]=v,t[9]=D);let O=w?C:void 0,k;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,P.jsx)(G,{className:`size-4`}),t[10]=k):k=t[10];let M;t[11]!==O||t[12]!==_||t[13]!==b?(M=(0,P.jsx)(d,{value:`wysiwyg`,"aria-label":b,"aria-describedby":O,disabled:_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:k}),t[11]=O,t[12]=_,t[13]=b,t[14]=M):M=t[14];let N;t[15]!==w||t[16]!==C?(N=w?(0,P.jsx)(`span`,{id:C,className:`sr-only`,children:w}):null,t[15]=w,t[16]=C,t[17]=N):N=t[17];let F;t[18]!==M||t[19]!==N?(F=(0,P.jsx)(c,{asChild:!0,children:(0,P.jsxs)(`div`,{children:[M,N]})}),t[18]=M,t[19]=N,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==h||t[23]!==p?(I=_&&h?h:p||(0,P.jsx)(r,{id:`Mb_20S`}),t[21]=_,t[22]=h,t[23]=p,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,P.jsx)(l,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,P.jsxs)(u,{children:[F,L]}),t[27]=F,t[28]=L,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,P.jsx)(W,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,P.jsx)(c,{asChild:!0,children:(0,P.jsx)(`div`,{children:(0,P.jsx)(d,{value:`source`,"aria-label":S,disabled:g,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:z})})}),t[31]=g,t[32]=S,t[33]=B):B=t[33];let V;t[34]!==g||t[35]!==m?(V=g?(0,P.jsx)(r,{id:`G-JBA1`}):m||(0,P.jsx)(r,{id:`u6Hp4N`}),t[34]=g,t[35]=m,t[36]=V):V=t[36];let H;t[37]===V?H=t[38]:(H=(0,P.jsx)(l,{side:`bottom`,children:V}),t[37]=V,t[38]=H);let U;t[39]!==B||t[40]!==H?(U=(0,P.jsxs)(u,{children:[B,H]}),t[39]=B,t[40]=H,t[41]=U):U=t[41];let K;return t[42]!==R||t[43]!==U||t[44]!==T||t[45]!==E||t[46]!==D?(K=(0,P.jsxs)(f,{type:`single`,value:T,onValueChange:E,"aria-label":D,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[R,U]}),t[42]=R,t[43]=U,t[44]=T,t[45]=E,t[46]=D,t[47]=K):K=t[47],K}export{L as a,N as c,B as i,W as n,I as o,V as r,F as s,K as t};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{n as a}from"./dist-PQ5KMVDh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{i as c,n as l,t as u}from"./tooltip-Bz6z4_se.js";import{n as d,t as f}from"./toggle-group-B7p69Qfd.js";import{t as p}from"./button-DzgjsZzC.js";import{a as m,v as h}from"./constants-upload-CVKO8P4d.js";import{n as g}from"./dist-BGzUo_18.js";import{n as _}from"./config-errors-DDAH9fqy.js";import{i as v}from"./use-apply-config-theme-CYFG76sS.js";import{o as y}from"./ime-composition-C6RElBur.js";import"./config-provider-D1SI9gJy.js";import{t as b}from"./file-tree-utils-CiVz_BRk.js";import{J as x,M as S,Tt as C}from"./dist-B8KZUrr_.js";import{i as w,n as T,r as E,t as D}from"./cm-theme-DY245iRg.js";import{t as O}from"./dist-8cadZTcN.js";import{t as k}from"./text-viewer-languages-CKtwqOI2.js";var A=o(),j=e(n(),1),M=class extends Error{httpStatus;constructor(e,t){super(e),this.name=`ViewerTextLoadError`,this.httpStatus=t}};function N(e){let t=(0,A.c)(10),{_:n}=i(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let a=r,{src:o,loadText:s}=e,c=(0,j.useRef)(s),l=(0,j.useRef)(a),u;t[2]!==s||t[3]!==a?(u=()=>{c.current=s,l.current=a},t[2]=s,t[3]=a,t[4]=u):u=t[4],(0,j.useEffect)(u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={status:`loading`},t[5]=d):d=t[5];let[f,p]=(0,j.useState)(d),m,h;return t[6]!==n||t[7]!==o?(m=()=>{let e=!1,t=new AbortController;p({status:`loading`});let r=c.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){p({status:`loaded`,content:t.text});return}p({status:`error`,message:t.message??l.current(t.status),httpStatus:t.status})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(o??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw new M(l.current(e.status),e.status);return e.text()}).then(t=>{e||p({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`}),httpStatus:t instanceof M?t.httpStatus:void 0})}),()=>{e=!0,t.abort()})},h=[o,n],t[6]=n,t[7]=o,t[8]=m,t[9]=h):(m=t[8],h=t[9]),(0,j.useEffect)(m,h),f}var P=t();function F(e){let t=(0,A.c)(10),{fileName:n,dataAttr:i,extraAttrs:a}=e,o=`${i}-state`,s;t[0]!==i||t[1]!==o?(s={[i]:``,[o]:`loading`},t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,P.jsx)(`span`,{children:(0,P.jsx)(r,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==n||t[7]!==s||t[8]!==c?(l=(0,P.jsx)(`section`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...s,...a,children:c}),t[5]=a,t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function I(e){let t=(0,A.c)(16),{fileName:n,dataAttr:i,extraAttrs:a,message:o,openFile:s}=e,c=`${i}-state`,l;t[0]!==i||t[1]!==c?(l={[i]:``,[c]:`error`},t[0]=i,t[1]=c,t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,P.jsx)(`div`,{className:`font-medium text-sm`,children:(0,P.jsx)(r,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=u);let d;t[5]===o?d=t[6]:(d=(0,P.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=d);let f;t[7]===s?f=t[8]:(f=s?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`mt-2`,"data-testid":`viewer-open-file`,onClick:()=>{E({url:s.url,projectRelPath:s.projectRelPath,ext:s.ext,title:s.title,forceOsDelegation:!0})},children:(0,P.jsx)(r,{id:`9npOH9`})}):null,t[7]=s,t[8]=f);let m;return t[9]!==a||t[10]!==n||t[11]!==l||t[12]!==u||t[13]!==d||t[14]!==f?(m=(0,P.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...l,...a,children:[u,d,f]}),t[9]=a,t[10]=n,t[11]=l,t[12]=u,t[13]=d,t[14]=f,t[15]=m):m=t[15],m}function L({assetPath:e,fileName:t,extension:n,httpStatus:r}){if(!e||r===404)return;let i=n.toLowerCase();return{projectRelPath:e,ext:i,title:t,url:w(`${m.has(i)?`/api/asset`:`/api/asset-text`}?path=${encodeURIComponent(e)}`)}}var R=D({dark:!0,background:`var(--background)`,gutterBackground:`var(--muted)`}),z=D({dark:!1,background:`var(--background)`,gutterBackground:`var(--muted)`});function B(e){let t=(0,A.c)(28),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=(0,j.useRef)(null),s=(0,j.useRef)(null),{resolvedTheme:c}=a(),l=N(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!o.current||u===null)return;let e=n.toLowerCase(),t=h(e),r=c===`dark`?R:z,i=!1,a=null;return k(e,t).then(e=>{if(i||!o.current)return;let t=[O,S(T),...e?[e]:[],x.editable.of(!0),C.readOnly.of(!0),x.lineWrapping,r];a=new x({state:C.create({doc:u,extensions:t}),parent:o.current}),s.current=a}),()=>{i=!0,a?.destroy(),s.current=null}},f=[u,n,c],t[4]=n,t[5]=u,t[6]=c,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,j.useEffect)(d,f);let p;t[9]===n?p=t[10]:(p={"data-text-viewer-extension":n},t[9]=n,t[10]=p);let m=p;if(l.status===`loading`){let e;return t[11]!==m||t[12]!==r?(e=(0,P.jsx)(F,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m}),t[11]=m,t[12]=r,t[13]=e):e=t[13],e}if(l.status===`error`){let e=l.message,a;t[14]!==n||t[15]!==l.httpStatus||t[16]!==r||t[17]!==i.assetPath?(a=L({assetPath:i.assetPath,fileName:r,extension:n,httpStatus:l.httpStatus}),t[14]=n,t[15]=l.httpStatus,t[16]=r,t[17]=i.assetPath,t[18]=a):a=t[18];let o;return t[19]!==m||t[20]!==l.message||t[21]!==r||t[22]!==a?(o=(0,P.jsx)(I,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:e,openFile:a}),t[19]=m,t[20]=l.message,t[21]=r,t[22]=a,t[23]=o):o=t[23],o}let g;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,P.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-auto`}),t[24]=g):g=t[24];let _;return t[25]!==n||t[26]!==r?(_=(0,P.jsx)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:g}),t[25]=n,t[26]=r,t[27]=_):_=t[27],_}function V(e){let t=(0,A.c)(29),{entry:n,className:r}=e,{_:a}=i(),{projectLocalBinding:o,projectLocalSynced:c,merged:l}=v();if(l===null||!c)return null;let u=l?.appearance?.sidebar,d=u?.showHiddenFiles??!1,f=u?.showOnlyMarkdownFiles??!1,m;t[0]!==n||t[1]!==d||t[2]!==f?(m=b(n,{showHiddenFiles:d,showOnlyMarkdownFiles:f}),t[0]=n,t[1]=d,t[2]=f,t[3]=m):m=t[3];let h=m;if(!h.hiddenFiles&&!h.onlyMarkdownFiles)return null;let x;t[4]!==a||t[5]!==o?(x=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,_(t.error)),g.error(a({id:`P47EWZ`}),{description:_(t.error)}))},t[4]=a,t[5]=o,t[6]=x):x=t[6];let S=x,C;t[7]===r?C=t[8]:(C=s(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=C);let w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,P.jsx)(y,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=w):w=t[9];let T;t[10]===a?T=t[11]:(T=a({id:`j9tqwO`}),t[10]=a,t[11]=T);let E;t[12]===T?E=t[13]:(E=(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:T}),t[12]=T,t[13]=E);let D;t[14]!==a||t[15]!==h.hiddenFiles||t[16]!==S||t[17]!==o?(D=h.hiddenFiles?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showHiddenFiles:!0}),"aria-label":a({id:`XcGbim`}),title:a({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:a({id:`6KCH4m`})}):null,t[14]=a,t[15]=h.hiddenFiles,t[16]=S,t[17]=o,t[18]=D):D=t[18];let O;t[19]!==a||t[20]!==h.onlyMarkdownFiles||t[21]!==S||t[22]!==o?(O=h.onlyMarkdownFiles?(0,P.jsx)(p,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showOnlyMarkdownFiles:!1}),"aria-label":a({id:`10g8I_`}),title:a({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:a({id:`5-o4kO`})}):null,t[19]=a,t[20]=h.onlyMarkdownFiles,t[21]=S,t[22]=o,t[23]=O):O=t[23];let k;return t[24]!==O||t[25]!==C||t[26]!==E||t[27]!==D?(k=(0,P.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:C,children:[w,E,D,O]}),t[24]=O,t[25]=C,t[26]=E,t[27]=D,t[28]=k):k=t[28],k}var H={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},U=e=>{let t=(0,A.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,P.jsx)(`svg`,{"aria-hidden":`true`,...H,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},W=e=>{let t=(0,A.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(`title`,{children:`Markdown`}),r=(0,P.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,P.jsxs)(U,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},G=e=>{let t=(0,A.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(`title`,{children:`Textbox`}),r=(0,P.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,P.jsxs)(U,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function K(e){let t=(0,A.c)(48),{isSourceMode:n,onModeChange:a,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:p,sourceLabel:m,wysiwygDisabledReason:h}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=i(),y;t[0]!==v||t[1]!==p?(y=p??v({id:`ur2XSb`}),t[0]=v,t[1]=p,t[2]=y):y=t[2];let b=y,x;t[3]!==v||t[4]!==m?(x=m??v({id:`xbdtfY`}),t[3]=v,t[4]=m,t[5]=x):x=t[5];let S=x,C=(0,j.useId)(),w=_&&h?h:null,T=n?`source`:`wysiwyg`,E;t[6]===a?E=t[7]:(E=e=>{e&&a(e)},t[6]=a,t[7]=E);let D;t[8]===v?D=t[9]:(D=v({id:`n7aopT`}),t[8]=v,t[9]=D);let O=w?C:void 0,k;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,P.jsx)(G,{className:`size-4`}),t[10]=k):k=t[10];let M;t[11]!==O||t[12]!==_||t[13]!==b?(M=(0,P.jsx)(d,{value:`wysiwyg`,"aria-label":b,"aria-describedby":O,disabled:_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:k}),t[11]=O,t[12]=_,t[13]=b,t[14]=M):M=t[14];let N;t[15]!==w||t[16]!==C?(N=w?(0,P.jsx)(`span`,{id:C,className:`sr-only`,children:w}):null,t[15]=w,t[16]=C,t[17]=N):N=t[17];let F;t[18]!==M||t[19]!==N?(F=(0,P.jsx)(c,{asChild:!0,children:(0,P.jsxs)(`div`,{children:[M,N]})}),t[18]=M,t[19]=N,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==h||t[23]!==p?(I=_&&h?h:p||(0,P.jsx)(r,{id:`Mb_20S`}),t[21]=_,t[22]=h,t[23]=p,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,P.jsx)(l,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,P.jsxs)(u,{children:[F,L]}),t[27]=F,t[28]=L,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,P.jsx)(W,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,P.jsx)(c,{asChild:!0,children:(0,P.jsx)(`div`,{children:(0,P.jsx)(d,{value:`source`,"aria-label":S,disabled:g,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:z})})}),t[31]=g,t[32]=S,t[33]=B):B=t[33];let V;t[34]!==g||t[35]!==m?(V=g?(0,P.jsx)(r,{id:`G-JBA1`}):m||(0,P.jsx)(r,{id:`u6Hp4N`}),t[34]=g,t[35]=m,t[36]=V):V=t[36];let H;t[37]===V?H=t[38]:(H=(0,P.jsx)(l,{side:`bottom`,children:V}),t[37]=V,t[38]=H);let U;t[39]!==B||t[40]!==H?(U=(0,P.jsxs)(u,{children:[B,H]}),t[39]=B,t[40]=H,t[41]=U):U=t[41];let K;return t[42]!==R||t[43]!==U||t[44]!==T||t[45]!==E||t[46]!==D?(K=(0,P.jsxs)(f,{type:`single`,value:T,onValueChange:E,"aria-label":D,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[R,U]}),t[42]=R,t[43]=U,t[44]=T,t[45]=E,t[46]=D,t[47]=K):K=t[47],K}export{L as a,N as c,B as i,W as n,I as o,V as r,F as s,K as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{u as a}from"./use-apply-config-language-DlSviEmN.js";import{n as o,t as s}from"./excalidraw-scene-DKlZeb8o.js";import{Na as c}from"./chunk-RM4UPSZO-CKzZrDwB.js";import{Excalidraw as l,t as u}from"./prod-TDqup_vF.js";import{replaceYText as d}from"./MermaidDocEditor-DQQrPAhr.js";var f=i(),p=e(n(),1),m={en:`en`,"zh-Hans":`zh-CN`,"zh-Hant":`zh-TW`,hi:null,es:`es-ES`,ar:`ar-SA`,fr:`fr-FR`,bn:null,"pt-BR":`pt-BR`,id:`id-ID`,ur:null,ko:`ko-KR`,pl:`pl-PL`};a.filter(e=>m[e]===null);function h(e){return Object.hasOwn(m,e)}function g(e){return h(e)?m[e]??`en`:`en`}var _=t();function v(e){if(e.trim()===``)return{ok:!0,scene:s(u,null)};try{return{ok:!0,scene:s(u,JSON.parse(e))}}catch{return{ok:!1,scene:s(u,null)}}}function y(e){let t=(0,f.c)(22),{provider:n}=e,{_:i,i18n:a}=r(),s=n.document.getText(`source`),[m,h]=(0,p.useState)(null),y=(0,p.useRef)(s.toString()),b=v(s.toString());b.ok||console.warn(`[ExcalidrawDocEditor] initial snapshot could not be parsed — falling back to a blank canvas; the original bytes remain in the doc until the user draws their first element (appState-only tweaks on an empty canvas don't unblock the guard)`);let x=(0,p.useRef)(!b.ok),S;t[0]!==m||t[1]!==y||t[2]!==s?(S=()=>{if(m===null)return;let e=()=>{let e=s.toString();if(e===y.current)return;y.current=e;let t=v(e);if(!t.ok){console.warn(`[ExcalidrawDocEditor] sync: remote snapshot could not be parsed — skipping this update`);return}let{elements:n,appState:r,files:i}=t.scene;m.updateScene({elements:n,appState:r,captureUpdate:c.NEVER});let a=Object.values(i);a.length>0&&m.addFiles(a)};return s.observe(e),()=>s.unobserve(e)},t[0]=m,t[1]=y,t[2]=s,t[3]=S):S=t[3];let C;t[4]!==m||t[5]!==s?(C=[s,m],t[4]=m,t[5]=s,t[6]=C):C=t[6],(0,p.useEffect)(S,C);let w;t[7]!==y||t[8]!==s?(w=(e,t,n)=>{if(x.current){if(e.length===0)return;x.current=!1}let r=o(u,e,t,n);r!==y.current&&(y.current=r,d(s,r))},t[7]=y,t[8]=s,t[9]=w):w=t[9];let T=w,E;t[10]===i?E=t[11]:(E=i({id:`wxRR0H`}),t[10]=i,t[11]=E);let D=b.scene,O;t[12]===a.locale?O=t[13]:(O=g(a.locale),t[12]=a.locale,t[13]=O);let k;t[14]!==T||t[15]!==b.scene||t[16]!==h||t[17]!==O?(k=(0,_.jsx)(`div`,{className:`absolute inset-0 z-0`,children:(0,_.jsx)(l,{onExcalidrawAPI:h,initialData:D,onChange:T,langCode:O})}),t[14]=T,t[15]=b.scene,t[16]=h,t[17]=O,t[18]=k):k=t[18];let A;return t[19]!==E||t[20]!==k?(A=(0,_.jsx)(`section`,{className:`relative flex h-full min-h-0 flex-col bg-background`,"aria-label":E,"data-excalidraw-doc-editor":``,children:k}),t[19]=E,t[20]=k,t[21]=A):A=t[21],A}export{y as ExcalidrawDocEditor};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{u as a}from"./use-apply-config-language-CbiUoguW.js";import{n as o,t as s}from"./excalidraw-scene-DKlZeb8o.js";import{Na as c}from"./chunk-RM4UPSZO-CKzZrDwB.js";import{Excalidraw as l,t as u}from"./prod-TDqup_vF.js";import{replaceYText as d}from"./MermaidDocEditor-G-4SHjdp.js";var f=i(),p=e(n(),1),m={en:`en`,"zh-Hans":`zh-CN`,"zh-Hant":`zh-TW`,hi:null,es:`es-ES`,ar:`ar-SA`,fr:`fr-FR`,bn:null,"pt-BR":`pt-BR`,id:`id-ID`,ur:null,ko:`ko-KR`,pl:`pl-PL`};a.filter(e=>m[e]===null);function h(e){return Object.hasOwn(m,e)}function g(e){return h(e)?m[e]??`en`:`en`}var _=t();function v(e){if(e.trim()===``)return{ok:!0,scene:s(u,null)};try{return{ok:!0,scene:s(u,JSON.parse(e))}}catch{return{ok:!1,scene:s(u,null)}}}function y(e){let t=(0,f.c)(22),{provider:n}=e,{_:i,i18n:a}=r(),s=n.document.getText(`source`),[m,h]=(0,p.useState)(null),y=(0,p.useRef)(s.toString()),b=v(s.toString());b.ok||console.warn(`[ExcalidrawDocEditor] initial snapshot could not be parsed — falling back to a blank canvas; the original bytes remain in the doc until the user draws their first element (appState-only tweaks on an empty canvas don't unblock the guard)`);let x=(0,p.useRef)(!b.ok),S;t[0]!==m||t[1]!==y||t[2]!==s?(S=()=>{if(m===null)return;let e=()=>{let e=s.toString();if(e===y.current)return;y.current=e;let t=v(e);if(!t.ok){console.warn(`[ExcalidrawDocEditor] sync: remote snapshot could not be parsed — skipping this update`);return}let{elements:n,appState:r,files:i}=t.scene;m.updateScene({elements:n,appState:r,captureUpdate:c.NEVER});let a=Object.values(i);a.length>0&&m.addFiles(a)};return s.observe(e),()=>s.unobserve(e)},t[0]=m,t[1]=y,t[2]=s,t[3]=S):S=t[3];let C;t[4]!==m||t[5]!==s?(C=[s,m],t[4]=m,t[5]=s,t[6]=C):C=t[6],(0,p.useEffect)(S,C);let w;t[7]!==y||t[8]!==s?(w=(e,t,n)=>{if(x.current){if(e.length===0)return;x.current=!1}let r=o(u,e,t,n);r!==y.current&&(y.current=r,d(s,r))},t[7]=y,t[8]=s,t[9]=w):w=t[9];let T=w,E;t[10]===i?E=t[11]:(E=i({id:`wxRR0H`}),t[10]=i,t[11]=E);let D=b.scene,O;t[12]===a.locale?O=t[13]:(O=g(a.locale),t[12]=a.locale,t[13]=O);let k;t[14]!==T||t[15]!==b.scene||t[16]!==h||t[17]!==O?(k=(0,_.jsx)(`div`,{className:`absolute inset-0 z-0`,children:(0,_.jsx)(l,{onExcalidrawAPI:h,initialData:D,onChange:T,langCode:O})}),t[14]=T,t[15]=b.scene,t[16]=h,t[17]=O,t[18]=k):k=t[18];let A;return t[19]!==E||t[20]!==k?(A=(0,_.jsx)(`section`,{className:`relative flex h-full min-h-0 flex-col bg-background`,"aria-label":E,"data-excalidraw-doc-editor":``,children:k}),t[19]=E,t[20]=k,t[21]=A):A=t[21],A}export{y as ExcalidrawDocEditor};
@@ -0,0 +1 @@
1
+ import{t as e}from"./index-8aCY7EBp.js";export{e as FeedbackForm};