effcss 2.1.2 → 2.2.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/README.md +7 -14
- package/dist/build/define-provider.min.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/constants.d.ts +7 -45
- package/dist/types/src/index.d.ts +2 -18
- package/dist/types/src/types.d.ts +88 -48
- package/dist/types/src/utils/browser.d.ts +15 -7
- package/dist/types/src/utils/common.d.ts +12 -10
- package/dist/utils/browser.js +1 -1
- package/dist/utils/common.js +1 -1
- package/package.json +1 -1
- package/dist/types/vitest.config.d.ts +0 -2
package/README.md
CHANGED
|
@@ -73,14 +73,12 @@ First you need to connect the `<style-provider>`:
|
|
|
73
73
|
<!DOCTYPE html>
|
|
74
74
|
<html lang="en">
|
|
75
75
|
<head>
|
|
76
|
-
<!--app-head-->
|
|
77
76
|
<script src="https://unpkg.com/effcss/dist/build/define-provider.min.js" crossorigin="anonymous"></script>
|
|
78
77
|
</head>
|
|
79
78
|
<body>
|
|
80
79
|
<style-provider>
|
|
81
80
|
<div id="root"></div>
|
|
82
81
|
</style-provider>
|
|
83
|
-
<!--app-body-->
|
|
84
82
|
</body>
|
|
85
83
|
</html>
|
|
86
84
|
```
|
|
@@ -105,23 +103,22 @@ import { useRef } from 'react'
|
|
|
105
103
|
|
|
106
104
|
const cardStyle = {
|
|
107
105
|
c: {
|
|
108
|
-
// block
|
|
106
|
+
// BEM block
|
|
109
107
|
_: {
|
|
110
|
-
display: 'flex'
|
|
111
|
-
justifyContent: 'center'
|
|
108
|
+
display: 'flex'
|
|
112
109
|
},
|
|
113
|
-
// element
|
|
110
|
+
// BEM element
|
|
114
111
|
__logo: {
|
|
115
112
|
padding: '2em'
|
|
116
113
|
},
|
|
117
|
-
// boolean element modifier
|
|
114
|
+
// BEM boolean element modifier
|
|
118
115
|
__logo_c_: {
|
|
119
116
|
color: '#888',
|
|
120
117
|
':hover': {
|
|
121
118
|
color: 'black',
|
|
122
119
|
}
|
|
123
120
|
},
|
|
124
|
-
// element modifier with value
|
|
121
|
+
// BEM element modifier with value
|
|
125
122
|
__logo_sz_lg: {
|
|
126
123
|
width: '5rem'
|
|
127
124
|
},
|
|
@@ -131,16 +128,12 @@ const cardStyle = {
|
|
|
131
128
|
':focus': {
|
|
132
129
|
aspectRatio: '1/2'
|
|
133
130
|
}
|
|
134
|
-
},
|
|
135
|
-
body: {
|
|
136
|
-
boxSizing: 'border-box'
|
|
137
131
|
}
|
|
138
132
|
}
|
|
139
133
|
};
|
|
140
134
|
|
|
141
135
|
export const App = (props) => {
|
|
142
136
|
const { css } = props;
|
|
143
|
-
|
|
144
137
|
const stylesRef = useRef();
|
|
145
138
|
if (!stylesRef.current) {
|
|
146
139
|
const cardCSS = css.use(cardStyle);
|
|
@@ -148,7 +141,7 @@ export const App = (props) => {
|
|
|
148
141
|
// just block selector
|
|
149
142
|
block: cardCSS()(),
|
|
150
143
|
// element with modifiers
|
|
151
|
-
|
|
144
|
+
logo: cardCSS('logo')({
|
|
152
145
|
c: '',
|
|
153
146
|
sz: 'lg'
|
|
154
147
|
}),
|
|
@@ -158,7 +151,7 @@ export const App = (props) => {
|
|
|
158
151
|
|
|
159
152
|
// apply attributes to appropriate nodes
|
|
160
153
|
return <div {...styles.block}>
|
|
161
|
-
<div {...styles.
|
|
154
|
+
<div {...styles.logo}>
|
|
162
155
|
...
|
|
163
156
|
</div>
|
|
164
157
|
</div>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* EffCSS v2.1
|
|
2
|
+
* EffCSS v2.2.1
|
|
3
3
|
* {@link https://gitverse.ru/msabitov/effcss}
|
|
4
4
|
* Copyright (c) Marat Sabitov
|
|
5
5
|
* @license Apache 2.0
|
|
6
6
|
*/
|
|
7
|
-
const t=Object.entries,e=(e,s,i)=>t(e).reduce(s,i),s=t=>"object"==typeof t,i=t=>`{${t}}`,r=Object.assign.bind(Object),n=(t,e)=>`${t}:${e};`,o=(t,e)=>["@property",t,i(n("syntax",e.syn||'"*"')+n("inherits",e.inh||!1)+(e.ini?n("initial-value",e.ini):""))].join(" "),l=t=>`var(${t})`,a=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,c=["l","c","h","a"];class h{constructor(h){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(h,f)=>{const{_:p,kf:m,k:b={},v:u={},c:d}=f,g=this._resolver.selector.bind(this),_=this._parseSelector;let y=r({},d),v=r({},b),$=r({_:{}},u),x="";if(p)for(let t in p){const e=p[t];if("c"===e.typ){const s={};c.forEach((i=>{const r=t+i,n=this._prepareVarName(h,r);s[i]=n,v["_"+r]=s[i],x+=o(n,e)})),$._[t]=a({l:l(s.l),c:l(s.c),h:l(s.h),a:l(s.a)}),e.all&&(y["_"+t+"l"]=`&lig=>${this._prepareVarName(h,t+"l")}:{1}`,y["_"+t+"c"]=`&chr=>${this._prepareVarName(h,t+"c")}:{1}`,y["_"+t+"h"]=`&hue=>${this._prepareVarName(h,t+"h")}:{1}`,y["_"+t+"a"]=`&alp=>${this._prepareVarName(h,t+"a")}:{1}`)}else{const s=this._prepareVarName(h,t);v["_"+t]=s,$._[t]=l(s),x+=o(s,e)}}const w=t=>v[t]||this._outerKeys[t],j=t=>{var e;return $[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},k=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=j(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+(w(s)||"")})),S=e=>{const s=e.split("?");let i;for(let e in s){const r=s[e],[n,o]=r.split("=>"),l=n.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[a,c,h]=l,f=j(c);if(!f)continue;i=f;let p=t(i);const m=null==h?void 0:h.slice(1,-1).split(",");if(m){const t=new Set(m);p=p.filter((([e,s])=>t.has(e)))}if(o){let[t,e]=o.split("|");void 0===e&&(e=t,t=""),p=p.map((([s,i])=>[t.replace("{0}",s)||s,k(e.replaceAll("{1}",""+i))]))}(m||o)&&(i=Object.fromEntries(p));break}return i};function A(t,r,o){var l,a,c,f;let p=""+t;if((null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"$"))&&(p=""+w(t.slice(1)),!p))return"";if(Array.isArray(r))return A(p,Object.assign({},...r.map((t=>"string"==typeof t?S(t):t))),o);if(null==r)return"";if(s(r)){const t=!o||(null===(a=o.startsWith)||void 0===a?void 0:a.call(o,"@"))||p.startsWith("&")||p.startsWith("@")?"":"&";if(p.startsWith("_")){const{e:n,m:o,mv:l}=_(p);return o&&"string"!=typeof l?e(r,((r,[l,a])=>{let c;return c=s(a)?e(a,((t,e)=>t+A(...e,p)),""):a+";",r+t+g({b:h,e:n,m:o,mv:l})+i(c)}),""):t+g({b:h,e:n,m:o,mv:l})+i(e(r,((t,e)=>t+A(...e,p)),""))}return t+p+i(e(r,((t,e)=>t+A(...e,p)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?A(p,S(t.slice(1)),o):(null===(f=null==t?void 0:t.includes)||void 0===f?void 0:f.call(t,"{"))?A(p,k(t),o):n(p.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let O="";if(m)for(let t in m){const s=m[t],r=this._prepareKeyframesName(h,t);v["kf_"+t]=r,O+=`@keyframes ${r} `+i(e(s,((t,[s,r])=>t+s+(String(+s)===s?"%":"")+i(e(r,((t,e)=>t+A(...e)),""))),""))}return x+O+e(y,((t,e)=>t+A(...e)),"")};const{sets:f,keys:p,resolver:m}=h;this._resolver=m,p&&(this._outerKeys=p),f&&(this._outerSets=f)}}class f{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.status=t=>{const e=t&&this._stylesheets[t];return!!e&&-1!==this._styleSheetsArray.findIndex((t=>t===e))},this.on=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];return!(!s||this.status(e))&&(this._styleSheetsArray.push(s),t)}),!0);return this.notify(),e},this.off=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];if(s&&this.status(e)){const e=this._styleSheetsArray.findIndex((t=>t===s));return this._styleSheetsArray.splice(e,1),t}return!1}),!0);return this.notify(),e},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e)=>{const s=new CSSStyleSheet;if(s.replaceSync(e),s.cssRules.length)return this.add(t,s);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,e)=>{const s=this._stylesheets[t];if(s)return s.replaceSync(e),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.findIndex((e=>e.deref()===t))>=0||(this._listeners.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const p=(...t)=>t.join(","),m="rem",b="-",u=" ",d="-x",g="-y",_="down",y="horizontal",v="vertical",$="text",x=$+b,w="font",j=w+b,k="column",S=k+b,A="max-",O="min-",z="content",N=z+"s",C="-items",E="self",K="inline",W="block",V="size",P="-radius",I="direction",q="outline",M="style",R=b+M,T="end",B=b+T,J="start",L=b+J,G="center",H="word",Z="line",D="break",F=D+b,Q="wrap",U="no"+Q,X="rule",Y="object",tt="top",et=b+tt,st="left",it=b+st,rt="bottom",nt=b+rt,ot="right",lt=b+ot,at="width",ct=b+at,ht="color",ft=b+ht,pt="overflow",mt="align",bt="type",ut="transform",dt="all",gt="height",_t="normal",yt="opacity",vt="visibility",$t="scale",xt="box",wt=b+xt,jt="border",kt="position",St="none",At="auto",Ot="fill",zt="stroke",Nt="reverse",Ct="space",Et="fixed",Kt="origin",Wt="alpha",Vt="luminance",Pt="clip",It="zoom",qt="scroll",Mt="padding",Rt="margin",Tt="both",Bt="mode",Jt="repeat",Lt="light",Gt="linear",Ht="hidden",Zt="shadow",Dt="behavior",Ft="orientation",Qt="name",Ut="after",Xt="before",Yt="image",te="list"+R,ee=te+b+bt,se=te+b+kt,ie=te+b+Yt,re=ht+"-scheme",ne=jt+nt,oe=jt+it,le=jt+lt,ae=jt+et,ce=jt+b+W,he=jt+b+K,fe=ce+L,pe=ce+B,me=he+L,be=he+B,ue=jt+ct,de=ne+ct,ge=oe+ct,_e=le+ct,ye=ae+ct,ve=ce+ct,$e=he+ct,xe=fe+ct,we=pe+ct,je=me+ct,ke=be+ct,Se=jt+P,Ae=ne+it+P,Oe=ne+lt+P,ze=ae+it+P,Ne=ae+lt+P,Ce=jt+L+B+P,Ee=jt+L+L+P,Ke=jt+B+B+P,We=jt+B+L+P,Ve=jt+ft,Pe=oe+ft,Ie=le+ft,qe=ae+ft,Me=ne+ft,Re=ce+ft,Te=he+ft,Be=fe+ft,Je=pe+ft,Le=me+ft,Ge=be+ft,He=jt+R,Ze=oe+R,De=le+R,Fe=ae+R,Qe=ne+R,Ue=ce+R,Xe=he+R,Ye=fe+R,ts=pe+R,es=me+R,ss=be+R,is=q+ft,rs=q+ct,ns=q+R,os=q+b+"offset",ls=pt+d,as=pt+g,cs=Y+b+"fit",hs=Y+b+kt,fs=$t+b+_,ps=xt+b+Zt,ms=Mt+wt,bs=jt+wt,us=z+wt,ds=Ot+wt,gs=zt+wt,_s="view"+wt,ys="no-"+Pt,vs=Jt+d,$s=Jt+g,xs="no-"+Jt,ws=Mt+it,js=Mt+et,ks=Mt+lt,Ss=Mt+nt,As=Rt+it,Os=Rt+et,zs=Rt+lt,Ns=Rt+nt,Cs="grid",Es="row",Ks="gap",Ws="justify",Vs="flex",Ps=Vs+b,Is="place"+C,qs=K+b+Vs,Ms=Ps+"basis",Rs=Ps+"grow",Ts=Ps+"shrink",Bs=Ps+I,Js=Ps+Q,Ls=Ws+b+z,Gs=Ws+C,Hs=mt+C,Zs=mt+b+z,Ds=mt+b+E,Fs=Cs+b+"template",Qs=Fs+b+Es+"s",Us=Fs+b+k+"s",Xs=Es+b+Ks,Ys=S+Ks,ti=Ws+b+E,ei=Cs+b+Es,si=ei+B,ii=ei+L,ri=Cs+b+k,ni=ri+B,oi=ri+L,li=S+"count",ai=S+Ot,ci=S+X,hi=ci+ft,fi=ci+R,pi=ci+ct,mi=S+"span",bi=k+ct,ui=Es+b+Nt,di=S+Nt,gi=Q+b+Nt,_i=Vs+B,yi=Vs+L,vi=Ct+"-between",$i=Ct+"-around",xi=Ct+"-evenly",wi=K+b+Cs,ji="mask-",ki=ji+Pt,Si=ji+"composite",Ai=ji+Bt,Oi=ji+Kt,zi=ji+kt,Ni=ji+Jt,Ci=ji+V,Ei=ji+bt,Ki="timing-function",Wi="delay",Vi="duration",Pi="animation",Ii=Pi+b,qi=Ii+Qt,Mi=Ii+Ki,Ri=Ii+I,Ti=Ii+"iteration-count",Bi=Ii+Vi,Ji=Ii+Wi,Li=Ii+"play-state",Gi=Ii+Ot+b+Bt,Hi="transition",Zi=Hi+b,Di=Zi+Dt,Fi=Zi+"property",Qi=Zi+Ki,Ui=Zi+Vi,Xi=Zi+Wi,Yi="alternate",tr=Yi+b+Nt,er="-out",sr="ease",ir=sr+"-in",rr=ir+er,nr=sr+er,or="step",lr=or+L,ar=or+B,cr="translate",hr="rotate",fr="perspective",pr=fr+b+Kt,mr=st+u+tt,br=ot+u+tt,ur=st+u+rt,dr=ot+u+rt,gr="inset",_r=gr+b,yr=ut+wt,vr=ut+b+Kt,$r=ut+R,xr=_r+W,wr=xr+B,jr=xr+L,kr=_r+K,Sr=kr+B,Ar=kr+L,Or="fit-"+z,zr=O+z,Nr=A+z,Cr=xt+"-sizing",Er=A+at,Kr=O+at,Wr=A+gt,Vr=O+gt,Pr=W+b+V,Ir=A+Pr,qr=O+Pr,Mr=K+b+V,Rr=A+Mr,Tr=O+Mr,Br=qt+b+Dt,Jr=qt+b+Rt,Lr=Jr+et,Gr=Jr+nt,Hr=Jr+it,Zr=Jr+lt,Dr=Jr+b+W,Fr=Dr+B,Qr=Dr+L,Ur=Jr+b+K,Xr=Ur+B,Yr=Ur+L,tn=qt+b+Mt,en=tn+et,sn=tn+nt,rn=tn+it,nn=tn+lt,on=tn+b+W,ln=on+B,an=on+L,cn=tn+b+K,hn=cn+B,fn=cn+L,pn=qt+b+"snap",mn=pn+b+mt,bn=pn+b+"stop",un=pn+b+bt,dn="over"+Br,gn=" mandatory",_n="x"+gn,yn="y"+gn,vn=W+gn,$n=K+gn,xn=Tt+gn,wn=" proximity",jn="x"+wn,kn="y"+wn,Sn=W+wn,An=K+wn,On=Tt+wn,zn=x+"decoration",Nn=zn+b+ht,Cn=zn+b+"thickness",En=zn+b+M,Kn=zn+b+Z,Wn="white-"+Ct,Vn=x+ut,Pn=x+mt,In=v+b+mt,qn=x+pt,Mn=x+Ft,Rn=x+"rendering",Tn=x+Zt,Bn=x+"emphasis",Jn=Bn+ft,Ln=Bn+b+kt,Gn=Bn+R,Hn=x+Q,Zn=Hn+b+Bt,Dn=Hn+R,Fn=H+b+D,Qn=j+V,Un=j+"weight",Xn=j+"family",Yn=j+M,to=j+"synthesis",eo=j+"variant",so=eo+b+Yi+"s",io=eo+"-caps",ro=eo+"-numeric",no=eo+b+kt,oo=eo+"-east-asian",lo=eo+"-ligatures",ao=eo+"-settings",co="writing-"+Bt,ho=Z+b+gt,fo=Z+b+D,po=Z+"-through",mo="over"+Z,bo="under"+Z,uo="pre",go=uo+b+Z,_o=uo+b+Q,yo=F+Ct+"s",vo=F+dt,$o=F+H,xo=F+Ut,wo=F+Xt,jo=y+"-tb",ko=v+"-lr",So=v+"-rl",Ao="keep-"+dt,Oo="pointer",zo="pan",No=zo+d,Co=zo+it,Eo=zo+lt,Ko=zo+g,Wo=zo+b+_,Vo="pinch-"+It,Po=v+b+$,Io="grab",qo=Io+"bing",Mo="resize",Ro="col-"+Mo,To="row-"+Mo,Bo="n-"+Mo,Jo="e-"+Mo,Lo="s-"+Mo,Go="w-"+Mo,Ho="ne-"+Mo,Zo="ew-"+Mo,Do="nw-"+Mo,Fo="se-"+Mo,Qo="sw-"+Mo,Uo="ns-"+Mo,Xo="nesw-"+Mo,Yo="nwse-"+Mo,tl=It+b+"in",el=It+b+"out",sl=Oo+"-events",il=qt+b+kt,rl="caret"+ft,nl="accent"+ft,ol="filter",ll="backdrop-"+ol,al="background",cl=al+b,hl=cl+Yt,fl=cl+ht,pl=cl+Pt,ml=cl+Kt,bl=cl+kt,ul=bl+d,dl=bl+g,gl=cl+Jt,_l=cl+V,yl=cl+"blend-"+Bt,vl=cl+"attachment",$l="gradient",xl=Gt+b+$l,wl="radial-"+$l,jl="conic-"+$l,kl=z+b+vt,Sl=zt+ct,Al=zt+b+yt,Ol=Ot+b+X,zl=Ot+b+yt,Nl=ht+"-dodge",Cl=ht+"-burn",El="hard-"+Lt,Kl="soft-"+Lt,Wl=ht+"-mix",Vl="revert",Pl=Vl+"-layer",Il="container",ql=Il+b+bt,Ml=Il+b+Qt,Rl=":first-",Tl=":last-",Bl=":only-",Jl="child",Ll="of-type",Gl=":nth-child",Hl="prefers-",Zl=Hl+re,Dl="@media",Fl=ht+"-gamut",Ql=Hl+"contrast",Ul="scripting",Xl="::"+Ut,Yl="::"+Xt,ta="sideways",ea=ta+lt,sa={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ia=[...Array(12).keys()].reduce(((t,e)=>(t[e]=e,t)),{}),ra={u:{ini:"initial",inh:"inherit",u:"unset",r:Vl,rl:Pl},rep:{rx:vs,ry:$s,r:Jt,s:Ct,ro:"round",nr:xs},cnt:{n:_t,s:V,is:Mr},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:_t,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:_t,nw:U,p:uo,pl:go,pw:_o,bs:yo},wb:{n:_t,ba:vo,ka:Ao,bw:$o},wm:{htb:jo,vlr:ko,vrl:So},hyp:{no:St,m:"manual",a:At},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:po,o:mo,u:bo},tor:{m:"mixed",u:"upright",sr:ea,s:ta,ugo:"use-glyph-"+Ft},ta:{l:st,c:G,j:Ws,r:ot,s:J,e:T},fr:sa,coef:ia,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:zr,max:Nr,fit:Or},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:At,f:Ot,sd:fs},box:{c:us,p:ms,b:bs,f:ds,s:gs,v:_s,nc:ys,t:$},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:J,e:T,c:G,st:"stretch",sb:vi,sa:$i,se:xi,b:"baseline",fs:yi,fe:_i,no:St},dis:{g:Cs,ig:wi,f:Vs,if:qs,b:W,i:K},ca:ia,co:ia,ra:ia,ro:ia,fd:{r:Es,rr:ui,c:k,cr:di},fb:sa,fo:ia,fg:ia,fs:ia,fw:{w:Q,nw:U,wr:gi},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:At,any:"anywhere",n:_t,l:"loose",s:"strict"},ls:{no:St,dt:"dotted",i:gr,h:Ht,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Ht,s:qt,a:At,c:Pt,e:"ellipsis"},v:{h:Ht,v:"visible",c:"collapse",a:At},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Gt,e:sr,ei:ir,eo:nr,eio:rr,ss:lr,se:ar},tp:{col:p(ht,fl,Ve,Nn),icon:p(Ot,zt),flt:p(ol,ll),ind:p(Mt,Rt),sz:p(at,Er,Kr,gt,Wr,Vr),esz:p(qr,Pr,Ir,Tr,Mr,Rr),o:yt,b:jt,f:Vs,g:Cs,pos:p(kt,st,tt,rt,ot),tf:p(ut,cr,$t,hr,"skew",fr)},tb:{ad:"allow-discrete",n:_t},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:At,sp:il,c:N,tf:ut,o:yt,i:gr,tfi:p(ut,gr)},afm:{no:St,f:"forwards",b:"backwards",both:Tt},adir:{r:Nt,a:Yi,ar:tr},aps:{r:"running",p:"paused"},pe:{a:At,no:St,all:dt,f:Ot,s:zt},cur:{h:"help",a:At,p:Oo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:$,vt:Po,cp:"copy",m:"move",g:Io,gng:qo,cr:Ro,rr:To,nr:Bo,er:Jo,sr:Lo,wr:Go,ner:Ho,ewr:Zo,nwr:Do,ser:Fo,swr:Qo,nsr:Uo,neswr:Xo,nwser:Yo,zi:tl,zo:el},res:{n:St,v:v,h:y,b:Tt},toa:{a:At,no:St,px:No,pl:Co,pr:Eo,py:Ko,pu:"pan-up",pd:Wo,pz:Vo,m:"manipulation"},us:{n:St,t:$,all:dt,a:At},sb:{a:At,s:"smooth"},sss:{n:_t,a:"always"},sst:{n:St,x:"x",y:"y",b:W,i:K,both:Tt,xm:_n,ym:yn,bm:vn,im:$n,bothm:xn,xp:jn,yp:kn,bp:Sn,ip:An,bothp:On},pos:{r:"relative",a:"absolute",f:Et,s:"static"},posv:{b:rt,t:tt,c:G,l:st,r:ot,lt:mr,rt:br,lb:ur,rb:dr},cf:{a:At,b:"balance"},cs:{no:St,all:dt},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:Wt,l:Vt},mm:{a:Wt,l:Vt,m:"match-source"},bgbm:{n:_t,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Lt+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:ht,lum:"luminosity",cd:Nl,cb:Cl,hl:El,sl:Kl},bga:{s:qt,f:Et,l:"local"}},na={a:Pi,an:qi,adur:Bi,adel:Ji,aps:Li,afm:Gi,adir:Ri,aic:Ti,atf:Mi,tn:Hi,tdur:Ui,tdel:Xi,tb:Di,tp:Fi,ttf:Qi,ba:xo,bb:wo,bor:jt,bw:ue,br:Se,bs:He,bls:Ze,brs:De,bts:Fe,bbs:Qe,bbls:Ue,bis:Xe,bbss:Ye,bbes:ts,biss:es,bies:ss,brw:_e,blw:ge,btw:ye,bbw:de,btlr:ze,btrr:Ne,bbrr:Oe,bblr:Ae,biw:$e,bblw:ve,bbew:we,bbsw:xe,bisw:je,biew:ke,besr:We,beer:Ke,bssr:Ee,bser:Ce,bc:Ve,blc:Pe,brc:Ie,btc:qe,bbc:Me,bblc:Re,bic:Te,bbsc:Be,bbec:Je,bisc:Le,biec:Ge,bg:al,bgi:hl,bgc:fl,c:ht,cmix:Wl,csh:re,acc:nl,ctc:rl,st:zt,stw:Sl,sto:Al,fi:Ot,fir:Ol,fio:zl,flt:ol,bf:ll,dis:"display",g:Cs,jc:Ls,ji:Gs,ai:Hs,pi:Is,ac:Zs,gt:Fs,gtr:Qs,gtc:Us,gp:Ks,rg:Xs,cg:Ys,as:Ds,js:ti,gr:ei,gre:si,grs:ii,gc:ri,gce:ni,gcs:oi,fx:Vs,fxd:Bs,fxw:Js,fxs:Ts,fxg:Rs,fxb:Ms,ord:"order",dir:I,m:Rt,ml:As,mr:zs,mt:Os,mb:Ns,p:Mt,pl:ws,pr:ks,pt:js,pb:Ss,out:q,oc:is,ow:rs,os:ns,oo:os,l:st,r:ot,t:tt,b:rt,ins:gr,ib:xr,ibe:wr,ibs:jr,ii:kr,iie:Sr,iis:Ar,wc:"will-change",app:"appearance",pe:sl,cur:"cursor",toa:"touch-action",us:"user-select",res:Mo,lis:te,lisp:se,lisi:ie,list:ee,sb:Br,ssa:mn,sss:bn,sst:un,sm:Jr,sml:Hr,smr:Zr,smt:Lr,smb:Gr,sp:tn,spl:rn,spr:nn,spt:en,spb:sn,smbl:Dr,smbe:Fr,smbs:Qr,smi:Ur,smie:Xr,smis:Yr,spbl:on,spbe:ln,spbs:an,spi:cn,spie:hn,spis:fn,osb:dn,ar:"aspect-ratio",w:at,maxw:Er,minw:Kr,h:gt,minh:Vr,maxh:Wr,bl:Pr,maxb:Ir,minb:qr,i:Mr,mini:Tr,maxi:Rr,per:fr,pero:pr,rot:hr,sc:$t,tf:ut,tfb:yr,tfo:vr,tfs:$r,tr:cr,z:It,lts:"letter-spacing",lh:ho,lb:fo,f:w,fst:Yn,ff:Xn,fwg:Un,fsz:Qn,fsn:to,fv:eo,fva:so,fvc:io,fvea:oo,fvl:lo,fvn:ro,fvs:ao,fvp:no,tt:Vn,td:zn,tdt:Cn,tds:En,tdl:Kn,ta:Pn,to:qn,trg:Rn,ts:Tn,te:Bn,tep:Ln,tec:Jn,tes:Gn,tw:Hn,twm:Zn,tws:Dn,va:In,ws:Wn,tor:Mn,wb:Fn,wm:co,hyp:"hyphens",bsz:Cr,bsh:ps,pos:kt,cf:ai,crs:fi,crc:hi,crw:pi,cs:mi,cw:bi,cc:li,bgcl:pl,bgp:bl,bgpx:ul,bgpy:dl,bgbm:yl,bgo:ml,bgr:gl,bga:vl,bgsz:_l,mcl:ki,mcm:Si,mm:Ai,mo:Oi,mp:zi,mre:Ni,msz:Ci,mtp:Ei,obf:cs,obp:hs,con:z,ov:pt,ovx:ls,ovy:as,v:vt,cv:kl,o:yt,zi:"z-index",lgr:xl,rgr:wl,cgr:jl,inf:"infinite",cnt:ql,cnn:Ml,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:Rl+Jl,$lc:Tl+Jl,$oc:Bl+Jl,$1:Gl+"(odd)",$2:Gl+"(even)",$ft:Rl+Ll,$lt:Tl+Ll,$ot:Bl+Ll,$bef:Yl,$aft:Xl,$bd:"::backdrop",$ba:`&${Yl},&${Xl}`,$pl:":placeholder",$light:Dl+`(${Zl}: light)`,$dark:Dl+`(${Zl}: dark)`,$red_m:Dl+"(prefers-reduced-motion: reduce)",$ori_l:Dl+`(${Ft}: landscape)`,$ori_p:Dl+`(${Ft}: portrait)`,$gam_srgb:Dl+`(${Fl}: srgb)`,$gam_p3:Dl+`(${Fl}: p3)`,$gam_rec:Dl+`(${Fl}: rec2020)`,$con_no:Dl+`(${Ql}: no-preference)`,$con_m:Dl+`(${Ql}: more)`,$con_l:Dl+`(${Ql}: less)`,$con_c:Dl+`(${Ql}: custom)`,$scr_no:Dl+`(${Ul}: none)`,$scr_ini:Dl+`(${Ul}: initial-only)`,$scr_en:Dl+`(${Ul}: enabled)`},oa={xs:30+m,sm:40+m,md:48+m,lg:64+m,xl:80+m},la={xs:10+m,sm:20+m,md:30+m,lg:40+m,xl:48+m},aa={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},ca={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},ha="{1}rem",fa="{1}deg",pa="span {1}",ma={fb:"calc(100% * {1})",ra:pa,ca:pa,sz:ha,sp:ha,rad:ha,th:ha,bp:ha,cbp:ha,fsz:ha,lsp:ha,tr:ha,pers:ha,sk:fa,rot:fa,time:"{1}ms"},ba="style-provider",ua=t=>"object"==typeof t;class da{constructor(t){this._counter=0,this._keys=new Set,this._configs=new Map,this.use=(t,e)=>{const s=this._configs.get(t);if(s)return s;const i=e||this._prefix+this._counter.toString(36);return this._keys.add(i),this._configs.set(t,i),this._counter++,i},this.mutate=(t,e)=>Object.assign(this.getConfigs()[t],e),this.getKey=t=>this._configs.get(t),this.getKeys=()=>[...this._keys],this.getConfigs=()=>Object.fromEntries(this._configs.entries().map((([t,e])=>[e,t]))),this._prefix=(null==t?void 0:t.prefix)||"eff",t.initContent&&Object.entries(t.initContent).forEach((([t,e])=>this.use(e,t))),t.hydrate&&(this._counter=0)}}const ga=globalThis.document,_a=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));!function(t={}){const{name:e=ba,styles:s={},settings:i={}}=t,r=globalThis.customElements;!(null==r?void 0:r.get(e))&&r.define(e,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||"effcsschanges"}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||"effcss")}get _initSelector(){return"."+(this.getAttribute("initcls")||"effcss_init")}get settingsContent(){const t=null==ga?void 0:ga.querySelector(this._settingsSelector);let e;return e=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:i,e||{}}get initContent(){const t=ga.querySelectorAll(this._initSelector);let e=s||{};return t.forEach((t=>{let s;s=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}get configs(){return this._collector.getConfigs()}constructor(){super(),this._setState=()=>{const{units:t,keys:s,sets:i,mediaBP:r=oa,containerBP:n=la,rootStyle:o=aa,themes:l=ca}=this.settingsContent,a=Object.assign(Object.assign({},ma),t||{}),c=Object.assign(Object.assign({},na),s||{}),h=Object.assign({},ra);i&&Object.entries(i).forEach((([t,e])=>h[t]=Object.assign({},e)));const f=Object.entries(l);if(a)for(const t in a)h[t]=h[t]&&Object.fromEntries(Object.entries(h[t]).map((([e,s])=>[e,a[t].replace("{1}",""+s)])));r&&Object.entries(r).forEach((([t,e])=>{c[`min_${t}_`]=`@media (min-width:${e})`,c[`max_${t}_`]=`@media (max-width:${e})`})),n&&Object.entries(n).forEach((([t,e])=>{c[`cmin_${t}_`]=`@container (min-width:${e})`,c[`cmax_${t}_`]=`@container (max-width:${e})`}));const p={},m={};l&&h&&f.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{var r;const n=this._resolver.varName(this.prefix,t,e);a[t]?s[n]=a[t].replace("{1}",""+i):s[n]=i,p[n]||(p[n]=(null===(r=h[t])||void 0===r?void 0:r[e])||"unset",h[t]||(h[t]={}),h[t][e]=`var(${n})`)}))})),m[t]=s})),this._dict={sets:h,keys:c},this._mainConfig={c:Object.assign(Object.assign({[e]:{display:"contents"},_theme:m,$$:Object.assign(p,o)},(null==m?void 0:m.dark)?{$$dark:{$$:m.dark}}:{}),(null==m?void 0:m.light)?{$$light:{$$:m.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.alter=(t,e)=>{let s;if(s="string"==typeof t?t:this._collector.getKey(t),s){const t=this._collector.mutate(s,e);this._manager.replace(s,this.css(t,s))}return this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.status=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),!!e&&this._manager.status(e)},this.on=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.on(e)},this.off=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.off(e)},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig)),this.subscribe=t=>this._manager.registerNode(t),this.unsubscribe=t=>this._manager.unregisterNode(t)}connectedCallback(){this._resolver=(t=>{const{mode:e}=t,s=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),i=(t,e)=>Object.defineProperties({[t]:e},{k:{value:t},v:{value:e}}),r=(...t)=>"--"+t.join("-"),n=(...t)=>t.join("-");return"c"===e?{selector:({b:t,e:e,m:s,mv:i})=>`.${t}${(e?"__"+e:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")}`,attr:t=>e=>r=>{let n=r||"";ua(n)&&(n=s(n));const o=t+(e?"__"+e:"");return n=o+(n?" "+(null==n?void 0:n.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),i("class",n)},varName:r,kfName:n}:{selector:({b:t,e:e,m:s,mv:i})=>`[data-${t}${e?"-"+e:""}${s?'~="'+(s||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>e=>r=>{const n=`data-${t}${e?"-"+e:""}`;let o=r||"";return ua(o)&&(o=s(o)),i(n,o)},varName:r,kfName:n}})({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=(s={hydrate:this.hydrate,prefix:e,initContent:t},new da(s)),this._processor=function(t){return new h(t)}({sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver}),this._manager=new f;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._notifier={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._notifier),this.use(this._mainConfig),this.usePublic(t),ga&&!this.isolated&&this._manager.registerNode(ga)}})}();
|
|
7
|
+
const t=Object.entries,s=(s,e,i)=>t(s).reduce(e,i),e=t=>"object"==typeof t,i=t=>`{${t}}`,r=Object.assign.bind(Object),n=(t,s)=>`${t}:${s};`,o=(t,s)=>["@property",t,i(n("syntax",s.syn||'"*"')+n("inherits",s.inh||!1)+(s.ini?n("initial-value",s.ini):""))].join(" "),l=t=>`var(${t})`,a=({l:t,c:s,h:e,a:i=1})=>`oklch(${t} ${s} ${e} / ${i})`,c=["l","c","h","a"];class h{constructor(h){this._k={},this._s={},this._sel=t=>{let s,e,i,r,n;return[s,n]=t.split(":"),s.startsWith("__")?[e,i,r]=s.slice(2).split("_"):[e,i,r]=s.split("_"),{e:e,m:i,mv:r,s:n}},this._var=(...t)=>this._r.varName(...t),this._kf=(...t)=>this._r.kfName(...t),this.compile=(h,m)=>{const{_:f,kf:d,k:b={},v:p={},c:u}=m,g=this._r.selector.bind(this),_=this._sel;let v=r({},u),$=r({},b),y=r({_:{}},p),x="";if(f)for(let t in f){const s=f[t];if("c"===s.typ){const e={};c.forEach((i=>{const r=t+i,n=this._var(h,r);e[i]=n,$["_"+r]=e[i],x+=o(n,s)})),y._[t]=a({l:l(e.l),c:l(e.c),h:l(e.h),a:l(e.a)}),s.all&&(v["_"+t+"l"]=`&lig=>${this._var(h,t+"l")}:{1}`,v["_"+t+"c"]=`&chr=>${this._var(h,t+"c")}:{1}`,v["_"+t+"h"]=`&hue=>${this._var(h,t+"h")}:{1}`,v["_"+t+"a"]=`&alp=>${this._var(h,t+"a")}:{1}`)}else{const e=this._var(h,t);$["_"+t]=e,y._[t]=l(e),x+=o(e,s)}}const w=t=>$[t]||this._k[t],k=t=>{var s;return y[t]||this._s[t]||(null===(s=this._s)||void 0===s?void 0:s.root[t])},j=t=>t.replaceAll(/\{(.+?)\}/g,((t,s)=>{const[e,i]=s.split(".");let r;if(i){const t=k(e);r=(null==t?void 0:t[i])||(null==t?void 0:t.def)||""}else r=w(e)||"";return""+r})),z=s=>{const e=s.split("?");let i;for(let s in e){const r=e[s],[n,o]=r.split("=>"),l=n.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[a,c,h]=l,m=k(c);if(!m)continue;i=m;let f=t(i);const d=null==h?void 0:h.slice(1,-1).split(",");if(d){const t=new Set(d);f=f.filter((([s,e])=>t.has(s)))}if(o){let[t,s]=o.split("|");void 0===s&&(s=t,t=""),f=f.map((([e,i])=>[t.replace("{0}",e)||e,j(s.replaceAll("{1}",""+i))]))}(d||o)&&(i=Object.fromEntries(f));break}return i};function O(t,r,o){var l,a,c,m;let f=""+t;if((null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"$"))&&(f=""+w(t.slice(1)),!f))return"";if(Array.isArray(r))return O(f,Object.assign({},...r.map((t=>"string"==typeof t?z(t):t))),o);if(null==r)return"";if(e(r)){const t=!o||(null===(a=o.startsWith)||void 0===a?void 0:a.call(o,"@"))||f.startsWith("&")||f.startsWith("@")?"":"&";if(f.startsWith("_")){const{e:n,m:o,mv:l}=_(f);return o&&"string"!=typeof l?s(r,((r,[l,a])=>{let c;return c=e(a)?s(a,((t,s)=>t+O(...s,f)),""):a+";",r+t+g({b:h,e:n,m:o,mv:l})+i(c)}),""):t+g({b:h,e:n,m:o,mv:l})+i(s(r,((t,s)=>t+O(...s,f)),""))}return t+f+i(s(r,((t,s)=>t+O(...s,f)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?O(f,z(t.slice(1)),o):(null===(m=null==t?void 0:t.includes)||void 0===m?void 0:m.call(t,"{"))?O(f,j(t),o):n(f.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let S="";if(d)for(let t in d){const e=d[t],r=this._kf(h,t);$["kf_"+t]=r,S+=`@keyframes ${r} `+i(s(e,((t,[e,r])=>t+e+(String(+e)===e?"%":"")+i(s(r,((t,s)=>t+O(...s)),""))),""))}return x+S+s(v,((t,s)=>t+O(...s)),"")};const{sets:m,keys:f,resolver:d}=h;this._r=d,f&&(this._k=f),m&&(this._s=m)}}const m=t=>Array.isArray(t)?t:[t];class f{constructor(){this._s={},this._r={},this._a=[],this._l=[],this.getIndex=t=>this._a.findIndex((s=>s===t)),this.get=t=>this._s[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._s,this.add=(t,s)=>{if(!this._s[t])return this._s[t]=s,this._a.push(s),this.notify(),!0},this.status=t=>{const s=this.get(t);return!!s&&-1!==this.getIndex(s)},this.on=t=>{const s=m(t).reduce(((t,s)=>{const e=this.get(s);return!(!e||this.status(s))&&(this._a.push(e),t)}),!0);return this.notify(),s},this.off=t=>{const s=m(t).reduce(((t,s)=>{const e=this.get(s);if(e&&this.status(s)){const s=this.getIndex(e);return this._a.splice(s,1),t}return!1}),!0);return this.notify(),s},this.remove=t=>{const s=this.get(t);if(!s)return;const e=this.getIndex(s);return e>-1&&(this._a.splice(e,1),delete this._s[t],delete this._r[t]),this.notify(),!0},this.pack=(t,s)=>{const e=new CSSStyleSheet;if(e.replaceSync(s),e.cssRules.length)return this.add(t,e);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,s)=>{const e=this._s[t];if(e)return e.replaceSync(s),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._a},this.registerNode=t=>{this._l.findIndex((s=>s.deref()===t))>=0||(this._l.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const s=this._l.findIndex((s=>s.deref()===t));s>=0&&this._l.splice(s,1)},this.notify=()=>{this._l=this._l.reduce(((t,s)=>{const e=s.deref();return e&&(this.apply(e),t.push(s)),t}),[])}}removeAll(){return this._a.splice(0),this._s={},this._r={},this.notify(),!0}}const d=(...t)=>t.join(","),b="rem",p="-",u=" ",g="-x",_="-y",v="down",$="horizontal",y="vertical",x="text",w=x+p,k="font",j=k+p,z="column",O=z+p,S="max-",A="min-",E="content",C=E+"s",N="-items",W="self",I="inline",P="block",K="size",q="-radius",M="direction",R="outline",B="style",F=p+B,J="end",L=p+J,G="start",H=p+G,T="center",Z="word",D="line",Q="break",U=Q+p,V="wrap",X="no"+V,Y="rule",tt="object",st="top",et=p+st,it="left",rt=p+it,nt="bottom",ot=p+nt,lt="right",at=p+lt,ct="width",ht=p+ct,mt="color",ft=p+mt,dt="overflow",bt="align",pt="type",ut="transform",gt="all",_t="height",vt="normal",$t="opacity",yt="visibility",xt="scale",wt="box",kt=p+wt,jt="border",zt="position",Ot="none",St="auto",At="fill",Et="stroke",Ct="reverse",Nt="space",Wt="fixed",It="origin",Pt="alpha",Kt="luminance",qt="clip",Mt="zoom",Rt="scroll",Bt="padding",Ft="margin",Jt="both",Lt="mode",Gt="repeat",Ht="light",Tt="linear",Zt="hidden",Dt="shadow",Qt="behavior",Ut="orientation",Vt="name",Xt="after",Yt="before",ts="image",ss="list"+F,es=ss+p+pt,is=ss+p+zt,rs=ss+p+ts,ns=mt+"-scheme",os=jt+ot,ls=jt+rt,as=jt+at,cs=jt+et,hs=jt+p+P,ms=jt+p+I,fs=hs+H,ds=hs+L,bs=ms+H,ps=ms+L,us=jt+ht,gs=os+ht,_s=ls+ht,vs=as+ht,$s=cs+ht,ys=hs+ht,xs=ms+ht,ws=fs+ht,ks=ds+ht,js=bs+ht,zs=ps+ht,Os=jt+q,Ss=os+rt+q,As=os+at+q,Es=cs+rt+q,Cs=cs+at+q,Ns=jt+H+L+q,Ws=jt+H+H+q,Is=jt+L+L+q,Ps=jt+L+H+q,Ks=jt+ft,qs=ls+ft,Ms=as+ft,Rs=cs+ft,Bs=os+ft,Fs=hs+ft,Js=ms+ft,Ls=fs+ft,Gs=ds+ft,Hs=bs+ft,Ts=ps+ft,Zs=jt+F,Ds=ls+F,Qs=as+F,Us=cs+F,Vs=os+F,Xs=hs+F,Ys=ms+F,te=fs+F,se=ds+F,ee=bs+F,ie=ps+F,re=R+ft,ne=R+ht,oe=R+F,le=R+p+"offset",ae=dt+g,ce=dt+_,he=tt+p+"fit",me=tt+p+zt,fe=xt+p+v,de=wt+p+Dt,be=Bt+kt,pe=jt+kt,ue=E+kt,ge=At+kt,_e=Et+kt,ve="view"+kt,$e="no-"+qt,ye=Gt+g,xe=Gt+_,we="no-"+Gt,ke=Bt+rt,je=Bt+et,ze=Bt+at,Oe=Bt+ot,Se=Ft+rt,Ae=Ft+et,Ee=Ft+at,Ce=Ft+ot,Ne="grid",We="row",Ie="gap",Pe="justify",Ke="flex",qe=Ke+p,Me="place"+N,Re=I+p+Ke,Be=qe+"basis",Fe=qe+"grow",Je=qe+"shrink",Le=qe+M,Ge=qe+V,He=Pe+p+E,Te=Pe+N,Ze=bt+N,De=bt+p+E,Qe=bt+p+W,Ue=Ne+p+"template",Ve=Ue+p+We+"s",Xe=Ue+p+z+"s",Ye=We+p+Ie,ti=O+Ie,si=Pe+p+W,ei=Ne+p+We,ii=ei+L,ri=ei+H,ni=Ne+p+z,oi=ni+L,li=ni+H,ai=O+"count",ci=O+At,hi=O+Y,mi=hi+ft,fi=hi+F,di=hi+ht,bi=O+"span",pi=z+ht,ui=We+p+Ct,gi=O+Ct,_i=V+p+Ct,vi=Ke+L,$i=Ke+H,yi=Nt+"-between",xi=Nt+"-around",wi=Nt+"-evenly",ki=I+p+Ne,ji="mask-",zi=ji+qt,Oi=ji+"composite",Si=ji+Lt,Ai=ji+It,Ei=ji+zt,Ci=ji+Gt,Ni=ji+K,Wi=ji+pt,Ii="timing-function",Pi="delay",Ki="duration",qi="animation",Mi=qi+p,Ri=Mi+Vt,Bi=Mi+Ii,Fi=Mi+M,Ji=Mi+"iteration-count",Li=Mi+Ki,Gi=Mi+Pi,Hi=Mi+"play-state",Ti=Mi+At+p+Lt,Zi="transition",Di=Zi+p,Qi=Di+Qt,Ui=Di+"property",Vi=Di+Ii,Xi=Di+Ki,Yi=Di+Pi,tr="alternate",sr=tr+p+Ct,er="-out",ir="ease",rr=ir+"-in",nr=rr+er,or=ir+er,lr="step",ar=lr+H,cr=lr+L,hr="translate",mr="rotate",fr="perspective",dr=fr+p+It,br=it+u+st,pr=lt+u+st,ur=it+u+nt,gr=lt+u+nt,_r="inset",vr=_r+p,$r=ut+kt,yr=ut+p+It,xr=ut+F,wr=vr+P,kr=wr+L,jr=wr+H,zr=vr+I,Or=zr+L,Sr=zr+H,Ar="fit-"+E,Er=A+E,Cr=S+E,Nr=wt+"-sizing",Wr=S+ct,Ir=A+ct,Pr=S+_t,Kr=A+_t,qr=P+p+K,Mr=S+qr,Rr=A+qr,Br=I+p+K,Fr=S+Br,Jr=A+Br,Lr=Rt+p+Qt,Gr=Rt+p+Ft,Hr=Gr+et,Tr=Gr+ot,Zr=Gr+rt,Dr=Gr+at,Qr=Gr+p+P,Ur=Qr+L,Vr=Qr+H,Xr=Gr+p+I,Yr=Xr+L,tn=Xr+H,sn=Rt+p+Bt,en=sn+et,rn=sn+ot,nn=sn+rt,on=sn+at,ln=sn+p+P,an=ln+L,cn=ln+H,hn=sn+p+I,mn=hn+L,fn=hn+H,dn=Rt+p+"snap",bn=dn+p+bt,pn=dn+p+"stop",un=dn+p+pt,gn="over"+Lr,_n=" mandatory",vn="x"+_n,$n="y"+_n,yn=P+_n,xn=I+_n,wn=Jt+_n,kn=" proximity",jn="x"+kn,zn="y"+kn,On=P+kn,Sn=I+kn,An=Jt+kn,En=w+"decoration",Cn=En+p+mt,Nn=En+p+"thickness",Wn=En+p+B,In=En+p+D,Pn="white-"+Nt,Kn=w+ut,qn=w+bt,Mn=y+p+bt,Rn=w+dt,Bn=w+Ut,Fn=w+"rendering",Jn=w+Dt,Ln=w+"emphasis",Gn=Ln+ft,Hn=Ln+p+zt,Tn=Ln+F,Zn=w+V,Dn=Zn+p+Lt,Qn=Zn+F,Un=Z+p+Q,Vn=j+K,Xn=j+"weight",Yn=j+"family",to=j+B,so=j+"synthesis",eo=j+"variant",io=eo+p+tr+"s",ro=eo+"-caps",no=eo+"-numeric",oo=eo+p+zt,lo=eo+"-east-asian",ao=eo+"-ligatures",co=eo+"-settings",ho="writing-"+Lt,mo=D+p+_t,fo=D+p+Q,bo=D+"-through",po="over"+D,uo="under"+D,go="pre",_o=go+p+D,vo=go+p+V,$o=U+Nt+"s",yo=U+gt,xo=U+Z,wo=U+Xt,ko=U+Yt,jo=$+"-tb",zo=y+"-lr",Oo=y+"-rl",So="keep-"+gt,Ao="pointer",Eo="pan",Co=Eo+g,No=Eo+rt,Wo=Eo+at,Io=Eo+_,Po=Eo+p+v,Ko="pinch-"+Mt,qo=y+p+x,Mo="grab",Ro=Mo+"bing",Bo="resize",Fo="col-"+Bo,Jo="row-"+Bo,Lo="n-"+Bo,Go="e-"+Bo,Ho="s-"+Bo,To="w-"+Bo,Zo="ne-"+Bo,Do="ew-"+Bo,Qo="nw-"+Bo,Uo="se-"+Bo,Vo="sw-"+Bo,Xo="ns-"+Bo,Yo="nesw-"+Bo,tl="nwse-"+Bo,sl=Mt+p+"in",el=Mt+p+"out",il=Ao+"-events",rl=Rt+p+zt,nl="caret"+ft,ol="accent"+ft,ll="filter",al="backdrop-"+ll,cl="background",hl=cl+p,ml=hl+ts,fl=hl+mt,dl=hl+qt,bl=hl+It,pl=hl+zt,ul=pl+g,gl=pl+_,_l=hl+Gt,vl=hl+K,$l=hl+"blend-"+Lt,yl=hl+"attachment",xl="gradient",wl=Tt+p+xl,kl="radial-"+xl,jl="conic-"+xl,zl=E+p+yt,Ol=Et+ht,Sl=Et+p+$t,Al=At+p+Y,El=At+p+$t,Cl=mt+"-dodge",Nl=mt+"-burn",Wl="hard-"+Ht,Il="soft-"+Ht,Pl=mt+"-mix",Kl="revert",ql=Kl+"-layer",Ml="container",Rl=Ml+p+pt,Bl=Ml+p+Vt,Fl=":first-",Jl=":last-",Ll=":only-",Gl="child",Hl="of-type",Tl=":nth-child",Zl="prefers-",Dl=Zl+ns,Ql="@media",Ul=mt+"-gamut",Vl=Zl+"contrast",Xl="scripting",Yl="::"+Xt,ta="::"+Yt,sa="sideways",ea=sa+at,ia={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ra=[...Array(12).keys()].reduce(((t,s)=>(t[s]=s,t)),{}),na={u:{ini:"initial",inh:"inherit",u:"unset",r:Kl,rl:ql},rep:{rx:ye,ry:xe,r:Gt,s:Nt,ro:"round",nr:we},cnt:{n:vt,s:K,is:Br},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:vt,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:vt,nw:X,p:go,pl:_o,pw:vo,bs:$o},wb:{n:vt,ba:yo,ka:So,bw:xo},wm:{htb:jo,vlr:zo,vrl:Oo},hyp:{no:Ot,m:"manual",a:St},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:bo,o:po,u:uo},tor:{m:"mixed",u:"upright",sr:ea,s:sa,ugo:"use-glyph-"+Ut},ta:{l:it,c:T,j:Pe,r:lt,s:G,e:J},fr:ia,coef:ra,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:Er,max:Cr,fit:Ar},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:St,f:At,sd:fe},box:{c:ue,p:be,b:pe,f:ge,s:_e,v:ve,nc:$e,t:x},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:G,e:J,c:T,st:"stretch",sb:yi,sa:xi,se:wi,b:"baseline",fs:$i,fe:vi,no:Ot},dis:{g:Ne,ig:ki,f:Ke,if:Re,b:P,i:I},ca:ra,co:ra,ra:ra,ro:ra,fd:{r:We,rr:ui,c:z,cr:gi},fb:ia,fo:ra,fg:ra,fs:ra,fw:{w:V,nw:X,wr:_i},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:St,any:"anywhere",n:vt,l:"loose",s:"strict"},ls:{no:Ot,dt:"dotted",i:_r,h:Zt,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Zt,s:Rt,a:St,c:qt,e:"ellipsis"},v:{h:Zt,v:"visible",c:"collapse",a:St},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Tt,e:ir,ei:rr,eo:or,eio:nr,ss:ar,se:cr},tp:{col:d(mt,fl,Ks,Cn),icon:d(At,Et),flt:d(ll,al),ind:d(Bt,Ft),sz:d(ct,Wr,Ir,_t,Pr,Kr),esz:d(Rr,qr,Mr,Jr,Br,Fr),o:$t,b:jt,f:Ke,g:Ne,pos:d(zt,it,st,nt,lt),tf:d(ut,hr,xt,mr,"skew",fr)},tb:{ad:"allow-discrete",n:vt},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:St,sp:rl,c:C,tf:ut,o:$t,i:_r,tfi:d(ut,_r)},afm:{no:Ot,f:"forwards",b:"backwards",both:Jt},adir:{r:Ct,a:tr,ar:sr},aps:{r:"running",p:"paused"},pe:{a:St,no:Ot,all:gt,f:At,s:Et},cur:{h:"help",a:St,p:Ao,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:x,vt:qo,cp:"copy",m:"move",g:Mo,gng:Ro,cr:Fo,rr:Jo,nr:Lo,er:Go,sr:Ho,wr:To,ner:Zo,ewr:Do,nwr:Qo,ser:Uo,swr:Vo,nsr:Xo,neswr:Yo,nwser:tl,zi:sl,zo:el},res:{n:Ot,v:y,h:$,b:Jt},toa:{a:St,no:Ot,px:Co,pl:No,pr:Wo,py:Io,pu:"pan-up",pd:Po,pz:Ko,m:"manipulation"},us:{n:Ot,t:x,all:gt,a:St},sb:{a:St,s:"smooth"},sss:{n:vt,a:"always"},sst:{n:Ot,x:"x",y:"y",b:P,i:I,both:Jt,xm:vn,ym:$n,bm:yn,im:xn,bothm:wn,xp:jn,yp:zn,bp:On,ip:Sn,bothp:An},pos:{r:"relative",a:"absolute",f:Wt,s:"static"},posv:{b:nt,t:st,c:T,l:it,r:lt,lt:br,rt:pr,lb:ur,rb:gr},cf:{a:St,b:"balance"},cs:{no:Ot,all:gt},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:Pt,l:Kt},mm:{a:Pt,l:Kt,m:"match-source"},bgbm:{n:vt,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Ht+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:mt,lum:"luminosity",cd:Cl,cb:Nl,hl:Wl,sl:Il},bga:{s:Rt,f:Wt,l:"local"}},oa={a:qi,an:Ri,adur:Li,adel:Gi,aps:Hi,afm:Ti,adir:Fi,aic:Ji,atf:Bi,tn:Zi,tdur:Xi,tdel:Yi,tb:Qi,tp:Ui,ttf:Vi,ba:wo,bb:ko,bor:jt,bw:us,br:Os,bs:Zs,bls:Ds,brs:Qs,bts:Us,bbs:Vs,bbls:Xs,bis:Ys,bbss:te,bbes:se,biss:ee,bies:ie,brw:vs,blw:_s,btw:$s,bbw:gs,btlr:Es,btrr:Cs,bbrr:As,bblr:Ss,biw:xs,bblw:ys,bbew:ks,bbsw:ws,bisw:js,biew:zs,besr:Ps,beer:Is,bssr:Ws,bser:Ns,bc:Ks,blc:qs,brc:Ms,btc:Rs,bbc:Bs,bblc:Fs,bic:Js,bbsc:Ls,bbec:Gs,bisc:Hs,biec:Ts,bg:cl,bgi:ml,bgc:fl,c:mt,cmix:Pl,csh:ns,acc:ol,ctc:nl,st:Et,stw:Ol,sto:Sl,fi:At,fir:Al,fio:El,flt:ll,bf:al,dis:"display",g:Ne,jc:He,ji:Te,ai:Ze,pi:Me,ac:De,gt:Ue,gtr:Ve,gtc:Xe,gp:Ie,rg:Ye,cg:ti,as:Qe,js:si,gr:ei,gre:ii,grs:ri,gc:ni,gce:oi,gcs:li,fx:Ke,fxd:Le,fxw:Ge,fxs:Je,fxg:Fe,fxb:Be,ord:"order",dir:M,m:Ft,ml:Se,mr:Ee,mt:Ae,mb:Ce,p:Bt,pl:ke,pr:ze,pt:je,pb:Oe,out:R,oc:re,ow:ne,os:oe,oo:le,l:it,r:lt,t:st,b:nt,ins:_r,ib:wr,ibe:kr,ibs:jr,ii:zr,iie:Or,iis:Sr,wc:"will-change",app:"appearance",pe:il,cur:"cursor",toa:"touch-action",us:"user-select",res:Bo,lis:ss,lisp:is,lisi:rs,list:es,sb:Lr,ssa:bn,sss:pn,sst:un,sm:Gr,sml:Zr,smr:Dr,smt:Hr,smb:Tr,sp:sn,spl:nn,spr:on,spt:en,spb:rn,smbl:Qr,smbe:Ur,smbs:Vr,smi:Xr,smie:Yr,smis:tn,spbl:ln,spbe:an,spbs:cn,spi:hn,spie:mn,spis:fn,osb:gn,ar:"aspect-ratio",w:ct,maxw:Wr,minw:Ir,h:_t,minh:Kr,maxh:Pr,bl:qr,maxb:Mr,minb:Rr,i:Br,mini:Jr,maxi:Fr,per:fr,pero:dr,rot:mr,sc:xt,tf:ut,tfb:$r,tfo:yr,tfs:xr,tr:hr,z:Mt,lts:"letter-spacing",lh:mo,lb:fo,f:k,fst:to,ff:Yn,fwg:Xn,fsz:Vn,fsn:so,fv:eo,fva:io,fvc:ro,fvea:lo,fvl:ao,fvn:no,fvs:co,fvp:oo,tt:Kn,td:En,tdt:Nn,tds:Wn,tdl:In,ta:qn,to:Rn,trg:Fn,ts:Jn,te:Ln,tep:Hn,tec:Gn,tes:Tn,tw:Zn,twm:Dn,tws:Qn,va:Mn,ws:Pn,tor:Bn,wb:Un,wm:ho,hyp:"hyphens",bsz:Nr,bsh:de,pos:zt,cf:ci,crs:fi,crc:mi,crw:di,cs:bi,cw:pi,cc:ai,bgcl:dl,bgp:pl,bgpx:ul,bgpy:gl,bgbm:$l,bgo:bl,bgr:_l,bga:yl,bgsz:vl,mcl:zi,mcm:Oi,mm:Si,mo:Ai,mp:Ei,mre:Ci,msz:Ni,mtp:Wi,obf:he,obp:me,con:E,ov:dt,ovx:ae,ovy:ce,v:yt,cv:zl,o:$t,zi:"z-index",lgr:wl,rgr:kl,cgr:jl,inf:"infinite",cnt:Rl,cnn:Bl,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:Fl+Gl,$lc:Jl+Gl,$oc:Ll+Gl,$1:Tl+"(odd)",$2:Tl+"(even)",$ft:Fl+Hl,$lt:Jl+Hl,$ot:Ll+Hl,$bef:ta,$aft:Yl,$bd:"::backdrop",$ba:`&${ta},&${Yl}`,$pl:":placeholder",$light:Ql+`(${Dl}: light)`,$dark:Ql+`(${Dl}: dark)`,$red_m:Ql+"(prefers-reduced-motion: reduce)",$ori_l:Ql+`(${Ut}: landscape)`,$ori_p:Ql+`(${Ut}: portrait)`,$gam_srgb:Ql+`(${Ul}: srgb)`,$gam_p3:Ql+`(${Ul}: p3)`,$gam_rec:Ql+`(${Ul}: rec2020)`,$con_no:Ql+`(${Vl}: no-preference)`,$con_m:Ql+`(${Vl}: more)`,$con_l:Ql+`(${Vl}: less)`,$con_c:Ql+`(${Vl}: custom)`,$scr_no:Ql+`(${Xl}: none)`,$scr_ini:Ql+`(${Xl}: initial-only)`,$scr_en:Ql+`(${Xl}: enabled)`,$ss:"@starting-style",$ns:"@namespace"},la={xs:30+b,sm:40+b,md:48+b,lg:64+b,xl:80+b},aa={xs:10+b,sm:20+b,md:30+b,lg:40+b,xl:48+b},ca={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},ha={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},ma="{1}rem",fa="{1}deg",da="span {1}",ba={fb:"calc(100% * {1})",ra:da,ca:da,sz:ma,sp:ma,rad:ma,th:ma,bp:ma,cbp:ma,fsz:ma,lsp:ma,tr:ma,pers:ma,sk:fa,rot:fa,time:"{1}ms"},pa="style-provider",ua=t=>"object"==typeof t;class ga{constructor({prefix:t,initContent:s,hydrate:e}={}){this._c=0,this._k=new Set,this._=new Map,this.use=(t,s)=>{const e=this._.get(t);if(e)return e;const i=s||this._p+this._c.toString(36);return this._k.add(i),this._.set(t,i),this._c++,i},this.mutate=(t,s)=>Object.assign(this.getConfigs()[t],s),this.getKey=t=>this._.get(t),this.getKeys=()=>[...this._k],this.getConfigs=()=>Object.fromEntries(this._.entries().map((([t,s])=>[s,t]))),this._p=t||"eff",s&&Object.entries(s).forEach((([t,s])=>this.use(s,t))),e&&(this._c=0)}}const _a=Object.entries,va=t=>"application/json"===(null==t?void 0:t.getAttribute("type")),$a=t=>Array.isArray(t)?t:[t];!function(t={}){const{name:s=pa,styles:e={},settings:i={}}=t,r=window.document,n=window.customElements;!(null==n?void 0:n.get(s))&&(n.define(s,class extends HTMLElement{constructor(){super(...arguments),this._setState=()=>{const{units:t={},keys:e={},sets:i,mediaBP:r=la,containerBP:n=aa,rootStyle:o=ca,themes:l=ha}=this.settingsContent,a=Object.assign(Object.assign({},ba),t),c=Object.assign(Object.assign({},oa),e),h=Object.assign({},na);i&&_a(i).forEach((([t,s])=>h[t]=Object.assign({},s)));const m=_a(l);if(a)for(const t in a)h[t]=h[t]&&Object.fromEntries(_a(h[t]).map((([s,e])=>[s,a[t].replace("{1}",""+e)])));r&&_a(r).forEach((([t,s])=>{c[`min_${t}_`]=`@media (min-width:${s})`,c[`max_${t}_`]=`@media (max-width:${s})`})),n&&_a(n).forEach((([t,s])=>{c[`cmin_${t}_`]=`@container (min-width:${s})`,c[`cmax_${t}_`]=`@container (max-width:${s})`}));const f={},d={};l&&h&&m.forEach((([t,s])=>{const e={};_a(s).forEach((([t,s])=>{_a(s).forEach((([s,i])=>{var r;const n=this._r.varName(this.prefix,t,s);a[t]?e[n]=a[t].replace("{1}",""+i):e[n]=i,f[n]||(f[n]=(null===(r=h[t])||void 0===r?void 0:r[s])||"unset",h[t]||(h[t]={}),h[t][s]=`var(${n})`)}))})),d[t]=e})),this._d={sets:h,keys:c},this._mc={c:Object.assign(Object.assign({[s]:{display:"contents"},_theme:d,$$:Object.assign(f,o)},(null==d?void 0:d.dark)?{$$dark:{$$:d.dark}}:{}),(null==d?void 0:d.light)?{$$light:{$$:d.light}}:{})}},this._res=t=>"string"==typeof t?t:this._c.getKey(t),this.use=(t,s)=>{let e=this._c.use(t,s);return this._m&&!this._m.has(s)&&this._m.pack(e,this.css(t,e)),this.resolve(e)},this.alter=(t,s)=>{const e=this._res(t);if(e){const t=this._c.mutate(e,s);this._m.replace(e,this.css(t,e))}return this.resolve(e)},this.usePublic=t=>Object.fromEntries(_a(t).map((([t,s])=>[t,this.use(s,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,s)=>{var e;return null===(e=this._p)||void 0===e?void 0:e.compile(s,t)},this.status=t=>{const s=this._res(t);return!!s&&this._m.status(s)},this.on=t=>this._m.on($a(t).map(this._res)),this.off=t=>this._m.off($a(t).map(this._res)),this.get=(t=this._mc)=>this._m.get(this._res(t)),this.getMany=(t=this._c.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._r.attr(t||this._c.getKey(this._mc)),this.subscribe=t=>this._m.registerNode(t),this.unsubscribe=t=>this._m.unregisterNode(t)}get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||"effcsschanges"}get settingsContent(){const t=null==r?void 0:r.querySelector("#"+(this.getAttribute("settingsid")||"effcss"));let s;return s=va(t)?JSON.parse((null==t?void 0:t.textContent)||"{}"):t?null==t?void 0:t.effcss:i,s||{}}get initContent(){const t=r.querySelectorAll("."+(this.getAttribute("initcls")||"effcss_init"));let s=e||{};return t.forEach((t=>{let e;e=va(t)?JSON.parse((null==t?void 0:t.textContent)||"{}"):null==t?void 0:t.effcss,s=Object.assign(Object.assign({},s),e||{})})),s}get configs(){return this._c.getConfigs()}connectedCallback(){this._r=(t=>{const{mode:s}=t,e=t=>Object.entries(t).reduce(((t,[s,e])=>(void 0!==e&&t.push(s+(e?"-"+e:"")),t)),[]).join(" "),i=(t,s)=>Object.defineProperties({[t]:s},{k:{value:t},v:{value:s}}),r=(...t)=>"--"+t.join("-"),n=(...t)=>t.join("-");return"c"===s?{selector:({b:t,e:s,m:e,mv:i})=>`.${t}${(s?"__"+s:"")+(e?"_"+e:"")+(e&&i?"_"+i:"")}`,attr:t=>s=>r=>{let n=r||"";ua(n)&&(n=e(n));const o=t+(s?"__"+s:"");return n=o+(n?" "+(null==n?void 0:n.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),i("class",n)},varName:r,kfName:n}:{selector:({b:t,e:s,m:e,mv:i})=>`[data-${t}${s?"-"+s:""}${e?'~="'+(e||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>s=>r=>{const n=`data-${t}${s?"-"+s:""}`;let o=r||"";return ua(o)&&(o=e(o)),i(n,o)},varName:r,kfName:n}})({mode:this.mode}),this._setState();const t=this.initContent,s=this.prefix;var e;this._c=(e={hydrate:this.hydrate,prefix:s,initContent:t},new ga(e)),this._p=function(t){return new h(t)}({sets:this._d.sets,keys:this._d.keys,resolver:this._r}),this._m=new f;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._n={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._n),this.use(this._mc),this.usePublic(t),r&&!this.isolated&&this._m.registerNode(r)}}),window.__EFFCSS_PARAMS__={name:s,styles:e,settings:i})}();
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const s=(...s)=>s.join(","),e="rem",t="-",r=" ",i="-x",a="-y",l="down",o="horizontal",n="vertical",c="text",b=c+t,p="font",m=p+t,f="column",d=f+t,g="max-",x="min-",h="content",u=h+"s",w="-items",$="self",v="inline",y="block",z="size",k="-radius",_="direction",j="outline",q="style",A=t+q,C="end",G=t+C,R="start",B=t+R,D="center",E="word",F="line",H="break",I=H+t,J="wrap",K="no"+J,L="rule",M="object",N="top",O=t+N,P="left",Q=t+P,S="bottom",T=t+S,U="right",V=t+U,W="width",X=t+W,Y="color",Z=t+Y,ss="overflow",es="align",ts="type",rs="transform",is="all",as="height",ls="normal",os="opacity",ns="visibility",cs="scale",bs="box",ps=t+bs,ms="border",fs="position",ds="none",gs="auto",xs="fill",hs="stroke",us="reverse",ws="space",$s="fixed",vs="origin",ys="alpha",zs="luminance",ks="clip",_s="zoom",js="scroll",qs="padding",As="margin",Cs="both",Gs="mode",Rs="repeat",Bs="light",Ds="linear",Es="hidden",Fs="shadow",Hs="behavior",Is="orientation",Js="name",Ks="after",Ls="before",Ms="image",Ns="list"+A,Os=Ns+t+ts,Ps=Ns+t+fs,Qs=Ns+t+Ms,Ss=Y+"-scheme",Ts=ms+T,Us=ms+Q,Vs=ms+V,Ws=ms+O,Xs=ms+t+y,Ys=ms+t+v,Zs=Xs+B,se=Xs+G,ee=Ys+B,te=Ys+G,re=ms+X,ie=Ts+X,ae=Us+X,le=Vs+X,oe=Ws+X,ne=Xs+X,ce=Ys+X,be=Zs+X,pe=se+X,me=ee+X,fe=te+X,de=ms+k,ge=Ts+Q+k,xe=Ts+V+k,he=Ws+Q+k,ue=Ws+V+k,we=ms+B+G+k,$e=ms+B+B+k,ve=ms+G+G+k,ye=ms+G+B+k,ze=ms+Z,ke=Us+Z,_e=Vs+Z,je=Ws+Z,qe=Ts+Z,Ae=Xs+Z,Ce=Ys+Z,Ge=Zs+Z,Re=se+Z,Be=ee+Z,De=te+Z,Ee=ms+A,Fe=Us+A,He=Vs+A,Ie=Ws+A,Je=Ts+A,Ke=Xs+A,Le=Ys+A,Me=Zs+A,Ne=se+A,Oe=ee+A,Pe=te+A,Qe=j+Z,Se=j+X,Te=j+A,Ue=j+t+"offset",Ve=ss+i,We=ss+a,Xe=M+t+"fit",Ye=M+t+fs,Ze=cs+t+l,st=bs+t+Fs,et=qs+ps,tt=ms+ps,rt=h+ps,it=xs+ps,at=hs+ps,lt="view"+ps,ot="no-"+ks,nt=Rs+i,ct=Rs+a,bt="no-"+Rs,pt=qs+Q,mt=qs+O,ft=qs+V,dt=qs+T,gt=As+Q,xt=As+O,ht=As+V,ut=As+T,wt="grid",$t="row",vt="gap",yt="justify",zt="flex",kt=zt+t,_t="place"+w,jt=v+t+zt,qt=kt+"basis",At=kt+"grow",Ct=kt+"shrink",Gt=kt+_,Rt=kt+J,Bt=yt+t+h,Dt=yt+w,Et=es+w,Ft=es+t+h,Ht=es+t+$,It=wt+t+"template",Jt=It+t+$t+"s",Kt=It+t+f+"s",Lt=$t+t+vt,Mt=d+vt,Nt=yt+t+$,Ot=wt+t+$t,Pt=Ot+G,Qt=Ot+B,St=wt+t+f,Tt=St+G,Ut=St+B,Vt=d+"count",Wt=d+xs,Xt=d+L,Yt=Xt+Z,Zt=Xt+A,sr=Xt+X,er=d+"span",tr=f+X,rr=$t+t+us,ir=d+us,ar=J+t+us,lr=zt+G,or=zt+B,nr=ws+"-between",cr=ws+"-around",br=ws+"-evenly",pr=v+t+wt,mr="mask-",fr=mr+ks,dr=mr+"composite",gr=mr+Gs,xr=mr+vs,hr=mr+fs,ur=mr+Rs,wr=mr+z,$r=mr+ts,vr="timing-function",yr="delay",zr="duration",kr="animation",_r=kr+t,jr=_r+Js,qr=_r+vr,Ar=_r+_,Cr=_r+"iteration-count",Gr=_r+zr,Rr=_r+yr,Br=_r+"play-state",Dr=_r+xs+t+Gs,Er="transition",Fr=Er+t,Hr=Fr+Hs,Ir=Fr+"property",Jr=Fr+vr,Kr=Fr+zr,Lr=Fr+yr,Mr="alternate",Nr=Mr+t+us,Or="-out",Pr="ease",Qr=Pr+"-in",Sr=Qr+Or,Tr=Pr+Or,Ur="step",Vr=Ur+B,Wr=Ur+G,Xr="translate",Yr="rotate",Zr="perspective",si=Zr+t+vs,ei=P+r+N,ti=U+r+N,ri=P+r+S,ii=U+r+S,ai="inset",li=ai+t,oi=rs+ps,ni=rs+t+vs,ci=rs+A,bi=li+y,pi=bi+G,mi=bi+B,fi=li+v,di=fi+G,gi=fi+B,xi="fit-"+h,hi=x+h,ui=g+h,wi=bs+"-sizing",$i=g+W,vi=x+W,yi=g+as,zi=x+as,ki=y+t+z,_i=g+ki,ji=x+ki,qi=v+t+z,Ai=g+qi,Ci=x+qi,Gi=js+t+Hs,Ri=js+t+As,Bi=Ri+O,Di=Ri+T,Ei=Ri+Q,Fi=Ri+V,Hi=Ri+t+y,Ii=Hi+G,Ji=Hi+B,Ki=Ri+t+v,Li=Ki+G,Mi=Ki+B,Ni=js+t+qs,Oi=Ni+O,Pi=Ni+T,Qi=Ni+Q,Si=Ni+V,Ti=Ni+t+y,Ui=Ti+G,Vi=Ti+B,Wi=Ni+t+v,Xi=Wi+G,Yi=Wi+B,Zi=js+t+"snap",sa=Zi+t+es,ea=Zi+t+"stop",ta=Zi+t+ts,ra="over"+Gi,ia=" mandatory",aa="x"+ia,la="y"+ia,oa=y+ia,na=v+ia,ca=Cs+ia,ba=" proximity",pa="x"+ba,ma="y"+ba,fa=y+ba,da=v+ba,ga=Cs+ba,xa=b+"decoration",ha=xa+t+Y,ua=xa+t+"thickness",wa=xa+t+q,$a=xa+t+F,va="white-"+ws,ya=b+rs,za=b+es,ka=n+t+es,_a=b+ss,ja=b+Is,qa=b+"rendering",Aa=b+Fs,Ca=b+"emphasis",Ga=Ca+Z,Ra=Ca+t+fs,Ba=Ca+A,Da=b+J,Ea=Da+t+Gs,Fa=Da+A,Ha=E+t+H,Ia=m+z,Ja=m+"weight",Ka=m+"family",La=m+q,Ma=m+"synthesis",Na=m+"variant",Oa=Na+t+Mr+"s",Pa=Na+"-caps",Qa=Na+"-numeric",Sa=Na+t+fs,Ta=Na+"-east-asian",Ua=Na+"-ligatures",Va=Na+"-settings",Wa="writing-"+Gs,Xa=F+t+as,Ya=F+t+H,Za=F+"-through",sl="over"+F,el="under"+F,tl="pre",rl=tl+t+F,il=tl+t+J,al=I+ws+"s",ll=I+is,ol=I+E,nl=I+Ks,cl=I+Ls,bl=o+"-tb",pl=n+"-lr",ml=n+"-rl",fl="keep-"+is,dl="pointer",gl="pan",xl=gl+i,hl=gl+Q,ul=gl+V,wl=gl+a,$l=gl+t+l,vl="pinch-"+_s,yl=n+t+c,zl="grab",kl=zl+"bing",_l="resize",jl="col-"+_l,ql="row-"+_l,Al="n-"+_l,Cl="e-"+_l,Gl="s-"+_l,Rl="w-"+_l,Bl="ne-"+_l,Dl="ew-"+_l,El="nw-"+_l,Fl="se-"+_l,Hl="sw-"+_l,Il="ns-"+_l,Jl="nesw-"+_l,Kl="nwse-"+_l,Ll=_s+t+"in",Ml=_s+t+"out",Nl=dl+"-events",Ol=js+t+fs,Pl="caret"+Z,Ql="accent"+Z,Sl="filter",Tl="backdrop-"+Sl,Ul="background",Vl=Ul+t,Wl=Vl+Ms,Xl=Vl+Y,Yl=Vl+ks,Zl=Vl+vs,so=Vl+fs,eo=so+i,to=so+a,ro=Vl+Rs,io=Vl+z,ao=Vl+"blend-"+Gs,lo=Vl+"attachment",oo="gradient",no=Ds+t+oo,co="radial-"+oo,bo="conic-"+oo,po=h+t+ns,mo=hs+X,fo=hs+t+os,go=xs+t+L,xo=xs+t+os,ho=Y+"-dodge",uo=Y+"-burn",wo="hard-"+Bs,$o="soft-"+Bs,vo=Y+"-mix",yo="revert",zo=yo+"-layer",ko="container",_o=ko+t+ts,jo=ko+t+Js,qo=":first-",Ao=":last-",Co=":only-",Go="child",Ro="of-type",Bo=":nth-child",Do="prefers-",Eo=Do+Ss,Fo="@media",Ho=Y+"-gamut",Io=Do+"contrast",Jo="scripting",Ko="::"+Ks,Lo="::"+Ls,Mo="sideways",No=Mo+V,Oo={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},Po=[...Array(12).keys()].reduce(((s,e)=>(s[e]=e,s)),{}),Qo={u:{ini:"initial",inh:"inherit",u:"unset",r:yo,rl:zo},rep:{rx:nt,ry:ct,r:Rs,s:ws,ro:"round",nr:bt},cnt:{n:ls,s:z,is:qi},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:ls,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:ls,nw:K,p:tl,pl:rl,pw:il,bs:al},wb:{n:ls,ba:ll,ka:fl,bw:ol},wm:{htb:bl,vlr:pl,vrl:ml},hyp:{no:ds,m:"manual",a:gs},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:Za,o:sl,u:el},tor:{m:"mixed",u:"upright",sr:No,s:Mo,ugo:"use-glyph-"+Is},ta:{l:P,c:D,j:yt,r:U,s:R,e:C},fr:Oo,coef:Po,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:hi,max:ui,fit:xi},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:gs,f:xs,sd:Ze},box:{c:rt,p:et,b:tt,f:it,s:at,v:lt,nc:ot,t:c},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:R,e:C,c:D,st:"stretch",sb:nr,sa:cr,se:br,b:"baseline",fs:or,fe:lr,no:ds},dis:{g:wt,ig:pr,f:zt,if:jt,b:y,i:v},ca:Po,co:Po,ra:Po,ro:Po,fd:{r:$t,rr:rr,c:f,cr:ir},fb:Oo,fo:Po,fg:Po,fs:Po,fw:{w:J,nw:K,wr:ar},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:gs,any:"anywhere",n:ls,l:"loose",s:"strict"},ls:{no:ds,dt:"dotted",i:ai,h:Es,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Es,s:js,a:gs,c:ks,e:"ellipsis"},v:{h:Es,v:"visible",c:"collapse",a:gs},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Ds,e:Pr,ei:Qr,eo:Tr,eio:Sr,ss:Vr,se:Wr},tp:{col:s(Y,Xl,ze,ha),icon:s(xs,hs),flt:s(Sl,Tl),ind:s(qs,As),sz:s(W,$i,vi,as,yi,zi),esz:s(ji,ki,_i,Ci,qi,Ai),o:os,b:ms,f:zt,g:wt,pos:s(fs,P,N,S,U),tf:s(rs,Xr,cs,Yr,"skew",Zr)},tb:{ad:"allow-discrete",n:ls},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:gs,sp:Ol,c:u,tf:rs,o:os,i:ai,tfi:s(rs,ai)},afm:{no:ds,f:"forwards",b:"backwards",both:Cs},adir:{r:us,a:Mr,ar:Nr},aps:{r:"running",p:"paused"},pe:{a:gs,no:ds,all:is,f:xs,s:hs},cur:{h:"help",a:gs,p:dl,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:c,vt:yl,cp:"copy",m:"move",g:zl,gng:kl,cr:jl,rr:ql,nr:Al,er:Cl,sr:Gl,wr:Rl,ner:Bl,ewr:Dl,nwr:El,ser:Fl,swr:Hl,nsr:Il,neswr:Jl,nwser:Kl,zi:Ll,zo:Ml},res:{n:ds,v:n,h:o,b:Cs},toa:{a:gs,no:ds,px:xl,pl:hl,pr:ul,py:wl,pu:"pan-up",pd:$l,pz:vl,m:"manipulation"},us:{n:ds,t:c,all:is,a:gs},sb:{a:gs,s:"smooth"},sss:{n:ls,a:"always"},sst:{n:ds,x:"x",y:"y",b:y,i:v,both:Cs,xm:aa,ym:la,bm:oa,im:na,bothm:ca,xp:pa,yp:ma,bp:fa,ip:da,bothp:ga},pos:{r:"relative",a:"absolute",f:$s,s:"static"},posv:{b:S,t:N,c:D,l:P,r:U,lt:ei,rt:ti,lb:ri,rb:ii},cf:{a:gs,b:"balance"},cs:{no:ds,all:is},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:ys,l:zs},mm:{a:ys,l:zs,m:"match-source"},bgbm:{n:ls,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Bs+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:Y,lum:"luminosity",cd:ho,cb:uo,hl:wo,sl:$o},bga:{s:js,f:$s,l:"local"}},So={a:kr,an:jr,adur:Gr,adel:Rr,aps:Br,afm:Dr,adir:Ar,aic:Cr,atf:qr,tn:Er,tdur:Kr,tdel:Lr,tb:Hr,tp:Ir,ttf:Jr,ba:nl,bb:cl,bor:ms,bw:re,br:de,bs:Ee,bls:Fe,brs:He,bts:Ie,bbs:Je,bbls:Ke,bis:Le,bbss:Me,bbes:Ne,biss:Oe,bies:Pe,brw:le,blw:ae,btw:oe,bbw:ie,btlr:he,btrr:ue,bbrr:xe,bblr:ge,biw:ce,bblw:ne,bbew:pe,bbsw:be,bisw:me,biew:fe,besr:ye,beer:ve,bssr:$e,bser:we,bc:ze,blc:ke,brc:_e,btc:je,bbc:qe,bblc:Ae,bic:Ce,bbsc:Ge,bbec:Re,bisc:Be,biec:De,bg:Ul,bgi:Wl,bgc:Xl,c:Y,cmix:vo,csh:Ss,acc:Ql,ctc:Pl,st:hs,stw:mo,sto:fo,fi:xs,fir:go,fio:xo,flt:Sl,bf:Tl,dis:"display",g:wt,jc:Bt,ji:Dt,ai:Et,pi:_t,ac:Ft,gt:It,gtr:Jt,gtc:Kt,gp:vt,rg:Lt,cg:Mt,as:Ht,js:Nt,gr:Ot,gre:Pt,grs:Qt,gc:St,gce:Tt,gcs:Ut,fx:zt,fxd:Gt,fxw:Rt,fxs:Ct,fxg:At,fxb:qt,ord:"order",dir:_,m:As,ml:gt,mr:ht,mt:xt,mb:ut,p:qs,pl:pt,pr:ft,pt:mt,pb:dt,out:j,oc:Qe,ow:Se,os:Te,oo:Ue,l:P,r:U,t:N,b:S,ins:ai,ib:bi,ibe:pi,ibs:mi,ii:fi,iie:di,iis:gi,wc:"will-change",app:"appearance",pe:Nl,cur:"cursor",toa:"touch-action",us:"user-select",res:_l,lis:Ns,lisp:Ps,lisi:Qs,list:Os,sb:Gi,ssa:sa,sss:ea,sst:ta,sm:Ri,sml:Ei,smr:Fi,smt:Bi,smb:Di,sp:Ni,spl:Qi,spr:Si,spt:Oi,spb:Pi,smbl:Hi,smbe:Ii,smbs:Ji,smi:Ki,smie:Li,smis:Mi,spbl:Ti,spbe:Ui,spbs:Vi,spi:Wi,spie:Xi,spis:Yi,osb:ra,ar:"aspect-ratio",w:W,maxw:$i,minw:vi,h:as,minh:zi,maxh:yi,bl:ki,maxb:_i,minb:ji,i:qi,mini:Ci,maxi:Ai,per:Zr,pero:si,rot:Yr,sc:cs,tf:rs,tfb:oi,tfo:ni,tfs:ci,tr:Xr,z:_s,lts:"letter-spacing",lh:Xa,lb:Ya,f:p,fst:La,ff:Ka,fwg:Ja,fsz:Ia,fsn:Ma,fv:Na,fva:Oa,fvc:Pa,fvea:Ta,fvl:Ua,fvn:Qa,fvs:Va,fvp:Sa,tt:ya,td:xa,tdt:ua,tds:wa,tdl:$a,ta:za,to:_a,trg:qa,ts:Aa,te:Ca,tep:Ra,tec:Ga,tes:Ba,tw:Da,twm:Ea,tws:Fa,va:ka,ws:va,tor:ja,wb:Ha,wm:Wa,hyp:"hyphens",bsz:wi,bsh:st,pos:fs,cf:Wt,crs:Zt,crc:Yt,crw:sr,cs:er,cw:tr,cc:Vt,bgcl:Yl,bgp:so,bgpx:eo,bgpy:to,bgbm:ao,bgo:Zl,bgr:ro,bga:lo,bgsz:io,mcl:fr,mcm:dr,mm:gr,mo:xr,mp:hr,mre:ur,msz:wr,mtp:$r,obf:Xe,obp:Ye,con:h,ov:ss,ovx:Ve,ovy:We,v:ns,cv:po,o:os,zi:"z-index",lgr:no,rgr:co,cgr:bo,inf:"infinite",cnt:_o,cnn:jo,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:qo+Go,$lc:Ao+Go,$oc:Co+Go,$1:Bo+"(odd)",$2:Bo+"(even)",$ft:qo+Ro,$lt:Ao+Ro,$ot:Co+Ro,$bef:Lo,$aft:Ko,$bd:"::backdrop",$ba:`&${Lo},&${Ko}`,$pl:":placeholder",$light:Fo+`(${Eo}: light)`,$dark:Fo+`(${Eo}: dark)`,$red_m:Fo+"(prefers-reduced-motion: reduce)",$ori_l:Fo+`(${Is}: landscape)`,$ori_p:Fo+`(${Is}: portrait)`,$gam_srgb:Fo+`(${Ho}: srgb)`,$gam_p3:Fo+`(${Ho}: p3)`,$gam_rec:Fo+`(${Ho}: rec2020)`,$con_no:Fo+`(${Io}: no-preference)`,$con_m:Fo+`(${Io}: more)`,$con_l:Fo+`(${Io}: less)`,$con_c:Fo+`(${Io}: custom)`,$scr_no:Fo+`(${Jo}: none)`,$scr_ini:Fo+`(${Jo}: initial-only)`,$scr_en:Fo+`(${Jo}: enabled)`},To={xs:30+e,sm:40+e,md:48+e,lg:64+e,xl:80+e},Uo={xs:10+e,sm:20+e,md:30+e,lg:40+e,xl:48+e},Vo={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},Wo={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},Xo="{1}rem",Yo="{1}deg",Zo="span {1}",sn={fb:"calc(100% * {1})",ra:Zo,ca:Zo,sz:Xo,sp:Xo,rad:Xo,th:Xo,bp:Xo,cbp:Xo,fsz:Xo,lsp:Xo,tr:Xo,pers:Xo,sk:Yo,rot:Yo,time:"{1}ms"},en="eff",tn="effcss",rn="effcss_init",an="style-provider",ln="effcsschanges";export{ln as EVENT_NAME,en as PREFIX,an as PROVIDER_TAG_NAME,tn as SETTINGS_SCRIPT_ID,rn as STYLES_SCRIPT_CLS,Uo as containerBP,So as keys,To as mediaBP,Vo as rootStyle,Qo as sets,Wo as themes,sn as units};
|
|
1
|
+
const s=(...s)=>s.join(","),e="rem",t="-",r=" ",i="-x",a="-y",l="down",n="horizontal",o="vertical",c="text",b=c+t,p="font",m=p+t,f="column",d=f+t,g="max-",x="min-",h="content",u=h+"s",w="-items",$="self",v="inline",y="block",z="size",k="-radius",_="direction",j="outline",q="style",A=t+q,C="end",G=t+C,R="start",B=t+R,D="center",E="word",F="line",H="break",I=H+t,J="wrap",K="no"+J,L="rule",M="object",N="top",O=t+N,P="left",Q=t+P,S="bottom",T=t+S,U="right",V=t+U,W="width",X=t+W,Y="color",Z=t+Y,ss="overflow",es="align",ts="type",rs="transform",is="all",as="height",ls="normal",ns="opacity",os="visibility",cs="scale",bs="box",ps=t+bs,ms="border",fs="position",ds="none",gs="auto",xs="fill",hs="stroke",us="reverse",ws="space",$s="fixed",vs="origin",ys="alpha",zs="luminance",ks="clip",_s="zoom",js="scroll",qs="padding",As="margin",Cs="both",Gs="mode",Rs="repeat",Bs="light",Ds="linear",Es="hidden",Fs="shadow",Hs="behavior",Is="orientation",Js="name",Ks="after",Ls="before",Ms="image",Ns="list"+A,Os=Ns+t+ts,Ps=Ns+t+fs,Qs=Ns+t+Ms,Ss=Y+"-scheme",Ts=ms+T,Us=ms+Q,Vs=ms+V,Ws=ms+O,Xs=ms+t+y,Ys=ms+t+v,Zs=Xs+B,se=Xs+G,ee=Ys+B,te=Ys+G,re=ms+X,ie=Ts+X,ae=Us+X,le=Vs+X,ne=Ws+X,oe=Xs+X,ce=Ys+X,be=Zs+X,pe=se+X,me=ee+X,fe=te+X,de=ms+k,ge=Ts+Q+k,xe=Ts+V+k,he=Ws+Q+k,ue=Ws+V+k,we=ms+B+G+k,$e=ms+B+B+k,ve=ms+G+G+k,ye=ms+G+B+k,ze=ms+Z,ke=Us+Z,_e=Vs+Z,je=Ws+Z,qe=Ts+Z,Ae=Xs+Z,Ce=Ys+Z,Ge=Zs+Z,Re=se+Z,Be=ee+Z,De=te+Z,Ee=ms+A,Fe=Us+A,He=Vs+A,Ie=Ws+A,Je=Ts+A,Ke=Xs+A,Le=Ys+A,Me=Zs+A,Ne=se+A,Oe=ee+A,Pe=te+A,Qe=j+Z,Se=j+X,Te=j+A,Ue=j+t+"offset",Ve=ss+i,We=ss+a,Xe=M+t+"fit",Ye=M+t+fs,Ze=cs+t+l,st=bs+t+Fs,et=qs+ps,tt=ms+ps,rt=h+ps,it=xs+ps,at=hs+ps,lt="view"+ps,nt="no-"+ks,ot=Rs+i,ct=Rs+a,bt="no-"+Rs,pt=qs+Q,mt=qs+O,ft=qs+V,dt=qs+T,gt=As+Q,xt=As+O,ht=As+V,ut=As+T,wt="grid",$t="row",vt="gap",yt="justify",zt="flex",kt=zt+t,_t="place"+w,jt=v+t+zt,qt=kt+"basis",At=kt+"grow",Ct=kt+"shrink",Gt=kt+_,Rt=kt+J,Bt=yt+t+h,Dt=yt+w,Et=es+w,Ft=es+t+h,Ht=es+t+$,It=wt+t+"template",Jt=It+t+$t+"s",Kt=It+t+f+"s",Lt=$t+t+vt,Mt=d+vt,Nt=yt+t+$,Ot=wt+t+$t,Pt=Ot+G,Qt=Ot+B,St=wt+t+f,Tt=St+G,Ut=St+B,Vt=d+"count",Wt=d+xs,Xt=d+L,Yt=Xt+Z,Zt=Xt+A,sr=Xt+X,er=d+"span",tr=f+X,rr=$t+t+us,ir=d+us,ar=J+t+us,lr=zt+G,nr=zt+B,or=ws+"-between",cr=ws+"-around",br=ws+"-evenly",pr=v+t+wt,mr="mask-",fr=mr+ks,dr=mr+"composite",gr=mr+Gs,xr=mr+vs,hr=mr+fs,ur=mr+Rs,wr=mr+z,$r=mr+ts,vr="timing-function",yr="delay",zr="duration",kr="animation",_r=kr+t,jr=_r+Js,qr=_r+vr,Ar=_r+_,Cr=_r+"iteration-count",Gr=_r+zr,Rr=_r+yr,Br=_r+"play-state",Dr=_r+xs+t+Gs,Er="transition",Fr=Er+t,Hr=Fr+Hs,Ir=Fr+"property",Jr=Fr+vr,Kr=Fr+zr,Lr=Fr+yr,Mr="alternate",Nr=Mr+t+us,Or="-out",Pr="ease",Qr=Pr+"-in",Sr=Qr+Or,Tr=Pr+Or,Ur="step",Vr=Ur+B,Wr=Ur+G,Xr="translate",Yr="rotate",Zr="perspective",si=Zr+t+vs,ei=P+r+N,ti=U+r+N,ri=P+r+S,ii=U+r+S,ai="inset",li=ai+t,ni=rs+ps,oi=rs+t+vs,ci=rs+A,bi=li+y,pi=bi+G,mi=bi+B,fi=li+v,di=fi+G,gi=fi+B,xi="fit-"+h,hi=x+h,ui=g+h,wi=bs+"-sizing",$i=g+W,vi=x+W,yi=g+as,zi=x+as,ki=y+t+z,_i=g+ki,ji=x+ki,qi=v+t+z,Ai=g+qi,Ci=x+qi,Gi=js+t+Hs,Ri=js+t+As,Bi=Ri+O,Di=Ri+T,Ei=Ri+Q,Fi=Ri+V,Hi=Ri+t+y,Ii=Hi+G,Ji=Hi+B,Ki=Ri+t+v,Li=Ki+G,Mi=Ki+B,Ni=js+t+qs,Oi=Ni+O,Pi=Ni+T,Qi=Ni+Q,Si=Ni+V,Ti=Ni+t+y,Ui=Ti+G,Vi=Ti+B,Wi=Ni+t+v,Xi=Wi+G,Yi=Wi+B,Zi=js+t+"snap",sa=Zi+t+es,ea=Zi+t+"stop",ta=Zi+t+ts,ra="over"+Gi,ia=" mandatory",aa="x"+ia,la="y"+ia,na=y+ia,oa=v+ia,ca=Cs+ia,ba=" proximity",pa="x"+ba,ma="y"+ba,fa=y+ba,da=v+ba,ga=Cs+ba,xa=b+"decoration",ha=xa+t+Y,ua=xa+t+"thickness",wa=xa+t+q,$a=xa+t+F,va="white-"+ws,ya=b+rs,za=b+es,ka=o+t+es,_a=b+ss,ja=b+Is,qa=b+"rendering",Aa=b+Fs,Ca=b+"emphasis",Ga=Ca+Z,Ra=Ca+t+fs,Ba=Ca+A,Da=b+J,Ea=Da+t+Gs,Fa=Da+A,Ha=E+t+H,Ia=m+z,Ja=m+"weight",Ka=m+"family",La=m+q,Ma=m+"synthesis",Na=m+"variant",Oa=Na+t+Mr+"s",Pa=Na+"-caps",Qa=Na+"-numeric",Sa=Na+t+fs,Ta=Na+"-east-asian",Ua=Na+"-ligatures",Va=Na+"-settings",Wa="writing-"+Gs,Xa=F+t+as,Ya=F+t+H,Za=F+"-through",sl="over"+F,el="under"+F,tl="pre",rl=tl+t+F,il=tl+t+J,al=I+ws+"s",ll=I+is,nl=I+E,ol=I+Ks,cl=I+Ls,bl=n+"-tb",pl=o+"-lr",ml=o+"-rl",fl="keep-"+is,dl="pointer",gl="pan",xl=gl+i,hl=gl+Q,ul=gl+V,wl=gl+a,$l=gl+t+l,vl="pinch-"+_s,yl=o+t+c,zl="grab",kl=zl+"bing",_l="resize",jl="col-"+_l,ql="row-"+_l,Al="n-"+_l,Cl="e-"+_l,Gl="s-"+_l,Rl="w-"+_l,Bl="ne-"+_l,Dl="ew-"+_l,El="nw-"+_l,Fl="se-"+_l,Hl="sw-"+_l,Il="ns-"+_l,Jl="nesw-"+_l,Kl="nwse-"+_l,Ll=_s+t+"in",Ml=_s+t+"out",Nl=dl+"-events",Ol=js+t+fs,Pl="caret"+Z,Ql="accent"+Z,Sl="filter",Tl="backdrop-"+Sl,Ul="background",Vl=Ul+t,Wl=Vl+Ms,Xl=Vl+Y,Yl=Vl+ks,Zl=Vl+vs,sn=Vl+fs,en=sn+i,tn=sn+a,rn=Vl+Rs,an=Vl+z,ln=Vl+"blend-"+Gs,nn=Vl+"attachment",on="gradient",cn=Ds+t+on,bn="radial-"+on,pn="conic-"+on,mn=h+t+os,fn=hs+X,dn=hs+t+ns,gn=xs+t+L,xn=xs+t+ns,hn=Y+"-dodge",un=Y+"-burn",wn="hard-"+Bs,$n="soft-"+Bs,vn=Y+"-mix",yn="revert",zn=yn+"-layer",kn="container",_n=kn+t+ts,jn=kn+t+Js,qn=":first-",An=":last-",Cn=":only-",Gn="child",Rn="of-type",Bn=":nth-child",Dn="prefers-",En=Dn+Ss,Fn="@media",Hn=Y+"-gamut",In=Dn+"contrast",Jn="scripting",Kn="::"+Ks,Ln="::"+Ls,Mn="sideways",Nn=Mn+V,On={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},Pn=[...Array(12).keys()].reduce(((s,e)=>(s[e]=e,s)),{}),Qn={u:{ini:"initial",inh:"inherit",u:"unset",r:yn,rl:zn},rep:{rx:ot,ry:ct,r:Rs,s:ws,ro:"round",nr:bt},cnt:{n:ls,s:z,is:qi},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:ls,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:ls,nw:K,p:tl,pl:rl,pw:il,bs:al},wb:{n:ls,ba:ll,ka:fl,bw:nl},wm:{htb:bl,vlr:pl,vrl:ml},hyp:{no:ds,m:"manual",a:gs},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:Za,o:sl,u:el},tor:{m:"mixed",u:"upright",sr:Nn,s:Mn,ugo:"use-glyph-"+Is},ta:{l:P,c:D,j:yt,r:U,s:R,e:C},fr:On,coef:Pn,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:hi,max:ui,fit:xi},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:gs,f:xs,sd:Ze},box:{c:rt,p:et,b:tt,f:it,s:at,v:lt,nc:nt,t:c},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:R,e:C,c:D,st:"stretch",sb:or,sa:cr,se:br,b:"baseline",fs:nr,fe:lr,no:ds},dis:{g:wt,ig:pr,f:zt,if:jt,b:y,i:v},ca:Pn,co:Pn,ra:Pn,ro:Pn,fd:{r:$t,rr:rr,c:f,cr:ir},fb:On,fo:Pn,fg:Pn,fs:Pn,fw:{w:J,nw:K,wr:ar},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:gs,any:"anywhere",n:ls,l:"loose",s:"strict"},ls:{no:ds,dt:"dotted",i:ai,h:Es,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Es,s:js,a:gs,c:ks,e:"ellipsis"},v:{h:Es,v:"visible",c:"collapse",a:gs},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Ds,e:Pr,ei:Qr,eo:Tr,eio:Sr,ss:Vr,se:Wr},tp:{col:s(Y,Xl,ze,ha),icon:s(xs,hs),flt:s(Sl,Tl),ind:s(qs,As),sz:s(W,$i,vi,as,yi,zi),esz:s(ji,ki,_i,Ci,qi,Ai),o:ns,b:ms,f:zt,g:wt,pos:s(fs,P,N,S,U),tf:s(rs,Xr,cs,Yr,"skew",Zr)},tb:{ad:"allow-discrete",n:ls},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:gs,sp:Ol,c:u,tf:rs,o:ns,i:ai,tfi:s(rs,ai)},afm:{no:ds,f:"forwards",b:"backwards",both:Cs},adir:{r:us,a:Mr,ar:Nr},aps:{r:"running",p:"paused"},pe:{a:gs,no:ds,all:is,f:xs,s:hs},cur:{h:"help",a:gs,p:dl,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:c,vt:yl,cp:"copy",m:"move",g:zl,gng:kl,cr:jl,rr:ql,nr:Al,er:Cl,sr:Gl,wr:Rl,ner:Bl,ewr:Dl,nwr:El,ser:Fl,swr:Hl,nsr:Il,neswr:Jl,nwser:Kl,zi:Ll,zo:Ml},res:{n:ds,v:o,h:n,b:Cs},toa:{a:gs,no:ds,px:xl,pl:hl,pr:ul,py:wl,pu:"pan-up",pd:$l,pz:vl,m:"manipulation"},us:{n:ds,t:c,all:is,a:gs},sb:{a:gs,s:"smooth"},sss:{n:ls,a:"always"},sst:{n:ds,x:"x",y:"y",b:y,i:v,both:Cs,xm:aa,ym:la,bm:na,im:oa,bothm:ca,xp:pa,yp:ma,bp:fa,ip:da,bothp:ga},pos:{r:"relative",a:"absolute",f:$s,s:"static"},posv:{b:S,t:N,c:D,l:P,r:U,lt:ei,rt:ti,lb:ri,rb:ii},cf:{a:gs,b:"balance"},cs:{no:ds,all:is},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:ys,l:zs},mm:{a:ys,l:zs,m:"match-source"},bgbm:{n:ls,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Bs+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:Y,lum:"luminosity",cd:hn,cb:un,hl:wn,sl:$n},bga:{s:js,f:$s,l:"local"}},Sn={a:kr,an:jr,adur:Gr,adel:Rr,aps:Br,afm:Dr,adir:Ar,aic:Cr,atf:qr,tn:Er,tdur:Kr,tdel:Lr,tb:Hr,tp:Ir,ttf:Jr,ba:ol,bb:cl,bor:ms,bw:re,br:de,bs:Ee,bls:Fe,brs:He,bts:Ie,bbs:Je,bbls:Ke,bis:Le,bbss:Me,bbes:Ne,biss:Oe,bies:Pe,brw:le,blw:ae,btw:ne,bbw:ie,btlr:he,btrr:ue,bbrr:xe,bblr:ge,biw:ce,bblw:oe,bbew:pe,bbsw:be,bisw:me,biew:fe,besr:ye,beer:ve,bssr:$e,bser:we,bc:ze,blc:ke,brc:_e,btc:je,bbc:qe,bblc:Ae,bic:Ce,bbsc:Ge,bbec:Re,bisc:Be,biec:De,bg:Ul,bgi:Wl,bgc:Xl,c:Y,cmix:vn,csh:Ss,acc:Ql,ctc:Pl,st:hs,stw:fn,sto:dn,fi:xs,fir:gn,fio:xn,flt:Sl,bf:Tl,dis:"display",g:wt,jc:Bt,ji:Dt,ai:Et,pi:_t,ac:Ft,gt:It,gtr:Jt,gtc:Kt,gp:vt,rg:Lt,cg:Mt,as:Ht,js:Nt,gr:Ot,gre:Pt,grs:Qt,gc:St,gce:Tt,gcs:Ut,fx:zt,fxd:Gt,fxw:Rt,fxs:Ct,fxg:At,fxb:qt,ord:"order",dir:_,m:As,ml:gt,mr:ht,mt:xt,mb:ut,p:qs,pl:pt,pr:ft,pt:mt,pb:dt,out:j,oc:Qe,ow:Se,os:Te,oo:Ue,l:P,r:U,t:N,b:S,ins:ai,ib:bi,ibe:pi,ibs:mi,ii:fi,iie:di,iis:gi,wc:"will-change",app:"appearance",pe:Nl,cur:"cursor",toa:"touch-action",us:"user-select",res:_l,lis:Ns,lisp:Ps,lisi:Qs,list:Os,sb:Gi,ssa:sa,sss:ea,sst:ta,sm:Ri,sml:Ei,smr:Fi,smt:Bi,smb:Di,sp:Ni,spl:Qi,spr:Si,spt:Oi,spb:Pi,smbl:Hi,smbe:Ii,smbs:Ji,smi:Ki,smie:Li,smis:Mi,spbl:Ti,spbe:Ui,spbs:Vi,spi:Wi,spie:Xi,spis:Yi,osb:ra,ar:"aspect-ratio",w:W,maxw:$i,minw:vi,h:as,minh:zi,maxh:yi,bl:ki,maxb:_i,minb:ji,i:qi,mini:Ci,maxi:Ai,per:Zr,pero:si,rot:Yr,sc:cs,tf:rs,tfb:ni,tfo:oi,tfs:ci,tr:Xr,z:_s,lts:"letter-spacing",lh:Xa,lb:Ya,f:p,fst:La,ff:Ka,fwg:Ja,fsz:Ia,fsn:Ma,fv:Na,fva:Oa,fvc:Pa,fvea:Ta,fvl:Ua,fvn:Qa,fvs:Va,fvp:Sa,tt:ya,td:xa,tdt:ua,tds:wa,tdl:$a,ta:za,to:_a,trg:qa,ts:Aa,te:Ca,tep:Ra,tec:Ga,tes:Ba,tw:Da,twm:Ea,tws:Fa,va:ka,ws:va,tor:ja,wb:Ha,wm:Wa,hyp:"hyphens",bsz:wi,bsh:st,pos:fs,cf:Wt,crs:Zt,crc:Yt,crw:sr,cs:er,cw:tr,cc:Vt,bgcl:Yl,bgp:sn,bgpx:en,bgpy:tn,bgbm:ln,bgo:Zl,bgr:rn,bga:nn,bgsz:an,mcl:fr,mcm:dr,mm:gr,mo:xr,mp:hr,mre:ur,msz:wr,mtp:$r,obf:Xe,obp:Ye,con:h,ov:ss,ovx:Ve,ovy:We,v:os,cv:mn,o:ns,zi:"z-index",lgr:cn,rgr:bn,cgr:pn,inf:"infinite",cnt:_n,cnn:jn,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:qn+Gn,$lc:An+Gn,$oc:Cn+Gn,$1:Bn+"(odd)",$2:Bn+"(even)",$ft:qn+Rn,$lt:An+Rn,$ot:Cn+Rn,$bef:Ln,$aft:Kn,$bd:"::backdrop",$ba:`&${Ln},&${Kn}`,$pl:":placeholder",$light:Fn+`(${En}: light)`,$dark:Fn+`(${En}: dark)`,$red_m:Fn+"(prefers-reduced-motion: reduce)",$ori_l:Fn+`(${Is}: landscape)`,$ori_p:Fn+`(${Is}: portrait)`,$gam_srgb:Fn+`(${Hn}: srgb)`,$gam_p3:Fn+`(${Hn}: p3)`,$gam_rec:Fn+`(${Hn}: rec2020)`,$con_no:Fn+`(${In}: no-preference)`,$con_m:Fn+`(${In}: more)`,$con_l:Fn+`(${In}: less)`,$con_c:Fn+`(${In}: custom)`,$scr_no:Fn+`(${Jn}: none)`,$scr_ini:Fn+`(${Jn}: initial-only)`,$scr_en:Fn+`(${Jn}: enabled)`,$ss:"@starting-style",$ns:"@namespace"},Tn={xs:30+e,sm:40+e,md:48+e,lg:64+e,xl:80+e},Un={xs:10+e,sm:20+e,md:30+e,lg:40+e,xl:48+e},Vn={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},Wn={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},Xn="{1}rem",Yn="{1}deg",Zn="span {1}",so={fb:"calc(100% * {1})",ra:Zn,ca:Zn,sz:Xn,sp:Xn,rad:Xn,th:Xn,bp:Xn,cbp:Xn,fsz:Xn,lsp:Xn,tr:Xn,pers:Xn,sk:Yn,rot:Yn,time:"{1}ms"},eo="eff",to="effcss",ro="effcss_init",io="style-provider",ao="effcsschanges";export{ao as EVENT_NAME,eo as PREFIX,io as PROVIDER_TAG_NAME,to as SETTINGS_SCRIPT_ID,ro as STYLES_SCRIPT_CLS,Un as containerBP,Sn as keys,Tn as mediaBP,Vn as rootStyle,Qn as sets,Wn as themes,so as units};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{units as t,keys as s,sets as e,PREFIX as i,EVENT_NAME as n,SETTINGS_SCRIPT_ID as r,STYLES_SCRIPT_CLS as h,PROVIDER_TAG_NAME as o,mediaBP as l,containerBP as c,rootStyle as a,themes as u}from"./constants.js";import{createResolver as _,createCollector as d}from"./utils/common.js";const f=Object.entries,m=(t,s,e)=>f(t).reduce(s,e),g=t=>"object"==typeof t,p=t=>`{${t}}`,v=Object.assign.bind(Object),y=(t,s)=>`${t}:${s};`,b=(t,s)=>["@property",t,p(y("syntax",s.syn||'"*"')+y("inherits",s.inh||!1)+(s.ini?y("initial-value",s.ini):""))].join(" "),$=t=>`var(${t})`,j=({l:t,c:s,h:e,a:i=1})=>`oklch(${t} ${s} ${e} / ${i})`,k=["l","c","h","a"];class S{constructor(t){this._k={},this._s={},this._sel=t=>{let s,e,i,n,r;return[s,r]=t.split(":"),s.startsWith("__")?[e,i,n]=s.slice(2).split("_"):[e,i,n]=s.split("_"),{e:e,m:i,mv:n,s:r}},this._var=(...t)=>this._r.varName(...t),this._kf=(...t)=>this._r.kfName(...t),this.compile=(t,s)=>{const{_:e,kf:i,k:n={},v:r={},c:h}=s,o=this._r.selector.bind(this),l=this._sel;let c=v({},h),a=v({},n),u=v({_:{}},r),_="";if(e)for(let s in e){const i=e[s];if("c"===i.typ){const e={};k.forEach((n=>{const r=s+n,h=this._var(t,r);e[n]=h,a["_"+r]=e[n],_+=b(h,i)})),u._[s]=j({l:$(e.l),c:$(e.c),h:$(e.h),a:$(e.a)}),i.all&&(c["_"+s+"l"]=`&lig=>${this._var(t,s+"l")}:{1}`,c["_"+s+"c"]=`&chr=>${this._var(t,s+"c")}:{1}`,c["_"+s+"h"]=`&hue=>${this._var(t,s+"h")}:{1}`,c["_"+s+"a"]=`&alp=>${this._var(t,s+"a")}:{1}`)}else{const e=this._var(t,s);a["_"+s]=e,u._[s]=$(e),_+=b(e,i)}}const d=t=>a[t]||this._k[t],S=t=>{var s;return u[t]||this._s[t]||(null===(s=this._s)||void 0===s?void 0:s.root[t])},A=t=>t.replaceAll(/\{(.+?)\}/g,((t,s)=>{const[e,i]=s.split(".");let n;if(i){const t=S(e);n=(null==t?void 0:t[i])||(null==t?void 0:t.def)||""}else n=d(e)||"";return""+n})),x=t=>{const s=t.split("?");let e;for(let t in s){const i=s[t],[n,r]=i.split("=>"),h=n.match(/(\w+)(\[[\w,]+\])?/);if(!h)continue;const[o,l,c]=h,a=S(l);if(!a)continue;e=a;let u=f(e);const _=null==c?void 0:c.slice(1,-1).split(",");if(_){const t=new Set(_);u=u.filter((([s,e])=>t.has(s)))}if(r){let[t,s]=r.split("|");void 0===s&&(s=t,t=""),u=u.map((([e,i])=>[t.replace("{0}",e)||e,A(s.replaceAll("{1}",""+i))]))}(_||r)&&(e=Object.fromEntries(u));break}return e};function O(s,e,i){var n,r,h,c;let a=""+s;if((null===(n=null==s?void 0:s.startsWith)||void 0===n?void 0:n.call(s,"$"))&&(a=""+d(s.slice(1)),!a))return"";if(Array.isArray(e))return O(a,Object.assign({},...e.map((t=>"string"==typeof t?x(t):t))),i);if(null==e)return"";if(g(e)){const s=!i||(null===(r=i.startsWith)||void 0===r?void 0:r.call(i,"@"))||a.startsWith("&")||a.startsWith("@")?"":"&";if(a.startsWith("_")){const{e:i,m:n,mv:r}=l(a);return n&&"string"!=typeof r?m(e,((e,[r,h])=>{let l;return l=g(h)?m(h,((t,s)=>t+O(...s,a)),""):h+";",e+s+o({b:t,e:i,m:n,mv:r})+p(l)}),""):s+o({b:t,e:i,m:n,mv:r})+p(m(e,((t,s)=>t+O(...s,a)),""))}return s+a+p(m(e,((t,s)=>t+O(...s,a)),""))}{let t=""+e;return(null===(h=null==t?void 0:t.startsWith)||void 0===h?void 0:h.call(t,"&"))?O(a,x(t.slice(1)),i):(null===(c=null==t?void 0:t.includes)||void 0===c?void 0:c.call(t,"{"))?O(a,A(t),i):y(a.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let w="";if(i)for(let s in i){const e=i[s],n=this._kf(t,s);a["kf_"+s]=n,w+=`@keyframes ${n} `+p(m(e,((t,[s,e])=>t+s+(String(+s)===s?"%":"")+p(m(e,((t,s)=>t+O(...s)),""))),""))}return _+w+m(c,((t,s)=>t+O(...s)),"")};const{sets:s,keys:e,resolver:i}=t;this._r=i,e&&(this._k=e),s&&(this._s=s)}}const A=t=>Array.isArray(t)?t:[t];class x{constructor(){this._s={},this._r={},this._a=[],this._l=[],this.getIndex=t=>this._a.findIndex((s=>s===t)),this.get=t=>this._s[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._s,this.add=(t,s)=>{if(!this._s[t])return this._s[t]=s,this._a.push(s),this.notify(),!0},this.status=t=>{const s=this.get(t);return!!s&&-1!==this.getIndex(s)},this.on=t=>{const s=A(t).reduce(((t,s)=>{const e=this.get(s);return!(!e||this.status(s))&&(this._a.push(e),t)}),!0);return this.notify(),s},this.off=t=>{const s=A(t).reduce(((t,s)=>{const e=this.get(s);if(e&&this.status(s)){const s=this.getIndex(e);return this._a.splice(s,1),t}return!1}),!0);return this.notify(),s},this.remove=t=>{const s=this.get(t);if(!s)return;const e=this.getIndex(s);return e>-1&&(this._a.splice(e,1),delete this._s[t],delete this._r[t]),this.notify(),!0},this.pack=(t,s)=>{const e=new CSSStyleSheet;if(e.replaceSync(s),e.cssRules.length)return this.add(t,e);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,s)=>{const e=this._s[t];if(e)return e.replaceSync(s),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._a},this.registerNode=t=>{this._l.findIndex((s=>s.deref()===t))>=0||(this._l.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const s=this._l.findIndex((s=>s.deref()===t));s>=0&&this._l.splice(s,1)},this.notify=()=>{this._l=this._l.reduce(((t,s)=>{const e=s.deref();return e&&(this.apply(e),t.push(s)),t}),[])}}removeAll(){return this._a.splice(0),this._s={},this._r={},this.notify(),!0}}const O=Object.entries,w=t=>"application/json"===(null==t?void 0:t.getAttribute("type")),E=t=>Array.isArray(t)?t:[t];function C(f={}){const{name:m=o,styles:g={},settings:p={}}=f,v=window.document,y=window.customElements;return!(null==y?void 0:y.get(m))&&(y.define(m,class extends HTMLElement{constructor(){super(...arguments),this._setState=()=>{const{units:i={},keys:n={},sets:r,mediaBP:h=l,containerBP:o=c,rootStyle:_=a,themes:d=u}=this.settingsContent,f=Object.assign(Object.assign({},t),i),g=Object.assign(Object.assign({},s),n),p=Object.assign({},e);r&&O(r).forEach((([t,s])=>p[t]=Object.assign({},s)));const v=O(d);if(f)for(const t in f)p[t]=p[t]&&Object.fromEntries(O(p[t]).map((([s,e])=>[s,f[t].replace("{1}",""+e)])));h&&O(h).forEach((([t,s])=>{g[`min_${t}_`]=`@media (min-width:${s})`,g[`max_${t}_`]=`@media (max-width:${s})`})),o&&O(o).forEach((([t,s])=>{g[`cmin_${t}_`]=`@container (min-width:${s})`,g[`cmax_${t}_`]=`@container (max-width:${s})`}));const y={},b={};d&&p&&v.forEach((([t,s])=>{const e={};O(s).forEach((([t,s])=>{O(s).forEach((([s,i])=>{var n;const r=this._r.varName(this.prefix,t,s);f[t]?e[r]=f[t].replace("{1}",""+i):e[r]=i,y[r]||(y[r]=(null===(n=p[t])||void 0===n?void 0:n[s])||"unset",p[t]||(p[t]={}),p[t][s]=`var(${r})`)}))})),b[t]=e})),this._d={sets:p,keys:g},this._mc={c:Object.assign(Object.assign({[m]:{display:"contents"},_theme:b,$$:Object.assign(y,_)},(null==b?void 0:b.dark)?{$$dark:{$$:b.dark}}:{}),(null==b?void 0:b.light)?{$$light:{$$:b.light}}:{})}},this._res=t=>"string"==typeof t?t:this._c.getKey(t),this.use=(t,s)=>{let e=this._c.use(t,s);return this._m&&!this._m.has(s)&&this._m.pack(e,this.css(t,e)),this.resolve(e)},this.alter=(t,s)=>{const e=this._res(t);if(e){const t=this._c.mutate(e,s);this._m.replace(e,this.css(t,e))}return this.resolve(e)},this.usePublic=t=>Object.fromEntries(O(t).map((([t,s])=>[t,this.use(s,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,s)=>{var e;return null===(e=this._p)||void 0===e?void 0:e.compile(s,t)},this.status=t=>{const s=this._res(t);return!!s&&this._m.status(s)},this.on=t=>this._m.on(E(t).map(this._res)),this.off=t=>this._m.off(E(t).map(this._res)),this.get=(t=this._mc)=>this._m.get(this._res(t)),this.getMany=(t=this._c.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._r.attr(t||this._c.getKey(this._mc)),this.subscribe=t=>this._m.registerNode(t),this.unsubscribe=t=>this._m.unregisterNode(t)}get prefix(){return this.getAttribute("prefix")||i}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||n}get settingsContent(){const t=null==v?void 0:v.querySelector("#"+(this.getAttribute("settingsid")||r));let s;return s=w(t)?JSON.parse((null==t?void 0:t.textContent)||"{}"):t?null==t?void 0:t.effcss:p,s||{}}get initContent(){const t=v.querySelectorAll("."+(this.getAttribute("initcls")||h));let s=g||{};return t.forEach((t=>{let e;e=w(t)?JSON.parse((null==t?void 0:t.textContent)||"{}"):null==t?void 0:t.effcss,s=Object.assign(Object.assign({},s),e||{})})),s}get configs(){return this._c.getConfigs()}connectedCallback(){this._r=_({mode:this.mode}),this._setState();const t=this.initContent,s=this.prefix;var e;this._c=d({hydrate:this.hydrate,prefix:s,initContent:t}),this._p=(e={sets:this._d.sets,keys:this._d.keys,resolver:this._r},new S(e)),this._m=new x;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._n={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._n),this.use(this._mc),this.usePublic(t),v&&!this.isolated&&this._m.registerNode(v)}}),window.__EFFCSS_PARAMS__={name:m,styles:g,settings:p},!0)}export{C as defineProvider};
|
|
@@ -23,67 +23,29 @@ export declare const containerBP: {
|
|
|
23
23
|
/**
|
|
24
24
|
* Default root styles
|
|
25
25
|
*/
|
|
26
|
-
export declare const rootStyle:
|
|
27
|
-
$c: string;
|
|
28
|
-
$fsz: string;
|
|
29
|
-
$ff: string;
|
|
30
|
-
$$u: {
|
|
31
|
-
$c: string;
|
|
32
|
-
$fsz: string;
|
|
33
|
-
$ff: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
26
|
+
export declare const rootStyle: object;
|
|
36
27
|
/**
|
|
37
28
|
* Default style params
|
|
38
29
|
*/
|
|
39
|
-
export declare const themes:
|
|
40
|
-
/**
|
|
41
|
-
* Light mode
|
|
42
|
-
*/
|
|
43
|
-
light: {
|
|
44
|
-
lig: {
|
|
45
|
-
def: number;
|
|
46
|
-
c: number;
|
|
47
|
-
s: number;
|
|
48
|
-
m: number;
|
|
49
|
-
l: number;
|
|
50
|
-
n: number;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Dark mode
|
|
55
|
-
*/
|
|
56
|
-
dark: {
|
|
57
|
-
lig: {
|
|
58
|
-
def: number;
|
|
59
|
-
n: number;
|
|
60
|
-
s: number;
|
|
61
|
-
m: number;
|
|
62
|
-
l: number;
|
|
63
|
-
c: number;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
};
|
|
30
|
+
export declare const themes: Record<'light' | 'dark', object>;
|
|
67
31
|
export declare const units: Record<string, string>;
|
|
68
32
|
/**
|
|
69
|
-
* Prefix
|
|
33
|
+
* Prefix for private stylesheets
|
|
70
34
|
*/
|
|
71
35
|
export declare const PREFIX = "eff";
|
|
72
36
|
/**
|
|
73
|
-
* Id for special script element
|
|
74
|
-
* which contains provider settings
|
|
37
|
+
* Id for special script element with provider settings
|
|
75
38
|
*/
|
|
76
39
|
export declare const SETTINGS_SCRIPT_ID = "effcss";
|
|
77
40
|
/**
|
|
78
|
-
* ClassName for special script elements
|
|
79
|
-
* which contain initial stylesheet configs
|
|
41
|
+
* ClassName for special script elements with initial stylesheet configs
|
|
80
42
|
*/
|
|
81
43
|
export declare const STYLES_SCRIPT_CLS = "effcss_init";
|
|
82
44
|
/**
|
|
83
|
-
*
|
|
45
|
+
* Style provider element tag
|
|
84
46
|
*/
|
|
85
47
|
export declare const PROVIDER_TAG_NAME = "style-provider";
|
|
86
48
|
/**
|
|
87
|
-
*
|
|
49
|
+
* Style change event name
|
|
88
50
|
*/
|
|
89
51
|
export declare const EVENT_NAME = "effcsschanges";
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDefineProviderProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Define style provider custom element
|
|
4
4
|
*/
|
|
5
|
-
export declare function defineProvider(props?:
|
|
6
|
-
/**
|
|
7
|
-
* Element name
|
|
8
|
-
* @defaultValue style-provider
|
|
9
|
-
*/
|
|
10
|
-
name?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Initial styles
|
|
13
|
-
*/
|
|
14
|
-
styles?: TProviderInitContent;
|
|
15
|
-
/**
|
|
16
|
-
* Provider config
|
|
17
|
-
* @description
|
|
18
|
-
* Will be used for initial stylesheets generation
|
|
19
|
-
*/
|
|
20
|
-
settings?: TProviderSettings;
|
|
21
|
-
}): boolean;
|
|
5
|
+
export declare function defineProvider(props?: IDefineProviderProps): boolean;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
type TOptBool = boolean | undefined;
|
|
2
|
+
type TOptSheet = CSSStyleSheet | undefined;
|
|
3
|
+
type TStrDict = Record<string, string>;
|
|
4
|
+
type TDict = Record<string, string | number>;
|
|
5
|
+
type TMetaDict = Record<string, TDict>;
|
|
1
6
|
/**
|
|
2
7
|
* Stylesheet config
|
|
3
8
|
* @description
|
|
@@ -13,21 +18,21 @@ export type TStyleSheetConfig = {
|
|
|
13
18
|
* Keyframes
|
|
14
19
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes}
|
|
15
20
|
*/
|
|
16
|
-
kf?: Record<string,
|
|
21
|
+
kf?: Record<string, TMetaDict>;
|
|
17
22
|
/**
|
|
18
|
-
* Keys
|
|
23
|
+
* Keys dictionary
|
|
19
24
|
* @description
|
|
20
25
|
* Dictionary with primitive type values.
|
|
21
26
|
* In interpolation expressions, these values will have an advantage over the global ones.
|
|
22
27
|
*/
|
|
23
|
-
k?:
|
|
28
|
+
k?: TStrDict;
|
|
24
29
|
/**
|
|
25
|
-
* Values
|
|
30
|
+
* Values dictionary
|
|
26
31
|
* @description
|
|
27
|
-
* Dictionary with object
|
|
32
|
+
* Dictionary with object values.
|
|
28
33
|
* In interpolation expressions, these values will have an advantage over the global ones.
|
|
29
34
|
*/
|
|
30
|
-
v?:
|
|
35
|
+
v?: TMetaDict;
|
|
31
36
|
/**
|
|
32
37
|
* Stylesheet content
|
|
33
38
|
* @description
|
|
@@ -36,10 +41,19 @@ export type TStyleSheetConfig = {
|
|
|
36
41
|
*/
|
|
37
42
|
c: object;
|
|
38
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Dictionary of stylesheet configs
|
|
46
|
+
*/
|
|
47
|
+
export type TConfigDict = Record<string, TStyleSheetConfig>;
|
|
48
|
+
/**
|
|
49
|
+
* Array of stylesheet configs
|
|
50
|
+
*/
|
|
51
|
+
export type TConfigArray = TStyleSheetConfig[];
|
|
39
52
|
/**
|
|
40
53
|
* Style target
|
|
41
54
|
*/
|
|
42
55
|
export type TStyleTarget = string | TStyleSheetConfig;
|
|
56
|
+
export type TOneOrManyTargets = TStyleTarget | TStyleTarget[];
|
|
43
57
|
/**
|
|
44
58
|
* Provider settings
|
|
45
59
|
*/
|
|
@@ -55,28 +69,28 @@ export type TProviderSettings = {
|
|
|
55
69
|
/**
|
|
56
70
|
* Global params units
|
|
57
71
|
*/
|
|
58
|
-
units?:
|
|
72
|
+
units?: TStrDict;
|
|
59
73
|
/**
|
|
60
74
|
* Global keys
|
|
61
75
|
*/
|
|
62
|
-
keys?:
|
|
76
|
+
keys?: TStrDict;
|
|
63
77
|
/**
|
|
64
78
|
* Global sets of keys
|
|
65
79
|
*/
|
|
66
|
-
sets?:
|
|
80
|
+
sets?: TMetaDict;
|
|
67
81
|
/**
|
|
68
82
|
* Media queries breakpoints
|
|
69
83
|
*/
|
|
70
|
-
mediaBP?:
|
|
84
|
+
mediaBP?: TStrDict;
|
|
71
85
|
/**
|
|
72
86
|
* Container queries breakpoints
|
|
73
87
|
*/
|
|
74
|
-
containerBP?:
|
|
88
|
+
containerBP?: TStrDict;
|
|
75
89
|
};
|
|
76
90
|
/**
|
|
77
91
|
* Provider initial content
|
|
78
92
|
*/
|
|
79
|
-
export type TProviderInitContent =
|
|
93
|
+
export type TProviderInitContent = TConfigDict;
|
|
80
94
|
/**
|
|
81
95
|
* Style manager
|
|
82
96
|
* @description
|
|
@@ -86,34 +100,37 @@ export interface IStyleManager {
|
|
|
86
100
|
/**
|
|
87
101
|
* Get stylesheet by key
|
|
88
102
|
* @param key - stylesheet key
|
|
89
|
-
* @returns CSS stylesheet if found with this key, otherwise `undefined`
|
|
90
103
|
*/
|
|
91
|
-
get(key?: string):
|
|
104
|
+
get(key?: string): TOptSheet;
|
|
105
|
+
/**
|
|
106
|
+
* Get index of stylesheet
|
|
107
|
+
* @param styleSheet - CSS stylesheet
|
|
108
|
+
*/
|
|
109
|
+
getIndex(styleSheet: CSSStyleSheet): number;
|
|
92
110
|
/**
|
|
93
|
-
* Get all stylesheets
|
|
94
|
-
* @returns CSS stylesheet dicitonary
|
|
111
|
+
* Get all stylesheets dictionary
|
|
95
112
|
*/
|
|
96
113
|
getAll(): Record<string, CSSStyleSheet>;
|
|
97
114
|
/**
|
|
98
115
|
* Add stylesheet
|
|
99
116
|
* @param key - stylesheet key
|
|
100
117
|
* @param stylesheet - {@link https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet | CSSStylesheet} instance
|
|
101
|
-
* @returns `true` if stylesheet is added
|
|
118
|
+
* @returns `true` if stylesheet is added
|
|
102
119
|
*/
|
|
103
|
-
add(key: string, stylesheet: CSSStyleSheet):
|
|
120
|
+
add(key: string, stylesheet: CSSStyleSheet): TOptBool;
|
|
104
121
|
/**
|
|
105
122
|
* Replace stylesheet content
|
|
106
123
|
* @param key - stylesheet key
|
|
107
124
|
* @param styles - stylesheet content string
|
|
108
|
-
* @returns `true` if stylesheet is replaced
|
|
125
|
+
* @returns `true` if stylesheet is replaced
|
|
109
126
|
*/
|
|
110
|
-
replace(key: string, styles: string):
|
|
127
|
+
replace(key: string, styles: string): TOptBool;
|
|
111
128
|
/**
|
|
112
129
|
* Remove stylesheet
|
|
113
130
|
* @param key - stylesheet key
|
|
114
|
-
* @returns `true` if stylesheet is removed
|
|
131
|
+
* @returns `true` if stylesheet is removed
|
|
115
132
|
*/
|
|
116
|
-
remove(key: string):
|
|
133
|
+
remove(key: string): TOptBool;
|
|
117
134
|
/**
|
|
118
135
|
* Remove all stylesheets
|
|
119
136
|
*/
|
|
@@ -122,17 +139,16 @@ export interface IStyleManager {
|
|
|
122
139
|
* Pack styles into CSSStyleSheet and add it into stylesheet dictionary
|
|
123
140
|
* @param key - stylesheet key
|
|
124
141
|
* @param styles - stylesheet content string
|
|
125
|
-
* @returns `true` if stylesheet is packed
|
|
142
|
+
* @returns `true` if stylesheet is packed
|
|
126
143
|
* @example
|
|
127
144
|
* ```ts
|
|
128
145
|
* getProvider().manager.pack('card', '.card{width: auto;height:100%};.card__header{display:flex;height:5rem;}');
|
|
129
146
|
* ```
|
|
130
147
|
*/
|
|
131
|
-
pack(key: string, styles: string):
|
|
148
|
+
pack(key: string, styles: string): TOptBool;
|
|
132
149
|
/**
|
|
133
150
|
* Check if stylesheet exist
|
|
134
151
|
* @param key - stylesheet key
|
|
135
|
-
* @returns boolean flag
|
|
136
152
|
*/
|
|
137
153
|
has(key?: string): boolean;
|
|
138
154
|
/**
|
|
@@ -144,12 +160,12 @@ export interface IStyleManager {
|
|
|
144
160
|
* Switch stylesheet on
|
|
145
161
|
* @param key - stylesheet key
|
|
146
162
|
*/
|
|
147
|
-
on(key?: string | (string | undefined)[]):
|
|
163
|
+
on(key?: string | (string | undefined)[]): TOptBool;
|
|
148
164
|
/**
|
|
149
165
|
* Switch stylesheet off
|
|
150
166
|
* @param key - stylesheet key
|
|
151
167
|
*/
|
|
152
|
-
off(key?: string | (string | undefined)[]):
|
|
168
|
+
off(key?: string | (string | undefined)[]): TOptBool;
|
|
153
169
|
/**
|
|
154
170
|
* Apply stylesheets to style consumer
|
|
155
171
|
* @param consumer - {@link TStyleConsumer | style consumer}
|
|
@@ -163,7 +179,7 @@ export interface IStyleManager {
|
|
|
163
179
|
* @param consumer - {@link TStyleConsumer | style consumer}
|
|
164
180
|
* @description
|
|
165
181
|
* A registered consumer will automatically receive up-to-date styles when they are added, modified, or deleted.
|
|
166
|
-
* If the style provider does not contain the `isolated
|
|
182
|
+
* If the style provider does not contain the `isolated`, the current document will be automatically registered.
|
|
167
183
|
*/
|
|
168
184
|
registerNode(consumer: TStyleConsumer): void;
|
|
169
185
|
/**
|
|
@@ -204,12 +220,6 @@ export type TResolveSelector = (params: {
|
|
|
204
220
|
* {@link https://en.bem.info/methodology/key-concepts/#modifier | Modifier value}
|
|
205
221
|
*/
|
|
206
222
|
mv?: string;
|
|
207
|
-
/**
|
|
208
|
-
* Modifier value condition
|
|
209
|
-
* @description
|
|
210
|
-
* Usually a pseudo state, a pseudo element or some query (`@container`, `@media`).
|
|
211
|
-
*/
|
|
212
|
-
s?: string;
|
|
213
223
|
}) => string;
|
|
214
224
|
/**
|
|
215
225
|
* BEM attribute resolver
|
|
@@ -226,11 +236,15 @@ b?: string) => <E extends string>(
|
|
|
226
236
|
/**
|
|
227
237
|
* {@link https://en.bem.info/methodology/key-concepts/#element | Element}
|
|
228
238
|
*/
|
|
229
|
-
e?: E) => <M extends Record<string, Record<string, string | number |
|
|
239
|
+
e?: E) => <M extends Record<string, Record<string, string | number | TOptBool | null>>>(
|
|
230
240
|
/**
|
|
231
241
|
* {@link https://en.bem.info/methodology/key-concepts/#modifier | Modifiers}
|
|
232
242
|
*/
|
|
233
|
-
m?: string | Partial<M[NoInfer<E>]>) =>
|
|
243
|
+
m?: string | Partial<M[NoInfer<E>]>) => TStrDict;
|
|
244
|
+
/**
|
|
245
|
+
* Resolved attributes object
|
|
246
|
+
*/
|
|
247
|
+
type TResolvedAttr = ReturnType<TResolveAttr>;
|
|
234
248
|
/**
|
|
235
249
|
* Style resolver
|
|
236
250
|
* @description
|
|
@@ -303,7 +317,7 @@ export interface IStyleCollector {
|
|
|
303
317
|
/**
|
|
304
318
|
* Get all collected configs
|
|
305
319
|
*/
|
|
306
|
-
getConfigs():
|
|
320
|
+
getConfigs(): TConfigDict;
|
|
307
321
|
}
|
|
308
322
|
/**
|
|
309
323
|
* Style provider
|
|
@@ -322,7 +336,7 @@ export interface IStyleProvider {
|
|
|
322
336
|
/**
|
|
323
337
|
* All collected stylesheet configs
|
|
324
338
|
*/
|
|
325
|
-
configs:
|
|
339
|
+
configs: TConfigDict;
|
|
326
340
|
/**
|
|
327
341
|
* Use stylesheet
|
|
328
342
|
* @param config - stylesheet config
|
|
@@ -331,29 +345,29 @@ export interface IStyleProvider {
|
|
|
331
345
|
* The method allows to use stylesheet without having its key.
|
|
332
346
|
* It returns {@link IStyleResolver.attr | attribute resolver}, that can create BEM selectors for config passed.
|
|
333
347
|
*/
|
|
334
|
-
use(config: TStyleSheetConfig, key?: string):
|
|
348
|
+
use(config: TStyleSheetConfig, key?: string): TResolvedAttr;
|
|
335
349
|
/**
|
|
336
350
|
* Alter stylesheet with merged config
|
|
337
351
|
* @param target - target stylesheet config or key
|
|
338
352
|
* @param nextConfig - next stylesheet config, that will be merged with previous
|
|
339
353
|
*/
|
|
340
|
-
alter(target: TStyleTarget, nextConfig: TStyleSheetConfig):
|
|
354
|
+
alter(target: TStyleTarget, nextConfig: TStyleSheetConfig): TResolvedAttr;
|
|
341
355
|
/**
|
|
342
356
|
* Use public stylesheet configs
|
|
343
357
|
* @param configs - stylesheet configs
|
|
344
358
|
*/
|
|
345
|
-
usePublic(configs:
|
|
359
|
+
usePublic(configs: TConfigDict): Record<string, TResolvedAttr>;
|
|
346
360
|
/**
|
|
347
361
|
* Use private stylesheet configs
|
|
348
362
|
* @param configs - stylesheet configs
|
|
349
363
|
*/
|
|
350
|
-
usePrivate(configs:
|
|
364
|
+
usePrivate(configs: TConfigArray): TResolvedAttr[];
|
|
351
365
|
/**
|
|
352
366
|
* Resolve stylesheet
|
|
353
367
|
* @param key - stylesheet key
|
|
354
368
|
* @returns BEM attribute resolver for stylesheet
|
|
355
369
|
*/
|
|
356
|
-
resolve(key?: string):
|
|
370
|
+
resolve(key?: string): TResolvedAttr;
|
|
357
371
|
/**
|
|
358
372
|
* Prepare CSS from config
|
|
359
373
|
* @param config - stylesheet config
|
|
@@ -364,27 +378,27 @@ export interface IStyleProvider {
|
|
|
364
378
|
* Get CSS stylesheet
|
|
365
379
|
* @param target - target stylesheet config or key
|
|
366
380
|
*/
|
|
367
|
-
get(target?: TStyleTarget):
|
|
381
|
+
get(target?: TStyleTarget): TOptSheet;
|
|
368
382
|
/**
|
|
369
383
|
* Switch stylesheet/stylesheets on
|
|
370
384
|
* @param target - target stylesheet config or key
|
|
371
385
|
*/
|
|
372
|
-
on(target?:
|
|
386
|
+
on(target?: TOneOrManyTargets): TOptBool;
|
|
373
387
|
/**
|
|
374
388
|
* Switch stylesheet/stylesheets off
|
|
375
389
|
* @param target - target stylesheet config or key
|
|
376
390
|
*/
|
|
377
|
-
off(target?:
|
|
391
|
+
off(target?: TOneOrManyTargets): TOptBool;
|
|
378
392
|
/**
|
|
379
393
|
* Check if stylesheet is on
|
|
380
394
|
* @param target - target stylesheet config or key
|
|
381
395
|
*/
|
|
382
|
-
status(target?: TStyleTarget):
|
|
396
|
+
status(target?: TStyleTarget): TOptBool;
|
|
383
397
|
/**
|
|
384
398
|
* Get many CSS stylesheets
|
|
385
399
|
* @param target - target stylesheet configs and/or keys
|
|
386
400
|
*/
|
|
387
|
-
getMany(targets?: TStyleTarget[]):
|
|
401
|
+
getMany(targets?: TStyleTarget[]): TOptSheet[];
|
|
388
402
|
/**
|
|
389
403
|
* Subscribe to style changes
|
|
390
404
|
* @param consumer - styles consumer
|
|
@@ -529,3 +543,29 @@ export interface IStyleProviderParams {
|
|
|
529
543
|
export type TStyleConsumer = {
|
|
530
544
|
adoptedStyleSheets: CSSStyleSheet[];
|
|
531
545
|
};
|
|
546
|
+
/**
|
|
547
|
+
* Props to define style provider
|
|
548
|
+
*/
|
|
549
|
+
export interface IDefineProviderProps {
|
|
550
|
+
/**
|
|
551
|
+
* Element name
|
|
552
|
+
* @defaultValue style-provider
|
|
553
|
+
*/
|
|
554
|
+
name?: string;
|
|
555
|
+
/**
|
|
556
|
+
* Initial styles
|
|
557
|
+
*/
|
|
558
|
+
styles?: TProviderInitContent;
|
|
559
|
+
/**
|
|
560
|
+
* Provider config
|
|
561
|
+
* @description
|
|
562
|
+
* Will be used for initial stylesheets generation
|
|
563
|
+
*/
|
|
564
|
+
settings?: TProviderSettings;
|
|
565
|
+
}
|
|
566
|
+
declare global {
|
|
567
|
+
interface Window {
|
|
568
|
+
__EFFCSS_PARAMS__: IDefineProviderProps;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IStyleDispatcher, IStyleProvider, TStyleSheetConfig, TStyleTarget } from '../types';
|
|
1
|
+
import { IStyleDispatcher, IStyleProvider, TConfigArray, TConfigDict, TStyleSheetConfig, TStyleTarget } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Get style provider component
|
|
4
4
|
* @param root - style provider scope
|
|
@@ -6,35 +6,43 @@ import { IStyleDispatcher, IStyleProvider, TStyleSheetConfig, TStyleTarget } fro
|
|
|
6
6
|
* Use this function to get the first provider element found in the document
|
|
7
7
|
* @see {@link IStyleProvider}
|
|
8
8
|
*/
|
|
9
|
-
export declare const getProvider: (root?: Document, tag?: string) => IStyleProvider;
|
|
9
|
+
export declare const getProvider: (root?: Document, tag?: string | undefined) => IStyleProvider;
|
|
10
10
|
/**
|
|
11
11
|
* Use stylesheet
|
|
12
12
|
* @param config - stylesheet config
|
|
13
13
|
* @param provider - style provider
|
|
14
14
|
* @see {@link IStyleProvider}
|
|
15
15
|
*/
|
|
16
|
-
export declare const useStyleSheet: (config: TStyleSheetConfig, key?: string, provider?: IStyleProvider) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | boolean | undefined | null>>>(m?: string | Partial<M[NoInfer<E>]>) =>
|
|
16
|
+
export declare const useStyleSheet: (config: TStyleSheetConfig, key?: string, provider?: IStyleProvider) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | (boolean | undefined) | null>>>(m?: string | Partial<M[NoInfer<E>]>) => {
|
|
17
|
+
[x: string]: string;
|
|
18
|
+
};
|
|
17
19
|
/**
|
|
18
20
|
* Use public stylehseet configs
|
|
19
21
|
* @param styles - stylesheet configs
|
|
20
22
|
* @param provider - style provider
|
|
21
23
|
* @see {@link IStyleProvider}
|
|
22
24
|
*/
|
|
23
|
-
export declare const usePublicStyleSheets: (styles:
|
|
25
|
+
export declare const usePublicStyleSheets: (styles: TConfigDict, provider?: IStyleProvider) => Record<string, <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | (boolean | undefined) | null>>>(m?: string | Partial<M[NoInfer<E>]>) => {
|
|
26
|
+
[x: string]: string;
|
|
27
|
+
}>;
|
|
24
28
|
/**
|
|
25
29
|
* Use private stylehseet configs
|
|
26
30
|
* @param styles - stylesheet configs
|
|
27
31
|
* @param provider - style provider
|
|
28
32
|
* @see {@link IStyleProvider}
|
|
29
33
|
*/
|
|
30
|
-
export declare const usePrivateStyleSheets: (styles:
|
|
34
|
+
export declare const usePrivateStyleSheets: (styles: TConfigArray, provider?: IStyleProvider) => (<E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | (boolean | undefined) | null>>>(m?: string | Partial<M[NoInfer<E>]>) => {
|
|
35
|
+
[x: string]: string;
|
|
36
|
+
})[];
|
|
31
37
|
/**
|
|
32
38
|
* Resolve stylesheet
|
|
33
39
|
* @param key stylesheet key
|
|
34
40
|
* @param provider - style provider
|
|
35
41
|
* @see {@link IStyleProvider}
|
|
36
42
|
*/
|
|
37
|
-
export declare const resolveStyleSheet: (key?: string, provider?: IStyleProvider) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | boolean | undefined | null>>>(m?: string | Partial<M[NoInfer<E>]>) =>
|
|
43
|
+
export declare const resolveStyleSheet: (key?: string, provider?: IStyleProvider) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | (boolean | undefined) | null>>>(m?: string | Partial<M[NoInfer<E>]>) => {
|
|
44
|
+
[x: string]: string;
|
|
45
|
+
};
|
|
38
46
|
/**
|
|
39
47
|
* Get stylesheet from provider
|
|
40
48
|
* @param key - stylesheet key
|
|
@@ -88,7 +96,7 @@ declare class StyleDispatcher implements IStyleDispatcher {
|
|
|
88
96
|
/**
|
|
89
97
|
* Style provider
|
|
90
98
|
*/
|
|
91
|
-
protected
|
|
99
|
+
protected _p: IStyleProvider;
|
|
92
100
|
constructor(params?: IStyleDispatcherParams);
|
|
93
101
|
/**
|
|
94
102
|
* Use stylesheet
|
|
@@ -5,11 +5,11 @@ import { TCreateResolver, IStyleCollector, TStyleSheetConfig, TProviderInitConte
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const createResolver: TCreateResolver;
|
|
7
7
|
declare class Collector implements IStyleCollector {
|
|
8
|
-
protected
|
|
9
|
-
protected
|
|
10
|
-
protected
|
|
11
|
-
protected
|
|
12
|
-
constructor(
|
|
8
|
+
protected _p: string;
|
|
9
|
+
protected _c: number;
|
|
10
|
+
protected _k: Set<string>;
|
|
11
|
+
protected _: Map<TStyleSheetConfig, string>;
|
|
12
|
+
constructor({ prefix, initContent, hydrate }?: {
|
|
13
13
|
prefix?: string;
|
|
14
14
|
initContent?: TProviderInitContent;
|
|
15
15
|
hydrate?: boolean;
|
|
@@ -37,10 +37,10 @@ interface IPseudoDispatcherParams {
|
|
|
37
37
|
initcls?: string;
|
|
38
38
|
}
|
|
39
39
|
declare class PseudoDispatcher implements IStyleDispatcher {
|
|
40
|
-
protected
|
|
41
|
-
protected
|
|
42
|
-
protected
|
|
43
|
-
protected
|
|
40
|
+
protected _c: IStyleCollector;
|
|
41
|
+
protected _r: IStyleResolver;
|
|
42
|
+
protected _i: string;
|
|
43
|
+
protected _m: {
|
|
44
44
|
c: {};
|
|
45
45
|
};
|
|
46
46
|
get collector(): IStyleCollector;
|
|
@@ -65,7 +65,9 @@ declare class PseudoDispatcher implements IStyleDispatcher {
|
|
|
65
65
|
* Resolve styles
|
|
66
66
|
* @param key - stylesheet key
|
|
67
67
|
*/
|
|
68
|
-
resolve: (key?: string) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | boolean | undefined | null>>>(m?: string | Partial<M[NoInfer<E>]>) =>
|
|
68
|
+
resolve: (key?: string) => <E extends string>(e?: E) => <M extends Record<string, Record<string, string | number | (boolean | undefined) | null>>>(m?: string | Partial<M[NoInfer<E>]>) => {
|
|
69
|
+
[x: string]: string;
|
|
70
|
+
};
|
|
69
71
|
toString(): string;
|
|
70
72
|
}
|
|
71
73
|
/**
|
package/dist/utils/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PROVIDER_TAG_NAME as e}from"../constants.js";const s=(s
|
|
1
|
+
import{PROVIDER_TAG_NAME as e}from"../constants.js";const s=(s,i)=>{var u,o;return void 0===s&&(s=window.document),void 0===i&&(i=null===(u=window.__EFFCSS_PARAMS__)||void 0===u?void 0:u.name),null===(o=null==s?void 0:s.getElementsByTagName(i||e))||void 0===o?void 0:o[0]},i=(e,i,u=s())=>u.use(e,i),u=(e,i=s())=>null==i?void 0:i.usePublic(e),o=(e,i=s())=>null==i?void 0:i.usePrivate(e),t=(e,i=s())=>i.resolve(e),l=(e,i=s())=>null==i?void 0:i.get(e),n=(e,i=s())=>null==i?void 0:i.getMany(e),r=(e,i=s())=>{var u;return[...(null===(u=l(e,i))||void 0===u?void 0:u.cssRules)||[]].map((e=>e.cssText)).join("")},v=(e,i=s())=>[...n(e,i)||[]].reduce(((e,s)=>e+[...(null==s?void 0:s.cssRules)||[]].map((e=>e.cssText)).join("")),""),d=(e,i=s())=>{var u;return function e(s){return s?s.length+[...s].reduce(((s,i)=>s+e(null==i?void 0:i.cssRules)),0):0}(null===(u=l(e,i))||void 0===u?void 0:u.cssRules)},c=(e,i=s())=>e.reduce(((e,s)=>e+d(s,i)),0);class a{constructor(e){this.use=(...e)=>this._p.use(...e),this.usePublic=e=>this._p.usePublic(e),this.usePrivate=e=>this._p.usePrivate(e),this.resolve=e=>this._p.resolve(e);const{root:i,tag:u}=e||{};this._p=s(i,u)}}function h(e){return new a(e)}export{h as createDispatcher,n as getManyStyleSheets,s as getProvider,l as getStyleSheet,c as measureMany,d as measureOne,t as resolveStyleSheet,v as stringifyMany,r as stringifyOne,o as usePrivateStyleSheets,u as usePublicStyleSheets,i as useStyleSheet};
|
package/dist/utils/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{STYLES_SCRIPT_CLS as t}from"../constants.js";const e=t=>"object"==typeof t,s=t=>{const{mode:s}=t||{},i=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),
|
|
1
|
+
import{STYLES_SCRIPT_CLS as t}from"../constants.js";const e=t=>"object"==typeof t,s=t=>{const{mode:s}=t||{},i=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),r=(t,e)=>Object.defineProperties({[t]:e},{k:{value:t},v:{value:e}}),n=(...t)=>"--"+t.join("-"),c=(...t)=>t.join("-");return"c"===s?{selector:({b:t,e:e,m:s,mv:i})=>`.${t}${(e?"__"+e:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")}`,attr:t=>s=>n=>{let c=n||"";e(c)&&(c=i(c));const o=t+(s?"__"+s:"");return c=o+(c?" "+(null==c?void 0:c.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),r("class",c)},varName:n,kfName:c}:{selector:({b:t,e:e,m:s,mv:i})=>`[data-${t}${e?"-"+e:""}${s?'~="'+(s||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>s=>n=>{const c=`data-${t}${s?"-"+s:""}`;let o=n||"";return e(o)&&(o=i(o)),r(c,o)},varName:n,kfName:c}};class i{constructor({prefix:t,initContent:e,hydrate:s}={}){this._c=0,this._k=new Set,this._=new Map,this.use=(t,e)=>{const s=this._.get(t);if(s)return s;const i=e||this._p+this._c.toString(36);return this._k.add(i),this._.set(t,i),this._c++,i},this.mutate=(t,e)=>Object.assign(this.getConfigs()[t],e),this.getKey=t=>this._.get(t),this.getKeys=()=>[...this._k],this.getConfigs=()=>Object.fromEntries(this._.entries().map((([t,e])=>[e,t]))),this._p=t||"eff",e&&Object.entries(e).forEach((([t,e])=>this.use(e,t))),s&&(this._c=0)}}function r(t){return new i(t)}class n{get collector(){return this._c}constructor(e){this._m={c:{}},this.use=(t,e)=>{let s=this._c.use(t,e);return this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.resolve=t=>this._r.attr(t||this._c.getKey(this._m));const{prefix:i,mode:n,initcls:c=t}=e||{};this._i=c,this._r=s({mode:n}),this._c=r({prefix:i}),this.use(this._m)}toString(){const t=this._c.getConfigs(),e=this._c.getKey(this._m);return e&&delete t[e],`<script class="${this._i}" type="application/json">${JSON.stringify(t)}<\/script>`}}function c(t){return new n(t)}export{r as createCollector,c as createPseudoDispatcher,s as createResolver};
|
package/package.json
CHANGED