@2uinc/frontend-component-xpert-chatbot 1.16.1 → 1.16.2

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.
@@ -1522,67 +1522,67 @@ const Os = 1500, zs = `The parent container is wider than the chatbot launch but
1522
1522
  eyes follow your mouse when you hover near it.`, Er = ({
1523
1523
  handleFloatingActionButtonClick: e
1524
1524
  }) => {
1525
- var m, f, T, x, k, b, z;
1525
+ var f, T, x, k, b, z, E;
1526
1526
  const { xpertKey: t, launchButton: n } = Se(Oe), r = !Ne.get(
1527
1527
  `${t}-proactive-message-xpert-chatbot`
1528
- ), i = We(null), o = We(!1), a = r ? (m = n.animatedGraduate) == null ? void 0 : m.delayMs : ((f = n.animatedGraduate) == null ? void 0 : f.delayMs) * 2, [l, s] = ye(!1), u = it();
1528
+ ), i = We(null), o = We(!1), a = r ? (f = n.animatedGraduate) == null ? void 0 : f.delayMs : ((T = n.animatedGraduate) == null ? void 0 : T.delayMs) * 2, [l, s] = ye(!1), u = it(), c = window.matchMedia(
1529
+ `(max-width: ${Os}px)`
1530
+ ).matches;
1529
1531
  xe(() => {
1530
- const _ = setTimeout(
1532
+ const B = setTimeout(
1531
1533
  () => {
1532
1534
  s(!0);
1533
1535
  },
1534
1536
  a
1535
1537
  );
1536
1538
  return () => {
1537
- clearTimeout(_);
1539
+ clearTimeout(B);
1538
1540
  };
1539
1541
  }, [a]), xe(() => {
1540
- const E = (_) => {
1541
- const B = window.matchMedia(
1542
- `(max-width: ${Os}px)`
1543
- ).matches, M = window.devicePixelRatio > 1.5;
1544
- if (!(o != null && o.current) || B || M)
1542
+ const _ = (B) => {
1543
+ const M = window.devicePixelRatio > 1.5;
1544
+ if (!(o != null && o.current) || c || M)
1545
1545
  return;
1546
1546
  i.current.querySelectorAll(
1547
1547
  ".xpert_chatbot__animated_graduate__pupil"
1548
1548
  ).forEach(($) => {
1549
- const W = $.getBoundingClientRect(), K = (_.pageX - window.scrollX - W.left) / 30 / 16 + "rem", A = (_.pageY - window.scrollY - W.top) / 30 / 16 + "rem";
1549
+ const W = $.getBoundingClientRect(), K = (B.pageX - window.scrollX - W.left) / 30 / 16 + "rem", A = (B.pageY - window.scrollY - W.top) / 30 / 16 + "rem";
1550
1550
  $.style.transform = "translate3d(" + K + "," + A + ", 0rem)";
1551
1551
  });
1552
1552
  };
1553
- return window.addEventListener("mousemove", E), () => {
1554
- window.removeEventListener("mousemove", E);
1553
+ return window.addEventListener("mousemove", _), () => {
1554
+ window.removeEventListener("mousemove", _);
1555
1555
  };
1556
1556
  }, []);
1557
- const c = () => {
1557
+ const p = () => {
1558
1558
  o.current = !0;
1559
- }, p = () => {
1559
+ }, m = () => {
1560
1560
  o.current = !1;
1561
1561
  };
1562
1562
  return /* @__PURE__ */ v.jsxs(
1563
1563
  "div",
1564
1564
  {
1565
1565
  role: "region",
1566
- "aria-label": "eyes follow mouse region",
1567
- className: "xpert_chatbot__animated_graduate__eyes_follow_mouse_region",
1568
- onMouseEnter: c,
1569
- onMouseLeave: p,
1566
+ "aria-label": "animated graduate region",
1567
+ className: c ? "" : "xpert_chatbot__animated_graduate__eyes_follow_mouse_region",
1568
+ onMouseEnter: c ? null : p,
1569
+ onMouseLeave: c ? null : m,
1570
1570
  children: [
1571
- /* @__PURE__ */ v.jsx("div", { className: "xpert_chatbot__a11y-sr-only", children: zs }),
1571
+ !c && /* @__PURE__ */ v.jsx("div", { className: "xpert_chatbot__a11y-sr-only", children: zs }),
1572
1572
  /* @__PURE__ */ v.jsx(
1573
1573
  wn,
1574
1574
  {
1575
1575
  onClick: e,
1576
1576
  label: "Open XPERT Chatbot",
1577
1577
  className: "xpert-chatbot-button__animated_graduate__launch-button",
1578
- style: u ? { ...(x = (T = n.style) == null ? void 0 : T.mobile) == null ? void 0 : x.animatedGraduateExperiment } : { ...(k = n.style) == null ? void 0 : k.animatedGraduateExperiment },
1578
+ style: u ? { ...(k = (x = n.style) == null ? void 0 : x.mobile) == null ? void 0 : k.animatedGraduateExperiment } : { ...(b = n.style) == null ? void 0 : b.animatedGraduateExperiment },
1579
1579
  "aria-haspopup": "dialog",
1580
1580
  "aria-expanded": open,
1581
1581
  children: /* @__PURE__ */ v.jsx("div", { ref: i, children: /* @__PURE__ */ v.jsxs(
1582
1582
  "svg",
1583
1583
  {
1584
1584
  style: {
1585
- width: (z = (b = n.style) == null ? void 0 : b.animatedGraduateExperiment) == null ? void 0 : z.iconWidth
1585
+ width: (E = (z = n.style) == null ? void 0 : z.animatedGraduateExperiment) == null ? void 0 : E.iconWidth
1586
1586
  },
1587
1587
  viewBox: "0 0 61 73",
1588
1588
  fill: "none",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2uinc/frontend-component-xpert-chatbot",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/2uinc/frontend-component-xpert-chatbot.git"