@botuyo/chat-widget-standalone 1.0.21 → 1.0.22
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/botuyo-chat.es.js +1 -1
- package/dist/botuyo-chat.umd.js +1 -1
- package/dist/botuyo-chat.umd.js.map +1 -1
- package/dist/{chunk-audio-C0i6pIL6.js → chunk-audio-CJ0cLMCT.js} +2 -2
- package/dist/{chunk-audio-C0i6pIL6.js.map → chunk-audio-CJ0cLMCT.js.map} +1 -1
- package/dist/{chunk-chat-ui-_0LmcZf0.js → chunk-chat-ui-DOeNyZiD.js} +60 -57
- package/dist/chunk-chat-ui-DOeNyZiD.js.map +1 -0
- package/dist/{chunk-gallery-8F2X2Wky.js → chunk-gallery-BvWYujZF.js} +2 -2
- package/dist/{chunk-gallery-8F2X2Wky.js.map → chunk-gallery-BvWYujZF.js.map} +1 -1
- package/dist/src/chat-widget/components/VoiceCallOverlay.d.ts.map +1 -1
- package/dist/stats-umd.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/chunk-chat-ui-_0LmcZf0.js.map +0 -1
package/dist/botuyo-chat.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react-dom";import t,{useState as r,useMemo as n,useEffect as o,useCallback as a,Component as i,useReducer as s,useRef as c,createContext as l,useContext as d,lazy as u,Suspense as p}from"react";import{u as g,g as h,e as m,f,D as w,c as v,M as b,X as y,l as x,m as k,t as _,h as z,i as S,j as E,k as O,n as I}from"./chunk-chat-ui-
|
|
1
|
+
import e from"react-dom";import t,{useState as r,useMemo as n,useEffect as o,useCallback as a,Component as i,useReducer as s,useRef as c,createContext as l,useContext as d,lazy as u,Suspense as p}from"react";import{u as g,g as h,e as m,f,D as w,c as v,M as b,X as y,l as x,m as k,t as _,h as z,i as S,j as E,k as O,n as I}from"./chunk-chat-ui-DOeNyZiD.js";import{o as $}from"./chunk-chat-ui-DOeNyZiD.js";import{jsxs as C,jsx as N}from"react/jsx-runtime";import{l as T}from"./vendor-socket-DMqyM-90.js";var A,j={},M=function(){if(A)return j;A=1;var t=e;return j.createRoot=t.createRoot,j.hydrateRoot=t.hydrateRoot,j}();function P({isOpen:e,onClick:t,unreadCount:i=0,primaryColor:s,logoUrl:c,starterPrompt:l,position:d="bottom-right",emotion:u="default",avatars:p={},styles:k,promptPersistence:_="session",avatarScale:z=1,showPromptAvatar:S=!1}){const{t:E}=g("extracted"),O=h({primaryColor:s}),I=k?.launcher?.bg,$=m(),{triggerHaptic:T,getGlowClass:A}=f(),j=$.launcherPulse&&!1!==k?.launcher?.pulse,[M,P]=r(!1),[F,Z]=r(!1),[D,R]=r(!1),[U,L]=r(!1),W="bottom-right"===d,B="chat_launcher_prompt_state",J=n(()=>p[u]||p.default||c||w,[u,p,c]);o(()=>{L(!1)},[J]),o(()=>{const e=Object.values(p).filter(e=>!!e);c&&e.push(c),e.forEach(e=>{(new Image).src=e})},[p,c]),o(()=>{"forever"===_&&"dismissed"===localStorage.getItem(B)&&R(!0)},[_]);const V=a(()=>{Z(!0),setTimeout(()=>P(!1),500),"always"!==_&&(R(!0),"forever"===_&&localStorage.setItem(B,"dismissed"))},[_]);o(()=>{if("always"!==_&&D||!l||e)return void P(!1);const t=setTimeout(()=>{P(!0),Z(!1)},2e3),r=setTimeout(()=>V(),12e3);return()=>{clearTimeout(t),clearTimeout(r)}},[l,e,D,_,V]);const q=()=>{x.debug("Launcher handleMainAction called, isOpen:",e),T(),R(!0),"forever"===_&&localStorage.setItem(B,"dismissed"),t()};/* @__PURE__ */
|
|
2
2
|
return C("div",{className:v("flex items-center w-fit transition-all duration-500",W?"flex-row ml-auto":"flex-row-reverse mr-auto"),children:[
|
|
3
3
|
/* @__PURE__ */N("div",{className:v("transition-all duration-700 ease-in-out flex items-end",M?v("opacity-100 translate-x-0 w-auto max-w-[350px]",W?"mr-5":"ml-5"):v("opacity-0 w-0 max-w-0 overflow-hidden pointer-events-none",W?"translate-x-4":"-translate-x-4")),children:/* @__PURE__ */C("div",{className:v("relative flex items-center gap-2.5 cursor-pointer",F&&"opacity-0 scale-95 transition-all duration-300",!M&&"hidden"),onClick:q,style:{width:"max-content"},children:[S&&/* @__PURE__ */N("div",{className:"shrink-0 overflow-hidden",style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:O||"hsl(160,84%,39%)",boxShadow:`0 2px 8px ${O||"hsl(160,84%,39%)"}44`,display:"flex",alignItems:"center",justifyContent:"center"},children:J&&!U?/* @__PURE__ */N("img",{src:J,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"},onError:()=>L(!0)}):/* @__PURE__ */N(b,{style:{width:"18px",height:"18px",color:"white",fill:"white"}})}),
|
|
4
4
|
/* @__PURE__ */N("div",{style:{position:"relative",maxWidth:"280px",padding:"10px 16px",borderRadius:"18px",backgroundColor:"hsl(var(--background) / 0.92)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"hsl(var(--foreground))",boxShadow:"0 4px 20px -4px rgba(0,0,0,0.12), 0 0 0 1px hsl(var(--border) / 0.6)"},children:/* @__PURE__ */N("span",{style:{display:"block",fontSize:"13.5px",fontWeight:600,lineHeight:1.4,letterSpacing:"-0.01em",whiteSpace:"nowrap"},children:l})}),
|