@usechat/react-native 1.0.14 → 1.0.15

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/index.d.mts CHANGED
@@ -543,6 +543,10 @@ interface TranslationKeys {
543
543
  'time.weeksAgo': string;
544
544
  'time.monthsAgo': string;
545
545
  'time.yearsAgo': string;
546
+ 'date.today': string;
547
+ 'date.yesterday': string;
548
+ 'date.todayWithTime': string;
549
+ 'date.yesterdayWithTime': string;
546
550
  }
547
551
  /**
548
552
  * Supported locales
@@ -787,5 +791,12 @@ declare const useMessageReactions: (config?: MessageListConfig | undefined) => {
787
791
  };
788
792
  declare const useAttachments: (options?: UseAttachmentsOptions | undefined) => UseAttachmentsReturn;
789
793
  declare const useMessageInput: <T = string>(config?: MessageInputConfig<T> | undefined) => UseMessageInputReturn<T>;
794
+ declare const useDateFormatter: () => {
795
+ formatDate: (dateStr: string) => string;
796
+ formatTime: (timestamp: string) => string;
797
+ formatRelative: (timestamp: string) => string;
798
+ formatDateTimeWithTime: (timestamp: string) => string;
799
+ groupMessages: (messages: Message[]) => MessageListItem[];
800
+ };
790
801
 
791
- export { AttachmentMenu, type AttachmentResult, Chat, ChatAvatar, type ChatConfig, ChatHeader, type ChatHeaderProps, type ChatInitConfig, type ChatInitResponse, ChatItem, ChatList, ChatListSearchBar, type ChatListSearchBarProps, type ChatProps, ChatProvider, ChatScreenHeader, type I18nConfig, type I18nContextValue, I18nProvider, type Message$1 as Message, MessageInput, type MessageInputRef, MessageList, type MessageListRef, type SupportedLocale, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ThemeSpacing, type ThemeTypography, type TranslationFunction, type TranslationKeys, TypingIndicator, type TypingIndicatorProps, defaultTheme, defaultTranslations, getAuthState, getProjectId, getTranslation, initChat, isInitialized, isSupportedLocale, useAttachments, useChatConfig, useChatMessages, useChatSDK, useMessageActions, useMessageInput, useMessageList, useMessageReactions, useTheme, useTranslation, useTranslationFunction };
802
+ export { AttachmentMenu, type AttachmentResult, Chat, ChatAvatar, type ChatConfig, ChatHeader, type ChatHeaderProps, type ChatInitConfig, type ChatInitResponse, ChatItem, ChatList, ChatListSearchBar, type ChatListSearchBarProps, type ChatProps, ChatProvider, ChatScreenHeader, type I18nConfig, type I18nContextValue, I18nProvider, type Message$1 as Message, MessageInput, type MessageInputRef, MessageList, type MessageListRef, type SupportedLocale, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ThemeSpacing, type ThemeTypography, type TranslationFunction, type TranslationKeys, TypingIndicator, type TypingIndicatorProps, defaultTheme, defaultTranslations, getAuthState, getProjectId, getTranslation, initChat, isInitialized, isSupportedLocale, useAttachments, useChatConfig, useChatMessages, useChatSDK, useDateFormatter, useMessageActions, useMessageInput, useMessageList, useMessageReactions, useTheme, useTranslation, useTranslationFunction };
package/dist/index.d.ts CHANGED
@@ -543,6 +543,10 @@ interface TranslationKeys {
543
543
  'time.weeksAgo': string;
544
544
  'time.monthsAgo': string;
545
545
  'time.yearsAgo': string;
546
+ 'date.today': string;
547
+ 'date.yesterday': string;
548
+ 'date.todayWithTime': string;
549
+ 'date.yesterdayWithTime': string;
546
550
  }
547
551
  /**
548
552
  * Supported locales
@@ -787,5 +791,12 @@ declare const useMessageReactions: (config?: MessageListConfig | undefined) => {
787
791
  };
788
792
  declare const useAttachments: (options?: UseAttachmentsOptions | undefined) => UseAttachmentsReturn;
789
793
  declare const useMessageInput: <T = string>(config?: MessageInputConfig<T> | undefined) => UseMessageInputReturn<T>;
794
+ declare const useDateFormatter: () => {
795
+ formatDate: (dateStr: string) => string;
796
+ formatTime: (timestamp: string) => string;
797
+ formatRelative: (timestamp: string) => string;
798
+ formatDateTimeWithTime: (timestamp: string) => string;
799
+ groupMessages: (messages: Message[]) => MessageListItem[];
800
+ };
790
801
 
791
- export { AttachmentMenu, type AttachmentResult, Chat, ChatAvatar, type ChatConfig, ChatHeader, type ChatHeaderProps, type ChatInitConfig, type ChatInitResponse, ChatItem, ChatList, ChatListSearchBar, type ChatListSearchBarProps, type ChatProps, ChatProvider, ChatScreenHeader, type I18nConfig, type I18nContextValue, I18nProvider, type Message$1 as Message, MessageInput, type MessageInputRef, MessageList, type MessageListRef, type SupportedLocale, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ThemeSpacing, type ThemeTypography, type TranslationFunction, type TranslationKeys, TypingIndicator, type TypingIndicatorProps, defaultTheme, defaultTranslations, getAuthState, getProjectId, getTranslation, initChat, isInitialized, isSupportedLocale, useAttachments, useChatConfig, useChatMessages, useChatSDK, useMessageActions, useMessageInput, useMessageList, useMessageReactions, useTheme, useTranslation, useTranslationFunction };
802
+ export { AttachmentMenu, type AttachmentResult, Chat, ChatAvatar, type ChatConfig, ChatHeader, type ChatHeaderProps, type ChatInitConfig, type ChatInitResponse, ChatItem, ChatList, ChatListSearchBar, type ChatListSearchBarProps, type ChatProps, ChatProvider, ChatScreenHeader, type I18nConfig, type I18nContextValue, I18nProvider, type Message$1 as Message, MessageInput, type MessageInputRef, MessageList, type MessageListRef, type SupportedLocale, type Theme, type ThemeBorderRadius, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ThemeSpacing, type ThemeTypography, type TranslationFunction, type TranslationKeys, TypingIndicator, type TypingIndicatorProps, defaultTheme, defaultTranslations, getAuthState, getProjectId, getTranslation, initChat, isInitialized, isSupportedLocale, useAttachments, useChatConfig, useChatMessages, useChatSDK, useDateFormatter, useMessageActions, useMessageInput, useMessageList, useMessageReactions, useTheme, useTranslation, useTranslationFunction };