@colletdev/docs 0.2.20 → 0.2.22

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 +21 -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, addFiles, clearAttachments
504
+ **Tag:** `<cx-chat>` | **Form:** no | **Slots:** header, footer | **Ref methods:** addMessage, addUserMessage, addAssistantMessage, addGroupMessage, addActivity, scrollToBottom, clear, focus, getValue, setValue, startStreamingTurn, removeMessage, updateMessage, addFiles, clearAttachments
505
505
 
506
506
  #### Import
507
507
 
@@ -539,6 +539,7 @@ Chat component.
539
539
  | accept | `string` | — | |
540
540
  | maxFileSize | `number` | `0` | |
541
541
  | multipleFiles | `boolean` | `false` | |
542
+ | inputSubmitting | `boolean` | `false` | |
542
543
 
543
544
  #### Events
544
545
 
@@ -553,10 +554,19 @@ Chat component.
553
554
 
554
555
  | Method | Description |
555
556
  |--------|-------------|
556
- | `addMessage(html: string): void` | Adds a pre-rendered message turn to the chat. |
557
+ | `addMessage(html: string, opts?: { id?: string }): string` | Adds a pre-rendered HTML turn to the chat (low-level). Prefer addUserMessage/addAssistantMessage. Returns the turn ID. |
558
+ | `addUserMessage(content: string, opts?: BubbleOptions): void` | Adds a user message. Renders via WASM automatically. |
559
+ | `addAssistantMessage(content: string, opts?: BubbleOptions): void` | Adds an assistant message. Renders via WASM automatically. |
560
+ | `addGroupMessage(role: "user" | "assistant", parts: GroupPart[], opts?: GroupOptions): void` | Adds a multi-part grouped message (text + code, etc.). |
561
+ | `addActivity(opts?: ActivityOptions): void` | Adds a tool activity group (search, read, write, etc.). |
557
562
  | `scrollToBottom()` | Scrolls the message area to the bottom. |
558
563
  | `clear()` | Clears all messages from the chat. |
559
564
  | `focus()` | Focuses the chat input textarea. |
565
+ | `getValue(): string` | Returns the current input textarea value. |
566
+ | `setValue(value: string): void` | Sets the input textarea value programmatically. |
567
+ | `startStreamingTurn(role?: "user" | "assistant", opts?: { id?: string; senderName?: string; size?: string }): StreamHandle` | Starts a streaming assistant turn. Returns a handle with appendTokens() and end(). |
568
+ | `removeMessage(id: string): boolean` | Removes a message by turn ID. |
569
+ | `updateMessage(id: string, html: string): boolean` | Updates a message's HTML by turn ID. |
560
570
  | `addFiles(files: FileList): void` | Adds files programmatically to the chat input. |
561
571
  | `clearAttachments()` | Removes all file attachments from the chat input. |
562
572
 
@@ -564,11 +574,16 @@ Chat component.
564
574
 
565
575
  Import from `@colletdev/core/types`:
566
576
 
577
+ - `ActivityOptions`
578
+ - `BubbleOptions`
567
579
  - `ChatSubmitDetail`
568
580
  - `ChatTurn`
569
581
  - `FileAddDetail`
570
582
  - `FileRejectDetail`
571
583
  - `FileRemoveDetail`
584
+ - `GroupOptions`
585
+ - `GroupPart`
586
+ - `StreamHandle`
572
587
 
573
588
  ---
574
589
 
@@ -576,7 +591,7 @@ Import from `@colletdev/core/types`:
576
591
 
577
592
  Multi-line text area optimized for chat message composition.
578
593
 
579
- **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus, addFiles, getAttachments, clearAttachments
594
+ **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus, getValue, setValue, addFiles, getAttachments, clearAttachments
580
595
 
581
596
  #### Import
582
597
 
@@ -608,6 +623,7 @@ Multi-line text area optimized for chat message composition.
608
623
  | accept | `string` | — | |
609
624
  | maxFileSize | `number` | `0` | |
610
625
  | multipleFiles | `boolean` | `false` | |
626
+ | submitting | `boolean` | `false` | |
611
627
 
612
628
  #### Events
613
629
 
@@ -628,6 +644,8 @@ Multi-line text area optimized for chat message composition.
628
644
  | Method | Description |
629
645
  |--------|-------------|
630
646
  | `focus()` | Focuses the textarea. |
647
+ | `getValue(): string` | Returns the current textarea value. |
648
+ | `setValue(value: string): void` | Sets the textarea value programmatically. |
631
649
  | `addFiles(files: FileList): void` | Adds files programmatically to the attachment tray. |
632
650
  | `getAttachments(): FileInfo[]` | Returns current attachments as FileInfo[]. |
633
651
  | `clearAttachments()` | Removes all file attachments. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colletdev/docs",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "description": "Collet component library documentation — API reference, framework guides, and AI agent setup",
5
5
  "type": "module",
6
6
  "bin": {