reachat 1.3.0 → 1.4.0
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/ChatInput/FileInput.d.ts +26 -0
- package/dist/ChatInput/index.d.ts +2 -0
- package/dist/SessionMessages/SessionMessage/MessageQuestion.d.ts +5 -0
- package/dist/SessionsList/SessionGroups.d.ts +1 -1
- package/dist/docs.json +140 -17
- package/dist/index.js +125 -101
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +123 -100
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -1
- /package/dist/{ChatInput.d.ts → ChatInput/ChatInput.d.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC, ReactNode, ChangeEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
interface FileInputProps {
|
|
4
|
+
/**
|
|
5
|
+
* Array of allowed file extensions.
|
|
6
|
+
*/
|
|
7
|
+
allowedFiles: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Indicates whether a file upload is in progress.
|
|
10
|
+
*/
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Disables the file input when true.
|
|
14
|
+
*/
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Custom icon for the attach button.
|
|
18
|
+
*/
|
|
19
|
+
attachIcon: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Callback function triggered when a file is selected.
|
|
22
|
+
*/
|
|
23
|
+
onFileUpload: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const FileInput: FC<FileInputProps>;
|
|
26
|
+
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { ConversationFile } from '../../types';
|
|
2
3
|
|
|
3
4
|
export interface MessageQuestionProps extends PropsWithChildren {
|
|
4
5
|
/**
|
|
5
6
|
* Question to render.
|
|
6
7
|
*/
|
|
7
8
|
question: string;
|
|
9
|
+
/**
|
|
10
|
+
* Array of sources referenced in the conversation
|
|
11
|
+
*/
|
|
12
|
+
files?: ConversationFile[];
|
|
8
13
|
}
|
|
9
14
|
export declare const MessageQuestion: FC<MessageQuestionProps>;
|
package/dist/docs.json
CHANGED
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"tags": {},
|
|
302
|
-
"filePath": "src/ChatInput.tsx",
|
|
302
|
+
"filePath": "src/ChatInput/ChatInput.tsx",
|
|
303
303
|
"description": "",
|
|
304
304
|
"displayName": "ChatInput",
|
|
305
305
|
"methods": [],
|
|
@@ -309,12 +309,12 @@
|
|
|
309
309
|
"description": "Default value for the input field.",
|
|
310
310
|
"name": "defaultValue",
|
|
311
311
|
"parent": {
|
|
312
|
-
"fileName": "src/ChatInput.tsx",
|
|
312
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
313
313
|
"name": "ChatInputProps"
|
|
314
314
|
},
|
|
315
315
|
"declarations": [
|
|
316
316
|
{
|
|
317
|
-
"fileName": "src/ChatInput.tsx",
|
|
317
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
318
318
|
"name": "ChatInputProps"
|
|
319
319
|
}
|
|
320
320
|
],
|
|
@@ -328,12 +328,12 @@
|
|
|
328
328
|
"description": "Allowed file types for upload.",
|
|
329
329
|
"name": "allowedFiles",
|
|
330
330
|
"parent": {
|
|
331
|
-
"fileName": "src/ChatInput.tsx",
|
|
331
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
332
332
|
"name": "ChatInputProps"
|
|
333
333
|
},
|
|
334
334
|
"declarations": [
|
|
335
335
|
{
|
|
336
|
-
"fileName": "src/ChatInput.tsx",
|
|
336
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
337
337
|
"name": "ChatInputProps"
|
|
338
338
|
}
|
|
339
339
|
],
|
|
@@ -347,12 +347,12 @@
|
|
|
347
347
|
"description": "Placeholder text for the input field.",
|
|
348
348
|
"name": "placeholder",
|
|
349
349
|
"parent": {
|
|
350
|
-
"fileName": "src/ChatInput.tsx",
|
|
350
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
351
351
|
"name": "ChatInputProps"
|
|
352
352
|
},
|
|
353
353
|
"declarations": [
|
|
354
354
|
{
|
|
355
|
-
"fileName": "src/ChatInput.tsx",
|
|
355
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
356
356
|
"name": "ChatInputProps"
|
|
357
357
|
}
|
|
358
358
|
],
|
|
@@ -368,12 +368,12 @@
|
|
|
368
368
|
"description": "Icon to show for send.",
|
|
369
369
|
"name": "sendIcon",
|
|
370
370
|
"parent": {
|
|
371
|
-
"fileName": "src/ChatInput.tsx",
|
|
371
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
372
372
|
"name": "ChatInputProps"
|
|
373
373
|
},
|
|
374
374
|
"declarations": [
|
|
375
375
|
{
|
|
376
|
-
"fileName": "src/ChatInput.tsx",
|
|
376
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
377
377
|
"name": "ChatInputProps"
|
|
378
378
|
}
|
|
379
379
|
],
|
|
@@ -389,12 +389,12 @@
|
|
|
389
389
|
"description": "Icon to show for send.",
|
|
390
390
|
"name": "stopIcon",
|
|
391
391
|
"parent": {
|
|
392
|
-
"fileName": "src/ChatInput.tsx",
|
|
392
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
393
393
|
"name": "ChatInputProps"
|
|
394
394
|
},
|
|
395
395
|
"declarations": [
|
|
396
396
|
{
|
|
397
|
-
"fileName": "src/ChatInput.tsx",
|
|
397
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
398
398
|
"name": "ChatInputProps"
|
|
399
399
|
}
|
|
400
400
|
],
|
|
@@ -404,18 +404,16 @@
|
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
406
|
"attachIcon": {
|
|
407
|
-
"defaultValue":
|
|
408
|
-
"value": "<AttachIcon />"
|
|
409
|
-
},
|
|
407
|
+
"defaultValue": null,
|
|
410
408
|
"description": "Icon to show for attach.",
|
|
411
409
|
"name": "attachIcon",
|
|
412
410
|
"parent": {
|
|
413
|
-
"fileName": "src/ChatInput.tsx",
|
|
411
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
414
412
|
"name": "ChatInputProps"
|
|
415
413
|
},
|
|
416
414
|
"declarations": [
|
|
417
415
|
{
|
|
418
|
-
"fileName": "src/ChatInput.tsx",
|
|
416
|
+
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
419
417
|
"name": "ChatInputProps"
|
|
420
418
|
}
|
|
421
419
|
],
|
|
@@ -426,6 +424,112 @@
|
|
|
426
424
|
}
|
|
427
425
|
}
|
|
428
426
|
},
|
|
427
|
+
{
|
|
428
|
+
"tags": {},
|
|
429
|
+
"filePath": "src/ChatInput/FileInput.tsx",
|
|
430
|
+
"description": "",
|
|
431
|
+
"displayName": "FileInput",
|
|
432
|
+
"methods": [],
|
|
433
|
+
"props": {
|
|
434
|
+
"allowedFiles": {
|
|
435
|
+
"defaultValue": null,
|
|
436
|
+
"description": "Array of allowed file extensions.",
|
|
437
|
+
"name": "allowedFiles",
|
|
438
|
+
"parent": {
|
|
439
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
440
|
+
"name": "FileInputProps"
|
|
441
|
+
},
|
|
442
|
+
"declarations": [
|
|
443
|
+
{
|
|
444
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
445
|
+
"name": "FileInputProps"
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
"required": true,
|
|
449
|
+
"type": {
|
|
450
|
+
"name": "string[]"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"isLoading": {
|
|
454
|
+
"defaultValue": null,
|
|
455
|
+
"description": "Indicates whether a file upload is in progress.",
|
|
456
|
+
"name": "isLoading",
|
|
457
|
+
"parent": {
|
|
458
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
459
|
+
"name": "FileInputProps"
|
|
460
|
+
},
|
|
461
|
+
"declarations": [
|
|
462
|
+
{
|
|
463
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
464
|
+
"name": "FileInputProps"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
"required": true,
|
|
468
|
+
"type": {
|
|
469
|
+
"name": "boolean"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"disabled": {
|
|
473
|
+
"defaultValue": null,
|
|
474
|
+
"description": "Disables the file input when true.",
|
|
475
|
+
"name": "disabled",
|
|
476
|
+
"parent": {
|
|
477
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
478
|
+
"name": "FileInputProps"
|
|
479
|
+
},
|
|
480
|
+
"declarations": [
|
|
481
|
+
{
|
|
482
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
483
|
+
"name": "FileInputProps"
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"required": true,
|
|
487
|
+
"type": {
|
|
488
|
+
"name": "boolean"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"attachIcon": {
|
|
492
|
+
"defaultValue": {
|
|
493
|
+
"value": "<AttachIcon />"
|
|
494
|
+
},
|
|
495
|
+
"description": "Custom icon for the attach button.",
|
|
496
|
+
"name": "attachIcon",
|
|
497
|
+
"parent": {
|
|
498
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
499
|
+
"name": "FileInputProps"
|
|
500
|
+
},
|
|
501
|
+
"declarations": [
|
|
502
|
+
{
|
|
503
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
504
|
+
"name": "FileInputProps"
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"required": false,
|
|
508
|
+
"type": {
|
|
509
|
+
"name": "ReactNode"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"onFileUpload": {
|
|
513
|
+
"defaultValue": null,
|
|
514
|
+
"description": "Callback function triggered when a file is selected.",
|
|
515
|
+
"name": "onFileUpload",
|
|
516
|
+
"parent": {
|
|
517
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
518
|
+
"name": "FileInputProps"
|
|
519
|
+
},
|
|
520
|
+
"declarations": [
|
|
521
|
+
{
|
|
522
|
+
"fileName": "src/ChatInput/FileInput.tsx",
|
|
523
|
+
"name": "FileInputProps"
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
"required": true,
|
|
527
|
+
"type": {
|
|
528
|
+
"name": "(event: ChangeEvent<HTMLInputElement>) => void"
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
429
533
|
{
|
|
430
534
|
"tags": {},
|
|
431
535
|
"filePath": "src/Markdown/CodeHighlighter.tsx",
|
|
@@ -790,7 +894,7 @@
|
|
|
790
894
|
"name": "SessionGroupsProps"
|
|
791
895
|
}
|
|
792
896
|
],
|
|
793
|
-
"required":
|
|
897
|
+
"required": false,
|
|
794
898
|
"type": {
|
|
795
899
|
"name": "(groups: GroupedSessions[]) => ReactNode"
|
|
796
900
|
}
|
|
@@ -1324,6 +1428,25 @@
|
|
|
1324
1428
|
"type": {
|
|
1325
1429
|
"name": "string"
|
|
1326
1430
|
}
|
|
1431
|
+
},
|
|
1432
|
+
"files": {
|
|
1433
|
+
"defaultValue": null,
|
|
1434
|
+
"description": "Array of sources referenced in the conversation",
|
|
1435
|
+
"name": "files",
|
|
1436
|
+
"parent": {
|
|
1437
|
+
"fileName": "src/SessionMessages/SessionMessage/MessageQuestion.tsx",
|
|
1438
|
+
"name": "MessageQuestionProps"
|
|
1439
|
+
},
|
|
1440
|
+
"declarations": [
|
|
1441
|
+
{
|
|
1442
|
+
"fileName": "src/SessionMessages/SessionMessage/MessageQuestion.tsx",
|
|
1443
|
+
"name": "MessageQuestionProps"
|
|
1444
|
+
}
|
|
1445
|
+
],
|
|
1446
|
+
"required": false,
|
|
1447
|
+
"type": {
|
|
1448
|
+
"name": "ConversationFile[]"
|
|
1449
|
+
}
|
|
1327
1450
|
}
|
|
1328
1451
|
}
|
|
1329
1452
|
},
|