@thi.ng/meta-css 0.19.40 → 0.19.42
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/README.md +2 -2
- package/index.js +14 -14
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -2759,7 +2759,7 @@ The toolchain itself is distributed as CLI bundle with **no runtime
|
|
|
2759
2759
|
dependencies**. The following dependencies are only shown for informational
|
|
2760
2760
|
purposes and are (partially) included in the bundle.
|
|
2761
2761
|
|
|
2762
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 14.
|
|
2762
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 14.28 KB
|
|
2763
2763
|
|
|
2764
2764
|
## Dependencies
|
|
2765
2765
|
|
package/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Go={default:95,command:92,error:91,hint:90,multi:90,param:96,required:33};var Tt=(t)=>t;function W(t,o=Object.create(null)){return(...n)=>{let r=n.join("-");return r in o?o[r]:o[r]=t(...n)}}var nt=W((t,o)=>t.repeat(o));var Jo=(t)=>/^[a-f0-9]+$/i.test(t);var jo=(t)=>/^[-+]?\d+$/.test(t),Xo=(t)=>/^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(t);var Y=(t,o=(n)=>n!==void 0?": "+n:"")=>class extends Error{origMessage;constructor(n){super(t(n)+o(n));this.origMessage=n!==void 0?String(n):""}};var wr=Y(()=>"illegal argument(s)"),
|
|
3
|
-
`),this.parent?.logEntry(t)}}var
|
|
2
|
+
var Go={default:95,command:92,error:91,hint:90,multi:90,param:96,required:33};var Tt=(t)=>t;function W(t,o=Object.create(null)){return(...n)=>{let r=n.join("-");return r in o?o[r]:o[r]=t(...n)}}var nt=W((t,o)=>t.repeat(o));var Jo=(t)=>/^[a-f0-9]+$/i.test(t);var jo=(t)=>/^[-+]?\d+$/.test(t),Xo=(t)=>/^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(t);var Y=(t,o=(n)=>n!==void 0?": "+n:"")=>class extends Error{origMessage;constructor(n){super(t(n)+o(n));this.origMessage=n!==void 0?String(n):""}};var wr=Y(()=>"illegal argument(s)"),e=(t)=>{throw new wr(t)};var io=(t)=>Xo(t)?parseFloat(t):e(`not a numeric value: ${t}`),Oo=(t)=>Jo(t)?parseInt(t,16):e(`not a hex value: ${t}`),No=(t)=>jo(t)?parseInt(t):e(`not an integer: ${t}`);var yr=(t,o)=>t+(o?`[${o}..]`:""),Wt=(t,o,n)=>(r)=>({type:t,coerce:o,hint:n,group:"main",...r}),Yt=(t,o,n,r=",")=>(m)=>({type:t,delim:r,hint:yr(n,m.delim??r),coerce:(f)=>f.map(o),group:"main",multi:!0,...m}),I=(t)=>({type:"flag",group:"flags",default:!1,...t}),D=Wt("string",Tt,"STR"),Dt=Yt("strings",Tt,"STR"),ef=Wt("float",io,"NUM"),Cf=Yt("floats",io,"NUM"),zt=Wt("int",No,"INT"),uf=Yt("ints",No,"INT"),Af=Wt("hex",Oo,"HEX"),Lf=Yt("hexes",Oo,"HEX");var Bf={dryRun:I({desc:"Dry run (no changes applied)"})},Tf={quiet:I({alias:"q",desc:"Disable all logging"})},Zo={verbose:I({alias:"v",desc:"Display extra information"})};var L=Array.isArray;var B=((t)=>{return t[t.FINE=0]="FINE",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.SEVERE=4]="SEVERE",t[t.NONE=5]="NONE",t})(B||{});var Hr=0;class $t{constructor(t,o=B.FINE,n){this.parent=n,this.id=t||`logger-${Hr++}`,this.level=typeof o==="string"?B[o]:o}id;level;addChild(t){return t.parent=this,t}enabled(t){return this.level<=t}fine(...t){this.log(B.FINE,t)}debug(...t){this.log(B.DEBUG,t)}info(...t){this.log(B.INFO,t)}warn(...t){this.log(B.WARN,t)}severe(...t){this.log(B.SEVERE,t)}none(){}log(t,o){this.level<=t&&this.logEntry([t,this.id,Date.now(),...o])}}var Ko=(t)=>t.map((o)=>{if(typeof o==="function")o=o();if(!(typeof o==="string"||typeof o==="number"))o=JSON.stringify(o);return o});class Pt extends $t{constructor(t,o,n,r){super(o,n,r);this.target=t}childLogger(t,o){return new Pt(this.target,t,o??this.level,this)}logEntry(t){if(t[0]<this.level)return;this.target.write(`[${B[t[0]]}] ${t[1]}: ${Ko(t.slice(3)).join(" ")}
|
|
3
|
+
`),this.parent?.logEntry(t)}}var ho={black:1,blue:5,cyan:7,gray:17,green:3,magenta:6,red:2,white:24,yellow:4,lightBlue:21,lightCyan:23,lightGray:8,lightGreen:19,lightMagenta:22,lightRed:18,lightYellow:20,bgBlack:32,bgBlue:160,bgCyan:224,bgGray:544,bgGreen:96,bgMagenta:192,bgRed:64,bgWhite:768,bgYellow:128,bgLightBlue:672,bgLightCyan:736,bgLightGray:256,bgLightGreen:608,bgLightMagenta:704,bgLightRed:576,bgLightYellow:640};var Rr=(t,o)=>(n)=>t.format(o,n),_o=(t)=>Object.keys(ho).reduce((o,n)=>(o[n]=Rr(t,ho[n]),o),{format:t});var bo="\x1B[0m";var Mr=["","1","2","1;2","4","1;4","2;4","1;2;4"],Jt={format:(t,o)=>Jt.start(t)+o+Jt.end,start:W((t)=>{let o=[],n=t&15;return n&&o.push(29+(t>>4&1)*60+n),n=t>>5&15,n&&o.push(39+(t>>9&1)*60+n),n=t>>10,n&&o.push(Mr[n]),"\x1B["+o.join(";")+"m"}),end:bo,prefix:bo,suffix:`
|
|
4
4
|
`};var Vo={format:(t,o)=>String(o),prefix:"",suffix:`
|
|
5
|
-
`,start:()=>"",end:""};var jt=
|
|
6
|
-
`)},
|
|
5
|
+
`,start:()=>"",end:""};var jt=_o(Jt),qo=_o(Vo);var Ir=(t)=>t.toUpperCase(),po=(t)=>t.toLowerCase(),Xt=(t)=>t.length?t[0].toUpperCase()+t.substring(1):t,rt=(t,o="-")=>po(t.replace(/([a-z0-9\u00e0-\u00fd])([A-Z\u00c0-\u00dd])/g,(n,r,m)=>r+o+m));var Qo=(t,o="-")=>po(t).replace(new RegExp(`\\${o}+(\\w)`,"g"),(n,r)=>Ir(r));var ko=(t=!1,o)=>(n)=>t||typeof n!=="string"&&typeof n!=="number"?JSON.stringify(n,null,o):String(n);var vo=Object.getPrototypeOf,z=(t)=>{let o;return t!=null&&typeof t==="object"&&((o=vo(t))===null||vo(o)===null)};var Ur=/\x1b\[[0-9;]+m/g,Wr=(t)=>t.replace(Ur,"");var Zt=(t)=>Wr(t).length;var lo=W((t,o=" ")=>{let n=nt(String(o),t);return(r,m)=>{if(r==null)return n;return r=r.toString(),m=m!==void 0?m:r.length,m<t?r+n.substring(m):r}});function*mt(t,o=/\r?\n/g,n=!1){let r=0,m=t.length,f=~~n,E;if(typeof o==="string")E=new RegExp(o,"g");else if(!o.flags.includes("g"))E=new RegExp(o,o.flags+"g");else E=o;for(;r<m;){let G=E.exec(t);if(!G){yield t.substring(r);return}let i=G[0].length;yield t.substring(r,G.index+f*i),r=G.index+i}}class eo{n=0;w=[];constructor(t,o){t!=null&&this.add(t,o)}add(t,o=t.length){return this.w.push(t),this.n+=o+~~(this.n>0),this}toString(){return this.w.join(" ")}}var Yr={length:(t)=>t.length,split:(t,o)=>o},xo={length:Zt,split:(t,o)=>{let n=/\x1b\[[0-9;]+m/g,r=o,m;while(m=n.exec(t)){if(m.index>=o)break;let f=m[0].length;r+=f,o+=f}return r}},go=(t,o,n,r)=>{let m=t[t.length-1];m&&r-m.n>n?m.add(o,n):t.push(new eo(o,n))},Dr=(t,{width:o,min:n,hard:r,splitter:m},f=0,E=[])=>{let G=m.length(t),i=o-f;if(i<n&&i<G)i=o;while(r&&G>i){let O=m.split(t,i),N=t.substring(0,O);go(E,N,i,o),t=t.substring(O),i=o,G=m.length(t)}return go(E,t,G,o),E},zr=(t,o,n=[])=>{if(!t.length)return n.push(new eo),n;let r={width:80,min:4,hard:!1,splitter:Yr,...o};for(let m of mt(t,o.delimWord||/\s/g)){let f=n[n.length-1];Dr(m,r,f&&f.n>0?f.n+1:0,n)}return n},ao=(t,o)=>{let n=[];for(let r of mt(t,o.delimLine))n=n.concat(zr(r,o));return n};var U=(t,o)=>o!=null?`\x1B[${o}m${t}\x1B[0m`:t,Kt=(t,o)=>lo(o)(t,Zt(t)),bt=(t,o)=>t?ao(t,{width:o,splitter:xo,hard:!1}):[],Vt=(t,o,n)=>{let r=nt(" ",o);return bt(t,n-o).map((m,f)=>f?r+m:m).join(`
|
|
6
|
+
`)},l=(t)=>z(t)?{...Go,...t}:t!==!1?Go:{};var Ft=(t,o={})=>{o={lineWidth:80,paramWidth:32,showDefaults:!0,prefix:"",suffix:"",groups:["flags","main"],...o};let n=l(o.color),r=(E)=>E.map((G)=>Pr(G,t[G],o,n,o.paramWidth)),m=Object.keys(t).sort(),f=o.groups?o.groups.map((E)=>[E,m.filter((G)=>t[G].group===E)]).filter((E)=>!!E[1].length):[["options",m]];return[...bt(o.prefix,o.lineWidth),...f.map(([E,G])=>[...o.showGroupNames?[`${Xt(E)}:
|
|
7
7
|
`]:[],...r(G),""].join(`
|
|
8
8
|
`)),...bt(o.suffix,o.lineWidth)].join(`
|
|
9
|
-
`)},Pr=(t,o,n,r,m)=>{let f=Jr(o,r),E=jr(o,r,f),G=U(`--${rt(t)}`,r.param),i=`${E}${G}${f}`,O=!!o.required&&o.default===void 0,N=[];O&&N.push("required"),o.multi&&N.push("multiple");let
|
|
9
|
+
`)},Pr=(t,o,n,r,m)=>{let f=Jr(o,r),E=jr(o,r,f),G=U(`--${rt(t)}`,r.param),i=`${E}${G}${f}`,O=!!o.required&&o.default===void 0,N=[];O&&N.push("required"),o.multi&&N.push("multiple");let _=Xr(N,r,O)+(o.desc||"")+Zr(o,n,r);return Kt(i,n.paramWidth)+Vt(_,m,n.lineWidth)},Jr=(t,o)=>t.hint?U(" "+t.hint,o.hint):"",jr=(t,o,n)=>t.alias?`${U("-"+t.alias,o.param)}${n}, `:"",Xr=(t,o,n)=>t.length?U(`[${t.join(", ")}] `,n?o.required:o.multi):"",Zr=(t,o,n)=>o.showDefaults&&t.default!=null&&t.default!==!1?U(` (default: ${ko(!0)(t.defaultHint!=null?t.defaultHint:t.default)})`,n.default):"";var Kr=Y(()=>"parse error"),so=(t,o,n)=>{n={start:2,showUsage:!0,help:["--help","-h"],...n};try{return br(t,o,n)}catch(r){if(n.showUsage)console.log(U(r.message,l(n.usageOpts?.color).error)+`
|
|
10
10
|
|
|
11
|
-
`+Ft(t,n.usageOpts));throw new Kr(r.message)}},br=(t,o,n)=>{let r=Vr(t),m={},f,E,G=n.start;for(;G<o.length;){let i=o[G];if(!f){if(n.help.includes(i)){console.log(Ft(t,n.usageOpts));return}let O=qr(t,r,m,i);if(f=O.id,E=O.spec,G=G+~~(O.state<2),O.state)break}else{if(pr(E,m,f,i))break;f=null,G++}}return f&&
|
|
11
|
+
`+Ft(t,n.usageOpts));throw new Kr(r.message)}},br=(t,o,n)=>{let r=Vr(t),m={},f,E,G=n.start;for(;G<o.length;){let i=o[G];if(!f){if(n.help.includes(i)){console.log(Ft(t,n.usageOpts));return}let O=qr(t,r,m,i);if(f=O.id,E=O.spec,G=G+~~(O.state<2),O.state)break}else{if(pr(E,m,f,i))break;f=null,G++}}return f&&e(`missing value for: --${rt(f)}`),{result:Qr(t,m),index:G,rest:o.slice(G),done:G>=o.length}},Vr=(t)=>Object.entries(t).reduce((o,[n,r])=>r.alias?(o[r.alias]=n,o):o,{}),qr=(t,o,n,r)=>{if(r[0]!=="-")return{state:2};let m;if(r[1]==="-"){if(r.length===2)return{state:1};m=Qo(r.substring(2))}else m=o[r.substring(1)],!m&&e(`unknown option: ${r}`);let f=t[m];if(!f&&e(m),f.type==="flag"){if(n[m]=!0,m=void 0,f.fn&&!f.fn("true"))return{state:1,spec:f}}return{state:0,id:m,spec:f}},pr=(t,o,n,r)=>{if(t.multi)L(o[n])?o[n].push(r):o[n]=[r];else o[n]=r;return t.fn&&!t.fn(r)},Qr=(t,o)=>{let n;for(let r in t)if(n=t[r],o[r]===void 0){if(n.default!==void 0)o[r]=n.default;else if(n.required)e(`missing arg: --${rt(r)}`)}else if(n.coerce)kr(n,o,r);return o},kr=(t,o,n)=>{try{if(t.multi&&t.delim&&t.split!==!1)o[n]=o[n].reduce((r,m)=>(r.push(...m.split(t.delim)),r),[]);o[n]=t.coerce(o[n])}catch(r){throw Error(`arg --${rt(n)}: ${r.message}`)}};var nn=async(t)=>{let o=t.argv||process.argv,n=!process.env.NO_COLOR,r=l(n),m={prefix:"",color:n,...t.usage};try{let f,E,G=t.start??2;if(t.single){if(f=Object.keys(t.commands)[0],!f)e("no command provided");E=t.commands[f]}else{if(f=o[G],E=t.commands[f],E)m.prefix+=tn({[f]:E},m,`
|
|
12
12
|
Current command:
|
|
13
|
-
`);else m.prefix+=tn(t.commands,m),co(t.opts,m);G++}let i={...t.opts,...E.opts},O;try{O=so(i,o,{usageOpts:m,start:G})}catch(
|
|
13
|
+
`);else m.prefix+=tn(t.commands,m),co(t.opts,m);G++}let i={...t.opts,...E.opts},O;try{O=so(i,o,{usageOpts:m,start:G})}catch(_){process.exit(1)}if(!O)process.exit(0);if(E.inputs!==void 0){let _=O.rest.length,h;if(L(E.inputs)){let[C,S]=E.inputs;if(_<C||_>S)h=S<1/0?`expected ${C}-${S} inputs`:`expected at least ${C} input(s)`}else if(_!==E.inputs)h=`expected ${E.inputs} input(s)`;if(h)on(h,r),co(i,m)}let N=await t.ctx({logger:new Pt(process.stderr,t.name,"INFO"),format:n?jt:qo,opts:O.result,inputs:O.rest},E);if(await E.fn(N),t.post)await t.post(N,E)}catch(f){on(f.message,r),process.exit(1)}},co=(t,o)=>{process.stderr.write(Ft(t,o)),process.exit(1)},tn=(t,{color:o,lineWidth:n=80}={},r=`
|
|
14
14
|
Available commands:
|
|
15
|
-
`)=>{let m=Object.keys(t).sort(),f=Math.max(...m.map((G)=>G.length)),E=
|
|
15
|
+
`)=>{let m=Object.keys(t).sort(),f=Math.max(...m.map((G)=>G.length)),E=l(o);return[r,...m.map((G)=>`${Kt(U(G,E.command),f)} : ${Vt(t[G].desc,f+3,n)}`),`
|
|
16
16
|
`].join(`
|
|
17
17
|
`)},on=(t,o)=>process.stderr.write(U(t,o.error)+`
|
|
18
18
|
|
|
@@ -22,16 +22,16 @@ Available commands:
|
|
|
22
22
|
\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2502 ${t} v${o}
|
|
23
23
|
\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2502 ${n}
|
|
24
24
|
\u2588 \u2502
|
|
25
|
-
\u2588 \u2588 \u2502`;var T=(t)=>typeof t==="string";var vr=[[process.env.HOME?new RegExp(process.env.HOME,"g"):/~/,"~"]];var qt=(t)=>{for(let[o,n]of vr)t=t.replace(o,n);return t};import{existsSync as
|
|
26
|
-
`):o,"utf-8",n,r);var Z=(t,o)=>JSON.parse(w(t,o));var b=Symbol(),uo=()=>{};var St=Object.freeze({level:B.NONE,addChild(t){return t},childLogger:()=>St,enabled:()=>!1,fine(){},debug(){},info(){},warn(){},severe(){},none(){},logEntry(){}});import{join as Qm}from"path";var Ao=(t,o)=>{if(t===o)return 0;if(t==null)return o==null?0:-1;if(o==null)return t==null?0:1;if(typeof t.compare==="function")return t.compare(o);if(typeof o.compare==="function")return-o.compare(t);return t<o?-1:t>o?1:0};var tm=Y(()=>"Assertion failed"),pt=(typeof process<"u"&&process.env!==void 0?!0:import.meta.env?import.meta.env.MODE!=="production"||!!import.meta.env.UMBRELLA_ASSERTS||!!import.meta.env.VITE_UMBRELLA_ASSERTS:!0)?(t,o)=>{if(typeof t==="function"&&!t()||!t)throw new tm(typeof o==="function"?o():o)}:()=>{};var Qt=(t)=>t!=null&&typeof t!=="function"&&t.length!==void 0;var Gn=(t)=>{return(t==null||!t[Symbol.iterator])&&
|
|
25
|
+
\u2588 \u2588 \u2502`;var T=(t)=>typeof t==="string";var vr=[[process.env.HOME?new RegExp(process.env.HOME,"g"):/~/,"~"]];var qt=(t)=>{for(let[o,n]of vr)t=t.replace(o,n);return t};import{existsSync as dr,mkdirSync as lr,statSync as IE}from"fs";import{dirname as gr}from"path";var xr=(t)=>t.length>0&&!dr(t)?(lr(t,{recursive:!0}),!0):!1,fn=(t)=>xr(gr(t));var X=(t)=>typeof t==="function";import{readFileSync as cr}from"fs";import{writeFileSync as ar}from"fs";var En=(t,o,n,r,m=!1)=>sr(ar,t,o,n,r,m);var sr=(t,o,n,r,m,f=!1)=>{if(m?.info(`${f?"[dryrun] ":""}writing file: ${qt(o)}`),f)return;return fn(o),t(o,n,!r&&T(n)?"utf-8":r)};var w=(t,o,n="utf-8")=>{return o?.debug("reading file:",qt(t)),cr(t,n)};var Co=(t,o,n,r=!1)=>En(t,L(o)?o.join(`
|
|
26
|
+
`):o,"utf-8",n,r);var Z=(t,o)=>JSON.parse(w(t,o));var b=Symbol(),uo=()=>{};var St=Object.freeze({level:B.NONE,addChild(t){return t},childLogger:()=>St,enabled:()=>!1,fine(){},debug(){},info(){},warn(){},severe(){},none(){},logEntry(){}});import{join as Qm}from"path";var Ao=(t,o)=>{if(t===o)return 0;if(t==null)return o==null?0:-1;if(o==null)return t==null?0:1;if(typeof t.compare==="function")return t.compare(o);if(typeof o.compare==="function")return-o.compare(t);return t<o?-1:t>o?1:0};var tm=Y(()=>"Assertion failed"),pt=(typeof process<"u"&&process.env!==void 0?!0:import.meta.env?import.meta.env.MODE!=="production"||!!import.meta.env.UMBRELLA_ASSERTS||!!import.meta.env.VITE_UMBRELLA_ASSERTS:!0)?(t,o)=>{if(typeof t==="function"&&!t()||!t)throw new tm(typeof o==="function"?o():o)}:()=>{};var Qt=(t)=>t!=null&&typeof t!=="function"&&t.length!==void 0;var Gn=(t)=>{return(t==null||!t[Symbol.iterator])&&e(`value is not iterable: ${t}`),t};var On=(t)=>Qt(t)?t:[...Gn(t)];var wt=(t)=>t[t.length-1];var kt=(t,o)=>typeof t?.[o]==="function";var $=(t)=>typeof t?.[Symbol.iterator]==="function";var vt=(t)=>t!=null&&typeof t!=="string"&&typeof t[Symbol.iterator]==="function";var om=Y(()=>"illegal arity"),ft=(t)=>{throw new om(t)};var nm=Y(()=>"illegal state"),Et=(t)=>{throw new nm(t)};var Nn=["-moz-","-ms-","-o-","-webkit-"],Gt={rules:"",ruleSep:",",valSep:"",decls:"",declStart:"{",declEnd:"}",indent:"",comments:!1},dt={rules:`
|
|
27
27
|
`,ruleSep:", ",valSep:" ",decls:`
|
|
28
28
|
`,declStart:` {
|
|
29
29
|
`,declEnd:`}
|
|
30
|
-
`,indent:" ",comments:!0};function Lo(...t){let[o,n,r,m,f,E,G,i,O,N]=t;switch(t.length){case 0:ft(0);case 1:return o;case 2:return(...
|
|
30
|
+
`,indent:" ",comments:!0};function Lo(...t){let[o,n,r,m,f,E,G,i,O,N]=t;switch(t.length){case 0:ft(0);case 1:return o;case 2:return(...h)=>o(n(...h));case 3:return(...h)=>o(n(r(...h)));case 4:return(...h)=>o(n(r(m(...h))));case 5:return(...h)=>o(n(r(m(f(...h)))));case 6:return(...h)=>o(n(r(m(f(E(...h))))));case 7:return(...h)=>o(n(r(m(f(E(G(...h)))))));case 8:return(...h)=>o(n(r(m(f(E(G(i(...h))))))));case 9:return(...h)=>o(n(r(m(f(E(G(i(O(...h)))))))));case 10:default:let _=(...h)=>o(n(r(m(f(E(G(i(O(N(...h))))))))));return t.length===10?_:Lo(_,...t.slice(10))}}var g=(t)=>kt(t,"xform")?t.xform():t;function P(...t){return t=t.map(g),Lo.apply(null,t)}var V=(t,o)=>[t[0],t[1],o];class yt{value;constructor(t){this.value=t}deref(){return this.value}}var y=(t)=>t instanceof yt,hn=(t)=>t instanceof yt?t:new yt(t),J=(t)=>t instanceof yt?t.deref():t;var rm=(t)=>t.length===2?[void 0,t[1]]:t.length===3?[t[1],t[2]]:ft(t.length);function it(...t){let o=t[0],n=o[0],r=o[1],m=o[2];t=rm(t);let f=t[0]==null?n():t[0],E=t[1];return J(r(kt(E,"$reduce")?E.$reduce(m,f):Qt(E)?mm(m,f,E):fm(m,f,E)))}var mm=(t,o,n)=>{for(let r=0,m=n.length;r<m;r++)if(o=t(o,n[r]),y(o)){o=o.deref();break}return o},fm=(t,o,n)=>{for(let r of n)if(o=t(o,r),y(o)){o=o.deref();break}return o},Ot=(t,o)=>[t,Tt,o],_n=(t,o)=>{let n=o.length-1;return $(o[n])?o.length>1?it(t.apply(null,o.slice(0,n)),o[n]):it(t(),o[0]):void 0};function Nt(t){return t?[...t]:Ot(()=>[],(o,n)=>(o.push(n),o))}function*ht(t,o){let n=g(t)(Nt()),r=n[1],m=n[2];for(let f of o){let E=m([],f);if(y(E)){yield*J(r(E.deref()));return}if(E.length)yield*E}yield*J(r([]))}function*x(t,o){let n=g(t)([uo,uo,(r,m)=>m])[2];for(let r of o){let m=n(b,r);if(y(m)){if(m=J(m.deref()),m!==b)yield m;return}if(m!==b)yield m}}var lt=(t,o,n=x)=>{let r=o.length-1;return $(o[r])?o.length>1?n(t.apply(null,o.slice(0,r)),o[r]):n(t(),o[0]):void 0};function Bo(t,o){return $(o)?ht(Bo(t),T(o)?[o]:o):(n)=>{let r=n[2],m=(f,E)=>{let G=t(E);if(G){for(let i of G)if(f=m(f,i),y(f))break;return f}return r(f,E)};return V(n,m)}}function en(t){return Bo((o)=>vt(o)?o:void 0,t)}function A(t,o){return $(o)?x(A(t),o):(n)=>{let r=n[2];return V(n,(m,f)=>r(m,t(f)))}}function*gt(...t){let o=t.length-1;if(o<0)return;let n=Array(o+1).fill(0),r=t.map(On),m=r.reduce((f,E)=>f*E.length,1);for(let f=0;f<m;f++){let E=[];for(let G=o;G>=0;G--){let i=r[G],O=n[G];if(O===i.length)n[G]=O=0,G>0&&n[G-1]++;E[G]=i[O]}n[o]++,yield E}}function*Cn(t,o=1/0){while(o-- >0)yield t}function To(t,o){t=t||"";let n=!0;return o?[...o].join(t):Ot(()=>"",(r,m)=>(r=n?r+m:r+t+m,n=!1,r))}function xt(...t){return Em(xt,it,t)}var Em=(t,o,n)=>{let r,m;switch(n.length){case 4:m=n[3],r=n[2];break;case 3:m=n[2];break;case 2:return A((f)=>t(n[0],n[1],f));default:ft(n.length)}return o(g(n[0])(n[1]),r,m)};var Gm=new Set,im=":[",un=P(en(),A((t)=>t[0]==="&"?t.substring(1):im.includes(t[0])?t:" "+t)),Om=(t,o)=>P(t,A((n)=>T(n)&&n.startsWith(" .")?n+o:n)),_t=(t,o,n,r)=>{let m=n.length,f=[],E,G,i=(O,N)=>{let _=null;if(L(N))_t(t,$o(o,f),N,r);else if($(N)&&!T(N))_t(t,$o(o,f),[...N],r);else if((G=X(N))||(_=r.fns[N]))if(!o.length){if(_)return _.apply(null,n.slice(O+1))(t,r),!0;N(t,r)}else if(G)i(O,N());else e(`quoted fn ('${N}') only allowed at head position`);else if(z(N))E=Object.assign(E||{},N);else if(N!=null)f.push(N)};for(let O=0;O<m;O++)if(i(O,n[O]))return t;return E&&t.push(Nm(o,f,E,r)),t},$o=(t,o)=>t.length?[...gt(t,o)]:o,Nm=(t,o,n,r)=>{let m=r.format,f=j(r),E=r.scope?Om(un,r.scope):un;return[f,xt(A((G)=>xt(E,To(),L(G)?G:[G]).trim()),To(m.ruleSep),$o(t,o)),m.declStart,Ht(n,r),f,m.declEnd].join("")},Ht=(t,o)=>{let n=o.format,r=o.autoprefix||Gm,m=j(o,o.depth+1),f=[];for(let E in t)if(t.hasOwnProperty(E)){let G=t[E];if(X(G))G=G(t);if(L(G))G=G.map((i)=>L(i)?i.join(" "):i).join(n.ruleSep);if(r.has(E))for(let i of o.vendors)f.push(`${m}${i}${E}:${n.valSep}${G};`);f.push(`${m}${E}:${n.valSep}${G};`)}return f.join(n.decls)+n.decls},j=(t,o=t.depth)=>o>1?[...Cn(t.format.indent,o)].join(""):o>0?t.format.indent:"";function An(t,...o){let n=o.length===1?o[0]:o.reduce((r,m,f)=>{return r[f/(o.length-1)*100|0]=m,r},{});return(r,m)=>{let f=j(m);m.depth++;let E=j(m);r.push(`${f}@keyframes ${t}${m.format.declStart}`);for(let G in n)if(n.hasOwnProperty(G))r.push([E,G+"%",m.format.declStart,Ht(n[G],m),E,m.format.declEnd].join(""));return m.depth--,r.push(f+m.format.declEnd),r}}var Ln=(t,o=!1)=>(n,r)=>{let m=j(r),f=j(r,r.depth+1);if(r.format.comments||o)n.push(m+"/*",t.split(`
|
|
31
31
|
`).map((E)=>f+E).join(`
|
|
32
|
-
`),m+"*/");return n};var at=(t,o,n)=>(r,m)=>{let f=j(m);return r.push(`${f}${t} ${em(o)}${m.format.declStart}`),m.depth++,ht(r,[],n,m),m.depth--,r.push(f+m.format.declEnd),r},em=(t)=>{if(T(t))return t;let o=[];for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];if(r===!0)r=Bn.has(n)?n:`(${n})`;else if(r===!1)r=`(not ${Bn.has(n)?n:`(${n})`})`;else if(r==="only")r+=" "+n;else r=`(${n}:${r})`;o.push(r)}return o.join(" and ")},Bn=new Set(["all","print","screen"]);var a=(t,o)=>{return o={format:Gt,vendors:Nn,fns:{},depth:0,...o},L(o.autoprefix)&&(o.autoprefix=new Set(o.autoprefix)),z(t)?Ht(t,o):X(t)?t([],o).join(o.format.rules):ht([],[],L(t)?t:vt(t)?[...t]:_("invalid rules"),o).join(o.format.rules)};var Tn=(t,...o)=>(n,r)=>(n.push(o.length?`@import url(${t}) ${o.join(r.format.ruleSep)};`:`@import url(${t});`),n);var _t=(t,o)=>at("@media",t,o);function $n(...t){return(o,n)=>(o.push(t.length>1?`@namespace ${t[0]} url(${t[1]});`:`@namespace url(${t[0]});`),o)}var Fn=(t,o)=>at("@supports",t,o);var st={"@comment":Ln,"@import":Tn,"@keyframes":An,"@media":_t,"@namespace":$n,"@supports":Fn};var Sn=4,wn=(t)=>Sn=t,M=(t)=>t===(t|0)?String(t):t.toFixed(Sn).replace(/^0./,".").replace(/^-0./,"-.").replace(/0+$/,"");var yn=(t)=>`${M(t)}em`,Hn=(t)=>`${M(t)}ex`;var Rn=(t)=>`${M(t)}rem`,Fo=(t)=>`${M(t)}%`,Mn=(t)=>`${M(t)}px`,In=(t)=>`${M(t)}vh`,Un=(t)=>`${M(t)}vw`,Wn=(t)=>`${M(t)}vmin`,Yn=(t)=>`${M(t)}vmax`,Dn=(t)=>`${t|0}ms`,zn=(t)=>`${M(t)}s`;var Pn=(t)=>`${M(t)}deg`,Jn=(t)=>`${M(t)}rad`,jn=(t)=>`${M(t)}turn`,Xn=(t)=>`url(${t})`;var F=((t)=>{return t[t.IDLE=0]="IDLE",t[t.ACTIVE=1]="ACTIVE",t[t.DONE=2]="DONE",t[t.UNSUBSCRIBED=3]="UNSUBSCRIBED",t[t.ERROR=4]="ERROR",t})(F||{});var hm=0,_m=()=>hm++,s=(t,o)=>!o||!o.id?{...o,id:t+"-"+_m()}:o;class So extends $t{set(t){this.parent=t}childLogger(t,o){return new So(t,o??this.level,this)}logEntry(t){this.parent.logEntry(t)}}var Zn=new So("root",B.FINE,St);var H=Zn.childLogger("rstream");class q{constructor(t,o){this.wrapped=t,o=s("sub",{closeIn:"last",closeOut:"last",cache:!0,...o}),this.parent=o.parent,this.id=o.id,this.closeIn=o.closeIn,this.closeOut=o.closeOut,this.cacheLast=o.cache,o.xform&&(this.xform=o.xform(Nt()))}id;closeIn;closeOut;parent;__owner;xform;cacheLast;last=b;state=F.IDLE;subs=[];deref(){return this.last!==b?this.last:void 0}getState(){return this.state}setState(t){this.state=t}subscribe(t,o={}){this.ensureState();let n;if(t instanceof q&&!o.xform)t.ensureState(),pt(!t.parent,`sub '${t.id}' already has a parent`),t.parent=this,n=t;else n=new q(t,{...o,parent:this});return this.subs.push(n),this.setState(F.ACTIVE),n.setState(F.ACTIVE),this.last!=b&&n.next(this.last),n}transform(...t){let o,n;if(z(wt(t)))n=t.pop(),o={error:n.error};return this.subscribe(o,s("xform",t.length>0?{...n,xform:P(...t)}:n))}map(t,o){return this.transform(A(t),o||{})}unsubscribe(t){return t?this.unsubscribeChild(t):this.unsubscribeSelf()}unsubscribeSelf(){return H.debug(this.id,"unsub self"),this.parent?.unsubscribe(this),this.state<F.UNSUBSCRIBED&&(this.state=F.UNSUBSCRIBED),this.release(),!0}unsubscribeChild(t){H.debug(this.id,"unsub child",t.id);let o=this.subs.indexOf(t);if(o>=0){if(this.subs.splice(o,1),this.closeOut==="first"||!this.subs.length&&this.closeOut!=="never")this.unsubscribe();return!0}return!1}next(t){if(this.state>=F.DONE)return;this.xform?this.dispatchXform(t):this.dispatch(t)}done(){if(H.debug(this.id,"entering done()"),this.state>=F.DONE)return;if(this.xform){if(!this.dispatchXformDone())return}if(this.state=F.DONE,this.dispatchTo("done"))this.state<F.UNSUBSCRIBED&&this.unsubscribe();H.debug(this.id,"exiting done()")}error(t){let n=this.wrapped?.error;return n&&H.debug(this.id,"attempting wrapped error handler"),n?.(t)||this.unhandledError(t)}unhandledError(t){return(H.parent!==St?H:console).warn(this.id,"unhandled error:",t),this.unsubscribe(),this.state=F.ERROR,!1}dispatchTo(t,o){let n=this.wrapped;if(n)try{n[t]&&n[t](o)}catch(m){if(!this.error(m))return!1}let r=t==="next"?this.subs:[...this.subs];for(let m=r.length;m-- >0;){n=r[m];try{n[t]&&n[t](o)}catch(f){if(t==="error"||!n.error||!n.error(f))return this.unhandledError(f)}}return!0}dispatch(t){H.debug(this.id,"dispatch",t),this.cacheLast&&(this.last=t),this.dispatchTo("next",t)}dispatchXform(t){let o;try{o=this.xform[2]([],t)}catch(n){this.error(n);return}if(this.dispatchXformVals(o))y(o)&&this.done()}dispatchXformDone(){let t;try{t=this.xform[1]([])}catch(o){return this.error(o)}return this.dispatchXformVals(t)}dispatchXformVals(t){let o=J(t);for(let n=0,r=o.length;n<r&&this.state<F.DONE;n++)this.dispatch(o[n]);return this.state<F.ERROR}ensureState(){if(this.state>=F.DONE)Et(`operation not allowed in state ${F[this.state]}`)}release(){this.subs.length=0,delete this.parent,delete this.xform,delete this.last}}var Kn=(t,o)=>{let n=new bn(o);return n.next(t),n};class bn extends q{src;_cancel;_inited;constructor(t,o){let[n,r]=X(t)?[t,o||{}]:[void 0,t||{}];super(r.error?{error:r.error}:void 0,s("stream",r));this.src=n,this._inited=!1}subscribe(t,o={}){let n=super.subscribe(t,o);if(!this._inited){if(this.src)try{this._cancel=this.src(this)||(()=>{return})}catch(r){let m=this.wrapped;if(!m||!m.error||!m.error(r))this.unhandledError(r)}this._inited=!0}return n}unsubscribe(t){let o=super.unsubscribe(t);if(o&&(!t||(!this.subs||!this.subs.length)&&this.closeOut!=="never"))this.cancel();return o}done(){this.cancel(),super.done(),delete this.src,delete this._cancel}error(t){if(super.error(t))return!0;return this.cancel(),!1}cancel(){if(this._cancel){H.debug(this.id,"cancel");let t=this._cancel;delete this._cancel,t()}}}var Vn=(t,o)=>t==="first"||t==="last"&&!o;function wo(t){return t?it(wo(),t):Ot(()=>({}),(o,[n,r])=>(o[n]=r,o))}var qn=()=>(t)=>{let o=t[2];return V(t,(n,r)=>{if(r){for(let m of J(r)||[])if(n=o(n,m),y(n))break}return y(r)?en(n):n})};function yo(t,o){return $(o)?et(yo(t),o):P(A(t),qn())}function Ho(t,o){return $(o)?x(Ho(t),o):A(X(t)?(n)=>[t(n),n]:(n)=>[t,n])}function Ro(...t){let o=dt(Ro,t);if(o)return o;let n=t[0],r=t[1]!==!1;return A((m)=>{let f=r?{}:m;for(let E in m)f[E]=n(m[E]);return f})}var pn=(t)=>t;function Mo(...t){let o=dt(Mo,t,et);if(o)return o;let{key:n=pn,mergeOnly:r=!1,reset:m=!0,all:f=!0,backPressure:E=0}=t[1],G=L(t[0])?new Set(t[0]):t[0],i=new Set,O=new Map,N={},h=([e,C,S])=>{let v=!0;if(r||E<1)return[e,(u)=>{if(m&&f&&i.size>0||!m&&v)u=S(u,N),N={},i.clear(),v=!1;return C(u)},(u,l)=>{let R=n(l);if(G.has(R)){if(N[R]=l,i.add(R),r||Qn(G,i))if(u=S(u,N),v=!1,m)N={},i.clear();else N={...N}}return u}];else return[e,(u)=>{if(f&&i.size>0)u=S(u,kn(O,i)),O.clear(),i.clear();return C(u)},(u,l)=>{let R=n(l);if(G.has(R)){let K=O.get(R);!K&&O.set(R,K=[]),K.length>=E&&Et(`max back pressure (${E}) exceeded for input: ${String(R)}`),K.push(l),i.add(R);while(Qn(G,i))if(u=S(u,kn(O,i)),v=!1,y(u))break}return u}]};return h.keys=()=>G,h.clear=()=>{O.clear(),G.clear(),i.clear(),N={}},h.add=(e)=>{G.add(e)},h.delete=(e,C=!0)=>{if(O.delete(e),G.delete(e),C)i.delete(e),delete N[e]},h}var Qn=(t,o)=>{if(o.size<t.size)return!1;for(let n of t)if(!o.has(n))return!1;return!0},kn=(t,o)=>{let n={};for(let r of o){let m=t.get(r);n[r]=m.shift(),!m.length&&o.delete(r)}return n};var vn=(t,o)=>{let n=!0;for(let r of o)n=t.removeID(r)&&n;return n};var ct=(t)=>new ln(t);class ln extends q{sources;idSources;realSourceIDs;invRealSourceIDs;psync;clean;constructor(t){let o=Mo(new Set,{key:(r)=>r[0],mergeOnly:t.mergeOnly===!0,reset:t.reset===!0,all:t.all!==!1,backPressure:t.backPressure||0}),n=Ro((r)=>r[1]);super(void 0,s("streamsync",{...t,xform:t.xform?P(o,n,t.xform):P(o,n)}));this.sources=new Map,this.realSourceIDs=new Map,this.invRealSourceIDs=new Map,this.idSources=new Map,this.psync=o,this.clean=!!t.clean,t.src&&this.addAll(t.src)}add(t,o){o||(o=t.id),this.ensureState(),this.psync.add(o),this.realSourceIDs.set(o,t.id),this.invRealSourceIDs.set(t.id,o),this.idSources.set(t.id,t),this.sources.set(t,t.subscribe({next:(n)=>n[1]instanceof q?this.add(n[1]):this.next(n),done:()=>this.markDone(t),__owner:this},{xform:Ho(o),id:`in-${o}`}))}addAll(t){for(let o in t)this.psync.add(o);for(let o in t)this.add(t[o],o)}remove(t){let o=this.sources.get(t);if(o){let n=this.invRealSourceIDs.get(t.id);return H.info(`removing src: ${t.id} (${n})`),this.psync.delete(n,this.clean),this.realSourceIDs.delete(n),this.invRealSourceIDs.delete(t.id),this.idSources.delete(t.id),this.sources.delete(t),o.unsubscribe(),!0}return!1}removeID(t){let o=this.getSourceForID(t);return o?this.remove(o):!1}removeAll(t){for(let n of t)this.psync.delete(this.invRealSourceIDs.get(n.id));let o=!0;for(let n of t)o=this.remove(n)&&o;return o}removeAllIDs(t){return vn(this,t)}getSourceForID(t){return this.idSources.get(this.realSourceIDs.get(t))}getSources(){let t={};for(let[o,n]of this.idSources)t[this.invRealSourceIDs.get(o)]=n;return t}unsubscribe(t){if(!t){H.debug(this.id,"unsub sources");for(let o of this.sources.values())o.unsubscribe();this.sources.clear(),this.psync.clear(),this.realSourceIDs.clear(),this.invRealSourceIDs.clear(),this.idSources.clear()}return super.unsubscribe(t)}markDone(t){this.remove(t),Vn(this.closeIn,this.sources.size)&&this.done()}}var Io=W((t,o=" ")=>{let n=nt(String(o),t);return(r,m)=>{if(r==null)return n;return r=r.toString(),m=m!==void 0?m:r.length,m<t?n.substring(m)+r:r}}),N2=Io(2,"0"),e2=Io(3,"0"),dn=Io(4,"0");var Cm=/\{(\d+)\}/g;var Uo=(t,...o)=>o.length>0?t.replace(Cm,(n,r)=>String(o[parseInt(r,10)])):t;var gn=(t)=>({key:(o)=>o,group:Nt(),...t});function Wo(...t){let o=hn(Wo,t);if(o)return o;let n=gn(t[0]),[r,m,f]=n.group;return[()=>({}),(E)=>{for(let G in E)E[G]=m(E[G]);return E},(E,G)=>{let i=n.key(G);return E[i]=E[i]?f(E[i],G):f(r(),G),E}]}function Yo(t,o){return $(o)?x(Yo(t),o):(n)=>{let r=n[2];return V(n,(m,f)=>t(f)?r(m,f):m)}}import{watch as tr}from"fs";import{resolve as c}from"path";var xn={specs:D({alias:"s",required:!0,desc:"Path to generated JSON defs"})},to={bundle:I({alias:"b",desc:"Bundle inputs (see `out` option)"})},Ct={include:Dt({alias:"I",desc:"Include CSS files (prepend)"})},oo={eval:D({alias:"e",desc:"eval meta stylesheet in given string (ignores other inputs & includes)"})},no={force:Dt({alias:"f",hint:"STR",desc:"CSS classes to force include (wildcards are supported, @-prefix will read from file)",delim:","})},an={media:Dt({alias:"m",hint:"ID",desc:"Media query IDs (use 'ALL' for all)",delim:","})},sn={onlyDecls:I({desc:"Only emit framework decls"})},p={out:D({alias:"o",desc:"Output file (or stdout)"})},ro={prec:zt({default:3,desc:"Number of fractional digits"})},Q={pretty:I({alias:"p",desc:"Pretty print output"})},ut={noDecls:I({alias:"d",desc:"Don't emit framework decls"})},At={noHeader:I({desc:"Don't emit generated header comment"})},Lt={scope:D({desc:"Suffix for CSS class names"})},Bt={watch:I({alias:"w",desc:"Watch input files for changes"})};import{watch as um}from"fs";import{resolve as cn}from"path";var k=(t,o,n)=>{o=T(o)?o:o.join(`
|
|
32
|
+
`),m+"*/");return n};var at=(t,o,n)=>(r,m)=>{let f=j(m);return r.push(`${f}${t} ${hm(o)}${m.format.declStart}`),m.depth++,_t(r,[],n,m),m.depth--,r.push(f+m.format.declEnd),r},hm=(t)=>{if(T(t))return t;let o=[];for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];if(r===!0)r=Bn.has(n)?n:`(${n})`;else if(r===!1)r=`(not ${Bn.has(n)?n:`(${n})`})`;else if(r==="only")r+=" "+n;else r=`(${n}:${r})`;o.push(r)}return o.join(" and ")},Bn=new Set(["all","print","screen"]);var a=(t,o)=>{return o={format:Gt,vendors:Nn,fns:{},depth:0,...o},L(o.autoprefix)&&(o.autoprefix=new Set(o.autoprefix)),z(t)?Ht(t,o):X(t)?t([],o).join(o.format.rules):_t([],[],L(t)?t:vt(t)?[...t]:e("invalid rules"),o).join(o.format.rules)};var Tn=(t,...o)=>(n,r)=>(n.push(o.length?`@import url(${t}) ${o.join(r.format.ruleSep)};`:`@import url(${t});`),n);var et=(t,o)=>at("@media",t,o);function $n(...t){return(o,n)=>(o.push(t.length>1?`@namespace ${t[0]} url(${t[1]});`:`@namespace url(${t[0]});`),o)}var Fn=(t,o)=>at("@supports",t,o);var st={"@comment":Ln,"@import":Tn,"@keyframes":An,"@media":et,"@namespace":$n,"@supports":Fn};var Sn=4,wn=(t)=>Sn=t,M=(t)=>t===(t|0)?String(t):t.toFixed(Sn).replace(/^0./,".").replace(/^-0./,"-.").replace(/0+$/,"");var yn=(t)=>`${M(t)}em`,Hn=(t)=>`${M(t)}ex`;var Rn=(t)=>`${M(t)}rem`,Fo=(t)=>`${M(t)}%`,Mn=(t)=>`${M(t)}px`,In=(t)=>`${M(t)}vh`,Un=(t)=>`${M(t)}vw`,Wn=(t)=>`${M(t)}vmin`,Yn=(t)=>`${M(t)}vmax`,Dn=(t)=>`${t|0}ms`,zn=(t)=>`${M(t)}s`;var Pn=(t)=>`${M(t)}deg`,Jn=(t)=>`${M(t)}rad`,jn=(t)=>`${M(t)}turn`,Xn=(t)=>`url(${t})`;var F=((t)=>{return t[t.IDLE=0]="IDLE",t[t.ACTIVE=1]="ACTIVE",t[t.DONE=2]="DONE",t[t.UNSUBSCRIBED=3]="UNSUBSCRIBED",t[t.ERROR=4]="ERROR",t})(F||{});var _m=0,em=()=>_m++,s=(t,o)=>!o||!o.id?{...o,id:t+"-"+em()}:o;class So extends $t{set(t){this.parent=t}childLogger(t,o){return new So(t,o??this.level,this)}logEntry(t){this.parent.logEntry(t)}}var Zn=new So("root",B.FINE,St);var H=Zn.childLogger("rstream");class q{constructor(t,o){this.wrapped=t,o=s("sub",{closeIn:"last",closeOut:"last",cache:!0,...o}),this.parent=o.parent,this.id=o.id,this.closeIn=o.closeIn,this.closeOut=o.closeOut,this.cacheLast=o.cache,o.xform&&(this.xform=o.xform(Nt()))}id;closeIn;closeOut;parent;__owner;xform;cacheLast;last=b;state=F.IDLE;subs=[];deref(){return this.last!==b?this.last:void 0}getState(){return this.state}setState(t){this.state=t}subscribe(t,o={}){this.ensureState();let n;if(t instanceof q&&!o.xform)t.ensureState(),pt(!t.parent,`sub '${t.id}' already has a parent`),t.parent=this,n=t;else n=new q(t,{...o,parent:this});return this.subs.push(n),this.setState(F.ACTIVE),n.setState(F.ACTIVE),this.last!=b&&n.next(this.last),n}transform(...t){let o,n;if(z(wt(t)))n=t.pop(),o={error:n.error};return this.subscribe(o,s("xform",t.length>0?{...n,xform:P(...t)}:n))}map(t,o){return this.transform(A(t),o||{})}unsubscribe(t){return t?this.unsubscribeChild(t):this.unsubscribeSelf()}unsubscribeSelf(){return H.debug(this.id,"unsub self"),this.parent?.unsubscribe(this),this.state<F.UNSUBSCRIBED&&(this.state=F.UNSUBSCRIBED),this.release(),!0}unsubscribeChild(t){H.debug(this.id,"unsub child",t.id);let o=this.subs.indexOf(t);if(o>=0){if(this.subs.splice(o,1),this.closeOut==="first"||!this.subs.length&&this.closeOut!=="never")this.unsubscribe();return!0}return!1}next(t){if(this.state>=F.DONE)return;this.xform?this.dispatchXform(t):this.dispatch(t)}done(){if(H.debug(this.id,"entering done()"),this.state>=F.DONE)return;if(this.xform){if(!this.dispatchXformDone())return}if(this.state=F.DONE,this.dispatchTo("done"))this.state<F.UNSUBSCRIBED&&this.unsubscribe();H.debug(this.id,"exiting done()")}error(t){let n=this.wrapped?.error;return n&&H.debug(this.id,"attempting wrapped error handler"),n?.(t)||this.unhandledError(t)}unhandledError(t){return(H.parent!==St?H:console).warn(this.id,"unhandled error:",t),this.unsubscribe(),this.state=F.ERROR,!1}dispatchTo(t,o){let n=this.wrapped;if(n)try{n[t]&&n[t](o)}catch(m){if(!this.error(m))return!1}let r=t==="next"?this.subs:[...this.subs];for(let m=r.length;m-- >0;){n=r[m];try{n[t]&&n[t](o)}catch(f){if(t==="error"||!n.error||!n.error(f))return this.unhandledError(f)}}return!0}dispatch(t){H.debug(this.id,"dispatch",t),this.cacheLast&&(this.last=t),this.dispatchTo("next",t)}dispatchXform(t){let o;try{o=this.xform[2]([],t)}catch(n){this.error(n);return}if(this.dispatchXformVals(o))y(o)&&this.done()}dispatchXformDone(){let t;try{t=this.xform[1]([])}catch(o){return this.error(o)}return this.dispatchXformVals(t)}dispatchXformVals(t){let o=J(t);for(let n=0,r=o.length;n<r&&this.state<F.DONE;n++)this.dispatch(o[n]);return this.state<F.ERROR}ensureState(){if(this.state>=F.DONE)Et(`operation not allowed in state ${F[this.state]}`)}release(){this.subs.length=0,delete this.parent,delete this.xform,delete this.last}}var Kn=(t,o)=>{let n=new bn(o);return n.next(t),n};class bn extends q{src;_cancel;_inited;constructor(t,o){let[n,r]=X(t)?[t,o||{}]:[void 0,t||{}];super(r.error?{error:r.error}:void 0,s("stream",r));this.src=n,this._inited=!1}subscribe(t,o={}){let n=super.subscribe(t,o);if(!this._inited){if(this.src)try{this._cancel=this.src(this)||(()=>{return})}catch(r){let m=this.wrapped;if(!m||!m.error||!m.error(r))this.unhandledError(r)}this._inited=!0}return n}unsubscribe(t){let o=super.unsubscribe(t);if(o&&(!t||(!this.subs||!this.subs.length)&&this.closeOut!=="never"))this.cancel();return o}done(){this.cancel(),super.done(),delete this.src,delete this._cancel}error(t){if(super.error(t))return!0;return this.cancel(),!1}cancel(){if(this._cancel){H.debug(this.id,"cancel");let t=this._cancel;delete this._cancel,t()}}}var Vn=(t,o)=>t==="first"||t==="last"&&!o;function wo(t){return t?it(wo(),t):Ot(()=>({}),(o,[n,r])=>(o[n]=r,o))}var qn=()=>(t)=>{let o=t[2];return V(t,(n,r)=>{if(r){for(let m of J(r)||[])if(n=o(n,m),y(n))break}return y(r)?hn(n):n})};function yo(t,o){return $(o)?ht(yo(t),o):P(A(t),qn())}function Ho(t,o){return $(o)?x(Ho(t),o):A(X(t)?(n)=>[t(n),n]:(n)=>[t,n])}function Ro(...t){let o=lt(Ro,t);if(o)return o;let n=t[0],r=t[1]!==!1;return A((m)=>{let f=r?{}:m;for(let E in m)f[E]=n(m[E]);return f})}var pn=(t)=>t;function Mo(...t){let o=lt(Mo,t,ht);if(o)return o;let{key:n=pn,mergeOnly:r=!1,reset:m=!0,all:f=!0,backPressure:E=0}=t[1],G=L(t[0])?new Set(t[0]):t[0],i=new Set,O=new Map,N={},_=([h,C,S])=>{let v=!0;if(r||E<1)return[h,(u)=>{if(m&&f&&i.size>0||!m&&v)u=S(u,N),N={},i.clear(),v=!1;return C(u)},(u,d)=>{let R=n(d);if(G.has(R)){if(N[R]=d,i.add(R),r||Qn(G,i))if(u=S(u,N),v=!1,m)N={},i.clear();else N={...N}}return u}];else return[h,(u)=>{if(f&&i.size>0)u=S(u,kn(O,i)),O.clear(),i.clear();return C(u)},(u,d)=>{let R=n(d);if(G.has(R)){let K=O.get(R);!K&&O.set(R,K=[]),K.length>=E&&Et(`max back pressure (${E}) exceeded for input: ${String(R)}`),K.push(d),i.add(R);while(Qn(G,i))if(u=S(u,kn(O,i)),v=!1,y(u))break}return u}]};return _.keys=()=>G,_.clear=()=>{O.clear(),G.clear(),i.clear(),N={}},_.add=(h)=>{G.add(h)},_.delete=(h,C=!0)=>{if(O.delete(h),G.delete(h),C)i.delete(h),delete N[h]},_}var Qn=(t,o)=>{if(o.size<t.size)return!1;for(let n of t)if(!o.has(n))return!1;return!0},kn=(t,o)=>{let n={};for(let r of o){let m=t.get(r);n[r]=m.shift(),!m.length&&o.delete(r)}return n};var vn=(t,o)=>{let n=!0;for(let r of o)n=t.removeID(r)&&n;return n};var ct=(t)=>new dn(t);class dn extends q{sources;idSources;realSourceIDs;invRealSourceIDs;psync;clean;constructor(t){let o=Mo(new Set,{key:(r)=>r[0],mergeOnly:t.mergeOnly===!0,reset:t.reset===!0,all:t.all!==!1,backPressure:t.backPressure||0}),n=Ro((r)=>r[1]);super(void 0,s("streamsync",{...t,xform:t.xform?P(o,n,t.xform):P(o,n)}));this.sources=new Map,this.realSourceIDs=new Map,this.invRealSourceIDs=new Map,this.idSources=new Map,this.psync=o,this.clean=!!t.clean,t.src&&this.addAll(t.src)}add(t,o){o||(o=t.id),this.ensureState(),this.psync.add(o),this.realSourceIDs.set(o,t.id),this.invRealSourceIDs.set(t.id,o),this.idSources.set(t.id,t),this.sources.set(t,t.subscribe({next:(n)=>n[1]instanceof q?this.add(n[1]):this.next(n),done:()=>this.markDone(t),__owner:this},{xform:Ho(o),id:`in-${o}`}))}addAll(t){for(let o in t)this.psync.add(o);for(let o in t)this.add(t[o],o)}remove(t){let o=this.sources.get(t);if(o){let n=this.invRealSourceIDs.get(t.id);return H.info(`removing src: ${t.id} (${n})`),this.psync.delete(n,this.clean),this.realSourceIDs.delete(n),this.invRealSourceIDs.delete(t.id),this.idSources.delete(t.id),this.sources.delete(t),o.unsubscribe(),!0}return!1}removeID(t){let o=this.getSourceForID(t);return o?this.remove(o):!1}removeAll(t){for(let n of t)this.psync.delete(this.invRealSourceIDs.get(n.id));let o=!0;for(let n of t)o=this.remove(n)&&o;return o}removeAllIDs(t){return vn(this,t)}getSourceForID(t){return this.idSources.get(this.realSourceIDs.get(t))}getSources(){let t={};for(let[o,n]of this.idSources)t[this.invRealSourceIDs.get(o)]=n;return t}unsubscribe(t){if(!t){H.debug(this.id,"unsub sources");for(let o of this.sources.values())o.unsubscribe();this.sources.clear(),this.psync.clear(),this.realSourceIDs.clear(),this.invRealSourceIDs.clear(),this.idSources.clear()}return super.unsubscribe(t)}markDone(t){this.remove(t),Vn(this.closeIn,this.sources.size)&&this.done()}}var Io=W((t,o=" ")=>{let n=nt(String(o),t);return(r,m)=>{if(r==null)return n;return r=r.toString(),m=m!==void 0?m:r.length,m<t?n.substring(m)+r:r}}),N2=Io(2,"0"),h2=Io(3,"0"),ln=Io(4,"0");var Cm=/\{(\d+)\}/g;var Uo=(t,...o)=>o.length>0?t.replace(Cm,(n,r)=>String(o[parseInt(r,10)])):t;var gn=(t)=>({key:(o)=>o,group:Nt(),...t});function Wo(...t){let o=_n(Wo,t);if(o)return o;let n=gn(t[0]),[r,m,f]=n.group;return[()=>({}),(E)=>{for(let G in E)E[G]=m(E[G]);return E},(E,G)=>{let i=n.key(G);return E[i]=E[i]?f(E[i],G):f(r(),G),E}]}function Yo(t,o){return $(o)?x(Yo(t),o):(n)=>{let r=n[2];return V(n,(m,f)=>t(f)?r(m,f):m)}}import{watch as tr}from"fs";import{resolve as c}from"path";var xn={specs:D({alias:"s",required:!0,desc:"Path to generated JSON defs"})},to={bundle:I({alias:"b",desc:"Bundle inputs (see `out` option)"})},Ct={include:Dt({alias:"I",desc:"Include CSS files (prepend)"})},oo={eval:D({alias:"e",desc:"eval meta stylesheet in given string (ignores other inputs & includes)"})},no={force:Dt({alias:"f",hint:"STR",desc:"CSS classes to force include (wildcards are supported, @-prefix will read from file)",delim:","})},an={media:Dt({alias:"m",hint:"ID",desc:"Media query IDs (use 'ALL' for all)",delim:","})},sn={onlyDecls:I({desc:"Only emit framework decls"})},p={out:D({alias:"o",desc:"Output file (or stdout)"})},ro={prec:zt({default:3,desc:"Number of fractional digits"})},Q={pretty:I({alias:"p",desc:"Pretty print output"})},ut={noDecls:I({alias:"d",desc:"Don't emit framework decls"})},At={noHeader:I({desc:"Don't emit generated header comment"})},Lt={scope:D({desc:"Suffix for CSS class names"})},Bt={watch:I({alias:"w",desc:"Watch input files for changes"})};import{watch as um}from"fs";import{resolve as cn}from"path";var k=(t,o,n)=>{o=T(o)?o:o.join(`
|
|
33
33
|
`),t?Co(cn(t),o,n):process.stdout.write(o+`
|
|
34
|
-
`)},mo=({info:{name:t,version:o}})=>`/*! ${t} v${o} - generated by thi.ng/meta-css @ ${new Date().toISOString()} */`,Rt=(t,o)=>{let n=()=>{o.info("closing watchers..."),r.forEach((m)=>m.watcher.close())},r=t.map((m,f)=>{m=cn(m);let E=Kn(w(m,o),{id:`in${dn(f)}`});return{input:E,watcher:um(m,{},(G)=>{if(G==="change")try{E.next(w(m,o))}catch(i){o.warn(i.message),n()}else o.warn("input removed:",m),n()})}});return process.on("SIGINT",n),ct({src:wo(A(({input:m})=>[m.id,m],r))})},fo=(t)=>Object.keys(t).reduce((o,n)=>{if(!n.startsWith("__"))o[n]=t[n];return o},{});var nr={desc:"Transpile (and optionally bundle) meta stylesheets to CSS",opts:{...to,...oo,...no,...Ct,...ut,...At,...p,...Q,...Lt,...xn,...Bt,noWrite:I({desc:"Don't write files, use stdout only"})},fn:Do};async function Do(t){let o=Z(c(t.opts.specs),t.logger),n=$m(o,t.opts.force||[],t.logger);if(t.opts.bundle)if(t.opts.watch)await Lm(t,n);else It(t,o,n,t.opts.eval?[t.opts.eval]:t.inputs.map((r)=>w(c(r),t.logger)),t.opts.out);else if(t.opts.watch)await Am(t,o,n);else if(t.opts.eval)try{It(t,o,n,[t.opts.eval])}catch(r){t.logger.warn(r.message)}else for(let r of t.inputs)try{r=c(r);let m=!t.opts.noWrite?r.replace(/\.mcss$/,".css"):void 0;It(t,o,n,[w(r,t.logger)],m)}catch(m){t.logger.warn(m.message)}}var Am=async(t,o,n)=>{let r=c(t.opts.specs),m,f={process:()=>{try{return o=Z(r,t.logger),m.forEach((G)=>G.process()),!0}catch(G){return t.logger.warn(G.message+": "+r),!1}},watcher:tr(r,{},(G)=>{if(G==="change")f.process();else t.logger.warn("specs file removed:",r),E()})},E=()=>{t.logger.info("closing watchers..."),f.watcher.close(),m.forEach((G)=>G.watcher.close())};m=t.inputs.map((G)=>{G=c(G);let i=!t.opts.noWrite?G.replace(/\.mcss$/,".css"):void 0,O=()=>{try{return It(t,o,n,[w(G,t.logger)],i),!0}catch(N){if(t.logger.warn(N.message+": "+G),m)E();return!1}};if(!O())process.exit(1);return{process:O,watcher:tr(G,{},(N)=>{if(N==="change")O();else t.logger.warn("input removed:",G),E()})}}),t.logger.info("waiting for changes, press ctrl+c to cancel..."),process.on("SIGINT",E)},Lm=async(t,o)=>{ct({src:{styles:Rt(t.inputs,t.logger),specs:Rt([t.opts.specs],t.logger).map((n)=>JSON.parse(Object.values(n)[0]))}}).subscribe({next({styles:n,specs:r}){try{It(t,r,o,Object.keys(n).sort().map((m)=>n[m]),t.opts.out)}catch(m){t.logger.warn(m.message)}}})},It=({logger:t,opts:{include:o,noDecls:n,noHeader:r,pretty:m,scope:f}},E,G,i,O)=>{let N={logger:t,specs:E,css:{format:m?lt:Gt,fns:st,scope:f},mediaQueryIDs:new Set(Object.keys(E.media)),mediaQueryRules:{...G.mediaQueryRules},plainRules:{...G.plainRules}},h=o?o.map((e)=>w(c(e),t).trim()):[];if(!r)h.push(mo(E));if(!n&&E.decls.length)h.push(a(E.decls,N.css));i.forEach((e)=>Fm(e,N)),Tm(h,N),Bm(h,N),k(O,h,t)},Bm=(t,{css:o,logger:n,mediaQueryRules:r,specs:m})=>{for(let f in r){let E=mr(r[f],m);n.debug("mediaquery rules",f,E),t.push(a(_t(Hm(m.media,f),E),o))}},Tm=(t,{css:o,logger:n,plainRules:r,specs:m})=>{let f=mr(r,m);n.debug("plain rules",f),t.push(a(f,o))},$m=(t,o,n)=>{let r=new Set(Object.keys(t.media)),m=new Set(Object.keys(t.classes)),f={},E={};if(o.length&&o[0][0]==="@")o=[...mt(w(c(o[0].substring(1)),n))];for(let G of o){if(!G||G.startsWith("//"))continue;let{token:i,query:O}=fr(G,r),N;if(i.includes("*")){let h=new RegExp(`^${i.replace("*",".*")}$`);N=[...Yo((e)=>h.test(e),m)]}else if(m.has(i))N=[i];else{n.warn(`unknown include rule ID: ${G}, skipping...`);continue}for(let h of N)n.debug("including class:",h),O?Er(f,O,`.${h}`,h):Gr(E,`.${h}`,h)}return{mediaQueryRules:f,plainRules:E}},Fm=(t,{specs:o,mediaQueryIDs:n,mediaQueryRules:r,plainRules:m})=>{let f=Ut(),E=Ut(f),G={root:f,curr:E,scopes:[E]};for(let i of mt(t)){if(!i||/^\s*\/\//.test(i))continue;for(let O of Sm(i)){if(!O)continue;let N=G.curr;switch(N.state){case"sel":case"nest":if(O==="{"){if(N.state==="sel")N.sel=N.sel.map((h)=>h.replace(",","")),N.path=wm(G.scopes);N.state="class"}else if(O==="}")or(G);else{let h=wt(N.sel);if(!h||h.endsWith(","))N.sel.push(O);else N.sel[N.sel.length-1]+=" "+O}break;case"class":if(O==="{")N.state="nest",G.scopes.push(G.curr=Ut(N));else if(O==="}")or(G);else{let{token:h,query:e}=fr(O,n);if(!o.classes[h]&&!(ir(h)||Nr(h)||Or(h)))_(`unknown class ID: ${h}`);if(e)Er(r,e,N.path,h);else Gr(m,N.path,h)}break;default:Et(N.state)}}}};function*Sm(t){let o=-1,n=t.length,r=0,m=0,f=!1;for(let E=0;E<n;E++){let G=t[E];if(G==='"'&&!(r||m))if(f)yield t.substring(o,E+1),o=-1,f=!1;else f=!0;else if(G===" "||G==="\t"){if(!(r||m||f)&&o>=0)yield t.substring(o,E),o=-1}else if(G==="{"||G==="}"){if(o>=0)yield t.substring(o,E);yield G,o=-1}else if(G==="(")r++;else if(G===")"){if(--r<0)_(`invalid nesting in line: '${t}'`)}else if(G==="["){if(o<0)o=E;m++}else if(G==="]"){if(--m<0)_(`invalid arg nesting in line: '${t}'`)}else if(o<0)o=E}if(f)_("string literals must be fully on a single line");if(r)_("template calls must be fully on a single line");if(m)_("verbatim properties must be fully on a single line");if(o>=0)yield t.substring(o,n)}var Mt=":",rr="///",Ut=(t)=>({state:"sel",sel:t?[]:["<root>"],path:"",parent:t}),or=(t)=>{let o=!t.curr.sel.length;if(pt(!!t.curr.parent,"stack underflow"),t.scopes.pop(),t.scopes.length>0){if(t.curr=wt(t.scopes),!o&&t.curr.state==="nest")t.scopes.push(t.curr=Ut(t.curr))}else t.scopes.push(t.curr=Ut(t.root))},wm=(t)=>t.map((o)=>o.sel.join(",")).join(rr),mr=(t,o)=>Object.entries(t).map(([n,r])=>ym(n,r,o)),ym=(t,o,n)=>{let r=[],m=r,f=t.split(rr);for(let E=0;E<f.length;E++){let G=f[E].split(",");if(E==f.length-1){let i=Object.assign({},...A((O)=>Nr(O)?Im(O):ir(O)?Rm(O):Or(O)?Mm(n,O):fo(n.classes[O]),o));G.push(i)}m.push(G),m=G}return r[0]},fr=(t,o)=>{if(/^::?/.test(t))return{token:t};let n=t.lastIndexOf(Mt);if(n<0)return{token:t};let r=t.indexOf("("),m=t.indexOf("[");if(r>0||m>0){let G=r>0?m>0?Math.min(r,m):r:m;if(G<n&&t.indexOf(Mt)>G)return{token:t};n=t.substring(0,G).lastIndexOf(Mt)}let f=t.substring(0,n);if(!f.split(Mt).every((G)=>o.has(G)))_(`invalid media query in token: ${t}`);return{token:t.substring(n+1),query:f}},Hm=(t,o)=>o.split(Mt).reduce((n,r)=>Object.assign(n,t[r]),{}),Er=(t,o,n,r)=>{if(!t[o])t[o]={};(t[o][n]||(t[o][n]=new Set)).add(r)},Gr=(t,o,n)=>(t[o]||(t[o]=new Set)).add(n),Rm=(t)=>{let o=t.indexOf("="),n=t.substring(0,o),r=t.substring(o+1);return{[`--${n}`]:r[0]==='"'?r.slice(1,-1):r}},Mm=(t,o)=>{let n=o.indexOf("("),r=o.substring(0,n),m=o.substring(n+1,o.length-1).split(/(?<!\\),/g).map((E)=>E.trim().replace("\\,",",")),f=t.templates[r];if(!f)_(`unknown template: ${r}`);if(m.length!==f.__arity)_(`template "${r}" expected ${f.__arity} arguments`);return Object.entries(f).reduce((E,[G,i])=>{if(!G.startsWith("__")){if(G=Uo(G,...m),T(i))i=Uo(i,...m);E[G]=i}return E},{})},Im=(t)=>{let[o,n,r]=/^(.+)-\[(.+)\]/.exec(t);return{[n]:r}},ir=(t)=>/^[a-z0-9:_-]+=.+/i.test(t),Or=(t)=>t.includes("(")&&t.endsWith(")"),Nr=(t)=>t.indexOf("-[")>0&&t.endsWith("]");var hr={deg:Pn,em:yn,ex:Hn,ms:Dn,percent:Fo,px:Mn,rad:Jn,rem:Rn,second:zn,turn:jn,url:Xn,vh:In,vmax:Yn,vmin:Wn,vw:Un,"%":Fo},Um={percent:"{0}%",second:"{0}s",url:"url({0})"},Wm={"":[""],a:[""],h:["-left","-right"],v:["-top","-bottom"],t:["-top"],top:["top"],b:["-bottom"],bottom:["bottom"],r:["-right"],right:["right"],l:["-left"],left:["left"],x:["-x"],y:["-y"],in:[""],out:[""]},_r={desc:"Generate framework rules from specs",opts:{...p,...ro,...Q,...Bt},fn:zo};async function zo(t){if(t.opts.watch)await Ym(t);else await Cr(t.inputs.map((o)=>w(o,t.logger)),t.opts,t.logger)}var Ym=async(t)=>{Rt(t.inputs,t.logger).subscribe({next(o){try{Cr(Object.keys(o).sort().map((n)=>o[n]),t.opts,t.logger)}catch(n){t.logger.warn(n.message)}}})},Cr=async(t,o,n)=>{let r={info:{name:"TODO",version:"0.0.0"},media:{},classes:{},templates:{},decls:[]};wn(o.prec);for(let m of t){let f=JSON.parse(m);if(Object.assign(r.info,f.info),Object.assign(r.media,f.media),f.decls)r.decls.push(...f.decls);if(f.specs)for(let E of f.specs)try{ur(f,E,r.classes,n)}catch(G){n.warn(`error processing spec: ${E.name}`,G,", skipping...")}if(f.templates)for(let E of f.templates)Dm(f,E,r.templates,n)}return k(o.out,JSON.stringify(r,null,o.pretty?4:0),n),r},ur=(t,o,n,r,m=!1)=>{let f=L(o.vars)?o.vars:[""],E=T(o.props)?{[o.props]:"<v>"}:o.props,G=zm(o,t),i=new Set;for(let O of f){let N=t.vars?.[O]||Wm[O];if(!N)_(`unknown variation ID: ${O}`);for(let[h,e]of gt(N,Object.keys(G))){let C=tt(o.name,O,h,e,G[e]),S=o.unit?tt(o.unit,O,h,e,G[e]):void 0,v=m?Jm(S):Pm(G[e],S);if(!n[C]){if(n[C]={},o.user!=null)n[C].__user=o.user;if(o.doc!=null)n[C].__doc=jm(o.doc,O,h,e,v)}else if(!i.has(C))_(`duplicate class ID: ${C}`);i.add(C);let u=-1;for(let[l,R]of Object.entries(E)){let K=tt(l,O,h,e,G[e]),Eo=tt(!S||T(R)?String(R):hr[S](R),O,h,e,v);if(n[C][K]=Eo,r.debug(C,K,Eo),m)u=er(Eo,er(K,u))}if(m)n[C].__arity=u+1}}return n},Dm=(t,o,n,r)=>ur(t,{...o,values:[""]},n,r,!0),er=(t,o)=>{let n=/\{(\d+)\}/g,r;while(r=n.exec(t))o=Math.max(o,+r[1]);return o},zm=(t,o)=>{let n=T(t.values)?o.tables?.[t.values]||_(`invalid table ID: ${t.values}`):t.values;if(z(n))return n;let r=t.key==="v"?(m)=>String(m):t.key==="i+1"?(m,f)=>String(f+1):t.key==="i"||t.key===void 0?(m,f)=>String(f):_(`invalid key type: ${t.key}`);return n.reduce((m,f,E)=>{return m[r(f,E)]=f,m},{})},Pm=(t,o)=>{if(!o||T(t))return t;let n=hr[o];if(!n)_(`invalid unit: ${o}`);return n(t)},Jm=(t)=>t?Um[t]||"{0}"+t:"{0}",tt=(t,o,n,r,m)=>t.replace(/<vid>/g,o).replace(/<var>/g,n).replace(/<k>/g,r).replace(/<v>/g,String(m)),jm=({group:t,desc:o,args:n},r,m,f,E)=>({group:t?tt(t,r,m,f,E):"TODO",desc:o?tt(o,r,m,f,E):void 0,args:n?n.map((G)=>tt(G,r,m,f,E)):void 0});var Ar={desc:"Combination of the generate & convert commands",opts:{...to,...oo,...no,...Ct,...ut,...At,...ro,...Q,...Lt,...Bt,outCss:D({desc:"Output file for CSS bundle",required:!0}),outSpecs:D({desc:"Output file for framework",required:!0})},fn:async(t)=>{let{opts:o,inputs:n}=t,[r,m]=n.reduce((G,i)=>(G[i.endsWith(".json")?0:1].push(i),G),[[],[]]),f={inputs:r,format:t.format,logger:t.logger,opts:{...o,out:o.outSpecs}},E={inputs:m,format:t.format,logger:t.logger,opts:{...o,noWrite:!1,out:o.outCss,scope:o.scope,specs:o.outSpecs}};await zo(f),await Do(E)}};import{resolve as Xm}from"path";var Tr={desc:"Generate Markdown documentation for framework specs",opts:{...p,level:zt({alias:"l",desc:"Initial heading level",default:1}),title:D({alias:"t",desc:"Custom main title, set to NONE to disable"})},inputs:1,fn:async(t)=>{let{logger:o,opts:n,inputs:r}=t,m=Z(Xm(r[0]),o),f=Zm(m,n);k(n.out,f,o)}},Zm=(t,{level:o,title:n})=>{let r=Object.keys(t.classes).length,m=Object.keys(t.templates).length,f=[`Currently, there are ${r+m} CSS utility classes (incl. ${m} templates) defined in "${t.info.name}" (v${t.info.version}):`,"",`${ot(o+1)} Classes by category`,"",...Br(t.classes,bm,o+2),`${ot(o+1)} Templates by category`,"",...Br(t.templates,Vm,o+2),`${ot(o+1)} Media queries`,"",...Object.entries(t.media).map(([E,G])=>`- **${E}**: \`${JSON.stringify(G)}\``),""];if(n!=="NONE")f.unshift(`${ot(o)} ${n??t.info.name}
|
|
34
|
+
`)},mo=({info:{name:t,version:o}})=>`/*! ${t} v${o} - generated by thi.ng/meta-css @ ${new Date().toISOString()} */`,Rt=(t,o)=>{let n=()=>{o.info("closing watchers..."),r.forEach((m)=>m.watcher.close())},r=t.map((m,f)=>{m=cn(m);let E=Kn(w(m,o),{id:`in${ln(f)}`});return{input:E,watcher:um(m,{},(G)=>{if(G==="change")try{E.next(w(m,o))}catch(i){o.warn(i.message),n()}else o.warn("input removed:",m),n()})}});return process.on("SIGINT",n),ct({src:wo(A(({input:m})=>[m.id,m],r))})},fo=(t)=>Object.keys(t).reduce((o,n)=>{if(!n.startsWith("__"))o[n]=t[n];return o},{});var nr={desc:"Transpile (and optionally bundle) meta stylesheets to CSS",opts:{...to,...oo,...no,...Ct,...ut,...At,...p,...Q,...Lt,...xn,...Bt,noWrite:I({desc:"Don't write files, use stdout only"})},fn:Do};async function Do(t){let o=Z(c(t.opts.specs),t.logger),n=$m(o,t.opts.force||[],t.logger);if(t.opts.bundle)if(t.opts.watch)await Lm(t,n);else It(t,o,n,t.opts.eval?[t.opts.eval]:t.inputs.map((r)=>w(c(r),t.logger)),t.opts.out);else if(t.opts.watch)await Am(t,o,n);else if(t.opts.eval)try{It(t,o,n,[t.opts.eval])}catch(r){t.logger.warn(r.message)}else for(let r of t.inputs)try{r=c(r);let m=!t.opts.noWrite?r.replace(/\.mcss$/,".css"):void 0;It(t,o,n,[w(r,t.logger)],m)}catch(m){t.logger.warn(m.message)}}var Am=async(t,o,n)=>{let r=c(t.opts.specs),m,f={process:()=>{try{return o=Z(r,t.logger),m.forEach((G)=>G.process()),!0}catch(G){return t.logger.warn(G.message+": "+r),!1}},watcher:tr(r,{},(G)=>{if(G==="change")f.process();else t.logger.warn("specs file removed:",r),E()})},E=()=>{t.logger.info("closing watchers..."),f.watcher.close(),m.forEach((G)=>G.watcher.close())};m=t.inputs.map((G)=>{G=c(G);let i=!t.opts.noWrite?G.replace(/\.mcss$/,".css"):void 0,O=()=>{try{return It(t,o,n,[w(G,t.logger)],i),!0}catch(N){if(t.logger.warn(N.message+": "+G),m)E();return!1}};if(!O())process.exit(1);return{process:O,watcher:tr(G,{},(N)=>{if(N==="change")O();else t.logger.warn("input removed:",G),E()})}}),t.logger.info("waiting for changes, press ctrl+c to cancel..."),process.on("SIGINT",E)},Lm=async(t,o)=>{ct({src:{styles:Rt(t.inputs,t.logger),specs:Rt([t.opts.specs],t.logger).map((n)=>JSON.parse(Object.values(n)[0]))}}).subscribe({next({styles:n,specs:r}){try{It(t,r,o,Object.keys(n).sort().map((m)=>n[m]),t.opts.out)}catch(m){t.logger.warn(m.message)}}})},It=({logger:t,opts:{include:o,noDecls:n,noHeader:r,pretty:m,scope:f}},E,G,i,O)=>{let N={logger:t,specs:E,css:{format:m?dt:Gt,fns:st,scope:f},mediaQueryIDs:new Set(Object.keys(E.media)),mediaQueryRules:{...G.mediaQueryRules},plainRules:{...G.plainRules}},_=o?o.map((h)=>w(c(h),t).trim()):[];if(!r)_.push(mo(E));if(!n&&E.decls.length)_.push(a(E.decls,N.css));i.forEach((h)=>Fm(h,N)),Tm(_,N),Bm(_,N),k(O,_,t)},Bm=(t,{css:o,logger:n,mediaQueryRules:r,specs:m})=>{for(let f in r){let E=mr(r[f],m);n.debug("mediaquery rules",f,E),t.push(a(et(Hm(m.media,f),E),o))}},Tm=(t,{css:o,logger:n,plainRules:r,specs:m})=>{let f=mr(r,m);n.debug("plain rules",f),t.push(a(f,o))},$m=(t,o,n)=>{let r=new Set(Object.keys(t.media)),m=new Set(Object.keys(t.classes)),f={},E={};if(o.length&&o[0][0]==="@")o=[...mt(w(c(o[0].substring(1)),n))];for(let G of o){if(!G||G.startsWith("//"))continue;let{token:i,query:O}=fr(G,r),N;if(i.includes("*")){let _=new RegExp(`^${i.replace("*",".*")}$`);N=[...Yo((h)=>_.test(h),m)]}else if(m.has(i))N=[i];else{n.warn(`unknown include rule ID: ${G}, skipping...`);continue}for(let _ of N)n.debug("including class:",_),O?Er(f,O,`.${_}`,_):Gr(E,`.${_}`,_)}return{mediaQueryRules:f,plainRules:E}},Fm=(t,{specs:o,mediaQueryIDs:n,mediaQueryRules:r,plainRules:m})=>{let f=Ut(),E=Ut(f),G={root:f,curr:E,scopes:[E]};for(let i of mt(t)){if(!i||/^\s*\/\//.test(i))continue;for(let O of Sm(i)){if(!O)continue;let N=G.curr;switch(N.state){case"sel":case"nest":if(O==="{"){if(N.state==="sel")N.sel=N.sel.map((_)=>_.replace(",","")),N.path=wm(G.scopes);N.state="class"}else if(O==="}")or(G);else{let _=wt(N.sel);if(!_||_.endsWith(","))N.sel.push(O);else N.sel[N.sel.length-1]+=" "+O}break;case"class":if(O==="{")N.state="nest",G.scopes.push(G.curr=Ut(N));else if(O==="}")or(G);else{let{token:_,query:h}=fr(O,n);if(!o.classes[_]&&!(ir(_)||Nr(_)||Or(_)))e(`unknown class ID: ${_}`);if(h)Er(r,h,N.path,_);else Gr(m,N.path,_)}break;default:Et(N.state)}}}};function*Sm(t){let o=-1,n=t.length,r=0,m=0,f=!1;for(let E=0;E<n;E++){let G=t[E];if(G==='"'&&!(r||m))if(f)yield t.substring(o,E+1),o=-1,f=!1;else f=!0;else if(G===" "||G==="\t"){if(!(r||m||f)&&o>=0)yield t.substring(o,E),o=-1}else if(G==="{"||G==="}"){if(o>=0)yield t.substring(o,E);yield G,o=-1}else if(G==="(")r++;else if(G===")"){if(--r<0)e(`invalid nesting in line: '${t}'`)}else if(G==="["){if(o<0)o=E;m++}else if(G==="]"){if(--m<0)e(`invalid arg nesting in line: '${t}'`)}else if(o<0)o=E}if(f)e("string literals must be fully on a single line");if(r)e("template calls must be fully on a single line");if(m)e("verbatim properties must be fully on a single line");if(o>=0)yield t.substring(o,n)}var Mt=":",rr="///",Ut=(t)=>({state:"sel",sel:t?[]:["<root>"],path:"",parent:t}),or=(t)=>{let o=!t.curr.sel.length;if(pt(!!t.curr.parent,"stack underflow"),t.scopes.pop(),t.scopes.length>0){if(t.curr=wt(t.scopes),!o&&t.curr.state==="nest")t.scopes.push(t.curr=Ut(t.curr))}else t.scopes.push(t.curr=Ut(t.root))},wm=(t)=>t.map((o)=>o.sel.join(",")).join(rr),mr=(t,o)=>Object.entries(t).map(([n,r])=>ym(n,r,o)),ym=(t,o,n)=>{let r=[],m=r,f=t.split(rr);for(let E=0;E<f.length;E++){let G=f[E].split(",");if(E==f.length-1){let i=Object.assign({},...A((O)=>Nr(O)?Im(O):ir(O)?Rm(O):Or(O)?Mm(n,O):fo(n.classes[O]),o));G.push(i)}m.push(G),m=G}return r[0]},fr=(t,o)=>{if(/^::?/.test(t))return{token:t};let n=t.lastIndexOf(Mt);if(n<0)return{token:t};let r=t.indexOf("("),m=t.indexOf("[");if(r>0||m>0){let G=r>0?m>0?Math.min(r,m):r:m;if(G<n&&t.indexOf(Mt)>G)return{token:t};n=t.substring(0,G).lastIndexOf(Mt)}let f=t.substring(0,n);if(!f.split(Mt).every((G)=>o.has(G)))e(`invalid media query in token: ${t}`);return{token:t.substring(n+1),query:f}},Hm=(t,o)=>o.split(Mt).reduce((n,r)=>Object.assign(n,t[r]),{}),Er=(t,o,n,r)=>{if(!t[o])t[o]={};(t[o][n]||(t[o][n]=new Set)).add(r)},Gr=(t,o,n)=>(t[o]||(t[o]=new Set)).add(n),Rm=(t)=>{let o=t.indexOf("="),n=t.substring(0,o),r=t.substring(o+1);return{[`--${n}`]:r[0]==='"'?r.slice(1,-1):r}},Mm=(t,o)=>{let n=o.indexOf("("),r=o.substring(0,n),m=o.substring(n+1,o.length-1).split(/(?<!\\),/g).map((E)=>E.trim().replace("\\,",",")),f=t.templates[r];if(!f)e(`unknown template: ${r}`);if(m.length!==f.__arity)e(`template "${r}" expected ${f.__arity} arguments`);return Object.entries(f).reduce((E,[G,i])=>{if(!G.startsWith("__")){if(G=Uo(G,...m),T(i))i=Uo(i,...m);E[G]=i}return E},{})},Im=(t)=>{let[o,n,r]=/^(.+)-\[(.+)\]/.exec(t);return{[n]:r}},ir=(t)=>/^[a-z0-9:_-]+=.+/i.test(t),Or=(t)=>t.includes("(")&&t.endsWith(")"),Nr=(t)=>t.indexOf("-[")>0&&t.endsWith("]");var _r={deg:Pn,em:yn,ex:Hn,ms:Dn,percent:Fo,px:Mn,rad:Jn,rem:Rn,second:zn,turn:jn,url:Xn,vh:In,vmax:Yn,vmin:Wn,vw:Un,"%":Fo},Um={percent:"{0}%",second:"{0}s",url:"url({0})"},Wm={"":[""],a:[""],h:["-left","-right"],v:["-top","-bottom"],t:["-top"],top:["top"],b:["-bottom"],bottom:["bottom"],r:["-right"],right:["right"],l:["-left"],left:["left"],x:["-x"],y:["-y"],in:[""],out:[""]},er={desc:"Generate framework rules from specs",opts:{...p,...ro,...Q,...Bt},fn:zo};async function zo(t){if(t.opts.watch)await Ym(t);else await Cr(t.inputs.map((o)=>w(o,t.logger)),t.opts,t.logger)}var Ym=async(t)=>{Rt(t.inputs,t.logger).subscribe({next(o){try{Cr(Object.keys(o).sort().map((n)=>o[n]),t.opts,t.logger)}catch(n){t.logger.warn(n.message)}}})},Cr=async(t,o,n)=>{let r={info:{name:"TODO",version:"0.0.0"},media:{},classes:{},templates:{},decls:[]};wn(o.prec);for(let m of t){let f=JSON.parse(m);if(Object.assign(r.info,f.info),Object.assign(r.media,f.media),f.decls)r.decls.push(...f.decls);if(f.specs)for(let E of f.specs)try{ur(f,E,r.classes,n)}catch(G){n.warn(`error processing spec: ${E.name}`,G,", skipping...")}if(f.templates)for(let E of f.templates)Dm(f,E,r.templates,n)}return k(o.out,JSON.stringify(r,null,o.pretty?4:0),n),r},ur=(t,o,n,r,m=!1)=>{let f=L(o.vars)?o.vars:[""],E=T(o.props)?{[o.props]:"<v>"}:o.props,G=zm(o,t),i=new Set;for(let O of f){let N=t.vars?.[O]||Wm[O];if(!N)e(`unknown variation ID: ${O}`);for(let[_,h]of gt(N,Object.keys(G))){let C=tt(o.name,O,_,h,G[h]),S=o.unit?tt(o.unit,O,_,h,G[h]):void 0,v=m?Jm(S):Pm(G[h],S);if(!n[C]){if(n[C]={},o.user!=null)n[C].__user=o.user;if(o.doc!=null)n[C].__doc=jm(o.doc,O,_,h,v)}else if(!i.has(C))e(`duplicate class ID: ${C}`);i.add(C);let u=-1;for(let[d,R]of Object.entries(E)){let K=tt(d,O,_,h,G[h]),Eo=tt(!S||T(R)?String(R):_r[S](R),O,_,h,v);if(n[C][K]=Eo,r.debug(C,K,Eo),m)u=hr(Eo,hr(K,u))}if(m)n[C].__arity=u+1}}return n},Dm=(t,o,n,r)=>ur(t,{...o,values:[""]},n,r,!0),hr=(t,o)=>{let n=/\{(\d+)\}/g,r;while(r=n.exec(t))o=Math.max(o,+r[1]);return o},zm=(t,o)=>{let n=T(t.values)?o.tables?.[t.values]||e(`invalid table ID: ${t.values}`):t.values;if(z(n))return n;let r=t.key==="v"?(m)=>String(m):t.key==="i+1"?(m,f)=>String(f+1):t.key==="i"||t.key===void 0?(m,f)=>String(f):e(`invalid key type: ${t.key}`);return n.reduce((m,f,E)=>{return m[r(f,E)]=f,m},{})},Pm=(t,o)=>{if(!o||T(t))return t;let n=_r[o];if(!n)e(`invalid unit: ${o}`);return n(t)},Jm=(t)=>t?Um[t]||"{0}"+t:"{0}",tt=(t,o,n,r,m)=>t.replace(/<vid>/g,o).replace(/<var>/g,n).replace(/<k>/g,r).replace(/<v>/g,String(m)),jm=({group:t,desc:o,args:n},r,m,f,E)=>({group:t?tt(t,r,m,f,E):"TODO",desc:o?tt(o,r,m,f,E):void 0,args:n?n.map((G)=>tt(G,r,m,f,E)):void 0});var Ar={desc:"Combination of the generate & convert commands",opts:{...to,...oo,...no,...Ct,...ut,...At,...ro,...Q,...Lt,...Bt,outCss:D({desc:"Output file for CSS bundle",required:!0}),outSpecs:D({desc:"Output file for framework",required:!0})},fn:async(t)=>{let{opts:o,inputs:n}=t,[r,m]=n.reduce((G,i)=>(G[i.endsWith(".json")?0:1].push(i),G),[[],[]]),f={inputs:r,format:t.format,logger:t.logger,opts:{...o,out:o.outSpecs}},E={inputs:m,format:t.format,logger:t.logger,opts:{...o,noWrite:!1,out:o.outCss,scope:o.scope,specs:o.outSpecs}};await zo(f),await Do(E)}};import{resolve as Xm}from"path";var Tr={desc:"Generate Markdown documentation for framework specs",opts:{...p,level:zt({alias:"l",desc:"Initial heading level",default:1}),title:D({alias:"t",desc:"Custom main title, set to NONE to disable"})},inputs:1,fn:async(t)=>{let{logger:o,opts:n,inputs:r}=t,m=Z(Xm(r[0]),o),f=Zm(m,n);k(n.out,f,o)}},Zm=(t,{level:o,title:n})=>{let r=Object.keys(t.classes).length,m=Object.keys(t.templates).length,f=[`Currently, there are ${r+m} CSS utility classes (incl. ${m} templates) defined in "${t.info.name}" (v${t.info.version}):`,"",`${ot(o+1)} Classes by category`,"",...Br(t.classes,bm,o+2),`${ot(o+1)} Templates by category`,"",...Br(t.templates,Vm,o+2),`${ot(o+1)} Media queries`,"",...Object.entries(t.media).map(([E,G])=>`- **${E}**: \`${JSON.stringify(G)}\``),""];if(n!=="NONE")f.unshift(`${ot(o)} ${n??t.info.name}
|
|
35
35
|
`);return f},Lr=(t)=>t.split(/(\d+)/).map((o)=>{let n=parseInt(o);return isNaN(n)?o:n}),Km=(t,o)=>{if(/\d+/.test(t)&&/\d+/.test(o)){let n=Lr(t),r=Lr(o),m=n.length;if(m===r.length){for(let f=0;f<m;f++)if(n[f]!==r[f])return Ao(n[f],r[f]);return 0}return n.length-r.length}return Ao(t,o)},Br=(t,o,n)=>{let r=Wo({key:([m,{__doc:f}])=>f?.group||"TODO",group:[()=>[],(m)=>m.sort(),(m,f)=>(m.push(f[0]),m)]},Object.entries(t));return yo((m)=>{let f=r[m].sort(Km).map((G)=>o(G,t[G].__doc,n+1)),E=f.length;return[`${ot(n)} ${Xt(m)}`,E>3?`
|
|
36
36
|
<details><summary>${E} items:</summary>
|
|
37
37
|
`:"",f.join(`
|
|
@@ -41,7 +41,7 @@ Available commands:
|
|
|
41
41
|
TODO`;let r=o.args.map((m)=>/^\w+/.exec(m)[0]).join(", ");return[`${ot(n)} \`${t}(${r})\``,"",...o.args.map(qm),o.desc?`
|
|
42
42
|
${o.desc}
|
|
43
43
|
`:""].join(`
|
|
44
|
-
`)},qm=(t)=>`- ${t.replace(/^(\w+)/,(o,n)=>`**${n}**`)}`,ot=W((t)=>"#".repeat(t));import{resolve as $r}from"path";var Sr={desc:"Export entire generated framework as CSS",opts:{...Ct,...ut,...sn,...p,...Q,...At,...an,...Lt},inputs:1,fn:async(t)=>{let{logger:o,opts:{include:n,media:r,noDecls:m,noHeader:f,onlyDecls:E,out:G,pretty:i,scope:O},inputs:N}=t,
|
|
44
|
+
`)},qm=(t)=>`- ${t.replace(/^(\w+)/,(o,n)=>`**${n}**`)}`,ot=W((t)=>"#".repeat(t));import{resolve as $r}from"path";var Sr={desc:"Export entire generated framework as CSS",opts:{...Ct,...ut,...sn,...p,...Q,...At,...an,...Lt},inputs:1,fn:async(t)=>{let{logger:o,opts:{include:n,media:r,noDecls:m,noHeader:f,onlyDecls:E,out:G,pretty:i,scope:O},inputs:N}=t,_={format:i?dt:Gt,fns:st,scope:O},h=Z($r(N[0]),o),C=n?n.map((S)=>w($r(S),o).trim()):[];if(!f)C.push(mo(h));if(!m&&h.decls.length)C.push(a(h.decls,_));if(!E)C.push(pm(h,r,_,o));k(G,C,o)}},pm=(t,o,n,r)=>{let m=Fr("",t);if(o){let f=o[0]==="ALL"?Object.keys(t.media):o;for(let E of f)if(t.media[E])m.push(et(t.media[E],Fr("-"+E,t)));else r.warn(`invalid media query ID: ${E}, skipping...`)}return a(m,n)},Fr=(t,o)=>Object.entries(o.classes).map(([n,r])=>[`.${n}${t}`,fo(r)]);var Po=Z(Qm(process.argv[2],"package.json"));nn({name:"metacss",start:3,opts:{...Zo},commands:{convert:nr,develop:Ar,doc:Tr,export:Sr,generate:er},ctx:async(t)=>{return rn(t.logger,t.opts.verbose),{...t,format:jt}},usage:{prefix:`${mn(Po.name,Po.version,Po.description)}
|
|
45
45
|
|
|
46
46
|
Usage: metacss <cmd> [opts] input [...]
|
|
47
47
|
metacss <cmd> --help
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/meta-css",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.42",
|
|
4
4
|
"description": "Data-driven CSS framework codegen, transpiler & bundler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@thi.ng/api": "^8.12.
|
|
48
|
-
"@thi.ng/args": "^3.2.
|
|
49
|
-
"@thi.ng/arrays": "^2.14.
|
|
50
|
-
"@thi.ng/checks": "^3.
|
|
51
|
-
"@thi.ng/compare": "^2.4.
|
|
52
|
-
"@thi.ng/errors": "^2.5.
|
|
53
|
-
"@thi.ng/file-io": "^2.2.
|
|
54
|
-
"@thi.ng/hiccup-css": "^2.7.
|
|
55
|
-
"@thi.ng/logger": "^3.2.
|
|
56
|
-
"@thi.ng/memoize": "^4.0.
|
|
57
|
-
"@thi.ng/rstream": "^9.3.
|
|
58
|
-
"@thi.ng/strings": "^3.9.
|
|
59
|
-
"@thi.ng/text-format": "^2.2.
|
|
60
|
-
"@thi.ng/transducers": "^9.6.
|
|
47
|
+
"@thi.ng/api": "^8.12.10",
|
|
48
|
+
"@thi.ng/args": "^3.2.5",
|
|
49
|
+
"@thi.ng/arrays": "^2.14.3",
|
|
50
|
+
"@thi.ng/checks": "^3.8.0",
|
|
51
|
+
"@thi.ng/compare": "^2.4.36",
|
|
52
|
+
"@thi.ng/errors": "^2.5.50",
|
|
53
|
+
"@thi.ng/file-io": "^2.2.20",
|
|
54
|
+
"@thi.ng/hiccup-css": "^2.7.74",
|
|
55
|
+
"@thi.ng/logger": "^3.2.9",
|
|
56
|
+
"@thi.ng/memoize": "^4.0.34",
|
|
57
|
+
"@thi.ng/rstream": "^9.3.9",
|
|
58
|
+
"@thi.ng/strings": "^3.9.31",
|
|
59
|
+
"@thi.ng/text-format": "^2.2.50",
|
|
60
|
+
"@thi.ng/transducers": "^9.6.19"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/node": "^24.10.1",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"status": "alpha",
|
|
114
114
|
"year": 2023
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "8625a1c6383737a8fdbe7a3f96ea3cbabc957fa6\n"
|
|
117
117
|
}
|