@aikaara/chat-sdk 0.9.1 → 0.9.3

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.
@@ -264,9 +264,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
264
264
  gap: 8px;
265
265
  scroll-behavior: smooth;
266
266
  }
267
- .message-list::-webkit-scrollbar { width: 6px; }
267
+ .message-list { scrollbar-width: thin; scrollbar-color: var(--aikaara-border, #e5e7eb) transparent; }
268
+ .message-list::-webkit-scrollbar { width: 6px; height: 6px; }
268
269
  .message-list::-webkit-scrollbar-track { background: transparent; }
269
270
  .message-list::-webkit-scrollbar-thumb { background: var(--aikaara-border, #e5e7eb); border-radius: 3px; }
271
+ .message-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
272
+ .message-list::-webkit-scrollbar-corner { background: transparent; }
270
273
  .message-wrap { display: flex; flex-direction: column; }
271
274
  .message-wrap.user { align-items: flex-end; }
272
275
  .message-wrap.assistant,
@@ -666,14 +669,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
666
669
  <span class="message"></span>
667
670
  <button class="dismiss">Dismiss</button>
668
671
  </div>
669
- `,this.container=this.shadow.querySelector(".banner"),this.shadow.querySelector(".dismiss")?.addEventListener("click",()=>this.hide())}show(e,t){const r=this.container.querySelector(".message");r&&(r.textContent=e),this.container.classList.add("visible"),this.dismissTimer&&clearTimeout(this.dismissTimer),t&&(this.dismissTimer=setTimeout(()=>this.hide(),t))}hide(){this.container.classList.remove("visible"),this.dismissTimer&&(clearTimeout(this.dismissTimer),this.dismissTimer=null)}}const qr=new Map;function Pl(c){const e=qr.get(c);if(e)return e;const t=new Promise((r,a)=>{const n=document.querySelector(`script[data-aikaara-src="${CSS.escape(c)}"]`);if(n){n.dataset.aikaaraReady==="1"?r():(n.addEventListener("load",()=>r(),{once:!0}),n.addEventListener("error",()=>a(new Error(`Failed to load ${c}`)),{once:!0}));return}const i=document.createElement("script");i.src=c,i.async=!0,i.crossOrigin="anonymous",i.dataset.aikaaraSrc=c,i.addEventListener("load",()=>{i.dataset.aikaaraReady="1",r()},{once:!0}),i.addEventListener("error",()=>{qr.delete(c),a(new Error(`Failed to load ${c}`))},{once:!0}),document.head.appendChild(i)});return qr.set(c,t),t}function Rh(c,e=5e3){return new Promise((t,r)=>{const a=setTimeout(()=>r(new Error(`Custom element <${c}> not registered within ${e}ms`)),e);customElements.whenDefined(c).then(()=>{clearTimeout(a),t()})})}function jh(c){const e=`template:${c}`,t=window.__aikaara_descriptor__?.components?.[e];return t&&t.kind==="iife-element"?{render:t.tag,scriptUrl:t.scriptUrl,props:t.props}:window.__aikaara_descriptor__?.templates?.[c]}class Ml extends HTMLElement{shadow;payloadData=null;innerMessage="";static get observedAttributes(){return["content-type","template-id","message-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.addEventListener("template-action",()=>{this.dataset.consumed="true"})}attributeChangedCallback(){this.render()}setPayload(e,t){this.payloadData=e,t!==void 0&&(this.innerMessage=t),this.render()}render(){const e=this.getAttribute("content-type")??"",t=this.getAttribute("template-id")??"";for(this.shadow.innerHTML=`
672
+ `,this.container=this.shadow.querySelector(".banner"),this.shadow.querySelector(".dismiss")?.addEventListener("click",()=>this.hide())}show(e,t){const r=this.container.querySelector(".message");r&&(r.textContent=e),this.container.classList.add("visible"),this.dismissTimer&&clearTimeout(this.dismissTimer),t&&(this.dismissTimer=setTimeout(()=>this.hide(),t))}hide(){this.container.classList.remove("visible"),this.dismissTimer&&(clearTimeout(this.dismissTimer),this.dismissTimer=null)}}const qr=new Map;function Pl(c){const e=qr.get(c);if(e)return e;const t=new Promise((r,a)=>{const n=document.querySelector(`script[data-aikaara-src="${CSS.escape(c)}"]`);if(n){n.dataset.aikaaraReady==="1"?r():(n.addEventListener("load",()=>r(),{once:!0}),n.addEventListener("error",()=>a(new Error(`Failed to load ${c}`)),{once:!0}));return}const i=document.createElement("script");i.src=c,i.async=!0,i.crossOrigin="anonymous",i.dataset.aikaaraSrc=c,i.addEventListener("load",()=>{i.dataset.aikaaraReady="1",r()},{once:!0}),i.addEventListener("error",()=>{qr.delete(c),a(new Error(`Failed to load ${c}`))},{once:!0}),document.head.appendChild(i)});return qr.set(c,t),t}function Rh(c,e=5e3){return new Promise((t,r)=>{const a=setTimeout(()=>r(new Error(`Custom element <${c}> not registered within ${e}ms`)),e);customElements.whenDefined(c).then(()=>{clearTimeout(a),t()})})}function jh(c){const e=`template:${c}`,t=window.__aikaara_descriptor__?.components?.[e];return t&&t.kind==="iife-element"?{render:t.tag,scriptUrl:t.scriptUrl,props:t.props}:window.__aikaara_descriptor__?.templates?.[c]}class Ml extends HTMLElement{shadow;payloadData=null;innerMessage="";renderGen=0;static get observedAttributes(){return["content-type","template-id","message-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.addEventListener("template-action",()=>{this.dataset.consumed="true"})}attributeChangedCallback(){this.render()}setPayload(e,t){this.payloadData=e,t!==void 0&&(this.innerMessage=t),this.render()}render(){const e=this.getAttribute("content-type")??"",t=this.getAttribute("template-id")??"";for(this.renderGen+=1,this.shadow.innerHTML=`
670
673
  <style>
671
674
  :host { display: block; }
672
675
  :host([data-consumed]) ::slotted(*) { display: none !important; }
673
676
  ::slotted(*) { display: block; }
674
677
  </style>
675
678
  <slot></slot>
676
- `;this.firstChild;)this.removeChild(this.firstChild);if(!e)return;const r=t?jh(t):void 0,a=r?.render??(t?`aikaara-template-${t}`:`aikaara-template-${e}`);if(r?.scriptUrl&&!customElements.get(a)&&Pl(r.scriptUrl).then(()=>Rh(a)).then(()=>this.render()).catch(n=>console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`,n)),customElements.get(a)){const n=document.createElement(a);if(r?.props){for(const[i,s]of Object.entries(r.props))if(typeof n[i]=="function")try{n[i](s)}catch(o){console.warn(`[aikaara-template-renderer] props.${i} threw on <${a}>`,o)}}n.setPayload?.(this.payloadData,this.innerMessage),this.appendChild(n);return}if(Array.isArray(this.payloadData)){const n=this.payloadData;if(n.length>0&&n.every(s=>s&&typeof s=="object"&&!Array.isArray(s)&&!("type"in s)&&!("data"in s)&&typeof s.message=="string")){const s=document.createElement("aikaara-option-list");s.setPayload({name:"quick-reply",type:"button",options:n.map(o=>{const l=typeof o.title=="string"?o.title:"",u=o.message;return{label:l||u,value:u}})}),this.appendChild(s);return}for(const s of n)this.mountField(s)}else if(this.payloadData&&typeof this.payloadData=="object"){const n=this.payloadData;typeof n.message=="string"&&(n.okLabel||n.action||n.ok)&&this.mountModal(n)}}mountField(e){if(!e||typeof e!="object")return;const t=e.type??e.data?.type;if(t==="link"){this.mountLinkButton(e);return}const r=e.data;if(r){if(t==="checkbox"||t==="radio"||t==="button"){const a=document.createElement("aikaara-option-list");a.setPayload({name:r.name??"",title:r.title,options:r.options??[],type:t}),this.appendChild(a);return}if(t==="submit"){const a=document.createElement("aikaara-submit-action"),n=this.getAttribute("message-id")??void 0;a.setPayload({name:r.name??"Submit",action:r.action??{message:r.name??"Submit"},messageId:n}),this.appendChild(a);return}t==="modal"&&this.mountModal({message:r.message??"",okLabel:r.okLabel,cancelLabel:r.cancelLabel,action:r.action})}}mountLinkButton(e){Promise.resolve().then(()=>require("./AikaaraLinkButton-VDNx7RfC.cjs")).then(({registerAikaaraLinkButton:t,AikaaraLinkButton:r})=>{t();const a=document.createElement("aikaara-link-button");a.setPayload({name:e.name??"Open",url:e.url??"",openLinkInNewTab:e.openLinkInNewTab,orderId:e.orderId,extra:Nh(e),messageId:this.getAttribute("message-id")??void 0}),this.appendChild(a)})}mountModal(e){const t=document.createElement("aikaara-modal-action");t.setPayload(e),this.appendChild(t)}}const Lh=new Set(["type","url","name","openLinkInNewTab","orderId"]);function Nh(c){const e={};for(const[t,r]of Object.entries(c))Lh.has(t)||(e[t]=r);return e}class Rl extends HTMLElement{shadow;static get observedAttributes(){return["text","subtext"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const e=this.getAttribute("text")??this.textContent??"",t=this.getAttribute("subtext")??"";this.shadow.innerHTML=`
679
+ `;this.firstChild;)this.removeChild(this.firstChild);if(!e)return;const r=t?jh(t):void 0,a=r?.render??(t?`aikaara-template-${t}`:`aikaara-template-${e}`);if(r?.scriptUrl&&!customElements.get(a)&&Pl(r.scriptUrl).then(()=>Rh(a)).then(()=>this.render()).catch(n=>console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`,n)),customElements.get(a)){const n=document.createElement(a);if(r?.props){for(const[i,s]of Object.entries(r.props))if(typeof n[i]=="function")try{n[i](s)}catch(o){console.warn(`[aikaara-template-renderer] props.${i} threw on <${a}>`,o)}}n.setPayload?.(this.payloadData,this.innerMessage),this.appendChild(n);return}if(Array.isArray(this.payloadData)){const n=this.payloadData;if(n.length>0&&n.every(s=>s&&typeof s=="object"&&!Array.isArray(s)&&!("type"in s)&&!("data"in s)&&typeof s.message=="string")){const s=document.createElement("aikaara-option-list");s.setPayload({name:"quick-reply",type:"button",options:n.map(o=>{const l=typeof o.title=="string"?o.title:"",u=o.message;return{label:l||u,value:u}})}),this.appendChild(s);return}for(const s of n)this.mountField(s)}else if(this.payloadData&&typeof this.payloadData=="object"){const n=this.payloadData;typeof n.message=="string"&&(n.okLabel||n.action||n.ok)&&this.mountModal(n)}}mountField(e){if(!e||typeof e!="object")return;const t=e.type??e.data?.type;if(t==="link"){this.mountLinkButton(e);return}const r=e.data;if(r){if(t==="checkbox"||t==="radio"||t==="button"){const a=document.createElement("aikaara-option-list");a.setPayload({name:r.name??"",title:r.title,options:r.options??[],type:t}),this.appendChild(a);return}if(t==="submit"){const a=document.createElement("aikaara-submit-action"),n=this.getAttribute("message-id")??void 0;a.setPayload({name:r.name??"Submit",action:r.action??{message:r.name??"Submit"},messageId:n}),this.appendChild(a);return}t==="modal"&&this.mountModal({message:r.message??"",okLabel:r.okLabel,cancelLabel:r.cancelLabel,action:r.action})}}mountLinkButton(e){const t=this.renderGen;Promise.resolve().then(()=>require("./AikaaraLinkButton-VDNx7RfC.cjs")).then(({registerAikaaraLinkButton:r,AikaaraLinkButton:a})=>{if(t!==this.renderGen)return;r();const n=document.createElement("aikaara-link-button");n.setPayload({name:e.name??"Open",url:e.url??"",openLinkInNewTab:e.openLinkInNewTab,orderId:e.orderId,extra:Nh(e),messageId:this.getAttribute("message-id")??void 0}),this.appendChild(n)})}mountModal(e){const t=document.createElement("aikaara-modal-action");t.setPayload(e),this.appendChild(t)}}const Lh=new Set(["type","url","name","openLinkInNewTab","orderId"]);function Nh(c){const e={};for(const[t,r]of Object.entries(c))Lh.has(t)||(e[t]=r);return e}class Rl extends HTMLElement{shadow;static get observedAttributes(){return["text","subtext"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const e=this.getAttribute("text")??this.textContent??"",t=this.getAttribute("subtext")??"";this.shadow.innerHTML=`
677
680
  <style>
678
681
  :host {
679
682
  display: flex;
@@ -12520,9 +12520,12 @@ class lh extends HTMLElement {
12520
12520
  gap: 8px;
12521
12521
  scroll-behavior: smooth;
12522
12522
  }
12523
- .message-list::-webkit-scrollbar { width: 6px; }
12523
+ .message-list { scrollbar-width: thin; scrollbar-color: var(--aikaara-border, #e5e7eb) transparent; }
12524
+ .message-list::-webkit-scrollbar { width: 6px; height: 6px; }
12524
12525
  .message-list::-webkit-scrollbar-track { background: transparent; }
12525
12526
  .message-list::-webkit-scrollbar-thumb { background: var(--aikaara-border, #e5e7eb); border-radius: 3px; }
12527
+ .message-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
12528
+ .message-list::-webkit-scrollbar-corner { background: transparent; }
12526
12529
  .message-wrap { display: flex; flex-direction: column; }
12527
12530
  .message-wrap.user { align-items: flex-end; }
12528
12531
  .message-wrap.assistant,
@@ -13365,6 +13368,13 @@ class vh extends HTMLElement {
13365
13368
  shadow;
13366
13369
  payloadData = null;
13367
13370
  innerMessage = "";
13371
+ // Bumped every render(); async mount callbacks check this against
13372
+ // their captured snapshot and bail if a newer render has happened.
13373
+ // Without this, an async dynamic import (e.g. mountLinkButton) can
13374
+ // append a child AFTER a later render cleared the children, leaving
13375
+ // stale buttons stacked next to the freshly-mounted tenant tag — the
13376
+ // 3-Pay-Now bug on myfinancials.
13377
+ renderGen = 0;
13368
13378
  static get observedAttributes() {
13369
13379
  return ["content-type", "template-id", "message-id"];
13370
13380
  }
@@ -13384,7 +13394,7 @@ class vh extends HTMLElement {
13384
13394
  }
13385
13395
  render() {
13386
13396
  const e = this.getAttribute("content-type") ?? "", t = this.getAttribute("template-id") ?? "";
13387
- for (this.shadow.innerHTML = `
13397
+ for (this.renderGen += 1, this.shadow.innerHTML = `
13388
13398
  <style>
13389
13399
  :host { display: block; }
13390
13400
  :host([data-consumed]) ::slotted(*) { display: none !important; }
@@ -13474,17 +13484,19 @@ class vh extends HTMLElement {
13474
13484
  * via the `aikaara-link-action` event.
13475
13485
  */
13476
13486
  mountLinkButton(e) {
13477
- import("./AikaaraLinkButton-C1S7MfVT.mjs").then(({ registerAikaaraLinkButton: t, AikaaraLinkButton: r }) => {
13478
- t();
13479
- const a = document.createElement("aikaara-link-button");
13480
- a.setPayload({
13487
+ const t = this.renderGen;
13488
+ import("./AikaaraLinkButton-C1S7MfVT.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: a }) => {
13489
+ if (t !== this.renderGen) return;
13490
+ r();
13491
+ const n = document.createElement("aikaara-link-button");
13492
+ n.setPayload({
13481
13493
  name: e.name ?? "Open",
13482
13494
  url: e.url ?? "",
13483
13495
  openLinkInNewTab: e.openLinkInNewTab,
13484
13496
  orderId: e.orderId,
13485
13497
  extra: _h(e),
13486
13498
  messageId: this.getAttribute("message-id") ?? void 0
13487
- }), this.appendChild(a);
13499
+ }), this.appendChild(n);
13488
13500
  });
13489
13501
  }
13490
13502
  mountModal(e) {
@@ -264,9 +264,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
264
264
  gap: 8px;
265
265
  scroll-behavior: smooth;
266
266
  }
267
- .message-list::-webkit-scrollbar { width: 6px; }
267
+ .message-list { scrollbar-width: thin; scrollbar-color: var(--aikaara-border, #e5e7eb) transparent; }
268
+ .message-list::-webkit-scrollbar { width: 6px; height: 6px; }
268
269
  .message-list::-webkit-scrollbar-track { background: transparent; }
269
270
  .message-list::-webkit-scrollbar-thumb { background: var(--aikaara-border, #e5e7eb); border-radius: 3px; }
271
+ .message-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
272
+ .message-list::-webkit-scrollbar-corner { background: transparent; }
270
273
  .message-wrap { display: flex; flex-direction: column; }
271
274
  .message-wrap.user { align-items: flex-end; }
272
275
  .message-wrap.assistant,
@@ -666,14 +669,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
666
669
  <span class="message"></span>
667
670
  <button class="dismiss">Dismiss</button>
668
671
  </div>
669
- `,this.container=this.shadow.querySelector(".banner"),this.shadow.querySelector(".dismiss")?.addEventListener("click",()=>this.hide())}show(e,t){const r=this.container.querySelector(".message");r&&(r.textContent=e),this.container.classList.add("visible"),this.dismissTimer&&clearTimeout(this.dismissTimer),t&&(this.dismissTimer=setTimeout(()=>this.hide(),t))}hide(){this.container.classList.remove("visible"),this.dismissTimer&&(clearTimeout(this.dismissTimer),this.dismissTimer=null)}}const oo=new Map;function _l(c){const e=oo.get(c);if(e)return e;const t=new Promise((r,a)=>{const n=document.querySelector(`script[data-aikaara-src="${CSS.escape(c)}"]`);if(n){n.dataset.aikaaraReady==="1"?r():(n.addEventListener("load",()=>r(),{once:!0}),n.addEventListener("error",()=>a(new Error(`Failed to load ${c}`)),{once:!0}));return}const i=document.createElement("script");i.src=c,i.async=!0,i.crossOrigin="anonymous",i.dataset.aikaaraSrc=c,i.addEventListener("load",()=>{i.dataset.aikaaraReady="1",r()},{once:!0}),i.addEventListener("error",()=>{oo.delete(c),a(new Error(`Failed to load ${c}`))},{once:!0}),document.head.appendChild(i)});return oo.set(c,t),t}function Th(c,e=5e3){return new Promise((t,r)=>{const a=setTimeout(()=>r(new Error(`Custom element <${c}> not registered within ${e}ms`)),e);customElements.whenDefined(c).then(()=>{clearTimeout(a),t()})})}function Ch(c){const e=`template:${c}`,t=window.__aikaara_descriptor__?.components?.[e];return t&&t.kind==="iife-element"?{render:t.tag,scriptUrl:t.scriptUrl,props:t.props}:window.__aikaara_descriptor__?.templates?.[c]}class Oh extends HTMLElement{shadow;payloadData=null;innerMessage="";static get observedAttributes(){return["content-type","template-id","message-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.addEventListener("template-action",()=>{this.dataset.consumed="true"})}attributeChangedCallback(){this.render()}setPayload(e,t){this.payloadData=e,t!==void 0&&(this.innerMessage=t),this.render()}render(){const e=this.getAttribute("content-type")??"",t=this.getAttribute("template-id")??"";for(this.shadow.innerHTML=`
672
+ `,this.container=this.shadow.querySelector(".banner"),this.shadow.querySelector(".dismiss")?.addEventListener("click",()=>this.hide())}show(e,t){const r=this.container.querySelector(".message");r&&(r.textContent=e),this.container.classList.add("visible"),this.dismissTimer&&clearTimeout(this.dismissTimer),t&&(this.dismissTimer=setTimeout(()=>this.hide(),t))}hide(){this.container.classList.remove("visible"),this.dismissTimer&&(clearTimeout(this.dismissTimer),this.dismissTimer=null)}}const oo=new Map;function _l(c){const e=oo.get(c);if(e)return e;const t=new Promise((r,a)=>{const n=document.querySelector(`script[data-aikaara-src="${CSS.escape(c)}"]`);if(n){n.dataset.aikaaraReady==="1"?r():(n.addEventListener("load",()=>r(),{once:!0}),n.addEventListener("error",()=>a(new Error(`Failed to load ${c}`)),{once:!0}));return}const i=document.createElement("script");i.src=c,i.async=!0,i.crossOrigin="anonymous",i.dataset.aikaaraSrc=c,i.addEventListener("load",()=>{i.dataset.aikaaraReady="1",r()},{once:!0}),i.addEventListener("error",()=>{oo.delete(c),a(new Error(`Failed to load ${c}`))},{once:!0}),document.head.appendChild(i)});return oo.set(c,t),t}function Th(c,e=5e3){return new Promise((t,r)=>{const a=setTimeout(()=>r(new Error(`Custom element <${c}> not registered within ${e}ms`)),e);customElements.whenDefined(c).then(()=>{clearTimeout(a),t()})})}function Ch(c){const e=`template:${c}`,t=window.__aikaara_descriptor__?.components?.[e];return t&&t.kind==="iife-element"?{render:t.tag,scriptUrl:t.scriptUrl,props:t.props}:window.__aikaara_descriptor__?.templates?.[c]}class Oh extends HTMLElement{shadow;payloadData=null;innerMessage="";renderGen=0;static get observedAttributes(){return["content-type","template-id","message-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.addEventListener("template-action",()=>{this.dataset.consumed="true"})}attributeChangedCallback(){this.render()}setPayload(e,t){this.payloadData=e,t!==void 0&&(this.innerMessage=t),this.render()}render(){const e=this.getAttribute("content-type")??"",t=this.getAttribute("template-id")??"";for(this.renderGen+=1,this.shadow.innerHTML=`
670
673
  <style>
671
674
  :host { display: block; }
672
675
  :host([data-consumed]) ::slotted(*) { display: none !important; }
673
676
  ::slotted(*) { display: block; }
674
677
  </style>
675
678
  <slot></slot>
676
- `;this.firstChild;)this.removeChild(this.firstChild);if(!e)return;const r=t?Ch(t):void 0,a=r?.render??(t?`aikaara-template-${t}`:`aikaara-template-${e}`);if(r?.scriptUrl&&!customElements.get(a)&&_l(r.scriptUrl).then(()=>Th(a)).then(()=>this.render()).catch(n=>console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`,n)),customElements.get(a)){const n=document.createElement(a);if(r?.props){for(const[i,s]of Object.entries(r.props))if(typeof n[i]=="function")try{n[i](s)}catch(o){console.warn(`[aikaara-template-renderer] props.${i} threw on <${a}>`,o)}}n.setPayload?.(this.payloadData,this.innerMessage),this.appendChild(n);return}if(Array.isArray(this.payloadData)){const n=this.payloadData;if(n.length>0&&n.every(s=>s&&typeof s=="object"&&!Array.isArray(s)&&!("type"in s)&&!("data"in s)&&typeof s.message=="string")){const s=document.createElement("aikaara-option-list");s.setPayload({name:"quick-reply",type:"button",options:n.map(o=>{const l=typeof o.title=="string"?o.title:"",u=o.message;return{label:l||u,value:u}})}),this.appendChild(s);return}for(const s of n)this.mountField(s)}else if(this.payloadData&&typeof this.payloadData=="object"){const n=this.payloadData;typeof n.message=="string"&&(n.okLabel||n.action||n.ok)&&this.mountModal(n)}}mountField(e){if(!e||typeof e!="object")return;const t=e.type??e.data?.type;if(t==="link"){this.mountLinkButton(e);return}const r=e.data;if(r){if(t==="checkbox"||t==="radio"||t==="button"){const a=document.createElement("aikaara-option-list");a.setPayload({name:r.name??"",title:r.title,options:r.options??[],type:t}),this.appendChild(a);return}if(t==="submit"){const a=document.createElement("aikaara-submit-action"),n=this.getAttribute("message-id")??void 0;a.setPayload({name:r.name??"Submit",action:r.action??{message:r.name??"Submit"},messageId:n}),this.appendChild(a);return}t==="modal"&&this.mountModal({message:r.message??"",okLabel:r.okLabel,cancelLabel:r.cancelLabel,action:r.action})}}mountLinkButton(e){Promise.resolve().then(()=>vf).then(({registerAikaaraLinkButton:t,AikaaraLinkButton:r})=>{t();const a=document.createElement("aikaara-link-button");a.setPayload({name:e.name??"Open",url:e.url??"",openLinkInNewTab:e.openLinkInNewTab,orderId:e.orderId,extra:Mh(e),messageId:this.getAttribute("message-id")??void 0}),this.appendChild(a)})}mountModal(e){const t=document.createElement("aikaara-modal-action");t.setPayload(e),this.appendChild(t)}}const Ph=new Set(["type","url","name","openLinkInNewTab","orderId"]);function Mh(c){const e={};for(const[t,r]of Object.entries(c))Ph.has(t)||(e[t]=r);return e}class Rh extends HTMLElement{shadow;static get observedAttributes(){return["text","subtext"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const e=this.getAttribute("text")??this.textContent??"",t=this.getAttribute("subtext")??"";this.shadow.innerHTML=`
679
+ `;this.firstChild;)this.removeChild(this.firstChild);if(!e)return;const r=t?Ch(t):void 0,a=r?.render??(t?`aikaara-template-${t}`:`aikaara-template-${e}`);if(r?.scriptUrl&&!customElements.get(a)&&_l(r.scriptUrl).then(()=>Th(a)).then(()=>this.render()).catch(n=>console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`,n)),customElements.get(a)){const n=document.createElement(a);if(r?.props){for(const[i,s]of Object.entries(r.props))if(typeof n[i]=="function")try{n[i](s)}catch(o){console.warn(`[aikaara-template-renderer] props.${i} threw on <${a}>`,o)}}n.setPayload?.(this.payloadData,this.innerMessage),this.appendChild(n);return}if(Array.isArray(this.payloadData)){const n=this.payloadData;if(n.length>0&&n.every(s=>s&&typeof s=="object"&&!Array.isArray(s)&&!("type"in s)&&!("data"in s)&&typeof s.message=="string")){const s=document.createElement("aikaara-option-list");s.setPayload({name:"quick-reply",type:"button",options:n.map(o=>{const l=typeof o.title=="string"?o.title:"",u=o.message;return{label:l||u,value:u}})}),this.appendChild(s);return}for(const s of n)this.mountField(s)}else if(this.payloadData&&typeof this.payloadData=="object"){const n=this.payloadData;typeof n.message=="string"&&(n.okLabel||n.action||n.ok)&&this.mountModal(n)}}mountField(e){if(!e||typeof e!="object")return;const t=e.type??e.data?.type;if(t==="link"){this.mountLinkButton(e);return}const r=e.data;if(r){if(t==="checkbox"||t==="radio"||t==="button"){const a=document.createElement("aikaara-option-list");a.setPayload({name:r.name??"",title:r.title,options:r.options??[],type:t}),this.appendChild(a);return}if(t==="submit"){const a=document.createElement("aikaara-submit-action"),n=this.getAttribute("message-id")??void 0;a.setPayload({name:r.name??"Submit",action:r.action??{message:r.name??"Submit"},messageId:n}),this.appendChild(a);return}t==="modal"&&this.mountModal({message:r.message??"",okLabel:r.okLabel,cancelLabel:r.cancelLabel,action:r.action})}}mountLinkButton(e){const t=this.renderGen;Promise.resolve().then(()=>vf).then(({registerAikaaraLinkButton:r,AikaaraLinkButton:a})=>{if(t!==this.renderGen)return;r();const n=document.createElement("aikaara-link-button");n.setPayload({name:e.name??"Open",url:e.url??"",openLinkInNewTab:e.openLinkInNewTab,orderId:e.orderId,extra:Mh(e),messageId:this.getAttribute("message-id")??void 0}),this.appendChild(n)})}mountModal(e){const t=document.createElement("aikaara-modal-action");t.setPayload(e),this.appendChild(t)}}const Ph=new Set(["type","url","name","openLinkInNewTab","orderId"]);function Mh(c){const e={};for(const[t,r]of Object.entries(c))Ph.has(t)||(e[t]=r);return e}class Rh extends HTMLElement{shadow;static get observedAttributes(){return["text","subtext"]}constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const e=this.getAttribute("text")??this.textContent??"",t=this.getAttribute("subtext")??"";this.shadow.innerHTML=`
677
680
  <style>
678
681
  :host {
679
682
  display: flex;
package/dist/headless.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-CphrRB2z.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.FormBridge=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BU0QBp5M.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.FormBridge=s;
@@ -2294,6 +2294,42 @@ export declare interface WidgetConfigDescriptor {
2294
2294
  left?: SidePanelDef;
2295
2295
  right?: SidePanelDef;
2296
2296
  };
2297
+ /**
2298
+ * Brand header chrome rendered above the route surface by the
2299
+ * hosted-shell. SDK does not read this — surfaced so dashboard +
2300
+ * shell share one source of truth. Omit (or `enabled: false`) to
2301
+ * keep the legacy chrome-less layout.
2302
+ */
2303
+ header?: {
2304
+ enabled?: boolean;
2305
+ /** Absolute URL of the brand logo. */
2306
+ logoUrl?: string;
2307
+ /** Alt text + tooltip for the logo. */
2308
+ logoAlt?: string;
2309
+ /** Optional centred title (e.g. "File ITR with Tax Expert | FY 2025-26"). */
2310
+ title?: string;
2311
+ /** Optional smaller right-aligned subtitle next to the title. */
2312
+ subtitle?: string;
2313
+ /** Show the profile/account avatar on the right. */
2314
+ showProfile?: boolean;
2315
+ /** Background colour override; defaults to `--shell-surface`. */
2316
+ background?: string;
2317
+ /** Bottom hairline colour override; defaults to `--shell-border`. */
2318
+ borderColor?: string;
2319
+ /** Height in px. Default 56. */
2320
+ height?: number;
2321
+ };
2322
+ /**
2323
+ * Footer chrome (e.g. "Powered by TaxBuddy") rendered below the
2324
+ * route surface. Same config-driven contract as `header`.
2325
+ */
2326
+ footer?: {
2327
+ enabled?: boolean;
2328
+ text?: string;
2329
+ logoUrl?: string;
2330
+ logoAlt?: string;
2331
+ background?: string;
2332
+ };
2297
2333
  };
2298
2334
  /**
2299
2335
  * Tenant-side API config consumed by the side-panel runtime. Right now
package/dist/headless.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { E as s } from "./MountTenant-C5krO1UH.mjs";
2
- import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-C5krO1UH.mjs";
1
+ import { E as s } from "./MountTenant-r3JJGN72.mjs";
2
+ import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-r3JJGN72.mjs";
3
3
  class a extends s {
4
4
  registration = null;
5
5
  pendingEdits = [];
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-CphrRB2z.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BU0QBp5M.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
package/dist/index.d.ts CHANGED
@@ -2056,6 +2056,42 @@ export declare interface WidgetConfigDescriptor {
2056
2056
  left?: SidePanelDef;
2057
2057
  right?: SidePanelDef;
2058
2058
  };
2059
+ /**
2060
+ * Brand header chrome rendered above the route surface by the
2061
+ * hosted-shell. SDK does not read this — surfaced so dashboard +
2062
+ * shell share one source of truth. Omit (or `enabled: false`) to
2063
+ * keep the legacy chrome-less layout.
2064
+ */
2065
+ header?: {
2066
+ enabled?: boolean;
2067
+ /** Absolute URL of the brand logo. */
2068
+ logoUrl?: string;
2069
+ /** Alt text + tooltip for the logo. */
2070
+ logoAlt?: string;
2071
+ /** Optional centred title (e.g. "File ITR with Tax Expert | FY 2025-26"). */
2072
+ title?: string;
2073
+ /** Optional smaller right-aligned subtitle next to the title. */
2074
+ subtitle?: string;
2075
+ /** Show the profile/account avatar on the right. */
2076
+ showProfile?: boolean;
2077
+ /** Background colour override; defaults to `--shell-surface`. */
2078
+ background?: string;
2079
+ /** Bottom hairline colour override; defaults to `--shell-border`. */
2080
+ borderColor?: string;
2081
+ /** Height in px. Default 56. */
2082
+ height?: number;
2083
+ };
2084
+ /**
2085
+ * Footer chrome (e.g. "Powered by TaxBuddy") rendered below the
2086
+ * route surface. Same config-driven contract as `header`.
2087
+ */
2088
+ footer?: {
2089
+ enabled?: boolean;
2090
+ text?: string;
2091
+ logoUrl?: string;
2092
+ logoAlt?: string;
2093
+ background?: string;
2094
+ };
2059
2095
  };
2060
2096
  /**
2061
2097
  * Tenant-side API config consumed by the side-panel runtime. Right now
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { r as o } from "./MountTenant-C5krO1UH.mjs";
2
- import { A as u, a as m, b as k, c as g, d as h, e as A, f as C, g as T, h as b, i as v, j as f, k as y, C as S, l as w, m as E, E as M, M as x, S as B, n as F, T as U, o as D, p as I, q as j, s as q, t as H, u as P, v as R, w as W, x as z, y as K, z as L, B as O, D as G, F as J } from "./MountTenant-C5krO1UH.mjs";
1
+ import { r as o } from "./MountTenant-r3JJGN72.mjs";
2
+ import { A as u, a as m, b as k, c as g, d as h, e as A, f as C, g as T, h as b, i as v, j as f, k as y, C as S, l as w, m as E, E as M, M as x, S as B, n as F, T as U, o as D, p as I, q as j, s as q, t as H, u as P, v as R, w as W, x as z, y as K, z as L, B as O, D as G, F as J } from "./MountTenant-r3JJGN72.mjs";
3
3
  import { FormBridge as Q } from "./headless.mjs";
4
4
  function l(e) {
5
5
  o();
package/dist/ui.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-CphrRB2z.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-BU0QBp5M.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
package/dist/ui.d.ts CHANGED
@@ -415,6 +415,7 @@ export declare class AikaaraTemplateRenderer extends HTMLElement {
415
415
  private shadow;
416
416
  private payloadData;
417
417
  private innerMessage;
418
+ private renderGen;
418
419
  static get observedAttributes(): string[];
419
420
  constructor();
420
421
  connectedCallback(): void;
package/dist/ui.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { G as i, a as s, c as e, d as t, e as A, H as k, f as n, I as o, g, h as l, J as d, K as m, i as p, L as C, N as h, O as b, j as M, r as c } from "./MountTenant-C5krO1UH.mjs";
1
+ import { G as i, a as s, c as e, d as t, e as A, H as k, f as n, I as o, g, h as l, J as d, K as m, i as p, L as C, N as h, O as b, j as M, r as c } from "./MountTenant-r3JJGN72.mjs";
2
2
  export {
3
3
  i as AikaaraChat,
4
4
  s as AikaaraChatBubble,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikaara/chat-sdk",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "description": "Aikaara Chat SDK — embeddable chat widget and headless client",
6
6
  "license": "MIT",