@mypatientspace/chatbot-widget 1.0.63 → 1.0.65

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.
@@ -14804,7 +14804,7 @@ const $l = () => {
14804
14804
  /* @__PURE__ */ S.jsxs(g1, { fontFamily: s.fontFamily, children: [
14805
14805
  M,
14806
14806
  " v",
14807
- "1.0.63"
14807
+ "1.0.65"
14808
14808
  ] })
14809
14809
  ] })
14810
14810
  ] }),
@@ -16506,7 +16506,7 @@ const Rp = U.div`
16506
16506
  H(kt.target.value);
16507
16507
  }, []), Rt = T.useCallback(() => {
16508
16508
  P();
16509
- }, [P]), Qt = u, L = u || !z.trim(), zt = s.disclaimerText ?? "AI can make mistakes. Verify important information.";
16509
+ }, [P]), Qt = u, L = u || !z.trim(), zt = s.disclaimerText ?? d?.chatUiConfig?.cautionaryMessageOnCompletions ?? "AI can make mistakes. Verify important information.";
16510
16510
  T.useEffect(() => {
16511
16511
  !M && !u && Q.current && Q.current.focus();
16512
16512
  }, [M, u]);
@@ -16961,8 +16961,8 @@ const Rp = U.div`
16961
16961
  height: 100%;
