@banbox/chat 1.0.1 → 1.0.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.
package/dist/index.d.cts CHANGED
@@ -334,6 +334,43 @@ type ChatUIState = {
334
334
  declare const ChatUIContext: React$1.Context<ChatUIState | null>;
335
335
  declare function useChatUI(): ChatUIState;
336
336
 
337
+ type MessageRef = {
338
+ id: string;
339
+ author: string | {
340
+ name: string;
341
+ };
342
+ time?: string;
343
+ text?: string;
344
+ images?: string[];
345
+ files?: MessageFile[];
346
+ audio?: MessageAudio;
347
+ };
348
+ type BusinessCard = {
349
+ avatarSrc?: string;
350
+ name: string;
351
+ country?: string;
352
+ flag?: string;
353
+ company?: string;
354
+ email?: string;
355
+ phone?: string;
356
+ [key: string]: string | undefined;
357
+ };
358
+ type AddressCard = {
359
+ name?: string;
360
+ label?: string;
361
+ businessName?: string;
362
+ mobileNumber?: string;
363
+ country?: string;
364
+ district?: string | null;
365
+ policeStation?: string | null;
366
+ state?: string | null;
367
+ city?: string | null;
368
+ postalCode?: string;
369
+ addressLine?: string;
370
+ landMark?: string | null;
371
+ [key: string]: string | null | undefined;
372
+ };
373
+
337
374
  type FooterAction = {
338
375
  key: "attachment" | "emoji" | "businessCard" | "addressCard" | "translate" | string;
339
376
  title: string;
@@ -353,7 +390,7 @@ type Props$8 = {
353
390
  className?: string;
354
391
  maxRows?: number;
355
392
  /** The message being replied to */
356
- replyTo?: MessageRef$1;
393
+ replyTo?: MessageRef;
357
394
  clearReply?: () => void;
358
395
  };
359
396
  declare const ChatFooter: React__default.FC<Props$8>;
@@ -394,42 +431,7 @@ type LogoVariant = BaseProps & {
394
431
  ringColor?: string;
395
432
  };
396
433
  type ChatIdentityProps = AvatarVariant | InitialVariant | LogoVariant;
397
- declare const ChatIdentity: (props: ChatIdentityProps) => React$1.JSX.Element;
398
-
399
- type MessageRef = {
400
- id: string;
401
- author: string | {
402
- name: string;
403
- };
404
- time?: string;
405
- text?: string;
406
- images?: string[];
407
- files?: ChatFile[];
408
- audio?: ChatAudio;
409
- };
410
- type BusinessCard = {
411
- avatarSrc: string;
412
- name: string;
413
- country: string;
414
- flag?: string;
415
- company: string;
416
- email: string;
417
- phone: string;
418
- };
419
- type AddressCard = {
420
- name: string;
421
- label?: "Home" | "Office";
422
- businessName?: string;
423
- mobileNumber: string;
424
- country: string;
425
- district?: string | null;
426
- policeStation?: string | null;
427
- state?: string | null;
428
- city?: string | null;
429
- postalCode?: string;
430
- addressLine: string;
431
- landMark?: string | null;
432
- };
434
+ declare const ChatIdentity: React__default.FC<ChatIdentityProps>;
433
435
 
434
436
  type ChatAudio = {
435
437
  src?: string;
@@ -462,7 +464,7 @@ type ChatMessageItemProps = {
462
464
  onTranslate?: () => void;
463
465
  initialSrc?: string;
464
466
  };
465
- declare const ChatMessageItem: ({ id, mine, time, authorInitial, avatarBg, text, businessCard, addressCard, images, files, audio, replyTo, showStatus, status, className, onReply, onTranslate, initialSrc, }: ChatMessageItemProps) => React$1.JSX.Element;
467
+ declare const ChatMessageItem: React__default.FC<ChatMessageItemProps>;
466
468
 
467
469
  type Props$6 = {
468
470
  top?: React__default.ReactNode;
@@ -494,19 +496,19 @@ type Props$5 = {
494
496
  status: ChatThreadStatus;
495
497
  avatarText: string;
496
498
  avatarSrc?: string;
497
- size?: number;
499
+ _size?: number;
498
500
  avatarBg?: string;
499
501
  className?: string;
500
502
  onClick?: () => void;
501
503
  };
502
- declare const ChatThreadItem: ({ active, pinned, online, verified, title, preview, time, status, avatarText, avatarSrc, avatarBg, className, onClick, }: Props$5) => React$1.JSX.Element;
504
+ declare const ChatThreadItem: React__default.FC<Props$5>;
503
505
 
504
506
  type Props$4 = {
505
507
  className?: string;
506
508
  onClose?: () => void;
507
509
  onSearchChange?: (value: string) => void;
508
510
  };
509
- declare const ChatListHeader: ({ className, onClose, onSearchChange }: Props$4) => React$1.JSX.Element;
511
+ declare const ChatListHeader: React__default.FC<Props$4>;
510
512
 
511
513
  type Props$3 = {
512
514
  id?: string;
package/dist/index.d.ts CHANGED
@@ -334,6 +334,43 @@ type ChatUIState = {
334
334
  declare const ChatUIContext: React$1.Context<ChatUIState | null>;
335
335
  declare function useChatUI(): ChatUIState;
336
336
 
337
+ type MessageRef = {
338
+ id: string;
339
+ author: string | {
340
+ name: string;
341
+ };
342
+ time?: string;
343
+ text?: string;
344
+ images?: string[];
345
+ files?: MessageFile[];
346
+ audio?: MessageAudio;
347
+ };
348
+ type BusinessCard = {
349
+ avatarSrc?: string;
350
+ name: string;
351
+ country?: string;
352
+ flag?: string;
353
+ company?: string;
354
+ email?: string;
355
+ phone?: string;
356
+ [key: string]: string | undefined;
357
+ };
358
+ type AddressCard = {
359
+ name?: string;
360
+ label?: string;
361
+ businessName?: string;
362
+ mobileNumber?: string;
363
+ country?: string;
364
+ district?: string | null;
365
+ policeStation?: string | null;
366
+ state?: string | null;
367
+ city?: string | null;
368
+ postalCode?: string;
369
+ addressLine?: string;
370
+ landMark?: string | null;
371
+ [key: string]: string | null | undefined;
372
+ };
373
+
337
374
  type FooterAction = {
338
375
  key: "attachment" | "emoji" | "businessCard" | "addressCard" | "translate" | string;
339
376
  title: string;
@@ -353,7 +390,7 @@ type Props$8 = {
353
390
  className?: string;
354
391
  maxRows?: number;
355
392
  /** The message being replied to */
356
- replyTo?: MessageRef$1;
393
+ replyTo?: MessageRef;
357
394
  clearReply?: () => void;
358
395
  };
359
396
  declare const ChatFooter: React__default.FC<Props$8>;
@@ -394,42 +431,7 @@ type LogoVariant = BaseProps & {
394
431
  ringColor?: string;
395
432
  };
396
433
  type ChatIdentityProps = AvatarVariant | InitialVariant | LogoVariant;
397
- declare const ChatIdentity: (props: ChatIdentityProps) => React$1.JSX.Element;
398
-
399
- type MessageRef = {
400
- id: string;
401
- author: string | {
402
- name: string;
403
- };
404
- time?: string;
405
- text?: string;
406
- images?: string[];
407
- files?: ChatFile[];
408
- audio?: ChatAudio;
409
- };
410
- type BusinessCard = {
411
- avatarSrc: string;
412
- name: string;
413
- country: string;
414
- flag?: string;
415
- company: string;
416
- email: string;
417
- phone: string;
418
- };
419
- type AddressCard = {
420
- name: string;
421
- label?: "Home" | "Office";
422
- businessName?: string;
423
- mobileNumber: string;
424
- country: string;
425
- district?: string | null;
426
- policeStation?: string | null;
427
- state?: string | null;
428
- city?: string | null;
429
- postalCode?: string;
430
- addressLine: string;
431
- landMark?: string | null;
432
- };
434
+ declare const ChatIdentity: React__default.FC<ChatIdentityProps>;
433
435
 
434
436
  type ChatAudio = {
435
437
  src?: string;
@@ -462,7 +464,7 @@ type ChatMessageItemProps = {
462
464
  onTranslate?: () => void;
463
465
  initialSrc?: string;
464
466
  };
465
- declare const ChatMessageItem: ({ id, mine, time, authorInitial, avatarBg, text, businessCard, addressCard, images, files, audio, replyTo, showStatus, status, className, onReply, onTranslate, initialSrc, }: ChatMessageItemProps) => React$1.JSX.Element;
467
+ declare const ChatMessageItem: React__default.FC<ChatMessageItemProps>;
466
468
 
467
469
  type Props$6 = {
468
470
  top?: React__default.ReactNode;
@@ -494,19 +496,19 @@ type Props$5 = {
494
496
  status: ChatThreadStatus;
495
497
  avatarText: string;
496
498
  avatarSrc?: string;
497
- size?: number;
499
+ _size?: number;
498
500
  avatarBg?: string;
499
501
  className?: string;
500
502
  onClick?: () => void;
501
503
  };
502
- declare const ChatThreadItem: ({ active, pinned, online, verified, title, preview, time, status, avatarText, avatarSrc, avatarBg, className, onClick, }: Props$5) => React$1.JSX.Element;
504
+ declare const ChatThreadItem: React__default.FC<Props$5>;
503
505
 
504
506
  type Props$4 = {
505
507
  className?: string;
506
508
  onClose?: () => void;
507
509
  onSearchChange?: (value: string) => void;
508
510
  };
509
- declare const ChatListHeader: ({ className, onClose, onSearchChange }: Props$4) => React$1.JSX.Element;
511
+ declare const ChatListHeader: React__default.FC<Props$4>;
510
512
 
511
513
  type Props$3 = {
512
514
  id?: string;