@aleph-alpha/chat-kit 0.9.0 → 1.0.0

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 (154) hide show
  1. package/dist/{CkInput.vue_vue_type_script_setup_true_lang-DmcLXAgB.js → CkInput.vue_vue_type_script_setup_true_lang-744ZHsQU.js} +525 -78
  2. package/dist/chat-kit.css +9 -14
  3. package/dist/components/base/CkAgentMessage/CkAgentMessage.stories.d.ts +20 -0
  4. package/dist/components/base/CkAgentMessage/CkAgentMessage.stories.d.ts.map +1 -1
  5. package/dist/components/base/CkAgentMessage/CkAgentMessage.vue.d.ts.map +1 -1
  6. package/dist/components/base/CkAgentMessage/index.d.ts +1 -0
  7. package/dist/components/base/CkAgentMessage/index.d.ts.map +1 -1
  8. package/dist/components/base/CkAgentMessage/types.d.ts +12 -0
  9. package/dist/components/base/CkAgentMessage/types.d.ts.map +1 -0
  10. package/dist/components/base/CkConversationLayout/CkConversationLayout.stories.d.ts +13 -0
  11. package/dist/components/base/CkConversationLayout/CkConversationLayout.stories.d.ts.map +1 -1
  12. package/dist/components/base/CkConversationLayout/CkConversationLayout.vue.d.ts.map +1 -1
  13. package/dist/components/base/CkConversationLayout/types.d.ts +9 -2
  14. package/dist/components/base/CkConversationLayout/types.d.ts.map +1 -1
  15. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts +8 -0
  16. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts.map +1 -1
  17. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts +3 -15
  18. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts.map +1 -1
  19. package/dist/components/base/CkCopyMessageActionButton/index.d.ts +1 -0
  20. package/dist/components/base/CkCopyMessageActionButton/index.d.ts.map +1 -1
  21. package/dist/components/base/CkCopyMessageActionButton/types.d.ts +45 -0
  22. package/dist/components/base/CkCopyMessageActionButton/types.d.ts.map +1 -0
  23. package/dist/components/base/CkHistoryItem/CkHistoryItem.stories.d.ts +31 -0
  24. package/dist/components/base/CkHistoryItem/CkHistoryItem.stories.d.ts.map +1 -0
  25. package/dist/components/base/CkHistoryItem/CkHistoryItem.vue.d.ts +32 -0
  26. package/dist/components/base/CkHistoryItem/CkHistoryItem.vue.d.ts.map +1 -0
  27. package/dist/components/base/CkHistoryItem/activeIndicator.d.ts +15 -0
  28. package/dist/components/base/CkHistoryItem/activeIndicator.d.ts.map +1 -0
  29. package/dist/components/base/CkHistoryItem/index.d.ts +3 -0
  30. package/dist/components/base/CkHistoryItem/index.d.ts.map +1 -0
  31. package/dist/components/base/CkHistoryItem/types.d.ts +95 -0
  32. package/dist/components/base/CkHistoryItem/types.d.ts.map +1 -0
  33. package/dist/components/base/CkHistoryWrapper/CkHistoryWrapper.stories.d.ts +16 -0
  34. package/dist/components/base/CkHistoryWrapper/CkHistoryWrapper.stories.d.ts.map +1 -0
  35. package/dist/components/base/CkHistoryWrapper/CkHistoryWrapper.vue.d.ts +17 -0
  36. package/dist/components/base/CkHistoryWrapper/CkHistoryWrapper.vue.d.ts.map +1 -0
  37. package/dist/components/base/CkHistoryWrapper/index.d.ts +3 -0
  38. package/dist/components/base/CkHistoryWrapper/index.d.ts.map +1 -0
  39. package/dist/components/base/CkHistoryWrapper/types.d.ts +17 -0
  40. package/dist/components/base/CkHistoryWrapper/types.d.ts.map +1 -0
  41. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +28 -0
  42. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
  43. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts.map +1 -1
  44. package/dist/components/base/CkMarkdownRenderer/index.d.ts +1 -1
  45. package/dist/components/base/CkMarkdownRenderer/index.d.ts.map +1 -1
  46. package/dist/components/base/CkMarkdownRenderer/types.d.ts +16 -0
  47. package/dist/components/base/CkMarkdownRenderer/types.d.ts.map +1 -1
  48. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.stories.d.ts +4 -0
  49. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.stories.d.ts.map +1 -1
  50. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.vue.d.ts +2 -5
  51. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.vue.d.ts.map +1 -1
  52. package/dist/components/base/CkMessageActionButton/index.d.ts +1 -0
  53. package/dist/components/base/CkMessageActionButton/index.d.ts.map +1 -1
  54. package/dist/components/base/CkMessageActionButton/types.d.ts +22 -0
  55. package/dist/components/base/CkMessageActionButton/types.d.ts.map +1 -0
  56. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.stories.d.ts +12 -0
  57. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.stories.d.ts.map +1 -1
  58. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.vue.d.ts +2 -7
  59. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.vue.d.ts.map +1 -1
  60. package/dist/components/base/CkPromptActionButton/index.d.ts +1 -0
  61. package/dist/components/base/CkPromptActionButton/index.d.ts.map +1 -1
  62. package/dist/components/base/CkPromptActionButton/types.d.ts +33 -0
  63. package/dist/components/base/CkPromptActionButton/types.d.ts.map +1 -0
  64. package/dist/components/base/CkPromptInput/CkPromptInput.stories.d.ts +17 -0
  65. package/dist/components/base/CkPromptInput/CkPromptInput.stories.d.ts.map +1 -1
  66. package/dist/components/base/CkPromptInput/CkPromptInput.vue.d.ts +3 -9
  67. package/dist/components/base/CkPromptInput/CkPromptInput.vue.d.ts.map +1 -1
  68. package/dist/components/base/CkPromptInput/index.d.ts +1 -0
  69. package/dist/components/base/CkPromptInput/index.d.ts.map +1 -1
  70. package/dist/components/base/CkPromptInput/types.d.ts +39 -0
  71. package/dist/components/base/CkPromptInput/types.d.ts.map +1 -0
  72. package/dist/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.stories.d.ts +12 -0
  73. package/dist/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.stories.d.ts.map +1 -1
  74. package/dist/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.vue.d.ts +2 -4
  75. package/dist/components/base/CkPromptInputDisclaimer/CkPromptInputDisclaimer.vue.d.ts.map +1 -1
  76. package/dist/components/base/CkPromptInputDisclaimer/index.d.ts +1 -0
  77. package/dist/components/base/CkPromptInputDisclaimer/index.d.ts.map +1 -1
  78. package/dist/components/base/CkPromptInputDisclaimer/types.d.ts +18 -0
  79. package/dist/components/base/CkPromptInputDisclaimer/types.d.ts.map +1 -0
  80. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.stories.d.ts +8 -0
  81. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.stories.d.ts.map +1 -1
  82. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.vue.d.ts +3 -6
  83. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.vue.d.ts.map +1 -1
  84. package/dist/components/base/CkPromptStopButton/index.d.ts +1 -0
  85. package/dist/components/base/CkPromptStopButton/index.d.ts.map +1 -1
  86. package/dist/components/base/CkPromptStopButton/types.d.ts +28 -0
  87. package/dist/components/base/CkPromptStopButton/types.d.ts.map +1 -0
  88. package/dist/components/base/CkUserMessage/CkUserMessage.stories.d.ts +15 -0
  89. package/dist/components/base/CkUserMessage/CkUserMessage.stories.d.ts.map +1 -1
  90. package/dist/components/base/CkUserMessage/CkUserMessage.vue.d.ts.map +1 -1
  91. package/dist/components/base/CkUserMessage/types.d.ts +9 -2
  92. package/dist/components/base/CkUserMessage/types.d.ts.map +1 -1
  93. package/dist/components/base/icons/CkStopIcon.vue.d.ts.map +1 -1
  94. package/dist/components/base/index.d.ts +5 -1
  95. package/dist/components/base/index.d.ts.map +1 -1
  96. package/dist/components/composed/CkConversation/CkConversation.stories.d.ts +55 -0
  97. package/dist/components/composed/CkConversation/CkConversation.stories.d.ts.map +1 -1
  98. package/dist/components/composed/CkConversation/CkConversation.vue.d.ts.map +1 -1
  99. package/dist/components/composed/CkConversation/types.d.ts +25 -6
  100. package/dist/components/composed/CkConversation/types.d.ts.map +1 -1
  101. package/dist/components/composed/CkHistory/CkHistory.stories.d.ts +33 -0
  102. package/dist/components/composed/CkHistory/CkHistory.stories.d.ts.map +1 -0
  103. package/dist/components/composed/CkHistory/CkHistory.vue.d.ts +50 -0
  104. package/dist/components/composed/CkHistory/CkHistory.vue.d.ts.map +1 -0
  105. package/dist/components/composed/CkHistory/index.d.ts +3 -0
  106. package/dist/components/composed/CkHistory/index.d.ts.map +1 -0
  107. package/dist/components/composed/CkHistory/types.d.ts +71 -0
  108. package/dist/components/composed/CkHistory/types.d.ts.map +1 -0
  109. package/dist/components/composed/CkInput/CkInput.stories.d.ts +31 -1
  110. package/dist/components/composed/CkInput/CkInput.stories.d.ts.map +1 -1
  111. package/dist/components/composed/CkInput/CkInput.vue.d.ts +3 -12
  112. package/dist/components/composed/CkInput/CkInput.vue.d.ts.map +1 -1
  113. package/dist/components/composed/CkInput/index.d.ts +1 -0
  114. package/dist/components/composed/CkInput/index.d.ts.map +1 -1
  115. package/dist/components/composed/CkInput/types.d.ts +60 -0
  116. package/dist/components/composed/CkInput/types.d.ts.map +1 -0
  117. package/dist/components/composed/index.d.ts +2 -0
  118. package/dist/components/composed/index.d.ts.map +1 -1
  119. package/dist/components/index.d.ts +4 -4
  120. package/dist/components/index.d.ts.map +1 -1
  121. package/dist/components/index.js +14 -11
  122. package/dist/composables/index.d.ts +2 -0
  123. package/dist/composables/index.d.ts.map +1 -1
  124. package/dist/composables/index.js +3 -3
  125. package/dist/composables/useConversations.d.ts +72 -0
  126. package/dist/composables/useConversations.d.ts.map +1 -0
  127. package/dist/generateId-BHf0W4Rq.js +6 -0
  128. package/dist/handlers/index.js +2 -2
  129. package/dist/handlers/useChatKitLabels.d.ts +8 -0
  130. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  131. package/dist/handlers/useMarkdownParser.d.ts.map +1 -1
  132. package/dist/helpers/conversationTree.d.ts.map +1 -1
  133. package/dist/helpers/index.d.ts +2 -0
  134. package/dist/helpers/index.d.ts.map +1 -1
  135. package/dist/helpers/secondsToDate.d.ts +6 -0
  136. package/dist/helpers/secondsToDate.d.ts.map +1 -0
  137. package/dist/helpers/toError.d.ts +7 -0
  138. package/dist/helpers/toError.d.ts.map +1 -0
  139. package/dist/index.d.ts +6 -6
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.js +20 -16
  142. package/dist/services/ChatService.d.ts.map +1 -1
  143. package/dist/services/MockChatService.d.ts.map +1 -1
  144. package/dist/services/index.d.ts +1 -1
  145. package/dist/services/index.d.ts.map +1 -1
  146. package/dist/services/index.js +4 -1
  147. package/dist/services/types.d.ts +53 -0
  148. package/dist/services/types.d.ts.map +1 -1
  149. package/dist/types.d.ts +13 -0
  150. package/dist/types.d.ts.map +1 -1
  151. package/dist/{useChatKitLabels-DNwoZ1x6.js → useChatKitLabels-Dvi2FmjE.js} +8 -2
  152. package/dist/useConversations-Ca242D2P.js +195 -0
  153. package/dist/{useMessageHandler-D7OdrrcB.js → useMessageHandler-uLHNac39.js} +1 -3
  154. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -3,16 +3,71 @@ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
