@vanelsas/baredom 2.2.0 → 2.3.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 +3 -3
- package/dist/base.js +402 -393
- package/dist/x-alert.js +17 -17
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +14 -14
- package/dist/x-badge.js +11 -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 +15 -15
- package/dist/x-cancel-dialogue.js +16 -16
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +29 -29
- package/dist/x-chart.js +46 -46
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.js +41 -41
- package/dist/x-combobox.js +28 -0
- package/dist/x-command-palette.js +25 -25
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +22 -22
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +37 -37
- package/dist/x-divider.js +8 -8
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +9 -9
- 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 +18 -18
- package/dist/x-kinetic-font.js +28 -28
- package/dist/x-kinetic-typography.js +37 -37
- package/dist/x-liquid-dock.js +35 -35
- package/dist/x-liquid-fill.js +40 -40
- package/dist/x-liquid-glass.js +36 -36
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.js +25 -25
- package/dist/x-modal.js +12 -12
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.js +12 -12
- package/dist/x-neural-glow.js +31 -31
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.js +15 -15
- package/dist/x-organic-progress.js +35 -35
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.js +16 -16
- package/dist/x-particle-button.js +47 -47
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +7 -7
- package/dist/x-progress.js +7 -7
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +11 -11
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +34 -34
- package/dist/x-scroll-timeline.js +45 -45
- package/dist/x-scroll.js +40 -40
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton-group.js +15 -0
- package/dist/x-skeleton.js +1 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +20 -20
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.js +9 -9
- package/dist/x-stepper.js +15 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +19 -19
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +13 -13
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +20 -20
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +21 -21
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +14 -0
- package/dist/x-typography.js +8 -8
- package/package.json +13 -1
package/dist/x-morph-stack.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.n(b)?b:0);c=$APP
|
|
4
|
-
1,$APP.n(b)?b:0));return $APP.
|
|
5
|
-
$APP.T.g(Math.round(
|
|
6
|
-
b){return new $APP.
|
|
7
|
-
"true");c.setAttribute("data-x-morph-stack-ghost-layer","");d.style.position="absolute";d.style.width="0";d.style.height="0";d.style.overflow="hidden";d.setAttribute("aria-hidden","true");c.appendChild(d);document.body.appendChild(c);b=$APP.
|
|
2
|
+
var bw=function(a){return typeof a==="string"?(a=a.trim().toLowerCase(),$APP.I(aw,a)?a:"clean"):"clean"},cw=function(a){return $APP.C.i(a,"organic")||$APP.C.i(a,"liquid")},dw=function(a){var b=(a-1)/17*-7;return"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 "+$APP.T.g(a)+" "+$APP.T.g(b)},ew=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.C.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},fw=function(a,b,c,d){if($APP.n($APP.n(a)?a>0:a)){b=$APP.nh.i(1E-4,
|
|
3
|
+
$APP.n(b)?b:0);c=$APP.nh.i(1E-4,$APP.n(c)?c:0);d=$APP.nh.i(1E-4,$APP.n(d)?d:0);var e=Math.sqrt(b/d);a=1E3*(4/($APP.nh.i(.2,$APP.oh.i(5,c/(2*Math.sqrt(b*d))))*e)+Math.PI/e)/a}else a=1;return a},gw=function(a,b,c,d,e,g){b+=(e*(1-a)-g*b)/d*c;return[a+b*c,b]},iw=function(a,b){b=$APP.M(b);var c=$APP.D(b,hw);b=$APP.D(b,$APP.Wj);var d=$APP.xe(a);a=$APP.z(d);if(a>0){var e=$APP.n(function(){return $APP.n(c)?$APP.Ud(function(g){return $APP.C.i(g,c)},d):c}())?c:null;if($APP.n(e))return e;a=$APP.nh.i(0,$APP.oh.i(a-
|
|
4
|
+
1,$APP.n(b)?b:0));return $APP.pc(d,a)}return null},jw=function(a,b,c){return a+(b-a)*c},kw=function(a){if(typeof a==="string"){a=a.match(/rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)(?:\s*,\s*(\d*(?:\.\d+)?))?\s*\)/);if($APP.n(a)){var b=parseFloat(a[1]),c=parseFloat(a[2]),d=parseFloat(a[3]);var e=a[4];e=$APP.n(e)?$APP.N("",a[4]):e;a=[b,c,d,$APP.n(e)?parseFloat(a[4]):1]}else a=null;return a}return null},lw=function(a,b,c){var d=kw(a),e=kw(b);return $APP.n($APP.n(d)?e:d)?"rgba("+
|
|
5
|
+
$APP.T.g(Math.round(jw(d[0],e[0],c)))+","+$APP.T.g(Math.round(jw(d[1],e[1],c)))+","+$APP.T.g(Math.round(jw(d[2],e[2],c)))+","+$APP.T.g(jw(d[3],e[3],c))+")":c<.5?a:b},mw=function(a){if(typeof a==="string")if(a=a.trim(),$APP.N(a,"")){a=a.split(/\s+/);for(var b=a.length,c=[],d=0;;){if(d>=b)return c.length>0?c:null;var e=a[d];if($APP.n(e.endsWith("px"))){e=parseFloat(e.slice(0,e.length-2));if($APP.n(isNaN(e)))return null;c.push(e);d+=1}else return null}}else return null;else return null},nw=function(a,
|
|
6
|
+
b){return new $APP.Q(null,2,[$APP.Uh,$APP.n(a)?a:"",$APP.Jl,$APP.n(b)?b:""],null)},pw=function(a){var b=$APP.k(a,"__xMorphStackRefs"),c=$APP.n(b)?ow.g(b):null;if($APP.n($APP.n(c)?c.isConnected:c))return b;c=document.createElement("div");var d=document.createElementNS("http://www.w3.org/2000/svg","svg");c.style.position="fixed";c.style.top="0";c.style.left="0";c.style.width="100%";c.style.height="100dvh";c.style.pointerEvents="none";c.style.overflow="visible";c.style.zIndex="2147483646";c.setAttribute("aria-hidden",
|
|
7
|
+
"true");c.setAttribute("data-x-morph-stack-ghost-layer","");d.style.position="absolute";d.style.width="0";d.style.height="0";d.style.overflow="hidden";d.setAttribute("aria-hidden","true");c.appendChild(d);document.body.appendChild(c);b=$APP.lh.C(b,ow,c,$APP.uc([$APP.bk,d]));return a.__xMorphStackRefs=b},qw=function(a){var b=$APP.k(a,"__xMorphStackRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");
|
|
8
8
|
c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-morph-stack-spring-stiffness:170;--x-morph-stack-spring-damping:26;--x-morph-stack-spring-mass:1;--x-morph-stack-fade-ms:160ms;--x-morph-stack-goo-blur:10;--x-morph-stack-goo-threshold:18;--x-morph-stack-bg:transparent;}:host([data-variant\x3d'clean']){--x-morph-stack-spring-stiffness:280;--x-morph-stack-spring-damping:30;--x-morph-stack-spring-mass:0.7;}:host([data-variant\x3d'organic']){--x-morph-stack-spring-stiffness:180;--x-morph-stack-spring-damping:5;--x-morph-stack-spring-mass:1.0;--x-morph-stack-goo-blur:6;--x-morph-stack-goo-threshold:14;}:host([data-variant\x3d'liquid']){--x-morph-stack-spring-stiffness:50;--x-morph-stack-spring-damping:14;--x-morph-stack-spring-mass:2.0;--x-morph-stack-goo-blur:26;--x-morph-stack-goo-threshold:26;}[part\x3dviewport]{position:relative;display:block;background:var(--x-morph-stack-bg);}:host([disabled]){opacity:0.7;}";
|
|
9
|
-
d.setAttribute("part","viewport");e.setAttribute("name","state");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xMorphStackRefs=new $APP.
|
|
10
|
-
$APP.
|
|
11
|
-
$APP.N(l,""))){l=parseFloat(l);l=typeof l==="number"&&$APP.r(isNaN(l))&&l>0?l:null;break a}l=null}return new $APP.
|
|
12
|
-
g=$APP.C.i(1,e.nodeType);$APP.n(g?e.hasAttribute("data-state"):g)&&b.push(e);d+=1}else break;return b},
|
|
13
|
-
"":g.style.display="none";e+=1}else break;$APP.n(b)?a.setAttribute("data-active-state",b):a.removeAttribute("data-active-state");a.__xMorphStackCurrent=b},
|
|
14
|
-
text:e.textContent,node:e};d+=1}else break}return b},
|
|
15
|
-
$APP.
|
|
16
|
-
"140%");e.setAttribute("height","140%");g.setAttribute("in","SourceGraphic");g.setAttribute("stdDeviation",""+$APP.T.g(10));g.setAttribute("result","blur");h.setAttribute("in","blur");h.setAttribute("type","matrix");h.setAttribute("values",
|
|
17
|
-
18);a.__xMorphStackGooBaseBlur=d;a.__xMorphStackGooBaseThreshold=e;
|
|
18
|
-
c.left)+"px";a.style.top=""+$APP.T.g(d)+"px";a.style.width=""+$APP.T.g(b.w)+"px";a.style.height=""+$APP.T.g(b.h)+"px"},
|
|
19
|
-
$APP.T.g(
|
|
20
|
-
B=g.cloneNode(!0);c=h.w;d=h.h;var E=l.w,H=l.h,G=c>0?E/c:1,
|
|
21
|
-
")";A.style.opacity=""+$APP.T.g($APP
|
|
22
|
-
""+$APP.T.g($APP
|
|
23
|
-
a=new $APP.
|
|
24
|
-
e,m,p)),h=$APP.w(h),m=null,p=0),q=0;else break;l=$APP.t(l);h=null;for(p=m=0;;)if(p<m)q=h.
|
|
25
|
-
d=null,e=0),g=0;else break;return a},
|
|
26
|
-
"__xMorphStackTo"))),c=new CustomEvent("x-morph-stack-changed",{detail:c,bubbles:!0,composed:!0,cancelable:!1}),a.dispatchEvent(c),a.__xMorphStackFrom=null,a.__xMorphStackTo=null)}return null},
|
|
27
|
-
return $APP.n(m)?m:
|
|
28
|
-
return m?m:$APP.
|
|
29
|
-
$APP.
|
|
30
|
-
$APP.n(c?b:c)&&(
|
|
31
|
-
c=$APP.k(a,"__xMorphStackRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.
|
|
32
|
-
null?null:parseFloat(d)},set:function(d){return d==null?this.removeAttribute(c):this.setAttribute(c,""+$APP.T.g(d))},enumerable:!0,configurable:!0})}
|
|
33
|
-
return b==null?null:parseInt(b,10)},set:function(b){return b==null?this.removeAttribute("active-index"):this.setAttribute("active-index",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});
|
|
34
|
-
configurable:!0});
|
|
35
|
-
1}d=void 0}b=
|
|
36
|
-
$APP.n(b)&&(this.__xMorphStackRefs=
|
|
37
|
-
case 2:return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
y=
|
|
9
|
+
d.setAttribute("part","viewport");e.setAttribute("name","state");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xMorphStackRefs=new $APP.Q(null,3,[$APP.yi,b,$APP.dj,d,$APP.bj,e],null);return $APP.k(a,"__xMorphStackRefs")},sw=function(a){a=new $APP.Q(null,8,[rw,a.getAttribute("active-state"),$APP.Wk,a.getAttribute("active-index"),$APP.Ql,a.getAttribute("stiffness"),$APP.Cm,a.getAttribute("damping"),$APP.vj,a.getAttribute("mass"),$APP.bl,a.getAttribute("variant"),$APP.Mi,a.getAttribute("duration"),
|
|
10
|
+
$APP.ul,a.hasAttribute("disabled")],null);a=$APP.M(a);var b=$APP.D(a,rw),c=$APP.D(a,$APP.Wk),d=$APP.D(a,$APP.Ql),e=$APP.D(a,$APP.Cm),g=$APP.D(a,$APP.vj),h=$APP.D(a,$APP.bl),l=$APP.D(a,$APP.Mi);a=$APP.D(a,$APP.ul);b=typeof b==="string"&&$APP.N("",b.trim())?b.trim():null;a:{if(typeof c==="string"&&(c=c.trim(),$APP.N(c,""))){c=parseInt(c,10);c=typeof c==="number"&&$APP.r(isNaN(c))&&c>=0?c:null;break a}c=null}d=ew(d,170,10,500);e=ew(e,26,1,100);g=ew(g,1,.1,10);h=bw(h);a:{if(typeof l==="string"&&(l=l.trim(),
|
|
11
|
+
$APP.N(l,""))){l=parseFloat(l);l=typeof l==="number"&&$APP.r(isNaN(l))&&l>0?l:null;break a}l=null}return new $APP.Q(null,8,[hw,b,$APP.Wj,c,$APP.zl,d,$APP.Ck,e,$APP.Zl,g,$APP.Qg,h,$APP.Ok,l,$APP.X,$APP.F(a)],null)},tw=function(a,b,c){a=window.getComputedStyle(a).getPropertyValue(b);return typeof a==="string"&&$APP.N("",a.trim())?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?c:a):c},uw=function(a){a=qw(a);a=$APP.M(a);a=$APP.D(a,$APP.bj).assignedElements();for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d],
|
|
12
|
+
g=$APP.C.i(1,e.nodeType);$APP.n(g?e.hasAttribute("data-state"):g)&&b.push(e);d+=1}else break;return b},vw=function(a){a=uw(a);for(var b=[],c=a.length,d=0;;)if(d<c)b.push(a[d].getAttribute("data-state")),d+=1;else break;return b},ww=function(a,b){a=uw(a);for(var c=a.length,d=0;;)if(d<c){var e=a[d];if($APP.C.i(b,e.getAttribute("data-state")))return e;d+=1}else return null},xw=function(a,b){for(var c=uw(a),d=c.length,e=0;;)if(e<d){var g=c[e],h=g.getAttribute("data-state");$APP.C.i(h,b)?g.style.display=
|
|
13
|
+
"":g.style.display="none";e+=1}else break;$APP.n(b)?a.setAttribute("data-active-state",b):a.removeAttribute("data-active-state");a.__xMorphStackCurrent=b},yw=function(a){var b={};if($APP.n(a)){a=a.querySelectorAll("["+$APP.T.g("data-morph-id")+"]");for(var c=a.length,d=0;;)if(d<c){var e=a[d],g=e.getAttribute("data-morph-id"),h=e.getBoundingClientRect(),l=window.getComputedStyle(e);b[g]={rect:{x:h.left,y:h.top,w:h.width,h:h.height},br:l.borderRadius,bg:l.backgroundColor,color:l.color,clip:l.clipPath,
|
|
14
|
+
text:e.textContent,node:e};d+=1}else break}return b},zw=function(a,b,c){var d=$APP.k(a,"__xMorphStackFilterBlur");a=$APP.k(a,"__xMorphStackFilterMatrix");$APP.n(d)&&d.setAttribute("stdDeviation",""+$APP.T.g(b));$APP.n(a)&&a.setAttribute("values",dw(c))},Aw=function(a,b){var c=$APP.k(a,"__xMorphStackGooBaseBlur"),d=$APP.k(a,"__xMorphStackGooBaseThreshold");c!=null&&d!=null&&(b=b<=0?1:b<.18?1-b/.18:b<.7?0:b<1?(b-.7)/(1-.7):1,zw(a,c*(1-b),jw(d,1,b)))},Cw=function(a){var b=pw(a);b=$APP.M(b);b=$APP.D(b,
|
|
15
|
+
$APP.bk);var c=$APP.k(a,"__xMorphStackFilterId");if($APP.n(c))b=c;else{c=Bw[0];Bw[0]=c+1;c="x-morph-stack-goo-"+$APP.T.g(c);var d=document.createElementNS("http://www.w3.org/2000/svg","defs"),e=document.createElementNS("http://www.w3.org/2000/svg","filter"),g=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),h=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");e.setAttribute("id",c);e.setAttribute("x","-20%");e.setAttribute("y","-20%");e.setAttribute("width",
|
|
16
|
+
"140%");e.setAttribute("height","140%");g.setAttribute("in","SourceGraphic");g.setAttribute("stdDeviation",""+$APP.T.g(10));g.setAttribute("result","blur");h.setAttribute("in","blur");h.setAttribute("type","matrix");h.setAttribute("values",dw(18));e.appendChild(g);e.appendChild(h);d.appendChild(e);b.appendChild(d);a.__xMorphStackFilterId=c;a.__xMorphStackFilterBlur=g;a.__xMorphStackFilterMatrix=h;b=c}c=pw(a);c=$APP.M(c);c=$APP.D(c,ow);d=tw(a,"--x-morph-stack-goo-blur",10);e=tw(a,"--x-morph-stack-goo-threshold",
|
|
17
|
+
18);a.__xMorphStackGooBaseBlur=d;a.__xMorphStackGooBaseThreshold=e;zw(a,d,e);c.style.filter="url(#"+$APP.T.g(b)+")";c.style.webkitFilter="url(#"+$APP.T.g(b)+")"},Dw=function(a){a=$APP.k(a,"__xMorphStackRefs");a=$APP.n(a)?ow.g(a):null;$APP.n(a)&&(a.style.filter="",a.style.webkitFilter="")},Ew=function(a){a.style.position="absolute";a.style.margin="0";a.style.boxSizing="border-box";a.style.transformOrigin="top left";a.style.pointerEvents="none"},Fw=function(a,b,c){var d=b.y-c.top;a.style.left=""+$APP.T.g(b.x-
|
|
18
|
+
c.left)+"px";a.style.top=""+$APP.T.g(d)+"px";a.style.width=""+$APP.T.g(b.w)+"px";a.style.height=""+$APP.T.g(b.h)+"px"},Gw=function(a,b,c,d){function e(oa){oa=$APP.nh.i(0,$APP.oh.i(1,oa));var Aa=jw(aa,0,oa),La=jw(G,1,oa),bb=jw(J,1,oa);B.style.transform="translate("+$APP.T.g(jw(R,0,oa))+"px,"+$APP.T.g(Aa)+"px) scale("+$APP.T.g(La)+","+$APP.T.g(bb)+")";Aa=B.style;La=mw(m);bb=mw(p);if($APP.n($APP.n(La)?$APP.n(bb)?$APP.C.i(La.length,bb.length):bb:La)){for(var cb=[],mb=La.length,Lb=0;;)if(Lb<mb)cb.push(""+
|
|
19
|
+
$APP.T.g(jw(La[Lb],bb[Lb],oa))+"px"),Lb+=1;else break;La=cb.join(" ")}else La=oa<.5?m:p;Aa.borderRadius=La;$APP.n($APP.n(q)?v:q)&&(B.style.backgroundColor=lw(q,v,oa));$APP.n($APP.n(x)?y:x)&&(B.style.color=lw(x,y,oa));A&&(B.style.opacity=""+$APP.T.g($APP.nh.i(0,$APP.oh.i(1,oa))));return null}var g=$APP.k(d,"node"),h=$APP.k(d,"rect"),l=$APP.k(c,"rect"),m=$APP.k(c,"br"),p=$APP.k(d,"br"),q=$APP.k(c,"bg"),v=$APP.k(d,"bg"),x=$APP.k(c,"color"),y=$APP.k(d,"color"),A=$APP.N($APP.k(c,"text"),$APP.k(d,"text")),
|
|
20
|
+
B=g.cloneNode(!0);c=h.w;d=h.h;var E=l.w,H=l.h,G=c>0?E/c:1,J=d>0?H/d:1,R=l.x-h.x,aa=l.y-h.y;Ew(B);Fw(B,h,b);a.appendChild(B);g.style.visibility="hidden";e(0);return{t:0,v:0,update:e,finalize:function(){g.style.visibility="";return $APP.n(B.parentNode)?B.parentNode.removeChild(B):null}}},Hw=function(a,b,c,d){function e(B){B=$APP.nh.i(0,$APP.oh.i(1,B));var E=jw(0,v,B),H=jw(1,x,B),G=jw(1,y,B);A.style.transform="translate("+$APP.T.g(jw(0,q,B))+"px,"+$APP.T.g(E)+"px) scale("+$APP.T.g(H)+","+$APP.T.g(G)+
|
|
21
|
+
")";A.style.opacity=""+$APP.T.g($APP.nh.i(0,1-B));return null}var g=$APP.k(c,"rect");d=$APP.k(d,"rect");var h=g.w,l=g.h,m=d.w,p=d.h,q=d.x-g.x,v=d.y-g.y,x=h>0?m/h:1,y=l>0?p/l:1,A=$APP.k(c,"node").cloneNode(!0);Ew(A);Fw(A,g,b);a.appendChild(A);e(0);return{t:0,v:0,update:e,finalize:function(){return $APP.n(A.parentNode)?A.parentNode.removeChild(A):null}}},Iw=function(a,b,c){var d=$APP.k(c,"rect"),e=$APP.k(c,"node").cloneNode(!0);Ew(e);Fw(e,d,b);a.appendChild(e);return{t:0,v:0,update:function(g){e.style.opacity=
|
|
22
|
+
""+$APP.T.g($APP.nh.i(0,1-g));return null},finalize:function(){return $APP.n(e.parentNode)?e.parentNode.removeChild(e):null}}},Jw=function(a){var b=$APP.k(a,"node");b.style.opacity="0";return{t:0,v:0,update:function(c){b.style.opacity=""+$APP.T.g($APP.nh.i(0,$APP.oh.i(1,c)));return null},finalize:function(){return b.style.opacity=""}}},Ow=function(a,b,c){a=pw(a);a=$APP.M(a);var d=$APP.D(a,ow),e=d.getBoundingClientRect(),g=Object.keys(b);a=Object.keys(c);g=$APP.xe(g);a=$APP.xe(a);g=$APP.Xf(g);a=$APP.Xf(a);
|
|
23
|
+
a=new $APP.Q(null,3,[Kw,$APP.Qm.i(g,a),Lw,Mw.i(g,a),Nw,Mw.i(a,g)],null);var h=Kw.g(a),l=Lw.g(a);g=Nw.g(a);a=[];h=$APP.t(h);for(var m=null,p=0,q=0;;)if(q<p){var v=m.F(null,q),x=$APP.k(b,v);v=$APP.k(c,v);var y=$APP.k(x,"text"),A=$APP.k(v,"text");a.push(Gw(d,e,x,v));$APP.N(y,A)&&a.push(Hw(d,e,x,v));q+=1}else if(h=$APP.t(h))$APP.Nc(h)?(p=$APP.yb(h),h=$APP.zb(h),m=p,p=$APP.z(p)):(p=$APP.u(h),m=$APP.k(b,p),p=$APP.k(c,p),q=$APP.k(m,"text"),x=$APP.k(p,"text"),a.push(Gw(d,e,m,p)),$APP.N(q,x)&&a.push(Hw(d,
|
|
24
|
+
e,m,p)),h=$APP.w(h),m=null,p=0),q=0;else break;l=$APP.t(l);h=null;for(p=m=0;;)if(p<m)q=h.F(null,p),a.push(Iw(d,e,$APP.k(b,q))),p+=1;else if(l=$APP.t(l))h=l,$APP.Nc(h)?(l=$APP.yb(h),p=$APP.zb(h),h=l,m=$APP.z(l),l=p):(l=$APP.u(h),a.push(Iw(d,e,$APP.k(b,l))),l=$APP.w(h),h=null,m=0),p=0;else break;b=$APP.t(g);d=null;for(g=e=0;;)if(g<e)l=d.F(null,g),a.push(Jw($APP.k(c,l))),g+=1;else if(b=$APP.t(b))d=b,$APP.Nc(d)?(b=$APP.yb(d),g=$APP.zb(d),d=b,e=$APP.z(b),b=g):(b=$APP.u(d),a.push(Jw($APP.k(c,b))),b=$APP.w(d),
|
|
25
|
+
d=null,e=0),g=0;else break;return a},Pw=function(a){if($APP.n(a))for(var b=a.length,c=0;;)if(c<b){var d=a[c].finalize;$APP.n(d)&&(d.H?d.H():d.call(null));c+=1}else break},Qw=function(a,b,c){if($APP.C.i(b,$APP.k(a,"__xMorphStackToken"))){b=$APP.k(a,"__xMorphStackEntries");var d=$APP.k(a,"__xMorphStackRaf");$APP.n(d)&&(window.cancelAnimationFrame(d),a.__xMorphStackRaf=null);Pw(b);a.__xMorphStackEntries=null;a.__xMorphStackLast=null;Dw(a);$APP.n(c)&&(c=$APP.Dh(nw($APP.k(a,"__xMorphStackFrom"),$APP.k(a,
|
|
26
|
+
"__xMorphStackTo"))),c=new CustomEvent("x-morph-stack-changed",{detail:c,bubbles:!0,composed:!0,cancelable:!1}),a.dispatchEvent(c),a.__xMorphStackFrom=null,a.__xMorphStackTo=null)}return null},Rw=function(a){var b=$APP.k(a,"__xMorphStackRaf");$APP.n(b)&&(window.cancelAnimationFrame(b),a.__xMorphStackRaf=null);Pw($APP.k(a,"__xMorphStackEntries"));a.__xMorphStackEntries=null;a.__xMorphStackLast=null;Dw(a)},Tw=function(a,b,c){var d=$APP.k(a,"__xMorphStackCurrent"),e=function(){var m=$APP.k(a,"__xMorphStackModel");
|
|
27
|
+
return $APP.n(m)?m:sw(a)}(),g=vw(a);if(g.length===0||b==null||$APP.r($APP.Ud(function(m){return $APP.C.i(m,b)},g)))return!1;if($APP.C.i(d,b))return!0;var h=$APP.n(d)?ww(a,d):null;g=ww(a,b);c=$APP.Dh(new $APP.Q(null,3,[$APP.Uh,$APP.n(d)?d:"",$APP.Jl,$APP.n(b)?b:"",$APP.Hi,$APP.n(c)?c:"method"],null));c=new CustomEvent("x-morph-stack-change",{detail:c,bubbles:!0,composed:!0,cancelable:!0});c=a.dispatchEvent(c);if($APP.r(c))return!1;Rw(a);c=function(){var m=$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches);
|
|
28
|
+
return m?m:$APP.X.g(e)}();if($APP.n(c))xw(a,b),queueMicrotask(function(){var m=$APP.Dh(nw(d,b));m=new CustomEvent("x-morph-stack-changed",{detail:m,bubbles:!0,composed:!0});return a.dispatchEvent(m)});else{h=yw(h);xw(a,b);$APP.dj.g(qw(a));g=yw(g);g=Ow(a,h,g);var l=function(){var m=$APP.k(a,"__xMorphStackToken");return $APP.n(m)?m:0}()+1;a.__xMorphStackToken=l;a.__xMorphStackEntries=g;a.__xMorphStackLast=null;a.__xMorphStackFrom=d;a.__xMorphStackTo=b;$APP.ja(a,"__xMorphStackTimeScale",fw($APP.Ok.g(e),
|
|
29
|
+
$APP.zl.g(e),$APP.Ck.g(e),$APP.Zl.g(e)));cw($APP.Qg.g(e))&&(Cw(a),Aw(a,0));g.length===0?Qw(a,l,!0):(g=window.requestAnimationFrame(function(m){return $APP.C.i(l,$APP.k(a,"__xMorphStackToken"))?Sw(a,m):null}),a.__xMorphStackRaf=g)}return!0},Uw=function(a){qw(a);var b=sw(a);a.__xMorphStackModel=b;a.setAttribute("data-variant",$APP.Qg.g(b));var c=vw(a);c=iw($APP.xe($APP.uc(c)),b);b=$APP.k(a,"__xMorphStackCurrent");b==null?$APP.n(c)&&xw(a,c):$APP.n($APP.n(c)?$APP.N(c,b):c)?Tw(a,c,"attribute"):(c=c==null,
|
|
30
|
+
$APP.n(c?b:c)&&(Rw(a),xw(a,null)))},Vw=function(a){var b=vw(a);var c=$APP.k(a,"__xMorphStackModel");c=$APP.n(c)?c:sw(a);b=iw($APP.xe($APP.uc(b)),c);c=$APP.k(a,"__xMorphStackCurrent");b==null?(Rw(a),xw(a,null)):$APP.n($APP.n(c)?ww(a,c)==null:c)?(Rw(a),xw(a,b)):c==null?xw(a,b):xw(a,c);return null},Ww=function(a){function b(){return Vw(a)}var c=qw(a);c=$APP.M(c);$APP.D(c,$APP.bj).addEventListener("slotchange",b);$APP.ja(a,"__xMorphStackHandlers",{slot:b})},Xw=function(a){var b=$APP.k(a,"__xMorphStackHandlers"),
|
|
31
|
+
c=$APP.k(a,"__xMorphStackRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.bj.g(c),b=$APP.k(b,"slot"),$APP.n(b)&&c.removeEventListener("slotchange",b));a.__xMorphStackHandlers=null},Yw=function(a){Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},Zw=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(c);return d==
|
|
32
|
+
null?null:parseFloat(d)},set:function(d){return d==null?this.removeAttribute(c):this.setAttribute(c,""+$APP.T.g(d))},enumerable:!0,configurable:!0})},$w=function(a){Object.defineProperty(a,"activeState",{get:function(){return this.getAttribute("active-state")},set:function(b){return b==null?this.removeAttribute("active-state"):this.setAttribute("active-state",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=this.getAttribute("active-index");
|
|
33
|
+
return b==null?null:parseInt(b,10)},set:function(b){return b==null?this.removeAttribute("active-index"):this.setAttribute("active-index",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Zw(a,"stiffness","stiffness");Zw(a,"damping","damping");Zw(a,"mass","mass");Zw(a,"duration","duration");Object.defineProperty(a,"variant",{get:function(){return bw(this.getAttribute("variant"))},set:function(b){return b==null?this.removeAttribute("variant"):this.setAttribute("variant",""+$APP.T.g(b))},enumerable:!0,
|
|
34
|
+
configurable:!0});Yw(a);a.goTo=function(b){b=b!=null?""+$APP.T.g(b):null;return Tw(this,b,"method")};a.next=function(){var b=vw(this);var c=b.length,d=$APP.k(this,"__xMorphStackCurrent");if(c>0){b:{for(var e=0;;){if(e>=c){d=-1;break b}if($APP.C.i(b[e],d)){d=e;break b}e+=1}d=void 0}b=Tw(this,b[$APP.fd(d+1,c)],"method")}else b=null;return b};a.prev=function(){var b=vw(this);var c=b.length,d=$APP.k(this,"__xMorphStackCurrent");if(c>0){b:{for(var e=0;;){if(e>=c){d=0;break b}if($APP.C.i(b[e],d)){d=e;break b}e+=
|
|
35
|
+
1}d=void 0}b=Tw(this,b[$APP.fd(d-1+c,c)],"method")}else b=null;return b};a.states=function(){return vw(this)}},cx=function(){var a=class extends HTMLElement{};a.observedAttributes=ax;a.prototype.connectedCallback=function(){qw(this);Xw(this);Ww(this);Uw(this);$APP.k(this,"__xMorphStackCurrent")==null&&Vw(this);return null};a.prototype.disconnectedCallback=function(){Rw(this);var b=$APP.k(this,"__xMorphStackRefs"),c=$APP.n(b)?ow.g(b):null;$APP.n($APP.n(c)?c.parentNode:c)&&c.parentNode.removeChild(c);
|
|
36
|
+
$APP.n(b)&&(this.__xMorphStackRefs=bx.i(bx.i(b,ow),$APP.bk));this.__xMorphStackGooBaseThreshold=this.__xMorphStackGooBaseBlur=this.__xMorphStackFilterMatrix=this.__xMorphStackFilterBlur=this.__xMorphStackFilterId=null;Xw(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Uw(this);return null};$w(a.prototype);return a},dx=function(){$APP.n(customElements.get("x-morph-stack"))||customElements.define("x-morph-stack",cx());return null},bx=function bx(a){switch(arguments.length){case 1:return bx.g(arguments[0]);
|
|
37
|
+
case 2:return bx.i(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return bx.C(arguments[0],arguments[1],2<c.length?new $APP.Ub(c.slice(2),0,null):null)}};bx.g=function(a){return a};bx.i=function(a,b){return a==null?null:$APP.Na(a,b)};bx.C=function(a,b,c){for(;;){if(a==null)return null;a=bx.i(a,b);if($APP.n(c))b=$APP.u(c),c=$APP.w(c);else return a}};
|
|
38
|
+
bx.J=function(a){var b=$APP.u(a),c=$APP.w(a);a=$APP.u(c);c=$APP.w(c);return this.C(b,a,c)};bx.N=2;var Mw=function Mw(a){switch(arguments.length){case 1:return Mw.g(arguments[0]);case 2:return Mw.i(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return Mw.C(arguments[0],arguments[1],2<c.length?new $APP.Ub(c.slice(2),0,null):null)}};Mw.g=function(a){return a};
|
|
39
|
+
Mw.i=function(a,b){return $APP.z(a)<$APP.z(b)?$APP.Xc(function(c,d){return $APP.I(b,d)?$APP.mh.i(c,d):c},a,a):$APP.Xc($APP.mh,a,b)};Mw.C=function(a,b,c){return $APP.Xc(Mw,a,$APP.ld.i(c,b))};Mw.J=function(a){var b=$APP.u(a),c=$APP.w(a);a=$APP.u(c);c=$APP.w(c);return this.C(b,a,c)};Mw.N=2;
|
|
40
|
+
var Nw=new $APP.K(null,"entering","entering",-413471949),Lw=new $APP.K(null,"leaving","leaving",608616060),Kw=new $APP.K(null,"matched","matched",-975207164),rw=new $APP.K(null,"active-state-raw","active-state-raw",-60607051),hw=new $APP.K(null,"active-state","active-state",-1185168001),ow=new $APP.K(null,"ghost-layer","ghost-layer",1707493707);var ax="active-state active-index stiffness damping mass variant duration disabled".split(" "),aw=$APP.Uf(["liquid","clean","organic"]);$APP.Qd(["x-morph-stack-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.Uh,$APP.Y,$APP.Jl,$APP.Y,$APP.Hi,$APP.Y],null),$APP.Rl,!0],null),"x-morph-stack-changed",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.Uh,$APP.Y,$APP.Jl,$APP.Y],null),$APP.Rl,!1],null)]);var Bw=[0],Sw=function Sw(a,b){var d=$APP.k(a,"__xMorphStackToken"),e=$APP.k(a,"__xMorphStackEntries"),g=$APP.k(a,"__xMorphStackLast"),h=function(){var B=$APP.k(a,"__xMorphStackModel");return $APP.n(B)?B:sw(a)}(),l=$APP.Zl.g(h),m=$APP.zl.g(h);h=$APP.Ck.g(h);g=$APP.nh.i(0,$APP.oh.i(1/30,function(){var B=$APP.k(a,"__xMorphStackTimeScale");return $APP.n(B)?B:1}()*($APP.n(g)?(b-g)/1E3:1/60)));a.__xMorphStackLast=b;if($APP.n($APP.n(e)?e.length:e)){b=[!0];for(var p=[1],q=e.length,v=0;;)if(v<q){var x=e[v],
|
|
41
|
+
y=gw(x.t,x.v,g,l,m,h),A=y[0];y=y[1];x.t=A;x.v=y;x=x.update;x.g?x.g(A):x.call(null,A);A<p[0]&&(p[0]=A);Math.abs(A-1)<.001&&Math.abs(y)<.01||(b[0]=!1);v+=1}else break;Aw(a,p[0]);$APP.n(b[0])?Qw.m?Qw.m(a,d,!0):Qw.call(null,a,d,!0):(e=window.requestAnimationFrame(function(B){return $APP.C.i(d,$APP.k(a,"__xMorphStackToken"))?Sw.i?Sw.i(a,B):Sw.call(null,a,B):null}),a.__xMorphStackRaf=e)}return null};$APP.ha("baredom.exports.x_morph_stack.init",dx);export const init=dx;
|
package/dist/x-navbar.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"actions-slot"),x=$APP.k(b,"toggle-slot");b=$APP.k(b,"end-slot");a=new $APP.
|
|
4
|
-
typeof a==="string"?a:null,$APP.
|
|
5
|
-
$APP.
|
|
6
|
-
"pointer":c instanceof KeyboardEvent?"keyboard":"programmatic";$APP.n(g)&&(g=g.getAttribute("href"),
|
|
7
|
-
c)){if($APP.n($APP.k(a,"__xNavbarFocusVisible")))return null;a.__xNavbarFocusVisible=!0;a.setAttribute("data-focus-visible-within","true");return
|
|
8
|
-
c);$APP.k(b,"default-slot").addEventListener("slotchange",c);$APP.k(b,"actions-slot").addEventListener("slotchange",c);$APP.k(b,"toggle-slot").addEventListener("slotchange",c);$APP.k(b,"end-slot").addEventListener("slotchange",c)},
|
|
9
|
-
enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return $APP.n(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},
|
|
10
|
-
$APP.k(this,"__xNavbarRefs")==null;var c=$APP.k(this,"__xNavbarRefs");if(!$APP.n(c)){c=this.attachShadow({mode:"open"});var d=
|
|
2
|
+
var SV=function(a,b,c){return typeof a==="string"&&$APP.I(b,a)?a:c},TV=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},UV=function(a){return a.assignedNodes({flatten:!0})},VV=function(a){return document.createElement(a)},bW=function(a,b){var c=$APP.k(b,"base"),d=$APP.k(b,"bar"),e=$APP.k(b,"brand"),g=$APP.k(b,"start"),h=$APP.k(b,"actions"),l=$APP.k(b,"toggle"),m=$APP.k(b,"end"),p=$APP.k(b,"brand-slot"),q=$APP.k(b,"start-slot"),v=$APP.k(b,
|
|
3
|
+
"actions-slot"),x=$APP.k(b,"toggle-slot");b=$APP.k(b,"end-slot");a=new $APP.Q(null,7,[$APP.U,a.getAttribute("label"),$APP.Zk,a.getAttribute("orientation"),$APP.Qg,a.getAttribute("variant"),$APP.nl,a.hasAttribute("sticky"),WV,a.hasAttribute("elevated"),$APP.$i,a.getAttribute("breakpoint"),XV,a.getAttribute("alignment")],null);var y=$APP.M(a);a=$APP.D(y,$APP.U);var A=$APP.D(y,$APP.Zk),B=$APP.D(y,$APP.Qg),E=$APP.D(y,$APP.nl),H=$APP.D(y,WV),G=$APP.D(y,$APP.$i);y=$APP.D(y,XV);a=new $APP.Q(null,7,[$APP.U,
|
|
4
|
+
typeof a==="string"?a:null,$APP.Zk,SV(A,YV,"horizontal"),$APP.Qg,SV(B,ZV,"default"),$APP.nl,$APP.F(E),WV,$APP.F(H),$APP.$i,SV(G,$V,"md"),XV,SV(y,aW,"space-between")],null);p=UV(p).length>0;q=UV(q).length>0;v=UV(v).length>0;x=UV(x).length>0;b=UV(b).length>0;A=$APP.M(a);A=$APP.D(A,$APP.U);A=$APP.Jg(A)?A:null;$APP.n(A)?c.setAttribute("aria-label",A):c.removeAttribute("aria-label");c.setAttribute("data-variant",$APP.Qg.g(a));c.setAttribute("data-orientation",$APP.Zk.g(a));c.setAttribute("data-breakpoint",
|
|
5
|
+
$APP.$i.g(a));d.setAttribute("data-alignment",XV.g(a));e.setAttribute("data-has-brand",p?"true":"false");g.setAttribute("data-has-start",q?"true":"false");h.setAttribute("data-has-actions",v?"true":"false");l.setAttribute("data-has-toggle",x?"true":"false");return m.setAttribute("data-has-end",b?"true":"false")},cW=function(a,b){b.addEventListener("click",function(c){var d=$APP.k(a,"__xNavbarRefs"),e=c.target,g=$APP.n(e)?e.closest("a"):null;c=c instanceof PointerEvent?"pointer":c instanceof MouseEvent?
|
|
6
|
+
"pointer":c instanceof KeyboardEvent?"keyboard":"programmatic";$APP.n(g)&&(g=g.getAttribute("href"),TV(a,"navigate",{href:$APP.n(g)?g:"",source:c}));a:{d=UV($APP.k(d,"brand-slot"));for(g=0;;)if(g<d.length){var h=d[g];var l=$APP.C.i(h,e);h=l?l:(l=$APP.C.i(h.nodeType,Node.ELEMENT_NODE))?h.contains(e):l;if($APP.n(h)){e=!0;break a}g+=1}else{e=!1;break a}e=void 0}return e?TV(a,"brand-activate",{source:c}):null});b.addEventListener("focusin",function(c){c=c.target;if($APP.n($APP.n(c)?c.matches(":focus-visible"):
|
|
7
|
+
c)){if($APP.n($APP.k(a,"__xNavbarFocusVisible")))return null;a.__xNavbarFocusVisible=!0;a.setAttribute("data-focus-visible-within","true");return TV(a,"focus-visible",{})}return null});b.addEventListener("focusout",function(c){c=c.relatedTarget;if($APP.n($APP.n(c)?a.contains(c):c))return null;a.__xNavbarFocusVisible=!1;return a.removeAttribute("data-focus-visible-within")})},dW=function(a,b){function c(){return bW(a,b)}$APP.k(b,"brand-slot").addEventListener("slotchange",c);$APP.k(b,"start-slot").addEventListener("slotchange",
|
|
8
|
+
c);$APP.k(b,"default-slot").addEventListener("slotchange",c);$APP.k(b,"actions-slot").addEventListener("slotchange",c);$APP.k(b,"toggle-slot").addEventListener("slotchange",c);$APP.k(b,"end-slot").addEventListener("slotchange",c)},eW=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n($APP.F(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},fW=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,
|
|
9
|
+
enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return $APP.n(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},gW=function(a){eW(a,"sticky","sticky");eW(a,"elevated","elevated");fW(a,"label","label");fW(a,"variant","variant");fW(a,"orientation","orientation");fW(a,"alignment","alignment");fW(a,"breakpoint","breakpoint")},iW=function(){var a=class extends HTMLElement{};a.observedAttributes=hW;a.prototype.connectedCallback=function(){var b=
|
|
10
|
+
$APP.k(this,"__xNavbarRefs")==null;var c=$APP.k(this,"__xNavbarRefs");if(!$APP.n(c)){c=this.attachShadow({mode:"open"});var d=VV("style"),e=VV("nav"),g=VV("div"),h=VV("div"),l=VV("div"),m=VV("div"),p=VV("div"),q=VV("div"),v=VV("div"),x=VV("slot"),y=VV("slot"),A=VV("slot"),B=VV("slot"),E=VV("slot"),H=VV("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-navbar-height:4rem;--x-navbar-padding-inline:1rem;--x-navbar-gap:0.75rem;--x-navbar-bg:var(--x-color-surface,rgba(255,255,255,0.88));--x-navbar-color:var(--x-color-text,#0f172a);--x-navbar-border:var(--x-color-border,rgba(148,163,184,0.22));--x-navbar-shadow:var(--x-shadow-md,0 8px 24px rgba(15,23,42,0.08));--x-navbar-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-navbar-z-index:40;--x-navbar-radius:0;--x-navbar-transition-duration:var(--x-transition-duration,180ms);--x-navbar-transition-easing:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-navbar-align-items:center;}@media (prefers-color-scheme: dark){:host{--x-navbar-bg:var(--x-color-surface,rgba(15,23,42,0.84));--x-navbar-color:var(--x-color-text,#e5e7eb);--x-navbar-border:var(--x-color-border,rgba(51,65,85,0.9));--x-navbar-shadow:var(--x-shadow-md,0 14px 36px rgba(0,0,0,0.35));--x-navbar-focus-ring:var(--x-color-focus-ring,#93c5fd);}}:host([hidden]){display:none;}[part\x3d'base']{display:block;color:var(--x-navbar-color);background:var(--x-navbar-bg);border:0;border-bottom:1px solid var(--x-navbar-border);border-radius:var(--x-navbar-radius);box-shadow:none;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:background var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),border-color var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),box-shadow var(--x-navbar-transition-duration) var(--x-navbar-transition-easing);}:host([sticky]) [part\x3d'base']{position:sticky;top:0;z-index:var(--x-navbar-z-index);}:host([elevated]) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}[part\x3d'base'][data-variant\x3d'subtle']{background:transparent;border-bottom-color:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;}[part\x3d'base'][data-variant\x3d'inverted']{background:#0f172a;color:#f8fafc;border-bottom-color:#1e293b;}@media (prefers-color-scheme: dark){[part\x3d'base'][data-variant\x3d'inverted']{background:#020617;color:#f8fafc;border-bottom-color:#172033;}}[part\x3d'base'][data-variant\x3d'transparent']{background:transparent;border-bottom-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;}[part\x3d'bar']{display:grid;grid-template-columns:auto auto 1fr auto auto auto;align-items:var(--x-navbar-align-items, center);gap:var(--x-navbar-gap);min-block-size:var(--x-navbar-height);padding-inline:var(--x-navbar-padding-inline);}[part\x3d'bar'][data-alignment\x3d'start']{justify-items:start;}[part\x3d'bar'][data-alignment\x3d'center']{justify-items:center;}[part\x3d'bar'][data-alignment\x3d'space-between']{justify-items:stretch;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'bar']{grid-template-columns:1fr;grid-auto-rows:auto;align-items:var(--x-navbar-align-items, center);padding-block:0.75rem;}[part\x3d'brand'],[part\x3d'start'],[part\x3d'nav'],[part\x3d'actions'],[part\x3d'toggle'],[part\x3d'end']{display:flex;align-items:inherit;min-inline-size:0;}[part\x3d'nav']{gap:var(--x-navbar-gap);}[part\x3d'actions'],[part\x3d'end'],[part\x3d'toggle']{justify-self:end;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'actions'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'end'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'toggle']{justify-self:start;}[part\x3d'brand'][data-has-brand\x3d'false'],[part\x3d'start'][data-has-start\x3d'false'],[part\x3d'actions'][data-has-actions\x3d'false'],[part\x3d'toggle'][data-has-toggle\x3d'false'],[part\x3d'end'][data-has-end\x3d'false']{display:none;}slot[name\x3d'brand'],slot[name\x3d'start'],slot[name\x3d'actions'],slot[name\x3d'toggle'],slot[name\x3d'end']{display:contents;}slot{display:contents;}:host(:focus-within) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}:host([data-focus-visible-within\x3d'true']) [part\x3d'base']{box-shadow:0 0 0 2px var(--x-navbar-focus-ring), var(--x-navbar-shadow);}@media (max-width:640px){:host(:not([orientation\x3dvertical])) [part\x3d'bar']{display:flex;align-items:center;gap:var(--x-navbar-gap);min-block-size:var(--x-navbar-height);padding-inline:var(--x-navbar-padding-inline);}:host(:not([orientation\x3dvertical])) [part\x3d'brand']{flex:1;}:host(:not([orientation\x3dvertical])) [part\x3d'start'],:host(:not([orientation\x3dvertical])) [part\x3d'nav'],:host(:not([orientation\x3dvertical])) [part\x3d'actions'],:host(:not([orientation\x3dvertical])) [part\x3d'end']{display:none;}}@media (prefers-reduced-motion: reduce){[part\x3d'base']{transition:none;}}";
|
|
11
11
|
e.setAttribute("part","base");g.setAttribute("part","bar");h.setAttribute("part","brand");l.setAttribute("part","start");m.setAttribute("part","nav");p.setAttribute("part","actions");q.setAttribute("part","toggle");v.setAttribute("part","end");x.setAttribute("name","brand");y.setAttribute("name","start");B.setAttribute("name","actions");E.setAttribute("name","toggle");H.setAttribute("name","end");h.appendChild(x);l.appendChild(y);m.appendChild(A);p.appendChild(B);q.appendChild(E);v.appendChild(H);
|
|
12
|
-
g.appendChild(h);g.appendChild(l);g.appendChild(m);g.appendChild(p);g.appendChild(q);g.appendChild(v);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xNavbarRefs=c={"end-slot":H,bar:g,start:l,toggle:q,actions:p,brand:h,"default-slot":A,root:c,"brand-slot":x,"start-slot":y,"actions-slot":B,"toggle-slot":E,end:v,base:e,nav:m}}b&&(this.__xNavbarFocusVisible=!1,
|
|
13
|
-
a.prototype.attributeChangedCallback=function(){var b=$APP.k(this,"__xNavbarRefs");return $APP.n(b)?
|
|
14
|
-
$APP.
|
|
12
|
+
g.appendChild(h);g.appendChild(l);g.appendChild(m);g.appendChild(p);g.appendChild(q);g.appendChild(v);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xNavbarRefs=c={"end-slot":H,bar:g,start:l,toggle:q,actions:p,brand:h,"default-slot":A,root:c,"brand-slot":x,"start-slot":y,"actions-slot":B,"toggle-slot":E,end:v,base:e,nav:m}}b&&(this.__xNavbarFocusVisible=!1,cW(this,$APP.k(c,"base")),dW(this,c));return bW(this,c)};a.prototype.disconnectedCallback=function(){this.__xNavbarFocusVisible=!1};
|
|
13
|
+
a.prototype.attributeChangedCallback=function(){var b=$APP.k(this,"__xNavbarRefs");return $APP.n(b)?bW(this,b):null};gW(a.prototype);return a},jW=function(){$APP.n(customElements.get("x-navbar"))||customElements.define("x-navbar",iW());return null},WV=new $APP.K(null,"elevated","elevated",-7323953),XV=new $APP.K(null,"alignment","alignment",1040093386);var YV=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),ZV=new $APP.S(null,new $APP.Q(null,4,["transparent",null,"inverted",null,"subtle",null,"default",null],null),null),$V=new $APP.S(null,new $APP.Q(null,4,["md",null,"lg",null,"xl",null,"sm",null],null),null),aW=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"space-between",null],null),null),hW="label orientation variant sticky elevated breakpoint alignment".split(" ");
|
|
14
|
+
$APP.Qd(["focus-visible",new $APP.Q(null,1,[$APP.V,$APP.Rd],null),"navigate",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,2,[$APP.Fm,$APP.Y,$APP.$k,$APP.Y],null)],null),"brand-activate",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,1,[$APP.$k,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_navbar.init",jW);export const init=jW;
|
package/dist/x-neural-glow.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
Math.max(1,a))}return 4},
|
|
4
|
-
|
|
5
|
-
$APP.n(d)?(c=parseInt(d[1],10),e=parseInt(d[2],10),d=parseInt(d[3],10),c=[c/255,e/255,d/255]):c=[0,0,0];return a[b]=c},
|
|
6
|
-
a.getAttribute("opacity"),a.getAttribute("orb-count"),a.getAttribute("orb-size"),a.getAttribute("color-background"),a.getAttribute("interactive"),a.getAttribute("color-primary"),a.getAttribute("connection-distance")]);var b=$APP.M(a);a=$APP.D(b,
|
|
7
|
-
|
|
8
|
-
"u_resolution"),g,h);b.uniform1f($APP.k(d,"u_time"),l);b.uniform1f($APP.k(d,"u_activity"),m);b.uniform1f($APP.k(d,"u_pulse_speed"),
|
|
9
|
-
"u_opacity"),$APP.
|
|
2
|
+
var hF=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?15:Math.min(50,Math.max(3,a))}return 15},iF=function(a,b){return typeof a==="string"&&a.trim().length>0?a.trim():b},jF=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?1:Math.min(5,Math.max(.1,a))}return 1},kF=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?4:Math.min(10,
|
|
3
|
+
Math.max(1,a))}return 4},lF=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.15:Math.min(.5,Math.max(.05,a))}return.15},mF=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?40:Math.min(200,Math.max(10,a))}return 40},nF=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?.8:Math.min(1,Math.max(0,a))):.8},oF=function(a){return a==null?!0:$APP.N("false",a.trim().toLowerCase())},
|
|
4
|
+
pF=function(a,b,c){return a+(b-a)*c},qF=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},sF=function(a,b){a=$APP.k(a,"__xNeuralColorCache");var c=$APP.k(a,b);if($APP.n(c))return c;rF.fillStyle="#000000";rF.fillStyle=b;c=rF.fillStyle;if(typeof c==="string"&&$APP.C.i(c[0],"#")){var d=c.substring(1);c=parseInt(d.substring(0,2),16);var e=parseInt(d.substring(2,4),16);d=parseInt(d.substring(4,6),16);c=[c/255,e/255,d/255]}else d=c.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/),
|
|
5
|
+
$APP.n(d)?(c=parseInt(d[1],10),e=parseInt(d[2],10),d=parseInt(d[3],10),c=[c/255,e/255,d/255]):c=[0,0,0];return a[b]=c},tF=function(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);if($APP.n(a.getShaderParameter(b,a.COMPILE_STATUS)))return b;console.warn("x-neural-glow shader error:",a.getShaderInfoLog(b));a.deleteShader(b);return null},MF=function(a){a=$APP.zf([uF,vF,wF,xF,yF,zF,AF,BF,CF,DF],[a.getAttribute("rest-rate"),a.getAttribute("pulse-speed"),a.getAttribute("color-secondary"),
|
|
6
|
+
a.getAttribute("opacity"),a.getAttribute("orb-count"),a.getAttribute("orb-size"),a.getAttribute("color-background"),a.getAttribute("interactive"),a.getAttribute("color-primary"),a.getAttribute("connection-distance")]);var b=$APP.M(a);a=$APP.D(b,CF);var c=$APP.D(b,DF),d=$APP.D(b,uF),e=$APP.D(b,vF),g=$APP.D(b,xF),h=$APP.D(b,wF),l=$APP.D(b,yF),m=$APP.D(b,zF),p=$APP.D(b,AF);b=$APP.D(b,BF);return $APP.zf([EF,FF,GF,HF,$APP.pl,IF,$APP.li,JF,KF,LF],[mF(m),hF(l),iF(a,"#4f8bff"),iF(h,"#00e5cc"),oF(b),lF(c),
|
|
7
|
+
nF(g),jF(e),iF(p,"#050a18"),kF(d)])},NF=function(a,b,c){return Math.sin(a*1.7+c*.3)*Math.cos(b*2.3+c*.5)*.5+Math.sin(a*3.1-c*.7)*Math.cos(b*1.3+c*.2)*.25+Math.sin(a*5.3+c*.4)*Math.cos(b*4.7-c*.6)*.125},PF=function(a,b,c){var d=$APP.k(a,"__xNeuralUniforms"),e=OF.g($APP.k(a,"__xNeuralRefs")),g=e.width,h=e.height,l=$APP.k(a,"__xNeuralTime"),m=$APP.k(a,"__xNeuralActivity");e=$APP.k(a,"__xNeuralOrbPos");var p=$APP.k(a,"__xNeuralOrbPhases"),q=FF.g(c),v=sF(a,GF.g(c)),x=sF(a,HF.g(c));a=sF(a,KF.g(c));b.uniform2f($APP.k(d,
|
|
8
|
+
"u_resolution"),g,h);b.uniform1f($APP.k(d,"u_time"),l);b.uniform1f($APP.k(d,"u_activity"),m);b.uniform1f($APP.k(d,"u_pulse_speed"),JF.g(c));b.uniform1f($APP.k(d,"u_rest_rate"),LF.g(c));b.uniform1i($APP.k(d,"u_orb_count"),q);b.uniform1f($APP.k(d,"u_orb_size"),EF.g(c));b.uniform1f($APP.k(d,"u_connection_dist"),IF.g(c));b.uniform3f($APP.k(d,"u_color_primary"),v[0],v[1],v[2]);b.uniform3f($APP.k(d,"u_color_secondary"),x[0],x[1],x[2]);b.uniform3f($APP.k(d,"u_color_background"),a[0],a[1],a[2]);b.uniform1f($APP.k(d,
|
|
9
|
+
"u_opacity"),$APP.li.g(c));for(c=0;;)if(c<q)g=e[c],b.uniform2f($APP.k(d,"u_orb_positions["+$APP.T.g(c)+"]"),g[0],g[1]),b.uniform1f($APP.k(d,"u_orb_phases["+$APP.T.g(c)+"]"),p[c]),c+=1;else break},RF=function(a){a.__xNeuralTime=0;$APP.ja(a,"__xNeuralLastFrame",performance.now());a.__xNeuralActivity=0;a.__xNeuralImpulse=0;$APP.ja(a,"__xNeuralRaf",requestAnimationFrame(function(){return QF(a)}))},SF=function(a){if($APP.n($APP.pl.g($APP.k(a,"__xNeuralModel")))){var b=function(){var g=window.scrollY,h=
|
|
10
10
|
$APP.k(a,"__xNeuralLastScroll");a.__xNeuralLastScroll=g;h!=null&&(a.__xNeuralImpulse=Math.min(1,$APP.k(a,"__xNeuralImpulse")+Math.min(1,Math.abs(g-h)/100)));return null},c=function(g){var h=$APP.k(a,"__xNeuralLastPtr"),l=g.clientX;g=g.clientY;if($APP.n(h)){var m=l-$APP.k(h,"x"),p=g-$APP.k(h,"y");a.__xNeuralImpulse=Math.min(1,$APP.k(a,"__xNeuralImpulse")+Math.min(1,Math.sqrt(m*m+p*p)/50));h.x=l;h.y=g}else a.__xNeuralLastPtr={x:l,y:g};return null},d=function(){a.__xNeuralImpulse=Math.min(1,$APP.k(a,
|
|
11
|
-
"__xNeuralImpulse")+.3);return null},e={scroll:b,pointer:c,key:d};window.addEventListener("scroll",b,{passive:!0});window.addEventListener("pointermove",c,{passive:!0});window.addEventListener("keydown",d,{passive:!0});a.__xNeuralHandlers=e}return null},
|
|
12
|
-
b);a.__xNeuralHandlers=null}},
|
|
13
|
-
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorSecondary",{get:function(){var b=this.getAttribute("color-secondary");return
|
|
14
|
-
this.setAttribute("color-background",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"pulseSpeed",{get:function(){return
|
|
15
|
-
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"connectionDistance",{get:function(){return
|
|
16
|
-
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"opacity",{get:function(){return
|
|
17
|
-
configurable:!0})},
|
|
18
|
-
b:{d=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1});d=$APP.n(d)?d:e.getContext("experimental-webgl",{alpha:!0,premultipliedAlpha:!1});if($APP.n(d)){var g=
|
|
11
|
+
"__xNeuralImpulse")+.3);return null},e={scroll:b,pointer:c,key:d};window.addEventListener("scroll",b,{passive:!0});window.addEventListener("pointermove",c,{passive:!0});window.addEventListener("keydown",d,{passive:!0});a.__xNeuralHandlers=e}return null},TF=function(a){var b=$APP.k(a,"__xNeuralHandlers");if($APP.n(b)){var c=$APP.k(b,"scroll");$APP.n(c)&&window.removeEventListener("scroll",c);c=$APP.k(b,"pointer");$APP.n(c)&&window.removeEventListener("pointermove",c);b=$APP.k(b,"key");$APP.n(b)&&window.removeEventListener("keydown",
|
|
12
|
+
b);a.__xNeuralHandlers=null}},UF=function(a){Object.defineProperty(a,"orbCount",{get:function(){return hF(this.getAttribute("orb-count"))},set:function(b){return b==null?this.removeAttribute("orb-count"):this.setAttribute("orb-count",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorPrimary",{get:function(){var b=this.getAttribute("color-primary");return iF(b,"#4f8bff")},set:function(b){return b==null?this.removeAttribute("color-primary"):this.setAttribute("color-primary",
|
|
13
|
+
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorSecondary",{get:function(){var b=this.getAttribute("color-secondary");return iF(b,"#00e5cc")},set:function(b){return b==null?this.removeAttribute("color-secondary"):this.setAttribute("color-secondary",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorBackground",{get:function(){var b=this.getAttribute("color-background");return iF(b,"#050a18")},set:function(b){return b==null?this.removeAttribute("color-background"):
|
|
14
|
+
this.setAttribute("color-background",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"pulseSpeed",{get:function(){return jF(this.getAttribute("pulse-speed"))},set:function(b){return b==null?this.removeAttribute("pulse-speed"):this.setAttribute("pulse-speed",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"restRate",{get:function(){return kF(this.getAttribute("rest-rate"))},set:function(b){return b==null?this.removeAttribute("rest-rate"):this.setAttribute("rest-rate",
|
|
15
|
+
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"connectionDistance",{get:function(){return lF(this.getAttribute("connection-distance"))},set:function(b){return b==null?this.removeAttribute("connection-distance"):this.setAttribute("connection-distance",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orbSize",{get:function(){return mF(this.getAttribute("orb-size"))},set:function(b){return b==null?this.removeAttribute("orb-size"):this.setAttribute("orb-size",
|
|
16
|
+
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"opacity",{get:function(){return nF(this.getAttribute("opacity"))},set:function(b){return b==null?this.removeAttribute("opacity"):this.setAttribute("opacity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return oF(this.getAttribute("interactive"))},set:function(b){return $APP.n(b)?this.removeAttribute("interactive"):this.setAttribute("interactive","false")},enumerable:!0,
|
|
17
|
+
configurable:!0})},ZF=function(){var a=class extends HTMLElement{};a.observedAttributes=VF;a.prototype.connectedCallback=function(){var b=MF(this);this.__xNeuralModel=b;this.__xNeuralColorCache={};this.__xNeuralDriftTime=0;this.__xNeuralLastScroll=this.__xNeuralLastPtr=null;if(!$APP.n($APP.k(this,"__xNeuralRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("canvas");d.textContent=WF;e.setAttribute("part","canvas");c.appendChild(d);c.appendChild(e);
|
|
18
|
+
b:{d=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1});d=$APP.n(d)?d:e.getContext("experimental-webgl",{alpha:!0,premultipliedAlpha:!1});if($APP.n(d)){var g=tF(d,d.VERTEX_SHADER,"attribute vec2 a_position;\nvoid main() {\n gl_Position \x3d vec4(a_position, 0.0, 1.0);\n}"),h=tF(d,d.FRAGMENT_SHADER,XF);if($APP.n($APP.n(g)?h:g)){var l=d.createProgram();d.attachShader(l,g);d.attachShader(l,h);d.linkProgram(l);$APP.n(d.getProgramParameter(l,d.LINK_STATUS))?g=l:(console.warn("x-neural-glow link error:",
|
|
19
19
|
d.getProgramInfoLog(l)),d.deleteProgram(l),g=null);if($APP.n(g)){d.useProgram(g);h=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,h);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),d.STATIC_DRAW);h=d.getAttribLocation(g,"a_position");d.enableVertexAttribArray(h);d.vertexAttribPointer(h,2,d.FLOAT,!1,0,0);h={};l=$APP.t(new $APP.O(null,12,5,$APP.P,"u_resolution u_time u_activity u_pulse_speed u_rest_rate u_orb_count u_orb_size u_connection_dist u_color_primary u_color_secondary u_color_background u_opacity".split(" "),
|
|
20
|
-
null));for(var m=null,p=0,q=0;;)if(q<p){var v=m.
|
|
21
|
-
d.ONE_MINUS_SRC_ALPHA);break b}}}d=null}this.__xNeuralRefs=new $APP.
|
|
22
|
-
|
|
23
|
-
e))if(e>g)for(e-=g,g=0;;)if(g<e){var l=Math.random(),m=Math.random();b.push([l,m]);d.push([l,m]);c.push(Math.random()*h);g+=1}else break;else b.length=e,d.length=e,c.length=e;
|
|
24
|
-
-2128794414),
|
|
25
|
-
new $APP.K(null,"interactive-raw","interactive-raw",1874525367),
|
|
26
|
-
"color-primary",1415907910),
|
|
27
|
-
$APP.
|
|
28
|
-
[$APP.
|
|
29
|
-
var
|
|
20
|
+
null));for(var m=null,p=0,q=0;;)if(q<p){var v=m.F(null,q);h[v]=d.getUniformLocation(g,v);q+=1}else if(l=$APP.t(l))m=l,$APP.Nc(m)?(l=$APP.yb(m),q=$APP.zb(m),m=l,p=$APP.z(l),l=q):(l=$APP.u(m),h[l]=d.getUniformLocation(g,l),l=$APP.w(m),m=null,p=0),q=0;else break;for(l=0;;)if(l<50)m="u_orb_positions["+$APP.T.g(l)+"]",p="u_orb_phases["+$APP.T.g(l)+"]",h[m]=d.getUniformLocation(g,m),h[p]=d.getUniformLocation(g,p),l+=1;else break;this.__xNeuralUniforms=h;this.__xNeuralProgram=g;d.enable(d.BLEND);d.blendFunc(d.SRC_ALPHA,
|
|
21
|
+
d.ONE_MINUS_SRC_ALPHA);break b}}}d=null}this.__xNeuralRefs=new $APP.Q(null,3,[$APP.yi,c,OF,e,YF,d],null)}b=FF.g(b);c=[];for(e=0;;)if(e<b)c.push([Math.random(),Math.random()]),e+=1;else break;e=[];d=2*Math.PI;for(g=0;;)if(g<b)e.push(Math.random()*d),g+=1;else break;d=[];for(g=0;;)if(g<b)h=c[g],d.push([h[0],h[1]]),g+=1;else break;this.__xNeuralOrbBase=c;this.__xNeuralOrbPhases=e;this.__xNeuralOrbPos=d;this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");TF(this);SF(this);
|
|
22
|
+
RF(this);return null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xNeuralRaf");$APP.n(b)&&(cancelAnimationFrame(b),this.__xNeuralRaf=null);TF(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.N(c,d)&&(this.__xNeuralModel=b=MF(this),this.__xNeuralColorCache={},$APP.n($APP.k(this,"__xNeuralRefs")))){var e=FF.g(b);b=$APP.k(this,"__xNeuralOrbBase");c=$APP.k(this,"__xNeuralOrbPhases");d=$APP.k(this,"__xNeuralOrbPos");var g=b.length,h=2*Math.PI;if($APP.N(g,
|
|
23
|
+
e))if(e>g)for(e-=g,g=0;;)if(g<e){var l=Math.random(),m=Math.random();b.push([l,m]);d.push([l,m]);c.push(Math.random()*h);g+=1}else break;else b.length=e,d.length=e,c.length=e;TF(this);return $APP.n(this.isConnected)?SF(this):null}return null};UF(a.prototype);return a},$F=function(){$APP.n(customElements.get("x-neural-glow"))||customElements.define("x-neural-glow",ZF());return null},xF=new $APP.K(null,"opacity-raw","opacity-raw",-1373906448),IF=new $APP.K(null,"connection-distance","connection-distance",
|
|
24
|
+
-2128794414),vF=new $APP.K(null,"pulse-speed-raw","pulse-speed-raw",-665433726),CF=new $APP.K(null,"color-primary-raw","color-primary-raw",392476156),KF=new $APP.K(null,"color-background","color-background",1347240536),JF=new $APP.K(null,"pulse-speed","pulse-speed",828613109),wF=new $APP.K(null,"color-secondary-raw","color-secondary-raw",1212293328),yF=new $APP.K(null,"orb-count-raw","orb-count-raw",-930142286),DF=new $APP.K(null,"connection-distance-raw","connection-distance-raw",1368898143),BF=
|
|
25
|
+
new $APP.K(null,"interactive-raw","interactive-raw",1874525367),LF=new $APP.K(null,"rest-rate","rest-rate",1350607737),HF=new $APP.K(null,"color-secondary","color-secondary",-556141879),YF=new $APP.K(null,"gl","gl",-246422634),EF=new $APP.K(null,"orb-size","orb-size",83267072),zF=new $APP.K(null,"orb-size-raw","orb-size-raw",925656307),FF=new $APP.K(null,"orb-count","orb-count",1055126048),AF=new $APP.K(null,"color-background-raw","color-background-raw",2063778805),GF=new $APP.K(null,"color-primary",
|
|
26
|
+
"color-primary",1415907910),OF=new $APP.K(null,"canvas","canvas",-1798817489),uF=new $APP.K(null,"rest-rate-raw","rest-rate-raw",-206808800);var VF="orb-count color-primary color-secondary color-background pulse-speed rest-rate connection-distance orb-size opacity interactive".split(" ");
|
|
27
|
+
$APP.zf([new $APP.K(null,"colorBackground","colorBackground",-167638842),$APP.cj,new $APP.K(null,"orbCount","orbCount",-2006864213),new $APP.K(null,"restRate","restRate",-272422548),new $APP.K(null,"colorPrimary","colorPrimary",-611817233),new $APP.K(null,"orbSize","orbSize",1744279571),$APP.li,new $APP.K(null,"colorSecondary","colorSecondary",1906906102),new $APP.K(null,"pulseSpeed","pulseSpeed",1297932542),new $APP.K(null,"connectionDistance","connectionDistance",1241773439)],[new $APP.Q(null,1,
|
|
28
|
+
[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Sj],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,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,1,[$APP.Z,$APP.W],null)]);
|
|
29
|
+
var XF="precision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform float u_activity;\nuniform float u_pulse_speed;\nuniform float u_rest_rate;\nuniform int u_orb_count;\nuniform vec2 u_orb_positions["+$APP.T.g(50)+"];\nuniform float u_orb_phases["+$APP.T.g(50)+"];\nuniform float u_orb_size;\nuniform float u_connection_dist;\nuniform vec3 u_color_primary;\nuniform vec3 u_color_secondary;\nuniform vec3 u_color_background;\nuniform float u_opacity;\n\nfloat distToSegment(vec2 p, vec2 a, vec2 b) {\n vec2 pa \x3d p - a;\n vec2 ba \x3d b - a;\n float t \x3d clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);\n return length(pa - ba * t);\n}\n\nvoid main() {\n vec2 uv \x3d gl_FragCoord.xy / u_resolution;\n float aspect \x3d u_resolution.x / u_resolution.y;\n\n // Auto-detect light vs dark background\n float bg_lum \x3d dot(u_color_background, vec3(0.2126, 0.7152, 0.0722));\n float is_light \x3d smoothstep(0.3, 0.6, bg_lum);\n\n // Pulse speed interpolates between rest and active rate\n float active_speed \x3d u_pulse_speed * 3.0;\n float speed \x3d mix(6.2831853 / u_rest_rate, active_speed, u_activity);\n\n // Start with background\n vec3 color \x3d u_color_background;\n\n // Orb glow layer\n float radius \x3d u_orb_size / min(u_resolution.x, u_resolution.y);\n float softness \x3d 2.5;\n\n for (int i \x3d 0; i \x3c "+
|
|
30
30
|
$APP.T.g(50)+"; i++) {\n if (i \x3e\x3d u_orb_count) break;\n\n vec2 orbPos \x3d u_orb_positions[i];\n vec2 diff \x3d uv - orbPos;\n diff.x *\x3d aspect;\n\n float dist \x3d length(diff);\n float pulse \x3d 0.5 + 0.5 * sin(u_time * speed + u_orb_phases[i]);\n float glow_strength \x3d (0.4 + 0.6 * pulse) * (0.5 + 0.5 * u_activity + 0.5);\n float glow \x3d exp(-dist * dist / (radius * radius * softness)) * glow_strength;\n\n // Alternate primary/secondary by index\n vec3 orb_color \x3d mix(u_color_primary, u_color_secondary, step(1.0, mod(float(i), 2.0)));\n vec3 additive \x3d color + orb_color * glow;\n vec3 multiply \x3d color * mix(vec3(1.0), orb_color, glow);\n color \x3d mix(additive, multiply, is_light);\n }\n\n // Connection line layer\n float line_width \x3d 0.003;\n for (int i \x3d 0; i \x3c "+
|
|
31
|
-
$APP.T.g(50)+"; i++) {\n if (i \x3e\x3d u_orb_count) break;\n for (int j \x3d 0; j \x3c "+$APP.T.g(50)+"; j++) {\n if (j \x3e\x3d u_orb_count) break;\n if (j \x3c\x3d i) continue;\n\n vec2 pi_pos \x3d u_orb_positions[i];\n vec2 pj_pos \x3d u_orb_positions[j];\n\n vec2 diff_ij \x3d pi_pos - pj_pos;\n diff_ij.x *\x3d aspect;\n float orb_dist \x3d length(diff_ij);\n\n if (orb_dist \x3c u_connection_dist) {\n vec2 uv_a \x3d vec2(uv.x * aspect, uv.y);\n vec2 pa \x3d vec2(pi_pos.x * aspect, pi_pos.y);\n vec2 pb \x3d vec2(pj_pos.x * aspect, pj_pos.y);\n\n float d \x3d distToSegment(uv_a, pa, pb);\n float fade \x3d 1.0 - (orb_dist / u_connection_dist);\n float avg_phase \x3d (u_orb_phases[i] + u_orb_phases[j]) * 0.5;\n float line_pulse \x3d 0.3 + 0.7 * sin(u_time * speed + avg_phase);\n float line_glow \x3d exp(-d * d / (line_width * line_width)) * fade * line_pulse;\n line_glow *\x3d (0.3 + 0.7 * u_activity + 0.3);\n\n vec3 line_color \x3d mix(u_color_primary, u_color_secondary, 0.5);\n float line_str \x3d line_glow * 0.4;\n vec3 line_add \x3d color + line_color * line_str;\n vec3 line_mul \x3d color * mix(vec3(1.0), line_color, line_str);\n color \x3d mix(line_add, line_mul, is_light);\n }\n }\n }\n\n gl_FragColor \x3d vec4(color, u_opacity);\n}";var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
$APP.k(a,"__xNeuralOrbPos"),m=
|
|
35
|
-
m,c.height=h,d.viewport(0,0,m,h);g>0&&l>0&&(
|
|
31
|
+
$APP.T.g(50)+"; i++) {\n if (i \x3e\x3d u_orb_count) break;\n for (int j \x3d 0; j \x3c "+$APP.T.g(50)+"; j++) {\n if (j \x3e\x3d u_orb_count) break;\n if (j \x3c\x3d i) continue;\n\n vec2 pi_pos \x3d u_orb_positions[i];\n vec2 pj_pos \x3d u_orb_positions[j];\n\n vec2 diff_ij \x3d pi_pos - pj_pos;\n diff_ij.x *\x3d aspect;\n float orb_dist \x3d length(diff_ij);\n\n if (orb_dist \x3c u_connection_dist) {\n vec2 uv_a \x3d vec2(uv.x * aspect, uv.y);\n vec2 pa \x3d vec2(pi_pos.x * aspect, pi_pos.y);\n vec2 pb \x3d vec2(pj_pos.x * aspect, pj_pos.y);\n\n float d \x3d distToSegment(uv_a, pa, pb);\n float fade \x3d 1.0 - (orb_dist / u_connection_dist);\n float avg_phase \x3d (u_orb_phases[i] + u_orb_phases[j]) * 0.5;\n float line_pulse \x3d 0.3 + 0.7 * sin(u_time * speed + avg_phase);\n float line_glow \x3d exp(-d * d / (line_width * line_width)) * fade * line_pulse;\n line_glow *\x3d (0.3 + 0.7 * u_activity + 0.3);\n\n vec3 line_color \x3d mix(u_color_primary, u_color_secondary, 0.5);\n float line_str \x3d line_glow * 0.4;\n vec3 line_add \x3d color + line_color * line_str;\n vec3 line_mul \x3d color * mix(vec3(1.0), line_color, line_str);\n color \x3d mix(line_add, line_mul, is_light);\n }\n }\n }\n\n gl_FragColor \x3d vec4(color, u_opacity);\n}";var WF=":host{display:block;position:relative;width:100%;height:100%;min-height:200px;overflow:hidden;z-index:var("+$APP.T.g("--x-neural-glow-z-index")+",0);inset:var("+$APP.T.g("--x-neural-glow-inset")+",auto);}canvas{display:block;width:100%;height:100%;opacity:var("+$APP.T.g("--x-neural-glow-opacity")+",0.8);mix-blend-mode:var("+$APP.T.g("--x-neural-glow-blend-mode")+",normal);}@media(prefers-reduced-motion:reduce){canvas{opacity:var("+$APP.T.g("--x-neural-glow-opacity")+",0.6);}}",rF,aG=document.createElement("canvas");
|
|
32
|
+
aG.width=1;aG.height=1;rF=aG.getContext("2d");
|
|
33
|
+
var QF=function QF(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xNeuralRefs"),d=YF.g(c);if($APP.n(d)){c=OF.g(c);var e=$APP.k(a,"__xNeuralModel"),g=performance.now(),h=Math.min((g-$APP.k(a,"__xNeuralLastFrame"))/1E3,.1);a.__xNeuralLastFrame=g;qF()||(a.__xNeuralTime=$APP.k(a,"__xNeuralTime")+h);g=$APP.k(a,"__xNeuralImpulse");a.__xNeuralActivity=pF($APP.k(a,"__xNeuralActivity"),g>.01?1:0,Math.min(1,(g>.01?8:2)*h));a.__xNeuralImpulse=g*Math.max(0,1-5*h);if(!qF()){g=$APP.k(a,"__xNeuralOrbBase");var l=
|
|
34
|
+
$APP.k(a,"__xNeuralOrbPos"),m=FF.g(e);h=$APP.k(a,"__xNeuralDriftTime")+h*(.3+.7*$APP.k(a,"__xNeuralActivity"));a.__xNeuralDriftTime=h;for(var p=0;;)if(p<m){var q=g[p],v=q[0],x=q[1];q=v*3+p*1.37;var y=x*3+p*2.41;x=Math.min(1,Math.max(0,x+NF(y+100,q,h)*.08));var A=l[p];A[0]=Math.min(1,Math.max(0,v+NF(q,y,h)*.08));A[1]=x;p+=1}else break}h=Math.min(2,devicePixelRatio);g=a.clientWidth;l=a.clientHeight;m=Math.max(1,Math.floor(g*h));h=Math.max(1,Math.floor(l*h));if($APP.N(c.width,m)||$APP.N(c.height,h))c.width=
|
|
35
|
+
m,c.height=h,d.viewport(0,0,m,h);g>0&&l>0&&(PF(a,d,e),d.drawArrays(d.TRIANGLE_STRIP,0,4))}$APP.ja(a,"__xNeuralRaf",requestAnimationFrame(function(){return QF.g?QF.g(a):QF.call(null,a)}))}return null};$APP.ha("baredom.exports.x_neural_glow.init",$F);export const init=$F;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","container");d.setAttribute("role","log");d.setAttribute("aria-live","polite");b.appendChild(c);b.appendChild(d);a.__xNcRefs={root:b,container:d};return $APP.k(a,"__xNcRefs")},
|
|
4
|
-
g=g.querySelectorAll("x-alert").length-1;h=h.getAttribute("type");var l=d.detail.reason;d=d.detail.text;
|
|
5
|
-
"__xNcRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"root"),b=$APP.k(b,"dismiss"),$APP.n(b)&&c.removeEventListener("x-alert-dismiss",b,{capture:!1}));a.__xNcHandlers=null},
|
|
6
|
-
"icon"),m=$APP.k(b,"timeoutMs"),p=$APP.k(b,"dismissible");d.setAttribute("data-notification-id",e);$APP.n(g)&&d.setAttribute("type",g);$APP.n(h)&&d.setAttribute("text",h);$APP.n(l)&&d.setAttribute("icon",l);$APP.n(m)&&d.setAttribute("timeout-ms",""+$APP.T.g(m|0));p===!1&&d.setAttribute("dismissible","false");c.appendChild(d);
|
|
7
|
-
"position",{get:function(){return
|
|
8
|
-
return $APP.n(b)?$APP.k(b,"container").querySelectorAll("x-alert").length:0},enumerable:!0,configurable:!0})},
|
|
9
|
-
a.prototype.push=function(b){return
|
|
10
|
-
return null};var
|
|
11
|
-
$APP.
|
|
2
|
+
var fo=function(a){return typeof a==="string"&&$APP.I(eo,a.toLowerCase())?a.toLowerCase():"top-right"},go=function(a){if(a==null)return 5;a=parseInt(""+$APP.T.g(a),10);return typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:5},ho=function(a){var b=$APP.k(a,"__xNcRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;position:fixed;z-index:var(--x-notification-center-z-index,9999);--x-notification-center-width:360px;--x-notification-center-gap:8px;--x-notification-center-offset-x:16px;--x-notification-center-offset-y:16px;--x-notification-center-z-index:9999;pointer-events:none;}:host([data-position\x3d'top-right']){top:var(--x-notification-center-offset-y);right:var(--x-notification-center-offset-x);}:host([data-position\x3d'top-left']){top:var(--x-notification-center-offset-y);left:var(--x-notification-center-offset-x);}:host([data-position\x3d'bottom-right']){bottom:var(--x-notification-center-offset-y);right:var(--x-notification-center-offset-x);}:host([data-position\x3d'bottom-left']){bottom:var(--x-notification-center-offset-y);left:var(--x-notification-center-offset-x);}:host([data-position\x3d'top-center']){top:var(--x-notification-center-offset-y);left:50%;transform:translateX(-50%);}:host([data-position\x3d'bottom-center']){bottom:var(--x-notification-center-offset-y);left:50%;transform:translateX(-50%);}[part\x3dcontainer]{display:flex;flex-direction:column;gap:var(--x-notification-center-gap);width:var(--x-notification-center-width);pointer-events:auto;}:host([data-position\x3d'bottom-right']) [part\x3dcontainer],:host([data-position\x3d'bottom-left']) [part\x3dcontainer],:host([data-position\x3d'bottom-center']) [part\x3dcontainer]{flex-direction:column-reverse;}";
|
|
3
|
+
d.setAttribute("part","container");d.setAttribute("role","log");d.setAttribute("aria-live","polite");b.appendChild(c);b.appendChild(d);a.__xNcRefs={root:b,container:d};return $APP.k(a,"__xNcRefs")},io=function(a){var b=a.getAttribute("position");b=fo(b);a.setAttribute("data-position",b)},jo=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:$APP.Dh(c),bubbles:!0,composed:!0,cancelable:!1}))},ko=function(a){function b(d){var e=ho(a),g=$APP.k(e,"container"),h=d.target;e=h.getAttribute("data-notification-id");
|
|
4
|
+
g=g.querySelectorAll("x-alert").length-1;h=h.getAttribute("type");var l=d.detail.reason;d=d.detail.text;jo(a,"x-notification-center-dismiss",new $APP.Q(null,5,[$APP.fl,e,$APP.Z,$APP.n(h)?h:"info",$APP.Hi,$APP.n(l)?l:"",$APP.il,$APP.n(d)?d:"",$APP.Mh,g],null));g===0&&jo(a,"x-notification-center-empty",$APP.Rd);return null}var c=ho(a);$APP.k(c,"root").addEventListener("x-alert-dismiss",b,{capture:!1});$APP.ja(a,"__xNcHandlers",{dismiss:b})},lo=function(a){var b=$APP.k(a,"__xNcHandlers"),c=$APP.k(a,
|
|
5
|
+
"__xNcRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"root"),b=$APP.k(b,"dismiss"),$APP.n(b)&&c.removeEventListener("x-alert-dismiss",b,{capture:!1}));a.__xNcHandlers=null},no=function(a,b){var c=ho(a);c=$APP.k(c,"container");if(c.querySelectorAll("x-alert").length<function(){var q=$APP.k(a,"__xNcMax");return $APP.n(q)?q:5}()){var d=document.createElement("x-alert"),e=function(){var q=$APP.k(b,"id");$APP.n(q)||(q=mo.v,mo.v=q+1,q="xnc-"+$APP.T.g(q));return q}(),g=$APP.k(b,"type"),h=$APP.k(b,"text"),l=$APP.k(b,
|
|
6
|
+
"icon"),m=$APP.k(b,"timeoutMs"),p=$APP.k(b,"dismissible");d.setAttribute("data-notification-id",e);$APP.n(g)&&d.setAttribute("type",g);$APP.n(h)&&d.setAttribute("text",h);$APP.n(l)&&d.setAttribute("icon",l);$APP.n(m)&&d.setAttribute("timeout-ms",""+$APP.T.g(m|0));p===!1&&d.setAttribute("dismissible","false");c.appendChild(d);jo(a,"x-notification-center-push",new $APP.Q(null,2,[$APP.fl,e,$APP.Mh,c.querySelectorAll("x-alert").length],null));return e}return null},oo=function(a){Object.defineProperty(a,
|
|
7
|
+
"position",{get:function(){return fo(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",""+$APP.T.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"max",{get:function(){return go(this.getAttribute("max"))},set:function(b){return $APP.n(b)?this.setAttribute("max",""+$APP.T.g(b|0)):this.removeAttribute("max")},enumerable:!0,configurable:!0});Object.defineProperty(a,"count",{get:function(){var b=$APP.k(this,"__xNcRefs");
|
|
8
|
+
return $APP.n(b)?$APP.k(b,"container").querySelectorAll("x-alert").length:0},enumerable:!0,configurable:!0})},qo=function(){var a=class extends HTMLElement{};a.observedAttributes=po;a.prototype.connectedCallback=function(){ho(this);lo(this);ko(this);io(this);return null};a.prototype.disconnectedCallback=function(){lo(this);return null};a.prototype.attributeChangedCallback=function(b){$APP.C.i(b,"position")?io(this):$APP.C.i(b,"max")&&(this.__xNcMax=go(this.getAttribute("max")));return null};oo(a.prototype);
|
|
9
|
+
a.prototype.push=function(b){return no(this,b)};a.prototype.clear=function(){var b=ho(this);b=$APP.t($APP.uc($APP.k(b,"container").querySelectorAll("x-alert")));for(var c=null,d=0,e=0;;)if(e<d)c.F(null,e).remove(),e+=1;else if(b=$APP.t(b))c=b,$APP.Nc(c)?(b=$APP.yb(c),e=$APP.zb(c),c=b,d=$APP.z(b),b=e):($APP.u(c).remove(),b=$APP.w(c),c=null,d=0),e=0;else break;return null};return a},ro=function(){$APP.n(customElements.get("x-notification-center"))||customElements.define("x-notification-center",qo());
|
|
10
|
+
return null};var po=["position","max"],eo=new $APP.S(null,new $APP.Q(null,6,["top-center",null,"bottom-center",null,"top-right",null,"bottom-right",null,"top-left",null,"bottom-left",null],null),null);
|
|
11
|
+
$APP.Qd(["x-notification-center-push",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.fl,$APP.Y,$APP.Mh,$APP.W],null),$APP.Rl,!1],null),"x-notification-center-dismiss",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,5,[$APP.fl,$APP.Y,$APP.Z,$APP.Y,$APP.Hi,$APP.Y,$APP.il,$APP.Y,$APP.Mh,$APP.W],null),$APP.Rl,!1],null),"x-notification-center-empty",new $APP.Q(null,2,[$APP.V,$APP.Rd,$APP.Rl,!1],null)]);var mo={v:0};$APP.ha("baredom.exports.x_notification_center.init",ro);export const init=ro;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
p=$APP.C.i(p,"morph")&&m==null?"none":p;g=g!=null;var v=
|
|
5
|
-
var A=$APP.C.i(c,"drift");p=$APP.C.i(c,"morph");v=A?v:x;y.setAttribute("viewBox",A?"0 0 1800 120":"0 0 1200 120");a:if(x=q.length,x<e)for(x=e-x,A=0;;)if(A<x){var B=document.createElementNS("http://www.w3.org/2000/svg","path");y.appendChild(B);q.push(B);A+=1}else break a;else if(x>e)for(x-=e,A=0;;)if(A<x)B=q.pop(),y.removeChild(B),A+=1;else break a;for(y=0;;)if(y<e){x=q[y];A=$APP.
|
|
2
|
+
var UP=function(a){return typeof a==="string"&&$APP.I(TP,a)?a:"wave"},XP=function(a){return $APP.ge(function(b){return new $APP.Q(null,2,[VP,b*20,WP,b*8],null)},$APP.dg(0,a))},gQ=function(a){var b=new $APP.Q(null,7,[$APP.ak,a.getAttribute("shape"),$APP.Xi,a.getAttribute("layers"),$APP.Tg,a.getAttribute("height"),YP,a.getAttribute("flip"),ZP,a.getAttribute("mirror"),$APP.Rg,a.getAttribute("animation"),$APP.Ik,a.getAttribute("path")],null);var c=$APP.M(b),d=$APP.D(c,$APP.ak),e=$APP.D(c,$APP.Xi);b=$APP.D(c,
|
|
3
|
+
$APP.Tg);var g=$APP.D(c,YP),h=$APP.D(c,ZP),l=$APP.D(c,$APP.Rg);c=$APP.D(c,$APP.Ik);typeof c==="string"?(c=$APP.Fg(c,$P).trim(),c=$APP.N(c,"")?c:null):c=null;d=UP(d);e=typeof e==="string"?parseInt(e,10):null;var m=e==null;m||(m=isNaN(e),m=$APP.n(m)?m:e<1);e=$APP.n(m)?1:e>5?5:e;var p=typeof l==="string"&&$APP.I(aQ,l)?l:"none";l=c!=null?c:$APP.ie(bQ,new $APP.O(null,2,5,$APP.P,[UP(d),$APP.Ik],null));m=c==null?$APP.ie(bQ,new $APP.O(null,2,5,$APP.P,[UP(d),cQ],null)):null;var q=c!=null?c:$APP.D(dQ,UP(d));
|
|
4
|
+
p=$APP.C.i(p,"morph")&&m==null?"none":p;g=g!=null;var v=XP(e);h=h!=null;b=typeof b==="string"&&$APP.N("",b.trim())?b.trim():"120px";b=$APP.zf([$APP.Ik,$APP.Ij,$APP.Rg,YP,eQ,cQ,$APP.ak,$APP.Xi,ZP,$APP.Tg,fQ],[c,l,p,g,v,m,d,e,h,b,q]);e=$APP.M(b);b=$APP.D(e,ZP);h=$APP.D(e,$APP.Tg);v=$APP.D(e,fQ);var x=$APP.D(e,$APP.Ij);c=$APP.D(e,$APP.Rg);g=$APP.D(e,YP);d=$APP.D(e,eQ);l=$APP.D(e,cQ);e=$APP.D(e,$APP.Xi);m=$APP.k(a,"__xOrganicDividerBase");var y=$APP.k(a,"__xOrganicDividerSvg");q=$APP.k(a,"__xOrganicDividerPaths");
|
|
5
|
+
var A=$APP.C.i(c,"drift");p=$APP.C.i(c,"morph");v=A?v:x;y.setAttribute("viewBox",A?"0 0 1800 120":"0 0 1200 120");a:if(x=q.length,x<e)for(x=e-x,A=0;;)if(A<x){var B=document.createElementNS("http://www.w3.org/2000/svg","path");y.appendChild(B);q.push(B);A+=1}else break a;else if(x>e)for(x-=e,A=0;;)if(A<x)B=q.pop(),y.removeChild(B),A+=1;else break a;for(y=0;;)if(y<e){x=q[y];A=$APP.pc(d,y);B=$APP.M(A);A=$APP.D(B,VP);B=$APP.D(B,WP);var E=y+1;x.setAttribute("d",v);x.setAttribute("fill","var(--x-organic-divider-color-"+
|
|
6
6
|
$APP.T.g(E)+")");x.setAttribute("opacity",""+$APP.T.g(e<=1?1:.3+y/(e-1)*.7));A>0||B>0?x.setAttribute("transform","translate("+$APP.T.g(A)+","+$APP.T.g(B)+")"):x.removeAttribute("transform");p&&(x.style.setProperty("--x-organic-divider-d",'path("'+$APP.T.g(v)+'")'),$APP.n(l)&&x.style.setProperty("--x-organic-divider-d-alt",'path("'+$APP.T.g(l)+'")'));p||(x.style.removeProperty("--x-organic-divider-d"),x.style.removeProperty("--x-organic-divider-d-alt"));y+=1}else break;m.style.setProperty("height",
|
|
7
|
-
h);$APP.n(g)?a.setAttribute("data-flip",""):a.removeAttribute("data-flip");$APP.n(b)?a.setAttribute("data-mirror",""):a.removeAttribute("data-mirror");$APP.N(c,"none")?a.setAttribute("data-animation",c):a.removeAttribute("data-animation")},
|
|
7
|
+
h);$APP.n(g)?a.setAttribute("data-flip",""):a.removeAttribute("data-flip");$APP.n(b)?a.setAttribute("data-mirror",""):a.removeAttribute("data-mirror");$APP.N(c,"none")?a.setAttribute("data-animation",c):a.removeAttribute("data-animation")},hQ=function(a){Object.defineProperty(a,"shape",{get:function(){var b=this.getAttribute("shape");return $APP.n(b)?b:"wave"},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("shape",b):this.removeAttribute("shape")},enumerable:!0,configurable:!0});
|
|
8
8
|
Object.defineProperty(a,"layers",{get:function(){var b=this.getAttribute("layers");return $APP.n(b)?b:"1"},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("layers",b):this.removeAttribute("layers")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.n(b)?b:"120px"},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,
|
|
9
9
|
configurable:!0});Object.defineProperty(a,"flip",{get:function(){return this.hasAttribute("flip")},set:function(b){return $APP.n(b)?this.setAttribute("flip",""):this.removeAttribute("flip")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mirror",{get:function(){return this.hasAttribute("mirror")},set:function(b){return $APP.n(b)?this.setAttribute("mirror",""):this.removeAttribute("mirror")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");
|
|
10
|
-
return $APP.n(b)?b:"none"},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0})},
|
|
10
|
+
return $APP.n(b)?b:"none"},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},set:function(b){return typeof b==="string"&&$APP.N("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0})},jQ=function(){var a=class extends HTMLElement{};a.observedAttributes=iQ;a.prototype.connectedCallback=
|
|
11
11
|
function(){if(!$APP.n($APP.k(this,"__xOrganicDividerInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;line-height:0;font-size:0;overflow:hidden;--x-organic-divider-color:var(--x-color-primary,#6366f1);--x-organic-divider-color-1:color-mix(in srgb,var(--x-organic-divider-color) 15%,transparent);--x-organic-divider-color-2:color-mix(in srgb,var(--x-organic-divider-color) 25%,transparent);--x-organic-divider-color-3:color-mix(in srgb,var(--x-organic-divider-color) 40%,transparent);--x-organic-divider-color-4:color-mix(in srgb,var(--x-organic-divider-color) 60%,transparent);--x-organic-divider-color-5:color-mix(in srgb,var(--x-organic-divider-color) 85%,transparent);--x-organic-divider-height:120px;--x-organic-divider-animate-duration:6s;--x-organic-divider-animate-timing:ease-in-out;}@media (prefers-color-scheme:dark){:host{--x-organic-divider-color:var(--x-color-primary,#818cf8);}}[part\x3dbase]{width:100%;position:relative;overflow:hidden;}[part\x3dbase] svg{display:block;width:100%;height:100%;}:host([data-flip]) [part\x3dbase]{transform:scaleY(-1);}:host([data-mirror]) [part\x3dbase]{transform:scaleX(-1);}:host([data-flip][data-mirror]) [part\x3dbase]{transform:scaleX(-1) scaleY(-1);}@keyframes x-organic-divider-drift{0%{transform:translateX(0);}100%{transform:translateX(-33.333%);}}:host([data-animation\x3ddrift]) [part\x3dbase] svg{width:150%;animation:x-organic-divider-drift var(--x-organic-divider-animate-duration) linear infinite;}@keyframes x-organic-divider-morph{0%,100%{d:var(--x-organic-divider-d);}50%{d:var(--x-organic-divider-d-alt);}}:host([data-animation\x3dmorph]) [part\x3dbase] path{animation:x-organic-divider-morph var(--x-organic-divider-animate-duration) var(--x-organic-divider-animate-timing) infinite;}@media (prefers-reduced-motion:reduce){:host([data-animation]) [part\x3dbase] svg,:host([data-animation]) [part\x3dbase] path{animation:none;}}";
|
|
12
|
-
d.setAttribute("part","base");e.setAttribute("xmlns","http://www.w3.org/2000/svg");e.setAttribute("preserveAspectRatio","none");e.setAttribute("aria-hidden","true");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.setAttribute("role","presentation");this.setAttribute("aria-hidden","true");this.__xOrganicDividerBase=d;this.__xOrganicDividerSvg=e;this.__xOrganicDividerPaths=[];this.__xOrganicDividerInit=!0}
|
|
13
|
-
function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xOrganicDividerInit"))&&
|
|
14
|
-
"y-offset","y-offset",-1716542),
|
|
15
|
-
null),"waves",new $APP.
|
|
16
|
-
null),"mountain",new $APP.
|
|
17
|
-
|
|
18
|
-
[$APP.
|
|
19
|
-
|
|
20
|
-
null);$APP.
|
|
12
|
+
d.setAttribute("part","base");e.setAttribute("xmlns","http://www.w3.org/2000/svg");e.setAttribute("preserveAspectRatio","none");e.setAttribute("aria-hidden","true");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.setAttribute("role","presentation");this.setAttribute("aria-hidden","true");this.__xOrganicDividerBase=d;this.__xOrganicDividerSvg=e;this.__xOrganicDividerPaths=[];this.__xOrganicDividerInit=!0}gQ(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=
|
|
13
|
+
function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xOrganicDividerInit"))&&gQ(this);return null};hQ(a.prototype);return a},kQ=function(){$APP.n(customElements.get("x-organic-divider"))||customElements.define("x-organic-divider",jQ());return null},$P=/[^MmLlHhVvCcSsQqTtAaZz0-9\s,.\-+eE]/,YP=new $APP.K(null,"flip","flip",2033871302),eQ=new $APP.K(null,"transforms","transforms",793344554),VP=new $APP.K(null,"x-offset","x-offset",-1499732449),cQ=new $APP.K(null,"path-alt","path-alt",1724994068),WP=new $APP.K(null,
|
|
14
|
+
"y-offset","y-offset",-1716542),fQ=new $APP.K(null,"drift-d","drift-d",-1241526977),ZP=new $APP.K(null,"mirror","mirror",1914600218);var iQ="shape layers height flip mirror animation path".split(" "),aQ=new $APP.S(null,new $APP.Q(null,3,["none",null,"drift",null,"morph",null],null),null),TP=new $APP.S(null,new $APP.Q(null,8,["drip",null,"cloud",null,"scallop",null,"waves",null,"mountain",null,"slant",null,"blob-edge",null,"wave",null],null),null),bQ=new $APP.Q(null,8,["wave",new $APP.Q(null,2,[$APP.Ik,"M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 L1200,120 L0,120 Z",cQ,"M0,45 C200,85 400,15 600,55 C800,90 1000,10 1200,50 L1200,120 L0,120 Z"],
|
|
15
|
+
null),"waves",new $APP.Q(null,2,[$APP.Ik,"M0,40 C150,80 300,0 450,40 C600,80 750,10 900,50 C1050,90 1150,30 1200,50 L1200,120 L0,120 Z",cQ,"M0,55 C150,15 300,85 450,50 C600,10 750,80 900,35 C1050,5 1150,75 1200,40 L1200,120 L0,120 Z"],null),"blob-edge",new $APP.Q(null,2,[$APP.Ik,"M0,50 C80,30 160,70 240,45 C320,20 400,80 500,55 C600,30 680,75 780,40 C880,5 960,65 1060,50 C1120,40 1180,60 1200,45 L1200,120 L0,120 Z",cQ,"M0,40 C80,65 160,25 240,60 C320,80 400,20 500,45 C600,70 680,15 780,55 C880,75 960,10 1060,35 C1120,55 1180,30 1200,55 L1200,120 L0,120 Z"],
|
|
16
|
+
null),"mountain",new $APP.Q(null,2,[$APP.Ik,"M0,90 C100,90 200,30 350,30 C500,30 450,85 600,85 C750,85 700,15 850,15 C1000,15 950,80 1100,80 C1150,80 1200,60 1200,60 L1200,120 L0,120 Z",cQ,"M0,80 C100,80 200,45 350,45 C500,45 450,75 600,75 C750,75 700,30 850,30 C1000,30 950,70 1100,70 C1150,70 1200,50 1200,50 L1200,120 L0,120 Z"],null),"drip",new $APP.Q(null,2,[$APP.Ik,"M0,20 C50,20 100,20 150,20 C175,20 185,60 200,80 C215,100 225,100 240,80 C255,60 265,20 290,20 L450,20 C475,20 485,50 500,70 C515,90 525,90 540,70 C555,50 565,20 590,20 L800,20 C825,20 835,70 850,90 C865,110 875,110 890,90 C905,70 915,20 940,20 L1200,20 L1200,120 L0,120 Z",
|
|
17
|
+
cQ,"M0,20 C50,20 100,20 170,20 C195,20 205,55 220,72 C235,90 245,90 260,72 C275,55 285,20 310,20 L470,20 C495,20 505,45 520,62 C535,80 545,80 560,62 C575,45 585,20 610,20 L820,20 C845,20 855,65 870,85 C885,105 895,105 910,85 C925,65 935,20 960,20 L1200,20 L1200,120 L0,120 Z"],null),"slant",new $APP.Q(null,2,[$APP.Ik,"M0,100 C300,90 600,30 900,10 C1000,5 1100,2 1200,0 L1200,120 L0,120 Z",cQ,"M0,80 C300,70 600,50 900,30 C1000,20 1100,10 1200,20 L1200,120 L0,120 Z"],null),"scallop",new $APP.Q(null,2,
|
|
18
|
+
[$APP.Ik,"M0,60 Q75,0 150,60 Q225,120 300,60 Q375,0 450,60 Q525,120 600,60 Q675,0 750,60 Q825,120 900,60 Q975,0 1050,60 Q1125,120 1200,60 L1200,120 L0,120 Z",cQ,"M0,50 Q75,110 150,50 Q225,-10 300,50 Q375,110 450,50 Q525,-10 600,50 Q675,110 750,50 Q825,-10 900,50 Q975,110 1050,50 Q1125,-10 1200,50 L1200,120 L0,120 Z"],null),"cloud",new $APP.Q(null,2,[$APP.Ik,"M0,80 C50,80 80,40 140,40 C180,40 200,60 220,60 C240,60 260,20 320,20 C380,20 400,50 440,50 C480,50 500,10 560,10 C620,10 640,40 700,40 C760,40 780,25 840,25 C900,25 920,55 960,55 C1000,55 1040,30 1100,30 C1140,30 1180,60 1200,60 L1200,120 L0,120 Z",
|
|
19
|
+
cQ,"M0,70 C50,70 80,50 140,50 C180,50 200,70 220,70 C240,70 260,30 320,30 C380,30 400,60 440,60 C480,60 500,20 560,20 C620,20 640,50 700,50 C760,50 780,35 840,35 C900,35 920,65 960,65 C1000,65 1040,40 1100,40 C1140,40 1180,70 1200,70 L1200,120 L0,120 Z"],null)],null),dQ=new $APP.Q(null,8,"wave;M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 C1400,20 1600,100 1800,60 L1800,120 L0,120 Z;waves;M0,40 C150,80 300,0 450,40 C600,80 750,10 900,50 C1050,90 1150,30 1200,50 C1350,80 1500,0 1650,40 C1800,80 1800,50 1800,50 L1800,120 L0,120 Z;blob-edge;M0,50 C80,30 160,70 240,45 C320,20 400,80 500,55 C600,30 680,75 780,40 C880,5 960,65 1060,50 C1120,40 1180,60 1200,45 C1280,30 1360,70 1440,45 C1520,20 1600,80 1700,55 C1800,30 1800,50 1800,50 L1800,120 L0,120 Z;mountain;M0,90 C100,90 200,30 350,30 C500,30 450,85 600,85 C750,85 700,15 850,15 C1000,15 950,80 1100,80 C1150,80 1200,60 1300,60 C1400,60 1400,30 1500,30 C1600,30 1550,80 1700,80 C1750,80 1800,60 1800,60 L1800,120 L0,120 Z;drip;M0,20 C50,20 100,20 150,20 C175,20 185,60 200,80 C215,100 225,100 240,80 C255,60 265,20 290,20 L450,20 C475,20 485,50 500,70 C515,90 525,90 540,70 C555,50 565,20 590,20 L800,20 C825,20 835,70 850,90 C865,110 875,110 890,90 C905,70 915,20 940,20 L1200,20 C1225,20 1235,60 1250,80 C1265,100 1275,100 1290,80 C1305,60 1315,20 1340,20 L1500,20 C1525,20 1535,50 1550,70 C1565,90 1575,90 1590,70 C1605,50 1615,20 1640,20 L1800,20 L1800,120 L0,120 Z;slant;M0,100 C300,90 600,30 900,10 C1000,5 1100,2 1200,0 C1300,2 1500,90 1800,100 L1800,120 L0,120 Z;scallop;M0,60 Q75,0 150,60 Q225,120 300,60 Q375,0 450,60 Q525,120 600,60 Q675,0 750,60 Q825,120 900,60 Q975,0 1050,60 Q1125,120 1200,60 Q1275,0 1350,60 Q1425,120 1500,60 Q1575,0 1650,60 Q1725,120 1800,60 L1800,120 L0,120 Z;cloud;M0,80 C50,80 80,40 140,40 C180,40 200,60 220,60 C240,60 260,20 320,20 C380,20 400,50 440,50 C480,50 500,10 560,10 C620,10 640,40 700,40 C760,40 780,25 840,25 C900,25 920,55 960,55 C1000,55 1040,30 1100,30 C1140,30 1180,60 1200,60 C1240,60 1260,20 1320,20 C1380,20 1400,50 1440,50 C1480,50 1500,10 1560,10 C1620,10 1640,40 1700,40 C1760,40 1780,60 1800,60 L1800,120 L0,120 Z".split(";"),
|
|
20
|
+
null);$APP.ha("baredom.exports.x_organic_divider.init",kQ);export const init=kQ;
|