@linktr.ee/messaging-react 3.5.6-rc-1783100793 → 3.5.6

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 (40) hide show
  1. package/dist/{Card-XSDNvOZf.js → Card-B5lE5A2D.js} +3 -3
  2. package/dist/{Card-XSDNvOZf.js.map → Card-B5lE5A2D.js.map} +1 -1
  3. package/dist/{Card-Bxu71IQM.cjs → Card-CAJnEq1K.cjs} +2 -2
  4. package/dist/{Card-Bxu71IQM.cjs.map → Card-CAJnEq1K.cjs.map} +1 -1
  5. package/dist/{Card-4eHS-HQB.cjs → Card-DYe76Xh3.cjs} +2 -2
  6. package/dist/{Card-4eHS-HQB.cjs.map → Card-DYe76Xh3.cjs.map} +1 -1
  7. package/dist/{Card-By-eDX0U.cjs → Card-D_N5hclc.cjs} +2 -2
  8. package/dist/{Card-By-eDX0U.cjs.map → Card-D_N5hclc.cjs.map} +1 -1
  9. package/dist/{Card-mDB7sZiu.js → Card-MBp3Wg6r.js} +2 -2
  10. package/dist/{Card-mDB7sZiu.js.map → Card-MBp3Wg6r.js.map} +1 -1
  11. package/dist/{Card-CmLNgIdO.js → Card-rblNjC58.js} +2 -2
  12. package/dist/{Card-CmLNgIdO.js.map → Card-rblNjC58.js.map} +1 -1
  13. package/dist/{LockedThumbnail-C44Wkle9.js → LockedThumbnail-BqyPPVrO.js} +3 -3
  14. package/dist/{LockedThumbnail-C44Wkle9.js.map → LockedThumbnail-BqyPPVrO.js.map} +1 -1
  15. package/dist/{LockedThumbnail-CWhzO3wx.cjs → LockedThumbnail-C7PpVZQ0.cjs} +2 -2
  16. package/dist/{LockedThumbnail-CWhzO3wx.cjs.map → LockedThumbnail-C7PpVZQ0.cjs.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-BRV621wo.js → index-BXzwYXLT.js} +67 -55
  19. package/dist/index-BXzwYXLT.js.map +1 -0
  20. package/dist/index-BflWZq0e.cjs +2 -0
  21. package/dist/index-BflWZq0e.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/AttachmentCard/index.tsx +1 -1
  26. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +1 -1
  27. package/src/components/CustomLinkPreviewList/index.tsx +12 -6
  28. package/src/components/CustomMessage/CustomMessage.stories.tsx +0 -27
  29. package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +2 -2
  30. package/src/components/CustomMessage/MessageTag.stories.tsx +2 -2
  31. package/src/components/CustomMessageInput/index.tsx +12 -4
  32. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +1 -1
  33. package/src/components/LockedAttachment/components/_shared/LockedCardShell.tsx +1 -1
  34. package/src/components/MediaMessage/index.tsx +1 -8
  35. package/src/components/MessageAttachment/_shared/Bubble.tsx +7 -7
  36. package/src/components/MessageAttachment/_shared/CompactDocumentRow.tsx +3 -3
  37. package/src/styles.css +6 -75
  38. package/dist/index-BRV621wo.js.map +0 -1
  39. package/dist/index-DBVgTHrA.cjs +0 -2
  40. package/dist/index-DBVgTHrA.cjs.map +0 -1
