@vanelsas/baredom 1.2.0 → 1.4.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 +29 -0
- package/README.md +7 -5
- package/dist/base.js +397 -362
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +6 -0
- package/dist/x-bento-item.js +5 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +48 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +12 -12
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +19 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- package/dist/x-drawer.js +12 -12
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +29 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +40 -0
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +10 -10
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -36
- package/dist/x-scroll-timeline.js +50 -50
- package/dist/x-scroll.js +41 -41
- 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.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +22 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +15 -0
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +22 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +24 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +50 -2
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
if(1<$APP.B(a))a:{for(;;)if(""===(a==null?null:$APP.
|
|
4
|
-
A:""}()),k=
|
|
5
|
-
2,[$APP.
|
|
6
|
-
$APP.
|
|
7
|
-
|
|
8
|
-
$APP.l(a,"__xCommandPaletteRefs");if($APP.
|
|
9
|
-
"");d=$APP.
|
|
10
|
-
""+$APP.S.g(g));p.setAttribute("tabindex","-1");$APP.
|
|
11
|
-
"overlay");b=$APP.l(b,"empty");var h=$APP.
|
|
12
|
-
b.textContent=m;return
|
|
13
|
-
b=$APP.l(a,"__xCommandPaletteRefs"),b=$APP.
|
|
14
|
-
0):(b=$APP.B(c),c=
|
|
15
|
-
b=$APP.
|
|
16
|
-
"");a.__xCommandPaletteQuery="";a.__xCommandPaletteActiveIdx=0
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
$APP.l(b,"input"),d=$APP.l(b,"overlay"),e=$APP.l(b,"list");b=$APP.l(b,"clear-btn");c.removeEventListener("input",$APP.l(a,"input"));c.removeEventListener("keydown",$APP.l(a,"keydown"));d.removeEventListener("click",$APP.l(a,"scrim"));e.removeEventListener("click",$APP.l(a,"list"));return b.removeEventListener("click",$APP.l(a,"clear"))}return null},
|
|
20
|
-
this.setAttribute(c,""):this.removeAttribute(c)}})},
|
|
21
|
-
Object.defineProperty(a,"toggle",{configurable:!0,writable:!0,value:function(){return $APP.
|
|
22
|
-
|
|
2
|
+
var Us=function(a){if(a!=null&&a.ua!=null)a=a.ua(a);else{var b=Us[$APP.ea(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=Us._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.qa("IStack.-pop",a);}return a},Vs=function(a,b){return $APP.Ed($APP.Zc(function(c,d){return $APP.r(a.g?a.g(d):a.call(null,d))?$APP.rb(c,d):c},$APP.qb($APP.ie),b))},Ws=function(a){var b=/\s+/;a="/(?:)/"===""+$APP.S.g(b)?$APP.od.i($APP.Be($APP.rd("",$APP.de.i($APP.S,$APP.u(a)))),""):$APP.Be((""+$APP.S.g(a)).split(b));
|
|
3
|
+
if(1<$APP.B(a))a:{for(;;)if(""===(a==null?null:$APP.Sa(a)))a=a==null?null:Us(a);else break a;a=void 0}return a},Xs=function(a){return a==null?!0:$APP.O(a,"false")},Ys=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},at=function(a){if(a==null||$APP.t($APP.oa(a)))return $APP.ie;for(var b=a.length,c=0,d=$APP.qb($APP.ie);;){if($APP.D.i(c,b))return $APP.sb(d);var e=a[c],g=""+$APP.S.g(function(){var A=e.id;return $APP.r(A)?A:c}()),h=""+$APP.S.g(function(){var A=e.label;return $APP.r(A)?
|
|
4
|
+
A:""}()),k=Ys(e.group),m=e.value,p=e.icon,q=$APP.D.i(!0,e.disabled),w=e.keywords;w=$APP.r($APP.oa(w))?w.join(" "):typeof w==="string"?w:"";var x=function(){var A=k;return $APP.r(A)?A:""}(),y=typeof m==="string"?m:"";x=(""+$APP.S.g(h)+" "+$APP.S.g(w)+" "+$APP.S.g(x)+" "+$APP.S.g(y)).toLowerCase();w=c+1;d=$APP.Fd(d,new $APP.P(null,7,[$APP.Dk,g,$APP.T,h,Zs,k,$APP.ui,m,$APP.Wj,p,$APP.W,q,$s,x],null));c=w}},ct=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.O(b,"")?$APP.$d(Ys,Ws(b)):null;if($APP.Jc(c))return new $APP.P(null,
|
|
5
|
+
2,[$APP.Pk,a,bt,$APP.af.i($APP.Xf,$APP.$d(Zs,a))],null);a=Vs(function(d){return $APP.Vd(function(e){return $APP.O(-1,$s.g(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.P(null,2,[$APP.Pk,a,bt,$APP.af.i($APP.Xf,$APP.$d(Zs,a))],null)},dt=function(a,b,c){var d=$APP.B(a);if(d>0)for(var e=1;;)if(e<=d){var g=$APP.hd(b+e*c,d),h=$APP.Cc(a,g,null),k=h;h=$APP.r(k)?$APP.t($APP.W.g(h)):k;if($APP.r(h))return g;e+=1}else return null;else return null},qt=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.ai);var c=
|
|
6
|
+
$APP.G(b,$APP.ii),d=$APP.G(b,$APP.Oh),e=$APP.G(b,et),g=$APP.G(b,ft),h=$APP.G(b,gt),k=$APP.G(b,ht),m=$APP.G(b,it),p=$APP.G(b,jt);b=$APP.G(b,kt);b=Xs(b);p=Xs(p);m=m!=null&&$APP.O(m,"false");m=b&&!m;g=g!=null?g!=null&&$APP.O(g,"false"):m;k=Xs(k);return $APP.Q([$APP.rl,$APP.hi,lt,mt,nt,ot,$APP.T,$APP.Dl,pt,$APP.W],[function(){var q=Ys(c);return $APP.r(q)?q:"Search…"}(),p,function(){var q=Ys(e);return $APP.r(q)?q:"No results"}(),g,k,m,Ys(d),$APP.I(a),b,h!=null&&$APP.O(h,"false")])},rt=function(a){return document.createElement(a)},
|
|
7
|
+
st=function(a){return qt($APP.Q([$APP.Oh,et,ft,gt,ht,it,jt,kt,$APP.ai,$APP.ii],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},tt=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:$APP.I(c)});a.dispatchEvent(b);return b},ut=function(a){var b=
|
|
8
|
+
$APP.l(a,"__xCommandPaletteRefs");if($APP.r(b)){var c=$APP.l(b,"list"),d=$APP.l(b,"empty");b=$APP.l(b,"input");var e=function(){var q=$APP.l(a,"__xCommandPaletteQuery");return $APP.r(q)?q:""}(),g=at($APP.l(a,"__xCommandPaletteItems"));e=ct(g,e);e=$APP.N(e);g=$APP.G(e,$APP.Pk);e=function(){var q=$APP.l(a,"__xCommandPaletteActiveIdx");return $APP.r(q)?q:0}();c.textContent="";if($APP.Jc(g))return d.removeAttribute("hidden"),$APP.r(b)?b.removeAttribute("aria-activedescendant"):null;d.setAttribute("hidden",
|
|
9
|
+
"");d=$APP.Zd($APP.ch,g);for(var h=null;;)if(g=$APP.v(d),$APP.r(g)){var k=g;g=$APP.Cc(k,0,null);k=$APP.Cc(k,1,null);var m=Zs.g(k);if($APP.r(function(){var q=m;return $APP.r(q)?$APP.O(m,h):q}())){var p=rt("div");p.setAttribute("part","group-header");p.setAttribute("aria-hidden","true");p.textContent=m;c.appendChild(p)}p=rt("div");p.setAttribute("part","item");p.setAttribute("role","option");p.setAttribute("id","x-cp-item-"+$APP.S.g(g));p.setAttribute("data-id",""+$APP.S.g($APP.Dk.g(k)));p.setAttribute("data-idx",
|
|
10
|
+
""+$APP.S.g(g));p.setAttribute("tabindex","-1");$APP.r($APP.W.g(k))&&p.setAttribute("aria-disabled","true");p.textContent=$APP.T.g(k);$APP.D.i(g,e)&&p.setAttribute("aria-selected","true");c.appendChild(p);d=$APP.Zb(d);h=g=function(){var q=m;return $APP.r(q)?q:h}()}else break;return $APP.r(b)?b.setAttribute("aria-activedescendant","x-cp-item-"+$APP.S.g(e)):null}return null},vt=function(a){var b=$APP.l(a,"__xCommandPaletteRefs");if($APP.r(b)){var c=st(a),d=$APP.l(b,"panel"),e=$APP.l(b,"input"),g=$APP.l(b,
|
|
11
|
+
"overlay");b=$APP.l(b,"empty");var h=$APP.T.g(c),k=$APP.rl.g(c),m=lt.g(c);$APP.r(h)?d.setAttribute("aria-label",h):d.setAttribute("aria-label","Command palette");$APP.r(ot.g(c))?g.removeAttribute("hidden"):g.setAttribute("hidden","");e.setAttribute("placeholder",k);e.setAttribute("aria-expanded",$APP.r($APP.Dl.g(c))?"true":"false");$APP.r($APP.W.g(c))&&(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true"));$APP.r($APP.W.g(c))||(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"));
|
|
12
|
+
b.textContent=m;return ut(a)}return null},wt=function(a){if($APP.r(a.hasAttribute("open")))return null;var b=tt(a,"x-command-palette-open-request",!0,{});$APP.r(b.defaultPrevented)?a=null:(a.setAttribute("open",""),b=$APP.l(a,"__xCommandPaletteRefs"),b=$APP.r(b)?$APP.l(b,"input"):null,$APP.r(b)&&b.focus(),vt(a),a=tt(a,"x-command-palette-open",!1,{}));return a},xt=function(a){if($APP.r(a.hasAttribute("open"))){var b=tt(a,"x-command-palette-close-request",!0,{});$APP.r(b.defaultPrevented)?a=null:(a.removeAttribute("open"),
|
|
13
|
+
b=$APP.l(a,"__xCommandPaletteRefs"),b=$APP.r(b)?$APP.l(b,"input"):null,$APP.r(b)&&b.removeAttribute("aria-activedescendant"),vt(a),a=tt(a,"x-command-palette-close",!1,{}));return a}return null},yt=function(a){var b=$APP.l(a,"__xCommandPaletteQuery");b=$APP.r(b)?b:"";a=at($APP.l(a,"__xCommandPaletteItems"));a=ct(a,b);a=$APP.N(a);return $APP.G(a,$APP.Pk)},At=function(a,b){var c=yt(a);var d=$APP.l(a,"__xCommandPaletteActiveIdx");d=$APP.r(d)?d:0;$APP.D.i(b,zt)?(c=dt(c,$APP.r(d)?d:-1,1),c=$APP.r(c)?c:
|
|
14
|
+
0):(b=$APP.B(c),c=dt(c,$APP.r(d)?d:b,-1),c=$APP.r(c)?c:0);a.__xCommandPaletteActiveIdx=c;ut(a);a=$APP.l(a,"__xCommandPaletteRefs");a=$APP.r(a)?$APP.l(a,"list"):null;a=$APP.r(a)?a.querySelector("[data-idx\x3d'"+$APP.S.g(c)+"']"):null;return $APP.r(a)?a.scrollIntoView({block:"nearest"}):null},Ct=function(a,b){var c=b.key;return $APP.D.i(c,"ArrowDown")?(b.preventDefault(),At(a,zt)):$APP.D.i(c,"ArrowUp")?(b.preventDefault(),At(a,Bt)):$APP.D.i(c,"Enter")?(b.preventDefault(),b=yt(a),c=$APP.l(a,"__xCommandPaletteActiveIdx"),
|
|
15
|
+
b=$APP.Cc(b,$APP.r(c)?c:0,null),$APP.r($APP.r(b)?$APP.t($APP.W.g(b)):b)?(c=tt(a,"x-command-palette-select-request",!0,{item:$APP.nh(b)}),$APP.r(c.defaultPrevented)?a=null:(tt(a,"x-command-palette-select",!1,{item:$APP.nh(b)}),a=xt(a))):a=null,a):$APP.D.i(c,"Escape")?(b=st(a),$APP.r(nt.g(b))?xt(a):null):null},Dt=function(a){function b(){var q=$APP.l(a,"__xCommandPaletteRefs"),w=$APP.r(q)?$APP.l(q,"input"):null;q=$APP.r(q)?$APP.l(q,"clear-btn"):null;$APP.r(w)&&(w.value="");$APP.r(q)&&q.setAttribute("hidden",
|
|
16
|
+
"");a.__xCommandPaletteQuery="";a.__xCommandPaletteActiveIdx=0;tt(a,"x-command-palette-query-change",!1,{query:""});ut(a);return $APP.r(w)?w.focus():null}function c(q){a:{q=q.target.closest("[part\x3ditem]");if($APP.r(q)){q=parseInt(q.getAttribute("data-idx"),10);var w=yt(a);q=$APP.Cc(w,q,null);if($APP.r($APP.r(q)?$APP.t($APP.W.g(q)):q)){w=tt(a,"x-command-palette-select-request",!0,{item:$APP.nh(q)});if($APP.r(w.defaultPrevented)){q=null;break a}tt(a,"x-command-palette-select",!1,{item:$APP.nh(q)});
|
|
17
|
+
q=xt(a);break a}}q=null}return q}function d(){var q=st(a);return $APP.r(mt.g(q))?xt(a):null}function e(q){return Ct(a,q)}function g(){var q=$APP.l(a,"__xCommandPaletteRefs"),w=$APP.r(q)?$APP.l(q,"input"):null;q=$APP.r(q)?$APP.l(q,"clear-btn"):null;w=$APP.r(w)?w.value:null;a.__xCommandPaletteQuery=$APP.r(w)?w:"";a.__xCommandPaletteActiveIdx=0;$APP.r(q)&&($APP.r($APP.r(w)?$APP.O(w,""):w)?q.removeAttribute("hidden"):q.setAttribute("hidden",""));tt(a,"x-command-palette-query-change",!1,{query:$APP.r(w)?
|
|
18
|
+
w:""});return ut(a)}var h=$APP.l(a,"__xCommandPaletteRefs"),k=$APP.l(h,"input"),m=$APP.l(h,"overlay"),p=$APP.l(h,"list");h=$APP.l(h,"clear-btn");k.addEventListener("input",g);k.addEventListener("keydown",e);m.addEventListener("click",d);p.addEventListener("click",c);h.addEventListener("click",b);$APP.n(a,"__xCommandPaletteHandlers",{input:g,keydown:e,scrim:d,list:c,clear:b})},Et=function(a){var b=$APP.l(a,"__xCommandPaletteRefs");a=$APP.l(a,"__xCommandPaletteHandlers");if($APP.r($APP.r(b)?a:b)){var c=
|
|
19
|
+
$APP.l(b,"input"),d=$APP.l(b,"overlay"),e=$APP.l(b,"list");b=$APP.l(b,"clear-btn");c.removeEventListener("input",$APP.l(a,"input"));c.removeEventListener("keydown",$APP.l(a,"keydown"));d.removeEventListener("click",$APP.l(a,"scrim"));e.removeEventListener("click",$APP.l(a,"list"));return b.removeEventListener("click",$APP.l(a,"clear"))}return null},Ft=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.r(d)?
|
|
20
|
+
this.setAttribute(c,""):this.removeAttribute(c)}})},Gt=function(a){Object.defineProperty(a,"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xCommandPaletteItems");return $APP.r(b)?b:[]},set:function(b){this.__xCommandPaletteItems=b;this.__xCommandPaletteActiveIdx=0;return ut(this)}})},Ht=function(a){Object.defineProperty(a,"open",{configurable:!0,writable:!0,value:function(){return wt(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return xt(this)}});
|
|
21
|
+
Object.defineProperty(a,"toggle",{configurable:!0,writable:!0,value:function(){return $APP.r(this.hasAttribute("open"))?xt(this):wt(this)}})},Jt=function(){var a=class extends HTMLElement{};a.observedAttributes=It;var b=a.prototype;Ft(b,"open","open");Ft(b,"disabled","disabled");Gt(b);Ht(b);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xCommandPaletteRefs"))){var c=this.attachShadow({mode:"open"}),d=rt("style"),e=rt("div"),g=rt("div"),h=rt("div"),k=rt("span"),m=rt("input"),p=rt("button"),
|
|
22
|
+
q=rt("div"),w=rt("div"),x=rt("div");d.textContent=":host{display:contents;}[part\x3doverlay]{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:var(--x-command-palette-z,800);}[part\x3dpanel]{display:none;position:fixed;top:20vh;left:50%;transform:translateX(-50%);width:var(--x-command-palette-width,560px);max-height:60vh;z-index:calc(var(--x-command-palette-z,800) + 1);flex-direction:column;border-radius:var(--x-command-palette-radius,12px);background:var(--x-command-palette-bg,#fff);box-shadow:0 20px 60px rgba(0,0,0,0.25),0 4px 16px rgba(0,0,0,0.12);overflow:hidden;}:host([open]) [part\x3doverlay]{display:block;}:host([open]) [part\x3dpanel]{display:flex;}[part\x3dsearch-wrap]{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--x-command-palette-divider,rgba(0,0,0,0.08));}[part\x3dsearch-icon]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;color:var(--x-command-palette-icon-color,#64748b);}[part\x3dinput]{flex:1;border:none;outline:none;background:transparent;font-size:1rem;line-height:1.5;color:var(--x-command-palette-text,inherit);}[part\x3dinput]::placeholder{color:var(--x-command-palette-placeholder,#94a3b8);}[part\x3dclear-btn]{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;color:var(--x-command-palette-icon-color,#64748b);}[part\x3dclear-btn]:focus-visible{outline:2px solid var(--x-command-palette-focus-ring,#60a5fa);}[part\x3dclear-btn][hidden]{display:none;}[part\x3dlist-wrap]{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 0;}[part\x3dlist]{display:flex;flex-direction:column;}[part\x3ditem]{padding:10px 16px;cursor:default;font-size:0.9375rem;line-height:1.4;color:var(--x-command-palette-item-text,inherit);border-radius:0;outline:none;}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,#f1f5f9);}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#e0e7ff);color:var(--x-command-palette-item-active-text,#3730a3);}[part\x3ditem][aria-disabled\x3dtrue]{opacity:0.45;cursor:default;pointer-events:none;}[part\x3dgroup-header]{padding:8px 16px 4px;font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;color:var(--x-command-palette-group-text,#94a3b8);}[part\x3dempty]{padding:32px 16px;text-align:center;color:var(--x-command-palette-empty-text,#94a3b8);font-size:0.9375rem;}[part\x3dempty][hidden]{display:none;}@media (prefers-color-scheme:dark){[part\x3dpanel]{background:var(--x-command-palette-bg,#1e293b);box-shadow:0 20px 60px rgba(0,0,0,0.6),0 4px 16px rgba(0,0,0,0.4);}[part\x3dsearch-wrap]{border-bottom-color:var(--x-command-palette-divider,rgba(255,255,255,0.08));}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,#334155);}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#312e81);color:var(--x-command-palette-item-active-text,#c7d2fe);}}@media (prefers-reduced-motion:reduce){[part\x3dpanel],[part\x3doverlay]{transition:none;}}";
|
|
23
23
|
e.setAttribute("part","overlay");g.setAttribute("part","panel");g.setAttribute("role","dialog");g.setAttribute("aria-modal","true");h.setAttribute("part","search-wrap");k.setAttribute("part","search-icon");k.setAttribute("aria-hidden","true");k.textContent="\ud83d\udd0d";m.setAttribute("part","input");m.setAttribute("type","search");m.setAttribute("role","combobox");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("spellcheck","false");m.setAttribute("aria-autocomplete",
|
|
24
|
-
"list");m.setAttribute("aria-expanded","false");m.setAttribute("aria-controls","x-cp-list");p.setAttribute("part","clear-btn");p.setAttribute("type","button");p.setAttribute("aria-label","Clear");p.setAttribute("hidden","");
|
|
25
|
-
|
|
26
|
-
a.
|
|
27
|
-
$APP
|
|
28
|
-
$APP.
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
"disabled-raw",
|
|
32
|
-
$APP.
|
|
33
|
-
|
|
24
|
+
"list");m.setAttribute("aria-expanded","false");m.setAttribute("aria-controls","x-cp-list");p.setAttribute("part","clear-btn");p.setAttribute("type","button");p.setAttribute("aria-label","Clear");p.setAttribute("hidden","");q.setAttribute("part","list-wrap");w.setAttribute("part","list");w.setAttribute("id","x-cp-list");w.setAttribute("role","listbox");w.setAttribute("aria-label","Results");x.setAttribute("part","empty");x.setAttribute("hidden","");h.appendChild(k);h.appendChild(m);h.appendChild(p);
|
|
25
|
+
q.appendChild(w);q.appendChild(x);g.appendChild(h);g.appendChild(q);c.appendChild(d);c.appendChild(e);c.appendChild(g);this.__xCommandPaletteRefs={overlay:e,panel:g,input:m,"clear-btn":p,list:w,empty:x}}Et(this);Dt(this);return vt(this)};b.disconnectedCallback=function(){return Et(this)};b.attributeChangedCallback=function(){return vt(this)};return a},Kt=function(){return $APP.r(customElements.get("x-command-palette"))?null:customElements.define("x-command-palette",Jt())},Lt=function Lt(a,b,c){var e=
|
|
26
|
+
a.l-2>>>b&31;if(b>5){b-=5;var g=c.j[e];a=Lt.o?Lt.o(a,b,g):Lt.call(null,a,b,g);if(a==null&&e===0)return null;c=$APP.ne(c);c.j[e]=a;return c}if(e===0)return null;c=$APP.ne(c);c.j[e]=null;return c};$APP.md.prototype.ua=$APP.ca(12,function(){return this.ia(null)});$APP.nd.prototype.ua=$APP.ca(11,function(){throw Error("Can't pop empty list");});
|
|
27
|
+
$APP.ve.prototype.ua=$APP.ca(10,function(){if(this.l===0)throw Error("Can't pop empty vector");if(1===this.l)return $APP.Za($APP.ie,this.u);if(1<this.l-$APP.oe(this))return new $APP.ve(this.u,this.l-1,this.shift,this.root,this.oa.slice(0,-1),null);var a=$APP.qe(this,this.l-2),b=Lt(this,this.shift,this.root);b=b==null?$APP.we:b;var c=this.l-1;return 5<this.shift&&b.j[1]==null?new $APP.ve(this.u,c,this.shift-5,b.j[0],a,null):new $APP.ve(this.u,c,this.shift,b,a,null)});
|
|
28
|
+
$APP.Ue.prototype.ua=$APP.ca(9,function(){return new $APP.ve(null,1,5,$APP.we,[this.key],null)});$APP.Kf.prototype.ua=$APP.ca(8,function(){return new $APP.ve(null,1,5,$APP.we,[this.key],null)});$APP.Jf.prototype.ua=$APP.ca(7,function(){return new $APP.ve(null,1,5,$APP.we,[this.key],null)});
|
|
29
|
+
var lt=new $APP.M(null,"empty-text","empty-text",1554384594),ft=new $APP.M(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),et=new $APP.M(null,"empty-text-raw","empty-text-raw",1477406757),jt=new $APP.M(null,"dismissible-raw","dismissible-raw",947680658),kt=new $APP.M(null,"modal-raw","modal-raw",-263722282),nt=new $APP.M(null,"close-on-escape?","close-on-escape?",-1559868909),bt=new $APP.M(null,"groups","groups",-136896102),ht=new $APP.M(null,"close-on-escape-raw","close-on-escape-raw",
|
|
30
|
+
-1942646255),ot=new $APP.M(null,"scrim?","scrim?",744210580),it=new $APP.M(null,"no-scrim-raw","no-scrim-raw",-1344365743),mt=new $APP.M(null,"close-on-scrim?","close-on-scrim?",-367113965),Mt=new $APP.Sb(null,"object","object",-1179821820,null),Zs=new $APP.M(null,"group","group",582596132),zt=new $APP.M(null,"down","down",1565245570),$s=new $APP.M(null,"search-str","search-str",-821246171),Bt=new $APP.M(null,"up","up",-269712113),pt=new $APP.M(null,"modal?","modal?",2146094679),gt=new $APP.M(null,
|
|
31
|
+
"disabled-raw","disabled-raw",498098381);var It="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
|
|
32
|
+
$APP.Sd(["x-command-palette-open-request",new $APP.P(null,2,[$APP.kl,!0,$APP.U,$APP.Td],null),"x-command-palette-open",new $APP.P(null,2,[$APP.kl,!1,$APP.U,$APP.Td],null),"x-command-palette-close-request",new $APP.P(null,2,[$APP.kl,!0,$APP.U,$APP.Td],null),"x-command-palette-close",new $APP.P(null,2,[$APP.kl,!1,$APP.U,$APP.Td],null),"x-command-palette-select-request",new $APP.P(null,2,[$APP.kl,!0,$APP.U,new $APP.P(null,1,[$APP.Dj,Mt],null)],null),"x-command-palette-select",new $APP.P(null,2,[$APP.kl,
|
|
33
|
+
!1,$APP.U,new $APP.P(null,1,[$APP.Dj,Mt],null)],null),"x-command-palette-query-change",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[new $APP.M(null,"query","query",-1288509510),$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_command_palette.init",Kt);export const init=Kt;
|
package/dist/x-container.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
this.removeAttribute("center"):this.setAttribute("center","false")}})}
|
|
4
|
-
"lg"),$APP.
|
|
5
|
-
a=$APP.
|
|
6
|
-
d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return
|
|
7
|
-
|
|
2
|
+
var QG=function(a,b,c){return typeof a==="string"&&$APP.J(b,a)?a:c},RG=function(a){return a.__xContainerState},SG=function(a){Object.defineProperty(a,"fluid",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("fluid")},set:function(b){return $APP.r($APP.I(b))?this.setAttribute("fluid",""):this.removeAttribute("fluid")}})},TG=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.O("false",this.getAttribute("center"))},set:function(b){return $APP.I(b)?
|
|
3
|
+
this.removeAttribute("center"):this.setAttribute("center","false")}})},$G=function(a,b){var c=a.getAttribute("as"),d=a.getAttribute("size"),e=a.getAttribute("padding"),g=$APP.O("false",a.getAttribute("center"));a=new $APP.P(null,6,[UG,c,$APP.rh,d,$APP.Cl,e,VG,g,WG,a.hasAttribute("fluid"),$APP.T,a.getAttribute("label")],null);var h=$APP.N(a);a=$APP.G(h,UG);c=$APP.G(h,$APP.rh);d=$APP.G(h,$APP.Cl);e=$APP.G(h,VG);g=$APP.G(h,WG);h=$APP.G(h,$APP.T);a=new $APP.P(null,6,[UG,QG(a,XG,"div"),$APP.rh,QG(c,YG,
|
|
4
|
+
"lg"),$APP.Cl,QG(d,ZG,"md"),VG,$APP.I(e),WG,$APP.I(g),$APP.T,typeof h==="string"&&$APP.O(h,"")?h:null],null);g=UG.g(a);c=b.base;$APP.O(c.tagName.toLowerCase(),g)&&(d=b.root,e=b.slot,g=document.createElement(g),g.setAttribute("part","base"),g.appendChild(e),d.replaceChild(g,c),b.base=g);b=b.base;b.setAttribute("data-size",$APP.rh.g(a));b.setAttribute("data-padding",$APP.Cl.g(a));b.setAttribute("data-center",$APP.r(VG.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.r(WG.g(a))?"true":"false");
|
|
5
|
+
a=$APP.T.g(a);return $APP.r(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},bH=function(){var a=class extends HTMLElement{};a.observedAttributes=aH;a.prototype.connectedCallback=function(){if(!$APP.r(RG(this))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:#0f172a;\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:#e5e7eb;\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
|
|
6
|
+
d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return $G(this,RG(this))};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(){var b=RG(this);return $APP.r(b)?$G(this,b):null};TG(a.prototype);SG(a.prototype);return a},cH=function(){$APP.r(customElements.get("x-container"))||customElements.define("x-container",bH());return null},WG=new $APP.M(null,"fluid","fluid",-1823657759),
|
|
7
|
+
UG=new $APP.M(null,"as","as",1148689641),VG=new $APP.M(null,"center","center",-748944368);var XG=new $APP.R(null,new $APP.P(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),YG=new $APP.R(null,new $APP.P(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),ZG=new $APP.R(null,new $APP.P(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),aH="as size padding center fluid label".split(" ");$APP.ka("baredom.exports.x_container.init",cH);export const init=cH;
|
package/dist/x-context-menu.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
k=$APP.
|
|
4
|
-
2,[$APP.
|
|
5
|
-
|
|
6
|
-
"string"&&$APP.
|
|
7
|
-
$APP.
|
|
8
|
-
g.setAttribute("part","panel");g.setAttribute("role","menu");g.setAttribute("tabindex","-1");d.appendChild(e);d.appendChild(g);b.appendChild(c);return c},
|
|
9
|
-
for(var c=null,d=0,e=0;;)if(e<d){var g=c.
|
|
10
|
-
$APP.
|
|
11
|
-
"ArrowUp")?(h.preventDefault(),$APP.
|
|
12
|
-
"__onItemClick"),e=
|
|
13
|
-
if(
|
|
14
|
-
|
|
15
|
-
k=window.innerHeight,m=new $APP.
|
|
16
|
-
2,[$APP.
|
|
17
|
-
b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.S.g(d)):this.removeAttribute(c)}})},
|
|
18
|
-
a.observedAttributes=
|
|
19
|
-
$APP.
|
|
20
|
-
|
|
2
|
+
var VX=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.t(isNaN(a))&&a>0?a:b):b},WX=function(a){return $APP.D.i(a,"bottom-start")?"top-start":$APP.D.i(a,"bottom-end")?"top-end":$APP.D.i(a,"top-start")?"bottom-start":$APP.D.i(a,"top-end")?"bottom-end":$APP.D.i(a,"right-start")?"left-start":$APP.D.i(a,"left-start")?"right-start":a},XX=function(a,b,c,d){var e=$APP.N(c);c=$APP.G(e,$APP.Ok);var g=$APP.G(e,$APP.Nk),h=$APP.G(e,$APP.Lj);e=$APP.G(e,$APP.pj);var k=$APP.N(d);d=$APP.G(k,$APP.Lj);
|
|
3
|
+
k=$APP.G(k,$APP.pj);switch(a){case "bottom-start":return new $APP.P(null,2,[$APP.Ok,c,$APP.Nk,g+e+b],null);case "bottom-end":return new $APP.P(null,2,[$APP.Ok,c+h-d,$APP.Nk,g+e+b],null);case "top-start":return new $APP.P(null,2,[$APP.Ok,c,$APP.Nk,g-k-b],null);case "top-end":return new $APP.P(null,2,[$APP.Ok,c+h-d,$APP.Nk,g-k-b],null);case "right-start":return new $APP.P(null,2,[$APP.Ok,c+h+b,$APP.Nk,g],null);case "left-start":return new $APP.P(null,2,[$APP.Ok,c-d-b,$APP.Nk,g],null);default:return new $APP.P(null,
|
|
4
|
+
2,[$APP.Ok,c,$APP.Nk,g+e+b],null)}},aY=function(a,b,c,d,e){function g(x){var y=XX(x,b,c,d);y=$APP.N(y);var A=$APP.G(y,$APP.Ok),C=$APP.G(y,$APP.Nk);y=A>=8&&A+m<=h-8;var E=C>=8&&C+p<=k-8;A=$APP.Zg.i($APP.Yg.i(A,8),h-m-8);C=$APP.Zg.i($APP.Yg.i(C,8),k-p-8);return new $APP.P(null,5,[$APP.Ok,A,$APP.Nk,C,YX,x,ZX,y&&E,$X,$APP.Yg.i(40,k-C-8)],null)}e=$APP.N(e);var h=$APP.G(e,$APP.Lj),k=$APP.G(e,$APP.pj);e=$APP.N(d);var m=$APP.G(e,$APP.Lj),p=$APP.G(e,$APP.pj),q=g(a),w=g(WX(a));return $APP.r(function(){var x=
|
|
5
|
+
ZX.g(q);return $APP.r(x)?x:$APP.t(ZX.g(w))}())?q:w},fY=function(a){a=new $APP.P(null,5,[$APP.ai,$APP.r(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Rk,$APP.r(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.Wl,a.getAttribute("placement"),bY,a.getAttribute("offset"),cY,a.getAttribute("z-index")],null);var b=$APP.N(a),c=$APP.G(b,$APP.ai),d=$APP.G(b,$APP.Rk),e=$APP.G(b,$APP.Wl);a=$APP.G(b,bY);b=$APP.G(b,cY);c=c!=null&&$APP.O(c,"false");d=d!=null&&$APP.O(d,"false");e=typeof e===
|
|
6
|
+
"string"&&$APP.J(dY,e)?e:"bottom-start";return new $APP.P(null,5,[$APP.Dl,c,$APP.W,d,$APP.hj,e,$APP.Rh,VX(a,8),eY,VX(b,1E3)],null)},gY=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:c});a.dispatchEvent(b);return $APP.t(b.defaultPrevented)},hY=function(a){return $APP.wc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},iY=function(a){return $APP.r(a)?a.focus():null},jY=function(a){var b=document.getElementById("__xOverlayRoot");
|
|
7
|
+
$APP.r(b)||(b=document.createElement("div"),b.setAttribute("id","__xOverlayRoot"),b.style.position="fixed",b.style.inset="0",b.style.pointerEvents="none",b.style.zIndex="0",document.body.appendChild(b));var c=document.createElement("div"),d=c.attachShadow({mode:"open"}),e=document.createElement("style"),g=document.createElement("div");c.style.position="fixed";c.style.inset="0";c.style.pointerEvents="none";c.style.zIndex=""+$APP.S.g(a);e.textContent=":host{color-scheme:light dark;--x-context-menu-bg:rgba(255,255,255,0.97);--x-context-menu-border:rgba(0,0,0,0.1);--x-context-menu-shadow:0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08);--x-context-menu-radius:10px;--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:rgba(0,0,0,0.87);--x-context-menu-separator:rgba(0,0,0,0.1);}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:#1e293b;--x-context-menu-border:rgba(255,255,255,0.12);--x-context-menu-shadow:0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4);--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:rgba(255,255,255,0.9);--x-context-menu-separator:rgba(255,255,255,0.12);}}[part\x3dpanel]{position:absolute;min-width:160px;border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}";
|
|
8
|
+
g.setAttribute("part","panel");g.setAttribute("role","menu");g.setAttribute("tabindex","-1");d.appendChild(e);d.appendChild(g);b.appendChild(c);return c},kY=function(a){return $APP.r(a)?a.shadowRoot.querySelector("[part\x3dpanel]"):null},lY=function(a,b,c,d){var e=$APP.N(d);d=$APP.G(e,eY);e=$APP.G(e,$X);a.style.zIndex=""+$APP.S.g(d);a=kY(a);$APP.r(a)&&(a.style.left=""+$APP.S.g(b)+"px",a.style.top=""+$APP.S.g(c)+"px",a.style.maxHeight=""+$APP.S.g(e)+"px")},mY=function(a,b){a=$APP.u($APP.wc(a.children));
|
|
9
|
+
for(var c=null,d=0,e=0;;)if(e<d){var g=c.G(null,e);b.appendChild(g.cloneNode(!0));e+=1}else if(a=$APP.u(a))c=a,$APP.Pc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.B(a),a=d,d=g):(g=$APP.v(c),b.appendChild(g.cloneNode(!0)),a=$APP.z(c),c=null,d=0),e=0;else break},oY=function(a,b){function c(h){h.stopPropagation();h=h.target.closest("[role\x3dmenuitem]");return $APP.r(h)?(gY(a,"x-context-menu-select",!1,{item:h}),nY.i?nY.i(a,"select"):nY.call(null,a,"select")):null}function d(h){var k=kY(b);return $APP.r($APP.r(k)?
|
|
10
|
+
$APP.t(k.contains(h.target)):k)?nY.i?nY.i(a,"backdrop"):nY.call(null,a,"backdrop"):null}function e(h){var k=h.key,m=b.shadowRoot.activeElement;return $APP.D.i(k,"Escape")?(h.preventDefault(),h.stopPropagation(),nY.i?nY.i(a,"keyboard"):nY.call(null,a,"keyboard")):$APP.D.i(k,"Tab")?nY.i?nY.i(a,"keyboard"):nY.call(null,a,"keyboard"):$APP.D.i(k,"ArrowDown")?(h.preventDefault(),$APP.r(m)?(h=hY(g),m=$APP.Cd(h).indexOf(m),m=$APP.Cc(h,$APP.hd(m+1,$APP.B(h)),null),m=iY(m)):m=iY($APP.v(hY(g))),m):$APP.D.i(k,
|
|
11
|
+
"ArrowUp")?(h.preventDefault(),$APP.r(m)?(h=hY(g),k=$APP.B(h),m=$APP.Cd(h).indexOf(m),m=$APP.Cc(h,$APP.hd(m+(k-1),k),null),m=iY(m)):m=iY($APP.v(hY(g))),m):($APP.D.i(k,"Enter")||$APP.D.i(k," "))&&$APP.r(m)?(h.preventDefault(),m.click()):null}var g=kY(b);b.addEventListener("keydown",e,!0);b.addEventListener("click",d);$APP.r(g)&&g.addEventListener("click",c);b.__onKey=e;b.__onClickBackdrop=d;b.__onItemClick=c},pY=function(a){if($APP.r(a)){var b=$APP.l(a,"__onKey"),c=$APP.l(a,"__onClickBackdrop"),d=
|
|
12
|
+
$APP.l(a,"__onItemClick"),e=kY(a);$APP.r(b)&&a.removeEventListener("keydown",b,!0);$APP.r(c)&&a.removeEventListener("click",c);$APP.r($APP.r(e)?d:e)&&e.removeEventListener("click",d);$APP.r(a.parentNode)&&a.parentNode.removeChild(a)}},nY=function(a,b){return $APP.r(a.hasAttribute("open"))&&gY(a,"x-context-menu-close-request",!0,{reason:b})?(a.removeAttribute("open"),pY($APP.l(a,"__xContextMenuLayer")),a.__xContextMenuLayer=null,gY(a,"x-context-menu-close",!1,{reason:b})):null},qY=function(a,b,c,d){if($APP.r(a.hasAttribute("disabled")))return null;
|
|
13
|
+
if(gY(a,"x-context-menu-open-request",!0,{reason:d})){var e=fY(a);e=$APP.N(e);var g=$APP.G(e,$APP.hj),h=$APP.G(e,$APP.Rh),k=$APP.G(e,eY),m=window.innerWidth,p=window.innerHeight,q=new $APP.P(null,4,[$APP.Ok,b,$APP.Nk,c,$APP.Lj,1,$APP.pj,1],null);b=aY(g,h,q,new $APP.P(null,2,[$APP.Lj,200,$APP.pj,300],null),new $APP.P(null,2,[$APP.Lj,m,$APP.pj,p],null));var w=jY(k);mY(a,kY(w));oY(a,w);lY(w,$APP.Ok.g(b),$APP.Nk.g(b),$APP.Wg.o(b,eY,k));a.setAttribute("open","");a.__xContextMenuLayer=w;requestAnimationFrame(function(){var x=
|
|
14
|
+
kY(w);if($APP.r(x)){var y=aY(g,h,q,new $APP.P(null,2,[$APP.Lj,x.offsetWidth,$APP.pj,x.offsetHeight],null),new $APP.P(null,2,[$APP.Lj,m,$APP.pj,p],null));lY(w,$APP.Ok.g(y),$APP.Nk.g(y),$APP.Wg.o(y,eY,k));return iY($APP.v(hY(x)))}return null});return gY(a,"x-context-menu-open",!1,{reason:d})}return null},rY=function(a,b){if($APP.r(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=fY(a);c=$APP.N(c);var d=$APP.G(c,$APP.hj),e=$APP.G(c,$APP.Rh),g=$APP.G(c,eY),h=window.innerWidth,
|
|
15
|
+
k=window.innerHeight,m=new $APP.P(null,4,[$APP.Ok,b.left,$APP.Nk,b.top,$APP.Lj,b.width,$APP.pj,b.height],null);if(gY(a,"x-context-menu-open-request",!0,{reason:"programmatic"})){b=aY(d,e,m,new $APP.P(null,2,[$APP.Lj,200,$APP.pj,300],null),new $APP.P(null,2,[$APP.Lj,h,$APP.pj,k],null));var p=jY(g);mY(a,kY(p));oY(a,p);lY(p,$APP.Ok.g(b),$APP.Nk.g(b),$APP.Wg.o(b,eY,g));a.setAttribute("open","");a.__xContextMenuLayer=p;requestAnimationFrame(function(){var q=kY(p);if($APP.r(q)){var w=aY(d,e,m,new $APP.P(null,
|
|
16
|
+
2,[$APP.Lj,q.offsetWidth,$APP.pj,q.offsetHeight],null),new $APP.P(null,2,[$APP.Lj,h,$APP.pj,k],null));lY(p,$APP.Ok.g(w),$APP.Nk.g(w),$APP.Wg.o(w,eY,g));return iY($APP.v(hY(q)))}return null});return gY(a,"x-context-menu-open",!1,{reason:"programmatic"})}return null},sY=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.r(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},tY=function(a,b,c){Object.defineProperty(a,
|
|
17
|
+
b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.S.g(d)):this.removeAttribute(c)}})},uY=function(a){a.openAt=function(b,c){return qY(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.r(this.hasAttribute("open"))?nY(this,"toggle"):qY(this,b,c,"toggle")};a.openForElement=function(b){return rY(this,b)};a.close=function(){return nY(this,"programmatic")}},wY=function(){var a=class extends HTMLElement{};
|
|
18
|
+
a.observedAttributes=vY;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xContextMenuRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.r(this.hasAttribute("open"))?this.removeAttribute("open"):null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xContextMenuLayer");
|
|
19
|
+
$APP.r(b)?(pY(b),this.__xContextMenuLayer=null,b=void 0):b=null;return b};a.prototype.attributeChangedCallback=function(b){a:{if($APP.D.i(b,"open")){if($APP.r(this.hasAttribute("open"))){b=null;break a}b=$APP.l(this,"__xContextMenuLayer");if($APP.r(b)){pY(b);this.__xContextMenuLayer=null;b=void 0;break a}}b=null}return b};sY(a.prototype,"open","open");sY(a.prototype,"disabled","disabled");tY(a.prototype,"placement","placement");tY(a.prototype,"offset","offset");tY(a.prototype,"zIndex","z-index");
|
|
20
|
+
uY(a.prototype);return a},xY=function(){return $APP.r(customElements.get("x-context-menu"))?null:customElements.define("x-context-menu",wY())},YX=new $APP.M(null,"final-placement","final-placement",-1586044424),cY=new $APP.M(null,"z-index-raw","z-index-raw",-1179679257),$X=new $APP.M(null,"max-height","max-height",-612563804),ZX=new $APP.M(null,"fits","fits",2008565808),eY=new $APP.M(null,"z-index","z-index",1892827090),bY=new $APP.M(null,"offset-raw","offset-raw",-1418404095);var vY=["open","disabled","placement","offset","z-index"],dY=new $APP.R(null,new $APP.P(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null);$APP.ka("baredom.exports.x_context_menu.init",xY);export const init=xY;
|
package/dist/x-copy.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
$APP.N(a);a=$APP.
|
|
2
|
+
var my=function(a){return a==null?!0:$APP.D.i(a,"false")?!1:$APP.D.i(a,"0")?!1:!0},ny=function(a){return typeof a==="string"&&$APP.O(a,"")?(a=parseInt(a,10),$APP.t(isNaN(a))&&a>0?a:1200):1200},oy=function(a){return Math.min(1E4,Math.max(100,a))},Cy=function(a){var b=$APP.N(a);a=$APP.G(b,py);var c=$APP.G(b,qy),d=$APP.G(b,ry),e=$APP.G(b,$APP.qh),g=$APP.G(b,$APP.Bk),h=$APP.G(b,sy),k=$APP.G(b,ty),m=$APP.G(b,$APP.Rk),p=$APP.G(b,uy);b=$APP.G(b,vy);return $APP.Q([wy,$APP.Ri,xy,yy,zy,$APP.zh,Ay,$APP.W,By,
|
|
3
|
+
$APP.Gk],[my(b),$APP.D.i(g,"html")?"html":"text",typeof k==="string"&&$APP.O(k.trim(),"")?k.trim():null,typeof a==="string"&&$APP.O(a.trim(),"")?a.trim():null,oy(ny(c)),typeof d==="string"&&$APP.O(d.trim(),"")?d.trim():null,function(){var q;if(q=typeof h==="string")q=(q=$APP.O(h,""))?h:q;return $APP.r(q)?q:"Copy failed"}(),$APP.I(m),function(){var q;if(q=typeof p==="string")q=(q=$APP.O(p,""))?p:q;return $APP.r(q)?q:"Copied"}(),typeof e==="string"&&$APP.O(e.trim(),"")?e.trim():null])},Dy=function(a){var b=
|
|
4
|
+
$APP.N(a);a=$APP.G(b,$APP.Gk);var c=$APP.G(b,$APP.zh),d=$APP.G(b,xy);b=$APP.G(b,$APP.Ri);return{text:$APP.r(a)?a:"",mode:$APP.r(b)?b:"text",from:$APP.r(c)?c:null,fromAttr:$APP.r(d)?d:null}},Ey=function(a){var b=$APP.l(a,"__xCopyRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("span");
|
|
5
5
|
c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-copy-tooltip-bg:#1e293b;--x-copy-tooltip-fg:#f8fafc;--x-copy-tooltip-success-bg:#15803d;--x-copy-tooltip-success-fg:#f0fdf4;--x-copy-tooltip-error-bg:#b91c1c;--x-copy-tooltip-error-fg:#fef2f2;--x-copy-tooltip-radius:6px;--x-copy-tooltip-padding:4px 8px;--x-copy-tooltip-font-size:0.8125rem;--x-copy-tooltip-z:100;}@media (prefers-color-scheme:dark){:host{--x-copy-tooltip-bg:#0f172a;--x-copy-tooltip-fg:#e2e8f0;--x-copy-tooltip-success-bg:#166534;--x-copy-tooltip-success-fg:#dcfce7;--x-copy-tooltip-error-bg:#991b1b;--x-copy-tooltip-error-fg:#fee2e2;}}[part\x3dwrap]{display:inline-flex;align-items:center;justify-content:center;}[part\x3dtrigger]{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;}[part\x3dtrigger]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}:host([disabled]) [part\x3dtrigger]{opacity:0.55;pointer-events:none;cursor:default;}[part\x3dtooltip]{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--x-copy-tooltip-bg);color:var(--x-copy-tooltip-fg);border-radius:var(--x-copy-tooltip-radius);padding:var(--x-copy-tooltip-padding);font-size:var(--x-copy-tooltip-font-size);z-index:var(--x-copy-tooltip-z);pointer-events:none;}:host([data-tooltip-open]) [part\x3dtooltip]{display:block;}:host([data-tooltip-kind\x3dsuccess]) [part\x3dtooltip]{background:var(--x-copy-tooltip-success-bg);color:var(--x-copy-tooltip-success-fg);}:host([data-tooltip-kind\x3derror]) [part\x3dtooltip]{background:var(--x-copy-tooltip-error-bg);color:var(--x-copy-tooltip-error-fg);}@media (prefers-reduced-motion:reduce){[part\x3dtrigger]{transition:none;}}";
|
|
6
|
-
d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");k.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(k);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:k,tooltipText:m};return $APP.l(a,"__xCopyRefs")},
|
|
7
|
-
$APP.
|
|
8
|
-
return typeof b==="string"&&$APP.O(b,"")&&(b=document.querySelector(b),$APP.
|
|
9
|
-
1,5,$APP.
|
|
10
|
-
d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(k){if(k instanceof Error)return e.g?e.g(h):e.call(null,h);throw k;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},
|
|
11
|
-
$APP.l(a,"__xCopyRefs");if($APP.
|
|
12
|
-
{detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},
|
|
13
|
-
return Promise.reject(d)})},
|
|
14
|
-
|
|
15
|
-
"click");b=$APP.l(b,"keydown");$APP.
|
|
16
|
-
2,5,$APP.
|
|
17
|
-
|
|
18
|
-
this.setAttribute(
|
|
19
|
-
"true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return
|
|
20
|
-
configurable:!0});Object.defineProperty(a,"copy",{value:function(){return
|
|
21
|
-
customElements.define("x-copy",
|
|
22
|
-
"
|
|
23
|
-
$APP.
|
|
24
|
-
"note","note",1426297904),"property-only override"],null),new $APP.
|
|
25
|
-
$APP.
|
|
6
|
+
d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");k.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(k);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:k,tooltipText:m};return $APP.l(a,"__xCopyRefs")},Fy=function(a){return Cy($APP.Q([ry,
|
|
7
|
+
$APP.qh,$APP.Bk,sy,ty,$APP.Rk,uy,vy,py,qy],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},Gy=function(a){var b=$APP.l(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.O(b,""))return b;b=a.getAttribute("from");
|
|
8
|
+
return typeof b==="string"&&$APP.O(b,"")&&(b=document.querySelector(b),$APP.r(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.O(a,"")?b.getAttribute(a):b.textContent,$APP.r(a)?a:""):""},Hy=function(a){var b=Gy(a),c=function(){var d=a.getAttribute("mode");return $APP.r(d)?d:"text"}();return new Promise(function(d,e){if($APP.D.i(c,"html")){if($APP.r(function(){var h=navigator.clipboard;return $APP.r(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.nh(new $APP.ve(null,
|
|
9
|
+
1,5,$APP.we,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var g=document.createElement("textarea");g.value=b;document.body.appendChild(g);g.select();document.execCommand("copy");g.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}else{if($APP.r(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
|
|
10
|
+
d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(k){if(k instanceof Error)return e.g?e.g(h):e.call(null,h);throw k;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},Iy=function(a,b,c,d){var e=
|
|
11
|
+
$APP.l(a,"__xCopyRefs");if($APP.r(e)){var g=$APP.l(a,"__xCopyTid");$APP.r(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.l(e,"tooltipText").textContent=c;$APP.n(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.l(a,"__xCopyRefs");$APP.r(h)&&($APP.l(h,"tooltipText").textContent="");return null},d))}},Jy=function(a,b,c,d){b=new CustomEvent(b,
|
|
12
|
+
{detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},Ky=function(a){if($APP.r(a.hasAttribute("disabled")))return Promise.resolve(null);var b=Fy(a),c=Dy(b);c=Jy(a,"x-copy-request",c,!0);return $APP.r(c.defaultPrevented)?Promise.resolve(null):Hy(a).then(function(d){Jy(a,"x-copy-success",{text:$APP.r(d)?d:""},!1);$APP.r(wy.g(b))&&Iy(a,"success",By.g(b),zy.g(b));return d}).catch(function(d){Jy(a,"x-copy-error",{error:""+$APP.S.g(d)},!1);$APP.r(wy.g(b))&&Iy(a,"error",Ay.g(b),zy.g(b));
|
|
13
|
+
return Promise.reject(d)})},Ly=function(a,b){if(typeof b==="string"&&$APP.O(b,"")){var c=b.toLowerCase().split("+");b=$APP.zc(c);var d=$APP.I($APP.Wd(function(h){return $APP.D.i(h,"ctrl")},c)),e=$APP.I($APP.Wd(function(h){return $APP.D.i(h,"shift")},c)),g=$APP.I($APP.Wd(function(h){return $APP.D.i(h,"alt")},c));c=$APP.I($APP.Wd(function(h){return $APP.D.i(h,"meta")},c));return $APP.D.i(a.key.toLowerCase(),b)&&$APP.D.i(d,a.ctrlKey)&&$APP.D.i(e,a.shiftKey)&&$APP.D.i(g,a.altKey)&&$APP.D.i(c,a.metaKey)}return null},
|
|
14
|
+
My=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.r(Ly(e,g))?(e.preventDefault(),Ky(a)):null}function c(){return Ky(a)}var d=Ey(a);$APP.l(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",b);$APP.n(a,"__xCopyHandlers",{click:c,keydown:b})},Ny=function(a){var b=$APP.l(a,"__xCopyTid");$APP.r(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.l(a,"__xCopyHandlers");var c=$APP.l(a,"__xCopyRefs");if($APP.r($APP.r(b)?c:b)){c=$APP.l(c,"trigger");var d=$APP.l(b,
|
|
15
|
+
"click");b=$APP.l(b,"keydown");$APP.r(d)&&c.removeEventListener("click",d);$APP.r(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},Oy=function(a){var b=Ey(a),c=a.hasAttribute("disabled");$APP.l(b,"trigger").disabled=$APP.I(c);$APP.r(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},Py=function(a){for(var b=$APP.u(new $APP.ve(null,7,5,$APP.we,[new $APP.ve(null,2,5,$APP.we,["text","text"],null),new $APP.ve(null,2,5,$APP.we,["from","from"],null),new $APP.ve(null,
|
|
16
|
+
2,5,$APP.we,["fromAttr","from-attr"],null),new $APP.ve(null,2,5,$APP.we,["mode","mode"],null),new $APP.ve(null,2,5,$APP.we,["successMessage","success-message"],null),new $APP.ve(null,2,5,$APP.we,["errorMessage","error-message"],null),new $APP.ve(null,2,5,$APP.we,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.G(null,e),h=$APP.Cc(g,0,null),k=$APP.Cc(g,1,null);Object.defineProperty(a,h,{get:function(q,w,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,g,h,k),set:function(q,
|
|
17
|
+
w,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.S.g(H))}}(b,c,d,e,g,h,k),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.u(b)){g=h;if($APP.Pc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.B(b),b=e;else{k=$APP.v(g);var m=$APP.Cc(k,0,null),p=$APP.Cc(k,1,null);Object.defineProperty(a,m,{get:function(q,w,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,k,m,p,g,h),set:function(q,w,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):
|
|
18
|
+
this.setAttribute(E,""+$APP.S.g(H))}}(b,c,d,e,k,m,p,g,h),enumerable:!0,configurable:!0});b=$APP.z(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(q){return $APP.r(q)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return my(this.getAttribute("show-tooltip"))},set:function(q){return $APP.r(q)?this.setAttribute("show-tooltip",
|
|
19
|
+
"true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return ny(this.getAttribute("tooltip-ms"))},set:function(q){return q==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.S.g(q|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.l(this,"__xCopyTextValue")},set:function(q){this.__xCopyTextValue=typeof q==="string"?q:void 0},enumerable:!0,
|
|
20
|
+
configurable:!0});Object.defineProperty(a,"copy",{value:function(){return Ky(this)},enumerable:!0,configurable:!0,writable:!0})},Ry=function(){var a=class extends HTMLElement{};a.observedAttributes=Qy;a.prototype.connectedCallback=function(){Ey(this);Ny(this);My(this);Oy(this);return null};a.prototype.disconnectedCallback=function(){Ny(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Oy(this);return null};Py(a.prototype);return a},Sy=function(){$APP.r(customElements.get("x-copy"))||
|
|
21
|
+
customElements.define("x-copy",Ry());return null},wy=new $APP.M(null,"show-tooltip?","show-tooltip?",-1214081087),qy=new $APP.M(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),By=new $APP.M(null,"success-message","success-message",-96541601),sy=new $APP.M(null,"error-message-raw","error-message-raw",1910536231),yy=new $APP.M(null,"hotkey","hotkey",-329017295),Ay=new $APP.M(null,"error-message","error-message",1756021561),Ty=new $APP.M(null,"fromAttr","fromAttr",-1768252533),ty=new $APP.M(null,
|
|
22
|
+
"from-attr-raw","from-attr-raw",761657416),zy=new $APP.M(null,"tooltip-ms","tooltip-ms",1062450417),uy=new $APP.M(null,"success-message-raw","success-message-raw",388691116),ry=new $APP.M(null,"from-raw","from-raw",-44462428),xy=new $APP.M(null,"from-attr","from-attr",1217901743),py=new $APP.M(null,"hotkey-raw","hotkey-raw",1972404222),vy=new $APP.M(null,"show-tooltip-raw","show-tooltip-raw",453600717);var Qy="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
|
|
23
|
+
$APP.Q([new $APP.M(null,"errorMessage","errorMessage",982744869),$APP.gj,new $APP.M(null,"textValue","textValue",-598870870),$APP.Ri,Ty,new $APP.M(null,"tooltipMs","tooltipMs",1056463375),yy,$APP.zh,new $APP.M(null,"showTooltip","showTooltip",482349691),new $APP.M(null,"successMessage","successMessage",-789572803),$APP.Gk],[new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"error-message"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"disabled"],null),new $APP.P(null,3,[$APP.Z,$APP.Y,$APP.Oj,null,new $APP.M(null,
|
|
24
|
+
"note","note",1426297904),"property-only override"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"mode"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"from-attr"],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Oj,"tooltip-ms"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"hotkey"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"from"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"show-tooltip"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"success-message"],null),new $APP.P(null,2,[$APP.Z,
|
|
25
|
+
$APP.Y,$APP.Oj,"text"],null)]);$APP.Sd(["x-copy-request",new $APP.P(null,2,[$APP.kl,!0,$APP.U,new $APP.P(null,4,[$APP.Gk,$APP.Y,$APP.Ri,$APP.Y,$APP.zh,$APP.Y,Ty,$APP.Y],null)],null),"x-copy-success",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[$APP.Gk,$APP.Y],null)],null),"x-copy-error",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[$APP.Zh,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_copy.init",Sy);export const init=Sy;
|