@silurus/ooxml 0.28.0 → 0.29.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.
@@ -0,0 +1 @@
1
+ function e(e,t,n,r,i,a){for(let o of t){let t=0,s=0;for(let c of o)switch(c.cmd){case`moveTo`:e.moveTo(n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`lineTo`:e.lineTo(n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`cubicBezTo`:e.bezierCurveTo(n+c.x1*i,r+c.y1*a,n+c.x2*i,r+c.y2*a,n+c.x*i,r+c.y*a),t=c.x,s=c.y;break;case`arcTo`:{let o=c.wr*i,l=c.hr*a;if(o<=0||l<=0)break;let u=c.stAng*Math.PI/180,d=c.swAng*Math.PI/180,f=n+t*i,p=r+s*a,m=f-o*Math.cos(u),h=p-l*Math.sin(u),g=u+d;e.ellipse(m,h,o,l,0,u,g,d<0),t=(m+o*Math.cos(g)-n)/i,s=(h+l*Math.sin(g)-r)/a;break}case`close`:e.closePath();break}}}var t={pct5:[0,16,0,0,0,1,0,0],pct10:[136,0,34,0,136,0,34,0],pct20:[136,34,136,34,136,34,136,34],pct25:[136,85,34,85,136,85,34,85],pct30:[170,85,170,85,170,85,170,85],pct40:[170,119,170,221,170,119,170,221],pct50:[170,85,170,85,170,85,170,85],pct60:[221,85,119,85,221,85,119,85],pct70:[238,85,187,85,238,85,187,85],pct75:[238,170,187,170,238,170,187,170],pct80:[254,239,251,191,254,239,251,191],pct90:[255,239,255,251,255,239,255,251],horz:[255,0,0,0,255,0,0,0],vert:[136,136,136,136,136,136,136,136],ltHorz:[0,255,0,0,0,0,0,0],ltVert:[32,32,32,32,32,32,32,32],dkHorz:[255,255,0,0,255,255,0,0],dkVert:[204,204,204,204,204,204,204,204],narHorz:[255,0,255,0,255,0,255,0],narVert:[170,170,170,170,170,170,170,170],cross:[255,136,136,136,255,136,136,136],lgGrid:[255,128,128,128,128,128,128,128],smGrid:[255,136,136,136,255,136,136,136],dotGrid:[136,0,0,0,136,0,0,0],dnDiag:[128,64,32,16,8,4,2,1],upDiag:[1,2,4,8,16,32,64,128],ltDnDiag:[136,68,34,17,136,68,34,17],ltUpDiag:[17,34,68,136,17,34,68,136],dkDnDiag:[195,129,0,129,195,129,0,129],dkUpDiag:[195,129,0,129,195,129,0,129],wdDnDiag:[128,64,32,16,8,4,2,129],wdUpDiag:[1,2,4,8,16,32,64,129],diagCross:[129,66,36,24,24,36,66,129],horzBrick:[255,16,16,16,255,1,1,1],diagBrick:[129,66,36,24,36,66,129,0],lgCheck:[240,240,240,240,15,15,15,15],smCheck:[204,204,51,51,204,204,51,51],trellis:[165,90,165,90,165,90,165,90]};function n(e,n,a){let o=t[e];if(!o)return null;let s=r(8,8);if(!s)return null;let c=s.getContext(`2d`);if(!c)return null;c.fillStyle=i(a),c.fillRect(0,0,8,8),c.fillStyle=i(n);for(let e=0;e<8;e++){let t=o[e];for(let n=0;n<8;n++)t&1<<7-n&&c.fillRect(n,e,1,1)}return s}function r(e,t){if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(e,t);if(typeof document<`u`){let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}return null}function i(e){return`rgba(${parseInt(e.slice(0,2),16)},${parseInt(e.slice(2,4),16)},${parseInt(e.slice(4,6),16)},${e.length>=8?parseInt(e.slice(6,8),16)/255:1})`}function a(e,t=1){return`rgba(${parseInt(e.slice(0,2),16)},${parseInt(e.slice(2,4),16)},${parseInt(e.slice(4,6),16)},${e.length>=8?parseInt(e.slice(6,8),16)/255:t})`}function o(e,t,n,r,i,o){if(!e||e.fillType===`none`)return null;if(e.fillType===`solid`)return a(e.color);if(e.fillType===`pattern`)return c(e,t);if(e.fillType===`gradient`){let s=e.stops;if(s.length===0)return null;if(s.length===1)return a(s[0].color);let c;if(e.gradType===`radial`){let e=n+i/2,a=r+o/2,s=Math.sqrt(i*i+o*o)/2;c=t.createRadialGradient(e,a,0,e,a,s)}else{let a=e.angle*Math.PI/180,s=n+i/2,l=r+o/2,u=(Math.abs(Math.cos(a))*i+Math.abs(Math.sin(a))*o)/2;c=t.createLinearGradient(s-Math.cos(a)*u,l-Math.sin(a)*u,s+Math.cos(a)*u,l+Math.sin(a)*u)}for(let e of s)c.addColorStop(Math.min(1,Math.max(0,e.position)),a(e.color));return c}return null}var s=new WeakMap;function c(e,t){let r=`${e.preset}|${e.fg}|${e.bg}`,i=s.get(t);i||(i=new Map,s.set(t,i));let o=i.get(r);if(o)return o;let c=n(e.preset,e.fg,e.bg);if(!c)return a(e.fg);let l=t.createPattern(c,`repeat`);return l?(i.set(r,l),l):a(e.fg)}var l={dash:[6,3],dot:[1.5,3],dashDot:[6,3,1.5,3],lgDash:[10,4],lgDashDot:[10,4,1.5,4],lgDashDotDot:[10,4,1.5,4,1.5,4],sysDash:[4,2],sysDot:[1,2],sysDashDot:[4,2,1,2]};function u(e,t,n){if(!t){e.strokeStyle=`transparent`,e.lineWidth=0,e.setLineDash([]);return}e.strokeStyle=a(t.color);let r=Math.max(.5,t.width*n);e.lineWidth=r;let i=t.dashStyle?l[t.dashStyle]:null;e.setLineDash(i?i.map(e=>e*r):[])}function d(e,t,n,r,i,a,o,s=-Math.PI/2){let c=a*2;for(let l=0;l<c;l++){let c=s+l*Math.PI/a,u=l%2==0?1:o,d=t+r*u*Math.cos(c),f=n+i*u*Math.sin(c);l===0?e.moveTo(d,f):e.lineTo(d,f)}e.closePath()}function f(e,t,n,r,i,a,o=-Math.PI/2){for(let s=0;s<a;s++){let c=o+s*2*Math.PI/a,l=t+r*Math.cos(c),u=n+i*Math.sin(c);s===0?e.moveTo(l,u):e.lineTo(l,u)}e.closePath()}function p(e,t,n,r,i,a,o){let s=e=>Math.atan2(r*Math.sin(e),i*Math.cos(e)),c=s(a),l=s(a+o),u=t-r*Math.cos(c),d=n-i*Math.sin(c);return e.ellipse(u,d,Math.abs(r),Math.abs(i),0,c,l,o<0),{x:u+r*Math.cos(l),y:d+i*Math.sin(l)}}function m(e,t,n,r,i,a,o=null,s=null,c=null,l=null){let u=n+i/2,m=r+a/2;switch(t){case`ellipse`:case`oval`:e.ellipse(u,m,i/2,a/2,0,0,Math.PI*2);break;case`rtriangle`:e.moveTo(n,r+a),e.lineTo(n+i,r+a),e.lineTo(n,r),e.closePath();break;case`triangle`:{let t=n+(o??5e4)/1e5*i;e.moveTo(t,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`diamond`:e.moveTo(u,r),e.lineTo(n+i,m),e.lineTo(u,r+a),e.lineTo(n,m),e.closePath();break;case`parallelogram`:{let t=i*Math.min(.5,(o??25e3)/1e5);e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`trapezoid`:{let t=Math.min(i,a),s=Math.min(i/2,(o??25e3)/1e5*t);e.moveTo(n+s,r),e.lineTo(n+i-s,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`roundrect`:case`roundrectangle`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.roundRect(n,r,i,a,t);break}case`pentagon`:f(e,u,m,i/2,a/2,5);break;case`hexagon`:f(e,u,m,i/2,a/2,6,0);break;case`heptagon`:f(e,u,m,i/2,a/2,7);break;case`octagon`:f(e,u,m,i/2,a/2,8,-Math.PI/8);break;case`decagon`:f(e,u,m,i/2,a/2,10);break;case`dodecagon`:f(e,u,m,i/2,a/2,12);break;case`star4`:d(e,u,m,i/2,a/2,4,(o??12500)/5e4);break;case`star5`:case`star`:d(e,u,m,i/2,a/2,5,(o??19098)/5e4);break;case`star6`:d(e,u,m,i/2,a/2,6,(o??28868)/5e4,0);break;case`star7`:d(e,u,m,i/2,a/2,7,(o??34142)/5e4);break;case`star8`:d(e,u,m,i/2,a/2,8,(o??37500)/5e4,-Math.PI/2);break;case`star10`:d(e,u,m,i/2,a/2,10,(o??41421)/5e4);break;case`star12`:d(e,u,m,i/2,a/2,12,(o??37500)/5e4,0);break;case`star16`:d(e,u,m,i/2,a/2,16,(o??37500)/5e4,-Math.PI/2);break;case`star24`:d(e,u,m,i/2,a/2,24,(o??37500)/5e4,0);break;case`star32`:d(e,u,m,i/2,a/2,32,(o??37500)/5e4,-Math.PI/2);break;case`rightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??5e4)/1e5),l=r+(a-t)/2;e.moveTo(n,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,m),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n,l+t),e.closePath();break}case`leftarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??5e4)/1e5),l=r+(a-t)/2;e.moveTo(n+i,l),e.lineTo(n+c,l),e.lineTo(n+c,r),e.lineTo(n,m),e.lineTo(n+c,r+a),e.lineTo(n+c,l+t),e.lineTo(n+i,l+t),e.closePath();break}case`uparrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(1,(s??5e4)/1e5),l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a),e.lineTo(l,r+a),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`downarrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(1,(s??5e4)/1e5),l=n+(i-t)/2;e.moveTo(u,r+a),e.lineTo(n+i,r+a-c),e.lineTo(l+t,r+a-c),e.lineTo(l+t,r),e.lineTo(l,r),e.lineTo(l,r+a-c),e.lineTo(n,r+a-c),e.closePath();break}case`leftrightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(.5,(s??25e3)/1e5),l=r+(a-t)/2;e.moveTo(n,m),e.lineTo(n+c,r),e.lineTo(n+c,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,m),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n+c,l+t),e.lineTo(n+c,r+a),e.closePath();break}case`updownarrow`:{let t=i*Math.min(1,(o??5e4)/1e5),c=a*Math.min(.5,(s??25e3)/1e5),l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a-c),e.lineTo(n+i,r+a-c),e.lineTo(u,r+a),e.lineTo(n,r+a-c),e.lineTo(l,r+a-c),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`notchedrightarrow`:{let t=a*Math.min(1,(o??5e4)/1e5),c=i*Math.min(1,(s??35e3)/1e5),l=r+(a-t)/2,u=c*.43;e.moveTo(n,l),e.lineTo(n+i-c,l),e.lineTo(n+i-c,r),e.lineTo(n+i,m),e.lineTo(n+i-c,r+a),e.lineTo(n+i-c,l+t),e.lineTo(n,l+t),e.lineTo(n+u,m),e.closePath();break}case`chevron`:{let t=i*Math.min(1,Math.max(0,(o??5e4)/1e5));e.moveTo(n,r),e.lineTo(n+t,r),e.lineTo(n+i,m),e.lineTo(n+t,r+a),e.lineTo(n,r+a),t>0&&e.lineTo(n+t,m),e.closePath();break}case`homeplate`:{let t=a*.4;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(u,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`leftbracket`:{let t=Math.min(a*Math.min(5e4,Math.max(0,o??8333))/1e5,a/2);e.moveTo(n+i,r),e.quadraticCurveTo(n,r,n,r+t),a-2*t>.5&&e.lineTo(n,r+a-t),e.quadraticCurveTo(n,r+a,n+i,r+a);break}case`rightbracket`:{let t=Math.min(a*Math.min(5e4,Math.max(0,o??8333))/1e5,a/2);e.moveTo(n,r),e.quadraticCurveTo(n+i,r,n+i,r+t),a-2*t>.5&&e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n,r+a);break}case`leftbrace`:{let t=m,o=i*.45;e.moveTo(n+i,r),e.bezierCurveTo(n+i-o,r,n+i-o,t-a*.08,n,t),e.bezierCurveTo(n+i-o,t+a*.08,n+i-o,r+a,n+i,r+a);break}case`rightbrace`:{let t=m,o=i*.45;e.moveTo(n,r),e.bezierCurveTo(n+o,r,n+o,t-a*.08,n+i,t),e.bezierCurveTo(n+o,t+a*.08,n+o,r+a,n,r+a);break}case`callout1`:case`callout2`:case`callout3`:case`bordercallout1`:case`bordercallout2`:case`bordercallout3`:case`accentcallout1`:case`accentcallout2`:case`accentcallout3`:case`accentbordercallout1`:case`accentbordercallout2`:case`accentbordercallout3`:{let u=(o===null?44150:o)/1e5,d=(s===null?98050:s)/1e5,f=(c===null?5e4:c)/1e5,p=(l===null?115e3:l)/1e5,m=n+Math.max(0,Math.min(1,u))*i,h=r+Math.max(0,Math.min(1,d))*a,g=n+f*i,_=r+p*a;if(e.rect(n,r,i,a),t.startsWith(`accent`)){let t=n+i*.08;e.moveTo(t,r),e.lineTo(t,r+a)}e.moveTo(m,h),e.lineTo(g,_);break}case`wedgerectcallout`:{e.rect(n,r,i,a*.8);let t=n+i*.2,o=r+a;e.moveTo(n+i*.1,r+a*.8),e.lineTo(t,o),e.lineTo(n+i*.3,r+a*.8),e.closePath();break}case`wedgeellipsecallout`:{let t=(o??-2e4)/1e5*i,n=(s??12e4)/1e5*a,r=u+t,c=m+n;e.ellipse(u,m,i/2,a/2,0,0,Math.PI*2);let l=Math.atan2(n,t),d=Math.PI/10,f=i/2,p=a/2,h=u+f*Math.cos(l-d),g=m+p*Math.sin(l-d),_=u+f*Math.cos(l+d),v=m+p*Math.sin(l+d);e.moveTo(h,g),e.lineTo(r,c),e.lineTo(_,v),e.closePath();break}case`cloudcallout`:{let t=Math.min(i,a)*.22,n=[[u-i*.25,r+a*.35],[u-i*.1,r+a*.15],[u+i*.1,r+a*.1],[u+i*.28,r+a*.2],[u+i*.35,r+a*.4]];e.moveTo(n[0][0]-t,n[0][1]);for(let[r,i]of n)e.arc(r,i,t,Math.PI,0);e.arc(u,r+a*.65,i*.45,0,Math.PI),e.closePath();let c=u+(o??-2e4)/1e5*i,l=m+(s??12e4)/1e5*a;e.moveTo(u+i*.05,r+a*.8),e.arc(c,l,Math.min(i,a)*.07,0,Math.PI*2);break}case`line`:case`straightconnector1`:case`bentconnector2`:case`bentconnector3`:case`bentconnector4`:case`bentconnector5`:case`curvedconnector2`:case`curvedconnector3`:case`curvedconnector4`:case`curvedconnector5`:e.moveTo(n,r),e.lineTo(n+i,r+a);break;case`heart`:e.moveTo(u,r+a*.32),e.bezierCurveTo(u,r,n+i*.05,r,n,r+a*.3),e.bezierCurveTo(n,r+a*.68,u-i*.05,r+a*.78,u,r+a),e.bezierCurveTo(u+i*.05,r+a*.78,n+i,r+a*.68,n+i,r+a*.3),e.bezierCurveTo(n+i-i*.05,r,u,r,u,r+a*.32);break;case`donut`:{let t=i/2,n=a/2,r=Math.min(t,n)*(o??25e3)/1e5,s=t-r,c=n-r;e.ellipse(u,m,t,n,0,0,Math.PI*2,!1),e.moveTo(u+s,m),e.ellipse(u,m,s,c,0,0,Math.PI*2,!0);break}case`nosmoking`:case`nosmokingsign`:{let t=(o??18750)/1e5,n=i/2,r=a/2,s=n*(1-2*t),c=r*(1-2*t);e.ellipse(u,m,n,r,0,0,Math.PI*2,!1),e.moveTo(u+s,m),e.ellipse(u,m,s,c,0,0,Math.PI*2,!0),e.moveTo(u+s,m),e.ellipse(u,m,s,c,0,0,Math.PI/2,!1),e.lineTo(u-s,m),e.ellipse(u,m,s,c,0,Math.PI,3*Math.PI/2,!1),e.closePath();break}case`pie`:case`pieWedge`:{let t=(o??0)/216e5*Math.PI*2,n=(s??162e5)/216e5*Math.PI*2;e.moveTo(u,m),e.arc(u,m,Math.min(i,a)/2,t,n),e.closePath();break}case`cloud`:{let t=a*.28;e.arc(n+i*.25,r+a*.55,t,Math.PI,Math.PI*1.8),e.arc(n+i*.45,r+a*.35,t*1.1,Math.PI*1.3,Math.PI*1.9),e.arc(n+i*.65,r+a*.4,t,Math.PI*1.5,Math.PI*2),e.arc(n+i*.8,r+a*.6,t*.9,Math.PI*1.6,Math.PI*.1),e.arc(n+i*.55,r+a*.75,t,0,Math.PI*.7),e.arc(n+i*.25,r+a*.7,t*.9,0,Math.PI),e.closePath();break}case`funnel`:e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(u+i*.15,r+a),e.lineTo(u-i*.15,r+a),e.closePath();break;case`smileyface`:{e.ellipse(u,m,i/2,a/2,0,0,Math.PI*2),e.closePath();let t=i*.05,n=a*.05,r=m-a*.12;e.moveTo(u-i*.2+t,r),e.ellipse(u-i*.2,r,t,n,0,0,Math.PI*2),e.moveTo(u+i*.2+t,r),e.ellipse(u+i*.2,r,t,n,0,0,Math.PI*2),e.moveTo(u-i*.25,m+a*.05),e.quadraticCurveTo(u,m+a*.3,u+i*.25,m+a*.05);break}case`document`:case`foldedcorner`:{let t=Math.min(i,a)*.15;e.moveTo(n,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath(),e.moveTo(n+i-t,r),e.lineTo(n+i-t,r+t),e.lineTo(n+i,r+t);break}case`snip1rect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`snip2samerect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n+t,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`snip2diagrect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a-t),e.lineTo(n+i-t,r+a),e.lineTo(n+t,r+a),e.lineTo(n,r+a-t),e.lineTo(n,r+t),e.closePath();break}case`snipRoundRect`:case`sniproundrect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`round1rect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`round2samerect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.quadraticCurveTo(n+i,r,n+i,r+t),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`round2diagrect`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n+i-t,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`plaque`:{let t=Math.min(i,a)*.25;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.quadraticCurveTo(n+i,r,n+i,r+t),e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n+i-t,r+a),e.lineTo(n+t,r+a),e.quadraticCurveTo(n,r+a,n,r+a-t),e.lineTo(n,r+t),e.quadraticCurveTo(n,r,n+t,r),e.closePath();break}case`can`:{let t=a*.1;e.ellipse(u,r+t,i/2,t,0,0,Math.PI*2),e.moveTo(n,r+t),e.lineTo(n,r+a-t),e.ellipse(u,r+a-t,i/2,t,0,Math.PI,2*Math.PI),e.lineTo(n+i,r+t);break}case`cube`:{let t=Math.min(i,a)*.2;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.lineTo(n,r+t),e.closePath(),e.moveTo(n+t,r),e.lineTo(n+t,r+t),e.lineTo(n+i-t,r+t),e.moveTo(n+t,r+t),e.lineTo(n,r+t);break}case`bevel`:{let t=Math.min(i,a)*.1;e.rect(n,r,i,a),e.moveTo(n,r),e.lineTo(n+t,r+t),e.lineTo(n+i-t,r+t),e.lineTo(n+i,r),e.moveTo(n+i-t,r+t),e.lineTo(n+i-t,r+a-t),e.lineTo(n+i,r+a),e.moveTo(n+i-t,r+a-t),e.lineTo(n+t,r+a-t),e.lineTo(n,r+a),e.moveTo(n+t,r+a-t),e.lineTo(n+t,r+t);break}case`halfframe`:{let t=Math.min(i,a)*.25;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+t),e.lineTo(n+t,r+t),e.lineTo(n+t,r+a),e.lineTo(n,r+a),e.closePath();break}case`corner`:{let t=Math.min(i,a)*.25;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+t),e.lineTo(n+t,r+t),e.lineTo(n+t,r+a),e.lineTo(n,r+a),e.closePath();break}case`irregularSeal1`:case`irregularseal1`:[[10800,5800],[14522,0],[14155,5325],[18380,4457],[16702,7315],[21097,8137],[17607,10475],[21600,13290],[16837,12942],[18145,18095],[14020,14457],[13247,19737],[10532,14935],[8485,21600],[7715,15627],[4762,17617],[5667,13937],[135,14587],[3722,11775],[0,8615],[4627,7617],[370,2295],[7312,6320],[8352,2295]].forEach(([t,o],s)=>{let c=n+i*t/21600,l=r+a*o/21600;s===0?e.moveTo(c,l):e.lineTo(c,l)}),e.closePath();break;case`irregularSeal2`:case`irregularseal2`:[[11462,4342],[14790,0],[14525,5777],[18007,3172],[16380,6532],[21600,6645],[16985,9402],[18270,11290],[16380,12310],[18877,15632],[14640,14350],[14942,17370],[12180,15935],[11612,18842],[9872,17370],[8700,19712],[7527,18125],[4917,21600],[4805,18240],[1285,17825],[3330,15370],[0,12877],[3935,11592],[1172,8270],[5372,7817],[4502,3625],[8550,6382],[9722,1887]].forEach(([t,o],s)=>{let c=n+i*t/21600,l=r+a*o/21600;s===0?e.moveTo(c,l):e.lineTo(c,l)}),e.closePath();break;case`flowchartalternateprocess`:case`flowchartprocess`:{let t=Math.min(i,a)*Math.min(5e4,Math.max(0,o??16667))/1e5;e.roundRect(n,r,i,a,[{x:t,y:t}]);break}case`flowchartdecision`:e.moveTo(u,r),e.lineTo(n+i,m),e.lineTo(u,r+a),e.lineTo(n,m),e.closePath();break;case`flowchartterminator`:{let t=Math.min(i,a)/2;e.roundRect(n,r,i,a,[{x:t,y:t}]);break}case`flowchartdocument`:{let t=a*.1;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath();break}case`flowchartpredefinedprocess`:{let t=i*.1;e.rect(n,r,i,a),e.moveTo(n+t,r),e.lineTo(n+t,r+a),e.moveTo(n+i-t,r),e.lineTo(n+i-t,r+a);break}case`flowchartsort`:e.moveTo(u,r),e.lineTo(n+i,m),e.lineTo(u,r+a),e.lineTo(n,m),e.closePath(),e.moveTo(n,m),e.lineTo(n+i,m);break;case`flowchartmanualinput`:{let t=a*.2;e.moveTo(n,r+t),e.lineTo(n+i,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`moon`:e.arc(u,m,Math.min(i,a)/2,-Math.PI/2,Math.PI/2),e.arc(u-i*.2,m,Math.min(i,a)/2,Math.PI/2,-Math.PI/2,!0),e.closePath();break;case`arc`:{let t=216e5,n=(o??162e5)/t*Math.PI*2,r=(s??54e5)/t*Math.PI*2;e.ellipse(u,m,i/2,a/2,0,n,n+r,r<0);break}case`mathequal`:{let t=Math.min(36745,Math.max(0,o??23520)),n=1e5-2*t,r=Math.min(n,Math.max(0,s??11760)),c=a*t/1e5,l=a*r/2e5,d=i*73490/2e5,f=u-d,p=u+d,h=m-l,g=m+l,_=h-c,v=g+c;e.rect(f,_,p-f,h-_),e.rect(f,g,p-f,v-g);break}case`mathmultiply`:{let t=Math.min(i,a)*Math.min(51965,Math.max(0,o??23520))/1e5,s=Math.atan2(a,i),c=Math.sin(s),l=Math.cos(s),u=t/2*c,d=t/2*l;e.moveTo(n+u,r-d),e.lineTo(n-u,r+d),e.lineTo(n+i-u,r+a+d),e.lineTo(n+i+u,r+a-d),e.closePath(),e.moveTo(n+i-u,r-d),e.lineTo(n+i+u,r+d),e.lineTo(n+u,r+a+d),e.lineTo(n-u,r+a-d),e.closePath();break}case`mathplus`:{let t=Math.min(73490,Math.max(0,o??23520)),n=i*73490/2e5,r=a*73490/2e5,s=Math.min(i,a)*t/2e5,c=u-n,l=u+n,d=m-r,f=m+r,p=u-s,h=u+s,g=m-s,_=m+s;e.moveTo(c,g),e.lineTo(p,g),e.lineTo(p,d),e.lineTo(h,d),e.lineTo(h,g),e.lineTo(l,g),e.lineTo(l,_),e.lineTo(h,_),e.lineTo(h,f),e.lineTo(p,f),e.lineTo(p,_),e.lineTo(c,_),e.closePath();break}case`mathminus`:{let t=Math.min(1e5,Math.max(0,o??23520)),n=i*73490/2e5,r=a*t/2e5,s=u-n,c=u+n,l=m-r,d=m+r;e.rect(s,l,c-s,d-l);break}case`mathdivide`:{let t=Math.min(36745,Math.max(1e3,o??23520)),n=(73490+-t)/4,l=36745*i/a,d=Math.min(Math.min(n,l),Math.max(1e3,c??11760)),f=73490+4*d-t,p=Math.min(f,Math.max(0,s??5880)),h=a*t/2e5,g=a*p/1e5,_=a*d/1e5,v=i*73490/2e5,y=m-h,b=m+h,x=y-(g+_)-_,S=r+a-x,C=u-v,w=u+v;e.rect(C,y,w-C,b-y),e.moveTo(u+_,x+_),e.arc(u,x+_,_,0,Math.PI*2),e.moveTo(u+_,S-_),e.arc(u,S-_,_,0,Math.PI*2);break}case`quadarrow`:{let t=i*(o??23e3)/1e5,c=i*(s??3e4)/1e5,l=n+(i-t)/2,d=r+(a-t)/2;e.moveTo(u,r),e.lineTo(n+i-c,r+c),e.lineTo(n+i-c,d),e.lineTo(l+t,d),e.lineTo(l+t,r+c),e.lineTo(n+c,r+c),e.lineTo(n+i,m),e.lineTo(n+i-c,r+a-c),e.lineTo(l+t,r+a-c),e.lineTo(l+t,d+t),e.lineTo(n+i-c,d+t),e.lineTo(n+i-c,r+a-c),e.lineTo(u,r+a),e.lineTo(n+c,r+a-c),e.lineTo(n+c,d+t),e.lineTo(l,d+t),e.lineTo(l,r+a-c),e.lineTo(n,m),e.lineTo(n+c,r+c),e.lineTo(l,r+c),e.lineTo(l,d),e.lineTo(n+c,d),e.closePath();break}case`quadarrowcallout`:{let t=Math.min(i,a),d=Math.min(5e4,Math.max(0,s??18515)),f=d*2,p=Math.min(f,Math.max(0,o??18515)),h=5e4-d,g=Math.min(h,Math.max(0,c??18515)),_=1e5-2*g,v=Math.min(_,Math.max(p,l??48123)),y=t*d/1e5,b=t*p/2e5,x=t*g/1e5,S=i*v/2e5,C=a*v/2e5,w=u-S,T=u+S,E=u-y,D=u+y,O=u-b,k=u+b,A=n+i-x,j=m-C,M=m+C,N=m-y,P=m+y,F=m-b,I=m+b,L=r+a-x;e.moveTo(n,m),e.lineTo(n+x,N),e.lineTo(n+x,F),e.lineTo(w,F),e.lineTo(w,j),e.lineTo(O,j),e.lineTo(O,r+x),e.lineTo(E,r+x),e.lineTo(u,r),e.lineTo(D,r+x),e.lineTo(k,r+x),e.lineTo(k,j),e.lineTo(T,j),e.lineTo(T,F),e.lineTo(A,F),e.lineTo(A,N),e.lineTo(n+i,m),e.lineTo(A,P),e.lineTo(A,I),e.lineTo(T,I),e.lineTo(T,M),e.lineTo(k,M),e.lineTo(k,L),e.lineTo(D,L),e.lineTo(u,r+a),e.lineTo(E,L),e.lineTo(O,L),e.lineTo(O,M),e.lineTo(w,M),e.lineTo(w,I),e.lineTo(n+x,I),e.lineTo(n+x,P),e.closePath();break}case`wave`:{let t=a*(o??12500)/1e5,s=r+t,c=r+a-t;e.moveTo(n,s),e.bezierCurveTo(n+i*.25,r,n+i*.25,r+t*2,n+i*.5,s),e.bezierCurveTo(n+i*.75,r+t*2,n+i*.75,r,n+i,s),e.lineTo(n+i,c),e.bezierCurveTo(n+i*.75,r+a,n+i*.75,r+a-t*2,n+i*.5,c),e.bezierCurveTo(n+i*.25,r+a-t*2,n+i*.25,r+a,n,c),e.closePath();break}case`doublewave`:{let t=a*(o??6250)/1e5,s=r+t,c=r+a-t;e.moveTo(n,s),e.bezierCurveTo(n+i*.25,r,n+i*.25,r+t*2,n+i*.5,s),e.bezierCurveTo(n+i*.75,r+t*2,n+i*.75,r,n+i,s),e.lineTo(n+i,c),e.bezierCurveTo(n+i*.75,r+a,n+i*.75,r+a-t*2,n+i*.5,c),e.bezierCurveTo(n+i*.25,r+a-t*2,n+i*.25,r+a,n,c),e.closePath();break}case`sun`:{let t=Math.min(i,a)/2,n=t*((o??25e3)/1e5+.5),r=Math.min(n,t*.9),s=Math.PI/16;for(let n=0;n<8;n++){let i=n/8*Math.PI*2;e.moveTo(u+r*Math.cos(i-s),m+r*Math.sin(i-s)),e.lineTo(u+t*Math.cos(i),m+t*Math.sin(i)),e.lineTo(u+r*Math.cos(i+s),m+r*Math.sin(i+s)),e.closePath()}e.moveTo(u+r,m),e.arc(u,m,r,0,Math.PI*2);break}case`lightningbolt`:e.moveTo(u+i*.1,r),e.lineTo(n,m-a*.05),e.lineTo(u+i*.05,m-a*.05),e.lineTo(u-i*.1,r+a),e.lineTo(n+i,m+a*.05),e.lineTo(u-i*.05,m+a*.05),e.closePath();break;case`frame`:{let t=Math.min(i,a)*(o??12500)/1e5;e.rect(n,r,i,a),e.rect(n+t,r+t,i-2*t,a-2*t);break}case`bracketpair`:{let t=a*Math.min(5e4,Math.max(0,o??8333))/1e5;e.moveTo(n+i*.4,r),e.quadraticCurveTo(n,r,n,r+t),a-2*t>0&&e.lineTo(n,r+a-t),e.quadraticCurveTo(n,r+a,n+i*.4,r+a),e.moveTo(n+i*.6,r),e.quadraticCurveTo(n+i,r,n+i,r+t),a-2*t>0&&e.lineTo(n+i,r+a-t),e.quadraticCurveTo(n+i,r+a,n+i*.6,r+a);break}case`bracepair`:{let t=i*.2;e.moveTo(n+i*.4,r),e.bezierCurveTo(n+i*.4-t,r,n+i*.4-t,m-a*.08,n,m),e.bezierCurveTo(n+i*.4-t,m+a*.08,n+i*.4-t,r+a,n+i*.4,r+a),e.moveTo(n+i*.6,r),e.bezierCurveTo(n+i*.6+t,r,n+i*.6+t,m-a*.08,n+i,m),e.bezierCurveTo(n+i*.6+t,m+a*.08,n+i*.6+t,r+a,n+i*.6,r+a);break}case`chord`:{let t=(o??27e5)/216e5*Math.PI*2,n=(s??162e5)/216e5*Math.PI*2;e.ellipse(u,m,i/2,a/2,0,t,n),e.closePath();break}case`blockarc`:{let t=Math.min(i,a)/2,n=o??108e5,r=s??0,l=t*(1-(c??25e3)/1e5),d=n/216e5*Math.PI*2,f=r/216e5*Math.PI*2;e.arc(u,m,t,d,f,!1),e.arc(u,m,l,f,d,!0),e.closePath();break}case`teardrop`:{let t=Math.min(i,a)*.4,o=n+t,s=r+a-t;e.arc(o,s,t,0,Math.PI*2*.75),e.bezierCurveTo(o-t*.1,s-t,n+i-t,r+t,n+i,r),e.bezierCurveTo(n+i-t*.2,r+t*.5,o+t,s-t*1.1,o+t,s),e.closePath();break}case`diagstripe`:{let t=a*(o??5e4)/1e5*i/a;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`wedgeroundrectcallout`:{let t=Math.min(i,a)*.1;e.roundRect(n,r,i,a*.85,t),e.moveTo(n+i*.1,r+a*.85),e.lineTo(n+i*.2,r+a),e.lineTo(n+i*.3,r+a*.85),e.closePath();break}case`rightarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??5e4)/1e5,l=r+(a-t)/2;e.rect(n,l,c,t),e.moveTo(n+c,r),e.lineTo(n+i,m),e.lineTo(n+c,r+a),e.closePath();break}case`leftarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??5e4)/1e5,l=r+(a-t)/2;e.rect(n+i-c,l,c,t),e.moveTo(n+i-c,r),e.lineTo(n,m),e.lineTo(n+i-c,r+a),e.closePath();break}case`uparrowcallout`:{let t=i*(o??5e4)/1e5,c=a*(s??5e4)/1e5,l=n+(i-t)/2;e.rect(l,r+c,t,a-c),e.moveTo(n,r+c),e.lineTo(u,r),e.lineTo(n+i,r+c),e.closePath();break}case`downarrowcallout`:{let t=i*(o??5e4)/1e5,c=a*(s??5e4)/1e5,l=n+(i-t)/2;e.rect(l,r,t,a-c),e.moveTo(n,r+a-c),e.lineTo(u,r+a),e.lineTo(n+i,r+a-c),e.closePath();break}case`leftrightarrowcallout`:{let t=a*(o??5e4)/1e5,c=i*(s??25e3)/1e5,l=r+(a-t)/2;e.rect(n+c,l,i-2*c,t),e.moveTo(n+c,r),e.lineTo(n,m),e.lineTo(n+c,r+a),e.closePath(),e.moveTo(n+i-c,r),e.lineTo(n+i,m),e.lineTo(n+i-c,r+a),e.closePath();break}case`leftrightuparrow`:{let t=i*(o??25e3)/1e5,c=a*(s??3e4)/1e5,l=n+(i-t)/2;e.moveTo(u,r),e.lineTo(n+i,r+c),e.lineTo(l+t,r+c),e.lineTo(l+t,r+a),e.lineTo(l,r+a),e.lineTo(l,r+c),e.lineTo(n,r+c),e.closePath();break}case`leftuparrow`:{let t=Math.min(i,a),l=Math.min(5e4,Math.max(0,s??25e3)),u=l*2,d=Math.min(u,Math.max(0,o??25e3)),f=1e5-u,p=t*Math.min(f,Math.max(0,c??25e3))/1e5,m=t*l/5e4,h=i-m,g=a-m,_=t*l/1e5,v=i-_,y=a-_,b=t*d/2e5,x=v-b,S=v+b,C=y-b,w=y+b;e.moveTo(n,r+y),e.lineTo(n+p,r+g),e.lineTo(n+p,r+C),e.lineTo(n+x,r+C),e.lineTo(n+x,r+p),e.lineTo(n+h,r+p),e.lineTo(n+v,r),e.lineTo(n+i,r+p),e.lineTo(n+S,r+p),e.lineTo(n+S,r+w),e.lineTo(n+p,r+w),e.lineTo(n+p,r+a),e.closePath();break}case`uturnarrow`:{let t=i*(o??25e3)/1e5,s=(i-t)/2,c=Math.max(0,s-t),l=n+t+s,u=r+t+s,d=t*2,f=r+a-t*2.5;e.moveTo(n,r+a),e.lineTo(n,u),e.arc(l,u,s,Math.PI,0),e.lineTo(n+i,f),e.lineTo(n+i+(d-t)/2,f),e.lineTo(l+t/2,r+a),e.lineTo(n+i-(d-t)/2-t,f),e.lineTo(n+i-t,f),e.lineTo(n+i-t,u),e.arc(l,u,c,0,Math.PI,!0),e.lineTo(n+t,r+a),e.closePath();break}case`bentarrow`:case`bentuparrow`:{let t=Math.min(i,a)*.25;e.moveTo(n,m-t/2),e.lineTo(n+i-t*2,m-t/2),e.lineTo(n+i-t*2,r+t),e.lineTo(n+i,m),e.lineTo(n+i-t*2,r+a-t),e.lineTo(n+i-t*2,m+t/2),e.lineTo(n,m+t/2),e.closePath();break}case`plus`:{let t=Math.min(i,a)*(o??25e3)/1e5;e.rect(u-t,r,2*t,a),e.rect(n,m-t,i,2*t);break}case`mathnotequal`:{let t=Math.min(5e4,Math.max(0,o??23520)),n=Math.min(66e5,Math.max(42e5,s??66e5)),l=Math.min(1e5-2*t,Math.max(0,c??11760)),d=a*t/1e5,f=a*l/2e5,p=i*73490/2e5,h=a/2,g=(n/6e4-90)*Math.PI/180,_=h*Math.tan(g),v=Math.hypot(_,h)*d/h;e.rect(u-p,m-f-d,2*p,d),e.rect(u-p,m+f,2*p,d),e.moveTo(u+_-v/2,r),e.lineTo(u+_+v/2,r),e.lineTo(u-_+v/2,r+a),e.lineTo(u-_-v/2,r+a),e.closePath();break}case`flowchartconnector`:e.ellipse(u,m,i/2,a/2,0,0,Math.PI*2);break;case`flowchartdelay`:{let t=a/2;e.moveTo(n,r),e.lineTo(n+i-t,r),e.arc(n+i-t,m,t,-Math.PI/2,Math.PI/2),e.lineTo(n,r+a),e.closePath();break}case`flowchartdisplay`:{let t=i*.2,o=i*.15;e.moveTo(n+t,r),e.lineTo(n+i-o,r),e.arc(n+i-o,m,a/2,-Math.PI/2,Math.PI/2),e.lineTo(n+t,r+a),e.lineTo(n,m),e.closePath();break}case`flowchartinputoutput`:case`flowchartpunchedcard`:{let t=i*.2;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i-t,r+a),e.lineTo(n,r+a),e.closePath();break}case`flowchartmerge`:e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(u,r+a),e.closePath();break;case`flowchartextract`:e.moveTo(u,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break;case`flowchartoffpageconnector`:{let t=a*.3;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.lineTo(u,r+a),e.lineTo(n,r+a-t),e.closePath();break}case`flowchartonlinestorage`:case`flowchartmanuallabel`:case`flowchartpuncheddisk`:e.rect(n,r,i,a);break;case`horizontalscroll`:{let t=Math.min(i,a)*.15;e.roundRect(n+t,r,i-t,a,t),e.moveTo(n+t,r+t*2),e.arc(n+t,r+t,t,Math.PI/2,Math.PI*2.5);break}case`verticalscroll`:{let t=Math.min(i,a)*.15;e.roundRect(n,r+t,i,a-t,t),e.moveTo(n+t*2,r+t),e.arc(n+t,r+t,t,0,Math.PI*2);break}case`ribbon`:{let t=Math.min(33333,Math.max(0,o??16667)),c=i*Math.min(75e3,Math.max(25e3,s??5e4))/2e5,l=i/8,u=i/32,d=i/2-c,f=i/2+c,p=d+u,m=f-u,h=d+l,g=f-l,_=h-u,v=g+u,y=i-l,b=a*t/2e5,x=a*t/1e5,S=a-x,C=S/2;e.moveTo(n,r),e.lineTo(n+_,r),e.lineTo(n+p,r+b),e.lineTo(n+m,r+x),e.lineTo(n+v,r+b),e.lineTo(n+i,r),e.lineTo(n+y,r+C),e.lineTo(n+i,r+S),e.lineTo(n+f,r+S),e.lineTo(n+f,r+a),e.lineTo(n+p,r+a),e.lineTo(n+d,r+S),e.lineTo(n,r+S),e.lineTo(n+l,r+C),e.closePath();break}case`ribbon2`:{let t=Math.min(33333,Math.max(0,o??16667)),c=i*Math.min(75e3,Math.max(25e3,s??5e4))/2e5,l=i/8,u=i/32,d=i/2-c,f=i/2+c,p=d+u,m=f-u,h=d+l,g=f-l,_=h-u,v=g+u,y=i-l,b=a*t/2e5,x=a*t/1e5,S=a-b,C=a-x,w=x,T=(w+a)/2;e.moveTo(n,r+a),e.lineTo(n+_,r+a),e.lineTo(n+p,r+S),e.lineTo(n+m,r+C),e.lineTo(n+v,r+S),e.lineTo(n+i,r+a),e.lineTo(n+y,r+T),e.lineTo(n+i,r+w),e.lineTo(n+f,r+w),e.lineTo(n+f,r),e.lineTo(n+p,r),e.lineTo(n+d,r+w),e.lineTo(n,r+w),e.lineTo(n+l,r+T),e.closePath();break}case`ellipseribbon`:{let t=Math.min(1e5,Math.max(0,o??25e3)),l=Math.min(75e3,Math.max(25e3,s??5e4)),u=Math.max(0,t-(1e5-t)/2),d=Math.min(t,Math.max(u,c??12500)),f=i/8,p=i*l/2e5,m=i/2-p,h=m+f,g=i-h,_=i-m,v=i-f,y=a*d/1e5,b=4*y/i,x=b*(h-h*h/i),S=h/2,C=b*S,w=i-S,T=a*t/1e5,E=T-y,D=b*(m-m*m/i),O=D+E,k=y+E-O+y+E,A=a-T,j=(y*14/16+A)/2,M=D+A,N=O+A,P=m/2,F=b*P+A,I=i-P,L=k+A;e.moveTo(n,r),e.quadraticCurveTo(n+S,r+C,n+h,r+x),e.lineTo(n+m,r+O),e.quadraticCurveTo(n+i/2,r+k,n+_,r+O),e.lineTo(n+g,r+x),e.quadraticCurveTo(n+w,r+C,n+i,r),e.lineTo(n+v,r+j),e.lineTo(n+i,r+A),e.quadraticCurveTo(n+I,r+F,n+_,r+M),e.lineTo(n+_,r+N),e.quadraticCurveTo(n+i/2,r+L,n+m,r+N),e.lineTo(n+m,r+M),e.quadraticCurveTo(n+P,r+F,n,r+A),e.lineTo(n+f,r+j),e.closePath();break}case`ellipseribbon2`:{let t=Math.min(1e5,Math.max(0,o??25e3)),l=Math.min(75e3,Math.max(25e3,s??5e4)),u=Math.max(0,t-(1e5-t)/2),d=Math.min(t,Math.max(u,c??12500)),f=i/8,p=i*l/2e5,m=i/2-p,h=m+f,g=i-h,_=i-m,v=i-f,y=a*d/1e5,b=4*y/i,x=a-b*(h-h*h/i),S=h/2,C=a-b*S,w=i-S,T=a*t/1e5,E=T-y,D=b*(m-m*m/i),O=D+E,k=a-O,A=y+E-O+y+E,j=a-A,M=a-T,N=a-(y*14/16+M)/2,P=a-(D+M),F=a-(O+M),I=m/2,L=a-(b*I+M),R=i-I,z=a-(A+M);e.moveTo(n,r+a),e.quadraticCurveTo(n+S,r+C,n+h,r+x),e.lineTo(n+m,r+k),e.quadraticCurveTo(n+i/2,r+j,n+_,r+k),e.lineTo(n+g,r+x),e.quadraticCurveTo(n+w,r+C,n+i,r+a),e.lineTo(n+v,r+N),e.lineTo(n+i,r+T),e.quadraticCurveTo(n+R,r+L,n+_,r+P),e.lineTo(n+_,r+F),e.quadraticCurveTo(n+i/2,r+z,n+m,r+F),e.lineTo(n+m,r+P),e.quadraticCurveTo(n+I,r+L,n,r+T),e.lineTo(n+f,r+N),e.closePath();break}case`circulararrow`:{let t=(s??0)/6e4*Math.PI/180,n=(o??162e5)/6e4*Math.PI/180,r=(c??5e4)/1e5,l=Math.min(i,a)/2,d=l*(1-r),f=(l+d)/2,p=l-d,h=t+n;e.arc(u,m,l,t,h,!1),e.arc(u,m,d,h,t,!0),e.closePath();let g=Math.sin(h),_=-Math.cos(h),v=p*1.5,y=u+f*Math.cos(h)+v*g,b=m+f*Math.sin(h)+v*_;e.moveTo(y,b),e.lineTo(u+l*Math.cos(h),m+l*Math.sin(h)),e.lineTo(u+d*Math.cos(h),m+d*Math.sin(h)),e.closePath();break}case`curvedrightarrow`:{let t=Math.min(i,a),l=a/2,u=5e4*a/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(d,Math.max(0,o??25e3))/1e5,m=t*d/1e5,h=l-(f+m)/4,g=(2*h)**2-f**2,_=1e5*(Math.sqrt(Math.max(0,g))*i/(2*h))/t,v=t*Math.min(_,Math.max(0,c??25e3))/1e5,y=Math.sqrt(Math.max(0,i*i-v*v))*h/i,b=h+f,x=h+y,S=b+y,C=(m-f)/2,w=x-C,T=S+C,E=a-m/2,D=i-v,O=Math.atan2(v,y),k=-O,A=Math.PI-O;e.moveTo(n,r+h),p(e,n,r+h,i,h,Math.PI,k),e.lineTo(n+D,r+w),e.lineTo(n+i,r+E),e.lineTo(n+D,r+T),e.lineTo(n+D,r+S),p(e,n+D,r+S,i,h,A,O),e.closePath();break}case`curvedleftarrow`:{let t=Math.min(i,a),l=a/2,u=5e4*a/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(d,Math.max(0,o??25e3))/1e5,m=t*d/1e5,h=l-(f+m)/4,g=(2*h)**2-f**2,_=Math.sqrt(Math.max(0,g))*i/(2*h),v=1e5*_/t,y=t*Math.min(v,Math.max(0,c??25e3))/1e5,b=Math.sqrt(Math.max(0,i*i-y*y))*h/i,x=h+f,S=h+b,C=x+b,w=(m-f)/2,T=S-w,E=C+w,D=a-m/2,O=y,k=Math.atan2(y,b),A=f/2,j=Math.atan2(A,_),M=j-k,N=k-j,P=-j;e.moveTo(n,r+D),e.lineTo(n+O,r+T),e.lineTo(n+O,r+S);let F=p(e,n+O,r+S,i,h,k,M);p(e,F.x,F.y,i,h,P,N),e.lineTo(n+O,r+E),e.closePath();break}case`curveduparrow`:{let t=Math.min(i,a),l=i/2,u=5e4*i/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(1e5,Math.max(0,o??25e3))/1e5,m=t*d/1e5,h=l-(f+m)/4,g=(2*h)**2-f**2,_=Math.sqrt(Math.max(0,g))*a/(2*h),v=1e5*_/t,y=t*Math.min(v,Math.max(0,c??25e3))/1e5,b=Math.sqrt(Math.max(0,a*a-y*y))*h/a,x=h+f,S=h+b,C=x+b,w=(m-f)/2,T=S-w,E=C+w,D=i-m/2,O=y,k=Math.atan2(y,b),A=f/2,j=Math.atan2(A,_),M=j-k,N=k-j,P=Math.PI/2-k,F=Math.PI/2-j;e.moveTo(n+D,r),e.lineTo(n+E,r+O),e.lineTo(n+C,r+O);let I=p(e,n+C,r+O,h,a,P,N);p(e,I.x,I.y,h,a,F,M),e.lineTo(n+T,r+O),e.closePath();break}case`curveddownarrow`:{let t=Math.min(i,a),l=i/2,u=5e4*i/t,d=Math.min(u,Math.max(0,s??5e4)),f=t*Math.min(1e5,Math.max(0,o??25e3))/1e5,m=t*d/1e5,h=l-(f+m)/4,g=(2*h)**2-f**2,_=Math.sqrt(Math.max(0,g))*a/(2*h),v=1e5*_/t,y=t*Math.min(v,Math.max(0,c??25e3))/1e5,b=Math.sqrt(Math.max(0,a*a-y*y))*h/a,x=h+f,S=h+b,C=x+b,w=(m-f)/2,T=S-w,E=C+w,D=i-m/2,O=a-y,k=Math.atan2(y,b),A=f/2,j=Math.atan2(A,_),M=3*Math.PI/2+k;3*Math.PI/2-j,j-Math.PI/2,Math.PI/2-j,e.moveTo(n+D,r+a),e.lineTo(n+T,r+O),e.lineTo(n+S,r+O),p(e,n+S,r+O,h,a,M,-k),e.lineTo(n+x,r),p(e,n+x,r,h,a,3*Math.PI/2,k),e.lineTo(n+E,r+O),e.closePath();break}case`stripedrightarrow`:{let t=Math.min(i,a),c=t/32,l=t/16,u=t/8,d=t*(o??5e4)/1e5,f=i*(s??5e4)/1e5,p=m-d/2,h=m+d/2,g=n+i-f;e.rect(n,p,c,d),e.rect(n+l,p,l,d),e.rect(n+u,p,u,d),e.moveTo(g,p),e.lineTo(g,r),e.lineTo(n+i,m),e.lineTo(g,r+a),e.lineTo(g,h),e.lineTo(n+u*2,h),e.lineTo(n+u*2,p),e.closePath();break}case`flowchartpreparation`:{let t=i*.2;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,m),e.lineTo(n+i-t,r+a),e.lineTo(n+t,r+a),e.lineTo(n,m),e.closePath();break}case`flowchartcollate`:e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n+i,r+a),e.closePath();break;case`flowchartmagneticdisk`:{let t=a*.15;e.moveTo(n,r+t),e.ellipse(u,r+t,i/2,t,0,Math.PI,0),e.lineTo(n+i,r+a-t),e.ellipse(u,r+a-t,i/2,t,0,0,Math.PI),e.lineTo(n,r+t),e.closePath(),e.moveTo(n+i,r+t),e.ellipse(u,r+t,i/2,t,0,0,Math.PI);break}case`flowchartinternalstorage`:{e.rect(n,r,i,a);let t=i*.15,o=a*.15;e.moveTo(n+t,r),e.lineTo(n+t,r+a),e.moveTo(n,r+o),e.lineTo(n+i,r+o);break}case`flowchartmagneticdrum`:{let t=i*.15;e.moveTo(n+t,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a),e.lineTo(n+t,r+a),e.ellipse(n+t,m,t,a/2,0,Math.PI/2,-Math.PI/2,!0),e.closePath(),e.moveTo(n+i,r),e.ellipse(n+i,m,t,a/2,0,-Math.PI/2,Math.PI/2);break}case`flowchartsumingjunction`:case`flowchartsummingjunction`:{e.ellipse(u,m,i/2,a/2,0,0,Math.PI*2);let t=Math.min(i,a)/2*.65;e.moveTo(u-t,m-t),e.lineTo(u+t,m+t),e.moveTo(u+t,m-t),e.lineTo(u-t,m+t);break}case`flowchartmagnetictape`:{let t=Math.min(i,a)/2,n=u+t*.5;e.moveTo(u,r+a),e.arc(u,m,t,Math.PI/2,Math.PI/2+Math.PI*2*.875),e.lineTo(n,m+t*.5),e.lineTo(n,r+a),e.closePath();break}case`flowchartpunchedtape`:{let t=a*.12;e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath(),e.moveTo(n,r+t),e.bezierCurveTo(n+i*.25,r,n+i*.75,r+t*2,n+i,r+t);break}case`flowchartmanualoperation`:{let t=i*.15;e.moveTo(n+t,r),e.lineTo(n+i-t,r),e.lineTo(n+i,r+a),e.lineTo(n,r+a),e.closePath();break}case`flowchartmultidocument`:{let t=a*.1,o=i*.04;e.rect(n+o*2,r-a*.08,i-o*2,a*.1),e.rect(n+o,r-a*.04,i-o,a*.06),e.moveTo(n,r),e.lineTo(n+i,r),e.lineTo(n+i,r+a-t),e.bezierCurveTo(n+i*.75,r+a,n+i*.25,r+a-t*2,n,r+a-t),e.closePath();break}case`rttriangle`:e.moveTo(n,r),e.lineTo(n,r+a),e.lineTo(n+i,r+a),e.closePath();break;default:e.rect(n,r,i,a);break}}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});
@@ -29,6 +29,7 @@ declare type BodyElement = {
29
29
  type: 'table';
30
30
  } & DocTable | {
31
31
  type: 'pageBreak';
32
+ parity?: 'odd' | 'even';
32
33
  };
33
34
 
34
35
  declare interface BorderSpec {
@@ -44,6 +45,13 @@ declare interface CellBorders {
44
45
  right: BorderSpec | null;
45
46
  }
46
47
 
48
+ /** ECMA-376 §17.4.7: a table cell may contain paragraphs AND nested tables. */
49
+ declare type CellElement = {
50
+ type: 'paragraph';
51
+ } & DocParagraph | {
52
+ type: 'table';
53
+ } & DocTable;
54
+
47
55
  export declare interface DocParagraph {
48
56
  /**
49
57
  * ECMA-376 §17.18.44 ST_Jc. Renderer honors left, start, center, right, end,
@@ -104,7 +112,7 @@ declare interface DocTable {
104
112
  }
105
113
 
106
114
  declare interface DocTableCell {
107
- content: DocParagraph[];
115
+ content: CellElement[];
108
116
  colSpan: number;
109
117
  vMerge: boolean | null;
110
118
  borders: CellBorders;
@@ -116,6 +124,9 @@ declare interface DocTableCell {
116
124
  declare interface DocTableRow {
117
125
  cells: DocTableCell[];
118
126
  rowHeight: number | null;
127
+ /** ECMA-376 §17.4.80 hRule. "auto" (default) = informational; "atLeast" =
128
+ * lower bound; "exact" = fixed clip. */
129
+ rowHeightRule: 'auto' | 'atLeast' | 'exact' | string;
119
130
  isHeader: boolean;
120
131
  }
121
132
 
@@ -128,6 +139,15 @@ declare interface Document_2 {
128
139
  majorFont?: string;
129
140
  /** Theme `<a:fontScheme><a:minorFont><a:latin@typeface>` (body face). */
130
141
  minorFont?: string;
142
+ /**
143
+ * ECMA-376 §17.8.3.10 — font family classification from `word/fontTable.xml`.
144
+ * Maps font name to `<w:family @w:val>`: "roman" | "swiss" | "modern" |
145
+ * "script" | "decorative" | "auto". The renderer uses this as the primary
146
+ * source for serif/sans-serif decisions (roman→serif, swiss→sans-serif,
147
+ * modern→monospace), falling back to name-pattern matching only when the
148
+ * entry is absent or classified as "auto".
149
+ */
150
+ fontFamilyClasses?: Record<string, string>;
131
151
  }
132
152
  export { Document_2 as Document }
133
153
 
@@ -375,6 +395,12 @@ export declare interface RenderPageOptions {
375
395
  }) => void;
376
396
  }
377
397
 
398
+ declare interface RubyAnnotation {
399
+ text: string;
400
+ /** Annotation font size in pt. Word stores this as half-points in `<w:hps>`. */
401
+ fontSizePt: number;
402
+ }
403
+
378
404
  export declare interface SectionProps {
379
405
  pageWidth: number;
380
406
  pageHeight: number;
@@ -413,17 +439,72 @@ declare interface ShapeRun {
413
439
  anchorYPt: number;
414
440
  anchorXFromMargin: boolean;
415
441
  anchorYFromPara: boolean;
442
+ /** ECMA-376 §20.4.3.1 wp:align horizontal: "left" | "center" | "right" |
443
+ * "inside" | "outside". When set the renderer aligns the shape inside the
444
+ * container indicated by `anchorXFromMargin` and ignores `anchorXPt`. */
445
+ anchorXAlign?: string | null;
446
+ /** Vertical equivalent of anchorXAlign: "top" | "center" | "bottom". */
447
+ anchorYAlign?: string | null;
448
+ /** ECMA-376 §20.4.2.7 wp14:pctPosHOffset / pctPosVOffset normalised to a
449
+ * fraction in `[0, 1]`. When set the renderer multiplies it by the
450
+ * relativeFrom container's width / height and uses that as the
451
+ * shape's offset within the container, ignoring anchorXPt / anchorYPt. */
452
+ pctPosH?: number | null;
453
+ pctPosV?: number | null;
454
+ /** Raw `relativeFrom` value from `<wp:positionH>` / `<wp:positionV>` —
455
+ * e.g. "page", "margin", "topMargin", "rightMargin",
456
+ * "insideMargin", "paragraph", "line". Drives container selection
457
+ * for both pctPos* and anchor*Align positioning. */
458
+ anchorXRelativeFrom?: string | null;
459
+ anchorYRelativeFrom?: string | null;
460
+ /** ECMA-376 §20.4.2.18 wp14:sizeRelH/sizeRelV — width/height as a
461
+ * fraction of the relativeFrom container. When set, the renderer uses
462
+ * this in place of `widthPt` / `heightPt` for layout. `pct == 0` from
463
+ * the source is dropped at parse time (treated as "use extent"). */
464
+ widthPct?: number | null;
465
+ heightPct?: number | null;
466
+ widthRelativeFrom?: string | null;
467
+ heightRelativeFrom?: string | null;
468
+ /** Parent wgp group dimensions (pt) — set only when this shape is a child
469
+ * of a `<wpg:wgp>`. Used by `resolveAnchor*` so align/pctPos resolve the
470
+ * GROUP's origin, then `anchor[XY]Pt` adds the within-group offset. */
471
+ groupWidthPt?: number | null;
472
+ groupHeightPt?: number | null;
416
473
  /** Draw behind text when true (wp:anchor behindDoc="1"). */
417
474
  behindDoc?: boolean;
418
475
  /** Document-order index within a group; lower values render first. */
419
476
  zOrder: number;
420
- /** Normalized [0,1] custom-geometry sub-paths */
477
+ /** Normalized [0,1] custom-geometry sub-paths. Empty when `presetGeometry`
478
+ * is set; the renderer chooses between buildCustomPath and buildShapePath. */
421
479
  subpaths: PathCmd[][];
480
+ /** OOXML <a:prstGeom prst> name (e.g. "rect", "ellipse", "rtTriangle").
481
+ * When set the renderer calls core's buildShapePath with `adjValues`. */
482
+ presetGeometry?: string | null;
483
+ /** Up to four <a:gd name="adj{n}"> values from prstGeom/avLst (0–100000). */
484
+ adjValues?: number[];
422
485
  fill: ShapeFill | null;
423
486
  stroke: string | null;
424
487
  strokeWidth?: number;
425
488
  rotation?: number;
426
489
  wrapMode?: string | null;
490
+ /** Text rendered INSIDE the shape's bounding box (`<wps:txbx><w:txbxContent>`). */
491
+ textBlocks?: ShapeText[];
492
+ /** "t" | "ctr" | "b" — vertical anchor for the shape's text body (`<wps:bodyPr @anchor>`). */
493
+ textAnchor?: string | null;
494
+ textInsetL?: number;
495
+ textInsetT?: number;
496
+ textInsetR?: number;
497
+ textInsetB?: number;
498
+ }
499
+
500
+ declare interface ShapeText {
501
+ text: string;
502
+ fontSizePt: number;
503
+ color?: string | null;
504
+ fontFamily?: string | null;
505
+ bold?: boolean;
506
+ italic?: boolean;
507
+ alignment: string;
427
508
  }
428
509
 
429
510
  declare interface TableBorders {
@@ -460,6 +541,9 @@ export declare interface TextRun {
460
541
  smallCaps?: boolean;
461
542
  doubleStrikethrough?: boolean;
462
543
  highlight?: string | null;
544
+ /** ECMA-376 §17.3.3.25 ruby annotation (furigana). Renders above the
545
+ * base text in a smaller font; line height is expanded to fit it. */
546
+ ruby?: RubyAnnotation;
463
547
  }
464
548
 
465
549
  export { }
@@ -38,6 +38,7 @@ declare type BodyElement = {
38
38
  type: 'table';
39
39
  } & DocTable | {
40
40
  type: 'pageBreak';
41
+ parity?: 'odd' | 'even';
41
42
  };
42
43
 
43
44
  declare interface Border {
@@ -107,6 +108,13 @@ declare interface CellBorders {
107
108
  right: BorderSpec | null;
108
109
  }
109
110
 
111
+ /** ECMA-376 §17.4.7: a table cell may contain paragraphs AND nested tables. */
112
+ declare type CellElement = {
113
+ type: 'paragraph';
114
+ } & DocParagraph | {
115
+ type: 'table';
116
+ } & DocTable;
117
+
110
118
  declare interface CellRange {
111
119
  top: number;
112
120
  left: number;
@@ -599,7 +607,7 @@ declare interface DocTable {
599
607
  }
600
608
 
601
609
  declare interface DocTableCell {
602
- content: DocParagraph[];
610
+ content: CellElement[];
603
611
  colSpan: number;
604
612
  vMerge: boolean | null;
605
613
  borders: CellBorders;
@@ -611,6 +619,9 @@ declare interface DocTableCell {
611
619
  declare interface DocTableRow {
612
620
  cells: DocTableCell[];
613
621
  rowHeight: number | null;
622
+ /** ECMA-376 §17.4.80 hRule. "auto" (default) = informational; "atLeast" =
623
+ * lower bound; "exact" = fixed clip. */
624
+ rowHeightRule: 'auto' | 'atLeast' | 'exact' | string;
614
625
  isHeader: boolean;
615
626
  }
616
627
 
@@ -623,6 +634,15 @@ declare interface Document_2 {
623
634
  majorFont?: string;
624
635
  /** Theme `<a:fontScheme><a:minorFont><a:latin@typeface>` (body face). */
625
636
  minorFont?: string;
637
+ /**
638
+ * ECMA-376 §17.8.3.10 — font family classification from `word/fontTable.xml`.
639
+ * Maps font name to `<w:family @w:val>`: "roman" | "swiss" | "modern" |
640
+ * "script" | "decorative" | "auto". The renderer uses this as the primary
641
+ * source for serif/sans-serif decisions (roman→serif, swiss→sans-serif,
642
+ * modern→monospace), falling back to name-pattern matching only when the
643
+ * entry is absent or classified as "auto".
644
+ */
645
+ fontFamilyClasses?: Record<string, string>;
626
646
  }
627
647
 
628
648
  export declare namespace docx {
@@ -1459,6 +1479,12 @@ declare interface Row {
1459
1479
  cells: Cell[];
1460
1480
  }
1461
1481
 
1482
+ declare interface RubyAnnotation {
1483
+ text: string;
1484
+ /** Annotation font size in pt. Word stores this as half-points in `<w:hps>`. */
1485
+ fontSizePt: number;
1486
+ }
1487
+
1462
1488
  declare interface Run {
1463
1489
  text: string;
1464
1490
  font?: RunFont;
@@ -1644,17 +1670,62 @@ declare interface ShapeRun {
1644
1670
  anchorYPt: number;
1645
1671
  anchorXFromMargin: boolean;
1646
1672
  anchorYFromPara: boolean;
1673
+ /** ECMA-376 §20.4.3.1 wp:align horizontal: "left" | "center" | "right" |
1674
+ * "inside" | "outside". When set the renderer aligns the shape inside the
1675
+ * container indicated by `anchorXFromMargin` and ignores `anchorXPt`. */
1676
+ anchorXAlign?: string | null;
1677
+ /** Vertical equivalent of anchorXAlign: "top" | "center" | "bottom". */
1678
+ anchorYAlign?: string | null;
1679
+ /** ECMA-376 §20.4.2.7 wp14:pctPosHOffset / pctPosVOffset normalised to a
1680
+ * fraction in `[0, 1]`. When set the renderer multiplies it by the
1681
+ * relativeFrom container's width / height and uses that as the
1682
+ * shape's offset within the container, ignoring anchorXPt / anchorYPt. */
1683
+ pctPosH?: number | null;
1684
+ pctPosV?: number | null;
1685
+ /** Raw `relativeFrom` value from `<wp:positionH>` / `<wp:positionV>` —
1686
+ * e.g. "page", "margin", "topMargin", "rightMargin",
1687
+ * "insideMargin", "paragraph", "line". Drives container selection
1688
+ * for both pctPos* and anchor*Align positioning. */
1689
+ anchorXRelativeFrom?: string | null;
1690
+ anchorYRelativeFrom?: string | null;
1691
+ /** ECMA-376 §20.4.2.18 wp14:sizeRelH/sizeRelV — width/height as a
1692
+ * fraction of the relativeFrom container. When set, the renderer uses
1693
+ * this in place of `widthPt` / `heightPt` for layout. `pct == 0` from
1694
+ * the source is dropped at parse time (treated as "use extent"). */
1695
+ widthPct?: number | null;
1696
+ heightPct?: number | null;
1697
+ widthRelativeFrom?: string | null;
1698
+ heightRelativeFrom?: string | null;
1699
+ /** Parent wgp group dimensions (pt) — set only when this shape is a child
1700
+ * of a `<wpg:wgp>`. Used by `resolveAnchor*` so align/pctPos resolve the
1701
+ * GROUP's origin, then `anchor[XY]Pt` adds the within-group offset. */
1702
+ groupWidthPt?: number | null;
1703
+ groupHeightPt?: number | null;
1647
1704
  /** Draw behind text when true (wp:anchor behindDoc="1"). */
1648
1705
  behindDoc?: boolean;
1649
1706
  /** Document-order index within a group; lower values render first. */
1650
1707
  zOrder: number;
1651
- /** Normalized [0,1] custom-geometry sub-paths */
1708
+ /** Normalized [0,1] custom-geometry sub-paths. Empty when `presetGeometry`
1709
+ * is set; the renderer chooses between buildCustomPath and buildShapePath. */
1652
1710
  subpaths: PathCmd_3[][];
1711
+ /** OOXML <a:prstGeom prst> name (e.g. "rect", "ellipse", "rtTriangle").
1712
+ * When set the renderer calls core's buildShapePath with `adjValues`. */
1713
+ presetGeometry?: string | null;
1714
+ /** Up to four <a:gd name="adj{n}"> values from prstGeom/avLst (0–100000). */
1715
+ adjValues?: number[];
1653
1716
  fill: ShapeFill | null;
1654
1717
  stroke: string | null;
1655
1718
  strokeWidth?: number;
1656
1719
  rotation?: number;
1657
1720
  wrapMode?: string | null;
1721
+ /** Text rendered INSIDE the shape's bounding box (`<wps:txbx><w:txbxContent>`). */
1722
+ textBlocks?: ShapeText_2[];
1723
+ /** "t" | "ctr" | "b" — vertical anchor for the shape's text body (`<wps:bodyPr @anchor>`). */
1724
+ textAnchor?: string | null;
1725
+ textInsetL?: number;
1726
+ textInsetT?: number;
1727
+ textInsetR?: number;
1728
+ textInsetB?: number;
1658
1729
  }
1659
1730
 
1660
1731
  declare interface ShapeText {
@@ -1666,6 +1737,16 @@ declare interface ShapeText {
1666
1737
  paragraphs: ShapeParagraph[];
1667
1738
  }
1668
1739
 
1740
+ declare interface ShapeText_2 {
1741
+ text: string;
1742
+ fontSizePt: number;
1743
+ color?: string | null;
1744
+ fontFamily?: string | null;
1745
+ bold?: boolean;
1746
+ italic?: boolean;
1747
+ alignment: string;
1748
+ }
1749
+
1669
1750
  declare interface ShapeTextRun {
1670
1751
  text: string;
1671
1752
  bold: boolean;
@@ -1944,6 +2025,9 @@ declare interface TextRun_2 {
1944
2025
  smallCaps?: boolean;
1945
2026
  doubleStrikethrough?: boolean;
1946
2027
  highlight?: string | null;
2028
+ /** ECMA-376 §17.3.3.25 ruby annotation (furigana). Renders above the
2029
+ * base text in a smaller font; line height is expanded to fit it. */
2030
+ ruby?: RubyAnnotation;
1947
2031
  }
1948
2032
 
1949
2033
  declare type TextRunCallback = (run: TextRunInfo) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silurus/ooxml",
3
- "version": "0.28.0",
3
+ "version": "0.29.1",
4
4
  "description": "Browser-based OOXML viewer (docx/xlsx/pptx) — Rust/WASM parser + Canvas renderer",
5
5
  "license": "MIT",
6
6
  "author": "Yuki Yokotani <yokotani.yuki@gmail.com>",