3
  declare const meta: Meta<typeof CkConversation>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
+ /**
7
+ * Drop-in conversation UI. Pass `messages` with `role`, `content`, and `status`
8
+ * fields and CkConversation renders user bubbles, assistant markdown, avatars,
9
+ * and a copy button on each reply.
10
+ */
6
11
  export declare const Default: Story;
12
+ /**
13
+ * Uses a remote avatar image (with fallback text). Use when you want a
14
+ * branded agent identity in each reply.
15
+ */
7
16
  export declare const WithIcon: Story;
17
+ /**
18
+ * Text-only avatar via `agent-avatar-fallback`. Use when you have no image
19
+ * and want to display initials instead.
20
+ */
8
21
  export declare const WithCustomAvatarFallback: Story;
22
+ /**
23
+ * Hides the avatar completely. Use for minimalist chat surfaces where the
24
+ * assistant identity is conveyed elsewhere (e.g. surrounding header).
25
+ */
9
26
  export declare const NoIcon: Story;
27
+ /**
28
+ * Replaces the default avatar with custom markup through the
29
+ * `#agent-message-icon` slot. Use to inject an emoji, Lottie animation, or
30
+ * your own branded icon.
31
+ */
10
32
  export declare const WithCustomIcon: Story;
33
+ /**
34
+ * Overrides `#agent-message-footer` to add custom action buttons (copy,
35
+ * regenerate, thumbs up/down) next to each assistant reply. Use to add
36
+ * feedback or follow-up actions.
37
+ */
11
38
  export declare const WithFooterActions: Story;