16962
16962
  `}
16963
16963
  z-index: ${({ floatingMode: a, isExpanded: u }) => a || u ? "2147483647" : "auto"};
16964
- border-radius: inherit;
16965
- overflow: hidden;
16964
+ border-radius: ${({ floatingMode: a }) => a ? "0" : "inherit"};
16965
+ overflow: ${({ floatingMode: a }) => a ? "visible" : "hidden"};
16966
16966
  pointer-events: auto;
16967
16967
  font-family: system-ui, -apple-system, sans-serif;
16968
16968
  transition: top 0.25s ease, left 0.25s ease, right 0.25s ease, bottom 0.25s ease;
@@ -806,7 +806,7 @@ Error generating stack: `+l.message+`
806
806
  display: flex;
807
807
  align-items: center;
808
808
  gap: 6px;
809
- `,$0=()=>{const{close:a,config:u,theme:s,assistant:r,isExpanded:d,toggleExpanded:h,startNewChat:y}=hl(),C=u.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",S=u.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",m=u.headerSubtitle||r?.chatUiConfig?.headerSubtitle,M=u.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return x.jsxs(C0,{theme:s,children:[x.jsxs(T0,{children:[x.jsx(E0,{theme:s,hasCustomIcon:!0,children:x.jsx(z0,{src:S,alt:""})}),x.jsxs(A0,{children:[x.jsx(M0,{fontFamily:s.fontFamily,children:C}),m&&x.jsx(_0,{fontFamily:s.fontFamily,children:m}),x.jsxs(w0,{fontFamily:s.fontFamily,children:[M," v","1.0.63"]})]})]}),x.jsxs(O0,{children:[x.jsx(Hu,{theme:s,onClick:y,"aria-label":"Start new chat",children:x.jsx(wm,{size:16})}),x.jsx(Hu,{theme:s,onClick:h,"aria-label":d?"Collapse chat":"Expand chat",children:d?x.jsx(Xs,{size:16}):x.jsx(Gs,{size:16})}),u.floatingMode&&x.jsx(Hu,{theme:s,onClick:a,"aria-label":"Minimize chat",children:x.jsx(Ys,{size:16})})]})]})},D0=H.div`
809
+ `,$0=()=>{const{close:a,config:u,theme:s,assistant:r,isExpanded:d,toggleExpanded:h,startNewChat:y}=hl(),C=u.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",S=u.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",m=u.headerSubtitle||r?.chatUiConfig?.headerSubtitle,M=u.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return x.jsxs(C0,{theme:s,children:[x.jsxs(T0,{children:[x.jsx(E0,{theme:s,hasCustomIcon:!0,children:x.jsx(z0,{src:S,alt:""})}),x.jsxs(A0,{children:[x.jsx(M0,{fontFamily:s.fontFamily,children:C}),m&&x.jsx(_0,{fontFamily:s.fontFamily,children:m}),x.jsxs(w0,{fontFamily:s.fontFamily,children:[M," v","1.0.65"]})]})]}),x.jsxs(O0,{children:[x.jsx(Hu,{theme:s,onClick:y,"aria-label":"Start new chat",children:x.jsx(wm,{size:16})}),x.jsx(Hu,{theme:s,onClick:h,"aria-label":d?"Collapse chat":"Expand chat",children:d?x.jsx(Xs,{size:16}):x.jsx(Gs,{size:16})}),u.floatingMode&&x.jsx(Hu,{theme:s,onClick:a,"aria-label":"Minimize chat",children:x.jsx(Ys,{size:16})})]})]})},D0=H.div`
810
810
  position: relative;
811
811
  background-color: ${({theme:a})=>a.colors.background};
812
812
  border-bottom: 1px solid ${({theme:a})=>a.colors.borderLight};
@@ -1759,7 +1759,7 @@ Error generating stack: `+l.message+`
1759
1759
  &:active {
1760
1760
  transform: scale(0.95);
1761
1761
  }
1762
- `,fb=()=>{const{sendMessage:a,isTyping:u,config:s,theme:r,assistant:d,currentQuestion:h,surveyProgress:y,submitSurveyAnswer:C,skipSurveyQuestion:S,cancelSurvey:m}=hl(),M=h!==null,[z,U]=T.useState(""),Q=T.useRef(null),W=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:G,isSupported:q,transcript:J,toggleRecording:P,clearTranscript:X}=lf({onError:kt=>{console.error("Voice recording error:",kt)}});T.useEffect(()=>{J&&U(J)},[J]);const ut=T.useCallback(()=>{const kt=Q.current;kt&&(kt.style.height="auto",kt.style.height=`${Math.min(kt.scrollHeight,150)}px`)},[]);T.useEffect(()=>{ut()},[z,ut]);const j=T.useCallback(()=>{z.trim()&&!u&&(a(z),U(""),X(),Q.current&&(Q.current.style.height="auto",Q.current.focus()))},[z,u,a,X]),ot=T.useCallback(kt=>{kt.key==="Enter"&&!kt.shiftKey&&(kt.preventDefault(),j())},[j]),Z=T.useCallback(kt=>{U(kt.target.value)},[]),Rt=T.useCallback(()=>{P()},[P]),Qt=u,L=u||!z.trim(),Mt=s.disclaimerText??"AI can make mistakes. Verify important information.";T.useEffect(()=>{!M&&!u&&Q.current&&Q.current.focus()},[M,u]);const Lt=()=>G?"Listening...":W;return M&&h?x.jsxs(hf,{theme:r,children:[x.jsx(df,{questionInfo:h,progress:y,onAnswer:C,onSkip:S,onCancel:m,theme:r}),Mt&&x.jsx(pf,{theme:r,children:Mt})]}):x.jsxs(hf,{theme:r,children:[x.jsxs(ib,{theme:r,disabled:Qt,children:[x.jsx(ob,{ref:Q,theme:r,value:z,onChange:Z,onKeyDown:ot,placeholder:Lt(),disabled:Qt,"aria-label":"Message input",rows:1}),x.jsxs(ub,{children:[q&&x.jsx(sb,{theme:r,onClick:Rt,isRecording:G,"aria-label":G?"Stop recording":"Start voice recording",title:G?"Stop recording":"Start voice recording",children:x.jsx(Qs,{size:18})}),x.jsx(rb,{theme:r,onClick:j,disabled:L,"aria-label":"Send message",children:x.jsx(Nl,{size:18})})]})]}),Mt&&x.jsx(pf,{theme:r,children:Mt})]})},db=sn`
1762
+ `,fb=()=>{const{sendMessage:a,isTyping:u,config:s,theme:r,assistant:d,currentQuestion:h,surveyProgress:y,submitSurveyAnswer:C,skipSurveyQuestion:S,cancelSurvey:m}=hl(),M=h!==null,[z,U]=T.useState(""),Q=T.useRef(null),W=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:G,isSupported:q,transcript:J,toggleRecording:P,clearTranscript:X}=lf({onError:kt=>{console.error("Voice recording error:",kt)}});T.useEffect(()=>{J&&U(J)},[J]);const ut=T.useCallback(()=>{const kt=Q.current;kt&&(kt.style.height="auto",kt.style.height=`${Math.min(kt.scrollHeight,150)}px`)},[]);T.useEffect(()=>{ut()},[z,ut]);const j=T.useCallback(()=>{z.trim()&&!u&&(a(z),U(""),X(),Q.current&&(Q.current.style.height="auto",Q.current.focus()))},[z,u,a,X]),ot=T.useCallback(kt=>{kt.key==="Enter"&&!kt.shiftKey&&(kt.preventDefault(),j())},[j]),Z=T.useCallback(kt=>{U(kt.target.value)},[]),Rt=T.useCallback(()=>{P()},[P]),Qt=u,L=u||!z.trim(),Mt=s.disclaimerText??d?.chatUiConfig?.cautionaryMessageOnCompletions??"AI can make mistakes. Verify important information.";T.useEffect(()=>{!M&&!u&&Q.current&&Q.current.focus()},[M,u]);const Lt=()=>G?"Listening...":W;return M&&h?x.jsxs(hf,{theme:r,children:[x.jsx(df,{questionInfo:h,progress:y,onAnswer:C,onSkip:S,onCancel:m,theme:r}),Mt&&x.jsx(pf,{theme:r,children:Mt})]}):x.jsxs(hf,{theme:r,children:[x.jsxs(ib,{theme:r,disabled:Qt,children:[x.jsx(ob,{ref:Q,theme:r,value:z,onChange:Z,onKeyDown:ot,placeholder:Lt(),disabled:Qt,"aria-label":"Message input",rows:1}),x.jsxs(ub,{children:[q&&x.jsx(sb,{theme:r,onClick:Rt,isRecording:G,"aria-label":G?"Stop recording":"Start voice recording",title:G?"Stop recording":"Start voice recording",children:x.jsx(Qs,{size:18})}),x.jsx(rb,{theme:r,onClick:j,disabled:L,"aria-label":"Send message",children:x.jsx(Nl,{size:18})})]})]}),Mt&&x.jsx(pf,{theme:r,children:Mt})]})},db=sn`
1763
1763
  from { opacity: 0; }
1764
1764
  to { opacity: 1; }
1765
1765
  `,hb=sn`
@@ -2025,8 +2025,8 @@ Error generating stack: `+l.message+`
2025
2025
  height: 100%;
2026
2026
  `}
