@linktr.ee/messaging-react 4.3.1-rc-1787556837 → 4.3.1-rc-1787558724

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-B5ueZK6v.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.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessagingLoggerProvider=e.MessagingLoggerProvider;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.RichCard=e.RichCard;exports.TipMessage=e.TipMessage;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.isTipMessage=e.isTipMessage;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.optimizeMessagingAttachmentUrl=e.optimizeMessagingAttachmentUrl;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessaging=e.useMessaging;exports.useMessagingLogger=e.useMessagingLogger;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CRi-q06D.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.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessagingLoggerProvider=e.MessagingLoggerProvider;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.RichCard=e.RichCard;exports.TipMessage=e.TipMessage;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.isTipMessage=e.isTipMessage;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.optimizeMessagingAttachmentUrl=e.optimizeMessagingAttachmentUrl;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessaging=e.useMessaging;exports.useMessagingLogger=e.useMessagingLogger;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, a as t, C as i, b as n, c as o, d as g, F as r, e as m, L as l, f as M, M as c, h as L, i as p, j as u, k as h, R as C, T as d, l as v, m as A, n as b, p as k, q as F, s as P, t as T, u as f, v as x, w as y, o as z, x as S, y as q, z as B, B as D, D as E, E as R } from "./index-CPgytAmz.js";
1
+ import { A as e, a as t, C as i, b as n, c as o, d as g, F as r, e as m, L as l, f as M, M as c, h as L, i as p, j as u, k as h, R as C, T as d, l as v, m as A, n as b, p as k, q as F, s as P, t as T, u as f, v as x, w as y, o as z, x as S, y as q, z as B, B as D, D as E, E as R } from "./index-p4ZqXlB1.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.3.1-rc-1787556837",
3
+ "version": "4.3.1-rc-1787558724",
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.5.0-rc-1787556837",
53
+ "@linktr.ee/messaging-core": "2.5.0-rc-1787558724",
54
54
  "@linktr.ee/messaging-taxonomy": "^0.10.0",
55
55
  "@phosphor-icons/react": "^2.1.10"
56
56
  },
