@linktr.ee/messaging-react 4.0.0 → 4.0.1-rc-1786428994

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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B0CZqFER.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.RichCard=e.RichCard;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.optimizeMessagingAttachmentUrl=e.optimizeMessagingAttachmentUrl;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessaging=e.useMessaging;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-JMYJWHTI.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.RichCard=e.RichCard;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.optimizeMessagingAttachmentUrl=e.optimizeMessagingAttachmentUrl;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessaging=e.useMessaging;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, b as t, C as i, c as n, d as o, e as m, F as r, f as l, L as g, h as c, M, i as h, j as L, k as u, l as d, R as p, m as C, n as v, p as A, q as k, s as F, t as b, u as P, v as f, w as x, o as y, x as z, y as S, z as q, B, D, E, G as R } from "./index-Dyxu8r07.js";
1
+ import { a as e, b as t, C as i, c as n, d as o, e as m, F as r, f as l, L as g, h as c, M, i as h, j as L, k as u, l as d, R as p, m as C, n as v, p as A, q as k, s as F, t as b, u as P, v as f, w as x, o as y, x as z, y as S, z as q, B, D, E, G as R } from "./index-BMcKJFQs.js";
2
2
  export {
3
3
  e as ActionButton,
4
4
  t as Avatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "4.0.0",
3
+ "version": "4.0.1-rc-1786428994",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -50,7 +50,7 @@
50
50
  "chromatic:local": "yarn storybook:build && chromatic"
51
51
  },
52
52
  "dependencies": {
53
- "@linktr.ee/messaging-core": "^2.4.0",
53
+ "@linktr.ee/messaging-core": "2.4.0-rc-1786428994",
54
54
  "@linktr.ee/messaging-taxonomy": "^0.9.0",
55
55
  "@phosphor-icons/react": "^2.1.10"
56
56
  },
@@ -21,9 +21,14 @@ export interface RichCardBodyProps {
21
21
  // Mirror LinkAttachment's `CardBody` type scales so the two cards read
22
22
  // identically (14/20 medium title, 12/16 subtitle). Colour is always supplied
23
23
  // via `chinTextColor`, so no per-variant text class is needed here.
24
+ // `[text-wrap:balance]` evens the title's line lengths so a two-line title
25
+ // doesn't drop a single word onto its own line; `[text-wrap:pretty]` does the
26
+ // lighter last-line-widow fix for the longer subtitle prose. Arbitrary-property
27
+ // form so the utilities generate regardless of the consumer's Tailwind version.
24
28
  const TITLE_CLASS =
25
- 'line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]'
26
- const SUBTITLE_CLASS = 'text-[12px] leading-4 tracking-[0.24px]'
29
+ 'line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]'
30
+ const SUBTITLE_CLASS =
31
+ 'text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]'
27
32
 
28
33
  /**
29
34
  * The action footer. `layout` (chosen by the first action's `variant` in
@@ -33,10 +33,14 @@ const FAN_ROTATION: Record<1 | 2 | 3, number[]> = {
33
33
  2: [-10, 10],
34
34
  3: [-13, 0, 13],
35
35
  }
36
+ // Offsets sit a hair inside the mobile renderer's so the outer tiles' rotated
37
+ // bounding box stays within the 290px shell's `overflow-hidden` edge (a `w-62%`
38
+ // tile at ±40 + 13° rotation lands ~6px shy of the boundary, vs the old ±44
39
+ // which clipped).
36
40
  const FAN_OFFSET_PX: Record<1 | 2 | 3, number[]> = {
37
41
  1: [0],
38
- 2: [-30, 30],
39
- 3: [-44, 0, 44],
42
+ 2: [-26, 26],
43
+ 3: [-40, 0, 40],
40
44
  }
41
45
  // Paint z-order per slot so the **centre** card sits on top. Survivors render
42
46
  // left→right, so with the naive `zIndex: position` the right card overlaps the
@@ -110,14 +114,21 @@ const RichCardFan: React.FC<{
110
114
  loading="lazy"
111
115
  decoding="async"
112
116
  onError={() => setFailed((prev) => ({ ...prev, [index]: true }))}
113
- // A uniform, slightly-landscape tile (`h-74% w-66%`) with `object-cover`
114
- // so the fan stays tidy whatever the source thumbnails are (OG scrape,
115
- // upload, video frame) the tiles are decorative, so an even cover
116
- // crop reads better than per-image aspect. `rounded-[12px]` explicit,
117
- // NOT `rounded-xl` this preset's `xl` radius is 4rem, which rounds a
118
- // tile into an oval. A soft drop shadow (no border) separates the
119
- // overlapping tiles.
120
- className="absolute left-1/2 top-1/2 h-[74%] w-[66%] rounded-[12px] object-cover shadow-lg"
117
+ // A uniform, slightly-landscape tile (`w-62% aspect-[3/2]`, matching
118
+ // the mobile renderer) with `object-cover` so the fan stays tidy
119
+ // whatever the source thumbnails are (OG scrape, upload, video frame)
120
+ // — the tiles are decorative, so an even cover crop reads better than
121
+ // per-image aspect. `rounded-[12px]` explicit, NOT `rounded-xl` this
122
+ // preset's `xl` radius is 4rem, which rounds a tile into an oval.
123
+ // `bg-[#ffffff]` gives each tile an opaque holder so a transparent
124
+ // (PNG/WebP) source composites over white instead of letting the
125
+ // fan-region tint and the tiles beneath bleed through — and so the
126
+ // drop shadow reads against a solid card, not the see-through image.
127
+ // Arbitrary hex, not `bg-white`, since this package ships no Tailwind
128
+ // utilities and consumers scan `dist` against their own theme (same
129
+ // reason CardShell uses `bg-[#…]`). `shadow-md` (not `shadow-lg`)
130
+ // keeps the elevation subtle, matching mobile's `Shadow100`.
131
+ className="absolute left-1/2 top-1/2 w-[62%] aspect-[3/2] rounded-[12px] bg-[#ffffff] object-cover shadow-md"
121
132
  style={{
122
133
  transform: `translate(-50%, -50%) translateX(${offsets[position]}px) rotate(${rotations[position]}deg) scale(${scales[position]})`,
123
134
  zIndex: zorder[position],