@vanelsas/baredom 2.6.0 → 2.7.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/CHANGELOG.md +12 -0
- package/README.md +12 -41
- package/dist/base.js +355 -349
- package/dist/integrity.json +93 -93
- package/dist/x-alert.js +18 -19
- package/dist/x-avatar-group.js +10 -11
- package/dist/x-avatar.js +14 -14
- package/dist/x-badge.js +10 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +18 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +34 -34
- package/dist/x-chart.js +46 -48
- package/dist/x-checkbox.js +10 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +10 -12
- package/dist/x-color-picker.js +44 -45
- package/dist/x-combobox.js +26 -27
- package/dist/x-command-palette.js +26 -27
- package/dist/x-container.js +5 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +22 -22
- package/dist/x-currency-field.js +22 -24
- package/dist/x-date-picker.js +41 -42
- package/dist/x-divider.js +8 -9
- package/dist/x-drawer.js +11 -12
- package/dist/x-dropdown.js +10 -11
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -8
- package/dist/x-file-upload.js +22 -25
- package/dist/x-form-field.js +15 -17
- package/dist/x-form.js +8 -10
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-icon.js +7 -7
- package/dist/x-image.js +19 -19
- package/dist/x-kinetic-font.js +28 -29
- package/dist/x-kinetic-typography.js +39 -39
- package/dist/x-liquid-dock.js +39 -39
- package/dist/x-liquid-fill.js +44 -44
- package/dist/x-liquid-glass.js +47 -47
- package/dist/x-menu-item.js +9 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +27 -27
- package/dist/x-modal.js +12 -13
- package/dist/x-morph-stack.js +38 -39
- package/dist/x-navbar.js +12 -13
- package/dist/x-neural-glow.js +32 -33
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +18 -19
- package/dist/x-organic-progress.js +37 -38
- package/dist/x-organic-shape.js +13 -14
- package/dist/x-pagination.js +16 -17
- package/dist/x-particle-button.js +48 -49
- package/dist/x-popover.js +24 -25
- package/dist/x-progress-circle.js +8 -9
- package/dist/x-progress.js +11 -11
- package/dist/x-radio.js +10 -12
- package/dist/x-ripple-effect.js +11 -11
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +35 -35
- package/dist/x-scroll-timeline.js +46 -47
- package/dist/x-scroll.js +40 -41
- package/dist/x-search-field.js +15 -17
- package/dist/x-select.js +10 -11
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton-group.js +12 -14
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +16 -18
- package/dist/x-soft-body.js +21 -21
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -6
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +15 -15
- package/dist/x-switch.js +9 -11
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +22 -22
- package/dist/x-table-row.js +9 -10
- package/dist/x-table.js +14 -15
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +19 -21
- package/dist/x-theme.d.ts +1 -1
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +23 -23
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +24 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +11 -13
- package/dist/x-typography.js +11 -11
- package/dist/x-welcome-tour.js +64 -65
- package/package.json +181 -181
package/dist/x-gaussian-blur.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var pZ=function(a,b,c){var d=$APP.z(a);return $APP.We.m($APP.ee,$APP.$d.g(function(e){var g=e*2.39996323,h=50+30*Math.cos(g);g=50+30*Math.sin(g);var l=10*Math.sin(e*2.39996323),m=10*Math.cos(e*Math.PI),p=Math.sin(e*1.618);p=.7+p*p*.6;var r=.8+.4*Math.sin(e*1.3),v=-(e/$APP.Jh.i(b,1));return new $APP.Q(null,7,[$APP.jk,$APP.pc(a,$APP.ed(e,d)),$APP.cm,h+l,$APP.bm,g+m,$APP.di,c*p,mZ,$APP.ed(e,4),nZ,r,oZ,v],null)}),$APP.dg(0,b))},qZ=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),
|
|
3
3
|
d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot");c.textContent=":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;box-sizing:border-box;color-scheme:light dark;--x-gaussian-blur-bg:transparent;--x-gaussian-blur-z-index:0;--x-gaussian-blur-border-radius:0;}:host{border-radius:var(--x-gaussian-blur-border-radius);}[part\x3dbackdrop]{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:var(--x-gaussian-blur-z-index);background:var(--x-gaussian-blur-bg);}[part\x3dcontent]{position:relative;z-index:1;width:100%;height:100%;}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;}@keyframes x-gb-float-0{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(12%,-18%);}50%{transform:translate(-50%,-50%) translate(-10%,15%);}75%{transform:translate(-50%,-50%) translate(15%,6%);}}@keyframes x-gb-float-1{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(-15%,10%);}50%{transform:translate(-50%,-50%) translate(18%,-12%);}75%{transform:translate(-50%,-50%) translate(-8%,-16%);}}@keyframes x-gb-float-2{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(10%,16%);}50%{transform:translate(-50%,-50%) translate(-18%,-8%);}75%{transform:translate(-50%,-50%) translate(14%,-12%);}}@keyframes x-gb-float-3{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(-12%,-10%);}50%{transform:translate(-50%,-50%) translate(16%,18%);}75%{transform:translate(-50%,-50%) translate(-10%,14%);}}@keyframes x-gb-pulse-0{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(1.2) translate(10%,-14%);}66%{transform:translate(-50%,-50%) scale(0.85) translate(-10%,10%);}}@keyframes x-gb-pulse-1{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(0.85) translate(-14%,10%);}66%{transform:translate(-50%,-50%) scale(1.2) translate(12%,-8%);}}@keyframes x-gb-pulse-2{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(1.18) translate(8%,16%);}66%{transform:translate(-50%,-50%) scale(0.82) translate(-16%,-10%);}}@keyframes x-gb-pulse-3{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(0.88) translate(-10%,-14%);}66%{transform:translate(-50%,-50%) scale(1.15) translate(10%,16%);}}:host([data-paused]) .blob{animation-play-state:paused;}@media (prefers-reduced-motion:reduce){.blob{animation:none!important;}}";
|
|
4
|
-
d.setAttribute("part","backdrop");d.setAttribute("aria-hidden","true");e.setAttribute("part","content");e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xGaussianBlurBackdrop=d;a.__xGaussianBlurSlot=g;a.__xGaussianBlurBlobs=[];a.__xGaussianBlurInit=!0},
|
|
5
|
-
$APP.zf([
|
|
6
|
-
typeof c==="string"&&$APP.N("",c.trim())?(c=parseInt(c.trim(),10),c=$APP.n(isFinite(c))?$APP.
|
|
7
|
-
e:"float";d=d!=null;typeof m==="string"&&$APP.N("",m.trim())?(m=parseFloat(m.trim()),
|
|
8
|
-
d=$APP.D(b,
|
|
9
|
-
e=m.length;l=$APP.z(h);for(g=e;;)if(g<l)
|
|
10
|
-
E);v.setProperty("height",E);v.setProperty("background","radial-gradient(circle,"+$APP.
|
|
11
|
-
c)}$APP.n($APP.k(a,"__xGaussianBlurInit"))||
|
|
12
|
-
["
|
|
13
|
-
|
|
14
|
-
"string"&&$APP.N("",G)?this.setAttribute(H,G):this.removeAttribute(H)}}(b,c,d,e,l,m,p,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$APP.zf([
|
|
18
|
-
$APP
|
|
19
|
-
var
|
|
20
|
-
$APP.
|
|
4
|
+
d.setAttribute("part","backdrop");d.setAttribute("aria-hidden","true");e.setAttribute("part","content");e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xGaussianBlurBackdrop=d;a.__xGaussianBlurSlot=g;a.__xGaussianBlurBlobs=[];a.__xGaussianBlurInit=!0},rZ=function(a,b){if($APP.n($APP.n(b)?b.assignedNodes().length>0:null))return a.removeAttribute("role"),a.removeAttribute("aria-hidden");a.setAttribute("role","presentation");return a.setAttribute("aria-hidden","true")},BZ=function(a){var b=
|
|
5
|
+
$APP.zf([sZ,$APP.mh,$APP.Yj,$APP.Qm,$APP.di,$APP.Ci,$APP.Ii,$APP.ii,tZ],[a.getAttribute("paused"),a.getAttribute("animation"),a.getAttribute("speed"),a.getAttribute("colors"),a.getAttribute("size"),a.getAttribute("blur"),a.getAttribute("opacity"),a.getAttribute("count"),a.getAttribute("blend")]);var c=$APP.M(b);b=$APP.D(c,tZ);var d=$APP.D(c,sZ),e=$APP.D(c,$APP.mh),g=$APP.D(c,$APP.Yj);var h=$APP.D(c,$APP.Qm);var l=$APP.D(c,$APP.di),m=$APP.D(c,$APP.Ci),p=$APP.D(c,$APP.Ii);c=$APP.D(c,$APP.ii);h=uZ(h);
|
|
6
|
+
typeof c==="string"&&$APP.N("",c.trim())?(c=parseInt(c.trim(),10),c=$APP.n(isFinite(c))?$APP.Kh.i(12,$APP.Jh.i(1,c)):5):c=5;if(typeof l==="string"&&$APP.N("",l.trim())){l=l.trim();var r=$APP.D(vZ,l);$APP.n(r)?l=r:(l=parseFloat(l),r=isFinite(l),l=$APP.n($APP.n(r)?l>0:r)?$APP.Kh.i(100,$APP.Jh.i(10,l)):50)}else l=50;typeof g==="string"&&$APP.N("",g.trim())?(g=g.trim(),r=$APP.D(wZ,g),$APP.n(r)?g=r:(g=parseFloat(g),r=isFinite(g),g=$APP.n($APP.n(r)?g>0:r)?g:10)):g=10;e=typeof e==="string"&&$APP.I(xZ,e)?
|
|
7
|
+
e:"float";d=d!=null;typeof m==="string"&&$APP.N("",m.trim())?(m=parseFloat(m.trim()),r=isFinite(m),m=$APP.n($APP.n(r)?m>0:r)?m:60):m=60;r=pZ(h,c,l);typeof p==="string"&&$APP.N("",p.trim())?(p=parseFloat(p.trim()),p=$APP.n(isFinite(p))?$APP.Kh.i(1,$APP.Jh.i(0,p)):.7):p=.7;b=typeof b==="string"&&$APP.I(yZ,b)?b:"normal";h=$APP.zf([sZ,$APP.mh,$APP.Qm,zZ,$APP.Ci,$APP.hn,$APP.Ii,$APP.ii,tZ,AZ],[d,e,h,g,m,r,p,c,b,l]);b=$APP.M(h);p=$APP.D(b,$APP.Ci);c=$APP.D(b,$APP.Ii);m=$APP.D(b,tZ);l=$APP.D(b,$APP.mh);
|
|
8
|
+
d=$APP.D(b,sZ);e=$APP.k(a,"__xGaussianBlurBackdrop");b=$APP.k(a,"__xGaussianBlurSlot");e.style.setProperty("filter","blur("+$APP.S.g(p)+"px)");e.style.setProperty("opacity",""+$APP.S.g(c));e.style.setProperty("mix-blend-mode",m);$APP.n(d)?a.setAttribute("data-paused",""):a.removeAttribute("data-paused");a.setAttribute("data-animation",l);a:{m=$APP.M(h);h=$APP.D(m,$APP.hn);p=$APP.D(m,$APP.mh);c=$APP.D(m,zZ);$APP.D(m,$APP.Ci);d=$APP.k(a,"__xGaussianBlurBackdrop");m=$APP.k(a,"__xGaussianBlurBlobs");
|
|
9
|
+
e=m.length;l=$APP.z(h);for(g=e;;)if(g<l)r=document.createElement("div"),r.className="blob",d.appendChild(r),m.push(r),g+=1;else break;for(;;)if(e>l)g=m.pop(),d.removeChild(g),--e;else break;for(d=0;;)if(d<l){var v=m[d];r=$APP.pc(h,d);g=p;e=c;var x=$APP.M(r),y=$APP.D(x,$APP.jk),A=$APP.D(x,$APP.cm),C=$APP.D(x,$APP.bm),E=$APP.D(x,$APP.di),H=$APP.D(x,mZ);r=$APP.D(x,nZ);x=$APP.D(x,oZ);v=v.style;E=""+$APP.S.g(E)+"%";v.setProperty("left",""+$APP.S.g(A)+"%");v.setProperty("top",""+$APP.S.g(C)+"%");v.setProperty("width",
|
|
10
|
+
E);v.setProperty("height",E);v.setProperty("background","radial-gradient(circle,"+$APP.S.g(y)+" 0%,transparent 70%)");v.setProperty("transform","translate(-50%,-50%)");b:switch(y=H,g){case "float":g="x-gb-float-"+$APP.S.g(y);break b;case "pulse":g="x-gb-pulse-"+$APP.S.g(y);break b;default:g=null}$APP.n(g)?(r*=e,e*=x,v.setProperty("animation",""+$APP.S.g(g)+" "+$APP.S.g(r)+"s ease-in-out "+$APP.S.g(e)+"s infinite")):v.removeProperty("animation");d+=1}else break a}rZ(a,b)},CZ=function(a){function b(){return rZ(a,
|
|
11
|
+
c)}$APP.n($APP.k(a,"__xGaussianBlurInit"))||qZ(a);var c=$APP.k(a,"__xGaussianBlurSlot");a.__xGaussianBlurSlotHandler=b;c.addEventListener("slotchange",b);BZ(a);return null},DZ=function(a){var b=$APP.k(a,"__xGaussianBlurSlot");a=$APP.k(a,"__xGaussianBlurSlotHandler");$APP.n($APP.n(b)?a:b)&&b.removeEventListener("slotchange",a);return null},EZ=function(a,b,c,d){$APP.N(c,d)&&$APP.n($APP.k(a,"__xGaussianBlurInit"))&&BZ(a);return null},FZ=function(a){for(var b=$APP.t(new $APP.O(null,8,5,$APP.P,[new $APP.O(null,
|
|
12
|
+
3,5,$APP.P,["colors","colors","#6366f1, #ec4899, #14b8a6, #f59e0b"],null),new $APP.O(null,3,5,$APP.P,["blur","blur","60"],null),new $APP.O(null,3,5,$APP.P,["speed","speed","medium"],null),new $APP.O(null,3,5,$APP.P,["count","count","5"],null),new $APP.O(null,3,5,$APP.P,["size","size","medium"],null),new $APP.O(null,3,5,$APP.P,["opacity","opacity","0.7"],null),new $APP.O(null,3,5,$APP.P,["animation","animation","float"],null),new $APP.O(null,3,5,$APP.P,["blend","blend","normal"],null)],null)),c=null,
|
|
13
|
+
d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null),m=$APP.Ac(g,2,null);Object.defineProperty(a,h,{get:function(v,x,y,A,C,E,H,G){return function(){var J=this.getAttribute(H);return $APP.n(J)?J:G}}(b,c,d,e,g,h,l,m),set:function(v,x,y,A,C,E,H){return function(G){return typeof G==="string"&&$APP.N("",G)?this.setAttribute(H,G):this.removeAttribute(H)}}(b,c,d,e,g,h,l,m),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.xb(g),e=$APP.yb(g),c=b,d=$APP.z(b),
|
|
14
|
+
b=e;else{l=$APP.u(g);m=$APP.Ac(l,0,null);var p=$APP.Ac(l,1,null),r=$APP.Ac(l,2,null);Object.defineProperty(a,m,{get:function(v,x,y,A,C,E,H,G){return function(){var J=this.getAttribute(H);return $APP.n(J)?J:G}}(b,c,d,e,l,m,p,r,g,h),set:function(v,x,y,A,C,E,H){return function(G){return typeof G==="string"&&$APP.N("",G)?this.setAttribute(H,G):this.removeAttribute(H)}}(b,c,d,e,l,m,p,r,g,h),enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;return Object.defineProperty(a,"paused",{get:function(){return this.hasAttribute("paused")},
|
|
15
|
+
set:function(v){return $APP.n(v)?this.setAttribute("paused",""):this.removeAttribute("paused")},enumerable:!0,configurable:!0})},HZ=function(){return $APP.Lg("x-gaussian-blur",new $APP.Q(null,5,[$APP.Cg,GZ,$APP.Dg,CZ,$APP.Eg,DZ,$APP.Fg,EZ,$APP.Jg,FZ],null))},zZ=new $APP.K(null,"speed-s","speed-s",-1018350546),tZ=new $APP.K(null,"blend","blend",249565561),sZ=new $APP.K(null,"paused","paused",-1710376127),AZ=new $APP.K(null,"size-pct","size-pct",-741809955),mZ=new $APP.K(null,"anim-index","anim-index",
|
|
16
|
+
-1563021855),oZ=new $APP.K(null,"delay-factor","delay-factor",-751650178),nZ=new $APP.K(null,"duration-factor","duration-factor",-409465019);var GZ="colors blur speed count size opacity animation blend paused".split(" ");
|
|
17
|
+
$APP.zf([sZ,$APP.mh,$APP.Yj,$APP.Qm,$APP.di,$APP.Ci,$APP.Ii,$APP.ii,tZ],[new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"paused"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"animation"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"speed"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"colors"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"size"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"blur"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"opacity"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,
|
|
18
|
+
$APP.$k,"count"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"blend"],null)]);
|
|
19
|
+
var xZ=new $APP.R(null,new $APP.Q(null,3,["float",null,"none",null,"pulse",null],null),null),yZ=new $APP.R(null,new $APP.Q(null,5,["soft-light",null,"multiply",null,"screen",null,"normal",null,"overlay",null],null),null),wZ=new $APP.Q(null,3,["slow",18,"medium",10,"fast",5],null),vZ=new $APP.Q(null,3,["small",30,"medium",50,"large",70],null),uZ=function uZ(a){return typeof a==="string"&&$APP.N("",a.trim())?(a=a.trim().split(/,/),$APP.We.m($APP.ee,$APP.Lh.i($APP.$d.g(function(c){return c.trim()}),
|
|
20
|
+
$APP.be(function(c){return $APP.N("",c)})),a)):uZ.g?uZ.g("#6366f1, #ec4899, #14b8a6, #f59e0b"):uZ.call(null,"#6366f1, #ec4899, #14b8a6, #f59e0b")};$APP.ha("baredom.exports.x_gaussian_blur.init",HZ);export const init=HZ;
|
package/dist/x-grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a=$APP.D(b
|
|
4
|
-
|
|
5
|
-
$APP.
|
|
6
|
-
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}
|
|
7
|
-
|
|
2
|
+
var zR=function(a){switch(a){case "none":return"0";case "xs":return"4px";case "sm":return"8px";case "md":return"16px";case "lg":return"24px";case "xl":return"32px";default:return"16px"}},AR=function(a,b,c){return $APP.I(b,a)?a:c},BR=function(a){switch(a){case "row-dense":return"row dense";case "column-dense":return"column dense";default:return a}},CR=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:null},DR=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:"16rem"},OR=function(a){var b=$APP.M(a);
|
|
3
|
+
a=$APP.D(b,ER);var c=$APP.D(b,FR),d=$APP.D(b,$APP.Om),e=$APP.D(b,GR),g=$APP.D(b,HR),h=$APP.D(b,$APP.dl),l=$APP.D(b,IR),m=$APP.D(b,$APP.Ij);b=$APP.D(b,$APP.tk);h=CR(h);l=DR(l);var p=AR(b,JR,"md");b=function(){var v=$APP.I(JR,d)?d:null;return $APP.n(v)?v:p}();var r=function(){var v=$APP.I(JR,m)?m:null;return $APP.n(v)?v:p}();g=AR(g,KR,"stretch");c=AR(c,KR,"stretch");e=BR(AR(e,LR,"row"));h=$APP.n(h)?h:"repeat(auto-fit,minmax("+$APP.S.g(l)+",1fr))";return $APP.zf([GR,HR,$APP.dl,$APP.Ij,$APP.tk,MR,ER,
|
|
4
|
+
NR,$APP.Om,FR],[e,g,h,zR(r),p,b,$APP.F(a),r,zR(b),c])},PR=function(a){var b=$APP.zf([GR,HR,$APP.dl,IR,$APP.Ij,$APP.tk,ER,$APP.Om,FR],[a.getAttribute("auto-flow"),a.getAttribute("align-items"),a.getAttribute("columns"),a.getAttribute("min-column-size"),a.getAttribute("column-gap"),a.getAttribute("gap"),a.hasAttribute("inline"),a.getAttribute("row-gap"),a.getAttribute("justify-items")]);b=OR(b);a=$APP.k(a,"__x_grid_base");if($APP.n(a)){var c=a.style;a.setAttribute("data-gap",$APP.tk.g(b));c.setProperty("--x-grid-columns",
|
|
5
|
+
$APP.dl.g(b));c.setProperty("--x-grid-row-gap",$APP.Om.g(b));c.setProperty("--x-grid-column-gap",$APP.Ij.g(b));c.setProperty("--x-grid-align-items",HR.g(b));c.setProperty("--x-grid-justify-items",FR.g(b));b=c.setProperty("--x-grid-auto-flow",GR.g(b))}else b=null;return b},QR=function(a){if(!$APP.Ng(a,"__x_grid_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host {\n display:block;\n }\n\n :host([inline]) {\n display:inline-block;\n }\n\n .base {\n display:grid;\n box-sizing:border-box;\n grid-template-columns:var(--x-grid-columns);\n row-gap:var(--x-grid-row-gap);\n column-gap:var(--x-grid-column-gap);\n align-items:var(--x-grid-align-items);\n justify-items:var(--x-grid-justify-items);\n grid-auto-flow:var(--x-grid-auto-flow);\n }\n ";
|
|
6
|
+
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}PR(a);return a},RR=function(a){return QR(a)},SR=function(a){return $APP.Ng(a,"__x_grid_initialized")?PR(a):QR(a)},UR=function(){return $APP.Lg("x-grid",new $APP.Q(null,3,[$APP.Cg,TR,$APP.Dg,RR,$APP.Fg,SR],null))},IR=new $APP.K(null,"min-column-size","min-column-size",-1066019378),ER=new $APP.K(null,"inline","inline",1399884222),NR=new $APP.K(null,
|
|
7
|
+
"column-gap-token","column-gap-token",-10192833),HR=new $APP.K(null,"align-items","align-items",-267946462),MR=new $APP.K(null,"row-gap-token","row-gap-token",-219143816),GR=new $APP.K(null,"auto-flow","auto-flow",-1524521728),FR=new $APP.K(null,"justify-items","justify-items",1638310783);var TR="columns min-column-size gap row-gap column-gap align-items justify-items auto-flow inline".split(" "),JR=new $APP.R(null,new $APP.Q(null,6,["none",null,"xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),KR=new $APP.R(null,new $APP.Q(null,4,["center",null,"start",null,"stretch",null,"end",null],null),null),LR=new $APP.R(null,new $APP.Q(null,5,["column-dense",null,"row-dense",null,"dense",null,"column",null,"row",null],null),null);$APP.ha("baredom.exports.x_grid.init",UR);export const init=UR;
|
package/dist/x-icon.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var gR=function(){return new $APP.Q(null,3,[$APP.hi,""+$APP.S.g(eR)+"px",fR,"md",$APP.Al,eR],null)},iR=function(a){if(typeof a==="string"){a=a.trim();var b=a.toLowerCase();if($APP.B.i("",a))return gR();if($APP.I(hR,b))return a=$APP.D(hR,b),new $APP.Q(null,3,[$APP.hi,""+$APP.S.g(a)+"px",fR,b,$APP.Al,a],null);b=parseInt(a,10);return typeof b==="number"&&$APP.q(isNaN(b))&&b>0&&$APP.B.i(""+$APP.S.g(b),a)?new $APP.Q(null,3,[$APP.hi,""+$APP.S.g(b)+"px",fR,null,$APP.Al,b],null):gR()}return gR()},kR=function(a){if(!$APP.n($APP.k(a,
|
|
3
3
|
"__xIconRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("slot");c.textContent=':host{display:inline-flex;align-items:center;justify-content:center;line-height:0;vertical-align:middle;color:var(--x-icon-color,currentColor);--x-icon-size:20px;}[part\x3dbox]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-icon-size);height:var(--x-icon-size);}::slotted(svg){display:block;width:100%;height:100%;}::slotted(svg[fill\x3d"currentColor"]),::slotted(svg[stroke\x3d"currentColor"]){color:inherit;}';
|
|
4
|
-
d.setAttribute("part","box");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xIconRefs=new $APP.Q(null,2,[$APP.
|
|
5
|
-
typeof e==="string":b)?e:"";c=$APP.
|
|
6
|
-
d),a.removeAttribute("aria-hidden")):(a.setAttribute("aria-hidden","true"),a.removeAttribute("role"),a.removeAttribute("aria-label"));a.__xIconModel=b}},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
null),
|
|
4
|
+
d.setAttribute("part","box");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xIconRefs=new $APP.Q(null,2,[$APP.Zi,b,jR,d],null)}},sR=function(a){var b=new $APP.Q(null,4,[$APP.nm,a.getAttribute("size"),$APP.zn,a.getAttribute("color"),$APP.Hi,a.getAttribute("label"),lR,a.hasAttribute("label")],null);b=$APP.M(b);var c=$APP.D(b,$APP.nm),d=$APP.D(b,$APP.zn),e=$APP.D(b,$APP.Hi);b=$APP.D(b,lR);c=iR(c);typeof d==="string"?(d=d.trim().toLowerCase(),d=$APP.I(mR,d)?d:"inherit"):d="inherit";e=$APP.n($APP.n(b)?
|
|
5
|
+
typeof e==="string":b)?e:"";c=$APP.hi.g(c);var g=d;$APP.B.i(g,"inherit")?d="inherit":(d=$APP.D(nR,g),g=$APP.D(oR,g),d="var("+$APP.S.g(d)+","+$APP.S.g(g)+")");b=new $APP.Q(null,4,[pR,c,qR,d,$APP.T,e,rR,$APP.F(b)&&$APP.N("",e)],null);if($APP.N($APP.k(a,"__xIconModel"),b)){b=$APP.M(b);e=$APP.D(b,pR);c=$APP.D(b,qR);d=$APP.D(b,$APP.T);g=$APP.D(b,rR);kR(a);var h=a.style;h.setProperty("--x-icon-size",e);h.setProperty("--x-icon-color",c);$APP.n(g)?(a.setAttribute("role","img"),a.setAttribute("aria-label",
|
|
6
|
+
d),a.removeAttribute("aria-hidden")):(a.setAttribute("aria-hidden","true"),a.removeAttribute("role"),a.removeAttribute("aria-label"));a.__xIconModel=b}},tR=function(a,b,c){return Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return d==null||$APP.B.i(d,"")?this.removeAttribute(c):this.setAttribute(c,""+$APP.S.g(d))},enumerable:!0,configurable:!0})},uR=function(a){tR(a,"size","size");tR(a,"color","color");return tR(a,"label","label")},vR=
|
|
7
|
+
function(a){kR(a);sR(a);return null},wR=function(a,b,c,d){$APP.N(c,d)&&sR(a);return null},yR=function(){return $APP.Lg("x-icon",new $APP.Q(null,4,[$APP.Cg,xR,$APP.Dg,vR,$APP.Fg,wR,$APP.Jg,uR],null))},fR=new $APP.K(null,"token","token",-1211463215),qR=new $APP.K(null,"color-css","color-css",-1998870384),jR=new $APP.K(null,"box","box",1530920394),pR=new $APP.K(null,"size-css","size-css",-1292915783),lR=new $APP.K(null,"label-present?","label-present?",-367749525),rR=new $APP.K(null,"labelled?","labelled?",
|
|
8
|
+
-1907816908);var xR=["size","color","label"],hR=new $APP.Q(null,4,["sm",16,"md",20,"lg",24,"xl",32],null),mR=new $APP.R(null,new $APP.Q(null,8,["success",null,"warning",null,"muted",null,"secondary",null,"tertiary",null,"primary",null,"danger",null,"inherit",null],null),null),oR=new $APP.Q(null,7,"primary #2563eb secondary #64748b tertiary #94a3b8 success #16a34a warning #d97706 danger #dc2626 muted #64748b".split(" "),null),nR=new $APP.Q(null,7,"primary --x-color-primary secondary --x-color-secondary tertiary --x-color-tertiary success --x-color-success warning --x-color-warning danger --x-color-danger muted --x-color-text-muted".split(" "),
|
|
9
|
+
null),eR=$APP.D(hR,"md");$APP.ha("baredom.exports.x_icon.init",yR);export const init=yR;
|
package/dist/x-image.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
!1],null)):new $APP.Q(null,2,[$APP.
|
|
4
|
-
d.setAttribute("part","frame");e.setAttribute("part","shimmer");e.setAttribute("aria-hidden","true");g.setAttribute("part","image");g.alt="";g.decoding="async";g.loading="lazy";h.setAttribute("part","error");h.setAttribute("role","img");h.setAttribute("aria-label","Image failed to load");l.setAttribute("name","error");m.setAttribute("part","error-default");p.setAttribute("part","error-glyph");p.setAttribute("aria-hidden","true");p.textContent="⚠";
|
|
5
|
-
"Image unavailable";m.appendChild(p);m.appendChild(
|
|
6
|
-
|
|
7
|
-
"string"?(d=$APP.
|
|
8
|
-
$APP.n(
|
|
9
|
-
"img"),$APP.n(
|
|
10
|
-
h)):(l.removeAttribute("src"),
|
|
11
|
-
"__xImageRefs")),g=$APP.D(e,$APP.
|
|
12
|
-
d.addEventListener("error",b);$APP.
|
|
13
|
-
$APP.B.i(d,"")?this.removeAttribute(c):this.setAttribute(c,""+$APP.
|
|
14
|
-
"naturalWidth",{get:function(){var b=$APP.k(this,"__xImageRefs");return $APP.n(b)?$APP.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$APP.zf([$APP.
|
|
19
|
-
new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.
|
|
20
|
-
var
|
|
2
|
+
var hO=function(a){if(a==null)return new $APP.Q(null,2,[$APP.hi,null,$APP.oi,!0],null);if(typeof a!=="string")return new $APP.Q(null,2,[$APP.hi,null,$APP.oi,!1],null);a=a.trim().toLowerCase();if($APP.B.i(a,"")||$APP.B.i(a,"auto"))return new $APP.Q(null,2,[$APP.hi,null,$APP.oi,!0],null);var b=$APP.eg(gO,a);return $APP.n(b)?(a=parseFloat($APP.pc(b,1)),b=parseFloat($APP.pc(b,2)),a>0&&b>0?new $APP.Q(null,2,[$APP.hi,""+$APP.S.g(a)+" / "+$APP.S.g(b),$APP.oi,!0],null):new $APP.Q(null,2,[$APP.hi,null,$APP.oi,
|
|
3
|
+
!1],null)):new $APP.Q(null,2,[$APP.hi,null,$APP.oi,!1],null)},mO=function(a){var b=$APP.k(a,"__xImageRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("img"),h=document.createElement("div"),l=document.createElement("slot"),m=document.createElement("div"),p=document.createElement("span"),r=document.createElement("span");c.textContent=":host{display:block;max-width:100%;box-sizing:border-box;color-scheme:light dark;--x-image-radius:var(--x-radius-md,8px);--x-image-bg:var(--x-color-surface,#f3f4f6);--x-image-border:0;--x-image-shimmer-color:var(--x-color-border,rgba(0,0,0,0.08));--x-image-shimmer-highlight:rgba(255,255,255,0.65);--x-image-shimmer-duration:1.5s;--x-image-fade-duration:var(--x-transition-duration,200ms);--x-image-fade-easing:var(--x-transition-easing,ease);--x-image-text:var(--x-color-text-muted,rgba(0,0,0,0.55));--x-image-error-gap:var(--x-space-xs,6px);--x-image-font-family:var(--x-font-family,system-ui,sans-serif);--x-image-font-size:var(--x-font-size-sm,0.875rem);}@media (prefers-color-scheme:dark){:host{--x-image-bg:var(--x-color-surface,#1f2937);--x-image-shimmer-color:var(--x-color-border,rgba(255,255,255,0.08));--x-image-shimmer-highlight:rgba(255,255,255,0.10);--x-image-text:var(--x-color-text-muted,rgba(255,255,255,0.65));}}[part\x3dframe]{position:relative;width:100%;height:100%;min-height:1em;background:var(--x-image-bg);border-radius:var(--x-image-radius);border:var(--x-image-border);overflow:hidden;}[part\x3dimage]{display:block;width:100%;height:100%;opacity:0;transition:opacity var(--x-image-fade-duration) var(--x-image-fade-easing);}:host([data-state\x3dloaded]) [part\x3dimage]{opacity:1;}[part\x3dshimmer]{position:absolute;inset:0;background-color:var(--x-image-shimmer-color);background-image:linear-gradient(90deg,transparent 0%,var(--x-image-shimmer-highlight) 50%,transparent 100%);background-size:200% 100%;background-repeat:no-repeat;background-position:-100% 0;animation:x-image-shimmer var(--x-image-shimmer-duration) linear infinite;}@keyframes x-image-shimmer{0%{background-position:-100% 0;}100%{background-position:100% 0;}}:host([data-state\x3dloaded]) [part\x3dshimmer],:host([data-state\x3derror]) [part\x3dshimmer]{display:none;}[part\x3derror]{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:var(--x-image-error-gap);padding:8px;text-align:center;color:var(--x-image-text);font-family:var(--x-image-font-family);font-size:var(--x-image-font-size);}:host([data-state\x3derror]) [part\x3derror]{display:flex;}:host([data-state\x3derror]) [part\x3dimage]{visibility:hidden;}[part\x3derror-glyph]{font-size:1.5em;line-height:1;}[part\x3derror-text]{line-height:1.25;}@media (prefers-reduced-motion:reduce){[part\x3dshimmer]{animation:none;}[part\x3dimage]{transition:none;}}";
|
|
4
|
+
d.setAttribute("part","frame");e.setAttribute("part","shimmer");e.setAttribute("aria-hidden","true");g.setAttribute("part","image");g.alt="";g.decoding="async";g.loading="lazy";h.setAttribute("part","error");h.setAttribute("role","img");h.setAttribute("aria-label","Image failed to load");l.setAttribute("name","error");m.setAttribute("part","error-default");p.setAttribute("part","error-glyph");p.setAttribute("aria-hidden","true");p.textContent="⚠";r.setAttribute("part","error-text");r.textContent=
|
|
5
|
+
"Image unavailable";m.appendChild(p);m.appendChild(r);l.appendChild(m);h.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xImageRefs=new $APP.Q(null,6,[$APP.Zi,b,iO,d,jO,e,$APP.Qj,g,kO,h,lO,l],null);return $APP.k(a,"__xImageRefs")},nO=function(a,b){a.__xImageState=b;a.setAttribute("data-state",b)},zO=function(a){var b=new $APP.Q(null,8,[$APP.Fm,a.getAttribute("src"),$APP.cn,a.getAttribute("alt"),oO,a.hasAttribute("alt"),pO,a.hasAttribute("decorative"),
|
|
6
|
+
qO,a.getAttribute("ratio"),rO,a.getAttribute("fit"),$APP.sk,a.getAttribute("position"),$APP.Vm,a.getAttribute("loading")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Fm),e=$APP.D(c,$APP.cn),g=$APP.D(c,oO),h=$APP.D(c,pO),l=$APP.D(c,qO),m=$APP.D(c,rO);b=$APP.D(c,$APP.sk);var p=$APP.D(c,$APP.Vm);h=$APP.F(h);l=hO(l);c=$APP.M(l);l=$APP.D(c,$APP.hi);c=$APP.D(c,$APP.oi);var r=!h&&$APP.q(g);e=h?"":$APP.n(g)?$APP.n(e)?e:"":"";typeof m==="string"?(m=m.trim().toLowerCase(),m=$APP.I(sO,m)?m:"cover"):m="cover";typeof d===
|
|
7
|
+
"string"?(d=$APP.eh(d),d=typeof d==="string"&&$APP.N("",d)?d:null):d=null;typeof p==="string"?(p=p.trim().toLowerCase(),p=$APP.I(tO,p)?p:"lazy"):p="lazy";typeof b==="string"?(b=b.trim(),b=$APP.B.i(b,"")?"center":b):b="center";b=$APP.zf([$APP.Ai,uO,$APP.Sk,vO,$APP.Ql,wO,xO,$APP.vn,yO],[e,m,d,h,p,c,r,b,l]);$APP.N($APP.k(a,"__xImageModel"),b)&&(h=mO(a),c=$APP.M(h),h=$APP.D(c,iO),l=$APP.D(c,$APP.Qj),c=$APP.D(c,kO),r=$APP.k(a,"__xImageModel"),p=$APP.n(r)?$APP.Sk.g(r):null,r=r==null||$APP.N(p,$APP.Sk.g(b)),
|
|
8
|
+
$APP.n(yO.g(b))?h.style.aspectRatio=yO.g(b):h.style.aspectRatio="",$APP.n(wO.g(b))||$APP.n($APP.k(a,"__xImageWarnedRatio"))||(a.__xImageWarnedRatio=!0,console.warn('[x-image] Invalid ratio attribute; expected "W:H" (e.g. "16:9").')),l.style.objectFit=uO.g(b),l.style.objectPosition=$APP.vn.g(b),l.loading=$APP.Ql.g(b),l.decoding="async",$APP.n(vO.g(b))?(l.alt="",a.setAttribute("aria-hidden","true"),a.removeAttribute("role")):(l.alt=$APP.Ai.g(b),a.removeAttribute("aria-hidden"),a.setAttribute("role",
|
|
9
|
+
"img"),$APP.n(xO.g(b))&&!$APP.n($APP.k(a,"__xImageWarnedAlt"))&&(a.__xImageWarnedAlt=!0,console.warn('[x-image] Missing alt attribute. Set alt\x3d"…" or add the `decorative` attribute.'))),c.setAttribute("aria-label",$APP.q(vO.g(b))&&$APP.N("",$APP.Ai.g(b))?$APP.Ai.g(b):"Image failed to load"),r&&(h=$APP.Sk.g(b),l=$APP.M($APP.k(a,"__xImageRefs")),l=$APP.D(l,$APP.Qj),$APP.N($APP.k(a,"__xImageCurrentSrc"),h)&&(a.__xImageCurrentSrc=h,typeof h==="string"&&$APP.N("",h)?(nO(a,"loading"),l.setAttribute("src",
|
|
10
|
+
h)):(l.removeAttribute("src"),nO(a,"loading")))),a.__xImageModel=b)},DO=function(a){function b(){var e=$APP.M($APP.k(a,"__xImageRefs")),g=$APP.D(e,$APP.Qj);e=$APP.k(a,"__xImageCurrentSrc");$APP.n($APP.n(g)?typeof e==="string"&&$APP.N("",e):g)&&(g=g.getAttribute("src"),$APP.B.i(g,e)&&(nO(a,"error"),e=$APP.Zh(new $APP.Q(null,1,[$APP.Sk,$APP.n(e)?e:""],null)),e=new CustomEvent("x-image-error",{detail:e,bubbles:!0,composed:!0,cancelable:!1}),a.dispatchEvent(e)));return null}function c(){var e=$APP.M($APP.k(a,
|
|
11
|
+
"__xImageRefs")),g=$APP.D(e,$APP.Qj);e=$APP.k(a,"__xImageCurrentSrc");if($APP.n($APP.n(g)?typeof e==="string"&&$APP.N("",e):g)){var h=g.getAttribute("src");$APP.B.i(h,e)&&(nO(a,"loaded"),h=g.naturalWidth,g=g.naturalHeight,e=$APP.Zh(new $APP.Q(null,3,[$APP.Sk,$APP.n(e)?e:"",AO,$APP.n(h)?h:0,BO,$APP.n(g)?g:0],null)),e=new CustomEvent("x-image-load",{detail:e,bubbles:!0,composed:!0,cancelable:!1}),a.dispatchEvent(e))}return null}var d=mO(a);d=$APP.M(d);d=$APP.D(d,$APP.Qj);d.addEventListener("load",c);
|
|
12
|
+
d.addEventListener("error",b);$APP.Mg(a,"__xImageHandlers",new $APP.Q(null,2,[CO,c,$APP.Wi,b],null))},EO=function(a){var b=$APP.k(a,"__xImageHandlers"),c=$APP.k(a,"__xImageRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.Qj.g(c);var d=CO.g(b);b=$APP.Wi.g(b);$APP.n(d)&&c.removeEventListener("load",d);$APP.n(b)&&c.removeEventListener("error",b)}a.__xImageHandlers=null},FO=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return d==null||
|
|
13
|
+
$APP.B.i(d,"")?this.removeAttribute(c):this.setAttribute(c,""+$APP.S.g(d))},enumerable:!0,configurable:!0})},GO=function(a){FO(a,"src","src");FO(a,"alt","alt");FO(a,"ratio","ratio");FO(a,"fit","fit");FO(a,"position","position");FO(a,"loading","loading");Object.defineProperty(a,"decorative",{get:function(){return this.hasAttribute("decorative")},set:function(b){return $APP.n(b)?this.setAttribute("decorative",""):this.removeAttribute("decorative")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
14
|
+
"naturalWidth",{get:function(){var b=$APP.k(this,"__xImageRefs");return $APP.n(b)?$APP.Qj.g(b).naturalWidth:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"naturalHeight",{get:function(){var b=$APP.k(this,"__xImageRefs");return $APP.n(b)?$APP.Qj.g(b).naturalHeight:0},enumerable:!0,configurable:!0});return Object.defineProperty(a,"state",{get:function(){var b=$APP.k(this,"__xImageState");return $APP.n(b)?b:"loading"},enumerable:!0,configurable:!0})},HO=function(a){mO(a);EO(a);DO(a);$APP.k(a,
|
|
15
|
+
"__xImageState")==null&&nO(a,"loading");zO(a);return null},IO=function(a){EO(a);return null},JO=function(a,b,c,d){$APP.N(c,d)&&zO(a);return null},LO=function(){return $APP.Lg("x-image",new $APP.Q(null,5,[$APP.Cg,KO,$APP.Dg,HO,$APP.Eg,IO,$APP.Fg,JO,$APP.Jg,GO],null))},iO=new $APP.K(null,"frame","frame",-1711082588),rO=new $APP.K(null,"fit-raw","fit-raw",792829585),vO=new $APP.K(null,"decorative?","decorative?",131461581),kO=new $APP.K(null,"error-box","error-box",1060106676),yO=new $APP.K(null,"ratio-css",
|
|
16
|
+
"ratio-css",1208951932),jO=new $APP.K(null,"shimmer","shimmer",2123148747),lO=new $APP.K(null,"error-slot","error-slot",493821239),qO=new $APP.K(null,"ratio-raw","ratio-raw",-1076891672),xO=new $APP.K(null,"warn-alt?","warn-alt?",-638898603),CO=new $APP.K(null,"load","load",-1318641184),pO=new $APP.K(null,"decorative-present?","decorative-present?",2067744841),uO=new $APP.K(null,"fit","fit",869444807),oO=new $APP.K(null,"alt-present?","alt-present?",-707038767),AO=new $APP.K(null,"naturalWidth","naturalWidth",
|
|
17
|
+
-1890093257),BO=new $APP.K(null,"naturalHeight","naturalHeight",227028566),wO=new $APP.K(null,"ratio-valid?","ratio-valid?",-713026893);var KO="src alt decorative ratio fit position loading".split(" ");
|
|
18
|
+
$APP.zf([$APP.Ai,uO,$APP.Sk,new $APP.K(null,"state","state",-1988618099),new $APP.K(null,"decorative","decorative",-238973678),$APP.Ql,$APP.Pj,BO,AO,$APP.vn],[new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Tj,!0],null),new $APP.Q(null,1,[$APP.Z,$APP.uk],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Tj,!0],null),
|
|
19
|
+
new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Tj,!0],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null)]);$APP.Pd(["x-image-load",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.Sk,$APP.Y,AO,$APP.W,BO,$APP.W],null),$APP.Km,!1],null),"x-image-error",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,1,[$APP.Sk,$APP.Y],null),$APP.Km,!1],null)]);
|
|
20
|
+
var sO=new $APP.R(null,new $APP.Q(null,5,["cover",null,"none",null,"fill",null,"scale-down",null,"contain",null],null),null),tO=new $APP.R(null,new $APP.Q(null,2,["eager",null,"lazy",null],null),null),gO=/^\s*(\d+(?:\.\d+)?)\s*[:\/]\s*(\d+(?:\.\d+)?)\s*$/;$APP.ha("baredom.exports.x_image.init",LO);export const init=LO;
|
package/dist/x-kinetic-font.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
null},
|
|
4
|
-
a.getAttribute("intensity"),a.getAttribute("trigger"),a.getAttribute("per-char"),a.getAttribute("font-family"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("friction"),a.getAttribute("radius"),a.getAttribute("tension")]);var b=$APP.M(a);a=$APP.D(b,$APP.
|
|
5
|
-
[
|
|
6
|
-
c===0?a.removeProperty("transform"):a.setProperty("transform","skewX("+$APP.
|
|
7
|
-
$APP.k(a,"__xKineticFontLSY");return $APP.n(d)?d:b}();a.__xKineticFontLSY=b;$APP.ja(a,"__xKineticFontSD",function(){var d=$APP.k(a,"__xKineticFontSD");return $APP.n(d)?d:0}()+Math.abs(c));
|
|
8
|
-
"scroll")||$APP.B.i(b,"both"))b=function(){return
|
|
9
|
-
$APP.
|
|
10
|
-
d=$APP.M($APP.k(a,"__xKineticFontRefs")),$APP.D(d,$APP.
|
|
11
|
-
144),
|
|
12
|
-
a.removeAttribute("role")):(a.removeAttribute("aria-hidden"),a.setAttribute("role","text"),a.setAttribute("aria-label",c));if(!
|
|
13
|
-
this.getAttribute("text");return $APP.n(b)?b:""},set:function(b){return b==null?this.removeAttribute("text"):this.setAttribute("text",""+$APP.
|
|
14
|
-
b:"bulge"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.
|
|
15
|
-
this.setAttribute("mass",""+$APP.
|
|
16
|
-
""+$APP.
|
|
17
|
-
$APP.
|
|
18
|
-
|
|
19
|
-
function(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Ca,e));ea+=1}else break;var ac=function(){var Fb=$APP.k(a,"__xKineticFontSD");return $APP.n(Fb)?Fb:0}()>.5;$APP.n(function(){var Fb=gb[0];return $APP.n(Fb)?!ac:Fb}())?(a.__xKineticFontRaf=null,a.__xKineticFontSD=0,$APP.n($APP.k(a,"__xKineticFontAct"))&&(a.__xKineticFontAct=!1,a.dispatchEvent(new CustomEvent("x-kinetic-font-spring-settle",{bubbles:!0,composed:!0,detail:{}})))):$APP.ja(a,"__xKineticFontRaf",requestAnimationFrame(function(){return V2.g?V2.g(a):V2.call(null,a)}))}return null};$APP.ha("baredom.exports.x_kinetic_font.init",o3);export const init=o3;
|
|
2
|
+
var D4=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},F4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.I(E4,a)?a:"cursor"},I4=function(a){return typeof a==="string"?(a=$APP.We.m($APP.Tf,$APP.be(function(b){return $APP.I(G4,b)}),a.trim().toLowerCase().split(/\s+/)),$APP.Hc(a)?H4:a):H4},J4=function(a){return typeof a==="string"?(a=a.trim(),$APP.B.i(a,"")?null:a):
|
|
3
|
+
null},K4=function(a,b,c,d,e,g,h){b=c+(g*(b-a)-h*c)/e*d;return[a+b*d,b]},L4=function(a,b){if(a>=b)return 0;a=1-a/b;return a*a},M4=function(a,b,c,d,e,g,h,l,m,p,r){a*=c;d=$APP.I(b,"bulge")?d+a*(e-d):d;g=$APP.I(b,"stretch")?g+a*(h-g):g;l=$APP.I(b,"lean")?m+a*(l-m):m;b=$APP.I(b,"breathe")?p+a*(r-p):p;return[d,g,l,b]},N4=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},Y4=function(a){a=$APP.zf([$APP.Xj,$APP.Yk,O4,P4,Q4,$APP.bi,$APP.Pl,R4,$APP.ak,S4],[a.getAttribute("mass"),
|
|
4
|
+
a.getAttribute("intensity"),a.getAttribute("trigger"),a.getAttribute("per-char"),a.getAttribute("font-family"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("friction"),a.getAttribute("radius"),a.getAttribute("tension")]);var b=$APP.M(a);a=$APP.D(b,$APP.ak);var c=$APP.D(b,S4),d=$APP.D(b,$APP.Xj),e=$APP.D(b,$APP.Yk),g=$APP.D(b,P4),h=$APP.D(b,O4),l=$APP.D(b,Q4),m=$APP.D(b,$APP.bi),p=$APP.D(b,$APP.Pl);b=$APP.D(b,R4);return $APP.zf([$APP.Sm,T4,U4,$APP.ln,$APP.Pk,V4,$APP.zk,W4,X4,$APP.Ul],
|
|
5
|
+
[D4(d,1,.1,10),D4(c,170,10,500),I4(p),D4(a,200,20,1E3),D4(e,.5,0,1),g!=null,D4(b,26,1,100),F4(h),J4(l),typeof m==="string"?m:""])},Z4=function(a,b){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:a}return b},$4=function(a,b,c){a=a.style;var d=a.setProperty;b="'wght' "+$APP.S.g(b[0].toFixed(1))+", 'wdth' "+$APP.S.g(b[1].toFixed(1))+", 'slnt' "+$APP.S.g(b[2].toFixed(1))+", 'opsz' "+$APP.S.g(b[3].toFixed(1));d.call(a,"font-variation-settings",b);
|
|
6
|
+
c===0?a.removeProperty("transform"):a.setProperty("transform","skewX("+$APP.S.g(c.toFixed(1))+"deg)")},b5=function(a){$APP.n($APP.k(a,"__xKineticFontRaf"))||($APP.n($APP.k(a,"__xKineticFontAct"))||(a.__xKineticFontAct=!0,a.dispatchEvent(new CustomEvent("x-kinetic-font-spring-activate",{bubbles:!0,composed:!0,detail:{}}))),$APP.ja(a,"__xKineticFontLF",performance.now()),$APP.ja(a,"__xKineticFontRaf",requestAnimationFrame(function(){return a5(a)})))},c5=function(a){var b=window.scrollY,c=b-function(){var d=
|
|
7
|
+
$APP.k(a,"__xKineticFontLSY");return $APP.n(d)?d:b}();a.__xKineticFontLSY=b;$APP.ja(a,"__xKineticFontSD",function(){var d=$APP.k(a,"__xKineticFontSD");return $APP.n(d)?d:0}()+Math.abs(c));N4()||b5(a);return null},d5=function(a){var b=W4.g($APP.k(a,"__xKineticFontModel")),c={};if($APP.B.i(b,"cursor")||$APP.B.i(b,"both")){var d=function(e){a.__xKineticFontMX=e.clientX;a.__xKineticFontMY=e.clientY;N4()||b5(a);return null};c.move=d;document.addEventListener("pointermove",d,{passive:!0})}if($APP.B.i(b,
|
|
8
|
+
"scroll")||$APP.B.i(b,"both"))b=function(){return c5(a)},c.scroll=b,a.__xKineticFontLSY=window.scrollY,window.addEventListener("scroll",b,{passive:!0});a.__xKineticFontHdl=c},e5=function(a){var b=$APP.k(a,"__xKineticFontHdl");if($APP.n(b)){var c=$APP.k(b,"move");$APP.n(c)&&document.removeEventListener("pointermove",c);b=$APP.k(b,"scroll");$APP.n(b)&&window.removeEventListener("scroll",b);a.__xKineticFontHdl=null}},p5=function(a,b){var c=$APP.k(a,"__xKineticFontModel");a.__xKineticFontModel=b;if($APP.N($APP.Ul.g(b),
|
|
9
|
+
$APP.Ul.g(c))||$APP.N(V4.g(b),V4.g(c)))if($APP.n(V4.g(b))){var d=$APP.Ul.g(b),e=$APP.M($APP.k(a,"__xKineticFontRefs"));e=$APP.D(e,$APP.Zj);d=$APP.xe(d);var g=$APP.z(d),h=Array(g),l=Array(g);e.textContent="";for(var m=0;;)if(m<g){var p=$APP.pc(d,m),r=document.createElement("span");r.setAttribute("part","char");$APP.B.i(p," ")?(r.setAttribute("data-ws",""),r.innerHTML="\x26nbsp;"):r.textContent=p;e.appendChild(r);h[m]=r;l[m]=[0,0];m+=1}else break;a.__xKineticFontCS=h;a.__xKineticFontSpr=l}else e=$APP.Ul.g(b),
|
|
10
|
+
d=$APP.M($APP.k(a,"__xKineticFontRefs")),$APP.D(d,$APP.Zj).textContent=e,a.__xKineticFontCS=null,a.__xKineticFontSpr=[[0,0]];$APP.N(W4.g(b),W4.g(c))&&(e5(a),d5(a));c=$APP.M($APP.k(a,"__xKineticFontRefs"));c=$APP.D(c,$APP.Zj);e=X4.g(b);$APP.n(e)?c.style.setProperty("font-family",e):c.style.removeProperty("font-family");c=getComputedStyle(a);c=$APP.zf([f5,g5,h5,i5,j5,k5,l5,m5,n5],[Z4(c.getPropertyValue("--x-kinetic-font-slant-max"),0),Z4(c.getPropertyValue("--x-kinetic-font-slant-min"),-12),Z4(c.getPropertyValue("--x-kinetic-font-opsz-max"),
|
|
11
|
+
144),Z4(c.getPropertyValue("--x-kinetic-font-opsz-min"),8),Z4(c.getPropertyValue("--x-kinetic-font-weight-min"),100),Z4(c.getPropertyValue("--x-kinetic-font-skew-max"),-15),Z4(c.getPropertyValue("--x-kinetic-font-width-max"),125),Z4(c.getPropertyValue("--x-kinetic-font-width-min"),75),Z4(c.getPropertyValue("--x-kinetic-font-weight-max"),900)]);a.__xKineticFontCV=c;c=$APP.Ul.g(b);e=$APP.M($APP.k(a,"__xKineticFontRefs"));$APP.D(e,o5).textContent=c;$APP.B.i(c,"")?(a.setAttribute("aria-hidden","true"),
|
|
12
|
+
a.removeAttribute("role")):(a.removeAttribute("aria-hidden"),a.setAttribute("role","text"),a.setAttribute("aria-label",c));if(!N4())if(c=$APP.k(a,"__xKineticFontCV"),c=M4(0,U4.g(b),$APP.Pk.g(b),j5.g(c),n5.g(c),m5.g(c),l5.g(c),g5.g(c),f5.g(c),i5.g(c),h5.g(c)),$APP.n(V4.g(b))){if(a=$APP.k(a,"__xKineticFontCS"),$APP.n(a))for(b=a.length,e=0;;)if(e<b)$4(a[e],c,0),e+=1;else break}else a=$APP.M($APP.k(a,"__xKineticFontRefs")),a=$APP.D(a,$APP.Zj),$4(a,c,0)},q5=function(a){Object.defineProperty(a,"text",{get:function(){var b=
|
|
13
|
+
this.getAttribute("text");return $APP.n(b)?b:""},set:function(b){return b==null?this.removeAttribute("text"):this.setAttribute("text",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"trigger",{get:function(){return F4(this.getAttribute("trigger"))},set:function(b){return b==null?this.removeAttribute("trigger"):this.setAttribute("trigger",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.n(b)?
|
|
14
|
+
b:"bulge"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"perChar",{get:function(){return this.hasAttribute("per-char")},set:function(b){return $APP.n(b)?this.setAttribute("per-char",""):this.removeAttribute("per-char")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mass",{get:function(){var b=this.getAttribute("mass");return D4(b,1,.1,10)},set:function(b){return b==null?this.removeAttribute("mass"):
|
|
15
|
+
this.setAttribute("mass",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"tension",{get:function(){var b=this.getAttribute("tension");return D4(b,170,10,500)},set:function(b){return b==null?this.removeAttribute("tension"):this.setAttribute("tension",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"friction",{get:function(){var b=this.getAttribute("friction");return D4(b,26,1,100)},set:function(b){return b==null?this.removeAttribute("friction"):this.setAttribute("friction",
|
|
16
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return D4(b,.5,0,1)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return D4(b,200,20,1E3)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+
|
|
17
|
+
$APP.S.g(b))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"fontFamily",{get:function(){return J4(this.getAttribute("font-family"))},set:function(b){return b==null?this.removeAttribute("font-family"):this.setAttribute("font-family",""+$APP.S.g(b))},enumerable:!0,configurable:!0})},s5=function(a){if(!$APP.n($APP.k(a,"__xKineticFontRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span");c.textContent=
|
|
18
|
+
r5;d.setAttribute("part","container");e.setAttribute("class","sr-only");e.setAttribute("part","sr-only");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xKineticFontRefs=new $APP.Q(null,3,[$APP.Zi,b,$APP.Zj,d,o5,e],null)}b=Y4(a);a.__xKineticFontModel=null;a.__xKineticFontMX=0;a.__xKineticFontMY=0;a.__xKineticFontSD=0;a.__xKineticFontAct=!1;p5(a,b);return null},t5=function(a){var b=$APP.k(a,"__xKineticFontRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xKineticFontRaf=null);e5(a);return null},
|
|
19
|
+
u5=function(a,b,c,d){$APP.N(c,d)&&$APP.n($APP.k(a,"__xKineticFontRefs"))&&(b=Y4(a),$APP.N(b,$APP.k(a,"__xKineticFontModel"))&&p5(a,b));return null},w5=function(){return $APP.Lg("x-kinetic-font",new $APP.Q(null,5,[$APP.Cg,v5,$APP.Dg,s5,$APP.Eg,t5,$APP.Fg,u5,$APP.Jg,q5],null))},P4=new $APP.K(null,"per-char-attr","per-char-attr",-403667422),O4=new $APP.K(null,"trigger-raw","trigger-raw",-1649744606),g5=new $APP.K(null,"slnt-min","slnt-min",71363427),l5=new $APP.K(null,"wdth-max","wdth-max",-522030121),
|
|
20
|
+
k5=new $APP.K(null,"skew-max","skew-max",1543858453),m5=new $APP.K(null,"wdth-min","wdth-min",-986627045),Q4=new $APP.K(null,"font-family-raw","font-family-raw",1729457924),V4=new $APP.K(null,"per-char?","per-char?",-1016397834),W4=new $APP.K(null,"trigger","trigger",103466139),i5=new $APP.K(null,"opsz-min","opsz-min",-829837010),o5=new $APP.K(null,"sr-only","sr-only",-173275148),f5=new $APP.K(null,"slnt-max","slnt-max",1716167520),R4=new $APP.K(null,"friction-raw","friction-raw",-1078184200),h5=
|
|
21
|
+
new $APP.K(null,"opsz-max","opsz-max",454458088),j5=new $APP.K(null,"wght-min","wght-min",529224020),U4=new $APP.K(null,"modes","modes",-1377787092),n5=new $APP.K(null,"wght-max","wght-max",-514604421),S4=new $APP.K(null,"tension-raw","tension-raw",961657279),X4=new $APP.K(null,"font-family","font-family",-667419874),T4=new $APP.K(null,"tension","tension",58343589);var v5="text trigger mode per-char mass tension friction intensity radius font-family".split(" ");
|
|
22
|
+
$APP.zf([$APP.Sm,T4,$APP.Oj,new $APP.K(null,"perChar","perChar",2082880685),$APP.ln,$APP.Pk,new $APP.K(null,"fontFamily","fontFamily",1493518353),$APP.zk,W4,$APP.Ul],[new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.uk],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,
|
|
23
|
+
1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null)]);$APP.Pd(["x-kinetic-font-spring-activate",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.Km,!1],null),"x-kinetic-font-spring-settle",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.Km,!1],null)]);
|
|
24
|
+
var E4=new $APP.R(null,new $APP.Q(null,3,["scroll",null,"both",null,"cursor",null],null),null),G4=new $APP.R(null,new $APP.Q(null,4,["breathe",null,"lean",null,"bulge",null,"stretch",null],null),null),H4=new $APP.R(null,new $APP.Q(null,1,["bulge",null],null),null);var r5=":host{display:inline-block;box-sizing:border-box;color-scheme:light dark;"+$APP.S.g("--x-kinetic-font-color")+":var(--x-color-text,currentColor);"+$APP.S.g("--x-kinetic-font-family")+":system-ui,sans-serif;"+$APP.S.g("--x-kinetic-font-size")+":2rem;"+$APP.S.g("--x-kinetic-font-weight-min")+":100;"+$APP.S.g("--x-kinetic-font-weight-max")+":900;"+$APP.S.g("--x-kinetic-font-width-min")+":75;"+$APP.S.g("--x-kinetic-font-width-max")+":125;"+$APP.S.g("--x-kinetic-font-slant-min")+":-12;"+$APP.S.g("--x-kinetic-font-slant-max")+
|
|
25
|
+
":0;"+$APP.S.g("--x-kinetic-font-opsz-min")+":8;"+$APP.S.g("--x-kinetic-font-opsz-max")+":144;"+$APP.S.g("--x-kinetic-font-skew-max")+":-15;}[part\x3dcontainer]{color:var("+$APP.S.g("--x-kinetic-font-color")+",currentColor);font-family:var("+$APP.S.g("--x-kinetic-font-family")+",system-ui,sans-serif);font-size:var("+$APP.S.g("--x-kinetic-font-size")+",2rem);line-height:1.2;will-change:font-variation-settings,transform;}[part\x3dchar]{display:inline-block;will-change:font-variation-settings,transform;}[part\x3dchar][data-ws]{white-space:pre;}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}@media(prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3dchar]{font-variation-settings:normal!important;will-change:auto;}}",
|
|
26
|
+
a5=function a5(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xKineticFontModel"),d=$APP.k(a,"__xKineticFontCV"),e=performance.now(),g=Math.min(e-$APP.k(a,"__xKineticFontLF"),100)/1E3,h=$APP.Sm.g(c),l=T4.g(c),m=$APP.zk.g(c),p=$APP.Pk.g(c),r=$APP.ln.g(c),v=W4.g(c);c=U4.g(c);var x=j5.g(d),y=n5.g(d),A=m5.g(d),C=l5.g(d),E=g5.g(d),H=f5.g(d),G=i5.g(d),J=h5.g(d);d=k5.g(d);var U=$APP.I(c,"lean"),aa=$APP.k(a,"__xKineticFontMX"),ta=$APP.k(a,"__xKineticFontMY"),Ma=function(){var Sb=$APP.k(a,"__xKineticFontSD");
|
|
27
|
+
return $APP.n(Sb)?Sb:0}(),Za=Math.min(1,Math.abs(Ma)/100),ob=$APP.k(a,"__xKineticFontSpr"),pb=$APP.k(a,"__xKineticFontCS"),Bb=pb!=null,bc=ob.length;a.__xKineticFontLF=e;a.__xKineticFontSD=Ma*.85;for(var rb=[!0],ea=0;;)if(ea<bc){Ma=Bb&&($APP.B.i(v,"cursor")||$APP.B.i(v,"both"))?function(){var Sb=pb[ea].getBoundingClientRect(),je=aa-(Sb.left+.5*Sb.width);Sb=ta-(Sb.top+.5*Sb.height);return Math.max(L4(Math.sqrt(je*je+Sb*Sb),r),Za)}():Bb&&$APP.B.i(v,"scroll")?Za:Bb||!$APP.B.i(v,"cursor")&&!$APP.B.i(v,
|
|
28
|
+
"both")?$APP.B.i(v,"scroll")?Za:0:function(){var Sb=$APP.M($APP.k(a,"__xKineticFontRefs")),je=$APP.D(Sb,$APP.Zj).getBoundingClientRect();Sb=aa-(je.left+.5*je.width);je=ta-(je.top+.5*je.height);return Math.max(L4(Math.sqrt(Sb*Sb+je*je),r),Za)}();var Aa=ob[ea],$a=K4(Aa[0],Ma,Aa[1],g,h,l,m);e=$a[0];$a=$a[1];Aa[0]=e;Aa[1]=$a;Math.abs(e-Ma)<.001&&Math.abs($a)<.01||(rb[0]=!1);Ma=M4(e,c,p,x,y,A,C,E,H,G,J);e=U?e*p*d:0;Bb?$4(pb[ea],Ma,e):(Aa=$APP.M($APP.k(a,"__xKineticFontRefs")),Aa=$APP.D(Aa,$APP.Zj),$4(Aa,
|
|
29
|
+
Ma,e));ea+=1}else break;var nc=function(){var Sb=$APP.k(a,"__xKineticFontSD");return $APP.n(Sb)?Sb:0}()>.5;$APP.n(function(){var Sb=rb[0];return $APP.n(Sb)?!nc:Sb}())?(a.__xKineticFontRaf=null,a.__xKineticFontSD=0,$APP.n($APP.k(a,"__xKineticFontAct"))&&(a.__xKineticFontAct=!1,a.dispatchEvent(new CustomEvent("x-kinetic-font-spring-settle",{bubbles:!0,composed:!0,detail:{}})))):$APP.ja(a,"__xKineticFontRaf",requestAnimationFrame(function(){return a5.g?a5.g(a):a5.call(null,a)}))}return null};$APP.ha("baredom.exports.x_kinetic_font.init",w5);export const init=w5;
|