@mindly/ui-components 3.18.7 → 3.19.1

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.
@@ -10,7 +10,8 @@ declare type ChatMessageProps = {
10
10
  fileInfo?: {
11
11
  originalName: string;
12
12
  size: number;
13
- url?: string;
13
+ width?: number;
14
+ height?: number;
14
15
  };
15
16
  };
16
17
  declare const _default: React.NamedExoticComponent<ChatMessageProps>;
@@ -1,4 +1,10 @@
1
1
  import React from 'react';
2
+ declare type FileInfoType = {
3
+ originalName: string;
4
+ size: number;
5
+ width?: number;
6
+ height?: number;
7
+ };
2
8
  declare type TextareaProps = {
3
9
  onSend: (value: string) => void;
4
10
  defaultValue?: string;
@@ -7,7 +13,7 @@ declare type TextareaProps = {
7
13
  isOpen: boolean;
8
14
  maxLength: number;
9
15
  onError?: (message: string) => void;
10
- onFileSelect?: (files: FileList | null) => void;
16
+ onFileSelect?: (file: File | null, type: 'file' | 'image' | 'video', fileInfo: FileInfoType) => void;
11
17
  };
12
18
  declare const _default: React.NamedExoticComponent<TextareaProps>;
13
19
  export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const loadImage: (path: string) => Promise<HTMLImageElement>;
2
+ export declare const loadVideo: (path: string) => Promise<HTMLVideoElement>;
package/dist/index.d.ts CHANGED
@@ -495,7 +495,8 @@ declare type ChatMessageProps = {
495
495
  fileInfo?: {
496
496
  originalName: string;
497
497
  size: number;
498
- url?: string;
498
+ width?: number;
499
+ height?: number;
499
500
  };
500
501
  };
501
502
  declare const _default$7: React.NamedExoticComponent<ChatMessageProps>;
@@ -520,6 +521,12 @@ declare type EmptyChatMessagesProps = {
520
521
  };
521
522
  declare const EmptyChatMessages: FC<EmptyChatMessagesProps>;
522
523
 
524
+ declare type FileInfoType = {
525
+ originalName: string;
526
+ size: number;
527
+ width?: number;
528
+ height?: number;
529
+ };
523
530
  declare type TextareaProps = {
524
531
  onSend: (value: string) => void;
525
532
  defaultValue?: string;
@@ -528,7 +535,7 @@ declare type TextareaProps = {
528
535
  isOpen: boolean;
529
536
  maxLength: number;
530
537
  onError?: (message: string) => void;
531
- onFileSelect?: (files: FileList | null) => void;
538
+ onFileSelect?: (file: File | null, type: 'file' | 'image' | 'video', fileInfo: FileInfoType) => void;
532
539
  };
533
540
  declare const _default$4: React.NamedExoticComponent<TextareaProps>;
534
541
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindly/ui-components",
3
- "version": "3.18.7",
3
+ "version": "3.19.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "react-scripts start",