@editora/ui-core 0.1.20 → 0.1.21

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./collection-qv8A8rq4.js");function u(i){if(!i.isConnected||i.hidden)return!1;const e=window.getComputedStyle(i);return!(e.display==="none"||e.visibility==="hidden")}function o(i){const e=i.getAttribute("aria-disabled");return i.hasAttribute("disabled")||e==="true"||i.disabled===!0}function a(i){return i.getAttribute("aria-label")||i.textContent||""}function d(i){return Array.from(i)}class b extends HTMLElement{constructor(){super(...arguments),this._container=null,this._items=null,this._observer=null}static get observedAttributes(){return["item-selector","direct-item-selector","item-role"]}connectedCallback(){this.refresh(),this._syncObserver()}disconnectedCallback(){this._disconnectObserver()}attributeChangedCallback(e,r,t){r!==t&&(e==="item-selector"||e==="direct-item-selector"||e==="item-role")&&(this.refresh(),this._syncObserver())}get container(){return this._container}set container(e){this._container!==e&&(this._container=e,this.refresh(),this._syncObserver())}get itemSelector(){return this.getAttribute("item-selector")||'[data-collection-item], .menuitem, [role="option"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]'}set itemSelector(e){this.setAttribute("item-selector",e)}get directItemSelector(){return this.getAttribute("direct-item-selector")||""}set directItemSelector(e){e?this.setAttribute("direct-item-selector",e):this.removeAttribute("direct-item-selector")}get itemRole(){return this.getAttribute("item-role")||""}set itemRole(e){e?this.setAttribute("item-role",e):this.removeAttribute("item-role")}get items(){return this._items}set items(e){this._items=e?[...e]:null,this.refresh()}refresh(){const e=this.queryItems();return this.syncItemSemantics(),e}queryItems(e={}){if(this._items){const s=[...this._items];return e.includeHidden?s:s.filter(l=>u(l))}const r=this._queryRoot(e.container);if(!r)return[];const t=this.directItemSelector.trim();let n=t?d(r.querySelectorAll(t)):[];return n.length||(n=d(r.querySelectorAll(this.itemSelector))),e.includeHidden?n:n.filter(s=>u(s))}queryEnabledItems(e={}){return this.queryItems(e).filter(r=>!o(r))}indexOf(e,r={}){return e?this.queryItems(r).indexOf(e):-1}findByValue(e,r={}){const t=this.queryItems(r),n=c.findIndexByValue(t,e,s=>s.getAttribute("data-value")||s.getAttribute("value")||"");return n>=0?t[n]:null}findTypeaheadMatch(e,r={}){const t=this.queryEnabledItems({container:r.container}),n=typeof r.startIndex=="number"?r.startIndex:-1,s=c.findTypeaheadMatch(t,e,{startIndex:n,getLabel:r.getLabel||a,getDisabled:r.getDisabled||o});return s>=0?t[s]:null}syncItemSemantics(e={}){const r=this.itemRole;this.queryItems({...e,includeHidden:!0}).forEach((t,n)=>{r&&!t.getAttribute("role")&&t.setAttribute("role",r),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.setAttribute("data-collection-index",String(n));const s=o(t);t.getAttribute("aria-disabled")!==(s?"true":"false")&&t.setAttribute("aria-disabled",s?"true":"false");const l=t.getAttribute("role");(l==="menuitemcheckbox"||l==="menuitemradio")&&!t.hasAttribute("aria-checked")&&t.setAttribute("aria-checked","false")})}isItemDisabled(e){return o(e)}getItemLabel(e){return a(e)}_queryRoot(e){return e||this._container||this}_disconnectObserver(){this._observer?.disconnect(),this._observer=null}_syncObserver(){const e=this._queryRoot();this._disconnectObserver(),(e instanceof HTMLElement||e instanceof ShadowRoot||e instanceof DocumentFragment)&&(this._observer=new MutationObserver(()=>{this.syncItemSemantics(),this.dispatchEvent(new CustomEvent("collection-change",{bubbles:!0,composed:!0}))}),this._observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","disabled","aria-disabled","role","value","data-value","aria-label"]}))}}typeof customElements<"u"&&!customElements.get("ui-collection")&&customElements.define("ui-collection",b);exports.UICollection=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./collection-qv8A8rq4.js"),u=require("./selector-BvAh35ve.js");function a(i){if(!i.isConnected||i.hidden)return!1;const e=window.getComputedStyle(i);return!(e.display==="none"||e.visibility==="hidden")}function o(i){const e=i.getAttribute("aria-disabled");return i.hasAttribute("disabled")||e==="true"||i.disabled===!0}function d(i){return i.getAttribute("aria-label")||i.textContent||""}function b(i){return Array.from(i)}const m='[data-collection-item], .menuitem, [role="option"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]';class h extends HTMLElement{constructor(){super(...arguments),this._container=null,this._items=null,this._observer=null}static get observedAttributes(){return["item-selector","direct-item-selector","item-role"]}connectedCallback(){this.refresh(),this._syncObserver()}disconnectedCallback(){this._disconnectObserver()}attributeChangedCallback(e,r,t){r!==t&&(e==="item-selector"||e==="direct-item-selector"||e==="item-role")&&(this.refresh(),this._syncObserver())}get container(){return this._container}set container(e){this._container!==e&&(this._container=e,this.refresh(),this._syncObserver())}get itemSelector(){const e=this.getAttribute("item-selector");return e&&u.isValidSelector(e)?e:m}set itemSelector(e){this.setAttribute("item-selector",e)}get directItemSelector(){const e=this.getAttribute("direct-item-selector")||"";return u.isValidSelector(e)?e:""}set directItemSelector(e){e?this.setAttribute("direct-item-selector",e):this.removeAttribute("direct-item-selector")}get itemRole(){return this.getAttribute("item-role")||""}set itemRole(e){e?this.setAttribute("item-role",e):this.removeAttribute("item-role")}get items(){return this._items}set items(e){this._items=e?[...e]:null,this.refresh()}refresh(){const e=this.queryItems();return this.syncItemSemantics(),e}queryItems(e={}){if(this._items){const s=[...this._items];return e.includeHidden?s:s.filter(l=>a(l))}const r=this._queryRoot(e.container);if(!r)return[];const t=this.directItemSelector.trim();let n=t?b(r.querySelectorAll(t)):[];return n.length||(n=b(r.querySelectorAll(this.itemSelector))),e.includeHidden?n:n.filter(s=>a(s))}queryEnabledItems(e={}){return this.queryItems(e).filter(r=>!o(r))}indexOf(e,r={}){return e?this.queryItems(r).indexOf(e):-1}findByValue(e,r={}){const t=this.queryItems(r),n=c.findIndexByValue(t,e,s=>s.getAttribute("data-value")||s.getAttribute("value")||"");return n>=0?t[n]:null}findTypeaheadMatch(e,r={}){const t=this.queryEnabledItems({container:r.container}),n=typeof r.startIndex=="number"?r.startIndex:-1,s=c.findTypeaheadMatch(t,e,{startIndex:n,getLabel:r.getLabel||d,getDisabled:r.getDisabled||o});return s>=0?t[s]:null}syncItemSemantics(e={}){const r=this.itemRole;this.queryItems({...e,includeHidden:!0}).forEach((t,n)=>{r&&!t.getAttribute("role")&&t.setAttribute("role",r),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.setAttribute("data-collection-index",String(n));const s=o(t);t.getAttribute("aria-disabled")!==(s?"true":"false")&&t.setAttribute("aria-disabled",s?"true":"false");const l=t.getAttribute("role");(l==="menuitemcheckbox"||l==="menuitemradio")&&!t.hasAttribute("aria-checked")&&t.setAttribute("aria-checked","false")})}isItemDisabled(e){return o(e)}getItemLabel(e){return d(e)}_queryRoot(e){return e||this._container||this}_disconnectObserver(){this._observer?.disconnect(),this._observer=null}_syncObserver(){const e=this._queryRoot();this._disconnectObserver(),(e instanceof HTMLElement||e instanceof ShadowRoot||e instanceof DocumentFragment)&&(this._observer=new MutationObserver(()=>{this.syncItemSemantics(),this.dispatchEvent(new CustomEvent("collection-change",{bubbles:!0,composed:!0}))}),this._observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","disabled","aria-disabled","role","value","data-value","aria-label"]}))}}typeof customElements<"u"&&!customElements.get("ui-collection")&&customElements.define("ui-collection",h);exports.UICollection=h;
@@ -1,20 +1,22 @@
1
- import { a as d, d as b } from "./collection-C7URGjEI.mjs";
2
- function c(i) {
1
+ import { a as b, d as m } from "./collection-C7URGjEI.mjs";
2
+ import { i as c } from "./selector-WI8pD7YO.mjs";
3
+ function u(i) {
3
4
  if (!i.isConnected || i.hidden) return !1;
4
5
  const e = window.getComputedStyle(i);
5
6
  return !(e.display === "none" || e.visibility === "hidden");
6
7
  }
7
- function o(i) {
8
+ function l(i) {
8
9
  const e = i.getAttribute("aria-disabled");
9
10
  return i.hasAttribute("disabled") || e === "true" || i.disabled === !0;
10
11
  }
11
- function u(i) {
12
+ function a(i) {
12
13
  return i.getAttribute("aria-label") || i.textContent || "";
13
14
  }
14
- function a(i) {
15
+ function d(i) {
15
16
  return Array.from(i);
16
17
  }
17
- class h extends HTMLElement {
18
+ const h = '[data-collection-item], .menuitem, [role="option"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]';
19
+ class f extends HTMLElement {
18
20
  constructor() {
19
21
  super(...arguments), this._container = null, this._items = null, this._observer = null;
20
22
  }
@@ -37,13 +39,15 @@ class h extends HTMLElement {
37
39
  this._container !== e && (this._container = e, this.refresh(), this._syncObserver());
38
40
  }
39
41
  get itemSelector() {
40
- return this.getAttribute("item-selector") || '[data-collection-item], .menuitem, [role="option"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]';
42
+ const e = this.getAttribute("item-selector");
43
+ return e && c(e) ? e : h;
41
44
  }
42
45
  set itemSelector(e) {
43
46
  this.setAttribute("item-selector", e);
44
47
  }
45
48
  get directItemSelector() {
46
- return this.getAttribute("direct-item-selector") || "";
49
+ const e = this.getAttribute("direct-item-selector") || "";
50
+ return c(e) ? e : "";
47
51
  }
48
52
  set directItemSelector(e) {
49
53
  e ? this.setAttribute("direct-item-selector", e) : this.removeAttribute("direct-item-selector");
@@ -67,29 +71,29 @@ class h extends HTMLElement {
67
71
  queryItems(e = {}) {
68
72
  if (this._items) {
69
73
  const s = [...this._items];
70
- return e.includeHidden ? s : s.filter((l) => c(l));
74
+ return e.includeHidden ? s : s.filter((o) => u(o));
71
75
  }
72
76
  const r = this._queryRoot(e.container);
73
77
  if (!r) return [];
74
78
  const t = this.directItemSelector.trim();
75
- let n = t ? a(r.querySelectorAll(t)) : [];
76
- return n.length || (n = a(r.querySelectorAll(this.itemSelector))), e.includeHidden ? n : n.filter((s) => c(s));
79
+ let n = t ? d(r.querySelectorAll(t)) : [];
80
+ return n.length || (n = d(r.querySelectorAll(this.itemSelector))), e.includeHidden ? n : n.filter((s) => u(s));
77
81
  }
78
82
  queryEnabledItems(e = {}) {
79
- return this.queryItems(e).filter((r) => !o(r));
83
+ return this.queryItems(e).filter((r) => !l(r));
80
84
  }
81
85
  indexOf(e, r = {}) {
82
86
  return e ? this.queryItems(r).indexOf(e) : -1;
83
87
  }
84
88
  findByValue(e, r = {}) {
85
- const t = this.queryItems(r), n = d(t, e, (s) => s.getAttribute("data-value") || s.getAttribute("value") || "");
89
+ const t = this.queryItems(r), n = b(t, e, (s) => s.getAttribute("data-value") || s.getAttribute("value") || "");
86
90
  return n >= 0 ? t[n] : null;
87
91
  }
88
92
  findTypeaheadMatch(e, r = {}) {
89
- const t = this.queryEnabledItems({ container: r.container }), n = typeof r.startIndex == "number" ? r.startIndex : -1, s = b(t, e, {
93
+ const t = this.queryEnabledItems({ container: r.container }), n = typeof r.startIndex == "number" ? r.startIndex : -1, s = m(t, e, {
90
94
  startIndex: n,
91
- getLabel: r.getLabel || u,
92
- getDisabled: r.getDisabled || o
95
+ getLabel: r.getLabel || a,
96
+ getDisabled: r.getDisabled || l
93
97
  });
94
98
  return s >= 0 ? t[s] : null;
95
99
  }
@@ -97,17 +101,17 @@ class h extends HTMLElement {
97
101
  const r = this.itemRole;
98
102
  this.queryItems({ ...e, includeHidden: !0 }).forEach((t, n) => {
99
103
  r && !t.getAttribute("role") && t.setAttribute("role", r), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "-1"), t.setAttribute("data-collection-index", String(n));
100
- const s = o(t);
104
+ const s = l(t);
101
105
  t.getAttribute("aria-disabled") !== (s ? "true" : "false") && t.setAttribute("aria-disabled", s ? "true" : "false");
102
- const l = t.getAttribute("role");
103
- (l === "menuitemcheckbox" || l === "menuitemradio") && !t.hasAttribute("aria-checked") && t.setAttribute("aria-checked", "false");
106
+ const o = t.getAttribute("role");
107
+ (o === "menuitemcheckbox" || o === "menuitemradio") && !t.hasAttribute("aria-checked") && t.setAttribute("aria-checked", "false");
104
108
  });
105
109
  }
106
110
  isItemDisabled(e) {
107
- return o(e);
111
+ return l(e);
108
112
  }
109
113
  getItemLabel(e) {
110
- return u(e);
114
+ return a(e);
111
115
  }
112
116
  _queryRoot(e) {
113
117
  return e || this._container || this;
@@ -127,7 +131,7 @@ class h extends HTMLElement {
127
131
  }));
128
132
  }
129
133
  }
130
- typeof customElements < "u" && !customElements.get("ui-collection") && customElements.define("ui-collection", h);
134
+ typeof customElements < "u" && !customElements.get("ui-collection") && customElements.define("ui-collection", f);
131
135
  export {
132
- h as UICollection
136
+ f as UICollection
133
137
  };
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-EV6mVBUV.js"),_=require("./date-time-utils-Dmost5Ee.js");function g(s,t,e){return Math.max(t,Math.min(e,s))}function m(s,t=3){const e=10**t;return Math.round(s*e)/e}function A(s){return g(Math.round(s),0,255)}function H(s){const t=s.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?g(r/100,0,1):null}const e=Number(t);return Number.isFinite(e)?g(e,0,1):null}function P(s){const t=s.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?A(g(r,0,100)/100*255):null}const e=Number(t);return Number.isFinite(e)?A(e):null}function B(s){const t=s.trim();if(!t.endsWith("%"))return null;const e=Number(t.slice(0,-1));return Number.isFinite(e)?g(e,0,100):null}function F(s){const t=s.trim().toLowerCase();if(!t)return null;if(t.endsWith("deg")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r):null}if(t.endsWith("turn")){const r=Number(t.slice(0,-4));return Number.isFinite(r)?x(r*360):null}if(t.endsWith("rad")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r*180/Math.PI):null}const e=Number(t);return Number.isFinite(e)?x(e):null}function x(s){const t=s%360;return t<0?t+360:t}function T(s){const t=s.trim();if(!t)return null;if(t.includes("/")){const[r,i]=t.split("/");if(i==null)return null;const a=r.includes(",")?r.split(","):r.trim().split(/\s+/);return a.length<3?null:{channels:a.map(n=>n.trim()).filter(Boolean),alpha:i.trim()}}if(t.includes(",")){const r=t.split(",").map(i=>i.trim()).filter(Boolean);return r.length<3?null:{channels:r.slice(0,3),alpha:r[3]??null}}const e=t.split(/\s+/).map(r=>r.trim()).filter(Boolean);return e.length<3?null:{channels:e.slice(0,3),alpha:e[3]??null}}function U(s){const t=s.trim().replace(/^#/,"");if(![3,4,6,8].includes(t.length)||!/^[0-9a-f]+$/i.test(t))return null;if(t.length===3||t.length===4){const n=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),u=t.length===4?parseInt(t[3]+t[3],16)/255:1;return b({r:n,g:o,b:l,a:u})}const e=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return b({r:e,g:r,b:i,a})}function N(s){const t=/^rgba?\((.+)\)$/i.exec(s.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=P(e.channels[0]),i=P(e.channels[1]),a=P(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?H(e.alpha):1;return n==null?null:b({r,g:i,b:a,a:n})}function V(s){const t=/^hsla?\((.+)\)$/i.exec(s.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=F(e.channels[0]),i=B(e.channels[1]),a=B(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?H(e.alpha):1;return n==null?null:q({h:r,s:i,l:a,a:n})}function b(s){return{r:A(s.r),g:A(s.g),b:A(s.b),a:m(g(s.a,0,1),4)}}function f(s){const t=(s||"").trim();return t?t.startsWith("#")?U(t):/^rgba?\(/i.test(t)?N(t):/^hsla?\(/i.test(t)?V(t):null:null}function W(s,t=!1){const e=b(s),r=a=>a.toString(16).padStart(2,"0"),i=`#${r(e.r)}${r(e.g)}${r(e.b)}`;return t?`${i}${r(Math.round(e.a*255))}`:i}function K(s,t=!0){const e=b(s);return!t||e.a>=1?`rgb(${e.r} ${e.g} ${e.b})`:`rgb(${e.r} ${e.g} ${e.b} / ${m(e.a,3)})`}function G(s,t=!0){const e=Math.round(x(s.h)),r=Math.round(g(s.s,0,100)),i=Math.round(g(s.l,0,100)),a=m(g(s.a,0,1),3);return!t||a>=1?`hsl(${e} ${r}% ${i}%)`:`hsl(${e} ${r}% ${i}% / ${a})`}function z(s){const t=b(s),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),o=a-n;let l=0;o!==0&&(a===e?l=(r-i)/o%6:a===r?l=(i-e)/o+2:l=(e-r)/o+4,l*=60,l<0&&(l+=360));const u=a===0?0:o/a*100,d=a*100;return{h:m(l,3),s:m(u,3),v:m(d,3),a:t.a}}function X(s){const t=x(s.h),e=g(s.s,0,100)/100,r=g(s.v,0,100)/100,i=r*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i;let o=0,l=0,u=0;return t<60?(o=i,l=a):t<120?(o=a,l=i):t<180?(l=i,u=a):t<240?(l=a,u=i):t<300?(o=a,u=i):(o=i,u=a),b({r:(o+n)*255,g:(l+n)*255,b:(u+n)*255,a:s.a})}function I(s){const t=b(s),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),o=a-n,l=(a+n)/2;let u=0,d=0;return o!==0&&(d=o/(1-Math.abs(2*l-1)),a===e?u=(r-i)/o%6:a===r?u=(i-e)/o+2:u=(e-r)/o+4,u*=60,u<0&&(u+=360)),{h:m(u,3),s:m(d*100,3),l:m(l*100,3),a:t.a}}function q(s){const t=x(s.h),e=g(s.s,0,100)/100,r=g(s.l,0,100)/100,i=(1-Math.abs(2*r-1))*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i/2;let o=0,l=0,u=0;return t<60?(o=i,l=a):t<120?(o=a,l=i):t<180?(l=i,u=a):t<240?(l=a,u=i):t<300?(o=a,u=i):(o=i,u=a),b({r:(o+n)*255,g:(l+n)*255,b:(u+n)*255,a:s.a})}function y(s,t){return W(s,t).toUpperCase()}function k(s,t){return K(s,t)}function Y(s,t){return G(I(s),t)}const C="#2563eb",L="editora:ui-color-picker:recent",j=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-EV6mVBUV.js"),_=require("./date-time-utils-Dmost5Ee.js");function g(s,t,e){return Math.max(t,Math.min(e,s))}function m(s,t=3){const e=10**t;return Math.round(s*e)/e}function A(s){return g(Math.round(s),0,255)}function D(s){const t=s.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?g(r/100,0,1):null}const e=Number(t);return Number.isFinite(e)?g(e,0,1):null}function P(s){const t=s.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?A(g(r,0,100)/100*255):null}const e=Number(t);return Number.isFinite(e)?A(e):null}function B(s){const t=s.trim();if(!t.endsWith("%"))return null;const e=Number(t.slice(0,-1));return Number.isFinite(e)?g(e,0,100):null}function F(s){const t=s.trim().toLowerCase();if(!t)return null;if(t.endsWith("deg")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r):null}if(t.endsWith("turn")){const r=Number(t.slice(0,-4));return Number.isFinite(r)?x(r*360):null}if(t.endsWith("rad")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r*180/Math.PI):null}const e=Number(t);return Number.isFinite(e)?x(e):null}function x(s){const t=s%360;return t<0?t+360:t}function T(s){const t=s.trim();if(!t)return null;if(t.includes("/")){const[r,i]=t.split("/");if(i==null)return null;const a=r.includes(",")?r.split(","):r.trim().split(/\s+/);return a.length<3?null:{channels:a.map(n=>n.trim()).filter(Boolean),alpha:i.trim()}}if(t.includes(",")){const r=t.split(",").map(i=>i.trim()).filter(Boolean);return r.length<3?null:{channels:r.slice(0,3),alpha:r[3]??null}}const e=t.split(/\s+/).map(r=>r.trim()).filter(Boolean);return e.length<3?null:{channels:e.slice(0,3),alpha:e[3]??null}}function U(s){const t=s.trim().replace(/^#/,"");if(![3,4,6,8].includes(t.length)||!/^[0-9a-f]+$/i.test(t))return null;if(t.length===3||t.length===4){const n=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),u=t.length===4?parseInt(t[3]+t[3],16)/255:1;return b({r:n,g:o,b:l,a:u})}const e=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return b({r:e,g:r,b:i,a})}function N(s){const t=/^rgba?\((.+)\)$/i.exec(s.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=P(e.channels[0]),i=P(e.channels[1]),a=P(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:b({r,g:i,b:a,a:n})}function V(s){const t=/^hsla?\((.+)\)$/i.exec(s.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=F(e.channels[0]),i=B(e.channels[1]),a=B(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:q({h:r,s:i,l:a,a:n})}function b(s){return{r:A(s.r),g:A(s.g),b:A(s.b),a:m(g(s.a,0,1),4)}}function v(s){const t=(s||"").trim();return t?t.startsWith("#")?U(t):/^rgba?\(/i.test(t)?N(t):/^hsla?\(/i.test(t)?V(t):null:null}function W(s,t=!1){const e=b(s),r=a=>a.toString(16).padStart(2,"0"),i=`#${r(e.r)}${r(e.g)}${r(e.b)}`;return t?`${i}${r(Math.round(e.a*255))}`:i}function K(s,t=!0){const e=b(s);return!t||e.a>=1?`rgb(${e.r} ${e.g} ${e.b})`:`rgb(${e.r} ${e.g} ${e.b} / ${m(e.a,3)})`}function G(s,t=!0){const e=Math.round(x(s.h)),r=Math.round(g(s.s,0,100)),i=Math.round(g(s.l,0,100)),a=m(g(s.a,0,1),3);return!t||a>=1?`hsl(${e} ${r}% ${i}%)`:`hsl(${e} ${r}% ${i}% / ${a})`}function z(s){const t=b(s),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),o=a-n;let l=0;o!==0&&(a===e?l=(r-i)/o%6:a===r?l=(i-e)/o+2:l=(e-r)/o+4,l*=60,l<0&&(l+=360));const u=a===0?0:o/a*100,d=a*100;return{h:m(l,3),s:m(u,3),v:m(d,3),a:t.a}}function X(s){const t=x(s.h),e=g(s.s,0,100)/100,r=g(s.v,0,100)/100,i=r*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i;let o=0,l=0,u=0;return t<60?(o=i,l=a):t<120?(o=a,l=i):t<180?(l=i,u=a):t<240?(l=a,u=i):t<300?(o=a,u=i):(o=i,u=a),b({r:(o+n)*255,g:(l+n)*255,b:(u+n)*255,a:s.a})}function I(s){const t=b(s),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),o=a-n,l=(a+n)/2;let u=0,d=0;return o!==0&&(d=o/(1-Math.abs(2*l-1)),a===e?u=(r-i)/o%6:a===r?u=(i-e)/o+2:u=(e-r)/o+4,u*=60,u<0&&(u+=360)),{h:m(u,3),s:m(d*100,3),l:m(l*100,3),a:t.a}}function q(s){const t=x(s.h),e=g(s.s,0,100)/100,r=g(s.l,0,100)/100,i=(1-Math.abs(2*r-1))*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i/2;let o=0,l=0,u=0;return t<60?(o=i,l=a):t<120?(o=a,l=i):t<180?(l=i,u=a):t<240?(l=a,u=i):t<300?(o=a,u=i):(o=i,u=a),b({r:(o+n)*255,g:(l+n)*255,b:(u+n)*255,a:s.a})}function y(s,t){return W(s,t).toUpperCase()}function k(s,t){return K(s,t)}function Y(s,t){return G(I(s),t)}const C="#2563eb",L="editora:ui-color-picker:recent",j=`
2
2
  <svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
3
3
  <path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
4
4
  </svg>
5
- `,D=`
5
+ `,H=`
6
6
  :host {
7
7
  --ui-cp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
8
8
  --ui-cp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
@@ -686,8 +686,8 @@
686
686
  max-block-size: min(84vh, 680px);
687
687
  overflow: auto;
688
688
  }
689
- `;function c(s,t,e){return Math.max(t,Math.min(e,s))}function E(s,t){return Math.abs(s-t)<=5e-4}function S(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}class $ extends O.ElementBase{constructor(){super(),this._syncing=!1,this._initialized=!1,this._rgba=b(f(C)||{r:37,g:99,b:235,a:1}),this._hsva=z(this._rgba),this._format="hex",this._open=!1,this._error="",this._presets=[],this._recentColors=[],this._panelCache=new WeakMap,this._overlay=null,this._overlayRoot=null,this._releaseScrollLock=null,this._restoreFocusEl=null,this._isSheetOpen=!1,this._dragTarget=null,this._dragPointerId=-1,this._dragRect=null,this._dragX=0,this._dragY=0,this._dragRaf=0,this._dragChanged=!1,this._dragSource="drag",this._renderingSwatches=!1,this._scheduleOverlayPosition=_.rafThrottle(()=>this._positionOverlay()),this._onRootClickBound=t=>this._onPanelClick(t,"root"),this._onRootInputBound=t=>this._onPanelInput(t,"root"),this._onRootChangeBound=t=>this._onPanelChange(t,"root"),this._onRootKeyDownBound=t=>this._onPanelKeyDown(t,"root"),this._onRootPointerDownBound=t=>this._onPanelPointerDown(t,"root"),this._onRootPointerMoveBound=t=>this._onPanelPointerMove(t),this._onRootPointerUpBound=t=>this._onPanelPointerUp(t),this._onRootPointerCancelBound=t=>this._onPanelPointerCancel(t),this._onDocumentPointerDownBound=t=>this._onDocumentPointerDown(t),this._onDocumentKeyDownBound=t=>this._onDocumentKeyDown(t),this._onWindowResizeBound=()=>this._scheduleOverlayPosition.run(),this._onWindowScrollBound=t=>{_.eventOriginatesWithin(t,[this._overlay])||this._scheduleOverlayPosition.run()},this._applyValueAttribute(!1),this._applyFormatAttribute(),this._open=this.hasAttribute("open"),this._parsePresetsAttribute()}static get observedAttributes(){return["value","format","alpha","disabled","readonly","size","variant","state","tone","mode","open","close-on-escape","placeholder","presets","recent","max-recent","persist","aria-label","aria-labelledby","aria-describedby"]}connectedCallback(){super.connectedCallback(),this._bindRootEvents(),this._loadRecent(),!this._isPopoverMode()&&this._open&&(this._open=!1,this._syncOpenAttribute(!1))}disconnectedCallback(){this._cancelDragFrame(),this._stopDrag(!1),this._destroyOverlay(),this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("change",this._onRootChangeBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this.root.removeEventListener("pointerdown",this._onRootPointerDownBound),this.root.removeEventListener("pointermove",this._onRootPointerMoveBound),this.root.removeEventListener("pointerup",this._onRootPointerUpBound),this.root.removeEventListener("pointercancel",this._onRootPointerCancelBound),super.disconnectedCallback()}attributeChangedCallback(t,e,r){if(e!==r){switch(t){case"value":this._syncing||this._applyValueAttribute(!0);break;case"format":this._applyFormatAttribute();break;case"presets":this._parsePresetsAttribute();break;case"open":this._syncing||(this._open=this.hasAttribute("open"));break;case"disabled":case"state":(this.hasAttribute("disabled")||this._isLoading())&&this._open&&this._setOpen(!1,"attribute");break;case"alpha":{this._alphaEnabled()||(this._rgba=b({...this._rgba,a:1}),this._hsva={...this._hsva,a:1},this._syncValueAttribute());break}}this.isConnected&&this.requestRender()}}get value(){return this.getAttribute("value")||this._serializeValue()}set value(t){this.setColor(t)}get format(){return this._format}set format(t){this.setAttribute("format",t)}get alpha(){return this._alphaEnabled()}set alpha(t){t?this.setAttribute("alpha",""):this.removeAttribute("alpha")}get open(){return this._open}set open(t){this._setOpen(t,"api")}setColor(t){const e=f(t||"");if(!e){this._setInvalid(t,"Invalid color format");return}this._error="",this._applyRgba(e,!1),this._syncValueAttribute(),this._updateUI(!1)}getColor(){const t=b(this._rgba);return{hex:y(t,this._alphaEnabled()),rgba:t,hsva:{...this._hsva}}}openPopover(){this._setOpen(!0,"api")}closePopover(){this._setOpen(!1,"api")}focus(){const t=this.root.querySelector(".trigger"),e=this.root.querySelector('[data-cp="sv"]');(t||e||this).focus()}render(){this._initialized||(this._initialized=!0,this.setContent(this._buildTemplate(),{force:!0})),!this._isPopoverMode()&&this._open&&(this._open=!1,this._syncOpenAttribute(!1)),this._isPopoverMode()&&this._open?(this._ensureOverlay(),this._renderOverlayTemplate(),this._scheduleOverlayPosition.run()):this._destroyOverlay(),this._updateUI(!1)}_bindRootEvents(){this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("change",this._onRootChangeBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this.root.removeEventListener("pointerdown",this._onRootPointerDownBound),this.root.removeEventListener("pointermove",this._onRootPointerMoveBound),this.root.removeEventListener("pointerup",this._onRootPointerUpBound),this.root.removeEventListener("pointercancel",this._onRootPointerCancelBound),this.root.addEventListener("click",this._onRootClickBound),this.root.addEventListener("input",this._onRootInputBound),this.root.addEventListener("change",this._onRootChangeBound),this.root.addEventListener("keydown",this._onRootKeyDownBound),this.root.addEventListener("pointerdown",this._onRootPointerDownBound),this.root.addEventListener("pointermove",this._onRootPointerMoveBound),this.root.addEventListener("pointerup",this._onRootPointerUpBound),this.root.addEventListener("pointercancel",this._onRootPointerCancelBound)}_eventHTMLElement(t){const e=typeof t.composedPath=="function"?t.composedPath():[];for(const i of e)if(i instanceof HTMLElement)return i;const r=t.target;return r instanceof HTMLElement?r:null}_buildTemplate(){return`
690
- <style>${D}</style>
689
+ `;function c(s,t,e){return Math.max(t,Math.min(e,s))}function E(s,t){return Math.abs(s-t)<=5e-4}function S(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}class $ extends O.ElementBase{constructor(){super(),this._syncing=!1,this._initialized=!1,this._rgba=b(v(C)||{r:37,g:99,b:235,a:1}),this._hsva=z(this._rgba),this._format="hex",this._open=!1,this._error="",this._presets=[],this._recentColors=[],this._panelCache=new WeakMap,this._overlay=null,this._overlayRoot=null,this._releaseScrollLock=null,this._restoreFocusEl=null,this._isSheetOpen=!1,this._dragTarget=null,this._dragPointerId=-1,this._dragRect=null,this._dragX=0,this._dragY=0,this._dragRaf=0,this._dragChanged=!1,this._dragSource="drag",this._renderingSwatches=!1,this._scheduleOverlayPosition=_.rafThrottle(()=>this._positionOverlay()),this._onRootClickBound=t=>this._onPanelClick(t,"root"),this._onRootInputBound=t=>this._onPanelInput(t,"root"),this._onRootChangeBound=t=>this._onPanelChange(t,"root"),this._onRootKeyDownBound=t=>this._onPanelKeyDown(t,"root"),this._onRootPointerDownBound=t=>this._onPanelPointerDown(t,"root"),this._onRootPointerMoveBound=t=>this._onPanelPointerMove(t),this._onRootPointerUpBound=t=>this._onPanelPointerUp(t),this._onRootPointerCancelBound=t=>this._onPanelPointerCancel(t),this._onDocumentPointerDownBound=t=>this._onDocumentPointerDown(t),this._onDocumentKeyDownBound=t=>this._onDocumentKeyDown(t),this._onWindowResizeBound=()=>this._scheduleOverlayPosition.run(),this._onWindowScrollBound=t=>{_.eventOriginatesWithin(t,[this._overlay])||this._scheduleOverlayPosition.run()},this._applyValueAttribute(!1),this._applyFormatAttribute(),this._open=this.hasAttribute("open"),this._parsePresetsAttribute()}static get observedAttributes(){return["value","format","alpha","disabled","readonly","size","variant","state","tone","mode","open","close-on-escape","placeholder","presets","recent","max-recent","persist","aria-label","aria-labelledby","aria-describedby"]}connectedCallback(){super.connectedCallback(),this._bindRootEvents(),this._loadRecent(),!this._isPopoverMode()&&this._open&&(this._open=!1,this._syncOpenAttribute(!1))}disconnectedCallback(){this._cancelDragFrame(),this._stopDrag(!1),this._destroyOverlay(),this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("change",this._onRootChangeBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this.root.removeEventListener("pointerdown",this._onRootPointerDownBound),this.root.removeEventListener("pointermove",this._onRootPointerMoveBound),this.root.removeEventListener("pointerup",this._onRootPointerUpBound),this.root.removeEventListener("pointercancel",this._onRootPointerCancelBound),super.disconnectedCallback()}attributeChangedCallback(t,e,r){if(e!==r){switch(t){case"value":this._syncing||this._applyValueAttribute(!0);break;case"format":this._applyFormatAttribute();break;case"presets":this._parsePresetsAttribute();break;case"open":this._syncing||(this._open=this.hasAttribute("open"));break;case"disabled":case"state":(this.hasAttribute("disabled")||this._isLoading())&&this._open&&this._setOpen(!1,"attribute");break;case"alpha":{this._alphaEnabled()||(this._rgba=b({...this._rgba,a:1}),this._hsva={...this._hsva,a:1},this._syncValueAttribute());break}}this.isConnected&&this.requestRender()}}get value(){return this.getAttribute("value")||this._serializeValue()}set value(t){this.setColor(t)}get format(){return this._format}set format(t){this.setAttribute("format",t)}get alpha(){return this._alphaEnabled()}set alpha(t){t?this.setAttribute("alpha",""):this.removeAttribute("alpha")}get open(){return this._open}set open(t){this._setOpen(t,"api")}setColor(t){const e=v(t||"");if(!e){this._setInvalid(t,"Invalid color format");return}this._error="",this._applyRgba(e,!1),this._syncValueAttribute(),this._updateUI(!1)}getColor(){const t=b(this._rgba);return{hex:y(t,this._alphaEnabled()),rgba:t,hsva:{...this._hsva}}}openPopover(){this._setOpen(!0,"api")}closePopover(){this._setOpen(!1,"api")}focus(){const t=this.root.querySelector(".trigger"),e=this.root.querySelector('[data-cp="sv"]');(t||e||this).focus()}render(){this._initialized||(this._initialized=!0,this.setContent(this._buildTemplate(),{force:!0})),!this._isPopoverMode()&&this._open&&(this._open=!1,this._syncOpenAttribute(!1)),this._isPopoverMode()&&this._open?(this._ensureOverlay(),this._renderOverlayTemplate(),this._scheduleOverlayPosition.run()):this._destroyOverlay(),this._updateUI(!1)}_bindRootEvents(){this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("change",this._onRootChangeBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this.root.removeEventListener("pointerdown",this._onRootPointerDownBound),this.root.removeEventListener("pointermove",this._onRootPointerMoveBound),this.root.removeEventListener("pointerup",this._onRootPointerUpBound),this.root.removeEventListener("pointercancel",this._onRootPointerCancelBound),this.root.addEventListener("click",this._onRootClickBound),this.root.addEventListener("input",this._onRootInputBound),this.root.addEventListener("change",this._onRootChangeBound),this.root.addEventListener("keydown",this._onRootKeyDownBound),this.root.addEventListener("pointerdown",this._onRootPointerDownBound),this.root.addEventListener("pointermove",this._onRootPointerMoveBound),this.root.addEventListener("pointerup",this._onRootPointerUpBound),this.root.addEventListener("pointercancel",this._onRootPointerCancelBound)}_eventHTMLElement(t){const e=typeof t.composedPath=="function"?t.composedPath():[];for(const i of e)if(i instanceof HTMLElement)return i;const r=t.target;return r instanceof HTMLElement?r:null}_buildTemplate(){return`
690
+ <style>${H}</style>
691
691
  <section class="root">
692
692
  <div class="trigger-wrap" data-role="trigger-wrap">
693
693
  <button
@@ -747,7 +747,7 @@
747
747
  <div class="group" data-format-group="hex">
748
748
  <div class="field">
749
749
  <span>Value</span>
750
- <input class="input" data-input="hex" part="input" spellcheck="false" autocomplete="off" />
750
+ <input class="input" data-input="hex" part="input" spellcheck="false" autocomplete="off" aria-label="Hex color value" />
751
751
  </div>
752
752
  </div>
753
753
 
@@ -787,17 +787,17 @@
787
787
  <div class="live" data-role="live" aria-live="polite"></div>
788
788
  </section>
789
789
  `}_renderOverlayTemplate(){if(!this._overlay||!this._overlayRoot)return;this._syncOverlayHostAttributes();const t=this._isMobileSheet(),e=t?"sheet":"popover";this._overlay.dataset.mode!==e&&(this._overlay.dataset.mode=e,this._overlayRoot.innerHTML=`
790
- <style>${D}${J}</style>
790
+ <style>${H}${J}</style>
791
791
  <section class="overlay">
792
792
  ${t?'<div class="sheet-backdrop" data-action="close-popover"></div>':""}
793
793
  <div class="${t?"sheet-shell":"popover-shell"}">
794
794
  ${this._panelMarkup("overlay")}
795
795
  </div>
796
796
  </section>
797
- `,t&&!this._isSheetOpen&&(this._isSheetOpen=!0,this._releaseScrollLock=_.lockBodyScroll()),!t&&this._isSheetOpen&&(this._isSheetOpen=!1,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null)))}_isPopoverMode(){return(this.getAttribute("mode")||"inline")==="popover"}_state(){const t=(this.getAttribute("state")||"idle").trim().toLowerCase();return t==="loading"||t==="error"||t==="success"?t:"idle"}_tone(){const t=(this.getAttribute("tone")||"brand").trim().toLowerCase();return t==="neutral"||t==="success"||t==="warning"||t==="danger"?t:"brand"}_closeOnEscape(){return _.isTruthyAttr(this.getAttribute("close-on-escape"),!0)}_syncOverlayHostAttributes(){if(!this._overlay)return;const t=r=>{const i=this.getAttribute(r);i==null?this._overlay.removeAttribute(r):this._overlay.setAttribute(r,i)},e=r=>{this.hasAttribute(r)?this._overlay.setAttribute(r,""):this._overlay.removeAttribute(r)};t("size"),t("variant"),t("state"),t("tone"),t("close-on-escape"),t("aria-label"),t("aria-labelledby"),t("aria-describedby"),e("disabled"),e("readonly")}_isMobileSheet(){return _.shouldUseMobileSheet(this.getAttribute("mode")||"inline")}_alphaEnabled(){return _.isTruthyAttr(this.getAttribute("alpha"),!1)}_recentEnabled(){return _.isTruthyAttr(this.getAttribute("recent"),!0)}_persistRecent(){return _.isTruthyAttr(this.getAttribute("persist"),!1)}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_isLoading(){return this._state()==="loading"}_maxRecent(){const t=Number(this.getAttribute("max-recent")||8);return!Number.isFinite(t)||t<1?8:Math.max(1,Math.min(24,Math.trunc(t)))}_labelText(){return this.getAttribute("aria-label")||"Color picker"}_placeholder(){return this.getAttribute("placeholder")||"Select color"}_applyFormatAttribute(){const t=(this.getAttribute("format")||"hex").trim().toLowerCase();if(t==="rgb"||t==="hsl"||t==="hex"){this._format=t;return}this._format="hex"}_applyValueAttribute(t){const e=this.getAttribute("value");if(!e){this._applyRgba(f(C)||this._rgba,!1);return}const r=f(e);if(!r){t&&this._setInvalid(e,"Unable to parse color value");return}this._error="",this._applyRgba(r,!1)}_parsePresetsAttribute(){const t=this.getAttribute("presets");if(!t){this._presets=["#2563eb","#16a34a","#f59e0b","#dc2626","#7c3aed","#0ea5e9"];return}try{const e=JSON.parse(t);if(!Array.isArray(e)){this._presets=[];return}const r=[];for(const i of e){if(typeof i!="string")continue;const a=f(i);if(!a)continue;const n=y(this._normalizeByAlpha(a),this._alphaEnabled());r.includes(n)||r.push(n)}this._presets=r}catch{this._presets=[]}}_loadRecent(){if(!this._recentEnabled()){this._recentColors=[];return}if(!(!this._persistRecent()||typeof localStorage>"u"))try{const t=localStorage.getItem(L);if(!t)return;const e=JSON.parse(t);if(!Array.isArray(e))return;this._recentColors=e.filter(r=>typeof r=="string").map(r=>f(r)).filter(r=>!!r).map(r=>y(this._normalizeByAlpha(r),this._alphaEnabled())).slice(0,this._maxRecent())}catch{this._recentColors=[]}}_persistRecentColors(){if(!(!this._persistRecent()||typeof localStorage>"u"))try{localStorage.setItem(L,JSON.stringify(this._recentColors))}catch{}}_normalizeByAlpha(t){return this._alphaEnabled()?b(t):b({...t,a:1})}_applyRgba(t,e){const r=this._normalizeByAlpha(t),i=z(r);e&&i.s===0&&(i.h=this._hsva.h),this._rgba=r,this._hsva={h:c(i.h,0,360),s:c(i.s,0,100),v:c(i.v,0,100),a:c(i.a,0,1)}}_serializeValue(t=this._format){return t==="rgb"?k(this._rgba,this._alphaEnabled()):t==="hsl"?Y(this._rgba,this._alphaEnabled()):y(this._rgba,this._alphaEnabled())}_currentHex(){return y(this._rgba,this._alphaEnabled())}_eventDetail(t){return{value:this._serializeValue(),hex:this._currentHex(),rgba:{...this._rgba},hsla:I(this._rgba),source:t}}_emitInput(t){this.dispatchEvent(new CustomEvent("input",{detail:this._eventDetail(t),bubbles:!0,composed:!0}))}_emitChange(t){this.dispatchEvent(new CustomEvent("change",{detail:this._eventDetail(t),bubbles:!0,composed:!0})),this._announce(this._serializeValue())}_setInvalid(t,e){this._error=e,this.dispatchEvent(new CustomEvent("invalid",{detail:{raw:t,reason:e},bubbles:!0,composed:!0})),this._updateUI(!1)}_announce(t){this._forEachPanel(e=>{e.live&&(e.live.textContent=`Color changed to ${t}`)})}_setOpen(t,e="api"){if(!this._isPopoverMode()||t&&(this._isDisabled()||this._isLoading())||this._open===t)return;const r=this._open;this._open=t,this._syncOpenAttribute(t);const i={open:t,previousOpen:r,source:e};if(t?(this._restoreFocusEl=typeof document<"u"?document.activeElement:null,this.dispatchEvent(new CustomEvent("open",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-open",{detail:i,bubbles:!0,composed:!0}))):(this.dispatchEvent(new CustomEvent("close",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-close",{detail:i,bubbles:!0,composed:!0}))),this.requestRender(),!t&&this._restoreFocusEl&&this._restoreFocusEl.isConnected){try{this._restoreFocusEl.focus()}catch{}this._restoreFocusEl=null}t&&queueMicrotask(()=>this._focusFirstOpenControl())}_focusFirstOpenControl(){if(!this._open)return;const e=this._getCurrentPanel()?.querySelector('[data-cp="sv"]');if(e)try{e.focus()}catch{}}_syncValueAttribute(){const t=this._serializeValue();this._syncing=!0;try{this.getAttribute("value")!==t&&this.setAttribute("value",t)}finally{this._syncing=!1}}_syncOpenAttribute(t){this._syncing=!0;try{t?this.hasAttribute("open")||this.setAttribute("open",""):this.hasAttribute("open")&&this.removeAttribute("open")}finally{this._syncing=!1}}_ensureOverlay(){if(this._overlay||typeof document>"u")return;const t=document.createElement("div");t.style.position="fixed",t.style.inset="0",t.style.zIndex="var(--ui-cp-z, 1600)",t.style.pointerEvents="auto";const e=t.attachShadow({mode:"open"});t.addEventListener("click",r=>this._onPanelClick(r,"overlay")),t.addEventListener("input",r=>this._onPanelInput(r,"overlay")),t.addEventListener("change",r=>this._onPanelChange(r,"overlay")),t.addEventListener("keydown",r=>this._onPanelKeyDown(r,"overlay")),t.addEventListener("pointerdown",r=>this._onPanelPointerDown(r,"overlay")),t.addEventListener("pointermove",r=>this._onPanelPointerMove(r)),t.addEventListener("pointerup",r=>this._onPanelPointerUp(r)),t.addEventListener("pointercancel",r=>this._onPanelPointerCancel(r)),document.body.appendChild(t),this._overlay=t,this._overlayRoot=e,this._syncOverlayHostAttributes(),document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound),window.addEventListener("resize",this._onWindowResizeBound),window.addEventListener("scroll",this._onWindowScrollBound,{passive:!0,capture:!0})}_destroyOverlay(){this._scheduleOverlayPosition.cancel(),typeof document<"u"&&(document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound)),typeof window<"u"&&(window.removeEventListener("resize",this._onWindowResizeBound),window.removeEventListener("scroll",this._onWindowScrollBound,!0)),this._overlay&&this._overlay.parentElement&&this._overlay.parentElement.removeChild(this._overlay),this._overlay=null,this._overlayRoot=null,this._panelCache=new WeakMap,this._isSheetOpen&&(this._isSheetOpen=!1,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null))}_positionOverlay(){if(!this._overlayRoot||!this._open||this._isMobileSheet())return;const t=this.root.querySelector(".trigger"),e=this._overlayRoot.querySelector(".popover-shell");if(!t||!e)return;const r=e.querySelector(".panel");if(!r)return;const i=e.getAttribute("data-placement"),a=_.computePopoverPosition(t.getBoundingClientRect(),r.getBoundingClientRect(),8,8,i==="top"?"top":i==="bottom"?"bottom":null);e.style.top=`${Math.round(a.top)}px`,e.style.left=`${Math.round(a.left)}px`,e.setAttribute("data-placement",a.placement)}_onDocumentPointerDown(t){if(!this._overlay||!this._open)return;const e=typeof t.composedPath=="function"?t.composedPath():[];if(e.includes(this))return;const r=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');r&&e.includes(r)||this._setOpen(!1,"outside")}_onDocumentKeyDown(t){if(!(!this._open||!this._isPopoverMode())){if(t.key==="Tab"){this._trapOverlayFocus(t);return}t.key!=="Escape"||!this._closeOnEscape()||(t.preventDefault(),this._setOpen(!1,"escape"))}}_focusableInPanel(t){const e=t.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]');return Array.from(e).filter(r=>r.hasAttribute("disabled")||r.getAttribute("aria-hidden")==="true"||r.tabIndex<0?!1:r.getClientRects().length>0)}_trapOverlayFocus(t){const e=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');if(!e)return;const r=this._focusableInPanel(e);if(!r.length){t.preventDefault(),e.focus();return}const i=e.getRootNode(),a=i instanceof ShadowRoot?i.activeElement:e.ownerDocument.activeElement,n=a?r.indexOf(a):-1;if(t.shiftKey){n<=0&&(t.preventDefault(),r[r.length-1].focus());return}(n===-1||n===r.length-1)&&(t.preventDefault(),r[0].focus())}_forEachPanel(t){const e=this.root.querySelector('[data-cp-panel="inline"]');e&&t(this._panelRefs(e));const r=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');r&&t(this._panelRefs(r))}_panelRefs(t){const e=this._panelCache.get(t);if(e)return e;const r={panel:t,label:t.querySelector('[data-role="label"]'),valueText:t.querySelector('[data-role="value"]'),preview:t.querySelector('[data-role="preview"]'),status:t.querySelector('[data-role="status"]'),sv:t.querySelector('[data-cp="sv"]'),svThumb:t.querySelector('[data-role="sv-thumb"]'),hue:t.querySelector('[data-cp="hue"]'),hueThumb:t.querySelector('[data-role="hue-thumb"]'),alphaRow:t.querySelector('[data-role="alpha-row"]'),alpha:t.querySelector('[data-cp="alpha"]'),alphaThumb:t.querySelector('[data-role="alpha-thumb"]'),tabHex:t.querySelector('[data-format="hex"]'),tabRgb:t.querySelector('[data-format="rgb"]'),tabHsl:t.querySelector('[data-format="hsl"]'),groupHex:t.querySelector('[data-format-group="hex"]'),groupRgb:t.querySelector('[data-format-group="rgb"]'),groupHsl:t.querySelector('[data-format-group="hsl"]'),inputHex:t.querySelector('[data-input="hex"]'),inputR:t.querySelector('[data-input="r"]'),inputG:t.querySelector('[data-input="g"]'),inputB:t.querySelector('[data-input="b"]'),inputA1:t.querySelector('[data-input="a1"]'),inputH:t.querySelector('[data-input="h"]'),inputS:t.querySelector('[data-input="s"]'),inputL:t.querySelector('[data-input="l"]'),inputA2:t.querySelector('[data-input="a2"]'),copyHex:t.querySelector('[data-action="copy-hex"]'),copyRgb:t.querySelector('[data-action="copy-rgb"]'),eyedropper:t.querySelector('[data-action="eyedropper"]'),clear:t.querySelector('[data-action="clear"]'),apply:t.querySelector('[data-action="apply"]'),presets:t.querySelector('[data-role="presets"]'),recent:t.querySelector('[data-role="recent"]'),recentTitle:t.querySelector('[data-role="recent-title"]'),error:t.querySelector('[data-role="error"]'),live:t.querySelector('[data-role="live"]')};return this._panelCache.set(t,r),r}_getCurrentPanel(){return this._isPopoverMode()&&this._open&&this._overlayRoot?this._overlayRoot.querySelector('[data-cp-panel="overlay"]'):this.root.querySelector('[data-cp-panel="inline"]')}_updateUI(t,e=!1){const r=this.root.querySelector('[data-role="trigger-wrap"]'),i=this.root.querySelector(".trigger"),a=this.root.querySelector('[data-role="trigger-value"]'),n=this.root.querySelector('[data-role="trigger-preview"]'),o=this.root.querySelector('[data-role="inline-panel"]'),l=this._isPopoverMode(),u=this._state(),d=this._tone(),v=u==="loading",h=this._isDisabled(),w=this._isReadonly(),M=this._serializeValue()||this._placeholder();r&&(r.hidden=!l),i&&(i.disabled=h||v,i.dataset.state=u,i.dataset.tone=d,i.setAttribute("aria-expanded",l&&this._open?"true":"false"),this._applyAria(i)),a&&(a.textContent=M),n&&(n.style.background=k(this._rgba,!0)),o&&(o.hidden=l),this._forEachPanel(p=>this._updatePanel(p,{skipSwatches:t,disabled:h,readonly:w,loading:v,state:u,tone:d,modePopover:l,liveOnly:e}))}_updatePanel(t,e){const r=this._rgba,i=I(r),a=this._hsva,n=`hsl(${Math.round(a.h)} 100% 50%)`,o=t.panel.getAttribute("data-cp-panel")==="overlay",l=!!this._error||e.state==="error",u=e.disabled||e.readonly||e.loading;if(this._applyAria(t.panel),t.panel.dataset.state=l?"error":e.state,t.panel.dataset.tone=e.tone,t.panel.setAttribute("aria-busy",e.loading?"true":"false"),o&&e.modePopover?(t.panel.setAttribute("role","dialog"),t.panel.setAttribute("aria-modal","true"),t.panel.tabIndex=-1):(t.panel.removeAttribute("role"),t.panel.removeAttribute("aria-modal"),t.panel.removeAttribute("tabindex")),t.label&&(t.label.textContent=this._labelText()),t.valueText&&(t.valueText.textContent=this._serializeValue()),t.preview&&(t.preview.style.background=k(r,!0)),t.status){let p="";l?p="Error":e.state==="loading"?p="Syncing":e.state==="success"&&(p="Saved"),t.status.hidden=!p,t.status.textContent=p,t.status.dataset.tone=e.tone}if(t.sv&&(t.sv.style.background=`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, ${n})`,t.sv.setAttribute("aria-valuetext",`Saturation ${Math.round(a.s)}%, Value ${Math.round(a.v)}%`),t.sv.setAttribute("aria-disabled",u?"true":"false"),t.sv.tabIndex=u?-1:0),t.svThumb){const p=c(a.s,1,99),R=c(100-a.v,1,99);t.svThumb.style.left=`${p}%`,t.svThumb.style.top=`${R}%`}t.hue&&(t.hue.setAttribute("aria-valuemin","0"),t.hue.setAttribute("aria-valuemax","360"),t.hue.setAttribute("aria-valuenow",String(Math.round(a.h))),t.hue.setAttribute("aria-disabled",u?"true":"false"),t.hue.tabIndex=u?-1:0),t.hueThumb&&(t.hueThumb.style.left=`${c(a.h/360*100,1,99)}%`),t.alphaRow&&(t.alphaRow.hidden=!this._alphaEnabled()),t.alpha&&(t.alpha.setAttribute("aria-valuemin","0"),t.alpha.setAttribute("aria-valuemax","100"),t.alpha.setAttribute("aria-valuenow",String(Math.round(a.a*100))),t.alpha.setAttribute("aria-disabled",u||!this._alphaEnabled()?"true":"false"),t.alpha.tabIndex=u?-1:0,t.alpha.style.backgroundImage=`
797
+ `,t&&!this._isSheetOpen&&(this._isSheetOpen=!0,this._releaseScrollLock=_.lockBodyScroll()),!t&&this._isSheetOpen&&(this._isSheetOpen=!1,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null)))}_isPopoverMode(){return(this.getAttribute("mode")||"inline")==="popover"}_state(){const t=(this.getAttribute("state")||"idle").trim().toLowerCase();return t==="loading"||t==="error"||t==="success"?t:"idle"}_tone(){const t=(this.getAttribute("tone")||"brand").trim().toLowerCase();return t==="neutral"||t==="success"||t==="warning"||t==="danger"?t:"brand"}_closeOnEscape(){return _.isTruthyAttr(this.getAttribute("close-on-escape"),!0)}_syncOverlayHostAttributes(){if(!this._overlay)return;const t=r=>{const i=this.getAttribute(r);i==null?this._overlay.removeAttribute(r):this._overlay.setAttribute(r,i)},e=r=>{this.hasAttribute(r)?this._overlay.setAttribute(r,""):this._overlay.removeAttribute(r)};t("size"),t("variant"),t("state"),t("tone"),t("close-on-escape"),t("aria-label"),t("aria-labelledby"),t("aria-describedby"),e("disabled"),e("readonly")}_isMobileSheet(){return _.shouldUseMobileSheet(this.getAttribute("mode")||"inline")}_alphaEnabled(){return _.isTruthyAttr(this.getAttribute("alpha"),!1)}_recentEnabled(){return _.isTruthyAttr(this.getAttribute("recent"),!0)}_persistRecent(){return _.isTruthyAttr(this.getAttribute("persist"),!1)}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_isLoading(){return this._state()==="loading"}_maxRecent(){const t=Number(this.getAttribute("max-recent")||8);return!Number.isFinite(t)||t<1?8:Math.max(1,Math.min(24,Math.trunc(t)))}_labelText(){return this.getAttribute("aria-label")||"Color picker"}_placeholder(){return this.getAttribute("placeholder")||"Select color"}_applyFormatAttribute(){const t=(this.getAttribute("format")||"hex").trim().toLowerCase();if(t==="rgb"||t==="hsl"||t==="hex"){this._format=t;return}this._format="hex"}_applyValueAttribute(t){const e=this.getAttribute("value");if(!e){this._applyRgba(v(C)||this._rgba,!1);return}const r=v(e);if(!r){t&&this._setInvalid(e,"Unable to parse color value");return}this._error="",this._applyRgba(r,!1)}_parsePresetsAttribute(){const t=this.getAttribute("presets");if(!t){this._presets=["#2563eb","#16a34a","#f59e0b","#dc2626","#7c3aed","#0ea5e9"];return}try{const e=JSON.parse(t);if(!Array.isArray(e)){this._presets=[];return}const r=[];for(const i of e){if(typeof i!="string")continue;const a=v(i);if(!a)continue;const n=y(this._normalizeByAlpha(a),this._alphaEnabled());r.includes(n)||r.push(n)}this._presets=r}catch{this._presets=[]}}_loadRecent(){if(!this._recentEnabled()){this._recentColors=[];return}if(!(!this._persistRecent()||typeof localStorage>"u"))try{const t=localStorage.getItem(L);if(!t)return;const e=JSON.parse(t);if(!Array.isArray(e))return;this._recentColors=e.filter(r=>typeof r=="string").map(r=>v(r)).filter(r=>!!r).map(r=>y(this._normalizeByAlpha(r),this._alphaEnabled())).slice(0,this._maxRecent())}catch{this._recentColors=[]}}_persistRecentColors(){if(!(!this._persistRecent()||typeof localStorage>"u"))try{localStorage.setItem(L,JSON.stringify(this._recentColors))}catch{}}_normalizeByAlpha(t){return this._alphaEnabled()?b(t):b({...t,a:1})}_applyRgba(t,e){const r=this._normalizeByAlpha(t),i=z(r);e&&i.s===0&&(i.h=this._hsva.h),this._rgba=r,this._hsva={h:c(i.h,0,360),s:c(i.s,0,100),v:c(i.v,0,100),a:c(i.a,0,1)}}_serializeValue(t=this._format){return t==="rgb"?k(this._rgba,this._alphaEnabled()):t==="hsl"?Y(this._rgba,this._alphaEnabled()):y(this._rgba,this._alphaEnabled())}_currentHex(){return y(this._rgba,this._alphaEnabled())}_eventDetail(t){return{value:this._serializeValue(),hex:this._currentHex(),rgba:{...this._rgba},hsla:I(this._rgba),source:t}}_emitInput(t){this.dispatchEvent(new CustomEvent("input",{detail:this._eventDetail(t),bubbles:!0,composed:!0}))}_emitChange(t){this.dispatchEvent(new CustomEvent("change",{detail:this._eventDetail(t),bubbles:!0,composed:!0})),this._announce(this._serializeValue())}_setInvalid(t,e){this._error=e,this.dispatchEvent(new CustomEvent("invalid",{detail:{raw:t,reason:e},bubbles:!0,composed:!0})),this._updateUI(!1)}_announce(t){this._forEachPanel(e=>{e.live&&(e.live.textContent=`Color changed to ${t}`)})}_setOpen(t,e="api"){if(!this._isPopoverMode()||t&&(this._isDisabled()||this._isLoading())||this._open===t)return;const r=this._open;this._open=t,this._syncOpenAttribute(t);const i={open:t,previousOpen:r,source:e};if(t?(this._restoreFocusEl=typeof document<"u"?document.activeElement:null,this.dispatchEvent(new CustomEvent("open",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-open",{detail:i,bubbles:!0,composed:!0}))):(this.dispatchEvent(new CustomEvent("close",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-close",{detail:i,bubbles:!0,composed:!0}))),this.requestRender(),!t&&this._restoreFocusEl&&this._restoreFocusEl.isConnected){try{this._restoreFocusEl.focus()}catch{}this._restoreFocusEl=null}t&&queueMicrotask(()=>this._focusFirstOpenControl())}_focusFirstOpenControl(){if(!this._open)return;const e=this._getCurrentPanel()?.querySelector('[data-cp="sv"]');if(e)try{e.focus()}catch{}}_syncValueAttribute(){const t=this._serializeValue();this._syncing=!0;try{this.getAttribute("value")!==t&&this.setAttribute("value",t)}finally{this._syncing=!1}}_syncOpenAttribute(t){this._syncing=!0;try{t?this.hasAttribute("open")||this.setAttribute("open",""):this.hasAttribute("open")&&this.removeAttribute("open")}finally{this._syncing=!1}}_ensureOverlay(){if(this._overlay||typeof document>"u")return;const t=document.createElement("div");t.style.position="fixed",t.style.inset="0",t.style.zIndex="var(--ui-cp-z, 1600)",t.style.pointerEvents="auto";const e=t.attachShadow({mode:"open"});t.addEventListener("click",r=>this._onPanelClick(r,"overlay")),t.addEventListener("input",r=>this._onPanelInput(r,"overlay")),t.addEventListener("change",r=>this._onPanelChange(r,"overlay")),t.addEventListener("keydown",r=>this._onPanelKeyDown(r,"overlay")),t.addEventListener("pointerdown",r=>this._onPanelPointerDown(r,"overlay")),t.addEventListener("pointermove",r=>this._onPanelPointerMove(r)),t.addEventListener("pointerup",r=>this._onPanelPointerUp(r)),t.addEventListener("pointercancel",r=>this._onPanelPointerCancel(r)),document.body.appendChild(t),this._overlay=t,this._overlayRoot=e,this._syncOverlayHostAttributes(),document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound),window.addEventListener("resize",this._onWindowResizeBound),window.addEventListener("scroll",this._onWindowScrollBound,{passive:!0,capture:!0})}_destroyOverlay(){this._scheduleOverlayPosition.cancel(),typeof document<"u"&&(document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound)),typeof window<"u"&&(window.removeEventListener("resize",this._onWindowResizeBound),window.removeEventListener("scroll",this._onWindowScrollBound,!0)),this._overlay&&this._overlay.parentElement&&this._overlay.parentElement.removeChild(this._overlay),this._overlay=null,this._overlayRoot=null,this._panelCache=new WeakMap,this._isSheetOpen&&(this._isSheetOpen=!1,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null))}_positionOverlay(){if(!this._overlayRoot||!this._open||this._isMobileSheet())return;const t=this.root.querySelector(".trigger"),e=this._overlayRoot.querySelector(".popover-shell");if(!t||!e)return;const r=e.querySelector(".panel");if(!r)return;const i=e.getAttribute("data-placement"),a=_.computePopoverPosition(t.getBoundingClientRect(),r.getBoundingClientRect(),8,8,i==="top"?"top":i==="bottom"?"bottom":null);e.style.top=`${Math.round(a.top)}px`,e.style.left=`${Math.round(a.left)}px`,e.setAttribute("data-placement",a.placement)}_onDocumentPointerDown(t){if(!this._overlay||!this._open)return;const e=typeof t.composedPath=="function"?t.composedPath():[];if(e.includes(this))return;const r=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');r&&e.includes(r)||this._setOpen(!1,"outside")}_onDocumentKeyDown(t){if(!(!this._open||!this._isPopoverMode())){if(t.key==="Tab"){this._trapOverlayFocus(t);return}t.key!=="Escape"||!this._closeOnEscape()||(t.preventDefault(),this._setOpen(!1,"escape"))}}_focusableInPanel(t){const e=t.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]');return Array.from(e).filter(r=>r.hasAttribute("disabled")||r.getAttribute("aria-hidden")==="true"||r.tabIndex<0?!1:r.getClientRects().length>0)}_trapOverlayFocus(t){const e=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');if(!e)return;const r=this._focusableInPanel(e);if(!r.length){t.preventDefault(),e.focus();return}const i=e.getRootNode(),a=i instanceof ShadowRoot?i.activeElement:e.ownerDocument.activeElement,n=a?r.indexOf(a):-1;if(t.shiftKey){n<=0&&(t.preventDefault(),r[r.length-1].focus());return}(n===-1||n===r.length-1)&&(t.preventDefault(),r[0].focus())}_forEachPanel(t){const e=this.root.querySelector('[data-cp-panel="inline"]');e&&t(this._panelRefs(e));const r=this._overlayRoot?.querySelector('[data-cp-panel="overlay"]');r&&t(this._panelRefs(r))}_panelRefs(t){const e=this._panelCache.get(t);if(e)return e;const r={panel:t,label:t.querySelector('[data-role="label"]'),valueText:t.querySelector('[data-role="value"]'),preview:t.querySelector('[data-role="preview"]'),status:t.querySelector('[data-role="status"]'),sv:t.querySelector('[data-cp="sv"]'),svThumb:t.querySelector('[data-role="sv-thumb"]'),hue:t.querySelector('[data-cp="hue"]'),hueThumb:t.querySelector('[data-role="hue-thumb"]'),alphaRow:t.querySelector('[data-role="alpha-row"]'),alpha:t.querySelector('[data-cp="alpha"]'),alphaThumb:t.querySelector('[data-role="alpha-thumb"]'),tabHex:t.querySelector('[data-format="hex"]'),tabRgb:t.querySelector('[data-format="rgb"]'),tabHsl:t.querySelector('[data-format="hsl"]'),groupHex:t.querySelector('[data-format-group="hex"]'),groupRgb:t.querySelector('[data-format-group="rgb"]'),groupHsl:t.querySelector('[data-format-group="hsl"]'),inputHex:t.querySelector('[data-input="hex"]'),inputR:t.querySelector('[data-input="r"]'),inputG:t.querySelector('[data-input="g"]'),inputB:t.querySelector('[data-input="b"]'),inputA1:t.querySelector('[data-input="a1"]'),inputH:t.querySelector('[data-input="h"]'),inputS:t.querySelector('[data-input="s"]'),inputL:t.querySelector('[data-input="l"]'),inputA2:t.querySelector('[data-input="a2"]'),copyHex:t.querySelector('[data-action="copy-hex"]'),copyRgb:t.querySelector('[data-action="copy-rgb"]'),eyedropper:t.querySelector('[data-action="eyedropper"]'),clear:t.querySelector('[data-action="clear"]'),apply:t.querySelector('[data-action="apply"]'),presets:t.querySelector('[data-role="presets"]'),recent:t.querySelector('[data-role="recent"]'),recentTitle:t.querySelector('[data-role="recent-title"]'),error:t.querySelector('[data-role="error"]'),live:t.querySelector('[data-role="live"]')};return this._panelCache.set(t,r),r}_getCurrentPanel(){return this._isPopoverMode()&&this._open&&this._overlayRoot?this._overlayRoot.querySelector('[data-cp-panel="overlay"]'):this.root.querySelector('[data-cp-panel="inline"]')}_updateUI(t,e=!1){const r=this.root.querySelector('[data-role="trigger-wrap"]'),i=this.root.querySelector(".trigger"),a=this.root.querySelector('[data-role="trigger-value"]'),n=this.root.querySelector('[data-role="trigger-preview"]'),o=this.root.querySelector('[data-role="inline-panel"]'),l=this._isPopoverMode(),u=this._state(),d=this._tone(),f=u==="loading",h=this._isDisabled(),w=this._isReadonly(),M=this._serializeValue()||this._placeholder();r&&(r.hidden=!l),i&&(i.disabled=h||f,i.dataset.state=u,i.dataset.tone=d,i.setAttribute("aria-expanded",l&&this._open?"true":"false"),this._applyAria(i)),a&&(a.textContent=M),n&&(n.style.background=k(this._rgba,!0)),o&&(o.hidden=l),this._forEachPanel(p=>this._updatePanel(p,{skipSwatches:t,disabled:h,readonly:w,loading:f,state:u,tone:d,modePopover:l,liveOnly:e}))}_updatePanel(t,e){const r=this._rgba,i=I(r),a=this._hsva,n=`hsl(${Math.round(a.h)} 100% 50%)`,o=t.panel.getAttribute("data-cp-panel")==="overlay",l=!!this._error||e.state==="error",u=e.disabled||e.readonly||e.loading;if(this._applyAria(t.panel),t.panel.dataset.state=l?"error":e.state,t.panel.dataset.tone=e.tone,t.panel.setAttribute("aria-busy",e.loading?"true":"false"),o&&e.modePopover?(t.panel.setAttribute("role","dialog"),t.panel.setAttribute("aria-modal","true"),t.panel.tabIndex=-1):(t.panel.removeAttribute("role"),t.panel.removeAttribute("aria-modal"),t.panel.removeAttribute("tabindex")),t.label&&(t.label.textContent=this._labelText()),t.valueText&&(t.valueText.textContent=this._serializeValue()),t.preview&&(t.preview.style.background=k(r,!0)),t.status){let p="";l?p="Error":e.state==="loading"?p="Syncing":e.state==="success"&&(p="Saved"),t.status.hidden=!p,t.status.textContent=p,t.status.dataset.tone=e.tone}if(t.sv&&(t.sv.style.background=`linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, ${n})`,t.sv.setAttribute("aria-valuetext",`Saturation ${Math.round(a.s)}%, Value ${Math.round(a.v)}%`),t.sv.setAttribute("aria-disabled",u?"true":"false"),t.sv.tabIndex=u?-1:0),t.svThumb){const p=c(a.s,1,99),R=c(100-a.v,1,99);t.svThumb.style.left=`${p}%`,t.svThumb.style.top=`${R}%`}t.hue&&(t.hue.setAttribute("aria-valuemin","0"),t.hue.setAttribute("aria-valuemax","360"),t.hue.setAttribute("aria-valuenow",String(Math.round(a.h))),t.hue.setAttribute("aria-disabled",u?"true":"false"),t.hue.tabIndex=u?-1:0),t.hueThumb&&(t.hueThumb.style.left=`${c(a.h/360*100,1,99)}%`),t.alphaRow&&(t.alphaRow.hidden=!this._alphaEnabled()),t.alpha&&(t.alpha.setAttribute("aria-valuemin","0"),t.alpha.setAttribute("aria-valuemax","100"),t.alpha.setAttribute("aria-valuenow",String(Math.round(a.a*100))),t.alpha.setAttribute("aria-disabled",u||!this._alphaEnabled()?"true":"false"),t.alpha.tabIndex=u?-1:0,t.alpha.style.backgroundImage=`
798
798
  linear-gradient(45deg, var(--ui-cp-checker-a) 25%, transparent 25%),
799
799
  linear-gradient(-45deg, var(--ui-cp-checker-a) 25%, transparent 25%),
800
800
  linear-gradient(45deg, transparent 75%, var(--ui-cp-checker-a) 75%),
801
801
  linear-gradient(-45deg, transparent 75%, var(--ui-cp-checker-a) 75%),
802
802
  linear-gradient(to right, rgba(${r.r}, ${r.g}, ${r.b}, 0), rgba(${r.r}, ${r.g}, ${r.b}, 1))
803
- `),t.alphaThumb&&(t.alphaThumb.style.left=`${c(a.a*100,1,99)}%`);const d=t.panel.getRootNode(),v=d instanceof ShadowRoot?d.activeElement:t.panel.ownerDocument.activeElement,h=v&&t.panel.contains(v)?v.getAttribute("data-input"):null;if(t.inputHex&&h!=="hex"&&(t.inputHex.value=y(r,this._alphaEnabled())),t.inputR&&h!=="r"&&(t.inputR.value=String(r.r)),t.inputG&&h!=="g"&&(t.inputG.value=String(r.g)),t.inputB&&h!=="b"&&(t.inputB.value=String(r.b)),t.inputA1&&h!=="a1"&&(t.inputA1.value=this._alphaEnabled()?String(Number(r.a.toFixed(3))):"1"),t.inputH&&h!=="h"&&(t.inputH.value=String(Math.round(i.h))),t.inputS&&h!=="s"&&(t.inputS.value=String(Math.round(i.s))),t.inputL&&h!=="l"&&(t.inputL.value=String(Math.round(i.l))),t.inputA2&&h!=="a2"&&(t.inputA2.value=this._alphaEnabled()?String(Number(r.a.toFixed(3))):"1"),e.liveOnly)return;if(t.tabHex&&(t.tabHex.dataset.active=String(this._format==="hex")),t.tabRgb&&(t.tabRgb.dataset.active=String(this._format==="rgb")),t.tabHsl&&(t.tabHsl.dataset.active=String(this._format==="hsl")),t.groupHex&&(t.groupHex.hidden=this._format!=="hex"),t.groupRgb&&(t.groupRgb.hidden=this._format!=="rgb"),t.groupHsl&&(t.groupHsl.hidden=this._format!=="hsl"),t.inputA1&&(t.inputA1.disabled=!this._alphaEnabled()||u),t.inputA2&&(t.inputA2.disabled=!this._alphaEnabled()||u),t.error){const p=this._error||(e.state==="error"?"Unable to validate current color value.":"");t.error.hidden=!p,t.error.textContent=p}const w=u;if(t.copyHex&&(t.copyHex.disabled=e.disabled||e.loading),t.copyRgb&&(t.copyRgb.disabled=e.disabled||e.loading),t.eyedropper){const p=typeof window<"u"&&typeof window.EyeDropper=="function";t.eyedropper.hidden=!p,t.eyedropper.disabled=w||!p}if(t.clear&&(t.clear.disabled=w),t.apply&&(t.apply.hidden=!e.modePopover,t.apply.disabled=w),t.panel.querySelectorAll(".input").forEach(p=>{const R=p;R.disabled=w}),!e.skipSwatches&&!this._renderingSwatches){this._renderingSwatches=!0;try{this._renderSwatches(t)}finally{this._renderingSwatches=!1}}}_renderSwatches(t){const e=this._currentHex().toLowerCase();t.presets&&(t.presets.innerHTML=this._presets.map(r=>{const i=f(r);if(!i)return"";const a=y(this._normalizeByAlpha(i),this._alphaEnabled()),n=a.toLowerCase()===e?' data-selected="true"':"";return`<button type="button" class="swatch" part="swatch" data-action="preset" data-color="${S(a)}"${n} title="${S(a)}" style="background:${S(k(i,!0))}"></button>`}).join("")),t.recentTitle&&(t.recentTitle.hidden=!this._recentEnabled()||this._recentColors.length===0),t.recent&&(t.recent.hidden=!this._recentEnabled()||this._recentColors.length===0,t.recent.innerHTML=this._recentColors.map(r=>{const i=f(r);if(!i)return"";const a=y(this._normalizeByAlpha(i),this._alphaEnabled()),n=a.toLowerCase()===e?' data-selected="true"':"";return`<button type="button" class="swatch" part="swatch recent" data-action="recent" data-color="${S(a)}"${n} title="${S(a)}" style="background:${S(k(i,!0))}"></button>`}).join(""))}_onPanelClick(t,e){const r=this._eventHTMLElement(t);if(!r)return;const i=r.closest("[data-action]");if(!i||this._isDisabled())return;const a=i.getAttribute("data-action");if(a==="close-popover"){this._setOpen(!1,"outside");return}if(a==="toggle-popover"){if(!this._isPopoverMode())return;this._setOpen(!this._open,"toggle");return}if(!this._isLoading()){if(a==="format"){const n=i.getAttribute("data-format");if(!n)return;this.setAttribute("format",n),this._error="",this._updateUI(!1);return}if(a==="copy-hex"){this._copyToClipboard(this._currentHex());return}if(a==="copy-rgb"){this._copyToClipboard(k(this._rgba,this._alphaEnabled()));return}if(a==="eyedropper"){this._openEyeDropper();return}if(a==="clear"){if(this._isReadonly())return;const n=f(C);n&&(this._applyRgba(n,!1),this._error="",this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1));return}if(a==="apply"){this._setOpen(!1,"apply");return}if(a==="preset"||a==="recent"){if(this._isReadonly())return;const n=i.getAttribute("data-color")||"",o=f(n);if(!o)return;const l=a==="preset"?"preset":"recent";this._applyRgba(o,!0),this._error="",this._syncValueAttribute(),this._emitInput(l),this._emitChange(l),this._pushRecent(this._currentHex()),this._updateUI(!1);return}}}_onPanelInput(t,e){const r=this._eventHTMLElement(t);if(!(r instanceof HTMLInputElement)||!r.hasAttribute("data-input")||(t.stopPropagation(),this._isDisabled()||this._isReadonly()||this._isLoading()))return;const i=this._parseInputsFromPanel(r.closest("[data-cp-panel]"));if(!i){this._error="";return}this._error="",this._applyRgba(i,!0),this._emitInput("text"),this._updateUI(!0,!0)}_onPanelChange(t,e){const r=this._eventHTMLElement(t);if(!(r instanceof HTMLInputElement)||!r.hasAttribute("data-input")||(t.stopPropagation(),this._isDisabled()||this._isReadonly()||this._isLoading()))return;const i=r.closest("[data-cp-panel]"),a=this._parseInputsFromPanel(i);if(!a){const n=r.value||"";this._setInvalid(n,"Invalid input values");return}this._error="",this._applyRgba(a,!0),this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1)}_onPanelKeyDown(t,e){const r=this._eventHTMLElement(t);if(!r||this._isDisabled()||this._isLoading())return;if(r instanceof HTMLInputElement&&r.hasAttribute("data-input")&&t.key==="Enter"){t.preventDefault();const l=this._parseInputsFromPanel(r.closest("[data-cp-panel]"));if(!l){this._setInvalid(r.value||"","Invalid input values");return}this._error="",this._applyRgba(l,!0),this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1);return}const i=r.getAttribute("data-cp");if(!i||this._isReadonly()||this._isLoading())return;const a=t.shiftKey?5:1;let n=!1;const o={...this._hsva};if(i==="sv"){t.key==="ArrowLeft"?(o.s=c(o.s-a,0,100),n=!0):t.key==="ArrowRight"?(o.s=c(o.s+a,0,100),n=!0):t.key==="ArrowUp"?(o.v=c(o.v+a,0,100),n=!0):t.key==="ArrowDown"?(o.v=c(o.v-a,0,100),n=!0):t.key==="Home"?(o.s=0,o.v=100,n=!0):t.key==="End"&&(o.s=100,o.v=0,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"drag"));return}if(i==="hue"){t.key==="ArrowLeft"||t.key==="ArrowDown"?(o.h=c(o.h-a,0,360),n=!0):t.key==="ArrowRight"||t.key==="ArrowUp"?(o.h=c(o.h+a,0,360),n=!0):t.key==="Home"?(o.h=0,n=!0):t.key==="End"&&(o.h=360,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"slider"));return}if(i==="alpha"&&this._alphaEnabled()){const l=t.shiftKey?.1:.01;t.key==="ArrowLeft"||t.key==="ArrowDown"?(o.a=c(o.a-l,0,1),n=!0):t.key==="ArrowRight"||t.key==="ArrowUp"?(o.a=c(o.a+l,0,1),n=!0):t.key==="Home"?(o.a=0,n=!0):t.key==="End"&&(o.a=1,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"slider"))}}_commitHsva(t,e){this._setHsva(t),this._syncValueAttribute(),this._emitInput(e),this._emitChange(e),this._pushRecent(this._currentHex()),this._updateUI(!1)}_parseInputsFromPanel(t){if(!t)return null;const e=this._panelRefs(t);if(this._format==="hex"){const l=e.inputHex?.value||"",u=l.trim().startsWith("#")?l.trim():`#${l.trim()}`,d=f(u);return d?this._normalizeByAlpha(d):null}if(this._format==="rgb"){const l=Number(e.inputR?.value??""),u=Number(e.inputG?.value??""),d=Number(e.inputB?.value??""),v=this._alphaEnabled()?Number(e.inputA1?.value??""):1;return[l,u,d,v].every(h=>Number.isFinite(h))?this._normalizeByAlpha({r:l,g:u,b:d,a:v}):null}const r=Number(e.inputH?.value??""),i=Number(e.inputS?.value??""),a=Number(e.inputL?.value??""),n=this._alphaEnabled()?Number(e.inputA2?.value??""):1;if(![r,i,a,n].every(l=>Number.isFinite(l)))return null;const o={h:c(r,0,360),s:c(i,0,100),l:c(a,0,100),a:c(n,0,1)};return this._normalizeByAlpha(q(o))}_onPanelPointerDown(t,e){if(this._isDisabled()||this._isReadonly()||this._isLoading())return;const r=this._eventHTMLElement(t);if(!r)return;const i=r.closest("[data-cp]")?.getAttribute("data-cp");if(!i||i==="alpha"&&!this._alphaEnabled())return;const a=r.closest(`[data-cp="${i}"]`);if(a){t.preventDefault(),this._dragTarget=i,this._dragPointerId=t.pointerId,this._dragRect=a.getBoundingClientRect(),this._dragX=t.clientX,this._dragY=t.clientY,this._dragChanged=!1,this._dragSource=i==="sv"?"drag":"slider";try{a.setPointerCapture(t.pointerId)}catch{}this._applyDragPointer(!0)}}_onPanelPointerMove(t){!this._dragTarget||t.pointerId!==this._dragPointerId||(this._dragX=t.clientX,this._dragY=t.clientY,!this._dragRaf&&(this._dragRaf=requestAnimationFrame(()=>{this._dragRaf=0,this._applyDragPointer(!0)})))}_onPanelPointerUp(t){!this._dragTarget||t.pointerId!==this._dragPointerId||(this._dragX=t.clientX,this._dragY=t.clientY,this._applyDragPointer(!0),this._stopDrag(!0))}_onPanelPointerCancel(t){!this._dragTarget||t.pointerId!==this._dragPointerId||this._stopDrag(!1)}_cancelDragFrame(){this._dragRaf&&(cancelAnimationFrame(this._dragRaf),this._dragRaf=0)}_applyDragPointer(t){if(!this._dragTarget||!this._dragRect)return;const e=this._dragRect,r=c(this._dragX-e.left,0,e.width||1),i=c(this._dragY-e.top,0,e.height||1),a={...this._hsva};this._dragTarget==="sv"?(a.s=c(r/Math.max(e.width,1)*100,0,100),a.v=c(100-i/Math.max(e.height,1)*100,0,100)):this._dragTarget==="hue"?a.h=c(r/Math.max(e.width,1)*360,0,360):this._dragTarget==="alpha"&&(a.a=c(r/Math.max(e.width,1),0,1)),this._setHsva(a)&&(this._dragChanged=!0,t&&this._emitInput(this._dragSource),this._updateUI(!0,!0))}_setHsva(t){const e={h:c(t.h,0,360),s:c(t.s,0,100),v:c(t.v,0,100),a:this._alphaEnabled()?c(t.a,0,1):1},r=this._hsva;return E(r.h,e.h)&&E(r.s,e.s)&&E(r.v,e.v)&&E(r.a,e.a)?!1:(this._hsva=e,this._rgba=this._normalizeByAlpha(X(this._hsva)),this._error="",!0)}_stopDrag(t){this._cancelDragFrame();const e=t&&this._dragChanged;this._dragTarget=null,this._dragPointerId=-1,this._dragRect=null,this._dragChanged=!1,e&&(this._syncValueAttribute(),this._emitChange(this._dragSource),this._pushRecent(this._currentHex()),this._updateUI(!1))}_pushRecent(t){if(!this._recentEnabled())return;const e=(t||"").trim().toUpperCase();e&&(this._recentColors=[e,...this._recentColors.filter(r=>r.toUpperCase()!==e)].slice(0,this._maxRecent()),this._persistRecentColors())}async _openEyeDropper(){if(this._isDisabled()||this._isReadonly()||this._isLoading()||typeof window>"u")return;const t=window.EyeDropper;if(typeof t=="function")try{const r=await new t().open(),i=f(r?.sRGBHex||"");if(!i)return;this._applyRgba(i,!0),this._error="",this._syncValueAttribute(),this._emitInput("eyedropper"),this._emitChange("eyedropper"),this._pushRecent(this._currentHex()),this._updateUI(!1)}catch{}}async _copyToClipboard(t){if(!t||this._isDisabled())return;let e=!1;if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t),e=!0}catch{e=!1}if(!e&&typeof document<"u"){const a=document.createElement("textarea");a.value=t,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();try{e=document.execCommand("copy")}catch{e=!1}finally{a.parentElement&&a.parentElement.removeChild(a)}}const r=e?`Copied ${t}`:`Unable to copy ${t}`,i=typeof window<"u"?window.showToast:null;if(typeof i=="function")try{i(r)}catch{this.dispatchEvent(new CustomEvent("toast",{detail:{message:r},bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent("toast",{detail:{message:r},bubbles:!0,composed:!0}))}_applyAria(t){const e=this.getAttribute("aria-labelledby"),r=this.getAttribute("aria-describedby"),i=this.getAttribute("aria-label");e?t.setAttribute("aria-labelledby",e):t.removeAttribute("aria-labelledby"),r?t.setAttribute("aria-describedby",r):t.removeAttribute("aria-describedby"),i?t.setAttribute("aria-label",i):e||t.setAttribute("aria-label","Color picker")}}customElements.get("ui-color-picker")||customElements.define("ui-color-picker",$);exports.UIColorPicker=$;
803
+ `),t.alphaThumb&&(t.alphaThumb.style.left=`${c(a.a*100,1,99)}%`);const d=t.panel.getRootNode(),f=d instanceof ShadowRoot?d.activeElement:t.panel.ownerDocument.activeElement,h=f&&t.panel.contains(f)?f.getAttribute("data-input"):null;if(t.inputHex&&h!=="hex"&&(t.inputHex.value=y(r,this._alphaEnabled())),t.inputR&&h!=="r"&&(t.inputR.value=String(r.r)),t.inputG&&h!=="g"&&(t.inputG.value=String(r.g)),t.inputB&&h!=="b"&&(t.inputB.value=String(r.b)),t.inputA1&&h!=="a1"&&(t.inputA1.value=this._alphaEnabled()?String(Number(r.a.toFixed(3))):"1"),t.inputH&&h!=="h"&&(t.inputH.value=String(Math.round(i.h))),t.inputS&&h!=="s"&&(t.inputS.value=String(Math.round(i.s))),t.inputL&&h!=="l"&&(t.inputL.value=String(Math.round(i.l))),t.inputA2&&h!=="a2"&&(t.inputA2.value=this._alphaEnabled()?String(Number(r.a.toFixed(3))):"1"),e.liveOnly)return;if(t.tabHex&&(t.tabHex.dataset.active=String(this._format==="hex")),t.tabRgb&&(t.tabRgb.dataset.active=String(this._format==="rgb")),t.tabHsl&&(t.tabHsl.dataset.active=String(this._format==="hsl")),t.groupHex&&(t.groupHex.hidden=this._format!=="hex"),t.groupRgb&&(t.groupRgb.hidden=this._format!=="rgb"),t.groupHsl&&(t.groupHsl.hidden=this._format!=="hsl"),t.inputA1&&(t.inputA1.disabled=!this._alphaEnabled()||u),t.inputA2&&(t.inputA2.disabled=!this._alphaEnabled()||u),t.error){const p=this._error||(e.state==="error"?"Unable to validate current color value.":"");t.error.hidden=!p,t.error.textContent=p}const w=u;if(t.copyHex&&(t.copyHex.disabled=e.disabled||e.loading),t.copyRgb&&(t.copyRgb.disabled=e.disabled||e.loading),t.eyedropper){const p=typeof window<"u"&&typeof window.EyeDropper=="function";t.eyedropper.hidden=!p,t.eyedropper.disabled=w||!p}if(t.clear&&(t.clear.disabled=w),t.apply&&(t.apply.hidden=!e.modePopover,t.apply.disabled=w),t.panel.querySelectorAll(".input").forEach(p=>{const R=p;R.disabled=w}),!e.skipSwatches&&!this._renderingSwatches){this._renderingSwatches=!0;try{this._renderSwatches(t)}finally{this._renderingSwatches=!1}}}_renderSwatches(t){const e=this._currentHex().toLowerCase();t.presets&&(t.presets.innerHTML=this._presets.map(r=>{const i=v(r);if(!i)return"";const a=y(this._normalizeByAlpha(i),this._alphaEnabled()),n=a.toLowerCase()===e?' data-selected="true"':"";return`<button type="button" class="swatch" part="swatch" data-action="preset" data-color="${S(a)}"${n} title="${S(a)}" style="background:${S(k(i,!0))}"></button>`}).join("")),t.recentTitle&&(t.recentTitle.hidden=!this._recentEnabled()||this._recentColors.length===0),t.recent&&(t.recent.hidden=!this._recentEnabled()||this._recentColors.length===0,t.recent.innerHTML=this._recentColors.map(r=>{const i=v(r);if(!i)return"";const a=y(this._normalizeByAlpha(i),this._alphaEnabled()),n=a.toLowerCase()===e?' data-selected="true"':"";return`<button type="button" class="swatch" part="swatch recent" data-action="recent" data-color="${S(a)}"${n} title="${S(a)}" style="background:${S(k(i,!0))}"></button>`}).join(""))}_onPanelClick(t,e){const r=this._eventHTMLElement(t);if(!r)return;const i=r.closest("[data-action]");if(!i||this._isDisabled())return;const a=i.getAttribute("data-action");if(a==="close-popover"){this._setOpen(!1,"outside");return}if(a==="toggle-popover"){if(!this._isPopoverMode())return;this._setOpen(!this._open,"toggle");return}if(!this._isLoading()){if(a==="format"){const n=i.getAttribute("data-format");if(!n)return;this.setAttribute("format",n),this._error="",this._updateUI(!1);return}if(a==="copy-hex"){this._copyToClipboard(this._currentHex());return}if(a==="copy-rgb"){this._copyToClipboard(k(this._rgba,this._alphaEnabled()));return}if(a==="eyedropper"){this._openEyeDropper();return}if(a==="clear"){if(this._isReadonly())return;const n=v(C);n&&(this._applyRgba(n,!1),this._error="",this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1));return}if(a==="apply"){this._setOpen(!1,"apply");return}if(a==="preset"||a==="recent"){if(this._isReadonly())return;const n=i.getAttribute("data-color")||"",o=v(n);if(!o)return;const l=a==="preset"?"preset":"recent";this._applyRgba(o,!0),this._error="",this._syncValueAttribute(),this._emitInput(l),this._emitChange(l),this._pushRecent(this._currentHex()),this._updateUI(!1);return}}}_onPanelInput(t,e){const r=this._eventHTMLElement(t);if(!(r instanceof HTMLInputElement)||!r.hasAttribute("data-input")||(t.stopPropagation(),this._isDisabled()||this._isReadonly()||this._isLoading()))return;const i=this._parseInputsFromPanel(r.closest("[data-cp-panel]"));if(!i){this._error="";return}this._error="",this._applyRgba(i,!0),this._emitInput("text"),this._updateUI(!0,!0)}_onPanelChange(t,e){const r=this._eventHTMLElement(t);if(!(r instanceof HTMLInputElement)||!r.hasAttribute("data-input")||(t.stopPropagation(),this._isDisabled()||this._isReadonly()||this._isLoading()))return;const i=r.closest("[data-cp-panel]"),a=this._parseInputsFromPanel(i);if(!a){const n=r.value||"";this._setInvalid(n,"Invalid input values");return}this._error="",this._applyRgba(a,!0),this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1)}_onPanelKeyDown(t,e){const r=this._eventHTMLElement(t);if(!r||this._isDisabled()||this._isLoading())return;if(r instanceof HTMLInputElement&&r.hasAttribute("data-input")&&t.key==="Enter"){t.preventDefault();const l=this._parseInputsFromPanel(r.closest("[data-cp-panel]"));if(!l){this._setInvalid(r.value||"","Invalid input values");return}this._error="",this._applyRgba(l,!0),this._syncValueAttribute(),this._emitInput("text"),this._emitChange("text"),this._pushRecent(this._currentHex()),this._updateUI(!1);return}const i=r.getAttribute("data-cp");if(!i||this._isReadonly()||this._isLoading())return;const a=t.shiftKey?5:1;let n=!1;const o={...this._hsva};if(i==="sv"){t.key==="ArrowLeft"?(o.s=c(o.s-a,0,100),n=!0):t.key==="ArrowRight"?(o.s=c(o.s+a,0,100),n=!0):t.key==="ArrowUp"?(o.v=c(o.v+a,0,100),n=!0):t.key==="ArrowDown"?(o.v=c(o.v-a,0,100),n=!0):t.key==="Home"?(o.s=0,o.v=100,n=!0):t.key==="End"&&(o.s=100,o.v=0,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"drag"));return}if(i==="hue"){t.key==="ArrowLeft"||t.key==="ArrowDown"?(o.h=c(o.h-a,0,360),n=!0):t.key==="ArrowRight"||t.key==="ArrowUp"?(o.h=c(o.h+a,0,360),n=!0):t.key==="Home"?(o.h=0,n=!0):t.key==="End"&&(o.h=360,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"slider"));return}if(i==="alpha"&&this._alphaEnabled()){const l=t.shiftKey?.1:.01;t.key==="ArrowLeft"||t.key==="ArrowDown"?(o.a=c(o.a-l,0,1),n=!0):t.key==="ArrowRight"||t.key==="ArrowUp"?(o.a=c(o.a+l,0,1),n=!0):t.key==="Home"?(o.a=0,n=!0):t.key==="End"&&(o.a=1,n=!0),n&&(t.preventDefault(),this._commitHsva(o,"slider"))}}_commitHsva(t,e){this._setHsva(t),this._syncValueAttribute(),this._emitInput(e),this._emitChange(e),this._pushRecent(this._currentHex()),this._updateUI(!1)}_parseInputsFromPanel(t){if(!t)return null;const e=this._panelRefs(t);if(this._format==="hex"){const l=e.inputHex?.value||"",u=l.trim().startsWith("#")?l.trim():`#${l.trim()}`,d=v(u);return d?this._normalizeByAlpha(d):null}if(this._format==="rgb"){const l=Number(e.inputR?.value??""),u=Number(e.inputG?.value??""),d=Number(e.inputB?.value??""),f=this._alphaEnabled()?Number(e.inputA1?.value??""):1;return[l,u,d,f].every(h=>Number.isFinite(h))?this._normalizeByAlpha({r:l,g:u,b:d,a:f}):null}const r=Number(e.inputH?.value??""),i=Number(e.inputS?.value??""),a=Number(e.inputL?.value??""),n=this._alphaEnabled()?Number(e.inputA2?.value??""):1;if(![r,i,a,n].every(l=>Number.isFinite(l)))return null;const o={h:c(r,0,360),s:c(i,0,100),l:c(a,0,100),a:c(n,0,1)};return this._normalizeByAlpha(q(o))}_onPanelPointerDown(t,e){if(this._isDisabled()||this._isReadonly()||this._isLoading())return;const r=this._eventHTMLElement(t);if(!r)return;const i=r.closest("[data-cp]")?.getAttribute("data-cp");if(!i||i==="alpha"&&!this._alphaEnabled())return;const a=r.closest(`[data-cp="${i}"]`);if(a){t.preventDefault(),this._dragTarget=i,this._dragPointerId=t.pointerId,this._dragRect=a.getBoundingClientRect(),this._dragX=t.clientX,this._dragY=t.clientY,this._dragChanged=!1,this._dragSource=i==="sv"?"drag":"slider";try{a.setPointerCapture(t.pointerId)}catch{}this._applyDragPointer(!0)}}_onPanelPointerMove(t){!this._dragTarget||t.pointerId!==this._dragPointerId||(this._dragX=t.clientX,this._dragY=t.clientY,!this._dragRaf&&(this._dragRaf=requestAnimationFrame(()=>{this._dragRaf=0,this._applyDragPointer(!0)})))}_onPanelPointerUp(t){!this._dragTarget||t.pointerId!==this._dragPointerId||(this._dragX=t.clientX,this._dragY=t.clientY,this._applyDragPointer(!0),this._stopDrag(!0))}_onPanelPointerCancel(t){!this._dragTarget||t.pointerId!==this._dragPointerId||this._stopDrag(!1)}_cancelDragFrame(){this._dragRaf&&(cancelAnimationFrame(this._dragRaf),this._dragRaf=0)}_applyDragPointer(t){if(!this._dragTarget||!this._dragRect)return;const e=this._dragRect,r=c(this._dragX-e.left,0,e.width||1),i=c(this._dragY-e.top,0,e.height||1),a={...this._hsva};this._dragTarget==="sv"?(a.s=c(r/Math.max(e.width,1)*100,0,100),a.v=c(100-i/Math.max(e.height,1)*100,0,100)):this._dragTarget==="hue"?a.h=c(r/Math.max(e.width,1)*360,0,360):this._dragTarget==="alpha"&&(a.a=c(r/Math.max(e.width,1),0,1)),this._setHsva(a)&&(this._dragChanged=!0,t&&this._emitInput(this._dragSource),this._updateUI(!0,!0))}_setHsva(t){const e={h:c(t.h,0,360),s:c(t.s,0,100),v:c(t.v,0,100),a:this._alphaEnabled()?c(t.a,0,1):1},r=this._hsva;return E(r.h,e.h)&&E(r.s,e.s)&&E(r.v,e.v)&&E(r.a,e.a)?!1:(this._hsva=e,this._rgba=this._normalizeByAlpha(X(this._hsva)),this._error="",!0)}_stopDrag(t){this._cancelDragFrame();const e=t&&this._dragChanged;this._dragTarget=null,this._dragPointerId=-1,this._dragRect=null,this._dragChanged=!1,e&&(this._syncValueAttribute(),this._emitChange(this._dragSource),this._pushRecent(this._currentHex()),this._updateUI(!1))}_pushRecent(t){if(!this._recentEnabled())return;const e=(t||"").trim().toUpperCase();e&&(this._recentColors=[e,...this._recentColors.filter(r=>r.toUpperCase()!==e)].slice(0,this._maxRecent()),this._persistRecentColors())}async _openEyeDropper(){if(this._isDisabled()||this._isReadonly()||this._isLoading()||typeof window>"u")return;const t=window.EyeDropper;if(typeof t=="function")try{const r=await new t().open(),i=v(r?.sRGBHex||"");if(!i)return;this._applyRgba(i,!0),this._error="",this._syncValueAttribute(),this._emitInput("eyedropper"),this._emitChange("eyedropper"),this._pushRecent(this._currentHex()),this._updateUI(!1)}catch{}}async _copyToClipboard(t){if(!t||this._isDisabled())return;let e=!1;if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t),e=!0}catch{e=!1}if(!e&&typeof document<"u"){const a=document.createElement("textarea");a.value=t,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();try{e=document.execCommand("copy")}catch{e=!1}finally{a.parentElement&&a.parentElement.removeChild(a)}}const r=e?`Copied ${t}`:`Unable to copy ${t}`,i=typeof window<"u"?window.showToast:null;if(typeof i=="function")try{i(r)}catch{this.dispatchEvent(new CustomEvent("toast",{detail:{message:r},bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent("toast",{detail:{message:r},bubbles:!0,composed:!0}))}_applyAria(t){const e=this.getAttribute("aria-labelledby"),r=this.getAttribute("aria-describedby"),i=this.getAttribute("aria-label");e?t.setAttribute("aria-labelledby",e):t.removeAttribute("aria-labelledby"),r?t.setAttribute("aria-describedby",r):t.removeAttribute("aria-describedby"),i?t.setAttribute("aria-label",i):e||t.setAttribute("aria-label","Color picker")}}customElements.get("ui-color-picker")||customElements.define("ui-color-picker",$);exports.UIColorPicker=$;
@@ -10,7 +10,7 @@ function _(s, t = 3) {
10
10
  function S(s) {
11
11
  return g(Math.round(s), 0, 255);
12
12
  }
13
- function H(s) {
13
+ function D(s) {
14
14
  const t = s.trim();
15
15
  if (!t) return null;
16
16
  if (t.endsWith("%")) {
@@ -100,7 +100,7 @@ function G(s) {
100
100
  if (!e || e.channels.length < 3) return null;
101
101
  const r = P(e.channels[0]), i = P(e.channels[1]), a = P(e.channels[2]);
102
102
  if (r == null || i == null || a == null) return null;
103
- const n = e.alpha != null ? H(e.alpha) : 1;
103
+ const n = e.alpha != null ? D(e.alpha) : 1;
104
104
  return n == null ? null : b({ r, g: i, b: a, a: n });
105
105
  }
106
106
  function X(s) {
@@ -110,7 +110,7 @@ function X(s) {
110
110
  if (!e || e.channels.length < 3) return null;
111
111
  const r = W(e.channels[0]), i = B(e.channels[1]), a = B(e.channels[2]);
112
112
  if (r == null || i == null || a == null) return null;
113
- const n = e.alpha != null ? H(e.alpha) : 1;
113
+ const n = e.alpha != null ? D(e.alpha) : 1;
114
114
  return n == null ? null : $({ h: r, s: i, l: a, a: n });
115
115
  }
116
116
  function b(s) {
@@ -192,7 +192,7 @@ const C = "#2563eb", L = "editora:ui-color-picker:recent", tt = `
192
192
  <svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
193
193
  <path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
194
194
  </svg>
195
- `, D = `
195
+ `, H = `
196
196
  :host {
197
197
  --ui-cp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
198
198
  --ui-cp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
@@ -1014,7 +1014,7 @@ class rt extends q {
1014
1014
  }
1015
1015
  _buildTemplate() {
1016
1016
  return `
1017
- <style>${D}</style>
1017
+ <style>${H}</style>
1018
1018
  <section class="root">
1019
1019
  <div class="trigger-wrap" data-role="trigger-wrap">
1020
1020
  <button
@@ -1077,7 +1077,7 @@ class rt extends q {
1077
1077
  <div class="group" data-format-group="hex">
1078
1078
  <div class="field">
1079
1079
  <span>Value</span>
1080
- <input class="input" data-input="hex" part="input" spellcheck="false" autocomplete="off" />
1080
+ <input class="input" data-input="hex" part="input" spellcheck="false" autocomplete="off" aria-label="Hex color value" />
1081
1081
  </div>
1082
1082
  </div>
1083
1083
 
@@ -1123,7 +1123,7 @@ class rt extends q {
1123
1123
  this._syncOverlayHostAttributes();
1124
1124
  const t = this._isMobileSheet(), e = t ? "sheet" : "popover";
1125
1125
  this._overlay.dataset.mode !== e && (this._overlay.dataset.mode = e, this._overlayRoot.innerHTML = `
1126
- <style>${D}${et}</style>
1126
+ <style>${H}${et}</style>
1127
1127
  <section class="overlay">
1128
1128
  ${t ? '<div class="sheet-backdrop" data-action="close-popover"></div>' : ""}
1129
1129
  <div class="${t ? "sheet-shell" : "popover-shell"}">
@@ -1 +1 @@
1
- {"version":3,"file":"ui-collection.d.ts","sourceRoot":"","sources":["../../src/components/ui-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEjH,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EA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M,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKvG,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,cAAc,IAAI,IAAI;IAItB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IAsCvB,SAAS,CAAC,MAAM,IAAI,IAAI;cAIL,6BAA6B,IAAI,OAAO;CAG5D"}
1
+ {"version":3,"file":"ui-positioner.d.ts","sourceRoot":"","sources":["../../src/components/ui-positioner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAkD7C,qBAAa,YAAa,SAAQ,WAAW;IAC3C,MAAM,KAAK,kBAAkB,aAmB5B;IAED,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,SAAS,CAAiC;IAElD,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAOnB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKvG,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,cAAc,IAAI,IAAI;IAItB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IAsCvB,SAAS,CAAC,MAAM,IAAI,IAAI;cAIL,6BAA6B,IAAI,OAAO;CAG5D"}
@@ -134,6 +134,7 @@ export declare class UISortable extends ElementBase {
134
134
  private _setDropTarget;
135
135
  private _queueDropTarget;
136
136
  private _releaseDropTarget;
137
+ private _pointerIsOverList;
137
138
  private _pathFromPoint;
138
139
  private _measureItemShellRects;
139
140
  private _animateItemShellReflow;
@@ -144,7 +145,9 @@ export declare class UISortable extends ElementBase {
144
145
  private _renderDropzone;
145
146
  private _onClick;
146
147
  private _onFocusIn;
148
+ private _isForeignControl;
147
149
  private _onKeyDown;
150
+ private _isRtl;
148
151
  private _moveFocusBy;
149
152
  private _onDragStart;
150
153
  private _onDragOver;
@@ -157,6 +160,11 @@ export declare class UISortable extends ElementBase {
157
160
  private _beginPointerDrag;
158
161
  private _onPointerDown;
159
162
  private _onPointerMove;
163
+ private _autoScrollFrame;
164
+ private _autoScrollPoint;
165
+ private _updateAutoScroll;
166
+ private _stopAutoScroll;
167
+ private _autoScrollTick;
160
168
  private _onPointerUp;
161
169
  private _onPointerCancel;
162
170
  private _setSelection;
@@ -1 +1 @@
1
- {"version":3,"file":"ui-sortable.d.ts","sourceRoot":"","sources":["../../src/components/ui-sortable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,YAAY,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACrD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5E,MAAM,MAAM,iCAAiC,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACpE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,E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