@inkeep/open-knowledge 0.61.2 → 0.61.3
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.
- package/dist/{acp-harness-probe-Bc-CWfz4.mjs → acp-harness-probe-t1lJvQ4a.mjs} +2 -2
- package/dist/cli.mjs +11 -11
- package/dist/constants-D3GZn-dk.mjs +2 -0
- package/dist/{fs-traced-1KTQL4h-.mjs → fs-traced-2B_-YK-g.mjs} +6 -6
- package/dist/fs-traced-DjggEXdh.mjs +1 -0
- package/dist/{git-handle-BnzI58ud.mjs → git-handle-CdQzaja5.mjs} +2 -2
- package/dist/git-handle-Clxj9fr-.mjs +1 -0
- package/dist/index.mjs +161 -161
- package/dist/{init-DDW2aJXW.mjs → init-5SqrHOkp.mjs} +3 -3
- package/dist/init-C7HKweMR.mjs +1 -0
- package/dist/{launch-json-removal-J6AggXic.mjs → launch-json-removal-DM5PCMXP.mjs} +2 -2
- package/dist/{loader-D_NNhPbU.mjs → loader-DsWNpxDe.mjs} +2 -2
- package/dist/loader-Osy-rk3T.mjs +1 -0
- package/dist/md-manager-DbxE4WzN.mjs +2 -0
- package/dist/{open-browser-CB0sbYH4.mjs → open-browser-xN9OlX1t.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-DAuizf4r.mjs +1 -0
- package/dist/{preview-46yeY8SC.mjs → preview-DMJ3NAED.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-rkVFPeGI.js → ActivityModeContent-Cn-W_Pc9.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-UM3yi_Jj.js → AgentDiffPane-fqyn3qqK.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DbKx5B2j.js → AgentThreadClientBinder-BUL6vwPz.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-SvCCpq_g.js → CodeMirrorPropInput-ZXKkJFOY.js} +1 -1
- package/dist/public/assets/{DocumentContext-BrlDlUx7.js → DocumentContext-CuOcLr_j.js} +7 -7
- package/dist/public/assets/{EditorModeToggle-Coj-pKbp.js → EditorModeToggle-rmR5bMw6.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CMQPWKxH.js → EnableSyncConfirmDialog-IKFvLJ0s.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-Ct_C78n1.js → ExcalidrawDocEditor-DUdD1MdF.js} +1 -1
- package/dist/public/assets/FeedbackForm-DzgyNjac.js +1 -0
- package/dist/public/assets/{GraphPanel-C4IPsveQ.js → GraphPanel-BdYMWZaF.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BUIlH24A.js → ImportSkillDialog-Cf9s-UGN.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-Q1gGaOab.js → LintConfigEditor-DkncZJhY.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-EYfMUx3g.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-mqQVguq0.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-DBbbNWFO.js → MermaidDocEditor-DLpabb88.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DfLhrMek.js → PropertyDisplayRow-CPeDXIFD.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-D5SrIAvZ.js → ReportBugDialogBody-CCniAzNT.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CkKt8e-E.js → SchemaConfigEditor-_uHnWU3w.js} +1 -1
- package/dist/public/assets/{SessionsHost-DxbKcTfw.js → SessionsHost-DXGYsgWh.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-BaPG44Cx.js → SettingsDialogBody-75kVL106.js} +5 -5
- package/dist/public/assets/{ShareBranchSwitchDialog-BvkvEHCc.js → ShareBranchSwitchDialog-DgbDAJil.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-C9KNKynH.js → ShareReceiveDialog-DmClGCLD.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-CwqxBbfk.js → ShareReceiveMissDialog-DAxO28Lj.js} +1 -1
- package/dist/public/assets/{SkillCostValue-BvB_BW1x.js → SkillCostValue-zpzjADcj.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-D0gTinuX.js → SkillEditBanner-BCRYQ3e4.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-Cb7qSrC0.js → SkillInstallMenu-QQXII2hZ.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-IRuhZu-j.js → SkillOriginInline-BoAKWsbK.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-6i3dV6vs.js → SkillToolbarControls-ovUDGFiC.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-D5EykdNJ.js → SlidesToolbarControls-BBIxMkk8.js} +1 -1
- package/dist/public/assets/{SourceEditor-p9dgTOkJ.js → SourceEditor-fE2VSQ8J.js} +1 -1
- package/dist/public/assets/{TerminalPanel-cl3V5Lv6.js → TerminalPanel-Cy4HfKYz.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-BoxazHdg.js → TerminalWindowApp-C6AUY1UG.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DOoM8Kxy.js → TextDocEditor-dLRRDXfg.js} +1 -1
- package/dist/public/assets/{ThreadView-BxvEDVSr.js → ThreadView-D9Fbdpxf.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BPuM41-O.js → TimelineDiffPane-DNnhFpvU.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D7oOrlOa.js → agent-diff-store-CZQtUCXL.js} +1 -1
- package/dist/public/assets/auth-state-cache-CvhGKn1-.js +11 -0
- package/dist/public/assets/{client-version-DPop7QlO.js → client-version-CaChkiCH.js} +1 -1
- package/dist/public/assets/{comment-chips-BSXPyCs1.js → comment-chips-DVNORTJ8.js} +1 -1
- package/dist/public/assets/config-provider-oAAIxoES.js +5 -0
- package/dist/public/assets/{dist-YRM6aCj22.js → dist-DKOit9IV2.js} +192 -192
- package/dist/public/assets/{doc-paths-DHGjMfMc.js → doc-paths-DqOWEocR.js} +1 -1
- package/dist/public/assets/{documents-events-Dh2E-mNH.js → documents-events-CswIH8-8.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-8KZtqBfU.js → file-tree-adapter-Ye2De3V1.js} +1 -1
- package/dist/public/assets/{file-tree-utils-mm4DWltG.js → file-tree-utils-DeewwZEM.js} +1 -1
- package/dist/public/assets/{folder-config-api-ReDuYJ0J.js → folder-config-api-DzbfltNv.js} +1 -1
- package/dist/public/assets/i18n-Ds_Fl5Hd.js +1 -0
- package/dist/public/assets/index-TaCyw6y_.js +2098 -0
- package/dist/public/assets/{lint-config-client-DDlKZf1J.js → lint-config-client-Dwop4dqP.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-Cn61TsP6.js → markdownlint-rule-browser-DH858hZX.js} +1 -1
- package/dist/public/assets/navigation-targets-jpdo1ZgU.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-DI0a5-3C.js → open-managed-artifact-tab-CgNN9QbB.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BQWmsZRi.js → pending-receive-nav-store-fsDdvtOj.js} +1 -1
- package/dist/public/assets/{progress-DKgTQ0Qz.js → progress-CHBPaNjc.js} +1 -1
- package/dist/public/assets/{prop-types-aV6oiD-U.js → prop-types-Cw5N-nOD.js} +1 -1
- package/dist/public/assets/{receive-store-D1fi7HMJ.js → receive-store-DFDJ0T_F.js} +1 -1
- package/dist/public/assets/{selection-context-4KGHvsgP.js → selection-context-CS5s5L53.js} +1 -1
- package/dist/public/assets/{skill-actions-BndTKw4P.js → skill-actions-CONIft3w.js} +1 -1
- package/dist/public/assets/{skill-scope-TpOVvXXj.js → skill-scope-C_bc3f6T.js} +1 -1
- package/dist/public/assets/{skills-api-Ci4vZCl_.js → skills-api-B3AiUodv.js} +1 -1
- package/dist/public/assets/{src-Dyjlw1SL.js → src-Dn75jB9p.js} +1 -1
- package/dist/public/assets/{tag-pill-input-ltY20AtL.js → tag-pill-input-BFR_8nvj.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Bq0cHa0H.js → target-navigation-intent-5nit-2Ve.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-MwCkMfQx.js → terminal-cli-display-DQFap0a9.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-cj2KCTDl.js → terminal-launch-events-DxtBCSNL.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-ElOB2Hsl.js → terminal-telemetry-Cq512ASb.js} +1 -1
- package/dist/public/assets/typing-burst-detector-Bhy83GCZ.js +8 -0
- package/dist/public/assets/{uninstall-CJfdIccl.js → uninstall-VS8HkqWd.js} +1 -1
- package/dist/public/assets/{use-activity-panel-AklD6yAB.js → use-activity-panel-BPQcffqO.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-zpd8fyW1.js → use-apply-config-color-theme-DT9ZBAuW.js} +1 -1
- package/dist/public/assets/{use-collab-url-BIoe0OLV.js → use-collab-url-CaC2gD2v.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-BgtSx-n3.js → use-live-xterm-theme-xXp1UYmJ.js} +1 -1
- package/dist/public/assets/{use-open-skill-CLhiKLe2.js → use-open-skill-DdfCbjRH.js} +1 -1
- package/dist/public/assets/{use-popular-skills-CSwbHrqM.js → use-popular-skills-DRwm43Dp.js} +1 -1
- package/dist/public/assets/{use-settings-route-BuFQqdtV.js → use-settings-route-BGxa3SPN.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CbbiS8DZ.js → use-skill-origin-CnlwuiEX.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-GezhypT9.js → use-terminal-enabled-B3CRPNAH.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DyOMjIES.js → use-timeline-entry-diff-Cta4x9Tk.js} +1 -1
- package/dist/public/assets/{use-workspace-C3C8xAY5.js → use-workspace-CQYB3HLR.js} +1 -1
- package/dist/public/index.html +45 -45
- package/dist/public/uninstall.html +3 -3
- package/dist/{repair-launch-json-CEDu8wqf.mjs → repair-launch-json-Ul9-Kphl.mjs} +2 -2
- package/dist/{repair-mcp-configs-Bf5i53AU.mjs → repair-mcp-configs-DI9-mCNA.mjs} +2 -2
- package/dist/repair-skills-C4NosCCh.mjs +1 -0
- package/dist/{repair-skills-Cs-CbtpF.mjs → repair-skills-DySL7Lc9.mjs} +2 -2
- package/dist/{resolve-project-root-BD_5TDzP.mjs → resolve-project-root-BDV317uB.mjs} +2 -2
- package/dist/{server-lock-DCzdk2Up.mjs → server-lock-BFHu2BWp.mjs} +2 -2
- package/dist/server-lock-DzPLyikk.mjs +1 -0
- package/dist/{skill-teardown-TMX-h8on.mjs → skill-teardown-DTg2NyL3.mjs} +2 -2
- package/dist/{sleep-DXvB05wr.mjs → sleep-DhRrtbfG.mjs} +6 -6
- package/dist/src-B9XENgF4.mjs +357 -0
- package/dist/{src-D28v5dI-.mjs → src-BMc6VYxR.mjs} +1 -1
- package/dist/{src-BUvdZk4h.mjs → src-BpAtKjdr.mjs} +3 -3
- package/dist/src-C49kugTg.mjs +1 -0
- package/dist/{src-vJKK8Bgd.mjs → src-C8z0M4Ib.mjs} +71 -71
- package/dist/start-De77XKSr.mjs +1 -0
- package/dist/{start-oZSin_Cq.mjs → start-R7eR24jP.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-DwCeIiph.mjs +0 -2
- package/dist/fs-traced-Dak_kryQ.mjs +0 -1
- package/dist/git-handle-M-kQfBzM.mjs +0 -1
- package/dist/init-BF-FV5qg.mjs +0 -1
- package/dist/loader-CnYTkLbq.mjs +0 -1
- package/dist/md-manager-C7XAJMWr.mjs +0 -2
- package/dist/preview-DCrZ6Og7.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CYAmtIjK.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B4xOs3fA.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DUIo-gDU.js +0 -1
- package/dist/public/assets/auth-state-cache-1gTw3GkH.js +0 -11
- package/dist/public/assets/config-provider-CYqYSyJg.js +0 -5
- package/dist/public/assets/i18n-BQpXlvfY.js +0 -1
- package/dist/public/assets/index-dbxZtLCX.js +0 -2098
- package/dist/public/assets/navigation-targets-CFQds_7M.js +0 -1
- package/dist/public/assets/typing-burst-detector-kXx1cN6a.js +0 -8
- package/dist/repair-skills-Bn47U59J.mjs +0 -1
- package/dist/server-lock-CV9U-jz6.mjs +0 -1
- package/dist/src-DUFkX7vo.mjs +0 -1
- package/dist/src-Dm-FGyIz.mjs +0 -357
- package/dist/start-CuUojA75.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fo as e}from"./dist-
|
|
1
|
+
import{fo as e}from"./dist-DKOit9IV2.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-
|
|
1
|
+
import{A as e}from"./dist-DKOit9IV2.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{
|
|
1
|
+
import{Os as e,bs as t,ws as n,xs as r}from"./dist-DKOit9IV2.js";import{d as i,f as a,p as o}from"./doc-paths-DqOWEocR.js";import{t as s}from"./file-tree-rename-validation-CKWI2fGj.js";import{c,l,s as u}from"./file-tree-utils-DeewwZEM.js";import{a as d}from"./navigation-targets-jpdo1ZgU.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-
|
|
1
|
+
import{Eo as e,Ur as t,Yr as n}from"./dist-DKOit9IV2.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-
|
|
1
|
+
import{c as e}from"./documents-events-CswIH8-8.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-DKOit9IV2.js";import{t as e}from"./dist-BgXDUIPy.js";import{t}from"./messages-W4EQLozB.js";e.load(`en`,t.messages),e.activate(`en`);
|