2027
2027
  z-index: ${({floatingMode:a,isExpanded:u})=>a||u?"2147483647":"auto"};
2028
- border-radius: inherit;
2029
- overflow: hidden;
2028
+ border-radius: ${({floatingMode:a})=>a?"0":"inherit"};
2029
+ overflow: ${({floatingMode:a})=>a?"visible":"hidden"};
2030
2030
  pointer-events: auto;
2031
2031
  font-family: system-ui, -apple-system, sans-serif;
2032
2032
  transition: top 0.25s ease, left 0.25s ease, right 0.25s ease, bottom 0.25s ease;
@@ -12697,7 +12697,7 @@ const Xg = [
12697
12697
  /* @__PURE__ */ v.jsxs(Ig, { fontFamily: s.fontFamily, children: [
12698
12698
  _,
12699
12699
  " v",
12700
- "1.0.63"
12700
+ "1.0.65"
12701
12701
  ] })
12702
12702
  ] })
12703
12703
  ] }),
@@ -14399,7 +14399,7 @@ const V0 = H.div`
14399
14399
  B(wt.target.value);
14400
14400
  }, []), Rt = j.useCallback(() => {
14401
14401
  F();
14402
- }, [F]), Lt = c, Zt = c || !O.trim(), $t = s.disclaimerText ?? "AI can make mistakes. Verify important information.";
14402
+ }, [F]), Lt = c, Zt = c || !O.trim(), $t = s.disclaimerText ?? d?.chatUiConfig?.cautionaryMessageOnCompletions ?? "AI can make mistakes. Verify important information.";
14403
14403
  j.useEffect(() => {
14404
14404
  !_ && !c && G.current && G.current.focus();
14405
14405
  }, [_, c]);
@@ -14854,8 +14854,8 @@ const V0 = H.div`
14854
14854
  height: 100%;
