@langchain/macaw-components 1.7.9 → 1.7.11

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 (54) hide show
  1. package/dist/catalog.json +772 -757
  2. package/dist/components/ChatComposer/ChatComposer.d.ts +10 -1
  3. package/dist/components/ChatComposer/ChatComposer.js +16 -9
  4. package/dist/components/ChatComposer/ChatComposer.js.map +1 -1
  5. package/dist/components/ChatComposer/ChatComposerContext.d.ts +1 -1
  6. package/dist/components/ChatComposer/ChatComposerContext.js.map +1 -1
  7. package/dist/components/ChatComposer/ChatComposerRichInput.js +13 -2
  8. package/dist/components/ChatComposer/ChatComposerRichInput.js.map +1 -1
  9. package/dist/components/ChatConversation/ChatConversation.d.ts +16 -3
  10. package/dist/components/ChatConversation/ChatConversation.js +209 -41
  11. package/dist/components/ChatConversation/ChatConversation.js.map +1 -1
  12. package/dist/components/ChatMessage/ChatMessage.d.ts +7 -4
  13. package/dist/components/ChatMessage/ChatMessage.js +21 -7
  14. package/dist/components/ChatMessage/ChatMessage.js.map +1 -1
  15. package/dist/components/ChatMessage/ChatMessage.types.d.ts +2 -0
  16. package/dist/components/ChatPlan/ChatPlan.d.ts +27 -0
  17. package/dist/components/ChatPlan/ChatPlan.js +156 -0
  18. package/dist/components/ChatPlan/ChatPlan.js.map +1 -0
  19. package/dist/components/ChatPlan/index.d.ts +2 -0
  20. package/dist/components/ChatPlan/index.js +2 -0
  21. package/dist/components/ChatRichContent/ChatRichContent.js +79 -28
  22. package/dist/components/ChatRichContent/ChatRichContent.js.map +1 -1
  23. package/dist/components/ChatRichContent/ChatRichContent.types.d.ts +18 -0
  24. package/dist/components/ChatRichContent/index.d.ts +1 -1
  25. package/dist/components/ChatState/ChatState.d.ts +12 -1
  26. package/dist/components/ChatState/ChatState.js +5 -4
  27. package/dist/components/ChatState/ChatState.js.map +1 -1
  28. package/dist/components/ChatState/ChatStateTimer.d.ts +3 -1
  29. package/dist/components/ChatState/ChatStateTimer.js +24 -11
  30. package/dist/components/ChatState/ChatStateTimer.js.map +1 -1
  31. package/dist/components/ChatState/formatChatDuration.d.ts +16 -0
  32. package/dist/components/ChatState/formatChatDuration.js +19 -0
  33. package/dist/components/ChatState/formatChatDuration.js.map +1 -0
  34. package/dist/components/ChatState/index.d.ts +2 -0
  35. package/dist/components/ChatState/index.js +2 -1
  36. package/dist/components/ChatToolCall/ChatToolCall.d.ts +7 -1
  37. package/dist/components/ChatToolCall/ChatToolCall.js +3 -1
  38. package/dist/components/ChatToolCall/ChatToolCall.js.map +1 -1
  39. package/dist/components/ChatToolCall/ChatToolCallAccordion.d.ts +3 -1
  40. package/dist/components/ChatToolCall/ChatToolCallAccordion.js +33 -26
  41. package/dist/components/ChatToolCall/ChatToolCallAccordion.js.map +1 -1
  42. package/dist/components/ChatToolCall/ChatToolCallGroup.d.ts +20 -2
  43. package/dist/components/ChatToolCall/ChatToolCallGroup.js +8 -5
  44. package/dist/components/ChatToolCall/ChatToolCallGroup.js.map +1 -1
  45. package/dist/components/ChatToolCall/ChatToolCallReasoning.d.ts +10 -2
  46. package/dist/components/ChatToolCall/ChatToolCallReasoning.js +13 -5
  47. package/dist/components/ChatToolCall/ChatToolCallReasoning.js.map +1 -1
  48. package/dist/components/ChatToolCall/ChatToolCallStatusRow.d.ts +3 -1
  49. package/dist/components/ChatToolCall/ChatToolCallStatusRow.js +29 -18
  50. package/dist/components/ChatToolCall/ChatToolCallStatusRow.js.map +1 -1
  51. package/dist/utilities.css +1 -1
  52. package/docs/CHAT.md +50 -0
  53. package/docs/DESIGN.md +10 -6
  54. package/package.json +6 -2
