@mobilon-dev/chotto 0.3.106 → 0.3.108
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/chotto.css +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +295 -268
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +185 -158
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +227 -200
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +62 -245
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +7 -0
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +231 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +25 -25
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +209 -182
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +190 -164
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +208 -181
- package/dist/components/3_compounds/Feed/Feed.vue.js +1 -1
- package/dist/components/3_compounds/Feed/Feed.vue2.js +207 -197
- package/dist/components/3_compounds/Feed/composables/useFeedProgressiveRender.js +52 -49
- package/dist/components/3_compounds/Feed/composables/useFeedReactionsOverlay.js +34 -0
- package/dist/hooks/messages/useMessageActions.js +81 -70
- package/dist/hooks/messages/useMessageHoverActions.js +9 -8
- package/dist/hooks/messages/useMessageReactionsInFeed.js +53 -0
- package/dist/hooks/messages/useMessageReactionsMount.js +21 -0
- package/dist/index.js +149 -144
- package/dist/types/apps/data/messages.d.ts +197 -0
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +4 -71
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +2 -1
- package/dist/types/components/3_compounds/Feed/composables/index.d.ts +1 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedReactionsOverlay.d.ts +52 -0
- package/dist/types/hooks/messages/index.d.ts +2 -0
- package/dist/types/hooks/messages/useMessageHoverActions.d.ts +2 -1
- package/dist/types/hooks/messages/useMessageReactionsInFeed.d.ts +25 -0
- package/dist/types/hooks/messages/useMessageReactionsMount.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,79 +1,82 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
3
|
-
function F(
|
|
4
|
-
var
|
|
5
|
-
return ((
|
|
1
|
+
import { ref as C, computed as H, watch as I, nextTick as B, onUnmounted as K } from "vue";
|
|
2
|
+
const M = 28, d = 24;
|
|
3
|
+
function F(u, n) {
|
|
4
|
+
var l;
|
|
5
|
+
return ((l = u[n]) == null ? void 0 : l.messageId) ?? "";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
objectsRef:
|
|
9
|
-
feedRef:
|
|
7
|
+
function b({
|
|
8
|
+
objectsRef: u,
|
|
9
|
+
feedRef: n
|
|
10
10
|
}) {
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
const k = H(() =>
|
|
14
|
-
function
|
|
15
|
-
|
|
11
|
+
const l = C(0);
|
|
12
|
+
let v = "", p = "", i = 0, h = 0, a = 0;
|
|
13
|
+
const k = H(() => u.value.slice(l.value)), A = H(() => l.value > 0);
|
|
14
|
+
function g() {
|
|
15
|
+
h += 1, a && (cancelAnimationFrame(a), a = 0);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
20
|
-
const c =
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
function T(e, o, t) {
|
|
18
|
+
const r = n.value;
|
|
19
|
+
if (!r) return;
|
|
20
|
+
const c = r.style.scrollBehavior;
|
|
21
|
+
r.style.scrollBehavior = "auto", t ? r.scrollTop = r.scrollHeight : r.scrollTop = o + (r.scrollHeight - e), requestAnimationFrame(() => {
|
|
22
|
+
r.style.scrollBehavior = c;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function f() {
|
|
26
|
-
const e = ++
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const e = ++h, o = () => {
|
|
27
|
+
if (a = 0, e !== h || l.value <= 0) return;
|
|
28
|
+
const t = n.value, r = (t == null ? void 0 : t.scrollHeight) ?? 0, c = (t == null ? void 0 : t.scrollTop) ?? 0, m = t ? t.scrollHeight - t.scrollTop - t.clientHeight < 140 : !0;
|
|
29
|
+
l.value = Math.max(0, l.value - d), B(() => {
|
|
30
|
+
T(r, c, m), e === h && l.value > 0 && (a = requestAnimationFrame(o));
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
a = requestAnimationFrame(o);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
35
|
+
function y(e) {
|
|
36
|
+
l.value = Math.max(0, e - M), l.value > 0 && f();
|
|
37
37
|
}
|
|
38
38
|
function E(e) {
|
|
39
39
|
if (e < 0) return;
|
|
40
40
|
const o = Math.max(0, e - 8);
|
|
41
|
-
o <
|
|
41
|
+
o < l.value && (l.value = o, l.value > 0 && f());
|
|
42
42
|
}
|
|
43
43
|
function L() {
|
|
44
|
-
if (
|
|
45
|
-
const e =
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
if (l.value <= 0) return;
|
|
45
|
+
const e = n.value, o = (e == null ? void 0 : e.scrollHeight) ?? 0, t = (e == null ? void 0 : e.scrollTop) ?? 0, r = e ? e.scrollHeight - e.scrollTop - e.clientHeight < 140 : !1;
|
|
46
|
+
l.value = Math.max(0, l.value - d * 2), B(() => {
|
|
47
|
+
T(o, t, r), l.value > 0 && f();
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
return
|
|
51
|
-
() =>
|
|
50
|
+
return I(
|
|
51
|
+
() => u.value,
|
|
52
52
|
(e) => {
|
|
53
|
-
const o = F(e, 0),
|
|
53
|
+
const o = F(e, 0), t = F(e, e.length - 1), r = i > 0 && e.length > i && t === p && o !== v, c = i > 0 && e.length > i && o === v, m = o === v && t === p && e.length === i;
|
|
54
54
|
if (e.length === 0)
|
|
55
|
-
|
|
56
|
-
else if (!m) if (
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
} else c || (
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
g(), l.value = 0;
|
|
56
|
+
else if (!m) if (r) {
|
|
57
|
+
const s = e.length - i;
|
|
58
|
+
l.value > 0 && (l.value += s, f());
|
|
59
|
+
} else c || (g(), y(e.length), B(() => {
|
|
60
|
+
const s = n.value;
|
|
61
|
+
if (!s) return;
|
|
62
|
+
const q = s.style.scrollBehavior;
|
|
63
|
+
s.style.scrollBehavior = "auto", s.scrollTop = s.scrollHeight, requestAnimationFrame(() => {
|
|
64
|
+
s.scrollTop = s.scrollHeight, s.style.scrollBehavior = q;
|
|
62
65
|
});
|
|
63
|
-
}))
|
|
64
|
-
|
|
66
|
+
}));
|
|
67
|
+
v = o, p = t, i = e.length;
|
|
65
68
|
},
|
|
66
69
|
{ immediate: !0 }
|
|
67
|
-
),
|
|
70
|
+
), K(g), {
|
|
68
71
|
visibleObjects: k,
|
|
69
|
-
renderStart:
|
|
72
|
+
renderStart: l,
|
|
70
73
|
isBackfilling: A,
|
|
71
74
|
revealThroughIndex: E,
|
|
72
75
|
accelerateBackfill: L
|
|
73
76
|
};
|
|
74
77
|
}
|
|
75
78
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
d as FEED_BACKFILL_CHUNK,
|
|
80
|
+
M as FEED_TAIL_CHUNK,
|
|
81
|
+
b as useFeedProgressiveRender
|
|
79
82
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { shallowRef as l, computed as v, provide as s, inject as i } from "vue";
|
|
2
|
+
const c = Symbol("feedReactionsConsumer"), f = Symbol("feedReactionsState");
|
|
3
|
+
let e = null;
|
|
4
|
+
function d(n) {
|
|
5
|
+
e = n;
|
|
6
|
+
}
|
|
7
|
+
function S() {
|
|
8
|
+
const n = l(null), u = v(() => {
|
|
9
|
+
var o;
|
|
10
|
+
return ((o = n.value) == null ? void 0 : o.anchorEl) ?? null;
|
|
11
|
+
});
|
|
12
|
+
return s(c, {
|
|
13
|
+
activate(o) {
|
|
14
|
+
n.value = o, e == null || e.onMessageEnter();
|
|
15
|
+
},
|
|
16
|
+
handlePointerLeave(o, t, r) {
|
|
17
|
+
if (!n.value || n.value.anchorEl !== t) return;
|
|
18
|
+
const a = o.relatedTarget;
|
|
19
|
+
a instanceof Node && (t != null && t.contains(a) || r != null && r.contains(a) || e != null && e.containsNode(a)) || (e == null || e.onMessageLeave(), e != null && e.isPanelOpen() || (n.value = null));
|
|
20
|
+
}
|
|
21
|
+
}), s(f, { activeTarget: n, anchorRef: u }), { activeTarget: n, anchorRef: u };
|
|
22
|
+
}
|
|
23
|
+
function F() {
|
|
24
|
+
return i(c, null);
|
|
25
|
+
}
|
|
26
|
+
function O() {
|
|
27
|
+
return i(f, null);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
S as provideFeedReactionsOverlay,
|
|
31
|
+
d as registerFeedReactionsPanelBridge,
|
|
32
|
+
F as useFeedReactionsConsumer,
|
|
33
|
+
O as useFeedReactionsOverlayState
|
|
34
|
+
};
|
|
@@ -1,103 +1,114 @@
|
|
|
1
|
-
import { ref as u, inject as
|
|
1
|
+
import { ref as u, inject as P, computed as x, watch as z, onMounted as D, onUnmounted as O, nextTick as S } from "vue";
|
|
2
2
|
import { useConfirmDeleteMessage as j } from "../modals/useConfirmDeleteMessage.js";
|
|
3
3
|
import { useTheme as B } from "../useTheme.js";
|
|
4
|
-
import { calculateMessageMenuPosition as
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
9
|
-
return
|
|
4
|
+
import { calculateMessageMenuPosition as U } from "./calculateMessageMenuPosition.js";
|
|
5
|
+
function g(e) {
|
|
6
|
+
if (!e) return null;
|
|
7
|
+
if (e instanceof HTMLElement) return e;
|
|
8
|
+
const n = e.$el;
|
|
9
|
+
return n instanceof HTMLElement ? n : null;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const f = /* @__PURE__ */ new Set();
|
|
12
|
+
function w(e) {
|
|
13
|
+
for (const n of f)
|
|
14
|
+
n(e);
|
|
15
|
+
}
|
|
16
|
+
function V(e) {
|
|
17
|
+
return f.size === 0 && document.addEventListener("click", w, !0), f.add(e), () => {
|
|
18
|
+
f.delete(e), f.size === 0 && document.removeEventListener("click", w, !0);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function T(e) {
|
|
22
|
+
if (!e) return null;
|
|
23
|
+
if (e instanceof Event) {
|
|
24
|
+
const n = e.currentTarget;
|
|
25
|
+
if (n instanceof HTMLElement) {
|
|
26
|
+
const i = n.getBoundingClientRect();
|
|
27
|
+
return { top: i.top, right: i.right, bottom: i.bottom, left: i.left, width: i.width, height: i.height };
|
|
18
28
|
}
|
|
19
29
|
return null;
|
|
20
30
|
}
|
|
21
|
-
return "triggerRect" in
|
|
31
|
+
return "triggerRect" in e && e.triggerRect ? e.triggerRect : "event" in e && e.event instanceof Event ? T(e.event) : "top" in e && "left" in e && "bottom" in e && "right" in e ? e : null;
|
|
22
32
|
}
|
|
23
|
-
const
|
|
24
|
-
const r = u(!1),
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const
|
|
28
|
-
|
|
33
|
+
const N = (e, n, i = {}) => {
|
|
34
|
+
const r = u(!1), c = u(!1), h = u(null), a = u(null), v = u({}), d = u(null), R = P("chatAppId", void 0), { getTheme: k } = B(R || ""), y = x(() => k().theme || "light"), E = () => {
|
|
35
|
+
c.value = !0;
|
|
36
|
+
}, A = (t) => {
|
|
37
|
+
const o = g(a.value);
|
|
38
|
+
t != null && t.relatedTarget && (o != null && o.contains(t.relatedTarget)) || (c.value = !1);
|
|
29
39
|
}, s = () => {
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
40
|
+
c.value = !1, r.value = !1, d.value = null;
|
|
41
|
+
}, C = () => {
|
|
42
|
+
c.value = !0;
|
|
43
|
+
}, b = () => {
|
|
34
44
|
s();
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
},
|
|
45
|
+
}, M = (t) => {
|
|
46
|
+
d.value = T(t), r.value = !0;
|
|
47
|
+
}, I = (t) => {
|
|
38
48
|
if (r.value) {
|
|
39
49
|
s();
|
|
40
50
|
return;
|
|
41
51
|
}
|
|
42
|
-
|
|
52
|
+
M(t);
|
|
43
53
|
};
|
|
44
|
-
async function
|
|
45
|
-
await
|
|
46
|
-
let
|
|
47
|
-
for (; !
|
|
48
|
-
await new Promise((l) => setTimeout(l, 10)),
|
|
49
|
-
const
|
|
50
|
-
for (
|
|
51
|
-
await new Promise((l) => setTimeout(l, 10)),
|
|
52
|
-
|
|
53
|
-
triggerRect:
|
|
54
|
-
boundsElement:
|
|
54
|
+
async function L() {
|
|
55
|
+
await S();
|
|
56
|
+
let t = 0;
|
|
57
|
+
for (; !g(a.value) && t < 20; )
|
|
58
|
+
await new Promise((l) => setTimeout(l, 10)), t++;
|
|
59
|
+
const o = g(a.value);
|
|
60
|
+
for (t = 0; o && o.offsetWidth === 0 && t < 10; )
|
|
61
|
+
await new Promise((l) => setTimeout(l, 10)), t++;
|
|
62
|
+
v.value = await U(o, {
|
|
63
|
+
triggerRect: d.value,
|
|
64
|
+
boundsElement: h.value
|
|
55
65
|
});
|
|
56
66
|
}
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
z(r, async (t) => {
|
|
68
|
+
t ? await L() : (v.value = {}, d.value = null);
|
|
59
69
|
});
|
|
60
|
-
function
|
|
70
|
+
function H(t) {
|
|
61
71
|
if (!r.value) return;
|
|
62
|
-
const
|
|
63
|
-
l != null && l.contains(
|
|
72
|
+
const o = t.target, l = g(a.value), p = h.value;
|
|
73
|
+
l != null && l.contains(o) || p != null && p.contains(o) || s();
|
|
64
74
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
let m;
|
|
76
|
+
return D(() => {
|
|
77
|
+
m = V(H);
|
|
78
|
+
}), O(() => {
|
|
79
|
+
m == null || m();
|
|
69
80
|
}), {
|
|
70
81
|
isOpenMenu: r,
|
|
71
|
-
buttonMenuVisible:
|
|
72
|
-
menuAnchorRef:
|
|
73
|
-
menuRef:
|
|
74
|
-
menuStyle:
|
|
75
|
-
menuTheme:
|
|
76
|
-
showMenu:
|
|
77
|
-
hideMenu:
|
|
78
|
-
openMenu:
|
|
79
|
-
toggleMenu:
|
|
80
|
-
onMenuMouseEnter:
|
|
81
|
-
onMenuMouseLeave:
|
|
82
|
-
clickAction: async (
|
|
83
|
-
if (s(),
|
|
84
|
-
|
|
82
|
+
buttonMenuVisible: c,
|
|
83
|
+
menuAnchorRef: h,
|
|
84
|
+
menuRef: a,
|
|
85
|
+
menuStyle: v,
|
|
86
|
+
menuTheme: y,
|
|
87
|
+
showMenu: E,
|
|
88
|
+
hideMenu: A,
|
|
89
|
+
openMenu: M,
|
|
90
|
+
toggleMenu: I,
|
|
91
|
+
onMenuMouseEnter: C,
|
|
92
|
+
onMenuMouseLeave: b,
|
|
93
|
+
clickAction: async (t) => {
|
|
94
|
+
if (s(), t.action === "reply" && i.onReply) {
|
|
95
|
+
i.onReply();
|
|
85
96
|
return;
|
|
86
97
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
98
|
+
if (t.action === "edit" && i.onEdit) {
|
|
99
|
+
i.onEdit();
|
|
89
100
|
return;
|
|
90
101
|
}
|
|
91
|
-
|
|
102
|
+
t.action === "delete" && !await j() || n("action", { messageId: e.messageId, type: "menu", ...t });
|
|
92
103
|
},
|
|
93
104
|
viewsAction: () => {
|
|
94
|
-
s(),
|
|
105
|
+
s(), n("action", { messageId: e.messageId, type: "views" });
|
|
95
106
|
},
|
|
96
|
-
handleClickReplied: (
|
|
97
|
-
|
|
107
|
+
handleClickReplied: (t) => {
|
|
108
|
+
n("reply", t);
|
|
98
109
|
}
|
|
99
110
|
};
|
|
100
111
|
};
|
|
101
112
|
export {
|
|
102
|
-
|
|
113
|
+
N as useMessageActions
|
|
103
114
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as r, toValue as t } from "vue";
|
|
2
2
|
import { isSmsFeedMessage as c } from "../../functions/isSmsChannel.js";
|
|
3
|
-
function
|
|
4
|
-
const o =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
function f(s, n = !0, i = void 0) {
|
|
4
|
+
const o = r(() => {
|
|
5
|
+
const e = t(i);
|
|
6
|
+
return (e == null ? void 0 : e.deleted) === !0 ? !1 : !c(e, t(s));
|
|
7
|
+
}), u = r(
|
|
8
|
+
() => t(n) && o.value
|
|
8
9
|
);
|
|
9
|
-
return { hoverActionsEnabled: o, reactionsActive:
|
|
10
|
+
return { hoverActionsEnabled: o, reactionsActive: u };
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
f as useMessageHoverActions
|
|
13
14
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { provide as l, toValue as t } from "vue";
|
|
2
|
+
import { useFeedReactionsConsumer as m } from "../../components/3_compounds/Feed/composables/useFeedReactionsOverlay.js";
|
|
3
|
+
import { useMessageReactionsMount as d } from "./useMessageReactionsMount.js";
|
|
4
|
+
const f = Symbol(
|
|
5
|
+
"messageReactionsPatch"
|
|
6
|
+
);
|
|
7
|
+
function E(e) {
|
|
8
|
+
const { showReactions: s, engageReactionsMount: o } = d(
|
|
9
|
+
e.reactions,
|
|
10
|
+
e.reactionsActive
|
|
11
|
+
), c = m();
|
|
12
|
+
function r(a) {
|
|
13
|
+
const n = t(e.message);
|
|
14
|
+
n.reactions = a;
|
|
15
|
+
}
|
|
16
|
+
l(f, r);
|
|
17
|
+
function u() {
|
|
18
|
+
var n;
|
|
19
|
+
if (!t(e.reactionsActive)) return;
|
|
20
|
+
o();
|
|
21
|
+
const a = e.contentRef.value;
|
|
22
|
+
!a || !c || c.activate({
|
|
23
|
+
messageId: t(e.messageId),
|
|
24
|
+
anchorEl: a,
|
|
25
|
+
chipsEl: ((n = e.chipsRef) == null ? void 0 : n.value) ?? null,
|
|
26
|
+
reactions: t(e.reactions),
|
|
27
|
+
reply: t(e.reply),
|
|
28
|
+
replyEnabled: !0,
|
|
29
|
+
menuEnabled: t(e.menuEnabled),
|
|
30
|
+
mode: t(e.reactionsMode),
|
|
31
|
+
enabled: !0,
|
|
32
|
+
handlers: e.handlers,
|
|
33
|
+
patchReactions: r
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function i(a) {
|
|
37
|
+
var n;
|
|
38
|
+
c == null || c.handlePointerLeave(
|
|
39
|
+
a,
|
|
40
|
+
e.contentRef.value,
|
|
41
|
+
((n = e.chipsRef) == null ? void 0 : n.value) ?? void 0
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
showReactions: s,
|
|
46
|
+
onContentPointerEnter: u,
|
|
47
|
+
onContentPointerLeave: i
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
f as MESSAGE_REACTIONS_PATCH_KEY,
|
|
52
|
+
E as useMessageReactionsInFeed
|
|
53
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ref as g, computed as s, toValue as a } from "vue";
|
|
2
|
+
function m(r, u) {
|
|
3
|
+
const e = g(!1), t = s(() => {
|
|
4
|
+
var o;
|
|
5
|
+
const n = (o = a(r)) == null ? void 0 : o.items;
|
|
6
|
+
return Array.isArray(n) && n.length > 0;
|
|
7
|
+
}), c = s(
|
|
8
|
+
() => a(u) && (t.value || e.value)
|
|
9
|
+
);
|
|
10
|
+
function i() {
|
|
11
|
+
e.value = !0;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
showReactions: c,
|
|
15
|
+
engageReactionsMount: i,
|
|
16
|
+
hasReactionItems: t
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
m as useMessageReactionsMount
|
|
21
|
+
};
|