@linktr.ee/messaging-react 3.24.2-rc-1785435591 → 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/{Card-Cgn2G-VJ.js → Card-BI3bA2Cj.js} +2 -2
- package/dist/{Card-Cgn2G-VJ.js.map → Card-BI3bA2Cj.js.map} +1 -1
- package/dist/{Card-CRhkz5Jp.cjs → Card-iXdD3NF2.cjs} +2 -2
- package/dist/{Card-CRhkz5Jp.cjs.map → Card-iXdD3NF2.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-Daw6ObfN.js → index-BlHbSVwK.js} +14 -4
- package/dist/index-BlHbSVwK.js.map +1 -0
- package/dist/{index-BwfUbPpY.cjs → index-F3RRurYR.cjs} +2 -2
- package/dist/index-F3RRurYR.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/LinkAttachment/LinkAttachment.test.tsx +17 -3
- package/src/components/LinkAttachment/components/_shared/CardBody.tsx +1 -1
- package/src/components/LinkAttachment/components/_shared/CardShell.tsx +11 -1
- package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +1 -1
- package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +1 -1
- package/src/styles.css +8 -41
- package/dist/index-BwfUbPpY.cjs.map +0 -1
- package/dist/index-Daw6ObfN.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
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-
|
|
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.2-rc-
|
|
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.3.0-rc-
|
|
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('
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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-
|
|
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
|
*/
|
package/src/styles.css
CHANGED
|
@@ -485,27 +485,9 @@
|
|
|
485
485
|
background-color: transparent;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
/* `str-chat__message-attachment--card` is emitted only by stream-chat-react's
|
|
489
|
-
default `Attachment` — no toolkit component renders that class. It is reached
|
|
490
|
-
when a message falls through `canRenderAttachmentsInToolkit`
|
|
491
|
-
(`CustomMessage/index.tsx`), which happens whenever ANY attachment on the
|
|
492
|
-
message fails classification: `buildOrderedAttachmentSegments` silently
|
|
493
|
-
`continue`s past it, `allAttachmentsRepresented` goes false, and the whole
|
|
494
|
-
message loses the toolkit's chrome.
|
|
495
|
-
|
|
496
|
-
The `color: white` below has been here since "Theme Stream chat UI" (#185) and
|
|
497
|
-
assumes an opaque dark card. Stream paints no background on the card content,
|
|
498
|
-
so on an own message the title and URL landed white on the `#FBFAF9` messaging
|
|
499
|
-
surface — measured ~1.02:1, effectively invisible (MES-1388).
|
|
500
|
-
|
|
501
|
-
Paint the same shade the designed link chin falls back to
|
|
502
|
-
(`CHIN_FALLBACK_BG` in `LinkAttachment/.../chinContrast.ts`), so the assumption
|
|
503
|
-
the white text makes is actually true. This is a floor, not the fix for why a
|
|
504
|
-
given attachment fails classification — see the note in MES-1388. */
|
|
505
488
|
.str-chat__message.str-chat__message--me {
|
|
506
489
|
.str-chat__attachment-list .str-chat__message-attachment--card {
|
|
507
490
|
color: white;
|
|
508
|
-
background-color: var(--brand-shade, #1e2330);
|
|
509
491
|
}
|
|
510
492
|
}
|
|
511
493
|
|
|
@@ -683,9 +665,7 @@
|
|
|
683
665
|
line-height: 1.4;
|
|
684
666
|
color: var(--str-chat__text-low-emphasis-color, rgba(0, 0, 0, 0.5));
|
|
685
667
|
}
|
|
686
|
-
.str-chat__li
|
|
687
|
-
.str-chat__message--me
|
|
688
|
-
.sent-message-status-row
|
|
668
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
689
669
|
.str-chat__message-status {
|
|
690
670
|
grid-area: auto;
|
|
691
671
|
justify-content: inherit;
|
|
@@ -714,9 +694,7 @@
|
|
|
714
694
|
.str-chat__li .str-chat__message--me .sent-message-status-row svg path {
|
|
715
695
|
fill: currentColor;
|
|
716
696
|
}
|
|
717
|
-
.str-chat__li
|
|
718
|
-
.str-chat__message--me
|
|
719
|
-
.sent-message-status-row
|
|
697
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
720
698
|
.sent-message-broadcast-badge {
|
|
721
699
|
display: inline-flex;
|
|
722
700
|
width: 16px;
|
|
@@ -728,31 +706,20 @@
|
|
|
728
706
|
background: var(--sent-message-broadcast-badge-color);
|
|
729
707
|
color: #fff;
|
|
730
708
|
}
|
|
731
|
-
.str-chat__li
|
|
732
|
-
.
|
|
733
|
-
.sent-message-status-row
|
|
734
|
-
.sent-message-broadcast-badge
|
|
735
|
-
svg {
|
|
709
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
710
|
+
.sent-message-broadcast-badge svg {
|
|
736
711
|
width: 10px;
|
|
737
712
|
height: 10px;
|
|
738
713
|
}
|
|
739
|
-
.str-chat__li
|
|
740
|
-
.
|
|
741
|
-
.sent-message-status-row
|
|
742
|
-
.sent-message-broadcast-badge
|
|
743
|
-
svg
|
|
744
|
-
path {
|
|
714
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
715
|
+
.sent-message-broadcast-badge svg path {
|
|
745
716
|
fill: currentColor;
|
|
746
717
|
}
|
|
747
|
-
.str-chat__li
|
|
748
|
-
.str-chat__message--me
|
|
749
|
-
.sent-message-status-row
|
|
718
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
750
719
|
.sent-message-broadcast-name {
|
|
751
720
|
color: var(--sent-message-broadcast-name-color);
|
|
752
721
|
}
|
|
753
|
-
.str-chat__li
|
|
754
|
-
.str-chat__message--me
|
|
755
|
-
.sent-message-status-row
|
|
722
|
+
.str-chat__li .str-chat__message--me .sent-message-status-row
|
|
756
723
|
.sent-message-broadcast-link
|
|
757
724
|
.sent-message-broadcast-name {
|
|
758
725
|
text-decoration: underline;
|