@@ -65,25 +65,25 @@ export interface CardShellProps {
65
65
  export const LOADING_LABEL = 'Loading link preview'
66
66
 
67
67
  const SHELL_CLASS = classNames(
68
- // Width is a channel-scoped token: default 290px, but a read-only surface with no
69
- // composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
70
- // content column (see ChannelView). Consumers that don't set the var keep 290px.
71
- // `max-w-full` caps the card to its container so a widened value can never overflow
72
- // horizontally on a narrow (sub-393px) viewport — it shrinks to fit instead.
73
- 'relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden',
68
+ // Fluid width, capped by a channel-scoped token: default 395px. A read-only
69
+ // surface with no composer (the official channel) sets `--lt-msg-card-width`
70
+ // on its root (see ChannelView). `w-full` fills the content column up to that
71
+ // cap so a card never overflows a narrower viewport — it shrinks to fit.
72
+ 'relative max-w-[var(--lt-msg-card-width,395px)] w-full select-none overflow-hidden',
74
73
  // 20px corners — no token exists for it in the component-library preset,
75
74
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
76
75
  'rounded-[20px]'
77
76
  )
78
77
 
79
- // The 290x250 lock: the chin takes the height its 1-2 line title needs
78
+ // The 250px height lock: the chin takes the height its 1-2 line title needs
80
79
  // (82px at two lines, 62px at one) and the hero absorbs the remainder.
81
80
  const FIXED_HEIGHT_CLASS = 'flex h-[250px] flex-col'
82
81
 
83
82
  /**
84
- * Outer chrome for every `LinkAttachment.*` card. Matches the 290px x 250px
85
- * box, 20px corner radius, and borderless / shadowless treatment of the
86
- * composer and sent instances in Figma.
83
+ * Outer chrome for every `LinkAttachment.*` card. Matches the 395px-capped
84
+ * fluid width, 20px corner radius, and borderless / shadowless treatment of
85
+ * the composer and sent instances in Figma. Featured cards still lock to a
86
+ * 250px box.
87
87
  */
88
88
  const CardShell: React.FC<CardShellProps> = ({
89
89
  variant,
@@ -95,6 +95,13 @@ const COLLECTION: RichCardBaseProps = {
95
95
  imagePresentation: 'fan',
96
96
  actions: [secondaryLink('View collection', 'tr.ee/briesummer')],
97
97
  }
98
+ const NEWLINE_SUBTITLE: RichCardBaseProps = {
99
+ ...OFFICIAL_WELCOME,
100
+ title: 'Start every conversation with a personal welcome message!',
101
+ subtitle:
102
+ '👋 Say hello as people arrive\n✨ Spark conversations\n💬 Add automated FAQs',
103
+ subtitleLines: 6,
104
+ }
98
105
 
99
106
  const bothSides = (props: RichCardBaseProps) => (
100
107
  <>
@@ -113,7 +120,8 @@ const bothSides = (props: RichCardBaseProps) => (
113
120
  * The three real surfaces that converge on `linktree_rich_card`, each shown
114
121
  * Received (light) and Sent (dark). They differ only by knobs: the official
115
122
  * welcome card is `hero + primary`; a single-link broadcast is `hero +
116
- * secondary`; a collection is `fan + secondary`.
123
+ * secondary`; a collection is `fan + secondary`. A fourth row shows a
124
+ * newline-separated subtitle (the onboarding result-card shape).
117
125
  */
118
126
  export const Instances: StoryFn = () => (
119
127
  <Table>
@@ -131,65 +139,14 @@ export const Instances: StoryFn = () => (
131
139
  <RowLabel>Collection — fan · secondary</RowLabel>
132
140
  {bothSides(COLLECTION)}
133
141
  </tr>
134
- </tbody>
135
- </Table>
136
- )
137
- Instances.parameters = { chromatic: { disableSnapshot: false } }
138
-
139
- /* ── Onboarding result cards ─────────────────────────────────────────── */
140
-
141
- const RESULT_WELCOME: RichCardBaseProps = {
142
- title: 'Start every conversation with a personal welcome message!',
143
- subtitle:
144
- '👋 Say hello as people arrive\n✨ Spark conversations\n💬 Add automated FAQs',
145
- subtitleLines: 6,
146
- images: [IMAGE],
147
- imagePresentation: 'hero',
148
- actions: [primary('Add yours now')],
149
- }
150
- const RESULT_TIPPING: RichCardBaseProps = {
151
- title: 'Enable tipping and make money from your biggest supporters!',
152
- subtitle:
153
- '💕 Give fans a way to support\n💰 Turn support into earnings\n📈 Simple setup, lasting value',
154
- subtitleLines: 6,
155
- images: [IMAGE],
156
- imagePresentation: 'hero',
157
- actions: [primary('Enable now')],
158
- }
159
- const RESULT_SOCIAL: RichCardBaseProps = {
160
- title: 'Invite your social audience to connect with you on Linktree!',
161
- subtitle:
162
- '🎤 Share it on socials\n🤩 Invite people to message\n🎯 Point conversations to Linktree',
163
- subtitleLines: 6,
164
- images: [IMAGE],
165
- imagePresentation: 'hero',
166
- actions: [primary('Start sharing')],
167
- }
168
-
169
- /**
170
- * The three onboarding result cards from Figma — welcome, tipping, and
171
- * social audience — each shown Received (light) and Sent (dark).
172
- */
173
- export const OnboardingResultCards: StoryFn = () => (
174
- <Table>
175
- <TableHead columns={['Received (light)', 'Sent (dark)']} />
176
- <tbody>
177
142
  <tr>
178
- <RowLabel>Welcome message</RowLabel>
179
- {bothSides(RESULT_WELCOME)}
180
- </tr>
181
- <tr>
182
- <RowLabel>Tipping</RowLabel>
183
- {bothSides(RESULT_TIPPING)}
184
- </tr>
185
- <tr>
186
- <RowLabel>Social audience</RowLabel>
187
- {bothSides(RESULT_SOCIAL)}
143
+ <RowLabel>Subtitle with newlines</RowLabel>
144
+ {bothSides(NEWLINE_SUBTITLE)}
188
145
  </tr>
189
146
  </tbody>
190
147
  </Table>
191
148
  )
192
- OnboardingResultCards.parameters = { chromatic: { disableSnapshot: false } }
149
+ Instances.parameters = { chromatic: { disableSnapshot: false } }
193
150
 
194
151
  /* ── Image presentation — hero / fan / count default ─────────────────── */
195
152
 
package/src/styles.css CHANGED
@@ -407,7 +407,8 @@
407
407
  (MES-1278). Scoped to messages with a single `.str-chat__message-bubble`
408
408
  that carries `.str-chat__message-text` — other media still use fixed
409
409
  widths and need to go fluid before the same spacing can apply generally. */
410
- &:has(.str-chat__message-bubble:only-child .str-chat__message-text) {
410
+ &:has(.str-chat__message-bubble:only-child .str-chat__message-text),
411
+ &:has(.messaging-link-card) {
411
412
  padding-inline-end: calc(100% / 6);
412
413
  }
413
414
  }