@linktr.ee/messaging-react 1.6.1 → 1.6.3

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 (66) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/index.d.ts +253 -16
  3. package/dist/index.js +311 -305
  4. package/dist/index.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/components/Avatar/avatarColors.ts +3 -28
  7. package/src/components/Avatar/getAvatarEmoji.ts +44 -0
  8. package/src/components/Avatar/index.tsx +8 -9
  9. package/dist/.tsbuildinfo +0 -1
  10. package/dist/components/ActionButton/ActionButton.test.d.ts +0 -2
  11. package/dist/components/ActionButton/ActionButton.test.d.ts.map +0 -1
  12. package/dist/components/ActionButton/index.d.ts +0 -7
  13. package/dist/components/ActionButton/index.d.ts.map +0 -1
  14. package/dist/components/Avatar/avatarColors.d.ts +0 -8
  15. package/dist/components/Avatar/avatarColors.d.ts.map +0 -1
  16. package/dist/components/Avatar/index.d.ts +0 -13
  17. package/dist/components/Avatar/index.d.ts.map +0 -1
  18. package/dist/components/ChannelList/CustomChannelPreview.d.ts +0 -13
  19. package/dist/components/ChannelList/CustomChannelPreview.d.ts.map +0 -1
  20. package/dist/components/ChannelList/index.d.ts +0 -7
  21. package/dist/components/ChannelList/index.d.ts.map +0 -1
  22. package/dist/components/ChannelView.d.ts +0 -7
  23. package/dist/components/ChannelView.d.ts.map +0 -1
  24. package/dist/components/CloseButton/index.d.ts +0 -6
  25. package/dist/components/CloseButton/index.d.ts.map +0 -1
  26. package/dist/components/FaqList/FaqListItem.d.ts +0 -9
  27. package/dist/components/FaqList/FaqListItem.d.ts.map +0 -1
  28. package/dist/components/FaqList/index.d.ts +0 -19
  29. package/dist/components/FaqList/index.d.ts.map +0 -1
  30. package/dist/components/IconButton/index.d.ts +0 -9
  31. package/dist/components/IconButton/index.d.ts.map +0 -1
  32. package/dist/components/Loading/index.d.ts +0 -7
  33. package/dist/components/Loading/index.d.ts.map +0 -1
  34. package/dist/components/MessagingShell/EmptyState.d.ts +0 -10
  35. package/dist/components/MessagingShell/EmptyState.d.ts.map +0 -1
  36. package/dist/components/MessagingShell/ErrorState.d.ts +0 -9
  37. package/dist/components/MessagingShell/ErrorState.d.ts.map +0 -1
  38. package/dist/components/MessagingShell/LoadingState.d.ts +0 -5
  39. package/dist/components/MessagingShell/LoadingState.d.ts.map +0 -1
  40. package/dist/components/MessagingShell/index.d.ts +0 -7
  41. package/dist/components/MessagingShell/index.d.ts.map +0 -1
  42. package/dist/components/ParticipantPicker/ParticipantItem.d.ts +0 -13
  43. package/dist/components/ParticipantPicker/ParticipantItem.d.ts.map +0 -1
  44. package/dist/components/ParticipantPicker/ParticipantPicker.d.ts +0 -7
  45. package/dist/components/ParticipantPicker/ParticipantPicker.d.ts.map +0 -1
  46. package/dist/components/ParticipantPicker/index.d.ts +0 -7
  47. package/dist/components/ParticipantPicker/index.d.ts.map +0 -1
  48. package/dist/components/SearchInput/SearchInput.test.d.ts +0 -2
  49. package/dist/components/SearchInput/SearchInput.test.d.ts.map +0 -1
  50. package/dist/components/SearchInput/index.d.ts +0 -8
  51. package/dist/components/SearchInput/index.d.ts.map +0 -1
  52. package/dist/hooks/useMessaging.d.ts +0 -6
  53. package/dist/hooks/useMessaging.d.ts.map +0 -1
  54. package/dist/hooks/useParticipants.d.ts +0 -19
  55. package/dist/hooks/useParticipants.d.ts.map +0 -1
  56. package/dist/index.d.ts.map +0 -1
  57. package/dist/providers/MessagingProvider.d.ts +0 -27
  58. package/dist/providers/MessagingProvider.d.ts.map +0 -1
  59. package/dist/stories/mocks.d.ts +0 -29
  60. package/dist/stories/mocks.d.ts.map +0 -1
  61. package/dist/test/setup.d.ts +0 -2
  62. package/dist/test/setup.d.ts.map +0 -1
  63. package/dist/test/utils.d.ts +0 -12
  64. package/dist/test/utils.d.ts.map +0 -1
  65. package/dist/types.d.ts +0 -134
  66. package/dist/types.d.ts.map +0 -1
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ActionButton.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/ActionButton.test.tsx"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Loading state component
3
- */
4
- export declare const LoadingState: () => import("react/jsx-runtime").JSX.Element;
5
- //# sourceMappingURL=LoadingState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../src/components/MessagingShell/LoadingState.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY,+CAOxB,CAAA"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SearchInput.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchInput.test.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/SearchInput.test.tsx"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1,27 +0,0 @@
1
- import { StreamChatService } from '@linktr.ee/messaging-core';
2
- import React from 'react';
3
- import type { StreamChat } from 'stream-chat';
4
- import type { MessagingProviderProps, MessagingCapabilities, MessagingCustomization } from '../types';
5
- /**
6
- * Context value for messaging state and service
7
- */
8
- export interface MessagingContextValue {
9
- service: StreamChatService | null;
10
- client: StreamChat | null;
11
- isConnected: boolean;
12
- isLoading: boolean;
13
- error: string | null;
14
- capabilities: MessagingCapabilities;
15
- customization: MessagingCustomization;
16
- refreshConnection: () => Promise<void>;
17
- debug: boolean;
18
- }
19
- /**
20
- * Hook to access messaging context
21
- */
22
- export declare const useMessagingContext: () => MessagingContextValue;
23
- /**
24
- * Provider component that wraps messaging-core with React state management
25
- */
26
- export declare const MessagingProvider: React.FC<MessagingProviderProps>;
27
- //# sourceMappingURL=MessagingProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MessagingProvider.d.ts","sourceRoot":"","sources":["../../src/providers/MessagingProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAON,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AAEjB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACjC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;IACzB,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,YAAY,EAAE,qBAAqB,CAAA;IACnC,aAAa,EAAE,sBAAsB,CAAA;IACrC,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,KAAK,EAAE,OAAO,CAAA;CACf;AAcD;;GAEG;AACH,eAAO,MAAM,mBAAmB,6BAAqC,CAAA;AAErE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkT9D,CAAA"}
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- export declare const MockChatProvider: React.FC<{
3
- children: React.ReactNode;
4
- }>;
5
- export declare const MockChatProviderWithChannels: React.FC<{
6
- children: React.ReactNode;
7
- channelCount?: number;
8
- }>;
9
- export declare const mockParticipants: {
10
- id: string;
11
- name: string;
12
- email: string;
13
- image: string;
14
- }[];
15
- export declare const mockParticipantSource: {
16
- loadParticipants: (options?: {
17
- search?: string;
18
- limit?: number;
19
- }) => Promise<{
20
- participants: {
21
- id: string;
22
- name: string;
23
- email: string;
24
- image: string;
25
- }[];
26
- hasMore: boolean;
27
- }>;
28
- };
29
- //# sourceMappingURL=mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/stories/mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA+BzB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAYpE,CAAA;AAGD,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAwDA,CAAA;AAGD,eAAO,MAAM,gBAAgB;;;;;GA+B5B,CAAA;AAGD,eAAO,MAAM,qBAAqB;iCACG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;CAYvE,CAAA"}
@@ -1,2 +0,0 @@
1
- import '@testing-library/jest-dom/vitest';
2
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA"}
@@ -1,12 +0,0 @@
1
- import { RenderOptions, RenderResult } from '@testing-library/react';
2
- import { ReactElement } from 'react';
3
- /**
4
- * Custom render function that wraps components with common providers
5
- */
6
- export declare function renderWithProviders(ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>): RenderResult;
7
- /**
8
- * Re-export everything from React Testing Library
9
- */
10
- export * from '@testing-library/react';
11
- export { default as userEvent } from '@testing-library/user-event';
12
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAa,MAAM,OAAO,CAAA;AAE/C;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,YAAY,EAChB,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GACvC,YAAY,CAMd;AAED;;GAEG;AACH,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAA"}
package/dist/types.d.ts DELETED
@@ -1,134 +0,0 @@
1
- import type { MessagingUser, StreamChatServiceConfig } from '@linktr.ee/messaging-core';
2
- import type { Channel } from 'stream-chat';
3
- /**
4
- * Generic participant interface for different host environments
5
- */
6
- export interface Participant {
7
- id: string;
8
- name: string;
9
- email?: string;
10
- image?: string;
11
- username?: string;
12
- phone?: string;
13
- metadata?: Record<string, unknown>;
14
- }
15
- /**
16
- * Source for loading participants (followers, team members, etc.)
17
- */
18
- export interface ParticipantSource {
19
- loadParticipants: (options?: {
20
- search?: string;
21
- limit?: number;
22
- cursor?: string;
23
- }) => Promise<{
24
- participants: Participant[];
25
- hasMore: boolean;
26
- nextCursor?: string;
27
- }>;
28
- totalCount?: number;
29
- loading?: boolean;
30
- }
31
- /**
32
- * Messaging capabilities configuration
33
- */
34
- export interface MessagingCapabilities {
35
- showStartConversation?: boolean;
36
- participantSource?: ParticipantSource;
37
- participantLabel?: string;
38
- }
39
- /**
40
- * Customization options
41
- */
42
- export interface MessagingCustomization {
43
- theme?: 'light' | 'dark' | 'auto';
44
- accentColor?: string;
45
- showParticipantStatus?: boolean;
46
- }
47
- /**
48
- * Main MessagingShell component props
49
- */
50
- export interface MessagingShellProps {
51
- capabilities?: MessagingCapabilities;
52
- customization?: MessagingCustomization;
53
- className?: string;
54
- renderMessageInputActions?: (channel: Channel) => React.ReactNode;
55
- onChannelSelect?: (channel: Channel) => void;
56
- onParticipantSelect?: (participant: Participant) => void;
57
- /**
58
- * Auto-select a conversation with this participant on mount.
59
- * Useful for deep-linking to a specific conversation (e.g., /messages/[accountUuid])
60
- *
61
- * If a channel with this participant exists, it will be auto-selected.
62
- * If no channel exists, you can provide initialParticipantData to automatically
63
- * create the channel using the existing ChannelCreator.
64
- */
65
- initialParticipantFilter?: string;
66
- /**
67
- * Participant data for auto-creating a channel when initialParticipantFilter
68
- * is provided but no channel exists. If this is provided, MessagingShell will
69
- * automatically call service.startChannelWithParticipant() to create the channel.
70
- *
71
- * This reuses the existing ChannelCreator from StreamChatServiceConfig.
72
- */
73
- initialParticipantData?: Participant;
74
- /**
75
- * Custom empty state component to render when a channel has no messages.
76
- * Useful for showing FAQs or other contextual information in empty channels.
77
- */
78
- CustomChannelEmptyState?: React.ComponentType;
79
- /**
80
- * Controls whether the channel list is shown. When false, the channel list
81
- * is immediately hidden. Useful for direct conversation mode where you want
82
- * to show only the channel view without the list.
83
- */
84
- showChannelList?: boolean;
85
- }
86
- /**
87
- * ChannelList component props
88
- */
89
- export interface ChannelListProps {
90
- onChannelSelect: (channel: Channel) => void;
91
- selectedChannel?: Channel;
92
- showStartConversation?: boolean;
93
- onStartConversation?: () => void;
94
- participantLabel?: string;
95
- className?: string;
96
- }
97
- /**
98
- * ChannelView component props
99
- */
100
- export interface ChannelViewProps {
101
- channel: Channel;
102
- onBack?: () => void;
103
- showBackButton?: boolean;
104
- renderMessageInputActions?: (channel: Channel) => React.ReactNode;
105
- onLeaveConversation?: (channel: Channel) => void;
106
- onBlockParticipant?: (participantId?: string) => void;
107
- className?: string;
108
- CustomChannelEmptyState?: React.ComponentType;
109
- }
110
- /**
111
- * ParticipantPicker component props
112
- */
113
- export interface ParticipantPickerProps {
114
- participantSource: ParticipantSource;
115
- onSelectParticipant: (participant: Participant) => void;
116
- onClose: () => void;
117
- existingParticipantIds?: Set<string>;
118
- participantLabel?: string;
119
- searchPlaceholder?: string;
120
- className?: string;
121
- }
122
- /**
123
- * MessagingProvider component props
124
- */
125
- export interface MessagingProviderProps {
126
- children: React.ReactNode;
127
- user: MessagingUser | null;
128
- serviceConfig: Omit<StreamChatServiceConfig, 'apiKey'>;
129
- apiKey: string;
130
- capabilities?: MessagingCapabilities;
131
- customization?: MessagingCustomization;
132
- debug?: boolean;
133
- }
134
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceR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