@usechat/react-native 1.0.8 → 1.0.9

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.js CHANGED
@@ -4454,16 +4454,6 @@ var ChatAvatar = ({
4454
4454
  return { width: 48, height: 48 };
4455
4455
  }
4456
4456
  };
4457
- const getTextSize = () => {
4458
- switch (size) {
4459
- case "small":
4460
- return theme.typography.fontSize.sm;
4461
- case "large":
4462
- return theme.typography.fontSize.xxl;
4463
- default:
4464
- return theme.typography.fontSize.lg;
4465
- }
4466
- };
4467
4457
  const getIndicatorSize = () => {
4468
4458
  switch (size) {
4469
4459
  case "small":
@@ -4477,25 +4467,16 @@ var ChatAvatar = ({
4477
4467
  const avatarSize = getAvatarSize();
4478
4468
  const indicatorSize = getIndicatorSize();
4479
4469
  return <import_react_native19.View style={{ position: "relative" }}>
4470
+ <import_react_native19.Image
4471
+ source={{ uri: avatar }}
4472
+ style={[
4473
+ avatarSize,
4480
4474
  {
4481
- /* Avatar */
4482
- }
4483
- <import_react_native19.View style={[
4484
- avatarSize,
4485
- {
4486
- borderRadius: theme.borderRadius.full,
4487
- backgroundColor: theme.colors.gray[200],
4488
- alignItems: "center",
4489
- justifyContent: "center"
4490
- }
4491
- ]}>
4492
- <import_react_native19.Text style={{
4493
- fontSize: getTextSize(),
4494
- color: theme.colors.text
4495
- }}>
4496
- {avatar}
4497
- </import_react_native19.Text>
4498
- </import_react_native19.View>
4475
+ borderRadius: theme.borderRadius.full
4476
+ }
4477
+ ]}
4478
+ resizeMode="cover"
4479
+ />
4499
4480
 
4500
4481
  {
4501
4482
  /* Online indicator */
package/dist/index.mjs CHANGED
@@ -4344,10 +4344,10 @@ function requireAuthHook(hookFn) {
4344
4344
  import { FlatList as FlatList2 } from "react-native";
4345
4345
 
4346
4346
  // src/components/chat-list/ChatItem.tsx
4347
- import { View as View17, Text as Text13, TouchableOpacity as TouchableOpacity9 } from "react-native";
4347
+ import { View as View17, Text as Text12, TouchableOpacity as TouchableOpacity9 } from "react-native";
4348
4348
 
4349
4349
  // src/components/shared/ChatAvatar.tsx
4350
- import { View as View16, Text as Text12 } from "react-native";
4350
+ import { View as View16, Image as Image6 } from "react-native";
4351
4351
  var ChatAvatar = ({
4352
4352
  avatar,
4353
4353
  isOnline = false,
@@ -4364,16 +4364,6 @@ var ChatAvatar = ({
4364
4364
  return { width: 48, height: 48 };
4365
4365
  }
4366
4366
  };
4367
- const getTextSize = () => {
4368
- switch (size) {
4369
- case "small":
4370
- return theme.typography.fontSize.sm;
4371
- case "large":
4372
- return theme.typography.fontSize.xxl;
4373
- default:
4374
- return theme.typography.fontSize.lg;
4375
- }
4376
- };
4377
4367
  const getIndicatorSize = () => {
4378
4368
  switch (size) {
4379
4369
  case "small":
@@ -4387,25 +4377,16 @@ var ChatAvatar = ({
4387
4377
  const avatarSize = getAvatarSize();
4388
4378
  const indicatorSize = getIndicatorSize();
4389
4379
  return <View16 style={{ position: "relative" }}>
4380
+ <Image6
4381
+ source={{ uri: avatar }}
4382
+ style={[
4383
+ avatarSize,
4390
4384
  {
4391
- /* Avatar */
4392
- }
4393
- <View16 style={[
4394
- avatarSize,
4395
- {
4396
- borderRadius: theme.borderRadius.full,
4397
- backgroundColor: theme.colors.gray[200],
4398
- alignItems: "center",
4399
- justifyContent: "center"
4400
- }
4401
- ]}>
4402
- <Text12 style={{
4403
- fontSize: getTextSize(),
4404
- color: theme.colors.text
4405
- }}>
4406
- {avatar}
4407
- </Text12>
4408
- </View16>
4385
+ borderRadius: theme.borderRadius.full
4386
+ }
4387
+ ]}
4388
+ resizeMode="cover"
4389
+ />
4409
4390
 
4410
4391
  {
4411
4392
  /* Online indicator */
@@ -4460,22 +4441,22 @@ var ChatItem = ({ item, onPress }) => {
4460
4441
  alignItems: "center",
4461
4442
  marginBottom: theme.spacing.xs
4462
4443
  }}>
4463
- <Text13 style={{
4444
+ <Text12 style={{
4464
4445
  fontSize: theme.typography.fontSize.base,
4465
4446
  flex: 1,
4466
4447
  fontWeight: hasUnreadMessages ? theme.typography.fontWeight.bold : theme.typography.fontWeight.semibold,
4467
4448
  color: theme.colors.text
4468
4449
  }}>
4469
4450
  {item.name}
4470
- </Text13>
4471
- <Text13 style={{
4451
+ </Text12>
4452
+ <Text12 style={{
4472
4453
  fontSize: theme.typography.fontSize.sm,
4473
4454
  marginLeft: theme.spacing.sm,
4474
4455
  color: hasUnreadMessages ? theme.colors.gray[700] : theme.colors.textSecondary,
4475
4456
  fontWeight: hasUnreadMessages ? theme.typography.fontWeight.medium : theme.typography.fontWeight.normal
4476
4457
  }}>
4477
4458
  {item.time}
4478
- </Text13>
4459
+ </Text12>
4479
4460
  </View17>
4480
4461
 
4481
4462
  {
@@ -4485,14 +4466,14 @@ var ChatItem = ({ item, onPress }) => {
4485
4466
  flexDirection: "row",
4486
4467
  alignItems: "center"
4487
4468
  }}>
4488
- <Text13 style={{
4469
+ <Text12 style={{
4489
4470
  fontSize: theme.typography.fontSize.sm,
4490
4471
  flex: 1,
4491
4472
  color: hasUnreadMessages ? theme.colors.gray[800] : theme.colors.textSecondary,
4492
4473
  fontWeight: hasUnreadMessages ? theme.typography.fontWeight.medium : theme.typography.fontWeight.normal
4493
4474
  }} numberOfLines={1}>
4494
4475
  {item.message}
4495
- </Text13>
4476
+ </Text12>
4496
4477
  {item.unreadCount && <View17 style={{
4497
4478
  width: 20,
4498
4479
  height: 20,
@@ -4502,13 +4483,13 @@ var ChatItem = ({ item, onPress }) => {
4502
4483
  justifyContent: "center",
4503
4484
  marginLeft: theme.spacing.sm
4504
4485
  }}>
4505
- <Text13 style={{
4486
+ <Text12 style={{
4506
4487
  fontSize: theme.typography.fontSize.xs,
4507
4488
  color: "white",
4508
4489
  fontWeight: theme.typography.fontWeight.bold
4509
4490
  }}>
4510
4491
  {item.unreadCount}
4511
- </Text13>
4492
+ </Text12>
4512
4493
  </View17>}
4513
4494
  </View17>
4514
4495
  </View17>
@@ -4530,7 +4511,7 @@ var ChatListBase = ({ chats, onChatPress }) => {
4530
4511
  var ChatList_default = ChatListBase;
4531
4512
 
4532
4513
  // src/components/chat-list/ChatHeader.tsx
4533
- import { View as View18, Text as Text14 } from "react-native";
4514
+ import { View as View18, Text as Text13 } from "react-native";
4534
4515
  var ChatHeader = ({ title }) => {
4535
4516
  const theme = useTheme();
4536
4517
  return <View18 style={{
@@ -4540,13 +4521,13 @@ var ChatHeader = ({ title }) => {
4540
4521
  borderBottomWidth: 1,
4541
4522
  borderBottomColor: theme.colors.borderLight
4542
4523
  }}>
4543
- <Text14 style={{
4524
+ <Text13 style={{
4544
4525
  fontSize: theme.typography.fontSize.xxl,
4545
4526
  fontWeight: theme.typography.fontWeight.bold,
4546
4527
  color: theme.colors.text
4547
4528
  }}>
4548
4529
  {title}
4549
- </Text14>
4530
+ </Text13>
4550
4531
  </View18>;
4551
4532
  };
4552
4533
  var ChatHeader_default = ChatHeader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usechat/react-native",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Modular React Native Chat UI SDK with keyboard handling, customizable components, and rich features",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Lukasz Ko <hello@usechat.dev>",