@thi.ng/meta-css 0.10.3 → 0.11.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 +13 -1
- package/README.md +23 -10
- package/index.js +4 -4
- package/package.json +16 -16
- package/specs/background.mcss.json +0 -8
- package/specs/display.mcss.json +7 -0
- package/specs/effects.mcss.json +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-04-
|
|
3
|
+
- **Last updated**: 2024-04-20T14:42:45Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,18 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [0.11.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/meta-css@0.11.1) (2024-04-20)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update type usage ([1455b8f](https://github.com/thi-ng/umbrella/commit/1455b8f))
|
|
17
|
+
|
|
18
|
+
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/meta-css@0.11.0) (2024-04-11)
|
|
19
|
+
|
|
20
|
+
#### 🚀 Features
|
|
21
|
+
|
|
22
|
+
- add/update CSS rule specs ([dfab906](https://github.com/thi-ng/umbrella/commit/dfab906))
|
|
23
|
+
|
|
12
24
|
### [0.10.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/meta-css@0.10.3) (2024-04-08)
|
|
13
25
|
|
|
14
26
|
#### ♻️ Refactoring
|
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 192 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
|
>
|
|
@@ -99,7 +99,9 @@
|
|
|
99
99
|
- [Color definitions](#color-definitions)
|
|
100
100
|
- [Dimensions](#dimensions)
|
|
101
101
|
- [Font families](#font-families)
|
|
102
|
+
- [Fx](#fx)
|
|
102
103
|
- [Grid layout](#grid-layout)
|
|
104
|
+
- [Layout](#layout)
|
|
103
105
|
- [Margin](#margin)
|
|
104
106
|
- [Mask](#mask)
|
|
105
107
|
- [Padding](#padding)
|
|
@@ -1109,7 +1111,7 @@ These are readily usable (and used by a growing number of example projects in
|
|
|
1109
1111
|
this repo), but also are provided as starting point to define your own custom
|
|
1110
1112
|
framework(s)...
|
|
1111
1113
|
|
|
1112
|
-
Currently, there are
|
|
1114
|
+
Currently, there are 937 CSS utility classes (incl. 64 templates) defined in "MetaCSS base" (v0.9.0):
|
|
1113
1115
|
|
|
1114
1116
|
### Classes by category
|
|
1115
1117
|
|
|
@@ -2345,12 +2347,6 @@ Sets aspect ratio of background. Use with `bg-aspect-ratio-object` on child elem
|
|
|
2345
2347
|
|
|
2346
2348
|
#### Background
|
|
2347
2349
|
|
|
2348
|
-
<details><summary>4 items:</summary>
|
|
2349
|
-
|
|
2350
|
-
##### `bg-blur(radius)`
|
|
2351
|
-
|
|
2352
|
-
- **radius**: incl. units
|
|
2353
|
-
|
|
2354
2350
|
##### `bg-image(url)`
|
|
2355
2351
|
|
|
2356
2352
|
- **url**: image URL
|
|
@@ -2363,8 +2359,6 @@ Sets aspect ratio of background. Use with `bg-aspect-ratio-object` on child elem
|
|
|
2363
2359
|
|
|
2364
2360
|
- **body**: CSS value/definition
|
|
2365
2361
|
|
|
2366
|
-
</details>
|
|
2367
|
-
|
|
2368
2362
|
#### Background color
|
|
2369
2363
|
|
|
2370
2364
|
##### `bg-color(name)`
|
|
@@ -2521,6 +2515,16 @@ Sets width to given value
|
|
|
2521
2515
|
|
|
2522
2516
|
- **body**: CSS value/definition
|
|
2523
2517
|
|
|
2518
|
+
#### Fx
|
|
2519
|
+
|
|
2520
|
+
##### `bg-blur(radius)`
|
|
2521
|
+
|
|
2522
|
+
- **radius**: incl. units
|
|
2523
|
+
|
|
2524
|
+
##### `blur(radius)`
|
|
2525
|
+
|
|
2526
|
+
- **radius**: incl. units
|
|
2527
|
+
|
|
2524
2528
|
#### Grid layout
|
|
2525
2529
|
|
|
2526
2530
|
##### `grid-cols(cols)`
|
|
@@ -2531,6 +2535,12 @@ Sets width to given value
|
|
|
2531
2535
|
|
|
2532
2536
|
- **rows**: CSS rows definitions
|
|
2533
2537
|
|
|
2538
|
+
#### Layout
|
|
2539
|
+
|
|
2540
|
+
##### `columns(num)`
|
|
2541
|
+
|
|
2542
|
+
- **num**: column count
|
|
2543
|
+
|
|
2534
2544
|
#### Margin
|
|
2535
2545
|
|
|
2536
2546
|
<details><summary>7 items:</summary>
|
|
@@ -2735,7 +2745,10 @@ directory are using this package:
|
|
|
2735
2745
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/blurhash.jpg" width="240"/> | Interactive & reactive image blurhash generator | [Demo](https://demo.thi.ng/umbrella/blurhash/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/blurhash) |
|
|
2736
2746
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/layout-gridgen.png" width="240"/> | Randomized space-filling, nested grid layout generator | [Demo](https://demo.thi.ng/umbrella/layout-gridgen/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/layout-gridgen) |
|
|
2737
2747
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/meta-css-basics.png" width="240"/> | Basic thi.ng/meta-css usage & testbed | [Demo](https://demo.thi.ng/umbrella/meta-css-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/meta-css-basics) |
|
|
2748
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/procedural-text) |
|
|
2738
2749
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/ramp-scroll-anim.png" width="240"/> | Scroll-based, reactive, multi-param CSS animation basics | [Demo](https://demo.thi.ng/umbrella/ramp-scroll-anim/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/ramp-scroll-anim) |
|
|
2750
|
+
| | Demonstates various rdom usage patterns | [Demo](https://demo.thi.ng/umbrella/rdom-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-basics) |
|
|
2751
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-delayed-update.jpg" width="240"/> | Dynamically loaded images w/ preloader state | [Demo](https://demo.thi.ng/umbrella/rdom-delayed-update/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-delayed-update) |
|
|
2739
2752
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-dnd.png" width="240"/> | rdom drag & drop example | [Demo](https://demo.thi.ng/umbrella/rdom-dnd/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-dnd) |
|
|
2740
2753
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-formgen.jpg" width="240"/> | Basic usage of the declarative rdom-forms generator | [Demo](https://demo.thi.ng/umbrella/rdom-formgen/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-formgen) |
|
|
2741
2754
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-lazy-load.png" width="240"/> | Lazy loading components via @thi.ng/rdom | [Demo](https://demo.thi.ng/umbrella/rdom-lazy-load/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-lazy-load) |
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var W1={default:95,hint:90,multi:90,param:96,required:33};var w0=(Z)=>Z;var Z0=function(Z,X=Object.create(null)){return(...J)=>{const W=JSON.stringify(J);if(W!==void 0)return W in X?X[W]:X[W]=Z.apply(null,J);return Z.apply(null,J)}};var X0=Z0((Z,X)=>Z.repeat(X));var v1=(Z)=>/^[a-f0-9]+$/i.test(Z);var y1=(Z)=>/^[-+]?\d+$/.test(Z),_1=(Z)=>/^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(Z);var S=(Z,X=(J)=>J!==void 0?": "+J:"")=>class extends Error{origMessage;constructor(J){super(Z(J)+X(J));this.origMessage=J!==void 0?String(J):""}};var F8=S(()=>"illegal argument(s)"),$=(Z)=>{throw new F8(Z)};var Y1=(Z)=>_1(Z)?parseFloat(Z):$(`not a numeric value: ${Z}`),h1=(Z)=>Z.map(Y1),B1=(Z)=>v1(Z)?parseInt(Z,16):$(`not a hex value: ${Z}`),
|
|
3
|
-
`),this.parent&&this.parent.logEntry(Z)}}var v0=Z0((Z,X=" ")=>{const J=X0(String(X),Z);return(W,Y)=>{if(W==null)return J;return W=W.toString(),Y=Y!==void 0?Y:W.length,Y<Z?W+J.substring(Y):W}});var y0=(Z,X=Object.create(null))=>(J)=>(J in X)?X[J]:X[J]=Z(J);var V1={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 N8=(Z,X)=>(J)=>Z.format(X,J),U1=(Z)=>Object.keys(V1).reduce((X,J)=>(X[J]=N8(Z,V1[J]),X),{format:Z});var g1="\x1B[0m";var O8=["","1","2","1;2","4","1;4","2;4","1;2;4"],_0={format:(Z,X)=>_0.start(Z)+X+_0.end,start:y0((Z)=>{let X=[],J=Z&15;return J&&X.push(29+(Z>>4&1)*60+J),J=Z>>5&15,J&&X.push(39+(Z>>9&1)*60+J),J=Z>>10,J&&X.push(O8[J]),"\x1B["+X.join(";")+"m"}),end:g1,prefix:g1,suffix:"\n"};var x1={format:(Z,X)=>String(X),prefix:"",suffix:"\n",start:()=>"",end:""};var h0=U1(_0),d1=U1(x1);var N=Array.isArray;var D8=(Z)=>Z.toUpperCase(),n1=(Z)=>Z.toLowerCase(),
|
|
4
|
-
`]:[],...Y(U),""].join("\n")),...z1(X.suffix,X.lineWidth)].join("\n")},E8=(Z,X,J,W,Y)=>{const B=R8(X,W),V=L8(X,W,B),Q=O0(`--${l1(Z)}`,W.param),U=`${V}${Q}${B}`,q=X.optional===!1&&X.default===void 0,z=[];q&&z.push("required"),X.multi&&z.push("multiple");const H=S8(z,W,q)+(X.desc||"")+A8(X,J,W);return v0(J.paramWidth)(U,
|
|
5
|
-
`),s1(Z,W);const U=await Z.ctx({logger:new b0(process.stderr,Z.name,"INFO"),format:J?h0:d1,opts:Q.result,inputs:Q.rest},B);if(await B.fn(U),Z.post)await Z.post(U,B)}catch(Y){process.stderr.write(Y.message+"\n\n"),process.exit(1)}},s1=(Z,X)=>{process.stderr.write(N0(Z.opts,X)),process.exit(1)},u8=(Z)=>["\nAvailable commands:\n",...Object.keys(Z).map((X)=>`${v0(16)(X)}: ${Z[X].desc}`),"\n"].join("\n");import{existsSync as g8,mkdirSync as x8,statSync as q9} from"fs";import{dirname as d8} from"path";var n8=(Z)=>Z.length>0&&!g8(Z)?(x8(Z,{recursive:!0}),!0):!1,Z4=(Z)=>n8(d8(Z));var h=(Z)=>typeof Z==="function";var w=(Z)=>typeof Z==="string";import{readFileSync as p8} from"fs";import{writeFileSync as l8} from"fs";var X4=(Z,X,J,W,Y=!1)=>{if(W&&W.info(`${Y?"[dryrun] ":""}writing file: ${Z}`),Y)return;Z4(Z),l8(Z,X,!J&&w(X)?"utf-8":J)};var D=(Z,X,J="utf-8")=>{return X&&X.debug("reading file:",Z),p8(Z,J)},K1=(Z,X,J,W=!1)=>X4(Z,N(X)?X.join("\n"):X,"utf-8",J,W);var m=(Z,X)=>JSON.parse(D(Z,X));var u=Symbol(),H1=()=>{};var D0=Object.freeze({level:P.NONE,addChild(Z){return Z},childLogger:()=>D0,enabled:()=>!1,fine(){},debug(){},info(){},warn(){},severe(){},logEntry(){}});class $1 extends P0{set(Z){this.parent=Z}childLogger(Z,X){return new $1(Z,X??this.level,this)}logEntry(Z){this.parent.logEntry(Z)}}var J4=new $1("root",P.FINE,D0);import{join as _5} from"path";var C1=(Z,X)=>{if(Z===X)return 0;if(Z==null)return X==null?0:-1;if(X==null)return Z==null?0:1;if(typeof Z.compare==="function")return Z.compare(X);if(typeof X.compare==="function")return-X.compare(Z);return Z<X?-1:Z>X?1:0};var o8=S(()=>"Assertion failed"),u0=(typeof process!=="undefined"&&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)?(Z,X)=>{if(typeof Z==="function"&&!Z()||!Z)throw new o8(typeof X==="function"?X():X)}:()=>{};var g0=(Z)=>Z!=null&&typeof Z!=="function"&&Z.length!==void 0;var W4=(Z)=>{return(Z==null||!Z[Symbol.iterator])&&$(`value is not iterable: ${Z}`),Z};var Y4=(Z)=>g0(Z)?Z:[...W4(Z)];var G0=(Z)=>Z[Z.length-1];var i8=S(()=>"illegal arity"),W0=(Z)=>{throw new i8(Z)};var a8=S(()=>"illegal state"),Y0=(Z)=>{throw new a8(Z)};var x0=(Z,X)=>Z!=null&&typeof Z[X]==="function";var O=(Z)=>Z!=null&&typeof Z[Symbol.iterator]==="function";var d0=(Z)=>Z!=null&&typeof Z!=="string"&&typeof Z[Symbol.iterator]==="function";var B4=["-moz-","-ms-","-o-","-webkit-"],B0={rules:"",ruleSep:",",valSep:"",decls:"",declStart:"{",declEnd:"}",indent:"",comments:!1},n0={rules:"\n",ruleSep:", ",valSep:" ",decls:"\n",declStart:" {\n",declEnd:"}\n",indent:" ",comments:!0};var M1=function(...Z){let[X,J,W,Y,B,V,Q,U,q,z]=Z;switch(Z.length){case 0:W0(0);case 1:return X;case 2:return(...K)=>X(J(...K));case 3:return(...K)=>X(J(W(...K)));case 4:return(...K)=>X(J(W(Y(...K))));case 5:return(...K)=>X(J(W(Y(B(...K)))));case 6:return(...K)=>X(J(W(Y(B(V(...K))))));case 7:return(...K)=>X(J(W(Y(B(V(Q(...K)))))));case 8:return(...K)=>X(J(W(Y(B(V(Q(U(...K))))))));case 9:return(...K)=>X(J(W(Y(B(V(Q(U(q(...K)))))))));case 10:default:const H=(...K)=>X(J(W(Y(B(V(Q(U(q(z(...K))))))))));return Z.length===10?H:M1(H,...Z.slice(10))}};var i=(Z)=>x0(Z,"xform")?Z.xform():Z;var v=function(...Z){return Z=Z.map(i),M1.apply(null,Z)};var g=(Z,X)=>[Z[0],Z[1],X];class j0{value;constructor(Z){this.value=Z}deref(){return this.value}}var G=(Z)=>Z instanceof j0,Q4=(Z)=>Z instanceof j0?Z:new j0(Z),y=(Z)=>Z instanceof j0?Z.deref():Z;var Q0=function(...Z){const X=Z[0],J=X[0],W=X[1],Y=X[2];Z=t8(Z);const B=Z[0]==null?J():Z[0],V=Z[1];return y(W(x0(V,"$reduce")?V.$reduce(Y,B):g0(V)?r8(Y,B,V):c8(Y,B,V)))};var t8=(Z)=>Z.length===2?[void 0,Z[1]]:Z.length===3?[Z[1],Z[2]]:W0(Z.length),r8=(Z,X,J)=>{for(let W=0,Y=J.length;W<Y;W++)if(X=Z(X,J[W]),G(X)){X=X.deref();break}return X},c8=(Z,X,J)=>{for(let W of J)if(X=Z(X,W),G(X)){X=X.deref();break}return X},V0=(Z,X)=>[Z,w0,X],V4=(Z,X)=>{const J=X.length-1;return O(X[J])?X.length>1?Q0(Z.apply(null,X.slice(0,J)),X[J]):Q0(Z(),X[0]):void 0};var U0=function(Z){return Z?[...Z]:V0(()=>[],(X,J)=>(X.push(J),X))};function*q0(Z,X){const J=i(Z)(U0()),W=J[1],Y=J[2];for(let B of X){const V=Y([],B);if(G(V)){yield*y(W(V.deref()));return}if(V.length)yield*V}yield*y(W([]))}function*a(Z,X){const J=i(Z)([H1,H1,(W,Y)=>Y])[2];for(let W of X){let Y=J(u,W);if(G(Y)){if(Y=y(Y.deref()),Y!==u)yield Y;return}if(Y!==u)yield Y}}var l0=(Z,X,J=a)=>{const W=X.length-1;return O(X[W])?X.length>1?J(Z.apply(null,X.slice(0,W)),X[W]):J(Z(),X[0]):void 0};var F1=function(Z,X){return O(X)?q0(F1(Z),w(X)?[X]:X):(J)=>{const W=J[2],Y=(B,V)=>{const Q=Z(V);if(Q){for(let U of Q)if(B=Y(B,U),G(B))break;return B}return W(B,V)};return g(J,Y)}};var U4=function(Z){return F1((X)=>d0(X)?X:void 0,Z)};var F=function(Z,X){return O(X)?a(F(Z),X):(J)=>{const W=J[2];return g(J,(Y,B)=>W(Y,Z(B)))}};function*p0(...Z){const X=Z.length-1;if(X<0)return;const J=new Array(X+1).fill(0),W=Z.map(Y4),Y=W.reduce((B,V)=>B*V.length,1);for(let B=0;B<Y;B++){const V=[];for(let Q=X;Q>=0;Q--){const U=W[Q];let q=J[Q];if(q===U.length)J[Q]=q=0,Q>0&&J[Q-1]++;V[Q]=U[q]}J[X]++,yield V}}function*q4(Z,X=Infinity){while(X-- >0)yield Z}var w1=function(Z,X){Z=Z||"";let J=!0;return X?[...X].join(Z):V0(()=>"",(W,Y)=>(W=J?W+Y:W+Z+Y,J=!1,W))};var o0=function(...Z){return s8(o0,Q0,Z)};var s8=(Z,X,J)=>{let W,Y;switch(J.length){case 4:Y=J[3],W=J[2];break;case 3:Y=J[2];break;case 2:return F((B)=>Z(J[0],J[1],B));default:W0(J.length)}return X(i(J[0])(J[1]),W,Y)};var e8=new Set,Z5=":[",z4=v(U4(),F((Z)=>Z[0]==="&"?Z.substring(1):Z5.includes(Z[0])?Z:" "+Z)),X5=(Z,X)=>v(Z,F((J)=>w(J)&&J.startsWith(" .")?J+X:J)),z0=(Z,X,J,W)=>{const Y=J.length,B=[];let V,Q;const U=(q,z)=>{let H=null;if(N(z))z0(Z,P1(X,B),z,W);else if(O(z)&&!w(z))z0(Z,P1(X,B),[...z],W);else if((Q=h(z))||(H=W.fns[z]))if(!X.length){if(H)return H.apply(null,J.slice(q+1))(Z,W),!0;z(Z,W)}else if(Q)U(q,z());else $(`quoted fn ('${z}') only allowed at head position`);else if(b(z))V=Object.assign(V||{},z);else if(z!=null)B.push(z)};for(let q=0;q<Y;q++)if(U(q,J[q]))return Z;return V&&Z.push(J5(X,B,V,W)),Z},P1=(Z,X)=>Z.length?[...p0(Z,X)]:X,J5=(Z,X,J,W)=>{const Y=W.format,B=_(W),V=W.scope?X5(z4,W.scope):z4;return[B,o0(F((Q)=>o0(V,w1(),N(Q)?Q:[Q]).trim()),w1(Y.ruleSep),P1(Z,X)),Y.declStart,k0(J,W),B,Y.declEnd].join("")},k0=(Z,X)=>{const J=X.format,W=X.autoprefix||e8,Y=_(X,X.depth+1),B=[];for(let V in Z)if(Z.hasOwnProperty(V)){let Q=Z[V];if(h(Q))Q=Q(Z);if(N(Q))Q=Q.map((U)=>N(U)?U.join(" "):U).join(J.ruleSep);if(W.has(V))for(let U of X.vendors)B.push(`${Y}${U}${V}:${J.valSep}${Q};`);B.push(`${Y}${V}:${J.valSep}${Q};`)}return B.join(J.decls)+J.decls},_=(Z,X=Z.depth)=>X>1?[...q4(Z.format.indent,X)].join(""):X>0?Z.format.indent:"";var K4=function(Z,...X){const J=X.length===1?X[0]:X.reduce((W,Y,B)=>{return W[B/(X.length-1)*100|0]=Y,W},{});return(W,Y)=>{const B=_(Y);Y.depth++;const V=_(Y);W.push(`${B}@keyframes ${Z}${Y.format.declStart}`);for(let Q in J)if(J.hasOwnProperty(Q))W.push([V,Q+"%",Y.format.declStart,k0(J[Q],Y),V,Y.format.declEnd].join(""));return Y.depth--,W.push(B+Y.format.declEnd),W}};var H4=(Z,X=!1)=>(J,W)=>{const Y=_(W),B=_(W,W.depth+1);if(W.format.comments||X)J.push(Y+"/*",Z.split("\n").map((V)=>B+V).join("\n"),Y+"*/");return J};var i0=(Z,X,J)=>(W,Y)=>{const B=_(Y);return W.push(`${B}${Z} ${W5(X)}${Y.format.declStart}`),Y.depth++,z0(W,[],J,Y),Y.depth--,W.push(B+Y.format.declEnd),W},W5=(Z)=>{if(w(Z))return Z;const X=[];for(let J in Z)if(Z.hasOwnProperty(J)){let W=Z[J];if(W===!0)W=$4.has(J)?J:`(${J})`;else if(W===!1)W=`(not ${$4.has(J)?J:`(${J})`})`;else if(W==="only")W+=" "+J;else W=`(${J}:${W})`;X.push(W)}return X.join(" and ")},$4=new Set(["all","print","screen"]);var t=(Z,X)=>{return X={format:B0,vendors:B4,fns:{},depth:0,...X},N(X.autoprefix)&&(X.autoprefix=new Set(X.autoprefix)),b(Z)?k0(Z,X):h(Z)?Z([],X).join(X.format.rules):z0([],[],N(Z)?Z:d0(Z)?[...Z]:$("invalid rules"),X).join(X.format.rules)};var C4=(Z,...X)=>(J,W)=>(J.push(X.length?`@import url(${Z}) ${X.join(W.format.ruleSep)};`:`@import url(${Z});`),J);var K0=(Z,X)=>i0("@media",Z,X);var M4=function(...Z){return(X,J)=>(X.push(Z.length>1?`@namespace ${Z[0]} url(${Z[1]});`:`@namespace url(${Z[0]});`),X)};var F4=(Z,X)=>i0("@supports",Z,X);var a0={"@comment":H4,"@import":C4,"@keyframes":K4,"@media":K0,"@namespace":M4,"@supports":F4};var w4=4,P4=(Z)=>w4=Z,I=(Z)=>Z===(Z|0)?String(Z):Z.toFixed(w4).replace(/^0./,".").replace(/^-0./,"-.").replace(/0+$/,"");var N4=(Z)=>`${I(Z)}em`,O4=(Z)=>`${I(Z)}ex`;var D4=(Z)=>`${I(Z)}rem`,N1=(Z)=>`${I(Z)}%`,G4=(Z)=>`${I(Z)}px`,j4=(Z)=>`${I(Z)}vh`,k4=(Z)=>`${I(Z)}vw`,T4=(Z)=>`${I(Z)}vmin`,I4=(Z)=>`${I(Z)}vmax`,E4=(Z)=>`${Z|0}ms`,R4=(Z)=>`${I(Z)}s`;var L4=(Z)=>`${I(Z)}deg`,S4=(Z)=>`${I(Z)}rad`,A4=(Z)=>`${I(Z)}turn`,b4=(Z)=>`url(${Z})`;var j=((Z)=>{return Z[Z.IDLE=0]="IDLE",Z[Z.ACTIVE=1]="ACTIVE",Z[Z.DONE=2]="DONE",Z[Z.UNSUBSCRIBED=3]="UNSUBSCRIBED",Z[Z.ERROR=4]="ERROR",Z})(j||{}),L=((Z)=>{return Z[Z.NEVER=0]="NEVER",Z[Z.FIRST=1]="FIRST",Z[Z.LAST=2]="LAST",Z})(L||{});var Y5=0,B5=()=>Y5++,r=(Z,X)=>!X||!X.id?{...X,id:Z+"-"+B5()}:X;var k=J4.childLogger("rstream");class x{constructor(Z,X){this.wrapped=Z,X=r("sub",{closeIn:L.LAST,closeOut:L.LAST,cache:!0,...X}),this.parent=X.parent,this.id=X.id,this.closeIn=X.closeIn,this.closeOut=X.closeOut,this.cacheLast=X.cache,X.xform&&(this.xform=X.xform(U0()))}id;closeIn;closeOut;parent;__owner;xform;cacheLast;last=u;state=j.IDLE;subs=[];deref(){return this.last!==u?this.last:void 0}getState(){return this.state}setState(Z){this.state=Z}subscribe(Z,X={}){this.ensureState();let J;if(Z instanceof x&&!X.xform)Z.ensureState(),u0(!Z.parent,`sub '${Z.id}' already has a parent`),Z.parent=this,J=Z;else J=new x(Z,{...X,parent:this});return this.subs.push(J),this.setState(j.ACTIVE),J.setState(j.ACTIVE),this.last!=u&&J.next(this.last),J}transform(...Z){let X,J;if(b(G0(Z)))J=Z.pop(),X={error:J.error};return this.subscribe(X,r("xform",Z.length>0?{...J,xform:v(...Z)}:J))}map(Z,X){return this.transform(F(Z),X||{})}unsubscribe(Z){return Z?this.unsubscribeChild(Z):this.unsubscribeSelf()}unsubscribeSelf(){return k.debug(this.id,"unsub self"),this.parent&&this.parent.unsubscribe(this),this.state<j.UNSUBSCRIBED&&(this.state=j.UNSUBSCRIBED),this.release(),!0}unsubscribeChild(Z){k.debug(this.id,"unsub child",Z.id);const X=this.subs.indexOf(Z);if(X>=0){if(this.subs.splice(X,1),this.closeOut===L.FIRST||!this.subs.length&&this.closeOut!==L.NEVER)this.unsubscribe();return!0}return!1}next(Z){if(this.state>=j.DONE)return;this.xform?this.dispatchXform(Z):this.dispatch(Z)}done(){if(k.debug(this.id,"entering done()"),this.state>=j.DONE)return;if(this.xform){if(!this.dispatchXformDone())return}if(this.state=j.DONE,this.dispatchTo("done"))this.state<j.UNSUBSCRIBED&&this.unsubscribe();k.debug(this.id,"exiting done()")}error(Z){const X=this.wrapped,J=X&&X.error;return J&&k.debug(this.id,"attempting wrapped error handler"),J&&X.error(Z)||this.unhandledError(Z)}unhandledError(Z){return(k.parent!==D0?k:console).warn(this.id,"unhandled error:",Z),this.unsubscribe(),this.state=j.ERROR,!1}dispatchTo(Z,X){let J=this.wrapped;if(J)try{J[Z]&&J[Z](X)}catch(Y){if(!this.error(Y))return!1}const W=Z==="next"?this.subs:[...this.subs];for(let Y=W.length;Y-- >0;){J=W[Y];try{J[Z]&&J[Z](X)}catch(B){if(Z==="error"||!J.error||!J.error(B))return this.unhandledError(B)}}return!0}dispatch(Z){k.debug(this.id,"dispatch",Z),this.cacheLast&&(this.last=Z),this.dispatchTo("next",Z)}dispatchXform(Z){let X;try{X=this.xform[2]([],Z)}catch(J){this.error(J);return}if(this.dispatchXformVals(X))G(X)&&this.done()}dispatchXformDone(){let Z;try{Z=this.xform[1]([])}catch(X){return this.error(X)}return this.dispatchXformVals(Z)}dispatchXformVals(Z){const X=y(Z);for(let J=0,W=X.length;J<W&&this.state<j.DONE;J++)this.dispatch(X[J]);return this.state<j.ERROR}ensureState(){if(this.state>=j.DONE)Y0(`operation not allowed in state ${this.state}`)}release(){this.subs.length=0,delete this.parent,delete this.xform,delete this.last}}var v4=(Z,X)=>{const J=new y4(X);return J.next(Z),J};class y4 extends x{src;_cancel;_inited;constructor(Z,X){const[J,W]=h(Z)?[Z,X||{}]:[void 0,Z||{}];super(W.error?{error:W.error}:void 0,r("stream",W));this.src=J,this._inited=!1}subscribe(Z,X={}){const J=super.subscribe(Z,X);if(!this._inited){if(this.src)try{this._cancel=this.src(this)||(()=>{return})}catch(W){let Y=this.wrapped;if(!Y||!Y.error||!Y.error(W))this.unhandledError(W)}this._inited=!0}return J}unsubscribe(Z){const X=super.unsubscribe(Z);if(X&&(!Z||(!this.subs||!this.subs.length)&&this.closeOut!==L.NEVER))this.cancel();return X}done(){this.cancel(),super.done(),delete this.src,delete this._cancel}error(Z){if(super.error(Z))return!0;return this.cancel(),!1}cancel(){if(this._cancel){k.debug(this.id,"cancel");const Z=this._cancel;delete this._cancel,Z()}}}var _4=(Z,X)=>Z===L.FIRST||Z===L.LAST&&!X;var O1=function(Z){return Z?Q0(O1(),Z):V0(()=>({}),(X,[J,W])=>(X[J]=W,X))};var h4=()=>(Z)=>{const X=Z[2];return g(Z,(J,W)=>{if(W){for(let Y of y(W))if(J=X(J,Y),G(J))break}return G(W)?Q4(J):J})};var D1=function(Z,X){return O(X)?q0(D1(Z),X):v(F(Z),h4())};var G1=function(Z,X){return O(X)?a(G1(Z),X):F(h(Z)?(J)=>[Z(J),J]:(J)=>[Z,J])};var j1=function(...Z){const X=l0(j1,Z);if(X)return X;const J=Z[0],W=Z[1]!==!1;return F((Y)=>{const B=W?{}:Y;for(let V in Y)B[V]=J(Y[V]);return B})};var m4=(Z)=>Z;var k1=function(...Z){const X=l0(k1,Z,q0);if(X)return X;const{key:J=m4,mergeOnly:W=!1,reset:Y=!0,all:B=!0,backPressure:V=0}=Z[1],Q=N(Z[0])?new Set(Z[0]):Z[0],U=new Set,q=new Map;let z={};const H=([K,C,E])=>{let p=!0;if(W||V<1)return[K,(M)=>{if(Y&&B&&U.size>0||!Y&&p)M=E(M,z),z={},U.clear(),p=!1;return C(M)},(M,o)=>{const T=J(o);if(Q.has(T)){if(z[T]=o,U.add(T),W||f4(Q,U))if(M=E(M,z),p=!1,Y)z={},U.clear();else z={...z}}return M}];else return[K,(M)=>{if(B&&U.size>0)M=E(M,u4(q,U)),q.clear(),U.clear();return C(M)},(M,o)=>{const T=J(o);if(Q.has(T)){let f=q.get(T);!f&&q.set(T,f=[]),f.length>=V&&Y0(`max back pressure (${V}) exceeded for input: ${String(T)}`),f.push(o),U.add(T);while(f4(Q,U))if(M=E(M,u4(q,U)),p=!1,G(M))break}return M}]};return H.keys=()=>Q,H.clear=()=>{q.clear(),Q.clear(),U.clear(),z={}},H.add=(K)=>{Q.add(K)},H.delete=(K,C=!0)=>{if(q.delete(K),Q.delete(K),C)U.delete(K),delete z[K]},H},f4=(Z,X)=>{if(X.size<Z.size)return!1;for(let J of Z)if(!X.has(J))return!1;return!0},u4=(Z,X)=>{const J={};for(let W of X){const Y=Z.get(W);J[W]=Y.shift(),!Y.length&&X.delete(W)}return J};var g4=(Z,X)=>{let J=!0;for(let W of X)J=Z.removeID(W)&&J;return J};var t0=(Z)=>new x4(Z);class x4 extends x{sources;idSources;realSourceIDs;invRealSourceIDs;psync;clean;constructor(Z){const X=k1(new Set,{key:(W)=>W[0],mergeOnly:Z.mergeOnly===!0,reset:Z.reset===!0,all:Z.all!==!1,backPressure:Z.backPressure||0}),J=j1((W)=>W[1]);super(void 0,r("streamsync",{...Z,xform:Z.xform?v(X,J,Z.xform):v(X,J)}));this.sources=new Map,this.realSourceIDs=new Map,this.invRealSourceIDs=new Map,this.idSources=new Map,this.psync=X,this.clean=!!Z.clean,Z.src&&this.addAll(Z.src)}add(Z,X){X||(X=Z.id),this.ensureState(),this.psync.add(X),this.realSourceIDs.set(X,Z.id),this.invRealSourceIDs.set(Z.id,X),this.idSources.set(Z.id,Z),this.sources.set(Z,Z.subscribe({next:(J)=>J[1]instanceof x?this.add(J[1]):this.next(J),done:()=>this.markDone(Z),__owner:this},{xform:G1(X),id:`in-${X}`}))}addAll(Z){for(let X in Z)this.psync.add(X);for(let X in Z)this.add(Z[X],X)}remove(Z){const X=this.sources.get(Z);if(X){const J=this.invRealSourceIDs.get(Z.id);return k.info(`removing src: ${Z.id} (${J})`),this.psync.delete(J,this.clean),this.realSourceIDs.delete(J),this.invRealSourceIDs.delete(Z.id),this.idSources.delete(Z.id),this.sources.delete(Z),X.unsubscribe(),!0}return!1}removeID(Z){const X=this.getSourceForID(Z);return X?this.remove(X):!1}removeAll(Z){for(let J of Z)this.psync.delete(this.invRealSourceIDs.get(J.id));let X=!0;for(let J of Z)X=this.remove(J)&&X;return X}removeAllIDs(Z){return g4(this,Z)}getSourceForID(Z){return this.idSources.get(this.realSourceIDs.get(Z))}getSources(){const Z={};for(let[X,J]of this.idSources)Z[this.invRealSourceIDs.get(X)]=J;return Z}unsubscribe(Z){if(!Z){k.debug(this.id,"unsub sources");for(let X of this.sources.values())X.unsubscribe();this.sources.clear(),this.psync.clear(),this.realSourceIDs.clear(),this.invRealSourceIDs.clear(),this.idSources.clear()}return super.unsubscribe(Z)}markDone(Z){this.remove(Z),_4(this.closeIn,this.sources.size)&&this.done()}}var T1=Z0((Z,X=" ")=>{const J=X0(String(X),Z);return(W,Y)=>{if(W==null)return J;return W=W.toString(),Y=Y!==void 0?Y:W.length,Y<Z?J.substring(Y)+W:W}}),nJ=T1(2,"0"),lJ=T1(3,"0"),d4=T1(4,"0");var Q5=/\{(\d+)\}/g;var I1=(Z,...X)=>X.length>0?Z.replace(Q5,(J,W)=>String(X[parseInt(W,10)])):Z;var n4=(Z)=>({key:(X)=>X,group:U0(),...Z});var E1=function(...Z){const X=V4(E1,Z);if(X)return X;const J=n4(Z[0]),[W,Y,B]=J.group;return[()=>({}),(V)=>{for(let Q in V)V[Q]=Y(V[Q]);return V},(V,Q)=>{const U=J.key(Q);return V[U]=V[U]?B(V[U],Q):B(W(),Q),V}]};var R1=function(Z,X){return O(X)?a(R1(Z),X):(J)=>{const W=J[2];return g(J,(Y,B)=>Z(B)?W(Y,B):Y)}};import{watch as a4} from"fs";import{resolve as c} from"path";var l4={specs:A({alias:"s",optional:!1,desc:"Path to generated JSON defs"})},r0={bundle:R({alias:"b",desc:"Bundle inputs (see `out` option)"})},H0={include:S0({alias:"I",desc:"Include CSS files (prepend)"})},c0={eval:A({alias:"e",desc:"eval meta stylesheet in given string (ignores other inputs & includes)"})},s0={force:S0({alias:"f",hint:"STR",desc:"CSS classes to force include (wildcards are supported, @-prefix will read from file)",delim:","})},p4={media:S0({alias:"m",hint:"ID",desc:"Media query IDs (use 'ALL' for all)",delim:","})},o4={onlyDecls:R({desc:"Only emit framework decls"})},d={out:A({alias:"o",desc:"Output file (or stdout)"})},e0={prec:A0({default:3,desc:"Number of fractional digits"})},n={pretty:R({alias:"p",desc:"Pretty print output"})},$0={noDecls:R({alias:"d",desc:"Don't emit framework decls"})},C0={noHeader:R({desc:"Don't emit generated header comment"})},M0={scope:A({desc:"Suffix for CSS class names"})},F0={watch:R({alias:"w",desc:"Watch input files for changes"})};import{watch as V5} from"fs";import{resolve as i4} from"path";var l=(Z,X,J)=>{X=w(X)?X:X.join("\n"),Z?K1(i4(Z),X,J):process.stdout.write(X+"\n")},Z1=({info:{name:Z,version:X}})=>`/*! ${Z} v${X} - generated by thi.ng/meta-css @ ${(new Date()).toISOString()} */`,T0=(Z,X)=>{const J=()=>{X.info("closing watchers..."),W.forEach((Y)=>Y.watcher.close())},W=Z.map((Y,B)=>{Y=i4(Y);const V=v4(D(Y,X),{id:`in${d4(B)}`});return{input:V,watcher:V5(Y,{},(Q)=>{if(Q==="change")try{V.next(D(Y,X))}catch(U){X.warn(U.message),J()}else X.warn("input removed:",Y),J()})}});return process.on("SIGINT",J),t0({src:O1(F(({input:Y})=>[Y.id,Y],W))})},X1=(Z)=>Object.keys(Z).reduce((X,J)=>{if(!J.startsWith("__"))X[J]=Z[J];return X},{});async function S1(Z){const X=m(c(Z.opts.specs),Z.logger),J=H5(X,Z.opts.force||[],Z.logger);if(Z.opts.bundle)if(Z.opts.watch)await q5(Z,J);else I0(Z,X,J,Z.opts.eval?[Z.opts.eval]:Z.inputs.map((W)=>D(c(W),Z.logger)),Z.opts.out);else if(Z.opts.watch)await U5(Z,X,J);else if(Z.opts.eval)try{I0(Z,X,J,[Z.opts.eval])}catch(W){Z.logger.warn(W.message)}else for(let W of Z.inputs)try{W=c(W);const Y=!Z.opts.noWrite?W.replace(/\.mcss$/,".css"):void 0;I0(Z,X,J,[D(W,Z.logger)],Y)}catch(Y){Z.logger.warn(Y.message)}}function*C5(Z){let X=-1,J=Z.length,W=0;for(let Y=0;Y<J;Y++){const B=Z[Y];if(B===" "||B==="\t"){if(!W&&X>=0)yield Z.substring(X,Y),X=-1}else if(B==="{"||B==="}"){if(X>=0)yield Z.substring(X,Y);yield B,X=-1}else if(B==="(")W++;else if(B===")"){if(--W<0)$(`invalid nesting in line: '${Z}'`)}else if(X<0)X=Y}if(W)$("template calls must be fully on a single line");if(X>=0)yield Z.substring(X,J)}var r4={desc:"Transpile (and optionally bundle) meta stylesheets to CSS",opts:{...r0,...c0,...s0,...H0,...$0,...C0,...d,...n,...M0,...l4,...F0,noWrite:R({desc:"Don't write files, use stdout only"})},fn:S1},U5=async(Z,X,J)=>{const W=c(Z.opts.specs);let Y,B={process:()=>{try{return X=m(W,Z.logger),Y.forEach((Q)=>Q.process()),!0}catch(Q){return Z.logger.warn(Q.message+": "+W),!1}},watcher:a4(W,{},(Q)=>{if(Q==="change")B.process();else Z.logger.warn("specs file removed:",W),V()})};const V=()=>{Z.logger.info("closing watchers..."),B.watcher.close(),Y.forEach((Q)=>Q.watcher.close())};Y=Z.inputs.map((Q)=>{Q=c(Q);const U=!Z.opts.noWrite?Q.replace(/\.mcss$/,".css"):void 0,q=()=>{try{return I0(Z,X,J,[D(Q,Z.logger)],U),!0}catch(z){if(Z.logger.warn(z.message+": "+Q),Y)V();return!1}};if(!q())process.exit(1);return{process:q,watcher:a4(Q,{},(z)=>{if(z==="change")q();else Z.logger.warn("input removed:",Q),V()})}}),Z.logger.info("waiting for changes, press ctrl+c to cancel..."),process.on("SIGINT",V)},q5=async(Z,X)=>{t0({src:{styles:T0(Z.inputs,Z.logger),specs:T0([Z.opts.specs],Z.logger).map((J)=>JSON.parse(Object.values(J)[0]))}}).subscribe({next({styles:J,specs:W}){try{I0(Z,W,X,Object.keys(J).sort().map((Y)=>J[Y]),Z.opts.out)}catch(Y){Z.logger.warn(Y.message)}}})},I0=({logger:Z,opts:{include:X,noDecls:J,noHeader:W,pretty:Y,scope:B}},V,Q,U,q)=>{const z={logger:Z,specs:V,css:{format:Y?n0:B0,fns:a0,scope:B},mediaQueryIDs:new Set(Object.keys(V.media)),mediaQueryRules:{...Q.mediaQueryRules},plainRules:{...Q.plainRules}},H=X?X.map((K)=>D(c(K),Z).trim()):[];if(!W)H.push(Z1(V));if(!J&&V.decls.length)H.push(t(V.decls,z.css));U.forEach((K)=>$5(K,z)),K5(H,z),z5(H,z),l(q,H,Z)},z5=(Z,{css:X,logger:J,mediaQueryRules:W,specs:Y})=>{for(let B in W){const V=s4(W[B],Y);J.debug("mediaquery rules",B,V),Z.push(t(K0(w5(Y.media,B),V),X))}},K5=(Z,{css:X,logger:J,plainRules:W,specs:Y})=>{const B=s4(W,Y);J.debug("plain rules",B),Z.push(t(B,X))},H5=(Z,X,J)=>{const W=new Set(Object.keys(Z.media)),Y=new Set(Object.keys(Z.classes)),B={},V={};if(X.length&&X[0][0]==="@")X=[...J0(D(c(X[0].substring(1)),J))];for(let Q of X){if(!Q||Q.startsWith("//"))continue;const{token:U,query:q}=e4(Q,W);let z;if(U.includes("*")){const H=new RegExp(`^${U.replace("*",".*")}\$`);z=[...R1((K)=>H.test(K),Y)]}else if(Y.has(U))z=[U];else{J.warn(`unknown include rule ID: ${Q}, skipping...`);continue}for(let H of z)J.debug("including class:",H),q?Z8(B,q,`.${H}`,H):X8(V,`.${H}`,H)}return{mediaQueryRules:B,plainRules:V}},$5=(Z,{specs:X,mediaQueryIDs:J,mediaQueryRules:W,plainRules:Y})=>{const B=E0(),V=E0(B),Q={root:B,curr:V,scopes:[V]};for(let U of J0(Z)){if(!U||/^\s*\/\//.test(U))continue;for(let q of C5(U)){if(!q)continue;let z=Q.curr;switch(z.state){case"sel":case"nest":if(q==="{"){if(z.state==="sel")z.sel=z.sel.map((H)=>H.replace(",","")),z.path=M5(Q.scopes);z.state="class"}else if(q==="}")t4(Q);else{const H=G0(z.sel);if(!H||H.endsWith(","))z.sel.push(q);else z.sel[z.sel.length-1]+=" "+q}break;case"class":if(q==="{")z.state="nest",Q.scopes.push(Q.curr=E0(z));else if(q==="}")t4(Q);else{let{token:H,query:K}=e4(q,J);if(!X.classes[H]&&!(J8(H)||W8(H)))$(`unknown class ID: ${H}`);if(K)Z8(W,K,z.path,H);else X8(Y,z.path,H)}break;default:Y0(z.state)}}}},L1=":",c4="///",E0=(Z)=>({state:"sel",sel:Z?[]:["<root>"],path:"",parent:Z}),t4=(Z)=>{const X=!Z.curr.sel.length;if(u0(!!Z.curr.parent,"stack underflow"),Z.scopes.pop(),Z.scopes.length>0){if(Z.curr=G0(Z.scopes),!X&&Z.curr.state==="nest")Z.scopes.push(Z.curr=E0(Z.curr))}else Z.scopes.push(Z.curr=E0(Z.root))},M5=(Z)=>Z.map((X)=>X.sel.join(",")).join(c4),s4=(Z,X)=>Object.entries(Z).map(([J,W])=>F5(J,W,X)),F5=(Z,X,J)=>{const W=[];let Y=W;const B=Z.split(c4);for(let V=0;V<B.length;V++){const Q=B[V].split(",");if(V==B.length-1){const U=Object.assign({},...F((q)=>W8(q)?N5(J,q):J8(q)?P5(q):X1(J.classes[q]),X));Q.push(U)}Y.push(Q),Y=Q}return W[0]},e4=(Z,X)=>{if(/^::?/.test(Z))return{token:Z};const J=Z.lastIndexOf(L1);if(J<0)return{token:Z};const W=Z.substring(0,J);if(!W.split(L1).every((B)=>X.has(B)))$(`invalid media query in token: ${Z}`);return{token:Z.substring(J+1),query:W}},w5=(Z,X)=>X.split(L1).reduce((J,W)=>Object.assign(J,Z[W]),{}),Z8=(Z,X,J,W)=>{if(!Z[X])Z[X]={};(Z[X][J]||(Z[X][J]=new Set)).add(W)},X8=(Z,X,J)=>(Z[X]||(Z[X]=new Set)).add(J),P5=(Z)=>{const X=Z.indexOf("=");return{[`--${Z.substring(0,X)}`]:Z.substring(X+1)}},N5=(Z,X)=>{const J=X.indexOf("("),W=X.substring(0,J),Y=X.substring(J+1,X.length-1).split(/(?<!\\),/g).map((V)=>V.trim().replace("\\,",",")),B=Z.templates[W];if(!B)$(`unknown template: ${W}`);if(Y.length!==B.__arity)$(`template "${W}" expected ${B.__arity} arguments`);return Object.entries(B).reduce((V,[Q,U])=>{if(!Q.startsWith("__")){if(Q=I1(Q,...Y),w(U))U=I1(U,...Y);V[Q]=U}return V},{})},J8=(Z)=>Z.includes("="),W8=(Z)=>Z.includes("(");async function A1(Z){if(Z.opts.watch)await G5(Z);else await V8(Z.inputs.map((X)=>D(X,Z.logger)),Z.opts,Z.logger)}var B8={deg:L4,em:N4,ex:O4,ms:E4,percent:N1,px:G4,rad:S4,rem:D4,second:R4,turn:A4,url:b4,vh:j4,vmax:I4,vmin:T4,vw:k4,"%":N1},O5={percent:"{0}%",second:"{0}s",url:"url({0})"},D5={"":[""],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:[""]},Q8={desc:"Generate framework rules from specs",opts:{...d,...e0,...n,...F0},fn:A1},G5=async(Z)=>{T0(Z.inputs,Z.logger).subscribe({next(X){try{V8(Object.keys(X).sort().map((J)=>X[J]),Z.opts,Z.logger)}catch(J){Z.logger.warn(J.message)}}})},V8=async(Z,X,J)=>{const W={info:{name:"TODO",version:"0.0.0"},media:{},classes:{},templates:{},decls:[]};P4(X.prec);for(let Y of Z){const B=JSON.parse(Y);if(Object.assign(W.info,B.info),Object.assign(W.media,B.media),B.decls)W.decls.push(...B.decls);if(B.specs)for(let V of B.specs)try{U8(B,V,W.classes,J)}catch(Q){J.warn(`error processing spec: ${V.name}`,Q,", skipping...")}if(B.templates)for(let V of B.templates)j5(B,V,W.templates,J)}return l(X.out,JSON.stringify(W,null,X.pretty?4:0),J),W},U8=(Z,X,J,W,Y=!1)=>{const B=N(X.vars)?X.vars:[""],V=w(X.props)?{[X.props]:"<v>"}:X.props,Q=k5(X,Z),U=new Set;for(let q of B){const z=Z.vars?.[q]||D5[q];if(!z)$(`unknown variation ID: ${q}`);for(let[H,K]of p0(z,Object.keys(Q))){const C=s(X.name,q,H,K,Q[K]),E=X.unit?s(X.unit,q,H,K,Q[K]):void 0,p=Y?I5(E):T5(Q[K],E);if(!J[C]){if(J[C]={},X.user!=null)J[C].__user=X.user;if(X.doc!=null)J[C].__doc=E5(X.doc,q,H,K,p)}else if(!U.has(C))$(`duplicate class ID: ${C}`);U.add(C);let M=-1;for(let[o,T]of Object.entries(V)){const f=s(o,q,H,K,Q[K]),J1=s(!E||w(T)?String(T):B8[E](T),q,H,K,p);if(J[C][f]=J1,W.debug(C,f,J1),Y)M=Y8(J1,Y8(f,M))}if(Y)J[C].__arity=M+1}}return J},j5=(Z,X,J,W)=>U8(Z,{...X,values:[""]},J,W,!0),Y8=(Z,X)=>{const J=/\{(\d+)\}/g;let W;while(W=J.exec(Z))X=Math.max(X,+W[1]);return X},k5=(Z,X)=>{const J=w(Z.values)?X.tables?.[Z.values]||$(`invalid table ID: ${Z.values}`):Z.values;if(b(J))return J;const W=Z.key==="v"?(Y)=>String(Y):Z.key==="i+1"?(Y,B)=>String(B+1):Z.key===void 0?(Y,B)=>String(B):$(`invalid key type: ${Z.key}`);return J.reduce((Y,B,V)=>{return Y[W(B,V)]=B,Y},{})},T5=(Z,X)=>{if(!X||w(Z))return Z;const J=B8[X];if(!J)$(`invalid unit: ${X}`);return J(Z)},I5=(Z)=>Z?O5[Z]||"{0}"+Z:"{0}",s=(Z,X,J,W,Y)=>Z.replace(/<vid>/g,X).replace(/<var>/g,J).replace(/<k>/g,W).replace(/<v>/g,String(Y)),E5=({group:Z,desc:X,args:J},W,Y,B,V)=>({group:Z?s(Z,W,Y,B,V):"TODO",desc:X?s(X,W,Y,B,V):void 0,args:J?J.map((Q)=>s(Q,W,Y,B,V)):void 0});var q8={desc:"Combination of the generate & convert commands",opts:{...r0,...c0,...s0,...H0,...$0,...C0,...e0,...n,...M0,...F0,outCss:A({desc:"Output file for CSS bundle",optional:!1}),outSpecs:A({desc:"Output file for framework",optional:!1})},fn:async(Z)=>{const{opts:X,inputs:J}=Z,[W,Y]=J.reduce((Q,U)=>(Q[U.endsWith(".json")?0:1].push(U),Q),[[],[]]),B={inputs:W,format:Z.format,logger:Z.logger,opts:{...X,out:X.outSpecs}},V={inputs:Y,format:Z.format,logger:Z.logger,opts:{...X,noWrite:!1,out:X.outCss,scope:X.scope,specs:X.outSpecs}};await A1(B),await S1(V)}};import{resolve as R5} from"path";var H8={desc:"Generate Markdown documentation for framework specs",opts:{...d,level:A0({alias:"l",desc:"Initial heading level",default:1}),title:A({alias:"t",desc:"Custom main title, set to NONE to disable"})},inputs:1,fn:async(Z)=>{const{logger:X,opts:J,inputs:W}=Z,Y=m(R5(W[0]),X),B=L5(Y,J);l(J.out,B,X)}},L5=(Z,{level:X,title:J})=>{const W=Object.keys(Z.classes).length,Y=Object.keys(Z.templates).length,B=[`Currently, there are ${W+Y} CSS utility classes (incl. ${Y} templates) defined in "${Z.info.name}" (v${Z.info.version}):`,"",`${e(X+1)} Classes by category`,"",...K8(Z.classes,A5,X+2),`${e(X+1)} Templates by category`,"",...K8(Z.templates,b5,X+2),`${e(X+1)} Media queries`,"",...Object.entries(Z.media).map(([V,Q])=>`- **${V}**: \`${JSON.stringify(Q)}\``),""];if(J!=="NONE")B.unshift(`${e(X)} ${J??Z.info.name}\n`);return B},z8=(Z)=>Z.split(/(\d+)/).map((X)=>{const J=parseInt(X);return isNaN(J)?X:J}),S5=(Z,X)=>{if(/\d+/.test(Z)&&/\d+/.test(X)){const J=z8(Z),W=z8(X),Y=J.length;if(Y===W.length){for(let B=0;B<Y;B++)if(J[B]!==W[B])return C1(J[B],W[B]);return 0}return J.length-W.length}return C1(Z,X)},K8=(Z,X,J)=>{const W=E1({key:([Y,{__doc:B}])=>B?.group||"TODO",group:[()=>[],(Y)=>Y.sort(),(Y,B)=>(Y.push(B[0]),Y)]},Object.entries(Z));return D1((Y)=>{const B=W[Y].sort(S5).map((Q)=>X(Q,Z[Q].__doc,J+1)),V=B.length;return[`${e(J)} ${m0(Y)}`,V>3?`\n<details><summary>${V} items:</summary>\n`:"",B.join("\n"),V>3?"</details>\n":""]},Object.keys(W).sort())},A5=(Z,X)=>{if(!(X&&X.desc))return`- \`${Z}\``;let J=X.desc;if(/^-[a-z]/.test(J))J=J.substring(1);return`- \`${Z}\` (${J})`},b5=(Z,X,J)=>{if(!(X&&X.args))return`${e(J)} ${Z}(...)\n\nTODO`;const W=X.args.map((Y)=>/^\w+/.exec(Y)[0]).join(", ");return[`${e(J)} \`${Z}(${W})\``,"",...X.args.map(v5),X.desc?`\n${X.desc}\n`:""].join("\n")},v5=(Z)=>`- ${Z.replace(/^(\w+)/,(X,J)=>`**${J}**`)}`,e=y0((Z)=>"#".repeat(Z));import{resolve as $8} from"path";var M8={desc:"Export entire generated framework as CSS",opts:{...H0,...$0,...o4,...d,...n,...C0,...p4,...M0},inputs:1,fn:async(Z)=>{const{logger:X,opts:{include:J,media:W,noDecls:Y,noHeader:B,onlyDecls:V,out:Q,pretty:U,scope:q},inputs:z}=Z,H={format:U?n0:B0,fns:a0,scope:q},K=m($8(z[0]),X),C=J?J.map((E)=>D($8(E),X).trim()):[];if(!B)C.push(Z1(K));if(!Y&&K.decls.length)C.push(t(K.decls,H));if(!V)C.push(y5(K,W,H,X));l(Q,C,X)}},y5=(Z,X,J,W)=>{const Y=C8("",Z);if(X){const B=X[0]==="ALL"?Object.keys(Z.media):X;for(let V of B)if(Z.media[V])Y.push(K0(Z.media[V],C8("-"+V,Z)));else W.warn(`invalid media query ID: ${V}, skipping...`)}return t(Y,J)},C8=(Z,X)=>Object.entries(X.classes).map(([J,W])=>[`.${J}${Z}`,X1(W)]);var b1=m(_5(import.meta.dir,"package.json"));e1({name:"metacss",opts:{verbose:R({alias:"v",desc:"Display extra process information"})},commands:{convert:r4,develop:q8,doc:H8,export:M8,generate:Q8},ctx:async(Z)=>{if(Z.opts.verbose)Z.logger.level=P.DEBUG;return{...Z,format:h0}},usage:{prefix:`
|
|
2
|
+
var W1={default:95,hint:90,multi:90,param:96,required:33};var w0=(Z)=>Z;var Z0=function(Z,X=Object.create(null)){return(...J)=>{const W=JSON.stringify(J);if(W!==void 0)return W in X?X[W]:X[W]=Z.apply(null,J);return Z.apply(null,J)}};var X0=Z0((Z,X)=>Z.repeat(X));var v1=(Z)=>/^[a-f0-9]+$/i.test(Z);var y1=(Z)=>/^[-+]?\d+$/.test(Z),_1=(Z)=>/^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(Z);var S=(Z,X=(J)=>J!==void 0?": "+J:"")=>class extends Error{origMessage;constructor(J){super(Z(J)+X(J));this.origMessage=J!==void 0?String(J):""}};var F8=S(()=>"illegal argument(s)"),$=(Z)=>{throw new F8(Z)};var Y1=(Z)=>_1(Z)?parseFloat(Z):$(`not a numeric value: ${Z}`),h1=(Z)=>Z.map(Y1),B1=(Z)=>v1(Z)?parseInt(Z,16):$(`not a hex value: ${Z}`),f1=(Z)=>Z.map(B1),Q1=(Z)=>y1(Z)?parseInt(Z):$(`not an integer: ${Z}`),m1=(Z)=>Z.map(Q1);var R0=(Z,X)=>(J)=>({coerce:Z,hint:X,group:"main",...J}),L0=(Z,X)=>(J)=>({hint:w8(X,J.delim),multi:!0,coerce:Z,group:"main",...J}),w8=(Z,X)=>Z+(X?`[${X}..]`:""),R=(Z)=>({flag:!0,default:!1,group:"flags",...Z}),A=R0(w0,"STR"),S0=L0(w0,"STR"),WZ=R0(Y1,"NUM"),YZ=R0(B1,"HEX"),A0=R0(Q1,"INT"),BZ=L0(h1,"NUM"),QZ=L0(f1,"HEX"),VZ=L0(m1,"INT");var P=((Z)=>{return Z[Z.FINE=0]="FINE",Z[Z.DEBUG=1]="DEBUG",Z[Z.INFO=2]="INFO",Z[Z.WARN=3]="WARN",Z[Z.SEVERE=4]="SEVERE",Z[Z.NONE=5]="NONE",Z})(P||{});var P8=0;class P0{constructor(Z,X=P.FINE,J){this.parent=J,this.id=Z||`logger-${P8++}`,this.level=typeof X==="string"?P[X]:X}id;level;addChild(Z){return Z.parent=this,Z}enabled(Z){return this.level<=Z}fine(...Z){this.log(P.FINE,Z)}debug(...Z){this.log(P.DEBUG,Z)}info(...Z){this.log(P.INFO,Z)}warn(...Z){this.log(P.WARN,Z)}severe(...Z){this.log(P.SEVERE,Z)}log(Z,X){this.level<=Z&&this.logEntry([Z,this.id,Date.now(),...X])}}var u1=(Z)=>Z.map((X)=>{if(typeof X==="function")X=X();if(!(typeof X==="string"||typeof X==="number"))X=JSON.stringify(X);return X}).join(" ");class b0 extends P0{constructor(Z,X,J,W){super(X,J,W);this.target=Z}childLogger(Z,X){return new b0(this.target,Z,X??this.level,this)}logEntry(Z){if(Z[0]<this.level)return;this.target.write(`[${P[Z[0]]}] ${Z[1]}: ${u1(Z.slice(3))}
|
|
3
|
+
`),this.parent&&this.parent.logEntry(Z)}}var v0=Z0((Z,X=" ")=>{const J=X0(String(X),Z);return(W,Y)=>{if(W==null)return J;return W=W.toString(),Y=Y!==void 0?Y:W.length,Y<Z?W+J.substring(Y):W}});var y0=(Z,X=Object.create(null))=>(J)=>(J in X)?X[J]:X[J]=Z(J);var V1={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 N8=(Z,X)=>(J)=>Z.format(X,J),U1=(Z)=>Object.keys(V1).reduce((X,J)=>(X[J]=N8(Z,V1[J]),X),{format:Z});var g1="\x1B[0m";var O8=["","1","2","1;2","4","1;4","2;4","1;2;4"],_0={format:(Z,X)=>_0.start(Z)+X+_0.end,start:y0((Z)=>{let X=[],J=Z&15;return J&&X.push(29+(Z>>4&1)*60+J),J=Z>>5&15,J&&X.push(39+(Z>>9&1)*60+J),J=Z>>10,J&&X.push(O8[J]),"\x1B["+X.join(";")+"m"}),end:g1,prefix:g1,suffix:"\n"};var x1={format:(Z,X)=>String(X),prefix:"",suffix:"\n",start:()=>"",end:""};var h0=U1(_0),d1=U1(x1);var N=Array.isArray;var D8=(Z)=>Z.toUpperCase(),n1=(Z)=>Z.toLowerCase(),f0=(Z)=>Z.length?Z[0].toUpperCase()+Z.substring(1):Z,l1=(Z,X="-")=>n1(Z.replace(/([a-z0-9\u00e0-\u00fd])([A-Z\u00c0-\u00dd])/g,(J,W,Y)=>W+X+Y));var p1=(Z,X="-")=>n1(Z).replace(new RegExp(`\\${X}+(\\w)`,"g"),(J,W)=>D8(W));var o1=Object.getPrototypeOf,b=(Z)=>{let X;return Z!=null&&typeof Z==="object"&&((X=o1(Z))===null||o1(X)===null)};var G8=/\x1b\[[0-9;]+m/g,j8=(Z)=>Z.replace(G8,"");var m0=(Z)=>j8(Z).length;var i1=(Z=!1,X)=>(J)=>Z||typeof J!=="string"&&typeof J!=="number"?JSON.stringify(J,null,X):String(J);function*J0(Z,X=/\r?\n/g,J=!1){let W=0;const Y=Z.length,B=~~J;let V;if(typeof X==="string")V=new RegExp(X,"g");else if(!X.flags.includes("g"))V=new RegExp(X,X.flags+"g");else V=X;for(;W<Y;){const Q=V.exec(Z);if(!Q){yield Z.substring(W);return}const U=Q[0].length;yield Z.substring(W,Q.index+B*U),W=Q.index+U}}class q1{n=0;w=[];constructor(Z,X){Z!=null&&this.add(Z,X)}add(Z,X=Z.length){return this.w.push(Z),this.n+=X+~~(this.n>0),this}toString(){return this.w.join(" ")}}var k8={length:(Z)=>Z.length,split:(Z,X)=>X},t1={length:m0,split:(Z,X)=>{const J=/\x1b\[[0-9;]+m/g;let W=X,Y;while(Y=J.exec(Z)){if(Y.index>=X)break;const B=Y[0].length;W+=B,X+=B}return W}},a1=(Z,X,J,W)=>{const Y=Z[Z.length-1];Y&&W-Y.n>J?Y.add(X,J):Z.push(new q1(X,J))},T8=(Z,{width:X,min:J,hard:W,splitter:Y},B=0,V=[])=>{let Q=Y.length(Z),U=X-B;if(U<J&&U<Q)U=X;while(W&&Q>U){const q=Y.split(Z,U),z=Z.substring(0,q);a1(V,z,U,X),Z=Z.substring(q),U=X,Q=Y.length(Z)}return a1(V,Z,Q,X),V},I8=(Z,X,J=[])=>{if(!Z.length)return J.push(new q1),J;const W={width:80,min:4,hard:!1,splitter:k8,...X};for(let Y of J0(Z,X.delimWord||/\s/g)){const B=J[J.length-1];T8(Y,W,B&&B.n>0?B.n+1:0,J)}return J},r1=(Z,X)=>{let J=[];for(let W of J0(Z,X.delimLine))J=J.concat(I8(W,X));return J};var N0=(Z,X={})=>{X={lineWidth:80,paramWidth:32,showDefaults:!0,prefix:"",suffix:"",groups:["flags","main"],...X};const J=b(X.color)?{...W1,...X.color}:X.color?W1:{},W=X0(" ",X.paramWidth),Y=(Q)=>Q.map((U)=>E8(U,Z[U],X,J,W)),B=Object.keys(Z).sort(),V=X.groups?X.groups.map((Q)=>[Q,B.filter((U)=>Z[U].group===Q)]).filter((Q)=>!!Q[1].length):[["options",B]];return[...z1(X.prefix,X.lineWidth),...V.map(([Q,U])=>[...X.showGroupNames?[`${f0(Q)}:
|
|
4
|
+
`]:[],...Y(U),""].join("\n")),...z1(X.suffix,X.lineWidth)].join("\n")},E8=(Z,X,J,W,Y)=>{const B=R8(X,W),V=L8(X,W,B),Q=O0(`--${l1(Z)}`,W.param),U=`${V}${Q}${B}`,q=X.optional===!1&&X.default===void 0,z=[];q&&z.push("required"),X.multi&&z.push("multiple");const H=S8(z,W,q)+(X.desc||"")+A8(X,J,W);return v0(J.paramWidth)(U,m0(U))+z1(H,J.lineWidth-J.paramWidth).map((K,M)=>M>0?Y+K:K).join("\n")},R8=(Z,X)=>Z.hint?O0(" "+Z.hint,X.hint):"",L8=(Z,X,J)=>Z.alias?`${O0("-"+Z.alias,X.param)}${J}, `:"",S8=(Z,X,J)=>Z.length?O0(`[${Z.join(", ")}] `,J?X.required:X.multi):"",A8=(Z,X,J)=>X.showDefaults&&Z.default!=null&&Z.default!==!1?O0(` (default: ${i1(!0)(Z.defaultHint!=null?Z.defaultHint:Z.default)})`,J.default):"",O0=(Z,X)=>X!=null?`\x1B[${X}m${Z}\x1B[0m`:Z,z1=(Z,X)=>Z?r1(Z,{width:X,splitter:t1,hard:!1}):[];var b8=S(()=>"parse error"),c1=(Z,X,J)=>{J={start:2,showUsage:!0,help:["--help","-h"],...J};try{return v8(Z,X,J)}catch(W){if(J.showUsage)console.log(W.message+"\n\n"+N0(Z,J.usageOpts));throw new b8(W.message)}},v8=(Z,X,J)=>{const W=y8(Z),Y={};let B,V,Q=J.start;for(;Q<X.length;){const U=X[Q];if(!B){if(J.help.includes(U)){console.log(N0(Z,J.usageOpts));return}const q=_8(Z,W,Y,U);if(B=q.id,V=q.spec,Q=Q+~~(q.state<2),q.state)break}else{if(h8(V,Y,B,U))break;B=null,Q++}}return B&&$(`missing value for: --${B}`),{result:f8(Z,Y),index:Q,rest:X.slice(Q),done:Q>=X.length}},y8=(Z)=>Object.entries(Z).reduce((X,[J,W])=>W.alias?(X[W.alias]=J,X):X,{}),_8=(Z,X,J,W)=>{if(W[0]==="-"){let Y;if(W[1]==="-"){if(W==="--")return{state:1};Y=p1(W.substring(2))}else Y=X[W.substring(1)],!Y&&$(`unknown option: ${W}`);const B=Z[Y];if(!B&&$(Y),B.flag){if(J[Y]=!0,Y=void 0,B.fn&&!B.fn("true"))return{state:1,spec:B}}return{state:0,id:Y,spec:B}}return{state:2}},h8=(Z,X,J,W)=>{if(/^-[a-z]/i.test(W)&&$(`missing value for: --${J}`),Z.multi)N(X[J])?X[J].push(W):X[J]=[W];else X[J]=W;return Z.fn&&!Z.fn(W)},f8=(Z,X)=>{let J;for(let W in Z)if(J=Z[W],X[W]===void 0){if(J.default!==void 0)X[W]=J.default;else if(J.optional===!1)$(`missing arg: --${W}`)}else if(J.coerce)m8(J,X,W);return X},m8=(Z,X,J)=>{try{if(Z.multi&&Z.delim)X[J]=X[J].reduce((W,Y)=>(W.push(...Y.split(Z.delim)),W),[]);X[J]=Z.coerce(X[J])}catch(W){throw new Error(`arg --${J}: ${W.message}`)}};var e1=async(Z)=>{const X=Z.argv||process.argv,J=!process.env.NO_COLOR,W={prefix:"",color:J,...Z.usage};try{let Y,B,V=Z.start??2;if(Z.single){if(Y=Object.keys(Z.commands)[0],!Y)$("no command provided");B=Z.commands[Y]}else{if(Y=X[V],B=Z.commands[Y],W.prefix+=u8(Z.commands),!B)s1(Z,W);V++}let Q;try{Q=c1({...Z.opts,...B.opts},X,{showUsage:!0,usageOpts:W,start:V})}catch(q){}if(!Q)process.exit(1);if(B.inputs!==void 0&&B.inputs!==Q.rest.length)process.stderr.write(`expected ${B.inputs||0} input(s)
|
|
5
|
+
`),s1(Z,W);const U=await Z.ctx({logger:new b0(process.stderr,Z.name,"INFO"),format:J?h0:d1,opts:Q.result,inputs:Q.rest},B);if(await B.fn(U),Z.post)await Z.post(U,B)}catch(Y){process.stderr.write(Y.message+"\n\n"),process.exit(1)}},s1=(Z,X)=>{process.stderr.write(N0(Z.opts,X)),process.exit(1)},u8=(Z)=>["\nAvailable commands:\n",...Object.keys(Z).map((X)=>`${v0(16)(X)}: ${Z[X].desc}`),"\n"].join("\n");import{existsSync as g8,mkdirSync as x8,statSync as q9} from"fs";import{dirname as d8} from"path";var n8=(Z)=>Z.length>0&&!g8(Z)?(x8(Z,{recursive:!0}),!0):!1,Z4=(Z)=>n8(d8(Z));var h=(Z)=>typeof Z==="function";var w=(Z)=>typeof Z==="string";import{readFileSync as p8} from"fs";import{writeFileSync as l8} from"fs";var X4=(Z,X,J,W,Y=!1)=>{if(W&&W.info(`${Y?"[dryrun] ":""}writing file: ${Z}`),Y)return;Z4(Z),l8(Z,X,!J&&w(X)?"utf-8":J)};var D=(Z,X,J="utf-8")=>{return X&&X.debug("reading file:",Z),p8(Z,J)},K1=(Z,X,J,W=!1)=>X4(Z,N(X)?X.join("\n"):X,"utf-8",J,W);var f=(Z,X)=>JSON.parse(D(Z,X));var u=Symbol(),H1=()=>{};var D0=Object.freeze({level:P.NONE,addChild(Z){return Z},childLogger:()=>D0,enabled:()=>!1,fine(){},debug(){},info(){},warn(){},severe(){},logEntry(){}});class $1 extends P0{set(Z){this.parent=Z}childLogger(Z,X){return new $1(Z,X??this.level,this)}logEntry(Z){this.parent.logEntry(Z)}}var J4=new $1("root",P.FINE,D0);import{join as _5} from"path";var M1=(Z,X)=>{if(Z===X)return 0;if(Z==null)return X==null?0:-1;if(X==null)return Z==null?0:1;if(typeof Z.compare==="function")return Z.compare(X);if(typeof X.compare==="function")return-X.compare(Z);return Z<X?-1:Z>X?1:0};var o8=S(()=>"Assertion failed"),u0=(typeof process!=="undefined"&&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)?(Z,X)=>{if(typeof Z==="function"&&!Z()||!Z)throw new o8(typeof X==="function"?X():X)}:()=>{};var g0=(Z)=>Z!=null&&typeof Z!=="function"&&Z.length!==void 0;var W4=(Z)=>{return(Z==null||!Z[Symbol.iterator])&&$(`value is not iterable: ${Z}`),Z};var Y4=(Z)=>g0(Z)?Z:[...W4(Z)];var G0=(Z)=>Z[Z.length-1];var i8=S(()=>"illegal arity"),W0=(Z)=>{throw new i8(Z)};var a8=S(()=>"illegal state"),Y0=(Z)=>{throw new a8(Z)};var x0=(Z,X)=>Z!=null&&typeof Z[X]==="function";var O=(Z)=>Z!=null&&typeof Z[Symbol.iterator]==="function";var d0=(Z)=>Z!=null&&typeof Z!=="string"&&typeof Z[Symbol.iterator]==="function";var B4=["-moz-","-ms-","-o-","-webkit-"],B0={rules:"",ruleSep:",",valSep:"",decls:"",declStart:"{",declEnd:"}",indent:"",comments:!1},n0={rules:"\n",ruleSep:", ",valSep:" ",decls:"\n",declStart:" {\n",declEnd:"}\n",indent:" ",comments:!0};var C1=function(...Z){let[X,J,W,Y,B,V,Q,U,q,z]=Z;switch(Z.length){case 0:W0(0);case 1:return X;case 2:return(...K)=>X(J(...K));case 3:return(...K)=>X(J(W(...K)));case 4:return(...K)=>X(J(W(Y(...K))));case 5:return(...K)=>X(J(W(Y(B(...K)))));case 6:return(...K)=>X(J(W(Y(B(V(...K))))));case 7:return(...K)=>X(J(W(Y(B(V(Q(...K)))))));case 8:return(...K)=>X(J(W(Y(B(V(Q(U(...K))))))));case 9:return(...K)=>X(J(W(Y(B(V(Q(U(q(...K)))))))));case 10:default:const H=(...K)=>X(J(W(Y(B(V(Q(U(q(z(...K))))))))));return Z.length===10?H:C1(H,...Z.slice(10))}};var i=(Z)=>x0(Z,"xform")?Z.xform():Z;var v=function(...Z){return Z=Z.map(i),C1.apply(null,Z)};var g=(Z,X)=>[Z[0],Z[1],X];class j0{value;constructor(Z){this.value=Z}deref(){return this.value}}var G=(Z)=>Z instanceof j0,Q4=(Z)=>Z instanceof j0?Z:new j0(Z),y=(Z)=>Z instanceof j0?Z.deref():Z;var Q0=function(...Z){const X=Z[0],J=X[0],W=X[1],Y=X[2];Z=t8(Z);const B=Z[0]==null?J():Z[0],V=Z[1];return y(W(x0(V,"$reduce")?V.$reduce(Y,B):g0(V)?r8(Y,B,V):c8(Y,B,V)))};var t8=(Z)=>Z.length===2?[void 0,Z[1]]:Z.length===3?[Z[1],Z[2]]:W0(Z.length),r8=(Z,X,J)=>{for(let W=0,Y=J.length;W<Y;W++)if(X=Z(X,J[W]),G(X)){X=X.deref();break}return X},c8=(Z,X,J)=>{for(let W of J)if(X=Z(X,W),G(X)){X=X.deref();break}return X},V0=(Z,X)=>[Z,w0,X],V4=(Z,X)=>{const J=X.length-1;return O(X[J])?X.length>1?Q0(Z.apply(null,X.slice(0,J)),X[J]):Q0(Z(),X[0]):void 0};var U0=function(Z){return Z?[...Z]:V0(()=>[],(X,J)=>(X.push(J),X))};function*q0(Z,X){const J=i(Z)(U0()),W=J[1],Y=J[2];for(let B of X){const V=Y([],B);if(G(V)){yield*y(W(V.deref()));return}if(V.length)yield*V}yield*y(W([]))}function*a(Z,X){const J=i(Z)([H1,H1,(W,Y)=>Y])[2];for(let W of X){let Y=J(u,W);if(G(Y)){if(Y=y(Y.deref()),Y!==u)yield Y;return}if(Y!==u)yield Y}}var l0=(Z,X,J=a)=>{const W=X.length-1;return O(X[W])?X.length>1?J(Z.apply(null,X.slice(0,W)),X[W]):J(Z(),X[0]):void 0};var F1=function(Z,X){return O(X)?q0(F1(Z),w(X)?[X]:X):(J)=>{const W=J[2],Y=(B,V)=>{const Q=Z(V);if(Q){for(let U of Q)if(B=Y(B,U),G(B))break;return B}return W(B,V)};return g(J,Y)}};var U4=function(Z){return F1((X)=>d0(X)?X:void 0,Z)};var F=function(Z,X){return O(X)?a(F(Z),X):(J)=>{const W=J[2];return g(J,(Y,B)=>W(Y,Z(B)))}};function*p0(...Z){const X=Z.length-1;if(X<0)return;const J=new Array(X+1).fill(0),W=Z.map(Y4),Y=W.reduce((B,V)=>B*V.length,1);for(let B=0;B<Y;B++){const V=[];for(let Q=X;Q>=0;Q--){const U=W[Q];let q=J[Q];if(q===U.length)J[Q]=q=0,Q>0&&J[Q-1]++;V[Q]=U[q]}J[X]++,yield V}}function*q4(Z,X=Infinity){while(X-- >0)yield Z}var w1=function(Z,X){Z=Z||"";let J=!0;return X?[...X].join(Z):V0(()=>"",(W,Y)=>(W=J?W+Y:W+Z+Y,J=!1,W))};var o0=function(...Z){return s8(o0,Q0,Z)};var s8=(Z,X,J)=>{let W,Y;switch(J.length){case 4:Y=J[3],W=J[2];break;case 3:Y=J[2];break;case 2:return F((B)=>Z(J[0],J[1],B));default:W0(J.length)}return X(i(J[0])(J[1]),W,Y)};var e8=new Set,Z5=":[",z4=v(U4(),F((Z)=>Z[0]==="&"?Z.substring(1):Z5.includes(Z[0])?Z:" "+Z)),X5=(Z,X)=>v(Z,F((J)=>w(J)&&J.startsWith(" .")?J+X:J)),z0=(Z,X,J,W)=>{const Y=J.length,B=[];let V,Q;const U=(q,z)=>{let H=null;if(N(z))z0(Z,P1(X,B),z,W);else if(O(z)&&!w(z))z0(Z,P1(X,B),[...z],W);else if((Q=h(z))||(H=W.fns[z]))if(!X.length){if(H)return H.apply(null,J.slice(q+1))(Z,W),!0;z(Z,W)}else if(Q)U(q,z());else $(`quoted fn ('${z}') only allowed at head position`);else if(b(z))V=Object.assign(V||{},z);else if(z!=null)B.push(z)};for(let q=0;q<Y;q++)if(U(q,J[q]))return Z;return V&&Z.push(J5(X,B,V,W)),Z},P1=(Z,X)=>Z.length?[...p0(Z,X)]:X,J5=(Z,X,J,W)=>{const Y=W.format,B=_(W),V=W.scope?X5(z4,W.scope):z4;return[B,o0(F((Q)=>o0(V,w1(),N(Q)?Q:[Q]).trim()),w1(Y.ruleSep),P1(Z,X)),Y.declStart,k0(J,W),B,Y.declEnd].join("")},k0=(Z,X)=>{const J=X.format,W=X.autoprefix||e8,Y=_(X,X.depth+1),B=[];for(let V in Z)if(Z.hasOwnProperty(V)){let Q=Z[V];if(h(Q))Q=Q(Z);if(N(Q))Q=Q.map((U)=>N(U)?U.join(" "):U).join(J.ruleSep);if(W.has(V))for(let U of X.vendors)B.push(`${Y}${U}${V}:${J.valSep}${Q};`);B.push(`${Y}${V}:${J.valSep}${Q};`)}return B.join(J.decls)+J.decls},_=(Z,X=Z.depth)=>X>1?[...q4(Z.format.indent,X)].join(""):X>0?Z.format.indent:"";var K4=function(Z,...X){const J=X.length===1?X[0]:X.reduce((W,Y,B)=>{return W[B/(X.length-1)*100|0]=Y,W},{});return(W,Y)=>{const B=_(Y);Y.depth++;const V=_(Y);W.push(`${B}@keyframes ${Z}${Y.format.declStart}`);for(let Q in J)if(J.hasOwnProperty(Q))W.push([V,Q+"%",Y.format.declStart,k0(J[Q],Y),V,Y.format.declEnd].join(""));return Y.depth--,W.push(B+Y.format.declEnd),W}};var H4=(Z,X=!1)=>(J,W)=>{const Y=_(W),B=_(W,W.depth+1);if(W.format.comments||X)J.push(Y+"/*",Z.split("\n").map((V)=>B+V).join("\n"),Y+"*/");return J};var i0=(Z,X,J)=>(W,Y)=>{const B=_(Y);return W.push(`${B}${Z} ${W5(X)}${Y.format.declStart}`),Y.depth++,z0(W,[],J,Y),Y.depth--,W.push(B+Y.format.declEnd),W},W5=(Z)=>{if(w(Z))return Z;const X=[];for(let J in Z)if(Z.hasOwnProperty(J)){let W=Z[J];if(W===!0)W=$4.has(J)?J:`(${J})`;else if(W===!1)W=`(not ${$4.has(J)?J:`(${J})`})`;else if(W==="only")W+=" "+J;else W=`(${J}:${W})`;X.push(W)}return X.join(" and ")},$4=new Set(["all","print","screen"]);var t=(Z,X)=>{return X={format:B0,vendors:B4,fns:{},depth:0,...X},N(X.autoprefix)&&(X.autoprefix=new Set(X.autoprefix)),b(Z)?k0(Z,X):h(Z)?Z([],X).join(X.format.rules):z0([],[],N(Z)?Z:d0(Z)?[...Z]:$("invalid rules"),X).join(X.format.rules)};var M4=(Z,...X)=>(J,W)=>(J.push(X.length?`@import url(${Z}) ${X.join(W.format.ruleSep)};`:`@import url(${Z});`),J);var K0=(Z,X)=>i0("@media",Z,X);var C4=function(...Z){return(X,J)=>(X.push(Z.length>1?`@namespace ${Z[0]} url(${Z[1]});`:`@namespace url(${Z[0]});`),X)};var F4=(Z,X)=>i0("@supports",Z,X);var a0={"@comment":H4,"@import":M4,"@keyframes":K4,"@media":K0,"@namespace":C4,"@supports":F4};var w4=4,P4=(Z)=>w4=Z,I=(Z)=>Z===(Z|0)?String(Z):Z.toFixed(w4).replace(/^0./,".").replace(/^-0./,"-.").replace(/0+$/,"");var N4=(Z)=>`${I(Z)}em`,O4=(Z)=>`${I(Z)}ex`;var D4=(Z)=>`${I(Z)}rem`,N1=(Z)=>`${I(Z)}%`,G4=(Z)=>`${I(Z)}px`,j4=(Z)=>`${I(Z)}vh`,k4=(Z)=>`${I(Z)}vw`,T4=(Z)=>`${I(Z)}vmin`,I4=(Z)=>`${I(Z)}vmax`,E4=(Z)=>`${Z|0}ms`,R4=(Z)=>`${I(Z)}s`;var L4=(Z)=>`${I(Z)}deg`,S4=(Z)=>`${I(Z)}rad`,A4=(Z)=>`${I(Z)}turn`,b4=(Z)=>`url(${Z})`;var j=((Z)=>{return Z[Z.IDLE=0]="IDLE",Z[Z.ACTIVE=1]="ACTIVE",Z[Z.DONE=2]="DONE",Z[Z.UNSUBSCRIBED=3]="UNSUBSCRIBED",Z[Z.ERROR=4]="ERROR",Z})(j||{}),L=((Z)=>{return Z[Z.NEVER=0]="NEVER",Z[Z.FIRST=1]="FIRST",Z[Z.LAST=2]="LAST",Z})(L||{});var Y5=0,B5=()=>Y5++,r=(Z,X)=>!X||!X.id?{...X,id:Z+"-"+B5()}:X;var k=J4.childLogger("rstream");class x{constructor(Z,X){this.wrapped=Z,X=r("sub",{closeIn:L.LAST,closeOut:L.LAST,cache:!0,...X}),this.parent=X.parent,this.id=X.id,this.closeIn=X.closeIn,this.closeOut=X.closeOut,this.cacheLast=X.cache,X.xform&&(this.xform=X.xform(U0()))}id;closeIn;closeOut;parent;__owner;xform;cacheLast;last=u;state=j.IDLE;subs=[];deref(){return this.last!==u?this.last:void 0}getState(){return this.state}setState(Z){this.state=Z}subscribe(Z,X={}){this.ensureState();let J;if(Z instanceof x&&!X.xform)Z.ensureState(),u0(!Z.parent,`sub '${Z.id}' already has a parent`),Z.parent=this,J=Z;else J=new x(Z,{...X,parent:this});return this.subs.push(J),this.setState(j.ACTIVE),J.setState(j.ACTIVE),this.last!=u&&J.next(this.last),J}transform(...Z){let X,J;if(b(G0(Z)))J=Z.pop(),X={error:J.error};return this.subscribe(X,r("xform",Z.length>0?{...J,xform:v(...Z)}:J))}map(Z,X){return this.transform(F(Z),X||{})}unsubscribe(Z){return Z?this.unsubscribeChild(Z):this.unsubscribeSelf()}unsubscribeSelf(){return k.debug(this.id,"unsub self"),this.parent&&this.parent.unsubscribe(this),this.state<j.UNSUBSCRIBED&&(this.state=j.UNSUBSCRIBED),this.release(),!0}unsubscribeChild(Z){k.debug(this.id,"unsub child",Z.id);const X=this.subs.indexOf(Z);if(X>=0){if(this.subs.splice(X,1),this.closeOut===L.FIRST||!this.subs.length&&this.closeOut!==L.NEVER)this.unsubscribe();return!0}return!1}next(Z){if(this.state>=j.DONE)return;this.xform?this.dispatchXform(Z):this.dispatch(Z)}done(){if(k.debug(this.id,"entering done()"),this.state>=j.DONE)return;if(this.xform){if(!this.dispatchXformDone())return}if(this.state=j.DONE,this.dispatchTo("done"))this.state<j.UNSUBSCRIBED&&this.unsubscribe();k.debug(this.id,"exiting done()")}error(Z){const X=this.wrapped,J=X&&X.error;return J&&k.debug(this.id,"attempting wrapped error handler"),J&&X.error(Z)||this.unhandledError(Z)}unhandledError(Z){return(k.parent!==D0?k:console).warn(this.id,"unhandled error:",Z),this.unsubscribe(),this.state=j.ERROR,!1}dispatchTo(Z,X){let J=this.wrapped;if(J)try{J[Z]&&J[Z](X)}catch(Y){if(!this.error(Y))return!1}const W=Z==="next"?this.subs:[...this.subs];for(let Y=W.length;Y-- >0;){J=W[Y];try{J[Z]&&J[Z](X)}catch(B){if(Z==="error"||!J.error||!J.error(B))return this.unhandledError(B)}}return!0}dispatch(Z){k.debug(this.id,"dispatch",Z),this.cacheLast&&(this.last=Z),this.dispatchTo("next",Z)}dispatchXform(Z){let X;try{X=this.xform[2]([],Z)}catch(J){this.error(J);return}if(this.dispatchXformVals(X))G(X)&&this.done()}dispatchXformDone(){let Z;try{Z=this.xform[1]([])}catch(X){return this.error(X)}return this.dispatchXformVals(Z)}dispatchXformVals(Z){const X=y(Z);for(let J=0,W=X.length;J<W&&this.state<j.DONE;J++)this.dispatch(X[J]);return this.state<j.ERROR}ensureState(){if(this.state>=j.DONE)Y0(`operation not allowed in state ${this.state}`)}release(){this.subs.length=0,delete this.parent,delete this.xform,delete this.last}}var v4=(Z,X)=>{const J=new y4(X);return J.next(Z),J};class y4 extends x{src;_cancel;_inited;constructor(Z,X){const[J,W]=h(Z)?[Z,X||{}]:[void 0,Z||{}];super(W.error?{error:W.error}:void 0,r("stream",W));this.src=J,this._inited=!1}subscribe(Z,X={}){const J=super.subscribe(Z,X);if(!this._inited){if(this.src)try{this._cancel=this.src(this)||(()=>{return})}catch(W){let Y=this.wrapped;if(!Y||!Y.error||!Y.error(W))this.unhandledError(W)}this._inited=!0}return J}unsubscribe(Z){const X=super.unsubscribe(Z);if(X&&(!Z||(!this.subs||!this.subs.length)&&this.closeOut!==L.NEVER))this.cancel();return X}done(){this.cancel(),super.done(),delete this.src,delete this._cancel}error(Z){if(super.error(Z))return!0;return this.cancel(),!1}cancel(){if(this._cancel){k.debug(this.id,"cancel");const Z=this._cancel;delete this._cancel,Z()}}}var _4=(Z,X)=>Z===L.FIRST||Z===L.LAST&&!X;var O1=function(Z){return Z?Q0(O1(),Z):V0(()=>({}),(X,[J,W])=>(X[J]=W,X))};var h4=()=>(Z)=>{const X=Z[2];return g(Z,(J,W)=>{if(W){for(let Y of y(W))if(J=X(J,Y),G(J))break}return G(W)?Q4(J):J})};var D1=function(Z,X){return O(X)?q0(D1(Z),X):v(F(Z),h4())};var G1=function(Z,X){return O(X)?a(G1(Z),X):F(h(Z)?(J)=>[Z(J),J]:(J)=>[Z,J])};var j1=function(...Z){const X=l0(j1,Z);if(X)return X;const J=Z[0],W=Z[1]!==!1;return F((Y)=>{const B=W?{}:Y;for(let V in Y)B[V]=J(Y[V]);return B})};var f4=(Z)=>Z;var k1=function(...Z){const X=l0(k1,Z,q0);if(X)return X;const{key:J=f4,mergeOnly:W=!1,reset:Y=!0,all:B=!0,backPressure:V=0}=Z[1],Q=N(Z[0])?new Set(Z[0]):Z[0],U=new Set,q=new Map;let z={};const H=([K,M,E])=>{let p=!0;if(W||V<1)return[K,(C)=>{if(Y&&B&&U.size>0||!Y&&p)C=E(C,z),z={},U.clear(),p=!1;return M(C)},(C,o)=>{const T=J(o);if(Q.has(T)){if(z[T]=o,U.add(T),W||m4(Q,U))if(C=E(C,z),p=!1,Y)z={},U.clear();else z={...z}}return C}];else return[K,(C)=>{if(B&&U.size>0)C=E(C,u4(q,U)),q.clear(),U.clear();return M(C)},(C,o)=>{const T=J(o);if(Q.has(T)){let m=q.get(T);!m&&q.set(T,m=[]),m.length>=V&&Y0(`max back pressure (${V}) exceeded for input: ${String(T)}`),m.push(o),U.add(T);while(m4(Q,U))if(C=E(C,u4(q,U)),p=!1,G(C))break}return C}]};return H.keys=()=>Q,H.clear=()=>{q.clear(),Q.clear(),U.clear(),z={}},H.add=(K)=>{Q.add(K)},H.delete=(K,M=!0)=>{if(q.delete(K),Q.delete(K),M)U.delete(K),delete z[K]},H},m4=(Z,X)=>{if(X.size<Z.size)return!1;for(let J of Z)if(!X.has(J))return!1;return!0},u4=(Z,X)=>{const J={};for(let W of X){const Y=Z.get(W);J[W]=Y.shift(),!Y.length&&X.delete(W)}return J};var g4=(Z,X)=>{let J=!0;for(let W of X)J=Z.removeID(W)&&J;return J};var t0=(Z)=>new x4(Z);class x4 extends x{sources;idSources;realSourceIDs;invRealSourceIDs;psync;clean;constructor(Z){const X=k1(new Set,{key:(W)=>W[0],mergeOnly:Z.mergeOnly===!0,reset:Z.reset===!0,all:Z.all!==!1,backPressure:Z.backPressure||0}),J=j1((W)=>W[1]);super(void 0,r("streamsync",{...Z,xform:Z.xform?v(X,J,Z.xform):v(X,J)}));this.sources=new Map,this.realSourceIDs=new Map,this.invRealSourceIDs=new Map,this.idSources=new Map,this.psync=X,this.clean=!!Z.clean,Z.src&&this.addAll(Z.src)}add(Z,X){X||(X=Z.id),this.ensureState(),this.psync.add(X),this.realSourceIDs.set(X,Z.id),this.invRealSourceIDs.set(Z.id,X),this.idSources.set(Z.id,Z),this.sources.set(Z,Z.subscribe({next:(J)=>J[1]instanceof x?this.add(J[1]):this.next(J),done:()=>this.markDone(Z),__owner:this},{xform:G1(X),id:`in-${X}`}))}addAll(Z){for(let X in Z)this.psync.add(X);for(let X in Z)this.add(Z[X],X)}remove(Z){const X=this.sources.get(Z);if(X){const J=this.invRealSourceIDs.get(Z.id);return k.info(`removing src: ${Z.id} (${J})`),this.psync.delete(J,this.clean),this.realSourceIDs.delete(J),this.invRealSourceIDs.delete(Z.id),this.idSources.delete(Z.id),this.sources.delete(Z),X.unsubscribe(),!0}return!1}removeID(Z){const X=this.getSourceForID(Z);return X?this.remove(X):!1}removeAll(Z){for(let J of Z)this.psync.delete(this.invRealSourceIDs.get(J.id));let X=!0;for(let J of Z)X=this.remove(J)&&X;return X}removeAllIDs(Z){return g4(this,Z)}getSourceForID(Z){return this.idSources.get(this.realSourceIDs.get(Z))}getSources(){const Z={};for(let[X,J]of this.idSources)Z[this.invRealSourceIDs.get(X)]=J;return Z}unsubscribe(Z){if(!Z){k.debug(this.id,"unsub sources");for(let X of this.sources.values())X.unsubscribe();this.sources.clear(),this.psync.clear(),this.realSourceIDs.clear(),this.invRealSourceIDs.clear(),this.idSources.clear()}return super.unsubscribe(Z)}markDone(Z){this.remove(Z),_4(this.closeIn,this.sources.size)&&this.done()}}var T1=Z0((Z,X=" ")=>{const J=X0(String(X),Z);return(W,Y)=>{if(W==null)return J;return W=W.toString(),Y=Y!==void 0?Y:W.length,Y<Z?J.substring(Y)+W:W}}),nJ=T1(2,"0"),lJ=T1(3,"0"),d4=T1(4,"0");var Q5=/\{(\d+)\}/g;var I1=(Z,...X)=>X.length>0?Z.replace(Q5,(J,W)=>String(X[parseInt(W,10)])):Z;var n4=(Z)=>({key:(X)=>X,group:U0(),...Z});var E1=function(...Z){const X=V4(E1,Z);if(X)return X;const J=n4(Z[0]),[W,Y,B]=J.group;return[()=>({}),(V)=>{for(let Q in V)V[Q]=Y(V[Q]);return V},(V,Q)=>{const U=J.key(Q);return V[U]=V[U]?B(V[U],Q):B(W(),Q),V}]};var R1=function(Z,X){return O(X)?a(R1(Z),X):(J)=>{const W=J[2];return g(J,(Y,B)=>Z(B)?W(Y,B):Y)}};import{watch as a4} from"fs";import{resolve as c} from"path";var l4={specs:A({alias:"s",optional:!1,desc:"Path to generated JSON defs"})},r0={bundle:R({alias:"b",desc:"Bundle inputs (see `out` option)"})},H0={include:S0({alias:"I",desc:"Include CSS files (prepend)"})},c0={eval:A({alias:"e",desc:"eval meta stylesheet in given string (ignores other inputs & includes)"})},s0={force:S0({alias:"f",hint:"STR",desc:"CSS classes to force include (wildcards are supported, @-prefix will read from file)",delim:","})},p4={media:S0({alias:"m",hint:"ID",desc:"Media query IDs (use 'ALL' for all)",delim:","})},o4={onlyDecls:R({desc:"Only emit framework decls"})},d={out:A({alias:"o",desc:"Output file (or stdout)"})},e0={prec:A0({default:3,desc:"Number of fractional digits"})},n={pretty:R({alias:"p",desc:"Pretty print output"})},$0={noDecls:R({alias:"d",desc:"Don't emit framework decls"})},M0={noHeader:R({desc:"Don't emit generated header comment"})},C0={scope:A({desc:"Suffix for CSS class names"})},F0={watch:R({alias:"w",desc:"Watch input files for changes"})};import{watch as V5} from"fs";import{resolve as i4} from"path";var l=(Z,X,J)=>{X=w(X)?X:X.join("\n"),Z?K1(i4(Z),X,J):process.stdout.write(X+"\n")},Z1=({info:{name:Z,version:X}})=>`/*! ${Z} v${X} - generated by thi.ng/meta-css @ ${(new Date()).toISOString()} */`,T0=(Z,X)=>{const J=()=>{X.info("closing watchers..."),W.forEach((Y)=>Y.watcher.close())},W=Z.map((Y,B)=>{Y=i4(Y);const V=v4(D(Y,X),{id:`in${d4(B)}`});return{input:V,watcher:V5(Y,{},(Q)=>{if(Q==="change")try{V.next(D(Y,X))}catch(U){X.warn(U.message),J()}else X.warn("input removed:",Y),J()})}});return process.on("SIGINT",J),t0({src:O1(F(({input:Y})=>[Y.id,Y],W))})},X1=(Z)=>Object.keys(Z).reduce((X,J)=>{if(!J.startsWith("__"))X[J]=Z[J];return X},{});async function S1(Z){const X=f(c(Z.opts.specs),Z.logger),J=H5(X,Z.opts.force||[],Z.logger);if(Z.opts.bundle)if(Z.opts.watch)await q5(Z,J);else I0(Z,X,J,Z.opts.eval?[Z.opts.eval]:Z.inputs.map((W)=>D(c(W),Z.logger)),Z.opts.out);else if(Z.opts.watch)await U5(Z,X,J);else if(Z.opts.eval)try{I0(Z,X,J,[Z.opts.eval])}catch(W){Z.logger.warn(W.message)}else for(let W of Z.inputs)try{W=c(W);const Y=!Z.opts.noWrite?W.replace(/\.mcss$/,".css"):void 0;I0(Z,X,J,[D(W,Z.logger)],Y)}catch(Y){Z.logger.warn(Y.message)}}function*M5(Z){let X=-1,J=Z.length,W=0;for(let Y=0;Y<J;Y++){const B=Z[Y];if(B===" "||B==="\t"){if(!W&&X>=0)yield Z.substring(X,Y),X=-1}else if(B==="{"||B==="}"){if(X>=0)yield Z.substring(X,Y);yield B,X=-1}else if(B==="(")W++;else if(B===")"){if(--W<0)$(`invalid nesting in line: '${Z}'`)}else if(X<0)X=Y}if(W)$("template calls must be fully on a single line");if(X>=0)yield Z.substring(X,J)}var r4={desc:"Transpile (and optionally bundle) meta stylesheets to CSS",opts:{...r0,...c0,...s0,...H0,...$0,...M0,...d,...n,...C0,...l4,...F0,noWrite:R({desc:"Don't write files, use stdout only"})},fn:S1},U5=async(Z,X,J)=>{const W=c(Z.opts.specs);let Y,B={process:()=>{try{return X=f(W,Z.logger),Y.forEach((Q)=>Q.process()),!0}catch(Q){return Z.logger.warn(Q.message+": "+W),!1}},watcher:a4(W,{},(Q)=>{if(Q==="change")B.process();else Z.logger.warn("specs file removed:",W),V()})};const V=()=>{Z.logger.info("closing watchers..."),B.watcher.close(),Y.forEach((Q)=>Q.watcher.close())};Y=Z.inputs.map((Q)=>{Q=c(Q);const U=!Z.opts.noWrite?Q.replace(/\.mcss$/,".css"):void 0,q=()=>{try{return I0(Z,X,J,[D(Q,Z.logger)],U),!0}catch(z){if(Z.logger.warn(z.message+": "+Q),Y)V();return!1}};if(!q())process.exit(1);return{process:q,watcher:a4(Q,{},(z)=>{if(z==="change")q();else Z.logger.warn("input removed:",Q),V()})}}),Z.logger.info("waiting for changes, press ctrl+c to cancel..."),process.on("SIGINT",V)},q5=async(Z,X)=>{t0({src:{styles:T0(Z.inputs,Z.logger),specs:T0([Z.opts.specs],Z.logger).map((J)=>JSON.parse(Object.values(J)[0]))}}).subscribe({next({styles:J,specs:W}){try{I0(Z,W,X,Object.keys(J).sort().map((Y)=>J[Y]),Z.opts.out)}catch(Y){Z.logger.warn(Y.message)}}})},I0=({logger:Z,opts:{include:X,noDecls:J,noHeader:W,pretty:Y,scope:B}},V,Q,U,q)=>{const z={logger:Z,specs:V,css:{format:Y?n0:B0,fns:a0,scope:B},mediaQueryIDs:new Set(Object.keys(V.media)),mediaQueryRules:{...Q.mediaQueryRules},plainRules:{...Q.plainRules}},H=X?X.map((K)=>D(c(K),Z).trim()):[];if(!W)H.push(Z1(V));if(!J&&V.decls.length)H.push(t(V.decls,z.css));U.forEach((K)=>$5(K,z)),K5(H,z),z5(H,z),l(q,H,Z)},z5=(Z,{css:X,logger:J,mediaQueryRules:W,specs:Y})=>{for(let B in W){const V=s4(W[B],Y);J.debug("mediaquery rules",B,V),Z.push(t(K0(w5(Y.media,B),V),X))}},K5=(Z,{css:X,logger:J,plainRules:W,specs:Y})=>{const B=s4(W,Y);J.debug("plain rules",B),Z.push(t(B,X))},H5=(Z,X,J)=>{const W=new Set(Object.keys(Z.media)),Y=new Set(Object.keys(Z.classes)),B={},V={};if(X.length&&X[0][0]==="@")X=[...J0(D(c(X[0].substring(1)),J))];for(let Q of X){if(!Q||Q.startsWith("//"))continue;const{token:U,query:q}=e4(Q,W);let z;if(U.includes("*")){const H=new RegExp(`^${U.replace("*",".*")}\$`);z=[...R1((K)=>H.test(K),Y)]}else if(Y.has(U))z=[U];else{J.warn(`unknown include rule ID: ${Q}, skipping...`);continue}for(let H of z)J.debug("including class:",H),q?Z8(B,q,`.${H}`,H):X8(V,`.${H}`,H)}return{mediaQueryRules:B,plainRules:V}},$5=(Z,{specs:X,mediaQueryIDs:J,mediaQueryRules:W,plainRules:Y})=>{const B=E0(),V=E0(B),Q={root:B,curr:V,scopes:[V]};for(let U of J0(Z)){if(!U||/^\s*\/\//.test(U))continue;for(let q of M5(U)){if(!q)continue;let z=Q.curr;switch(z.state){case"sel":case"nest":if(q==="{"){if(z.state==="sel")z.sel=z.sel.map((H)=>H.replace(",","")),z.path=C5(Q.scopes);z.state="class"}else if(q==="}")t4(Q);else{const H=G0(z.sel);if(!H||H.endsWith(","))z.sel.push(q);else z.sel[z.sel.length-1]+=" "+q}break;case"class":if(q==="{")z.state="nest",Q.scopes.push(Q.curr=E0(z));else if(q==="}")t4(Q);else{let{token:H,query:K}=e4(q,J);if(!X.classes[H]&&!(J8(H)||W8(H)))$(`unknown class ID: ${H}`);if(K)Z8(W,K,z.path,H);else X8(Y,z.path,H)}break;default:Y0(z.state)}}}},L1=":",c4="///",E0=(Z)=>({state:"sel",sel:Z?[]:["<root>"],path:"",parent:Z}),t4=(Z)=>{const X=!Z.curr.sel.length;if(u0(!!Z.curr.parent,"stack underflow"),Z.scopes.pop(),Z.scopes.length>0){if(Z.curr=G0(Z.scopes),!X&&Z.curr.state==="nest")Z.scopes.push(Z.curr=E0(Z.curr))}else Z.scopes.push(Z.curr=E0(Z.root))},C5=(Z)=>Z.map((X)=>X.sel.join(",")).join(c4),s4=(Z,X)=>Object.entries(Z).map(([J,W])=>F5(J,W,X)),F5=(Z,X,J)=>{const W=[];let Y=W;const B=Z.split(c4);for(let V=0;V<B.length;V++){const Q=B[V].split(",");if(V==B.length-1){const U=Object.assign({},...F((q)=>W8(q)?N5(J,q):J8(q)?P5(q):X1(J.classes[q]),X));Q.push(U)}Y.push(Q),Y=Q}return W[0]},e4=(Z,X)=>{if(/^::?/.test(Z))return{token:Z};const J=Z.lastIndexOf(L1);if(J<0)return{token:Z};const W=Z.substring(0,J);if(!W.split(L1).every((B)=>X.has(B)))$(`invalid media query in token: ${Z}`);return{token:Z.substring(J+1),query:W}},w5=(Z,X)=>X.split(L1).reduce((J,W)=>Object.assign(J,Z[W]),{}),Z8=(Z,X,J,W)=>{if(!Z[X])Z[X]={};(Z[X][J]||(Z[X][J]=new Set)).add(W)},X8=(Z,X,J)=>(Z[X]||(Z[X]=new Set)).add(J),P5=(Z)=>{const X=Z.indexOf("=");return{[`--${Z.substring(0,X)}`]:Z.substring(X+1)}},N5=(Z,X)=>{const J=X.indexOf("("),W=X.substring(0,J),Y=X.substring(J+1,X.length-1).split(/(?<!\\),/g).map((V)=>V.trim().replace("\\,",",")),B=Z.templates[W];if(!B)$(`unknown template: ${W}`);if(Y.length!==B.__arity)$(`template "${W}" expected ${B.__arity} arguments`);return Object.entries(B).reduce((V,[Q,U])=>{if(!Q.startsWith("__")){if(Q=I1(Q,...Y),w(U))U=I1(U,...Y);V[Q]=U}return V},{})},J8=(Z)=>Z.includes("="),W8=(Z)=>Z.includes("(");async function A1(Z){if(Z.opts.watch)await G5(Z);else await V8(Z.inputs.map((X)=>D(X,Z.logger)),Z.opts,Z.logger)}var B8={deg:L4,em:N4,ex:O4,ms:E4,percent:N1,px:G4,rad:S4,rem:D4,second:R4,turn:A4,url:b4,vh:j4,vmax:I4,vmin:T4,vw:k4,"%":N1},O5={percent:"{0}%",second:"{0}s",url:"url({0})"},D5={"":[""],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:[""]},Q8={desc:"Generate framework rules from specs",opts:{...d,...e0,...n,...F0},fn:A1},G5=async(Z)=>{T0(Z.inputs,Z.logger).subscribe({next(X){try{V8(Object.keys(X).sort().map((J)=>X[J]),Z.opts,Z.logger)}catch(J){Z.logger.warn(J.message)}}})},V8=async(Z,X,J)=>{const W={info:{name:"TODO",version:"0.0.0"},media:{},classes:{},templates:{},decls:[]};P4(X.prec);for(let Y of Z){const B=JSON.parse(Y);if(Object.assign(W.info,B.info),Object.assign(W.media,B.media),B.decls)W.decls.push(...B.decls);if(B.specs)for(let V of B.specs)try{U8(B,V,W.classes,J)}catch(Q){J.warn(`error processing spec: ${V.name}`,Q,", skipping...")}if(B.templates)for(let V of B.templates)j5(B,V,W.templates,J)}return l(X.out,JSON.stringify(W,null,X.pretty?4:0),J),W},U8=(Z,X,J,W,Y=!1)=>{const B=N(X.vars)?X.vars:[""],V=w(X.props)?{[X.props]:"<v>"}:X.props,Q=k5(X,Z),U=new Set;for(let q of B){const z=Z.vars?.[q]||D5[q];if(!z)$(`unknown variation ID: ${q}`);for(let[H,K]of p0(z,Object.keys(Q))){const M=s(X.name,q,H,K,Q[K]),E=X.unit?s(X.unit,q,H,K,Q[K]):void 0,p=Y?I5(E):T5(Q[K],E);if(!J[M]){if(J[M]={},X.user!=null)J[M].__user=X.user;if(X.doc!=null)J[M].__doc=E5(X.doc,q,H,K,p)}else if(!U.has(M))$(`duplicate class ID: ${M}`);U.add(M);let C=-1;for(let[o,T]of Object.entries(V)){const m=s(o,q,H,K,Q[K]),J1=s(!E||w(T)?String(T):B8[E](T),q,H,K,p);if(J[M][m]=J1,W.debug(M,m,J1),Y)C=Y8(J1,Y8(m,C))}if(Y)J[M].__arity=C+1}}return J},j5=(Z,X,J,W)=>U8(Z,{...X,values:[""]},J,W,!0),Y8=(Z,X)=>{const J=/\{(\d+)\}/g;let W;while(W=J.exec(Z))X=Math.max(X,+W[1]);return X},k5=(Z,X)=>{const J=w(Z.values)?X.tables?.[Z.values]||$(`invalid table ID: ${Z.values}`):Z.values;if(b(J))return J;const W=Z.key==="v"?(Y)=>String(Y):Z.key==="i+1"?(Y,B)=>String(B+1):Z.key===void 0?(Y,B)=>String(B):$(`invalid key type: ${Z.key}`);return J.reduce((Y,B,V)=>{return Y[W(B,V)]=B,Y},{})},T5=(Z,X)=>{if(!X||w(Z))return Z;const J=B8[X];if(!J)$(`invalid unit: ${X}`);return J(Z)},I5=(Z)=>Z?O5[Z]||"{0}"+Z:"{0}",s=(Z,X,J,W,Y)=>Z.replace(/<vid>/g,X).replace(/<var>/g,J).replace(/<k>/g,W).replace(/<v>/g,String(Y)),E5=({group:Z,desc:X,args:J},W,Y,B,V)=>({group:Z?s(Z,W,Y,B,V):"TODO",desc:X?s(X,W,Y,B,V):void 0,args:J?J.map((Q)=>s(Q,W,Y,B,V)):void 0});var q8={desc:"Combination of the generate & convert commands",opts:{...r0,...c0,...s0,...H0,...$0,...M0,...e0,...n,...C0,...F0,outCss:A({desc:"Output file for CSS bundle",optional:!1}),outSpecs:A({desc:"Output file for framework",optional:!1})},fn:async(Z)=>{const{opts:X,inputs:J}=Z,[W,Y]=J.reduce((Q,U)=>(Q[U.endsWith(".json")?0:1].push(U),Q),[[],[]]),B={inputs:W,format:Z.format,logger:Z.logger,opts:{...X,out:X.outSpecs}},V={inputs:Y,format:Z.format,logger:Z.logger,opts:{...X,noWrite:!1,out:X.outCss,scope:X.scope,specs:X.outSpecs}};await A1(B),await S1(V)}};import{resolve as R5} from"path";var H8={desc:"Generate Markdown documentation for framework specs",opts:{...d,level:A0({alias:"l",desc:"Initial heading level",default:1}),title:A({alias:"t",desc:"Custom main title, set to NONE to disable"})},inputs:1,fn:async(Z)=>{const{logger:X,opts:J,inputs:W}=Z,Y=f(R5(W[0]),X),B=L5(Y,J);l(J.out,B,X)}},L5=(Z,{level:X,title:J})=>{const W=Object.keys(Z.classes).length,Y=Object.keys(Z.templates).length,B=[`Currently, there are ${W+Y} CSS utility classes (incl. ${Y} templates) defined in "${Z.info.name}" (v${Z.info.version}):`,"",`${e(X+1)} Classes by category`,"",...K8(Z.classes,A5,X+2),`${e(X+1)} Templates by category`,"",...K8(Z.templates,b5,X+2),`${e(X+1)} Media queries`,"",...Object.entries(Z.media).map(([V,Q])=>`- **${V}**: \`${JSON.stringify(Q)}\``),""];if(J!=="NONE")B.unshift(`${e(X)} ${J??Z.info.name}\n`);return B},z8=(Z)=>Z.split(/(\d+)/).map((X)=>{const J=parseInt(X);return isNaN(J)?X:J}),S5=(Z,X)=>{if(/\d+/.test(Z)&&/\d+/.test(X)){const J=z8(Z),W=z8(X),Y=J.length;if(Y===W.length){for(let B=0;B<Y;B++)if(J[B]!==W[B])return M1(J[B],W[B]);return 0}return J.length-W.length}return M1(Z,X)},K8=(Z,X,J)=>{const W=E1({key:([Y,{__doc:B}])=>B?.group||"TODO",group:[()=>[],(Y)=>Y.sort(),(Y,B)=>(Y.push(B[0]),Y)]},Object.entries(Z));return D1((Y)=>{const B=W[Y].sort(S5).map((Q)=>X(Q,Z[Q].__doc,J+1)),V=B.length;return[`${e(J)} ${f0(Y)}`,V>3?`\n<details><summary>${V} items:</summary>\n`:"",B.join("\n"),V>3?"</details>\n":""]},Object.keys(W).sort())},A5=(Z,X)=>{if(!(X&&X.desc))return`- \`${Z}\``;let J=X.desc;if(/^-[a-z]/.test(J))J=J.substring(1);return`- \`${Z}\` (${J})`},b5=(Z,X,J)=>{if(!(X&&X.args))return`${e(J)} ${Z}(...)\n\nTODO`;const W=X.args.map((Y)=>/^\w+/.exec(Y)[0]).join(", ");return[`${e(J)} \`${Z}(${W})\``,"",...X.args.map(v5),X.desc?`\n${X.desc}\n`:""].join("\n")},v5=(Z)=>`- ${Z.replace(/^(\w+)/,(X,J)=>`**${J}**`)}`,e=y0((Z)=>"#".repeat(Z));import{resolve as $8} from"path";var C8={desc:"Export entire generated framework as CSS",opts:{...H0,...$0,...o4,...d,...n,...M0,...p4,...C0},inputs:1,fn:async(Z)=>{const{logger:X,opts:{include:J,media:W,noDecls:Y,noHeader:B,onlyDecls:V,out:Q,pretty:U,scope:q},inputs:z}=Z,H={format:U?n0:B0,fns:a0,scope:q},K=f($8(z[0]),X),M=J?J.map((E)=>D($8(E),X).trim()):[];if(!B)M.push(Z1(K));if(!Y&&K.decls.length)M.push(t(K.decls,H));if(!V)M.push(y5(K,W,H,X));l(Q,M,X)}},y5=(Z,X,J,W)=>{const Y=M8("",Z);if(X){const B=X[0]==="ALL"?Object.keys(Z.media):X;for(let V of B)if(Z.media[V])Y.push(K0(Z.media[V],M8("-"+V,Z)));else W.warn(`invalid media query ID: ${V}, skipping...`)}return t(Y,J)},M8=(Z,X)=>Object.entries(X.classes).map(([J,W])=>[`.${J}${Z}`,X1(W)]);var b1=f(_5(import.meta.dir,"package.json"));e1({name:"metacss",opts:{verbose:R({alias:"v",desc:"Display extra process information"})},commands:{convert:r4,develop:q8,doc:H8,export:C8,generate:Q8},ctx:async(Z)=>{if(Z.opts.verbose)Z.logger.level=P.DEBUG;return{...Z,format:h0}},usage:{prefix:`
|
|
6
6
|
\u2588 \u2588 \u2588 \u2502
|
|
7
7
|
\u2588\u2588 \u2588 \u2502
|
|
8
8
|
\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2502 ${b1.name} ${b1.version}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/meta-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Data-driven CSS framework codegen, transpiler & bundler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@thi.ng/api": "^8.
|
|
45
|
-
"@thi.ng/args": "^2.3.
|
|
46
|
-
"@thi.ng/arrays": "^2.9.
|
|
47
|
-
"@thi.ng/checks": "^3.6.
|
|
48
|
-
"@thi.ng/compare": "^2.3.
|
|
49
|
-
"@thi.ng/errors": "^2.5.
|
|
50
|
-
"@thi.ng/file-io": "^2.0.
|
|
51
|
-
"@thi.ng/hiccup-css": "^2.7.
|
|
52
|
-
"@thi.ng/logger": "^3.0.
|
|
53
|
-
"@thi.ng/memoize": "^3.3.
|
|
54
|
-
"@thi.ng/rstream": "^8.
|
|
55
|
-
"@thi.ng/strings": "^3.7.
|
|
56
|
-
"@thi.ng/text-format": "^2.2.
|
|
57
|
-
"@thi.ng/transducers": "^9.0.
|
|
44
|
+
"@thi.ng/api": "^8.11.0",
|
|
45
|
+
"@thi.ng/args": "^2.3.31",
|
|
46
|
+
"@thi.ng/arrays": "^2.9.4",
|
|
47
|
+
"@thi.ng/checks": "^3.6.2",
|
|
48
|
+
"@thi.ng/compare": "^2.3.3",
|
|
49
|
+
"@thi.ng/errors": "^2.5.5",
|
|
50
|
+
"@thi.ng/file-io": "^2.0.3",
|
|
51
|
+
"@thi.ng/hiccup-css": "^2.7.6",
|
|
52
|
+
"@thi.ng/logger": "^3.0.10",
|
|
53
|
+
"@thi.ng/memoize": "^3.3.2",
|
|
54
|
+
"@thi.ng/rstream": "^8.4.1",
|
|
55
|
+
"@thi.ng/strings": "^3.7.31",
|
|
56
|
+
"@thi.ng/text-format": "^2.2.3",
|
|
57
|
+
"@thi.ng/transducers": "^9.0.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@microsoft/api-extractor": "^7.43.0",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"status": "alpha",
|
|
112
112
|
"year": 2023
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "8339d05ecc857e529c7325a9839c0063b89e728d\n"
|
|
115
115
|
}
|
|
@@ -58,14 +58,6 @@
|
|
|
58
58
|
},
|
|
59
59
|
"name": "bg-size",
|
|
60
60
|
"props": "background-size"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"doc": { "group": "background", "args": ["radius: incl. units"] },
|
|
64
|
-
"name": "bg-blur",
|
|
65
|
-
"props": {
|
|
66
|
-
"backdrop-filter": "blur({0})",
|
|
67
|
-
"-webkit-backdrop-filter": "blur({0})"
|
|
68
|
-
}
|
|
69
61
|
}
|
|
70
62
|
]
|
|
71
63
|
}
|
package/specs/display.mcss.json
CHANGED
|
@@ -24,5 +24,12 @@
|
|
|
24
24
|
"props": { "visibility": "<v> !important" },
|
|
25
25
|
"values": ["hidden", "visible", "collapse"]
|
|
26
26
|
}
|
|
27
|
+
],
|
|
28
|
+
"templates": [
|
|
29
|
+
{
|
|
30
|
+
"doc": { "group": "layout", "args": ["num: column count"] },
|
|
31
|
+
"name": "columns",
|
|
32
|
+
"props": "column-count"
|
|
33
|
+
}
|
|
27
34
|
]
|
|
28
35
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"templates": [
|
|
3
|
+
{
|
|
4
|
+
"doc": { "group": "fx", "args": ["radius: incl. units"] },
|
|
5
|
+
"name": "blur",
|
|
6
|
+
"props": {
|
|
7
|
+
"filter": "blur({0})"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"doc": { "group": "fx", "args": ["radius: incl. units"] },
|
|
12
|
+
"name": "bg-blur",
|
|
13
|
+
"props": {
|
|
14
|
+
"backdrop-filter": "blur({0})",
|
|
15
|
+
"-webkit-backdrop-filter": "blur({0})"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|