@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.
Files changed (30) hide show
  1. package/dist/{Card-BQJP7Y9f.cjs → Card-6FOd4_j_.cjs} +2 -2
  2. package/dist/{Card-BQJP7Y9f.cjs.map → Card-6FOd4_j_.cjs.map} +1 -1
  3. package/dist/{Card-D2A5fCuk.cjs → Card-BhIG7T7c.cjs} +2 -2
  4. package/dist/{Card-D2A5fCuk.cjs.map → Card-BhIG7T7c.cjs.map} +1 -1
  5. package/dist/{Card-CK_XUFsc.cjs → Card-CA63InbA.cjs} +2 -2
  6. package/dist/{Card-CK_XUFsc.cjs.map → Card-CA63InbA.cjs.map} +1 -1
  7. package/dist/{Card-wg-7Dyut.js → Card-C_TfROjB.js} +3 -3
  8. package/dist/{Card-wg-7Dyut.js.map → Card-C_TfROjB.js.map} +1 -1
  9. package/dist/{Card-6zV3sFbU.js → Card-DN8P8IeT.js} +2 -2
  10. package/dist/{Card-6zV3sFbU.js.map → Card-DN8P8IeT.js.map} +1 -1
  11. package/dist/{Card-CAalQRJs.js → Card-DgWCIgWw.js} +2 -2
  12. package/dist/{Card-CAalQRJs.js.map → Card-DgWCIgWw.js.map} +1 -1
  13. package/dist/{LockedThumbnail-CeTZqbzd.js → LockedThumbnail-DNy4CoCm.js} +2 -2
  14. package/dist/{LockedThumbnail-CeTZqbzd.js.map → LockedThumbnail-DNy4CoCm.js.map} +1 -1
  15. package/dist/{LockedThumbnail-DxwKL4A1.cjs → LockedThumbnail-DPlNLdpK.cjs} +2 -2
  16. package/dist/{LockedThumbnail-DxwKL4A1.cjs.map → LockedThumbnail-DPlNLdpK.cjs.map} +1 -1
  17. package/dist/index-ClREqfMm.cjs +2 -0
  18. package/dist/index-ClREqfMm.cjs.map +1 -0
  19. package/dist/{index-gnuITMC7.js → index-CxGOKFnx.js} +53 -51
  20. package/dist/index-CxGOKFnx.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelHeaderRedesign.tsx +26 -26
  25. package/src/components/ChannelView.stories.tsx +0 -115
  26. package/src/components/ChannelView.test.tsx +24 -1
  27. package/src/components/ChannelView.tsx +5 -3
  28. package/dist/index-DYBHXWJX.cjs +0 -2
  29. package/dist/index-DYBHXWJX.cjs.map +0 -1
  30. 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-colors duration-150 group-hover:bg-white/80", children: [
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-CAalQRJs.js")), ia = j.lazy(() => import("./Card-6zV3sFbU.js")), la = j.lazy(() => import("./Card-wg-7Dyut.js")), at = () => /* @__PURE__ */ n(
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", q = Math.round(p * 100);
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": q,
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: `${q}%` }
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": q,
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: `${q}%` }
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: `${q}%` }
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: q = Gn,
1599
+ ReminderNotification: W = Gn,
1600
1600
  StreamedMessageText: w = Hn,
1601
1601
  PinIndicator: R
1602
- } = Wt("CustomMessage"), G = Yn(c), H = qn(c), W = ie(
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]), Y = ie(() => {
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(q, { reminder: P }),
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: Y,
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
- W ? /* @__PURE__ */ n(
1755
+ Y ? /* @__PURE__ */ n(
1756
1756
  w,
1757
1757
  {
1758
- message: Y,
1758
+ message: q,
1759
1759
  renderText: v
1760
1760
  }
1761
1761
  ) : /* @__PURE__ */ n(
1762
1762
  jt,
1763
1763
  {
1764
- message: Y,
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 W;
2583
+ var Y;
2584
2584
  return Oe(
2585
- (W = y.state) == null ? void 0 : W.members,
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 Y;
2593
- const W = A == null ? void 0 : A.userID;
2594
- return W ? Object.values(((Y = y.state) == null ? void 0 : Y.members) || {}).find((Z) => {
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) === W;
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.length > 0, J = p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null, ee = P ? /* @__PURE__ */ n(
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, q = K(
2619
- (W) => {
2620
- const { message: U } = Ce("ChannelView"), Y = /* @__PURE__ */ n(
2620
+ ) : null, W = K(
2621
+ (Y) => {
2622
+ const { message: U } = Ce("ChannelView"), q = /* @__PURE__ */ n(
2621
2623
  $a,
2622
2624
  {
2623
- ...W,
2625
+ ...Y,
2624
2626
  chatbotVotingEnabled: b,
2625
2627
  viewerLanguage: L
2626
2628
  }
2627
2629
  );
2628
- return !T || !U ? Y : T(Y, 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: q,
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 (q, w, R) => {
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, W = {
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
- }, Y = await e.sendMessage(W, U);
2757
- return E == null || E(Y), Y;
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 q = ee.current;
2764
- if (!q) return;
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]"), W = H == null ? void 0 : H.getAttribute("href");
2767
- if (!W) return;
2768
- const U = H == null ? void 0 : H.closest("[data-message-id]"), Y = U == null ? void 0 : U.getAttribute("data-message-id"), Z = Y ? e.state.messages.find((re) => re.id === Y) : void 0;
2769
- A(W, Z);
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 q.addEventListener("click", w), () => q.removeEventListener("click", w);
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, q = V(l);
2881
- q.current = l;
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 Y = `${U}::${i}`;
2892
- if (R.current === Y) return;
2893
- R.current = Y;
2893
+ const q = `${U}::${i}`;
2894
+ if (R.current === q) return;
2895
+ R.current = q;
2894
2896
  const Z = () => {
2895
- R.current === Y && (R.current = null);
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 = q.current;
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 W = K(() => {
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: W,
2971
- onBlockParticipant: W,
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-gnuITMC7.js.map
4879
+ //# sourceMappingURL=index-CxGOKFnx.js.map