package/docs/DESIGN.md CHANGED
@@ -72,9 +72,10 @@ Custom components should compose primitives and keep feature data, permissions,
72
72
  ## Chat
73
73
 
74
74
  Import the tool-call presentation family from
75
- `@langchain/macaw-components/ChatToolCall` and shared lifecycle presentation
76
- from `@langchain/macaw-components/ChatState`. They are intentionally omitted
77
- from the root barrel. See [CHAT.md](./CHAT.md) for the host/component boundary.
75
+ `@langchain/macaw-components/ChatToolCall`, shared lifecycle presentation
76
+ from `@langchain/macaw-components/ChatState`, and agent task lists from
77
+ `@langchain/macaw-components/ChatPlan`. They are intentionally omitted from the
78
+ root barrel. See [CHAT.md](./CHAT.md) for the host/component boundary.
78
79
 
79
80
  ## Breadcrumbs
80
81
 
@@ -210,7 +211,8 @@ only inside `ChatComposer`: `ChatComposerInput`, optional
210
211
  Control the draft with `value`/`onChange` on `ChatComposerInput` and send from
211
212
  `onSubmit`. Set `submitDisabled` when there is no text and no attachments, and
212
213
  `disabled` to lock writing and sending. Set `action="sending"` while a send is
213
- pending and `action="stop"` with `onStop` during generation. Both block sending
214
+ pending, `action="stop"` with `onStop` during generation, and
215
+ `action="stopping"` while a stop request is pending. All three block sending
214
216
  and keep the input and attachments usable. Stop stays available when the
215
217
  composer is also `disabled`, so pass `disabled` to your own controls inside it
216
218
  as well. Skip any state your app does not have.
@@ -237,7 +239,8 @@ with `ChatComposerAttachment` inside `ChatComposerAttachments`, and set
237
239
  model moves focus to the message input.
238
240
 
239
241
  Use `drawer` for content above the editor, such as questions to answer before
240
- sending. Set `drawerIntent` to `info`, `warning`, or `error`, and state the
242
+ sending. Several items stack with dividers; put the one the input answers,
243
+ such as a question, last. Set `drawerIntent` to `info`, `warning`, or `error`, and state the
241
244
  severity in the drawer's text or an icon too. Validate drawer fields yourself;
242
245
  only fields outside the drawer get native validation.
243
246
 
@@ -255,7 +258,8 @@ owns submission, so keep its `disabled`, `submitDisabled`, `action`, and
255
258
  `drawerIntent` in sync with `state`. Set `customInput="external"` on choices to
256
259
  take custom text from the composer input, and focus it from `onCustomSelect`.
257
260
 
258
- Use `variant="approval"` for decisions. Set `submitted`, `approved`, or
261
+ Use `variant="approval"` for decisions, and `edit` when the reviewer may change
262
+ the request before approving it. Set `submitted`, `approved`, or
259
263
  `rejected` only after saving. An action stays pending until `state` changes from
260
264
  where it started (ignoring `submitting`), so throw from the callback when a
261
265
  retry fails with the same error state. Key the card by request ID for a new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/macaw-components",
3
- "version": "1.7.9",
3
+ "version": "1.7.11",
4
4
  "description": "React components and usage guidance for the Macaw Design System.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -96,6 +96,10 @@
96
96
  "types": "./dist/components/ChatMessage/index.d.ts",
97
97
  "import": "./dist/components/ChatMessage/index.js"
98
98
  },
99
+ "./ChatPlan": {
100
+ "types": "./dist/components/ChatPlan/index.d.ts",
101
+ "import": "./dist/components/ChatPlan/index.js"
102
+ },
99
103
  "./ChatRichContent": {
100
104
  "types": "./dist/components/ChatRichContent/index.d.ts",
101
105
  "import": "./dist/components/ChatRichContent/index.js"
@@ -653,7 +657,7 @@
653
657
  "@fontsource/fira-code": "^5.2.7",
654
658
  "@fontsource/inter": "^5.2.8",
655
659
  "@headlessui/react": "^2.2.10",
656
- "@langchain/macaw-tokens": "1.7.9",
660
+ "@langchain/macaw-tokens": "1.7.11",
657
661
  "@lezer/common": "^1.2.1",
658
662
  "@lezer/highlight": "^1.2.0",
659
663
  "@lezer/yaml": "^1.0.4",