@inkeep/open-knowledge 0.42.0-beta.2 → 0.42.0-beta.4
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-Du_PVB_P.mjs → acp-harness-probe-ChUiXq4Y.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +2 -2
- package/dist/assets/skills/project/references/components-and-visuals.md +4 -0
- package/dist/assets/skills/write-skill/SKILL.md +1 -1
- package/dist/assets/skills/write-skill/references/pressure-testing.md +1 -1
- package/dist/cli.mjs +7 -7
- package/dist/constants-Do1hpvs-.mjs +2 -0
- package/dist/{git-handle-JgY8Ytwb.mjs → git-handle-BFhoHYr0.mjs} +2 -2
- package/dist/git-handle-CRnnMEIm.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BC0lVj9G.mjs +1 -0
- package/dist/{init-DEzyD1YK.mjs → init-o3oVQbkm.mjs} +3 -3
- package/dist/{launch-json-removal-CbMg4I0R.mjs → launch-json-removal-5A8Lrjdh.mjs} +2 -2
- package/dist/{loader-DO9rcR2q.mjs → loader-b0Jnp3-m.mjs} +2 -2
- package/dist/loader-xZjZfXpn.mjs +1 -0
- package/dist/md-manager-CAqfesEA.mjs +2 -0
- package/dist/{open-browser-BqBGMi_2.mjs → open-browser-Be1y1t9d.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-Bi-j3iwm.mjs +1 -0
- package/dist/{preview-7FhIhdGC.mjs → preview-Zqg7QABJ.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-5kzpB8WF.js → ActivityModeContent-CnhDNi-c.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CH_Uedi-.js → AgentDiffPane-BKvov9S5.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-D_oI6JYB.js → AgentThreadClientBinder-MaSL3zla.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-C5y2rXYX.js → CodeMirrorPropInput-ZGACWLSy.js} +1 -1
- package/dist/public/assets/{DocumentContext-fuUQIepk.js → DocumentContext-DDkluS7D.js} +4 -4
- package/dist/public/assets/{EditorModeToggle-v_8_QyqL.js → EditorModeToggle-D0Db8Ydu.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DGzRLORN.js → EnableSyncConfirmDialog-B2sHRtLY.js} +1 -1
- package/dist/public/assets/FeedbackForm-DuEQbMOb.js +1 -0
- package/dist/public/assets/{GraphPanel-Bp-rgKAp.js → GraphPanel-1CKwHElx.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-P94jXYrX.js → LintConfigEditor-DKgxJcvl.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-fjWoKeUA.js → ManagedArtifactProperties-9e_jj3hZ.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DQKGlIrW.js → McpConsentDialogBody-CYOKF_sf.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-LMmhg9P3.js → MermaidDocEditor-BNURUYJE.js} +1 -1
- package/dist/public/assets/{PropertyPanel-DP1c3fMs.js → PropertyPanel-BMIcO_AS.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CN9m_7Kk.js → ReportBugDialogBody-ByMe7BRT.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DgQ8bbvw.js → SchemaConfigEditor-D7xbhgl6.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-tm_Zr9wy.js → SettingsDialogBody-Bkz3Bpgp.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-C5BWlfbq.js → ShareBranchSwitchDialog-C6G5A_aK.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CI2Mloot.js → ShareReceiveDialog-DLEkjmkI.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-ohgoelQ3.js → ShareReceiveMissDialog-Ls1ECEge.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-B3vkquAC.js → SkillEditorActions-AGeWFFyT.js} +1 -1
- package/dist/public/assets/{SourceEditor-BS9xKRLC.js → SourceEditor-DI6JkRTr.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BNrFiNj3.js → TerminalPanel-Bf_h8SIB.js} +1 -1
- package/dist/public/assets/{TerminalSessionsHost-1SkLbZxP.js → TerminalSessionsHost-B2cWbpj-.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-CcIKz82K.js → TerminalWindowApp-2yCXBcQc.js} +1 -1
- package/dist/public/assets/{ThreadView-DbEiSAgi.js → ThreadView-D2BFrI_O.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BRIL_hOz.js → TimelineDiffPane-B9KqEt7q.js} +1 -1
- package/dist/public/assets/{agent-diff-store-CL1zJhM8.js → agent-diff-store-Bi0IQPgd.js} +1 -1
- package/dist/public/assets/{agent-visibility-DboUkSIR.js → agent-visibility-HpfSUFqP.js} +1 -1
- package/dist/public/assets/{auth-state-cache-CnTQSDtz.js → auth-state-cache-BUVYaS5m.js} +1 -1
- package/dist/public/assets/{client-version-Cx5VddNZ.js → client-version-FVbajnsJ.js} +1 -1
- package/dist/public/assets/{config-provider-BvRqIV8_.js → config-provider-DIuwNlqX.js} +1 -1
- package/dist/public/assets/{dist-CRnLx168.js → dist-Cal4LUep.js} +148 -148
- package/dist/public/assets/{doc-hash-DaHNz5tZ.js → doc-hash-BSK-KaTu.js} +1 -1
- package/dist/public/assets/{documents-events-CO5GMB1j.js → documents-events-1HWCdfoh.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CMkAk18U.js → file-tree-adapter-Dw7Dgyj1.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DW5kpGI7.js → file-tree-utils-DiUPuK3N.js} +1 -1
- package/dist/public/assets/{index-lO6NOXfq.js → index-Bh6-_Nba.js} +96 -96
- package/dist/public/assets/{lint-config-client-ClOK3XHG.js → lint-config-client-G_mrikOJ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BkNWMW9T.js → markdownlint-rule-browser-rS3aDGOb.js} +1 -1
- package/dist/public/assets/{navigation-targets-BvMgbXSl.js → navigation-targets-Ci2h-vaL.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-uWUnYmu7.js → open-managed-artifact-tab-DfGutPkc.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-ZP5ClzoO.js → pending-receive-nav-store-BuGLGemz.js} +1 -1
- package/dist/public/assets/{prop-types-CaVq0ILj.js → prop-types-B-N3_i3c.js} +1 -1
- package/dist/public/assets/{receive-store-O26Klsmj.js → receive-store-CL0RH8Oa.js} +1 -1
- package/dist/public/assets/{selection-context-D1dfmp_3.js → selection-context-zsjvL-8N.js} +1 -1
- package/dist/public/assets/{skill-actions-BOEtYQao.js → skill-actions-C_5-d4BC.js} +1 -1
- package/dist/public/assets/{skills-api-BxZRuTIF.js → skills-api-ChYiP1Zv.js} +1 -1
- package/dist/public/assets/{src-BPnSaHfB.js → src-D8jPu2QV.js} +1 -1
- package/dist/public/assets/{tag-pill-input-D3yKn_j2.js → tag-pill-input-B27HgfRy.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DKN8qckv.js → target-navigation-intent-ClG4AlV8.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-cbz64adZ.js → terminal-launch-events-N4CMVbPT.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-B-8TrAWX.js → terminal-telemetry-DxTZB2oZ.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-u3Nddbn5.js → typing-burst-detector-BP7d86JP.js} +1 -1
- package/dist/public/assets/{uninstall-B_24eCu8.js → uninstall-DHjtqCbn.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DfbfDD9Z.js → use-activity-panel-35_3901z.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-CsOxA7Ln.js → use-apply-config-color-theme-CK97Jvup.js} +1 -1
- package/dist/public/assets/{use-collab-url-DKVO0F_k.js → use-collab-url-D0INpn_f.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DxXMX-ZB.js → use-live-xterm-theme-C-fHLeXw.js} +1 -1
- package/dist/public/assets/{use-settings-route-R3f95s9q.js → use-settings-route-CXFzIfYo.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-FmmwhtBs.js → use-terminal-enabled-fhwpyN81.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-B4mNkRPy.js → use-timeline-entry-diff-CHWJnnz2.js} +1 -1
- package/dist/public/assets/{use-workspace-DQ7VjlT1.js → use-workspace-3T40FR83.js} +1 -1
- package/dist/public/assets/{workspace-paths-CFyvLimb.js → workspace-paths-B-NChZS2.js} +1 -1
- package/dist/public/index.html +35 -35
- package/dist/public/uninstall.html +2 -2
- package/dist/{repair-launch-json-LkGq6bbj.mjs → repair-launch-json-4OYtLMnw.mjs} +2 -2
- package/dist/{repair-mcp-configs-xbGF2ooR.mjs → repair-mcp-configs-BLJJ9tZq.mjs} +2 -2
- package/dist/repair-skills-B1Zc-g_X.mjs +1 -0
- package/dist/{repair-skills-C0Geadpr.mjs → repair-skills-CBmnNSO7.mjs} +2 -2
- package/dist/server-lock-DKRUWCqU.mjs +1 -0
- package/dist/{server-lock-rqh-yT8R.mjs → server-lock-vdpThyb4.mjs} +2 -2
- package/dist/{src-Dex2lDDb.mjs → src-D5V8i8YL.mjs} +2 -2
- package/dist/{src-Q2mWJGdH.mjs → src-DtcKZLt0.mjs} +116 -116
- package/dist/{src-phea8qFf.mjs → src-mOlBaMpr.mjs} +8 -6
- package/dist/{src-DF_K89lg.mjs → src-o9XsfdYT.mjs} +1 -1
- package/dist/{start-BprUXI6x.mjs → start-9cYd5WRC.mjs} +2 -2
- package/dist/start-JsQQrTQk.mjs +1 -0
- package/dist/{write-project-skill-CG87XS-d.mjs → write-project-skill-B_HecSEZ.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-Jq21Pm6p.mjs +0 -2
- package/dist/git-handle-maG17s4k.mjs +0 -1
- package/dist/init-BBYxg46o.mjs +0 -1
- package/dist/loader-DtiWOOTx.mjs +0 -1
- package/dist/md-manager-BHEZ9tjn.mjs +0 -2
- package/dist/preview-Bt_EkZoA.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CZgsAWY7.js +0 -1
- package/dist/repair-skills-D19a_XVe.mjs +0 -1
- package/dist/server-lock-DUfHjP3M.mjs +0 -1
- package/dist/start-kk-goUtr.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nt as e}from"./dist-
|
|
1
|
+
import{nt as e}from"./dist-Cal4LUep.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{k as e}from"./dist-
|
|
1
|
+
import{k as e}from"./dist-Cal4LUep.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{La as e,Va as t}from"./dist-
|
|
1
|
+
import{La as e,Va as t}from"./dist-Cal4LUep.js";import{t as n}from"./file-tree-rename-validation-wADtjYEi.js";import{c as r,l as i,s as a}from"./file-tree-utils-DiUPuK3N.js";import{i as o}from"./navigation-targets-Ci2h-vaL.js";import{c as s,o as c,s as l}from"./doc-hash-BSK-KaTu.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{_r as e,hr as t}from"./dist-
|
|
1
|
+
import{_r as e,hr as t}from"./dist-Cal4LUep.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};
|