@inkeep/open-knowledge 0.69.0-beta.0 → 0.69.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.
- package/dist/{acp-harness-probe-DFULI4zt.mjs → acp-harness-probe-D8y_ENIV.mjs} +1 -1
- package/dist/cli.mjs +51 -51
- package/dist/constants-BseCtU-Z.mjs +1 -0
- package/dist/dist-DYRgOemK.mjs +2099 -0
- package/dist/{dist-D3ncRY-r.mjs → dist-Db-P3aGR.mjs} +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-BRZOzHT1.mjs → init-282p759w.mjs} +5 -5
- package/dist/init-Co5N2pao.mjs +1 -0
- package/dist/{launch-json-removal-B7Up0mgM.mjs → launch-json-removal-OEn2oiDe.mjs} +1 -1
- package/dist/loader-CzIieZ7h.mjs +1 -0
- package/dist/{loader-CJWS9p3X.mjs → loader-DE8ZUShV.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-CZR6BFG9.mjs → md-manager-BGnqyqi1-eohu_6wW.mjs} +106 -106
- package/dist/{open-browser-J-HkPHyq.mjs → open-browser-D7BRsUDm.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-OVFyIYa-.mjs → preview-BN6acnbX.mjs} +1 -1
- package/dist/preview-BP_mf6Do.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-Zc2SXbM7.js → ActivityModeContent-BtUHOKhl.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CfgZluhc.js → AddPropertiesButton-B1Sqlbky.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-B3WSZOfe.js → AgentDiffPane-CjKxTFkX.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-Bw1_X-_O.js → AgentThreadClientBinder-BfjceESQ.js} +1 -1
- package/dist/public/assets/{BugReportHistory-C0mgfepv.js → BugReportHistory-BOcf2TVz.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CQw-Sqwh.js → BugReportHistoryDialog-BcrJpQj8.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-VVIzUqY-.js +3 -0
- package/dist/public/assets/{ConsentDialogBody-CD-D26ZE.js → ConsentDialogBody-BeUUwMln.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-Yy2aqABc.js → DiffViewBoundary-BwXxurEj.js} +1 -1
- package/dist/public/assets/DocumentContext-Bctph-Hl.js +38 -0
- package/dist/public/assets/{EditorModeToggle-C-GbkTqp.js → EditorModeToggle-BoKBeRU9.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CyXofuPa.js → EnableSyncConfirmDialog-DmTuiGjB.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-D_dI0p0K.js → ExcalidrawDocEditor-CqGr_rRC.js} +1 -1
- package/dist/public/assets/FeedbackForm-Bjn9zy_O.js +1 -0
- package/dist/public/assets/{GraphPanel-BvL7oMih.js → GraphPanel-DWLNgPlg.js} +2 -2
- package/dist/public/assets/{ImageAttachments-DLRyPKzs.js → ImageAttachments-D4vMwJQE.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-YXnYByQ2.js → ImportSkillDialog-MGafxiRq.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BhmFozmU.js → LintConfigEditor-CsX2pq5S.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BITPt-_L.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-BdG10JoH.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-D32L_IKD.js → MermaidDocEditor-8qhvNL-M.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-MQspNHC2.js → PropertyDisplayRow-BYroqm7y.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-DxnhiTGI.js +3 -0
- package/dist/public/assets/{ReportBugMenuTrigger-CRPp2gW8.js → ReportBugMenuTrigger-DLTNh3tw.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-DBoqvFoe.js → SchemaConfigEditor-BsYLyhDs.js} +1 -1
- package/dist/public/assets/{SessionsHost-B0FcTwIf.js → SessionsHost-DM_V9GQB.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DIpVgiMA.js → SettingsDialogBody-CVNVDP3j.js} +4 -4
- package/dist/public/assets/{ShareBranchSwitchDialog-DT-MsN_7.js → ShareBranchSwitchDialog-B8GaAtHa.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-D5U7eb0K.js → ShareReceiveDialog-CfN5tWAX.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BQYFcNCG.js → ShareReceiveMissDialog-CfAZyYpR.js} +1 -1
- package/dist/public/assets/{SkillCostValue-B8shQ8aS.js → SkillCostValue-CbiGwlcy.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-C9hq4ADD.js → SkillEditBanner-8SDCYqSK.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-DxZSklig.js → SkillForkDialog-DA2bv7Ze.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-B0Rgp5dj.js → SkillInstallMenu-Bz6sIbLL.js} +2 -2
- package/dist/public/assets/{SkillOriginInline-CSc-CNEN.js → SkillOriginInline-jp5eBUDV.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DK8kTZWd.js → SkillToolbarControls-Bi2IGVAN.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-CupBuOxP.js → SlidesToolbarControls-WsHoiZbF.js} +1 -1
- package/dist/public/assets/SourceEditor-DRWiP5Vf.js +1 -0
- package/dist/public/assets/{TerminalPanel-_Qa_82n0.js → TerminalPanel-DqnJUJYd.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-DF3Gb6RF.js → TerminalWindowApp-BrJa7rfF.js} +1 -1
- package/dist/public/assets/{TextDocEditor-u8A_VeSo.js → TextDocEditor-vicT5VSm.js} +1 -1
- package/dist/public/assets/{ThreadView-BD8CXYJ6.js → ThreadView-ZAY_akk1.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-t-rUOsO8.js → TimelineDiffPane-BNlcbJhw.js} +1 -1
- package/dist/public/assets/{agent-diff-store-iAzgNJJS.js → agent-diff-store-axExpP_d.js} +1 -1
- package/dist/public/assets/auth-state-cache-BFfz7JAK.js +11 -0
- package/dist/public/assets/{bug-report-send-manager-Drf4dy2T.js → bug-report-send-manager-CHJKmtN2.js} +1 -1
- package/dist/public/assets/{client-version-DgpXcdyD.js → client-version-CjkZeZzF.js} +1 -1
- package/dist/public/assets/{comment-chips-D665bZ0y.js → comment-chips-B_igKUhF.js} +1 -1
- package/dist/public/assets/config-provider-lMh3qB5Y.js +5 -0
- package/dist/public/assets/{dist-CNsXnHvV.js → dist-CwxvIm9B.js} +1 -1
- package/dist/public/assets/{doc-hash-LMNyBpXx.js → doc-hash-BH9rk2WZ.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CfmlCR13.js → doc-undo-manager-BLq8Dma7.js} +1 -1
- package/dist/public/assets/{documents-events-BsmTsjmz.js → documents-events-BB7BIo88.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-uQcc4ckN.js → file-tree-adapter-DyYOxysT.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CPRyzplX.js → file-tree-utils-u5xqn0BX.js} +1 -1
- package/dist/public/assets/{folder-config-api-BDwh3aC-.js → folder-config-api-CVMW4D2j.js} +1 -1
- package/dist/public/assets/i18n-rBGyf4l3.js +1 -0
- package/dist/public/assets/{index-CtBO8elu.js → index-B0HI1pzX.js} +14 -14
- package/dist/public/assets/{launcher-selection-DEVYkMjA.js → launcher-selection-BWG2fxav.js} +1 -1
- package/dist/public/assets/{lint-config-client-CCpNmoZV.js → lint-config-client-DVi1icXy.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DUyduHWT.js → markdownlint-rule-browser-mxUTuxp0.js} +1 -1
- package/dist/public/assets/page-list-cache-CYe_1O03.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-3uXvslja.js → pending-receive-nav-store-UWSL7sU6.js} +1 -1
- package/dist/public/assets/{progress-Cn_FRDiV.js → progress-DKJUdHw-.js} +3 -3
- package/dist/public/assets/{project-paths-C32mx08r.js → project-paths-DM1xnwOC.js} +1 -1
- package/dist/public/assets/{prop-types-BIu1D6lu.js → prop-types-CjN08vlQ.js} +1 -1
- package/dist/public/assets/{receive-store-Buh0t9ET.js → receive-store-Cead1yYo.js} +1 -1
- package/dist/public/assets/{selection-context-BiowxoFh.js → selection-context-D1tykBf6.js} +1 -1
- package/dist/public/assets/{skill-scope-B3Nj1tJp.js → skill-scope-DcddcyFv.js} +1 -1
- package/dist/public/assets/{skills-api-B10NOC1T.js → skills-api-DKrztKUX.js} +1 -1
- package/dist/public/assets/{src-Kpep1xON.js → src-Bd9_jj6p.js} +1 -1
- package/dist/public/assets/{startup-marks-8bSkgTX4.js → startup-marks-BsUZ1tFg.js} +1 -1
- package/dist/public/assets/{tag-pill-input-u6SD8qUI.js → tag-pill-input-BV-jU72q.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BkhueaqY.js → target-navigation-intent-BA3Z0hPP.js} +1 -1
- package/dist/public/assets/{telemetry-startup-je6mAmwN.js → telemetry-startup-CSADiB4T.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-CnPFJMVj.js → terminal-cli-display-CRS9W4N1.js} +1 -1
- package/dist/public/assets/{terminal-command-events-BYlQRupR.js → terminal-command-events-D_Zfew8Q.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-CimABhX5.js → typing-burst-detector-CDgmvf7o.js} +3 -3
- package/dist/public/assets/{uninstall-Dq_EhrWx.js → uninstall-CAwByItk.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BCWlQC3x.js → use-activity-panel-DSOGit1h.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-CJrBTcY0.js → use-apply-config-color-theme-DJxDbMcj.js} +1 -1
- package/dist/public/assets/{use-collab-url-BAJGqgUn.js → use-collab-url-C3cEeGf_.js} +1 -1
- package/dist/public/assets/{use-conflicts-VdPxluxU.js → use-conflicts-DZLpbdwE.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DBfQaRdI.js → use-live-xterm-theme-CYIvo-kA.js} +1 -1
- package/dist/public/assets/{use-open-skill-lm9BfHZr.js → use-open-skill-B0i7BySv.js} +1 -1
- package/dist/public/assets/{use-settings-route-DNht5G-T.js → use-settings-route-B1GSbeY4.js} +1 -1
- package/dist/public/assets/{use-skill-origin-BrXpsMVc.js → use-skill-origin-B_MYd0ur.js} +1 -1
- package/dist/public/assets/{use-skills-OgedLfu1.js → use-skills-CRcq3oxw.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DR6sPeKA.js → use-terminal-enabled-BL44WFHb.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-jtkhdBDb.js +5 -0
- package/dist/public/assets/{use-workspace-d3dSSgXw.js → use-workspace-C8m25tLq.js} +1 -1
- package/dist/public/index.html +50 -50
- package/dist/public/uninstall.html +3 -3
- package/dist/{repair-launch-json-B4vY3obG.mjs → repair-launch-json-C7vuSwVX.mjs} +1 -1
- package/dist/{repair-mcp-configs-BrTYR9lx.mjs → repair-mcp-configs-D1DXyafy.mjs} +1 -1
- package/dist/repair-skills-BdPGQfHw.mjs +1 -0
- package/dist/{repair-skills-BM2Pl7Yv.mjs → repair-skills-Cphq1SzP.mjs} +1 -1
- package/dist/{resolve-project-root-B81XfrMj.mjs → resolve-project-root-Oh5l_16q.mjs} +3 -3
- package/dist/{skill-teardown-DbinmoNc.mjs → skill-teardown-CJwWL618.mjs} +1 -1
- package/dist/src-CD-TP9Ea.mjs +19 -0
- package/dist/src-KfEB_3SH.mjs +1 -0
- package/dist/start-BnnuYHuo.mjs +1 -0
- package/dist/{start-DDg_zG0r.mjs → start-vChFYYru.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-lVHaYJwx.mjs +0 -1
- package/dist/dist-3_s68BnD.mjs +0 -2099
- package/dist/init-DeaYy4BN.mjs +0 -1
- package/dist/loader-BupEYZRX.mjs +0 -1
- package/dist/preview-DwXHObKU.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-D0aTVBuW.js +0 -3
- package/dist/public/assets/DocumentContext-DCptSL-u.js +0 -38
- package/dist/public/assets/FeedbackForm-CVAVZ9B2.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CJbVr2ED.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DlbjGs9m.js +0 -1
- package/dist/public/assets/ReportBugDialogBody-BBw4Gvfh.js +0 -3
- package/dist/public/assets/SourceEditor-C-ZpGOKU.js +0 -1
- package/dist/public/assets/auth-state-cache-1ThajazI.js +0 -11
- package/dist/public/assets/config-provider-DMJPXf-P.js +0 -5
- package/dist/public/assets/i18n-DGYi-XXf.js +0 -1
- package/dist/public/assets/page-list-cache-CSQWCWRt.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-aa7Yb8h1.js +0 -5
- package/dist/repair-skills-2wSF-8Tv.mjs +0 -1
- package/dist/src-BFvXQfJ0.mjs +0 -19
- package/dist/src-f8P7QEGT.mjs +0 -1
- package/dist/start-DOrRpkix.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$o as e,Ko as t,Zo as n,qo as r}from"./dist-CwxvIm9B.js";import{c as i,l as a,u as o}from"./doc-hash-BH9rk2WZ.js";import{c as s}from"./page-list-cache-CYe_1O03.js";import{c,l,s as u}from"./file-tree-utils-u5xqn0BX.js";import{t as d}from"./file-tree-rename-validation-BWlguLbB.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:s(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=d(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{
|
|
1
|
+
import{Vs as e,ei as t,oi as n}from"./dist-CwxvIm9B.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{l as e}from"./documents-events-
|
|
1
|
+
import{l as e}from"./documents-events-BB7BIo88.js";import{t}from"./parse-api-error-BtEdpaFC.js";import{t as n}from"./createLucideIcon-B6ULg5PN.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-CwxvIm9B.js";import{t as e}from"./dist-Cr4-nBVI.js";import{t}from"./messages-CqyX3cbt.js";e.load(`en`,t.messages),e.activate(`en`);
|