@@ -645,7 +645,7 @@ function en({
645
645
  const s = e == null ? void 0 : e.text, a = Js(t);
646
646
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
647
647
  }
648
- const Zs = $.lazy(() => import("./Card-CmLNgIdO.js")), Qs = $.lazy(() => import("./Card-mDB7sZiu.js")), ea = $.lazy(() => import("./Card-XSDNvOZf.js")), Qe = () => /* @__PURE__ */ n(
648
+ const Zs = $.lazy(() => import("./Card-rblNjC58.js")), Qs = $.lazy(() => import("./Card-MBp3Wg6r.js")), ea = $.lazy(() => import("./Card-B5lE5A2D.js")), Qe = () => /* @__PURE__ */ n(
649
649
  "div",
650
650
  {
651
651
  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)]",
@@ -1046,7 +1046,7 @@ const la = (e) => {
1046
1046
  "data-testid": m,
1047
1047
  className: C(
1048
1048
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1049
- f ? "bg-[#1e2330]" : "bg-white"
1049
+ f ? "bg-[#121110]" : "bg-white"
1050
1050
  ),
1051
1051
  children: [
1052
1052
  d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
@@ -1094,7 +1094,7 @@ function on(e) {
1094
1094
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1095
1095
  }
1096
1096
  function et(e) {
1097
- return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1097
+ return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1098
1098
  }
1099
1099
  function ua(e) {
1100
1100
  return e ? "bg-white/10" : "bg-black/5";
@@ -1283,7 +1283,6 @@ const cn = ({
1283
1283
  "div",
1284
1284
  {
1285
1285
  className: "str-chat__message-bubble",
1286
- "data-attachment-bubble": "true",
1287
1286
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1288
1287
  children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(cn, { ...a }) : /* @__PURE__ */ n(dn, { ...a })
1289
1288
  }
@@ -1700,7 +1699,7 @@ const Ca = ({ size: e = 15 }) => /* @__PURE__ */ n(
1700
1699
  href: s,
1701
1700
  target: "_blank",
1702
1701
  rel: "noopener noreferrer",
1703
- className: "relative block w-full rounded-[24px] bg-[#1e2330] p-2 no-underline transition-opacity hover:opacity-90",
1702
+ className: "relative block w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90",
1704
1703
  children: [
1705
1704
  r && /* @__PURE__ */ n(
1706
1705
  "img",
@@ -1740,14 +1739,17 @@ const Ca = ({ size: e = 15 }) => /* @__PURE__ */ n(
1740
1739
  ), s = (r) => {
1741
1740
  e.dismissPreview(r);
1742
1741
  };
1743
- return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1744
- Oa,
1745
- {
1746
- link: r,
1747
- onDismiss: s
1748
- },
1749
- r.og_scrape_url
1750
- )) }) : null;
1742
+ return t.length > 0 ? (
1743
+ // Layout contract: this list is the composer's *shrinkable* region. The
1744
+ // mobile visitor surface sizes itself to the keyboard-shrunk
1745
+ // visualViewport, so when vertical space runs out this container gives
1746
+ // way (min-h-0) and scrolls, while the textarea + send row stays visible
1747
+ // (shrink-0 in CustomMessageInput). Each card is wrapped in a shrink-0
1748
+ // block so it keeps its intrinsic height and the container scrolls — a
1749
+ // bare flex-column child would be shrunk on the column axis and its
1750
+ // fixed-height hero would spill out of the collapsed card box.
1751
+ /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ n("div", { className: "w-full shrink-0", children: /* @__PURE__ */ n(Oa, { link: r, onDismiss: s }) }, r.og_scrape_url)) })
1752
+ ) : null;
1751
1753
  }, at = $.createContext(!1), Ai = () => ye(at), $a = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1752
1754
  "button",
1753
1755
  {
@@ -1763,41 +1765,51 @@ const Ca = ({ size: e = 15 }) => /* @__PURE__ */ n(
1763
1765
  SendButton: r = $a,
1764
1766
  AttachmentPreviewList: i = as
1765
1767
  } = Ht("CustomMessageInput");
1766
- return /* @__PURE__ */ h(
1767
- "div",
1768
- {
1769
- className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
1770
- "data-dd-privacy": "mask",
1771
- children: [
1772
- /* @__PURE__ */ n(rs, {}),
1773
- /* @__PURE__ */ n(Fa, {}),
1774
- /* @__PURE__ */ n(i, {}),
1775
- /* @__PURE__ */ h("div", { className: "flex", children: [
1776
- /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1777
- is,
1778
- {
1779
- "aria-disabled": e || void 0,
1780
- className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
1781
- autoFocus: !e,
1782
- maxRows: 4,
1783
- readOnly: e,
1784
- tabIndex: e ? -1 : void 0
1785
- }
1786
- ) }),
1787
- /* @__PURE__ */ n(
1788
- r,
1789
- {
1790
- sendMessage: t,
1791
- "aria-label": "Send",
1792
- className: "str-chat__send-button mt-auto flex justify-center items-center flex-shrink-0 rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring",
1793
- "data-testid": "send-button",
1794
- disabled: a,
1795
- type: "button"
1796
- }
1797
- )
1798
- ] })
1799
- ]
1800
- }
1768
+ return (
1769
+ // min-h-0 lets the composer shrink under keyboard squeeze (the link
1770
+ // preview list inside is the scrollable region); the textarea + send row
1771
+ // is shrink-0 so it can never be pushed out of view. self-stretch matters
1772
+ // because the parent `.message-input` row uses items-end, which suppresses
1773
+ // the default cross-axis stretch — without it this container keeps its
1774
+ // content height and the squeeze never reaches the preview list. Stream's
1775
+ // <MessageInput> renders its Input directly (context providers only, no
1776
+ // wrapper element), so this is a direct flex item of that row.
1777
+ /* @__PURE__ */ h(
1778
+ "div",
1779
+ {
1780
+ className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
1781
+ "data-dd-privacy": "mask",
1782
+ children: [
1783
+ /* @__PURE__ */ n(rs, {}),
1784
+ /* @__PURE__ */ n(Fa, {}),
1785
+ /* @__PURE__ */ n(i, {}),
1786
+ /* @__PURE__ */ h("div", { className: "flex shrink-0", children: [
1787
+ /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1788
+ is,
1789
+ {
1790
+ "aria-disabled": e || void 0,
1791
+ className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
1792
+ autoFocus: !e,
1793
+ maxRows: 4,
1794
+ readOnly: e,
1795
+ tabIndex: e ? -1 : void 0
1796
+ }
1797
+ ) }),
1798
+ /* @__PURE__ */ n(
1799
+ r,
1800
+ {
1801
+ sendMessage: t,
1802
+ "aria-label": "Send",
1803
+ className: "str-chat__send-button mt-auto flex justify-center items-center flex-shrink-0 rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring",
1804
+ "data-testid": "send-button",
1805
+ disabled: a,
1806
+ type: "button"
1807
+ }
1808
+ )
1809
+ ] })
1810
+ ]
1811
+ }
1812
+ )
1801
1813
  );
