@linktr.ee/messaging-react 3.14.3 → 3.14.4-rc-1784689814

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-C-kQCN-o.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-CG9BjHg0.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-BedgUyfu.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-mO3W3JFm.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.14.3",
3
+ "version": "3.14.4-rc-1784689814",
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-1784689814",
54
54
  "@phosphor-icons/react": "^2.1.10"
55
55
  },
56
56
  "devDependencies": {
@@ -79,39 +79,66 @@ const CustomMessageInputInner: React.FC = () => {
79
79
  // content height and the squeeze never reaches the preview list. Stream's
80
80
  // <MessageInput> renders its Input directly (context providers only, no
81
81
  // wrapper element), so this is a direct flex item of that row.
82
+ //
83
+ // The container itself carries no padding of its own: it used to (p-2),
84
+ // but that inset now lives on the textarea as padding instead, so the
85
+ // textarea's actual (clickable) box is as large as the container — save
86
+ // for the small margin and the send button on the right (MES-1325).
87
+ // Visually nothing moves; the container ends up exactly the size of the
88
+ // textarea + send button row it contains.
82
89
  <div
83
- className="central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]"
90
+ className="central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]"
84
91
  data-dd-privacy="mask"
85
92
  >
86
- <QuotedMessagePreview />
87
- <CustomLinkPreviewList />
88
- <AttachmentPreviewList />
89
- <div className="flex shrink-0">
90
- <div className="w-full ml-2 mr-4 self-center leading-[0]">
91
- <TextareaComposer
92
- aria-disabled={disabled || undefined}
93
- className="w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm"
94
- // While this might usually be considered an anti-pattern, in most
95
- // cases, when a message thread is rendered, we want the input to
96
- // gain focus automatically.
97
- // eslint-disable-next-line jsx-a11y/no-autofocus
98
- autoFocus={!disabled}
99
- // Enter sends (Shift+Enter inserts a newline), so label the
100
- // on-screen keyboard's return key accordingly.
101
- enterKeyHint="send"
102
- maxRows={4}
103
- readOnly={disabled}
104
- tabIndex={disabled ? -1 : undefined}
93
+ {/* empty:hidden collapses this row (padding, gap, and all) when none of
94
+ the previews below have anything to render, so an idle composer has
95
+ no leftover top inset before the textarea row. */}
96
+ <div className="empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2">
97
+ <QuotedMessagePreview />
98
+ <CustomLinkPreviewList />
99
+ <AttachmentPreviewList />
100
+ </div>
101
+ <div className="flex shrink-0 items-start">
102
+ <TextareaComposer
103
+ aria-disabled={disabled || undefined}
104
+ // TextareaComposer wraps the real <textarea> in its own div, so
105
+ // `containerClassName` (not `className`) is what joins the row's
106
+ // flex layout; `leading-[0]` drops the line-height space an
107
+ // inline-level parent otherwise reserves, keeping that wrapper
108
+ // exactly the textarea's height rather than stretched by the row
109
+ // (items-start above is a second guard against that same stretch).
110
+ containerClassName="min-w-0 flex-1 leading-[0]"
111
+ // bg-transparent: the container has no padding to inset it behind
112
+ // anymore, so an opaque textarea would paint over its rounded corners.
113
+ className="w-full resize-none bg-transparent py-3.5 pl-4 pr-4 outline-none leading-5 placeholder:text-black/30 text-sm"
114
+ // While this might usually be considered an anti-pattern, in most
115
+ // cases, when a message thread is rendered, we want the input to
116
+ // gain focus automatically.
117
+ // eslint-disable-next-line jsx-a11y/no-autofocus
118
+ autoFocus={!disabled}
119
+ // Enter sends (Shift+Enter inserts a newline), so label the
120
+ // on-screen keyboard's return key accordingly.
121
+ enterKeyHint="send"
122
+ maxRows={4}
123
+ readOnly={disabled}
124
+ tabIndex={disabled ? -1 : undefined}
125
+ />
126
+ {/* The container no longer has its own p-2, so this inset — and the
127
+ mt-auto that anchors the button to the bottom as the textarea
128
+ grows — lives on a wrapper instead of the button's own
129
+ className: a host-supplied SendButton can (and, per our own
130
+ stories, does) spread its own className over the one we pass in,
131
+ which would otherwise silently drop this spacing. */}
132
+ <div className="mt-auto mb-2 mr-2 shrink-0">
133
+ <SendButton
134
+ sendMessage={handleSubmit}
135
+ aria-label="Send"
136
+ className="str-chat__send-button flex justify-center items-center rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring"
137
+ data-testid="send-button"
138
+ disabled={isSendDisabled}
139
+ type="button"
105
140
  />
106
141
  </div>
107
- <SendButton
108
- sendMessage={handleSubmit}
109
- aria-label="Send"
110
- className="str-chat__send-button mt-auto flex justify-center items-center flex-shrink-0 rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring"
111
- data-testid="send-button"
112
- disabled={isSendDisabled}
113
- type="button"
114
- />
115
142
  </div>
116
143
  </div>
117
144
  )