@linktr.ee/messaging-react 3.5.5-rc-1782988006 → 3.5.5
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-Dq01YelX.js → Card-Bb26YfI4.js} +2 -2
- package/dist/{Card-Dq01YelX.js.map → Card-Bb26YfI4.js.map} +1 -1
- package/dist/{Card-D53qZLHI.cjs → Card-BrKZ-lbW.cjs} +2 -2
- package/dist/{Card-D53qZLHI.cjs.map → Card-BrKZ-lbW.cjs.map} +1 -1
- package/dist/{Card-BBZvkjL_.js → Card-CHvZlG79.js} +2 -2
- package/dist/{Card-BBZvkjL_.js.map → Card-CHvZlG79.js.map} +1 -1
- package/dist/{Card-DIZQPGVQ.js → Card-DN-Wvpia.js} +3 -3
- package/dist/{Card-DIZQPGVQ.js.map → Card-DN-Wvpia.js.map} +1 -1
- package/dist/{Card-C6Wa9-kl.cjs → Card-S1vPBCzV.cjs} +2 -2
- package/dist/{Card-C6Wa9-kl.cjs.map → Card-S1vPBCzV.cjs.map} +1 -1
- package/dist/{Card-BXE8pJ79.cjs → Card-vLf8WYOu.cjs} +2 -2
- package/dist/{Card-BXE8pJ79.cjs.map → Card-vLf8WYOu.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Bm2UNwLs.cjs → LockedThumbnail-BE4DGTl8.cjs} +2 -2
- package/dist/{LockedThumbnail-Bm2UNwLs.cjs.map → LockedThumbnail-BE4DGTl8.cjs.map} +1 -1
- package/dist/{LockedThumbnail-DTLtL7Xc.js → LockedThumbnail-Jl0brl9S.js} +3 -3
- package/dist/{LockedThumbnail-DTLtL7Xc.js.map → LockedThumbnail-Jl0brl9S.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-DX6U0xNB.js → index-6Q-jnVFS.js} +7 -7
- package/dist/{index-DX6U0xNB.js.map → index-6Q-jnVFS.js.map} +1 -1
- package/dist/{index-CWpqzddu.cjs → index-Cjf7FPAs.cjs} +2 -2
- package/dist/{index-CWpqzddu.cjs.map → index-Cjf7FPAs.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/AttachmentCard/index.tsx +1 -1
- package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +1 -1
- package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +1 -1
- package/src/components/CustomMessage/MessageTag.stories.tsx +2 -2
- package/src/components/LinkAttachment/components/_shared/CardShell.tsx +1 -1
- package/src/components/LockedAttachment/components/_shared/LockedCardShell.tsx +1 -1
- package/src/components/MediaMessage/index.tsx +1 -1
- package/src/components/MessageAttachment/_shared/Bubble.tsx +3 -3
- package/src/styles.css +6 -51
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-Cjf7FPAs.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.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 d, m as p, n as v, o as C, p as A, q as k, s as F, t as P, u as b, v as f, w as x, x as y, y as S, z as q, B as z, D as B, E as D, G as E } 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 d, m as p, n as v, o as C, p as A, q as k, s as F, t as P, u as b, v as f, w as x, x as y, y as S, z as q, B as z, D as B, E as D, G as E } from "./index-6Q-jnVFS.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.5.5
|
|
3
|
+
"version": "3.5.5",
|
|
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.
|
|
41
|
+
"@linktr.ee/messaging-core": "^2.2.0",
|
|
42
42
|
"@phosphor-icons/react": "^2.1.10"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -57,7 +57,7 @@ const AttachmentCard: React.FC<AttachmentCardProps> = ({
|
|
|
57
57
|
data-testid={dataTestId}
|
|
58
58
|
className={classNames(
|
|
59
59
|
'relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]',
|
|
60
|
-
isDark ? 'bg-[#
|
|
60
|
+
isDark ? 'bg-[#121110]' : 'bg-white'
|
|
61
61
|
)}
|
|
62
62
|
>
|
|
63
63
|
{topLeft ? (
|
|
@@ -23,7 +23,7 @@ const CustomLinkPreviewCard: React.FC<CustomLinkPreviewCardProps> = ({
|
|
|
23
23
|
href={og_scrape_url}
|
|
24
24
|
target="_blank"
|
|
25
25
|
rel="noopener noreferrer"
|
|
26
|
-
className="relative block w-full rounded-[24px] bg-[#
|
|
26
|
+
className="relative block w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90"
|
|
27
27
|
>
|
|
28
28
|
{image_url && (
|
|
29
29
|
<img
|
|
@@ -83,7 +83,7 @@ ChatbotReceiverText.parameters = skipInChromatic
|
|
|
83
83
|
export const ChatbotSenderText: StoryFn<ComponentProps> = (args) => {
|
|
84
84
|
return (
|
|
85
85
|
<div className="p-12">
|
|
86
|
-
<div className="bg-[#
|
|
86
|
+
<div className="bg-[#121110] rounded-[24px] px-4 py-3 w-[280px]">
|
|
87
87
|
<MessageTag {...args} />
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
@@ -150,7 +150,7 @@ export const AllVariants: StoryFn = () => {
|
|
|
150
150
|
</div>
|
|
151
151
|
<div className="flex items-center gap-4">
|
|
152
152
|
<span className="text-sm w-32">Chatbot (sender):</span>
|
|
153
|
-
<div className="bg-[#
|
|
153
|
+
<div className="bg-[#121110] rounded-[24px] px-4 py-3 w-[280px]">
|
|
154
154
|
<MessageTag
|
|
155
155
|
message={createMockMessage({
|
|
156
156
|
metadata: { custom_type: 'MESSAGE_CHATBOT' },
|
|
@@ -64,7 +64,7 @@ const CardShell: React.FC<CardShellProps> = ({
|
|
|
64
64
|
const isInteractive = href != null || onClick != null
|
|
65
65
|
const className = classNames(
|
|
66
66
|
SHELL_CLASS,
|
|
67
|
-
bgClassName ?? (variant === 'dark' ? 'bg-[#
|
|
67
|
+
bgClassName ?? (variant === 'dark' ? 'bg-[#121110]' : 'bg-white'),
|
|
68
68
|
// `focus-ring` is a design-system utility from the component-library
|
|
69
69
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
70
70
|
// with offset, so keyboard users can see the focused card.
|
|
@@ -26,7 +26,7 @@ const LockedCardShell: React.FC<LockedCardShellProps> = ({
|
|
|
26
26
|
className={classNames(
|
|
27
27
|
'relative w-[280px] select-none overflow-hidden rounded-md',
|
|
28
28
|
'shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]',
|
|
29
|
-
variant === 'dark' ? 'bg-[#
|
|
29
|
+
variant === 'dark' ? 'bg-[#121110]' : 'bg-white'
|
|
30
30
|
)}
|
|
31
31
|
>
|
|
32
32
|
{children}
|
|
@@ -15,7 +15,7 @@ function formatBytes(bytes: number): string {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function linkCardShellClass(isMyMessage: boolean) {
|
|
18
|
-
const bg = isMyMessage ? 'bg-[#
|
|
18
|
+
const bg = isMyMessage ? 'bg-[#121110]' : 'bg-[#F3F3F1]'
|
|
19
19
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${bg} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -30,7 +30,7 @@ export interface BubbleProps {
|
|
|
30
30
|
// `.str-chat__message-bubble` token set so attachments visually drop
|
|
31
31
|
// into a normal `CustomMessage` thread without any seams:
|
|
32
32
|
// - light → `--str-chat__secondary-surface-color` = grey200 (#e9eaed)
|
|
33
|
-
// - dark → `.str-chat__message--me` override in `styles.css` (#
|
|
33
|
+
// - dark → `.str-chat__message--me` override in `styles.css` (#121110)
|
|
34
34
|
// - text padding → `--str-chat__spacing-2 --str-chat__spacing-4` = 8px 16px
|
|
35
35
|
// - border-radius → `--str-chat__border-radius-md` = 18px
|
|
36
36
|
//
|
|
@@ -41,7 +41,7 @@ export interface BubbleProps {
|
|
|
41
41
|
// rebrand would need to touch every site. A central token would
|
|
42
42
|
// collapse the migration to one definition.
|
|
43
43
|
const BUBBLE_BG_BY_VARIANT: Record<BubbleVariant, string> = {
|
|
44
|
-
dark: 'bg-[#
|
|
44
|
+
dark: 'bg-[#121110]',
|
|
45
45
|
light: 'bg-[#e9eaed]',
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -104,7 +104,7 @@ const CORNER_CLASSES_BY_SIDE_AND_POSITION: Record<
|
|
|
104
104
|
* is the file', 'Here is the image').
|
|
105
105
|
*
|
|
106
106
|
* Two visual variants:
|
|
107
|
-
* - `dark` — sender-side (Composer / Sent), white text on `#
|
|
107
|
+
* - `dark` — sender-side (Composer / Sent), white text on `#121110`.
|
|
108
108
|
* - `light` — recipient-side (Received), dark text on `#e9eaed`.
|
|
109
109
|
*
|
|
110
110
|
* Background colors, padding, border-radius, and inherited font come
|
package/src/styles.css
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
--str-chat__font-family: inherit;
|
|
9
9
|
|
|
10
10
|
--str-chat__message-bubble-border-radius: 1.5rem;
|
|
11
|
-
--str-chat__message-bubble-background-color: #
|
|
12
|
-
--str-chat__message-bubble-color: #
|
|
11
|
+
--str-chat__message-bubble-background-color: #f1f0ee;
|
|
12
|
+
--str-chat__message-bubble-color: #181818;
|
|
13
13
|
|
|
14
|
-
--str-chat__own-message-bubble-background-color: #
|
|
14
|
+
--str-chat__own-message-bubble-background-color: #121110;
|
|
15
15
|
--str-chat__own-message-bubble-color: #fff;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -560,8 +560,7 @@
|
|
|
560
560
|
|
|
561
561
|
.str-chat__message .str-chat__message-bubble {
|
|
562
562
|
font-size: 0.875rem;
|
|
563
|
-
line-height: 1.
|
|
564
|
-
letter-spacing: 0.14px;
|
|
563
|
+
line-height: 1.25rem;
|
|
565
564
|
}
|
|
566
565
|
|
|
567
566
|
/* Chatbot reply markdown — restore semantics that consumer Tailwind preflight
|
|
@@ -675,55 +674,11 @@
|
|
|
675
674
|
}
|
|
676
675
|
|
|
677
676
|
.str-chat__message--other .str-chat__message-bubble {
|
|
678
|
-
border-end-start-radius:
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
.str-chat__message--other
|
|
682
|
-
.str-chat__message-bubble-wrapper
|
|
683
|
-
> .str-chat__message-bubble:last-child {
|
|
684
|
-
position: relative;
|
|
685
|
-
|
|
686
|
-
&::after {
|
|
687
|
-
content: '';
|
|
688
|
-
position: absolute;
|
|
689
|
-
inset-block-end: 0;
|
|
690
|
-
inset-inline-start: calc(-1 * 0.25rem);
|
|
691
|
-
width: 1.375rem;
|
|
692
|
-
height: 1.5rem;
|
|
693
|
-
background-color: var(--str-chat__message-bubble-background-color);
|
|
694
|
-
pointer-events: none;
|
|
695
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='25 22 20 23'%3E%3Cpath d='M45 22H30C30 32.1934 29.1413 37.2345 25.8323 43.4893C25.4732 44.168 25.9613 44.9917 26.7255 44.9178C39.8236 43.6506 44.6803 28.0737 45 22Z'/%3E%3C/svg%3E")
|
|
696
|
-
no-repeat center / 100% 100%;
|
|
697
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='25 22 20 23'%3E%3Cpath d='M45 22H30C30 32.1934 29.1413 37.2345 25.8323 43.4893C25.4732 44.168 25.9613 44.9917 26.7255 44.9178C39.8236 43.6506 44.6803 28.0737 45 22Z'/%3E%3C/svg%3E")
|
|
698
|
-
no-repeat center / 100% 100%;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
.str-chat__message--me
|
|
703
|
-
.str-chat__message-bubble-wrapper
|
|
704
|
-
> .str-chat__message-bubble:last-child {
|
|
705
|
-
position: relative;
|
|
706
|
-
|
|
707
|
-
&::after {
|
|
708
|
-
content: '';
|
|
709
|
-
position: absolute;
|
|
710
|
-
inset-block-end: 0;
|
|
711
|
-
inset-inline-end: calc(-1 * 0.25rem);
|
|
712
|
-
width: 1.375rem;
|
|
713
|
-
height: 1.5rem;
|
|
714
|
-
background-color: var(--str-chat__own-message-bubble-background-color);
|
|
715
|
-
pointer-events: none;
|
|
716
|
-
transform: scaleX(-1);
|
|
717
|
-
transform-origin: center;
|
|
718
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='25 22 20 23'%3E%3Cpath d='M45 22H30C30 32.1934 29.1413 37.2345 25.8323 43.4893C25.4732 44.168 25.9613 44.9917 26.7255 44.9178C39.8236 43.6506 44.6803 28.0737 45 22Z'/%3E%3C/svg%3E")
|
|
719
|
-
no-repeat center / 100% 100%;
|
|
720
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='25 22 20 23'%3E%3Cpath d='M45 22H30C30 32.1934 29.1413 37.2345 25.8323 43.4893C25.4732 44.168 25.9613 44.9917 26.7255 44.9178C39.8236 43.6506 44.6803 28.0737 45 22Z'/%3E%3C/svg%3E")
|
|
721
|
-
no-repeat center / 100% 100%;
|
|
722
|
-
}
|
|
677
|
+
border-end-start-radius: var(--str-chat__message-bubble-border-radius);
|
|
723
678
|
}
|
|
724
679
|
|
|
725
680
|
.str-chat__message--me .str-chat__message-bubble {
|
|
726
|
-
border-end-end-radius:
|
|
681
|
+
border-end-end-radius: var(--str-chat__message-bubble-border-radius);
|
|
727
682
|
}
|
|
728
683
|
}
|
|
729
684
|
|