14855
14855
  `}
14856
14856
  z-index: ${({ floatingMode: n, isExpanded: c }) => n || c ? "2147483647" : "auto"};
14857
- border-radius: inherit;
14858
- overflow: hidden;
14857
+ border-radius: ${({ floatingMode: n }) => n ? "0" : "inherit"};
14858
+ overflow: ${({ floatingMode: n }) => n ? "visible" : "hidden"};
14859
14859
  pointer-events: auto;
14860
14860
  font-family: system-ui, -apple-system, sans-serif;
14861
14861
  transition: top 0.25s ease, left 0.25s ease, right 0.25s ease, bottom 0.25s ease;
@@ -82,7 +82,7 @@ Error generating stack: `+a.message+`
82
82
  display: flex;
83
83
  align-items: center;
84
84
  gap: 6px;
85
- `,xm=()=>{const{close:n,config:c,theme:s,assistant:r,isExpanded:d,toggleExpanded:y,startNewChat:S}=Jl(),A=c.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",x=c.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",p=c.headerSubtitle||r?.chatUiConfig?.headerSubtitle,O=c.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return v.jsxs(fm,{theme:s,children:[v.jsxs(dm,{children:[v.jsx(hm,{theme:s,hasCustomIcon:!0,children:v.jsx(ym,{src:x,alt:""})}),v.jsxs(mm,{children:[v.jsx(pm,{fontFamily:s.fontFamily,children:A}),p&&v.jsx(gm,{fontFamily:s.fontFamily,children:p}),v.jsxs(vm,{fontFamily:s.fontFamily,children:[O," v","1.0.63"]})]})]}),v.jsxs(bm,{children:[v.jsx(ec,{theme:s,onClick:S,"aria-label":"Start new chat",children:v.jsx(om,{size:16})}),v.jsx(ec,{theme:s,onClick:y,"aria-label":d?"Collapse chat":"Expand chat",children:d?v.jsx(ys,{size:16}):v.jsx(ds,{size:16})}),c.floatingMode&&v.jsx(ec,{theme:s,onClick:n,"aria-label":"Minimize chat",children:v.jsx(nm,{size:16})})]})]})},Sm=H.div`
85
+ `,xm=()=>{const{close:n,config:c,theme:s,assistant:r,isExpanded:d,toggleExpanded:y,startNewChat:S}=Jl(),A=c.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",x=c.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",p=c.headerSubtitle||r?.chatUiConfig?.headerSubtitle,O=c.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return v.jsxs(fm,{theme:s,children:[v.jsxs(dm,{children:[v.jsx(hm,{theme:s,hasCustomIcon:!0,children:v.jsx(ym,{src:x,alt:""})}),v.jsxs(mm,{children:[v.jsx(pm,{fontFamily:s.fontFamily,children:A}),p&&v.jsx(gm,{fontFamily:s.fontFamily,children:p}),v.jsxs(vm,{fontFamily:s.fontFamily,children:[O," v","1.0.65"]})]})]}),v.jsxs(bm,{children:[v.jsx(ec,{theme:s,onClick:S,"aria-label":"Start new chat",children:v.jsx(om,{size:16})}),v.jsx(ec,{theme:s,onClick:y,"aria-label":d?"Collapse chat":"Expand chat",children:d?v.jsx(ys,{size:16}):v.jsx(ds,{size:16})}),c.floatingMode&&v.jsx(ec,{theme:s,onClick:n,"aria-label":"Minimize chat",children:v.jsx(nm,{size:16})})]})]})},Sm=H.div`
86
86
  position: relative;
87
87
  background-color: ${({theme:n})=>n.colors.background};
88
88
  border-bottom: 1px solid ${({theme:n})=>n.colors.borderLight};
@@ -1035,7 +1035,7 @@ Error generating stack: `+a.message+`
1035
1035
  &:active {
1036
1036
  transform: scale(0.95);
1037
1037
  }
1038
- `,tg=()=>{const{sendMessage:n,isTyping:c,config:s,theme:r,assistant:d,currentQuestion:y,surveyProgress:S,submitSurveyAnswer:A,skipSurveyQuestion:x,cancelSurvey:p}=Jl(),O=y!==null,[_,B]=j.useState(""),G=j.useRef(null),K=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:q,isSupported:Z,transcript:Q,toggleRecording:F,clearTranscript:X}=ms({onError:wt=>{console.error("Voice recording error:",wt)}});j.useEffect(()=>{Q&&B(Q)},[Q]);const it=j.useCallback(()=>{const wt=G.current;wt&&(wt.style.height="auto",wt.style.height=`${Math.min(wt.scrollHeight,150)}px`)},[]);j.useEffect(()=>{it()},[_,it]);const w=j.useCallback(()=>{_.trim()&&!c&&(n(_),B(""),X(),G.current&&(G.current.style.height="auto",G.current.focus()))},[_,c,n,X]),tt=j.useCallback(wt=>{wt.key==="Enter"&&!wt.shiftKey&&(wt.preventDefault(),w())},[w]),L=j.useCallback(wt=>{B(wt.target.value)},[]),Rt=j.useCallback(()=>{F()},[F]),$t=c,Vt=c||!_.trim(),Lt=s.disclaimerText??"AI can make mistakes. Verify important information.";j.useEffect(()=>{!O&&!c&&G.current&&G.current.focus()},[O,c]);const Bt=()=>q?"Listening...":K;return O&&y?v.jsxs(zs,{theme:r,children:[v.jsx(Es,{questionInfo:y,progress:S,onAnswer:A,onSkip:x,onCancel:p,theme:r}),Lt&&v.jsx(As,{theme:r,children:Lt})]}):v.jsxs(zs,{theme:r,children:[v.jsxs(Kp,{theme:r,disabled:$t,children:[v.jsx(Jp,{ref:G,theme:r,value:_,onChange:L,onKeyDown:tt,placeholder:Bt(),disabled:$t,"aria-label":"Message input",rows:1}),v.jsxs(Wp,{children:[Z&&v.jsx(Pp,{theme:r,onClick:Rt,isRecording:q,"aria-label":q?"Stop recording":"Start voice recording",title:q?"Stop recording":"Start voice recording",children:v.jsx(hs,{size:18})}),v.jsx(Fp,{theme:r,onClick:w,disabled:Vt,"aria-label":"Send message",children:v.jsx(ga,{size:18})})]})]}),Lt&&v.jsx(As,{theme:r,children:Lt})]})},eg=Pe`
1038
+ `,tg=()=>{const{sendMessage:n,isTyping:c,config:s,theme:r,assistant:d,currentQuestion:y,surveyProgress:S,submitSurveyAnswer:A,skipSurveyQuestion:x,cancelSurvey:p}=Jl(),O=y!==null,[_,B]=j.useState(""),G=j.useRef(null),K=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:q,isSupported:Z,transcript:Q,toggleRecording:F,clearTranscript:X}=ms({onError:wt=>{console.error("Voice recording error:",wt)}});j.useEffect(()=>{Q&&B(Q)},[Q]);const it=j.useCallback(()=>{const wt=G.current;wt&&(wt.style.height="auto",wt.style.height=`${Math.min(wt.scrollHeight,150)}px`)},[]);j.useEffect(()=>{it()},[_,it]);const w=j.useCallback(()=>{_.trim()&&!c&&(n(_),B(""),X(),G.current&&(G.current.style.height="auto",G.current.focus()))},[_,c,n,X]),tt=j.useCallback(wt=>{wt.key==="Enter"&&!wt.shiftKey&&(wt.preventDefault(),w())},[w]),L=j.useCallback(wt=>{B(wt.target.value)},[]),Rt=j.useCallback(()=>{F()},[F]),$t=c,Vt=c||!_.trim(),Lt=s.disclaimerText??d?.chatUiConfig?.cautionaryMessageOnCompletions??"AI can make mistakes. Verify important information.";j.useEffect(()=>{!O&&!c&&G.current&&G.current.focus()},[O,c]);const Bt=()=>q?"Listening...":K;return O&&y?v.jsxs(zs,{theme:r,children:[v.jsx(Es,{questionInfo:y,progress:S,onAnswer:A,onSkip:x,onCancel:p,theme:r}),Lt&&v.jsx(As,{theme:r,children:Lt})]}):v.jsxs(zs,{theme:r,children:[v.jsxs(Kp,{theme:r,disabled:$t,children:[v.jsx(Jp,{ref:G,theme:r,value:_,onChange:L,onKeyDown:tt,placeholder:Bt(),disabled:$t,"aria-label":"Message input",rows:1}),v.jsxs(Wp,{children:[Z&&v.jsx(Pp,{theme:r,onClick:Rt,isRecording:q,"aria-label":q?"Stop recording":"Start voice recording",title:q?"Stop recording":"Start voice recording",children:v.jsx(hs,{size:18})}),v.jsx(Fp,{theme:r,onClick:w,disabled:Vt,"aria-label":"Send message",children:v.jsx(ga,{size:18})})]})]}),Lt&&v.jsx(As,{theme:r,children:Lt})]})},eg=Pe`
1039
1039
  from { opacity: 0; }
1040
1040
  to { opacity: 1; }
1041
1041
  `,lg=Pe`
@@ -1301,8 +1301,8 @@ Error generating stack: `+a.message+`
1301
1301
  height: 100%;
1302
1302
  `}
1303
1303
  z-index: ${({floatingMode:n,isExpanded:c})=>n||c?"2147483647":"auto"};
1304
- border-radius: inherit;
1305
- overflow: hidden;
1304
+ border-radius: ${({floatingMode:n})=>n?"0":"inherit"};
1305
+ overflow: ${({floatingMode:n})=>n?"visible":"hidden"};
1306
1306
  pointer-events: auto;
1307
1307
  font-family: system-ui, -apple-system, sans-serif;
1308
1308
  transition: top 0.25s ease, left 0.25s ease, right 0.25s ease, bottom 0.25s ease;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mypatientspace/chatbot-widget",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Embeddable healthcare chatbot widget for websites and mobile apps",
5
5
  "type": "module",
6
6
  "main": "dist/mypatientspace-widget.umd.js",