@vanelsas/baredom 2.9.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +1 -1
  3. package/dist/baredom.d.ts +20 -0
  4. package/dist/base.js +541 -455
  5. package/dist/integrity.json +103 -102
  6. package/dist/x-alert.js +16 -17
  7. package/dist/x-avatar-group.js +9 -9
  8. package/dist/x-avatar.js +14 -15
  9. package/dist/x-badge.js +9 -9
  10. package/dist/x-bento-grid.js +5 -5
  11. package/dist/x-bento-item.js +4 -4
  12. package/dist/x-breadcrumbs.js +13 -13
  13. package/dist/x-button.js +1 -17
  14. package/dist/x-cancel-dialogue.js +13 -13
  15. package/dist/x-card.js +7 -7
  16. package/dist/x-carousel.js +31 -31
  17. package/dist/x-chart.js +47 -47
  18. package/dist/x-checkbox.js +1 -11
  19. package/dist/x-chip.js +1 -1
  20. package/dist/x-collapse.js +10 -10
  21. package/dist/x-color-picker.js +45 -45
  22. package/dist/x-combobox.js +26 -26
  23. package/dist/x-command-palette.js +24 -24
  24. package/dist/x-confetti.js +24 -22
  25. package/dist/x-container.js +5 -4
  26. package/dist/x-context-menu.js +20 -20
  27. package/dist/x-copy.js +20 -20
  28. package/dist/x-currency-field.js +23 -23
  29. package/dist/x-date-picker.js +40 -40
  30. package/dist/x-divider.js +9 -9
  31. package/dist/x-drawer.js +9 -9
  32. package/dist/x-dropdown.js +11 -11
  33. package/dist/x-fieldset.js +5 -5
  34. package/dist/x-file-download.js +7 -7
  35. package/dist/x-file-upload.js +22 -22
  36. package/dist/x-form-field.js +15 -15
  37. package/dist/x-form.js +9 -9
  38. package/dist/x-gaussian-blur.js +12 -12
  39. package/dist/x-grid.js +7 -6
  40. package/dist/x-i18n-provider.js +7 -7
  41. package/dist/x-i18n.js +4 -4
  42. package/dist/x-icon.js +6 -6
  43. package/dist/x-image.js +16 -17
  44. package/dist/x-kbd.js +15 -15
  45. package/dist/x-kinetic-canvas.js +25 -25
  46. package/dist/x-kinetic-font.js +27 -27
  47. package/dist/x-kinetic-typography.js +33 -33
  48. package/dist/x-liquid-dock.js +38 -38
  49. package/dist/x-liquid-fill.js +43 -43
  50. package/dist/x-liquid-glass.js +47 -47
  51. package/dist/x-menu-item.js +8 -8
  52. package/dist/x-menu.js +10 -9
  53. package/dist/x-metaball-cursor.js +26 -26
  54. package/dist/x-modal.js +10 -10
  55. package/dist/x-morph-stack.js +36 -37
  56. package/dist/x-multi-combobox.js +36 -36
  57. package/dist/x-navbar.js +12 -12
  58. package/dist/x-neural-glow.js +32 -32
  59. package/dist/x-notification-center.js +9 -9
  60. package/dist/x-organic-divider.js +17 -17
  61. package/dist/x-organic-progress.js +37 -37
  62. package/dist/x-organic-shape.js +13 -13
  63. package/dist/x-otp-input.js +22 -22
  64. package/dist/x-pagination.js +15 -15
  65. package/dist/x-particle-button.js +51 -51
  66. package/dist/x-popover.js +25 -26
  67. package/dist/x-progress-circle.js +8 -8
  68. package/dist/x-progress.js +10 -10
  69. package/dist/x-proximity-list.js +20 -19
  70. package/dist/x-radio.js +11 -11
  71. package/dist/x-ripple-effect.js +10 -10
  72. package/dist/x-scroll-parallax.js +18 -18
  73. package/dist/x-scroll-stack.js +17 -17
  74. package/dist/x-scroll-story.js +34 -34
  75. package/dist/x-scroll-timeline.js +44 -44
  76. package/dist/x-scroll.js +38 -38
  77. package/dist/x-search-field.js +1 -15
  78. package/dist/x-select.js +1 -11
  79. package/dist/x-sidebar.js +16 -16
  80. package/dist/x-skeleton-group.js +12 -12
  81. package/dist/x-skeleton.js +1 -1
  82. package/dist/x-slider.js +15 -15
  83. package/dist/x-soft-body.js +22 -22
  84. package/dist/x-spacer.js +4 -4
  85. package/dist/x-spinner.js +4 -4
  86. package/dist/x-splash.js +12 -12
  87. package/dist/x-spotlight-card.js +12 -12
  88. package/dist/x-stat.js +10 -10
  89. package/dist/x-stepper.js +14 -14
  90. package/dist/x-switch.js +10 -10
  91. package/dist/x-tab.js +7 -7
  92. package/dist/x-table-cell.js +18 -18
  93. package/dist/x-table-row.js +8 -8
  94. package/dist/x-table.js +12 -12
  95. package/dist/x-tabs.js +11 -11
  96. package/dist/x-text-area.js +19 -19
  97. package/dist/x-theme.js +25 -25
  98. package/dist/x-timeline-item.js +20 -21
  99. package/dist/x-timeline.js +8 -8
  100. package/dist/x-toast.js +22 -23
  101. package/dist/x-toaster.js +8 -8
  102. package/dist/x-tooltip.js +12 -12
  103. package/dist/x-trace-history.d.ts +242 -0
  104. package/dist/x-trace-history.js +118 -0
  105. package/dist/x-typography.js +9 -9
  106. package/dist/x-welcome-tour.js +60 -59
  107. package/package.json +6 -1
