@inkeep/open-knowledge 0.46.0-beta.10 → 0.46.0-beta.12
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-Dw1OosxS.mjs → acp-harness-probe-VnxP34v_.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-DwAxGU-d.mjs +2 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +1 -1
- package/dist/{init-QtGl4KD1.mjs → init-D0TXUX5p.mjs} +3 -3
- package/dist/init-DrYMXDjJ.mjs +1 -0
- package/dist/{launch-json-removal-k2oXjWES.mjs → launch-json-removal-DAtoHEY6.mjs} +2 -2
- package/dist/{loader-DrHd4PhB.mjs → loader-CadQEShW.mjs} +2 -2
- package/dist/loader-ShLzaGc5.mjs +1 -0
- package/dist/preview-BT8cNlQr.mjs +1 -0
- package/dist/{preview-CfcbW_QK.mjs → preview-DbJq3uAT.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-HtgBYjia.js → ActivityModeContent-haiW05ke.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-D6WexvKC.js → AgentDiffPane-Bh1ixU2q.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-D5zV3zLs.js → AgentThreadClientBinder-BE7sGGt4.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-D7k6nYTz.js → ChangedOutsideBadge-D5-I4p4Q.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-D3a67OxV.js → CodeMirrorPropInput-GQimTLY6.js} +1 -1
- package/dist/public/assets/{DocumentContext-Dq96ndEv.js → DocumentContext-Nt8qFrNB.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-DXJQXIPr.js → EditorModeToggle-CNorGTYw.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BQimAtP7.js → EnableSyncConfirmDialog-BIggEySP.js} +1 -1
- package/dist/public/assets/FeedbackForm-_6Gd4PMs.js +1 -0
- package/dist/public/assets/{GraphPanel-CJYT0is2.js → GraphPanel-DZVUW5Ne.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-DJgvmkTH.js → ImportSkillDialog-Bl4ioPBo.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CvAMsjDC.js → LintConfigEditor-DZEV5zwj.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-Bx90ThBa.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-TqGRGnta.js → ManagedArtifactProperties-nIyXl9-v.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DQYVOeEP.js → McpConsentDialogBody-BMrE5RK5.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-rkf_fRGO.js → MermaidDocEditor-CjKb_Jr2.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BATM7-PK.js → ReportBugDialogBody-C3Dct-EA.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DpiGCx9O.js → SchemaConfigEditor-IN_XqunA.js} +1 -1
- package/dist/public/assets/SessionsHost-DhZBSeZp.js +2 -0
- package/dist/public/assets/SettingsDialogBody-DNlPbirk.js +7 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-C_0R4lcS.js → ShareBranchSwitchDialog-D54uq5Dv.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-qdU6bUjq.js → ShareReceiveDialog-CoskdBM6.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-C4QNy287.js → ShareReceiveMissDialog-Byg3PSFa.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-ApL6sARL.js → SkillEditBanner-Dtk_Dd6-.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-i3LD-f3k.js → SkillOriginInline-Bi8XGbK6.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DuR7ARwE.js → SkillToolbarControls-CoIkoBM_.js} +1 -1
- package/dist/public/assets/{SourceEditor-CWyL5Lsn.js → SourceEditor-CGCicUUJ.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DVlQ2cbr.js → TerminalPanel-C4TfiKjZ.js} +1 -1
- package/dist/public/assets/TerminalWindowApp-JXkAHkGB.js +1 -0
- package/dist/public/assets/{ThreadView-B0JN9TkQ.js → ThreadView-CQEm_4BB.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-DL-d2Uwz.js → TimelineDiffPane-Dop-sc6v.js} +1 -1
- package/dist/public/assets/{agent-diff-store-B-abSjDZ.js → agent-diff-store-DkK2Eep_.js} +1 -1
- package/dist/public/assets/{agent-visibility-BD-9O38J.js → agent-visibility-Bt2OD_n5.js} +1 -1
- package/dist/public/assets/{auth-state-cache-B9vd7_O1.js → auth-state-cache-BZtTZN-l.js} +1 -1
- package/dist/public/assets/{client-version-F5a_M0rX.js → client-version-9mDVHFsH.js} +1 -1
- package/dist/public/assets/{comment-chips-DI_rZ-fg.js → comment-chips-CH45eb9L.js} +1 -1
- package/dist/public/assets/{config-provider-BUeoB4AI.js → config-provider-CqysOmJk.js} +1 -1
- package/dist/public/assets/{dist-DQSbO6J62.js → dist-B4smVaZm2.js} +1 -1
- package/dist/public/assets/{doc-paths-CEaNFSTs.js → doc-paths-DPN-3rhq.js} +1 -1
- package/dist/public/assets/{documents-events-DMt9DOPW.js → documents-events-DYwaAqwG.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-DPUPDuGE.js → file-tree-adapter-B3YYQMKE.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BMyhNOyq.js → file-tree-utils-BYKXMiDK.js} +1 -1
- package/dist/public/assets/{folder-config-api-CSe0Ql0L.js → folder-config-api-CDok_aFN.js} +1 -1
- package/dist/public/assets/{globals-IzHn2MUy.js → globals-DpFuWoOb.js} +1 -1
- package/dist/public/assets/globals-GzZHGkrT.css +1 -0
- package/dist/public/assets/index-B2G5w2Ny.js +2092 -0
- package/dist/public/assets/{lint-config-client-BtYAWA-X.js → lint-config-client-CqIt6_m6.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-iZL7BndI.js → markdownlint-rule-browser-B9Uf4v2H.js} +1 -1
- package/dist/public/assets/{navigation-targets-CYqrimLh.js → navigation-targets-CvdOYknS.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-cx8hF-go.js → open-managed-artifact-tab-BRW0Boal.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-JMFKvzrv.js → pending-receive-nav-store-C5kqBBL2.js} +1 -1
- package/dist/public/assets/{prop-types-Cl7vzfmz.js → prop-types-CwT5q2dg.js} +1 -1
- package/dist/public/assets/{receive-store-CZTqE5Bx.js → receive-store-9n3T9AKo.js} +1 -1
- package/dist/public/assets/{selection-context-Dk9EjGY3.js → selection-context-BzNmyob6.js} +1 -1
- package/dist/public/assets/{skill-actions-WuvJCkkr.js → skill-actions-0OKwgX4u.js} +1 -1
- package/dist/public/assets/{skill-scope-D3-jP-jI.js → skill-scope-QSVdjA7g.js} +1 -1
- package/dist/public/assets/{skills-api-B9Swlaxl.js → skills-api-DPk4ScTz.js} +1 -1
- package/dist/public/assets/{src-CsSuxCJh.js → src-DpknqGuW.js} +1 -1
- package/dist/public/assets/tag-pill-input-Bi-VYc9q.js +1 -0
- package/dist/public/assets/{target-navigation-intent-DW36Cs4s.js → target-navigation-intent-Bo9uuBEh.js} +1 -1
- package/dist/public/assets/terminal-launch-events-CCUJ6bvs.js +1 -0
- package/dist/public/assets/{terminal-telemetry-BqHzdcAU.js → terminal-telemetry-46cHbbgd.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-D_r8P4fI.js → typing-burst-detector-DOrGxqXx.js} +1 -1
- package/dist/public/assets/{uninstall-BRB5VmFR.js → uninstall-C2Z7mcqE.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DWuMYXp2.js → use-activity-panel-rmI55qFK.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-D6zovLUj.js → use-apply-config-color-theme-BeVjXtPt.js} +1 -1
- package/dist/public/assets/{use-collab-url-XUGxhlM6.js → use-collab-url-DNKvlkVI.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-C_JKNC3I.js → use-live-xterm-theme-zW4nzNGd.js} +1 -1
- package/dist/public/assets/{use-open-skill-DKhFyvkw.js → use-open-skill-Bnf8ypRq.js} +1 -1
- package/dist/public/assets/use-settings-route-Dw-Hb0ex.js +1 -0
- package/dist/public/assets/{use-skill-directory-naXpjeNF.js → use-skill-directory-BYcp_T_8.js} +1 -1
- package/dist/public/assets/{use-skills-3uy_Bs_j.js → use-skills-luzjx-1h.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DXXDgjml.js → use-terminal-enabled-BmqysEmJ.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-Dl-Ow2sC.js → use-timeline-entry-diff-DlXP-XHj.js} +1 -1
- package/dist/public/assets/{use-workspace-CQjViNYY.js → use-workspace-Bi_k2cyZ.js} +1 -1
- package/dist/public/index.html +43 -43
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-BFS1U77h.mjs → repair-launch-json-Dv0Y6nzf.mjs} +2 -2
- package/dist/{repair-mcp-configs-BahxFXCL.mjs → repair-mcp-configs-C_HtUcPY.mjs} +2 -2
- package/dist/{src-CKpWu-qf.mjs → src-oe0Qnziv.mjs} +2 -2
- package/dist/start-CahJc9kD.mjs +1 -0
- package/dist/{start-D1LCiW0B.mjs → start-DvhSXrkn.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-B3YNgCUV.mjs +0 -2
- package/dist/init-Dx4aGOtU.mjs +0 -1
- package/dist/loader-nAmNI_xH.mjs +0 -1
- package/dist/preview-DLbv9aq6.mjs +0 -1
- package/dist/public/assets/FeedbackForm-D5xbeh9z.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Bg7ypoGS.js +0 -1
- package/dist/public/assets/SettingsDialogBody-WDJKgBV7.js +0 -7
- package/dist/public/assets/TerminalSessionsHost-BBOtjJqF.js +0 -2
- package/dist/public/assets/TerminalWindowApp-DkAz7Oym.js +0 -1
- package/dist/public/assets/globals-C6R3KMxA.css +0 -1
- package/dist/public/assets/index-CAoNSUiV.js +0 -2092
- package/dist/public/assets/tag-pill-input-BSP-XnAr.js +0 -1
- package/dist/public/assets/terminal-launch-events-BtPbKYBK.js +0 -1
- package/dist/public/assets/use-settings-route-DPO7GKF1.js +0 -1
- package/dist/start-ZJGD3HiN.mjs +0 -1
- /package/dist/public/assets/{share-metadata-rows-aPZCgxxk.js → share-metadata-rows-D1HTNYwn.js} +0 -0
- /package/dist/public/assets/{thread-client-KM4rZX_M.js → thread-client-DpMjiK2J.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-t1CtDp8W.js → thread-draft-staging-CygDRDTa.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_o as e,po as t}from"./dist-
|
|
1
|
+
import{_o as e,po as t}from"./dist-B4smVaZm2.js";import{d as n,f as r,p as i}from"./doc-paths-DPN-3rhq.js";import{t as a}from"./file-tree-rename-validation-CkkVvtpx.js";import{c as o,l as s,s as c}from"./file-tree-utils-BYKXMiDK.js";import{a as l}from"./navigation-targets-CvdOYknS.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:i(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:n(e.assetPath)}:{target:l(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:r(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(e,n=_){return v.test(e)||t(e)?e:`${e}${n}`}function b(e){return Y(e).replace(v,``)}function x(e,t){let n=Y(e),r=t.find(e=>o(e)&&S(e)===n);if(r)return r.docName;let i=b(n);return t.find(e=>{let t=S(e);return t!==n&&v.test(t)&&b(t)===i})&&v.test(n)?n:i}function S(e){return s(e)?T(e.path):c(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){let t=new Set,n=[];for(let r of e){let e=S(r);t.has(e)||(t.add(e),n.push(e))}return n}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=(s(r)||c(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(s(r)){let e=T(r.path);e&&n.add(e)}let i=s(r)?e.length:e.length-1;for(let t=1;t<=i;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 r=C(e);if(r)return r;let i=n.find(e=>o(e)&&e.docName===t);return i?i.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),a=t.filter(e=>{if(!c(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 P(e,t,n){if(C(e))return null;let r=n.find(e=>c(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(t,n){let r=a(t).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:b(t),docExt:r,modified:i,size:n.size};let o=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:t,assetExt:o,mediaKind:e(o),modified:i,size:n.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{dr as e,ja as t}from"./dist-
|
|
1
|
+
import{dr as e,ja as t}from"./dist-B4smVaZm2.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(t,n){return!n&&e(t)}function f(t,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1,showOkFolders:a=!1}=n;return t.filter(t=>{let n=t.docName??t.path??``;if(n===``||u(t.kind,i))return!1;let o=n.split(`/`),s=o.indexOf(`.ok`);if(s!==-1){if(!a)return!1;let t=o.slice(0,s).join(`/`);return r||t===``||!e(t)}return!d(n,r)})}function p(e,n={}){let{showHiddenFiles:r=!1,showOnlyMarkdownFiles:i=!1}=n,a=e.docName??e.path??``;return a===``||t(a)||l(a)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:d(a,r),onlyMarkdownFiles:u(e.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-BiRV80uZ.js";import{t}from"./parse-api-error-CqQte8A1.js";import{s as n}from"./documents-events-
|
|
1
|
+
import{t as e}from"./createLucideIcon-BiRV80uZ.js";import{t}from"./parse-api-error-CqQte8A1.js";import{s as n}from"./documents-events-DYwaAqwG.js";var r=e(`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(e){try{let t=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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(e,t){try{let r=`?folder=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,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 n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(e){try{let t=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(e){try{let t=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{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};
|