From 1157c2a553809234ba70541a1706f9bdde0599f8 Mon Sep 17 00:00:00 2001 From: ahmetemrekilinc Date: Thu, 2 Nov 2023 04:53:49 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20obss/rea?= =?UTF-8?q?ct-curved-text@968e08446dbbfbcb52b70f7b1a01412c533e5a74=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index-80aa005a.js => index-54c6032c.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-80aa005a.js => index-54c6032c.js} (97%) diff --git a/assets/index-80aa005a.js b/assets/index-54c6032c.js similarity index 97% rename from assets/index-80aa005a.js rename to assets/index-54c6032c.js index cd6e37d..51c645f 100644 --- a/assets/index-80aa005a.js +++ b/assets/index-54c6032c.js @@ -51,4 +51,4 @@ Error generating stack: `+o.message+` * Licensed under MIT (https://github.com/thednp/svg-path-commander/blob/master/LICENSE) */const io={origin:[0,0,0],round:4},di={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Xf(e){let t=e.pathValue[e.segmentStart],n=t.toLowerCase();const{data:r}=e;for(;r.length>=di[n]&&(n==="m"&&r.length>2?(e.segments.push([t,...r.splice(0,2)]),n="l",t=t==="m"?"l":"L"):e.segments.push([t,...r.splice(0,di[n])]),!!di[n]););}const It="SVGPathCommander error";function X0(e){const{index:t,pathValue:n}=e,r=n.charCodeAt(t);if(r===48){e.param=0,e.index+=1;return}if(r===49){e.param=1,e.index+=1;return}e.err=`${It}: invalid Arc flag "${n[t]}", expecting 0 or 1 at index ${t}`}function Wn(e){return e>=48&&e<=57}const Qn="Invalid path value";function Z0(e){const{max:t,pathValue:n,index:r}=e;let i=r,o=!1,u=!1,s=!1,l=!1,a;if(i>=t){e.err=`${It}: ${Qn} at index ${i}, "pathValue" is missing param`;return}if(a=n.charCodeAt(i),(a===43||a===45)&&(i+=1,a=n.charCodeAt(i)),!Wn(a)&&a!==46){e.err=`${It}: ${Qn} at index ${i}, "${n[i]}" is not a number`;return}if(a!==46){if(o=a===48,i+=1,a=n.charCodeAt(i),o&&i=5760&&t.includes(e)}function pi(e){const{pathValue:t,max:n}=e;for(;e.index=48&&e<=57||e===43||e===45||e===46}function eg(e){return(e|32)===97}function um(e){const{max:t,pathValue:n,index:r}=e,i=n.charCodeAt(r),o=di[n[r].toLowerCase()];if(e.segmentStart=r,!J0(i)){e.err=`${It}: ${Qn} "${n[r]}" is not a path command`;return}if(e.index+=1,pi(e),e.data=[],!o){Xf(e);return}for(;;){for(let u=o;u>0;u-=1){if(eg(i)&&(u===3||u===4)?X0(e):Z0(e),e.err.length)return;e.data.push(e.param),pi(e),e.index=e.max||!b0(n.charCodeAt(e.index)))break}Xf(e)}function wt(e){return e.map(t=>Array.isArray(t)?[...t]:t)}function sm(e){this.segments=[],this.pathValue=e,this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}function Yu(e){return Array.isArray(e)&&e.every(t=>{const n=t[0].toLowerCase();return di[n]===t.length-1&&"achlmqstvz".includes(n)})}function pn(e){if(Yu(e))return wt(e);const t=new sm(e);for(pi(t);t.indext===t.toUpperCase())}function Fr(e){if(cc(e))return wt(e);const t=pn(e);let n=0,r=0,i=0,o=0;return t.map(u=>{const s=u.slice(1).map(Number),[l]=u,a=l.toUpperCase();if(l==="M")return[n,r]=s,i=n,o=r,["M",n,r];let c=[];if(l!==a)switch(a){case"A":c=[a,s[0],s[1],s[2],s[3],s[4],s[5]+n,s[6]+r];break;case"V":c=[a,s[0]+r];break;case"H":c=[a,s[0]+n];break;default:{const p=s.map((g,v)=>g+(v%2?r:n));c=[a,...p]}}else c=[a,...s];const f=c.length;switch(a){case"Z":n=i,r=o;break;case"H":[,n]=c;break;case"V":[,r]=c;break;default:n=c[f-2],r=c[f-1],a==="M"&&(i=n,o=r)}return c})}function lm(e){return Yu(e)&&e.slice(1).every(([t])=>t===t.toLowerCase())}function fc(e){if(lm(e))return wt(e);const t=pn(e);let n=0,r=0,i=0,o=0;return t.map(u=>{const s=u.slice(1).map(Number),[l]=u,a=l.toLowerCase();if(l==="M")return[n,r]=s,i=n,o=r,["M",n,r];let c=[];if(l!==a)switch(a){case"a":c=[a,s[0],s[1],s[2],s[3],s[4],s[5]-n,s[6]-r];break;case"v":c=[a,s[0]-r];break;case"h":c=[a,s[0]-n];break;default:{const p=s.map((g,v)=>g-(v%2?r:n));c=[a,...p]}}else l==="m"&&(i=s[0]+n,o=s[1]+r),c=[a,...s];const f=c.length;switch(a){case"z":n=i,r=o;break;case"h":n+=c[1];break;case"v":r+=c[1];break;default:n+=c[f-2],r+=c[f-1]}return c})}function Ll(e,t,n){if(e[n].length>7){e[n].shift();const r=e[n];let i=n;for(;r.length;)t[n]="A",e.splice(i+=1,0,["C",...r.splice(0,6)]);e.splice(n,1)}}function dc(e){return cc(e)&&e.every(([t])=>"ACLMQZ".includes(t))}function am(e){return dc(e)&&e.every(([t])=>"MC".includes(t))}function tg(e,t){const[n]=e,{x1:r,y1:i,x2:o,y2:u}=t,s=e.slice(1).map(Number);let l=e;if("TQ".includes(n)||(t.qx=null,t.qy=null),n==="H")l=["L",e[1],i];else if(n==="V")l=["L",r,e[1]];else if(n==="S"){const a=r*2-o,c=i*2-u;t.x1=a,t.y1=c,l=["C",a,c,...s]}else if(n==="T"){const a=r*2-t.qx,c=i*2-t.qy;t.qx=a,t.qy=c,l=["Q",a,c,...s]}else if(n==="Q"){const[a,c]=s;t.qx=a,t.qy=c}return l}const Xu={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Vt(e){if(dc(e))return wt(e);const t=Fr(e),n={...Xu},r=t.length;for(let i=0;i1&&(Ze=Math.sqrt(Ze),p*=Ze,g*=Ze);const at=p*p,Sn=g*g,St=(o===u?-1:1)*Math.sqrt(Math.abs((at*Sn-at*$*$-Sn*T*T)/(at*$*$+Sn*T*T)));E=St*p*$/g+(c+v)/2,z=St*-g*T/p+(f+h)/2,w=Math.asin(((f-z)/g*10**9>>0)/10**9),x=Math.asin(((h-z)/g*10**9>>0)/10**9),w=cx&&(w-=Math.PI*2),!u&&x>w&&(x-=Math.PI*2)}let M=x-w;if(Math.abs(M)>S){const T=x,$=v,Ze=h;x=w+S*(u&&x>w?1:-1),v=E+p*Math.cos(x),h=z+g*Math.sin(x),d=cm(v,h,p,g,i,0,u,$,Ze,[x,T,E,z])}M=x-w;const R=Math.cos(w),P=Math.sin(w),U=Math.cos(x),Xe=Math.sin(x),Ue=Math.tan(M/4),jt=4/3*p*Ue,Ht=4/3*g*Ue,Ce=[c,f],ye=[c+jt*P,f-Ht*R],N=[v+jt*Xe,h-Ht*U],k=[v,h];if(ye[0]=2*Ce[0]-ye[0],ye[1]=2*Ce[1]-ye[1],a)return[...ye,...N,...k,...d];d=[...ye,...N,...k,...d];const O=[];for(let T=0,$=d.length;T<$;T+=1)O[T]=T%2?Po(d[T-1],d[T],m).y:Po(d[T],d[T+1],m).x;return O}function ng(e,t,n,r,i,o){const u=.3333333333333333,s=2/3;return[u*e+s*n,u*t+s*r,u*i+s*n,u*o+s*r,i,o]}function Kn(e,t,n){const[r,i]=e,[o,u]=t;return[r+(o-r)*n,i+(u-i)*n]}function Zu(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function $i(e,t,n,r,i){const o=Zu([e,t],[n,r]);let u={x:0,y:0};if(typeof i=="number")if(i<=0)u={x:e,y:t};else if(i>=o)u={x:n,y:r};else{const[s,l]=Kn([e,t],[n,r],i/o);u={x:s,y:l}}return{length:o,point:u,min:{x:Math.min(e,n),y:Math.min(t,r)},max:{x:Math.max(e,n),y:Math.max(t,r)}}}function Zf(e,t,n,r){const o=[e,t],u=[n,r],s=Kn(o,u,.5),l=Kn(u,s,.5),a=Kn(s,l,.5),c=Kn(l,a,.5),f=Kn(a,c,.5),p=[...o,...s,...a,...f,.5],g=$i(...p).point,v=[...f,...c,...l,...u,0],h=$i(...v).point;return[g.x,g.y,h.x,h.y,n,r]}function Ho(e,t){const[n]=e,r=e.slice(1).map(Number),[i,o]=r;let u;const{x1:s,y1:l,x:a,y:c}=t;switch("TQ".includes(n)||(t.qx=null,t.qy=null),n){case"M":return t.x=i,t.y=o,e;case"A":return u=[s,l,...r],["C",...cm(...u)];case"Q":return t.qx=i,t.qy=o,u=[s,l,...r],["C",...ng(...u)];case"L":return["C",...Zf(s,l,i,o)];case"Z":return["C",...Zf(s,l,a,c)]}return e}function Gu(e){if(am(e))return wt(e);const t=Vt(e),n={...Xu},r=[];let i="",o=t.length;for(let u=0;u=0?t:n;const r=typeof n=="number"&&n>=1?10**n:1;return e.map(i=>{const o=i.slice(1).map(Number).map(u=>n?Math.round(u*r)/r:Math.round(u));return[i[0],...o]})}function zn(e,t){return wu(e,t).map(n=>n[0]+n.slice(1).join(" ")).join("")}function Wo(e){const t=Fr(e),n=t.slice(-1)[0][0]==="Z",r=Vt(t).map((i,o)=>{const[u,s]=i.slice(-2).map(Number);return{seg:t[o],n:i,c:t[o][0],x:u,y:s}}).map((i,o,u)=>{const s=i.seg,l=i.n,a=o&&u[o-1],c=u[o+1],f=i.c,p=u.length,g=o?u[o-1].x:u[p-1].x,v=o?u[o-1].y:u[p-1].y;let h=[];switch(f){case"M":h=n?["Z"]:[f,g,v];break;case"A":h=[f,...s.slice(1,-3),s[5]===1?0:1,g,v];break;case"C":c&&c.c==="S"?h=["S",s[1],s[2],g,v]:h=[f,s[3],s[4],s[1],s[2],g,v];break;case"S":a&&"CS".includes(a.c)&&(!c||c.c!=="S")?h=["C",l[3],l[4],l[1],l[2],g,v]:h=[f,l[1],l[2],g,v];break;case"Q":c&&c.c==="T"?h=["T",g,v]:h=[f,...s.slice(1,-2),g,v];break;case"T":a&&"QT".includes(a.c)&&(!c||c.c!=="T")?h=["Q",l[1],l[2],g,v]:h=[f,g,v];break;case"Z":h=["M",g,v];break;case"H":h=[f,g];break;case"V":h=[f,v];break;default:h=[f,...s.slice(1,-2),g,v]}return h});return n?r.reverse():[r[0],...r.slice(1).reverse()]}function fm(e){const t=[];let n,r=-1;return e.forEach(i=>{i[0]==="M"?(n=[i],r+=1):n=[...n,i],t[r]=n}),t}function rg(e,t,n,r){const[i]=e,o=m=>Math.round(m*10**4)/10**4,u=e.slice(1).map(m=>+m),s=t.slice(1).map(m=>+m),{x1:l,y1:a,x2:c,y2:f,x:p,y:g}=n;let v=e;const[h,S]=s.slice(-2);if("TQ".includes(i)||(n.qx=null,n.qy=null),["V","H","S","T","Z"].includes(i))v=[i,...u];else if(i==="L")o(p)===o(h)?v=["V",S]:o(g)===o(S)&&(v=["H",h]);else if(i==="C"){const[m,d]=s;"CS".includes(r)&&(o(m)===o(l*2-c)&&o(d)===o(a*2-f)||o(l)===o(c*2-p)&&o(a)===o(f*2-g))&&(v=["S",...s.slice(-4)]),n.x1=m,n.y1=d}else if(i==="Q"){const[m,d]=s;n.qx=m,n.qy=d,"QT".includes(r)&&(o(m)===o(l*2-c)&&o(d)===o(a*2-f)||o(l)===o(c*2-p)&&o(a)===o(f*2-g))&&(v=["T",...s.slice(-2)])}return v}function dm(e,t){const n=Fr(e),r=Vt(n),i={...Xu},o=[],u=n.length;let s="",l="",a=0,c=0,f=0,p=0;for(let h=0;hS?h.join("").length!Number.isNaN(r)))throw TypeError(`CSSMatrix: "${e}" must only have numbers.`);if(n.length===16){const[r,i,o,u,s,l,a,c,f,p,g,v,h,S,m,d]=n;t.m11=r,t.a=r,t.m21=s,t.c=s,t.m31=f,t.m41=h,t.e=h,t.m12=i,t.b=i,t.m22=l,t.d=l,t.m32=p,t.m42=S,t.f=S,t.m13=o,t.m23=a,t.m33=g,t.m43=m,t.m14=u,t.m24=c,t.m34=v,t.m44=d}else if(n.length===6){const[r,i,o,u,s,l]=n;t.m11=r,t.a=r,t.m12=i,t.b=i,t.m21=o,t.c=o,t.m22=u,t.d=u,t.m41=s,t.e=s,t.m42=l,t.f=l}else throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");return t}function pm(e){const t=Object.keys(new Fe);if(typeof e=="object"&&t.every(n=>n in e))return oo([e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]);throw TypeError(`CSSMatrix: "${JSON.stringify(e)}" is not a DOMMatrix / CSSMatrix / JSON compatible object.`)}function hm(e){if(typeof e!="string")throw TypeError(`CSSMatrix: "${e}" is not a string.`);const t=String(e).replace(/\s/g,"");let n=new Fe;const r=`CSSMatrix: invalid transform string "${e}"`;return t.split(")").filter(i=>i).forEach(i=>{const[o,u]=i.split("(");if(!u)throw TypeError(r);const s=u.split(",").map(v=>v.includes("rad")?parseFloat(v)*(180/Math.PI):parseFloat(v)),[l,a,c,f]=s,p=[l,a,c],g=[l,a,c,f];if(o==="perspective"&&l&&[a,c].every(v=>v===void 0))n.m34=-1/l;else if(o.includes("matrix")&&[6,16].includes(s.length)&&s.every(v=>!Number.isNaN(+v))){const v=s.map(h=>Math.abs(h)<1e-6?0:h);n=n.multiply(oo(v))}else if(o==="translate3d"&&p.every(v=>!Number.isNaN(+v)))n=n.translate(l,a,c);else if(o==="translate"&&l&&c===void 0)n=n.translate(l,a||0,0);else if(o==="rotate3d"&&g.every(v=>!Number.isNaN(+v))&&f)n=n.rotateAxisAngle(l,a,c,f);else if(o==="rotate"&&l&&[a,c].every(v=>v===void 0))n=n.rotate(0,0,l);else if(o==="scale3d"&&p.every(v=>!Number.isNaN(+v))&&p.some(v=>v!==1))n=n.scale(l,a,c);else if(o==="scale"&&!Number.isNaN(l)&&l!==1&&c===void 0){const h=Number.isNaN(+a)?l:a;n=n.scale(l,h,1)}else if(o==="skew"&&(l||!Number.isNaN(l)&&a)&&c===void 0)n=n.skew(l,a||0);else if(/[XYZ]/.test(o)&&l&&[a,c].every(v=>v===void 0)&&["translate","rotate","scale","skew"].some(v=>o.includes(v)))if(["skewX","skewY"].includes(o))n=n[o](l);else{const v=o.replace(/[XYZ]/,""),h=o.replace(v,""),S=["X","Y","Z"].indexOf(h),m=v==="scale"?1:0,d=[S===0?l:m,S===1?l:m,S===2?l:m];n=n[v](...d)}else throw TypeError(r)}),n}function Rl(e,t){return t?[e.a,e.b,e.c,e.d,e.e,e.f]:[e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]}function pc(e,t,n){const r=new Fe;return r.m41=e,r.e=e,r.m42=t,r.f=t,r.m43=n,r}function mm(e,t,n){const r=new Fe,i=Math.PI/180,o=e*i,u=t*i,s=n*i,l=Math.cos(o),a=-Math.sin(o),c=Math.cos(u),f=-Math.sin(u),p=Math.cos(s),g=-Math.sin(s),v=c*p,h=-c*g;r.m11=v,r.a=v,r.m12=h,r.b=h,r.m13=f;const S=a*f*p+l*g;r.m21=S,r.c=S;const m=l*p-a*f*g;return r.m22=m,r.d=m,r.m23=-a*c,r.m31=a*g-l*f*p,r.m32=a*p+l*f*g,r.m33=l*c,r}function vm(e,t,n,r){const i=new Fe,o=Math.sqrt(e*e+t*t+n*n);if(o===0)return i;const u=e/o,s=t/o,l=n/o,a=r*(Math.PI/360),c=Math.sin(a),f=Math.cos(a),p=c*c,g=u*u,v=s*s,h=l*l,S=1-2*(v+h)*p;i.m11=S,i.a=S;const m=2*(u*s*p+l*c*f);i.m12=m,i.b=m,i.m13=2*(u*l*p-s*c*f);const d=2*(s*u*p-l*c*f);i.m21=d,i.c=d;const y=1-2*(h+g)*p;return i.m22=y,i.d=y,i.m23=2*(s*l*p+u*c*f),i.m31=2*(l*u*p+s*c*f),i.m32=2*(l*s*p-u*c*f),i.m33=1-2*(g+v)*p,i}function ym(e,t,n){const r=new Fe;return r.m11=e,r.a=e,r.m22=t,r.d=t,r.m33=n,r}function Ju(e,t){const n=new Fe;if(e){const r=e*Math.PI/180,i=Math.tan(r);n.m21=i,n.c=i}if(t){const r=t*Math.PI/180,i=Math.tan(r);n.m12=i,n.b=i}return n}function gm(e){return Ju(e,0)}function _m(e){return Ju(0,e)}function Pt(e,t){const n=t.m11*e.m11+t.m12*e.m21+t.m13*e.m31+t.m14*e.m41,r=t.m11*e.m12+t.m12*e.m22+t.m13*e.m32+t.m14*e.m42,i=t.m11*e.m13+t.m12*e.m23+t.m13*e.m33+t.m14*e.m43,o=t.m11*e.m14+t.m12*e.m24+t.m13*e.m34+t.m14*e.m44,u=t.m21*e.m11+t.m22*e.m21+t.m23*e.m31+t.m24*e.m41,s=t.m21*e.m12+t.m22*e.m22+t.m23*e.m32+t.m24*e.m42,l=t.m21*e.m13+t.m22*e.m23+t.m23*e.m33+t.m24*e.m43,a=t.m21*e.m14+t.m22*e.m24+t.m23*e.m34+t.m24*e.m44,c=t.m31*e.m11+t.m32*e.m21+t.m33*e.m31+t.m34*e.m41,f=t.m31*e.m12+t.m32*e.m22+t.m33*e.m32+t.m34*e.m42,p=t.m31*e.m13+t.m32*e.m23+t.m33*e.m33+t.m34*e.m43,g=t.m31*e.m14+t.m32*e.m24+t.m33*e.m34+t.m34*e.m44,v=t.m41*e.m11+t.m42*e.m21+t.m43*e.m31+t.m44*e.m41,h=t.m41*e.m12+t.m42*e.m22+t.m43*e.m32+t.m44*e.m42,S=t.m41*e.m13+t.m42*e.m23+t.m43*e.m33+t.m44*e.m43,m=t.m41*e.m14+t.m42*e.m24+t.m43*e.m34+t.m44*e.m44;return oo([n,r,i,o,u,s,l,a,c,f,p,g,v,h,S,m])}class Fe{constructor(...t){const n=this;if(n.a=1,n.b=0,n.c=0,n.d=1,n.e=0,n.f=0,n.m11=1,n.m12=0,n.m13=0,n.m14=0,n.m21=0,n.m22=1,n.m23=0,n.m24=0,n.m31=0,n.m32=0,n.m33=1,n.m34=0,n.m41=0,n.m42=0,n.m43=0,n.m44=1,t.length){const r=[16,6].some(i=>i===t.length)?t:t[0];return n.setMatrixValue(r)}return n}get isIdentity(){const t=this;return t.m11===1&&t.m12===0&&t.m13===0&&t.m14===0&&t.m21===0&&t.m22===1&&t.m23===0&&t.m24===0&&t.m31===0&&t.m32===0&&t.m33===1&&t.m34===0&&t.m41===0&&t.m42===0&&t.m43===0&&t.m44===1}get is2D(){const t=this;return t.m31===0&&t.m32===0&&t.m33===1&&t.m34===0&&t.m43===0&&t.m44===1}setMatrixValue(t){const n=this;return typeof t=="string"&&t.length&&t!=="none"?hm(t):[Array,Float64Array,Float32Array].some(r=>t instanceof r)?oo(t):[Fe,DOMMatrix,Object].some(r=>t instanceof r)?pm(t):n}toFloat32Array(t){return Float32Array.from(Rl(this,t))}toFloat64Array(t){return Float64Array.from(Rl(this,t))}toString(){const t=this,{is2D:n}=t,r=t.toFloat64Array(n).join(", ");return`${n?"matrix":"matrix3d"}(${r})`}toJSON(){const t=this,{is2D:n,isIdentity:r}=t;return{...t,is2D:n,isIdentity:r}}multiply(t){return Pt(this,t)}translate(t,n,r){const i=t;let o=n,u=r;return o===void 0&&(o=0),u===void 0&&(u=0),Pt(this,pc(i,o,u))}scale(t,n,r){const i=t;let o=n,u=r;return o===void 0&&(o=t),u===void 0&&(u=1),Pt(this,ym(i,o,u))}rotate(t,n,r){let i=t,o=n||0,u=r||0;return typeof t=="number"&&n===void 0&&r===void 0&&(u=i,i=0,o=0),Pt(this,mm(i,o,u))}rotateAxisAngle(t,n,r,i){if([t,n,r,i].some(o=>Number.isNaN(+o)))throw new TypeError("CSSMatrix: expecting 4 values");return Pt(this,vm(t,n,r,i))}skewX(t){return Pt(this,gm(t))}skewY(t){return Pt(this,_m(t))}skew(t,n){return Pt(this,Ju(t,n))}transformPoint(t){const n=this,r=n.m11*t.x+n.m21*t.y+n.m31*t.z+n.m41*t.w,i=n.m12*t.x+n.m22*t.y+n.m32*t.z+n.m42*t.w,o=n.m13*t.x+n.m23*t.y+n.m33*t.z+n.m43*t.w,u=n.m14*t.x+n.m24*t.y+n.m34*t.z+n.m44*t.w;return t instanceof DOMPoint?new DOMPoint(r,i,o,u):{x:r,y:i,z:o,w:u}}}Object.assign(Fe,{Translate:pc,Rotate:mm,RotateAxisAngle:vm,Scale:ym,SkewX:gm,SkewY:_m,Skew:Ju,Multiply:Pt,fromArray:oo,fromMatrix:pm,fromString:hm,toArray:Rl});var ig="1.0.3";const og=ig;Object.assign(Fe,{Version:og});function ug(e){let t=new Fe;const{origin:n}=e,[r,i]=n,{translate:o}=e,{rotate:u}=e,{skew:s}=e,{scale:l}=e;return Array.isArray(o)&&o.every(a=>!Number.isNaN(+a))&&o.some(a=>a!==0)?t=t.translate(...o):typeof o=="number"&&!Number.isNaN(o)&&(t=t.translate(o)),(u||s||l)&&(t=t.translate(r,i),Array.isArray(u)&&u.every(a=>!Number.isNaN(+a))&&u.some(a=>a!==0)?t=t.rotate(...u):typeof u=="number"&&!Number.isNaN(u)&&(t=t.rotate(u)),Array.isArray(s)&&s.every(a=>!Number.isNaN(+a))&&s.some(a=>a!==0)?(t=s[0]?t.skewX(s[0]):t,t=s[1]?t.skewY(s[1]):t):typeof s=="number"&&!Number.isNaN(s)&&(t=t.skewX(s)),Array.isArray(l)&&l.every(a=>!Number.isNaN(+a))&&l.some(a=>a!==1)?t=t.scale(...l):typeof l=="number"&&!Number.isNaN(l)&&(t=t.scale(l)),t=t.translate(-r,-i)),t}function sg(e,t){let n=pc(...t);return[,,,n.m44]=t,n=e.multiply(n),[n.m41,n.m42,n.m43,n.m44]}function Gf(e,t,n){const[r,i,o]=n,[u,s,l]=sg(e,[...t,0,1]),a=u-r,c=s-i,f=l-o;return[a*(Math.abs(o)/Math.abs(f)||1)+r,c*(Math.abs(o)/Math.abs(f)||1)+i]}function wm(e,t){let n=0,r=0,i,o,u,s,l,a;const c=Fr(e),f=t&&Object.keys(t);if(!t||!f.length)return wt(c);const p=Vt(c);if(!t.origin){const{origin:x}=io;Object.assign(t,{origin:x})}const g=ug(t),{origin:v}=t,h={...Xu};let S=[],m=0,d="",y=[];const w=[];if(!g.isIdentity){for(i=0,u=c.length;i{switch(d=x.c,S=x.s,d){case"L":case"H":case"V":return[l,a]=Gf(g,[x.x,x.y],v),n!==l&&r!==a?S=["L",l,a]:r===a?S=["H",l]:n===l&&(S=["V",a]),n=l,r=a,S;default:for(o=1,s=S.length;o1&&(h*=g(E),S*=g(E));const z=h**2*S**2-h**2*x.y**2-S**2*x.x**2,M=h**2*x.y**2+S**2*x.x**2;let R=z/M;R=R<0?0:R;const P=(o!==u?1:-1)*g(R),U={x:P*(h*x.y/S),y:P*(-(S*x.x)/h)},Xe={x:p(d)*U.x-f(d)*U.y+(e+s)/2,y:f(d)*U.x+p(d)*U.y+(t+l)/2},Ue={x:(x.x-U.x)/h,y:(x.y-U.y)/S},jt=Jf({x:1,y:0},Ue),Ht={x:(-x.x-U.x)/h,y:(-x.y-U.y)/S};let Ce=Jf(Ue,Ht);!u&&Ce>0?Ce-=2*v:u&&Ce<0&&(Ce+=2*v),Ce%=2*v;const ye=jt+Ce*a,N=h*p(ye),k=S*f(ye);return{x:p(d)*N-f(d)*k+Xe.x,y:f(d)*N+p(d)*k+Xe.y}}function ag(e,t,n,r,i,o,u,s,l,a){const c=typeof a=="number";let f=e,p=t,g=0,v=[f,p,g],h=[f,p],S=0,m={x:0,y:0},d=[{x:f,y:p}];c&&a<=0&&(m={x:f,y:p});const y=300;for(let w=0;w<=y;w+=1){if(S=w/y,{x:f,y:p}=lg(e,t,n,r,i,o,u,s,l,S),d=[...d,{x:f,y:p}],g+=Zu(h,[f,p]),h=[f,p],c&&g>a&&a>v[2]){const x=(g-a)/(g-v[2]);m={x:h[0]*(1-x)+v[0]*x,y:h[1]*(1-x)+v[1]*x}}v=[f,p,g]}return c&&a>=g&&(m={x:s,y:l}),{length:g,point:m,min:{x:Math.min(...d.map(w=>w.x)),y:Math.min(...d.map(w=>w.y))},max:{x:Math.max(...d.map(w=>w.x)),y:Math.max(...d.map(w=>w.y))}}}function cg(e,t,n,r,i,o,u,s,l){const a=1-l;return{x:a**3*e+3*a**2*l*n+3*a*l**2*i+l**3*u,y:a**3*t+3*a**2*l*r+3*a*l**2*o+l**3*s}}function fg(e,t,n,r,i,o,u,s,l){const a=typeof l=="number";let c=e,f=t,p=0,g=[c,f,p],v=[c,f],h=0,S={x:0,y:0},m=[{x:c,y:f}];a&&l<=0&&(S={x:c,y:f});const d=300;for(let y=0;y<=d;y+=1){if(h=y/d,{x:c,y:f}=cg(e,t,n,r,i,o,u,s,h),m=[...m,{x:c,y:f}],p+=Zu(v,[c,f]),v=[c,f],a&&p>l&&l>g[2]){const w=(p-l)/(p-g[2]);S={x:v[0]*(1-w)+g[0]*w,y:v[1]*(1-w)+g[1]*w}}g=[c,f,p]}return a&&l>=p&&(S={x:u,y:s}),{length:p,point:S,min:{x:Math.min(...m.map(y=>y.x)),y:Math.min(...m.map(y=>y.y))},max:{x:Math.max(...m.map(y=>y.x)),y:Math.max(...m.map(y=>y.y))}}}function dg(e,t,n,r,i,o,u){const s=1-u;return{x:s**2*e+2*s*u*n+u**2*i,y:s**2*t+2*s*u*r+u**2*o}}function pg(e,t,n,r,i,o,u){const s=typeof u=="number";let l=e,a=t,c=0,f=[l,a,c],p=[l,a],g=0,v={x:0,y:0},h=[{x:l,y:a}];s&&u<=0&&(v={x:l,y:a});const S=300;for(let m=0;m<=S;m+=1){if(g=m/S,{x:l,y:a}=dg(e,t,n,r,i,o,g),h=[...h,{x:l,y:a}],c+=Zu(p,[l,a]),p=[l,a],s&&c>u&&u>f[2]){const d=(c-u)/(c-f[2]);v={x:p[0]*(1-d)+f[0]*d,y:p[1]*(1-d)+f[1]*d}}f=[l,a,c]}return s&&u>=c&&(v={x:i,y:o}),{length:c,point:v,min:{x:Math.min(...h.map(m=>m.x)),y:Math.min(...h.map(m=>m.y))},max:{x:Math.max(...h.map(m=>m.x)),y:Math.max(...h.map(m=>m.y))}}}function bu(e,t){const n=Vt(e),r=typeof t=="number";let i,o=[],u,s=0,l=0,a=0,c=0,f,p=[],g=[],v=0,h={x:0,y:0},S=h,m=h,d=h,y=0;for(let w=0,x=n.length;w=t&&(d=m),g=[...g,S],p=[...p,h],y+=v,[s,l]=u!=="Z"?f.slice(-2):[a,c];return r&&t>=y&&(d={x:s,y:l}),{length:y,point:d,min:{x:Math.min(...p.map(w=>w.x)),y:Math.min(...p.map(w=>w.y))},max:{x:Math.max(...g.map(w=>w.x)),y:Math.max(...g.map(w=>w.y))}}}function Sm(e){if(!e)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};const{min:{x:t,y:n},max:{x:r,y:i}}=bu(e),o=r-t,u=i-n;return{width:o,height:u,x:t,y:n,x2:r,y2:i,cx:t+o/2,cy:n+u/2,cz:Math.max(o,u)+Math.min(o,u)/2}}function dr(e){return bu(e).length}function hi(e,t){return bu(e,t).point}class Qo{constructor(t,n){const r=n||{},i=typeof t>"u";if(i||!t.length)throw TypeError(`${It}: "pathValue" is ${i?"undefined":"empty"}`);const o=pn(t);if(typeof o=="string")throw TypeError(o);this.segments=o;const{width:u,height:s,cx:l,cy:a,cz:c}=this.getBBox(),{round:f,origin:p}=r;let g;if(f==="auto"){const h=`${Math.floor(Math.max(u,s))}`.length;g=h>=4?0:4-h}else Number.isInteger(f)||f==="off"?g=f:{round:g}=io;let v;if(Array.isArray(p)&&p.length>=2){const[h,S,m]=p.map(Number);v=[Number.isNaN(h)?l:h,Number.isNaN(S)?a:S,Number.isNaN(m)?c:m]}else v=[l,a,c];return this.round=g,this.origin=v,this}getBBox(){return Sm(this.segments)}getTotalLength(){return dr(this.segments)}getPointAtLength(t){return hi(this.segments,t)}toAbsolute(){const{segments:t}=this;return this.segments=Fr(t),this}toRelative(){const{segments:t}=this;return this.segments=fc(t),this}toCurve(){const{segments:t}=this;return this.segments=Gu(t),this}reverse(t){this.toAbsolute();const{segments:n}=this,r=fm(n),i=r.length>1?r:0,o=i&&wt(i).map((s,l)=>t?l?Wo(s):pn(s):Wo(s));let u=[];return i?u=o.flat(1):u=t?n:Wo(n),this.segments=wt(u),this}normalize(){const{segments:t}=this;return this.segments=Vt(t),this}optimize(){const{segments:t}=this;return this.segments=dm(t,this.round),this}transform(t){if(!t||typeof t!="object"||typeof t=="object"&&!["translate","rotate","skew","scale"].some(l=>l in t))return this;const n={};Object.keys(t).forEach(l=>{n[l]=Array.isArray(t[l])?[...t[l]]:Number(t[l])});const{segments:r}=this,[i,o,u]=this.origin,{origin:s}=n;if(Array.isArray(s)&&s.length>=2){const[l,a,c]=s.map(Number);n.origin=[Number.isNaN(l)?i:l,Number.isNaN(a)?o:a,c||u]}else n.origin=[i,o,u];return this.segments=wm(r,n),this}flipX(){return this.transform({rotate:[0,180,0]}),this}flipY(){return this.transform({rotate:[180,0,0]}),this}toString(){return zn(this.segments,this.round)}}function hg(e,t,n,r,i,o,u,s){return 3*((s-t)*(n+i)-(u-e)*(r+o)+r*(e-i)-n*(t-o)+s*(i+e/3)-u*(o+t/3))/20}function xm(e){let t=0,n=0,r=0;return Gu(e).map(i=>{switch(i[0]){case"M":return[,t,n]=i,0;default:return r=hg(t,n,...i.slice(1)),[t,n]=i.slice(-2),r}}).reduce((i,o)=>i+o,0)}function mg(e){return xm(Gu(e))>=0}function hc(e,t){const n=pn(e);if(typeof n=="string")throw TypeError(n);let r=[...n],i=dr(r),o=r.length-1,u=0,s=0,l=n[0];const[a,c]=l.slice(-2),f={x:a,y:c};if(o<=0||!t||!Number.isFinite(t))return{segment:l,index:0,length:s,point:f,lengthAtSegment:u};if(t>=i)return r=n.slice(0,-1),u=dr(r),s=i-u,{segment:n[o],index:o,length:s,lengthAtSegment:u};const p=[];for(;o>0;)l=r[o],r=r.slice(0,-1),u=dr(r),s=i-u,i=u,p.push({segment:l,index:o,length:s,lengthAtSegment:u}),o-=1;return p.find(({lengthAtSegment:g})=>g<=t)}function es(e,t){const n=pn(e),r=Vt(n),i=dr(n),o=w=>{const x=w.x-t.x,E=w.y-t.y;return x*x+E*E};let u=8,s,l=0,a,c=0,f=1/0;for(let w=0;w<=i;w+=u)s=hi(r,w),l=o(s),l.5;)v=c-u,p=hi(r,v),S=o(p),h=c+u,g=hi(r,h),m=o(g),v>=0&&Sr&&(o-=(o*2-r)/2),u*2>i&&(u-=(u*2-i)/2),[["M",t+o,n],["h",r-o*2],["s",o,0,o,u],["v",i-u*2],["s",0,u,-o,u],["h",-r+o*2],["s",-o,0,-o,-u],["v",-i+u*2],["s",0,-u,o,-u]]):[["M",t,n],["h",r],["v",i],["H",t],["Z"]]}function Cg(e,t){const n=Object.keys(bf),{tagName:r}=e;if(r&&!n.some(c=>r===c))throw TypeError(`${It}: "${r}" is not SVGElement`);const i=document.createElementNS("http://www.w3.org/2000/svg","path"),o=r||e.type,u={};u.type=o;const s=bf[o];r?(s.forEach(c=>{u[c]=e.getAttribute(c)}),Object.values(e.attributes).forEach(({name:c,value:f})=>{s.includes(c)||i.setAttribute(c,f)})):(Object.assign(u,e),Object.keys(u).forEach(c=>{!s.includes(c)&&c!=="type"&&i.setAttribute(c.replace(/[A-Z]/g,f=>`-${f.toLowerCase()}`),u[c])}));let l;const{round:a}=io;return o==="circle"?l=zn(xg(u),a):o==="ellipse"?l=zn(Eg(u),a):["polyline","polygon"].includes(o)?l=zn(Sg(u),a):o==="rect"?l=zn(kg(u),a):o==="line"?l=zn(wg(u),a):o==="glyph"&&(l=r?e.getAttribute("d"):e.d),Em(l)?(i.setAttribute("d",l),t&&r&&(e.before(i,e),e.remove()),i):!1}function zg(e){const t=e.slice(1).map((n,r,i)=>r?[...i[r-1].slice(-2),...n.slice(1)]:[...e[0].slice(1),...n.slice(1)]).map(n=>n.map((r,i)=>n[n.length-i-2*(1-i%2)])).reverse();return[["M",...t[0].slice(0,2)],...t.map(n=>["C",...n.slice(2)])]}function Ng(e){const t=pn(e),n=Vt(t),{length:r}=t,i=n.slice(-1)[0][0]==="Z",o=i?r-2:r-1,[u,s]=n[0].slice(1),[l,a]=n[o].slice(-2);return i&&u===l&&s===a?t.slice(0,-1):t}const Mg={CSSMatrix:Fe,parsePathString:pn,isPathArray:Yu,isCurveArray:am,isAbsoluteArray:cc,isRelativeArray:lm,isNormalizedArray:dc,isValidPath:Em,pathToAbsolute:Fr,pathToRelative:fc,pathToCurve:Gu,pathToString:zn,getDrawDirection:mg,getPathArea:xm,getPathBBox:Sm,pathLengthFactory:bu,getTotalLength:dr,getPointAtLength:hi,getClosestPoint:vg,getSegmentOfPoint:yg,getPropertiesAtPoint:es,getPropertiesAtLength:hc,getSegmentAtLength:gg,isPointInStroke:_g,clonePath:wt,splitPath:fm,fixPath:Ng,roundPath:wu,optimizePath:dm,reverseCurve:zg,reversePath:Wo,normalizePath:Vt,transformPath:wm,shapeToPath:Cg,options:io};var jg="1.0.5";const Pg=jg;Object.assign(Qo,Mg,{Version:Pg});const xn=e=>e==null,Og=e=>{const{width:t,height:n,cx:r,cy:i,rx:o,ry:u,startOffset:s,reversed:l,text:a,svgProps:c,ellipseProps:f,textPathProps:p,textProps:g,tspanProps:v}=e,[h,S]=ne.useState(!1),m=ne.useId(),d=`ellipse-id${m.replaceAll(":","-").substring(0,m.length-1)}`,y=ne.useRef();if(ne.useEffect(()=>{if(y.current){const x={id:d,type:"ellipse",rx:o,ry:u,cx:r,cy:i,style:"fill: none;",...f},E=y.current,z=Qo.shapeToPath(x,!0),M=document.getElementById(d);if(M&&M.remove(),E.prepend(z),l){const R=z.getAttribute("d"),P=Qo.reversePath(R),U=Qo.pathToString(P);z.setAttribute("d",U)}S(!0)}},[y.current,l,t,n,c,r,i,o,u,f]),xn(t))throw new Error("ReactCurvedText Error: width is required");if(xn(n))throw new Error("ReactCurvedText Error: height is required");if(xn(r))throw new Error("ReactCurvedText Error: cx is required");if(xn(i))throw new Error("ReactCurvedText Error: cy is required");if(xn(o))throw new Error("ReactCurvedText Error: rx is required");if(xn(u))throw new Error("ReactCurvedText Error: ry is required");if(xn(a))throw new Error("ReactCurvedText Error: text is required");const w=JSON.stringify({width:t,height:n,cx:r,cy:i,rx:o,ry:u,startOffset:s,reversed:l,text:a,svgProps:c,ellipseProps:f,textPathProps:p,textProps:g,tspanProps:v,rendered:h});return _.jsx("svg",{ref:y,height:n,width:t,...c,children:_.jsx("text",{...g,children:_.jsx("textPath",{xlinkHref:`#${d}`,startOffset:s,...p,children:_.jsx("tspan",{...v,children:a})})},w)})};function Tg(){const[e,t]=ne.useState(300),[n,r]=ne.useState(300),[i,o]=ne.useState(150),[u,s]=ne.useState(150),[l,a]=ne.useState(100),[c,f]=ne.useState(100),[p,g]=ne.useState(50),[v,h]=ne.useState(!1),[S,m]=ne.useState("react-curved-text"),[d,y]=ne.useState(24),[w,x]=ne.useState(),[E,z]=ne.useState(0),[M,R]=ne.useState(),[P,U]=ne.useState(0),Xe=d?{style:{fontSize:d}}:null,Ue=w?{fill:w}:null,jt=E?{dy:E}:null,Ht=M?{style:`fill: ${M}`}:null,Ce=P?{style:{transform:`rotate(${P}deg)`}}:null,ye=_.jsx(Og,{width:e,height:n,cx:i,cy:u,rx:l,ry:c,startOffset:p,reversed:v,text:S,textProps:Xe,textPathProps:Ue,tspanProps:jt,ellipseProps:Ht,svgProps:Ce});let N=K0(ye,{displayName:"ReactCurvedText",useFunctionCode:!0});return N=`import ReactCurvedText from 'react-curved-text'; -`+N,_.jsxs("div",{className:"App",children:[_.jsx(Y0,{}),_.jsxs("div",{className:"exampleDemo",children:[_.jsx("br",{}),_.jsx("h2",{children:_.jsx("a",{href:"https://www.npmjs.com/package/react-curved-text",target:"_blank",rel:"noreferrer",children:"react-curved-text"})}),_.jsxs("div",{className:"installationDiv",children:[_.jsx("pre",{children:"npm install react-curved-text"}),_.jsx("pre",{children:"yarn add react-curved-text"})]}),_.jsx("h3",{children:_.jsx("a",{href:"https://github.com/obss/react-curved-text/blob/master/src/App.js",target:"_blank",rel:"noreferrer",children:"View on GitHub"})}),_.jsx("div",{className:"exampleWrapperDiv",children:ye}),_.jsxs("div",{className:"settingsDiv",children:[_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"text",children:"text:"}),_.jsx("input",{type:"text",id:"text",value:S,onChange:k=>m(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"reversed",children:"reversed:"}),_.jsx("input",{type:"checkbox",id:"reversed",checked:v,onChange:k=>h(k.target.checked)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"startOffset",children:"startOffset:"}),_.jsx("input",{type:"number",id:"startOffset",value:p,onChange:k=>g(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:p,onChange:k=>g(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"width",children:"width:"}),_.jsx("input",{type:"number",id:"width",value:e,onChange:k=>t(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:e,onChange:k=>t(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"height",children:"height:"}),_.jsx("input",{type:"number",id:"height",value:n,onChange:k=>r(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:n,onChange:k=>r(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"cx",children:"cx:"}),_.jsx("input",{type:"number",id:"cx",value:i,onChange:k=>o(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:i,onChange:k=>o(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"cy",children:"cy:"}),_.jsx("input",{type:"number",id:"cy",value:u,onChange:k=>s(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:u,onChange:k=>s(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"rx",children:"rx:"}),_.jsx("input",{type:"number",id:"rx",value:l,onChange:k=>a(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:l,onChange:k=>a(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"ry",children:"ry:"}),_.jsx("input",{type:"number",id:"ry",value:c,onChange:k=>f(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:c,onChange:k=>f(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"fontSize",children:"textProps.style.fontSize:"}),_.jsx("input",{type:"number",id:"fontSize",value:d,onChange:k=>y(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"60",value:d,onChange:k=>y(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"textPathFill",children:"textPathProps.style.fill:"}),_.jsx("input",{type:"color",id:"textPathFill",checked:w,onChange:k=>x(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"dy",children:"tspanProps.dy:"}),_.jsx("input",{type:"number",id:"dy",value:E,onChange:k=>z(k.target.value)}),_.jsx("input",{type:"range",min:"-60",max:"60",value:E,onChange:k=>z(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"fill",children:"ellipseProps.style.fill:"}),_.jsx("input",{type:"color",id:"fill",checked:M,onChange:k=>R(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"rotate",children:"svgProps.style.rotate:"}),_.jsx("input",{type:"number",id:"rotate",value:P,onChange:k=>U(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"360",value:P,onChange:k=>U(k.target.value)})]})]}),_.jsxs("div",{className:"currentJsxDiv",children:[_.jsx("h3",{children:"Current JSX"}),_.jsx("span",{children:N})]}),_.jsxs("div",{className:"codesandboxDiv",children:[_.jsx("h3",{children:"Live Demo"}),_.jsx("a",{href:"https://codesandbox.io/s/react-curved-text-demo-99276l",target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:"https://codesandbox.io/static/img/play-codesandbox.svg",alt:"Edit react-curved-text-demo"})})]}),_.jsxs("div",{className:"codesandboxDiv",children:[_.jsx("h3",{children:"Live Demo with Rotate Animation"}),_.jsx("a",{href:"https://codesandbox.io/embed/react-curved-text-animation-pt8fvk",target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:"https://codesandbox.io/static/img/play-codesandbox.svg",alt:"Edit react-curved-text-animation"})})]}),_.jsxs("div",{className:"apiDiv",children:[_.jsx("h3",{children:"API"}),_.jsxs("table",{className:"apiTable",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Prop"}),_.jsx("th",{children:"Type"}),_.jsx("th",{children:"Required"}),_.jsx("th",{children:"Description"})]})}),_.jsxs("tbody",{children:[_.jsxs("tr",{children:[_.jsx("td",{children:"text"}),_.jsx("td",{children:"string"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Text to be displayed"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"width"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Width of the SVG"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"height"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Height of the SVG"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"cx"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Center x of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"cy"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Center y of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"rx"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Radius x of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"ry"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Radius y of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"startOffset"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Start offset of the text"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"reversed"}),_.jsx("td",{children:"boolean"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Reverse the text path"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"textProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the text element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"textPathProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the textPath element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"tspanProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the tspan element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"ellipseProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the ellipse element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"svgProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the svg element"})]})]})]})]})]})]})}const Ig=document.getElementById("root"),Ag=ph(Ig);Ag.render(_.jsx(Tg,{})); +`+N,_.jsxs("div",{className:"App",children:[_.jsx(Y0,{}),_.jsxs("div",{className:"exampleDemo",children:[_.jsx("br",{}),_.jsx("h2",{children:_.jsx("a",{href:"https://www.npmjs.com/package/react-curved-text",target:"_blank",rel:"noreferrer",children:"react-curved-text"})}),_.jsxs("div",{className:"installationDiv",children:[_.jsx("pre",{children:"npm install react-curved-text"}),_.jsx("pre",{children:"yarn add react-curved-text"})]}),_.jsx("h3",{children:_.jsx("a",{href:"https://github.com/obss/react-curved-text/blob/master/src/App.jsx",target:"_blank",rel:"noreferrer",children:"View on GitHub"})}),_.jsx("div",{className:"exampleWrapperDiv",children:ye}),_.jsxs("div",{className:"settingsDiv",children:[_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"text",children:"text:"}),_.jsx("input",{type:"text",id:"text",value:S,onChange:k=>m(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"reversed",children:"reversed:"}),_.jsx("input",{type:"checkbox",id:"reversed",checked:v,onChange:k=>h(k.target.checked)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"startOffset",children:"startOffset:"}),_.jsx("input",{type:"number",id:"startOffset",value:p,onChange:k=>g(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:p,onChange:k=>g(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"width",children:"width:"}),_.jsx("input",{type:"number",id:"width",value:e,onChange:k=>t(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:e,onChange:k=>t(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"height",children:"height:"}),_.jsx("input",{type:"number",id:"height",value:n,onChange:k=>r(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:n,onChange:k=>r(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"cx",children:"cx:"}),_.jsx("input",{type:"number",id:"cx",value:i,onChange:k=>o(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:i,onChange:k=>o(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"cy",children:"cy:"}),_.jsx("input",{type:"number",id:"cy",value:u,onChange:k=>s(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:u,onChange:k=>s(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"rx",children:"rx:"}),_.jsx("input",{type:"number",id:"rx",value:l,onChange:k=>a(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:l,onChange:k=>a(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"ry",children:"ry:"}),_.jsx("input",{type:"number",id:"ry",value:c,onChange:k=>f(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"1000",value:c,onChange:k=>f(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"fontSize",children:"textProps.style.fontSize:"}),_.jsx("input",{type:"number",id:"fontSize",value:d,onChange:k=>y(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"60",value:d,onChange:k=>y(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"textPathFill",children:"textPathProps.style.fill:"}),_.jsx("input",{type:"color",id:"textPathFill",checked:w,onChange:k=>x(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"dy",children:"tspanProps.dy:"}),_.jsx("input",{type:"number",id:"dy",value:E,onChange:k=>z(k.target.value)}),_.jsx("input",{type:"range",min:"-60",max:"60",value:E,onChange:k=>z(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"fill",children:"ellipseProps.style.fill:"}),_.jsx("input",{type:"color",id:"fill",checked:M,onChange:k=>R(k.target.value)})]}),_.jsxs("div",{className:"settingsItem",children:[_.jsx("label",{htmlFor:"rotate",children:"svgProps.style.rotate:"}),_.jsx("input",{type:"number",id:"rotate",value:P,onChange:k=>U(k.target.value)}),_.jsx("input",{type:"range",min:"0",max:"360",value:P,onChange:k=>U(k.target.value)})]})]}),_.jsxs("div",{className:"currentJsxDiv",children:[_.jsx("h3",{children:"Current JSX"}),_.jsx("span",{children:N})]}),_.jsxs("div",{className:"codesandboxDiv",children:[_.jsx("h3",{children:"Live Demo"}),_.jsx("a",{href:"https://codesandbox.io/s/react-curved-text-demo-99276l",target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:"https://codesandbox.io/static/img/play-codesandbox.svg",alt:"Edit react-curved-text-demo"})})]}),_.jsxs("div",{className:"codesandboxDiv",children:[_.jsx("h3",{children:"Live Demo with Rotate Animation"}),_.jsx("a",{href:"https://codesandbox.io/embed/react-curved-text-animation-pt8fvk",target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:"https://codesandbox.io/static/img/play-codesandbox.svg",alt:"Edit react-curved-text-animation"})})]}),_.jsxs("div",{className:"apiDiv",children:[_.jsx("h3",{children:"API"}),_.jsxs("table",{className:"apiTable",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Prop"}),_.jsx("th",{children:"Type"}),_.jsx("th",{children:"Required"}),_.jsx("th",{children:"Description"})]})}),_.jsxs("tbody",{children:[_.jsxs("tr",{children:[_.jsx("td",{children:"text"}),_.jsx("td",{children:"string"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Text to be displayed"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"width"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Width of the SVG"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"height"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Height of the SVG"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"cx"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Center x of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"cy"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Center y of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"rx"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Radius x of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"ry"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"yes"}),_.jsx("td",{children:"Radius y of the ellipse"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"startOffset"}),_.jsx("td",{children:"number"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Start offset of the text"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"reversed"}),_.jsx("td",{children:"boolean"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Reverse the text path"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"textProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the text element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"textPathProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the textPath element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"tspanProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the tspan element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"ellipseProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the ellipse element"})]}),_.jsxs("tr",{children:[_.jsx("td",{children:"svgProps"}),_.jsx("td",{children:"object"}),_.jsx("td",{children:"no"}),_.jsx("td",{children:"Props to be passed to the svg element"})]})]})]})]})]})]})}const Ig=document.getElementById("root"),Ag=ph(Ig);Ag.render(_.jsx(Tg,{})); diff --git a/index.html b/index.html index 8570a4e..e9fcb3e 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ content="react-curved-text a library for creating circular / curved texts in React projects" /> React Curved Text - +