open-walnut 0.5.0 → 0.5.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.
Files changed (38) hide show
  1. package/dist/build-info.json +4 -4
  2. package/dist/cli-fast.js +86 -11
  3. package/dist/cli.js +5435 -4841
  4. package/dist/daemon-binaries/acp-daemon-core.cjs +8 -0
  5. package/dist/daemon-binaries/acp-worker.js.version +1 -1
  6. package/dist/daemon-binaries/dtach-darwin-arm64 +0 -0
  7. package/dist/daemon-binaries/dtach-darwin-x64 +0 -0
  8. package/dist/daemon-binaries/pi-acp.js +69 -69
  9. package/dist/data/skills/walnut/SKILL.md +3 -1
  10. package/dist/data/skills/walnut-session-messaging/SKILL.md +2 -1
  11. package/dist/integrations/mail/index.js +2 -2
  12. package/dist/web/server.js +4498 -3985
  13. package/dist/web/static/assets/{OfficePreview-trkrPgUg.js → OfficePreview-nqaFIIDU.js} +2 -2
  14. package/dist/web/static/assets/{docx-preview-DXuXR6Mm.js → docx-preview-DdtIqTDg.js} +1 -1
  15. package/dist/web/static/assets/{index-CtqOiNs3.js → index-6L4R93nh.js} +368 -363
  16. package/dist/web/static/assets/{index-BCLUpT4d.js → index-6fz2bWC1.js} +1 -1
  17. package/dist/web/static/assets/{index--VxzrqiT.js → index-BG9VR9Vv.js} +1 -1
  18. package/dist/web/static/assets/{index-BycRzqR7.js → index-BK2_zSO2.js} +1 -1
  19. package/dist/web/static/assets/{index-CRyL44ex.js → index-BOPumzo-.js} +1 -1
  20. package/dist/web/static/assets/{index-qA6lI9Z8.js → index-B_qxz22L.js} +1 -1
  21. package/dist/web/static/assets/{index-CWnda_VJ.js → index-BdaE-wVI.js} +1 -1
  22. package/dist/web/static/assets/{index-B3SgAzjA.js → index-BrPomAwK.js} +1 -1
  23. package/dist/web/static/assets/{index-PG3BCRR7.js → index-C5cOO-_d.js} +1 -1
  24. package/dist/web/static/assets/{index-BcOh16aC.js → index-CEHVu7FQ.js} +1 -1
  25. package/dist/web/static/assets/index-CLV-Qzaa.css +32 -0
  26. package/dist/web/static/assets/{index-BqUnbrvU.js → index-CqOrR3-r.js} +1 -1
  27. package/dist/web/static/assets/{index-A4iiilIE.js → index-DOmOQnZ5.js} +1 -1
  28. package/dist/web/static/assets/{index-Dmueypgd.js → index-DPK5Xh5w.js} +1 -1
  29. package/dist/web/static/assets/{index-DbqnfSCN.js → index-Df5lfbl-.js} +1 -1
  30. package/dist/web/static/assets/{index-C0iAAOIU.js → index-DqBhXLnm.js} +1 -1
  31. package/dist/web/static/assets/{index-DU_xugLt.js → index-VeEJA8UK.js} +1 -1
  32. package/dist/web/static/assets/{index-BQ-txaFi.js → index-jZH7Ct8z.js} +1 -1
  33. package/dist/web/static/assets/{index-B5t-NZFs.js → index-z5Y-8yck.js} +1 -1
  34. package/dist/web/static/assets/{jszip.min-Cw001-8g.js → jszip.min-DIXBurLY.js} +1 -1
  35. package/dist/web/static/assets/{pptx-preview.es-C4qHBTXo.js → pptx-preview.es-DWfQguqq.js} +1 -1
  36. package/dist/web/static/index.html +2 -2
  37. package/package.json +1 -1
  38. package/dist/web/static/assets/index-CuCpxOTp.css +0 -32
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-DXuXR6Mm.js","assets/jszip.min-Cw001-8g.js","assets/index-CtqOiNs3.js","assets/index-CuCpxOTp.css","assets/pptx-preview.es-C4qHBTXo.js"])))=>i.map(i=>d[i]);
2
- import{r as u,a as B,f as C,_ as R,p as H,j as c,l as V}from"./index-CtqOiNs3.js";const O=50*1024*1024,z={ALLOWED_TAGS:["table","thead","tbody","tfoot","tr","td","th","span","b","i","u","s","sub","sup","br","a"],ALLOWED_ATTR:["colspan","rowspan","id","href","style","data-t","data-v","data-z"],FORBID_TAGS:["style","form","input","img"]};function F(l){for(const o of l.querySelectorAll("a[href]")){const d=(o.getAttribute("href")??"").replace(/[\s\u0000-\u001f]/g,""),f=d.startsWith("#");if(!f&&!/^(https?:|mailto:)/i.test(d)){o.removeAttribute("href");continue}f||(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}}function U(l,o){try{const r=JSON.parse(l);if(typeof(r==null?void 0:r.error)=="string")return r.error}catch{}return l||`Could not load the file (HTTP ${o}).`}function G({path:l,host:o,kind:r,reloadToken:d=0}){const f=u.useRef(null),[v,_]=u.useState("loading"),[$,T]=u.useState(""),[g,x]=u.useState(null),[E,L]=u.useState(0),D=u.useRef(0),S=u.useRef(null);return u.useEffect(()=>{const w=++D.current,n=()=>D.current===w,A=new AbortController,W=S.current!==null&&S.current!==d;S.current=d,_("loading"),T(""),x(null),L(0);const h=i=>{n()&&(_("error"),T(i),V.warn("office-preview","preview failed",{path:l,host:o,kind:r,error:i}))};return(async()=>{var j,I;let i;try{const e=await fetch(B(l,o),{signal:A.signal,...W?{cache:"no-store"}:{}});if(!e.ok){const s=(await e.text().catch(()=>"")).slice(0,300);h(U(s,e.status));return}const t=Number(e.headers.get("content-length")??0);if(t>O){(j=e.body)==null||j.cancel().catch(()=>{}),h(`This file is ${C(t)} — too large to preview in the browser. Use Download instead.`);return}i=await e.arrayBuffer()}catch(e){if(A.signal.aborted)return;h(e instanceof Error?e.message:String(e));return}if(!n())return;if(i.byteLength>O){h(`This file is ${C(i.byteLength)} — too large to preview in the browser. Use Download instead.`);return}const N=()=>{const e=f.current;if(!e)return null;const t=document.createElement("div");return t.className="fv-office-mount",e.replaceChildren(t),t};try{if(r==="word"){const{renderAsync:e}=await R(async()=>{const{renderAsync:s}=await import("./docx-preview-DXuXR6Mm.js");return{renderAsync:s}},__vite__mapDeps([0,1,2,3]));if(!n())return;const t=N();if(!t||(await e(i,t,void 0,{inWrapper:!0,ignoreLastRenderedPageBreak:!0,renderAltChunks:!1}),!n()))return;F(t)}else if(r==="sheet"){const e=await R(()=>import("./xlsx-BGhuli8m.js"),[]);if(!n())return;const t=e.read(i,{type:"array"}),s=t.SheetNames;if(!s.length){h("This workbook has no sheets.");return}const p=new Map;x({names:s,tableHtml:a=>{var P;const b=p.get(a);if(b!=null)return b;let y;try{const m=t.Sheets[s[a]];if(!m)throw new Error("sheet failed to parse");y=H.sanitize(e.utils.sheet_to_html(m,{header:"",footer:""}),z)}catch(m){const M=m instanceof Error?m.message:String(m);y=`<div class="file-viewer-error">Could not render sheet "${((P=s[a])==null?void 0:P.replace(/[<>&"]/g,""))??a}" (${M.replace(/[<>&"]/g,"")}).</div>`}return p.set(a,y),y}})}else{const{init:e}=await R(async()=>{const{init:b}=await import("./pptx-preview.es-C4qHBTXo.js");return{init:b}},__vite__mapDeps([4,1,2,3]));if(!n()||!f.current)return;const t=f.current.clientWidth,s=Math.max(320,Math.min(1280,t>64?t-32:960)),p=N();if(!p)return;const a=e(p,{width:s,height:Math.round(s*.5625)});if(await a.preview(i),!n()){(I=a.destroy)==null||I.call(a);return}}n()&&_("ready")}catch(e){if(!n())return;const t=e instanceof Error?e.message:String(e);h(`Could not render this document (${t}). It may be corrupt or an unsupported variant — use Download to open it locally.`)}})(),()=>{A.abort()}},[l,o,r,d]),c.jsxs("div",{className:`fv-office-preview fv-office-${r}`,children:[v==="loading"&&c.jsx("div",{className:"file-viewer-loading",children:"Loading preview…"}),v==="error"&&c.jsx("div",{className:"file-viewer-error",children:$}),r==="sheet"&&g&&v==="ready"&&c.jsxs(c.Fragment,{children:[g.names.length>1&&c.jsx("div",{className:"fv-sheet-tabs",role:"tablist",children:g.names.map((w,n)=>c.jsx("button",{type:"button",role:"tab","aria-selected":n===E,className:`fv-sheet-tab${n===E?" active":""}`,onClick:()=>L(n),children:w},w))}),c.jsx("div",{className:"fv-sheet-table",dangerouslySetInnerHTML:{__html:g.tableHtml(E)}})]}),r!=="sheet"&&c.jsx("div",{ref:f,className:"fv-office-body",style:v==="error"?{display:"none"}:void 0})]})}export{G as OfficePreview};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-DdtIqTDg.js","assets/jszip.min-DIXBurLY.js","assets/index-6L4R93nh.js","assets/index-CLV-Qzaa.css","assets/pptx-preview.es-DWfQguqq.js"])))=>i.map(i=>d[i]);
2
+ import{r as u,a as B,f as C,_ as R,p as H,j as c,l as V}from"./index-6L4R93nh.js";const O=50*1024*1024,z={ALLOWED_TAGS:["table","thead","tbody","tfoot","tr","td","th","span","b","i","u","s","sub","sup","br","a"],ALLOWED_ATTR:["colspan","rowspan","id","href","style","data-t","data-v","data-z"],FORBID_TAGS:["style","form","input","img"]};function F(l){for(const o of l.querySelectorAll("a[href]")){const d=(o.getAttribute("href")??"").replace(/[\s\u0000-\u001f]/g,""),f=d.startsWith("#");if(!f&&!/^(https?:|mailto:)/i.test(d)){o.removeAttribute("href");continue}f||(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}}function U(l,o){try{const r=JSON.parse(l);if(typeof(r==null?void 0:r.error)=="string")return r.error}catch{}return l||`Could not load the file (HTTP ${o}).`}function G({path:l,host:o,kind:r,reloadToken:d=0}){const f=u.useRef(null),[v,_]=u.useState("loading"),[$,T]=u.useState(""),[g,x]=u.useState(null),[E,L]=u.useState(0),D=u.useRef(0),S=u.useRef(null);return u.useEffect(()=>{const w=++D.current,n=()=>D.current===w,A=new AbortController,W=S.current!==null&&S.current!==d;S.current=d,_("loading"),T(""),x(null),L(0);const h=i=>{n()&&(_("error"),T(i),V.warn("office-preview","preview failed",{path:l,host:o,kind:r,error:i}))};return(async()=>{var j,I;let i;try{const e=await fetch(B(l,o),{signal:A.signal,...W?{cache:"no-store"}:{}});if(!e.ok){const s=(await e.text().catch(()=>"")).slice(0,300);h(U(s,e.status));return}const t=Number(e.headers.get("content-length")??0);if(t>O){(j=e.body)==null||j.cancel().catch(()=>{}),h(`This file is ${C(t)} — too large to preview in the browser. Use Download instead.`);return}i=await e.arrayBuffer()}catch(e){if(A.signal.aborted)return;h(e instanceof Error?e.message:String(e));return}if(!n())return;if(i.byteLength>O){h(`This file is ${C(i.byteLength)} — too large to preview in the browser. Use Download instead.`);return}const N=()=>{const e=f.current;if(!e)return null;const t=document.createElement("div");return t.className="fv-office-mount",e.replaceChildren(t),t};try{if(r==="word"){const{renderAsync:e}=await R(async()=>{const{renderAsync:s}=await import("./docx-preview-DdtIqTDg.js");return{renderAsync:s}},__vite__mapDeps([0,1,2,3]));if(!n())return;const t=N();if(!t||(await e(i,t,void 0,{inWrapper:!0,ignoreLastRenderedPageBreak:!0,renderAltChunks:!1}),!n()))return;F(t)}else if(r==="sheet"){const e=await R(()=>import("./xlsx-BGhuli8m.js"),[]);if(!n())return;const t=e.read(i,{type:"array"}),s=t.SheetNames;if(!s.length){h("This workbook has no sheets.");return}const p=new Map;x({names:s,tableHtml:a=>{var P;const b=p.get(a);if(b!=null)return b;let y;try{const m=t.Sheets[s[a]];if(!m)throw new Error("sheet failed to parse");y=H.sanitize(e.utils.sheet_to_html(m,{header:"",footer:""}),z)}catch(m){const M=m instanceof Error?m.message:String(m);y=`<div class="file-viewer-error">Could not render sheet "${((P=s[a])==null?void 0:P.replace(/[<>&"]/g,""))??a}" (${M.replace(/[<>&"]/g,"")}).</div>`}return p.set(a,y),y}})}else{const{init:e}=await R(async()=>{const{init:b}=await import("./pptx-preview.es-DWfQguqq.js");return{init:b}},__vite__mapDeps([4,1,2,3]));if(!n()||!f.current)return;const t=f.current.clientWidth,s=Math.max(320,Math.min(1280,t>64?t-32:960)),p=N();if(!p)return;const a=e(p,{width:s,height:Math.round(s*.5625)});if(await a.preview(i),!n()){(I=a.destroy)==null||I.call(a);return}}n()&&_("ready")}catch(e){if(!n())return;const t=e instanceof Error?e.message:String(e);h(`Could not render this document (${t}). It may be corrupt or an unsupported variant — use Download to open it locally.`)}})(),()=>{A.abort()}},[l,o,r,d]),c.jsxs("div",{className:`fv-office-preview fv-office-${r}`,children:[v==="loading"&&c.jsx("div",{className:"file-viewer-loading",children:"Loading preview…"}),v==="error"&&c.jsx("div",{className:"file-viewer-error",children:$}),r==="sheet"&&g&&v==="ready"&&c.jsxs(c.Fragment,{children:[g.names.length>1&&c.jsx("div",{className:"fv-sheet-tabs",role:"tablist",children:g.names.map((w,n)=>c.jsx("button",{type:"button",role:"tab","aria-selected":n===E,className:`fv-sheet-tab${n===E?" active":""}`,onClick:()=>L(n),children:w},w))}),c.jsx("div",{className:"fv-sheet-table",dangerouslySetInnerHTML:{__html:g.tableHtml(E)}})]}),r!=="sheet"&&c.jsx("div",{ref:f,className:"fv-office-body",style:v==="error"?{display:"none"}:void 0})]})}export{G as OfficePreview};
@@ -1,4 +1,4 @@
1
- import{o as fe}from"./jszip.min-Cw001-8g.js";import"./index-CtqOiNs3.js";/*
1
+ import{o as fe}from"./jszip.min-DIXBurLY.js";import"./index-6L4R93nh.js";/*
2
2
  * @license
3
3
  * docx-preview <https://github.com/VolodymyrBaydalka/docxjs>
4
4
  * Released under Apache License 2.0 <https://github.com/VolodymyrBaydalka/docxjs/blob/master/LICENSE>