@inkeep/open-knowledge 0.59.0 → 0.59.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 (146) hide show
  1. package/dist/{acp-harness-probe-xzAQCzjU.mjs → acp-harness-probe-BsVDLpt-.mjs} +2 -2
  2. package/dist/cli.mjs +63 -63
  3. package/dist/constants-Cev0hQj0.mjs +2 -0
  4. package/dist/{fs-traced-DSlN63Do.mjs → fs-traced-DBoylvxc.mjs} +6 -6
  5. package/dist/fs-traced-Y2XqYjaa.mjs +1 -0
  6. package/dist/{git-handle-C3YVH8wf.mjs → git-handle-BA9AB5nK.mjs} +2 -2
  7. package/dist/git-handle-BOnI_GkI.mjs +1 -0
  8. package/dist/index.d.mts +4 -1
  9. package/dist/index.mjs +203 -203
  10. package/dist/{init-BN8pAiK3.mjs → init-CSCRa68O.mjs} +4 -4
  11. package/dist/init-C_cfHwIE.mjs +1 -0
  12. package/dist/{launch-json-removal-Bpcw3c_v.mjs → launch-json-removal-B4hWeKZk.mjs} +2 -2
  13. package/dist/{loader-CB_irZF8.mjs → loader-C2aM7OkW.mjs} +2 -2
  14. package/dist/loader-CpsBxidE.mjs +1 -0
  15. package/dist/md-manager-kPw_-kTt.mjs +2 -0
  16. package/dist/{open-browser-tKHegdcu.mjs → open-browser-BzjgGdJv.mjs} +2 -2
  17. package/dist/parse-worker.mjs +1 -1
  18. package/dist/preview-Cs4fQoF9.mjs +1 -0
  19. package/dist/{preview-D6pqyrS9.mjs → preview-D8NR3yAo.mjs} +2 -2
  20. package/dist/public/assets/{ActivityModeContent-6TuvNchN.js → ActivityModeContent-CKgWVCSp.js} +1 -1
  21. package/dist/public/assets/{AgentDiffPane-BJYlf10_.js → AgentDiffPane-BarPjBSB.js} +1 -1
  22. package/dist/public/assets/{AgentThreadClientBinder-Gj3tQef3.js → AgentThreadClientBinder-zv3z0ckw.js} +1 -1
  23. package/dist/public/assets/CodeMirrorPropInput-ZmNKI1Z7.js +3 -0
  24. package/dist/public/assets/DocumentContext-Btzd-l4e.js +38 -0
  25. package/dist/public/assets/{EditorModeToggle-BhI-tjjV.js → EditorModeToggle-DCM2q7RJ.js} +1 -1
  26. package/dist/public/assets/{EnableSyncConfirmDialog-Dm2W_Er1.js → EnableSyncConfirmDialog-BNMMgBtN.js} +1 -1
  27. package/dist/public/assets/{ExcalidrawDocEditor-CHSxzurU.js → ExcalidrawDocEditor-C6iJ4I5-.js} +1 -1
  28. package/dist/public/assets/FeedbackForm-C2GwZpk8.js +1 -0
  29. package/dist/public/assets/{GraphPanel-BtrVMm8t.js → GraphPanel-CIBdTV0O.js} +1 -1
  30. package/dist/public/assets/{ImportSkillDialog-B_0sfIcE.js → ImportSkillDialog-Ditwv4pM.js} +1 -1
  31. package/dist/public/assets/{LintConfigEditor-BDD9SVg9.js → LintConfigEditor-F9czivh-.js} +1 -1
  32. package/dist/public/assets/ManagedArtifactProperties-BilDFhT7.js +1 -0
  33. package/dist/public/assets/ManagedArtifactProperties-D7g1liZm.js +1 -0
  34. package/dist/public/assets/Mermaid-C1g0sNLq.js +2 -0
  35. package/dist/public/assets/{MermaidDocEditor-D9yLvQft.js → MermaidDocEditor-C2bMG01W.js} +1 -1
  36. package/dist/public/assets/{PropertyDisplayRow-yHZx0-1B.js → PropertyDisplayRow-BsELIytI.js} +1 -1
  37. package/dist/public/assets/{ReportBugDialogBody-DWbWOZyj.js → ReportBugDialogBody-BCkrqX4k.js} +1 -1
  38. package/dist/public/assets/{SchemaConfigEditor-Bi7Ac_wP.js → SchemaConfigEditor-C_88QC6m.js} +1 -1
  39. package/dist/public/assets/{SessionsHost-ig-ZUS_G.js → SessionsHost-DERB4_Ni.js} +2 -2
  40. package/dist/public/assets/{SettingsDialogBody-B1Tc9Esn.js → SettingsDialogBody-CkGi08f5.js} +5 -5
  41. package/dist/public/assets/{ShareBranchSwitchDialog-Bsa1pw1-.js → ShareBranchSwitchDialog-DRNgrePJ.js} +1 -1
  42. package/dist/public/assets/{ShareReceiveDialog-FD8hxYdI.js → ShareReceiveDialog-CRJXdVU1.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveMissDialog-CCUROvjR.js → ShareReceiveMissDialog-CWCGMBia.js} +1 -1
  44. package/dist/public/assets/{SkillCostValue-Bs-xte7N.js → SkillCostValue-BqZLAxM3.js} +1 -1
  45. package/dist/public/assets/{SkillEditBanner-B-XDCF2M.js → SkillEditBanner-CIxTdkFa.js} +1 -1
  46. package/dist/public/assets/{SkillInstallMenu-C2zTs1fO.js → SkillInstallMenu-CuG_Pbd9.js} +1 -1
  47. package/dist/public/assets/{SkillOriginInline-BJlf8YEB.js → SkillOriginInline-CobFVxlG.js} +1 -1
  48. package/dist/public/assets/{SkillToolbarControls-PSAJSV0Q.js → SkillToolbarControls-B-mVlHne.js} +1 -1
  49. package/dist/public/assets/{SlidesToolbarControls-C4JBBO9d.js → SlidesToolbarControls-a-bkexnR.js} +1 -1
  50. package/dist/public/assets/{SourceEditor-D9yflzSG.js → SourceEditor-CPX0_TEn.js} +1 -1
  51. package/dist/public/assets/{TerminalPanel-lInkyKGQ.js → TerminalPanel-DMlg34Yw.js} +1 -1
  52. package/dist/public/assets/{TerminalWindowApp-fOsj00la.js → TerminalWindowApp-CgwfpzM7.js} +1 -1
  53. package/dist/public/assets/{TextDocEditor-DDUuGlvR.js → TextDocEditor-DKZ8PGZm.js} +1 -1
  54. package/dist/public/assets/ThreadView-jPbpOpV7.js +14 -0
  55. package/dist/public/assets/{TimelineDiffPane-BYuBovfq.js → TimelineDiffPane-BG6M6Yvm.js} +1 -1
  56. package/dist/public/assets/{agent-diff-store-DaX8UuW_.js → agent-diff-store-CLjlrlKE.js} +1 -1
  57. package/dist/public/assets/auth-state-cache-BaEC0ICW.js +11 -0
  58. package/dist/public/assets/{client-version-BDca_sFT.js → client-version-BE6tJDQP.js} +1 -1
  59. package/dist/public/assets/{comment-chips-CYb8vcSY.js → comment-chips-9gFIkaxT.js} +1 -1
  60. package/dist/public/assets/config-provider-D6lM_Hnl.js +5 -0
  61. package/dist/public/assets/{dist-D-YCgpuS2.js → dist-CZ9DVRS12.js} +186 -186
  62. package/dist/public/assets/{doc-paths-DE9vBhOK.js → doc-paths-DhSKtjML.js} +1 -1
  63. package/dist/public/assets/{documents-events-CnBTU3j1.js → documents-events-vCdeKfVv.js} +1 -1
  64. package/dist/public/assets/{file-tree-adapter-B0KaetQt.js → file-tree-adapter-D0L7LwRx.js} +1 -1
  65. package/dist/public/assets/{file-tree-utils-nnyAUsjj.js → file-tree-utils-CRJ9Lv6f.js} +1 -1
  66. package/dist/public/assets/{folder-config-api-EXd1lZ_b.js → folder-config-api--W7v5ACO.js} +1 -1
  67. package/dist/public/assets/i18n-CAw7tEWs.js +1 -0
  68. package/dist/public/assets/index-BDZw2iTP.js +2098 -0
  69. package/dist/public/assets/{lint-config-client-DIrSdYtN.js → lint-config-client-InSs0DTY.js} +1 -1
  70. package/dist/public/assets/{markdownlint-rule-browser-BbEsW_tn.js → markdownlint-rule-browser-Dd1LdmNh.js} +1 -1
  71. package/dist/public/assets/navigation-targets-B2WfxDhX.js +1 -0
  72. package/dist/public/assets/{open-managed-artifact-tab-VyuGTCnG.js → open-managed-artifact-tab-UzoxdqVI.js} +1 -1
  73. package/dist/public/assets/{pending-receive-nav-store-_W8qjGOQ.js → pending-receive-nav-store-DWkPefku.js} +1 -1
  74. package/dist/public/assets/{progress-CW78SPzw.js → progress-4tIv1EFB.js} +2 -2
  75. package/dist/public/assets/{prop-types-BVaTR3_y.js → prop-types-yNEM1chl.js} +1 -1
  76. package/dist/public/assets/{receive-store-C6fRYFtF.js → receive-store-D-rrO69x.js} +1 -1
  77. package/dist/public/assets/{selection-context-CF-A4hVF.js → selection-context-CMePCaJp.js} +1 -1
  78. package/dist/public/assets/{skill-actions-CJiMCR8W.js → skill-actions-B3Khv7IB.js} +1 -1
  79. package/dist/public/assets/{skill-scope-OQtLZpCt.js → skill-scope-X4txlzhR.js} +1 -1
  80. package/dist/public/assets/{skills-api-DRFuTY_1.js → skills-api-DRgMVhUa.js} +1 -1
  81. package/dist/public/assets/{src-CYEDD64p.js → src-j8FfcKrC.js} +1 -1
  82. package/dist/public/assets/{tag-pill-input-DumpKpru.js → tag-pill-input-B3KBr7DN.js} +1 -1
  83. package/dist/public/assets/{target-navigation-intent-KEG2qMbq.js → target-navigation-intent-lr3aCJTn.js} +1 -1
  84. package/dist/public/assets/{terminal-cli-display-CCSh-Jc6.js → terminal-cli-display-RSh9x-l9.js} +1 -1
  85. package/dist/public/assets/{terminal-launch-events-DTObZvXP.js → terminal-launch-events-BTKz3Ctw.js} +1 -1
  86. package/dist/public/assets/{terminal-telemetry-eQnofItG.js → terminal-telemetry-BRBov9fJ.js} +1 -1
  87. package/dist/public/assets/typing-burst-detector-D0mi6bLU.js +8 -0
  88. package/dist/public/assets/{uninstall-BBrEPZ3g.js → uninstall-BIqO-UIQ.js} +1 -1
  89. package/dist/public/assets/{use-activity-panel-mMKkkTYa.js → use-activity-panel-DHDKSaYE.js} +1 -1
  90. package/dist/public/assets/{use-apply-config-color-theme-D0wRK0ZW.js → use-apply-config-color-theme-D4ju-xbf.js} +1 -1
  91. package/dist/public/assets/{use-collab-url-CiDW3MCC.js → use-collab-url-Drk2uBv9.js} +1 -1
  92. package/dist/public/assets/{use-live-xterm-theme-91IeCxiL.js → use-live-xterm-theme-pBqCdHfJ.js} +1 -1
  93. package/dist/public/assets/{use-open-skill-B79LJXQC.js → use-open-skill-CLm97xrh.js} +1 -1
  94. package/dist/public/assets/{use-popular-skills-BA6oApoS.js → use-popular-skills-CgfYcb0e.js} +1 -1
  95. package/dist/public/assets/{use-settings-route-B3k5Qle8.js → use-settings-route-BlQEfJUl.js} +1 -1
  96. package/dist/public/assets/{use-skill-origin-CDBZUwtC.js → use-skill-origin-Cqml5xEu.js} +1 -1
  97. package/dist/public/assets/{use-terminal-enabled-CsGI4-0e.js → use-terminal-enabled-BKUAzs8z.js} +1 -1
  98. package/dist/public/assets/{use-timeline-entry-diff-BnOxPTYG.js → use-timeline-entry-diff-CoJASew_.js} +1 -1
  99. package/dist/public/assets/{use-workspace-DVCCGDFQ.js → use-workspace-oZaP3fjI.js} +1 -1
  100. package/dist/public/index.html +46 -46
  101. package/dist/public/uninstall.html +3 -3
  102. package/dist/{repair-launch-json-CjC0taSR.mjs → repair-launch-json-BrN3ZEpo.mjs} +2 -2
  103. package/dist/{repair-mcp-configs-D3atc1q5.mjs → repair-mcp-configs-BtgjTSej.mjs} +2 -2
  104. package/dist/{repair-skills-BWwoaS7o.mjs → repair-skills-BANXJRcx.mjs} +2 -2
  105. package/dist/repair-skills-EsGllqK3.mjs +1 -0
  106. package/dist/{resolve-project-root-q1DrRnlU.mjs → resolve-project-root-DMmn4Znw.mjs} +3 -3
  107. package/dist/{server-lock-fvVuZ7Zp.mjs → server-lock-Bl0rSBJb.mjs} +2 -2
  108. package/dist/server-lock-DA-MbGU2.mjs +1 -0
  109. package/dist/{skill-teardown-Bl5wGhV-.mjs → skill-teardown-DrwZgjIp.mjs} +2 -2
  110. package/dist/{sleep-CEs13Om_.mjs → sleep-DJmaHWQF.mjs} +6 -6
  111. package/dist/{src-BhnYJwpL.mjs → src-BYmSbamD.mjs} +120 -120
  112. package/dist/{src-UBcR-kQc.mjs → src-CX9gU3D9.mjs} +1 -1
  113. package/dist/src-Cb5GKSi4.mjs +2030 -0
  114. package/dist/src-CdACXXNe.mjs +20 -0
  115. package/dist/src-Dh2t4nD7.mjs +1 -0
  116. package/dist/start-DNpS5heY.mjs +1 -0
  117. package/dist/start-DUv_U1H7.mjs +12 -0
  118. package/dist/{ui-oodvlZsr.mjs → ui-CZ7SDI0e.mjs} +3 -3
  119. package/package.json +4 -4
  120. package/dist/constants-CCCNmGNF.mjs +0 -2
  121. package/dist/fs-traced-saP6jRI7.mjs +0 -1
  122. package/dist/git-handle-OL1c3Yx1.mjs +0 -1
  123. package/dist/init-BdBh-tlq.mjs +0 -1
  124. package/dist/loader-CKHTawsS.mjs +0 -1
  125. package/dist/md-manager-BQDUfoJR.mjs +0 -2
  126. package/dist/preview-VZZ_gYOh.mjs +0 -1
  127. package/dist/public/assets/CodeMirrorPropInput-o8957ZTB.js +0 -3
  128. package/dist/public/assets/DocumentContext-Ho6Oz_RK.js +0 -38
  129. package/dist/public/assets/FeedbackForm-DqB5YXD8.js +0 -1
  130. package/dist/public/assets/ManagedArtifactProperties-CN0VAhWo.js +0 -1
  131. package/dist/public/assets/ManagedArtifactProperties-D7qkm6V7.js +0 -1
  132. package/dist/public/assets/Mermaid-D6W1JO-s.js +0 -2
  133. package/dist/public/assets/ThreadView-btcrk6I5.js +0 -14
  134. package/dist/public/assets/auth-state-cache-CageXkmw.js +0 -11
  135. package/dist/public/assets/config-provider-BJ0PFBhp.js +0 -5
  136. package/dist/public/assets/i18n-DM5acF0c.js +0 -1
  137. package/dist/public/assets/index-C_vI7csr.js +0 -2098
  138. package/dist/public/assets/navigation-targets-qlO1sI42.js +0 -1
  139. package/dist/public/assets/typing-burst-detector-DP5cTWmB.js +0 -8
  140. package/dist/repair-skills-ItKhdLA6.mjs +0 -1
  141. package/dist/server-lock-CtHrC9TQ.mjs +0 -1
  142. package/dist/src-BwEuZl-u.mjs +0 -2029
  143. package/dist/src-CSHSM5Bt.mjs +0 -20
  144. package/dist/src-fJtWkvBq.mjs +0 -1
  145. package/dist/start-CLw0xGYU.mjs +0 -1
  146. package/dist/start-D8daPCuF.mjs +0 -12
