@inkeep/open-knowledge 0.46.0-beta.4 → 0.46.0-beta.6
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-BQ3_wze1.mjs → acp-harness-probe-Bhr8FI29.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +16 -16
- package/dist/constants-CScYQw9V.mjs +2 -0
- package/dist/{git-handle-BnrTPYj_.mjs → git-handle-CK_JXuyw.mjs} +2 -2
- package/dist/git-handle-DyS9-xsk.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BIInZq9o.mjs +1 -0
- package/dist/{init-D0wKKFay.mjs → init-DoPgyAbZ.mjs} +4 -4
- package/dist/{launch-json-removal-CmpnCINi.mjs → launch-json-removal-iD7o5ZhH.mjs} +2 -2
- package/dist/loader-BC9hZLNV.mjs +1 -0
- package/dist/{loader-Sk1Z2HXI.mjs → loader-doXjfQUX.mjs} +2 -2
- package/dist/md-manager-BWTSpVXC.mjs +2 -0
- package/dist/{open-browser-DZWA0mkS.mjs → open-browser-BHXl6F9O.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-B4nElYVr.mjs → preview-C67jEM8C.mjs} +2 -2
- package/dist/preview-DrXnMxVX.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DKkJMuA9.js → ActivityModeContent-BquAhT5x.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DkzTKjWa.js → AgentDiffPane-6bk9bV9U.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BqONUtGD.js → AgentThreadClientBinder-u3ZVSSHE.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CyIlgGaP.js → CodeMirrorPropInput-DOcEkWLX.js} +2 -2
- package/dist/public/assets/{DocumentContext-QeD0oigI.js → DocumentContext-uE-Jpe8-.js} +10 -10
- package/dist/public/assets/{EditorModeToggle-12SdK7ya.js → EditorModeToggle-DBmNyzRU.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-GUnrwfa0.js → EnableSyncConfirmDialog-Dufpw3Xm.js} +1 -1
- package/dist/public/assets/FeedbackForm-CuzqS5aL.js +1 -0
- package/dist/public/assets/{GraphPanel-DE5iijrO.js → GraphPanel-DZMLD8ni.js} +2 -2
- package/dist/public/assets/{LintConfigEditor-BNN0UkHw.js → LintConfigEditor-k9WOKYkq.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-Bab8809-.js → ManagedArtifactProperties-xXR4EKXf.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-xnaSaj_X.js → McpConsentDialogBody-CHmK7aXE.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-Bw26glK9.js → MermaidDocEditor-CGsfhioE.js} +1 -1
- package/dist/public/assets/PropertyPanel-C0kyK4Hh.js +2 -0
- package/dist/public/assets/{ReportBugDialogBody-SYqc1dep.js → ReportBugDialogBody-CdEV6nCR.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-RgV92dU4.js → SchemaConfigEditor-BFx4ZhVm.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-Bhk4NQJN.js → SettingsDialogBody-Chz13SZG.js} +3 -3
- package/dist/public/assets/{ShareBranchSwitchDialog-BXjj8rUu.js → ShareBranchSwitchDialog-jGb4KF7T.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CXqdzDYu.js → ShareReceiveDialog-C7_nVZOF.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BaHsueef.js → ShareReceiveMissDialog-Dv1nzqQa.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-CDWxVAy1.js → SkillEditorActions-2WrfNbQp.js} +1 -1
- package/dist/public/assets/{SourceEditor-CZhPtXfy.js → SourceEditor-CmpVF187.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DiVhC52x.js → TerminalPanel-BHN2VN4r.js} +1 -1
- package/dist/public/assets/{TerminalSessionsHost-8wTgxl0R.js → TerminalSessionsHost-Yz2cECTk.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-CQunMofw.js → TerminalWindowApp-CntBjoWb.js} +1 -1
- package/dist/public/assets/{ThreadView-BI4embLm.js → ThreadView-loAOfVAD.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Dd-khPXZ.js → TimelineDiffPane-C5gRZMQN.js} +1 -1
- package/dist/public/assets/{agent-diff-store-CcwDxQK9.js → agent-diff-store-BvRAZqCN.js} +1 -1
- package/dist/public/assets/{agent-visibility-mwTztYpe.js → agent-visibility-DJ6Bc0aU.js} +1 -1
- package/dist/public/assets/{auth-state-cache-Bkm-5pQl.js → auth-state-cache-CEu3ZBI_.js} +1 -1
- package/dist/public/assets/{client-version-g_nEG2h2.js → client-version-MIkctMik.js} +1 -1
- package/dist/public/assets/{comment-chips--aitTdum.js → comment-chips-BYH7v5tl.js} +1 -1
- package/dist/public/assets/{config-provider-CedEU5Ch.js → config-provider-B9kQH9zn.js} +2 -2
- package/dist/public/assets/{dist-Cv2LF2DL.js → dist-DJbbCXtB.js} +183 -177
- package/dist/public/assets/{doc-hash-unBeSU8C.js → doc-hash-BbU2eA08.js} +1 -1
- package/dist/public/assets/{documents-events-DJXnk07Z.js → documents-events-C-mYs64z.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-C9l0Uy9t.js → file-tree-adapter-c4ru9pmD.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Cy6smqXE.js → file-tree-utils-Lc0SvgnU.js} +1 -1
- package/dist/public/assets/{index-BnCzVIZM.js → index-DVlIcKqo.js} +11 -11
- package/dist/public/assets/{lint-config-client-SBOLqEAH.js → lint-config-client-DJg7YDu3.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-u-niNZkQ.js → markdownlint-rule-browser-6yvn3dt6.js} +1 -1
- package/dist/public/assets/{navigation-targets-CRrgSRY3.js → navigation-targets-DwSgIIy0.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DKpdEiZk.js → open-managed-artifact-tab-Dpz9X1m_.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-EO01lM9G.js → pending-receive-nav-store-t5K6mYGs.js} +1 -1
- package/dist/public/assets/{prop-types-DDnDOUmp.js → prop-types-65NJPmd-.js} +1 -1
- package/dist/public/assets/{receive-store-CCj5OCl8.js → receive-store-C8NL_Ow-.js} +1 -1
- package/dist/public/assets/{selection-context-CsoqdVq1.js → selection-context-BNYOSYyM.js} +1 -1
- package/dist/public/assets/{skill-actions-4cV_4pjw.js → skill-actions-ByBHG3Gh.js} +1 -1
- package/dist/public/assets/{skills-api-141pFhWO.js → skills-api-DWPhWBud.js} +1 -1
- package/dist/public/assets/{src-0hFiTIuh.js → src-U1RHfo7d.js} +1 -1
- package/dist/public/assets/{tag-pill-input-C4VKdytg.js → tag-pill-input-BHj4spSb.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BzJodEAL.js → target-navigation-intent-B5jnqgZ_.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-Bz4DL9DZ.js → terminal-launch-events-CtZeptxC.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CXqhqIkk.js → terminal-telemetry-CvNM4wYv.js} +1 -1
- package/dist/public/assets/typing-burst-detector-CZREoy8B.js +8 -0
- package/dist/public/assets/{uninstall-9ZXPO59t.js → uninstall-CA1cQCnA.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BBGq_DFB.js → use-activity-panel-DWxDopZd.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-zM7Oux5u.js → use-apply-config-color-theme-DSCn9I0W.js} +1 -1
- package/dist/public/assets/{use-collab-url-81TC8Fvz.js → use-collab-url-CE02D4PJ.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DeW6SO6V.js → use-live-xterm-theme-B2MdP4nP.js} +1 -1
- package/dist/public/assets/{use-settings-route-KYTTaHV0.js → use-settings-route-BX1P2p9-.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-qjUlZ0f0.js → use-terminal-enabled-BlXFMDFQ.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-svkep662.js → use-timeline-entry-diff-BI1BVnmy.js} +1 -1
- package/dist/public/assets/{use-workspace-CNU53RmX.js → use-workspace-DcPrrukl.js} +1 -1
- package/dist/public/assets/{workspace-paths-DGKkpMQ9.js → workspace-paths-CU85-ZRd.js} +1 -1
- package/dist/public/index.html +36 -36
- package/dist/public/uninstall.html +2 -2
- package/dist/{repair-launch-json-B-4hsfw8.mjs → repair-launch-json-CvIvu8iY.mjs} +2 -2
- package/dist/{repair-mcp-configs--yGPDCBl.mjs → repair-mcp-configs-Bm9hjjRi.mjs} +2 -2
- package/dist/{repair-skills-CH8FwF78.mjs → repair-skills-BHY_AeM4.mjs} +2 -2
- package/dist/repair-skills-CUT1NbJx.mjs +1 -0
- package/dist/server-lock-CG809RrD.mjs +1 -0
- package/dist/{server-lock-D6rSSnhg.mjs → server-lock-D7crxuP7.mjs} +2 -2
- package/dist/{src-CwNOE4ri.mjs → src-D4iCDwsy.mjs} +1 -1
- package/dist/{src-y0VSl78g.mjs → src-DPfeLt-2.mjs} +4 -4
- package/dist/{src-2StQCkyf.mjs → src-DmtkLnli.mjs} +26 -20
- package/dist/src-T1lGYBC1.mjs +3275 -0
- package/dist/start-Bc8dmiQL.mjs +1 -0
- package/dist/{start-D-Yu2Dgc.mjs → start-CbJoa5l7.mjs} +3 -3
- package/dist/{write-project-skill-W6wm8WGO.mjs → write-project-skill-BzhJIXSv.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-7P_R76Oj.mjs +0 -2
- package/dist/git-handle-CHFcUjId.mjs +0 -1
- package/dist/init-C9mmgvW-.mjs +0 -1
- package/dist/loader-D297fMOD.mjs +0 -1
- package/dist/md-manager-B9dAVpPF.mjs +0 -2
- package/dist/preview-DacomZcF.mjs +0 -1
- package/dist/public/assets/FeedbackForm-B34f3kZF.js +0 -1
- package/dist/public/assets/PropertyPanel-ANMzlUf0.js +0 -2
- package/dist/public/assets/typing-burst-detector-DuRvcTVz.js +0 -8
- package/dist/repair-skills-C40390Fl.mjs +0 -1
- package/dist/server-lock-RCr-Pegf.mjs +0 -1
- package/dist/src-DV_Dbu6a.mjs +0 -3275
- package/dist/start-Bc5XMp-q.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{st as e}from"./dist-
|
|
1
|
+
import{st as e}from"./dist-DJbbCXtB.js";var t=/\.(md|mdx)$/i;function n(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function r(e){return n(e).replace(t,``)}function i(e){let r=n(e);return r?t.test(r)?r:`${r}.md`:`untitled.md`}function a(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`}}function o(t){return e.includes(t)}function s(e){if(e.startsWith(b)||e.startsWith(w)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=x(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function c(e){if(e.startsWith(b)||!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 l(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}var u=`__okHashHistoryEntry`;function d(e){return{...typeof e==`object`&&e?e:{},[u]:!0}}function f(e){return typeof e==`object`&&!!e&&e[u]===!0}function p(){f(window.history.state)||window.history.replaceState(d(window.history.state),``)}function m(e){let{pathname:t,search:n}=window.location;window.history.replaceState(d(window.history.state),``,`${t}${n}${e}`)}function h(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.pushState(d(window.history.state),``,`${t}${n}${e}`)}function g(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function _(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function v(e,t,n){if(e===`folder`)return _(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function y(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var b=`#/__asset__/`;function x(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function S(e){if(!e.startsWith(b))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function C(e){return`${b}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var w=`#/__skill-file__/`;function T(e){return`${w}${[e.scope,e.name].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function E(e){if(!e.startsWith(w))return null;let t=e.slice(17);if(!t)return null;let n;try{n=t.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<3)return null;let[r,i,...a]=n,s=a.join(`/`);return!r||!i||!s||!o(r)?null:{scope:r,name:i,path:s}}export{i as _,g as a,_ as c,f as d,p as f,a as g,E as h,v as i,T as l,m,S as n,C as o,h as p,s as r,l as s,c as t,y as u,r as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as e}from"./dist-
|
|
1
|
+
import{P as e}from"./dist-DJbbCXtB.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)}export{p as a,a as c,g as i,_ as l,s as n,d as o,i as r,c as s,u as t,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$a as e,ro as t}from"./dist-
|
|
1
|
+
import{$a as e,ro as t}from"./dist-DJbbCXtB.js";import{t as n}from"./file-tree-rename-validation-DDA1ck2Y.js";import{c as r,l as i,s as a}from"./file-tree-utils-Lc0SvgnU.js";import{i as o}from"./navigation-targets-DwSgIIy0.js";import{c as s,o as c,s as l}from"./doc-hash-BbU2eA08.js";var u=`application/x-open-knowledge-sidebar-item+json`,d={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0};function f(e){return JSON.stringify(e)}function p(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:s(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:c(e.assetPath)}:{target:o(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:l(e.docName)}}function m(e){if(!e||!Array.from(e.types).includes(`application/x-open-knowledge-sidebar-item+json`))return null;let t=e.getData(u);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!h(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&&!g(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function h(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function g(e){return typeof e==`string`&&Object.hasOwn(d,e)}var _=`.md`,v=/\.(md|mdx)$/i;function y(t,n=_){return v.test(t)||e(t)?t:`${t}${n}`}function b(e){return Y(e).replace(v,``)}function x(e,t){let n=Y(e),i=t.find(e=>r(e)&&S(e)===n);if(i)return i.docName;let a=b(n);return t.find(e=>{let t=S(e);return t!==n&&v.test(t)&&b(t)===a})&&v.test(n)?n:a}function S(e){return i(e)?T(e.path):a(e)?e.path:y(e.docName,e.docExt)}function C(e){let t=Y(e).match(v);return t?`.${t[1].toLowerCase()}`:void 0}function w(e){return Y(e)}function T(e){let t=Y(e.trim());return t?`${t}/`:``}function E(e){return e.endsWith(`/`)?w(e):b(e)}function D(e){return e.map(S)}function O(e){return[...e].sort().join(`\0`)}function k(e){return O(D(e))}function A(e,t={}){let n=new Set;for(let r of e){let e=(i(r)||a(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(i(r)){let e=T(r.path);e&&n.add(e)}let o=i(r)?e.length:e.length-1;for(let t=1;t<=o;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function j(e){if(!e)return[];let t=Y(e.replace(v,``)).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 M(e,t,n){let i=C(e);if(i)return i;let a=n.find(e=>r(e)&&e.docName===t);return a?a.docExt??_:J(e).includes(`.`)?void 0:_}function N(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),o=t.filter(e=>{if(!a(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return o.length===1?o[0].path:null}function P(e,t,n){if(C(e))return null;let r=n.find(e=>a(e)&&e.path===t);return r?r.path:J(e).includes(`.`)?t:N(t,n)}function F(e,t){let n=e.kind===`directory`,r=n?w(e.path):x(e.path,t);if(n)return{kind:`folder`,name:Y(J(e.path)).replace(v,``),path:r,treePath:L(e.path,!0)};let i=P(e.path,r,t);if(i)return{kind:`asset`,name:Y(J(i)),path:i,treePath:i};let a=M(e.path,r,t);return{kind:`file`,name:Y(J(e.path)).replace(v,``),path:r,treePath:L(e.path,!1),docExt:a}}function I(e){return e.kind===`directory`?w(e.path):e.path}function L(e,t){return t?T(e):v.test(e)?e:`${e}${_}`}function R(e,t,n){let r=T(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}${_}`;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 z(e,t){return e===`file`?L(t,!1):`${w(t)}/index${_}`}function B(e,t){return t.kind===`root`||t.directoryPath==null?J(e):`${t.directoryPath}${J(e)}`}function V(e,t){if(t)return w(T(e));let n=b(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function H(e,t){let n=w(T(e));return n?`${n}/${t}`:t}function U(e,t,n){e.append(`parentDocName`,H(t,n)),e.append(`placement`,`parent-dir`)}function W(e,t){return(t.path??H(e,t.src)).replace(/^\/+/,``)}function G(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 K(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function q(e,r){let i=n(e).toLowerCase();if(i===``)return null;let a=new Date().toISOString();if(i===`.md`||i===`.mdx`)return{kind:`document`,docName:b(e),docExt:i,modified:a,size:r.size};let o=i.startsWith(`.`)?i.slice(1):i;return{kind:`asset`,path:e,assetExt:o,mediaKind:t(o),modified:a,size:r.size}}function J(e){let t=Y(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function Y(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{O as C,p as D,u as E,m as O,F as S,W as T,I as _,z as a,b,D as c,S as d,K as f,V as g,L as h,B as i,f as k,k as l,G as m,A as n,R as o,T as p,j as r,y as s,U as t,q as u,N as v,E as w,x,w as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ar as e,Or as t}from"./dist-DJbbCXtB.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};
|