@poolse/react-native 3.6.0 → 3.6.2

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.cts CHANGED
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { GroupPosition } from '@poolse/react';
6
6
  import { StyleProp, ViewStyle } from 'react-native';
7
7
  import { ThemeInput, ColorSchemePreference, NativeThemeOptions, NativeTheme } from '@poolse/theme';
8
+ export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, FlatThemeTokens, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
8
9
 
9
10
  interface InboxUser {
10
11
  /** The user's external_id (the same id you mint JWTs with). */
@@ -815,6 +816,8 @@ interface ThreadViewProps {
815
816
  /** Row layout for the root and replies — see `ChatLayout`. Defaults to `'bubbles'`. */
816
817
  layout?: ChatLayout;
817
818
  timeFormat?: TimeFormat;
819
+ /** Row spacing for the root and replies, as on `ConversationView`. */
820
+ density?: ChatDensity;
818
821
  /** Presence badges on reply avatars. Defaults to `false`. */
819
822
  showPresence?: boolean;
820
823
  /** Link previews under replies. Defaults to `true`. */
@@ -835,7 +838,7 @@ interface ThreadViewProps {
835
838
  * sheet top (the gutter), since KAV measures its frame relative to
836
839
  * its parent (the sheet), not the screen.
837
840
  */
838
- declare function ThreadView({ visible, onClose, conversationId, rootMessage, labelFor, avatarFor, layout, timeFormat, showPresence, linkPreviews, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
841
+ declare function ThreadView({ visible, onClose, conversationId, rootMessage, labelFor, avatarFor, layout, timeFormat, density, showPresence, linkPreviews, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
839
842
 
840
843
  interface ThreadSummaryProps {
841
844
  /** The thread's root: `reply_count`, `last_reply_at`, `thread_participants`. */
@@ -1621,6 +1624,11 @@ declare function PoolseTheme({ theme, colorScheme, mode, fonts, children }: Pool
1621
1624
  * `<PoolseTheme>` ancestor: the default light palette.
1622
1625
  */
1623
1626
  declare function useTheme(): NativeTheme;
1627
+ /**
1628
+ * @deprecated Use `useTheme()`. The active theme in the original shape
1629
+ * (`colors.brand`, `colors.ink`, `type.fontBody`, …).
1630
+ */
1631
+ declare function usePoolseTheme(): PoolseRNTheme;
1624
1632
 
1625
1633
  declare const defaultLightTheme: PoolseRNTheme;
1626
1634
  declare const defaultDarkTheme: PoolseRNTheme;
@@ -1807,4 +1815,4 @@ declare const callColors: {
1807
1815
  */
1808
1816
  declare function useCallDuration(connected: boolean): string | null;
1809
1817
 
1810
- export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, useTheme };
1818
+ export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { GroupPosition } from '@poolse/react';
6
6
  import { StyleProp, ViewStyle } from 'react-native';
7
7
  import { ThemeInput, ColorSchemePreference, NativeThemeOptions, NativeTheme } from '@poolse/theme';
8
+ export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, FlatThemeTokens, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
8
9
 
9
10
  interface InboxUser {
10
11
  /** The user's external_id (the same id you mint JWTs with). */
@@ -815,6 +816,8 @@ interface ThreadViewProps {
815
816
  /** Row layout for the root and replies — see `ChatLayout`. Defaults to `'bubbles'`. */
816
817
  layout?: ChatLayout;
817
818
  timeFormat?: TimeFormat;
819
+ /** Row spacing for the root and replies, as on `ConversationView`. */
820
+ density?: ChatDensity;
818
821
  /** Presence badges on reply avatars. Defaults to `false`. */
819
822
  showPresence?: boolean;
820
823
  /** Link previews under replies. Defaults to `true`. */
@@ -835,7 +838,7 @@ interface ThreadViewProps {
835
838
  * sheet top (the gutter), since KAV measures its frame relative to
836
839
  * its parent (the sheet), not the screen.
837
840
  */
838
- declare function ThreadView({ visible, onClose, conversationId, rootMessage, labelFor, avatarFor, layout, timeFormat, showPresence, linkPreviews, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
841
+ declare function ThreadView({ visible, onClose, conversationId, rootMessage, labelFor, avatarFor, layout, timeFormat, density, showPresence, linkPreviews, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
839
842
 
840
843
  interface ThreadSummaryProps {
841
844
  /** The thread's root: `reply_count`, `last_reply_at`, `thread_participants`. */
@@ -1621,6 +1624,11 @@ declare function PoolseTheme({ theme, colorScheme, mode, fonts, children }: Pool
1621
1624
  * `<PoolseTheme>` ancestor: the default light palette.
1622
1625
  */
1623
1626
  declare function useTheme(): NativeTheme;
1627
+ /**
1628
+ * @deprecated Use `useTheme()`. The active theme in the original shape
1629
+ * (`colors.brand`, `colors.ink`, `type.fontBody`, …).
1630
+ */
1631
+ declare function usePoolseTheme(): PoolseRNTheme;
1624
1632
 
1625
1633
  declare const defaultLightTheme: PoolseRNTheme;
1626
1634
  declare const defaultDarkTheme: PoolseRNTheme;
@@ -1807,4 +1815,4 @@ declare const callColors: {
1807
1815
  */
1808
1816
  declare function useCallDuration(connected: boolean): string | null;
1809
1817
 
1810
- export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, useTheme };
1818
+ export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEf
3
3
  import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Keyboard, Platform, ScrollView, Modal, AppState, ActivityIndicator, SectionList, FlatList, KeyboardAvoidingView, Image, Linking, useColorScheme } from 'react-native';
4
4
  import { SvgXml, Svg, Path, Circle, G } from 'react-native-svg';
5
5
  import { toNativeTheme, isBuiltInThemeId } from '@poolse/theme';
6
+ export { BUILT_IN_THEME_IDS, DEFAULT_THEME_ID, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
6
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
8
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
9
  import * as ImagePicker from 'expo-image-picker';
@@ -360,7 +361,9 @@ function resolveThemeValue(selection, scheme) {
360
361
  }
361
362
  var ThemeContext = createContext(null);
362
363
  var FALLBACK = {
363
- native: legacyToNative(defaultLightTheme)};
364
+ native: legacyToNative(defaultLightTheme),
365
+ legacy: defaultLightTheme
366
+ };
364
367
  function PoolseTheme({ theme, colorScheme, mode, fonts, children }) {
365
368
  const system = useColorScheme() === "dark" ? "dark" : "light";
366
369
  const scheme = selectedScheme({ theme, colorScheme, mode }, system);
@@ -386,6 +389,9 @@ function PoolseTheme({ theme, colorScheme, mode, fonts, children }) {
386
389
  function useTheme() {
387
390
  return (useContext(ThemeContext) ?? FALLBACK).native;
388
391
  }
392
+ function usePoolseTheme() {
393
+ return (useContext(ThemeContext) ?? FALLBACK).legacy;
394
+ }
389
395
 
390
396
  // src/primitives/icons-data.ts
391
397
  var ICONS = {
@@ -6253,6 +6259,7 @@ function ThreadView({
6253
6259
  avatarFor,
6254
6260
  layout,
6255
6261
  timeFormat,
6262
+ density,
6256
6263
  showPresence = false,
6257
6264
  linkPreviews = true
6258
6265
  }) {
@@ -6274,6 +6281,7 @@ function ThreadView({
6274
6281
  ...avatarFor ? { avatarFor } : {},
6275
6282
  ...layout ? { layout } : {},
6276
6283
  ...timeFormat ? { timeFormat } : {},
6284
+ ...density ? { density } : {},
6277
6285
  showPresence,
6278
6286
  linkPreviews
6279
6287
  }
@@ -6289,6 +6297,7 @@ function ThreadSheet({
6289
6297
  avatarFor,
6290
6298
  layout,
6291
6299
  timeFormat,
6300
+ density,
6292
6301
  showPresence,
6293
6302
  linkPreviews
6294
6303
  }) {
@@ -6339,6 +6348,7 @@ function ThreadSheet({
6339
6348
  ...avatarFor ? { avatarFor } : {},
6340
6349
  ...layout ? { layout } : {},
6341
6350
  ...timeFormat ? { timeFormat } : {},
6351
+ ...density ? { density } : {},
6342
6352
  showPresence,
6343
6353
  linkPreviews,
6344
6354
  ...linkPreviews && isSelf && !msg.deleted_at && (msg.link_previews?.length ?? 0) > 0 ? {
@@ -6355,6 +6365,7 @@ function ThreadSheet({
6355
6365
  avatarFor,
6356
6366
  layout,
6357
6367
  timeFormat,
6368
+ density,
6358
6369
  showPresence,
6359
6370
  linkPreviews,
6360
6371
  chat
@@ -6379,6 +6390,7 @@ function ThreadSheet({
6379
6390
  ...avatarFor ? { avatarFor } : {},
6380
6391
  ...layout ? { layout } : {},
6381
6392
  ...timeFormat ? { timeFormat } : {},
6393
+ ...density ? { density } : {},
6382
6394
  linkPreviews
6383
6395
  }
6384
6396
  ),
@@ -7400,8 +7412,10 @@ function ConversationView({
7400
7412
  conversationId,
7401
7413
  rootMessage: threadRoot,
7402
7414
  ...labelFor ? { labelFor } : {},
7415
+ ...avatarFor ? { avatarFor } : {},
7403
7416
  layout,
7404
7417
  ...timeFormat ? { timeFormat } : {},
7418
+ density,
7405
7419
  showPresence,
7406
7420
  linkPreviews
7407
7421
  }
@@ -8666,6 +8680,6 @@ function format(total) {
8666
8680
  return `${hours > 0 ? `${hours}:` : ""}${mm}:${String(seconds).padStart(2, "0")}`;
8667
8681
  }
8668
8682
 
8669
- export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, ChatHeader, ConversationList, ConversationView, DaySeparator, EditHistorySheet, EmojiPicker, GroupDetailsSheet, ImageMosaic, LinkPreviewCard, LiveCallBanner, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, NewMessagesDivider, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, PresenceBadge, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadSummary, ThreadView, TypingIndicator, UploadQueueStrip, UserName, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, useTheme };
8683
+ export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, ChatHeader, ConversationList, ConversationView, DaySeparator, EditHistorySheet, EmojiPicker, GroupDetailsSheet, ImageMosaic, LinkPreviewCard, LiveCallBanner, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, NewMessagesDivider, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, PresenceBadge, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadSummary, ThreadView, TypingIndicator, UploadQueueStrip, UserName, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
8670
8684
  //# sourceMappingURL=index.js.map
8671
8685
  //# sourceMappingURL=index.js.map