effcss 1.3.6 → 2.0.0
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 +26 -19
- package/dist/build/define-provider.min.js +2 -2
- package/dist/constants.js +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/_provider/manage.d.ts +1 -1
- package/dist/types/src/_provider/process.d.ts +4 -8
- package/dist/types/src/constants.d.ts +85 -0
- package/dist/types/src/index.d.ts +10 -20
- package/dist/types/src/types.d.ts +172 -168
- package/dist/types/src/utils/browser.d.ts +123 -0
- package/dist/types/src/utils/common.d.ts +74 -0
- package/dist/utils/browser.js +1 -0
- package/dist/utils/common.js +1 -0
- package/package.json +12 -18
- package/dist/build/define-provider-with-configs.min.js +0 -7
- package/dist/configs/basic.js +0 -1
- package/dist/configs/ext.js +0 -1
- package/dist/css/dict.js +0 -1
- package/dist/css/functions.js +0 -1
- package/dist/types/build/defineProviderWithConfigs.d.ts +0 -1
- package/dist/types/src/_provider/constants.d.ts +0 -19
- package/dist/types/src/configs/basic/Agent.d.ts +0 -3
- package/dist/types/src/configs/basic/AgentColor.d.ts +0 -3
- package/dist/types/src/configs/basic/Animation.d.ts +0 -3
- package/dist/types/src/configs/basic/Background.d.ts +0 -3
- package/dist/types/src/configs/basic/Border.d.ts +0 -3
- package/dist/types/src/configs/basic/BorderExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Box.d.ts +0 -3
- package/dist/types/src/configs/basic/Color.d.ts +0 -3
- package/dist/types/src/configs/basic/Column.d.ts +0 -3
- package/dist/types/src/configs/basic/FlexContainer.d.ts +0 -3
- package/dist/types/src/configs/basic/FlexItem.d.ts +0 -3
- package/dist/types/src/configs/basic/Font.d.ts +0 -3
- package/dist/types/src/configs/basic/GridContainer.d.ts +0 -3
- package/dist/types/src/configs/basic/GridItem.d.ts +0 -3
- package/dist/types/src/configs/basic/Indent.d.ts +0 -3
- package/dist/types/src/configs/basic/Inset.d.ts +0 -3
- package/dist/types/src/configs/basic/Mask.d.ts +0 -3
- package/dist/types/src/configs/basic/Object.d.ts +0 -3
- package/dist/types/src/configs/basic/Outline.d.ts +0 -3
- package/dist/types/src/configs/basic/Scroll.d.ts +0 -3
- package/dist/types/src/configs/basic/ScrollExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Size.d.ts +0 -3
- package/dist/types/src/configs/basic/SizeExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Text.d.ts +0 -3
- package/dist/types/src/configs/basic/Transform.d.ts +0 -3
- package/dist/types/src/configs/basic/Transition.d.ts +0 -3
- package/dist/types/src/configs/basic/User.d.ts +0 -3
- package/dist/types/src/configs/basic/View.d.ts +0 -3
- package/dist/types/src/configs/basic.d.ts +0 -112
- package/dist/types/src/configs/ext/Keyframes.d.ts +0 -6
- package/dist/types/src/configs/ext/Reset.d.ts +0 -3
- package/dist/types/src/configs/ext.d.ts +0 -8
- package/dist/types/src/css/dict.d.ts +0 -4
- package/dist/types/src/css/functions.d.ts +0 -443
- package/dist/types/src/utils.d.ts +0 -197
- package/dist/utils.js +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://effcss.surge.sh">
|
|
3
|
-
<img alt="effcss" src="
|
|
3
|
+
<img alt="effcss" src="/logo.svg" height="256px" />
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ Effcss is a self-confident CSS-in-JS library based only on the browser APIs.
|
|
|
41
41
|
- framework agnostic
|
|
42
42
|
- runtime stylesheets generation
|
|
43
43
|
- built-in BEM support
|
|
44
|
-
-
|
|
44
|
+
- customizable
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -66,17 +66,17 @@ First you need to connect the `<style-provider>`. One script is all it takes:
|
|
|
66
66
|
<script src="https://unpkg.com/effcss/dist/build/define-provider.min.js" crossorigin="anonymous"></script>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Then you only need to create the necessary styles before rendering. The easiest way to do this is via the `
|
|
69
|
+
Then you only need to create the necessary styles before rendering. The easiest way to do this is via the `createDispatcher`:
|
|
70
70
|
|
|
71
71
|
**main.js**
|
|
72
72
|
|
|
73
73
|
```jsx
|
|
74
|
-
import {
|
|
74
|
+
import { createDispatcher } from "effcss/utils/browser";
|
|
75
75
|
|
|
76
|
-
const styleDispatcher =
|
|
76
|
+
const styleDispatcher = createDispatcher();
|
|
77
77
|
|
|
78
78
|
const root = createRoot(document.getElementById('root'));
|
|
79
|
-
root.render(<App
|
|
79
|
+
root.render(<App css={styleDispatcher}/>);
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
**App.js**
|
|
@@ -86,44 +86,51 @@ import { useRef } from 'react'
|
|
|
86
86
|
|
|
87
87
|
const cardStyle = {
|
|
88
88
|
c: {
|
|
89
|
+
// block
|
|
89
90
|
_: {
|
|
90
91
|
$dis: 'flex',
|
|
91
92
|
$jc: 'center'
|
|
92
93
|
},
|
|
94
|
+
// element
|
|
93
95
|
__logo: {
|
|
94
96
|
$p: '2em'
|
|
95
97
|
},
|
|
98
|
+
// boolean element modifier
|
|
96
99
|
__logo_c_: {
|
|
97
100
|
$c: '#888'
|
|
101
|
+
},
|
|
102
|
+
// element modifier with value
|
|
103
|
+
__logo_sz_lg: {
|
|
104
|
+
$w: '5rem'
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
};
|
|
101
108
|
|
|
102
109
|
export const App = (props) => {
|
|
103
|
-
const {
|
|
110
|
+
const { css } = props;
|
|
104
111
|
|
|
105
|
-
const
|
|
112
|
+
const attrsRef = useRef();
|
|
106
113
|
if (!stylesRef.current) {
|
|
107
|
-
const
|
|
108
|
-
|
|
114
|
+
const resolve = css.use(cardStyle);
|
|
115
|
+
attrsRef.current = {
|
|
109
116
|
// just block selector
|
|
110
|
-
block:
|
|
111
|
-
// element selector
|
|
112
|
-
logo: bem('logo')(),
|
|
117
|
+
block: resolve()(),
|
|
113
118
|
// element with modifiers
|
|
114
|
-
|
|
119
|
+
logoMod: resolve('logo')({
|
|
120
|
+
c: '',
|
|
121
|
+
sz: 'lg'
|
|
122
|
+
}),
|
|
115
123
|
};
|
|
116
124
|
}
|
|
117
|
-
const styles =
|
|
125
|
+
const styles = attrsRef.current;
|
|
118
126
|
|
|
119
127
|
// apply attributes to appropriate nodes
|
|
120
128
|
return <div {...styles.block}>
|
|
121
|
-
<div {...styles.
|
|
129
|
+
<div {...styles.logoMod}>
|
|
122
130
|
...
|
|
123
131
|
</div>
|
|
124
|
-
</div
|
|
125
|
-
|
|
132
|
+
</div>;
|
|
126
133
|
}
|
|
127
134
|
```
|
|
128
135
|
|
|
129
|
-
That's all. No
|
|
136
|
+
That's all. No plugins are needed.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Effcss
|
|
2
|
+
* Effcss v2.0.0
|
|
3
3
|
* {@link https://gitverse.ru/msabitov/effcss}
|
|
4
4
|
* Copyright (c) Marat Sabitov
|
|
5
5
|
* @license Apache 2.0
|
|
6
6
|
*/
|
|
7
|
-
"function"==typeof SuppressedError&&SuppressedError;const e=(...e)=>e.join(","),t="-",s=" ",i="-x",r="-y",o="down",n="horizontal",l="vertical",a="text",c=a+t,h="font-",p="column",m=p+t,d="max-",f="min-",b="content",u=b+"s",_="-items",g="self",y="inline",v="block",x="size",w="-radius",S="direction",$="outline",k="style",j=t+k,z="end",O=t+z,q="start",A=t+q,E="center",N="word",V="line",R="break",W=R+t,I="wrap",K="no"+I,C="rule",P="object",T="top",L=t+T,M="left",B=t+M,G="bottom",H=t+G,J="right",Z=t+J,D="width",F=t+D,Q="color",U=t+Q,X="overflow",Y="align",ee="type",te="transform",se="all",ie="height",re="normal",oe="opacity",ne="visibility",le="scale",ae="box",ce=t+ae,he="border",pe="position",me="none",de="auto",fe="fill",be="stroke",ue="reverse",_e="space",ge="fixed",ye="origin",ve="alpha",xe="luminance",we="clip",Se="zoom",$e="scroll",ke="padding",je="margin",ze="both",Oe="mode",qe="repeat",Ae="light",Ee="linear",Ne="hidden",Ve="shadow",Re="behavior",We="orientation",Ie="name",Ke="after",Ce="before",Pe="image",Te="list"+j,Le=Te+t+ee,Me=Te+t+pe,Be=Te+t+Pe,Ge=Q+"-scheme",He=he+H,Je=he+B,Ze=he+Z,De=he+L,Fe=he+t+v,Qe=he+t+y,Ue=Fe+A,Xe=Fe+O,Ye=Qe+A,et=Qe+O,tt=he+F,st=He+F,it=Je+F,rt=Ze+F,ot=De+F,nt=Fe+F,lt=Qe+F,at=Ue+F,ct=Xe+F,ht=Ye+F,pt=et+F,mt=he+w,dt=He+B+w,ft=He+Z+w,bt=De+B+w,ut=De+Z+w,_t=he+A+O+w,gt=he+A+A+w,yt=he+O+O+w,vt=he+O+A+w,xt=he+U,wt=Je+U,St=Ze+U,$t=De+U,kt=He+U,jt=Fe+U,zt=Qe+U,Ot=Ue+U,qt=Xe+U,At=Ye+U,Et=et+U,Nt=he+j,Vt=Je+j,Rt=Ze+j,Wt=De+j,It=He+j,Kt=Fe+j,Ct=Qe+j,Pt=Ue+j,Tt=Xe+j,Lt=Ye+j,Mt=et+j,Bt=$+U,Gt=$+F,Ht=$+j,Jt=$+t+"offset",Zt=X+i,Dt=X+r,Ft=P+t+"fit",Qt=P+t+pe,Ut=le+t+o,Xt=ae+t+Ve,Yt=ke+ce,es=he+ce,ts=b+ce,ss=fe+ce,is=be+ce,rs="view"+ce,os="no-"+we,ns=qe+i,ls=qe+r,as="no-"+qe,cs=ke+B,hs=ke+L,ps=ke+Z,ms=ke+H,ds=je+B,fs=je+L,bs=je+Z,us=je+H,_s="grid",gs="row",ys="gap",vs="justify",xs="flex",ws=xs+t,Ss="place"+_,$s=y+t+xs,ks=ws+"basis",js=ws+"grow",zs=ws+"shrink",Os=ws+S,qs=ws+I,As=vs+t+b,Es=vs+_,Ns=Y+_,Vs=Y+t+b,Rs=Y+t+g,Ws=_s+t+"template",Is=Ws+t+gs+"s",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r=$e+t+ke,Lr=Tr+L,Mr=Tr+H,Br=Tr+B,Gr=Tr+Z,Hr=Tr+t+v,Jr=Hr+O,Zr=Hr+A,Dr=Tr+t+y,Fr=Dr+O,Qr=Dr+A,Ur=$e+t+"snap",Xr=Ur+t+Y,Yr=Ur+t+"stop",eo=Ur+t+ee,to="over"+Or,so=" mandatory",io="x"+so,ro="y"+so,oo=v+so,no=y+so,lo=ze+so,ao=" proximity",co="x"+ao,ho="y"+ao,po=v+ao,mo=y+ao,fo=ze+ao,bo=c+"decoration",uo=bo+t+Q,_o=bo+t+"thickness",go=bo+t+k,yo=bo+t+V,vo="white-"+_e,xo=c+te,wo=c+Y,So=l+t+Y,$o=c+X,ko=c+We,jo=c+"rendering",zo=c+Ve,Oo=c+"emphasis",qo=Oo+U,Ao=Oo+t+pe,Eo=Oo+j,No=c+I,Vo=No+t+Oe,Ro=No+j,Wo=N+t+R,Io=h+x,Ko=h+"weight",Co=h+"family",Po=h+k,To=h+"synthesis",Lo=h+"variant",Mo=Lo+t+Pi+"s",Bo=Lo+"-caps",Go=Lo+"-numeric",Ho=Lo+t+pe,Jo=Lo+"-east-asian",Zo=Lo+"-ligatures",Do=Lo+"-settings",Fo="writing-"+Oe,Qo=V+t+ie,Uo=V+t+R,Xo=V+"-through",Yo="over"+V,en="under"+V,tn="pre",sn=tn+t+V,rn=tn+t+I,on=W+_e+"s",nn=W+se,ln=W+N,an=W+Ke,cn=W+Ce,hn=n+"-tb",pn=l+"-lr",mn=l+"-rl",dn="keep-"+se,fn="pointer",bn="pan",un=bn+i,_n=bn+B,gn=bn+Z,yn=bn+r,vn=bn+t+o,xn="pinch-"+Se,wn=l+t+a,Sn="grab",$n=Sn+"bing",kn="resize",jn="col-"+kn,zn="row-"+kn,On="n-"+kn,qn="e-"+kn,An="s-"+kn,En="w-"+kn,Nn="ne-"+kn,Vn="ew-"+kn,Rn="nw-"+kn,Wn="se-"+kn,In="sw-"+kn,Kn="ns-"+kn,Cn="nesw-"+kn,Pn="nwse-"+kn,Tn=Se+t+"in",Ln=Se+t+"out",Mn=fn+"-events",Bn=$e+t+pe,Gn="caret"+U,Hn="accent"+U,Jn="filter",Zn="backdrop-"+Jn,Dn="background",Fn=Dn+t,Qn=Fn+Pe,Un=Fn+Q,Xn=Fn+we,Yn=Fn+ye,el=Fn+pe,tl=el+i,sl=el+r,il=Fn+qe,rl=Fn+x,ol=Fn+"blend-"+Oe,nl=Fn+"attachment",ll="gradient",al=Ee+t+ll,cl="radial-"+ll,hl="conic-"+ll,pl=b+t+ne,ml=be+F,dl=be+t+oe,fl=fe+t+C,bl=fe+t+oe,ul=Q+"-dodge",_l=Q+"-burn",gl="hard-"+Ae,yl="soft-"+Ae,vl=Q+"-mix",xl="revert",wl=xl+"-layer",Sl="container",$l=Sl+t+ee,kl=Sl+t+Ie,jl=":first-",zl=":last-",Ol=":only-",ql="child",Al="of-type",El=":nth-child",Nl="prefers-",Vl=Nl+Ge,Rl="@media",Wl=Q+"-gamut",Il=Nl+"contrast",Kl="scripting",Cl="::"+Ke,Pl="::"+Ce,Tl={0:0,"1/4":25,"1/2":50,"3/4":75,1:100},Ll={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"},Ml=[0,1,2,3,4,5,6,7,8,9,10,11,12].reduce(((e,t)=>(e[t]=t,e)),{}),Bl={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"},rem:{def:16},ff:{def:"Roboto, sans-serif",b:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},coef:Ml,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},szu:{a:"auto",no:0,min:br,max:ur,fit:fr},bp:{xs:30,sm:40,md:48,lg:64,xl:80},cbp:{xs:10,sm:20,md:30,lg:40,xl:48},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},vw:Tl,vh:Tl,vmin:Tl,vmax:Tl,cqw:Tl,cqh:Tl,cqb:Tl,cqi:Tl,cqmin:Tl,cqmax:Tl,perc:Ll,rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},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},zm:{s:.8,m:1,l:1.2},pers:{s:"100px",m:"200px"},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lsp:{no:0,s:.05,m:.1,l:.2},zi:{1:1,2:2,3:3,4:4,5:5},ic:{inf:"infinite",1:1,2:2},ins:Ll,uni:{ini:"initial",inh:"inherit",u:"unset",r:xl,rl:wl},ali:{s:q,e:z,c:E,st:"stretch",sb:ni,sa:li,se:ai,b:"baseline",fs:oi,fe:ri,no:me},dis:{g:_s,ig:ci,f:xs,if:$s,b:v,i:y},ca:Ml,co:Ml,ra:Ml,ro:Ml,fd:{r:gs,rr:ti,c:p,cr:si},fb:Ll,fo:Ml,fg:Ml,fs:Ml,fw:{w:I,nw:K,wr:ii},rep:{rx:ns,ry:ls,r:qe,s:_e,ro:"round",nr:as},ttf:{l:Ee,e:Mi,ei:Bi,eo:Hi,eio:Gi,ss:Zi,se:Di},ws:{n:re,nw:K,p:tn,pl:sn,pw:rn,bs:on},wb:{n:re,ba:nn,ka:dn,bw:ln},wm:{htb:hn,vlr:pn,vrl:mn},hyp:{no:me,m:"manual",a:de},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:Xo,o:Yo,u:en},tor:{m:"mixed",u:"upright",sr:"sideways-right",s:"sideways",ugo:"use-glyph-"+We},ta:{l:M,c:E,j:vs,r:J,s:q,e:z},tp:{all:se,col:e(Q,Un,xt,uo),icon:e(fe,be),flt:e(Jn,Zn),ind:e(ke,je),sz:e(D,gr,yr,ie,vr,xr),esz:e($r,wr,Sr,zr,kr,jr),o:oe,b:he,f:xs,g:_s,pos:e(pe,M,T,G,J),tf:e(te,Fi,le,Qi,"skew",Ui)},lb:{a:de,any:"anywhere",n:re,l:"loose",s:"strict"},ov:{h:Ne,s:$e,a:de,c:we,e:"ellipsis"},v:{h:Ne,v:"visible",c:"collapse",a:de},wc:{a:de,sp:Bn,c:u,tf:te,o:oe,i:ir,tfi:te+","+ir},afm:{no:me,f:"forwards",b:"backwards",both:ze},adir:{r:ue,a:Pi,ar:Ti},aps:{r:"running",p:"paused"},tb:{ad:"allow-discrete",n:re},app:{n:me,a:de},pe:{a:de,no:me,all:se,f:fe,s:be},cur:{h:"help",a:de,p:fn,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:a,vt:wn,cp:"copy",m:"move",g:Sn,gng:$n,cr:jn,rr:zn,nr:On,er:qn,sr:An,wr:En,ner:Nn,ewr:Vn,nwr:Rn,ser:Wn,swr:In,nsr:Kn,neswr:Cn,nwser:Pn,zi:Tn,zo:Ln},res:{n:me,v:l,h:n,b:ze},toa:{a:de,no:me,px:un,pl:_n,pr:gn,py:yn,pu:"pan-up",pd:vn,pz:xn,m:"manipulation"},us:{n:me,t:a,all:se,a:de},sb:{a:de,s:"smooth"},sss:{n:re,a:"always"},sst:{n:me,x:"x",y:"y",b:v,i:y,both:ze,xm:io,ym:ro,bm:oo,im:no,bothm:lo,xp:co,yp:ho,bp:po,ip:mo,bothp:fo},fst:{i:"italic",n:re,o:"oblique"},pos:{r:"relative",a:"absolute",f:ge,s:"static"},posv:{b:G,t:T,c:E,l:M,r:J,lt:Yi,rt:er,lb:tr,rb:sr},csz:{cv:"cover",cn:"contain",a:de,f:fe,sd:Ut},cf:{a:de,b:"balance"},cs:{no:me,all:se},box:{c:ts,p:Yt,b:es,f:ss,s:is,v:rs,nc:os,t:a},mcm:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mtp:{a:ve,l:xe},mm:{a:ve,l:xe,m:"match-source"},bgbm:{n:re,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Ae+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:Q,lum:"luminosity",cd:ul,cb:_l,hl:gl,sl:yl},bga:{s:$e,f:ge,l:"local"},ls:{no:me,dt:"dotted",i:ir,h:Ne,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},cnt:{n:re,s:x,is:kr}},Gl={a:wi,an:$i,adur:Oi,adel:qi,aps:Ai,afm:Ei,adir:ji,aic:zi,atf:ki,trn:Ni,tdur:Ki,tdel:Ci,tb:Ri,tp:Wi,ttf:Ii,ba:an,bb:cn,bor:he,bw:tt,br:mt,bs:Nt,bls:Vt,brs:Rt,bts:Wt,bbs:It,bbls:Kt,bis:Ct,bbss:Pt,bbes:Tt,biss:Lt,bies:Mt,brw:rt,blw:it,btw:ot,bbw:st,btlr:bt,btrr:ut,bbrr:ft,bblr:dt,biw:lt,bblw:nt,bbew:ct,bbsw:at,bisw:ht,biew:pt,besr:vt,beer:yt,bssr:gt,bser:_t,bc:xt,blc:wt,brc:St,btc:$t,bbc:kt,bblc:jt,bic:zt,bbsc:Ot,bbec:qt,bisc:At,biec:Et,bg:Dn,bgi:Qn,bgc:Un,c:Q,cmix:vl,csh:Ge,acc:Hn,ctc:Gn,st:be,stw:ml,sto:dl,fi:fe,fir:fl,fio:bl,flt:Jn,bf:Zn,g:_s,f:xs,dis:"display",jc:As,ji:Es,ai:Ns,pi:Ss,ac:Vs,gt:Ws,gtr:Is,gtc:Ks,gp:ys,rg:Cs,cg:Ps,as:Rs,js:Ts,gr:Ls,gre:Ms,grs:Bs,gc:Gs,gce:Hs,gcs:Js,fd:Os,fw:qs,fs:zs,fg:js,fb:ks,ord:"order",dir:S,m:je,ml:ds,mr:bs,mt:fs,mb:us,p:ke,pl:cs,pr:ps,pt:hs,pb:ms,oc:Bt,ow:Gt,os:Ht,oo:Jt,l:M,r:J,t:T,b:G,ins:ir,ib:ar,ibe:cr,ibs:hr,ii:pr,iie:mr,iis:dr,wc:"will-change",app:"appearance",pe:Mn,cur:"cursor",toa:"touch-action",us:"user-select",res:kn,lis:Te,lisp:Me,lisi:Be,list:Le,sb:Or,ssa:Xr,sss:Yr,sst:eo,sm:qr,sml:Nr,smr:Vr,smt:Ar,smb:Er,sp:Tr,spl:Br,spr:Gr,spt:Lr,spb:Mr,smbl:Rr,smbe:Wr,smbs:Ir,smi:Kr,smie:Cr,smis:Pr,spbl:Hr,spbe:Jr,spbs:Zr,spi:Dr,spie:Fr,spis:Qr,osb:to,ar:"aspect-ratio",w:D,maxw:gr,minw:yr,h:ie,minh:xr,maxh:vr,bl:wr,maxb:Sr,minb:$r,i:kr,mini:zr,maxi:jr,per:Ui,pero:Xi,rot:Qi,sc:le,tf:te,tfb:or,tfo:nr,tfs:lr,tr:Fi,z:Se,lts:"letter-spacing",lh:Qo,lb:Uo,fst:Po,ff:Co,fwg:Ko,fsz:Io,fsn:To,fv:Lo,fva:Mo,fvc:Bo,fvea:Jo,fvl:Zo,fvn:Go,fvs:Do,fvp:Ho,tt:xo,td:bo,tdt:_o,tds:go,tdl:yo,ta:wo,to:$o,trg:jo,ts:zo,te:Oo,tep:Ao,tec:qo,tes:Eo,tw:No,twm:Vo,tws:Ro,va:So,ws:vo,tor:ko,wb:Wo,wm:Fo,hyp:"hyphens",bsz:_r,bsh:Xt,pos:pe,cf:Ds,crs:Us,crc:Qs,crw:Xs,cs:Ys,cw:ei,cc:Zs,bgcl:Xn,bgp:el,bgpx:tl,bgpy:sl,bgbm:ol,bgo:Yn,bgr:il,bga:nl,bgsz:rl,mcl:pi,mcm:mi,mm:di,mo:fi,mp:bi,mre:ui,msz:_i,mtp:gi,obf:Ft,obp:Qt,con:b,ov:X,ovx:Zt,ovy:Dt,v:ne,cv:pl,o:oe,zi:"z-index",zm:Se,lgr:al,rgr:cl,cgr:hl,inf:"infinite",cnt:$l,cnn:kl,r_:":root",u_:"*",h_:":hover",f_:":focus",fv_:":focus-visible",a_:":active",v_:":visited",val_:":valid",inv_:":invalid",e_:":empty",d_:":disabled",rq_:":required",o_:":optional",m_:":modal",l_:":link",fc_:jl+ql,lc_:zl+ql,oc_:Ol+ql,odd_:El+"(odd)",even_:El+"(even)",ft_:jl+Al,lt_:zl+Al,ot_:Ol+Al,bef_:Pl,aft_:Cl,bd_:"::backdrop",ba_:`&${Pl},&${Cl}`,pl_:":placeholder",light_:Rl+`(${Vl}: light)`,dark_:Rl+`(${Vl}: dark)`,red_m_:Rl+"(prefers-reduced-motion: reduce)",ori_l_:Rl+`(${We}: landscape)`,ori_p_:Rl+`(${We}: portrait)`,gam_srgb_:Rl+`(${Wl}: srgb)`,gam_p3_:Rl+`(${Wl}: p3)`,gam_rec_:Rl+`(${Wl}: rec2020)`,con_no_:Rl+`(${Il}: no-preference)`,con_m_:Rl+`(${Il}: more)`,con_l_:Rl+`(${Il}: less)`,con_c_:Rl+`(${Il}: custom)`,scr_no_:Rl+`(${Kl}: none)`,scr_ini_:Rl+`(${Kl}: initial-only)`,scr_en_:Rl+`(${Kl}: enabled)`},Hl={$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}",$u_:{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}"}},Jl={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}},root:Bl},Zl="{1}rem",Dl="{1}deg",Fl="calc(100% * {1})",Ql="span {1}",Ul={cqw:"{1}cqw",cqh:"{1}cqh",cqb:"{1}cqb",cqi:"{1}cqi",cqmin:"{1}cqmin",cqmax:"{1}cqmax",vw:"{1}vw",vh:"{1}vh",vmin:"{1}vmin",vmax:"{1}vmax",fb:Fl,ra:Ql,ca:Ql,ins:Fl,sz:Zl,sp:Zl,rad:Zl,th:Zl,bp:Zl,cbp:Zl,fsz:Zl,lsp:Zl,tr:Zl,sk:Dl,rot:Dl,perc:Fl,time:"{1}ms",rem:"{1}px"},Xl=e=>"object"==typeof e,Yl="style-provider",ea=e=>e.size.toString(36),ta=Object.entries,sa=(e,t,s)=>ta(e).reduce(t,s),ia=e=>"object"==typeof e,ra=e=>`{${e}}`,oa=Object.assign.bind(Object),na=(e,t)=>`${e}:${t};`,la=(e,t)=>["@property",e,ra(na("syntax",t.syn||'"*"')+na("inherits",t.inh||!1)+(t.ini?na("initial-value",t.ini):""))].join(" "),aa=e=>`var(${e})`,ca=({l:e,c:t,h:s,a:i=1})=>`oklch(${e} ${t} ${s} / ${i})`,ha=["l","c","h","a"];class pa{constructor(e){var t,s;this.baseStyles="",this._prefix="eff",this._mode="a",this._initkey="init",this._params=Jl,this._compKeys={},this._compValues={},this.parseSelector=e=>{let t,s,i,r,o;return[t,o]=e.split(":"),t.startsWith("__")?[s,i,r]=t.slice(2).split("_"):[s,i,r]=t.split("_"),{e:s,m:i,mv:r,s:o}},this.expandSelector=(e,t)=>{const{e:s,m:i,mv:r,s:o}=this.parseSelector(t),n=o&&this._getStateSelector(o),l=this.bem.selector({b:e,e:s,m:i,mv:r,s:o});let a="";return(null==n?void 0:n.startsWith("@"))?a=n+"{"+l:(null==n?void 0:n.startsWith(":"))&&(a=l+"{&"+n),[this.bem.selector({b:e,e:s,m:i,mv:r}),a]},this._prepareVarName=(...e)=>["-",this._prefix,...e].join("-"),this._prepareKeyframesName=(...e)=>[this._prefix,...e].join("-"),this.compile=(e,t)=>{const{_:s,kf:i,k:r={},v:o={},c:n}=t,l=this.bem.selector.bind(this),a=this.parseSelector;let c=oa({},n),h=oa({},r),p=oa({_:{}},o),m="";if(s)for(let t in s){const i=s[t];if("c"===i.typ){const s={};ha.forEach((r=>{const o=t+r,n=this._prepareVarName(e,o);s[r]=n,h["_"+o]=s[r],m+=la(n,i)})),p._[t]=ca({l:aa(s.l),c:aa(s.c),h:aa(s.h),a:aa(s.a)}),i.all&&(c["_"+t+"l"]=`&lig=>${this._prepareVarName(e,t+"l")}:{1}`,c["_"+t+"c"]=`&chr=>${this._prepareVarName(e,t+"c")}:{1}`,c["_"+t+"h"]=`&hue=>${this._prepareVarName(e,t+"h")}:{1}`,c["_"+t+"a"]=`&alp=>${this._prepareVarName(e,t+"a")}:{1}`)}else{const s=this._prepareVarName(e,t);h["_"+t]=s,p._[t]=aa(s),m+=la(s,i)}}const d=e=>h[e]||this._compKeys[e]||Gl[e],f=e=>p[e]||this._compValues[e]||this._params.root[e],b=e=>e.replaceAll(/\{(.+?)\}/g,((e,t)=>{const[s,i]=t.split(".");if(i){const e=f(s);return""+((null==e?void 0:e[i])||(null==e?void 0:e.def)||"")}return""+(d(s)||"")})),u=e=>{const t=e.split("?");let s;for(let e in t){const i=t[e],[r,o]=i.split("=>"),n=r.match(/(\w+)(\[[\w,]+\])?/);if(!n)continue;const[l,a,c]=n,h=f(a);if(!h)continue;s=h;let p=ta(s);const m=null==c?void 0:c.slice(1,-1).split(",");if(m){const e=new Set(m);p=p.filter((([t,s])=>e.has(t)))}if(o){let[e,t]=o.split("|");void 0===t&&(t=e,e=""),p=p.map((([s,i])=>[e.replace("{0}",s)||s,b(t.replaceAll("{1}",""+i))]))}(m||o)&&(s=Object.fromEntries(p));break}return s};function _(t,s,i){var r,o,n,c;let h=""+t;if((null===(r=null==t?void 0:t.startsWith)||void 0===r?void 0:r.call(t,"$"))&&(h=d(t.slice(1)),!h))return"";if(Array.isArray(s))return _(h,Object.assign({},...s.map((e=>"string"==typeof e?u(e):e))),i);if(null==s)return"";if(ia(s)){const t=!i||(null===(o=i.startsWith)||void 0===o?void 0:o.call(i,"@"))||h.startsWith("&")||h.startsWith("@")?"":"&";if(h.startsWith("_")){const{e:i,m:r,mv:o}=a(h);return r&&"string"!=typeof o?sa(s,((s,[o,n])=>{let a;return a=ia(n)?sa(n,((e,t)=>e+_(...t,h)),""):n+";",s+t+l({b:e,e:i,m:r,mv:o})+ra(a)}),""):t+l({b:e,e:i,m:r,mv:o})+ra(sa(s,((e,t)=>e+_(...t,h)),""))}return t+h+ra(sa(s,((e,t)=>e+_(...t,h)),""))}{let e=""+s;return(null===(n=null==e?void 0:e.startsWith)||void 0===n?void 0:n.call(e,"&"))?_(h,u(e.slice(1)),i):(null===(c=null==e?void 0:e.includes)||void 0===c?void 0:c.call(e,"{"))?_(h,b(e),i):na(h.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e)}}let g="";if(i)for(let t in i){const s=i[t],r=this._prepareKeyframesName(e,t);h["kf_"+t]=r,g+=`@keyframes ${r} `+ra(sa(s,((e,[t,s])=>e+t+(String(+t)===t?"%":"")+ra(sa(s,((e,t)=>e+_(...t)),""))),""))}return m+g+sa(c,((e,t)=>e+_(...t)),"")};const{mode:i="a",prefix:r="eff",initkey:o="init",params:n,themes:l,units:a,rootStyle:c=Hl}=e;this._mode=i,this._prefix=r,this._initkey=o,this.bem=(e=>{const t=e=>Object.entries(e).reduce(((e,[t,s])=>(void 0!==s&&e.push(t+(s?"-"+s:"")),e)),[]).join(" "),s=(e,t)=>Object.defineProperties({[e]:t},{k:{value:e},v:{value:t}});return"c"===e.mode?{selector:({b:e,e:t,m:s,mv:i,s:r})=>`.${e}${(t?"__"+t:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")+(r?":"+r:"")}`,attr:e=>i=>r=>{let o=r||"";Xl(o)&&(o=t(o));const n=e+(i?"__"+i:"");return o=n+(o?" "+(null==o?void 0:o.split(" ").map((e=>n+"_"+e.split("-").join("_"))).join(" ")):""),s("class",o)}}:{selector:({b:e,e:t,m:s,mv:i,s:r})=>`[data-${e}${t?"-"+t:""}${s||r?'~="'+(s||"")+(i?"-"+i:"")+(r?":"+r:"")+'"':""}]`,attr:e=>i=>r=>{const o=`data-${e}${i?"-"+i:""}`;let n=r||"";return Xl(n)&&(n=t(n)),s(o,n)}}})({mode:this._mode});const{values:h,keys:p}=(({themes:e,units:t})=>{let s=Jl,i=Object.assign(Object.assign({},Ul),t||{});if(e)for(const t in e)s[t]=oa(s[t]||{},e[t]);for(const e in i)s.root[e]=s.root[e]&&Object.fromEntries(ta(s.root[e]).map((([t,s])=>[t,i[e].replace("{1}",""+s)])));const r={};return s.root.bp&&ta(s.root.bp||{}).forEach((([e,t])=>{r[`min_${e}_`]=`@media (min-width:${t})`,r[`max_${e}_`]=`@media (max-width:${t})`})),s.root.cbp&&ta(s.root.bp||{}).forEach((([e,t])=>{r[`cmin_${e}_`]=`@container (min-width:${t})`,r[`cmax_${e}_`]=`@container (max-width:${t})`})),{values:s,keys:r}})({themes:l||n,units:a});if(this._params=h,this._compKeys=p,this._initkey){const e=this._params,{root:i}=e,r=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]])}return s}(e,["root"]),o=ta(r),n={_mode:{root:{}},_theme:{root:{}}},l={};o.forEach((([e,t])=>{n._mode[e]||(n._mode[e]={}),ta(t).forEach((([t,s])=>{ta(s).forEach((([s,r])=>{const o=this._prepareVarName(t,s);n._mode[e][o]=r,n._mode.root[o]||(n._mode.root[o]=i[t][s],l[t]||(l[t]={}),l[t][s]=`var(${o})`)}))}))})),n._theme=n._mode,this._compValues=l,this.baseStyles=this.compile(this._initkey,{c:Object.assign(Object.assign(Object.assign(Object.assign({},n),{$r_:oa(n._mode.root,c)}),(null===(t=n._mode)||void 0===t?void 0:t.dark)?{$dark_:{$r_:n._mode.dark}}:{}),(null===(s=n._mode)||void 0===s?void 0:s.light)?{$light_:{$r_:n._mode.light}}:{})})}}_getStateSelector(e){const t=e+"_";return this._compKeys[t]||Gl[t]||e}}class ma{constructor(e){if(this._stylesheets={},this._rules={},this._expandedSelectors={},this._styleSheetsArray=[],this._listeners=[],this.get=e=>this._stylesheets[e],this.getAll=()=>this._stylesheets,this.add=(e,t)=>{if(!this._stylesheets[e])return this._stylesheets[e]=t,this._styleSheetsArray.push(t),this.cacheRules(e,t),this.notify(),!0},this.remove=e=>{const t=this.get(e);if(!t)return;const s=this._styleSheetsArray.findIndex((e=>e===t));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[e],delete this._rules[e],delete this._expandedSelectors[e]),this.notify(),!0},this.pack=(e,t)=>{const s=new CSSStyleSheet;if(s.replaceSync(t),s.cssRules.length)return this.add(e,s);console.log(`StyleSheet '${e}' is empty`)},this.cacheRules=(e,t)=>{[...t.cssRules].forEach((t=>{const s=t.cssText.split(" {")[0];s&&(this._rules[e]||(this._rules[e]={}),this._rules[e][s]=t)})),this._expandedSelectors[e]=new Set},this.getExpandedSelectors=e=>this._expandedSelectors[e],this.expandRule=(e,t,s)=>{const i=this._rules[e];if(!i)return void console.log(`No stylesheet with key '${e}'`);const r=i[t];if(!r)return void console.log(`No rule with selector '${t}' in the '${e}' stylesheet`);const[o,n]=r.cssText.split("{"),l=r.parentStyleSheet;if(l){const t=l.cssRules,r=l.insertRule(s+"{"+n+"}".repeat([...s.matchAll(/{/g)].length),t.length);return i[s]=t[r],this._expandedSelectors[e].add(s),!0}},this.apply=e=>{e.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=e=>{this._listeners.push(new WeakRef(e)),this.apply(e)},this.unregisterNode=e=>{const t=this._listeners.findIndex((t=>t.deref()===e));t>=0&&this._listeners.splice(t,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((e,t)=>{const s=t.deref();return s&&(this.apply(s),e.push(t)),e}),[])},e)for(let t in e)this.pack(t,e[t])}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this._expandedSelectors={},this.notify(),!0}}!function(){const e=ea;customElements.define(Yl,class extends HTMLElement{get settingsId(){return this.getAttribute("settingsid")||"effcss"}get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")}get isolated(){return this.getAttribute("isolated")}get initkey(){var e;return null!==(e=this.getAttribute("initkey"))&&void 0!==e?e:"init"}constructor(){super(),this._sources=new Map,this.getSettings=()=>{var e;const t=null===(e=null===document||void 0===document?void 0:document.getElementById(this.settingsId))||void 0===e?void 0:e.textContent;return t?JSON.parse(t):{}},this.compileStyleSheet=(e,t)=>{var s,i;const r=null===(s=this.processor)||void 0===s?void 0:s.compile(e,t);if(r&&(null===(i=this.manager)||void 0===i?void 0:i.pack(e,r)))return this._sources.set(t,e),!0},this.useStyleSheet=t=>{let s=this._sources.get(t);return s||(s=this.prefix+e(this._sources),this.compileStyleSheet(s,t)),this.resolveStyleSheet(s)},this.expandStyleSheet=(e,t)=>{var s;const i=null===(s=this.manager)||void 0===s?void 0:s.getExpandedSelectors(e);if(this.processor&&i){const s=new Set(t).difference(i);let r=s.size;if(r&&this.processor.expandSelector){const t=this.processor.expandSelector;return s.keys().forEach((s=>{const[i,o]=t(e,s);o?this.manager.expandRule(e,i,o):r--})),r}}},this.processStyles=(e,t)=>{if(e)for(let t in e){const s=e[t];this.compileStyleSheet(t,s)}if(t)for(let e in t){const s=t[e];this.expandStyleSheet(e,s)}return!0},this.resolveStyleSheet=e=>this.processor.bem.attr(e)}connectedCallback(){const e=this.getSettings(),{params:t,themes:s,styles:i,ext:r,units:o,rootStyle:n}=e,l=this.initkey;this.processor=function(e){return new pa(e)}({prefix:this.prefix,mode:this.mode,initkey:l,params:t,rootStyle:n,themes:s,units:o}),this.manager=function(e){return new ma(e)}(l?{[l]:`${Yl} {display: contents;}`+this.processor.baseStyles}:{}),this.processStyles(i,r),null===this.isolated&&this.manager.registerNode(document)}})}();
|
|
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,p)=>{const{_:f,kf:m,k:b={},v:d={},c:u}=p,g=this._resolver.selector.bind(this),_=this._parseSelector;let y=r({},u),v=r({},b),$=r({_:{}},d),x="";if(f)for(let t in f){const e=f[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,p=j(c);if(!p)continue;i=p;let f=t(i);const m=null==h?void 0:h.slice(1,-1).split(",");if(m){const t=new Set(m);f=f.filter((([e,s])=>t.has(e)))}if(o){let[t,e]=o.split("|");void 0===e&&(e=t,t=""),f=f.map((([s,i])=>[t.replace("{0}",s)||s,k(e.replaceAll("{1}",""+i))]))}(m||o)&&(i=Object.fromEntries(f));break}return i};function O(t,r,o){var l,a,c,p;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?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,"@"))||f.startsWith("&")||f.startsWith("@")?"":"&";if(f.startsWith("_")){const{e:n,m:o,mv:l}=_(f);return o&&"string"!=typeof l?e(r,((r,[l,a])=>{let c;return c=s(a)?e(a,((t,e)=>t+O(...e,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(e(r,((t,e)=>t+O(...e,f)),""))}return t+f+i(e(r,((t,e)=>t+O(...e,f)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?O(f,S(t.slice(1)),o):(null===(p=null==t?void 0:t.includes)||void 0===p?void 0:p.call(t,"{"))?O(f,k(t),o):n(f.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let z="";if(m)for(let t in m){const s=m[t],r=this._prepareKeyframesName(h,t);v["kf_"+t]=r,z+=`@keyframes ${r} `+i(e(s,((t,[s,r])=>t+s+(String(+s)===s?"%":"")+i(e(r,((t,e)=>t+O(...e)),""))),""))}return x+z+e(y,((t,e)=>t+O(...e)),"")};const{sets:p,keys:f,resolver:m}=h;this._resolver=m,f&&(this._outerKeys=f),p&&(this._outerSets=p)}}class p{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.on=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;return-1===this._styleSheetsArray.findIndex((t=>t===e))?(this._styleSheetsArray.push(e),this.notify(),!0):void 0},this.off=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return-1!==s?(this._styleSheetsArray.splice(s,1),this.notify(),!0):void 0},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,s)=>{const i=new CSSStyleSheet;if(i.replaceSync(e),i.cssRules.length)return this.add(t,i);console.log(`StyleSheet '${t}' is empty`)},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{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 f=(...t)=>t.join(","),m="rem",b="-",d=" ",u="-x",g="-y",_="down",y="horizontal",v="vertical",$="text",x=$+b,w="font",j=w+b,k="column",S=k+b,O="max-",z="min-",A="content",N=A+"s",C="-items",E="self",K="inline",W="block",V="size",P="-radius",q="direction",I="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",pt=b+ht,ft="overflow",mt="align",bt="type",dt="transform",ut="all",gt="height",_t="normal",yt="opacity",vt="visibility",$t="scale",xt="box",wt=b+xt,jt="border",kt="position",St="none",Ot="auto",zt="fill",At="stroke",Nt="reverse",Ct="space",Et="fixed",Kt="origin",Wt="alpha",Vt="luminance",Pt="clip",qt="zoom",It="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,pe=ce+L,fe=ce+B,me=he+L,be=he+B,de=jt+ct,ue=ne+ct,ge=oe+ct,_e=le+ct,ye=ae+ct,ve=ce+ct,$e=he+ct,xe=pe+ct,we=fe+ct,je=me+ct,ke=be+ct,Se=jt+P,Oe=ne+it+P,ze=ne+lt+P,Ae=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+pt,Pe=oe+pt,qe=le+pt,Ie=ae+pt,Me=ne+pt,Re=ce+pt,Te=he+p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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,po=Z+b+D,fo=Z+"-through",mo="over"+Z,bo="under"+Z,uo="pre",go=uo+b+Z,_o=uo+b+Q,yo=F+Ct+"s",vo=F+ut,$o=F+H,xo=F+Ut,wo=F+Xt,jo=y+"-tb",ko=v+"-lr",So=v+"-rl",Oo="keep-"+ut,zo="pointer",Ao="pan",No=Ao+u,Co=Ao+it,Eo=Ao+lt,Ko=Ao+g,Wo=Ao+b+_,Vo="pinch-"+qt,Po=v+b+$,qo="grab",Io=qo+"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=qt+b+"in",el=qt+b+"out",sl=zo+"-events",il=It+b+kt,rl="caret"+pt,nl="accent"+pt,ol="filter",ll="backdrop-"+ol,al="background",cl=al+b,hl=cl+Yt,pl=cl+ht,fl=cl+Pt,ml=cl+Kt,bl=cl+kt,dl=bl+u,ul=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=A+b+vt,Sl=At+ct,Ol=At+b+yt,zl=zt+b+X,Al=zt+b+yt,Nl=ht+"-dodge",Cl=ht+"-burn",El="hard-"+Lt,Kl="soft-"+Lt,Wl=ht+"-mix",Vl="revert",Pl=Vl+"-layer",ql="container",Il=ql+b+bt,Ml=ql+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},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:Oo,bw:$o},wm:{htb:jo,vlr:ko,vrl:So},hyp:{no:St,m:"manual",a:Ot},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:fo,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},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},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},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},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:Ar,max:Nr,fit:zr},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:Ot,f:zt,sd:ps},box:{c:ds,p:ms,b:bs,f:us,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:Is,b:W,i:K},ca:ia,co:ia,ra:ia,ro:ia,fd:{r:Es,rr:di,c:k,cr:ui},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:Ot,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:It,a:Ot,c:Pt,e:"ellipsis"},v:{h:Ht,v:"visible",c:"collapse",a:Ot},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},ttf:{l:Gt,e:sr,ei:ir,eo:nr,eio:rr,ss:lr,se:ar},tp:{col:f(ht,pl,Ve,Nn),icon:f(zt,At),flt:f(ol,ll),ind:f(Mt,Rt),sz:f(at,Er,Kr,gt,Wr,Vr),esz:f(Ir,Pr,qr,Tr,Mr,Rr),o:yt,b:jt,f:Vs,g:Cs,pos:f(kt,st,tt,rt,ot),tf:f(dt,cr,$t,hr,"skew",pr)},tb:{ad:"allow-discrete",n:_t},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:Ot,sp:il,c:N,tf:dt,o:yt,i:gr,tfi:f(dt,gr)},afm:{no:St,f:"forwards",b:"backwards",both:Tt},adir:{r:Nt,a:Yi,ar:tr},aps:{r:"running",p:"paused"},pe:{a:Ot,no:St,all:ut,f:zt,s:At},cur:{h:"help",a:Ot,p:zo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:$,vt:Po,cp:"copy",m:"move",g:qo,gng:Io,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:Ot,no:St,px:No,pl:Co,pr:Eo,py:Ko,pu:"pan-up",pd:Wo,pz:Vo,m:"manipulation"},us:{n:St,t:$,all:ut,a:Ot},sb:{a:Ot,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:On,bothp:zn},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:dr,rb:ur},cf:{a:Ot,b:"balance"},cs:{no:St,all:ut},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:It,f:Et,l:"local"},cnt:{n:_t,s:V,is:Mr}},na={a:Pi,an:Ii,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:de,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:ue,btlr:Ae,btrr:Ne,bbrr:ze,bblr:Oe,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:qe,btc:Ie,bbc:Me,bblc:Re,bic:Te,bbsc:Be,bbec:Je,bisc:Le,biec:Ge,bg:al,bgi:hl,bgc:pl,c:ht,cmix:Wl,csh:re,acc:nl,ctc:rl,st:At,stw:Sl,sto:Ol,fi:zt,fir:zl,fio:Al,flt:ol,bf:ll,dis:"display",g:Cs,jc:Ls,ji:Gs,ai:Hs,pi:qs,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:q,m:Rt,ml:Os,mr:As,mt:zs,mb:Ns,p:Mt,pl:ws,pr:ks,pt:js,pb:Ss,out:I,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:Or,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:dn,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:pn,osb:un,ar:"aspect-ratio",w:at,maxw:Er,minw:Kr,h:gt,minh:Vr,maxh:Wr,bl:Pr,maxb:qr,minb:Ir,i:Mr,mini:Tr,maxi:Rr,per:pr,pero:fr,rot:hr,sc:$t,tf:dt,tfb:yr,tfo:vr,tfs:$r,tr:cr,z:qt,lts:"letter-spacing",lh:ho,lb:po,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:An,tdt:Cn,tds:En,tdl:Kn,ta:Pn,to:In,trg:Rn,ts:Tn,te:Bn,tep:Ln,tec:Jn,tes:Gn,tw:Hn,twm:Zn,tws:Dn,va:qn,ws:Wn,tor:Mn,wb:Fn,wm:co,hyp:"hyphens",bsz:Cr,bsh:fs,pos:kt,cf:ai,crs:pi,crc:hi,crw:fi,cs:mi,cw:bi,cc:li,bgcl:fl,bgp:bl,bgpx:dl,bgpy:ul,bgbm:yl,bgo:ml,bgr:gl,bga:vl,bgsz:_l,mcl:ki,mcm:Si,mm:Oi,mo:zi,mp:Ai,mre:Ni,msz:Ci,mtp:Ei,obf:cs,obp:hs,con:A,ov:ft,ovx:ls,ovy:as,v:vt,cv:kl,o:yt,zi:"z-index",lgr:xl,rgr:wl,cgr:jl,inf:"infinite",cnt:Il,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",pa="{1}deg",fa="span {1}",ma={fb:"calc(100% * {1})",ra:fa,ca:fa,sz:ha,sp:ha,rad:ha,th:ha,bp:ha,cbp:ha,fsz:ha,lsp:ha,tr:ha,pers:ha,sk:pa,rot:pa,time:"{1}ms"},ba="style-provider",da=t=>"object"==typeof t;class ua{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.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 _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}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 p=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 f={},m={};l&&h&&p.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{const r=this._resolver.varName(t,e);a[t]?s[r]=a[t].replace("{1}",""+i):s[r]=i,f[r]||(f[r]=h[t][e],h[t][e]=`var(${r})`)}))})),m[t]=s})),this._dict={sets:h,keys:c},this._mainConfig={c:Object.assign(Object.assign({[e]:{display:"contents"},_theme:m,$$:Object.assign(f,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.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.on=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.on(e):void 0},this.off=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.off(e):void 0},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))}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||"";da(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 da(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 ua(s)),this._processor=function(t){return new h(t)}({sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver}),this._manager=new p,this.use(this._mainConfig),this.usePublic(t),ga&&!this.isolated&&this._manager.registerNode(ga)}})}();
|
|
@@ -0,0 +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-",u="content",h=u+"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",us="stroke",hs="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="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=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",ua=xa+t+Y,ha=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,ul=gl+Q,hl=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=u+t+ns,mo=us+X,fo=us+t+os,go=xs+t+L,xo=xs+t+os,uo=Y+"-dodge",ho=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},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},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},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},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},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:ui,max:hi,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},ttf:{l:Ds,e:Pr,ei:Qr,eo:Tr,eio:Sr,ss:Vr,se:Wr},tp:{col:s(Y,Xl,ze,ua),icon:s(xs,us),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:h,tf:rs,o:os,i:ai,tfi:s(rs,ai)},afm:{no:ds,f:"forwards",b:"backwards",both:Cs},adir:{r:hs,a:Mr,ar:Nr},aps:{r:"running",p:"paused"},pe:{a:gs,no:ds,all:is,f:xs,s:us},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:ul,pr:hl,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:uo,cb:ho,hl:wo,sl:$o},bga:{s:js,f:$s,l:"local"},cnt:{n:ls,s:z,is:qi}},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:ue,btrr:he,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:us,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:P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ro,bga:lo,bgsz:io,mcl:fr,mcm:dr,mm:gr,mo:xr,mp:ur,mre:hr,msz:wr,mtp:$r,obf:Xe,obp:Ye,con:u,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";export{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};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{values as e,keys as t}from"./css/dict.js";import{getBEMResolver as s,generateStyleSheetKey as i,COMPONENT_NAME as r,SETTINGS_ID as o,PREFIX as n}from"./utils.js";import"./css/functions.js";"function"==typeof SuppressedError&&SuppressedError;const l={$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}",$u_:{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}"}},h={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}},root:e},c="{1}rem",a="{1}deg",p="calc(100% * {1})",d="span {1}",m={cqw:"{1}cqw",cqh:"{1}cqh",cqb:"{1}cqb",cqi:"{1}cqi",cqmin:"{1}cqmin",cqmax:"{1}cqmax",vw:"{1}vw",vh:"{1}vh",vmin:"{1}vmin",vmax:"{1}vmax",fb:p,ra:d,ca:d,ins:p,sz:c,sp:c,rad:c,th:c,bp:c,cbp:c,fsz:c,lsp:c,tr:c,sk:a,rot:a,perc:p,time:"{1}ms",rem:"{1}px"},u=Object.entries,f=(e,t,s)=>u(e).reduce(t,s),_=e=>"object"==typeof e,y=e=>`{${e}}`,v=Object.assign.bind(Object),S=(e,t)=>`${e}:${t};`,g=(e,t)=>["@property",e,y(S("syntax",t.syn||'"*"')+S("inherits",t.inh||!1)+(t.ini?S("initial-value",t.ini):""))].join(" "),b=e=>`var(${e})`,x=({l:e,c:t,h:s,a:i=1})=>`oklch(${e} ${t} ${s} / ${i})`,$=["l","c","h","a"];class k{constructor(e){var i,r;this.baseStyles="",this._prefix="eff",this._mode="a",this._initkey="init",this._params=h,this._compKeys={},this._compValues={},this.parseSelector=e=>{let t,s,i,r,o;return[t,o]=e.split(":"),t.startsWith("__")?[s,i,r]=t.slice(2).split("_"):[s,i,r]=t.split("_"),{e:s,m:i,mv:r,s:o}},this.expandSelector=(e,t)=>{const{e:s,m:i,mv:r,s:o}=this.parseSelector(t),n=o&&this._getStateSelector(o),l=this.bem.selector({b:e,e:s,m:i,mv:r,s:o});let h="";return(null==n?void 0:n.startsWith("@"))?h=n+"{"+l:(null==n?void 0:n.startsWith(":"))&&(h=l+"{&"+n),[this.bem.selector({b:e,e:s,m:i,mv:r}),h]},this._prepareVarName=(...e)=>["-",this._prefix,...e].join("-"),this._prepareKeyframesName=(...e)=>[this._prefix,...e].join("-"),this.compile=(e,s)=>{const{_:i,kf:r,k:o={},v:n={},c:l}=s,h=this.bem.selector.bind(this),c=this.parseSelector;let a=v({},l),p=v({},o),d=v({_:{}},n),m="";if(i)for(let t in i){const s=i[t];if("c"===s.typ){const i={};$.forEach((r=>{const o=t+r,n=this._prepareVarName(e,o);i[r]=n,p["_"+o]=i[r],m+=g(n,s)})),d._[t]=x({l:b(i.l),c:b(i.c),h:b(i.h),a:b(i.a)}),s.all&&(a["_"+t+"l"]=`&lig=>${this._prepareVarName(e,t+"l")}:{1}`,a["_"+t+"c"]=`&chr=>${this._prepareVarName(e,t+"c")}:{1}`,a["_"+t+"h"]=`&hue=>${this._prepareVarName(e,t+"h")}:{1}`,a["_"+t+"a"]=`&alp=>${this._prepareVarName(e,t+"a")}:{1}`)}else{const i=this._prepareVarName(e,t);p["_"+t]=i,d._[t]=b(i),m+=g(i,s)}}const k=e=>p[e]||this._compKeys[e]||t[e],w=e=>d[e]||this._compValues[e]||this._params.root[e],j=e=>e.replaceAll(/\{(.+?)\}/g,((e,t)=>{const[s,i]=t.split(".");if(i){const e=w(s);return""+((null==e?void 0:e[i])||(null==e?void 0:e.def)||"")}return""+(k(s)||"")})),O=e=>{const t=e.split("?");let s;for(let e in t){const i=t[e],[r,o]=i.split("=>"),n=r.match(/(\w+)(\[[\w,]+\])?/);if(!n)continue;const[l,h,c]=n,a=w(h);if(!a)continue;s=a;let p=u(s);const d=null==c?void 0:c.slice(1,-1).split(",");if(d){const e=new Set(d);p=p.filter((([t,s])=>e.has(t)))}if(o){let[e,t]=o.split("|");void 0===t&&(t=e,e=""),p=p.map((([s,i])=>[e.replace("{0}",s)||s,j(t.replaceAll("{1}",""+i))]))}(d||o)&&(s=Object.fromEntries(p));break}return s};function A(t,s,i){var r,o,n,l;let a=""+t;if((null===(r=null==t?void 0:t.startsWith)||void 0===r?void 0:r.call(t,"$"))&&(a=k(t.slice(1)),!a))return"";if(Array.isArray(s))return A(a,Object.assign({},...s.map((e=>"string"==typeof e?O(e):e))),i);if(null==s)return"";if(_(s)){const t=!i||(null===(o=i.startsWith)||void 0===o?void 0:o.call(i,"@"))||a.startsWith("&")||a.startsWith("@")?"":"&";if(a.startsWith("_")){const{e:i,m:r,mv:o}=c(a);return r&&"string"!=typeof o?f(s,((s,[o,n])=>{let l;return l=_(n)?f(n,((e,t)=>e+A(...t,a)),""):n+";",s+t+h({b:e,e:i,m:r,mv:o})+y(l)}),""):t+h({b:e,e:i,m:r,mv:o})+y(f(s,((e,t)=>e+A(...t,a)),""))}return t+a+y(f(s,((e,t)=>e+A(...t,a)),""))}{let e=""+s;return(null===(n=null==e?void 0:e.startsWith)||void 0===n?void 0:n.call(e,"&"))?A(a,O(e.slice(1)),i):(null===(l=null==e?void 0:e.includes)||void 0===l?void 0:l.call(e,"{"))?A(a,j(e),i):S(a.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e)}}let E="";if(r)for(let t in r){const s=r[t],i=this._prepareKeyframesName(e,t);p["kf_"+t]=i,E+=`@keyframes ${i} `+y(f(s,((e,[t,s])=>e+t+(String(+t)===t?"%":"")+y(f(s,((e,t)=>e+A(...t)),""))),""))}return m+E+f(a,((e,t)=>e+A(...t)),"")};const{mode:o="a",prefix:n="eff",initkey:c="init",params:a,themes:p,units:d,rootStyle:k=l}=e;this._mode=o,this._prefix=n,this._initkey=c,this.bem=s({mode:this._mode});const{values:w,keys:j}=(({themes:e,units:t})=>{let s=h,i=Object.assign(Object.assign({},m),t||{});if(e)for(const t in e)s[t]=v(s[t]||{},e[t]);for(const e in i)s.root[e]=s.root[e]&&Object.fromEntries(u(s.root[e]).map((([t,s])=>[t,i[e].replace("{1}",""+s)])));const r={};return s.root.bp&&u(s.root.bp||{}).forEach((([e,t])=>{r[`min_${e}_`]=`@media (min-width:${t})`,r[`max_${e}_`]=`@media (max-width:${t})`})),s.root.cbp&&u(s.root.bp||{}).forEach((([e,t])=>{r[`cmin_${e}_`]=`@container (min-width:${t})`,r[`cmax_${e}_`]=`@container (max-width:${t})`})),{values:s,keys:r}})({themes:p||a,units:d});if(this._params=w,this._compKeys=j,this._initkey){const e=this._params,{root:t}=e,s=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]])}return s}(e,["root"]),o=u(s),n={_mode:{root:{}},_theme:{root:{}}},l={};o.forEach((([e,s])=>{n._mode[e]||(n._mode[e]={}),u(s).forEach((([s,i])=>{u(i).forEach((([i,r])=>{const o=this._prepareVarName(s,i);n._mode[e][o]=r,n._mode.root[o]||(n._mode.root[o]=t[s][i],l[s]||(l[s]={}),l[s][i]=`var(${o})`)}))}))})),n._theme=n._mode,this._compValues=l,this.baseStyles=this.compile(this._initkey,{c:Object.assign(Object.assign(Object.assign(Object.assign({},n),{$r_:v(n._mode.root,k)}),(null===(i=n._mode)||void 0===i?void 0:i.dark)?{$dark_:{$r_:n._mode.dark}}:{}),(null===(r=n._mode)||void 0===r?void 0:r.light)?{$light_:{$r_:n._mode.light}}:{})})}}_getStateSelector(e){const s=e+"_";return this._compKeys[s]||t[s]||e}}function w(e){return new k(e)}class j{constructor(e){if(this._stylesheets={},this._rules={},this._expandedSelectors={},this._styleSheetsArray=[],this._listeners=[],this.get=e=>this._stylesheets[e],this.getAll=()=>this._stylesheets,this.add=(e,t)=>{if(!this._stylesheets[e])return this._stylesheets[e]=t,this._styleSheetsArray.push(t),this.cacheRules(e,t),this.notify(),!0},this.remove=e=>{const t=this.get(e);if(!t)return;const s=this._styleSheetsArray.findIndex((e=>e===t));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[e],delete this._rules[e],delete this._expandedSelectors[e]),this.notify(),!0},this.pack=(e,t)=>{const s=new CSSStyleSheet;if(s.replaceSync(t),s.cssRules.length)return this.add(e,s);console.log(`StyleSheet '${e}' is empty`)},this.cacheRules=(e,t)=>{[...t.cssRules].forEach((t=>{const s=t.cssText.split(" {")[0];s&&(this._rules[e]||(this._rules[e]={}),this._rules[e][s]=t)})),this._expandedSelectors[e]=new Set},this.getExpandedSelectors=e=>this._expandedSelectors[e],this.expandRule=(e,t,s)=>{const i=this._rules[e];if(!i)return void console.log(`No stylesheet with key '${e}'`);const r=i[t];if(!r)return void console.log(`No rule with selector '${t}' in the '${e}' stylesheet`);const[o,n]=r.cssText.split("{"),l=r.parentStyleSheet;if(l){const t=l.cssRules,r=l.insertRule(s+"{"+n+"}".repeat([...s.matchAll(/{/g)].length),t.length);return i[s]=t[r],this._expandedSelectors[e].add(s),!0}},this.apply=e=>{e.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=e=>{this._listeners.push(new WeakRef(e)),this.apply(e)},this.unregisterNode=e=>{const t=this._listeners.findIndex((t=>t.deref()===e));t>=0&&this._listeners.splice(t,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((e,t)=>{const s=t.deref();return s&&(this.apply(s),e.push(t)),e}),[])},e)for(let t in e)this.pack(t,e[t])}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this._expandedSelectors={},this.notify(),!0}}function O(e){return new j(e)}const A=w,E=O;function N(e){const t=(null==e?void 0:e.keygen)||i;customElements.define((null==e?void 0:e.name)||r,class extends HTMLElement{get settingsId(){return this.getAttribute("settingsid")||o}get prefix(){return this.getAttribute("prefix")||n}get mode(){return this.getAttribute("mode")}get isolated(){return this.getAttribute("isolated")}get initkey(){var e;return null!==(e=this.getAttribute("initkey"))&&void 0!==e?e:"init"}constructor(){super(),this._sources=new Map,this.getSettings=()=>{var t;const s=null===(t=null===document||void 0===document?void 0:document.getElementById(this.settingsId))||void 0===t?void 0:t.textContent;return s?JSON.parse(s):(null==e?void 0:e.config)||{}},this.compileStyleSheet=(e,t)=>{var s,i;const r=null===(s=this.processor)||void 0===s?void 0:s.compile(e,t);if(r&&(null===(i=this.manager)||void 0===i?void 0:i.pack(e,r)))return this._sources.set(t,e),!0},this.useStyleSheet=e=>{let s=this._sources.get(e);return s||(s=this.prefix+t(this._sources),this.compileStyleSheet(s,e)),this.resolveStyleSheet(s)},this.expandStyleSheet=(e,t)=>{var s;const i=null===(s=this.manager)||void 0===s?void 0:s.getExpandedSelectors(e);if(this.processor&&i){const s=new Set(t).difference(i);let r=s.size;if(r&&this.processor.expandSelector){const t=this.processor.expandSelector;return s.keys().forEach((s=>{const[i,o]=t(e,s);o?this.manager.expandRule(e,i,o):r--})),r}}},this.processStyles=(e,t)=>{if(e)for(let t in e){const s=e[t];this.compileStyleSheet(t,s)}if(t)for(let e in t){const s=t[e];this.expandStyleSheet(e,s)}return!0},this.resolveStyleSheet=e=>this.processor.bem.attr(e)}connectedCallback(){const e=this.getSettings(),{params:t,themes:s,styles:i,ext:o,units:n,rootStyle:l}=e,h=this.initkey;this.processor=w({prefix:this.prefix,mode:this.mode,initkey:h,params:t,rootStyle:l,themes:s,units:n}),this.manager=O(h?{[h]:`${r} {display: contents;}`+this.processor.baseStyles}:{}),this.processStyles(i,o),null===this.isolated&&this.manager.registerNode(document)}})}export{E as createStyleManager,A as createStyleProcessor,N as defineStyleProvider};
|
|
1
|
+
import{PREFIX as t,SETTINGS_SCRIPT_ID as e,STYLES_SCRIPT_CLS as s,units as i,keys as r,sets as n,PROVIDER_TAG_NAME as l,mediaBP as o,containerBP as h,rootStyle as a,themes as c}from"./constants.js";import{createResolver as u,createCollector as _}from"./utils/common.js";const d=Object.entries,p=(t,e,s)=>d(t).reduce(e,s),f=t=>"object"==typeof t,y=t=>`{${t}}`,g=Object.assign.bind(Object),m=(t,e)=>`${t}:${e};`,v=(t,e)=>["@property",t,y(m("syntax",e.syn||'"*"')+m("inherits",e.inh||!1)+(e.ini?m("initial-value",e.ini):""))].join(" "),b=t=>`var(${t})`,S=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,j=["l","c","h","a"];class ${constructor(t){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=(t,e)=>{const{_:s,kf:i,k:r={},v:n={},c:l}=e,o=this._resolver.selector.bind(this),h=this._parseSelector;let a=g({},l),c=g({},r),u=g({_:{}},n),_="";if(s)for(let e in s){const i=s[e];if("c"===i.typ){const s={};j.forEach((r=>{const n=e+r,l=this._prepareVarName(t,n);s[r]=l,c["_"+n]=s[r],_+=v(l,i)})),u._[e]=S({l:b(s.l),c:b(s.c),h:b(s.h),a:b(s.a)}),i.all&&(a["_"+e+"l"]=`&lig=>${this._prepareVarName(t,e+"l")}:{1}`,a["_"+e+"c"]=`&chr=>${this._prepareVarName(t,e+"c")}:{1}`,a["_"+e+"h"]=`&hue=>${this._prepareVarName(t,e+"h")}:{1}`,a["_"+e+"a"]=`&alp=>${this._prepareVarName(t,e+"a")}:{1}`)}else{const s=this._prepareVarName(t,e);c["_"+e]=s,u._[e]=b(s),_+=v(s,i)}}const $=t=>c[t]||this._outerKeys[t],O=t=>{var e;return u[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},A=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=O(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+($(s)||"")})),k=t=>{const e=t.split("?");let s;for(let t in e){const i=e[t],[r,n]=i.split("=>"),l=r.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[o,h,a]=l,c=O(h);if(!c)continue;s=c;let u=d(s);const _=null==a?void 0:a.slice(1,-1).split(",");if(_){const t=new Set(_);u=u.filter((([e,s])=>t.has(e)))}if(n){let[t,e]=n.split("|");void 0===e&&(e=t,t=""),u=u.map((([s,i])=>[t.replace("{0}",s)||s,A(e.replaceAll("{1}",""+i))]))}(_||n)&&(s=Object.fromEntries(u));break}return s};function x(e,s,i){var r,n,l,a;let c=""+e;if((null===(r=null==e?void 0:e.startsWith)||void 0===r?void 0:r.call(e,"$"))&&(c=""+$(e.slice(1)),!c))return"";if(Array.isArray(s))return x(c,Object.assign({},...s.map((t=>"string"==typeof t?k(t):t))),i);if(null==s)return"";if(f(s)){const e=!i||(null===(n=i.startsWith)||void 0===n?void 0:n.call(i,"@"))||c.startsWith("&")||c.startsWith("@")?"":"&";if(c.startsWith("_")){const{e:i,m:r,mv:n}=h(c);return r&&"string"!=typeof n?p(s,((s,[n,l])=>{let h;return h=f(l)?p(l,((t,e)=>t+x(...e,c)),""):l+";",s+e+o({b:t,e:i,m:r,mv:n})+y(h)}),""):e+o({b:t,e:i,m:r,mv:n})+y(p(s,((t,e)=>t+x(...e,c)),""))}return e+c+y(p(s,((t,e)=>t+x(...e,c)),""))}{let t=""+s;return(null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"&"))?x(c,k(t.slice(1)),i):(null===(a=null==t?void 0:t.includes)||void 0===a?void 0:a.call(t,"{"))?x(c,A(t),i):m(c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let N="";if(i)for(let e in i){const s=i[e],r=this._prepareKeyframesName(t,e);c["kf_"+e]=r,N+=`@keyframes ${r} `+y(p(s,((t,[e,s])=>t+e+(String(+e)===e?"%":"")+y(p(s,((t,e)=>t+x(...e)),""))),""))}return _+N+p(a,((t,e)=>t+x(...e)),"")};const{sets:e,keys:s,resolver:i}=t;this._resolver=i,s&&(this._outerKeys=s),e&&(this._outerSets=e)}}class O{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.on=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;return-1===this._styleSheetsArray.findIndex((t=>t===e))?(this._styleSheetsArray.push(e),this.notify(),!0):void 0},this.off=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return-1!==s?(this._styleSheetsArray.splice(s,1),this.notify(),!0):void 0},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,s)=>{const i=new CSSStyleSheet;if(i.replaceSync(e),i.cssRules.length)return this.add(t,i);console.log(`StyleSheet '${t}' is empty`)},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{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 A=globalThis.document,k=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));function x(d={}){const{name:p=l,styles:f={},settings:y={}}=d,g=globalThis.customElements;return!(null==g?void 0:g.get(p))&&(g.define(p,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||t}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||e)}get _initSelector(){return"."+(this.getAttribute("initcls")||s)}get settingsContent(){const t=null==A?void 0:A.querySelector(this._settingsSelector);let e;return e=k(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:y,e||{}}get initContent(){const t=A.querySelectorAll(this._initSelector);let e=f||{};return t.forEach((t=>{let s;s=k(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}constructor(){super(),this._setState=()=>{const{units:t,keys:e,sets:s,mediaBP:l=o,containerBP:u=h,rootStyle:_=a,themes:d=c}=this.settingsContent,f=Object.assign(Object.assign({},i),t||{}),y=Object.assign(Object.assign({},r),e||{}),g=Object.assign({},n);s&&Object.entries(s).forEach((([t,e])=>g[t]=Object.assign({},e)));const m=Object.entries(d);if(f)for(const t in f)g[t]=g[t]&&Object.fromEntries(Object.entries(g[t]).map((([e,s])=>[e,f[t].replace("{1}",""+s)])));l&&Object.entries(l).forEach((([t,e])=>{y[`min_${t}_`]=`@media (min-width:${e})`,y[`max_${t}_`]=`@media (max-width:${e})`})),u&&Object.entries(u).forEach((([t,e])=>{y[`cmin_${t}_`]=`@container (min-width:${e})`,y[`cmax_${t}_`]=`@container (max-width:${e})`}));const v={},b={};d&&g&&m.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{const r=this._resolver.varName(t,e);f[t]?s[r]=f[t].replace("{1}",""+i):s[r]=i,v[r]||(v[r]=g[t][e],g[t][e]=`var(${r})`)}))})),b[t]=s})),this._dict={sets:g,keys:y},this._mainConfig={c:Object.assign(Object.assign({[p]:{display:"contents"},_theme:b,$$:Object.assign(v,_)},(null==b?void 0:b.dark)?{$dark_:{$$:b.dark}}:{}),(null==b?void 0:b.light)?{$light_:{$$:b.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.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.on=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.on(e):void 0},this.off=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.off(e):void 0},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))}connectedCallback(){this._resolver=u({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=_({hydrate:this.hydrate,prefix:e,initContent:t}),this._processor=(s={sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver},new $(s)),this._manager=new O,this.use(this._mainConfig),this.usePublic(t),A&&!this.isolated&&this._manager.registerNode(A)}}),!0)}export{x as defineProvider};
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { IStyleProcessor,
|
|
1
|
+
import { IStyleProcessor, IStyleResolver } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Processor constructor params
|
|
4
4
|
* @private
|
|
5
5
|
*/
|
|
6
6
|
interface IConstructorParams {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
params?: IStyleConfig['params'];
|
|
11
|
-
themes?: IStyleConfig['themes'];
|
|
12
|
-
units?: IStyleConfig['units'];
|
|
13
|
-
rootStyle?: IStyleConfig['rootStyle'];
|
|
7
|
+
sets?: Record<string, Record<string, string | number>>;
|
|
8
|
+
keys?: Record<string, string | number>;
|
|
9
|
+
resolver: IStyleResolver;
|
|
14
10
|
}
|
|
15
11
|
/**
|
|
16
12
|
* Put value in curly braces
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare const sets: Record<string, Record<string, string | number>>;
|
|
2
|
+
export declare const keys: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Media breakpoints
|
|
5
|
+
*/
|
|
6
|
+
export declare const mediaBP: {
|
|
7
|
+
xs: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Container breakpoints
|
|
15
|
+
*/
|
|
16
|
+
export declare const containerBP: {
|
|
17
|
+
xs: string;
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
xl: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Default root styles
|
|
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
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Default style params
|
|
38
|
+
*/
|
|
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
|
+
};
|
|
67
|
+
export declare const units: Record<string, string>;
|
|
68
|
+
/**
|
|
69
|
+
* Prefix which will be used for private stylesheets
|
|
70
|
+
*/
|
|
71
|
+
export declare const PREFIX = "eff";
|
|
72
|
+
/**
|
|
73
|
+
* Id for special script element,
|
|
74
|
+
* which contains provider settings
|
|
75
|
+
*/
|
|
76
|
+
export declare const SETTINGS_SCRIPT_ID = "effcss";
|
|
77
|
+
/**
|
|
78
|
+
* ClassName for special script elements,
|
|
79
|
+
* which contain initial stylesheet configs
|
|
80
|
+
*/
|
|
81
|
+
export declare const STYLES_SCRIPT_CLS = "effcss_init";
|
|
82
|
+
/**
|
|
83
|
+
* Name of the custom style provider element
|
|
84
|
+
*/
|
|
85
|
+
export declare const PROVIDER_TAG_NAME = "style-provider";
|
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createProcessor } from './_provider/process';
|
|
3
|
-
import { createManager } from './_provider/manage';
|
|
1
|
+
import { TProviderSettings, TProviderInitContent } from './types';
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
3
|
+
* Define style provider custom element
|
|
6
4
|
*/
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
* Create {@link IStyleManager | style manager}
|
|
10
|
-
*/
|
|
11
|
-
export declare const createStyleManager: typeof createManager;
|
|
12
|
-
/**
|
|
13
|
-
* Define style provider as custom element
|
|
14
|
-
*/
|
|
15
|
-
export declare function defineStyleProvider(props?: {
|
|
5
|
+
export declare function defineProvider(props?: {
|
|
16
6
|
/**
|
|
17
7
|
* Element name
|
|
18
8
|
* @defaultValue style-provider
|
|
19
9
|
*/
|
|
20
10
|
name?: string;
|
|
21
11
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @description
|
|
24
|
-
* Will be used for initial stylesheets generation
|
|
12
|
+
* Initial styles
|
|
25
13
|
*/
|
|
26
|
-
|
|
14
|
+
styles?: TProviderInitContent;
|
|
27
15
|
/**
|
|
28
|
-
*
|
|
16
|
+
* Provider config
|
|
17
|
+
* @description
|
|
18
|
+
* Will be used for initial stylesheets generation
|
|
29
19
|
*/
|
|
30
|
-
|
|
31
|
-
}):
|
|
20
|
+
settings?: TProviderSettings;
|
|
21
|
+
}): boolean;
|