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.
- package/dist/agent-widget.js +12 -9
- package/dist/agent-widget.js.map +1 -1
- package/package.json +1 -1
package/dist/agent-widget.js
CHANGED
|
@@ -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),
|
|
23977
|
-
i.current =
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
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:
|
|
23985
|
-
onPointerMove:
|
|
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:
|
|
24000
|
+
onClick: c,
|
|
23998
24001
|
size: "lg",
|
|
23999
24002
|
radius: 999,
|
|
24000
24003
|
variant: "transparent",
|