@inkeep/open-knowledge 0.70.2 → 0.70.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/cli.mjs +6 -6
- package/dist/constants-Deih7i0K.mjs +1 -0
- package/dist/{dist-Ct3NR8HA.mjs → dist-CSFai4j1.mjs} +1 -1
- package/dist/{dist-BfGPmTI1.mjs → dist-CmS0s3u8.mjs} +477 -477
- package/dist/index.mjs +3 -3
- package/dist/{init-DCm-_TKB.mjs → init-CtwvSCyQ.mjs} +2 -2
- package/dist/init-DJa55PQU.mjs +1 -0
- package/dist/{launch-json-removal-DKupr-jC.mjs → launch-json-removal-BE8E1vIW.mjs} +1 -1
- package/dist/loader-BzFUiCkF.mjs +1 -0
- package/dist/{loader-B2xPGQfd.mjs → loader-DlB4rhjA.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-Eez8IlhB.mjs → md-manager-BGnqyqi1-Dg5Bl9Rs.mjs} +2 -2
- package/dist/{open-browser-rcp8z_R5.mjs → open-browser-BexG740O.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-B8ghhW3C.mjs → preview-BqDHlB4I.mjs} +1 -1
- package/dist/preview-f4iVephM.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-Dzlz-p9w.js → ActivityModeContent-DZWkzSf1.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-BzvWvVbw.js → AddPropertiesButton-CZ_1FSZ_.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-Badnd0z5.js → AgentDiffPane-Dx88nEFC.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BDxB-fkd.js → AgentThreadClientBinder-BhZ7g12J.js} +1 -1
- package/dist/public/assets/{BugReportHistory-YsKDA8Wg.js → BugReportHistory-CfFMNT0L.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-Cm-lMz2-.js → BugReportHistoryDialog-CImauBFJ.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CvenaDDl.js → CodeMirrorPropInput-33E7_d5L.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-Lw_SJixc.js → ConsentDialogBody-DAiGjncA.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-DuQPEMcv.js → DiffViewBoundary-DYrAptlH.js} +1 -1
- package/dist/public/assets/{DocumentContext-BWfYIGn-.js → DocumentContext-BEpM29CW.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-B8xOZgYr.js → EditorModeToggle-BQbTgwTb.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-7Bq4UalT.js → EnableSyncConfirmDialog-CecCUsv_.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-qHB2EWCE.js → ExcalidrawDocEditor-C9oVP6iE.js} +1 -1
- package/dist/public/assets/FeedbackForm-CJbAPiPo.js +1 -0
- package/dist/public/assets/{GraphPanel-sNH2eMK2.js → GraphPanel-D9q9_WBi.js} +1 -1
- package/dist/public/assets/{ImageAttachments-Dru1UxQV.js → ImageAttachments-VgESElX7.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-DNsoaSWE.js → ImportSkillDialog-CawY20dd.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-Eajj_ona.js → LintConfigEditor-XdVzbUuy.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-xmkjmIcU.js → ManagedArtifactProperties-B4l-pO4C.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BmtGXHjb.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-DbApv8jA.js → MermaidDocEditor-CtxAqoKZ.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-BZXUua7I.js → PropertyDisplayRow-C0l21vkw.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-DU5Zkepy.js → RegisteredAgentIcon-URW6mRal.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-C275Hr72.js → ReportBugDialogBody-BC_SYWmo.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-Ilx23iFu.js → ReportBugMenuTrigger-4CdA9Mp-.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-DQcwju-H.js → SchemaConfigEditor-ByX85bDx.js} +1 -1
- package/dist/public/assets/{SessionsHost-BxTLJA09.js → SessionsHost-nYZICiDW.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CRTA_WKg.js → SettingsDialogBody-VE4R_Wc7.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-CaH1eNpE.js → ShareBranchSwitchDialog-x37WR88-.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-Fig-8wyz.js → ShareReceiveDialog-BOG4bhi-.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BNUxcUmo.js → ShareReceiveMissDialog-BSUpUq9X.js} +1 -1
- package/dist/public/assets/{SkillCostValue-09FxLC0z.js → SkillCostValue-CD-UkSgT.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DxF5MrWn.js → SkillEditBanner-DjIJkNok.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-DIIWYvbn.js → SkillForkDialog-Crpq5lBh.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BSeeI8R-.js → SkillInstallMenu-CbSHcW8R.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-B00Qx11t.js → SkillOriginInline-BFZf2JR9.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CJLv0nyi.js → SkillToolbarControls-Y7AOB-xP.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-CCNjUkub.js → SlidesToolbarControls-CHqriWLu.js} +1 -1
- package/dist/public/assets/{SourceEditor-ByNnsvQe.js → SourceEditor-DC10bZpS.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CzywxJp9.js → TerminalPanel-4st3TySk.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-DPTNBmQ0.js → TerminalWindowApp-DXNm9dTO.js} +1 -1
- package/dist/public/assets/{TextDocEditor-B7AzPtXW.js → TextDocEditor-DiGZLPsh.js} +1 -1
- package/dist/public/assets/{ThreadView-BG9x4d_s.js → ThreadView-uHciD-Kx.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BKQeyrX6.js → TimelineDiffPane-CLs-B1dB.js} +1 -1
- package/dist/public/assets/{agent-diff-store-C92NIPau.js → agent-diff-store-Dg3Bac6C.js} +1 -1
- package/dist/public/assets/{auth-state-cache-CXXOQdcM.js → auth-state-cache-BidOXkoe.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-BK30wBiV.js → bug-report-send-manager-9LfthUn-.js} +1 -1
- package/dist/public/assets/{client-version-B48BbTkz.js → client-version-seuqi8Cv.js} +1 -1
- package/dist/public/assets/{comment-chips-CdrJy7oX.js → comment-chips-C48UmG4n.js} +1 -1
- package/dist/public/assets/{config-provider-DlzcUiYU.js → config-provider-CuTQvb3e.js} +1 -1
- package/dist/public/assets/{dist-CGNkoXKB.js → dist-BhxUJnt3.js} +2 -2
- package/dist/public/assets/{doc-hash-CH3Kq7TA.js → doc-hash-Kdp6yoV7.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-B2S3p7Kh.js → doc-undo-manager-7SQ4l4Nu.js} +1 -1
- package/dist/public/assets/{documents-events-kUbk4KBT.js → documents-events-Do-YHwQc.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-Co9sJppq.js → file-tree-adapter-lIVLoHBG.js} +1 -1
- package/dist/public/assets/{file-tree-utils-D_wP4Dm1.js → file-tree-utils-CFQU54to.js} +1 -1
- package/dist/public/assets/{folder-config-api-BF554VSQ.js → folder-config-api-CqEs8lkj.js} +1 -1
- package/dist/public/assets/i18n-Bv8eiJWs.js +1 -0
- package/dist/public/assets/{index-DMDo5dFr.js → index-DeWGu3Fz.js} +8 -8
- package/dist/public/assets/{launcher-selection-C9GmEvOn.js → launcher-selection-CYk4BvNH.js} +1 -1
- package/dist/public/assets/{lint-config-client-B61iX5QY.js → lint-config-client-DRJy5ylG.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CMXE3hvX.js → markdownlint-rule-browser-B2e579Uf.js} +1 -1
- package/dist/public/assets/{page-list-cache-DoLH1XoG.js → page-list-cache-4W3gy-jT.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CJEI5S0U.js → pending-receive-nav-store-DLAyo8mi.js} +1 -1
- package/dist/public/assets/{progress-C3Z1B6MH.js → progress-XpLQWrMN.js} +1 -1
- package/dist/public/assets/{project-paths-Bzd32aJI.js → project-paths-BTELVsG-.js} +1 -1
- package/dist/public/assets/{prop-types-CFuqY6TP.js → prop-types-De82BC_y.js} +1 -1
- package/dist/public/assets/{receive-store-BJw3I9N7.js → receive-store-7U3uc-LJ.js} +1 -1
- package/dist/public/assets/{selection-context-DJ_FIiJx.js → selection-context-soshQLlg.js} +1 -1
- package/dist/public/assets/{skill-scope-B1qEIboE.js → skill-scope-g1lFJ-Ds.js} +1 -1
- package/dist/public/assets/{skills-api-NyR-fZMK.js → skills-api-CRZyzHPE.js} +1 -1
- package/dist/public/assets/{src-BuzwpJZ-.js → src-dvZih_Vh.js} +1 -1
- package/dist/public/assets/{startup-marks-D0gyAKgY.js → startup-marks-DStB--sY.js} +1 -1
- package/dist/public/assets/{tag-pill-input-D1rYfOx4.js → tag-pill-input-CZmZF-XJ.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Bf41Ns6y.js → target-navigation-intent-BQU5n3Z_.js} +1 -1
- package/dist/public/assets/{telemetry-startup-EsQxKU36.js → telemetry-startup-DwkEBT3y.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-BrLCqbMd.js → terminal-cli-display-Bd0HYJq3.js} +1 -1
- package/dist/public/assets/{terminal-command-events-CloL_dun.js → terminal-command-events-Dl_wyZ8W.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-DBBf7dvq.js → terminal-telemetry-DLqNCiZH.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-CyxGjpoW.js → typing-burst-detector-BwBh8lkh.js} +1 -1
- package/dist/public/assets/{uninstall-BY4ebvpt.js → uninstall-B61_4YZE.js} +1 -1
- package/dist/public/assets/{use-activity-panel-114XoWfq.js → use-activity-panel-Cl6TYK1f.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-sUvEkbPv.js → use-apply-config-color-theme-QpFGIPF6.js} +1 -1
- package/dist/public/assets/{use-collab-url-BMqkaPvt.js → use-collab-url-DW8bwOaN.js} +1 -1
- package/dist/public/assets/{use-conflicts-2jTGKNOt.js → use-conflicts-pcxYwtG3.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-BgQOsQLk.js → use-live-xterm-theme-79su-ECS.js} +1 -1
- package/dist/public/assets/{use-open-skill-DhmFoS02.js → use-open-skill-CC-Cxugv.js} +1 -1
- package/dist/public/assets/{use-settings-route-hU5QNNlM.js → use-settings-route-DMGQfb-V.js} +1 -1
- package/dist/public/assets/{use-skill-origin-FAiHzQpH.js → use-skill-origin-DbUW6s6z.js} +1 -1
- package/dist/public/assets/{use-skills-CI07Z3HF.js → use-skills-DQAWS2uW.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CqCHYTWh.js → use-terminal-enabled-DAAuSBDz.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-BY6jlhQ-.js → use-timeline-entry-diff-D0kEZsvg.js} +1 -1
- package/dist/public/assets/{use-workspace-CfpIXxMZ.js → use-workspace-vRTzA3RL.js} +1 -1
- package/dist/public/index.html +52 -52
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-DQTcgpB8.mjs → registry-probes-C133eEg2.mjs} +1 -1
- package/dist/{repair-launch-json-znn6W04D.mjs → repair-launch-json-Dg1iNDUl.mjs} +1 -1
- package/dist/{repair-mcp-configs-0aSQr0nM.mjs → repair-mcp-configs-CFC8Q6rq.mjs} +1 -1
- package/dist/src-CAD7Jq9J.mjs +1 -0
- package/dist/{src-DRvpu2Pc.mjs → src-CeTbcYYR.mjs} +1 -1
- package/dist/start-Cd7v3ush.mjs +1 -0
- package/dist/{start-DV546gMf.mjs → start-DVCuq0UU.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-BmXRoN_y.mjs +0 -1
- package/dist/init-C-pPC1Zr.mjs +0 -1
- package/dist/loader-By_EKgl-.mjs +0 -1
- package/dist/preview-CHbSwlz5.mjs +0 -1
- package/dist/public/assets/FeedbackForm-Byfm4Jvi.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-yRhiyBSE.js +0 -1
- package/dist/public/assets/i18n-CRmWQMdd.js +0 -1
- package/dist/src-jvL9kWva.mjs +0 -1
- package/dist/start-BDvJdh1m.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_s as e}from"./dist-
|
|
1
|
+
import{_s as e}from"./dist-BhxUJnt3.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(b)||e.startsWith(w)||e.startsWith(T)||e.startsWith(D)||!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 r(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}}var i=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function a(e){return encodeURIComponent(e.replace(i,`�`))}function o(e){return e.split(`/`).map(a).join(`/`)}function s(e,t){let n=`#/${o(e)}`;return t?`${n}#${a(t)}`:n}function c(e,t){return e===t||l(e)===l(t)}function l(e){try{return decodeURIComponent(e)}catch{return e}}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(c(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?`#/${o(n)}/`:`#/`;return t?`${r}#${a(t)}`:r}function v(e,t,n){if(e===`folder`)return _(t);let r=`#/${a(t)}`;return n==null||n===``?r:`${r}?branch=${a(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}${o(e)}`}var w=`#/__skill-file__/`,T=`#/__skills__`;function E(e){return e===T||e.startsWith(`${T}/`)}var D=`#/__skill-preview__/`,O=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function k(e){return e!==void 0&&O.includes(e)}var A=`project`;function j(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??A].map(a).join(`/`)}function M(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!k(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function N(e){let t=j(e);return e.path&&(t+=`/${a(e.path)}`),`${D}${t}`}function P(e){return e.startsWith(D)?M(e.slice(20)):null}var F=`:`;function I(e){let t=e.host===void 0?e.name:`${e.name}${F}${e.host}`;return`${w}${[e.scope,t].map(a).join(`/`)}/${o(e.path)}`}function L(e){if(!e.startsWith(w))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(F),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}export{h as _,v as a,P as b,C as c,I as d,N as f,p as g,c as h,n as i,s as l,f as m,S as n,j as o,y as p,M as r,g as s,r as t,_ as u,m as v,E as x,L as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./config-provider-
|
|
1
|
+
import{g as e}from"./config-provider-CuTQvb3e.js";var t=new WeakMap;function n(n,r){let i=t.get(r);if(i)return i;let a=new e(r);t.set(r,a);let o=r.doc,s=!1,c=()=>{s||(s=!0,n.off(`destroy`,c),o?.off(`destroy`,c),t.get(r)===a&&t.delete(r),a.clear(),a.destroy())};return n.on(`destroy`,c),o?.on(`destroy`,c),a}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./dist-
|
|
1
|
+
import{N as e}from"./dist-BhxUJnt3.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=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ho as e,Jo as t,Ko as n,Vo as r}from"./dist-
|
|
1
|
+
import{Ho as e,Jo as t,Ko as n,Vo as r}from"./dist-BhxUJnt3.js";import{c as i,l as a,u as o}from"./doc-hash-Kdp6yoV7.js";import{c as s}from"./page-list-cache-4W3gy-jT.js";import{c,l,s as u}from"./file-tree-utils-CFQU54to.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(t,i=y){return b.test(t)||n(t)||e(t)||r(t)?t:`${t}${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(e,n){let r=d(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:t(a),modified:i,size:n.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{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{As as e,Zr as t,ri as n}from"./dist-
|
|
1
|
+
import{As as e,Zr as t,ri as n}from"./dist-BhxUJnt3.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-Do-YHwQc.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-BhxUJnt3.js";import{t as e}from"./dist-Cr4-nBVI.js";import{t}from"./messages-DVuZbxPa.js";e.load(`en`,t.messages),e.activate(`en`);
|