39
+ /**
40
+ * Customizes the user message body via `#user-message-content`. Use to apply
41
+ * special typography, mentions, or attachments to user turns.
42
+ */
12
43
  export declare const WithCustomUserContent: Story;
44
+ /**
45
+ * Replaces the default Markdown rendering with a custom layout via
46
+ * `#agent-message-content`. Use when you want raw content display or a
47
+ * different renderer.
48
+ */
13
49
  export declare const WithCustomAgentContent: Story;
50
+ /**
51
+ * End-to-end streaming scenario: appending a new user message and then
52
+ * streaming an assistant reply chunk-by-chunk. Use as a reference for wiring
53
+ * up an LLM SDK that emits token deltas.
54
+ */
14
55
  export declare const StreamingSimulation: Story;
56
+ /**
57
+ * Overrides default Markdown element classes via `agent-markdown-classes`.
58
+ * Use to apply your design-system tokens to assistant replies without writing
59
+ * a custom renderer slot.
60
+ */
15
61
  export declare const WithCustomMarkdownClasses: Story;
62
+ /**
63
+ * Integrates a custom code-block renderer (Shiki, Prism, etc.) via
64
+ * `#agent-message-code-block`. Use when you want syntax highlighting or
65
+ * inline copy buttons for assistant code.
66
+ */
16
67
  export declare const WithCustomCodeBlock: Story;
