@botpress/webchat 5.5.3 → 5.5.5
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/.turbo/turbo-build.log +5 -5
- package/dist/index.d.ts +6 -1
- package/dist/index.js +24 -24
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@5.5.
|
|
2
|
+
> @botpress/webchat@5.5.5 build /home/runner/work/genisys/genisys/packages/webchat/components
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.4.8 [32mbuilding for production...[36m[39m
|
|
@@ -9,10 +9,10 @@ rendering chunks...
|
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[36mindex.js [39m[1m[33m1,902.
|
|
12
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,902.69 kB[39m[22m[2m │ gzip: 424.90 kB[22m
|
|
13
13
|
[vite:dts] Start rollup declaration files...
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.9.3
|
|
15
|
-
[vite:dts] Declaration files built in
|
|
15
|
+
[vite:dts] Declaration files built in 22829ms.
|
|
16
16
|
|
|
17
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m1,213.
|
|
18
|
-
[32m✓ built in
|
|
17
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m1,213.82 kB[39m[22m[2m │ gzip: 350.19 kB[22m
|
|
18
|
+
[32m✓ built in 29.31s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -1121,10 +1121,15 @@ declare type UsePresenceEmitterProps = {
|
|
|
1121
1121
|
|
|
1122
1122
|
export { User }
|
|
1123
1123
|
|
|
1124
|
-
export declare function useReadIndicator(): {
|
|
1124
|
+
export declare function useReadIndicator({ enabled }?: UseReadIndicatorProps): {
|
|
1125
1125
|
onMessageReceived: (messageId: string) => void;
|
|
1126
1126
|
};
|
|
1127
1127
|
|
|
1128
|
+
declare type UseReadIndicatorProps = {
|
|
1129
|
+
/** Gate — only emit when the bot reports presence upstream (agentPresenceEnabled). */
|
|
1130
|
+
enabled?: boolean;
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1128
1133
|
export declare type UserProfile = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
|
|
1129
1134
|
|
|
1130
1135
|
export declare type UserResponse = Awaited<ReturnType<Client['getUser']>>['user'];
|
package/dist/index.js
CHANGED
|
@@ -22215,7 +22215,7 @@ const iR = ({ text: e, options: n, reusable: t, ctx: i }) => {
|
|
|
22215
22215
|
ed({
|
|
22216
22216
|
apply({ rects: $, elements: O, availableHeight: H }) {
|
|
22217
22217
|
Object.assign(O.floating.style, {
|
|
22218
|
-
maxHeight:
|
|
22218
|
+
maxHeight: `min(200px, ${Math.max(0, H)}px)`,
|
|
22219
22219
|
minWidth: `${$.reference.width}px`
|
|
22220
22220
|
});
|
|
22221
22221
|
},
|
|
@@ -74776,45 +74776,45 @@ function $B({
|
|
|
74776
74776
|
};
|
|
74777
74777
|
}
|
|
74778
74778
|
const jB = (e) => !!e.lastMessage;
|
|
74779
|
-
function eH() {
|
|
74780
|
-
const { client:
|
|
74779
|
+
function eH({ enabled: e } = {}) {
|
|
74780
|
+
const { client: n, userCredentials: t, conversationId: i, emitter: r } = Ii(), [a, o] = ve(!0), [s, l] = ve(null), [f, c] = ve(null);
|
|
74781
74781
|
xe(() => {
|
|
74782
|
-
const
|
|
74783
|
-
(
|
|
74782
|
+
const d = r.on("message", (m) => {
|
|
74783
|
+
(t == null ? void 0 : t.userId) !== m.authorId && l(m.id);
|
|
74784
74784
|
});
|
|
74785
74785
|
return () => {
|
|
74786
|
-
|
|
74786
|
+
d();
|
|
74787
74787
|
};
|
|
74788
|
-
}, [
|
|
74789
|
-
|
|
74790
|
-
}, [
|
|
74791
|
-
const
|
|
74792
|
-
|
|
74793
|
-
},
|
|
74794
|
-
!
|
|
74795
|
-
conversationId:
|
|
74788
|
+
}, [r, t == null ? void 0 : t.userId]), xe(() => {
|
|
74789
|
+
a && u();
|
|
74790
|
+
}, [s]);
|
|
74791
|
+
const u = () => {
|
|
74792
|
+
s !== f ? p(s ?? "") : s === null && f === null && (l(""), p(""));
|
|
74793
|
+
}, p = (d) => {
|
|
74794
|
+
!e || !i || !n || (c(d), n.createEvent({
|
|
74795
|
+
conversationId: i,
|
|
74796
74796
|
payload: {
|
|
74797
74797
|
type: "custom",
|
|
74798
74798
|
data: {
|
|
74799
74799
|
type: "lastReadMessageUpdate",
|
|
74800
74800
|
payload: {
|
|
74801
|
-
conversationId:
|
|
74802
|
-
userKey:
|
|
74801
|
+
conversationId: i,
|
|
74802
|
+
userKey: t == null ? void 0 : t.userToken
|
|
74803
74803
|
}
|
|
74804
74804
|
}
|
|
74805
74805
|
}
|
|
74806
74806
|
}));
|
|
74807
74807
|
};
|
|
74808
74808
|
return xe(() => {
|
|
74809
|
-
const
|
|
74810
|
-
|
|
74811
|
-
},
|
|
74812
|
-
return window.addEventListener("focus",
|
|
74813
|
-
window.removeEventListener("focus",
|
|
74809
|
+
const d = () => {
|
|
74810
|
+
o(!0), u();
|
|
74811
|
+
}, m = () => o(!1);
|
|
74812
|
+
return window.addEventListener("focus", d), window.addEventListener("blur", m), () => {
|
|
74813
|
+
window.removeEventListener("focus", d), window.removeEventListener("blur", m);
|
|
74814
74814
|
};
|
|
74815
|
-
}, [
|
|
74816
|
-
onMessageReceived: (
|
|
74817
|
-
|
|
74815
|
+
}, [u]), {
|
|
74816
|
+
onMessageReceived: (d) => {
|
|
74817
|
+
l(d);
|
|
74818
74818
|
}
|
|
74819
74819
|
};
|
|
74820
74820
|
}
|