@linktr.ee/messaging-react 1.7.2 → 1.8.0

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.
Files changed (69) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/assets/index.css +1 -1
  3. package/dist/components/ActionButton/ActionButton.test.d.ts +2 -0
  4. package/dist/components/ActionButton/ActionButton.test.d.ts.map +1 -0
  5. package/dist/components/ActionButton/index.d.ts +7 -0
  6. package/dist/components/ActionButton/index.d.ts.map +1 -0
  7. package/dist/components/Avatar/getAvatarEmoji.d.ts +7 -0
  8. package/dist/components/Avatar/getAvatarEmoji.d.ts.map +1 -0
  9. package/dist/components/Avatar/index.d.ts +13 -0
  10. package/dist/components/Avatar/index.d.ts.map +1 -0
  11. package/dist/components/ChannelList/CustomChannelPreview.d.ts +13 -0
  12. package/dist/components/ChannelList/CustomChannelPreview.d.ts.map +1 -0
  13. package/dist/components/ChannelList/index.d.ts +7 -0
  14. package/dist/components/ChannelList/index.d.ts.map +1 -0
  15. package/dist/components/ChannelView.d.ts +7 -0
  16. package/dist/components/ChannelView.d.ts.map +1 -0
  17. package/dist/components/CloseButton/index.d.ts +6 -0
  18. package/dist/components/CloseButton/index.d.ts.map +1 -0
  19. package/dist/components/FaqList/FaqListItem.d.ts +9 -0
  20. package/dist/components/FaqList/FaqListItem.d.ts.map +1 -0
  21. package/dist/components/FaqList/index.d.ts +19 -0
  22. package/dist/components/FaqList/index.d.ts.map +1 -0
  23. package/dist/components/IconButton/index.d.ts +9 -0
  24. package/dist/components/IconButton/index.d.ts.map +1 -0
  25. package/dist/components/Loading/index.d.ts +7 -0
  26. package/dist/components/Loading/index.d.ts.map +1 -0
  27. package/dist/components/MessagingShell/ChannelEmptyState.d.ts +6 -0
  28. package/dist/components/MessagingShell/ChannelEmptyState.d.ts.map +1 -0
  29. package/dist/components/MessagingShell/EmptyState.d.ts +10 -0
  30. package/dist/components/MessagingShell/EmptyState.d.ts.map +1 -0
  31. package/dist/components/MessagingShell/ErrorState.d.ts +9 -0
  32. package/dist/components/MessagingShell/ErrorState.d.ts.map +1 -0
  33. package/dist/components/MessagingShell/LoadingState.d.ts +5 -0
  34. package/dist/components/MessagingShell/LoadingState.d.ts.map +1 -0
  35. package/dist/components/MessagingShell/index.d.ts +7 -0
  36. package/dist/components/MessagingShell/index.d.ts.map +1 -0
  37. package/dist/components/ParticipantPicker/ParticipantItem.d.ts +13 -0
  38. package/dist/components/ParticipantPicker/ParticipantItem.d.ts.map +1 -0
  39. package/dist/components/ParticipantPicker/ParticipantPicker.d.ts +7 -0
  40. package/dist/components/ParticipantPicker/ParticipantPicker.d.ts.map +1 -0
  41. package/dist/components/ParticipantPicker/index.d.ts +7 -0
  42. package/dist/components/ParticipantPicker/index.d.ts.map +1 -0
  43. package/dist/components/SearchInput/SearchInput.test.d.ts +2 -0
  44. package/dist/components/SearchInput/SearchInput.test.d.ts.map +1 -0
  45. package/dist/components/SearchInput/index.d.ts +8 -0
  46. package/dist/components/SearchInput/index.d.ts.map +1 -0
  47. package/dist/hooks/useMessaging.d.ts +6 -0
  48. package/dist/hooks/useMessaging.d.ts.map +1 -0
  49. package/dist/hooks/useParticipants.d.ts +19 -0
  50. package/dist/hooks/useParticipants.d.ts.map +1 -0
  51. package/dist/index.d.ts +17 -258
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +607 -755
  54. package/dist/index.js.map +1 -1
  55. package/dist/providers/MessagingProvider.d.ts +27 -0
  56. package/dist/providers/MessagingProvider.d.ts.map +1 -0
  57. package/dist/stories/mocks.d.ts +29 -0
  58. package/dist/stories/mocks.d.ts.map +1 -0
  59. package/dist/test/setup.d.ts +2 -0
  60. package/dist/test/setup.d.ts.map +1 -0
  61. package/dist/test/utils.d.ts +12 -0
  62. package/dist/test/utils.d.ts.map +1 -0
  63. package/dist/types.d.ts +138 -0
  64. package/dist/types.d.ts.map +1 -0
  65. package/package.json +1 -1
  66. package/src/components/ChannelList/index.tsx +5 -108
  67. package/src/components/FaqList/FaqListItem.tsx +0 -1
  68. package/src/components/MessagingShell/index.tsx +24 -5
  69. package/src/types.ts +7 -2
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ActionButton.test.d.ts.map
@@ -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,7 @@
1
+ /**
2
+ * Get a fruit emoji based on an id string
3
+ * @param id - The string id to generate emoji from
4
+ * @returns A fruit emoji string
5
+ */
6
+ export declare function getAvatarEmoji(id: string): string;
7
+ //# sourceMappingURL=getAvatarEmoji.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAvatarEmoji.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/getAvatarEmoji.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAIjD"}
@@ -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,CA4CxC,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,7 @@
1
+ import React from 'react';
2
+ import type { ChannelListProps } from '../../types';
3
+ /**
4
+ * Channel list component with customizable header and actions
5
+ */
6
+ export declare const ChannelList: React.FC<ChannelListProps>;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelList/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAInD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoElD,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { ChannelViewProps } from '../types';
3
+ /**
4
+ * Channel view component with message list and input
5
+ */
6
+ export declare const ChannelView: React.FC<ChannelViewProps>;
7
+ //# sourceMappingURL=ChannelView.d.ts.map
@@ -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;AAqdhD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6BlD,CAAA"}
@@ -0,0 +1,6 @@
1
+ interface CloseButtonProps {
2
+ onClick: () => void;
3
+ }
4
+ export declare function CloseButton({ onClick }: CloseButtonProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=index.d.ts.map
@@ -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,9 @@
1
+ import React from 'react';
2
+ export interface FaqListItemProps {
3
+ question: string;
4
+ onClick: () => void;
5
+ loading?: boolean;
6
+ className?: string;
7
+ }
8
+ export declare const FaqListItem: React.FC<FaqListItemProps>;
9
+ //# sourceMappingURL=FaqListItem.d.ts.map
@@ -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;AACzB,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,7 @@
1
+ type LoadingProps = {
2
+ className?: string;
3
+ message?: string;
4
+ };
5
+ declare const Loading: ({ className, message }: LoadingProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Loading;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -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,6 @@
1
+ import React from 'react';
2
+ /**
3
+ * Empty state component shown when a channel has no messages
4
+ */
5
+ export declare const ChannelEmptyState: React.FC;
6
+ //# sourceMappingURL=ChannelEmptyState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelEmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/ChannelEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAUrC,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,9 @@
1
+ import React from 'react';
2
+ /**
3
+ * Error state component shown when something goes wrong
4
+ */
5
+ export declare const ErrorState: React.FC<{
6
+ message: string;
7
+ onBack?: () => void;
8
+ }>;
9
+ //# sourceMappingURL=ErrorState.d.ts.map
@@ -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,5 @@
1
+ /**
2
+ * Loading state component
3
+ */
4
+ export declare const LoadingState: () => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=LoadingState.d.ts.map
@@ -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,CAkexD,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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchInput.test.d.ts.map
@@ -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,6 @@
1
+ import type { MessagingContextValue } from '../providers/MessagingProvider';
2
+ /**
3
+ * Hook to access messaging service and state
4
+ */
5
+ export declare const useMessaging: () => MessagingContextValue;
6
+ //# sourceMappingURL=useMessaging.d.ts.map
@@ -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,258 +1,17 @@
1
- import { Channel } from 'stream-chat';
2
- import { default as default_2 } from 'react';
3
- import { MessagingUser } from '@linktr.ee/messaging-core';
4
- import { StreamChat } from 'stream-chat';
5
- import { StreamChatService } from '@linktr.ee/messaging-core';
6
- import { StreamChatServiceConfig } from '@linktr.ee/messaging-core';
7
-
8
- /**
9
- * Avatar component that displays a user image or colored initial fallback
10
- */
11
- export declare const Avatar: default_2.FC<AvatarProps>;
12
-
13
- export declare interface AvatarProps {
14
- id: string;
15
- name: string;
16
- image?: string;
17
- size?: number;
18
- className?: string;
19
- }
20
-
21
- /**
22
- * Empty state component shown when a channel has no messages
23
- */
24
- export declare const ChannelEmptyState: default_2.FC;
25
-
26
- /**
27
- * Channel list component with customizable header and actions
28
- */
29
- export declare const ChannelList: default_2.FC<ChannelListProps>;
30
-
31
- /**
32
- * ChannelList component props
33
- */
34
- export declare interface ChannelListProps {
35
- onChannelSelect: (channel: Channel) => void;
36
- selectedChannel?: Channel;
37
- showStartConversation?: boolean;
38
- onStartConversation?: () => void;
39
- participantLabel?: string;
40
- className?: string;
41
- }
42
-
43
- /**
44
- * Channel view component with message list and input
45
- */
46
- export declare const ChannelView: default_2.FC<ChannelViewProps>;
47
-
48
- /**
49
- * ChannelView component props
50
- */
51
- export declare interface ChannelViewProps {
52
- channel: Channel;
53
- onBack?: () => void;
54
- showBackButton?: boolean;
55
- renderMessageInputActions?: (channel: Channel) => React.ReactNode;
56
- onLeaveConversation?: (channel: Channel) => void;
57
- onBlockParticipant?: (participantId?: string) => void;
58
- className?: string;
59
- CustomChannelEmptyState?: React.ComponentType;
60
- }
61
-
62
- export declare interface Faq {
63
- id: string;
64
- question: string;
65
- answer: string;
66
- enabled: boolean;
67
- order?: number | null;
68
- }
69
-
70
- export declare const FaqList: default_2.FC<FaqListProps>;
71
-
72
- export declare const FaqListItem: default_2.FC<FaqListItemProps>;
73
-
74
- export declare interface FaqListItemProps {
75
- question: string;
76
- onClick: () => void;
77
- loading?: boolean;
78
- className?: string;
79
- }
80
-
81
- export declare interface FaqListProps {
82
- faqs: Faq[];
83
- onFaqClick: (faqId: string) => void;
84
- loadingFaqId?: string | null;
85
- headerText?: string;
86
- className?: string;
87
- avatarImage?: string;
88
- avatarName?: string;
89
- }
90
-
91
- /**
92
- * Messaging capabilities configuration
93
- */
94
- export declare interface MessagingCapabilities {
95
- showStartConversation?: boolean;
96
- participantSource?: ParticipantSource;
97
- participantLabel?: string;
98
- }
99
-
100
- /**
101
- * Context value for messaging state and service
102
- */
103
- declare interface MessagingContextValue {
104
- service: StreamChatService | null;
105
- client: StreamChat | null;
106
- isConnected: boolean;
107
- isLoading: boolean;
108
- error: string | null;
109
- capabilities: MessagingCapabilities;
110
- customization: MessagingCustomization;
111
- refreshConnection: () => Promise<void>;
112
- debug: boolean;
113
- }
114
-
115
- /**
116
- * Customization options
117
- */
118
- declare interface MessagingCustomization {
119
- theme?: 'light' | 'dark' | 'auto';
120
- accentColor?: string;
121
- showParticipantStatus?: boolean;
122
- }
123
-
124
- /**
125
- * Provider component that wraps messaging-core with React state management
126
- */
127
- export declare const MessagingProvider: default_2.FC<MessagingProviderProps>;
128
-
129
- /**
130
- * MessagingProvider component props
131
- */
132
- export declare interface MessagingProviderProps {
133
- children: React.ReactNode;
134
- user: MessagingUser | null;
135
- serviceConfig: Omit<StreamChatServiceConfig, 'apiKey'>;
136
- apiKey: string;
137
- capabilities?: MessagingCapabilities;
138
- customization?: MessagingCustomization;
139
- debug?: boolean;
140
- }
141
-
142
- /**
143
- * Main messaging interface component that combines channel list and channel view
144
- */
145
- export declare const MessagingShell: default_2.FC<MessagingShellProps>;
146
-
147
- /**
148
- * Main MessagingShell component props
149
- */
150
- export declare interface MessagingShellProps {
151
- capabilities?: MessagingCapabilities;
152
- customization?: MessagingCustomization;
153
- className?: string;
154
- renderMessageInputActions?: (channel: Channel) => React.ReactNode;
155
- onChannelSelect?: (channel: Channel) => void;
156
- onParticipantSelect?: (participant: Participant) => void;
157
- /**
158
- * Auto-select a conversation with this participant on mount.
159
- * Useful for deep-linking to a specific conversation (e.g., /messages/[accountUuid])
160
- *
161
- * If a channel with this participant exists, it will be auto-selected.
162
- * If no channel exists, you can provide initialParticipantData to automatically
163
- * create the channel using the existing ChannelCreator.
164
- */
165
- initialParticipantFilter?: string;
166
- /**
167
- * Participant data for auto-creating a channel when initialParticipantFilter
168
- * is provided but no channel exists. If this is provided, MessagingShell will
169
- * automatically call service.startChannelWithParticipant() to create the channel.
170
- *
171
- * This reuses the existing ChannelCreator from StreamChatServiceConfig.
172
- */
173
- initialParticipantData?: Participant;
174
- /**
175
- * Custom empty state component to render when a channel has no messages.
176
- * Useful for showing FAQs or other contextual information in empty channels.
177
- */
178
- CustomChannelEmptyState?: React.ComponentType;
179
- /**
180
- * Controls whether the channel list is shown. When false, the channel list
181
- * is immediately hidden. Useful for direct conversation mode where you want
182
- * to show only the channel view without the list.
183
- */
184
- showChannelList?: boolean;
185
- }
186
-
187
- /**
188
- * Generic participant interface for different host environments
189
- */
190
- export declare interface Participant {
191
- id: string;
192
- name: string;
193
- email?: string;
194
- image?: string;
195
- username?: string;
196
- phone?: string;
197
- metadata?: Record<string, unknown>;
198
- }
199
-
200
- /**
201
- * Generic participant picker component for starting conversations
202
- */
203
- export declare const ParticipantPicker: default_2.FC<ParticipantPickerProps>;
204
-
205
- /**
206
- * ParticipantPicker component props
207
- */
208
- export declare interface ParticipantPickerProps {
209
- participantSource: ParticipantSource;
210
- onSelectParticipant: (participant: Participant) => void;
211
- onClose: () => void;
212
- existingParticipantIds?: Set<string>;
213
- participantLabel?: string;
214
- searchPlaceholder?: string;
215
- className?: string;
216
- }
217
-
218
- /**
219
- * Source for loading participants (followers, team members, etc.)
220
- */
221
- export declare interface ParticipantSource {
222
- loadParticipants: (options?: {
223
- search?: string;
224
- limit?: number;
225
- cursor?: string;
226
- }) => Promise<{
227
- participants: Participant[];
228
- hasMore: boolean;
229
- nextCursor?: string;
230
- }>;
231
- totalCount?: number;
232
- loading?: boolean;
233
- }
234
-
235
- /**
236
- * Hook to access messaging service and state
237
- */
238
- export declare const useMessaging: () => MessagingContextValue;
239
-
240
- /**
241
- * Hook for managing participant loading with search and pagination
242
- */
243
- export declare const useParticipants: (participantSource: ParticipantSource, options?: {
244
- initialSearch?: string;
245
- pageSize?: number;
246
- }) => {
247
- participants: Participant[];
248
- loading: boolean;
249
- error: string | null;
250
- searchQuery: string;
251
- hasMore: boolean;
252
- totalCount: number | undefined;
253
- loadMore: () => void;
254
- search: (query: string) => void;
255
- refresh: () => void;
256
- };
257
-
258
- 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 { ChannelEmptyState } from './components/MessagingShell/ChannelEmptyState';
10
+ export { MessagingProvider } from './providers/MessagingProvider';
11
+ export { useMessaging } from './hooks/useMessaging';
12
+ export { useParticipants } from './hooks/useParticipants';
13
+ export type { MessagingShellProps, ChannelListProps, ChannelViewProps, ParticipantPickerProps, MessagingProviderProps, MessagingCapabilities, ParticipantSource, Participant, } from './types';
14
+ export type { AvatarProps } from './components/Avatar';
15
+ export type { Faq, FaqListProps } from './components/FaqList';
16
+ export type { FaqListItemProps } from './components/FaqList/FaqListItem';
17
+ //# 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;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAA;AAGjF,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"}