@linktr.ee/messaging-react 1.6.0 → 1.6.1
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/.tsbuildinfo +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/ActionButton/ActionButton.test.d.ts +2 -0
- package/dist/components/ActionButton/ActionButton.test.d.ts.map +1 -0
- package/dist/components/ActionButton/index.d.ts +7 -0
- package/dist/components/ActionButton/index.d.ts.map +1 -0
- package/dist/components/Avatar/avatarColors.d.ts +8 -0
- package/dist/components/Avatar/avatarColors.d.ts.map +1 -0
- package/dist/components/Avatar/index.d.ts +13 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/ChannelList/CustomChannelPreview.d.ts +13 -0
- package/dist/components/ChannelList/CustomChannelPreview.d.ts.map +1 -0
- package/dist/components/ChannelList/index.d.ts +7 -0
- package/dist/components/ChannelList/index.d.ts.map +1 -0
- package/dist/components/ChannelView.d.ts +7 -0
- package/dist/components/ChannelView.d.ts.map +1 -0
- package/dist/components/CloseButton/index.d.ts +6 -0
- package/dist/components/CloseButton/index.d.ts.map +1 -0
- package/dist/components/FaqList/FaqListItem.d.ts +9 -0
- package/dist/components/FaqList/FaqListItem.d.ts.map +1 -0
- package/dist/components/FaqList/index.d.ts +19 -0
- package/dist/components/FaqList/index.d.ts.map +1 -0
- package/dist/components/IconButton/index.d.ts +9 -0
- package/dist/components/IconButton/index.d.ts.map +1 -0
- package/dist/components/Loading/index.d.ts +7 -0
- package/dist/components/Loading/index.d.ts.map +1 -0
- package/dist/components/MessagingShell/EmptyState.d.ts +10 -0
- package/dist/components/MessagingShell/EmptyState.d.ts.map +1 -0
- package/dist/components/MessagingShell/ErrorState.d.ts +9 -0
- package/dist/components/MessagingShell/ErrorState.d.ts.map +1 -0
- package/dist/components/MessagingShell/LoadingState.d.ts +5 -0
- package/dist/components/MessagingShell/LoadingState.d.ts.map +1 -0
- package/dist/components/MessagingShell/index.d.ts +7 -0
- package/dist/components/MessagingShell/index.d.ts.map +1 -0
- package/dist/components/ParticipantPicker/ParticipantItem.d.ts +13 -0
- package/dist/components/ParticipantPicker/ParticipantItem.d.ts.map +1 -0
- package/dist/components/ParticipantPicker/ParticipantPicker.d.ts +7 -0
- package/dist/components/ParticipantPicker/ParticipantPicker.d.ts.map +1 -0
- package/dist/components/ParticipantPicker/index.d.ts +7 -0
- package/dist/components/ParticipantPicker/index.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.test.d.ts +2 -0
- package/dist/components/SearchInput/SearchInput.test.d.ts.map +1 -0
- package/dist/components/SearchInput/index.d.ts +8 -0
- package/dist/components/SearchInput/index.d.ts.map +1 -0
- package/dist/hooks/useMessaging.d.ts +6 -0
- package/dist/hooks/useMessaging.d.ts.map +1 -0
- package/dist/hooks/useParticipants.d.ts +19 -0
- package/dist/hooks/useParticipants.d.ts.map +1 -0
- package/dist/index.d.ts +16 -253
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +418 -418
- package/dist/index.js.map +1 -1
- package/dist/providers/MessagingProvider.d.ts +27 -0
- package/dist/providers/MessagingProvider.d.ts.map +1 -0
- package/dist/stories/mocks.d.ts +29 -0
- package/dist/stories/mocks.d.ts.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/utils.d.ts +12 -0
- package/dist/test/utils.d.ts.map +1 -0
- package/dist/types.d.ts +134 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/ChannelList/CustomChannelPreview.tsx +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/ActionButton.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
variant?: "default" | "danger";
|
|
4
|
+
}
|
|
5
|
+
declare const ActionButton: ({ variant, className, children, ...rest }: ActionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default ActionButton;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,iBACR,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC;AAED,QAAA,MAAM,YAAY,GAAI,2CAKnB,iBAAiB,4CAiBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate avatar background and text colors based on a string
|
|
3
|
+
* Uses the ID to deterministically select from design system colors
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAvatarColor(id: string): {
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=avatarColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatarColors.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/avatarColors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAA;CACd,CA2BA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AvatarProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Avatar component that displays a user image or colored initial fallback
|
|
11
|
+
*/
|
|
12
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkDxC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Channel } from 'stream-chat';
|
|
3
|
+
import { ChannelPreviewUIComponentProps } from 'stream-chat-react';
|
|
4
|
+
/**
|
|
5
|
+
* Custom channel preview that handles selection
|
|
6
|
+
*/
|
|
7
|
+
declare const CustomChannelPreview: React.FC<ChannelPreviewUIComponentProps & {
|
|
8
|
+
selectedChannel?: Channel | null;
|
|
9
|
+
onChannelSelect: (channel: Channel) => void;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export default CustomChannelPreview;
|
|
13
|
+
//# sourceMappingURL=CustomChannelPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomChannelPreview.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelList/CustomChannelPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAA;AAIlE;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAClC,8BAA8B,GAAG;IAC/B,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAiGF,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelList/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAKnD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuHlD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelView.d.ts","sourceRoot":"","sources":["../../src/components/ChannelView.tsx"],"names":[],"mappings":"AASA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAWvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAybhD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6BlD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CloseButton/index.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,2CAMxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FaqListItem.d.ts","sourceRoot":"","sources":["../../../src/components/FaqList/FaqListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwBlD,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Faq {
|
|
3
|
+
id: string;
|
|
4
|
+
question: string;
|
|
5
|
+
answer: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
order?: number | null;
|
|
8
|
+
}
|
|
9
|
+
export interface FaqListProps {
|
|
10
|
+
faqs: Faq[];
|
|
11
|
+
onFaqClick: (faqId: string) => void;
|
|
12
|
+
loadingFaqId?: string | null;
|
|
13
|
+
headerText?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
avatarImage?: string;
|
|
16
|
+
avatarName?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const FaqList: React.FC<FaqListProps>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FaqList/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoD1C,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"> {
|
|
3
|
+
label: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function IconButton({ label, className, children, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,eACR,SAAQ,IAAI,CACV,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,MAAM,GAAG,UAAU,CACpB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,2CAkBlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Loading/index.tsx"],"names":[],"mappings":"AAEA,KAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,OAAO,GAAI,wBAAwB,YAAY,4CAsCpD,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Empty state component shown when no channel is selected
|
|
4
|
+
*/
|
|
5
|
+
export declare const EmptyState: React.FC<{
|
|
6
|
+
hasChannels: boolean;
|
|
7
|
+
onStartConversation?: () => void;
|
|
8
|
+
participantLabel: string;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,WAAW,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAgCA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorState.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/ErrorState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,CAsBA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/LoadingState.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY,+CAOxB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MessagingShellProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Main messaging interface component that combines channel list and channel view
|
|
5
|
+
*/
|
|
6
|
+
export declare const MessagingShell: React.FC<MessagingShellProps>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAIvE,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,aAAa,CAAA;AASnE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+cxD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Participant } from '../../types';
|
|
3
|
+
type ParticipantItemProps = {
|
|
4
|
+
participant: Participant;
|
|
5
|
+
handleSelectParticipant: (participant: Participant) => void;
|
|
6
|
+
handleKeyDown: (event: React.KeyboardEvent, participant: Participant) => void;
|
|
7
|
+
displayName: string;
|
|
8
|
+
displaySecondary?: string;
|
|
9
|
+
startingChatWithId?: string | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const ParticipantItem: React.FC<ParticipantItemProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ParticipantItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticipantItem.d.ts","sourceRoot":"","sources":["../../../src/components/ParticipantPicker/ParticipantItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,uBAAuB,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IAC3D,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,EAAE,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IAC7E,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+C1D,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticipantPickerProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Generic participant picker component for starting conversations
|
|
5
|
+
*/
|
|
6
|
+
export declare const ParticipantPicker: React.FC<ParticipantPickerProps>;
|
|
7
|
+
//# sourceMappingURL=ParticipantPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticipantPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ParticipantPicker/ParticipantPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAA;AAOtE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqN9D,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ParticipantPickerProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Generic participant picker component for starting conversations
|
|
5
|
+
*/
|
|
6
|
+
export declare const ParticipantPicker: React.FC<ParticipantPickerProps>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ParticipantPicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAA;AAKtE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAiP9D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.test.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/SearchInput.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface SearchInputProps {
|
|
2
|
+
searchQuery: string;
|
|
3
|
+
setSearchQuery: (value: string) => void;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function SearchInput({ searchQuery, setSearchQuery, placeholder, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/index.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,cAAc,EACd,WAAW,GACZ,EAAE,gBAAgB,2CAiClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMessaging.d.ts","sourceRoot":"","sources":["../../src/hooks/useMessaging.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,YAAY,QAAO,qBAE/B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ParticipantSource, Participant } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for managing participant loading with search and pagination
|
|
4
|
+
*/
|
|
5
|
+
export declare const useParticipants: (participantSource: ParticipantSource, options?: {
|
|
6
|
+
initialSearch?: string;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
}) => {
|
|
9
|
+
participants: Participant[];
|
|
10
|
+
loading: boolean;
|
|
11
|
+
error: string | null;
|
|
12
|
+
searchQuery: string;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
totalCount: number | undefined;
|
|
15
|
+
loadMore: () => void;
|
|
16
|
+
search: (query: string) => void;
|
|
17
|
+
refresh: () => void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useParticipants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useParticipants.d.ts","sourceRoot":"","sources":["../../src/hooks/useParticipants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,mBAAmB,iBAAiB,EACpC,UAAS;IACP,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACd;;;;;;;;oBAoD6B,MAAM;;CA4B1C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,253 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
size?: number;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Channel list component with customizable header and actions
|
|
23
|
-
*/
|
|
24
|
-
export declare const ChannelList: default_2.FC<ChannelListProps>;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* ChannelList component props
|
|
28
|
-
*/
|
|
29
|
-
export declare interface ChannelListProps {
|
|
30
|
-
onChannelSelect: (channel: Channel) => void;
|
|
31
|
-
selectedChannel?: Channel;
|
|
32
|
-
showStartConversation?: boolean;
|
|
33
|
-
onStartConversation?: () => void;
|
|
34
|
-
participantLabel?: string;
|
|
35
|
-
className?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Channel view component with message list and input
|
|
40
|
-
*/
|
|
41
|
-
export declare const ChannelView: default_2.FC<ChannelViewProps>;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* ChannelView component props
|
|
45
|
-
*/
|
|
46
|
-
export declare interface ChannelViewProps {
|
|
47
|
-
channel: Channel;
|
|
48
|
-
onBack?: () => void;
|
|
49
|
-
showBackButton?: boolean;
|
|
50
|
-
renderMessageInputActions?: (channel: Channel) => React.ReactNode;
|
|
51
|
-
onLeaveConversation?: (channel: Channel) => void;
|
|
52
|
-
onBlockParticipant?: (participantId?: string) => void;
|
|
53
|
-
className?: string;
|
|
54
|
-
CustomChannelEmptyState?: React.ComponentType;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export declare interface Faq {
|
|
58
|
-
id: string;
|
|
59
|
-
question: string;
|
|
60
|
-
answer: string;
|
|
61
|
-
enabled: boolean;
|
|
62
|
-
order?: number | null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export declare const FaqList: default_2.FC<FaqListProps>;
|
|
66
|
-
|
|
67
|
-
export declare const FaqListItem: default_2.FC<FaqListItemProps>;
|
|
68
|
-
|
|
69
|
-
export declare interface FaqListItemProps {
|
|
70
|
-
question: string;
|
|
71
|
-
onClick: () => void;
|
|
72
|
-
loading?: boolean;
|
|
73
|
-
className?: string;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export declare interface FaqListProps {
|
|
77
|
-
faqs: Faq[];
|
|
78
|
-
onFaqClick: (faqId: string) => void;
|
|
79
|
-
loadingFaqId?: string | null;
|
|
80
|
-
headerText?: string;
|
|
81
|
-
className?: string;
|
|
82
|
-
avatarImage?: string;
|
|
83
|
-
avatarName?: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Messaging capabilities configuration
|
|
88
|
-
*/
|
|
89
|
-
export declare interface MessagingCapabilities {
|
|
90
|
-
showStartConversation?: boolean;
|
|
91
|
-
participantSource?: ParticipantSource;
|
|
92
|
-
participantLabel?: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Context value for messaging state and service
|
|
97
|
-
*/
|
|
98
|
-
declare interface MessagingContextValue {
|
|
99
|
-
service: StreamChatService | null;
|
|
100
|
-
client: StreamChat | null;
|
|
101
|
-
isConnected: boolean;
|
|
102
|
-
isLoading: boolean;
|
|
103
|
-
error: string | null;
|
|
104
|
-
capabilities: MessagingCapabilities;
|
|
105
|
-
customization: MessagingCustomization;
|
|
106
|
-
refreshConnection: () => Promise<void>;
|
|
107
|
-
debug: boolean;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Customization options
|
|
112
|
-
*/
|
|
113
|
-
declare interface MessagingCustomization {
|
|
114
|
-
theme?: 'light' | 'dark' | 'auto';
|
|
115
|
-
accentColor?: string;
|
|
116
|
-
showParticipantStatus?: boolean;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Provider component that wraps messaging-core with React state management
|
|
121
|
-
*/
|
|
122
|
-
export declare const MessagingProvider: default_2.FC<MessagingProviderProps>;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* MessagingProvider component props
|
|
126
|
-
*/
|
|
127
|
-
export declare interface MessagingProviderProps {
|
|
128
|
-
children: React.ReactNode;
|
|
129
|
-
user: MessagingUser | null;
|
|
130
|
-
serviceConfig: Omit<StreamChatServiceConfig, 'apiKey'>;
|
|
131
|
-
apiKey: string;
|
|
132
|
-
capabilities?: MessagingCapabilities;
|
|
133
|
-
customization?: MessagingCustomization;
|
|
134
|
-
debug?: boolean;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Main messaging interface component that combines channel list and channel view
|
|
139
|
-
*/
|
|
140
|
-
export declare const MessagingShell: default_2.FC<MessagingShellProps>;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Main MessagingShell component props
|
|
144
|
-
*/
|
|
145
|
-
export declare interface MessagingShellProps {
|
|
146
|
-
capabilities?: MessagingCapabilities;
|
|
147
|
-
customization?: MessagingCustomization;
|
|
148
|
-
className?: string;
|
|
149
|
-
renderMessageInputActions?: (channel: Channel) => React.ReactNode;
|
|
150
|
-
onChannelSelect?: (channel: Channel) => void;
|
|
151
|
-
onParticipantSelect?: (participant: Participant) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Auto-select a conversation with this participant on mount.
|
|
154
|
-
* Useful for deep-linking to a specific conversation (e.g., /messages/[accountUuid])
|
|
155
|
-
*
|
|
156
|
-
* If a channel with this participant exists, it will be auto-selected.
|
|
157
|
-
* If no channel exists, you can provide initialParticipantData to automatically
|
|
158
|
-
* create the channel using the existing ChannelCreator.
|
|
159
|
-
*/
|
|
160
|
-
initialParticipantFilter?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Participant data for auto-creating a channel when initialParticipantFilter
|
|
163
|
-
* is provided but no channel exists. If this is provided, MessagingShell will
|
|
164
|
-
* automatically call service.startChannelWithParticipant() to create the channel.
|
|
165
|
-
*
|
|
166
|
-
* This reuses the existing ChannelCreator from StreamChatServiceConfig.
|
|
167
|
-
*/
|
|
168
|
-
initialParticipantData?: Participant;
|
|
169
|
-
/**
|
|
170
|
-
* Custom empty state component to render when a channel has no messages.
|
|
171
|
-
* Useful for showing FAQs or other contextual information in empty channels.
|
|
172
|
-
*/
|
|
173
|
-
CustomChannelEmptyState?: React.ComponentType;
|
|
174
|
-
/**
|
|
175
|
-
* Controls whether the channel list is shown. When false, the channel list
|
|
176
|
-
* is immediately hidden. Useful for direct conversation mode where you want
|
|
177
|
-
* to show only the channel view without the list.
|
|
178
|
-
*/
|
|
179
|
-
showChannelList?: boolean;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Generic participant interface for different host environments
|
|
184
|
-
*/
|
|
185
|
-
export declare interface Participant {
|
|
186
|
-
id: string;
|
|
187
|
-
name: string;
|
|
188
|
-
email?: string;
|
|
189
|
-
image?: string;
|
|
190
|
-
username?: string;
|
|
191
|
-
phone?: string;
|
|
192
|
-
metadata?: Record<string, unknown>;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Generic participant picker component for starting conversations
|
|
197
|
-
*/
|
|
198
|
-
export declare const ParticipantPicker: default_2.FC<ParticipantPickerProps>;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* ParticipantPicker component props
|
|
202
|
-
*/
|
|
203
|
-
export declare interface ParticipantPickerProps {
|
|
204
|
-
participantSource: ParticipantSource;
|
|
205
|
-
onSelectParticipant: (participant: Participant) => void;
|
|
206
|
-
onClose: () => void;
|
|
207
|
-
existingParticipantIds?: Set<string>;
|
|
208
|
-
participantLabel?: string;
|
|
209
|
-
searchPlaceholder?: string;
|
|
210
|
-
className?: string;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Source for loading participants (followers, team members, etc.)
|
|
215
|
-
*/
|
|
216
|
-
export declare interface ParticipantSource {
|
|
217
|
-
loadParticipants: (options?: {
|
|
218
|
-
search?: string;
|
|
219
|
-
limit?: number;
|
|
220
|
-
cursor?: string;
|
|
221
|
-
}) => Promise<{
|
|
222
|
-
participants: Participant[];
|
|
223
|
-
hasMore: boolean;
|
|
224
|
-
nextCursor?: string;
|
|
225
|
-
}>;
|
|
226
|
-
totalCount?: number;
|
|
227
|
-
loading?: boolean;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Hook to access messaging service and state
|
|
232
|
-
*/
|
|
233
|
-
export declare const useMessaging: () => MessagingContextValue;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Hook for managing participant loading with search and pagination
|
|
237
|
-
*/
|
|
238
|
-
export declare const useParticipants: (participantSource: ParticipantSource, options?: {
|
|
239
|
-
initialSearch?: string;
|
|
240
|
-
pageSize?: number;
|
|
241
|
-
}) => {
|
|
242
|
-
participants: Participant[];
|
|
243
|
-
loading: boolean;
|
|
244
|
-
error: string | null;
|
|
245
|
-
searchQuery: string;
|
|
246
|
-
hasMore: boolean;
|
|
247
|
-
totalCount: number | undefined;
|
|
248
|
-
loadMore: () => void;
|
|
249
|
-
search: (query: string) => void;
|
|
250
|
-
refresh: () => void;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export { }
|
|
1
|
+
import './styles.css';
|
|
2
|
+
export { MessagingShell } from './components/MessagingShell';
|
|
3
|
+
export { ChannelList } from './components/ChannelList';
|
|
4
|
+
export { ChannelView } from './components/ChannelView';
|
|
5
|
+
export { ParticipantPicker } from './components/ParticipantPicker';
|
|
6
|
+
export { Avatar } from './components/Avatar';
|
|
7
|
+
export { FaqList } from './components/FaqList';
|
|
8
|
+
export { FaqListItem } from './components/FaqList/FaqListItem';
|
|
9
|
+
export { MessagingProvider } from './providers/MessagingProvider';
|
|
10
|
+
export { useMessaging } from './hooks/useMessaging';
|
|
11
|
+
export { useParticipants } from './hooks/useParticipants';
|
|
12
|
+
export type { MessagingShellProps, ChannelListProps, ChannelViewProps, ParticipantPickerProps, MessagingProviderProps, MessagingCapabilities, ParticipantSource, Participant, } from './types';
|
|
13
|
+
export type { AvatarProps } from './components/Avatar';
|
|
14
|
+
export type { Faq, FaqListProps } from './components/FaqList';
|
|
15
|
+
export type { FaqListItemProps } from './components/FaqList/FaqListItem';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAA;AAGrB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAGzD,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA"}
|