@a.izzuddin/ai-chat 0.1.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.
@@ -0,0 +1,729 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "app/layout.tsx",
8
+ "declarations": [
9
+ {
10
+ "kind": "variable",
11
+ "name": "metadata",
12
+ "type": {
13
+ "text": "Metadata"
14
+ },
15
+ "default": "{ title: \"Create Next App\", description: \"Generated by create next app\", }"
16
+ },
17
+ {
18
+ "kind": "function",
19
+ "name": "RootLayout",
20
+ "parameters": [
21
+ {
22
+ "name": "{\n children,\n}",
23
+ "type": {
24
+ "text": "Readonly<{\n children: React.ReactNode;\n}>"
25
+ }
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "exports": [
31
+ {
32
+ "kind": "js",
33
+ "name": "metadata",
34
+ "declaration": {
35
+ "name": "metadata",
36
+ "module": "app/layout.tsx"
37
+ }
38
+ },
39
+ {
40
+ "kind": "js",
41
+ "name": "default",
42
+ "declaration": {
43
+ "name": "RootLayout",
44
+ "module": "app/layout.tsx"
45
+ }
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "kind": "javascript-module",
51
+ "path": "app/page.tsx",
52
+ "declarations": [
53
+ {
54
+ "kind": "function",
55
+ "name": "Home"
56
+ }
57
+ ],
58
+ "exports": [
59
+ {
60
+ "kind": "js",
61
+ "name": "default",
62
+ "declaration": {
63
+ "name": "Home",
64
+ "module": "app/page.tsx"
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "kind": "javascript-module",
71
+ "path": "dist/index.js",
72
+ "declarations": [],
73
+ "exports": []
74
+ },
75
+ {
76
+ "kind": "javascript-module",
77
+ "path": "examples/angular.component.ts",
78
+ "declarations": [
79
+ {
80
+ "kind": "class",
81
+ "description": "",
82
+ "name": "ChatComponent",
83
+ "members": [
84
+ {
85
+ "kind": "field",
86
+ "name": "chatElement",
87
+ "type": {
88
+ "text": "ElementRef"
89
+ }
90
+ },
91
+ {
92
+ "kind": "field",
93
+ "name": "apiUrl",
94
+ "type": {
95
+ "text": "string"
96
+ },
97
+ "default": "'http://localhost:8000'"
98
+ },
99
+ {
100
+ "kind": "field",
101
+ "name": "sessionId",
102
+ "type": {
103
+ "text": "string"
104
+ },
105
+ "default": "'user-123'"
106
+ },
107
+ {
108
+ "kind": "field",
109
+ "name": "title",
110
+ "type": {
111
+ "text": "string"
112
+ },
113
+ "default": "'AI Assistant'"
114
+ },
115
+ {
116
+ "kind": "field",
117
+ "name": "theme",
118
+ "type": {
119
+ "text": "'light' | 'dark'"
120
+ },
121
+ "default": "'light'"
122
+ },
123
+ {
124
+ "kind": "method",
125
+ "name": "ngAfterViewInit"
126
+ },
127
+ {
128
+ "kind": "method",
129
+ "name": "toggleTheme"
130
+ }
131
+ ]
132
+ }
133
+ ],
134
+ "exports": [
135
+ {
136
+ "kind": "js",
137
+ "name": "ChatComponent",
138
+ "declaration": {
139
+ "name": "ChatComponent",
140
+ "module": "examples/angular.component.ts"
141
+ }
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ "kind": "javascript-module",
147
+ "path": "examples/react.tsx",
148
+ "declarations": [
149
+ {
150
+ "kind": "function",
151
+ "name": "App"
152
+ }
153
+ ],
154
+ "exports": [
155
+ {
156
+ "kind": "js",
157
+ "name": "default",
158
+ "declaration": {
159
+ "name": "App",
160
+ "module": "examples/react.tsx"
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "kind": "javascript-module",
167
+ "path": "lib/utils.ts",
168
+ "declarations": [
169
+ {
170
+ "kind": "function",
171
+ "name": "cn",
172
+ "parameters": [
173
+ {
174
+ "name": "inputs",
175
+ "type": {
176
+ "text": "ClassValue[]"
177
+ }
178
+ }
179
+ ]
180
+ }
181
+ ],
182
+ "exports": [
183
+ {
184
+ "kind": "js",
185
+ "name": "cn",
186
+ "declaration": {
187
+ "name": "cn",
188
+ "module": "lib/utils.ts"
189
+ }
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ "kind": "javascript-module",
195
+ "path": "src/index.ts",
196
+ "declarations": [],
197
+ "exports": [
198
+ {
199
+ "kind": "js",
200
+ "name": "AIChat",
201
+ "declaration": {
202
+ "name": "AIChat",
203
+ "module": "./components/ai-chat"
204
+ }
205
+ },
206
+ {
207
+ "kind": "js",
208
+ "name": "Message",
209
+ "declaration": {
210
+ "name": "Message",
211
+ "module": "./components/ai-chat"
212
+ }
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "kind": "javascript-module",
218
+ "path": "tests/web-component.spec.ts",
219
+ "declarations": [],
220
+ "exports": []
221
+ },
222
+ {
223
+ "kind": "javascript-module",
224
+ "path": "components/ui/avatar.tsx",
225
+ "declarations": [
226
+ {
227
+ "kind": "function",
228
+ "name": "Avatar",
229
+ "parameters": [
230
+ {
231
+ "name": "{\n className,\n ...props\n}",
232
+ "type": {
233
+ "text": "React.ComponentProps<typeof AvatarPrimitive.Root>"
234
+ }
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "kind": "function",
240
+ "name": "AvatarImage",
241
+ "parameters": [
242
+ {
243
+ "name": "{\n className,\n ...props\n}",
244
+ "type": {
245
+ "text": "React.ComponentProps<typeof AvatarPrimitive.Image>"
246
+ }
247
+ }
248
+ ]
249
+ },
250
+ {
251
+ "kind": "function",
252
+ "name": "AvatarFallback",
253
+ "parameters": [
254
+ {
255
+ "name": "{\n className,\n ...props\n}",
256
+ "type": {
257
+ "text": "React.ComponentProps<typeof AvatarPrimitive.Fallback>"
258
+ }
259
+ }
260
+ ]
261
+ }
262
+ ],
263
+ "exports": [
264
+ {
265
+ "kind": "js",
266
+ "name": "Avatar",
267
+ "declaration": {
268
+ "name": "Avatar",
269
+ "module": "components/ui/avatar.tsx"
270
+ }
271
+ },
272
+ {
273
+ "kind": "js",
274
+ "name": "AvatarImage",
275
+ "declaration": {
276
+ "name": "AvatarImage",
277
+ "module": "components/ui/avatar.tsx"
278
+ }
279
+ },
280
+ {
281
+ "kind": "js",
282
+ "name": "AvatarFallback",
283
+ "declaration": {
284
+ "name": "AvatarFallback",
285
+ "module": "components/ui/avatar.tsx"
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "kind": "javascript-module",
292
+ "path": "components/ui/button.tsx",
293
+ "declarations": [
294
+ {
295
+ "kind": "variable",
296
+ "name": "buttonVariants"
297
+ },
298
+ {
299
+ "kind": "function",
300
+ "name": "Button",
301
+ "parameters": [
302
+ {
303
+ "name": "{\n className,\n variant,\n size,\n asChild = false,\n ...props\n}",
304
+ "type": {
305
+ "text": "React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }"
306
+ }
307
+ }
308
+ ]
309
+ }
310
+ ],
311
+ "exports": [
312
+ {
313
+ "kind": "js",
314
+ "name": "Button",
315
+ "declaration": {
316
+ "name": "Button",
317
+ "module": "components/ui/button.tsx"
318
+ }
319
+ },
320
+ {
321
+ "kind": "js",
322
+ "name": "buttonVariants",
323
+ "declaration": {
324
+ "name": "buttonVariants",
325
+ "module": "components/ui/button.tsx"
326
+ }
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "kind": "javascript-module",
332
+ "path": "components/ui/chat.tsx",
333
+ "declarations": [
334
+ {
335
+ "kind": "function",
336
+ "name": "Chat"
337
+ }
338
+ ],
339
+ "exports": [
340
+ {
341
+ "kind": "js",
342
+ "name": "Chat",
343
+ "declaration": {
344
+ "name": "Chat",
345
+ "module": "components/ui/chat.tsx"
346
+ }
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "kind": "javascript-module",
352
+ "path": "components/ui/input.tsx",
353
+ "declarations": [
354
+ {
355
+ "kind": "function",
356
+ "name": "Input",
357
+ "parameters": [
358
+ {
359
+ "name": "{ className, type, ...props }",
360
+ "type": {
361
+ "text": "React.ComponentProps<\"input\">"
362
+ }
363
+ }
364
+ ]
365
+ }
366
+ ],
367
+ "exports": [
368
+ {
369
+ "kind": "js",
370
+ "name": "Input",
371
+ "declaration": {
372
+ "name": "Input",
373
+ "module": "components/ui/input.tsx"
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "kind": "javascript-module",
380
+ "path": "components/ui/scroll-area.tsx",
381
+ "declarations": [
382
+ {
383
+ "kind": "function",
384
+ "name": "ScrollArea",
385
+ "parameters": [
386
+ {
387
+ "name": "{\n className,\n children,\n ...props\n}",
388
+ "type": {
389
+ "text": "React.ComponentProps<typeof ScrollAreaPrimitive.Root>"
390
+ }
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "kind": "function",
396
+ "name": "ScrollBar",
397
+ "parameters": [
398
+ {
399
+ "name": "{\n className,\n orientation = \"vertical\",\n ...props\n}",
400
+ "type": {
401
+ "text": "React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>"
402
+ }
403
+ }
404
+ ]
405
+ }
406
+ ],
407
+ "exports": [
408
+ {
409
+ "kind": "js",
410
+ "name": "ScrollArea",
411
+ "declaration": {
412
+ "name": "ScrollArea",
413
+ "module": "components/ui/scroll-area.tsx"
414
+ }
415
+ },
416
+ {
417
+ "kind": "js",
418
+ "name": "ScrollBar",
419
+ "declaration": {
420
+ "name": "ScrollBar",
421
+ "module": "components/ui/scroll-area.tsx"
422
+ }
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ "kind": "javascript-module",
428
+ "path": "components/ui/separator.tsx",
429
+ "declarations": [
430
+ {
431
+ "kind": "function",
432
+ "name": "Separator",
433
+ "parameters": [
434
+ {
435
+ "name": "{\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}",
436
+ "type": {
437
+ "text": "React.ComponentProps<typeof SeparatorPrimitive.Root>"
438
+ }
439
+ }
440
+ ]
441
+ }
442
+ ],
443
+ "exports": [
444
+ {
445
+ "kind": "js",
446
+ "name": "Separator",
447
+ "declaration": {
448
+ "name": "Separator",
449
+ "module": "components/ui/separator.tsx"
450
+ }
451
+ }
452
+ ]
453
+ },
454
+ {
455
+ "kind": "javascript-module",
456
+ "path": "components/ui/textarea.tsx",
457
+ "declarations": [
458
+ {
459
+ "kind": "function",
460
+ "name": "Textarea",
461
+ "parameters": [
462
+ {
463
+ "name": "{ className, ...props }",
464
+ "type": {
465
+ "text": "React.ComponentProps<\"textarea\">"
466
+ }
467
+ }
468
+ ]
469
+ }
470
+ ],
471
+ "exports": [
472
+ {
473
+ "kind": "js",
474
+ "name": "Textarea",
475
+ "declaration": {
476
+ "name": "Textarea",
477
+ "module": "components/ui/textarea.tsx"
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "kind": "javascript-module",
484
+ "path": "src/components/ai-chat.ts",
485
+ "declarations": [
486
+ {
487
+ "kind": "class",
488
+ "description": "AI Chat Web Component",
489
+ "name": "AIChat",
490
+ "members": [
491
+ {
492
+ "kind": "field",
493
+ "name": "apiUrl",
494
+ "privacy": "public",
495
+ "type": {
496
+ "text": "string"
497
+ },
498
+ "default": "''",
499
+ "attribute": "api-url"
500
+ },
501
+ {
502
+ "kind": "field",
503
+ "name": "sessionId",
504
+ "privacy": "public",
505
+ "type": {
506
+ "text": "string"
507
+ },
508
+ "default": "'default-session'",
509
+ "attribute": "session-id"
510
+ },
511
+ {
512
+ "kind": "field",
513
+ "name": "chatTitle",
514
+ "privacy": "public",
515
+ "type": {
516
+ "text": "string"
517
+ },
518
+ "default": "'My AI Agent'",
519
+ "attribute": "title"
520
+ },
521
+ {
522
+ "kind": "field",
523
+ "name": "theme",
524
+ "privacy": "public",
525
+ "type": {
526
+ "text": "'light' | 'dark'"
527
+ },
528
+ "default": "'light'",
529
+ "attribute": "theme"
530
+ },
531
+ {
532
+ "kind": "field",
533
+ "name": "initialMessages",
534
+ "privacy": "public",
535
+ "type": {
536
+ "text": "Message[]"
537
+ },
538
+ "default": "[]",
539
+ "attribute": "initialMessages"
540
+ },
541
+ {
542
+ "kind": "field",
543
+ "name": "messages",
544
+ "type": {
545
+ "text": "Message[]"
546
+ },
547
+ "privacy": "private",
548
+ "default": "[]"
549
+ },
550
+ {
551
+ "kind": "field",
552
+ "name": "input",
553
+ "type": {
554
+ "text": "string"
555
+ },
556
+ "privacy": "private",
557
+ "default": "''"
558
+ },
559
+ {
560
+ "kind": "field",
561
+ "name": "isLoading",
562
+ "type": {
563
+ "text": "boolean"
564
+ },
565
+ "privacy": "private",
566
+ "default": "false"
567
+ },
568
+ {
569
+ "kind": "field",
570
+ "name": "messagesEndRef",
571
+ "type": {
572
+ "text": "HTMLDivElement | undefined"
573
+ },
574
+ "privacy": "private"
575
+ },
576
+ {
577
+ "kind": "method",
578
+ "name": "scrollToBottom",
579
+ "privacy": "private"
580
+ },
581
+ {
582
+ "kind": "method",
583
+ "name": "handleInput",
584
+ "privacy": "private",
585
+ "parameters": [
586
+ {
587
+ "name": "e",
588
+ "type": {
589
+ "text": "Event"
590
+ }
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ "kind": "method",
596
+ "name": "handleSubmit",
597
+ "privacy": "private",
598
+ "parameters": [
599
+ {
600
+ "name": "e",
601
+ "type": {
602
+ "text": "Event"
603
+ }
604
+ }
605
+ ]
606
+ }
607
+ ],
608
+ "events": [
609
+ {
610
+ "name": "message-sent",
611
+ "type": {
612
+ "text": "CustomEvent"
613
+ },
614
+ "description": "Fired when user sends a message"
615
+ },
616
+ {
617
+ "name": "response-received",
618
+ "type": {
619
+ "text": "CustomEvent"
620
+ },
621
+ "description": "Fired when AI responds"
622
+ },
623
+ {
624
+ "name": "error",
625
+ "type": {
626
+ "text": "CustomEvent"
627
+ },
628
+ "description": "Fired when an error occurs"
629
+ }
630
+ ],
631
+ "attributes": [
632
+ {
633
+ "name": "api-url",
634
+ "type": {
635
+ "text": "string"
636
+ },
637
+ "default": "''",
638
+ "fieldName": "apiUrl"
639
+ },
640
+ {
641
+ "name": "session-id",
642
+ "type": {
643
+ "text": "string"
644
+ },
645
+ "default": "'default-session'",
646
+ "fieldName": "sessionId"
647
+ },
648
+ {
649
+ "name": "title",
650
+ "type": {
651
+ "text": "string"
652
+ },
653
+ "default": "'My AI Agent'",
654
+ "fieldName": "chatTitle"
655
+ },
656
+ {
657
+ "name": "theme",
658
+ "type": {
659
+ "text": "'light' | 'dark'"
660
+ },
661
+ "default": "'light'",
662
+ "fieldName": "theme"
663
+ },
664
+ {
665
+ "name": "initialMessages",
666
+ "type": {
667
+ "text": "Message[]"
668
+ },
669
+ "default": "[]",
670
+ "fieldName": "initialMessages"
671
+ }
672
+ ],
673
+ "superclass": {
674
+ "name": "LitElement",
675
+ "package": "lit"
676
+ },
677
+ "tagName": "ai-chat",
678
+ "customElement": true
679
+ }
680
+ ],
681
+ "exports": [
682
+ {
683
+ "kind": "js",
684
+ "name": "AIChat",
685
+ "declaration": {
686
+ "name": "AIChat",
687
+ "module": "src/components/ai-chat.ts"
688
+ }
689
+ },
690
+ {
691
+ "kind": "custom-element-definition",
692
+ "name": "ai-chat",
693
+ "declaration": {
694
+ "name": "AIChat",
695
+ "module": "src/components/ai-chat.ts"
696
+ }
697
+ }
698
+ ]
699
+ },
700
+ {
701
+ "kind": "javascript-module",
702
+ "path": "src/components/AIChat.tsx",
703
+ "declarations": [
704
+ {
705
+ "kind": "function",
706
+ "name": "AIChat",
707
+ "parameters": [
708
+ {
709
+ "name": "{\n apiUrl,\n sessionId = \"default-session\",\n title = \"My AI Agent\",\n initialMessages = [],\n className,\n onMessageSent,\n onResponseReceived,\n onError,\n}",
710
+ "type": {
711
+ "text": "AIChatProps"
712
+ }
713
+ }
714
+ ]
715
+ }
716
+ ],
717
+ "exports": [
718
+ {
719
+ "kind": "js",
720
+ "name": "AIChat",
721
+ "declaration": {
722
+ "name": "AIChat",
723
+ "module": "src/components/AIChat.tsx"
724
+ }
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ }