@linktr.ee/messaging-react 3.4.3-rc-1782553325 → 3.4.3-rc-1782553894
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-9BtSxGC1.cjs → Card-BVo5bHm8.cjs} +2 -2
- package/dist/{Card-9BtSxGC1.cjs.map → Card-BVo5bHm8.cjs.map} +1 -1
- package/dist/{Card-B_tMXmN_.js → Card-COb-KQ3x.js} +2 -2
- package/dist/{Card-B_tMXmN_.js.map → Card-COb-KQ3x.js.map} +1 -1
- package/dist/{Card-Rg9QOS9o.cjs → Card-ChLOPFzW.cjs} +2 -2
- package/dist/{Card-Rg9QOS9o.cjs.map → Card-ChLOPFzW.cjs.map} +1 -1
- package/dist/{Card-CGjd8b1K.js → Card-Cj686l88.js} +2 -2
- package/dist/{Card-CGjd8b1K.js.map → Card-Cj686l88.js.map} +1 -1
- package/dist/{Card-CeiUwix2.js → Card-DAiwq638.js} +3 -3
- package/dist/{Card-CeiUwix2.js.map → Card-DAiwq638.js.map} +1 -1
- package/dist/{Card-BTPEZadJ.cjs → Card-ffFBtGq1.cjs} +2 -2
- package/dist/{Card-BTPEZadJ.cjs.map → Card-ffFBtGq1.cjs.map} +1 -1
- package/dist/{LockedThumbnail-4_S1w5SO.js → LockedThumbnail-Bmw7e0iZ.js} +2 -2
- package/dist/{LockedThumbnail-4_S1w5SO.js.map → LockedThumbnail-Bmw7e0iZ.js.map} +1 -1
- package/dist/{LockedThumbnail-BIcI8zTC.cjs → LockedThumbnail-DzTY1vH1.cjs} +2 -2
- package/dist/{LockedThumbnail-BIcI8zTC.cjs.map → LockedThumbnail-DzTY1vH1.cjs.map} +1 -1
- package/dist/index-DXBga91I.cjs +2 -0
- package/dist/index-DXBga91I.cjs.map +1 -0
- package/dist/{index-D9JJLtJg.js → index-D_U3aScH.js} +796 -772
- package/dist/index-D_U3aScH.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelView.test.tsx +8 -0
- package/src/components/ChannelView.tsx +25 -8
- package/dist/index-D9JJLtJg.js.map +0 -1
- package/dist/index-DOw3VaHR.cjs +0 -2
- package/dist/index-DOw3VaHR.cjs.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-DXBga91I.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.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.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 g, f as r, L as l, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as C, o as v, p as A, q as k, s as F, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B, E as D } from "./index-
|
|
1
|
+
import { a as e, b as t, C as i, c as o, d as n, e as m, F as g, f as r, L as l, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as C, o as v, p as A, q as k, s as F, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B, E as D } from "./index-D_U3aScH.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.4.3-rc-
|
|
3
|
+
"version": "3.4.3-rc-1782553894",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@linktr.ee/component-library": "11.8.6",
|
|
41
|
-
"@linktr.ee/messaging-core": "2.3.0-rc-
|
|
41
|
+
"@linktr.ee/messaging-core": "2.3.0-rc-1782553894",
|
|
42
42
|
"@phosphor-icons/react": "^2.1.10"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -191,6 +191,14 @@ describe('ChannelView', () => {
|
|
|
191
191
|
screen.queryByRole('button', { name: /view info for/i })
|
|
192
192
|
).not.toBeInTheDocument()
|
|
193
193
|
expect(screen.getAllByText('Linker').length).toBeGreaterThanOrEqual(1)
|
|
194
|
+
|
|
195
|
+
const avatars = screen.getAllByTestId('avatar')
|
|
196
|
+
expect(avatars.length).toBeGreaterThanOrEqual(1)
|
|
197
|
+
expect(avatars[0].parentElement).toHaveClass(
|
|
198
|
+
'rounded-[12px]',
|
|
199
|
+
'px-1',
|
|
200
|
+
'py-0.5'
|
|
201
|
+
)
|
|
194
202
|
})
|
|
195
203
|
|
|
196
204
|
it('renders the participant name as a button that fires onParticipantNameClick', () => {
|
|
@@ -97,6 +97,10 @@ const CustomChannelHeader: React.FC<{
|
|
|
97
97
|
channel,
|
|
98
98
|
participant,
|
|
99
99
|
})
|
|
100
|
+
const mobileParticipantIdentityClassName =
|
|
101
|
+
'flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90'
|
|
102
|
+
const desktopParticipantIdentityClassName =
|
|
103
|
+
'flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90'
|
|
100
104
|
const participantTitle = (
|
|
101
105
|
<>
|
|
102
106
|
<span className="min-w-0 truncate">{participantName}</span>
|
|
@@ -143,7 +147,10 @@ const CustomChannelHeader: React.FC<{
|
|
|
143
147
|
type="button"
|
|
144
148
|
onClick={onParticipantNameClick}
|
|
145
149
|
aria-label={`View details for ${participantName}`}
|
|
146
|
-
className=
|
|
150
|
+
className={classNames(
|
|
151
|
+
mobileParticipantIdentityClassName,
|
|
152
|
+
'appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none'
|
|
153
|
+
)}
|
|
147
154
|
>
|
|
148
155
|
<Avatar
|
|
149
156
|
id={participant?.user?.id || channel.id || 'unknown'}
|
|
@@ -165,7 +172,7 @@ const CustomChannelHeader: React.FC<{
|
|
|
165
172
|
)}
|
|
166
173
|
</button>
|
|
167
174
|
) : (
|
|
168
|
-
|
|
175
|
+
<div className={mobileParticipantIdentityClassName}>
|
|
169
176
|
<Avatar
|
|
170
177
|
id={participant?.user?.id || channel.id || 'unknown'}
|
|
171
178
|
name={participantName}
|
|
@@ -174,8 +181,12 @@ const CustomChannelHeader: React.FC<{
|
|
|
174
181
|
dmAgentEnabled={dmAgentEnabled}
|
|
175
182
|
size={48}
|
|
176
183
|
/>
|
|
177
|
-
<p className="flex max-w-full items-center justify-center gap-
|
|
184
|
+
<p className="flex max-w-full items-center justify-center gap-0.5">
|
|
178
185
|
{participantTitle}
|
|
186
|
+
<CaretRightIcon
|
|
187
|
+
className="invisible size-3 shrink-0"
|
|
188
|
+
weight="bold"
|
|
189
|
+
/>
|
|
179
190
|
</p>
|
|
180
191
|
{dmAgentEnabled && (
|
|
181
192
|
<div className="flex items-center gap-1 text-[10px] leading-3 text-black/55">
|
|
@@ -183,7 +194,7 @@ const CustomChannelHeader: React.FC<{
|
|
|
183
194
|
<span>{DM_AGENT_HEADER_HELPER_TEXT}</span>
|
|
184
195
|
</div>
|
|
185
196
|
)}
|
|
186
|
-
|
|
197
|
+
</div>
|
|
187
198
|
)}
|
|
188
199
|
</div>
|
|
189
200
|
<div className="flex justify-end items-center gap-2">
|
|
@@ -246,7 +257,10 @@ const CustomChannelHeader: React.FC<{
|
|
|
246
257
|
type="button"
|
|
247
258
|
onClick={onParticipantNameClick}
|
|
248
259
|
aria-label={`View details for ${participantName}`}
|
|
249
|
-
className=
|
|
260
|
+
className={classNames(
|
|
261
|
+
desktopParticipantIdentityClassName,
|
|
262
|
+
'appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none'
|
|
263
|
+
)}
|
|
250
264
|
>
|
|
251
265
|
<Avatar
|
|
252
266
|
id={participant?.user?.id || channel.id || 'unknown'}
|
|
@@ -272,8 +286,7 @@ const CustomChannelHeader: React.FC<{
|
|
|
272
286
|
</div>
|
|
273
287
|
</button>
|
|
274
288
|
) : (
|
|
275
|
-
|
|
276
|
-
{/* Avatar */}
|
|
289
|
+
<div className={desktopParticipantIdentityClassName}>
|
|
277
290
|
<Avatar
|
|
278
291
|
id={participant?.user?.id || channel.id || 'unknown'}
|
|
279
292
|
name={participantName}
|
|
@@ -285,6 +298,10 @@ const CustomChannelHeader: React.FC<{
|
|
|
285
298
|
<div className="min-w-0">
|
|
286
299
|
<h1 className="flex min-w-0 items-center gap-1 font-medium text-black/90">
|
|
287
300
|
{participantTitle}
|
|
301
|
+
<CaretRightIcon
|
|
302
|
+
className="invisible size-4 shrink-0"
|
|
303
|
+
weight="bold"
|
|
304
|
+
/>
|
|
288
305
|
</h1>
|
|
289
306
|
{dmAgentEnabled && (
|
|
290
307
|
<div className="mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55">
|
|
@@ -295,7 +312,7 @@ const CustomChannelHeader: React.FC<{
|
|
|
295
312
|
</div>
|
|
296
313
|
)}
|
|
297
314
|
</div>
|
|
298
|
-
|
|
315
|
+
</div>
|
|
299
316
|
)}
|
|
300
317
|
</div>
|
|
301
318
|
<div className="flex items-center gap-2">
|