package/dist/x-toast.js CHANGED
@@ -1,24 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Tt=function(a){a=$APP.C(St,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Nm},Vt=function(a){a=$APP.C(Ut,a);return $APP.n(a)?a:"info"},Wt=function(a){return a==null?!0:$APP.M((""+$APP.R.i(a)).trim().toLowerCase(),"false")},Xt=function(a){return a==null?!1:$APP.M((""+$APP.R.i(a)).trim().toLowerCase(),"false")},Yt=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>0?a:null):null},Zt=function(a){return typeof a==="string"?(a=
3
- a.trim(),$APP.M(a,"")&&$APP.M(a.toLowerCase(),"none")?a:null):null},bu=function(a){var b=$APP.H(a),c=$APP.C(b,$APP.Ul),d=$APP.C(b,$APP.$m);a=$APP.C(b,$APP.Fk);var e=$APP.C(b,$APP.Eh),f=$APP.C(b,$APP.Ij),h=$APP.C(b,$APP.kj),l=$APP.C(b,$t),m=$APP.C(b,$APP.Kj);b=$APP.C(b,$APP.Qk);m=Tt(m);b=Zt(b);h=$APP.n($APP.n(h)?b==null:h)?$APP.Ho:b!=null?$APP.cn:$APP.hh;return $APP.Hf([au,$APP.Zj,$APP.S,$APP.hm,$APP.Il,$APP.Y,$APP.eo,$APP.Ul,$APP.$m],[Xt(l),Wt(a),m,$APP.B.j(h,$APP.cn)?b:null,h,$APP.E(e),Yt(f),function(){var q=
4
- typeof c==="string"?c.trim():null;return $APP.n(q)?q:""}(),function(){var q=typeof d==="string"?d.trim():null;return $APP.n(q)?q:""}()])},cu=function(a){var b=$APP.H(a);a=$APP.C(b,$APP.Zj);b=$APP.C(b,$APP.Y);return $APP.n(a)?$APP.p(b):a},du=function(a,b){var c=$APP.H(a);a=$APP.C(c,$APP.S);var d=$APP.C(c,$APP.$m);c=$APP.C(c,$APP.Ul);return new $APP.P(null,4,[$APP.S,Vt(a),$APP.bk,b,$APP.$m,d,$APP.Ul,c],null)},eu=function(a){var b=$APP.H(a);a=$APP.C(b,au);b=$APP.C(b,$APP.eo);return $APP.E($APP.n(a)?
5
- b!=null&&b>0:a)},ju=function(a){var b=$APP.k(a,"__xToastRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),h=document.createElement("slot"),l=document.createElement("span"),m=document.createElement("div"),q=document.createElement("span"),r=document.createElement("span"),v=document.createElement("button"),w=document.createElement("span"),y=document.createElement("div"),
6
- A=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-toast-radius:var(--x-radius-lg,12px);--x-toast-padding-y:14px;--x-toast-padding-x:16px;--x-toast-gap:12px;--x-toast-font-size:var(--x-font-size-sm,0.875rem);--x-toast-heading-font-size:0.9375rem;--x-toast-heading-weight:600;--x-toast-min-width:min(280px,calc(100vw - 2rem));--x-toast-max-width:min(480px,calc(100vw - 2rem));--x-toast-border-width:1px;--x-toast-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08));--x-toast-motion-fast:var(--x-transition-duration,120ms);--x-toast-motion-ease:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-toast-enter-duration:200ms;--x-toast-exit-duration:180ms;--x-toast-press-scale:0.97;--x-toast-disabled-opacity:0.55;--x-toast-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.6));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(0,0,0,0.50));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(0,0,0,0.06));--x-toast-progress-height:3px;--x-toast-progress-bg:var(--x-color-border,rgba(0,0,0,0.08));--x-toast-info-bg:var(--x-color-bg,#ffffff);--x-toast-info-border:rgba(0,102,204,0.30);--x-toast-info-color:rgba(15,23,42,0.92);--x-toast-info-icon-color:rgba(0,102,204,0.85);--x-toast-info-progress-fill:rgba(0,102,204,0.70);--x-toast-success-bg:var(--x-color-bg,#ffffff);--x-toast-success-border:rgba(16,140,72,0.30);--x-toast-success-color:rgba(15,23,42,0.92);--x-toast-success-icon-color:rgba(16,140,72,0.85);--x-toast-success-progress-fill:rgba(16,140,72,0.70);--x-toast-warning-bg:var(--x-color-bg,#ffffff);--x-toast-warning-border:rgba(204,120,0,0.40);--x-toast-warning-color:rgba(15,23,42,0.92);--x-toast-warning-icon-color:rgba(180,100,0,0.85);--x-toast-warning-progress-fill:rgba(204,120,0,0.70);--x-toast-error-bg:var(--x-color-bg,#ffffff);--x-toast-error-border:rgba(190,20,40,0.40);--x-toast-error-color:rgba(15,23,42,0.92);--x-toast-error-icon-color:rgba(190,20,40,0.85);--x-toast-error-progress-fill:rgba(190,20,40,0.70);--x-toast-bg:transparent;--x-toast-border-color:transparent;--x-toast-color:inherit;--x-toast-icon-color:inherit;--x-toast-progress-fill:currentColor;}@media (prefers-color-scheme:dark){:host{--x-toast-shadow:var(--x-shadow-md,0 4px 20px rgba(0,0,0,0.40),0 1px 6px rgba(0,0,0,0.30));--x-toast-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.75));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(255,255,255,0.65));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(255,255,255,0.12));--x-toast-progress-bg:var(--x-color-border,rgba(255,255,255,0.10));--x-toast-info-bg:var(--x-color-bg,#1e293b);--x-toast-info-border:rgba(80,160,255,0.35);--x-toast-info-color:rgba(248,250,252,0.92);--x-toast-info-icon-color:rgba(96,165,250,0.90);--x-toast-info-progress-fill:rgba(96,165,250,0.75);--x-toast-success-bg:var(--x-color-bg,#1e293b);--x-toast-success-border:rgba(60,210,120,0.35);--x-toast-success-color:rgba(248,250,252,0.92);--x-toast-success-icon-color:rgba(52,211,153,0.90);--x-toast-success-progress-fill:rgba(52,211,153,0.75);--x-toast-warning-bg:var(--x-color-bg,#1e293b);--x-toast-warning-border:rgba(255,190,90,0.40);--x-toast-warning-color:rgba(248,250,252,0.92);--x-toast-warning-icon-color:rgba(251,191,36,0.90);--x-toast-warning-progress-fill:rgba(251,191,36,0.75);--x-toast-error-bg:var(--x-color-bg,#1e293b);--x-toast-error-border:rgba(255,90,110,0.40);--x-toast-error-color:rgba(248,250,252,0.92);--x-toast-error-icon-color:rgba(248,113,113,0.90);--x-toast-error-progress-fill:rgba(248,113,113,0.75);}}:host([data-type\x3d'info']){--x-toast-bg:var(--x-toast-info-bg);--x-toast-border-color:var(--x-toast-info-border);--x-toast-color:var(--x-toast-info-color);--x-toast-icon-color:var(--x-toast-info-icon-color);--x-toast-progress-fill:var(--x-toast-info-progress-fill);}:host([data-type\x3d'success']){--x-toast-bg:var(--x-toast-success-bg);--x-toast-border-color:var(--x-toast-success-border);--x-toast-color:var(--x-toast-success-color);--x-toast-icon-color:var(--x-toast-success-icon-color);--x-toast-progress-fill:var(--x-toast-success-progress-fill);}:host([data-type\x3d'warning']){--x-toast-bg:var(--x-toast-warning-bg);--x-toast-border-color:var(--x-toast-warning-border);--x-toast-color:var(--x-toast-warning-color);--x-toast-icon-color:var(--x-toast-warning-icon-color);--x-toast-progress-fill:var(--x-toast-warning-progress-fill);}:host([data-type\x3d'error']){--x-toast-bg:var(--x-toast-error-bg);--x-toast-border-color:var(--x-toast-error-border);--x-toast-color:var(--x-toast-error-color);--x-toast-icon-color:var(--x-toast-error-icon-color);--x-toast-progress-fill:var(--x-toast-error-progress-fill);}[part\x3dcontainer]{display:flex;flex-direction:column;background:var(--x-toast-bg);border:var(--x-toast-border-width) solid var(--x-toast-border-color);border-radius:var(--x-toast-radius);box-shadow:var(--x-toast-shadow);color:var(--x-toast-color);min-width:var(--x-toast-min-width);max-width:var(--x-toast-max-width);overflow:hidden;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),border-color var(--x-toast-motion-fast) var(--x-toast-motion-ease),opacity var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}[part\x3dinner]{display:flex;align-items:flex-start;gap:var(--x-toast-gap);padding:var(--x-toast-padding-y) var(--x-toast-padding-x);}[part\x3dicon]{flex:0 0 auto;color:var(--x-toast-icon-color);line-height:1;margin-top:0.15em;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dbody]{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0;}[part\x3dheading]{font-size:var(--x-toast-heading-font-size);font-weight:var(--x-toast-heading-weight);line-height:1.2;overflow-wrap:anywhere;}[part\x3dmessage]{font-size:var(--x-toast-font-size);line-height:1.35;overflow-wrap:anywhere;opacity:0.82;}[part\x3ddismiss]{flex:0 0 auto;appearance:none;border:0;background:transparent;color:var(--x-toast-dismiss-color);width:1.5em;height:1.5em;padding:0;margin:0;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}:host(:not([disabled])) [part\x3ddismiss]:hover{background:var(--x-toast-dismiss-hover-bg);}:host(:not([disabled])) [part\x3ddismiss]:active{transform:scale(var(--x-toast-press-scale));}[part\x3ddismiss]:focus{outline:none;}:host(:not([disabled])) [part\x3ddismiss]:focus-visible{outline:2px solid var(--x-toast-focus-ring);outline-offset:2px;}:host([disabled]){opacity:var(--x-toast-disabled-opacity);}:host([disabled]) [part\x3ddismiss]{cursor:default;pointer-events:none;}[part\x3dprogress]{height:var(--x-toast-progress-height);background:var(--x-toast-progress-bg);overflow:hidden;display:none;}[part\x3dprogress-bar]{height:100%;width:100%;background:var(--x-toast-progress-fill);animation:x-toast-progress var(--x-toast-timeout,0ms) linear forwards;animation-play-state:paused;}:host([data-progress-active]) [part\x3dprogress-bar]{animation-play-state:running;}@keyframes x-toast-progress{from{width:100%;}to{width:0%;}}:host([data-entering]) [part\x3dcontainer]{animation:x-toast-enter var(--x-toast-enter-duration) var(--x-toast-motion-ease) both;}@keyframes x-toast-enter{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);}}:host([data-exiting]) [part\x3dcontainer]{animation:x-toast-exit var(--x-toast-exit-duration) var(--x-toast-motion-ease) forwards;}@keyframes x-toast-exit{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-8px);}}@media (prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3ddismiss]{transition:none !important;}:host([data-entering]) [part\x3dcontainer],:host([data-exiting]) [part\x3dcontainer]{animation:none !important;}:host([data-progress-active]) [part\x3dprogress-bar]{animation:none !important;}}";
7
- d.setAttribute("part","container");e.setAttribute("part","inner");f.setAttribute("part","icon");f.setAttribute("aria-hidden","true");h.setAttribute("name","icon");l.setAttribute("part","default-icon");h.appendChild(l);f.appendChild(h);m.setAttribute("part","body");q.setAttribute("part","heading");r.setAttribute("part","message");m.appendChild(q);m.appendChild(r);v.setAttribute("part","dismiss");v.setAttribute("type","button");v.setAttribute("aria-label","Dismiss toast");w.setAttribute("aria-hidden",
8
- "true");w.textContent="×";v.appendChild(w);e.appendChild(f);e.appendChild(m);e.appendChild(v);y.setAttribute("part","progress");A.setAttribute("part","progress-bar");y.appendChild(A);d.appendChild(e);d.appendChild(y);b.appendChild(c);b.appendChild(d);b=$APP.Hf([fu,$APP.Bo,gu,$APP.lm,$APP.oo,hu,$APP.Qh,$APP.Rh,$APP.wk,$APP.fj,$APP.Ik,iu],[A,l,r,v,m,e,b,d,y,f,h,q]);a.__xToastRefs=b;return $APP.k(a,"__xToastRefs")},ku=function(a){return bu($APP.Hf([$APP.Fk,$APP.Eh,$APP.Ij,$APP.kj,$t,$APP.Qk,$APP.Kj,
9
- $APP.Ul,$APP.$m],[a.getAttribute("dismissible"),a.hasAttribute("disabled"),a.getAttribute("timeout-ms"),a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},mu=function(a){var b=ku(a);if($APP.M($APP.k(a,"__xToastModel"),b)){b=$APP.H(b);var c=$APP.C(b,$APP.S),d=$APP.C(b,$APP.$m),e=$APP.C(b,$APP.Ul),f=$APP.C(b,$APP.Il),h=$APP.C(b,$APP.hm),l=$APP.C(b,$APP.Zj),m=$APP.C(b,$APP.Y),q=$APP.C(b,$APP.eo),
10
- r=ju(a),v=$APP.H(r),w=$APP.C(v,$APP.Ik);r=$APP.C(v,iu);var y=$APP.C(v,fu),A=$APP.C(v,$APP.Bo),D=$APP.C(v,gu),G=$APP.C(v,$APP.lm),I=$APP.C(v,$APP.Rh),J=$APP.C(v,$APP.wk);v=$APP.C(v,$APP.fj);w=$APP.n(w)?w.assignedNodes().length>0:null;$APP.B.j(f,$APP.cn)||(h=$APP.C(lu,c),h=$APP.n(h)?h:$APP.C(lu,$APP.Nm));f=$APP.p(w)&&$APP.B.j(f,$APP.Ho);w=eu(b);$APP.Zg(a,"data-type",Vt(c));var K=I.setAttribute;c=$APP.B.j(c,$APP.Rn)||$APP.B.j(c,$APP.Qj)?"alert":"status";K.call(I,"role",c);r.textContent=d;r.style.display=
11
- $APP.B.j(d,"")?"none":"";D.textContent=e;f?(A.textContent="",v.style.display="none"):(A.textContent=h,v.style.display="inline");$APP.n(l)?(G.disabled=$APP.E(m),G.style.display="inline-flex"):(G.disabled=!0,G.style.display="none");w?(J.style.display="block",y.style.setProperty("--x-toast-timeout",""+$APP.R.i(q)+"ms")):J.style.display="none";d=$APP.n(l)?$APP.p(m):l;a.tabIndex=$APP.n(d)?0:-1;$APP.n(m)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");$APP.n(d)?a.setAttribute("aria-keyshortcuts",
12
- "Escape"):a.removeAttribute("aria-keyshortcuts");a.__xToastModel=b}},nu=function(){return $APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},ou=function(a){a=typeof a==="string"?a.trim():"";return $APP.B.j(a,"")||$APP.B.j(a,"0")||$APP.B.j(a,"0ms")||$APP.B.j(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*
13
- a))):0},pu=function(a){var b=window.getComputedStyle(a);a=ou(b.getPropertyValue("--x-toast-exit-duration"));b=ou(b.getPropertyValue("--x-motion-exit-duration"));return a>0?a:b>0?b:180},qu=function(a){var b=$APP.k(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),a.__xToastTimeout=null)},su=function(a){qu(a);var b=function(){var c=$APP.k(a,"__xToastModel");return $APP.n(c)?c:ku(a)}();$APP.n(function(){var c=cu(b);return $APP.n(c)?typeof $APP.eo.i(b)==="number"&&$APP.p($APP.k(a,"__xToastExiting")):c}())&&
14
- $APP.fa(a,"__xToastTimeout",setTimeout(function(){a.__xToastTimeout=null;if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ku(a)}();if($APP.n(cu(c)))return c=$APP.Wi(du(c,"timeout")),$APP.bh(a,"x-toast-dismiss",c)?ru.i?ru.i(a):ru.call(null,a):null}return null},$APP.eo.i(b)));return null},tu=function(a){var b=$APP.k(a,"__xToastModel");$APP.n($APP.n(b)?eu(b):b)&&a.setAttribute("data-progress-active",
15
- "");return su(a)},uu=function(a){if(!$APP.n($APP.k(a,"__xToastEntered")))if(a.__xToastEntered=!0,a.setAttribute("data-entering",""),nu())a.removeAttribute("data-entering"),tu(a);else{var b=ju(a);b=$APP.H(b);var c=$APP.C(b,$APP.Rh);c.addEventListener("animationend",function f(e){return $APP.B.j(e.target,c)?(c.removeEventListener("animationend",f),a.removeAttribute("data-entering"),tu(a)):null})}},ru=function(a){if(!$APP.n($APP.k(a,"__xToastExiting"))){a.__xToastExiting=!0;qu(a);a.removeAttribute("data-entering");
16
- a.removeAttribute("data-progress-active");var b=pu(a);if(b===0||nu())a.remove();else{var c=ju(a);c=$APP.H(c);var d=$APP.C(c,$APP.Rh),e=function l(h){return $APP.B.j(h.target,d)?(d.removeEventListener("animationend",l),h=$APP.k(a,"__xToastExitTimer"),$APP.n(h)&&(clearTimeout(h),a.__xToastExitTimer=null),$APP.n(a.isConnected)?a.remove():null):null};a.setAttribute("data-exiting","");d.addEventListener("animationend",e);$APP.fa(a,"__xToastExitTimer",setTimeout(function(){var h=a.isConnected;return $APP.n($APP.n(h)?
17
- $APP.k(a,"__xToastExiting"):h)?(d.removeEventListener("animationend",e),a.__xToastExitTimer=null,a.remove()):null},b+60))}}return null},vu=function(a,b){var c=$APP.k(a,"__xToastModel");c=$APP.n(c)?c:ku(a);b=$APP.Wi(du(c,b));$APP.bh(a,"x-toast-dismiss",b)&&ru(a)},wu=function(a,b){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ku(a)}();$APP.n(function(){var d=cu(c);return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),vu(a,"button"));return null},xu=function(a,
18
- b){if($APP.B.j(b.key,"Escape")){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ku(a)}();$APP.n(function(){var d=cu(c);return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),vu(a,"keyboard"))}return null},yu=function(a){function b(e){return xu(a,e)}function c(e){return wu(a,e)}var d=ju(a);d=$APP.H(d);$APP.C(d,$APP.lm).addEventListener("click",c);a.addEventListener("keydown",b);$APP.fa(a,"__xToastHandlers",{click:c,keydown:b})},zu=function(a){qu(a);var b=
19
- $APP.k(a,"__xToastExitTimer");$APP.n(b)&&(clearTimeout(b),a.__xToastExitTimer=null);b=$APP.k(a,"__xToastHandlers");var c=$APP.k(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.lm.i(c);var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xToastHandlers=null},Au=function(a){$APP.dh(a,"type","type","info");$APP.dh(a,"heading","heading","");$APP.dh(a,"message","message","");$APP.eh(a,"icon","icon");Object.defineProperty(a,
20
- "dismissible",{get:function(){return Wt(this.getAttribute("dismissible"))},set:function(b){return $APP.n(b)?this.setAttribute("dismissible",""):this.setAttribute("dismissible","false")},enumerable:!0,configurable:!0});$APP.ch(a,"disabled","disabled");Object.defineProperty(a,"timeoutMs",{get:function(){return Yt(this.getAttribute("timeout-ms"))},set:function(b){return b==null?this.removeAttribute("timeout-ms"):this.setAttribute("timeout-ms",""+$APP.R.i(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,
21
- "showProgress",{get:function(){return Xt(this.getAttribute("show-progress"))},set:function(b){return $APP.n(b)?this.setAttribute("show-progress",""):this.removeAttribute("show-progress")},enumerable:!0,configurable:!0})},Bu=function(a){return a.dismiss=function(b){var c=$APP.p($APP.k(this,"__xToastExiting"));$APP.n(c?this.isConnected:c)&&vu(this,typeof b==="string"?b:"api");return null}},Cu=function(a){ju(a);zu(a);yu(a);mu(a);uu(a);return null},Du=function(a){zu(a);return null},Eu=function(a,b,c,
22
- d){$APP.M(c,d)&&(mu(a),$APP.n(a.isConnected)&&su(a));return null},Gu=function(){return $APP.Wg("x-toast",new $APP.P(null,5,[$APP.Mg,Fu,$APP.Ng,Cu,$APP.Og,Du,$APP.Qg,Eu,$APP.Ug,function(a){Au(a);return Bu(a)}],null))},Hu=function(){return Gu()},iu=new $APP.F(null,"heading-el","heading-el",-1277272161),au=new $APP.F(null,"show-progress?","show-progress?",-1681518912),hu=new $APP.F(null,"inner","inner",-1383171215),gu=new $APP.F(null,"message-el","message-el",-683533234),fu=new $APP.F(null,"progress-bar",
23
- "progress-bar",-123877022),$t=new $APP.F(null,"show-progress-attr","show-progress-attr",1680262066);var Fu="type heading message icon dismissible disabled timeout-ms show-progress".split(" ");$APP.Ud(["x-toast-dismiss",new $APP.P(null,2,[$APP.Z,new $APP.P(null,4,[$APP.S,$APP.V,$APP.bk,$APP.V,$APP.$m,$APP.V,$APP.Ul,$APP.V],null),$APP.Un,!0],null)]);
24
- var St=new $APP.P(null,4,["info",$APP.Nm,"success",$APP.cm,"warning",$APP.Rn,"error",$APP.Qj],null),Ut=new $APP.P(null,4,[$APP.Nm,"info",$APP.cm,"success",$APP.Rn,"warning",$APP.Qj,"error"],null),lu=new $APP.P(null,4,[$APP.Nm,"ℹ",$APP.cm,"✓",$APP.Rn,"!",$APP.Qj,"⨯"],null);$APP.da("baredom.exports.x_toast.init",Hu);export const init=Hu;
2
+ var ew=function(a){a=$APP.C(dw,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Fp},gw=function(a){a=$APP.C(fw,a);return $APP.n(a)?a:"info"},hw=function(a){return a==null?!0:$APP.I((""+$APP.V.i(a)).trim().toLowerCase(),"false")},iw=function(a){return a==null?!1:$APP.I((""+$APP.V.i(a)).trim().toLowerCase(),"false")},jw=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>0?a:null):null},kw=function(a){return typeof a==="string"?(a=
3
+ a.trim(),$APP.I(a,"")&&$APP.I(a.toLowerCase(),"none")?a:null):null},nw=function(a){var b=$APP.G(a),c=$APP.C(b,$APP.Go),d=$APP.C(b,$APP.Qp);a=$APP.C(b,$APP.Cn);var e=$APP.C(b,$APP.vi),f=$APP.C(b,$APP.Fm),h=$APP.C(b,$APP.lm),l=$APP.C(b,lw),m=$APP.C(b,$APP.Hm);b=$APP.C(b,$APP.Kn);m=ew(m);b=kw(b);h=$APP.n($APP.n(h)?b==null:h)?$APP.mr:b!=null?$APP.Tp:$APP.Yh;return $APP.Wf([mw,$APP.Xm,$APP.Q,$APP.$o,$APP.uo,$APP.Bi,$APP.Kq,$APP.Go,$APP.Qp],[iw(l),hw(a),m,$APP.A.j(h,$APP.Tp)?b:null,h,$APP.D(e),jw(f),function(){var q=
4
+ typeof c==="string"?c.trim():null;return $APP.n(q)?q:""}(),function(){var q=typeof d==="string"?d.trim():null;return $APP.n(q)?q:""}()])},ow=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.Xm);b=$APP.C(b,$APP.Bi);return $APP.n(a)?$APP.p(b):a},pw=function(a,b){var c=$APP.G(a);a=$APP.C(c,$APP.Q);var d=$APP.C(c,$APP.Qp);c=$APP.C(c,$APP.Go);return new $APP.O(null,4,[$APP.Q,gw(a),$APP.Ym,b,$APP.Qp,d,$APP.Go,c],null)},qw=function(a){var b=$APP.G(a);a=$APP.C(b,mw);b=$APP.C(b,$APP.Kq);return $APP.D($APP.n(a)?
5
+ b!=null&&b>0:a)},vw=function(a){var b=$APP.k(a,"__xToastRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),h=document.createElement("slot"),l=document.createElement("span"),m=document.createElement("div"),q=document.createElement("span"),r=document.createElement("span"),v=document.createElement("button"),x=document.createElement("span"),z=document.createElement("div"),
6
+ B=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-toast-radius:var(--x-radius-lg,12px);--x-toast-padding-y:14px;--x-toast-padding-x:16px;--x-toast-gap:12px;--x-toast-font-size:var(--x-font-size-sm,0.875rem);--x-toast-heading-font-size:0.9375rem;--x-toast-heading-weight:600;--x-toast-min-width:min(280px,calc(100vw - 2rem));--x-toast-max-width:min(480px,calc(100vw - 2rem));--x-toast-border-width:1px;--x-toast-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08));--x-toast-motion-fast:var(--x-transition-duration,120ms);--x-toast-motion-ease:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-toast-enter-duration:200ms;--x-toast-exit-duration:180ms;--x-toast-press-scale:0.97;--x-toast-disabled-opacity:0.55;--x-toast-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.6));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(0,0,0,0.50));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(0,0,0,0.06));--x-toast-progress-height:3px;--x-toast-progress-bg:var(--x-color-border,rgba(0,0,0,0.08));--x-toast-info-bg:var(--x-color-bg,#ffffff);--x-toast-info-border:rgba(0,102,204,0.30);--x-toast-info-color:rgba(15,23,42,0.92);--x-toast-info-icon-color:rgba(0,102,204,0.85);--x-toast-info-progress-fill:rgba(0,102,204,0.70);--x-toast-success-bg:var(--x-color-bg,#ffffff);--x-toast-success-border:rgba(16,140,72,0.30);--x-toast-success-color:rgba(15,23,42,0.92);--x-toast-success-icon-color:rgba(16,140,72,0.85);--x-toast-success-progress-fill:rgba(16,140,72,0.70);--x-toast-warning-bg:var(--x-color-bg,#ffffff);--x-toast-warning-border:rgba(204,120,0,0.40);--x-toast-warning-color:rgba(15,23,42,0.92);--x-toast-warning-icon-color:rgba(180,100,0,0.85);--x-toast-warning-progress-fill:rgba(204,120,0,0.70);--x-toast-error-bg:var(--x-color-bg,#ffffff);--x-toast-error-border:rgba(190,20,40,0.40);--x-toast-error-color:rgba(15,23,42,0.92);--x-toast-error-icon-color:rgba(190,20,40,0.85);--x-toast-error-progress-fill:rgba(190,20,40,0.70);--x-toast-bg:transparent;--x-toast-border-color:transparent;--x-toast-color:inherit;--x-toast-icon-color:inherit;--x-toast-progress-fill:currentColor;}@media (prefers-color-scheme:dark){:host{--x-toast-shadow:var(--x-shadow-md,0 4px 20px rgba(0,0,0,0.40),0 1px 6px rgba(0,0,0,0.30));--x-toast-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.75));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(255,255,255,0.65));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(255,255,255,0.12));--x-toast-progress-bg:var(--x-color-border,rgba(255,255,255,0.10));--x-toast-info-bg:var(--x-color-bg,#1e293b);--x-toast-info-border:rgba(80,160,255,0.35);--x-toast-info-color:rgba(248,250,252,0.92);--x-toast-info-icon-color:rgba(96,165,250,0.90);--x-toast-info-progress-fill:rgba(96,165,250,0.75);--x-toast-success-bg:var(--x-color-bg,#1e293b);--x-toast-success-border:rgba(60,210,120,0.35);--x-toast-success-color:rgba(248,250,252,0.92);--x-toast-success-icon-color:rgba(52,211,153,0.90);--x-toast-success-progress-fill:rgba(52,211,153,0.75);--x-toast-warning-bg:var(--x-color-bg,#1e293b);--x-toast-warning-border:rgba(255,190,90,0.40);--x-toast-warning-color:rgba(248,250,252,0.92);--x-toast-warning-icon-color:rgba(251,191,36,0.90);--x-toast-warning-progress-fill:rgba(251,191,36,0.75);--x-toast-error-bg:var(--x-color-bg,#1e293b);--x-toast-error-border:rgba(255,90,110,0.40);--x-toast-error-color:rgba(248,250,252,0.92);--x-toast-error-icon-color:rgba(248,113,113,0.90);--x-toast-error-progress-fill:rgba(248,113,113,0.75);}}:host([data-type\x3d'info']){--x-toast-bg:var(--x-toast-info-bg);--x-toast-border-color:var(--x-toast-info-border);--x-toast-color:var(--x-toast-info-color);--x-toast-icon-color:var(--x-toast-info-icon-color);--x-toast-progress-fill:var(--x-toast-info-progress-fill);}:host([data-type\x3d'success']){--x-toast-bg:var(--x-toast-success-bg);--x-toast-border-color:var(--x-toast-success-border);--x-toast-color:var(--x-toast-success-color);--x-toast-icon-color:var(--x-toast-success-icon-color);--x-toast-progress-fill:var(--x-toast-success-progress-fill);}:host([data-type\x3d'warning']){--x-toast-bg:var(--x-toast-warning-bg);--x-toast-border-color:var(--x-toast-warning-border);--x-toast-color:var(--x-toast-warning-color);--x-toast-icon-color:var(--x-toast-warning-icon-color);--x-toast-progress-fill:var(--x-toast-warning-progress-fill);}:host([data-type\x3d'error']){--x-toast-bg:var(--x-toast-error-bg);--x-toast-border-color:var(--x-toast-error-border);--x-toast-color:var(--x-toast-error-color);--x-toast-icon-color:var(--x-toast-error-icon-color);--x-toast-progress-fill:var(--x-toast-error-progress-fill);}[part\x3dcontainer]{display:flex;flex-direction:column;background:var(--x-toast-bg);border:var(--x-toast-border-width) solid var(--x-toast-border-color);border-radius:var(--x-toast-radius);box-shadow:var(--x-toast-shadow);color:var(--x-toast-color);min-width:var(--x-toast-min-width);max-width:var(--x-toast-max-width);overflow:hidden;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),border-color var(--x-toast-motion-fast) var(--x-toast-motion-ease),opacity var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}[part\x3dinner]{display:flex;align-items:flex-start;gap:var(--x-toast-gap);padding:var(--x-toast-padding-y) var(--x-toast-padding-x);}[part\x3dicon]{flex:0 0 auto;color:var(--x-toast-icon-color);line-height:1;margin-top:0.15em;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dbody]{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0;}[part\x3dheading]{font-size:var(--x-toast-heading-font-size);font-weight:var(--x-toast-heading-weight);line-height:1.2;overflow-wrap:anywhere;}[part\x3dmessage]{font-size:var(--x-toast-font-size);line-height:1.35;overflow-wrap:anywhere;opacity:0.82;}[part\x3ddismiss]{flex:0 0 auto;appearance:none;border:0;background:transparent;color:var(--x-toast-dismiss-color);width:1.5em;height:1.5em;padding:0;margin:0;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}:host(:not([disabled])) [part\x3ddismiss]:hover{background:var(--x-toast-dismiss-hover-bg);}:host(:not([disabled])) [part\x3ddismiss]:active{transform:scale(var(--x-toast-press-scale));}[part\x3ddismiss]:focus{outline:none;}:host(:not([disabled])) [part\x3ddismiss]:focus-visible{outline:2px solid var(--x-toast-focus-ring);outline-offset:2px;}:host([disabled]){opacity:var(--x-toast-disabled-opacity);}:host([disabled]) [part\x3ddismiss]{cursor:default;pointer-events:none;}[part\x3dprogress]{height:var(--x-toast-progress-height);background:var(--x-toast-progress-bg);overflow:hidden;display:none;}[part\x3dprogress-bar]{height:100%;width:100%;background:var(--x-toast-progress-fill);animation:x-toast-progress var(--x-toast-timeout,0ms) linear forwards;animation-play-state:paused;}:host([data-progress-active]) [part\x3dprogress-bar]{animation-play-state:running;}@keyframes x-toast-progress{from{width:100%;}to{width:0%;}}:host([data-entering]) [part\x3dcontainer]{animation:x-toast-enter var(--x-toast-enter-duration) var(--x-toast-motion-ease) both;}@keyframes x-toast-enter{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);}}:host([data-exiting]) [part\x3dcontainer]{animation:x-toast-exit var(--x-toast-exit-duration) var(--x-toast-motion-ease) forwards;}@keyframes x-toast-exit{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-8px);}}@media (prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3ddismiss]{transition:none !important;}:host([data-entering]) [part\x3dcontainer],:host([data-exiting]) [part\x3dcontainer]{animation:none !important;}:host([data-progress-active]) [part\x3dprogress-bar]{animation:none !important;}}";
7
+ d.setAttribute("part","container");e.setAttribute("part","inner");f.setAttribute("part","icon");f.setAttribute("aria-hidden","true");h.setAttribute("name","icon");l.setAttribute("part","default-icon");h.appendChild(l);f.appendChild(h);m.setAttribute("part","body");q.setAttribute("part","heading");r.setAttribute("part","message");m.appendChild(q);m.appendChild(r);v.setAttribute("part","dismiss");v.setAttribute("type","button");v.setAttribute("aria-label","Dismiss toast");x.setAttribute("aria-hidden",
8
+ "true");x.textContent="×";v.appendChild(x);e.appendChild(f);e.appendChild(m);e.appendChild(v);z.setAttribute("part","progress");B.setAttribute("part","progress-bar");z.appendChild(B);d.appendChild(e);d.appendChild(z);b.appendChild(c);b.appendChild(d);b=$APP.Wf([rw,$APP.gr,sw,$APP.cp,$APP.Uq,tw,$APP.jj,$APP.kj,$APP.tn,$APP.hm,$APP.En,uw],[B,l,r,v,m,e,b,d,z,f,h,q]);a.__xToastRefs=b;return $APP.k(a,"__xToastRefs")},ww=function(a){return nw($APP.Wf([$APP.Cn,$APP.vi,$APP.Fm,$APP.lm,lw,$APP.Kn,$APP.Hm,
9
+ $APP.Go,$APP.Qp],[a.getAttribute("dismissible"),a.hasAttribute("disabled"),a.getAttribute("timeout-ms"),a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},yw=function(a){var b=ww(a);if($APP.I($APP.k(a,"__xToastModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.Q),d=$APP.C(b,$APP.Qp),e=$APP.C(b,$APP.Go),f=$APP.C(b,$APP.uo),h=$APP.C(b,$APP.$o),l=$APP.C(b,$APP.Xm),m=$APP.C(b,$APP.Bi),q=$APP.C(b,$APP.Kq),
10
+ r=vw(a),v=$APP.G(r),x=$APP.C(v,$APP.En);r=$APP.C(v,uw);var z=$APP.C(v,rw),B=$APP.C(v,$APP.gr),E=$APP.C(v,sw),H=$APP.C(v,$APP.cp),K=$APP.C(v,$APP.kj),J=$APP.C(v,$APP.tn);v=$APP.C(v,$APP.hm);x=$APP.n(x)?x.assignedNodes().length>0:null;$APP.A.j(f,$APP.Tp)||(h=$APP.C(xw,c),h=$APP.n(h)?h:$APP.C(xw,$APP.Fp));f=$APP.p(x)&&$APP.A.j(f,$APP.mr);x=qw(b);$APP.S(a,"data-type",gw(c));var P=K.setAttribute;c=$APP.A.j(c,$APP.xq)||$APP.A.j(c,$APP.Nm)?"alert":"status";P.call(K,"role",c);r.textContent=d;r.style.display=
11
+ $APP.A.j(d,"")?"none":"";E.textContent=e;f?(B.textContent="",v.style.display="none"):(B.textContent=h,v.style.display="inline");$APP.n(l)?(H.disabled=$APP.D(m),H.style.display="inline-flex"):(H.disabled=!0,H.style.display="none");x?(J.style.display="block",z.style.setProperty("--x-toast-timeout",""+$APP.V.i(q)+"ms")):J.style.display="none";d=$APP.n(l)?$APP.p(m):l;a.tabIndex=$APP.n(d)?0:-1;$APP.n(m)?$APP.S(a,"aria-disabled","true"):$APP.T(a,"aria-disabled");$APP.n(d)?$APP.S(a,"aria-keyshortcuts","Escape"):
12
+ $APP.T(a,"aria-keyshortcuts");a.__xToastModel=b}},zw=function(){return $APP.D(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},Aw=function(a){a=typeof a==="string"?a.trim():"";return $APP.A.j(a,"")||$APP.A.j(a,"0")||$APP.A.j(a,"0ms")||$APP.A.j(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},Bw=function(a){var b=
13
+ window.getComputedStyle(a);a=Aw(b.getPropertyValue("--x-toast-exit-duration"));b=Aw(b.getPropertyValue("--x-motion-exit-duration"));return a>0?a:b>0?b:180},Cw=function(a){var b=$APP.k(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),a.__xToastTimeout=null)},Ew=function(a){Cw(a);var b=function(){var c=$APP.k(a,"__xToastModel");return $APP.n(c)?c:ww(a)}();$APP.n(function(){var c=ow(b);return $APP.n(c)?typeof $APP.Kq.i(b)==="number"&&$APP.p($APP.k(a,"__xToastExiting")):c}())&&$APP.ja(a,"__xToastTimeout",
14
+ setTimeout(function(){a.__xToastTimeout=null;if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ww(a)}();if($APP.n(ow(c)))return c=$APP.$l(pw(c,"timeout")),$APP.Ph(a,"x-toast-dismiss",c)?Dw.i?Dw.i(a):Dw.call(null,a):null}return null},$APP.Kq.i(b)));return null},Fw=function(a){var b=$APP.k(a,"__xToastModel");$APP.n($APP.n(b)?qw(b):b)&&$APP.S(a,"data-progress-active","");return Ew(a)},
15
+ Gw=function(a){if(!$APP.n($APP.k(a,"__xToastEntered")))if(a.__xToastEntered=!0,$APP.S(a,"data-entering",""),zw())$APP.T(a,"data-entering"),Fw(a);else{var b=vw(a);b=$APP.G(b);var c=$APP.C(b,$APP.kj);c.addEventListener("animationend",function f(e){return $APP.A.j(e.target,c)?(c.removeEventListener("animationend",f),$APP.T(a,"data-entering"),Fw(a)):null})}},Dw=function(a){if(!$APP.n($APP.k(a,"__xToastExiting"))){a.__xToastExiting=!0;Cw(a);$APP.T(a,"data-entering");$APP.T(a,"data-progress-active");var b=
16
+ Bw(a);if(b===0||zw())a.remove();else{var c=vw(a);c=$APP.G(c);var d=$APP.C(c,$APP.kj),e=function l(h){return $APP.A.j(h.target,d)?(d.removeEventListener("animationend",l),h=$APP.k(a,"__xToastExitTimer"),$APP.n(h)&&(clearTimeout(h),a.__xToastExitTimer=null),$APP.n(a.isConnected)?a.remove():null):null};$APP.S(a,"data-exiting","");d.addEventListener("animationend",e);$APP.ja(a,"__xToastExitTimer",setTimeout(function(){var h=a.isConnected;return $APP.n($APP.n(h)?$APP.k(a,"__xToastExiting"):h)?(d.removeEventListener("animationend",
17
+ e),a.__xToastExitTimer=null,a.remove()):null},b+60))}}return null},Hw=function(a,b){var c=$APP.k(a,"__xToastModel");c=$APP.n(c)?c:ww(a);b=$APP.$l(pw(c,b));$APP.Ph(a,"x-toast-dismiss",b)&&Dw(a)},Iw=function(a,b){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ww(a)}();$APP.n(function(){var d=ow(c);return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),Hw(a,"button"));return null},Jw=function(a,b){if($APP.A.j(b.key,"Escape")){var c=function(){var d=$APP.k(a,
18
+ "__xToastModel");return $APP.n(d)?d:ww(a)}();$APP.n(function(){var d=ow(c);return $APP.n(d)?$APP.p($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),Hw(a,"keyboard"))}return null},Kw=function(a){function b(e){return Jw(a,e)}function c(e){return Iw(a,e)}var d=vw(a);d=$APP.G(d);$APP.C(d,$APP.cp).addEventListener("click",c);a.addEventListener("keydown",b);$APP.ja(a,"__xToastHandlers",{click:c,keydown:b})},Lw=function(a){Cw(a);var b=$APP.k(a,"__xToastExitTimer");$APP.n(b)&&(clearTimeout(b),a.__xToastExitTimer=
19
+ null);b=$APP.k(a,"__xToastHandlers");var c=$APP.k(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.cp.i(c);var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xToastHandlers=null},Mw=function(a){$APP.Th(a,"type","type","info");$APP.Th(a,"heading","heading","");$APP.Th(a,"message","message","");$APP.Uh(a,"icon","icon");Object.defineProperty(a,"dismissible",{get:function(){return hw(this.getAttribute("dismissible"))},
20
+ set:function(b){return $APP.n(b)?this.setAttribute("dismissible",""):this.setAttribute("dismissible","false")},enumerable:!0,configurable:!0});$APP.Sh(a,"disabled","disabled");Object.defineProperty(a,"timeoutMs",{get:function(){return jw(this.getAttribute("timeout-ms"))},set:function(b){return b==null?this.removeAttribute("timeout-ms"):this.setAttribute("timeout-ms",""+$APP.V.i(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"showProgress",{get:function(){return iw(this.getAttribute("show-progress"))},
21
+ set:function(b){return $APP.n(b)?this.setAttribute("show-progress",""):this.removeAttribute("show-progress")},enumerable:!0,configurable:!0})},Nw=function(a){return a.dismiss=function(b){var c=$APP.p($APP.k(this,"__xToastExiting"));$APP.n(c?this.isConnected:c)&&Hw(this,typeof b==="string"?b:"api");return null}},Ow=function(a){vw(a);Lw(a);Kw(a);yw(a);Gw(a);return null},Pw=function(a){Lw(a);return null},Qw=function(a,b,c,d){$APP.I(c,d)&&(yw(a),$APP.n(a.isConnected)&&Ew(a));return null},Sw=function(){return $APP.Ah("x-toast",
22
+ new $APP.O(null,5,[$APP.qh,Rw,$APP.oh,Ow,$APP.lh,Pw,$APP.kh,Qw,$APP.ph,function(a){Mw(a);return Nw(a)}],null))},Tw=function(){return Sw()},uw=new $APP.F(null,"heading-el","heading-el",-1277272161),mw=new $APP.F(null,"show-progress?","show-progress?",-1681518912),tw=new $APP.F(null,"inner","inner",-1383171215),sw=new $APP.F(null,"message-el","message-el",-683533234),rw=new $APP.F(null,"progress-bar","progress-bar",-123877022),lw=new $APP.F(null,"show-progress-attr","show-progress-attr",1680262066);var Rw="type heading message icon dismissible disabled timeout-ms show-progress".split(" ");$APP.ce(["x-toast-dismiss",new $APP.O(null,2,[$APP.U,new $APP.O(null,4,[$APP.Q,$APP.X,$APP.Ym,$APP.X,$APP.Qp,$APP.X,$APP.Go,$APP.X],null),$APP.Aq,!0],null)]);
23
+ var dw=new $APP.O(null,4,["info",$APP.Fp,"success",$APP.Oo,"warning",$APP.xq,"error",$APP.Nm],null),fw=new $APP.O(null,4,[$APP.Fp,"info",$APP.Oo,"success",$APP.xq,"warning",$APP.Nm,"error"],null),xw=new $APP.O(null,4,[$APP.Fp,"ℹ",$APP.Oo,"✓",$APP.xq,"!",$APP.Nm,"⨯"],null);$APP.ha("baredom.exports.x_toast.init",Tw);export const init=Tw;
package/dist/x-toaster.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Iw=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Vc(Hw,a)?a:"top-end"},Jw=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},Zw=function(a){if(!$APP.n($APP.k(a,"__xToasterRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=Yw;b.appendChild(c);b.appendChild(d);a.__xToasterRefs=new $APP.P(null,2,[$APP.Qh,b,$APP.dn,d],null)}},bx=function(a){a=
3
- new $APP.P(null,3,[$APP.ol,a.getAttribute("position"),$w,a.getAttribute("max-toasts"),$APP.Bh,a.getAttribute("label")],null);var b=$APP.H(a),c=$APP.C(b,$APP.ol);a=$APP.C(b,$w);b=$APP.C(b,$APP.Bh);c=Iw(c);a=Jw(a);return new $APP.P(null,3,[$APP.Io,c,ax,$APP.n(a)?a:5,$APP.X,typeof b==="string"&&$APP.M(b.trim(),"")?b:"Notifications"],null)},cx=function(a){var b=bx(a);if($APP.M($APP.k(a,"__xToasterModel"),b)){b=$APP.H(b);var c=$APP.C(b,$APP.Io),d=$APP.C(b,$APP.X);Zw(a);a.setAttribute("role","region");
4
- a.setAttribute("aria-label",d);a.setAttribute("data-position",c);a.__xToasterModel=b}},dx=function(a){function b(c){var d=c.detail;if($APP.M($APP.k(d,"reason"),"toaster-remove")){c.preventDefault();var e=$APP.k(d,"type"),f=$APP.k(d,"reason"),h=$APP.k(d,"heading");d=$APP.k(d,"message");e=$APP.Wi(new $APP.P(null,4,[$APP.S,$APP.n(e)?e:"info",$APP.bk,$APP.n(f)?f:"",$APP.$m,$APP.n(h)?h:"",$APP.Ul,$APP.n(d)?d:""],null));$APP.bh(a,"x-toaster-dismiss",e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",
5
- b);$APP.fa(a,"__xToasterHandlers",{dismiss:b})},ex=function(a){var b=$APP.k(a,"__xToasterHandlers");$APP.n(b)&&(b=$APP.k(b,"dismiss"),$APP.n(b)&&a.removeEventListener("x-toast-dismiss",b));a.__xToasterHandlers=null},fx=function(a){Object.defineProperty(a,"position",{get:function(){return Iw(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",""+$APP.R.i(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=
6
- this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.M(b,""):b)?this.setAttribute("label",""+$APP.R.i(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=Jw(this.getAttribute("max-toasts"));return $APP.n(b)?b:5},set:function(b){return b==null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.R.i(Math.floor(b)))},enumerable:!0,configurable:!0});return Object.defineProperty(a,
7
- "toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.k(this,"__xToasterModel");c=$APP.n(c)?c:bx(this);var d=ax.i(c);c=this.querySelectorAll("x-toast");var e=c.length;if(e>=d)for(d=e-d- -1,e=0;;)if(e<d)c[e].dismiss("toaster-remove"),e+=1;else break;c=document.createElement("x-toast");d=$APP.k(b,"type");$APP.n(d)&&c.setAttribute("type",d);d=$APP.k(b,"heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.k(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.k(b,"icon");$APP.n(d)&&c.setAttribute("icon",
8
- d);$APP.k(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.k(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.R.i(d));$APP.n($APP.k(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},gx=function(a){Zw(a);ex(a);dx(a);cx(a);return null},hx=function(a){ex(a);return null},ix=function(a,b,c,d){$APP.M(c,d)&&cx(a);return null},kx=function(){return $APP.Wg("x-toaster",new $APP.P(null,5,[$APP.Mg,jx,$APP.Ng,gx,
9
- $APP.Og,hx,$APP.Qg,ix,$APP.Ug,fx],null))},$w=new $APP.F(null,"max-toasts-raw","max-toasts-raw",-815087069),ax=new $APP.F(null,"max-toasts","max-toasts",-1982289139);var jx=["position","max-toasts","label"];$APP.Ud(["x-toaster-dismiss",new $APP.P(null,2,[$APP.Z,new $APP.P(null,4,[$APP.S,$APP.V,$APP.bk,$APP.V,$APP.$m,$APP.V,$APP.Ul,$APP.V],null),$APP.Un,!0],null)]);var Hw=new $APP.Q(null,new $APP.P(null,6,["top-center",null,"bottom-start",null,"bottom-end",null,"bottom-center",null,"top-end",null,"top-start",null],null),null);var Yw=":host{display:flex;position:fixed;z-index:var(--x-toaster-z-index,9000);gap:var(--x-toaster-gap,8px);width:max-content;max-width:var(--x-toaster-max-width,min(480px,calc(100vw - 2rem)));box-sizing:border-box;pointer-events:none;color-scheme:light dark;}::slotted("+$APP.R.i("x-toast")+"){pointer-events:auto;}slot{display:contents;}:host([data-position\x3d'top-start']){top:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'top-center']){top:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column-reverse;align-items:center;}:host([data-position\x3d'top-end']){top:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'bottom-start']){bottom:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column;}:host([data-position\x3d'bottom-center']){bottom:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column;align-items:center;}:host([data-position\x3d'bottom-end']){bottom:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column;}";$APP.da("baredom.exports.x_toaster.init",kx);export const init=kx;
2
+ var Ty=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.$c(Sy,a)?a:"top-end"},Uy=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},Wy=function(a){if(!$APP.n($APP.k(a,"__xToasterRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=Vy;b.appendChild(c);b.appendChild(d);a.__xToasterRefs=new $APP.O(null,2,[$APP.jj,b,$APP.Vp,d],null)}},Zy=function(a){a=
3
+ new $APP.O(null,3,[$APP.ao,a.getAttribute("position"),Xy,a.getAttribute("max-toasts"),$APP.ui,a.getAttribute("label")],null);var b=$APP.G(a),c=$APP.C(b,$APP.ao);a=$APP.C(b,Xy);b=$APP.C(b,$APP.ui);c=Ty(c);a=Uy(a);return new $APP.O(null,3,[$APP.nr,c,Yy,$APP.n(a)?a:5,$APP.Z,typeof b==="string"&&$APP.I(b.trim(),"")?b:"Notifications"],null)},$y=function(a){var b=Zy(a);if($APP.I($APP.k(a,"__xToasterModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.nr),d=$APP.C(b,$APP.Z);Wy(a);$APP.S(a,"role","region");$APP.S(a,
4
+ "aria-label",d);$APP.S(a,"data-position",c);a.__xToasterModel=b}},az=function(a){function b(c){var d=c.detail;if($APP.I($APP.k(d,"reason"),"toaster-remove")){c.preventDefault();var e=$APP.k(d,"type"),f=$APP.k(d,"reason"),h=$APP.k(d,"heading");d=$APP.k(d,"message");e=$APP.$l(new $APP.O(null,4,[$APP.Q,$APP.n(e)?e:"info",$APP.Ym,$APP.n(f)?f:"",$APP.Qp,$APP.n(h)?h:"",$APP.Go,$APP.n(d)?d:""],null));$APP.Ph(a,"x-toaster-dismiss",e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",
5
+ b);$APP.ja(a,"__xToasterHandlers",{dismiss:b})},bz=function(a){var b=$APP.k(a,"__xToasterHandlers");$APP.n(b)&&(b=$APP.k(b,"dismiss"),$APP.n(b)&&a.removeEventListener("x-toast-dismiss",b));a.__xToasterHandlers=null},cz=function(a){Object.defineProperty(a,"position",{get:function(){return Ty(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",""+$APP.V.i(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=
6
+ this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.I(b,""):b)?this.setAttribute("label",""+$APP.V.i(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=Uy(this.getAttribute("max-toasts"));return $APP.n(b)?b:5},set:function(b){return b==null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.V.i(Math.floor(b)))},enumerable:!0,configurable:!0});return Object.defineProperty(a,
7
+ "toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.k(this,"__xToasterModel");c=$APP.n(c)?c:Zy(this);var d=Yy.i(c);c=this.querySelectorAll("x-toast");var e=c.length;if(e>=d)for(d=e-d- -1,e=0;;)if(e<d)c[e].dismiss("toaster-remove"),e+=1;else break;c=document.createElement("x-toast");d=$APP.k(b,"type");$APP.n(d)&&c.setAttribute("type",d);d=$APP.k(b,"heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.k(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.k(b,"icon");$APP.n(d)&&c.setAttribute("icon",
8
+ d);$APP.k(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.k(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.V.i(d));$APP.n($APP.k(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},dz=function(a){Wy(a);bz(a);az(a);$y(a);return null},ez=function(a){bz(a);return null},fz=function(a,b,c,d){$APP.I(c,d)&&$y(a);return null},hz=function(){return $APP.Ah("x-toaster",new $APP.O(null,5,[$APP.qh,gz,$APP.oh,dz,
9
+ $APP.lh,ez,$APP.kh,fz,$APP.ph,cz],null))},Xy=new $APP.F(null,"max-toasts-raw","max-toasts-raw",-815087069),Yy=new $APP.F(null,"max-toasts","max-toasts",-1982289139);var gz=["position","max-toasts","label"];$APP.ce(["x-toaster-dismiss",new $APP.O(null,2,[$APP.U,new $APP.O(null,4,[$APP.Q,$APP.X,$APP.Ym,$APP.X,$APP.Qp,$APP.X,$APP.Go,$APP.X],null),$APP.Aq,!0],null)]);var Sy=new $APP.pg(null,new $APP.O(null,6,["top-center",null,"bottom-start",null,"bottom-end",null,"bottom-center",null,"top-end",null,"top-start",null],null),null);var Vy=":host{display:flex;position:fixed;z-index:var(--x-toaster-z-index,9000);gap:var(--x-toaster-gap,8px);width:max-content;max-width:var(--x-toaster-max-width,min(480px,calc(100vw - 2rem)));box-sizing:border-box;pointer-events:none;color-scheme:light dark;}::slotted("+$APP.V.i("x-toast")+"){pointer-events:auto;}slot{display:contents;}:host([data-position\x3d'top-start']){top:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'top-center']){top:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column-reverse;align-items:center;}:host([data-position\x3d'top-end']){top:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'bottom-start']){bottom:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column;}:host([data-position\x3d'bottom-center']){bottom:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column;align-items:center;}:host([data-position\x3d'bottom-end']){bottom:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column;}";$APP.ha("baredom.exports.x_toaster.init",hz);export const init=hz;
package/dist/x-tooltip.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var rw=function(a){a=new $APP.P(null,5,[$APP.$i,a.getAttribute("text"),$APP.Oo,a.getAttribute("placement"),ow,a.getAttribute("delay"),$APP.Eh,a.hasAttribute("disabled"),$APP.Sj,a.hasAttribute("open")],null);var b=$APP.H(a),c=$APP.C(b,$APP.$i),d=$APP.C(b,$APP.Oo),e=$APP.C(b,ow);a=$APP.C(b,$APP.Eh);b=$APP.C(b,$APP.Sj);c=$APP.n(c)?c:"";d=$APP.Vc(pw,d)?d:"top";e!=null?(e=parseInt(e,10),e=$APP.n(isNaN(e))?400:$APP.Di.j($APP.Ci.j(e,0),5E3)):e=400;return new $APP.P(null,5,[$APP.an,c,$APP.gl,d,qw,e,$APP.Y,
3
- $APP.E(a),$APP.to,$APP.E(b)],null)},sw=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){a=rw(a);var c=$APP.H(a);a=$APP.C(c,$APP.an);var d=$APP.C(c,$APP.gl);c=$APP.C(c,$APP.to);var e=$APP.k(b,"panel");b=$APP.k(b,"text");e.setAttribute("data-placement",d);$APP.Zg(e,"aria-hidden",""+$APP.R.i($APP.p(c)));b.textContent=a}},tw=function(a){var b=$APP.k(a,"__xTooltipShowTimer");$APP.n(b)&&(clearTimeout(b),a.__xTooltipShowTimer=null)},uw=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
4
- tw(a);if($APP.n($APP.n(b)?b:a.hasAttribute("open"))){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");return $APP.ah(a,"x-tooltip-show",{})}b=rw(a);b=$APP.H(b);b=$APP.C(b,qw);return b===0?(a.setAttribute("open",""),$APP.ah(a,"x-tooltip-show",{})):$APP.Xg(a,"__xTooltipShowTimer",setTimeout(function(){a.__xTooltipShowTimer=null;return $APP.n(a.isConnected)?(a.setAttribute("open",""),$APP.ah(a,"x-tooltip-show",{})):null},b))},vw=function(a){tw(a);return $APP.n(a.hasAttribute("open"))?
5
- (a.removeAttribute("open"),$APP.ah(a,"x-tooltip-hide",{})):null},ww=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(b,"triggerSlot").assignedElements();b=$APP.k(a,"__xTooltipId");var d=$APP.k(a,"__xTooltipTriggerEl");$APP.n(d)&&(d.removeAttribute("aria-describedby"),a.__xTooltipTriggerEl=null);if(c.length>0){c=c[0];c.setAttribute("aria-describedby",b);a.__xTooltipTriggerEl=c;return}}return null},xw=function(a){return{pointerenter:function(){return uw(a,!1)},pointerleave:function(){return vw(a)},
6
- focusin:function(){return uw(a,!0)},focusout:function(b){b=b.relatedTarget;return b==null||$APP.p(a.contains(b))?vw(a):null},keydown:function(b){b=$APP.B.j(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?vw(a):null},slotchange:function(){return ww(a)}}},yw=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(a,"__xTooltipHandlers");$APP.n(c)&&(b=$APP.k(b,"triggerSlot"),a.removeEventListener("pointerenter",$APP.k(c,"pointerenter")),a.removeEventListener("pointerleave",
7
- $APP.k(c,"pointerleave")),a.removeEventListener("focusin",$APP.k(c,"focusin")),a.removeEventListener("focusout",$APP.k(c,"focusout")),a.removeEventListener("keydown",$APP.k(c,"keydown")),b.removeEventListener("slotchange",$APP.k(c,"slotchange")))}},Aw=function(a){if(!$APP.n($APP.k(a,"__xTooltipRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("slot"),f=document.createElement("div"),h=document.createElement("div"),
8
- l=document.createElement("div"),m=document.createElement("span"),q=document.createElement("slot");var r=$APP.k(zw,"n")+1;zw.n=r;r="x-tt-"+$APP.R.i(r);c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-tooltip-bg:var(--x-color-bg,#ffffff);--x-tooltip-text:var(--x-color-text,#0f172a);--x-tooltip-border:1px solid var(--x-color-border,#e2e8f0);--x-tooltip-padding:var(--x-space-xs,4px) var(--x-space-sm,8px);--x-tooltip-radius:var(--x-radius-md,6px);--x-tooltip-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-tooltip-z:var(--x-z-dropdown,1000);--x-tooltip-max-width:min(280px,calc(100vw - 2rem));--x-tooltip-font-size:var(--x-font-size-xs,0.75rem);--x-tooltip-arrow-size:6px;--x-tooltip-offset:4px;--x-tooltip-transition-duration:var(--x-transition-duration,150ms);--x-tooltip-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-tooltip-bg:var(--x-color-bg,#1e293b);--x-tooltip-text:var(--x-color-text,#e2e8f0);--x-tooltip-border:1px solid var(--x-color-border,#334155);--x-tooltip-shadow:0 4px 24px rgba(0,0,0,0.4);}}[part\x3dtrigger]{display:inline-block;}[part\x3dpanel]{position:absolute;z-index:var(--x-tooltip-z);box-sizing:border-box;background:var(--x-tooltip-bg);color:var(--x-tooltip-text);border:var(--x-tooltip-border);padding:var(--x-tooltip-padding);border-radius:var(--x-tooltip-radius);box-shadow:var(--x-tooltip-shadow);max-width:var(--x-tooltip-max-width);font-size:var(--x-tooltip-font-size);font-family:inherit;line-height:1.4;white-space:normal;word-wrap:break-word;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s var(--x-tooltip-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;opacity:1;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dtop]{bottom:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(4px);transform-origin:bottom center;}:host([open]) [part\x3dpanel][data-placement\x3dtop]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dbottom]{top:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(-4px);transform-origin:top center;}:host([open]) [part\x3dpanel][data-placement\x3dbottom]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dleft]{right:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(4px);transform-origin:center right;}:host([open]) [part\x3dpanel][data-placement\x3dleft]{transform:translateY(-50%) translateX(0);}[part\x3dpanel][data-placement\x3dright]{left:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(-4px);transform-origin:center left;}:host([open]) [part\x3dpanel][data-placement\x3dright]{transform:translateY(-50%) translateX(0);}[part\x3darrow]{position:absolute;width:var(--x-tooltip-arrow-size);height:var(--x-tooltip-arrow-size);background:var(--x-tooltip-bg);border:var(--x-tooltip-border);transform:rotate(45deg);pointer-events:none;}[part\x3dpanel][data-placement\x3dtop] [part\x3darrow]{bottom:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-left:none;}[part\x3dpanel][data-placement\x3dbottom] [part\x3darrow]{top:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-right:none;}[part\x3dpanel][data-placement\x3dleft] [part\x3darrow]{right:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-left:none;}[part\x3dpanel][data-placement\x3dright] [part\x3darrow]{left:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-right:none;}[part\x3dbody]{position:relative;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}}";
9
- d.setAttribute("part","trigger");f.setAttribute("part","panel");f.setAttribute("role","tooltip");f.setAttribute("id",r);f.setAttribute("aria-hidden","true");f.setAttribute("data-placement","top");h.setAttribute("part","arrow");h.setAttribute("aria-hidden","true");l.setAttribute("part","body");m.setAttribute("part","text");q.setAttribute("name","content");d.appendChild(e);l.appendChild(m);l.appendChild(q);f.appendChild(h);f.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(f);a.__xTooltipId=
10
- r;a.__xTooltipRefs={trigger:d,triggerSlot:e,panel:f,arrow:h,body:l,text:m,contentSlot:q}}yw(a);a.__xTooltipHandlers=xw(a);c=$APP.k(a,"__xTooltipRefs");$APP.n(c)&&(b=$APP.k(a,"__xTooltipHandlers"),$APP.n(b)&&(c=$APP.k(c,"triggerSlot"),a.addEventListener("pointerenter",$APP.k(b,"pointerenter")),a.addEventListener("pointerleave",$APP.k(b,"pointerleave")),a.addEventListener("focusin",$APP.k(b,"focusin")),a.addEventListener("focusout",$APP.k(b,"focusout")),a.addEventListener("keydown",$APP.k(b,"keydown")),
11
- c.addEventListener("slotchange",$APP.k(b,"slotchange"))));sw(a);return ww(a)},Bw=function(a){tw(a);yw(a);var b=$APP.k(a,"__xTooltipTriggerEl");$APP.n(b)?(b.removeAttribute("aria-describedby"),a.__xTooltipTriggerEl=null,a=void 0):a=null;return a},Cw=function(a){if($APP.n($APP.k(a,"__xTooltipRefs"))){sw(a);var b=a.hasAttribute("disabled");return $APP.n($APP.n(b)?a.hasAttribute("open"):b)?vw(a):null}return null},Ew=function(a){$APP.ih(a,Dw);a.show=function(){return uw(this,!0)};return a.hide=function(){return vw(this)}},
12
- Gw=function(){return $APP.Wg("x-tooltip",new $APP.P(null,5,[$APP.Mg,Fw,$APP.Ng,Aw,$APP.Og,Bw,$APP.Qg,Cw,$APP.Ug,Ew],null))},qw=new $APP.F(null,"delay","delay",-574225219),ow=new $APP.F(null,"delay-raw","delay-raw",886290425);var pw=new $APP.Q(null,new $APP.P(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),Fw=["text","placement","delay","disabled","open"],Dw=new $APP.P(null,5,[$APP.an,new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"text"],null),$APP.gl,new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"placement"],null),qw,new $APP.P(null,3,[$APP.S,$APP.W,$APP.T,"delay",$APP.hh,400],null),$APP.fl,new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"disabled"],null),$APP.Qn,new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"open"],null)],
13
- null);$APP.Ud(["x-tooltip-show",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,$APP.Vd],null),"x-tooltip-hide",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,$APP.Vd],null)]);var zw={n:0};$APP.da("baredom.exports.x_tooltip.init",Gw);export const init=Gw;
2
+ var Cy=function(a){a=new $APP.O(null,5,[$APP.dm,a.getAttribute("text"),$APP.sr,a.getAttribute("placement"),zy,a.getAttribute("delay"),$APP.vi,a.hasAttribute("disabled"),$APP.Qm,a.hasAttribute("open")],null);var b=$APP.G(a),c=$APP.C(b,$APP.dm),d=$APP.C(b,$APP.sr),e=$APP.C(b,zy);a=$APP.C(b,$APP.vi);b=$APP.C(b,$APP.Qm);c=$APP.n(c)?c:"";d=$APP.$c(Ay,d)?d:"top";e!=null?(e=parseInt(e,10),e=$APP.n(isNaN(e))?400:$APP.Hl.j($APP.Gl.j(e,0),5E3)):e=400;return new $APP.O(null,5,[$APP.Rp,c,$APP.Vn,d,By,e,$APP.Bi,
3
+ $APP.D(a),$APP.Zq,$APP.D(b)],null)},Dy=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){a=Cy(a);var c=$APP.G(a);a=$APP.C(c,$APP.Rp);var d=$APP.C(c,$APP.Vn);c=$APP.C(c,$APP.Zq);var e=$APP.k(b,"panel");b=$APP.k(b,"text");$APP.S(e,"data-placement",d);$APP.S(e,"aria-hidden",""+$APP.V.i($APP.p(c)));b.textContent=a}},Ey=function(a){var b=$APP.k(a,"__xTooltipShowTimer");$APP.n(b)&&(clearTimeout(b),$APP.R(a,"__xTooltipShowTimer",null))},Fy=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
4
+ Ey(a);if($APP.n($APP.n(b)?b:a.hasAttribute("open"))){if($APP.n(a.hasAttribute("open")))return null;$APP.S(a,"open","");return $APP.Nh(a,"x-tooltip-show",{})}b=Cy(a);b=$APP.G(b);b=$APP.C(b,By);return b===0?($APP.S(a,"open",""),$APP.Nh(a,"x-tooltip-show",{})):$APP.R(a,"__xTooltipShowTimer",setTimeout(function(){$APP.R(a,"__xTooltipShowTimer",null);return $APP.n(a.isConnected)?($APP.S(a,"open",""),$APP.Nh(a,"x-tooltip-show",{})):null},b))},Gy=function(a){Ey(a);return $APP.n(a.hasAttribute("open"))?($APP.T(a,
5
+ "open"),$APP.Nh(a,"x-tooltip-hide",{})):null},Hy=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(b,"triggerSlot").assignedElements();b=$APP.k(a,"__xTooltipId");var d=$APP.k(a,"__xTooltipTriggerEl");$APP.n(d)&&(d.removeAttribute("aria-describedby"),$APP.R(a,"__xTooltipTriggerEl",null));if(c.length>0)return c=c[0],$APP.S(c,"aria-describedby",b),$APP.R(a,"__xTooltipTriggerEl",c)}return null},Iy=function(a){return{pointerenter:function(){return Fy(a,!1)},pointerleave:function(){return Gy(a)},
6
+ focusin:function(){return Fy(a,!0)},focusout:function(b){b=b.relatedTarget;return b==null||$APP.p(a.contains(b))?Gy(a):null},keydown:function(b){b=$APP.A.j(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Gy(a):null},slotchange:function(){return Hy(a)}}},Jy=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(a,"__xTooltipHandlers");$APP.n(c)&&(b=$APP.k(b,"triggerSlot"),a.removeEventListener("pointerenter",$APP.k(c,"pointerenter")),a.removeEventListener("pointerleave",
7
+ $APP.k(c,"pointerleave")),a.removeEventListener("focusin",$APP.k(c,"focusin")),a.removeEventListener("focusout",$APP.k(c,"focusout")),a.removeEventListener("keydown",$APP.k(c,"keydown")),b.removeEventListener("slotchange",$APP.k(c,"slotchange")))}},Ly=function(a){if(!$APP.n($APP.k(a,"__xTooltipRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("slot"),f=document.createElement("div"),h=document.createElement("div"),
8
+ l=document.createElement("div"),m=document.createElement("span"),q=document.createElement("slot");var r=$APP.k(Ky,"n")+1;Ky.n=r;r="x-tt-"+$APP.V.i(r);c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-tooltip-bg:var(--x-color-bg,#ffffff);--x-tooltip-text:var(--x-color-text,#0f172a);--x-tooltip-border:1px solid var(--x-color-border,#e2e8f0);--x-tooltip-padding:var(--x-space-xs,4px) var(--x-space-sm,8px);--x-tooltip-radius:var(--x-radius-md,6px);--x-tooltip-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-tooltip-z:var(--x-z-dropdown,1000);--x-tooltip-max-width:min(280px,calc(100vw - 2rem));--x-tooltip-font-size:var(--x-font-size-xs,0.75rem);--x-tooltip-arrow-size:6px;--x-tooltip-offset:4px;--x-tooltip-transition-duration:var(--x-transition-duration,150ms);--x-tooltip-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-tooltip-bg:var(--x-color-bg,#1e293b);--x-tooltip-text:var(--x-color-text,#e2e8f0);--x-tooltip-border:1px solid var(--x-color-border,#334155);--x-tooltip-shadow:0 4px 24px rgba(0,0,0,0.4);}}[part\x3dtrigger]{display:inline-block;}[part\x3dpanel]{position:absolute;z-index:var(--x-tooltip-z);box-sizing:border-box;background:var(--x-tooltip-bg);color:var(--x-tooltip-text);border:var(--x-tooltip-border);padding:var(--x-tooltip-padding);border-radius:var(--x-tooltip-radius);box-shadow:var(--x-tooltip-shadow);max-width:var(--x-tooltip-max-width);font-size:var(--x-tooltip-font-size);font-family:inherit;line-height:1.4;white-space:normal;word-wrap:break-word;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s var(--x-tooltip-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;opacity:1;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dtop]{bottom:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(4px);transform-origin:bottom center;}:host([open]) [part\x3dpanel][data-placement\x3dtop]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dbottom]{top:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(-4px);transform-origin:top center;}:host([open]) [part\x3dpanel][data-placement\x3dbottom]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dleft]{right:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(4px);transform-origin:center right;}:host([open]) [part\x3dpanel][data-placement\x3dleft]{transform:translateY(-50%) translateX(0);}[part\x3dpanel][data-placement\x3dright]{left:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(-4px);transform-origin:center left;}:host([open]) [part\x3dpanel][data-placement\x3dright]{transform:translateY(-50%) translateX(0);}[part\x3darrow]{position:absolute;width:var(--x-tooltip-arrow-size);height:var(--x-tooltip-arrow-size);background:var(--x-tooltip-bg);border:var(--x-tooltip-border);transform:rotate(45deg);pointer-events:none;}[part\x3dpanel][data-placement\x3dtop] [part\x3darrow]{bottom:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-left:none;}[part\x3dpanel][data-placement\x3dbottom] [part\x3darrow]{top:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-right:none;}[part\x3dpanel][data-placement\x3dleft] [part\x3darrow]{right:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-left:none;}[part\x3dpanel][data-placement\x3dright] [part\x3darrow]{left:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-right:none;}[part\x3dbody]{position:relative;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}}";
9
+ $APP.S(d,"part","trigger");$APP.S(f,"part","panel");$APP.S(f,"role","tooltip");$APP.S(f,"id",r);$APP.S(f,"aria-hidden","true");$APP.S(f,"data-placement","top");$APP.S(h,"part","arrow");$APP.S(h,"aria-hidden","true");$APP.S(l,"part","body");$APP.S(m,"part","text");$APP.S(q,"name","content");d.appendChild(e);l.appendChild(m);l.appendChild(q);f.appendChild(h);f.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(f);$APP.R(a,"__xTooltipId",r);$APP.R(a,"__xTooltipRefs",{trigger:d,triggerSlot:e,
10
+ panel:f,arrow:h,body:l,text:m,contentSlot:q})}Jy(a);$APP.R(a,"__xTooltipHandlers",Iy(a));c=$APP.k(a,"__xTooltipRefs");$APP.n(c)&&(b=$APP.k(a,"__xTooltipHandlers"),$APP.n(b)&&(c=$APP.k(c,"triggerSlot"),a.addEventListener("pointerenter",$APP.k(b,"pointerenter")),a.addEventListener("pointerleave",$APP.k(b,"pointerleave")),a.addEventListener("focusin",$APP.k(b,"focusin")),a.addEventListener("focusout",$APP.k(b,"focusout")),a.addEventListener("keydown",$APP.k(b,"keydown")),c.addEventListener("slotchange",
11
+ $APP.k(b,"slotchange"))));Dy(a);return Hy(a)},My=function(a){Ey(a);Jy(a);var b=$APP.k(a,"__xTooltipTriggerEl");$APP.n(b)?(b.removeAttribute("aria-describedby"),a=$APP.R(a,"__xTooltipTriggerEl",null)):a=null;return a},Ny=function(a){if($APP.n($APP.k(a,"__xTooltipRefs"))){Dy(a);var b=a.hasAttribute("disabled");return $APP.n($APP.n(b)?a.hasAttribute("open"):b)?Gy(a):null}return null},Py=function(a){$APP.Zh(a,Oy);a.show=function(){return Fy(this,!0)};return a.hide=function(){return Gy(this)}},Ry=function(){return $APP.Ah("x-tooltip",
12
+ new $APP.O(null,5,[$APP.qh,Qy,$APP.oh,Ly,$APP.lh,My,$APP.kh,Ny,$APP.ph,Py],null))},By=new $APP.F(null,"delay","delay",-574225219),zy=new $APP.F(null,"delay-raw","delay-raw",886290425);var Ay=new $APP.pg(null,new $APP.O(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),Qy=["text","placement","delay","disabled","open"],Oy=new $APP.O(null,5,[$APP.Rp,new $APP.O(null,2,[$APP.Q,$APP.X,$APP.W,"text"],null),$APP.Vn,new $APP.O(null,2,[$APP.Q,$APP.X,$APP.W,"placement"],null),By,new $APP.O(null,3,[$APP.Q,$APP.Y,$APP.W,"delay",$APP.Yh,400],null),$APP.ck,new $APP.O(null,2,[$APP.Q,$APP.Xh,$APP.W,"disabled"],null),$APP.wq,new $APP.O(null,2,[$APP.Q,$APP.Xh,$APP.W,"open"],
13
+ null)],null);$APP.ce(["x-tooltip-show",new $APP.O(null,2,[$APP.Aq,!1,$APP.U,$APP.de],null),"x-tooltip-hide",new $APP.O(null,2,[$APP.Aq,!1,$APP.U,$APP.de],null)]);var Ky={n:0};$APP.ha("baredom.exports.x_tooltip.init",Ry);export const init=Ry;
@@ -0,0 +1,242 @@
1
+ // x-trace-history.d.ts — hand-authored from docs/x-trace-history-schema.md.
2
+ // Regenerated alongside the component .d.ts files by scripts/generate_types.bb.
3
+ // Schema is frozen at schemaVersion 1; bumps land here and in the recorder
4
+ // together.
5
+
6
+ export function init(): void;
7
+
8
+ /**
9
+ * Stable on-disk schema version. Importers reject mismatched values.
10
+ */
11
+ export type TraceSchemaVersion = 1;
12
+
13
+ /**
14
+ * One entry in the recorder's component side-index. Maps a stable
15
+ * componentId (assigned the first time a record mentions an element)
16
+ * to the element's tag and the time we first saw it.
17
+ */
18
+ export interface TraceComponentInfo {
19
+ tag: string;
20
+ firstSeen: number;
21
+ }
22
+
23
+ /**
24
+ * Baseline fields carried by every record. Type-specific extras live
25
+ * on the discriminated-union variants below.
26
+ */
27
+ export interface TraceRecordBase {
28
+ schemaVersion: TraceSchemaVersion;
29
+ id: number;
30
+ t: number;
31
+ tag: string;
32
+ componentId: number | null;
33
+ causeId: number | null;
34
+ }
35
+
36
+ export interface TraceRecordDispatch extends TraceRecordBase {
37
+ type: "event/dispatch" | "event/dispatch-cancelable" | "event/dispatch-document";
38
+ eventName: string;
39
+ detail: unknown;
40
+ cancelable: boolean;
41
+ defaultPrevented: boolean;
42
+ }
43
+
44
+ export interface TraceRecordInstanceFieldSet extends TraceRecordBase {
45
+ type: "state/instance-field-set";
46
+ field: string;
47
+ value: unknown;
48
+ }
49
+
50
+ export interface TraceRecordAttributeSet extends TraceRecordBase {
51
+ type: "dom/attribute-set";
52
+ attribute: string;
53
+ value: unknown;
54
+ }
55
+
56
+ export interface TraceRecordAttributeRemoved extends TraceRecordBase {
57
+ type: "dom/attribute-removed";
58
+ attribute: string;
59
+ }
60
+
61
+ export interface TraceRecordLifecycleConnected extends TraceRecordBase {
62
+ type: "lifecycle/connected";
63
+ }
64
+
65
+ export interface TraceRecordLifecycleDisconnected extends TraceRecordBase {
66
+ type: "lifecycle/disconnected";
67
+ }
68
+
69
+ export interface TraceRecordLifecycleAttributeChanged extends TraceRecordBase {
70
+ type: "lifecycle/attribute-changed";
71
+ attribute: string;
72
+ oldValue: string | null;
73
+ newValue: string | null;
74
+ }
75
+
76
+ /**
77
+ * Discriminated union over every record kind the recorder produces.
78
+ * Switch on `.type` for exhaustiveness.
79
+ */
80
+ export type TraceRecord =
81
+ | TraceRecordDispatch
82
+ | TraceRecordInstanceFieldSet
83
+ | TraceRecordAttributeSet
84
+ | TraceRecordAttributeRemoved
85
+ | TraceRecordLifecycleConnected
86
+ | TraceRecordLifecycleDisconnected
87
+ | TraceRecordLifecycleAttributeChanged;
88
+
89
+ /**
90
+ * Session metadata as returned by `sessions()`. Bounded recording
91
+ * slices the user explicitly captured.
92
+ */
93
+ export interface TraceSession {
94
+ id: number;
95
+ label: string;
96
+ startT: number;
97
+ endT: number | null;
98
+ recordCount: number;
99
+ }
100
+
101
+ /**
102
+ * Session metadata as carried on the wire inside a `.trace.json`
103
+ * envelope. Differs from `TraceSession` in that the wire form names
104
+ * the record-id bounds directly (`startId`/`endId`) and omits
105
+ * `recordCount` (membership is derived from the bounds).
106
+ */
107
+ export interface TraceEnvelopeSession {
108
+ id: number;
109
+ label: string;
110
+ startT: number;
111
+ endT: number | null;
112
+ startId: number;
113
+ endId: number | null;
114
+ }
115
+
116
+ /**
117
+ * The full exported envelope — what `export()` returns and what
118
+ * `download()` serialises to a `.trace.json` file. Importers must
119
+ * reject envelopes whose `schemaVersion` does not match.
120
+ */
121
+ export interface TraceEnvelope {
122
+ schemaVersion: TraceSchemaVersion;
123
+ exportedAt: number;
124
+ origin: string;
125
+ userAgent: string;
126
+ forensic: boolean;
127
+ components: Record<string, TraceComponentInfo>;
128
+ sessions: TraceEnvelopeSession[];
129
+ records: TraceRecord[];
130
+ }
131
+
132
+ /**
133
+ * Metadata for one loaded import, as returned by `imports()`. The
134
+ * record array itself is fetched with `importRecords(id)`.
135
+ */
136
+ export interface TraceImport {
137
+ id: number;
138
+ label: string;
139
+ importedAt: number;
140
+ recordCount: number;
141
+ }
142
+
143
+ /**
144
+ * The JS API installed at `window.BareDOM.traceHistory` when the
145
+ * recorder activates (via `?baredom-trace-history` URL flag or
146
+ * `window.BAREDOM_TRACE_HISTORY = true`).
147
+ *
148
+ * All methods are safe to call from the console or programmatically.
149
+ * The returned arrays are memoised against the recorder's internal
150
+ * buffer — treat them as read-only.
151
+ */
152
+ export interface BareDOMTraceHistory {
153
+ /** All records, oldest first. */
154
+ records(): TraceRecord[];
155
+ /** Stringified componentId -> {tag, firstSeen} for every observed instance. */
156
+ components(): Record<string, TraceComponentInfo>;
157
+ /** Stop accepting new records. Already-captured records survive. */
158
+ pause(): void;
159
+ /** Resume after pause. */
160
+ resume(): void;
161
+ /** Drop the live ring buffer and sessions. Imports survive. */
162
+ clear(): void;
163
+ /** Begin a bounded recording slice. Returns the new session id. */
164
+ startSession(): number;
165
+ /** Close the active session, if any. */
166
+ stopSession(): void;
167
+ /** Metadata for every session captured this page life. */
168
+ sessions(): TraceSession[];
169
+ /** Records inside the named session, chronological. */
170
+ sessionRecords(id: number): TraceRecord[];
171
+ /**
172
+ * Materialise the current recorder state as a JSON-serialisable
173
+ * envelope. The returned object shares its `records` array with
174
+ * the recorder's internal cache — treat as read-only or deep-copy.
175
+ */
176
+ export(): TraceEnvelope;
177
+ /** Trigger a browser download of the current envelope as `.trace.json`. */
178
+ download(): void;
179
+ /**
180
+ * Load a previously-exported envelope. Pass a parsed JS object or a
181
+ * JSON string. Returns the new import id, or `null` when the
182
+ * envelope is malformed or carries a mismatched `schemaVersion`.
183
+ */
184
+ import(input: string | TraceEnvelope, label?: string): number | null;
185
+ /** Metadata for every loaded import. */
186
+ imports(): TraceImport[];
187
+ /** Records inside the named import, chronological. */
188
+ importRecords(id: number): TraceRecord[];
189
+ /** Drop one import by id. */
190
+ removeImport(id: number): void;
191
+ }
192
+
193
+ /**
194
+ * The shared `window.BareDOM` namespace. Each BareDOM dev tool slots
195
+ * its console API in here under its own key — `traceHistory` for
196
+ * x-trace-history. Future dev tools augment this interface via
197
+ * TypeScript declaration merging:
198
+ *
199
+ * ```ts
200
+ * declare module "@vanelsas/baredom/x-trace-history" {
201
+ * interface BareDOMNamespace { myDevTool?: MyDevToolApi }
202
+ * }
203
+ * ```
204
+ *
205
+ * This lives in the x-trace-history module today because that is the
206
+ * first dev tool to ship; it can move to a shared types module if and
207
+ * when a second tool joins.
208
+ */
209
+ export interface BareDOMNamespace {
210
+ traceHistory?: BareDOMTraceHistory;
211
+ }
212
+
213
+ /**
214
+ * The `<x-trace-history>` custom element auto-mounted to <body> when
215
+ * the recorder activates. The element has no public attributes or
216
+ * properties — it is a self-contained floating dock that subscribes
217
+ * to recorder updates and renders the timeline UI.
218
+ */
219
+ export interface XTraceHistory extends HTMLElement {}
220
+
221
+ declare global {
222
+ interface Window {
223
+ /**
224
+ * Shared namespace installed by every BareDOM ESM module that
225
+ * ships a console-callable API. See `BareDOMNamespace` for the
226
+ * slots populated by x-trace-history; future dev tools augment
227
+ * the interface via declaration merging.
228
+ */
229
+ BareDOM?: BareDOMNamespace;
230
+ /**
231
+ * Set to `true` (or the string `"raw"` for forensic mode) before
232
+ * the app boots to activate the recorder without a URL flag.
233
+ */
234
+ BAREDOM_TRACE_HISTORY?: boolean | "raw";
235
+ /** Override the ring-buffer capacity. Default 5000. */
236
+ BAREDOM_TRACE_HISTORY_CAPACITY?: number;
237
+ }
238
+
239
+ interface HTMLElementTagNameMap {
240
+ "x-trace-history": XTraceHistory;
241
+ }
242
+ }