tsquare 0.14.0 → 0.14.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.
- package/CHANGELOG.md +7 -0
- package/dist/playground/playground.js +18 -18
- package/dist/tsquare.min.js +1 -1
- package/package.json +2 -2
package/dist/tsquare.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tsquare 0.14.
|
|
1
|
+
/*! tsquare 0.14.1 | MIT | https://tsquare.dev | bundled packages' licenses are at the end of this file */
|
|
2
2
|
"use strict";var tsquare=(()=>{var B11=Object.create;var I8=Object.defineProperty;var L11=Object.getOwnPropertyDescriptor;var S11=Object.getOwnPropertyNames;var H11=Object.getPrototypeOf,V11=Object.prototype.hasOwnProperty;var D11=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(c){throw r=[c],c}};var D0=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},_2=(t,e)=>{for(var r in e)I8(t,r,{get:e[r],enumerable:!0})},Um=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S11(e))!V11.call(t,a)&&a!==r&&I8(t,a,{get:()=>e[a],enumerable:!(c=L11(e,a))||c.enumerable});return t};var k0=(t,e,r)=>(r=t!=null?B11(H11(t)):{},Um(e||!t||!t.__esModule?I8(r,"default",{value:t,enumerable:!0}):r,t)),F11=t=>Um(I8({},"__esModule",{value:!0}),t);var k8=Uint8Array.fromBase64||(()=>{for(var t=new Uint8Array(128),e=0;e<64;e++)t[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return r=>{for(var c=r.length,a=new Uint8Array((c-(r[c-1]=="=")-(r[c-2]=="="))*3/4|0),s=0,o=0;s<c;){var l=t[r.charCodeAt(s++)],i=t[r.charCodeAt(s++)],n=t[r.charCodeAt(s++)],h=t[r.charCodeAt(s++)];a[o++]=l<<2|i>>4,a[o++]=i<<4|n>>2,a[o++]=n<<6|h}return a}})();var ag=D0((cn1,eg)=>{var ba=0,Wm=-3;function B6(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Q11(t,e){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new B6,this.dtree=new B6}var Km=new B6,Jm=new B6,Ca=new Uint8Array(30),wa=new Uint16Array(30),Ym=new Uint8Array(30),Xm=new Uint16Array(30),Z11=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gm=new B6,u3=new Uint8Array(320);function tg(t,e,r,c){var a,s;for(a=0;a<r;++a)t[a]=0;for(a=0;a<30-r;++a)t[a+r]=a/r|0;for(s=c,a=0;a<30;++a)e[a]=s,s+=1<<t[a]}function P11(t,e){var r;for(r=0;r<7;++r)t.table[r]=0;for(t.table[7]=24,t.table[8]=152,t.table[9]=112,r=0;r<24;++r)t.trans[r]=256+r;for(r=0;r<144;++r)t.trans[24+r]=r;for(r=0;r<8;++r)t.trans[168+r]=280+r;for(r=0;r<112;++r)t.trans[176+r]=144+r;for(r=0;r<5;++r)e.table[r]=0;for(e.table[5]=32,r=0;r<32;++r)e.trans[r]=r}var jm=new Uint16Array(16);function za(t,e,r,c){var a,s;for(a=0;a<16;++a)t.table[a]=0;for(a=0;a<c;++a)t.table[e[r+a]]++;for(t.table[0]=0,s=0,a=0;a<16;++a)jm[a]=s,s+=t.table[a];for(a=0;a<c;++a)e[r+a]&&(t.trans[jm[e[r+a]]++]=a)}function $11(t){t.bitcount--||(t.tag=t.source[t.sourceIndex++],t.bitcount=7);var e=t.tag&1;return t.tag>>>=1,e}function p3(t,e,r){if(!e)return r;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var c=t.tag&65535>>>16-e;return t.tag>>>=e,t.bitcount-=e,c+r}function Ma(t,e){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var r=0,c=0,a=0,s=t.tag;do c=2*c+(s&1),s>>>=1,++a,r+=e.table[a],c-=e.table[a];while(c>=0);return t.tag=s,t.bitcount-=a,e.trans[r+c]}function T11(t,e,r){var c,a,s,o,l,i;for(c=p3(t,5,257),a=p3(t,5,1),s=p3(t,4,4),o=0;o<19;++o)u3[o]=0;for(o=0;o<s;++o){var n=p3(t,3,0);u3[Z11[o]]=n}for(za(Gm,u3,0,19),l=0;l<c+a;){var h=Ma(t,Gm);switch(h){case 16:var u=u3[l-1];for(i=p3(t,2,3);i;--i)u3[l++]=u;break;case 17:for(i=p3(t,3,3);i;--i)u3[l++]=0;break;case 18:for(i=p3(t,7,11);i;--i)u3[l++]=0;break;default:u3[l++]=h;break}}za(e,u3,0,c),za(r,u3,c,a)}function qm(t,e,r){for(;;){var c=Ma(t,e);if(c===256)return ba;if(c<256)t.dest[t.destLen++]=c;else{var a,s,o,l;for(c-=257,a=p3(t,Ca[c],wa[c]),s=Ma(t,r),o=t.destLen-p3(t,Ym[s],Xm[s]),l=o;l<o+a;++l)t.dest[t.destLen++]=t.dest[l]}}}function _11(t){for(var e,r,c;t.bitcount>8;)t.sourceIndex--,t.bitcount-=8;if(e=t.source[t.sourceIndex+1],e=256*e+t.source[t.sourceIndex],r=t.source[t.sourceIndex+3],r=256*r+t.source[t.sourceIndex+2],e!==(~r&65535))return Wm;for(t.sourceIndex+=4,c=e;c;--c)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,ba}function R11(t,e){var r=new Q11(t,e),c,a,s;do{switch(c=$11(r),a=p3(r,2,0),a){case 0:s=_11(r);break;case 1:s=qm(r,Km,Jm);break;case 2:T11(r,r.ltree,r.dtree),s=qm(r,r.ltree,r.dtree);break;default:s=Wm}if(s!==ba)throw new Error("Data error")}while(!c);return r.destLen<r.dest.length?typeof r.dest.slice=="function"?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}P11(Km,Jm);tg(Ca,wa,4,3);tg(Ym,Xm,2,1);Ca[28]=0;wa[28]=258;eg.exports=R11});var sg=D0((sn1,cg)=>{var O11=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,rg=(t,e,r)=>{let c=t[e];t[e]=t[r],t[r]=c},N11=t=>{let e=t.length;for(let r=0;r<e;r+=4)rg(t,r,r+3),rg(t,r+1,r+2)},U11=t=>{O11&&N11(t)};cg.exports={swap32LE:U11}});var ng=D0((on1,ig)=>{var og=ag(),{swap32LE:G11}=sg(),ka=11,b4=5,j11=ka-b4,q11=65536>>ka,W11=1<<j11,K11=W11-1,E8=2,J11=1<<b4,ya=J11-1,lg=65536>>b4,Y11=1024>>b4,X11=lg+Y11,t01=X11,e01=32,a01=t01+e01,r01=1<<E8,Ia=class{constructor(e){let r=typeof e.readUInt32BE=="function"&&typeof e.slice=="function";if(r||e instanceof Uint8Array){let c;if(r)this.highStart=e.readUInt32LE(0),this.errorValue=e.readUInt32LE(4),c=e.readUInt32LE(8),e=e.slice(12);else{let a=new DataView(e.buffer);this.highStart=a.getUint32(0,!0),this.errorValue=a.getUint32(4,!0),c=a.getUint32(8,!0),e=e.subarray(12)}e=og(e,new Uint8Array(c)),e=og(e,new Uint8Array(c)),G11(e),this.data=new Uint32Array(e.buffer)}else({data:this.data,highStart:this.highStart,errorValue:this.errorValue}=e)}get(e){let r;return e<0||e>1114111?this.errorValue:e<55296||e>56319&&e<=65535?(r=(this.data[e>>b4]<<E8)+(e&ya),this.data[r]):e<=65535?(r=(this.data[lg+(e-55296>>b4)]<<E8)+(e&ya),this.data[r]):e<this.highStart?(r=this.data[a01-q11+(e>>ka)],r=this.data[r+(e>>b4&K11)],r=(r<<E8)+(e&ya),this.data[r]):this.data[this.data.length-r01]}};ig.exports=Ia});var hg=D0(B8=>{var c01="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(t){"use strict";var e=typeof Uint8Array<"u"?Uint8Array:Array,r=43,c=47,a=48,s=97,o=65,l=45,i=95;function n(p){var d=p.charCodeAt(0);if(d===r||d===l)return 62;if(d===c||d===i)return 63;if(d<a)return-1;if(d<a+10)return d-a+26+26;if(d<o+26)return d-o;if(d<s+26)return d-s+26}function h(p){var d,f,m,v,x,z;if(p.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=p.length;x=p.charAt(C-2)==="="?2:p.charAt(C-1)==="="?1:0,z=new e(p.length*3/4-x),m=x>0?p.length-4:p.length;var B=0;function L(k){z[B++]=k}for(d=0,f=0;d<m;d+=4,f+=3)v=n(p.charAt(d))<<18|n(p.charAt(d+1))<<12|n(p.charAt(d+2))<<6|n(p.charAt(d+3)),L((v&16711680)>>16),L((v&65280)>>8),L(v&255);return x===2?(v=n(p.charAt(d))<<2|n(p.charAt(d+1))>>4,L(v&255)):x===1&&(v=n(p.charAt(d))<<10|n(p.charAt(d+1))<<4|n(p.charAt(d+2))>>2,L(v>>8&255),L(v&255)),z}function u(p){var d,f=p.length%3,m="",v,x;function z(B){return c01.charAt(B)}function C(B){return z(B>>18&63)+z(B>>12&63)+z(B>>6&63)+z(B&63)}for(d=0,x=p.length-f;d<x;d+=3)v=(p[d]<<16)+(p[d+1]<<8)+p[d+2],m+=C(v);switch(f){case 1:v=p[p.length-1],m+=z(v>>2),m+=z(v<<4&63),m+="==";break;case 2:v=(p[p.length-2]<<8)+p[p.length-1],m+=z(v>>10),m+=z(v>>4&63),m+=z(v<<2&63),m+="=";break}return m}t.toByteArray=h,t.fromByteArray=u})(typeof B8>"u"?B8.base64js={}:B8)});var Mg=D0((nn1,zg)=>{var Ha=40,Va=41,S8=39,Da=34,Fa=92,M5=47,Qa=44,Za=58,H8=42,A01=117,x01=85,z01=43,M01=/^[a-f0-9?-]+$/i;zg.exports=function(t){for(var e=[],r=t,c,a,s,o,l,i,n,h,u=0,p=r.charCodeAt(u),d=r.length,f=[{nodes:e}],m=0,v,x="",z="",C="";u<d;)if(p<=32){c=u;do c+=1,p=r.charCodeAt(c);while(p<=32);o=r.slice(u,c),s=e[e.length-1],p===Va&&m?C=o:s&&s.type==="div"?(s.after=o,s.sourceEndIndex+=o.length):p===Qa||p===Za||p===M5&&r.charCodeAt(c+1)!==H8&&(!v||v&&v.type==="function"&&v.value!=="calc")?z=o:e.push({type:"space",sourceIndex:u,sourceEndIndex:c,value:o}),u=c}else if(p===S8||p===Da){c=u,a=p===S8?"'":'"',o={type:"string",sourceIndex:u,quote:a};do if(l=!1,c=r.indexOf(a,c+1),~c)for(i=c;r.charCodeAt(i-1)===Fa;)i-=1,l=!l;else r+=a,c=r.length-1,o.unclosed=!0;while(l);o.value=r.slice(u+1,c),o.sourceEndIndex=o.unclosed?c:c+1,e.push(o),u=c+1,p=r.charCodeAt(u)}else if(p===M5&&r.charCodeAt(u+1)===H8)c=r.indexOf("*/",u),o={type:"comment",sourceIndex:u,sourceEndIndex:c+2},c===-1&&(o.unclosed=!0,c=r.length,o.sourceEndIndex=c),o.value=r.slice(u+2,c),e.push(o),u=c+2,p=r.charCodeAt(u);else if((p===M5||p===H8)&&v&&v.type==="function"&&v.value==="calc")o=r[u],e.push({type:"word",sourceIndex:u-z.length,sourceEndIndex:u+o.length,value:o}),u+=1,p=r.charCodeAt(u);else if(p===M5||p===Qa||p===Za)o=r[u],e.push({type:"div",sourceIndex:u-z.length,sourceEndIndex:u+o.length,value:o,before:z,after:""}),z="",u+=1,p=r.charCodeAt(u);else if(Ha===p){c=u;do c+=1,p=r.charCodeAt(c);while(p<=32);if(h=u,o={type:"function",sourceIndex:u-x.length,value:x,before:r.slice(h+1,c)},u=c,x==="url"&&p!==S8&&p!==Da){c-=1;do if(l=!1,c=r.indexOf(")",c+1),~c)for(i=c;r.charCodeAt(i-1)===Fa;)i-=1,l=!l;else r+=")",c=r.length-1,o.unclosed=!0;while(l);n=c;do n-=1,p=r.charCodeAt(n);while(p<=32);h<n?(u!==n+1?o.nodes=[{type:"word",sourceIndex:u,sourceEndIndex:n+1,value:r.slice(u,n+1)}]:o.nodes=[],o.unclosed&&n+1!==c?(o.after="",o.nodes.push({type:"space",sourceIndex:n+1,sourceEndIndex:c,value:r.slice(n+1,c)})):(o.after=r.slice(n+1,c),o.sourceEndIndex=c)):(o.after="",o.nodes=[]),u=c+1,o.sourceEndIndex=o.unclosed?c:u,p=r.charCodeAt(u),e.push(o)}else m+=1,o.after="",o.sourceEndIndex=u+1,e.push(o),f.push(o),e=o.nodes=[],v=o;x=""}else if(Va===p&&m)u+=1,p=r.charCodeAt(u),v.after=C,v.sourceEndIndex+=C.length,C="",m-=1,f[f.length-1].sourceEndIndex=u,f.pop(),v=f[m],e=v.nodes;else{c=u;do p===Fa&&(c+=1),c+=1,p=r.charCodeAt(c);while(c<d&&!(p<=32||p===S8||p===Da||p===Qa||p===Za||p===M5||p===Ha||p===H8&&v&&v.type==="function"&&v.value==="calc"||p===M5&&v.type==="function"&&v.value==="calc"||p===Va&&m));o=r.slice(u,c),Ha===p?x=o:(A01===o.charCodeAt(0)||x01===o.charCodeAt(0))&&z01===o.charCodeAt(1)&&M01.test(o.slice(2))?e.push({type:"unicode-range",sourceIndex:u,sourceEndIndex:c,value:o}):e.push({type:"word",sourceIndex:u,sourceEndIndex:c,value:o}),u=c}for(u=f.length-1;u;u-=1)f[u].unclosed=!0,f[u].sourceEndIndex=r.length;return f[0].nodes}});var Cg=D0((hn1,bg)=>{bg.exports=function t(e,r,c){var a,s,o,l;for(a=0,s=e.length;a<s;a+=1)o=e[a],c||(l=r(o,a,e)),l!==!1&&o.type==="function"&&Array.isArray(o.nodes)&&t(o.nodes,r,c),c&&r(o,a,e)}});var kg=D0((un1,Ig)=>{function wg(t,e){var r=t.type,c=t.value,a,s;return e&&(s=e(t))!==void 0?s:r==="word"||r==="space"?c:r==="string"?(a=t.quote||"",a+c+(t.unclosed?"":a)):r==="comment"?"/*"+c+(t.unclosed?"":"*/"):r==="div"?(t.before||"")+c+(t.after||""):Array.isArray(t.nodes)?(a=yg(t.nodes,e),r!=="function"?a:c+"("+(t.before||"")+a+(t.after||"")+(t.unclosed?"":")")):c}function yg(t,e){var r,c;if(Array.isArray(t)){for(r="",c=t.length-1;~c;c-=1)r=wg(t[c],e)+r;return r}return wg(t,e)}Ig.exports=yg});var Bg=D0((pn1,Eg)=>{var V8=45,D8=43,Pa=46,b01=101,C01=69;function w01(t){var e=t.charCodeAt(0),r;if(e===D8||e===V8){if(r=t.charCodeAt(1),r>=48&&r<=57)return!0;var c=t.charCodeAt(2);return r===Pa&&c>=48&&c<=57}return e===Pa?(r=t.charCodeAt(1),r>=48&&r<=57):e>=48&&e<=57}Eg.exports=function(t){var e=0,r=t.length,c,a,s;if(r===0||!w01(t))return!1;for(c=t.charCodeAt(e),(c===D8||c===V8)&&e++;e<r&&(c=t.charCodeAt(e),!(c<48||c>57));)e+=1;if(c=t.charCodeAt(e),a=t.charCodeAt(e+1),c===Pa&&a>=48&&a<=57)for(e+=2;e<r&&(c=t.charCodeAt(e),!(c<48||c>57));)e+=1;if(c=t.charCodeAt(e),a=t.charCodeAt(e+1),s=t.charCodeAt(e+2),(c===b01||c===C01)&&(a>=48&&a<=57||(a===D8||a===V8)&&s>=48&&s<=57))for(e+=a===D8||a===V8?3:2;e<r&&(c=t.charCodeAt(e),!(c<48||c>57));)e+=1;return{number:t.slice(0,e),unit:t.slice(e)}}});var $a=D0((dn1,Hg)=>{var y01=Mg(),Lg=Cg(),Sg=kg();function O3(t){return this instanceof O3?(this.nodes=y01(t),this):new O3(t)}O3.prototype.toString=function(){return Array.isArray(this.nodes)?Sg(this.nodes):""};O3.prototype.walk=function(t,e){return Lg(this.nodes,t,e),this};O3.unit=Bg();O3.walk=Lg;O3.stringify=Sg;Hg.exports=O3});var Fg=D0((mn1,Dg)=>{"use strict";Dg.exports=function(t){return typeof t=="string"?Vg(t):Ta(t)};function Ta(t){return!t||typeof t!="object"||k01(t)||E01(t)?t:I01(t)?S01(t,Ta):H01(L01(t),function(e,r){var c=Vg(r);return e[c]=Ta(t[r]),e},{})}function Vg(t){return t.replace(/[_.-](\w|$)/g,function(e,r){return r.toUpperCase()})}var I01=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"},k01=function(t){return Object.prototype.toString.call(t)==="[object Date]"},E01=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},B01=Object.prototype.hasOwnProperty,L01=Object.keys||function(t){var e=[];for(var r in t)B01.call(t,r)&&e.push(r);return e};function S01(t,e){if(t.map)return t.map(e);for(var r=[],c=0;c<t.length;c++)r.push(e(t[c],c));return r}function H01(t,e,r){if(t.reduce)return t.reduce(e,r);for(var c=0;c<t.length;c++)r=e(r,t[c],c);return r}});var Qg=D0((gn1,V01)=>{V01.exports={black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"}});var Pg=D0((fn1,Zg)=>{"use strict";Zg.exports=Qg()});var Q8=D0(w5=>{"use strict";Object.defineProperty(w5,"__esModule",{value:!0});function Ua(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var _g=$a(),D01=Ua(_g),F01=Ua(Fg()),Q01=Ua(Pg()),Z01=function(e){return e.type!=="string"?null:e.value.replace(/\\([0-9a-f]{1,6})(?:\s|$)/gi,function(r,c){return String.fromCharCode(parseInt(c,16))}).replace(/\\/g,"")},P01=/^(#(?:[0-9a-f]{3,4}){1,2})$/i,$01=/^(rgba?|hsla?|hwb|lab|lch|gray|color)$/,T01=function(e){return e.type==="word"&&(P01.test(e.value)||e.value in Q01||e.value==="transparent")?e.value:e.type==="function"&&$01.test(e.value)?_g.stringify(e):null},_01=/^(none)$/i,R01=/^(auto)$/i,O01=/(^-?[_a-z][_a-z0-9-]*$)/i,N01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)$/i,U01=/^(0$|(?:[+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?=px$))/i,G01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i,j01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(?:deg|rad))$/i,q01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?%)$/i,Ga=function(e){return function(r){return e(r)?"<token>":null}},W01=function(e){return function(r){return r.type===e?r.value:null}},P0=function(e,r){return r===void 0&&(r=String),function(c){if(c.type!=="word")return null;var a=c.value.match(e);if(a===null)return null;var s=r(a[1]);return s}},N0=Ga(function(t){return t.type==="space"}),Rg=Ga(function(t){return t.type==="div"&&t.value==="/"}),K01=Ga(function(t){return t.type==="div"&&t.value===","}),J01=W01("word"),ja=P0(_01),Oa=P0(R01),C5=P0(N01,Number),S2=P0(U01,Number),k3=P0(G01),Og=P0(j01,function(t){return t.toLowerCase()}),qa=P0(q01),F8=P0(O01),Y01=Z01,H6=T01,Na=P0(/^(none|underline|line-through)$/i),X01=function(e){var r=e.expect(C5);return e.hasTokens()&&(e.expect(Rg),r/=e.expect(C5)),{aspectRatio:r}},t21=P0(/^(solid|dashed|dotted)$/),e21=1,a21="black",r21="solid",c21=function(e){var r,c,a;if(e.matches(ja))return e.expectEmpty(),{borderWidth:0,borderColor:"black",borderStyle:"solid"};for(var s=0;s<3&&e.hasTokens();)s!==0&&e.expect(N0),r===void 0&&e.matches(S2,k3)?r=e.lastValue:c===void 0&&e.matches(H6)?c=e.lastValue:a===void 0&&e.matches(t21)?a=e.lastValue:e.throw(),s+=1;return e.expectEmpty(),r===void 0&&(r=e21),c===void 0&&(c=a21),a===void 0&&(a=r21),{borderWidth:r,borderColor:c,borderStyle:a}},V6=function(e){var r=e.types,c=r===void 0?[S2,k3,qa]:r,a=e.directions,s=a===void 0?["Top","Right","Bottom","Left"]:a,o=e.prefix,l=o===void 0?"":o,i=e.suffix,n=i===void 0?"":i;return function(h){var u,p=[];for(p.push(h.expect.apply(h,c));p.length<4&&h.hasTokens();)h.expect(N0),p.push(h.expect.apply(h,c));h.expectEmpty();var d=p[0],f=p[1],m=f===void 0?d:f,v=p[2],x=v===void 0?d:v,z=p[3],C=z===void 0?m:z,B=function(k){return""+l+s[k]+n};return u={},u[B(0)]=d,u[B(1)]=m,u[B(2)]=x,u[B(3)]=C,u}},Ng=function(e){var r=e.expect(S2),c=e.matches(N0)?e.expect(S2):r;return e.expectEmpty(),{width:r,height:c}},Ug=function(e){var r,c,a,s;if(e.matches(ja))return e.expectEmpty(),{offset:{width:0,height:0},radius:0,color:"black"};for(var o=!1;e.hasTokens();)o&&e.expect(N0),r===void 0&&e.matches(S2,k3)?(r=e.lastValue,e.expect(N0),c=e.expect(S2,k3),e.saveRewindPoint(),e.matches(N0)&&e.matches(S2,k3)?a=e.lastValue:e.rewind()):s===void 0&&e.matches(H6)?s=e.lastValue:e.throw(),o=!0;return r===void 0&&e.throw(),{offset:{width:r,height:c},radius:a!==void 0?a:0,color:s!==void 0?s:"black"}},s21=function(e){var r=Ug(e),c=r.offset,a=r.radius,s=r.color;return{shadowOffset:c,shadowRadius:a,shadowColor:s,shadowOpacity:1}},o21=1,l21=1,i21=0,n21=function(e){var r,c,a;if(e.matches(ja))return e.expectEmpty(),{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(e.saveRewindPoint(),e.matches(Oa)&&!e.hasTokens())return{flexGrow:1,flexShrink:1,flexBasis:"auto"};e.rewind();for(var s=0;s<2&&e.hasTokens();)s!==0&&e.expect(N0),r===void 0&&e.matches(C5)?(r=e.lastValue,e.saveRewindPoint(),e.matches(N0)&&e.matches(C5)?c=e.lastValue:e.rewind()):a===void 0&&e.matches(S2,k3,qa)?a=e.lastValue:a===void 0&&e.matches(Oa)?a="auto":e.throw(),s+=1;return e.expectEmpty(),r===void 0&&(r=o21),c===void 0&&(c=l21),a===void 0&&(a=i21),{flexGrow:r,flexShrink:c,flexBasis:a}},h21=P0(/(nowrap|wrap|wrap-reverse)/),u21=P0(/(row|row-reverse|column|column-reverse)/),p21="nowrap",d21="row",m21=function(e){for(var r,c,a=0;a<2&&e.hasTokens();)a!==0&&e.expect(N0),r===void 0&&e.matches(h21)?r=e.lastValue:c===void 0&&e.matches(u21)?c=e.lastValue:e.throw(),a+=1;return e.expectEmpty(),r===void 0&&(r=p21),c===void 0&&(c=d21),{flexWrap:r,flexDirection:c}},Gg=function(e){var r;if(e.matches(Y01))r=e.lastValue;else for(r=e.expect(F8);e.hasTokens();){e.expect(N0);var c=e.expect(F8);r+=" "+c}return e.expectEmpty(),{fontFamily:r}},g21=P0(/^(normal)$/),f21=P0(/^(italic)$/),v21=P0(/^([1-9]00|bold)$/),A21=P0(/^(small-caps)$/),x21="normal",z21="normal",M21=[],b21=function(e){for(var r,c,a,s,o=0;o<3&&e.hasTokens();){if(!e.matches(g21))if(r===void 0&&e.matches(f21))r=e.lastValue;else if(c===void 0&&e.matches(v21))c=e.lastValue;else if(a===void 0&&e.matches(A21))a=[e.lastValue];else break;e.expect(N0),o+=1}var l=e.expect(S2,k3);e.matches(Rg)&&(s=e.expect(S2,k3)),e.expect(N0);var i=Gg(e),n=i.fontFamily;r===void 0&&(r=x21),c===void 0&&(c=z21),a===void 0&&(a=M21);var h={fontStyle:r,fontWeight:c,fontVariant:a,fontSize:l,fontFamily:n};return s!==void 0&&(h.lineHeight=s),h},C21=function(e){for(var r=[e.expect(F8)];e.hasTokens();)e.expect(N0),r.push(e.expect(F8));return{fontVariant:r}},w21=P0(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/),y21=P0(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/),I21=function(e){var r=e.expect(w21),c;return e.hasTokens()?(e.expect(N0),c=e.expect(y21)):c="stretch",e.expectEmpty(),{alignContent:r,justifyContent:c}},k21=P0(/^(solid|double|dotted|dashed)$/),E21="none",B21="solid",L21="black",S21=function(e){for(var r,c,a,s=!1;e.hasTokens();){if(s&&e.expect(N0),r===void 0&&e.matches(Na)){var o=[e.lastValue.toLowerCase()];e.saveRewindPoint(),o[0]!=="none"&&e.matches(N0)&&e.matches(Na)?(o.push(e.lastValue.toLowerCase()),o.sort().reverse()):e.rewind(),r=o.join(" ")}else c===void 0&&e.matches(k21)?c=e.lastValue:a===void 0&&e.matches(H6)?a=e.lastValue:e.throw();s=!0}return{textDecorationLine:r!==void 0?r:E21,textDecorationColor:a!==void 0?a:L21,textDecorationStyle:c!==void 0?c:B21}},H21=function(e){for(var r=[],c=!1;e.hasTokens();)c&&e.expect(N0),r.push(e.expect(Na).toLowerCase()),c=!0;return r.sort().reverse(),{textDecorationLine:r.join(" ")}},V21=function(e){var r=Ug(e),c=r.offset,a=r.radius,s=r.color;return{textShadowOffset:c,textShadowRadius:a,textShadowColor:s}},Wa=function(e){return function(r){var c=r.expect(e);return r.expectEmpty(),c}},_a=Wa(C5),$g=Wa(S2),b5=Wa(Og),Ka=function(e){return function(r,c){return function(a){var s,o,l=a.expect(e),i;if(a.hasTokens())a.expect(K01),i=a.expect(e);else if(c!==void 0)i=c;else return l;return a.expectEmpty(),[(s={},s[r+"Y"]=i,s),(o={},o[r+"X"]=l,o)]}}},D21=Ka(C5),F21=Ka(S2),Q21=Ka(Og),Z21={perspective:_a,scale:D21("scale"),scaleX:_a,scaleY:_a,translate:F21("translate",0),translateX:$g,translateY:$g,rotate:b5,rotateX:b5,rotateY:b5,rotateZ:b5,skewX:b5,skewY:b5,skew:Q21("skew","0deg")},P21=function(e){for(var r=[],c=!1;e.hasTokens();){c&&e.expect(N0);var a=e.expectFunction(),s=a.functionName,o=Z21[s](a);if(!Array.isArray(o)){var l;o=[(l={},l[s]=o,l)]}r=o.concat(r),c=!0}return{transform:r}},$21=function(e){return{backgroundColor:e.expect(H6)}},T21=V6({types:[H6],prefix:"border",suffix:"Color"}),_21=V6({directions:["TopLeft","TopRight","BottomRight","BottomLeft"],prefix:"border",suffix:"Radius"}),R21=V6({prefix:"border",suffix:"Width"}),O21=V6({types:[S2,k3,qa,Oa],prefix:"margin"}),N21=V6({prefix:"padding"}),U21=function(e){return{fontWeight:e.expect(J01)}},G21=function(e){return{shadowOffset:Ng(e)}},j21=function(e){return{textShadowOffset:Ng(e)}},jg={aspectRatio:X01,background:$21,border:c21,borderColor:T21,borderRadius:_21,borderWidth:R21,boxShadow:s21,flex:n21,flexFlow:m21,font:b21,fontFamily:Gg,fontVariant:C21,fontWeight:U21,margin:O21,padding:N21,placeContent:I21,shadowOffset:G21,textShadow:V21,textShadowOffset:j21,textDecoration:S21,textDecorationLine:H21,transform:P21},Tg,vn1=Tg!=null?new RegExp(Tg.join("|")):null,Ra="SYMBOL_MATCH",q21=(function(){function t(r,c){this.index=0,this.nodes=r,this.functionName=c!=null?c.value:null,this.lastValue=null,this.rewindIndex=-1}var e=t.prototype;return e.hasTokens=function(){return this.index<=this.nodes.length-1},e[Ra]=function(){if(!this.hasTokens())return null;for(var r=this.nodes[this.index],c=0;c<arguments.length;c+=1){var a=c<0||arguments.length<=c?void 0:arguments[c],s=a(r);if(s!==null)return this.index+=1,this.lastValue=s,s}return null},e.matches=function(){return this[Ra].apply(this,arguments)!==null},e.expect=function(){var c=this[Ra].apply(this,arguments);return c!==null?c:this.throw()},e.matchesFunction=function(){var c=this.nodes[this.index];if(c.type!=="function")return null;var a=new t(c.nodes,c);return this.index+=1,this.lastValue=null,a},e.expectFunction=function(){var c=this.matchesFunction();return c!==null?c:this.throw()},e.expectEmpty=function(){this.hasTokens()&&this.throw()},e.throw=function(){throw new Error("Unexpected token type: "+this.nodes[this.index].type)},e.saveRewindPoint=function(){this.rewindIndex=this.index},e.rewind=function(){if(this.rewindIndex===-1)throw new Error("Internal error");this.index=this.rewindIndex,this.lastValue=null},t})(),W21=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?:px)?$/i,K21=/^true|false$/i,J21=/^null$/i,Y21=/^undefined$/i,qg=function(e,r){if(0)var c,a;var s=r.match(W21);if(s!==null)return Number(s[1]);var o=r.match(K21);if(o!==null)return o[0].toLowerCase()==="true";var l=r.match(J21);if(l!==null)return null;var i=r.match(Y21);if(i===null)return r},X21=function(e,r){var c=D01(r),a=new q21(c.nodes);return jg[e](a)},t31=X21,Wg=function(e,r,c){var a,s=c===!1||!(e in jg),o=r.trim(),l=s?(a={},a[e]=qg(e,o),a):t31(e,o);return l},Kg=function(e){var r=/^--\w+/.test(e);return r?e:F01(e)},e31=function(e,r){return r===void 0&&(r=[]),e.reduce(function(c,a){var s=Kg(a[0]),o=a[1],l=r.indexOf(s)===-1;return Object.assign(c,Wg(s,o,l))},{})};w5.default=e31;w5.getPropertyName=Kg;w5.getStylesForProperty=Wg;w5.transformRawValue=qg});var Yg=D0((Jg,Z8)=>{(function(t){function e(o){if(!(this instanceof e))return new e;this.backgrounds=o||[]}e.prototype.toString=function(){return this.backgrounds.join(", ")};function r(o){if(!(this instanceof r))return new r(o);o=o||{};var l=this;function i(n,h){l[n]=n in o?o[n]:h}i("color",""),i("image","none"),i("attachment","scroll"),i("clip","border-box"),i("origin","padding-box"),i("position","0% 0%"),i("repeat","repeat"),i("size","auto")}r.prototype.toString=function(){var o=[this.image,this.repeat,this.attachment,this.position+" / "+this.size,this.origin,this.clip];return this.color&&o.unshift(this.color),o.join(" ")},t.BackgroundList=e,t.Background=r;function c(o){var l=[],i=/[,\(\)]/,n=0,h="";if(o==null)return l;for(;o.length;){var u=i.exec(o);if(!u)break;var p=u[0],d=!1;switch(p){case",":n||(l.push(h.trim()),h="",d=!0);break;case"(":n++;break;case")":n--;break}var f=u.index+1;h+=o.slice(0,d?f-1:f),o=o.slice(f)}return(h.length||o.length)&&l.push((h+o).trim()),l}function a(o){return o.trim()}function s(o){return(o||"").split(",").map(a)}t.parseElementStyle=function(o){var l=new e;if(o==null)return l;for(var i=c(o.backgroundImage),n=o.backgroundColor,h=s(o.backgroundAttachment),u=s(o.backgroundClip),p=s(o.backgroundOrigin),d=s(o.backgroundPosition),f=s(o.backgroundRepeat),m=s(o.backgroundSize),v,x=0,z=i.length;x<z;x++)v=new r({image:i[x],attachment:h[x%h.length],clip:u[x%u.length],origin:p[x%p.length],position:d[x%d.length],repeat:f[x%f.length],size:m[x%m.length]}),x===z-1&&(v.color=n),l.backgrounds.push(v);return l}})((function(t){return typeof Z8<"u"&&Z8.exports!==void 0?Z8.exports:t.cssBgParser={}})(Jg))});var tf=D0((xn1,Xg)=>{var a31=/,(?![^\(]*\))/,r31=/\s(?![^(]*\))/,c31=/^[0-9]+[a-zA-Z%]+?$/,s31=t=>{let e=t.split(r31),r=e.includes("inset"),c=e.slice(-1)[0],a=l31(c)?void 0:c,s=e.filter(h=>h!=="inset").filter(h=>h!==a).map(i31),[o,l,i,n]=s;return{inset:r,offsetX:o,offsetY:l,blurRadius:i,spreadRadius:n,color:a}},o31=t=>{let{inset:e,offsetX:r=0,offsetY:c=0,blurRadius:a=0,spreadRadius:s,color:o}=t||{};return[e?"inset":null,r,c,a,s,o].filter(l=>l!=null).map(n31).map(l=>(""+l).trim()).join(" ")},l31=t=>t==="0"||c31.test(t),i31=t=>{if(!/px$/.test(t)&&t!=="0")return t;let e=parseFloat(t);return isNaN(e)?t:e},n31=t=>typeof t=="number"&&t!==0?t+"px":t,h31=t=>t.split(a31).map(e=>e.trim()).map(s31),u31=t=>t.map(o31).join(", ");Xg.exports={parse:h31,stringify:u31}});var D6=D0((Ja,Ya)=>{(function(t,e){typeof Ja=="object"&&typeof Ya<"u"?Ya.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self).parseCssColor=e()})(Ja,(function(){"use strict";var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},e=new RegExp(/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,"i"),r="-?\\d*(?:\\.\\d+)",c="("+r+"?)",a="("+r+"?%)",s=(`^
|
|
3
3
|
hsla?\\(
|
|
4
4
|
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsquare",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Wireframes in plain text: easy for LLMs to write, fast to render as SVG or PNG.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wireframe",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"tsx": "^4.23.15",
|
|
113
113
|
"typescript": "^7.0.2"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "f6ac8b40fbb66260e54645b4d708fe8427f89c03"
|
|
116
116
|
}
|