@linktr.ee/messaging-react 3.24.1 → 3.24.2-rc-1785436624

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-BwfUbPpY.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.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;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.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-F3RRurYR.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.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;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.useMessageVote=e.useMessageVote;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 o, d as n, e as m, F as r, f as g, L as l, h as M, M as c, i as u, j as L, k as h, l as p, m as d, n as v, p as C, q as A, s as k, t as F, u as b, v as P, w as f, x, o as y, y as z, z as B, B as S, D as q, E as D, G as E, H as V, I as w } from "./index-Daw6ObfN.js";
1
+ import { a as e, b as t, C as i, c as o, d as n, e as m, F as r, f as g, L as l, h as M, M as c, i as u, j as L, k as h, l as p, m as d, n as v, p as C, q as A, s as k, t as F, u as b, v as P, w as f, x, o as y, y as z, z as B, B as S, D as q, E as D, G as E, H as V, I as w } from "./index-BlHbSVwK.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": "3.24.1",
3
+ "version": "3.24.2-rc-1785436624",
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
  },
51
51
  "dependencies": {
52
52
  "@linktr.ee/component-library": "11.8.6",
53
- "@linktr.ee/messaging-core": "^2.2.0",
53
+ "@linktr.ee/messaging-core": "2.3.0-rc-1785436624",
54
54
  "@linktr.ee/messaging-taxonomy": "^0.3.0",
55
55
  "@phosphor-icons/react": "^2.1.10"
56
56
  },
@@ -138,12 +138,24 @@ describe('LinkAttachment accent chin (MES-1349)', () => {
138
138
  })
139
139
  })
140
140
 
141
- it('leaves the variant fill in place when no accent is given', async () => {
141
+ it('falls back to a self-contained fill, not a consumer theme token', async () => {
142
142
  renderWithProviders(<LinkAttachment.Sent {...CARD_PROPS} />)
143
143
  const root = await screen.findByRole('link')
144
144
  expect(root.style.backgroundColor).toBe('')
145
- expect(root.className).toContain('bg-shade')
146
145
  expect(screen.getByText(CARD_PROPS.title).style.color).toBe('')
146
+
147
+ // The fill has to survive in consumers that do not share our Tailwind
148
+ // theme. This package ships no utilities, so consumers generate our classes
149
+ // against their own preset: `bg-shade` compiled here but was dropped in
150
+ // frontyard (Arbor preset, no `shade` colour), leaving the chin transparent
151
+ // under the own-message `color: white` (MES-1388). An arbitrary value is
152
+ // generated from the class name alone, so assert that shape — not the
153
+ // literal colour, which design may change.
154
+ const fill = root.className
155
+ .split(/\s+/)
156
+ .find((c) => c.startsWith('bg-') && c !== 'bg-white')
157
+ expect(fill).toBeDefined()
158
+ expect(fill).toMatch(/^bg-\[/)
147
159
  })
148
160
 
149
161
  it('treats an unparseable accent as no accent', async () => {
@@ -244,7 +256,9 @@ describe('LinkAttachment accent chin (MES-1349)', () => {
244
256
  )
245
257
  const root = await screen.findByRole('link')
246
258
  expect(root.style.backgroundColor).toBe('')
247
- expect(root.className).toContain('bg-shade')
259
+ // Variant fill, asserted by shape not literal — see the self-contained-fill
260
+ // test above for why this must stay an arbitrary value (MES-1388).
261
+ expect(root.className).toMatch(/bg-\[/)
248
262
  expect(screen.getByText(CARD_PROPS.title).style.color).toBe('')
249
263
  })
250
264
 
@@ -47,7 +47,7 @@ const SECONDARY_CLASS_BY_VARIANT: Record<LinkAttachmentVariant, string> = {
47
47
  }
48
48
 
49
49
  // Skeleton bars, variant-aware for the same reason the placeholder hero is: a
50
- // fixed dark tint is invisible on the dark card's own `bg-shade` fill. Values
50
+ // fixed dark tint is invisible on the dark card's own dark fill. Values
51
51
  // match `SkeletonTextLines`, the toolkit's existing skeleton bars, which also
52
52
  // documents why these are explicit black/white rather than `bg-current/N`
53
53
  // (Tailwind emits nothing for an opacity modifier on `current`).
@@ -100,7 +100,17 @@ const CardShell: React.FC<CardShellProps> = ({
100
100
  // Kept underneath `accentStyle` rather than swapped out: the inline
101
101
  // background wins on specificity, and leaving the class in place means
102
102
  // an accent that somehow doesn't paint still lands on a sane surface.
103
- bgClassName ?? (variant === 'dark' ? 'bg-shade' : 'bg-white'),
103
+ //
104
+ // MUST be an arbitrary value, not a theme token. This package ships no
105
+ // Tailwind utilities — `dist/assets/index.css` is only the hand-written
106
+ // `.str-chat`/`.mes-*` CSS — so consumers generate our classes by scanning
107
+ // `messaging-react/dist` against *their own* theme. `shade` comes from the
108
+ // component-library preset that this package builds with; frontyard builds
109
+ // on the Arbor preset and has no such colour, so `bg-shade` was silently
110
+ // dropped, the chin rendered transparent, and the own-message `color: white`
111
+ // left the title and URL invisible (MES-1388). An arbitrary value is
112
+ // generated from the class name alone and cannot depend on consumer theme.
113
+ bgClassName ?? (variant === 'dark' ? 'bg-[#1e2330]' : 'bg-white'),
104
114
  // `focus-ring` is a design-system utility from the component-library
105
115
  // tailwind preset — outline-none + a black 2px focus-visible ring
106
116
  // with offset, so keyboard users can see the focused card.
@@ -129,7 +129,7 @@ const CardThumbnail: React.FC<CardThumbnailProps> = ({
129
129
  >
130
130
  {isLoading ? (
131
131
  // Reuses the placeholder fill: a fixed `bg-black/[0.06]` would be
132
- // invisible on the dark card's `bg-shade` surface. Stock Tailwind only
132
+ // invisible on the dark card's dark surface. Stock Tailwind only
133
133
  // — `animate-shimmer` exists in this package's own tailwind config but
134
134
  // not in either consumer's, so it would compile to nothing in
135
135
  // frontyard and profiles while looking right in this Storybook.
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  /**
17
17
  * Background each variant falls back to when no accent is paintable, as a hex.
18
- * Mirrors `CardShell`'s tailwind classes (`bg-shade` / `bg-white`) — needed
18
+ * Mirrors `CardShell`'s tailwind classes (`bg-[#1e2330]` / `bg-white`) — needed
19
19
  * separately because the bubble tail paints *outside* the shell's own box, via
20
20
  * an inline style a utility class can't reach.
21
21
  */