@linktr.ee/messaging-react 3.3.10-rc-1781645401 → 3.3.10-rc-1781868776
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-qF1fO3J4.cjs → Card-Ch3cTL6G.cjs} +2 -2
- package/dist/{Card-qF1fO3J4.cjs.map → Card-Ch3cTL6G.cjs.map} +1 -1
- package/dist/{Card-xNHR_bKY.cjs → Card-DezN34Sz.cjs} +2 -2
- package/dist/{Card-xNHR_bKY.cjs.map → Card-DezN34Sz.cjs.map} +1 -1
- package/dist/{Card-BmQYVGMq.cjs → Card-DiSXLhzw.cjs} +2 -2
- package/dist/{Card-BmQYVGMq.cjs.map → Card-DiSXLhzw.cjs.map} +1 -1
- package/dist/{Card-CG8SMxkM.js → Card-DndbBigk.js} +2 -2
- package/dist/{Card-CG8SMxkM.js.map → Card-DndbBigk.js.map} +1 -1
- package/dist/{Card-BokhtsDD.js → Card-giUAe8IB.js} +2 -2
- package/dist/{Card-BokhtsDD.js.map → Card-giUAe8IB.js.map} +1 -1
- package/dist/{Card-DaXkK4uS.js → Card-qFB_y7k3.js} +3 -3
- package/dist/{Card-DaXkK4uS.js.map → Card-qFB_y7k3.js.map} +1 -1
- package/dist/{LockedThumbnail-_5g6bxXW.js → LockedThumbnail-C9Y0oCjv.js} +2 -2
- package/dist/{LockedThumbnail-_5g6bxXW.js.map → LockedThumbnail-C9Y0oCjv.js.map} +1 -1
- package/dist/{LockedThumbnail-BZMu174W.cjs → LockedThumbnail-DkdVuMZM.cjs} +2 -2
- package/dist/{LockedThumbnail-BZMu174W.cjs.map → LockedThumbnail-DkdVuMZM.cjs.map} +1 -1
- package/dist/{index-3GF2ZDV8.cjs → index-B_8de68T.cjs} +2 -2
- package/dist/index-B_8de68T.cjs.map +1 -0
- package/dist/{index-XXoPu3F3.js → index-DGVCJzwy.js} +404 -436
- package/dist/index-DGVCJzwy.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -54
- package/dist/index.js +20 -24
- package/package.json +2 -2
- package/src/index.ts +0 -10
- package/dist/index-3GF2ZDV8.cjs.map +0 -1
- package/dist/index-XXoPu3F3.js.map +0 -1
- package/src/utils/linkAttachmentFromStream.test.ts +0 -99
- package/src/utils/linkAttachmentFromStream.ts +0 -112
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-B_8de68T.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.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -84,15 +84,6 @@ export declare interface AvatarProps {
|
|
|
84
84
|
*/
|
|
85
85
|
export declare function buildCompactMetaLabel(mimeType?: string, filename?: string, fileSize?: number): string | undefined;
|
|
86
86
|
|
|
87
|
-
/**
|
|
88
|
-
* True when `caption` is *nothing but* the link URL (plus surrounding
|
|
89
|
-
* punctuation / whitespace), so it can be dropped as redundant with the card's
|
|
90
|
-
* own URL footer. A caption that adds real words — e.g. `"<url>\n\nhello
|
|
91
|
-
* there"` — returns false so that text is preserved rather than dropped along
|
|
92
|
-
* with the redundant URL.
|
|
93
|
-
*/
|
|
94
|
-
export declare function captionDuplicatesLinkUrl(caption: string | undefined, url: string | undefined): boolean;
|
|
95
|
-
|
|
96
87
|
/**
|
|
97
88
|
* Empty state component shown when a channel has no messages
|
|
98
89
|
* Returns null to show nothing - the LoadingIndicator handles the loading state
|
|
@@ -633,24 +624,6 @@ export declare interface LinkAttachmentCta {
|
|
|
633
624
|
*/
|
|
634
625
|
export declare type LinkAttachmentLayout = 'featured' | 'classic';
|
|
635
626
|
|
|
636
|
-
/**
|
|
637
|
-
* Maps a Stream `Attachment` (a scraped link / OG preview) to the props for a
|
|
638
|
-
* `LinkAttachment.Sent` / `LinkAttachment.Received` card — the single source
|
|
639
|
-
* of truth so the admin and visitor surfaces render link shares identically.
|
|
640
|
-
*/
|
|
641
|
-
export declare function linkAttachmentPropsFromStreamAttachment(attachment: Attachment, options?: LinkAttachmentPropsOptions): StreamLinkAttachmentProps;
|
|
642
|
-
|
|
643
|
-
export declare interface LinkAttachmentPropsOptions {
|
|
644
|
-
/**
|
|
645
|
-
* Hook to transform the raw hero image URL — e.g. apply a CDN size preset or
|
|
646
|
-
* drop unreliable hosts. Returning a falsy value drops the hero and the card
|
|
647
|
-
* falls back to the classic (text-only) layout. Defaults to passing the raw
|
|
648
|
-
* URL through unchanged. App-specific CDN logic belongs here, not in the
|
|
649
|
-
* shared mapping.
|
|
650
|
-
*/
|
|
651
|
-
resolveThumbnailUrl?: (raw: string | undefined) => string | undefined;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
627
|
export declare interface LinkAttachmentReceivedCardProps extends LinkAttachmentBaseProps {
|
|
655
628
|
/**
|
|
656
629
|
* Fired when the recipient activates the card. Behavior depends on how
|
|
@@ -1249,9 +1222,6 @@ export declare interface MessagingShellProps extends ChannelViewPassthroughProps
|
|
|
1249
1222
|
|
|
1250
1223
|
export declare function normalizeLanguageCode(language?: string): string | undefined;
|
|
1251
1224
|
|
|
1252
|
-
/** Normalize a URL for caption comparison: strip protocol + trailing slash, lowercase. */
|
|
1253
|
-
export declare function normalizeLinkUrl(url: string): string;
|
|
1254
|
-
|
|
1255
1225
|
/**
|
|
1256
1226
|
* Action intents supported by Linktree official CTA attachments.
|
|
1257
1227
|
*/
|
|
@@ -1364,14 +1334,6 @@ export declare function resolveMediaFromMessage(message: LocalMessage): MediaMes
|
|
|
1364
1334
|
*/
|
|
1365
1335
|
export declare function resolveParticipantDisplayName(user?: ParticipantDisplayUser | null): string;
|
|
1366
1336
|
|
|
1367
|
-
/**
|
|
1368
|
-
* Navigation target for a scraped-link attachment. Stream exposes both
|
|
1369
|
-
* `og_scrape_url` (the enriched URL) and `title_link`; prefer the former and
|
|
1370
|
-
* fall back to the latter, ignoring empty / whitespace-only values so they
|
|
1371
|
-
* never produce an empty `href`.
|
|
1372
|
-
*/
|
|
1373
|
-
export declare function resolveStreamLinkUrl(attachment: Attachment): string | undefined;
|
|
1374
|
-
|
|
1375
1337
|
export declare interface SentCardProps extends LockedAttachmentBaseProps {
|
|
1376
1338
|
/** Placeholder shown in the title slot when no title is set. */
|
|
1377
1339
|
placeholderTitle?: string;
|
|
@@ -1385,22 +1347,6 @@ export declare interface SentCardProps extends LockedAttachmentBaseProps {
|
|
|
1385
1347
|
onFetchSource?: () => Promise<LockedAttachmentSource | void>;
|
|
1386
1348
|
}
|
|
1387
1349
|
|
|
1388
|
-
/**
|
|
1389
|
-
* Props derived from a Stream `Attachment` for rendering a
|
|
1390
|
-
* `LinkAttachment.Sent` / `LinkAttachment.Received` card. The shared mapping
|
|
1391
|
-
* both the admin (mfe-messaging) and visitor (profiles) surfaces use so a
|
|
1392
|
-
* scraped-link attachment renders identically across them, rather than each
|
|
1393
|
-
* app re-deriving these props and drifting apart.
|
|
1394
|
-
*/
|
|
1395
|
-
export declare interface StreamLinkAttachmentProps {
|
|
1396
|
-
title?: string;
|
|
1397
|
-
description?: string;
|
|
1398
|
-
url?: string;
|
|
1399
|
-
thumbnailUrl?: string;
|
|
1400
|
-
mimeType?: string;
|
|
1401
|
-
layout: LinkAttachmentLayout;
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
1350
|
export declare function useCustomMessage<K extends keyof CustomMessageRegistry>(key: K): CustomMessageRegistry[K];
|
|
1405
1351
|
|
|
1406
1352
|
/**
|
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
|
|
1
|
+
import { a as e, b as t, C as i, c as n, d as o, e as m, F as g, f as l, L as r, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as v, o as A, p as C, q as F, s as k, 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 } from "./index-DGVCJzwy.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ActionButton,
|
|
4
4
|
t as Avatar,
|
|
@@ -6,33 +6,29 @@ export {
|
|
|
6
6
|
n as ChannelList,
|
|
7
7
|
o as ChannelView,
|
|
8
8
|
m as CustomMessageProvider,
|
|
9
|
-
|
|
9
|
+
g as FaqList,
|
|
10
10
|
l as FaqListItem,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
v as formatRelativeTime,
|
|
11
|
+
r as LinkAttachment,
|
|
12
|
+
M as LockedAttachment,
|
|
13
|
+
u as MediaMessage,
|
|
14
|
+
L as MessageAttachment,
|
|
15
|
+
c as MessageVoteButtons,
|
|
16
|
+
h as MessagingProvider,
|
|
17
|
+
d as MessagingShell,
|
|
18
|
+
p as buildCompactMetaLabel,
|
|
19
|
+
v as formatFileSize,
|
|
20
|
+
A as formatRelativeTime,
|
|
22
21
|
C as getFileExtensionLabel,
|
|
23
22
|
F as getMessageDisplayText,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
b as linkAttachmentPropsFromStreamAttachment,
|
|
23
|
+
k as isLinkAttachment,
|
|
24
|
+
b as isUuidLike,
|
|
27
25
|
f as messageAttachmentGroupPositionFromStream,
|
|
28
26
|
x as normalizeLanguageCode,
|
|
29
|
-
y as
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
B as
|
|
35
|
-
E as useMessageVote,
|
|
36
|
-
V as useMessaging
|
|
27
|
+
y as resolveLinkAttachment,
|
|
28
|
+
P as resolveMediaFromMessage,
|
|
29
|
+
S as resolveParticipantDisplayName,
|
|
30
|
+
q as useCustomMessage,
|
|
31
|
+
z as useMessageVote,
|
|
32
|
+
B as useMessaging
|
|
37
33
|
};
|
|
38
34
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "3.3.10-rc-
|
|
3
|
+
"version": "3.3.10-rc-1781868776",
|
|
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": "
|
|
41
|
+
"@linktr.ee/messaging-core": "2.1.0-rc-1781868776",
|
|
42
42
|
"@phosphor-icons/react": "^2.1.10"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -45,16 +45,6 @@ export {
|
|
|
45
45
|
isUuidLike,
|
|
46
46
|
} from './utils/resolveParticipantDisplayName'
|
|
47
47
|
export type { ParticipantDisplayUser } from './utils/resolveParticipantDisplayName'
|
|
48
|
-
export {
|
|
49
|
-
linkAttachmentPropsFromStreamAttachment,
|
|
50
|
-
resolveStreamLinkUrl,
|
|
51
|
-
captionDuplicatesLinkUrl,
|
|
52
|
-
normalizeLinkUrl,
|
|
53
|
-
} from './utils/linkAttachmentFromStream'
|
|
54
|
-
export type {
|
|
55
|
-
StreamLinkAttachmentProps,
|
|
56
|
-
LinkAttachmentPropsOptions,
|
|
57
|
-
} from './utils/linkAttachmentFromStream'
|
|
58
48
|
|
|
59
49
|
// Types
|
|
60
50
|
export type {
|