@@ -1 +1 @@
1
- import{fo as e}from"./dist-D-YCgpuS2.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(_)||e.startsWith(x)||e.startsWith(S)||e.startsWith(T)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=v(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(_)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function i(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function a(e,t){return e===t||o(e)===o(t)}function o(e){try{return decodeURIComponent(e)}catch{return e}}var s=`__okHashHistoryEntry`;function c(e){return{...typeof e==`object`&&e?e:{},[s]:!0}}function l(e){return typeof e==`object`&&!!e&&e[s]===!0}function u(){l(window.history.state)||window.history.replaceState(c(window.history.state),``)}function d(e){let{pathname:t,search:n}=window.location;window.history.replaceState(c(window.history.state),``,`${t}${n}${e}`)}function f(e){if(a(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(c(window.history.state),``,`${t}${n}${e}`)}function p(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function m(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function h(e,t,n){if(e===`folder`)return m(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function g(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var _=`#/__asset__/`;function v(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function y(e){if(!e.startsWith(_))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function b(e){return`${_}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var x=`#/__skill-file__/`,S=`#/__skills__`;function C(){return S}function w(e){return e===S||e.startsWith(`${S}/`)}var T=`#/__skill-preview__/`,E=[`explore`,`detected`,`builtin`,`foreign`];function D(e){return e!==void 0&&E.includes(e)}var O=`project`;function k(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??O].map(encodeURIComponent).join(`/`)}function A(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!D(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function j(e){let t=k(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${T}${t}`}function M(e){return e.startsWith(T)?A(e.slice(20)):null}var N=`:`;function P(e){let t=e.host===void 0?e.name:`${e.name}${N}${e.host}`;return`${x}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function F(e){if(!e.startsWith(x))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(N),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var I=/\.(md|mdx)$/i;function L(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function R(e){return L(e).replace(I,``)}function z(e){let t=L(e);return t?I.test(t)?t:`${t}.md`:`untitled.md`}function B(e){let t=R(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{F as C,d as S,w as T,g as _,y as a,u as b,h as c,b as d,i as f,C as g,j as h,r as i,k as l,P as m,z as n,A as o,m as p,R as r,n as s,B as t,p as u,l as v,M as w,f as x,a as y};
1
+ import{fo as e}from"./dist-CZ9DVRS12.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(_)||e.startsWith(x)||e.startsWith(S)||e.startsWith(T)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=v(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(_)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function i(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function a(e,t){return e===t||o(e)===o(t)}function o(e){try{return decodeURIComponent(e)}catch{return e}}var s=`__okHashHistoryEntry`;function c(e){return{...typeof e==`object`&&e?e:{},[s]:!0}}function l(e){return typeof e==`object`&&!!e&&e[s]===!0}function u(){l(window.history.state)||window.history.replaceState(c(window.history.state),``)}function d(e){let{pathname:t,search:n}=window.location;window.history.replaceState(c(window.history.state),``,`${t}${n}${e}`)}function f(e){if(a(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(c(window.history.state),``,`${t}${n}${e}`)}function p(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function m(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function h(e,t,n){if(e===`folder`)return m(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function g(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var _=`#/__asset__/`;function v(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function y(e){if(!e.startsWith(_))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function b(e){return`${_}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var x=`#/__skill-file__/`,S=`#/__skills__`;function C(){return S}function w(e){return e===S||e.startsWith(`${S}/`)}var T=`#/__skill-preview__/`,E=[`explore`,`detected`,`builtin`,`foreign`];function D(e){return e!==void 0&&E.includes(e)}var O=`project`;function k(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??O].map(encodeURIComponent).join(`/`)}function A(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!D(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function j(e){let t=k(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${T}${t}`}function M(e){return e.startsWith(T)?A(e.slice(20)):null}var N=`:`;function P(e){let t=e.host===void 0?e.name:`${e.name}${N}${e.host}`;return`${x}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function F(e){if(!e.startsWith(x))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(N),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var I=/\.(md|mdx)$/i;function L(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function R(e){return L(e).replace(I,``)}function z(e){let t=L(e);return t?I.test(t)?t:`${t}.md`:`untitled.md`}function B(e){let t=R(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{F as C,d as S,w as T,g as _,y as a,u as b,h as c,b as d,i as f,C as g,j as h,r as i,k as l,P as m,z as n,A as o,m as p,R as r,n as s,B as t,p as u,l as v,M as w,f as x,a as y};
@@ -1 +1 @@
1
- import{A as e}from"./dist-D-YCgpuS2.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=new Set,b=(e,t)=>`${e}\u0000${t}`;function x(e,t){y.add(b(e,t)),_()}function S(e,t){y.delete(b(e,t))&&_()}var C=new Set;function w(e,t){C.add(b(e,t)),_()}function T(e,t){C.delete(b(e,t))&&_()}function E(e,t){return C.has(b(e,t))}function D(){return[...C].sort().join(``)}function O(e,t){return y.has(b(e,t))}function k(e){return y.size===0?e:e.filter(e=>!y.has(b(e.scope,e.name)))}export{a as _,c as a,m as c,o as d,O as f,l as g,f as h,d as i,S as l,D as m,x as n,i as o,E as p,w as r,_ as s,k as t,T as u,v,h as y};
1
+ import{A as e}from"./dist-CZ9DVRS12.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=new Set,b=(e,t)=>`${e}\u0000${t}`;function x(e,t){y.add(b(e,t)),_()}function S(e,t){y.delete(b(e,t))&&_()}var C=new Set;function w(e,t){C.add(b(e,t)),_()}function T(e,t){C.delete(b(e,t))&&_()}function E(e,t){return C.has(b(e,t))}function D(){return[...C].sort().join(``)}function O(e,t){return y.has(b(e,t))}function k(e){return y.size===0?e:e.filter(e=>!y.has(b(e.scope,e.name)))}export{a as _,c as a,m as c,o as d,O as f,l as g,f as h,d as i,S as l,D as m,x as n,i as o,E as p,w as r,_ as s,k as t,T as u,v,h as y};
@@ -1 +1 @@
1
- import{Cs as e,Ds as t,bs as n,xs as r}from"./dist-D-YCgpuS2.js";import{d as i,f as a,p as o}from"./doc-paths-DE9vBhOK.js";import{t as s}from"./file-tree-rename-validation-CKWI2fGj.js";import{c,l,s as u}from"./file-tree-utils-nnyAUsjj.js";import{a as d}from"./navigation-targets-qlO1sI42.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:d(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(t,i=y){return b.test(t)||e(t)||r(t)||n(t)?t:`${t}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,n){let r=s(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:t(a),modified:i,size:n.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
1
+ import{Os as e,bs as t,ws as n,xs as r}from"./dist-CZ9DVRS12.js";import{d as i,f as a,p as o}from"./doc-paths-DhSKtjML.js";import{t as s}from"./file-tree-rename-validation-CKWI2fGj.js";import{c,l,s as u}from"./file-tree-utils-CRJ9Lv6f.js";import{a as d}from"./navigation-targets-B2WfxDhX.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:d(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(e,i=y){return b.test(e)||n(e)||r(e)||t(e)?e:`${e}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(t,n){let r=s(t).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(t),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:t,assetExt:a,mediaKind:e(a),modified:i,size:n.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
@@ -1 +1 @@
1
- import{Eo as e,Ur as t,Yr as n}from"./dist-D-YCgpuS2.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(e,n){return!n&&t(e)}function p(e,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return e.filter(e=>{let r=e.docName??e.path??``;if(r===``||d(e.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let e=s.slice(0,c).join(`/`);return i||e===``||!t(e)}return n(r)?!1:!f(r,i)})}function m(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=t.docName??t.path??``;return o===``||e(o)||n(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(t.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
1
+ import{Eo as e,Ur as t,Yr as n}from"./dist-CZ9DVRS12.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(e,n){return!n&&t(e)}function p(e,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return e.filter(e=>{let r=e.docName??e.path??``;if(r===``||d(e.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let e=s.slice(0,c).join(`/`);return i||e===``||!t(e)}return n(r)?!1:!f(r,i)})}function m(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=t.docName??t.path??``;return o===``||e(o)||n(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(t.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
@@ -1 +1 @@
1
- import{c as e}from"./documents-events-CnBTU3j1.js";import{t}from"./parse-api-error-DcnXKbfT.js";import{t as n}from"./createLucideIcon-CAkY8Blx.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
1
+ import{c as e}from"./documents-events-vCdeKfVv.js";import{t}from"./parse-api-error-DcnXKbfT.js";import{t as n}from"./createLucideIcon-CAkY8Blx.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
@@ -0,0 +1 @@
1
+ import"./dist-CZ9DVRS12.js";import{t as e}from"./dist-BgXDUIPy.js";import{t}from"./messages-S_TS2Rak.js";e.load(`en`,t.messages),e.activate(`en`);