tsquare 0.12.0 → 0.12.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 +6 -0
- package/README.md +1 -1
- package/dist/editor.js +35 -8
- package/dist/playground/editor-options.d.ts +2 -0
- package/dist/playground/playground.js +17 -17
- 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.12.
|
|
1
|
+
/*! tsquare 0.12.1 | MIT | https://tsquare.dev | bundled packages' licenses are at the end of this file */
|
|
2
2
|
"use strict";var tsquare=(()=>{var i11=Object.create;var s8=Object.defineProperty;var n11=Object.getOwnPropertyDescriptor;var h11=Object.getOwnPropertyNames;var u11=Object.getPrototypeOf,p11=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 B0=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},H2=(t,e)=>{for(var r in e)s8(t,r,{get:e[r],enumerable:!0})},Cm=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of h11(e))!p11.call(t,a)&&a!==r&&s8(t,a,{get:()=>e[a],enumerable:!(c=n11(e,a))||c.enumerable});return t};var b0=(t,e,r)=>(r=t!=null?i11(u11(t)):{},Cm(e||!t||!t.__esModule?s8(r,"default",{value:t,enumerable:!0}):r,t)),m11=t=>Cm(s8({},"__esModule",{value:!0}),t);var o8=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 Dm=B0((Hi1,Vm)=>{var Xe=0,km=-3;function h6(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function g11(t,e){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new h6,this.dtree=new h6}var Em=new h6,Bm=new h6,ta=new Uint8Array(30),ea=new Uint16Array(30),Lm=new Uint8Array(30),Sm=new Uint16Array(30),v11=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wm=new h6,r3=new Uint8Array(320);function Hm(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 f11(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 ym=new Uint16Array(16);function Je(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)ym[a]=s,s+=t.table[a];for(a=0;a<c;++a)e[r+a]&&(t.trans[ym[e[r+a]]++]=a)}function A11(t){t.bitcount--||(t.tag=t.source[t.sourceIndex++],t.bitcount=7);var e=t.tag&1;return t.tag>>>=1,e}function c3(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 Ye(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 x11(t,e,r){var c,a,s,o,l,i;for(c=c3(t,5,257),a=c3(t,5,1),s=c3(t,4,4),o=0;o<19;++o)r3[o]=0;for(o=0;o<s;++o){var n=c3(t,3,0);r3[v11[o]]=n}for(Je(wm,r3,0,19),l=0;l<c+a;){var h=Ye(t,wm);switch(h){case 16:var u=r3[l-1];for(i=c3(t,2,3);i;--i)r3[l++]=u;break;case 17:for(i=c3(t,3,3);i;--i)r3[l++]=0;break;case 18:for(i=c3(t,7,11);i;--i)r3[l++]=0;break;default:r3[l++]=h;break}}Je(e,r3,0,c),Je(r,r3,c,a)}function Im(t,e,r){for(;;){var c=Ye(t,e);if(c===256)return Xe;if(c<256)t.dest[t.destLen++]=c;else{var a,s,o,l;for(c-=257,a=c3(t,ta[c],ea[c]),s=Ye(t,r),o=t.destLen-c3(t,Lm[s],Sm[s]),l=o;l<o+a;++l)t.dest[t.destLen++]=t.dest[l]}}}function z11(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 km;for(t.sourceIndex+=4,c=e;c;--c)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,Xe}function M11(t,e){var r=new g11(t,e),c,a,s;do{switch(c=A11(r),a=c3(r,2,0),a){case 0:s=z11(r);break;case 1:s=Im(r,Em,Bm);break;case 2:x11(r,r.ltree,r.dtree),s=Im(r,r.ltree,r.dtree);break;default:s=km}if(s!==Xe)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}f11(Em,Bm);Hm(ta,ea,4,3);Hm(Lm,Sm,2,1);ta[28]=0;ea[28]=258;Vm.exports=M11});var Zm=B0((Vi1,Qm)=>{var b11=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,Fm=(t,e,r)=>{let c=t[e];t[e]=t[r],t[r]=c},C11=t=>{let e=t.length;for(let r=0;r<e;r+=4)Fm(t,r,r+3),Fm(t,r+1,r+2)},w11=t=>{b11&&C11(t)};Qm.exports={swap32LE:w11}});var _m=B0((Di1,Tm)=>{var Pm=Dm(),{swap32LE:y11}=Zm(),ca=11,d4=5,I11=ca-d4,k11=65536>>ca,E11=1<<I11,B11=E11-1,l8=2,L11=1<<d4,aa=L11-1,$m=65536>>d4,S11=1024>>d4,H11=$m+S11,V11=H11,D11=32,F11=V11+D11,Q11=1<<l8,ra=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=Pm(e,new Uint8Array(c)),e=Pm(e,new Uint8Array(c)),y11(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>>d4]<<l8)+(e&aa),this.data[r]):e<=65535?(r=(this.data[$m+(e-55296>>d4)]<<l8)+(e&aa),this.data[r]):e<this.highStart?(r=this.data[F11-k11+(e>>ca)],r=this.data[r+(e>>d4&B11)],r=(r<<l8)+(e&aa),this.data[r]):this.data[this.data.length-Q11]}};Tm.exports=ra});var Rm=B0(i8=>{var Z11="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,v,m,A,x,z;if(p.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=p.length;x=p.charAt(w-2)==="="?2:p.charAt(w-1)==="="?1:0,z=new e(p.length*3/4-x),m=x>0?p.length-4:p.length;var B=0;function S(k){z[B++]=k}for(d=0,v=0;d<m;d+=4,v+=3)A=n(p.charAt(d))<<18|n(p.charAt(d+1))<<12|n(p.charAt(d+2))<<6|n(p.charAt(d+3)),S((A&16711680)>>16),S((A&65280)>>8),S(A&255);return x===2?(A=n(p.charAt(d))<<2|n(p.charAt(d+1))>>4,S(A&255)):x===1&&(A=n(p.charAt(d))<<10|n(p.charAt(d+1))<<4|n(p.charAt(d+2))>>2,S(A>>8&255),S(A&255)),z}function u(p){var d,v=p.length%3,m="",A,x;function z(B){return Z11.charAt(B)}function w(B){return z(B>>18&63)+z(B>>12&63)+z(B>>6&63)+z(B&63)}for(d=0,x=p.length-v;d<x;d+=3)A=(p[d]<<16)+(p[d+1]<<8)+p[d+2],m+=w(A);switch(v){case 1:A=p[p.length-1],m+=z(A>>2),m+=z(A<<4&63),m+="==";break;case 2:A=(p[p.length-2]<<8)+p[p.length-1],m+=z(A>>10),m+=z(A>>4&63),m+=z(A<<2&63),m+="=";break}return m}t.toByteArray=h,t.fromByteArray=u})(typeof i8>"u"?i8.base64js={}:i8)});var Xm=B0((Zi1,Ym)=>{var na=40,ha=41,h8=39,ua=34,pa=92,i5=47,da=44,ma=58,u8=42,J11=117,Y11=85,X11=43,t01=/^[a-f0-9?-]+$/i;Ym.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,v=[{nodes:e}],m=0,A,x="",z="",w="";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===ha&&m?w=o:s&&s.type==="div"?(s.after=o,s.sourceEndIndex+=o.length):p===da||p===ma||p===i5&&r.charCodeAt(c+1)!==u8&&(!A||A&&A.type==="function"&&A.value!=="calc")?z=o:e.push({type:"space",sourceIndex:u,sourceEndIndex:c,value:o}),u=c}else if(p===h8||p===ua){c=u,a=p===h8?"'":'"',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)===pa;)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===i5&&r.charCodeAt(u+1)===u8)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===i5||p===u8)&&A&&A.type==="function"&&A.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===i5||p===da||p===ma)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(na===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!==h8&&p!==ua){c-=1;do if(l=!1,c=r.indexOf(")",c+1),~c)for(i=c;r.charCodeAt(i-1)===pa;)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),v.push(o),e=o.nodes=[],A=o;x=""}else if(ha===p&&m)u+=1,p=r.charCodeAt(u),A.after=w,A.sourceEndIndex+=w.length,w="",m-=1,v[v.length-1].sourceEndIndex=u,v.pop(),A=v[m],e=A.nodes;else{c=u;do p===pa&&(c+=1),c+=1,p=r.charCodeAt(c);while(c<d&&!(p<=32||p===h8||p===ua||p===da||p===ma||p===i5||p===na||p===u8&&A&&A.type==="function"&&A.value==="calc"||p===i5&&A.type==="function"&&A.value==="calc"||p===ha&&m));o=r.slice(u,c),na===p?x=o:(J11===o.charCodeAt(0)||Y11===o.charCodeAt(0))&&X11===o.charCodeAt(1)&&t01.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=v.length-1;u;u-=1)v[u].unclosed=!0,v[u].sourceEndIndex=r.length;return v[0].nodes}});var eg=B0((Pi1,tg)=>{tg.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 sg=B0(($i1,cg)=>{function ag(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=rg(t.nodes,e),r!=="function"?a:c+"("+(t.before||"")+a+(t.after||"")+(t.unclosed?"":")")):c}function rg(t,e){var r,c;if(Array.isArray(t)){for(r="",c=t.length-1;~c;c-=1)r=ag(t[c],e)+r;return r}return ag(t,e)}cg.exports=rg});var lg=B0((Ti1,og)=>{var p8=45,d8=43,ga=46,e01=101,a01=69;function r01(t){var e=t.charCodeAt(0),r;if(e===d8||e===p8){if(r=t.charCodeAt(1),r>=48&&r<=57)return!0;var c=t.charCodeAt(2);return r===ga&&c>=48&&c<=57}return e===ga?(r=t.charCodeAt(1),r>=48&&r<=57):e>=48&&e<=57}og.exports=function(t){var e=0,r=t.length,c,a,s;if(r===0||!r01(t))return!1;for(c=t.charCodeAt(e),(c===d8||c===p8)&&e++;e<r&&(c=t.charCodeAt(e),!(c<48||c>57));)e+=1;if(c=t.charCodeAt(e),a=t.charCodeAt(e+1),c===ga&&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===e01||c===a01)&&(a>=48&&a<=57||(a===d8||a===p8)&&s>=48&&s<=57))for(e+=a===d8||a===p8?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 va=B0((_i1,hg)=>{var c01=Xm(),ig=eg(),ng=sg();function V3(t){return this instanceof V3?(this.nodes=c01(t),this):new V3(t)}V3.prototype.toString=function(){return Array.isArray(this.nodes)?ng(this.nodes):""};V3.prototype.walk=function(t,e){return ig(this.nodes,t,e),this};V3.unit=lg();V3.walk=ig;V3.stringify=ng;hg.exports=V3});var dg=B0((Ri1,pg)=>{"use strict";pg.exports=function(t){return typeof t=="string"?ug(t):fa(t)};function fa(t){return!t||typeof t!="object"||o01(t)||l01(t)?t:s01(t)?h01(t,fa):u01(n01(t),function(e,r){var c=ug(r);return e[c]=fa(t[r]),e},{})}function ug(t){return t.replace(/[_.-](\w|$)/g,function(e,r){return r.toUpperCase()})}var s01=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"},o01=function(t){return Object.prototype.toString.call(t)==="[object Date]"},l01=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},i01=Object.prototype.hasOwnProperty,n01=Object.keys||function(t){var e=[];for(var r in t)i01.call(t,r)&&e.push(r);return e};function h01(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 u01(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 mg=B0((Oi1,p01)=>{p01.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 vg=B0((Ni1,gg)=>{"use strict";gg.exports=mg()});var g8=B0(u5=>{"use strict";Object.defineProperty(u5,"__esModule",{value:!0});function ba(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var xg=va(),d01=ba(xg),m01=ba(dg()),g01=ba(vg()),v01=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,"")},f01=/^(#(?:[0-9a-f]{3,4}){1,2})$/i,A01=/^(rgba?|hsla?|hwb|lab|lch|gray|color)$/,x01=function(e){return e.type==="word"&&(f01.test(e.value)||e.value in g01||e.value==="transparent")?e.value:e.type==="function"&&A01.test(e.value)?xg.stringify(e):null},z01=/^(none)$/i,M01=/^(auto)$/i,b01=/(^-?[_a-z][_a-z0-9-]*$)/i,C01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)$/i,w01=/^(0$|(?:[+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?=px$))/i,y01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/i,I01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?(?:deg|rad))$/i,k01=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?%)$/i,Ca=function(e){return function(r){return e(r)?"<token>":null}},E01=function(e){return function(r){return r.type===e?r.value:null}},H0=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}},P0=Ca(function(t){return t.type==="space"}),zg=Ca(function(t){return t.type==="div"&&t.value==="/"}),B01=Ca(function(t){return t.type==="div"&&t.value===","}),L01=E01("word"),wa=H0(z01),za=H0(M01),h5=H0(C01,Number),C2=H0(w01,Number),A3=H0(y01),Mg=H0(I01,function(t){return t.toLowerCase()}),ya=H0(k01),m8=H0(b01),S01=v01,d6=x01,Ma=H0(/^(none|underline|line-through)$/i),H01=function(e){var r=e.expect(h5);return e.hasTokens()&&(e.expect(zg),r/=e.expect(h5)),{aspectRatio:r}},V01=H0(/^(solid|dashed|dotted)$/),D01=1,F01="black",Q01="solid",Z01=function(e){var r,c,a;if(e.matches(wa))return e.expectEmpty(),{borderWidth:0,borderColor:"black",borderStyle:"solid"};for(var s=0;s<3&&e.hasTokens();)s!==0&&e.expect(P0),r===void 0&&e.matches(C2,A3)?r=e.lastValue:c===void 0&&e.matches(d6)?c=e.lastValue:a===void 0&&e.matches(V01)?a=e.lastValue:e.throw(),s+=1;return e.expectEmpty(),r===void 0&&(r=D01),c===void 0&&(c=F01),a===void 0&&(a=Q01),{borderWidth:r,borderColor:c,borderStyle:a}},m6=function(e){var r=e.types,c=r===void 0?[C2,A3,ya]: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(P0),p.push(h.expect.apply(h,c));h.expectEmpty();var d=p[0],v=p[1],m=v===void 0?d:v,A=p[2],x=A===void 0?d:A,z=p[3],w=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)]=w,u}},bg=function(e){var r=e.expect(C2),c=e.matches(P0)?e.expect(C2):r;return e.expectEmpty(),{width:r,height:c}},Cg=function(e){var r,c,a,s;if(e.matches(wa))return e.expectEmpty(),{offset:{width:0,height:0},radius:0,color:"black"};for(var o=!1;e.hasTokens();)o&&e.expect(P0),r===void 0&&e.matches(C2,A3)?(r=e.lastValue,e.expect(P0),c=e.expect(C2,A3),e.saveRewindPoint(),e.matches(P0)&&e.matches(C2,A3)?a=e.lastValue:e.rewind()):s===void 0&&e.matches(d6)?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"}},P01=function(e){var r=Cg(e),c=r.offset,a=r.radius,s=r.color;return{shadowOffset:c,shadowRadius:a,shadowColor:s,shadowOpacity:1}},$01=1,T01=1,_01=0,R01=function(e){var r,c,a;if(e.matches(wa))return e.expectEmpty(),{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(e.saveRewindPoint(),e.matches(za)&&!e.hasTokens())return{flexGrow:1,flexShrink:1,flexBasis:"auto"};e.rewind();for(var s=0;s<2&&e.hasTokens();)s!==0&&e.expect(P0),r===void 0&&e.matches(h5)?(r=e.lastValue,e.saveRewindPoint(),e.matches(P0)&&e.matches(h5)?c=e.lastValue:e.rewind()):a===void 0&&e.matches(C2,A3,ya)?a=e.lastValue:a===void 0&&e.matches(za)?a="auto":e.throw(),s+=1;return e.expectEmpty(),r===void 0&&(r=$01),c===void 0&&(c=T01),a===void 0&&(a=_01),{flexGrow:r,flexShrink:c,flexBasis:a}},O01=H0(/(nowrap|wrap|wrap-reverse)/),N01=H0(/(row|row-reverse|column|column-reverse)/),U01="nowrap",G01="row",j01=function(e){for(var r,c,a=0;a<2&&e.hasTokens();)a!==0&&e.expect(P0),r===void 0&&e.matches(O01)?r=e.lastValue:c===void 0&&e.matches(N01)?c=e.lastValue:e.throw(),a+=1;return e.expectEmpty(),r===void 0&&(r=U01),c===void 0&&(c=G01),{flexWrap:r,flexDirection:c}},wg=function(e){var r;if(e.matches(S01))r=e.lastValue;else for(r=e.expect(m8);e.hasTokens();){e.expect(P0);var c=e.expect(m8);r+=" "+c}return e.expectEmpty(),{fontFamily:r}},q01=H0(/^(normal)$/),W01=H0(/^(italic)$/),K01=H0(/^([1-9]00|bold)$/),J01=H0(/^(small-caps)$/),Y01="normal",X01="normal",t21=[],e21=function(e){for(var r,c,a,s,o=0;o<3&&e.hasTokens();){if(!e.matches(q01))if(r===void 0&&e.matches(W01))r=e.lastValue;else if(c===void 0&&e.matches(K01))c=e.lastValue;else if(a===void 0&&e.matches(J01))a=[e.lastValue];else break;e.expect(P0),o+=1}var l=e.expect(C2,A3);e.matches(zg)&&(s=e.expect(C2,A3)),e.expect(P0);var i=wg(e),n=i.fontFamily;r===void 0&&(r=Y01),c===void 0&&(c=X01),a===void 0&&(a=t21);var h={fontStyle:r,fontWeight:c,fontVariant:a,fontSize:l,fontFamily:n};return s!==void 0&&(h.lineHeight=s),h},a21=function(e){for(var r=[e.expect(m8)];e.hasTokens();)e.expect(P0),r.push(e.expect(m8));return{fontVariant:r}},r21=H0(/(flex-(?:start|end)|center|stretch|space-(?:between|around))/),c21=H0(/(flex-(?:start|end)|center|space-(?:between|around|evenly))/),s21=function(e){var r=e.expect(r21),c;return e.hasTokens()?(e.expect(P0),c=e.expect(c21)):c="stretch",e.expectEmpty(),{alignContent:r,justifyContent:c}},o21=H0(/^(solid|double|dotted|dashed)$/),l21="none",i21="solid",n21="black",h21=function(e){for(var r,c,a,s=!1;e.hasTokens();){if(s&&e.expect(P0),r===void 0&&e.matches(Ma)){var o=[e.lastValue.toLowerCase()];e.saveRewindPoint(),o[0]!=="none"&&e.matches(P0)&&e.matches(Ma)?(o.push(e.lastValue.toLowerCase()),o.sort().reverse()):e.rewind(),r=o.join(" ")}else c===void 0&&e.matches(o21)?c=e.lastValue:a===void 0&&e.matches(d6)?a=e.lastValue:e.throw();s=!0}return{textDecorationLine:r!==void 0?r:l21,textDecorationColor:a!==void 0?a:n21,textDecorationStyle:c!==void 0?c:i21}},u21=function(e){for(var r=[],c=!1;e.hasTokens();)c&&e.expect(P0),r.push(e.expect(Ma).toLowerCase()),c=!0;return r.sort().reverse(),{textDecorationLine:r.join(" ")}},p21=function(e){var r=Cg(e),c=r.offset,a=r.radius,s=r.color;return{textShadowOffset:c,textShadowRadius:a,textShadowColor:s}},Ia=function(e){return function(r){var c=r.expect(e);return r.expectEmpty(),c}},Aa=Ia(h5),fg=Ia(C2),n5=Ia(Mg),ka=function(e){return function(r,c){return function(a){var s,o,l=a.expect(e),i;if(a.hasTokens())a.expect(B01),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(h5),m21=ka(C2),g21=ka(Mg),v21={perspective:Aa,scale:d21("scale"),scaleX:Aa,scaleY:Aa,translate:m21("translate",0),translateX:fg,translateY:fg,rotate:n5,rotateX:n5,rotateY:n5,rotateZ:n5,skewX:n5,skewY:n5,skew:g21("skew","0deg")},f21=function(e){for(var r=[],c=!1;e.hasTokens();){c&&e.expect(P0);var a=e.expectFunction(),s=a.functionName,o=v21[s](a);if(!Array.isArray(o)){var l;o=[(l={},l[s]=o,l)]}r=o.concat(r),c=!0}return{transform:r}},A21=function(e){return{backgroundColor:e.expect(d6)}},x21=m6({types:[d6],prefix:"border",suffix:"Color"}),z21=m6({directions:["TopLeft","TopRight","BottomRight","BottomLeft"],prefix:"border",suffix:"Radius"}),M21=m6({prefix:"border",suffix:"Width"}),b21=m6({types:[C2,A3,ya,za],prefix:"margin"}),C21=m6({prefix:"padding"}),w21=function(e){return{fontWeight:e.expect(L01)}},y21=function(e){return{shadowOffset:bg(e)}},I21=function(e){return{textShadowOffset:bg(e)}},yg={aspectRatio:H01,background:A21,border:Z01,borderColor:x21,borderRadius:z21,borderWidth:M21,boxShadow:P01,flex:R01,flexFlow:j01,font:e21,fontFamily:wg,fontVariant:a21,fontWeight:w21,margin:b21,padding:C21,placeContent:s21,shadowOffset:y21,textShadow:p21,textShadowOffset:I21,textDecoration:h21,textDecorationLine:u21,transform:f21},Ag,Ui1=Ag!=null?new RegExp(Ag.join("|")):null,xa="SYMBOL_MATCH",k21=(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[xa]=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[xa].apply(this,arguments)!==null},e.expect=function(){var c=this[xa].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})(),E21=/^([+-]?(?:\d*\.)?\d+(?:e[+-]?\d+)?)(?:px)?$/i,B21=/^true|false$/i,L21=/^null$/i,S21=/^undefined$/i,Ig=function(e,r){if(0)var c,a;var s=r.match(E21);if(s!==null)return Number(s[1]);var o=r.match(B21);if(o!==null)return o[0].toLowerCase()==="true";var l=r.match(L21);if(l!==null)return null;var i=r.match(S21);if(i===null)return r},H21=function(e,r){var c=d01(r),a=new k21(c.nodes);return yg[e](a)},V21=H21,kg=function(e,r,c){var a,s=c===!1||!(e in yg),o=r.trim(),l=s?(a={},a[e]=Ig(e,o),a):V21(e,o);return l},Eg=function(e){var r=/^--\w+/.test(e);return r?e:m01(e)},D21=function(e,r){return r===void 0&&(r=[]),e.reduce(function(c,a){var s=Eg(a[0]),o=a[1],l=r.indexOf(s)===-1;return Object.assign(c,kg(s,o,l))},{})};u5.default=D21;u5.getPropertyName=Eg;u5.getStylesForProperty=kg;u5.transformRawValue=Ig});var Lg=B0((Bg,v8)=>{(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 v=u.index+1;h+=o.slice(0,d?v-1:v),o=o.slice(v)}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),v=s(o.backgroundRepeat),m=s(o.backgroundSize),A,x=0,z=i.length;x<z;x++)A=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:v[x%v.length],size:m[x%m.length]}),x===z-1&&(A.color=n),l.backgrounds.push(A);return l}})((function(t){return typeof v8<"u"&&v8.exports!==void 0?v8.exports:t.cssBgParser={}})(Bg))});var Hg=B0((ji1,Sg)=>{var F21=/,(?![^\(]*\))/,Q21=/\s(?![^(]*\))/,Z21=/^[0-9]+[a-zA-Z%]+?$/,P21=t=>{let e=t.split(Q21),r=e.includes("inset"),c=e.slice(-1)[0],a=T21(c)?void 0:c,s=e.filter(h=>h!=="inset").filter(h=>h!==a).map(_21),[o,l,i,n]=s;return{inset:r,offsetX:o,offsetY:l,blurRadius:i,spreadRadius:n,color:a}},$21=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(R21).map(l=>(""+l).trim()).join(" ")},T21=t=>t==="0"||Z21.test(t),_21=t=>{if(!/px$/.test(t)&&t!=="0")return t;let e=parseFloat(t);return isNaN(e)?t:e},R21=t=>typeof t=="number"&&t!==0?t+"px":t,O21=t=>t.split(F21).map(e=>e.trim()).map(P21),N21=t=>t.map($21).join(", ");Sg.exports={parse:O21,stringify:N21}});var g6=B0((Ea,Ba)=>{(function(t,e){typeof Ea=="object"&&typeof Ba<"u"?Ba.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self).parseCssColor=e()})(Ea,(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.12.
|
|
3
|
+
"version": "0.12.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",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"tsx": "^4.23.15",
|
|
111
111
|
"typescript": "^7.0.2"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "25e24bd68708adc0888dce9b8e168f0fe21bcbcf"
|
|
114
114
|
}
|