@linktr.ee/messaging-react 1.0.2 → 1.1.0-rc-1760927977

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 (39) hide show
  1. package/dist/assets/index.css +1 -0
  2. package/dist/index.d.ts +2 -1
  3. package/dist/index.js +836 -1079
  4. package/dist/index.js.map +1 -1
  5. package/package.json +4 -3
  6. package/src/components/ActionButton/ActionButton.stories.tsx +2 -1
  7. package/src/components/ActionButton/ActionButton.test.tsx +2 -0
  8. package/src/components/Avatar/Avatar.stories.tsx +2 -1
  9. package/src/components/Avatar/index.tsx +2 -1
  10. package/src/components/ChannelList/ChannelList.stories.tsx +4 -2
  11. package/src/components/ChannelList/CustomChannelPreview.stories.tsx +31 -27
  12. package/src/components/ChannelList/CustomChannelPreview.tsx +5 -11
  13. package/src/components/ChannelList/index.tsx +43 -35
  14. package/src/components/ChannelView.tsx +150 -127
  15. package/src/components/CloseButton/index.tsx +4 -5
  16. package/src/components/IconButton/IconButton.stories.tsx +3 -3
  17. package/src/components/Loading/Loading.stories.tsx +2 -1
  18. package/src/components/Loading/index.tsx +7 -9
  19. package/src/components/MessagingShell/EmptyState.stories.tsx +2 -1
  20. package/src/components/MessagingShell/ErrorState.stories.tsx +2 -1
  21. package/src/components/MessagingShell/LoadingState.stories.tsx +2 -1
  22. package/src/components/MessagingShell/LoadingState.tsx +3 -5
  23. package/src/components/MessagingShell/index.tsx +159 -135
  24. package/src/components/ParticipantPicker/ParticipantItem.stories.tsx +4 -2
  25. package/src/components/ParticipantPicker/ParticipantItem.tsx +25 -21
  26. package/src/components/ParticipantPicker/ParticipantPicker.stories.tsx +4 -2
  27. package/src/components/ParticipantPicker/ParticipantPicker.tsx +104 -76
  28. package/src/components/ParticipantPicker/index.tsx +93 -72
  29. package/src/components/SearchInput/SearchInput.stories.tsx +2 -1
  30. package/src/components/SearchInput/SearchInput.test.tsx +4 -2
  31. package/src/components/SearchInput/index.tsx +14 -15
  32. package/src/hooks/useParticipants.ts +1 -0
  33. package/src/index.ts +3 -0
  34. package/src/providers/MessagingProvider.tsx +213 -135
  35. package/src/stories/mocks.tsx +18 -19
  36. package/src/styles.css +75 -0
  37. package/src/test/setup.ts +11 -12
  38. package/src/test/utils.tsx +6 -7
  39. package/src/types.ts +1 -1
@@ -1,5 +1,5 @@
1
- import { render, RenderOptions, RenderResult } from '@testing-library/react';
2
- import { ReactElement, ReactNode } from 'react';
1
+ import { render, RenderOptions, RenderResult } from '@testing-library/react'
2
+ import { ReactElement, ReactNode } from 'react'
3
3
 
4
4
  /**
5
5
  * Custom render function that wraps components with common providers
@@ -9,15 +9,14 @@ export function renderWithProviders(
9
9
  options?: Omit<RenderOptions, 'wrapper'>
10
10
  ): RenderResult {
11
11
  function Wrapper({ children }: { children: ReactNode }) {
12
- return <>{children}</>;
12
+ return <>{children}</>
13
13
  }
14
14
 
15
- return render(ui, { wrapper: Wrapper, ...options });
15
+ return render(ui, { wrapper: Wrapper, ...options })
16
16
  }
17
17
 
18
18
  /**
19
19
  * Re-export everything from React Testing Library
20
20
  */
21
- export * from '@testing-library/react';
22
- export { default as userEvent } from '@testing-library/user-event';
23
-
21
+ export * from '@testing-library/react'
22
+ export { default as userEvent } from '@testing-library/user-event'
package/src/types.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Channel } from 'stream-chat';
2
1
  import type { MessagingUser, StreamChatServiceConfig } from '@linktr.ee/messaging-core';
2
+ import type { Channel } from 'stream-chat';
3
3
 
4
4
  /**
5
5
  * Generic participant interface for different host environments