68
+ /**
69
+ * Empty state — an initial view before the first turn. Use to show a welcome
70
+ * screen, quick prompts, or onboarding content above this surface.
71
+ */
17
72
  export declare const Empty: Story;
18
73
  //# sourceMappingURL=CkConversation.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CkConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.stories.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA8D3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAUrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAStC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAcnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAcpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAkEjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAgBvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA+CjC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
1
+ {"version":3,"file":"CkConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.stories.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA8D3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAkCrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoMnC;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAYtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAkB/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAiBnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAiBpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAsFjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAmBvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgDjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CkConversation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.vue"],"names":[],"mappings":"AAiIE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAanD,KAAK,WAAW,GAAG;IACjB,gDAAgD;IAChD,cAAc,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1D,yDAAyD;IACzD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,iDAAiD;IACjD,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3D,oCAAoC;IACpC,oBAAoB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,8EAA8E;IAC9E,4BAA4B,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,uCAAuC;IACvC,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qCAAqC;IACrC,uBAAuB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,mDAAmD;IACnD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qEAAqE;IACrE,0BAA0B,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACjF,CAAC;AAoRJ,QAAA,MAAM,UAAU;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CkConversation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.vue"],"names":[],"mappings":"AAsJA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAkBnD,KAAK,WAAW,GAAG;IACjB,gDAAgD;IAChD,cAAc,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1D,yDAAyD;IACzD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,iDAAiD;IACjD,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3D,oCAAoC;IACpC,oBAAoB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,8EAA8E;IAC9E,4BAA4B,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,uCAAuC;IACvC,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qCAAqC;IACrC,uBAAuB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,mDAAmD;IACnD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qEAAqE;IACrE,0BAA0B,EAAE,CAAC,KAAK,EAAE;QAClC,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,IAAI,CAAC;CACZ,CAAC;AAoRF,QAAA,MAAM,UAAU;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,18 +1,37 @@
1
1
  import type { BaseMessage } from '../../../types';
2
2
  import type { CkMarkdownElementClasses } from '../../base/CkMarkdownRenderer';
3
3
  /**
4
- * Props for the CkConversation component
4
+ * High-level chat conversation: renders user and agent messages, Markdown for
5
+ * assistant replies, an avatar, copy-to-clipboard action, streaming viewport,
6
+ * and slots for overriding any part of the rendering. Use as the drop-in
7
+ * conversation surface for most chat-kit integrations.
8
+ *
9
+ * @category Messages
10
+ * @useCases complete chat conversation ui, streaming chat with markdown, assistant chat view, llm conversation component, drop-in chat surface
11
+ * @keywords conversation, chat, messages, assistant, agent, user, markdown, streaming, avatar
12
+ * @related CkConversationLayout, CkAgentMessage, CkUserMessage, CkMarkdownRenderer, CkCopyMessageActionButton, CkInput
5
13
  */
