amotify 0.2.12 → 0.2.13

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.
@@ -79,7 +79,7 @@ export declare namespace Fonts {
79
79
  isLightFont?: boolean;
80
80
  isSemiBoldFont?: boolean;
81
81
  isBoldFont?: boolean;
82
- isRounded?: boolean;
82
+ isRounded?: boolean | number;
83
83
  textAlign?: 'left' | 'center' | 'right';
84
84
  textDecoration?: 'none' | 'underline' | 'line-through';
85
85
  };
@@ -1 +1 @@
1
- import{b as s,c as u,d as J}from"../chunk-C5N2D3ZX.js";import o from"@mingoo/jsmin";import{Config as Le}from".";const t={toConcreteBorderRadius:l=>{let R=Le.get().roundness|0;return l=="1.tone.primary"?l=[0,2,3,4,5,5][R]:l=="2.tone.secondary"?l=[0,1,2,3,4,5][R]:l=="3.tone.tertiary"&&(l=[0,"1/3","2/3",1,2,3][R]),l},ev:l=>o.is.nullish(l),ClassNames:(l,R)=>{var Be,Te,Re,we,Pe,Ne,ke;let e=[],_e=R,{gap:n,display:C,position:g,overflow:f,fontColor:w,fontSize:x,fontWeight:i,backgroundColor:p,textAlign:_,textDecoration:m,boxShadow:U,margin:h,marginTop:r,marginRight:c,marginBottom:a,marginLeft:B,padding:T,paddingTop:N,paddingRight:k,paddingBottom:L,paddingLeft:z,top:V,right:Y,bottom:Z,left:ee,border:E,borderTop:S,borderRight:v,borderBottom:b,borderLeft:y,borderWidth:te,borderColor:re,borderStyle:se,borderRadius:F,borderTopLeftRadius:W,borderTopRightRadius:A,borderBottomLeftRadius:H,borderBottomRightRadius:j,flexSizing:ie,flexWrap:oe,flexType:ae,flexChilds:le,flexGrid:ne,horizontalAlign:pe,verticalAlign:de,transition:he,gridCenter:ue,gridCols:ge,maxHeight:fe,minHeight:me,maxWidth:ce,minWidth:Se,width:ve,height:be,unitHeight:ye,unitWidth:Ce,opacity:xe}=_e,ze=J(_e,["gap","display","position","overflow","fontColor","fontSize","fontWeight","backgroundColor","textAlign","textDecoration","boxShadow","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderWidth","borderColor","borderStyle","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","flexSizing","flexWrap","flexType","flexChilds","flexGrid","horizontalAlign","verticalAlign","transition","gridCenter","gridCols","maxHeight","minHeight","maxWidth","minWidth","width","height","unitHeight","unitWidth","opacity"]);{if(t.ev(C)||e.push("dsp"+C),f){let d=o.flatArray(f);e.push("ovfl-x-"+d[0]),e.push("ovfl-y-"+(d[1]||d[0]))}t.ev(g)||e.push("ps"+g),t.ev(_)||e.push("txtalg"+_),t.ev(_)||e.push("txtdeco"+m),t.ev(w)||e.push("ftcl"+((Be=String(w))==null?void 0:Be.replace(/\./g,"_"))),t.ev(x)||e.push("ftsz"+((Te=String(x))==null?void 0:Te.replace(/\..*/,""))),t.ev(i)||e.push("ftwt"+(i==null?void 0:i.replace(/\..*/,""))),t.ev(p)||e.push("bgc"+((Re=String(p))==null?void 0:Re.replace(/\./g,"_"))),t.ev(U)||e.push("bs"+U);let $,I,D,G;o.is.exist(h)&&(o.is.array(h)?h.length==2?[$,I,D,G]=[...h,...h]:h.length==4&&([$,I,D,G]=h):$=I=D=G=h,r=r!=null?r:$,c=c!=null?c:I,a=a!=null?a:D,B=B!=null?B:G),t.ev(r)||e.push("mrgt"+r),t.ev(c)||e.push("mrgr"+c),t.ev(a)||e.push("mrgb"+a),t.ev(B)||e.push("mrgl"+B);let O,q,M,X;o.is.exist(T)&&(o.is.array(T)?T.length==2?[O,q,M,X]=[...T,...T]:T.length==4&&([O,q,M,X]=T):O=q=M=X=T,N=N!=null?N:O,k=k!=null?k:q,L=L!=null?L:M,z=z!=null?z:X),t.ev(N)||e.push("pdt"+N),t.ev(k)||e.push("pdr"+k),t.ev(L)||e.push("pdb"+L),t.ev(z)||e.push("pdl"+z),t.ev(V)||e.push("pstt"+V),t.ev(Y)||e.push("pstr"+Y),t.ev(Z)||e.push("pstb"+Z),t.ev(ee)||e.push("pstl"+ee);{o.is.exist(E)&&(S=S!=null?S:E,v=v!=null?v:E,b=b!=null?b:E,y=y!=null?y:E),o.is.boolean(S)&&(S=["unset","2.normal"][Number(S)]),o.is.boolean(v)&&(v=["unset","2.normal"][Number(v)]),o.is.boolean(b)&&(b=["unset","2.normal"][Number(b)]),o.is.boolean(y)&&(y=["unset","2.normal"][Number(y)]),t.ev(S)||e.push("b_t_ss"+((we=String(S))==null?void 0:we.replace(/\..*/,""))),t.ev(v)||e.push("b_r_ss"+((Pe=String(v))==null?void 0:Pe.replace(/\..*/,""))),t.ev(b)||e.push("b_b_ss"+((Ne=String(b))==null?void 0:Ne.replace(/\..*/,""))),t.ev(y)||e.push("b_l_ss"+((ke=String(y))==null?void 0:ke.replace(/\..*/,""))),o.is.exist(te)&&e.push("b_wth"+String(te)),o.is.exist(re)&&e.push("b_cl"+String(re)),o.is.exist(se)&&e.push("b_st"+String(se));{let d,P,K,Q;o.is.exist(F)&&(o.is.array(F)?F.length==4&&([d,P,Q,K]=F):d=P=K=Q=F,W=W!=null?W:d,A=A!=null?A:P,H=H!=null?H:K,j=j!=null?j:Q)}t.ev(W)||e.push("br_tl"+t.toConcreteBorderRadius(W)),t.ev(A)||e.push("br_tr"+t.toConcreteBorderRadius(A)),t.ev(H)||e.push("br_bl"+t.toConcreteBorderRadius(H)),t.ev(j)||e.push("br_br"+t.toConcreteBorderRadius(j))}if(t.ev(xe)||e.push("op"+xe),o.is.exist(n)){let d,P;o.is.array(n)?(d=n[0],P=n[1]):d=P=n,e.push("gapRow"+d,"gapCol"+P)}t.ev(ie)||e.push("flsz"+ie),t.ev(oe)||e.push("flwrp"+oe),t.ev(ae)||e.push("fltyp"+ae),t.ev(le)||e.push("flchld"+le),t.ev(ne)||e.push("flgrid"+ne),t.ev(de)||e.push("flvrt"+de),t.ev(pe)||e.push("flhrz"+pe),t.ev(ue)||e.push("grcnt"+ue),t.ev(ge)||e.push("grcol"+ge),t.ev(be)||e.push("hgt"+be),t.ev(ve)||e.push("wdt"+ve),t.ev(ye)||e.push("unthgt"+ye),t.ev(Ce)||e.push("untwdt"+Ce),t.ev(he)||e.push("trnst"+he),t.ev(fe)||e.push("maxh"+fe),t.ev(me)||e.push("minh"+me),t.ev(ce)||e.push("maxw"+ce),t.ev(Se)||e.push("minw"+Se)}return{others:ze,className:e.length?l+e.join(" "+l):""}}},We=l=>{let c=s({},l),{gradients:e,ssCardBox:n,ssSphere:C,ssSquare:g,ssPushable:f,ssAbsoluteCovered:w,ssTextEllipsis:x,flexCenter:i,flexNewLine:p,isLightFont:_,isBoldFont:m,isSemiBoldFont:U,isRounded:h}=c,r=J(c,["gradients","ssCardBox","ssSphere","ssSquare","ssPushable","ssAbsoluteCovered","ssTextEllipsis","flexCenter","flexNewLine","isLightFont","isBoldFont","isSemiBoldFont","isRounded"]);if(e){let{deg:a,colors:B}=e;r=u(s({},r),{freeCSS:u(s({},r.freeCSS),{background:`linear-gradient(${a}deg,${B.join(",")})`})})}if(n){n===!0&&(n="border");let a={backgroundColor:"layer.1",borderRadius:"1.tone.primary",boxShadow:"0.thin",freeCSS:{zIndex:1}};n=="border"?a.border=!0:n=="layer"?a.backgroundColor="layer.1":n=="cloud"?a.backgroundColor="cloud":n=="shadow"&&(a.boxShadow="0.normal"),["dim","dark"].includes(Le.get().darkMode)&&(a.boxShadow="1.remark"),r=u(s(s({},a),r),{freeCSS:s(s({},a.freeCSS),r.freeCSS),UnderBreakPointStyles:s(s({},a.UnderBreakPointStyles),r.UnderBreakPointStyles)})}return C&&(i=i!=null?i:!0,r=s({padding:0,unitWidth:C,unitHeight:C,borderRadius:"sphere",flexSizing:"none"},r)),g&&(i=i!=null?i:!0,r=s({padding:0,unitWidth:g,unitHeight:g,flexSizing:"none"},r)),!f||(r=u(s({transition:"middle"},r),{className:[r.className,"ssPushable"].join(" ")})),!w||(r=s({position:"absolute",top:0,left:0,right:0,bottom:0},r)),!x||(r=u(s({overflow:"hidden"},r),{freeCSS:s({whiteSpace:"nowrap",textOverflow:"ellipsis"},r.freeCSS)})),!p||(r=s({width:1,flexSizing:"none"},r)),!i||(r=s({display:"flex",horizontalAlign:"center",verticalAlign:"center"},r)),!_||(r=u(s({},r),{fontWeight:"1.light"})),!U||(r=u(s({},r),{fontWeight:"3.semiBold"})),!m||(r=u(s({},r),{fontWeight:"4.bold"})),!h||(r=u(s({},r),{borderRadius:"sphere"})),r},Fe=l=>{let _=We(l),{componentID:e,UnderBreakPointStyles:n={},className:C="",freeCSS:g={},ssEffectsOnActive:f,ssLastChildLossBorder:w}=_,x=J(_,["componentID","UnderBreakPointStyles","className","freeCSS","ssEffectsOnActive","ssLastChildLossBorder"]),i=[C];if(w&&i.push("ssLastChildLossBorder_"+w),f){f=o.flatArray(f);for(let m of f)i.push("eff_"+m,"eff_"+m.split(".")[0])}{let m=t.ClassNames("amotf_",x);i.push(m.className),x=m.others}n&&i.push(t.ClassNames("amotf_bp",n).className);let p=s({},x);return g&&(p.style=s(s({},g),p.style)),(e||p["data-component-id"])&&(p["data-component-id"]=p["data-component-id"]||e),i.length&&(p.className=i.join(" ").trim().replace(/%/ig,"P").replace(/\d+px/ig,"PIX").replace(/\s+/ig," ").replace(/\//ig,"_").replace(/\./ig,"-")),p};export{Fe as GenerateClassName,We as ReadStyleSet};
1
+ import{b as s,c as h,d as J}from"../chunk-C5N2D3ZX.js";import o from"@mingoo/jsmin";import{Config as Le}from".";const r={toConcreteBorderRadius:l=>{let T=Le.get().roundness|0;return l=="1.tone.primary"?l=[0,2,3,4,5,5][T]:l=="2.tone.secondary"?l=[0,1,2,3,4,5][T]:l=="3.tone.tertiary"&&(l=[0,"1/3","2/3",1,2,3][T]),l},ev:l=>o.is.nullish(l),ClassNames:(l,T)=>{var Be,Re,Te,we,Pe,Ne,ke;let e=[],_e=T,{gap:n,display:C,position:g,overflow:f,fontColor:w,fontSize:x,fontWeight:i,backgroundColor:p,textAlign:_,textDecoration:m,boxShadow:U,margin:d,marginTop:t,marginRight:S,marginBottom:a,marginLeft:B,padding:R,paddingTop:N,paddingRight:k,paddingBottom:L,paddingLeft:z,top:V,right:Y,bottom:Z,left:ee,border:E,borderTop:c,borderRight:b,borderBottom:v,borderLeft:y,borderWidth:re,borderColor:te,borderStyle:se,borderRadius:F,borderTopLeftRadius:W,borderTopRightRadius:A,borderBottomLeftRadius:H,borderBottomRightRadius:j,flexSizing:ie,flexWrap:oe,flexType:ae,flexChilds:le,flexGrid:ne,horizontalAlign:pe,verticalAlign:de,transition:he,gridCenter:ue,gridCols:ge,maxHeight:fe,minHeight:me,maxWidth:Se,minWidth:ce,width:be,height:ve,unitHeight:ye,unitWidth:Ce,opacity:xe}=_e,ze=J(_e,["gap","display","position","overflow","fontColor","fontSize","fontWeight","backgroundColor","textAlign","textDecoration","boxShadow","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderWidth","borderColor","borderStyle","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","flexSizing","flexWrap","flexType","flexChilds","flexGrid","horizontalAlign","verticalAlign","transition","gridCenter","gridCols","maxHeight","minHeight","maxWidth","minWidth","width","height","unitHeight","unitWidth","opacity"]);{if(r.ev(C)||e.push("dsp"+C),f){let u=o.flatArray(f);e.push("ovfl-x-"+u[0]),e.push("ovfl-y-"+(u[1]||u[0]))}r.ev(g)||e.push("ps"+g),r.ev(_)||e.push("txtalg"+_),r.ev(_)||e.push("txtdeco"+m),r.ev(w)||e.push("ftcl"+((Be=String(w))==null?void 0:Be.replace(/\./g,"_"))),r.ev(x)||e.push("ftsz"+((Re=String(x))==null?void 0:Re.replace(/\..*/,""))),r.ev(i)||e.push("ftwt"+(i==null?void 0:i.replace(/\..*/,""))),r.ev(p)||e.push("bgc"+((Te=String(p))==null?void 0:Te.replace(/\./g,"_"))),r.ev(U)||e.push("bs"+U);let $,I,D,G;o.is.exist(d)&&(o.is.array(d)?d.length==2?[$,I,D,G]=[...d,...d]:d.length==4&&([$,I,D,G]=d):$=I=D=G=d,t=t!=null?t:$,S=S!=null?S:I,a=a!=null?a:D,B=B!=null?B:G),r.ev(t)||e.push("mrgt"+t),r.ev(S)||e.push("mrgr"+S),r.ev(a)||e.push("mrgb"+a),r.ev(B)||e.push("mrgl"+B);let O,q,M,X;o.is.exist(R)&&(o.is.array(R)?R.length==2?[O,q,M,X]=[...R,...R]:R.length==4&&([O,q,M,X]=R):O=q=M=X=R,N=N!=null?N:O,k=k!=null?k:q,L=L!=null?L:M,z=z!=null?z:X),r.ev(N)||e.push("pdt"+N),r.ev(k)||e.push("pdr"+k),r.ev(L)||e.push("pdb"+L),r.ev(z)||e.push("pdl"+z),r.ev(V)||e.push("pstt"+V),r.ev(Y)||e.push("pstr"+Y),r.ev(Z)||e.push("pstb"+Z),r.ev(ee)||e.push("pstl"+ee);{o.is.exist(E)&&(c=c!=null?c:E,b=b!=null?b:E,v=v!=null?v:E,y=y!=null?y:E),o.is.boolean(c)&&(c=["unset","2.normal"][Number(c)]),o.is.boolean(b)&&(b=["unset","2.normal"][Number(b)]),o.is.boolean(v)&&(v=["unset","2.normal"][Number(v)]),o.is.boolean(y)&&(y=["unset","2.normal"][Number(y)]),r.ev(c)||e.push("b_t_ss"+((we=String(c))==null?void 0:we.replace(/\..*/,""))),r.ev(b)||e.push("b_r_ss"+((Pe=String(b))==null?void 0:Pe.replace(/\..*/,""))),r.ev(v)||e.push("b_b_ss"+((Ne=String(v))==null?void 0:Ne.replace(/\..*/,""))),r.ev(y)||e.push("b_l_ss"+((ke=String(y))==null?void 0:ke.replace(/\..*/,""))),o.is.exist(re)&&e.push("b_wth"+String(re)),o.is.exist(te)&&e.push("b_cl"+String(te)),o.is.exist(se)&&e.push("b_st"+String(se));{let u,P,K,Q;o.is.exist(F)&&(o.is.array(F)?F.length==4&&([u,P,Q,K]=F):u=P=K=Q=F,W=W!=null?W:u,A=A!=null?A:P,H=H!=null?H:K,j=j!=null?j:Q)}r.ev(W)||e.push("br_tl"+r.toConcreteBorderRadius(W)),r.ev(A)||e.push("br_tr"+r.toConcreteBorderRadius(A)),r.ev(H)||e.push("br_bl"+r.toConcreteBorderRadius(H)),r.ev(j)||e.push("br_br"+r.toConcreteBorderRadius(j))}if(r.ev(xe)||e.push("op"+xe),o.is.exist(n)){let u,P;o.is.array(n)?(u=n[0],P=n[1]):u=P=n,e.push("gapRow"+u,"gapCol"+P)}r.ev(ie)||e.push("flsz"+ie),r.ev(oe)||e.push("flwrp"+oe),r.ev(ae)||e.push("fltyp"+ae),r.ev(le)||e.push("flchld"+le),r.ev(ne)||e.push("flgrid"+ne),r.ev(de)||e.push("flvrt"+de),r.ev(pe)||e.push("flhrz"+pe),r.ev(ue)||e.push("grcnt"+ue),r.ev(ge)||e.push("grcol"+ge),r.ev(ve)||e.push("hgt"+ve),r.ev(be)||e.push("wdt"+be),r.ev(ye)||e.push("unthgt"+ye),r.ev(Ce)||e.push("untwdt"+Ce),r.ev(he)||e.push("trnst"+he),r.ev(fe)||e.push("maxh"+fe),r.ev(me)||e.push("minh"+me),r.ev(Se)||e.push("maxw"+Se),r.ev(ce)||e.push("minw"+ce)}return{others:ze,className:e.length?l+e.join(" "+l):""}}},We=l=>{let S=s({},l),{gradients:e,ssCardBox:n,ssSphere:C,ssSquare:g,ssPushable:f,ssAbsoluteCovered:w,ssTextEllipsis:x,flexCenter:i,flexNewLine:p,isLightFont:_,isBoldFont:m,isSemiBoldFont:U,isRounded:d}=S,t=J(S,["gradients","ssCardBox","ssSphere","ssSquare","ssPushable","ssAbsoluteCovered","ssTextEllipsis","flexCenter","flexNewLine","isLightFont","isBoldFont","isSemiBoldFont","isRounded"]);if(e){let{deg:a,colors:B}=e;t=h(s({},t),{freeCSS:h(s({},t.freeCSS),{background:`linear-gradient(${a}deg,${B.join(",")})`})})}if(n){n===!0&&(n="border");let a={backgroundColor:"layer.1",borderRadius:"1.tone.primary",boxShadow:"0.thin",freeCSS:{zIndex:1}};n=="border"?a.border=!0:n=="layer"?a.backgroundColor="layer.1":n=="cloud"?a.backgroundColor="cloud":n=="shadow"&&(a.boxShadow="0.normal"),["dim","dark"].includes(Le.get().darkMode)&&(a.boxShadow="1.remark"),t=h(s(s({},a),t),{freeCSS:s(s({},a.freeCSS),t.freeCSS),UnderBreakPointStyles:s(s({},a.UnderBreakPointStyles),t.UnderBreakPointStyles)})}return C&&(i=i!=null?i:!0,t=s({padding:0,unitWidth:C,unitHeight:C,borderRadius:"sphere",flexSizing:"none"},t)),g&&(i=i!=null?i:!0,t=s({padding:0,unitWidth:g,unitHeight:g,flexSizing:"none"},t)),f&&(t=h(s({transition:"middle"},t),{className:[t.className,"ssPushable"].join(" ")})),w&&(t=s({position:"absolute",top:0,left:0,right:0,bottom:0},t)),x&&(t=h(s({overflow:"hidden"},t),{freeCSS:s({whiteSpace:"nowrap",textOverflow:"ellipsis"},t.freeCSS)})),p&&(t=s({width:1,flexSizing:"none"},t)),i&&(t=s({display:"flex",horizontalAlign:"center",verticalAlign:"center"},t)),_&&(t=h(s({},t),{fontWeight:"1.light"})),U&&(t=h(s({},t),{fontWeight:"3.semiBold"})),m&&(t=h(s({},t),{fontWeight:"4.bold"})),d&&(o.is.number(d)?t=h(s({},t),{freeCSS:h(s({},t.freeCSS),{borderRadius:d*12})}):t=h(s({},t),{borderRadius:"sphere"})),t},Fe=l=>{let _=We(l),{componentID:e,UnderBreakPointStyles:n={},className:C="",freeCSS:g={},ssEffectsOnActive:f,ssLastChildLossBorder:w}=_,x=J(_,["componentID","UnderBreakPointStyles","className","freeCSS","ssEffectsOnActive","ssLastChildLossBorder"]),i=[C];if(w&&i.push("ssLastChildLossBorder_"+w),f){f=o.flatArray(f);for(let m of f)i.push("eff_"+m,"eff_"+m.split(".")[0])}{let m=r.ClassNames("amotf_",x);i.push(m.className),x=m.others}n&&i.push(r.ClassNames("amotf_bp",n).className);let p=s({},x);return g&&(p.style=s(s({},g),p.style)),(e||p["data-component-id"])&&(p["data-component-id"]=p["data-component-id"]||e),i.length&&(p.className=i.join(" ").trim().replace(/%/ig,"P").replace(/\d+px/ig,"PIX").replace(/\s+/ig," ").replace(/\//ig,"_").replace(/\./ig,"-")),p};export{Fe as GenerateClassName,We as ReadStyleSet};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amotify",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "UI Component for React,NextJS,esbuild",
5
5
  "scripts": {
6
6
  "start": "run-p clean build:*",