@linktr.ee/messaging-react 3.3.2 → 3.3.4
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-DAyszUxa.cjs → Card-0BgubwgM.cjs} +2 -2
- package/dist/{Card-DAyszUxa.cjs.map → Card-0BgubwgM.cjs.map} +1 -1
- package/dist/{Card-BAc2cgtn.js → Card-B7AF5uOB.js} +3 -3
- package/dist/{Card-BAc2cgtn.js.map → Card-B7AF5uOB.js.map} +1 -1
- package/dist/{Card-gYxPXe_W.cjs → Card-CvBbAoUo.cjs} +2 -2
- package/dist/{Card-gYxPXe_W.cjs.map → Card-CvBbAoUo.cjs.map} +1 -1
- package/dist/{Card-Cn1cBVnr.cjs → Card-DLmUSU4A.cjs} +2 -2
- package/dist/{Card-Cn1cBVnr.cjs.map → Card-DLmUSU4A.cjs.map} +1 -1
- package/dist/{Card-D_2VQScd.js → Card-DchJqvYq.js} +2 -2
- package/dist/{Card-D_2VQScd.js.map → Card-DchJqvYq.js.map} +1 -1
- package/dist/{Card-D_G8133I.js → Card-DmPpcrSU.js} +2 -2
- package/dist/{Card-D_G8133I.js.map → Card-DmPpcrSU.js.map} +1 -1
- package/dist/{LockedThumbnail-C7tWpOQr.js → LockedThumbnail-BQjA4HaB.js} +2 -2
- package/dist/{LockedThumbnail-C7tWpOQr.js.map → LockedThumbnail-BQjA4HaB.js.map} +1 -1
- package/dist/{LockedThumbnail-DtOTZl3l.cjs → LockedThumbnail-D9fSb4N-.cjs} +2 -2
- package/dist/{LockedThumbnail-DtOTZl3l.cjs.map → LockedThumbnail-D9fSb4N-.cjs.map} +1 -1
- package/dist/{index-C_NFzAB9.js → index-BcHUpyyw.js} +3 -3
- package/dist/index-BcHUpyyw.js.map +1 -0
- package/dist/index-DTZNltUC.cjs +2 -0
- package/dist/index-DTZNltUC.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/src/providers/MessagingProvider.test.tsx +1 -1
- package/src/providers/MessagingProvider.tsx +1 -1
- package/src/stream-custom-data.ts +28 -0
- package/dist/index-C_NFzAB9.js.map +0 -1
- package/dist/index-_Se6ovQm.cjs +0 -2
- package/dist/index-_Se6ovQm.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-DTZNltUC.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
|
@@ -1222,6 +1222,29 @@ export declare interface MessagingShellProps extends ChannelViewPassthroughProps
|
|
|
1222
1222
|
|
|
1223
1223
|
export declare function normalizeLanguageCode(language?: string): string | undefined;
|
|
1224
1224
|
|
|
1225
|
+
/**
|
|
1226
|
+
* Action intents supported by Linktree official CTA attachments.
|
|
1227
|
+
*/
|
|
1228
|
+
export declare type OfficialCtaActionKind =
|
|
1229
|
+
/** Open the existing share-to-socials flow for the current platform. */
|
|
1230
|
+
'post_to_socials'
|
|
1231
|
+
/** Navigate to an external URL when the CTA represents plain navigation. */
|
|
1232
|
+
| 'open_external_url';
|
|
1233
|
+
|
|
1234
|
+
export declare interface OfficialCtaActionPayload {
|
|
1235
|
+
kind?: OfficialCtaActionKind;
|
|
1236
|
+
label?: string;
|
|
1237
|
+
url?: string;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Structured attachment shape for server-authored Linktree official CTA cards.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare type OfficialCtaAttachment = Attachment & {
|
|
1244
|
+
action?: OfficialCtaActionPayload;
|
|
1245
|
+
type: 'linktree_official_cta';
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1225
1248
|
/**
|
|
1226
1249
|
* Generic participant interface for different host environments
|
|
1227
1250
|
*/
|
|
@@ -1393,6 +1416,9 @@ export { }
|
|
|
1393
1416
|
|
|
1394
1417
|
|
|
1395
1418
|
declare module 'stream-chat' {
|
|
1419
|
+
interface CustomAttachmentData {
|
|
1420
|
+
action?: OfficialCtaActionPayload;
|
|
1421
|
+
}
|
|
1396
1422
|
interface CustomChannelData {
|
|
1397
1423
|
/**
|
|
1398
1424
|
* Whether the channel has at least one visitor-originated message.
|
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 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-
|
|
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-BcHUpyyw.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ActionButton,
|
|
4
4
|
t as Avatar,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -57,7 +57,12 @@ export type {
|
|
|
57
57
|
Participant,
|
|
58
58
|
LockedAttachmentSource,
|
|
59
59
|
} from './types'
|
|
60
|
-
export type {
|
|
60
|
+
export type {
|
|
61
|
+
MessageMetadata,
|
|
62
|
+
OfficialCtaActionKind,
|
|
63
|
+
OfficialCtaActionPayload,
|
|
64
|
+
OfficialCtaAttachment,
|
|
65
|
+
} from './stream-custom-data'
|
|
61
66
|
export type { AvatarProps } from './components/Avatar'
|
|
62
67
|
export type { ActionButtonProps } from './components/ActionButton'
|
|
63
68
|
export type {
|
|
@@ -10,7 +10,7 @@ import { MessagingProvider, useMessagingContext } from './MessagingProvider'
|
|
|
10
10
|
// Stub stream-chat-react's <Chat /> so we don't need a real, fully-wired
|
|
11
11
|
// StreamChat instance just to verify provider state.
|
|
12
12
|
vi.mock('stream-chat-react', () => ({
|
|
13
|
-
Chat: (
|
|
13
|
+
Chat: (props: { children: React.ReactNode }) => <>{props.children}</>,
|
|
14
14
|
}))
|
|
15
15
|
|
|
16
16
|
const setupServiceMock = () => {
|
|
@@ -340,7 +340,7 @@ export const MessagingProvider: React.FC<MessagingProviderProps> = ({
|
|
|
340
340
|
client={client}
|
|
341
341
|
customClasses={{
|
|
342
342
|
channelList:
|
|
343
|
-
'str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]
|
|
343
|
+
'str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]',
|
|
344
344
|
}}
|
|
345
345
|
>
|
|
346
346
|
{children}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* to be included in the distributed types.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import type { Attachment } from 'stream-chat'
|
|
15
16
|
import 'stream-chat'
|
|
16
17
|
|
|
17
18
|
export type DmAgentSystemType =
|
|
@@ -45,7 +46,34 @@ export interface MessageMetadata {
|
|
|
45
46
|
attachment_detail?: string
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Action intents supported by Linktree official CTA attachments.
|
|
51
|
+
*/
|
|
52
|
+
export type OfficialCtaActionKind =
|
|
53
|
+
/** Open the existing share-to-socials flow for the current platform. */
|
|
54
|
+
| 'post_to_socials'
|
|
55
|
+
/** Navigate to an external URL when the CTA represents plain navigation. */
|
|
56
|
+
| 'open_external_url'
|
|
57
|
+
|
|
58
|
+
export interface OfficialCtaActionPayload {
|
|
59
|
+
kind?: OfficialCtaActionKind
|
|
60
|
+
label?: string
|
|
61
|
+
url?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Structured attachment shape for server-authored Linktree official CTA cards.
|
|
66
|
+
*/
|
|
67
|
+
export type OfficialCtaAttachment = Attachment & {
|
|
68
|
+
action?: OfficialCtaActionPayload
|
|
69
|
+
type: 'linktree_official_cta'
|
|
70
|
+
}
|
|
71
|
+
|
|
48
72
|
declare module 'stream-chat' {
|
|
73
|
+
interface CustomAttachmentData {
|
|
74
|
+
action?: OfficialCtaActionPayload
|
|
75
|
+
}
|
|
76
|
+
|
|
49
77
|
interface CustomChannelData {
|
|
50
78
|
/**
|
|
51
79
|
* Whether the channel has at least one visitor-originated message.
|