@marketrix.ai/widget 3.2.248 → 3.2.249
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/dist/widget.mjs +1 -1
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
package/dist/widget.mjs
CHANGED
|
@@ -15,7 +15,7 @@ return f(Ju,{className:"fixed",style:{zIndex:b,maxWidth:"420px",opacity:l?0:1,tr
|
|
|
15
15
|
return g(Ju,{ref:_,className:`${O} ${C?"":z} ${S?"":"transition-transform duration-300 ease-in-out"}`,style:{zIndex:p,pointerEvents:e?"none":"auto",...R,...C},children:[/* @__PURE__ */g(Ju,{className:`\n group relative w-14 h-14 overflow-visible transition-all duration-300 ease-in-out\n ${e?"scale-0 opacity-0 pointer-events-none":"scale-100 opacity-100 hover:scale-110"}\n `,children:[w&&/* @__PURE__ */f(Ju,{className:v,"aria-hidden":!0}),b&&!S&&/* @__PURE__ */f(Pp,{type:"button",variant:"secondary",size:"sm",onClick:e=>{e.preventDefault(),e.stopPropagation(),o?.()},className:"absolute top-1/2 z-20 -translate-y-1/2 rounded-full border border-white/25 bg-gray-900 px-2.5 py-1 text-[11px] font-semibold uppercase tracking-wide text-white shadow-lg opacity-0 transition-opacity duration-150 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto "+(h.includes("left")?"left-full ml-2":"right-full mr-2"),style:{border:"1px solid rgba(255,255,255,0.25)"},"aria-label":"Stop running task",children:"Stop"}),
|
|
16
16
|
/* @__PURE__ */f(Pp,{type:"button",variant:"bare",onClick:()=>{Date.now()<M.current||i()},onDragStart:e=>e.preventDefault(),onPointerDown:I,onPointerMove:E,onPointerUp:T,onPointerCancel:A,className:"relative z-10 w-14 h-14 min-w-14",style:{touchAction:"none",cursor:S?"grabbing":"grab",userSelect:"none",WebkitUserSelect:"none"},"aria-label":e?"Close":"Open","aria-live":"polite",children:/* @__PURE__ */f(Lp,{className:"w-full h-full items-center justify-center relative",children:/* @__PURE__ */g(Ju,{className:"\n relative w-12 h-12 overflow-hidden transition-[transform,opacity,background-color] duration-[167ms] ease-[cubic-bezier(0.33,0,0,1)]\n hover:scale-110 hover:duration-[250ms] active:scale-[0.85] active:duration-[134ms] active:ease-[cubic-bezier(0.45,0,0.2,1)]\n animate-launcher-entrance\n ",style:{borderRadius:l,backgroundColor:e?a:s,boxShadow:eh},children:[w&&/* @__PURE__ */f("svg",{className:x,viewBox:"0 0 54 54",fill:"none","aria-hidden":!0,children:/* @__PURE__ */f("rect",{x:"1.25",y:"1.25",width:"51.5",height:"51.5",rx:k+1,ry:k+1})}),
|
|
17
17
|
/* @__PURE__ */f(Lp,{className:"absolute inset-0 items-center justify-center transition-[transform,opacity] duration-[160ms] linear",style:{transform:e?"rotate(30deg) scale(0)":"rotate(0deg) scale(1)",opacity:e?0:1,transitionProperty:"transform, opacity",transitionDuration:"0.16s, 0.08s",transitionTimingFunction:"linear"},"aria-hidden":e,children:/* @__PURE__ */f(Qu,{src:Yu,alt:"",className:"relative z-10 w-full h-full object-contain",draggable:!1,onDragStart:e=>e.preventDefault(),style:{borderRadius:l,border:"none",outline:"none",backgroundColor:"transparent",pointerEvents:"none",userSelect:"none"}})}),
|
|
18
|
-
/* @__PURE__ */f(Lp,{className:"absolute inset-0 items-center justify-center transition-[transform,opacity] duration-[160ms] linear",style:{transform:e?"rotate(0deg) scale(1)":"rotate(-30deg) scale(0)",opacity:e?1:0,transitionProperty:"transform, opacity",transitionDuration:"0.16s, 0.08s",transitionTimingFunction:"linear"},"aria-hidden":!e,children:/* @__PURE__ */f($p,{name:"chevronDown",size:24,className:"relative z-10 text-foreground pointer-events-none"})})]})})})]}),!e&&/* @__PURE__ */g(Ju,{className:`absolute bottom-16 ${h.includes("left")?"left-0":"right-0"} mb-2 px-3 py-2 text-sm rounded-lg shadow-lg whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-200`,style:{backgroundColor:c,color:d},children:[/* @__PURE__ */f(Vp,{as:"span",className:"text-inherit",children:"Support Agent"}),/* @__PURE__ */f(Ju,{"aria-hidden":!0,className:`absolute top-full ${h.includes("left")?"left-4":"right-4"} w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent`,style:{borderTopColor:c}})]})]})},lh="3.2.
|
|
18
|
+
/* @__PURE__ */f(Lp,{className:"absolute inset-0 items-center justify-center transition-[transform,opacity] duration-[160ms] linear",style:{transform:e?"rotate(0deg) scale(1)":"rotate(-30deg) scale(0)",opacity:e?1:0,transitionProperty:"transform, opacity",transitionDuration:"0.16s, 0.08s",transitionTimingFunction:"linear"},"aria-hidden":!e,children:/* @__PURE__ */f($p,{name:"chevronDown",size:24,className:"relative z-10 text-foreground pointer-events-none"})})]})})})]}),!e&&/* @__PURE__ */g(Ju,{className:`absolute bottom-16 ${h.includes("left")?"left-0":"right-0"} mb-2 px-3 py-2 text-sm rounded-lg shadow-lg whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-200`,style:{backgroundColor:c,color:d},children:[/* @__PURE__ */f(Vp,{as:"span",className:"text-inherit",children:"Support Agent"}),/* @__PURE__ */f(Ju,{"aria-hidden":!0,className:`absolute top-full ${h.includes("left")?"left-4":"right-4"} w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent`,style:{borderTopColor:c}})]})]})},lh="3.2.249";function ch(e){return Array.from(e.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>null!==e.offsetParent&&!e.hasAttribute("aria-hidden"))}function dh(e){if(!e)return 360;const t=parseInt(e.replace(/px|rem|em/gi,""),10);return isNaN(t)?360:t}function uh(e,t,n){return Math.min(Math.max(e,t),n)}function ph(e,t,n,r,i){const o={"bottom-right":"nwse-resize","bottom-left":"nesw-resize","top-right":"nesw-resize","top-left":"nwse-resize"};switch(e){case"bottom-right":return{dx:r-t,dy:i-n,cursor:o[e]};case"bottom-left":return{dx:t-r,dy:i-n,cursor:o[e]};case"top-right":return{dx:r-t,dy:n-i,cursor:o[e]};case"top-left":return{dx:t-r,dy:n-i,cursor:o[e]}}}var hh={live:"inline-flex items-center gap-1",status:"inline-flex items-center text-[9px] font-medium px-1.5 py-0.5 rounded"},mh=i(function({variant:e,className:t,style:n,children:r,...i},o){/* @__PURE__ */
|
|
19
19
|
return g("span",{...i,ref:o,className:Gu(hh[e],t),"data-variant":e,style:n,children:["live"===e&&/* @__PURE__ */g("span",{className:"relative flex h-1.5 w-1.5",children:[/* @__PURE__ */f("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-75"}),/* @__PURE__ */f("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-current"})]}),r]})}),fh=i(function({className:e,style:t,children:n,...r},i){/* @__PURE__ */
|
|
20
20
|
return f("div",{...r,ref:i,className:Gu(e),style:{padding:"8px 12px",borderRadius:"var(--radius-xl, 12px)",border:"1px solid transparent",backgroundColor:"#ffffff",boxShadow:Kp,...t},children:n})});var gh=n(null);function yh(e){const t=s(gh);if(!t)throw new Error(`${e} must be used within Dialog`);return t}function wh({children:e,onOpenChange:t,open:n}){const{isOpen:r,setIsOpen:i}=function({defaultOpen:e=!1,onOpenChange:t,open:n}){const[r,i]=p(e),s=void 0!==n;return{isOpen:s?n:r,setIsOpen:o(e=>{s||i(e),t?.(e)},[s,t])}}({onOpenChange:t,open:n}),s=l(),a=l(),c=l(),u=d(()=>({contentId:s,descriptionId:c,open:r,setOpen:i,titleId:a}),[s,c,r,i,a]);/* @__PURE__ */
|
|
21
21
|
return f(gh.Provider,{value:u,children:e})}function bh({children:e,className:t,onKeyDown:n,...r}){const i=yh("DialogContent");return a(()=>{if(!i.open)return;const e=e=>{"Escape"===e.key&&i.setOpen(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[i]),i.open?/* @__PURE__ */f("div",{...r,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"aria-modal":"true",className:Gu("fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[calc(var(--layer-dialog)+1)] flex flex-col w-full max-w-[500px] max-h-[85vh] overflow-auto bg-card rounded-lg shadow-xl p-6 animate-dialog-content-in",t),"data-state":"open",id:i.contentId,onKeyDown:e=>{n?.(e),e.defaultPrevented||"Escape"!==e.key||i.setOpen(!1)},role:"dialog",tabIndex:-1,children:e}):null}function vh({className:e,...t}){const n=yh("DialogTitle");/* @__PURE__ */
|