bstp-agent-widget 0.2.17 → 0.2.18

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.
@@ -23973,16 +23973,19 @@ function QO(e = {}) {
23973
23973
  //#endregion
23974
23974
  //#region src/components/AgentChat/AgentChatFab.tsx
23975
23975
  function $O({ onClick: e, zIndex: t, position: n }) {
23976
- let r = QO({ skipSelector: "" }), i = v(!1), a = (e) => {
23977
- i.current = !1, r.handlePointerDown(e);
23978
- }, o = () => {
23979
- i.current = !0;
23980
- }, s = () => {
23981
- i.current || e();
23976
+ let r = QO({ skipSelector: "" }), i = v(null), a = v(!1), o = (e) => {
23977
+ i.current = {
23978
+ x: e.clientX,
23979
+ y: e.clientY
23980
+ }, a.current = !1, r.handlePointerDown(e);
23981
+ }, s = (e) => {
23982
+ i.current && Math.abs(e.clientX - i.current.x) + Math.abs(e.clientY - i.current.y) >= 4 && (a.current = !0);
23983
+ }, c = () => {
23984
+ a.current || e();
23982
23985
  };
23983
23986
  return /* @__PURE__ */ T("div", {
23984
- onPointerDown: a,
23985
- onPointerMove: o,
23987
+ onPointerDown: o,
23988
+ onPointerMove: s,
23986
23989
  style: {
23987
23990
  position: "fixed",
23988
23991
  bottom: `${n.bottom}px`,
@@ -23994,7 +23997,7 @@ function $O({ onClick: e, zIndex: t, position: n }) {
23994
23997
  label: "Open agent widget",
23995
23998
  position: "left",
23996
23999
  children: /* @__PURE__ */ T(yl, {
23997
- onClick: s,
24000
+ onClick: c,
23998
24001
  size: "lg",
23999
24002
  radius: 999,
24000
24003
  variant: "transparent",