reachat 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -43,6 +43,7 @@ theme via Tailwind.
43
43
  - [Reagraph](https://reagraph.dev?utm=reaviz) - Open-source library for large webgl based network graphs.
44
44
 
45
45
  ## 🪄 Features
46
+ - Console and Companion Modes
46
47
  - Markdown Rendering
47
48
  - GFM Styling
48
49
  - Code Highlighting
@@ -58,6 +59,7 @@ theme via Tailwind.
58
59
  - Smart/Dynamic Grouping of Sessions
59
60
  - Keyboard shortcuts
60
61
  - Animations via Framer Motion
62
+ - Responsive
61
63
  - Tailwind for Themeing
62
64
  - Customizable via Slots
63
65
 
package/dist/Chat.d.ts CHANGED
@@ -38,6 +38,10 @@ export interface ChatProps extends PropsWithChildren {
38
38
  * Whether to display a loading state.
39
39
  */
40
40
  isLoading?: boolean;
41
+ /**
42
+ * Whether to disable the chat.
43
+ */
44
+ disabled?: boolean;
41
45
  /**
42
46
  * Callback function to handle when a session is selected.
43
47
  */
@@ -4,9 +4,11 @@ import { PluggableList } from 'react-markdown/lib';
4
4
 
5
5
  export interface ChatContextProps {
6
6
  sessions: Session[];
7
+ disabled?: boolean;
7
8
  activeSessionId: string | null;
8
9
  theme?: ChatTheme;
9
10
  isLoading?: boolean;
11
+ isCompact?: boolean;
10
12
  activeSession?: Session | null;
11
13
  remarkPlugins?: PluggableList[];
12
14
  selectSession?: (sessionId: string) => void;
@@ -1,9 +1,25 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import { FC, PropsWithChildren, ReactElement } from 'react';
2
2
 
3
3
  export interface CodeHighlighterProps extends PropsWithChildren {
4
4
  /**
5
5
  * The class name to apply to the code block.
6
6
  */
7
7
  className?: string;
8
+ /**
9
+ * The language of the code block.
10
+ */
11
+ language?: string;
12
+ /**
13
+ * The class name to apply to the copy button.
14
+ */
15
+ copyClassName?: string;
16
+ /**
17
+ * Icon to show for copy.
18
+ */
19
+ copyIcon?: ReactElement;
20
+ /**
21
+ * The theme to use for the code block.
22
+ */
23
+ theme?: Record<string, string>;
8
24
  }
9
25
  export declare const CodeHighlighter: FC<CodeHighlighterProps>;
@@ -2,3 +2,4 @@ export * from './Markdown';
2
2
  export * from './Table';
3
3
  export * from './CodeHighlighter';
4
4
  export * from './plugins';
5
+ export * from './themes';
@@ -0,0 +1,501 @@
1
+ export declare const dark: {
2
+ 'code[class*="language-"]': {
3
+ background: string;
4
+ color: string;
5
+ textShadow: string;
6
+ fontFamily: string;
7
+ direction: string;
8
+ textAlign: string;
9
+ whiteSpace: string;
10
+ wordSpacing: string;
11
+ wordBreak: string;
12
+ lineHeight: string;
13
+ MozTabSize: string;
14
+ OTabSize: string;
15
+ tabSize: string;
16
+ WebkitHyphens: string;
17
+ MozHyphens: string;
18
+ msHyphens: string;
19
+ hyphens: string;
20
+ };
21
+ 'pre[class*="language-"]': {
22
+ background: string;
23
+ color: string;
24
+ textShadow: string;
25
+ fontFamily: string;
26
+ direction: string;
27
+ textAlign: string;
28
+ whiteSpace: string;
29
+ wordSpacing: string;
30
+ wordBreak: string;
31
+ lineHeight: string;
32
+ MozTabSize: string;
33
+ OTabSize: string;
34
+ tabSize: string;
35
+ WebkitHyphens: string;
36
+ MozHyphens: string;
37
+ msHyphens: string;
38
+ hyphens: string;
39
+ padding: string;
40
+ margin: string;
41
+ overflow: string;
42
+ borderRadius: string;
43
+ };
44
+ 'code[class*="language-"]::-moz-selection': {
45
+ background: string;
46
+ color: string;
47
+ textShadow: string;
48
+ };
49
+ 'code[class*="language-"] *::-moz-selection': {
50
+ background: string;
51
+ color: string;
52
+ textShadow: string;
53
+ };
54
+ 'pre[class*="language-"] *::-moz-selection': {
55
+ background: string;
56
+ color: string;
57
+ textShadow: string;
58
+ };
59
+ 'code[class*="language-"]::selection': {
60
+ background: string;
61
+ color: string;
62
+ textShadow: string;
63
+ };
64
+ 'code[class*="language-"] *::selection': {
65
+ background: string;
66
+ color: string;
67
+ textShadow: string;
68
+ };
69
+ 'pre[class*="language-"] *::selection': {
70
+ background: string;
71
+ color: string;
72
+ textShadow: string;
73
+ };
74
+ ':not(pre) > code[class*="language-"]': {
75
+ padding: string;
76
+ borderRadius: string;
77
+ whiteSpace: string;
78
+ };
79
+ comment: {
80
+ color: string;
81
+ fontStyle: string;
82
+ };
83
+ prolog: {
84
+ color: string;
85
+ };
86
+ cdata: {
87
+ color: string;
88
+ };
89
+ doctype: {
90
+ color: string;
91
+ };
92
+ punctuation: {
93
+ color: string;
94
+ };
95
+ entity: {
96
+ color: string;
97
+ cursor: string;
98
+ };
99
+ 'attr-name': {
100
+ color: string;
101
+ };
102
+ 'class-name': {
103
+ color: string;
104
+ };
105
+ boolean: {
106
+ color: string;
107
+ };
108
+ constant: {
109
+ color: string;
110
+ };
111
+ number: {
112
+ color: string;
113
+ };
114
+ atrule: {
115
+ color: string;
116
+ };
117
+ keyword: {
118
+ color: string;
119
+ };
120
+ property: {
121
+ color: string;
122
+ };
123
+ tag: {
124
+ color: string;
125
+ };
126
+ symbol: {
127
+ color: string;
128
+ };
129
+ deleted: {
130
+ color: string;
131
+ };
132
+ important: {
133
+ color: string;
134
+ };
135
+ selector: {
136
+ color: string;
137
+ };
138
+ string: {
139
+ color: string;
140
+ };
141
+ char: {
142
+ color: string;
143
+ };
144
+ builtin: {
145
+ color: string;
146
+ };
147
+ inserted: {
148
+ color: string;
149
+ };
150
+ regex: {
151
+ color: string;
152
+ };
153
+ 'attr-value': {
154
+ color: string;
155
+ };
156
+ 'attr-value > .token.punctuation': {
157
+ color: string;
158
+ };
159
+ variable: {
160
+ color: string;
161
+ };
162
+ operator: {
163
+ color: string;
164
+ };
165
+ function: {
166
+ color: string;
167
+ };
168
+ url: {
169
+ color: string;
170
+ };
171
+ 'attr-value > .token.punctuation.attr-equals': {
172
+ color: string;
173
+ };
174
+ 'special-attr > .token.attr-value > .token.value.css': {
175
+ color: string;
176
+ };
177
+ '.language-css .token.selector': {
178
+ color: string;
179
+ };
180
+ '.language-css .token.property': {
181
+ color: string;
182
+ };
183
+ '.language-css .token.function': {
184
+ color: string;
185
+ };
186
+ '.language-css .token.url > .token.function': {
187
+ color: string;
188
+ };
189
+ '.language-css .token.url > .token.string.url': {
190
+ color: string;
191
+ };
192
+ '.language-css .token.important': {
193
+ color: string;
194
+ };
195
+ '.language-css .token.atrule .token.rule': {
196
+ color: string;
197
+ };
198
+ '.language-javascript .token.operator': {
199
+ color: string;
200
+ };
201
+ '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {
202
+ color: string;
203
+ };
204
+ '.language-json .token.operator': {
205
+ color: string;
206
+ };
207
+ '.language-json .token.null.keyword': {
208
+ color: string;
209
+ };
210
+ '.language-markdown .token.url': {
211
+ color: string;
212
+ };
213
+ '.language-markdown .token.url > .token.operator': {
214
+ color: string;
215
+ };
216
+ '.language-markdown .token.url-reference.url > .token.string': {
217
+ color: string;
218
+ };
219
+ '.language-markdown .token.url > .token.content': {
220
+ color: string;
221
+ };
222
+ '.language-markdown .token.url > .token.url': {
223
+ color: string;
224
+ };
225
+ '.language-markdown .token.url-reference.url': {
226
+ color: string;
227
+ };
228
+ '.language-markdown .token.blockquote.punctuation': {
229
+ color: string;
230
+ fontStyle: string;
231
+ };
232
+ '.language-markdown .token.hr.punctuation': {
233
+ color: string;
234
+ fontStyle: string;
235
+ };
236
+ '.language-markdown .token.code-snippet': {
237
+ color: string;
238
+ };
239
+ '.language-markdown .token.bold .token.content': {
240
+ color: string;
241
+ };
242
+ '.language-markdown .token.italic .token.content': {
243
+ color: string;
244
+ };
245
+ '.language-markdown .token.strike .token.content': {
246
+ color: string;
247
+ };
248
+ '.language-markdown .token.strike .token.punctuation': {
249
+ color: string;
250
+ };
251
+ '.language-markdown .token.list.punctuation': {
252
+ color: string;
253
+ };
254
+ '.language-markdown .token.title.important > .token.punctuation': {
255
+ color: string;
256
+ };
257
+ bold: {
258
+ fontWeight: string;
259
+ };
260
+ italic: {
261
+ fontStyle: string;
262
+ };
263
+ namespace: {
264
+ Opacity: string;
265
+ };
266
+ 'token.tab:not(:empty):before': {
267
+ color: string;
268
+ textShadow: string;
269
+ };
270
+ 'token.cr:before': {
271
+ color: string;
272
+ textShadow: string;
273
+ };
274
+ 'token.lf:before': {
275
+ color: string;
276
+ textShadow: string;
277
+ };
278
+ 'token.space:before': {
279
+ color: string;
280
+ textShadow: string;
281
+ };
282
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {
283
+ marginRight: string;
284
+ };
285
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {
286
+ background: string;
287
+ color: string;
288
+ padding: string;
289
+ borderRadius: string;
290
+ };
291
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {
292
+ background: string;
293
+ color: string;
294
+ padding: string;
295
+ borderRadius: string;
296
+ };
297
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {
298
+ background: string;
299
+ color: string;
300
+ padding: string;
301
+ borderRadius: string;
302
+ };
303
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {
304
+ background: string;
305
+ color: string;
306
+ };
307
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {
308
+ background: string;
309
+ color: string;
310
+ };
311
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {
312
+ background: string;
313
+ color: string;
314
+ };
315
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {
316
+ background: string;
317
+ color: string;
318
+ };
319
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {
320
+ background: string;
321
+ color: string;
322
+ };
323
+ 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {
324
+ background: string;
325
+ color: string;
326
+ };
327
+ '.line-highlight.line-highlight': {
328
+ background: string;
329
+ };
330
+ '.line-highlight.line-highlight:before': {
331
+ background: string;
332
+ color: string;
333
+ padding: string;
334
+ borderRadius: string;
335
+ boxShadow: string;
336
+ };
337
+ '.line-highlight.line-highlight[data-end]:after': {
338
+ background: string;
339
+ color: string;
340
+ padding: string;
341
+ borderRadius: string;
342
+ boxShadow: string;
343
+ };
344
+ 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {
345
+ backgroundColor: string;
346
+ };
347
+ '.line-numbers.line-numbers .line-numbers-rows': {
348
+ borderRightColor: string;
349
+ };
350
+ '.command-line .command-line-prompt': {
351
+ borderRightColor: string;
352
+ };
353
+ '.line-numbers .line-numbers-rows > span:before': {
354
+ color: string;
355
+ };
356
+ '.command-line .command-line-prompt > span:before': {
357
+ color: string;
358
+ };
359
+ '.rainbow-braces .token.token.punctuation.brace-level-1': {
360
+ color: string;
361
+ };
362
+ '.rainbow-braces .token.token.punctuation.brace-level-5': {
363
+ color: string;
364
+ };
365
+ '.rainbow-braces .token.token.punctuation.brace-level-9': {
366
+ color: string;
367
+ };
368
+ '.rainbow-braces .token.token.punctuation.brace-level-2': {
369
+ color: string;
370
+ };
371
+ '.rainbow-braces .token.token.punctuation.brace-level-6': {
372
+ color: string;
373
+ };
374
+ '.rainbow-braces .token.token.punctuation.brace-level-10': {
375
+ color: string;
376
+ };
377
+ '.rainbow-braces .token.token.punctuation.brace-level-3': {
378
+ color: string;
379
+ };
380
+ '.rainbow-braces .token.token.punctuation.brace-level-7': {
381
+ color: string;
382
+ };
383
+ '.rainbow-braces .token.token.punctuation.brace-level-11': {
384
+ color: string;
385
+ };
386
+ '.rainbow-braces .token.token.punctuation.brace-level-4': {
387
+ color: string;
388
+ };
389
+ '.rainbow-braces .token.token.punctuation.brace-level-8': {
390
+ color: string;
391
+ };
392
+ '.rainbow-braces .token.token.punctuation.brace-level-12': {
393
+ color: string;
394
+ };
395
+ 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {
396
+ backgroundColor: string;
397
+ };
398
+ 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {
399
+ backgroundColor: string;
400
+ };
401
+ 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {
402
+ backgroundColor: string;
403
+ };
404
+ 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {
405
+ backgroundColor: string;
406
+ };
407
+ 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {
408
+ backgroundColor: string;
409
+ };
410
+ 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {
411
+ backgroundColor: string;
412
+ };
413
+ 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {
414
+ backgroundColor: string;
415
+ };
416
+ 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {
417
+ backgroundColor: string;
418
+ };
419
+ 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {
420
+ backgroundColor: string;
421
+ };
422
+ 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {
423
+ backgroundColor: string;
424
+ };
425
+ 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {
426
+ backgroundColor: string;
427
+ };
428
+ 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {
429
+ backgroundColor: string;
430
+ };
431
+ 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {
432
+ backgroundColor: string;
433
+ };
434
+ 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {
435
+ backgroundColor: string;
436
+ };
437
+ 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {
438
+ backgroundColor: string;
439
+ };
440
+ 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {
441
+ backgroundColor: string;
442
+ };
443
+ 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {
444
+ backgroundColor: string;
445
+ };
446
+ 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {
447
+ backgroundColor: string;
448
+ };
449
+ 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {
450
+ backgroundColor: string;
451
+ };
452
+ 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {
453
+ backgroundColor: string;
454
+ };
455
+ '.prism-previewer.prism-previewer:before': {
456
+ borderColor: string;
457
+ };
458
+ '.prism-previewer-gradient.prism-previewer-gradient div': {
459
+ borderColor: string;
460
+ borderRadius: string;
461
+ };
462
+ '.prism-previewer-color.prism-previewer-color:before': {
463
+ borderRadius: string;
464
+ };
465
+ '.prism-previewer-easing.prism-previewer-easing:before': {
466
+ borderRadius: string;
467
+ };
468
+ '.prism-previewer.prism-previewer:after': {
469
+ borderTopColor: string;
470
+ };
471
+ '.prism-previewer-flipped.prism-previewer-flipped.after': {
472
+ borderBottomColor: string;
473
+ };
474
+ '.prism-previewer-angle.prism-previewer-angle:before': {
475
+ background: string;
476
+ };
477
+ '.prism-previewer-time.prism-previewer-time:before': {
478
+ background: string;
479
+ };
480
+ '.prism-previewer-easing.prism-previewer-easing': {
481
+ background: string;
482
+ };
483
+ '.prism-previewer-angle.prism-previewer-angle circle': {
484
+ stroke: string;
485
+ strokeOpacity: string;
486
+ };
487
+ '.prism-previewer-time.prism-previewer-time circle': {
488
+ stroke: string;
489
+ strokeOpacity: string;
490
+ };
491
+ '.prism-previewer-easing.prism-previewer-easing circle': {
492
+ stroke: string;
493
+ fill: string;
494
+ };
495
+ '.prism-previewer-easing.prism-previewer-easing path': {
496
+ stroke: string;
497
+ };
498
+ '.prism-previewer-easing.prism-previewer-easing line': {
499
+ stroke: string;
500
+ };
501
+ };
@@ -0,0 +1,2 @@
1
+ export * from './dark';
2
+ export * from './light';