1802
1814
  }, ja = ({
1803
1815
  renderActions: e,
@@ -1811,13 +1823,13 @@ const Ca = ({ size: e = 15 }) => /* @__PURE__ */ n(
1811
1823
  return s ? /* @__PURE__ */ h(se, { children: [
1812
1824
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1813
1825
  t == null ? void 0 : t()
1814
- ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
1826
+ ] }) : /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
1815
1827
  /* @__PURE__ */ h(
1816
1828
  "div",
1817
1829
  {
1818
1830
  inert: o ? "" : void 0,
1819
1831
  "aria-disabled": o || void 0,
1820
- className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1832
+ className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
1821
1833
  children: [
1822
1834
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1823
1835
  /* @__PURE__ */ n(at.Provider, { value: o, children: /* @__PURE__ */ n(ts, { Input: r ?? Ba }) })
@@ -3113,7 +3125,7 @@ const hr = {
3113
3125
  }) => {
3114
3126
  const u = s != null || a != null, g = C(
3115
3127
  vr,
3116
- l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
3128
+ l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3117
3129
  // `focus-ring` is a design-system utility from the component-library
3118
3130
  // tailwind preset — outline-none + a black 2px focus-visible ring
3119
3131
  // with offset, so keyboard users can see the focused card.
@@ -3416,11 +3428,11 @@ const hr = {
3416
3428
  Sent: yr,
3417
3429
  Received: _r
3418
3430
  }, Cr = {
3419
- dark: "bg-[#1e2330]",
3420
- light: "bg-[#f2f1ef]"
3431
+ dark: "bg-[#121110]",
3432
+ light: "bg-[#e9eaed]"
3421
3433
  }, kr = {
3422
3434
  dark: "text-white",
3423
- light: "text-[#000000]"
3435
+ light: "text-[#080707]"
3424
3436
  }, Er = {
3425
3437
  dark: "border-white/[0.08]",
3426
3438
  light: "border-black/[0.08]"
@@ -4672,4 +4684,4 @@ export {
4672
4684
  st as y,
4673
4685
  Zt as z
4674
4686
  };
4675
- //# sourceMappingURL=index-BRV621wo.js.map
4687
+ //# sourceMappingURL=index-BXzwYXLT.js.map