@adia-ai/web-modules 0.6.49 → 0.6.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/everything.min.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @adia-ai/web-modules
|
|
2
2
|
|
|
3
|
+
## [0.6.50] — 2026-05-30
|
|
4
|
+
|
|
5
|
+
### Changed — lockstep bump + `everything.min.js` bundle refresh
|
|
6
|
+
|
|
7
|
+
- **Lockstep version bump — no `@adia-ai/web-modules` source change.** The `dist/everything.min.js` CodePen kitchen-sink bundle was rebuilt to pick up the `@adia-ai/web-components` `slot="chevron"` → `slot="caret"` rename (ADR-0036) it transitively bundles. Substantive scope this cycle is in `@adia-ai/web-components` + `@adia-ai/a2ui-corpus`.
|
|
8
|
+
|
|
3
9
|
## [0.6.49] — 2026-05-30
|
|
4
10
|
|
|
5
11
|
### Changed — design-plan retrofit across module demos
|
package/dist/everything.min.js
CHANGED
|
@@ -136,7 +136,7 @@ parent-template-re-read pattern that works across frameworks.`);return}if(this.d
|
|
|
136
136
|
<div slot="layer" data-layer="base">${t}</div>
|
|
137
137
|
<div slot="layer" data-layer="fill" aria-hidden="true">${t}</div>
|
|
138
138
|
</div>
|
|
139
|
-
`}this.#t=this.querySelector('[slot="field"]'),this.#e=this.querySelector('[data-layer="base"] [slot="value"]'),this.#t&&this.#t.addEventListener("pointerdown",this.#c),this.addEventListener("keydown",this.#d)}render(){if(!this.#t)return;let t=this.#n(this.value);this.#e&&(this.#e.textContent=t);let e=this.querySelector('[data-layer="fill"] [slot="value"]');e&&(e.textContent=t);let i=this.max-this.min,r=i>0?(this.value-this.min)/i*100:0;this.style.setProperty("--range-fill-pct",`${r}%`),this.setAttribute("aria-valuemin",this.min),this.setAttribute("aria-valuemax",this.max),this.setAttribute("aria-valuenow",this.value),this.setAttribute("aria-valuetext",`${this.value}${this.suffix?" "+this.suffix:""}`),this.setAttribute("aria-label",this.label||""),this.syncValue(String(this.value))}#n(t){let e=(String(this.step).split(".")[1]||"").length;return e>0?t.toFixed(e):String(t)}#a(t){let e=Math.round((t-this.min)/this.step)*this.step+this.min;return Math.max(this.min,Math.min(this.max,parseFloat(e.toFixed(10))))}#o(t){let e=this.#a(t);e!==this.value&&(this.value=e,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{value:this.value}})))}#l(t){let e=this.#t.getBoundingClientRect(),i=Math.max(0,Math.min(1,(t-e.left)/e.width));return this.#a(this.min+i*(this.max-this.min))}#c=t=>{this.disabled||(t.preventDefault(),this.#o(this.#l(t.clientX)),this.#i=!0,this.#s=t.clientX,this.#r=this.value,this.setAttribute("data-dragging",""),this.#t.setPointerCapture(t.pointerId),this.#t.addEventListener("pointermove",this.#h),this.#t.addEventListener("pointerup",this.#u))};#h=t=>{if(!this.#i)return;let e=t.clientX-this.#s,i=this.#t.getBoundingClientRect().width,r=this.max-this.min,n=e/i*r;this.#o(this.#r+n)};#u=t=>{this.#i=!1,this.removeAttribute("data-dragging"),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#h),this.#t.removeEventListener("pointerup",this.#u),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value}}))};#d=t=>{if(this.disabled)return;let e=this.value;switch(t.key){case"ArrowRight":case"ArrowUp":e+=this.step;break;case"ArrowLeft":case"ArrowDown":e-=this.step;break;case"Home":e=this.min;break;case"End":e=this.max;break;case"PageUp":e+=this.step*10;break;case"PageDown":e-=this.step*10;break;default:return}t.preventDefault(),this.#o(e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value}}))};disconnected(){super.disconnected(),this.#t?.removeEventListener("pointerdown",this.#c),this.#t?.removeEventListener("pointermove",this.#h),this.#t?.removeEventListener("pointerup",this.#u),this.removeEventListener("keydown",this.#d),this.#t=null,this.#e=null}};S("range-ui",br);$();var Or=class extends x{static requiredIcons=["caret-right"];static template=()=>null;connected(){this.setAttribute("role","tree"),this.addEventListener("click",this.#e),this.addEventListener("keydown",this.#i)}get selectedItem(){return this.querySelector("tree-item-ui[selected]")}select(t,e=null){let i=this.selectedItem;i&&i!==t&&i.removeAttribute("selected"),t.setAttribute("selected",""),this.dispatchEvent(new CustomEvent("tree-select",{bubbles:!0,detail:{item:t,text:t.text,value:t.value,ctrlKey:!!e?.ctrlKey,metaKey:!!e?.metaKey,shiftKey:!!e?.shiftKey}}))}#t(t){if(!t)return null;if(t instanceof Element)return t.matches?.("tree-item-ui")?t:null;if(typeof t=="string"){let e=t.replace(/"/g,'\\"');return this.querySelector(`tree-item-ui[value="${e}"]`)||this.querySelector(`tree-item-ui[text="${e}"]`)||null}return null}expand(t){let e=this.#t(t);e&&e.hasChildren&&!e.open&&(e.open=!0)}collapse(t){let e=this.#t(t);e&&e.open&&(e.open=!1)}expandAll(){for(let t of this.querySelectorAll("tree-item-ui"))t.hasChildren&&!t.open&&(t.open=!0)}collapseAll(){for(let t of this.querySelectorAll("tree-item-ui"))t.open&&(t.open=!1)}expandTo(t){let e=this.#t(t);if(!e)return;let i=e.parentElement?.closest("tree-item-ui");for(;i;)i.hasChildren&&!i.open&&(i.open=!0),i=i.parentElement?.closest("tree-item-ui");e.querySelector(':scope > [slot="row"]')?.scrollIntoView?.({block:"nearest",inline:"nearest"})}#e=t=>{let e=t.target.closest("tree-item-ui");if(!e||!this.contains(e)||t.target.closest('[slot="actions"] *'))return;let i=e.querySelector(':scope > [slot="row"]');!i||!(t.target===i||i.contains(t.target))||(this.select(e,t),e.hasChildren&&(e.open=!e.open))};#i=t=>{let e=t.target.closest("tree-item-ui");if(e)switch(t.key){case"ArrowRight":if(t.preventDefault(),e.hasChildren&&!e.open)e.open=!0;else{let i=e.querySelector(":scope > tree-item-ui");i&&i.querySelector('[slot="row"]')?.focus()}break;case"ArrowLeft":if(t.preventDefault(),e.hasChildren&&e.open)e.open=!1;else{let i=e.parentElement?.closest("tree-item-ui");i&&i.querySelector(':scope > [slot="row"]')?.focus()}break;case"ArrowDown":{t.preventDefault();let i=this.#s(e);i&&i.querySelector(':scope > [slot="row"]')?.focus();break}case"ArrowUp":{t.preventDefault();let i=this.#r(e);i&&i.querySelector(':scope > [slot="row"]')?.focus();break}case"Enter":case" ":t.preventDefault(),this.select(e,t);break}};#s(t){if(t.open&&t.hasChildren)return t.querySelector(":scope > tree-item-ui");let e=t;for(;e;){let i=e.nextElementSibling;if(i&&i.matches("tree-item-ui"))return i;e=e.parentElement?.closest("tree-item-ui")}return null}#r(t){let e=t.previousElementSibling;if(e&&e.matches("tree-item-ui")){let r=e;for(;r.open&&r.hasChildren;){let n=r.querySelectorAll(":scope > tree-item-ui");r=n[n.length-1]}return r}return t.parentElement?.closest("tree-item-ui")||null}disconnected(){this.removeEventListener("click",this.#e),this.removeEventListener("keydown",this.#i)}},yr=class extends x{static properties={text:{type:String,default:"",reflect:!0},icon:{type:String,default:"",reflect:!0},value:{type:String,default:"",reflect:!0},open:{type:Boolean,default:!1,reflect:!0},selected:{type:Boolean,default:!1,reflect:!0},badge:{type:String,default:"",reflect:!0}};static template=()=>null;get hasChildren(){return this.querySelector(":scope > tree-item-ui")!==null}get depth(){let t=0,e=this.parentElement;for(;e;)e.matches("tree-item-ui")&&t++,e=e.parentElement;return t}connected(){this.setAttribute("role","treeitem"),this.querySelector(':scope > [slot="row"]')||this.#t()}#t(){let t=document.createElement("div");t.setAttribute("slot","row"),t.setAttribute("tabindex","0");let e=document.createElement("icon-ui");if(e.setAttribute("slot","chevron"),e.setAttribute("name","caret-right"),t.appendChild(e),this.icon){let o=document.createElement("icon-ui");o.setAttribute("name",this.icon),o.setAttribute("slot","icon"),t.appendChild(o)}let i=document.createElement("span");i.setAttribute("slot","text"),i.textContent=this.text,t.appendChild(i);let r=document.createElement("span");r.setAttribute("slot","badge"),this.badge&&(r.textContent=this.badge),t.appendChild(r);let n=document.createElement("span");n.setAttribute("slot","actions"),t.appendChild(n),this.prepend(t)}render(){let t=this.querySelector(':scope > [slot="row"]');if(!t)return;t.style.paddingInlineStart=`${this.depth*16+4}px`,this.hasChildren?this.setAttribute("aria-expanded",String(this.open)):this.removeAttribute("aria-expanded");let e=t.querySelector('[slot="text"]');e&&this.text&&(e.textContent=this.text);let i=t.querySelector('[slot="badge"]');i&&(i.textContent=this.badge||"")}};S("tree-ui",Or),S("tree-item-ui",yr);$();var vr=class extends x{static requiredIcons=["caret-right"];static properties={collapsed:{type:Boolean,default:!1,reflect:!0},resizable:{type:Boolean,default:!1,reflect:!0},minWidth:{type:Number,default:200,attribute:"min-width",reflect:!0},maxWidth:{type:Number,default:9999,attribute:"max-width",reflect:!0},side:{type:String,default:"",reflect:!0}};static template=()=>null;#t=null;#e=!1;#i=0;#s=0;#r=null;#n="";#a=!1;connected(){this.#a||(this.#a=!0,this.addEventListener("click",this.#o),this.addEventListener("keydown",this.#l)),this.resizable&&!this.querySelector('[slot="resize"]')&&(this.#t=document.createElement("div"),this.#t.setAttribute("slot","resize"),this.appendChild(this.#t)),(this.#t||this.resizable)&&(this.#t=this.#t||this.querySelector('[slot="resize"]'),this.#t?.addEventListener("pointerdown",this.#c))}render(){let t=this.querySelector(":scope > header");if(t&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-expanded",String(!this.collapsed)),!t.querySelector('[slot="chevron"]'))){let e=document.createElement("icon-ui");e.setAttribute("slot","chevron"),e.setAttribute("name","caret-right"),t.append(e)}}toggle(){this.collapsed=!this.collapsed,this.dispatchEvent(new Event("toggle",{bubbles:!0}))}#o=t=>{let e=this.querySelector(":scope > header");e&&(t.target===e||e.contains(t.target))&&this.toggle()};#l=t=>{t.target===this.querySelector(":scope > header")&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.toggle())};#c=t=>{if(t.isPrimary){t.preventDefault(),this.#e=!0,this.#i=t.clientX,this.#s=this.getBoundingClientRect().width,this.#r=t.pointerId,this.setAttribute("data-resizing","");try{this.#t.setPointerCapture(t.pointerId)}catch{}this.#t.addEventListener("pointermove",this.#h),this.#t.addEventListener("pointerup",this.#u,{once:!0}),this.#t.addEventListener("pointercancel",this.#u,{once:!0}),this.#n=document.documentElement.style.cursor,document.documentElement.style.cursor="col-resize"}};#h=t=>{if(!this.#e)return;let e=this.side==="trailing"?-1:1,i=(t.clientX-this.#i)*e,r=Math.max(this.minWidth,Math.min(this.maxWidth,this.#s+i));this.style.width=`${r}px`};#u=()=>{if(this.#e){this.#e=!1,this.removeAttribute("data-resizing");try{this.#t?.releasePointerCapture(this.#r)}catch{}this.#r=null,this.#t?.removeEventListener("pointermove",this.#h),document.documentElement.style.cursor=this.#n}};disconnected(){this.removeEventListener("click",this.#o),this.removeEventListener("keydown",this.#l),this.#t?.removeEventListener("pointerdown",this.#c),this.#t?.removeEventListener("pointermove",this.#h),this.#e&&(document.documentElement.style.cursor=this.#n),this.#a=!1}};S("pane-ui",vr);$();var xr=class extends x{static properties={scroll:{type:Boolean,default:!1,reflect:!0},maxWidth:{type:String,default:"",attribute:"max-width",reflect:!0},padding:{type:String,default:"",reflect:!0},stickyHeader:{type:Boolean,default:!1,attribute:"sticky-header",reflect:!0}};static template=()=>null;#t=null;#e=null;connected(){this.stickyHeader&&this.#i()}disconnected(){this.#s()}render(){this.stickyHeader&&!this.#t&&this.#i(),!this.stickyHeader&&this.#t&&this.#s()}#i(){let t=this.querySelector(":scope > :is(header, header-ui)");t&&(this.#t||(this.#t=document.createElement("div"),this.#t.setAttribute("data-page-sentinel",""),this.#t.style.cssText="height: 0; width: 0; pointer-events: none;",t.insertAdjacentElement("beforebegin",this.#t)),this.#e||(this.#e=new IntersectionObserver(e=>{this.toggleAttribute("data-header-stuck",!e[0].isIntersecting)},{threshold:0})),this.#e.observe(this.#t))}#s(){this.#e?.disconnect(),this.#e=null,this.#t?.remove(),this.#t=null,this.removeAttribute("data-header-stuck")}};S("page-ui",xr);$();var Ea=class extends x{static properties={disabled:{type:Boolean,default:!1,reflect:!0},loading:{type:Boolean,default:!1,reflect:!0},placeholder:{type:String,default:"Type a message...",reflect:!0},model:{type:String,default:"",reflect:!0}};static template=()=>null;#t=null;#e=null;#i=null;#s=null;#r=[];#n=[];#a=null;#o=null;#l=null;#c=()=>this.#o?.click();#h=()=>{this.#o?.files?.length&&this.#m(this.#o.files),this.#o&&(this.#o.value="")};get value(){return this.#t?.value?.trim()??""}get attachments(){return[...this.#n]}set models(t){this.#r=t||[],this.#i&&(this.#i.options=this.#r,this.model&&(this.#i.value=this.model))}get models(){return this.#r}connected(){this.querySelector('[slot="toolbar"]')||(this.innerHTML=`
|
|
139
|
+
`}this.#t=this.querySelector('[slot="field"]'),this.#e=this.querySelector('[data-layer="base"] [slot="value"]'),this.#t&&this.#t.addEventListener("pointerdown",this.#c),this.addEventListener("keydown",this.#d)}render(){if(!this.#t)return;let t=this.#n(this.value);this.#e&&(this.#e.textContent=t);let e=this.querySelector('[data-layer="fill"] [slot="value"]');e&&(e.textContent=t);let i=this.max-this.min,r=i>0?(this.value-this.min)/i*100:0;this.style.setProperty("--range-fill-pct",`${r}%`),this.setAttribute("aria-valuemin",this.min),this.setAttribute("aria-valuemax",this.max),this.setAttribute("aria-valuenow",this.value),this.setAttribute("aria-valuetext",`${this.value}${this.suffix?" "+this.suffix:""}`),this.setAttribute("aria-label",this.label||""),this.syncValue(String(this.value))}#n(t){let e=(String(this.step).split(".")[1]||"").length;return e>0?t.toFixed(e):String(t)}#a(t){let e=Math.round((t-this.min)/this.step)*this.step+this.min;return Math.max(this.min,Math.min(this.max,parseFloat(e.toFixed(10))))}#o(t){let e=this.#a(t);e!==this.value&&(this.value=e,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{value:this.value}})))}#l(t){let e=this.#t.getBoundingClientRect(),i=Math.max(0,Math.min(1,(t-e.left)/e.width));return this.#a(this.min+i*(this.max-this.min))}#c=t=>{this.disabled||(t.preventDefault(),this.#o(this.#l(t.clientX)),this.#i=!0,this.#s=t.clientX,this.#r=this.value,this.setAttribute("data-dragging",""),this.#t.setPointerCapture(t.pointerId),this.#t.addEventListener("pointermove",this.#h),this.#t.addEventListener("pointerup",this.#u))};#h=t=>{if(!this.#i)return;let e=t.clientX-this.#s,i=this.#t.getBoundingClientRect().width,r=this.max-this.min,n=e/i*r;this.#o(this.#r+n)};#u=t=>{this.#i=!1,this.removeAttribute("data-dragging"),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#h),this.#t.removeEventListener("pointerup",this.#u),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value}}))};#d=t=>{if(this.disabled)return;let e=this.value;switch(t.key){case"ArrowRight":case"ArrowUp":e+=this.step;break;case"ArrowLeft":case"ArrowDown":e-=this.step;break;case"Home":e=this.min;break;case"End":e=this.max;break;case"PageUp":e+=this.step*10;break;case"PageDown":e-=this.step*10;break;default:return}t.preventDefault(),this.#o(e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value}}))};disconnected(){super.disconnected(),this.#t?.removeEventListener("pointerdown",this.#c),this.#t?.removeEventListener("pointermove",this.#h),this.#t?.removeEventListener("pointerup",this.#u),this.removeEventListener("keydown",this.#d),this.#t=null,this.#e=null}};S("range-ui",br);$();var Or=class extends x{static requiredIcons=["caret-right"];static template=()=>null;connected(){this.setAttribute("role","tree"),this.addEventListener("click",this.#e),this.addEventListener("keydown",this.#i)}get selectedItem(){return this.querySelector("tree-item-ui[selected]")}select(t,e=null){let i=this.selectedItem;i&&i!==t&&i.removeAttribute("selected"),t.setAttribute("selected",""),this.dispatchEvent(new CustomEvent("tree-select",{bubbles:!0,detail:{item:t,text:t.text,value:t.value,ctrlKey:!!e?.ctrlKey,metaKey:!!e?.metaKey,shiftKey:!!e?.shiftKey}}))}#t(t){if(!t)return null;if(t instanceof Element)return t.matches?.("tree-item-ui")?t:null;if(typeof t=="string"){let e=t.replace(/"/g,'\\"');return this.querySelector(`tree-item-ui[value="${e}"]`)||this.querySelector(`tree-item-ui[text="${e}"]`)||null}return null}expand(t){let e=this.#t(t);e&&e.hasChildren&&!e.open&&(e.open=!0)}collapse(t){let e=this.#t(t);e&&e.open&&(e.open=!1)}expandAll(){for(let t of this.querySelectorAll("tree-item-ui"))t.hasChildren&&!t.open&&(t.open=!0)}collapseAll(){for(let t of this.querySelectorAll("tree-item-ui"))t.open&&(t.open=!1)}expandTo(t){let e=this.#t(t);if(!e)return;let i=e.parentElement?.closest("tree-item-ui");for(;i;)i.hasChildren&&!i.open&&(i.open=!0),i=i.parentElement?.closest("tree-item-ui");e.querySelector(':scope > [slot="row"]')?.scrollIntoView?.({block:"nearest",inline:"nearest"})}#e=t=>{let e=t.target.closest("tree-item-ui");if(!e||!this.contains(e)||t.target.closest('[slot="actions"] *'))return;let i=e.querySelector(':scope > [slot="row"]');!i||!(t.target===i||i.contains(t.target))||(this.select(e,t),e.hasChildren&&(e.open=!e.open))};#i=t=>{let e=t.target.closest("tree-item-ui");if(e)switch(t.key){case"ArrowRight":if(t.preventDefault(),e.hasChildren&&!e.open)e.open=!0;else{let i=e.querySelector(":scope > tree-item-ui");i&&i.querySelector('[slot="row"]')?.focus()}break;case"ArrowLeft":if(t.preventDefault(),e.hasChildren&&e.open)e.open=!1;else{let i=e.parentElement?.closest("tree-item-ui");i&&i.querySelector(':scope > [slot="row"]')?.focus()}break;case"ArrowDown":{t.preventDefault();let i=this.#s(e);i&&i.querySelector(':scope > [slot="row"]')?.focus();break}case"ArrowUp":{t.preventDefault();let i=this.#r(e);i&&i.querySelector(':scope > [slot="row"]')?.focus();break}case"Enter":case" ":t.preventDefault(),this.select(e,t);break}};#s(t){if(t.open&&t.hasChildren)return t.querySelector(":scope > tree-item-ui");let e=t;for(;e;){let i=e.nextElementSibling;if(i&&i.matches("tree-item-ui"))return i;e=e.parentElement?.closest("tree-item-ui")}return null}#r(t){let e=t.previousElementSibling;if(e&&e.matches("tree-item-ui")){let r=e;for(;r.open&&r.hasChildren;){let n=r.querySelectorAll(":scope > tree-item-ui");r=n[n.length-1]}return r}return t.parentElement?.closest("tree-item-ui")||null}disconnected(){this.removeEventListener("click",this.#e),this.removeEventListener("keydown",this.#i)}},yr=class extends x{static properties={text:{type:String,default:"",reflect:!0},icon:{type:String,default:"",reflect:!0},value:{type:String,default:"",reflect:!0},open:{type:Boolean,default:!1,reflect:!0},selected:{type:Boolean,default:!1,reflect:!0},badge:{type:String,default:"",reflect:!0}};static template=()=>null;get hasChildren(){return this.querySelector(":scope > tree-item-ui")!==null}get depth(){let t=0,e=this.parentElement;for(;e;)e.matches("tree-item-ui")&&t++,e=e.parentElement;return t}connected(){this.setAttribute("role","treeitem"),this.querySelector(':scope > [slot="row"]')||this.#t()}#t(){let t=document.createElement("div");t.setAttribute("slot","row"),t.setAttribute("tabindex","0");let e=this.querySelector(':scope > [slot="caret"]');if(e)t.appendChild(e);else{let o=document.createElement("icon-ui");o.setAttribute("slot","caret"),o.setAttribute("name","caret-right"),t.appendChild(o)}if(this.icon){let o=document.createElement("icon-ui");o.setAttribute("name",this.icon),o.setAttribute("slot","icon"),t.appendChild(o)}let i=document.createElement("span");i.setAttribute("slot","text"),i.textContent=this.text,t.appendChild(i);let r=document.createElement("span");r.setAttribute("slot","badge"),this.badge&&(r.textContent=this.badge),t.appendChild(r);let n=this.querySelectorAll(':scope > [slot="actions"]');if(n.length)for(let o of n)t.appendChild(o);else{let o=document.createElement("span");o.setAttribute("slot","actions"),t.appendChild(o)}this.prepend(t)}render(){let t=this.querySelector(':scope > [slot="row"]');if(!t)return;t.style.paddingInlineStart=`${this.depth*16+4}px`,this.hasChildren?this.setAttribute("aria-expanded",String(this.open)):this.removeAttribute("aria-expanded");let e=t.querySelector('[slot="text"]');e&&this.text&&(e.textContent=this.text);let i=t.querySelector('[slot="badge"]');i&&(i.textContent=this.badge||"")}};S("tree-ui",Or),S("tree-item-ui",yr);$();var vr=class extends x{static requiredIcons=["caret-right"];static properties={collapsed:{type:Boolean,default:!1,reflect:!0},resizable:{type:Boolean,default:!1,reflect:!0},minWidth:{type:Number,default:200,attribute:"min-width",reflect:!0},maxWidth:{type:Number,default:9999,attribute:"max-width",reflect:!0},side:{type:String,default:"",reflect:!0}};static template=()=>null;#t=null;#e=!1;#i=0;#s=0;#r=null;#n="";#a=!1;connected(){this.#a||(this.#a=!0,this.addEventListener("click",this.#o),this.addEventListener("keydown",this.#l)),this.resizable&&!this.querySelector('[slot="resize"]')&&(this.#t=document.createElement("div"),this.#t.setAttribute("slot","resize"),this.appendChild(this.#t)),(this.#t||this.resizable)&&(this.#t=this.#t||this.querySelector('[slot="resize"]'),this.#t?.addEventListener("pointerdown",this.#c))}render(){let t=this.querySelector(":scope > header");if(t&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-expanded",String(!this.collapsed)),!t.querySelector('[slot="caret"]'))){let e=document.createElement("icon-ui");e.setAttribute("slot","caret"),e.setAttribute("name","caret-right"),t.append(e)}}toggle(){this.collapsed=!this.collapsed,this.dispatchEvent(new Event("toggle",{bubbles:!0}))}#o=t=>{let e=this.querySelector(":scope > header");e&&(t.target===e||e.contains(t.target))&&this.toggle()};#l=t=>{t.target===this.querySelector(":scope > header")&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.toggle())};#c=t=>{if(t.isPrimary){t.preventDefault(),this.#e=!0,this.#i=t.clientX,this.#s=this.getBoundingClientRect().width,this.#r=t.pointerId,this.setAttribute("data-resizing","");try{this.#t.setPointerCapture(t.pointerId)}catch{}this.#t.addEventListener("pointermove",this.#h),this.#t.addEventListener("pointerup",this.#u,{once:!0}),this.#t.addEventListener("pointercancel",this.#u,{once:!0}),this.#n=document.documentElement.style.cursor,document.documentElement.style.cursor="col-resize"}};#h=t=>{if(!this.#e)return;let e=this.side==="trailing"?-1:1,i=(t.clientX-this.#i)*e,r=Math.max(this.minWidth,Math.min(this.maxWidth,this.#s+i));this.style.width=`${r}px`};#u=()=>{if(this.#e){this.#e=!1,this.removeAttribute("data-resizing");try{this.#t?.releasePointerCapture(this.#r)}catch{}this.#r=null,this.#t?.removeEventListener("pointermove",this.#h),document.documentElement.style.cursor=this.#n}};disconnected(){this.removeEventListener("click",this.#o),this.removeEventListener("keydown",this.#l),this.#t?.removeEventListener("pointerdown",this.#c),this.#t?.removeEventListener("pointermove",this.#h),this.#e&&(document.documentElement.style.cursor=this.#n),this.#a=!1}};S("pane-ui",vr);$();var xr=class extends x{static properties={scroll:{type:Boolean,default:!1,reflect:!0},maxWidth:{type:String,default:"",attribute:"max-width",reflect:!0},padding:{type:String,default:"",reflect:!0},stickyHeader:{type:Boolean,default:!1,attribute:"sticky-header",reflect:!0}};static template=()=>null;#t=null;#e=null;connected(){this.stickyHeader&&this.#i()}disconnected(){this.#s()}render(){this.stickyHeader&&!this.#t&&this.#i(),!this.stickyHeader&&this.#t&&this.#s()}#i(){let t=this.querySelector(":scope > :is(header, header-ui)");t&&(this.#t||(this.#t=document.createElement("div"),this.#t.setAttribute("data-page-sentinel",""),this.#t.style.cssText="height: 0; width: 0; pointer-events: none;",t.insertAdjacentElement("beforebegin",this.#t)),this.#e||(this.#e=new IntersectionObserver(e=>{this.toggleAttribute("data-header-stuck",!e[0].isIntersecting)},{threshold:0})),this.#e.observe(this.#t))}#s(){this.#e?.disconnect(),this.#e=null,this.#t?.remove(),this.#t=null,this.removeAttribute("data-header-stuck")}};S("page-ui",xr);$();var Ea=class extends x{static properties={disabled:{type:Boolean,default:!1,reflect:!0},loading:{type:Boolean,default:!1,reflect:!0},placeholder:{type:String,default:"Type a message...",reflect:!0},model:{type:String,default:"",reflect:!0}};static template=()=>null;#t=null;#e=null;#i=null;#s=null;#r=[];#n=[];#a=null;#o=null;#l=null;#c=()=>this.#o?.click();#h=()=>{this.#o?.files?.length&&this.#m(this.#o.files),this.#o&&(this.#o.value="")};get value(){return this.#t?.value?.trim()??""}get attachments(){return[...this.#n]}set models(t){this.#r=t||[],this.#i&&(this.#i.options=this.#r,this.model&&(this.#i.value=this.model))}get models(){return this.#r}connected(){this.querySelector('[slot="toolbar"]')||(this.innerHTML=`
|
|
140
140
|
<textarea-ui placeholder="${this.placeholder}" rows="1"></textarea-ui>
|
|
141
141
|
<div slot="toolbar">
|
|
142
142
|
<select-ui slot="model" placeholder="Model" aria-label="Select model" divider></select-ui>
|
|
@@ -315,7 +315,7 @@ Correct shape for <chart-ui x="label" y="value">:
|
|
|
315
315
|
<span data-reasoning-meta>
|
|
316
316
|
${i?`<span data-reasoning-counter>${r}/${i}</span>`:""}
|
|
317
317
|
<span data-reasoning-time>${n}s</span>
|
|
318
|
-
<icon-ui name="${this.collapsed?"caret-right":"caret-up"}" color="muted" data-reasoning-
|
|
318
|
+
<icon-ui name="${this.collapsed?"caret-right":"caret-up"}" color="muted" data-reasoning-caret></icon-ui>
|
|
319
319
|
</span>
|
|
320
320
|
`,this.#a.hidden=this.collapsed,this.#n.setAttribute("aria-expanded",String(!this.collapsed)),this.collapsed)return;this.#a.innerHTML="";let a=null;for(let l of this.#t)l.kind==="step"?(a||(a=this.#b(),this.#a.appendChild(a)),a.appendChild(this.#y(l))):(a=null,this.#a.appendChild(this.#w(l)))}#b(){let t=document.createElement("timeline-ui");return t.setAttribute("size","sm"),t}#y(t){let e=document.createElement("timeline-item-ui");e.setAttribute("text",t.label||""),t.status==="done"&&e.setAttribute("status","completed"),t.status==="error"&&e.setAttribute("status","error"),t.status==="active"&&(e.setAttribute("status","active"),e.setAttribute("spinner",""));let i=t.durationLabel||(t.duration!=null?XD(t.duration):"");return i&&e.setAttribute("duration",i),t.outcomes?.length&&(e.outcomes=t.outcomes),e.dataset.stepId=t.id||"",e}#w(t){switch(t.kind){case"thought":return this.#v(t);case"plan":return this.#k(t);case"iteration":return this.#S(t);default:return document.createTextNode("")}}#v(t){let e=document.createElement("div");e.setAttribute("data-reasoning-thought","");let i=document.createElement("span");return i.setAttribute("data-reasoning-thought-text",""),i.textContent=t.text||"",e.appendChild(i),e}#k(t){let e=document.createElement("div");e.setAttribute("data-reasoning-plan","");let i=document.createElement("div");i.setAttribute("data-reasoning-plan-label",""),i.textContent="Plan",e.appendChild(i);let r=document.createElement("ol");r.setAttribute("data-reasoning-plan-list","");for(let n of t.items||[]){let o=document.createElement("li");o.textContent=n,r.appendChild(o)}return e.appendChild(r),e}#S(t){let e=document.createElement("div");e.setAttribute("data-reasoning-iteration",""),t.status==="active"&&e.setAttribute("data-active",""),t.status==="done"&&e.setAttribute("data-done",""),t.status==="error"&&e.setAttribute("data-error","");let i=document.createElement("div");i.setAttribute("data-reasoning-iter-header","");let r=t.status==="done"?'<icon-ui name="check-circle" color="success" size="sm"></icon-ui>':t.status==="error"?'<icon-ui name="warning" color="danger" size="sm"></icon-ui>':"<span data-reasoning-spinner data-small></span>";if(i.innerHTML=`
|
|
321
321
|
${r}
|
|
@@ -342,7 +342,7 @@ Correct shape for <chart-ui x="label" y="value">:
|
|
|
342
342
|
`:"";this.#s.innerHTML=`
|
|
343
343
|
<summary>
|
|
344
344
|
<span data-trace-status>${t}</span>
|
|
345
|
-
<icon-ui name="caret-right" color="muted" size="sm" data-trace-
|
|
345
|
+
<icon-ui name="caret-right" color="muted" size="sm" data-trace-caret></icon-ui>
|
|
346
346
|
</summary>
|
|
347
347
|
<div data-trace-body>
|
|
348
348
|
${this.#e.length?`<div data-trace-rows${i?" data-has-details":""}>${r}${n}</div>`:""}
|
|
@@ -352,7 +352,7 @@ Correct shape for <chart-ui x="label" y="value">:
|
|
|
352
352
|
<span data-trace-label>${i}</span>
|
|
353
353
|
<span data-trace-value>${r}</span>
|
|
354
354
|
<span data-trace-aux>${n}</span>
|
|
355
|
-
${e?o?'<icon-ui name="caret-right" color="muted" data-trace-row-
|
|
355
|
+
${e?o?'<icon-ui name="caret-right" color="muted" data-trace-row-caret></icon-ui>':'<span data-trace-row-caret-spacer aria-hidden="true"></span>':""}
|
|
356
356
|
`;return o?`
|
|
357
357
|
<details data-trace-row>
|
|
358
358
|
<summary>${a}</summary>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-modules",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.50",
|
|
4
4
|
"description": "AdiaUI composite custom elements \u2014 shell, chat, editor, runtime clusters built from @adia-ai/web-components primitives. Subpath exports per cluster.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|