6
14
  export interface CkConversationProps {
7
- /** List of messages to display */
15
+ /** List of messages to display, in chronological order. */
8
16
  messages: BaseMessage[];
9
- /** URL of the agent avatar image (same for all agent messages) */
17
+ /**
18
+ * URL of the agent avatar image, shared across all agent messages.
19
+ * @default ''
20
+ */
10
21
  agentAvatarImage?: string;
11
- /** Fallback text shown inside the default agent avatar when no image is available */
22
+ /**
23
+ * Fallback text rendered inside the default agent avatar when no image is
24
+ * available.
25
+ * @default ''
26
+ */
12
27
  agentAvatarFallback?: string;
13
- /** URL of the loading avatar image shown while a message is being generated */
28
+ /**
29
+ * URL of the loading avatar image shown while an agent message is being
30
+ * generated. When omitted a spinner is used instead.
31
+ * @default ''
32
+ */
14
33
  agentLoadingImage?: string;
15
- /** Override default CSS classes applied to markdown elements in agent messages */
34
+ /** Override default CSS classes applied to Markdown elements in agent messages. */
16
35
  agentMarkdownClasses?: CkMarkdownElementClasses;
17
36
  }
18
37
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,wBAAwB,CAAC;CACjD"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,wBAAwB,CAAC;CACjD"}
@@ -0,0 +1,33 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import CkHistory from './CkHistory.vue';
3
+ declare const meta: Meta<typeof CkHistory>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CkHistory>;
6
+ /**
7
+ * Default list with per-row Edit / Delete actions and an active row. Plain
8
+ * left-clicks emit `select` (call `router.push(...)` in the handler);
9
+ * middle-click, cmd/ctrl-click, and right-click keep native browser
10
+ * behavior via the resolved `href`.
11
+ */
12
+ export declare const Default: Story;
13
+ /**
14
+ * Hides the per-row kebab action (`show-action="false"`). Use when
15
+ * conversations are read-only or actions live elsewhere in the UI.
16
+ */
17
+ export declare const WithoutActions: Story;
18
+ /**
19
+ * Typical Vue Router integration. The `<a href>` produced by `hrefResolver`
20
+ * enables native middle-click / cmd-click "open in new tab" and right-click
21
+ * "Copy link address". Plain left-clicks are intercepted via the `select`
22
+ * event so you can call `router.push(...)`.
23
+ */
24
+ export declare const RouterLinkIntegration: Story;
25
+ /**
26
+ * Replaces each row via the `#item` scoped slot. Use this when you want
27
+ * to wrap rows in `<RouterLink>` for native vue-router integration: the
28
+ * slot scope exposes the resolved row data plus `select` / `edit` /
29
+ * `delete` helpers, and you reuse `CkHistoryItem` to keep the default
30
+ * look while delegating navigation to the router.
31
+ */
32
+ export declare const WithCustomItem: Story;
33
+ //# sourceMappingURL=CkHistory.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkHistory.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkHistory/CkHistory.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,SAAS,MAAM,iBAAiB,CAAC;AA+CxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAoBhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AA2KxC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,KAyE5B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { Conversation } from '../../../types';
2
+ import type { CkHistoryProps } from './types';
3
+ type __VLS_Slots = {
4
+ /**
5
+ * Replace the entire row rendering. Use this to wrap each row in your
6
+ * own navigation primitive (e.g. vue-router `<RouterLink>`) while still
7
+ * receiving the resolved row data and the standard event helpers.
8
+ *
9
+ * Slot scope:
10
+ * - `conversation` — raw `Conversation` for this row
11
+ * - `href` — URL produced by `hrefResolver(conversation.id)`
12
+ * - `isActive` — whether this row matches `activeId`
13
+ * - `title` — resolved title (falls back to `historyItemUntitled` label)
14
+ * - `select(event)` — RouterLink-style click guard: `preventDefault()`
15
+ * and emit `select` for plain left-clicks; ignores middle/modifier
16
+ * clicks so native browser affordances still work.
17
+ * - `edit()` / `delete()` — emit the corresponding event for this row
18
+ */
19
+ item: (props: {
20
+ conversation: Conversation;
21
+ href: string;
22
+ isActive: boolean;
23
+ title: string;
24
+ select: (event: MouseEvent) => void;
25
+ edit: () => void;
26
+ delete: () => void;
27
+ }) => void;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<CkHistoryProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ delete: (conversation: Conversation) => any;
31
+ select: (conversation: Conversation, event: MouseEvent) => any;
32
+ edit: (conversation: Conversation) => any;
33
+ }, string, import("vue").PublicProps, Readonly<CkHistoryProps> & Readonly<{
34
+ onDelete?: ((conversation: Conversation) => any) | undefined;
35
+ onSelect?: ((conversation: Conversation, event: MouseEvent) => any) | undefined;
36
+ onEdit?: ((conversation: Conversation) => any) | undefined;
37
+ }>, {
38
+ showAction: boolean;
39
+ showActionOnHover: boolean;
40
+ activeId: string;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
+ declare const _default: typeof __VLS_export;
44
+ export default _default;
45
+ type __VLS_WithSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
50
+ //# sourceMappingURL=CkHistory.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkHistory.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkHistory/CkHistory.vue"],"names":[],"mappings":"AAyIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,SAAS,CAAC;AAc9D,KAAK,WAAW,GAAG;IACjB;;;;;;;;;;;;;;OAcG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE;QACZ,YAAY,EAAE,YAAY,CAAC;QAC3B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QACpC,IAAI,EAAE,MAAM,IAAI,CAAC;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC;KACpB,KAAK,IAAI,CAAC;CACZ,CAAC;AAmOF,QAAA,MAAM,UAAU;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as CkHistory } from './CkHistory.vue';
2
+ export type * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkHistory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,71 @@
1
+ import type { Conversation } from '../../../types';
2
+ /**
3
+ * Composed conversation history list. Renders each conversation as a real
4
+ * `<a href>` row so middle-click, cmd/ctrl-click, and right-click "Copy link
5
+ * address" all work natively. Plain left-clicks are intercepted via a
6
+ * RouterLink-style guard and exposed as a `select` event so consumers can
7
+ * call `router.push(...)` (or any other navigation primitive) themselves.
8
+ *
9
+ * Per-row "Edit" and "Delete" actions are rendered internally; consumers
10
+ * receive `edit` / `delete` events with the corresponding conversation.
11
+ *
12
+ * Use the `#item` scoped slot to fully replace the row rendering — for
13
+ * example to wrap each row in `<RouterLink>` for native vue-router
14
+ * integration. The slot scope exposes the resolved row data
15
+ * (`conversation`, `href`, `isActive`, `title`) plus `select` / `edit` /
16
+ * `delete` helpers that emit the same events as the default rendering.
17
+ *
18
+ * @category Messages
19
+ * @useCases conversation history list, recent chats sidebar entry, thread navigation, chat history pane
20
+ * @keywords conversation, history, list, navigation, link, sidebar, threads, routerlink
21
+ * @related CkHistoryWrapper, CkHistoryItem
22
+ */
23
+ export interface CkHistoryProps {
24
+ /** Conversations to display, in the order they should render. */
25
+ conversations: Conversation[];
26
+ /**
27
+ * Resolves a conversation id to the URL set on each row's `<a href>`.
28
+ * Required so middle-click / cmd-click / right-click-copy work natively.
29
+ * Gives the consumer full control over URL shape (nested routes, query
30
+ * params, hash routes, locale prefixes, etc).
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const router = useRouter();
35
+ * const hrefResolver = (id: string) =>
36
+ * router.resolve({ name: 'chat', params: { id } }).href;
37
+ * ```
38
+ */
39
+ hrefResolver: (id: string) => string;
40
+ /** Id of the currently-active conversation; marks that row as active. */
41
+ activeId?: string;
42
+ /**
43
+ * Whether to show the trailing action kebab (edit / delete popover).
44
+ * @default true
45
+ */
46
+ showAction?: boolean;
47
+ /**
48
+ * Whether the trailing action is only revealed on row hover/focus-within.
49
+ * @default true
50
+ */
51
+ showActionOnHover?: boolean;
52
+ }
53
+ /**
54
+ * Emitted events for `CkHistory`.
55
+ */
56
+ export interface CkHistoryEmits {
57
+ /**
58
+ * Fired on a plain left-click of a conversation row. Middle-click,
59
+ * cmd/ctrl/shift/alt-click, and right-click do NOT emit — they fall
60
+ * through to native browser behaviour so users can open the conversation
61
+ * in a new tab, copy the link, etc. The component calls
62
+ * `event.preventDefault()` before emitting so consumers can safely call
63
+ * `router.push(...)` in the handler.
64
+ */
65
+ select: [conversation: Conversation, event: MouseEvent];
66
+ /** Fired when the "Edit" action is selected from a row's popover menu. */
67
+ edit: [conversation: Conversation];
68
+ /** Fired when the "Delete" action is selected from a row's popover menu. */
69
+ delete: [conversation: Conversation];
70
+ }
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkHistory/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACxD,0EAA0E;IAC1E,IAAI,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACnC,4EAA4E;IAC5E,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;CACtC"}
@@ -3,11 +3,41 @@ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
3
  declare const meta: Meta<typeof CkInput>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
+ /**
7
+ * Default chat input with disclaimer and the built-in send button.
8
+ * Use as the primary way to let users submit a prompt to the assistant.
9
+ */
6
10
  export declare const Default: Story;
11
+ /**
12
+ * Adds a mode toggle (Express/Smart) to the left side of the toolbar via
13
+ * `#toolbar-left`. Use when the user needs to switch between assistant
14
+ * presets or capabilities before submitting.
15
+ */
7
16
  export declare const WithModeToggle: Story;
17
+ /**
18
+ * End-to-end example: mode toggle on the left, attachment button + custom
19
+ * send button on the right, and a disclaimer underneath. Use as a reference
20
+ * for a production-ready chat compose UI.
21
+ */
8
22
  export declare const FullExample: Story;
23
+ /**
24
+ * Disabled state — the textarea is read-only and the send button is inactive.
25
+ * Use while waiting for an upstream action to resolve.
26
+ */
9
27
  export declare const Disabled: Story;
10
- export declare const GeneratingResponse: Story;
28
+ /**
29
+ * Loading state — shown while the assistant is generating a reply. The
30
+ * send button displays a spinner and the input is blocked.
31
+ */
32
+ export declare const Loading: Story;
33
+ /**
34
+ * Demonstrates the textarea's auto-grow behavior with multi-paragraph content.
35
+ * Use when validating how the input handles long prompts.
36
+ */
11
37
  export declare const WithLongText: Story;
38
+ /**
39
+ * Narrow viewport preview (≈320px). Use to verify the input stays usable on
40
+ * small screens.
41
+ */
12
42
  export declare const MobileWidth: Story;
13
43
  //# sourceMappingURL=CkInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CkInput.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAM3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAS9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA+C5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA0FzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA0BhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAqBzB,CAAC"}
1
+ {"version":3,"file":"CkInput.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAM3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAyC9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqGnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAgD5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KA2FzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAuB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC"}
@@ -1,13 +1,4 @@
1
- type __VLS_Props = {
2
- modelValue?: string;
3
- placeholder?: string;
4
- disabled?: boolean;
5
- loading?: boolean;
6
- maxHeight?: number;
7
- ariaLabel?: string;
8
- stopAriaLabel?: string;
9
- disclaimer?: string;
10
- };
1
+ import type { CkInputProps } from './types';
11
2
  declare function focus(): void;
12
3
  declare function submit(): void;
13
4
  declare var __VLS_13: {}, __VLS_16: {
@@ -26,14 +17,14 @@ type __VLS_Slots = {} & {
26
17
  } & {
27
18
  footer?: (props: typeof __VLS_47) => any;
28
19
  };
29
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
20
+ declare const __VLS_base: import("vue").DefineComponent<CkInputProps, {
30
21
  focus: typeof focus;
31
22
  submit: typeof submit;
32
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
33
24
  stop: () => any;
34
25
  submit: (value: string) => any;
35
26
  "update:modelValue": (value: string) => any;
36
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ }, string, import("vue").PublicProps, Readonly<CkInputProps> & Readonly<{
37
28
  onStop?: (() => any) | undefined;
38
29
  onSubmit?: ((value: string) => any) | undefined;
39
30
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"CkInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.vue"],"names":[],"mappings":"AA+HE,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAsCJ,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,MAAM,IAAI,IAAI,CAEtB;AAqKH,QAAA,IAAuB,QAAQ,IAAW,EAAE,QAAQ;;;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACjI,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;;;eAjOE,MAAM;cAHP,OAAO;aACR,OAAO;gBAHJ,MAAM;iBACL,MAAM;eAGR,MAAM;mBAEF,MAAM;gBACT,MAAM;6EAoOvB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CkInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.vue"],"names":[],"mappings":"AAiHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAyC5C,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,MAAM,IAAI,IAAI,CAEtB;AAqKD,QAAA,IAAuB,QAAQ,IAAW,EAAE,QAAQ;;;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACjI,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;6EAKd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { default as CkInput } from './CkInput.vue';
2
+ export type * from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Drop-in chat input: combines `CkPromptInput`, a `CkPromptActionButton` send
3
+ * button, and a `CkPromptInputDisclaimer`. Supports `v-model`, loading and
4
+ * disabled states, and slots to customize the toolbar and footer.
5
+ *
6
+ * @category Form Inputs
7
+ * @useCases chat compose input, prompt box with send button, llm input with disclaimer, quick-start chat input, turnkey chat input
8
+ * @keywords input, prompt, chat, send, compose, disclaimer, loading, v-model, textarea
9
+ * @related CkPromptInput, CkPromptActionButton, CkPromptInputDisclaimer, CkConversation
10
+ */
11
+ export interface CkInputProps {
12
+ /**
13
+ * Current value of the input. Supports `v-model`.
14
+ * @default ''
15
+ */
16
+ modelValue?: string;
17
+ /**
18
+ * Placeholder shown when the input is empty.
19
+ * @default 'Ask me anything'
20
+ */
21
+ placeholder?: string;
22
+ /**
23
+ * Whether the input is disabled. Also implied when `loading` is `true`.
24
+ * @default false
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * Shows a spinner in the send button and disables the input while a reply
29
+ * is being generated.
30
+ * @default false
31
+ */
32
+ loading?: boolean;
33
+ /**
34
+ * Max height (in px) of the underlying textarea before it becomes scrollable.
35
+ * @default 200
36
+ */
37
+ maxHeight?: number;
38
+ /**
39
+ * Accessible label for the input.
40
+ * @default 'Chat message input'
41
+ */
42
+ ariaLabel?: string;
43
+ /**
44
+ * Accessible label for the stop generating button.
45
+ * @default 'Stop generating'
46
+ */
47
+ stopAriaLabel?: string;
48
+ /**
49
+ * Optional disclaimer text rendered below the input via
50
+ * `CkPromptInputDisclaimer`. Omit to render no disclaimer.
51
+ */
52
+ disclaimer?: string;
53
+ }
54
+ export interface CkInputEmits {
55
+ /** Emitted on every keystroke. */
56
+ (e: 'update:modelValue', value: string): void;
57
+ /** Emitted when the user submits via Enter or the send button. */
58
+ (e: 'submit', value: string): void;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,kEAAkE;IAClE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
@@ -1,4 +1,6 @@
1
1
  export { CkConversation } from './CkConversation';
2
2
  export type { CkConversationProps } from './CkConversation';
3
+ export { CkHistory } from './CkHistory';
4
+ export type { CkHistoryEmits, CkHistoryProps } from './CkHistory';
3
5
  export { CkInput } from './CkInput';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
- export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
- export type { CkConversationLayoutProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './base';
3
- export { CkConversation, CkInput } from './composed';
4
- export type { CkConversationProps } from './composed';
1
+ export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
+ export type { CkConversationLayoutProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './base';
3
+ export { CkConversation, CkHistory, CkInput } from './composed';
4
+ export type { CkConversationProps, CkHistoryEmits, CkHistoryProps, } from './composed';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
@@ -1,17 +1,20 @@
1
- import { _, a, b, C, c, d, e, f, g, h, i, j, k, l } from "../CkInput.vue_vue_type_script_setup_true_lang-DmcLXAgB.js";
1
+ import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o } from "../CkInput.vue_vue_type_script_setup_true_lang-744ZHsQU.js";
2
2
  export {
3
3
  _ as CkAgentMessage,
4
4
  a as CkConversation,
5
5
  b as CkConversationLayout,
6
6
  C as CkCopyMessageActionButton,
7
- c as CkInput,
8
- d as CkMarkdownRenderer,
9
- e as CkMessageActionButton,
10
- f as CkPromptActionButton,
11
- g as CkPromptInput,
12
- h as CkPromptInputDisclaimer,
13
- i as CkPromptStopButton,
14
- j as CkSendIcon,
15
- k as CkStopIcon,
16
- l as CkUserMessage
7
+ c as CkHistory,
8
+ d as CkHistoryItem,
9
+ e as CkHistoryWrapper,
10
+ f as CkInput,
11
+ g as CkMarkdownRenderer,
12
+ h as CkMessageActionButton,
13
+ i as CkPromptActionButton,
14
+ j as CkPromptInput,
15
+ k as CkPromptInputDisclaimer,
16
+ l as CkPromptStopButton,
17
+ m as CkSendIcon,
18
+ n as CkStopIcon,
19
+ o as CkUserMessage
17
20
  };
@@ -1,3 +1,5 @@
1
1
  export { useChat } from './useChat';
2
+ export { useConversations } from './useConversations';
3
+ export type { CreateConversationInput, MutationOptions, UseConversationsOptions, UseConversationsReturn, } from './useConversations';
2
4
  export type { ChatActions, ChatState, UseChatReturn } from './types';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
- function useChat() {
2
- }
1
+ import { u, a } from "../useConversations-Ca242D2P.js";
3
2
  export {
4
- useChat
3
+ u as useChat,
4
+ a as useConversations
5
5
  };