@sunspots/shapes 0.0.1 → 0.0.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/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var X=Object.defineProperty;var g=(E,f)=>X(E,"name",{value:f,configurable:!0});import{Shape as G}from"@sunspots/core";var N=class N extends G{constructor(){super(...arguments);this.type="rect"}render(n){let{x:h,y:a,width:u,height:s,stroke:l}=this;n.fillRect(h,a,u,s),l&&n.strokeRect(h,a,u,s)}innerBox(){return{x:this.x,y:this.y,width:this.width,height:this.height}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}};g(N,"Rect");var R=N;var B=class B extends R{constructor(){super(...arguments);this.type="bar"}};g(B,"Bar");var k=B;import{Shape as K}from"@sunspots/core";var P=class P extends K{constructor(){super(...arguments);this.type="barcode";this.fill="#000000";this.data=new Array(120).fill(null).map(()=>Math.floor(Math.random()*4)*1.5)}render(n){let{x:h,y:a,height:u}=this,s=0;for(let l=0;l<this.data.length;l++)l%2===0&&n.fillRect(h+s,a,this.data[l],u),s+=this.data[l]}renderShadow(n){let{x:h,y:a,height:u}=this;n.fillRect(h,a,this.data.reduce((s,l)=>s+l),u)}innerBox(){return{x:this.x,y:this.y,width:this.data.reduce((n,h)=>n+h),height:this.height}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}toObject(){return super.toObject({content:this.content,codeType:this.codeType})}};g(P,"TsplBarcode");var F=P,ct=["128","128M","EAN128","EAN128M","25","25C","25S","25I","39","39C","93","EAN13","EAN13+2","EAN13+5","EAN8","EAN8+2","EAN8+5","CODA","POST","UPCA","UPCA+2","UPA+5","UPCE","UPCE+2","UPE+5","MSI","MSIC","PLESSEY","CPOST","ITF14","EAN14","11","TELEPEN","TELEPENN","PLANET","CODE49","DPI","DPL","LOGMARS"];var T=class T extends R{constructor(){super(...arguments);this.type="box"}};g(T,"Box");var U=T;import{Shape as V}from"@sunspots/core";var z=class z extends V{constructor(){super(...arguments);this.type="circle"}render(n){let{x:h,y:a,radius:u,stroke:s,strokeWidth:l}=this;n.beginPath(),n.arc(h,a,u,0,Math.PI*2,!1),n.fill(),s&&(n.lineWidth=l!=null?l:1,n.stroke()),n.closePath()}innerBox(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}setWidth(n){this.width=n,this.radius=n/2}setHeight(n){this.height=n,this.radius=n/2}};g(z,"Circle");var W=z;import{Color as $,Shape as J}from"@sunspots/core";var x;(u=>{let s=class s{constructor(t,i,e,o){this.version=t;this.errorCorrectionLevel=i;this.modules=[];this.isFunction=[];if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let r=[];for(let d=0;d<this.size;d++)r.push(!1);for(let d=0;d<this.size;d++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();let c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let d=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);let p=this.getPenaltyScore();p<d&&(o=m,d=p),this.applyMask(m)}}h(o>=0&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(t,i){let e=u.QrSegment.makeSegments(t);return s.encodeSegments(e,i)}static encodeBinary(t,i){let e=u.QrSegment.makeBytes(t);return s.encodeSegments([e],i)}static encodeSegments(t,i,e=1,o=40,r=-1,c=!0){if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||r<-1||r>7)throw new RangeError("Invalid value");let d,m;for(d=e;;d++){let b=s.getNumDataCodewords(d,i)*8,C=a.getTotalBits(t,d);if(C<=b){m=C;break}if(d>=o)throw new RangeError("Data too long")}for(let b of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&m<=s.getNumDataCodewords(d,b)*8&&(i=b);let p=[];for(let b of t){f(b.mode.modeBits,4,p),f(b.numChars,b.mode.numCharCountBits(d),p);for(let C of b.getData())p.push(C)}h(p.length==m);let M=s.getNumDataCodewords(d,i)*8;h(p.length<=M),f(0,Math.min(4,M-p.length),p),f(0,(8-p.length%8)%8,p),h(p.length%8==0);for(let b=236;p.length<M;b^=253)f(b,8,p);let v=[];for(;v.length*8<p.length;)v.push(0);return p.forEach((b,C)=>v[C>>>3]|=b<<7-(C&7)),new s(d,i,v,r)}getModule(t,i){return t>=0&&t<this.size&&i>=0&&i<this.size&&this.modules[i][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),i=t.length;for(let e=0;e<i;e++)for(let o=0;o<i;o++)e==0&&o==0||e==0&&o==i-1||e==i-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let i=this.errorCorrectionLevel.formatBits<<3|t,e=i;for(let r=0;r<10;r++)e=e<<1^(e>>>9)*1335;let o=(i<<10|e)^21522;h(o>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(o,r));this.setFunctionModule(8,7,n(o,6)),this.setFunctionModule(8,8,n(o,7)),this.setFunctionModule(7,8,n(o,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(o,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(o,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(o,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;let i=this.version<<12|t;h(i>>>18==0);for(let e=0;e<18;e++){let o=n(i,e),r=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(r,c,o),this.setFunctionModule(c,r,o)}}drawFinderPattern(t,i){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){let r=Math.max(Math.abs(o),Math.abs(e)),c=t+o,d=i+e;c>=0&&c<this.size&&d>=0&&d<this.size&&this.setFunctionModule(c,d,r!=2&&r!=4)}}drawAlignmentPattern(t,i){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,i+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,i,e){this.modules[i][t]=e,this.isFunction[i][t]=!0}addEccAndInterleave(t){let i=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(i,e))throw new RangeError("Invalid argument");let o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][i],r=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][i],c=Math.floor(s.getNumRawDataModules(i)/8),d=o-c%o,m=Math.floor(c/o),p=[],M=s.reedSolomonComputeDivisor(r);for(let b=0,C=0;b<o;b++){let w=t.slice(C,C+m-r+(b<d?0:1));C+=w.length;let j=s.reedSolomonComputeRemainder(w,M);b<d&&w.push(0),p.push(w.concat(j))}let v=[];for(let b=0;b<p[0].length;b++)p.forEach((C,w)=>{(b!=m-r||w>=d)&&v.push(C[b])});return h(v.length==c),v}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let r=0;r<2;r++){let c=e-r,m=(e+1&2)==0?this.size-1-o:o;!this.isFunction[m][c]&&i<t.length*8&&(this.modules[m][c]=n(t[i>>>3],7-(i&7)),i++)}}h(i==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+i)%2==0;break;case 1:o=i%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+i)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(i/2))%2==0;break;case 5:o=e*i%2+e*i%3==0;break;case 6:o=(e*i%2+e*i%3)%2==0;break;case 7:o=((e+i)%2+e*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][e]&&o&&(this.modules[i][e]=!this.modules[i][e])}}getPenaltyScore(){let t=0;for(let r=0;r<this.size;r++){let c=!1,d=0,m=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[r][p]==c?(d++,d==5?t+=s.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,m),c||(t+=this.finderPenaltyCountPatterns(m)*s.PENALTY_N3),c=this.modules[r][p],d=1);t+=this.finderPenaltyTerminateAndCount(c,d,m)*s.PENALTY_N3}for(let r=0;r<this.size;r++){let c=!1,d=0,m=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][r]==c?(d++,d==5?t+=s.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,m),c||(t+=this.finderPenaltyCountPatterns(m)*s.PENALTY_N3),c=this.modules[p][r],d=1);t+=this.finderPenaltyTerminateAndCount(c,d,m)*s.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let c=0;c<this.size-1;c++){let d=this.modules[r][c];d==this.modules[r][c+1]&&d==this.modules[r+1][c]&&d==this.modules[r+1][c+1]&&(t+=s.PENALTY_N2)}let i=0;for(let r of this.modules)i=r.reduce((c,d)=>c+(d?1:0),i);let e=this.size*this.size,o=Math.ceil(Math.abs(i*20-e*10)/e)-1;return h(o>=0&&o<=9),t+=o*s.PENALTY_N4,h(t>=0&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{let t=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=i)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*t+128)*t+64;if(t>=2){let e=Math.floor(t/7)+2;i-=(25*e-10)*e-55,t>=7&&(i-=36)}return h(i>=208&&i<=29648),i}static getNumDataCodewords(t,i){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[i.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let i=[];for(let o=0;o<t-1;o++)i.push(0);i.push(1);let e=1;for(let o=0;o<t;o++){for(let r=0;r<i.length;r++)i[r]=s.reedSolomonMultiply(i[r],e),r+1<i.length&&(i[r]^=i[r+1]);e=s.reedSolomonMultiply(e,2)}return i}static reedSolomonComputeRemainder(t,i){let e=i.map(o=>0);for(let o of t){let r=o^e.shift();e.push(0),i.forEach((c,d)=>e[d]^=s.reedSolomonMultiply(c,r))}return e}static reedSolomonMultiply(t,i){if(t>>>8||i>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(i>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){let i=t[1];h(i<=this.size*3);let e=i>0&&t[2]==i&&t[3]==i*3&&t[4]==i&&t[5]==i;return(e&&t[0]>=i*4&&t[6]>=i?1:0)+(e&&t[6]>=i*4&&t[0]>=i?1:0)}finderPenaltyTerminateAndCount(t,i,e){return t&&(this.finderPenaltyAddHistory(i,e),i=0),i+=this.size,this.finderPenaltyAddHistory(i,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,i){i[0]==0&&(t+=this.size),i.pop(),i.unshift(t)}};g(s,"QrCode"),s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let E=s;u.QrCode=s;function f(y,t,i){if(t<0||t>31||y>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)i.push(y>>>e&1)}g(f,"appendBits");function n(y,t){return(y>>>t&1)!=0}g(n,"getBit");function h(y){if(!y)throw new Error("Assertion error")}g(h,"assert");let l=class l{constructor(t,i,e){this.mode=t;this.numChars=i;this.bitData=e;if(i<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}static makeBytes(t){let i=[];for(let e of t)f(e,8,i);return new l(l.Mode.BYTE,t.length,i)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");let i=[];for(let e=0;e<t.length;){let o=Math.min(t.length-e,3);f(parseInt(t.substring(e,e+o),10),o*3+1,i),e+=o}return new l(l.Mode.NUMERIC,t.length,i)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),f(o,11,i)}return e<t.length&&f(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,i),new l(l.Mode.ALPHANUMERIC,t.length,i)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){let i=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)f(t,8,i);else if(t<16384)f(2,2,i),f(t,14,i);else if(t<1e6)f(6,3,i),f(t,21,i);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,i)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,i){let e=0;for(let o of t){let r=o.mode.numCharCountBits(i);if(o.numChars>=1<<r)return 1/0;e+=4+r+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);let i=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?i.push(t.charCodeAt(e)):(i.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return i}};g(l,"QrSegment"),l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let a=l;u.QrSegment=l})(x||(x={}));(f=>{let E;(h=>{let a=class a{constructor(s,l){this.ordinal=s;this.formatBits=l}};g(a,"Ecc"),a.LOW=new a(0,1),a.MEDIUM=new a(1,0),a.QUARTILE=new a(2,3),a.HIGH=new a(3,2);let n=a;h.Ecc=a})(E=f.QrCode||(f.QrCode={}))})(x||(x={}));(f=>{let E;(h=>{let a=class a{constructor(s,l){this.modeBits=s;this.numBitsCharCount=l}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};g(a,"Mode"),a.NUMERIC=new a(1,[10,12,14]),a.ALPHANUMERIC=new a(2,[9,11,13]),a.BYTE=new a(4,[8,16,16]),a.KANJI=new a(8,[8,10,12]),a.ECI=new a(7,[0,0,0]);let n=a;h.Mode=a})(E=f.QrSegment||(f.QrSegment={}))})(x||(x={}));var S=x;var Z={L:S.QrCode.Ecc.LOW,M:S.QrCode.Ecc.MEDIUM,Q:S.QrCode.Ecc.QUARTILE,H:S.QrCode.Ecc.HIGH};function I(E,f){return S.QrCode.encodeText(E,Z[f])}g(I,"createQr");var O=class O extends J{constructor(n){super(n);this.config=n;this.type="qrcode";this.fill="#000000";this.resizable=!1;this.moduleSize=6;this.padding=1;this.qr=I(this.content,this.level);Object.assign(this,n)}get content(){return this.config.content}set content(n){this.config.content=n,this.qr=I(this.content,this.level)}get level(){var n;return(n=this.config.level)!=null?n:"M"}set level(n){this.config.level=n,this.qr=I(this.content,this.level)}render(n){let{x:h,y:a,qr:u,padding:s,moduleSize:l}=this;for(let y=0;y<u.size;y++)for(let t=0;t<u.size;t++)n.fillStyle=u.getModule(t,y)?"#000000":$.Transparent,n.fillRect(h+(t+s)*l,a+(y+s)*l,l,l)}renderShadow(n){let{x:h,y:a,qr:u,padding:s,moduleSize:l}=this,y=(u.size+s*2)*l;n.fillRect(h,a,y,y)}innerBox(){let{x:n,y:h,qr:a,padding:u,moduleSize:s}=this,l=(a.size+u*2)*s;return{x:n,y:h,width:l,height:l}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}toObject(){return super.toObject({content:this.content,moduleSize:this.moduleSize,level:this.level})}};g(O,"Qrcode");var Q=O;import{Shape as q,withPixel as H}from"@sunspots/core";var L=class L extends q{constructor(n){super(n);this.type="text";this.resizable=!1;Object.assign(this,n)}get width(){var n;return(n=this.config.width)!=null?n:0}set width(n){this.config.width=n}get height(){var n;return(n=this.fontSize)!=null?n:0}set height(n){}render(n){let{x:h,y:a,content:u,fontSize:s,fontStyle:l,fontWeight:y,fontFamily:t,maxWidth:i,algin:e}=this;n.textAlign=e!=null?e:"left",n.textBaseline="top",n.font=[l,y,H(s),t!=null?t:"sans-serif"].filter(Boolean).join(" "),n.fillText(u,h,a,i)}innerBox(){var n;return{x:this.x,y:this.y,width:(n=this.width)!=null?n:0,height:this.fontSize}}boundingBox(){return this.innerBox()}textWidth(){let n=this.stage.draftContext,{content:h,fontSize:a,fontStyle:u,fontWeight:s,fontFamily:l}=this;n.font=[u,s,H(a),l!=null?l:"sans-serif"].filter(Boolean).join(" ");let{width:y}=n.measureText(h);return y}renderShadow(n){let{x:h,y:a,fontSize:u}=this,s=this.textWidth();n.fillRect(h,a,s,u),this.width=s}setWidth(n){this.width=this.textWidth()}setHeight(n){this.height=n,this.fontSize=n}toObject(n={}){return Object.assign(super.toObject({content:this.content,fontSize:this.fontSize}),n)}};g(L,"Text");var A=L;var D=class D extends A{constructor(n){super(n);this.scale=1;Object.assign(this,n)}toObject(){return super.toObject({scale:this.scale,font:this.font})}};g(D,"TsplText");var Y=D,kt=new Map([["TSS16.BF2",16],["TSS24.BF2",24],["TSS32.BF2",32]]);export{k as Bar,U as Box,W as Circle,Q as Qrcode,R as Rect,ct as TSPL_BARCODE_TYPES,kt as TSPL_FONT_MAP,A as Text,F as TsplBarcode,Y as TsplText};
|
|
1
|
+
var X=Object.defineProperty;var g=(x,f)=>X(x,"name",{value:f,configurable:!0});import{Shape as G}from"@sunspots/core";var N=class N extends G{constructor(){super(...arguments);this.type="rect"}render(n){let{x:h,y:a,width:u,height:s,stroke:l}=this;n.fillRect(h,a,u,s),l&&n.strokeRect(h,a,u,s)}innerBox(){return{x:this.x,y:this.y,width:this.width,height:this.height}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}};g(N,"Rect");var R=N;var B=class B extends R{constructor(){super(...arguments);this.type="bar"}};g(B,"Bar");var k=B;import{Shape as K}from"@sunspots/core";var P=class P extends K{constructor(){super(...arguments);this.type="barcode";this.fill="#000000";this.data=new Array(120).fill(null).map(()=>Math.floor(Math.random()*4)*1.5)}render(n){let{x:h,y:a,height:u}=this,s=0;for(let l=0;l<this.data.length;l++)l%2===0&&n.fillRect(h+s,a,this.data[l],u),s+=this.data[l]}renderShadow(n){let{x:h,y:a,height:u}=this;n.fillRect(h,a,this.data.reduce((s,l)=>s+l),u)}innerBox(){return{x:this.x,y:this.y,width:this.data.reduce((n,h)=>n+h),height:this.height}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}toObject(){return super.toObject({content:this.content,codeType:this.codeType})}};g(P,"TsplBarcode");var F=P,ct=["128","128M","EAN128","EAN128M","25","25C","25S","25I","39","39C","93","EAN13","EAN13+2","EAN13+5","EAN8","EAN8+2","EAN8+5","CODA","POST","UPCA","UPCA+2","UPA+5","UPCE","UPCE+2","UPE+5","MSI","MSIC","PLESSEY","CPOST","ITF14","EAN14","11","TELEPEN","TELEPENN","PLANET","CODE49","DPI","DPL","LOGMARS"];var T=class T extends R{constructor(){super(...arguments);this.type="box"}};g(T,"Box");var U=T;import{Shape as V}from"@sunspots/core";var z=class z extends V{constructor(){super(...arguments);this.type="circle"}render(n){let{x:h,y:a,radius:u,stroke:s,strokeWidth:l}=this;n.beginPath(),n.arc(h,a,u,0,Math.PI*2,!1),n.fill(),s&&(n.lineWidth=l!=null?l:1,n.stroke()),n.closePath()}innerBox(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}setWidth(n){this.width=n,this.radius=n/2}setHeight(n){this.height=n,this.radius=n/2}};g(z,"Circle");var W=z;import{Color as $,Shape as J}from"@sunspots/core";var E;(u=>{let s=class s{constructor(t,i,e,o){this.version=t;this.errorCorrectionLevel=i;this.modules=[];this.isFunction=[];if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let r=[];for(let d=0;d<this.size;d++)r.push(!1);for(let d=0;d<this.size;d++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();let c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let d=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);let p=this.getPenaltyScore();p<d&&(o=m,d=p),this.applyMask(m)}}h(o>=0&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(t,i){let e=u.QrSegment.makeSegments(t);return s.encodeSegments(e,i)}static encodeBinary(t,i){let e=u.QrSegment.makeBytes(t);return s.encodeSegments([e],i)}static encodeSegments(t,i,e=1,o=40,r=-1,c=!0){if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||r<-1||r>7)throw new RangeError("Invalid value");let d,m;for(d=e;;d++){let b=s.getNumDataCodewords(d,i)*8,C=a.getTotalBits(t,d);if(C<=b){m=C;break}if(d>=o)throw new RangeError("Data too long")}for(let b of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&m<=s.getNumDataCodewords(d,b)*8&&(i=b);let p=[];for(let b of t){f(b.mode.modeBits,4,p),f(b.numChars,b.mode.numCharCountBits(d),p);for(let C of b.getData())p.push(C)}h(p.length==m);let M=s.getNumDataCodewords(d,i)*8;h(p.length<=M),f(0,Math.min(4,M-p.length),p),f(0,(8-p.length%8)%8,p),h(p.length%8==0);for(let b=236;p.length<M;b^=253)f(b,8,p);let v=[];for(;v.length*8<p.length;)v.push(0);return p.forEach((b,C)=>v[C>>>3]|=b<<7-(C&7)),new s(d,i,v,r)}getModule(t,i){return t>=0&&t<this.size&&i>=0&&i<this.size&&this.modules[i][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),i=t.length;for(let e=0;e<i;e++)for(let o=0;o<i;o++)e==0&&o==0||e==0&&o==i-1||e==i-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let i=this.errorCorrectionLevel.formatBits<<3|t,e=i;for(let r=0;r<10;r++)e=e<<1^(e>>>9)*1335;let o=(i<<10|e)^21522;h(o>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(o,r));this.setFunctionModule(8,7,n(o,6)),this.setFunctionModule(8,8,n(o,7)),this.setFunctionModule(7,8,n(o,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(o,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(o,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(o,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;let i=this.version<<12|t;h(i>>>18==0);for(let e=0;e<18;e++){let o=n(i,e),r=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(r,c,o),this.setFunctionModule(c,r,o)}}drawFinderPattern(t,i){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){let r=Math.max(Math.abs(o),Math.abs(e)),c=t+o,d=i+e;c>=0&&c<this.size&&d>=0&&d<this.size&&this.setFunctionModule(c,d,r!=2&&r!=4)}}drawAlignmentPattern(t,i){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,i+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,i,e){this.modules[i][t]=e,this.isFunction[i][t]=!0}addEccAndInterleave(t){let i=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(i,e))throw new RangeError("Invalid argument");let o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][i],r=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][i],c=Math.floor(s.getNumRawDataModules(i)/8),d=o-c%o,m=Math.floor(c/o),p=[],M=s.reedSolomonComputeDivisor(r);for(let b=0,C=0;b<o;b++){let w=t.slice(C,C+m-r+(b<d?0:1));C+=w.length;let j=s.reedSolomonComputeRemainder(w,M);b<d&&w.push(0),p.push(w.concat(j))}let v=[];for(let b=0;b<p[0].length;b++)p.forEach((C,w)=>{(b!=m-r||w>=d)&&v.push(C[b])});return h(v.length==c),v}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let r=0;r<2;r++){let c=e-r,m=(e+1&2)==0?this.size-1-o:o;!this.isFunction[m][c]&&i<t.length*8&&(this.modules[m][c]=n(t[i>>>3],7-(i&7)),i++)}}h(i==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+i)%2==0;break;case 1:o=i%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+i)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(i/2))%2==0;break;case 5:o=e*i%2+e*i%3==0;break;case 6:o=(e*i%2+e*i%3)%2==0;break;case 7:o=((e+i)%2+e*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][e]&&o&&(this.modules[i][e]=!this.modules[i][e])}}getPenaltyScore(){let t=0;for(let r=0;r<this.size;r++){let c=!1,d=0,m=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[r][p]==c?(d++,d==5?t+=s.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,m),c||(t+=this.finderPenaltyCountPatterns(m)*s.PENALTY_N3),c=this.modules[r][p],d=1);t+=this.finderPenaltyTerminateAndCount(c,d,m)*s.PENALTY_N3}for(let r=0;r<this.size;r++){let c=!1,d=0,m=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][r]==c?(d++,d==5?t+=s.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,m),c||(t+=this.finderPenaltyCountPatterns(m)*s.PENALTY_N3),c=this.modules[p][r],d=1);t+=this.finderPenaltyTerminateAndCount(c,d,m)*s.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let c=0;c<this.size-1;c++){let d=this.modules[r][c];d==this.modules[r][c+1]&&d==this.modules[r+1][c]&&d==this.modules[r+1][c+1]&&(t+=s.PENALTY_N2)}let i=0;for(let r of this.modules)i=r.reduce((c,d)=>c+(d?1:0),i);let e=this.size*this.size,o=Math.ceil(Math.abs(i*20-e*10)/e)-1;return h(o>=0&&o<=9),t+=o*s.PENALTY_N4,h(t>=0&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{let t=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=i)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*t+128)*t+64;if(t>=2){let e=Math.floor(t/7)+2;i-=(25*e-10)*e-55,t>=7&&(i-=36)}return h(i>=208&&i<=29648),i}static getNumDataCodewords(t,i){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[i.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let i=[];for(let o=0;o<t-1;o++)i.push(0);i.push(1);let e=1;for(let o=0;o<t;o++){for(let r=0;r<i.length;r++)i[r]=s.reedSolomonMultiply(i[r],e),r+1<i.length&&(i[r]^=i[r+1]);e=s.reedSolomonMultiply(e,2)}return i}static reedSolomonComputeRemainder(t,i){let e=i.map(o=>0);for(let o of t){let r=o^e.shift();e.push(0),i.forEach((c,d)=>e[d]^=s.reedSolomonMultiply(c,r))}return e}static reedSolomonMultiply(t,i){if(t>>>8||i>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(i>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){let i=t[1];h(i<=this.size*3);let e=i>0&&t[2]==i&&t[3]==i*3&&t[4]==i&&t[5]==i;return(e&&t[0]>=i*4&&t[6]>=i?1:0)+(e&&t[6]>=i*4&&t[0]>=i?1:0)}finderPenaltyTerminateAndCount(t,i,e){return t&&(this.finderPenaltyAddHistory(i,e),i=0),i+=this.size,this.finderPenaltyAddHistory(i,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,i){i[0]==0&&(t+=this.size),i.pop(),i.unshift(t)}};g(s,"QrCode"),s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let x=s;u.QrCode=s;function f(y,t,i){if(t<0||t>31||y>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)i.push(y>>>e&1)}g(f,"appendBits");function n(y,t){return(y>>>t&1)!=0}g(n,"getBit");function h(y){if(!y)throw new Error("Assertion error")}g(h,"assert");let l=class l{constructor(t,i,e){this.mode=t;this.numChars=i;this.bitData=e;if(i<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}static makeBytes(t){let i=[];for(let e of t)f(e,8,i);return new l(l.Mode.BYTE,t.length,i)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");let i=[];for(let e=0;e<t.length;){let o=Math.min(t.length-e,3);f(parseInt(t.substring(e,e+o),10),o*3+1,i),e+=o}return new l(l.Mode.NUMERIC,t.length,i)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),f(o,11,i)}return e<t.length&&f(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,i),new l(l.Mode.ALPHANUMERIC,t.length,i)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){let i=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)f(t,8,i);else if(t<16384)f(2,2,i),f(t,14,i);else if(t<1e6)f(6,3,i),f(t,21,i);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,i)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,i){let e=0;for(let o of t){let r=o.mode.numCharCountBits(i);if(o.numChars>=1<<r)return 1/0;e+=4+r+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);let i=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?i.push(t.charCodeAt(e)):(i.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return i}};g(l,"QrSegment"),l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let a=l;u.QrSegment=l})(E||(E={}));(f=>{let x;(h=>{let a=class a{constructor(s,l){this.ordinal=s;this.formatBits=l}};g(a,"Ecc"),a.LOW=new a(0,1),a.MEDIUM=new a(1,0),a.QUARTILE=new a(2,3),a.HIGH=new a(3,2);let n=a;h.Ecc=a})(x=f.QrCode||(f.QrCode={}))})(E||(E={}));(f=>{let x;(h=>{let a=class a{constructor(s,l){this.modeBits=s;this.numBitsCharCount=l}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};g(a,"Mode"),a.NUMERIC=new a(1,[10,12,14]),a.ALPHANUMERIC=new a(2,[9,11,13]),a.BYTE=new a(4,[8,16,16]),a.KANJI=new a(8,[8,10,12]),a.ECI=new a(7,[0,0,0]);let n=a;h.Mode=a})(x=f.QrSegment||(f.QrSegment={}))})(E||(E={}));var S=E;var Z={L:S.QrCode.Ecc.LOW,M:S.QrCode.Ecc.MEDIUM,Q:S.QrCode.Ecc.QUARTILE,H:S.QrCode.Ecc.HIGH};function I(x,f){return S.QrCode.encodeText(x,Z[f])}g(I,"createQr");var O=class O extends J{constructor(n){super(n);this.config=n;this.type="qrcode";this.fill="#000000";this.resizable=!1;this.moduleSize=6;this.padding=1;this.qr=I(this.content,this.level);Object.assign(this,n)}get content(){return this.config.content}set content(n){this.config.content=n,this.qr=I(this.content,this.level)}get level(){var n;return(n=this.config.level)!=null?n:"M"}set level(n){this.config.level=n,this.qr=I(this.content,this.level)}render(n){let{x:h,y:a,qr:u,padding:s,moduleSize:l}=this;for(let y=0;y<u.size;y++)for(let t=0;t<u.size;t++)n.fillStyle=u.getModule(t,y)?"#000000":$.Transparent,n.fillRect(h+(t+s)*l,a+(y+s)*l,l,l)}renderShadow(n){let{x:h,y:a,qr:u,padding:s,moduleSize:l}=this,y=(u.size+s*2)*l;n.fillRect(h,a,y,y)}innerBox(){let{x:n,y:h,qr:a,padding:u,moduleSize:s}=this,l=(a.size+u*2)*s;return{x:n,y:h,width:l,height:l}}boundingBox(){var u;let n=this.innerBox(),h=(u=this.strokeWidth)!=null?u:0,a=h/2;return n.x-=a,n.y-=a,n.width+=h,n.height+=h,n}toObject(){return super.toObject({content:this.content,moduleSize:this.moduleSize,level:this.level})}};g(O,"Qrcode");var Q=O;import{Shape as q,withPixel as H}from"@sunspots/core";var L=class L extends q{constructor(n){super(n);this.type="text";this.resizable=!1;Object.assign(this,n)}get width(){var n;return(n=this.config.width)!=null?n:0}set width(n){this.config.width=n}get height(){var n;return(n=this.fontSize)!=null?n:0}set height(n){}render(n){let{x:h,y:a,content:u,fontSize:s,fontStyle:l,fontWeight:y,fontFamily:t,maxWidth:i,algin:e}=this;n.textAlign=e!=null?e:"left",n.textBaseline="top",n.font=[l,y,H(s),t!=null?t:"sans-serif"].filter(Boolean).join(" "),n.fillText(u,h,a,i)}innerBox(){var n;return this.width=this.textWidth(),{x:this.x,y:this.y,width:(n=this.width)!=null?n:0,height:this.fontSize}}boundingBox(){return this.innerBox()}textWidth(){let n=this.stage.draftContext,{content:h,fontSize:a,fontStyle:u,fontWeight:s,fontFamily:l}=this;n.font=[u,s,H(a),l!=null?l:"sans-serif"].filter(Boolean).join(" ");let{width:y}=n.measureText(h);return y}renderShadow(n){let{x:h,y:a,fontSize:u}=this,s=this.textWidth();n.fillRect(h,a,s,u),this.width=s}setWidth(n){this.width=this.textWidth()}setHeight(n){this.height=n,this.fontSize=n}toObject(n={}){return Object.assign(super.toObject({content:this.content,fontSize:this.fontSize}),n)}};g(L,"Text");var A=L;var D=class D extends A{constructor(n){super(n);this.scale=1;Object.assign(this,n)}toObject(){return super.toObject({scale:this.scale,font:this.font})}};g(D,"TsplText");var Y=D,kt=new Map([["TSS16.BF2",16],["TSS24.BF2",24],["TSS32.BF2",32]]);export{k as Bar,U as Box,W as Circle,Q as Qrcode,R as Rect,ct as TSPL_BARCODE_TYPES,kt as TSPL_FONT_MAP,A as Text,F as TsplBarcode,Y as TsplText};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunspots/shapes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@sunspots/core": "0.0.
|
|
29
|
+
"@sunspots/core": "0.0.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "9e5ad7585d7c0cf4984d35ca43ef2d6b8ebe4ba4"
|
|
32
32
|
}
|