@linktr.ee/messaging-react 4.0.4 → 4.0.5-rc-1786668438
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-D4cboQ2t.js → Card-Cz3Fo1iE.js} +2 -2
- package/dist/{Card-D4cboQ2t.js.map → Card-Cz3Fo1iE.js.map} +1 -1
- package/dist/{Card-BPJPoGox.cjs → Card-uGmLM0E4.cjs} +2 -2
- package/dist/{Card-BPJPoGox.cjs.map → Card-uGmLM0E4.cjs.map} +1 -1
- package/dist/{index-DeWGN1T5.js → index-ovl_maz6.js} +4 -3
- package/dist/{index-DeWGN1T5.js.map → index-ovl_maz6.js.map} +1 -1
- package/dist/{index-BOlJ4EAE.cjs → index-yIf41dLU.cjs} +2 -2
- package/dist/{index-BOlJ4EAE.cjs.map → index-yIf41dLU.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/RichCard/RichCard.test.tsx +15 -0
- package/src/components/RichCard/RichCardBody.tsx +2 -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-yIf41dLU.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-
|
|
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-ovl_maz6.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.
|
|
3
|
+
"version": "4.0.5-rc-1786668438",
|
|
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": "
|
|
53
|
+
"@linktr.ee/messaging-core": "2.4.0-rc-1786668438",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.10.0",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10"
|
|
56
56
|
},
|
|
@@ -25,6 +25,21 @@ describe('RichCard', () => {
|
|
|
25
25
|
).toBeInTheDocument()
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
+
it('renders multiline bullet copy as separate lines', async () => {
|
|
29
|
+
renderWithProviders(
|
|
30
|
+
<RichCard.Received
|
|
31
|
+
title="Welcome"
|
|
32
|
+
subtitle={'👋 Say hello as people arrive\n✨ Spark conversations\n💬 Add automated FAQs'}
|
|
33
|
+
images={[HERO]}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
const card = await screen.findByTestId('rich-card')
|
|
38
|
+
expect(card).toHaveTextContent('👋 Say hello as people arrive')
|
|
39
|
+
expect(card).toHaveTextContent('✨ Spark conversations')
|
|
40
|
+
expect(card).toHaveTextContent('💬 Add automated FAQs')
|
|
41
|
+
})
|
|
42
|
+
|
|
28
43
|
it('renders a single hero image for the hero presentation', async () => {
|
|
29
44
|
renderWithProviders(
|
|
30
45
|
<RichCard.Received
|
|
@@ -83,7 +83,7 @@ const RichCardBody: React.FC<RichCardBodyProps> = ({
|
|
|
83
83
|
chinTextColor,
|
|
84
84
|
title,
|
|
85
85
|
subtitle,
|
|
86
|
-
subtitleLines =
|
|
86
|
+
subtitleLines = 6,
|
|
87
87
|
appIcon,
|
|
88
88
|
actions,
|
|
89
89
|
}) => {
|
|
@@ -128,6 +128,7 @@ const RichCardBody: React.FC<RichCardBodyProps> = ({
|
|
|
128
128
|
<p
|
|
129
129
|
className={classNames(
|
|
130
130
|
SUBTITLE_CLASS,
|
|
131
|
+
subtitleLines > 1 && 'whitespace-pre-line',
|
|
131
132
|
subtitleLines <= 1 && 'truncate'
|
|
132
133
|
)}
|
|
133
134
|
style={subtitleStyle}
|