open-walnut 0.4.1 → 0.4.2
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/README.md +2 -5
- package/dist/cli-fast.js +69 -46
- package/dist/cli.js +704 -274
- package/dist/daemon-binaries/acp-worker.js.version +1 -1
- package/dist/web/server.js +704 -274
- package/dist/web/static/assets/{OfficePreview-C8OMbtiq.js → OfficePreview-CEHO0xkd.js} +2 -2
- package/dist/web/static/assets/{docx-preview-hDgtrOpv.js → docx-preview-CuZwjAMS.js} +1 -1
- package/dist/web/static/assets/{index-CWIydpPr.js → index-0MyC-yGG.js} +1 -1
- package/dist/web/static/assets/{index-BAb6UVet.js → index-BBjg7m-_.js} +1 -1
- package/dist/web/static/assets/{index-D1uUk0AQ.js → index-BFF_G72i.js} +289 -289
- package/dist/web/static/assets/{index-CPHXL-wy.js → index-BRLxNhyy.js} +1 -1
- package/dist/web/static/assets/{index-VcSnwuHG.js → index-Bqg4_WEG.js} +1 -1
- package/dist/web/static/assets/{index-bfZj1PAc.js → index-C2YGUYGS.js} +1 -1
- package/dist/web/static/assets/{index-ph8Hxff-.js → index-D1dpOEzW.js} +1 -1
- package/dist/web/static/assets/{index-nRBC-NJN.js → index-D9qPPm7h.js} +1 -1
- package/dist/web/static/assets/{index-D81YKipC.js → index-DAOPV34I.js} +1 -1
- package/dist/web/static/assets/{index-CBHRNnCk.js → index-DLjK8dGE.js} +1 -1
- package/dist/web/static/assets/{index-KY36bfpA.js → index-DOXm2Aye.js} +1 -1
- package/dist/web/static/assets/{index-EowLf_Xf.js → index-DR-LSqAg.js} +1 -1
- package/dist/web/static/assets/{index-gv-TJwHT.js → index-DXtp_ZWh.js} +1 -1
- package/dist/web/static/assets/index-DeYCGmOR.css +32 -0
- package/dist/web/static/assets/{index-B2-N8jTH.js → index-DrWzb338.js} +1 -1
- package/dist/web/static/assets/{index-Caj09uf7.js → index-DtRwkh8J.js} +1 -1
- package/dist/web/static/assets/{index-C5-vT4kT.js → index-ccs5s80D.js} +1 -1
- package/dist/web/static/assets/{index-DtRt21Zi.js → index-mWEwJcqw.js} +1 -1
- package/dist/web/static/assets/{index-B35fidy6.js → index-unnPilnK.js} +1 -1
- package/dist/web/static/assets/{jszip.min-DyrlNEg4.js → jszip.min-DYFwy4PE.js} +1 -1
- package/dist/web/static/assets/{pptx-preview.es-DjND6y6O.js → pptx-preview.es-eu2nX9JC.js} +1 -1
- package/dist/web/static/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/static/assets/index-Btn4AoIy.css +0 -32
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-
|
|
2
|
-
import{r as u,a as B,f as C,_ as R,p as H,j as c,l as V}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-CuZwjAMS.js","assets/jszip.min-DYFwy4PE.js","assets/index-BFF_G72i.js","assets/index-DeYCGmOR.css","assets/pptx-preview.es-eu2nX9JC.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-BFF_G72i.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-CuZwjAMS.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-eu2nX9JC.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-
|
|
1
|
+
import{o as fe}from"./jszip.min-DYFwy4PE.js";import"./index-BFF_G72i.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>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as g,b as P,x as q,y as l,B as i,s as c,t as r,h as R,E as p}from"./index-
|
|
1
|
+
import{L as g,b as P,x as q,y as l,B as i,s as c,t as r,h as R,E as p}from"./index-BFF_G72i.js";const b=1,$=33,m=34,v=35,x=36,W=new p(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(b)});function n(O,e,a){return new p(t=>{let u=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>u&&t.acceptToken(e)})}const d=n(39,$,!1),C=n(34,m,!1),T=n(39,v,!0),f=n(34,x,!0),A=R.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"⚠ Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[W,d,C,T,f,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),Q=A.configure({props:[c({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),o={parser:V},w={parser:i.parser},U=Q.configure({wrap:l((O,e)=>O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,e)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=q({selfClosingTags:!0});function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?N:null;case"Text":return E}return null}function G(O={}){let e=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof g))throw new RangeError("The base option must be the result of calling html(...)");e=O.base}return new P(e.language==s.language?k:S(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{G as angular,k as angularLanguage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,s as n,t as r,b as o,L as P,i as Q,c as a,d as i,q as c}from"./index-
|
|
1
|
+
import{h as s,s as n,t as r,b as o,L as P,i as Q,c as a,d as i,q as c}from"./index-BFF_G72i.js";const g=n({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),R=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;const e=l(O,t.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function l(t,O){let e;return(e=t.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=t.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}const u=P.define({name:"json",parser:p.configure({props:[Q.add({Object:a({except:/^\s*\}/}),Array:a({except:/^\s*\]/})}),i.add({"Object Array":c})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function m(){return new o(u)}export{m as json,u as jsonLanguage,R as jsonParseLinter};
|