@colletdev/docs 0.2.19 → 0.2.21

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.
Files changed (2) hide show
  1. package/components.md +37 -3
  2. package/package.json +1 -1
package/components.md CHANGED
@@ -501,7 +501,7 @@ Import from `@colletdev/core/types`:
501
501
 
502
502
  Chat component.
503
503
 
504
- **Tag:** `<cx-chat>` | **Form:** no | **Slots:** header, footer | **Ref methods:** addMessage, scrollToBottom, clear, focus
504
+ **Tag:** `<cx-chat>` | **Form:** no | **Slots:** header, footer | **Ref methods:** addMessage, addUserMessage, addAssistantMessage, addGroupMessage, addActivity, scrollToBottom, clear, focus, addFiles, clearAttachments
505
505
 
506
506
  #### Import
507
507
 
@@ -535,28 +535,48 @@ Chat component.
535
535
  | inputLabel | `string` | — | |
536
536
  | submitLabel | `string` | — | |
537
537
  | emptyState | `string` | — | |
538
+ | acceptFiles | `boolean` | `false` | |
539
+ | accept | `string` | — | |
540
+ | maxFileSize | `number` | `0` | |
541
+ | multipleFiles | `boolean` | `false` | |
538
542
 
539
543
  #### Events
540
544
 
541
545
  | Event | React | Vue | Detail |
542
546
  |-------|-------|-----|--------|
543
547
  | `cx-submit` | `onSubmit` | `@cx-submit` | `ChatSubmitDetail` |
548
+ | `cx-file-add` | `onFileAdd` | `@cx-file-add` | `FileAddDetail` |
549
+ | `cx-file-remove` | `onFileRemove` | `@cx-file-remove` | `FileRemoveDetail` |
550
+ | `cx-file-reject` | `onFileReject` | `@cx-file-reject` | `FileRejectDetail` |
544
551
 
545
552
  #### Ref Methods
546
553
 
547
554
  | Method | Description |
548
555
  |--------|-------------|
549
- | `addMessage(html: string): void` | Adds a pre-rendered message turn to the chat. |
556
+ | `addMessage(html: string): void` | Adds a pre-rendered HTML turn to the chat (low-level). Prefer addUserMessage/addAssistantMessage. |
557
+ | `addUserMessage(content: string, opts?: BubbleOptions): void` | Adds a user message. Renders via WASM automatically. |
558
+ | `addAssistantMessage(content: string, opts?: BubbleOptions): void` | Adds an assistant message. Renders via WASM automatically. |
559
+ | `addGroupMessage(role: "user" | "assistant", parts: GroupPart[], opts?: GroupOptions): void` | Adds a multi-part grouped message (text + code, etc.). |
560
+ | `addActivity(opts?: ActivityOptions): void` | Adds a tool activity group (search, read, write, etc.). |
550
561
  | `scrollToBottom()` | Scrolls the message area to the bottom. |
551
562
  | `clear()` | Clears all messages from the chat. |
552
563
  | `focus()` | Focuses the chat input textarea. |
564
+ | `addFiles(files: FileList): void` | Adds files programmatically to the chat input. |
565
+ | `clearAttachments()` | Removes all file attachments from the chat input. |
553
566
 
554
567
  #### Structured Types
555
568
 
556
569
  Import from `@colletdev/core/types`:
557
570
 
571
+ - `ActivityOptions`
572
+ - `BubbleOptions`
558
573
  - `ChatSubmitDetail`
559
574
  - `ChatTurn`
575
+ - `FileAddDetail`
576
+ - `FileRejectDetail`
577
+ - `FileRemoveDetail`
578
+ - `GroupOptions`
579
+ - `GroupPart`
560
580
 
561
581
  ---
562
582
 
@@ -564,7 +584,7 @@ Import from `@colletdev/core/types`:
564
584
 
565
585
  Multi-line text area optimized for chat message composition.
566
586
 
567
- **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus
587
+ **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus, addFiles, getAttachments, clearAttachments
568
588
 
569
589
  #### Import
570
590
 
@@ -592,6 +612,10 @@ Multi-line text area optimized for chat message composition.
592
612
  | label | `string` | — | |
593
613
  | maxLength | `number` | `0` | |
594
614
  | slotted | `boolean` | `false` | |
615
+ | acceptFiles | `boolean` | `false` | |
616
+ | accept | `string` | — | |
617
+ | maxFileSize | `number` | `0` | |
618
+ | multipleFiles | `boolean` | `false` | |
595
619
 
596
620
  #### Events
597
621
 
@@ -603,18 +627,28 @@ Multi-line text area optimized for chat message composition.
603
627
  | `cx-keyup` | `onKeyup` | `@cx-keyup` | `KeyboardDetail` |
604
628
  | `cx-submit` | `onSubmit` | `@cx-submit` | `ChatSubmitDetail` |
605
629
  | `cx-input` | `onInput` | `@cx-input` | `InputDetail` |
630
+ | `cx-file-add` | `onFileAdd` | `@cx-file-add` | `FileAddDetail` |
631
+ | `cx-file-remove` | `onFileRemove` | `@cx-file-remove` | `FileRemoveDetail` |
632
+ | `cx-file-reject` | `onFileReject` | `@cx-file-reject` | `FileRejectDetail` |
606
633
 
607
634
  #### Ref Methods
608
635
 
609
636
  | Method | Description |
610
637
  |--------|-------------|
611
638
  | `focus()` | Focuses the textarea. |
639
+ | `addFiles(files: FileList): void` | Adds files programmatically to the attachment tray. |
640
+ | `getAttachments(): FileInfo[]` | Returns current attachments as FileInfo[]. |
641
+ | `clearAttachments()` | Removes all file attachments. |
612
642
 
613
643
  #### Structured Types
614
644
 
615
645
  Import from `@colletdev/core/types`:
616
646
 
617
647
  - `ChatSubmitDetail`
648
+ - `FileAddDetail`
649
+ - `FileInfo`
650
+ - `FileRejectDetail`
651
+ - `FileRemoveDetail`
618
652
  - `FocusDetail`
619
653
  - `InputDetail`
620
654
  - `KeyboardDetail`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colletdev/docs",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "description": "Collet component library documentation — API reference, framework guides, and AI agent setup",
5
5
  "type": "module",
6
6
  "bin": {