@inkeep/open-knowledge 0.46.2 → 0.47.0-beta.1

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 (138) hide show
  1. package/dist/{acp-harness-probe-C3JsF__-.mjs → acp-harness-probe-D03uVLDh.mjs} +2 -2
  2. package/dist/cli.mjs +7 -7
  3. package/dist/constants-DRns3Eq-.mjs +2 -0
  4. package/dist/git-handle-D0uAjBAd.mjs +1 -0
  5. package/dist/{git-handle-CcP97K0r.mjs → git-handle-RLYVdszV.mjs} +2 -2
  6. package/dist/index.d.mts +17 -17
  7. package/dist/index.mjs +1 -1
  8. package/dist/init-Dc3-VtsA.mjs +1 -0
  9. package/dist/{init-CE6OG-YR.mjs → init-DiceCmlV.mjs} +3 -3
  10. package/dist/{launch-json-removal-DwgIR9pR.mjs → launch-json-removal-qPFozw3g.mjs} +2 -2
  11. package/dist/loader-CUWwIA5e.mjs +1 -0
  12. package/dist/{loader-DYZctgYW.mjs → loader-dfwAHgkp.mjs} +2 -2
  13. package/dist/md-manager-CrYbAiKl.mjs +2 -0
  14. package/dist/{open-browser-Dxxuy1ht.mjs → open-browser-D-pnyvDF.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/preview-CgJdYXy0.mjs +1 -0
  17. package/dist/{preview-DxbwCXKo.mjs → preview-Rbw9RMOa.mjs} +2 -2
  18. package/dist/public/assets/{ActivityModeContent-BsjKj2Dp.js → ActivityModeContent-DnjDjPFp.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-8FeMlxNc.js → AgentDiffPane-Th6j3NhO.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-DGuLR7_T.js → AgentThreadClientBinder-BVm5Ldhz.js} +1 -1
  21. package/dist/public/assets/{BugReportHistory-CNzYOdOg.js → BugReportHistory-D5qnl9oj.js} +1 -1
  22. package/dist/public/assets/{BugReportHistoryDialog-BdXwvet_.js → BugReportHistoryDialog-Da9QnJRc.js} +1 -1
  23. package/dist/public/assets/{ChangedOutsideBadge-iFQrYC_j.js → ChangedOutsideBadge-DVfCTGd2.js} +1 -1
  24. package/dist/public/assets/{CodeMirrorPropInput-B6FJjE4p.js → CodeMirrorPropInput-DmM8F7PJ.js} +2 -2
  25. package/dist/public/assets/DocumentContext-B0g_vd8N.js +38 -0
  26. package/dist/public/assets/{EditorModeToggle-B9w1EcVW.js → EditorModeToggle-DKuXrb9b.js} +1 -1
  27. package/dist/public/assets/{EnableSyncConfirmDialog-C9Zj2o5B.js → EnableSyncConfirmDialog-BQttSYlY.js} +1 -1
  28. package/dist/public/assets/FeedbackForm-FbNH_TYS.js +1 -0
  29. package/dist/public/assets/{GraphPanel-WAn3iep6.js → GraphPanel-DK2w8FEz.js} +2 -2
  30. package/dist/public/assets/{ImportSkillDialog-BT12LF7o.js → ImportSkillDialog-DHfVuiKL.js} +1 -1
  31. package/dist/public/assets/{LintConfigEditor-fuqihOSh.js → LintConfigEditor-B-7Pe22_.js} +1 -1
  32. package/dist/public/assets/ManagedArtifactProperties-B-Y5eayN.js +8 -0
  33. package/dist/public/assets/ManagedArtifactProperties-Ddk1e_f6.js +1 -0
  34. package/dist/public/assets/{McpConsentDialogBody-D399lgb6.js → McpConsentDialogBody-DPMIdjmd.js} +1 -1
  35. package/dist/public/assets/{MermaidDocEditor-Btncic6F.js → MermaidDocEditor-CBHNf1No.js} +1 -1
  36. package/dist/public/assets/{ReportBugDialogBody-DMJRqZYG.js → ReportBugDialogBody-CXLxw7Fr.js} +1 -1
  37. package/dist/public/assets/{SchemaConfigEditor-CJxPYFfH.js → SchemaConfigEditor-DG-dOTBT.js} +1 -1
  38. package/dist/public/assets/{SessionsHost-DjUsH4OV.js → SessionsHost-DjbdveAp.js} +2 -2
  39. package/dist/public/assets/{SettingsDialogBody-BlqFfFZF.js → SettingsDialogBody-CFwua7VK.js} +3 -3
  40. package/dist/public/assets/{ShareBranchSwitchDialog-CqdCfvTW.js → ShareBranchSwitchDialog-CyWPLWZG.js} +1 -1
  41. package/dist/public/assets/{ShareReceiveDialog-C07-MMeb.js → ShareReceiveDialog-C-fxd4DJ.js} +1 -1
  42. package/dist/public/assets/{ShareReceiveMissDialog-B28LUAEG.js → ShareReceiveMissDialog-Y4PyuUCZ.js} +1 -1
  43. package/dist/public/assets/{SkillEditBanner-D54IcYm9.js → SkillEditBanner-Dbu0PwqP.js} +1 -1
  44. package/dist/public/assets/{SkillOriginInline-CaPLAC2_.js → SkillOriginInline-DuFc7cZs.js} +1 -1
  45. package/dist/public/assets/{SkillToolbarControls-np0Ok_xI.js → SkillToolbarControls-B4k3LXLX.js} +1 -1
  46. package/dist/public/assets/SourceEditor-BCMM4zJn.js +1 -0
  47. package/dist/public/assets/{TerminalPanel-BShIp-v4.js → TerminalPanel-DkXL03UX.js} +3 -3
  48. package/dist/public/assets/{TerminalWindowApp-BxdCV4WQ.js → TerminalWindowApp-DH34WwKL.js} +1 -1
  49. package/dist/public/assets/{TextDocEditor-N4-T0dws.js → TextDocEditor-DEdxUQxb.js} +1 -1
  50. package/dist/public/assets/{ThreadView-vuv4OflF.js → ThreadView-ktubIY9d.js} +1 -1
  51. package/dist/public/assets/{TimelineDiffPane-CoNZWl8n.js → TimelineDiffPane-DSvFVt40.js} +1 -1
  52. package/dist/public/assets/{agent-diff-store-D8_4Cfah.js → agent-diff-store-BX4UT3y1.js} +1 -1
  53. package/dist/public/assets/{agent-visibility-k-CBEP62.js → agent-visibility-CYBYXsoR.js} +1 -1
  54. package/dist/public/assets/{auth-state-cache-C4QFsqNn.js → auth-state-cache-ZZgXmLCf.js} +5 -5
  55. package/dist/public/assets/badge-CAMtyz4F.js +1 -0
  56. package/dist/public/assets/client-version-DN8Gnc8R.js +1 -0
  57. package/dist/public/assets/{config-context-BzGTI1i6.js → config-context-CdjtvoAz.js} +1 -1
  58. package/dist/public/assets/{config-provider-DAkovZnw.js → config-provider-CKct7q_G.js} +2 -2
  59. package/dist/public/assets/{dist-BqtkiFoE2.js → dist-DIn3VYDc2.js} +131 -131
  60. package/dist/public/assets/{doc-paths-DoYUYB8x.js → doc-paths-KCjzuC60.js} +1 -1
  61. package/dist/public/assets/{documents-events-D-wbjalg.js → documents-events-FrlFXuC-.js} +1 -1
  62. package/dist/public/assets/{file-tree-adapter-BnupHYtj.js → file-tree-adapter-BBMHbQG5.js} +1 -1
  63. package/dist/public/assets/{file-tree-utils-B1hGkjTf.js → file-tree-utils-DeyBapi2.js} +1 -1
  64. package/dist/public/assets/{folder-config-api-CMh_Htev.js → folder-config-api-OU19qNKs.js} +1 -1
  65. package/dist/public/assets/globals-BLjNYywW.css +1 -0
  66. package/dist/public/assets/{globals-DAQcZTzX.js → globals-D4ycChQP.js} +1 -1
  67. package/dist/public/assets/index-Bnezs-Zg.js +2092 -0
  68. package/dist/public/assets/{lint-config-client-CKUe53Ux.js → lint-config-client-D7DpNIwn.js} +1 -1
  69. package/dist/public/assets/markdownlint-rule-browser-eFxHHf9q.js +1 -0
  70. package/dist/public/assets/navigation-targets-BDSeZX3c.js +1 -0
  71. package/dist/public/assets/{open-managed-artifact-tab-LHp8L5oX.js → open-managed-artifact-tab-Wkw7QMir.js} +1 -1
  72. package/dist/public/assets/{pending-receive-nav-store-B23Cw9B-.js → pending-receive-nav-store-BN0afFCO.js} +1 -1
  73. package/dist/public/assets/{prop-types-CoFeckWu.js → prop-types-MABP6X1c.js} +1 -1
  74. package/dist/public/assets/{receive-store-DioA0dZX.js → receive-store-CTNYU3q-.js} +1 -1
  75. package/dist/public/assets/{schema-fields-view-intent-D5lrn_hr.js → schema-fields-view-intent-DVVFEaIP.js} +1 -1
  76. package/dist/public/assets/{selection-context-Dof8jCKa.js → selection-context-BgucOSM-.js} +1 -1
  77. package/dist/public/assets/skill-actions-By3ZQhYp.js +2 -0
  78. package/dist/public/assets/{skill-scope-mciGgli7.js → skill-scope-DkGQeaIH.js} +1 -1
  79. package/dist/public/assets/{skills-api-BCwis81Y.js → skills-api-BCiYKVSk.js} +1 -1
  80. package/dist/public/assets/{src-otYw9bF5.js → src-C_O1F_4l.js} +1 -1
  81. package/dist/public/assets/{tag-pill-input-BG-0qGDI.js → tag-pill-input-3Bkld5bN.js} +1 -1
  82. package/dist/public/assets/{target-navigation-intent-Dsxw_-u4.js → target-navigation-intent-BZ8rve8n.js} +1 -1
  83. package/dist/public/assets/{telemetry-impl-DbCWmxd-.js → telemetry-impl-BnnSgCUt.js} +1 -1
  84. package/dist/public/assets/{telemetry-startup-CwzbE1L1.js → telemetry-startup-Bm4eG3HE.js} +1 -1
  85. package/dist/public/assets/{terminal-launch-events-CVi1Y914.js → terminal-launch-events-DbpTBIvl.js} +1 -1
  86. package/dist/public/assets/{terminal-telemetry-Co-_es1q.js → terminal-telemetry-BMiT9GUh.js} +1 -1
  87. package/dist/public/assets/typing-burst-detector-DDN6b6N7.js +8 -0
  88. package/dist/public/assets/{uninstall-D8EeYjNd.js → uninstall-DJBDkbwq.js} +1 -1
  89. package/dist/public/assets/{use-activity-panel-BP2jMJSo.js → use-activity-panel-CInEut0L.js} +1 -1
  90. package/dist/public/assets/{use-collab-url-CPBFUo6-.js → use-collab-url-ecWCytiv.js} +1 -1
  91. package/dist/public/assets/{use-live-xterm-theme-C0oqpg5T.js → use-live-xterm-theme-Bf72FxVk.js} +1 -1
  92. package/dist/public/assets/{use-open-skill-s-eClkKp.js → use-open-skill-C3UqDa0B.js} +1 -1
  93. package/dist/public/assets/{use-settings-route-B0zt3SsC.js → use-settings-route-CYvmk4XT.js} +1 -1
  94. package/dist/public/assets/{use-skill-directory-B26V0_k7.js → use-skill-directory-Ce1Wy5Qf.js} +1 -1
  95. package/dist/public/assets/{use-skill-origin-BvDx434L.js → use-skill-origin-DscI7Fo0.js} +1 -1
  96. package/dist/public/assets/{use-skills-CJcOuHij.js → use-skills-B19yYlmR.js} +1 -1
  97. package/dist/public/assets/{use-terminal-enabled-Cfo3YlOk.js → use-terminal-enabled-D556BQSW.js} +1 -1
  98. package/dist/public/assets/use-timeline-entry-diff-C_2VFthE.js +6 -0
  99. package/dist/public/assets/{use-workspace-DTXZHJjI.js → use-workspace-008C-zhL.js} +1 -1
  100. package/dist/public/index.html +44 -44
  101. package/dist/public/uninstall.html +5 -5
  102. package/dist/{repair-launch-json-DTUYNd7t.mjs → repair-launch-json-D-KTZ91Y.mjs} +2 -2
  103. package/dist/{repair-mcp-configs-CqkATNjG.mjs → repair-mcp-configs-YkMbM8iG.mjs} +2 -2
  104. package/dist/{repair-skills-qmrK6SZN.mjs → repair-skills-CVvxGgPU.mjs} +2 -2
  105. package/dist/repair-skills-CweOHJap.mjs +1 -0
  106. package/dist/server-lock-CiN5OJ-t.mjs +1 -0
  107. package/dist/{server-lock-n5pTKJ05.mjs → server-lock-DgWnoftI.mjs} +2 -2
  108. package/dist/{src-CgQIPbOX.mjs → src-CyVu3KfG.mjs} +2 -2
  109. package/dist/{src-BV42FuHX.mjs → src-DfBEsYnq.mjs} +1 -1
  110. package/dist/{src-CKVQuBxP.mjs → src-TjdCdQwN.mjs} +4 -4
  111. package/dist/{src-OfREap3u.mjs → src-pJ6LEXKc.mjs} +87 -87
  112. package/dist/start-BaGCm8vx.mjs +1 -0
  113. package/dist/{start-1QV6dGbk.mjs → start-CKb-xDEy.mjs} +3 -3
  114. package/dist/{write-project-skill-C2-Cx_IS.mjs → write-project-skill-BSzMH3X8.mjs} +2 -2
  115. package/package.json +5 -5
  116. package/dist/constants-BapWGoUy.mjs +0 -2
  117. package/dist/git-handle-C9PtYtLJ.mjs +0 -1
  118. package/dist/init-DP_yfvZq.mjs +0 -1
  119. package/dist/loader-DRGSx-Pm.mjs +0 -1
  120. package/dist/md-manager-DkIWmj3u.mjs +0 -2
  121. package/dist/preview-DZ-dsF6N.mjs +0 -1
  122. package/dist/public/assets/DocumentContext-DtWKWc6V.js +0 -38
  123. package/dist/public/assets/FeedbackForm-MjJfwT3F.js +0 -1
  124. package/dist/public/assets/ManagedArtifactProperties-TvpPVnSJ.js +0 -1
  125. package/dist/public/assets/ManagedArtifactProperties-aEllvXPH.js +0 -8
  126. package/dist/public/assets/SourceEditor-CGoHkzWL.js +0 -1
  127. package/dist/public/assets/badge-C21d8Yhu.js +0 -1
  128. package/dist/public/assets/client-version-CwCARyxk.js +0 -1
  129. package/dist/public/assets/globals-BhZJ5T7E.css +0 -1
  130. package/dist/public/assets/index-DPYFSa8u.js +0 -2092
  131. package/dist/public/assets/markdownlint-rule-browser-B-cbNggE.js +0 -1
  132. package/dist/public/assets/navigation-targets-WVfDNB_X.js +0 -1
  133. package/dist/public/assets/skill-actions-BGPeKm35.js +0 -2
  134. package/dist/public/assets/typing-burst-detector-QhbUz0KI.js +0 -8
  135. package/dist/public/assets/use-timeline-entry-diff-Bj1P5iQG.js +0 -6
  136. package/dist/repair-skills-_EoqOWxY.mjs +0 -1
  137. package/dist/server-lock-5mHH4XDo.mjs +0 -1
  138. package/dist/start-S75PWMM4.mjs +0 -1
@@ -1 +1 @@
1
- import{ya as e}from"./dist-BqtkiFoE2.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(h)||e.startsWith(y)||e.startsWith(b)||e.startsWith(C)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=g(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(h)||!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}var a=`__okHashHistoryEntry`;function o(e){return{...typeof e==`object`&&e?e:{},[a]:!0}}function s(e){return typeof e==`object`&&!!e&&e[a]===!0}function c(){s(window.history.state)||window.history.replaceState(o(window.history.state),``)}function l(e){let{pathname:t,search:n}=window.location;window.history.replaceState(o(window.history.state),``,`${t}${n}${e}`)}function u(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.pushState(o(window.history.state),``,`${t}${n}${e}`)}function d(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function f(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function p(e,t,n){if(e===`folder`)return f(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function m(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var h=`#/__asset__/`;function g(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function _(e){if(!e.startsWith(h))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function v(e){return`${h}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var y=`#/__skill-file__/`,b=`#/__skills__`;function x(){return b}function S(e){return e===b||e.startsWith(`${b}/`)}var C=`#/__skill-preview__/`,w=[`explore`,`detected`,`builtin`];function T(e){return e!==void 0&&w.includes(e)}var E=`project`;function D(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??E].map(encodeURIComponent).join(`/`)}function O(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!T(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function k(e){let t=D(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${C}${t}`}function A(e){return e.startsWith(C)?O(e.slice(20)):null}function j(e,t){let n=A(e);if(n)return D(n)===D(t)?n.path:void 0}var M=`:`;function N(e){let t=e.host===void 0?e.name:`${e.name}${M}${e.host}`;return`${y}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function P(e){if(!e.startsWith(y))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(M),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 F=/\.(md|mdx)$/i;function I(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function L(e){return I(e).replace(F,``)}function R(e){let t=I(e);return t?F.test(t)?t:`${t}.md`:`untitled.md`}function z(e){let t=L(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{P as C,j as S,S as T,m as _,_ as a,u as b,p as c,v as d,i as f,x as g,k as h,r as i,D as l,N as m,R as n,O as o,f as p,L as r,n as s,z as t,d as u,s as v,A as w,l as x,c as y};
1
+ import{xa as e}from"./dist-DIn3VYDc2.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(h)||e.startsWith(y)||e.startsWith(b)||e.startsWith(C)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=g(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(h)||!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}var a=`__okHashHistoryEntry`;function o(e){return{...typeof e==`object`&&e?e:{},[a]:!0}}function s(e){return typeof e==`object`&&!!e&&e[a]===!0}function c(){s(window.history.state)||window.history.replaceState(o(window.history.state),``)}function l(e){let{pathname:t,search:n}=window.location;window.history.replaceState(o(window.history.state),``,`${t}${n}${e}`)}function u(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.pushState(o(window.history.state),``,`${t}${n}${e}`)}function d(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function f(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function p(e,t,n){if(e===`folder`)return f(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function m(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var h=`#/__asset__/`;function g(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function _(e){if(!e.startsWith(h))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function v(e){return`${h}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var y=`#/__skill-file__/`,b=`#/__skills__`;function x(){return b}function S(e){return e===b||e.startsWith(`${b}/`)}var C=`#/__skill-preview__/`,w=[`explore`,`detected`,`builtin`];function T(e){return e!==void 0&&w.includes(e)}var E=`project`;function D(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??E].map(encodeURIComponent).join(`/`)}function O(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!T(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function k(e){let t=D(e);return e.path&&(t+=`/${encodeURIComponent(e.path)}`),`${C}${t}`}function A(e){return e.startsWith(C)?O(e.slice(20)):null}function j(e,t){let n=A(e);if(n)return D(n)===D(t)?n.path:void 0}var M=`:`;function N(e){let t=e.host===void 0?e.name:`${e.name}${M}${e.host}`;return`${y}${[e.scope,t].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function P(e){if(!e.startsWith(y))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(M),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 F=/\.(md|mdx)$/i;function I(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function L(e){return I(e).replace(F,``)}function R(e){let t=I(e);return t?F.test(t)?t:`${t}.md`:`untitled.md`}function z(e){let t=L(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{P as C,j as S,S as T,m as _,_ as a,u as b,p as c,v as d,i as f,x as g,k as h,r as i,D as l,N as m,R as n,O as o,f as p,L as r,n as s,z as t,d as u,s as v,A as w,l as x,c as y};
@@ -1 +1 @@
1
- import{k as e}from"./dist-BqtkiFoE2.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)}var o=`open-knowledge:doc-persisted`;function s(e){window.dispatchEvent(new CustomEvent(o,{detail:{docName:e}}))}function c(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(o,t),()=>window.removeEventListener(o,t)}var l=`open-knowledge:branch-changed`;function u(e){window.dispatchEvent(new CustomEvent(l,{detail:{branch:e}}))}function d(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}var f=`open-knowledge:templates-changed`;function p(){window.dispatchEvent(new CustomEvent(f))}function m(e){let t=()=>e();return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}var h=`open-knowledge:skills-changed`;function g(){window.dispatchEvent(new CustomEvent(h))}function _(e){let t=()=>e();return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}var v=new Set,y=(e,t)=>`${e}\u0000${t}`;function b(e,t){v.add(y(e,t)),g()}function x(e,t){v.delete(y(e,t))&&g()}function S(e){return v.size===0?e:e.filter(e=>!v.has(y(e.scope,e.name)))}export{i as a,x as c,a as d,_ as f,s as i,d as l,b as n,g as o,m as p,u as r,p as s,S as t,c as u};
1
+ import{k as e}from"./dist-DIn3VYDc2.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)}var o=`open-knowledge:doc-persisted`;function s(e){window.dispatchEvent(new CustomEvent(o,{detail:{docName:e}}))}function c(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(o,t),()=>window.removeEventListener(o,t)}var l=`open-knowledge:branch-changed`;function u(e){window.dispatchEvent(new CustomEvent(l,{detail:{branch:e}}))}function d(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}var f=`open-knowledge:templates-changed`;function p(){window.dispatchEvent(new CustomEvent(f))}function m(e){let t=()=>e();return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}var h=`open-knowledge:skills-changed`;function g(){window.dispatchEvent(new CustomEvent(h))}function _(e){let t=()=>e();return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}var v=new Set,y=(e,t)=>`${e}\u0000${t}`;function b(e,t){v.add(y(e,t)),g()}function x(e,t){v.delete(y(e,t))&&g()}function S(e){return v.size===0?e:e.filter(e=>!v.has(y(e.scope,e.name)))}export{i as a,x as c,a as d,_ as f,s as i,d as l,b as n,g as o,m as p,u as r,p as s,S as t,c as u};
@@ -1 +1 @@
1
- import{To as e,xo as t,yo as n}from"./dist-BqtkiFoE2.js";import{d as r,f as i,p as a}from"./doc-paths-DoYUYB8x.js";import{t as o}from"./file-tree-rename-validation-1Yh3dC3l.js";import{c as s,l as c,s as l}from"./file-tree-utils-B1hGkjTf.js";import{a as u}from"./navigation-targets-WVfDNB_X.js";var d=`application/x-open-knowledge-sidebar-item+json`,f={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0};function p(e){return JSON.stringify(e)}function m(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:a(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:r(e.assetPath)}:{target:u(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:i(e.docName)}}function h(e){if(!e||!Array.from(e.types).includes(`application/x-open-knowledge-sidebar-item+json`))return null;let t=e.getData(d);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!g(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&&!_(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function _(e){return typeof e==`string`&&Object.hasOwn(f,e)}var v=`.md`,y=/\.(md|mdx)$/i;function b(e,r=v){return y.test(e)||t(e)||n(e)?e:`${e}${r}`}function x(e){return $(e).replace(y,``)}function S(e,t){let n=$(e),r=k(t),i=t.find(e=>s(e)&&A(e,r)===n)??t.find(e=>s(e)&&w(e)===n);if(i)return i.docName;let a=x(n);return t.find(e=>{let t=w(e);return t!==n&&y.test(t)&&x(t)===a})&&y.test(n)?n:a}function C(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>w(t)===e)}function w(e){return c(e)?D(e.path):l(e)?e.path:b(e.docName,e.docExt)}function T(e){let t=$(e).match(y);return t?`.${t[1].toLowerCase()}`:void 0}function E(e){return $(e)}function D(e){let t=$(e.trim());return t?`${t}/`:``}function O(e){return e.endsWith(`/`)?E(e):x(e)}function k(e){let t=new Map;for(let n of e){if(!s(n))continue;let e=n.docName.match(y);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=w(e);if(!s(e))return n;let r=e.docName.match(y);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??v}`}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=(c(r)||l(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(c(r)){let e=D(r.path);e&&n.add(e)}let i=c(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(y,``)).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=T(e);if(r)return r;let i=n.find(e=>s(e)&&e.docName===t);return i?i.docExt??v:Q(e).includes(`.`)?void 0:v}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(!l(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(T(e))return null;let r=n.find(e=>l(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?E(e.path):S(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(y,``),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(y,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?E(e.path):e.path}function V(e,t){return t?D(e):y.test(e)?e:`${e}${v}`}function H(e,t,n){let r=D(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}${v}`;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):`${E(t)}/index${v}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return E(D(e));let n=x(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=E(D(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=o(t).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:x(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{p as A,z as C,d as D,J as E,m as O,S,O as T,G as _,U as a,E as b,j as c,w as d,X as f,V as g,Y as h,W as i,h as k,N as l,D as m,P as n,H as o,C as p,F as r,b as s,q as t,Z as u,B as v,M as w,x,L as y};
1
+ import{Co as e,Do as t,xo as n}from"./dist-DIn3VYDc2.js";import{d as r,f as i,p as a}from"./doc-paths-KCjzuC60.js";import{t as o}from"./file-tree-rename-validation-1Yh3dC3l.js";import{c as s,l as c,s as l}from"./file-tree-utils-DeyBapi2.js";import{a as u}from"./navigation-targets-BDSeZX3c.js";var d=`application/x-open-knowledge-sidebar-item+json`,f={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0};function p(e){return JSON.stringify(e)}function m(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:a(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:r(e.assetPath)}:{target:u(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:i(e.docName)}}function h(e){if(!e||!Array.from(e.types).includes(`application/x-open-knowledge-sidebar-item+json`))return null;let t=e.getData(d);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!g(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&&!_(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function _(e){return typeof e==`string`&&Object.hasOwn(f,e)}var v=`.md`,y=/\.(md|mdx)$/i;function b(t,r=v){return y.test(t)||e(t)||n(t)?t:`${t}${r}`}function x(e){return $(e).replace(y,``)}function S(e,t){let n=$(e),r=k(t),i=t.find(e=>s(e)&&A(e,r)===n)??t.find(e=>s(e)&&w(e)===n);if(i)return i.docName;let a=x(n);return t.find(e=>{let t=w(e);return t!==n&&y.test(t)&&x(t)===a})&&y.test(n)?n:a}function C(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>w(t)===e)}function w(e){return c(e)?D(e.path):l(e)?e.path:b(e.docName,e.docExt)}function T(e){let t=$(e).match(y);return t?`.${t[1].toLowerCase()}`:void 0}function E(e){return $(e)}function D(e){let t=$(e.trim());return t?`${t}/`:``}function O(e){return e.endsWith(`/`)?E(e):x(e)}function k(e){let t=new Map;for(let n of e){if(!s(n))continue;let e=n.docName.match(y);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=w(e);if(!s(e))return n;let r=e.docName.match(y);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??v}`}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=(c(r)||l(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(c(r)){let e=D(r.path);e&&n.add(e)}let i=c(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(y,``)).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=T(e);if(r)return r;let i=n.find(e=>s(e)&&e.docName===t);return i?i.docExt??v:Q(e).includes(`.`)?void 0:v}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(!l(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(T(e))return null;let r=n.find(e=>l(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?E(e.path):S(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(y,``),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(y,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?E(e.path):e.path}function V(e,t){return t?D(e):y.test(e)?e:`${e}${v}`}function H(e,t,n){let r=D(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}${v}`;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):`${E(t)}/index${v}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return E(D(e));let n=x(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=E(D(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=o(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:x(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{p as A,z as C,d as D,J as E,m as O,S,O as T,G as _,U as a,E as b,j as c,w as d,X as f,V as g,Y as h,W as i,h as k,N as l,D as m,P as n,H as o,C as p,F as r,b as s,q as t,Z as u,B as v,M as w,x,L as y};
@@ -1 +1 @@
1
- import{Ma as e,fr as t}from"./dist-BqtkiFoE2.js";function n(e){return e.kind===`asset`}function r(e){return e.kind===`document`}function i(e){return e.kind===`folder`}function a(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??o(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 o(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 s(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 c(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function l(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function u(e,t){return t&&e!==`document`&&e!==`folder`}function d(e,n){return!n&&t(e)}function f(e,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1,showOkFolders:a=!1}=n;return e.filter(e=>{let n=e.docName??e.path??``;if(n===``||u(e.kind,i))return!1;let o=n.split(`/`),s=o.indexOf(`.ok`);if(s!==-1){if(!a)return!1;let e=o.slice(0,s).join(`/`);return r||e===``||!t(e)}return!d(n,r)})}function p(t,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1}=n,a=t.docName??t.path??``;return a===``||e(a)||l(a)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:d(a,r),onlyMarkdownFiles:u(t.kind,i)}}function m(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{f as a,r as c,a as d,c as i,i as l,m as n,l as o,s as r,n as s,p as t,o as u};
1
+ import{Pa as e,mr as t}from"./dist-DIn3VYDc2.js";function n(e){return e.kind===`asset`}function r(e){return e.kind===`document`}function i(e){return e.kind===`folder`}function a(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??o(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 o(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 s(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 c(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function l(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function u(e,t){return t&&e!==`document`&&e!==`folder`}function d(e,n){return!n&&t(e)}function f(e,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1,showOkFolders:a=!1}=n;return e.filter(e=>{let n=e.docName??e.path??``;if(n===``||u(e.kind,i))return!1;let o=n.split(`/`),s=o.indexOf(`.ok`);if(s!==-1){if(!a)return!1;let e=o.slice(0,s).join(`/`);return r||e===``||!t(e)}return!d(n,r)})}function p(t,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1}=n,a=t.docName??t.path??``;return a===``||e(a)||l(a)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:d(a,r),onlyMarkdownFiles:u(t.kind,i)}}function m(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{f as a,r as c,a as d,c as i,i as l,m as n,l as o,s as r,n as s,p as t,o as u};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-DihYAFEK.js";import{t}from"./parse-api-error-Dmlzsw8v.js";import{s as n}from"./documents-events-D-wbjalg.js";var r=e(`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(e){try{let t=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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(e,t){try{let r=`?folder=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,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 n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(e){try{let t=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(e){try{let t=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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{t as e}from"./createLucideIcon-DihYAFEK.js";import{t}from"./parse-api-error-Dmlzsw8v.js";import{s as n}from"./documents-events-FrlFXuC-.js";var r=e(`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(e){try{let t=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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(e,t){try{let r=`?folder=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,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 n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(e){try{let t=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(e){try{let t=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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};