@linktr.ee/messaging-react 3.5.7-rc-1783067095 → 3.5.7-rc-1783068568
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/{Card-BQJP7Y9f.cjs → Card-6FOd4_j_.cjs} +2 -2
- package/dist/{Card-BQJP7Y9f.cjs.map → Card-6FOd4_j_.cjs.map} +1 -1
- package/dist/{Card-D2A5fCuk.cjs → Card-BhIG7T7c.cjs} +2 -2
- package/dist/{Card-D2A5fCuk.cjs.map → Card-BhIG7T7c.cjs.map} +1 -1
- package/dist/{Card-CK_XUFsc.cjs → Card-CA63InbA.cjs} +2 -2
- package/dist/{Card-CK_XUFsc.cjs.map → Card-CA63InbA.cjs.map} +1 -1
- package/dist/{Card-wg-7Dyut.js → Card-C_TfROjB.js} +3 -3
- package/dist/{Card-wg-7Dyut.js.map → Card-C_TfROjB.js.map} +1 -1
- package/dist/{Card-6zV3sFbU.js → Card-DN8P8IeT.js} +2 -2
- package/dist/{Card-6zV3sFbU.js.map → Card-DN8P8IeT.js.map} +1 -1
- package/dist/{Card-CAalQRJs.js → Card-DgWCIgWw.js} +2 -2
- package/dist/{Card-CAalQRJs.js.map → Card-DgWCIgWw.js.map} +1 -1
- package/dist/{LockedThumbnail-CeTZqbzd.js → LockedThumbnail-DNy4CoCm.js} +2 -2
- package/dist/{LockedThumbnail-CeTZqbzd.js.map → LockedThumbnail-DNy4CoCm.js.map} +1 -1
- package/dist/{LockedThumbnail-DxwKL4A1.cjs → LockedThumbnail-DPlNLdpK.cjs} +2 -2
- package/dist/{LockedThumbnail-DxwKL4A1.cjs.map → LockedThumbnail-DPlNLdpK.cjs.map} +1 -1
- package/dist/index-ClREqfMm.cjs +2 -0
- package/dist/index-ClREqfMm.cjs.map +1 -0
- package/dist/{index-gnuITMC7.js → index-CxGOKFnx.js} +53 -51
- package/dist/index-CxGOKFnx.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelHeaderRedesign.tsx +26 -26
- package/src/components/ChannelView.stories.tsx +0 -115
- package/src/components/ChannelView.test.tsx +24 -1
- package/src/components/ChannelView.tsx +5 -3
- package/dist/index-DYBHXWJX.cjs +0 -2
- package/dist/index-DYBHXWJX.cjs.map +0 -1
- package/dist/index-gnuITMC7.js.map +0 -1
|
@@ -680,7 +680,7 @@ const ne = ({
|
|
|
680
680
|
className: "-mb-2"
|
|
681
681
|
}
|
|
682
682
|
),
|
|
683
|
-
/* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-
|
|
683
|
+
/* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
|
|
684
684
|
/* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
685
685
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
|
|
686
686
|
/* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
|
|
@@ -800,7 +800,7 @@ function tn({
|
|
|
800
800
|
const s = e == null ? void 0 : e.text, a = aa(t);
|
|
801
801
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
802
802
|
}
|
|
803
|
-
const ra = j.lazy(() => import("./Card-
|
|
803
|
+
const ra = j.lazy(() => import("./Card-DgWCIgWw.js")), ia = j.lazy(() => import("./Card-DN8P8IeT.js")), la = j.lazy(() => import("./Card-C_TfROjB.js")), at = () => /* @__PURE__ */ n(
|
|
804
804
|
"div",
|
|
805
805
|
{
|
|
806
806
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
@@ -909,7 +909,7 @@ const ga = (e) => {
|
|
|
909
909
|
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", R);
|
|
910
910
|
};
|
|
911
911
|
}, [N, O, F]);
|
|
912
|
-
const J = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video",
|
|
912
|
+
const J = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", W = Math.round(p * 100);
|
|
913
913
|
return /* @__PURE__ */ m(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
@@ -1018,7 +1018,7 @@ const ga = (e) => {
|
|
|
1018
1018
|
{
|
|
1019
1019
|
role: "slider",
|
|
1020
1020
|
"aria-label": "Playback position",
|
|
1021
|
-
"aria-valuenow":
|
|
1021
|
+
"aria-valuenow": W,
|
|
1022
1022
|
"aria-valuemin": 0,
|
|
1023
1023
|
"aria-valuemax": 100,
|
|
1024
1024
|
tabIndex: 0,
|
|
@@ -1034,7 +1034,7 @@ const ga = (e) => {
|
|
|
1034
1034
|
"div",
|
|
1035
1035
|
{
|
|
1036
1036
|
className: "h-full rounded-full bg-white",
|
|
1037
|
-
style: { width: `${
|
|
1037
|
+
style: { width: `${W}%` }
|
|
1038
1038
|
}
|
|
1039
1039
|
) })
|
|
1040
1040
|
}
|
|
@@ -1057,7 +1057,7 @@ const ga = (e) => {
|
|
|
1057
1057
|
{
|
|
1058
1058
|
role: "slider",
|
|
1059
1059
|
"aria-label": "Playback position",
|
|
1060
|
-
"aria-valuenow":
|
|
1060
|
+
"aria-valuenow": W,
|
|
1061
1061
|
"aria-valuemin": 0,
|
|
1062
1062
|
"aria-valuemax": 100,
|
|
1063
1063
|
tabIndex: 0,
|
|
@@ -1080,7 +1080,7 @@ const ga = (e) => {
|
|
|
1080
1080
|
"div",
|
|
1081
1081
|
{
|
|
1082
1082
|
className: "h-full rounded-full bg-white",
|
|
1083
|
-
style: { width: `${
|
|
1083
|
+
style: { width: `${W}%` }
|
|
1084
1084
|
}
|
|
1085
1085
|
)
|
|
1086
1086
|
}
|
|
@@ -1089,7 +1089,7 @@ const ga = (e) => {
|
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
1091
|
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1092
|
-
style: { left: `${
|
|
1092
|
+
style: { left: `${W}%` }
|
|
1093
1093
|
}
|
|
1094
1094
|
)
|
|
1095
1095
|
]
|
|
@@ -1596,10 +1596,10 @@ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1596
1596
|
MessageDeleted: B = Bn,
|
|
1597
1597
|
MessageIsThreadReplyInChannelButtonIndicator: J = Un,
|
|
1598
1598
|
MessageRepliesCountButton: ee = Vn,
|
|
1599
|
-
ReminderNotification:
|
|
1599
|
+
ReminderNotification: W = Gn,
|
|
1600
1600
|
StreamedMessageText: w = Hn,
|
|
1601
1601
|
PinIndicator: R
|
|
1602
|
-
} = Wt("CustomMessage"), G = Yn(c), H = qn(c),
|
|
1602
|
+
} = Wt("CustomMessage"), G = Yn(c), H = qn(c), Y = ie(
|
|
1603
1603
|
() => h == null ? void 0 : h(c),
|
|
1604
1604
|
[h, c]
|
|
1605
1605
|
), U = ie(() => {
|
|
@@ -1607,7 +1607,7 @@ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1607
1607
|
if (!De(c)) return Ae;
|
|
1608
1608
|
const Pt = Ae.filter((Ot) => !("type" in Ot) || !cn(Ot));
|
|
1609
1609
|
return Pt.length === Ae.length ? Ae : Pt;
|
|
1610
|
-
}, [c]),
|
|
1610
|
+
}, [c]), q = ie(() => {
|
|
1611
1611
|
const ve = tn({ message: c, viewerLanguage: b });
|
|
1612
1612
|
return ve === c.text ? c : { ...c, text: ve };
|
|
1613
1613
|
}, [c, b]);
|
|
@@ -1661,7 +1661,7 @@ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1661
1661
|
"data-dd-privacy": "mask",
|
|
1662
1662
|
children: [
|
|
1663
1663
|
R && /* @__PURE__ */ n(R, {}),
|
|
1664
|
-
!!P && /* @__PURE__ */ n(
|
|
1664
|
+
!!P && /* @__PURE__ */ n(W, { reminder: P }),
|
|
1665
1665
|
c.user && /* @__PURE__ */ n(
|
|
1666
1666
|
ne,
|
|
1667
1667
|
{
|
|
@@ -1728,7 +1728,7 @@ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1728
1728
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1729
1729
|
jt,
|
|
1730
1730
|
{
|
|
1731
|
-
message:
|
|
1731
|
+
message: q,
|
|
1732
1732
|
renderText: v
|
|
1733
1733
|
}
|
|
1734
1734
|
) })
|
|
@@ -1752,16 +1752,16 @@ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1752
1752
|
attachments: U
|
|
1753
1753
|
}
|
|
1754
1754
|
) : null,
|
|
1755
|
-
|
|
1755
|
+
Y ? /* @__PURE__ */ n(
|
|
1756
1756
|
w,
|
|
1757
1757
|
{
|
|
1758
|
-
message:
|
|
1758
|
+
message: q,
|
|
1759
1759
|
renderText: v
|
|
1760
1760
|
}
|
|
1761
1761
|
) : /* @__PURE__ */ n(
|
|
1762
1762
|
jt,
|
|
1763
1763
|
{
|
|
1764
|
-
message:
|
|
1764
|
+
message: q,
|
|
1765
1765
|
renderText: v
|
|
1766
1766
|
}
|
|
1767
1767
|
),
|
|
@@ -2580,22 +2580,24 @@ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2580
2580
|
var w, R, G, H;
|
|
2581
2581
|
const { channel: y } = ce(), { client: A } = de(), I = j.useMemo(
|
|
2582
2582
|
() => {
|
|
2583
|
-
var
|
|
2583
|
+
var Y;
|
|
2584
2584
|
return Oe(
|
|
2585
|
-
(
|
|
2585
|
+
(Y = y.state) == null ? void 0 : Y.members,
|
|
2586
2586
|
A == null ? void 0 : A.userID,
|
|
2587
2587
|
y.type
|
|
2588
2588
|
);
|
|
2589
2589
|
},
|
|
2590
2590
|
[(w = y.state) == null ? void 0 : w.members, A == null ? void 0 : A.userID, y.type]
|
|
2591
2591
|
), C = j.useMemo(() => {
|
|
2592
|
-
var
|
|
2593
|
-
const
|
|
2594
|
-
return
|
|
2592
|
+
var q;
|
|
2593
|
+
const Y = A == null ? void 0 : A.userID;
|
|
2594
|
+
return Y ? Object.values(((q = y.state) == null ? void 0 : q.members) || {}).find((Z) => {
|
|
2595
2595
|
var re;
|
|
2596
|
-
return ((re = Z.user) == null ? void 0 : re.id) ===
|
|
2596
|
+
return ((re = Z.user) == null ? void 0 : re.id) === Y;
|
|
2597
2597
|
}) : void 0;
|
|
2598
|
-
}, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), S = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), O = ((H = I == null ? void 0 : I.user) == null ? void 0 : H.is_account) ?? (I == null ? void 0 : I.is_account), F = M && S === !1 && O === !0, B = y.state.messages.
|
|
2598
|
+
}, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), S = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), O = ((H = I == null ? void 0 : I.user) == null ? void 0 : H.is_account) ?? (I == null ? void 0 : I.is_account), F = M && S === !1 && O === !0, B = y.state.messages.some(
|
|
2599
|
+
(Y) => Y.type !== "deleted"
|
|
2600
|
+
), J = p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null, ee = P ? /* @__PURE__ */ n(
|
|
2599
2601
|
ea,
|
|
2600
2602
|
{
|
|
2601
2603
|
onBack: e,
|
|
@@ -2615,17 +2617,17 @@ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2615
2617
|
renderChannelActions: E,
|
|
2616
2618
|
onParticipantNameClick: P
|
|
2617
2619
|
}
|
|
2618
|
-
) : null,
|
|
2619
|
-
(
|
|
2620
|
-
const { message: U } = Ce("ChannelView"),
|
|
2620
|
+
) : null, W = K(
|
|
2621
|
+
(Y) => {
|
|
2622
|
+
const { message: U } = Ce("ChannelView"), q = /* @__PURE__ */ n(
|
|
2621
2623
|
$a,
|
|
2622
2624
|
{
|
|
2623
|
-
...
|
|
2625
|
+
...Y,
|
|
2624
2626
|
chatbotVotingEnabled: b,
|
|
2625
2627
|
viewerLanguage: L
|
|
2626
2628
|
}
|
|
2627
2629
|
);
|
|
2628
|
-
return !T || !U ?
|
|
2630
|
+
return !T || !U ? q : T(q, U);
|
|
2629
2631
|
},
|
|
2630
2632
|
[b, T, L]
|
|
2631
2633
|
);
|
|
@@ -2633,7 +2635,7 @@ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2633
2635
|
us,
|
|
2634
2636
|
{
|
|
2635
2637
|
overrides: {
|
|
2636
|
-
Message:
|
|
2638
|
+
Message: W,
|
|
2637
2639
|
MessageActions: Ua
|
|
2638
2640
|
},
|
|
2639
2641
|
children: /* @__PURE__ */ m(ms, { children: [
|
|
@@ -2739,9 +2741,9 @@ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2739
2741
|
composerInput: B
|
|
2740
2742
|
}) => {
|
|
2741
2743
|
const J = K(
|
|
2742
|
-
async (
|
|
2744
|
+
async (W, w, R) => {
|
|
2743
2745
|
var Z;
|
|
2744
|
-
const G = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, H = x && !G,
|
|
2746
|
+
const G = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, H = x && !G, Y = {
|
|
2745
2747
|
...w,
|
|
2746
2748
|
...H && { silent: !0 },
|
|
2747
2749
|
...N && {
|
|
@@ -2753,22 +2755,22 @@ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2753
2755
|
}, U = {
|
|
2754
2756
|
...R,
|
|
2755
2757
|
...H && { skip_push: !0 }
|
|
2756
|
-
},
|
|
2757
|
-
return E == null || E(
|
|
2758
|
+
}, q = await e.sendMessage(Y, U);
|
|
2759
|
+
return E == null || E(q), q;
|
|
2758
2760
|
},
|
|
2759
2761
|
[e, x, N, E]
|
|
2760
2762
|
), ee = V(null);
|
|
2761
2763
|
return X(() => {
|
|
2762
2764
|
if (!A) return;
|
|
2763
|
-
const
|
|
2764
|
-
if (!
|
|
2765
|
+
const W = ee.current;
|
|
2766
|
+
if (!W) return;
|
|
2765
2767
|
const w = (R) => {
|
|
2766
|
-
const G = R.target, H = G == null ? void 0 : G.closest("a[href]"),
|
|
2767
|
-
if (!
|
|
2768
|
-
const U = H == null ? void 0 : H.closest("[data-message-id]"),
|
|
2769
|
-
A(
|
|
2768
|
+
const G = R.target, H = G == null ? void 0 : G.closest("a[href]"), Y = H == null ? void 0 : H.getAttribute("href");
|
|
2769
|
+
if (!Y) return;
|
|
2770
|
+
const U = H == null ? void 0 : H.closest("[data-message-id]"), q = U == null ? void 0 : U.getAttribute("data-message-id"), Z = q ? e.state.messages.find((re) => re.id === q) : void 0;
|
|
2771
|
+
A(Y, Z);
|
|
2770
2772
|
};
|
|
2771
|
-
return
|
|
2773
|
+
return W.addEventListener("click", w), () => W.removeEventListener("click", w);
|
|
2772
2774
|
}, [A, e]), /* @__PURE__ */ n(
|
|
2773
2775
|
"div",
|
|
2774
2776
|
{
|
|
@@ -2877,8 +2879,8 @@ const Oi = ({
|
|
|
2877
2879
|
refreshConnection: y,
|
|
2878
2880
|
service: A,
|
|
2879
2881
|
debug: I
|
|
2880
|
-
} = js(), [C, S] = $(null), [O, F] = $(null), [B, J] = $(!1), { showDeleteConversation: ee = !0 } = e,
|
|
2881
|
-
|
|
2882
|
+
} = js(), [C, S] = $(null), [O, F] = $(null), [B, J] = $(!1), { showDeleteConversation: ee = !0 } = e, W = V(l);
|
|
2883
|
+
W.current = l;
|
|
2882
2884
|
const w = V(a);
|
|
2883
2885
|
w.current = a;
|
|
2884
2886
|
const R = V(null), G = V(null);
|
|
@@ -2888,11 +2890,11 @@ const Oi = ({
|
|
|
2888
2890
|
if (!L || !D) return;
|
|
2889
2891
|
const U = L.userID;
|
|
2890
2892
|
if (!U) return;
|
|
2891
|
-
const
|
|
2892
|
-
if (R.current ===
|
|
2893
|
-
R.current =
|
|
2893
|
+
const q = `${U}::${i}`;
|
|
2894
|
+
if (R.current === q) return;
|
|
2895
|
+
R.current = q;
|
|
2894
2896
|
const Z = () => {
|
|
2895
|
-
R.current ===
|
|
2897
|
+
R.current === q && (R.current = null);
|
|
2896
2898
|
};
|
|
2897
2899
|
(async () => {
|
|
2898
2900
|
var ge, pe;
|
|
@@ -2916,7 +2918,7 @@ const Oi = ({
|
|
|
2916
2918
|
);
|
|
2917
2919
|
return;
|
|
2918
2920
|
}
|
|
2919
|
-
const te =
|
|
2921
|
+
const te = W.current;
|
|
2920
2922
|
if (!te || !A) {
|
|
2921
2923
|
Z(), F("No conversation found with this account"), I && console.log(
|
|
2922
2924
|
"[MessagingShell] No conversation found for:",
|
|
@@ -2950,7 +2952,7 @@ const Oi = ({
|
|
|
2950
2952
|
}, [i, L, D, A, I]);
|
|
2951
2953
|
const H = V(r);
|
|
2952
2954
|
H.current = r;
|
|
2953
|
-
const
|
|
2955
|
+
const Y = K(() => {
|
|
2954
2956
|
var U;
|
|
2955
2957
|
S(null), J(!0), (U = H.current) == null || U.call(H);
|
|
2956
2958
|
}, []);
|
|
@@ -2967,8 +2969,8 @@ const Oi = ({
|
|
|
2967
2969
|
renderMessageInputActions: t,
|
|
2968
2970
|
renderConversationFooter: s,
|
|
2969
2971
|
renderChannelBanner: _,
|
|
2970
|
-
onLeaveConversation:
|
|
2971
|
-
onBlockParticipant:
|
|
2972
|
+
onLeaveConversation: Y,
|
|
2973
|
+
onBlockParticipant: Y,
|
|
2972
2974
|
CustomChannelEmptyState: o,
|
|
2973
2975
|
showDeleteConversation: ee,
|
|
2974
2976
|
onBlockParticipantClick: d,
|
|
@@ -4874,4 +4876,4 @@ export {
|
|
|
4874
4876
|
ot as y,
|
|
4875
4877
|
st as z
|
|
4876
4878
|
};
|
|
4877
|
-
//# sourceMappingURL=index-
|
|
4879
|
+
//# sourceMappingURL=index-CxGOKFnx.js.map
|