@aleph-alpha/chat-kit 3.2.0 → 4.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 (164) hide show
  1. package/dist/{CkInput.vue_vue_type_script_setup_true_lang-B-4xnH2c.js → CkInput.vue_vue_type_script_setup_true_lang-DJN-nZ2-.js} +391 -113
  2. package/dist/adapters/responses-api.d.ts +11 -5
  3. package/dist/adapters/responses-api.d.ts.map +1 -1
  4. package/dist/adapters/responses-api.js +9 -3
  5. package/dist/chat-kit.css +14 -8
  6. package/dist/components/base/CkAgentMessage/CkAgentMessage.stories.d.ts +7 -0
  7. package/dist/components/base/CkAgentMessage/CkAgentMessage.stories.d.ts.map +1 -1
  8. package/dist/components/base/CkAgentMessage/types.d.ts +1 -1
  9. package/dist/components/base/CkCitation/CkCitation.stories.d.ts +47 -0
  10. package/dist/components/base/CkCitation/CkCitation.stories.d.ts.map +1 -0
  11. package/dist/components/base/CkCitation/CkCitation.vue.d.ts +15 -0
  12. package/dist/components/base/CkCitation/CkCitation.vue.d.ts.map +1 -0
  13. package/dist/components/base/CkCitation/index.d.ts +3 -0
  14. package/dist/components/base/CkCitation/index.d.ts.map +1 -0
  15. package/dist/components/base/CkCitation/types.d.ts +79 -0
  16. package/dist/components/base/CkCitation/types.d.ts.map +1 -0
  17. package/dist/components/base/CkCitationCard/CkCitationCard.stories.d.ts +51 -0
  18. package/dist/components/base/CkCitationCard/CkCitationCard.stories.d.ts.map +1 -0
  19. package/dist/components/base/CkCitationCard/CkCitationCard.vue.d.ts +13 -0
  20. package/dist/components/base/CkCitationCard/CkCitationCard.vue.d.ts.map +1 -0
  21. package/dist/components/base/CkCitationCard/index.d.ts +3 -0
  22. package/dist/components/base/CkCitationCard/index.d.ts.map +1 -0
  23. package/dist/components/base/CkCitationCard/types.d.ts +51 -0
  24. package/dist/components/base/CkCitationCard/types.d.ts.map +1 -0
  25. package/dist/components/base/{CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts → CkCopyMessageButton/CkCopyMessageButton.stories.d.ts} +3 -3
  26. package/dist/components/base/CkCopyMessageButton/CkCopyMessageButton.stories.d.ts.map +1 -0
  27. package/dist/components/base/{CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts → CkCopyMessageButton/CkCopyMessageButton.vue.d.ts} +4 -4
  28. package/dist/components/base/CkCopyMessageButton/CkCopyMessageButton.vue.d.ts.map +1 -0
  29. package/dist/components/base/CkCopyMessageButton/index.d.ts +3 -0
  30. package/dist/components/base/CkCopyMessageButton/index.d.ts.map +1 -0
  31. package/dist/components/base/{CkCopyMessageActionButton → CkCopyMessageButton}/types.d.ts +3 -3
  32. package/dist/components/base/CkCopyMessageButton/types.d.ts.map +1 -0
  33. package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue.d.ts +1 -1
  34. package/dist/components/base/CkFeedbackButton/types.d.ts +1 -1
  35. package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts +2 -2
  36. package/dist/components/base/CkFeedbackDialog/types.d.ts +1 -1
  37. package/dist/components/base/CkFileItemsList/CkFileItemsList.vue.d.ts +1 -1
  38. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +15 -0
  39. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
  40. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts +16 -2
  41. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts.map +1 -1
  42. package/dist/components/base/CkMarkdownRenderer/index.d.ts +1 -1
  43. package/dist/components/base/CkMarkdownRenderer/index.d.ts.map +1 -1
  44. package/dist/components/base/CkMarkdownRenderer/types.d.ts +25 -0
  45. package/dist/components/base/CkMarkdownRenderer/types.d.ts.map +1 -1
  46. package/dist/components/base/CkMarkdownRenderer/useCitationRendering.d.ts +17 -0
  47. package/dist/components/base/CkMarkdownRenderer/useCitationRendering.d.ts.map +1 -0
  48. package/dist/components/base/{CkMessageActionButton/CkMessageActionButton.stories.d.ts → CkMessageButton/CkMessageButton.stories.d.ts} +3 -3
  49. package/dist/components/base/CkMessageButton/CkMessageButton.stories.d.ts.map +1 -0
  50. package/dist/components/base/{CkMessageActionButton/CkMessageActionButton.vue.d.ts → CkMessageButton/CkMessageButton.vue.d.ts} +3 -3
  51. package/dist/components/base/CkMessageButton/CkMessageButton.vue.d.ts.map +1 -0
  52. package/dist/components/base/CkMessageButton/index.d.ts +3 -0
  53. package/dist/components/base/CkMessageButton/index.d.ts.map +1 -0
  54. package/dist/components/base/{CkMessageActionButton → CkMessageButton}/types.d.ts +2 -2
  55. package/dist/components/base/CkMessageButton/types.d.ts.map +1 -0
  56. package/dist/components/base/CkPromptSendButton/CkPromptSendButton.vue.d.ts +1 -1
  57. package/dist/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.stories.d.ts +16 -0
  58. package/dist/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.stories.d.ts.map +1 -0
  59. package/dist/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.vue.d.ts +12 -0
  60. package/dist/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.vue.d.ts.map +1 -0
  61. package/dist/components/base/CkRegenerateMessageButton/index.d.ts +3 -0
  62. package/dist/components/base/{CkCopyMessageActionButton → CkRegenerateMessageButton}/index.d.ts.map +1 -1
  63. package/dist/components/base/CkRegenerateMessageButton/types.d.ts +27 -0
  64. package/dist/components/base/CkRegenerateMessageButton/types.d.ts.map +1 -0
  65. package/dist/components/base/index.d.ts +8 -3
  66. package/dist/components/base/index.d.ts.map +1 -1
  67. package/dist/components/composed/CkConversation/CkConversation.stories.d.ts +1 -1
  68. package/dist/components/composed/CkConversation/types.d.ts +1 -1
  69. package/dist/components/composed/CkInput/CkInput.vue.d.ts +1 -1
  70. package/dist/components/index.d.ts +2 -2
  71. package/dist/components/index.d.ts.map +1 -1
  72. package/dist/components/index.js +26 -23
  73. package/dist/composables/fileUpload/useFileUpload.d.ts.map +1 -1
  74. package/dist/composables/fileUpload/useFileUploadWrapper.d.ts.map +1 -1
  75. package/dist/composables/index.js +1 -1
  76. package/dist/handlers/index.d.ts +2 -0
  77. package/dist/handlers/index.d.ts.map +1 -1
  78. package/dist/handlers/index.js +4 -3
  79. package/dist/handlers/useChatKitLabels.d.ts +13 -0
  80. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  81. package/dist/handlers/useMarkdownParser.d.ts.map +1 -1
  82. package/dist/handlers/useMessageHandler.d.ts +37 -0
  83. package/dist/handlers/useMessageHandler.d.ts.map +1 -1
  84. package/dist/helpers/conversationTree.d.ts +15 -0
  85. package/dist/helpers/conversationTree.d.ts.map +1 -1
  86. package/dist/helpers/unified/remarkCitations.d.ts +17 -0
  87. package/dist/helpers/unified/remarkCitations.d.ts.map +1 -0
  88. package/dist/{index-DAmWGYNH.js → index-CyrVnbS9.js} +86 -71
  89. package/dist/index.d.ts +2 -2
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +30 -27
  92. package/dist/{useChatKitLabels-D5gNv8se.js → useChatKitLabels-zMFV7aEz.js} +31 -3
  93. package/dist/{useMessageHandler-CMdy-lm0.js → useMessageHandler-N50Yj-NU.js} +45 -7
  94. package/package.json +5 -3
  95. package/src/adapters/responses-api.spec.ts +52 -5
  96. package/src/adapters/responses-api.ts +26 -7
  97. package/src/components/base/CkAgentMessage/CkAgentMessage.stories.ts +112 -0
  98. package/src/components/base/CkAgentMessage/types.ts +1 -1
  99. package/src/components/base/CkCitation/CkCitation.spec.ts +79 -0
  100. package/src/components/base/CkCitation/CkCitation.stories.ts +136 -0
  101. package/src/components/base/CkCitation/CkCitation.vue +145 -0
  102. package/src/components/base/CkCitation/index.ts +2 -0
  103. package/src/components/base/CkCitation/types.ts +80 -0
  104. package/src/components/base/CkCitationCard/CkCitationCard.spec.ts +77 -0
  105. package/src/components/base/CkCitationCard/CkCitationCard.stories.ts +144 -0
  106. package/src/components/base/CkCitationCard/CkCitationCard.vue +76 -0
  107. package/src/components/base/CkCitationCard/index.ts +2 -0
  108. package/src/components/base/CkCitationCard/types.ts +51 -0
  109. package/src/components/base/{CkCopyMessageActionButton/CkCopyMessageActionButton.spec.ts → CkCopyMessageButton/CkCopyMessageButton.spec.ts} +6 -6
  110. package/src/components/base/{CkCopyMessageActionButton/CkCopyMessageActionButton.stories.ts → CkCopyMessageButton/CkCopyMessageButton.stories.ts} +8 -8
  111. package/src/components/base/{CkCopyMessageActionButton/CkCopyMessageActionButton.vue → CkCopyMessageButton/CkCopyMessageButton.vue} +6 -6
  112. package/src/components/base/CkCopyMessageButton/index.ts +2 -0
  113. package/src/components/base/{CkCopyMessageActionButton → CkCopyMessageButton}/types.ts +3 -3
  114. package/src/components/base/CkFeedbackButton/CkFeedbackButton.vue +5 -5
  115. package/src/components/base/CkFeedbackButton/types.ts +1 -1
  116. package/src/components/base/CkFeedbackDialog/types.ts +1 -1
  117. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.spec.ts +124 -0
  118. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts +118 -0
  119. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue +70 -28
  120. package/src/components/base/CkMarkdownRenderer/index.ts +1 -0
  121. package/src/components/base/CkMarkdownRenderer/types.ts +26 -0
  122. package/src/components/base/CkMarkdownRenderer/useCitationRendering.spec.ts +94 -0
  123. package/src/components/base/CkMarkdownRenderer/useCitationRendering.ts +52 -0
  124. package/src/components/base/{CkMessageActionButton/CkMessageActionButton.spec.ts → CkMessageButton/CkMessageButton.spec.ts} +6 -6
  125. package/src/components/base/{CkMessageActionButton/CkMessageActionButton.stories.ts → CkMessageButton/CkMessageButton.stories.ts} +10 -10
  126. package/src/components/base/{CkMessageActionButton/CkMessageActionButton.vue → CkMessageButton/CkMessageButton.vue} +3 -3
  127. package/src/components/base/CkMessageButton/index.ts +2 -0
  128. package/src/components/base/{CkMessageActionButton → CkMessageButton}/types.ts +2 -2
  129. package/src/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.spec.ts +49 -0
  130. package/src/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.stories.ts +63 -0
  131. package/src/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.vue +43 -0
  132. package/src/components/base/CkRegenerateMessageButton/index.ts +2 -0
  133. package/src/components/base/CkRegenerateMessageButton/types.ts +27 -0
  134. package/src/components/base/index.ts +15 -2
  135. package/src/components/composed/CkConversation/CkConversation.stories.ts +6 -6
  136. package/src/components/composed/CkConversation/CkConversation.vue +2 -2
  137. package/src/components/composed/CkConversation/types.ts +1 -1
  138. package/src/components/index.ts +11 -2
  139. package/src/composables/fileUpload/useFileUpload.spec.ts +2 -61
  140. package/src/composables/fileUpload/useFileUpload.ts +2 -9
  141. package/src/composables/fileUpload/useFileUploadWrapper.spec.ts +195 -14
  142. package/src/composables/fileUpload/useFileUploadWrapper.ts +114 -81
  143. package/src/handlers/index.ts +2 -0
  144. package/src/handlers/useChatKitLabels.spec.ts +1 -0
  145. package/src/handlers/useChatKitLabels.ts +16 -0
  146. package/src/handlers/useMarkdownParser.ts +5 -2
  147. package/src/handlers/useMessageHandler.spec.ts +79 -0
  148. package/src/handlers/useMessageHandler.ts +50 -2
  149. package/src/helpers/conversationTree.spec.ts +120 -0
  150. package/src/helpers/conversationTree.ts +57 -8
  151. package/src/helpers/unified/remarkCitations.spec.ts +112 -0
  152. package/src/helpers/unified/remarkCitations.ts +55 -0
  153. package/src/index.ts +11 -2
  154. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts.map +0 -1
  155. package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts.map +0 -1
  156. package/dist/components/base/CkCopyMessageActionButton/index.d.ts +0 -3
  157. package/dist/components/base/CkCopyMessageActionButton/types.d.ts.map +0 -1
  158. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.stories.d.ts.map +0 -1
  159. package/dist/components/base/CkMessageActionButton/CkMessageActionButton.vue.d.ts.map +0 -1
  160. package/dist/components/base/CkMessageActionButton/index.d.ts +0 -3
  161. package/dist/components/base/CkMessageActionButton/index.d.ts.map +0 -1
  162. package/dist/components/base/CkMessageActionButton/types.d.ts.map +0 -1
  163. package/src/components/base/CkCopyMessageActionButton/index.ts +0 -2
  164. package/src/components/base/CkMessageActionButton/index.ts +0 -2
@@ -0,0 +1,17 @@
1
+ import { type MaybeRefOrGetter, type VNode } from 'vue';
2
+ import type { PluggableList } from 'unified';
3
+ import type { CkCitationSource } from '../CkCitation';
4
+ /** Scope passed to the `citation` slot when overriding how a source renders. */
5
+ export type CkCitationSlot = (props: {
6
+ source: CkCitationSource;
7
+ openSource: (url: string) => void;
8
+ }) => VNode[];
9
+ /**
10
+ * The citation concern of `CkMarkdownRenderer`, extracted so the renderer stays
11
+ * markdown-focused and this logic is testable on its own.
12
+ */
13
+ export declare function useCitationRendering(citations: MaybeRefOrGetter<CkCitationSource[] | undefined>, onOpenSource: (url: string) => void): {
14
+ citationPlugins: import("vue").ComputedRef<PluggableList>;
15
+ renderCitationNode: (el: Element, slot?: CkCitationSlot) => VNode | VNode[] | null;
16
+ };
17
+ //# sourceMappingURL=useCitationRendering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCitationRendering.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/useCitationRendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,KAAK,KAAK,EAAE,CAAC;AAEd;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,EAC3D,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI;;6BAkB7B,OAAO,SACJ,cAAc,KACpB,KAAK,GAAG,KAAK,EAAE,GAAG,IAAI;EAa1B"}
@@ -1,6 +1,6 @@
1
- import CkMessageActionButton from './CkMessageActionButton.vue';
1
+ import CkMessageButton from './CkMessageButton.vue';
2
2
  import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
- declare const meta: Meta<typeof CkMessageActionButton>;
3
+ declare const meta: Meta<typeof CkMessageButton>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  /**
@@ -8,4 +8,4 @@ type Story = StoryObj<typeof meta>;
8
8
  * in the default slot and a descriptive `ariaLabel` for screen readers.
9
9
  */
10
10
  export declare const Default: Story;
11
- //# sourceMappingURL=CkMessageActionButton.stories.d.ts.map
11
+ //# sourceMappingURL=CkMessageButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkMessageButton.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMessageButton/CkMessageButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAqBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAanC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { CkMessageActionButtonProps } from './types';
1
+ import type { CkMessageButtonProps } from './types';
2
2
  declare var __VLS_8: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_8) => any;
5
5
  };
6
- declare const __VLS_base: import("vue").DefineComponent<CkMessageActionButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkMessageActionButtonProps> & Readonly<{}>, {
6
+ declare const __VLS_base: import("vue").DefineComponent<CkMessageButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkMessageButtonProps> & Readonly<{}>, {
7
7
  disabled: boolean;
8
8
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -14,4 +14,4 @@ type __VLS_WithSlots<T, S> = T & {
14
14
  $slots: S;
15
15
  };
16
16
  };
17
- //# sourceMappingURL=CkMessageActionButton.vue.d.ts.map
17
+ //# sourceMappingURL=CkMessageButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkMessageButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMessageButton/CkMessageButton.vue"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAwDpD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,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"}
@@ -0,0 +1,3 @@
1
+ export { default as CkMessageButton } from './CkMessageButton.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/base/CkMessageButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,mBAAmB,SAAS,CAAC"}
@@ -5,9 +5,9 @@
5
5
  * @category Actions
6
6
  * @useCases message footer action, like/dislike reaction, share button on reply, secondary message action
7
7
  * @keywords icon button, action, message, ghost, accessible, aria-label
8
- * @related CkCopyMessageActionButton, CkAgentMessage, CkConversation
8
+ * @related CkCopyMessageButton, CkAgentMessage, CkConversation
9
9
  */
10
- export interface CkMessageActionButtonProps {
10
+ export interface CkMessageButtonProps {
11
11
  /**
12
12
  * Accessible label for the button. **Required** because the button only
13
13
  * renders an icon.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMessageButton/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -5,8 +5,8 @@ type __VLS_Slots = {} & {
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<CkPromptSendButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkPromptSendButtonProps> & Readonly<{}>, {
7
7
  type: "button" | "submit";
8
- disabled: boolean;
9
8
  loading: boolean;
9
+ disabled: boolean;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
12
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,16 @@
1
+ import CkRegenerateMessageButton from './CkRegenerateMessageButton.vue';
2
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
+ declare const meta: Meta<typeof CkRegenerateMessageButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ /**
7
+ * Default regenerate action. Clicking emits a `regenerate` event so the host
8
+ * can request a new response for the message.
9
+ */
10
+ export declare const Default: Story;
11
+ /**
12
+ * Disabled state — clicks are ignored and the button appears inactive.
13
+ * Use while a message is still streaming or in an error state.
14
+ */
15
+ export declare const Disabled: Story;
16
+ //# sourceMappingURL=CkRegenerateMessageButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkRegenerateMessageButton.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,yBAAyB,CAoBhD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAkBnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { CkRegenerateMessageButtonProps } from './types';
2
+ declare const __VLS_export: import("vue").DefineComponent<CkRegenerateMessageButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ regenerate: () => any;
4
+ }, string, import("vue").PublicProps, Readonly<CkRegenerateMessageButtonProps> & Readonly<{
5
+ onRegenerate?: (() => any) | undefined;
6
+ }>, {
7
+ ariaLabel: string;
8
+ disabled: boolean;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ //# sourceMappingURL=CkRegenerateMessageButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkRegenerateMessageButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkRegenerateMessageButton/CkRegenerateMessageButton.vue"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAkH9D,QAAA,MAAM,YAAY;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,3 @@
1
+ export { default as CkRegenerateMessageButton } from './CkRegenerateMessageButton.vue';
2
+ export type * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCopyMessageActionButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACvF,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkRegenerateMessageButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACvF,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Regenerate action button for chat messages. Lets the user request a new
3
+ * response for an assistant message. Renders an icon-only button with an
4
+ * accessible label and tooltip.
5
+ *
6
+ * @category Actions
7
+ * @useCases regenerate assistant reply, retry message, request new response, chat message action
8
+ * @keywords regenerate, retry, repeat, action, message, button, icon
9
+ * @related CkMessageButton, CkCopyMessageButton, CkAgentMessage, CkConversation
10
+ */
11
+ export interface CkRegenerateMessageButtonProps {
12
+ /**
13
+ * Whether the button is disabled and ignores clicks.
14
+ * @default false
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * Accessible label and tooltip content for the button.
19
+ * @default 'Regenerate response'
20
+ */
21
+ ariaLabel?: string;
22
+ }
23
+ export interface CkRegenerateMessageButtonEmits {
24
+ /** Emitted when the button is pressed and not disabled. */
25
+ (e: 'regenerate'): void;
26
+ }
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkRegenerateMessageButton/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,8BAA8B;IAC7C,2DAA2D;IAC3D,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACzB"}
@@ -1,8 +1,12 @@
1
1
  export { CkSendIcon, CkStopIcon } from './icons';
2
2
  export { CkAgentMessage } from './CkAgentMessage';
3
+ export { CkCitation } from './CkCitation';
4
+ export type { CkCitationProps, CkCitationEmits, CkCitationSource, } from './CkCitation';
5
+ export { CkCitationCard } from './CkCitationCard';
6
+ export type { CkCitationCardProps, CkCitationCardEmits, } from './CkCitationCard';
3
7
  export { CkConversationLayout } from './CkConversationLayout';
4
8
  export type { CkConversationLayoutProps } from './CkConversationLayout';
5
- export { CkCopyMessageActionButton } from './CkCopyMessageActionButton';
9
+ export { CkCopyMessageButton } from './CkCopyMessageButton';
6
10
  export { CkDropZoneOverlay } from './CkDropZoneOverlay';
7
11
  export type { CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, } from './CkDropZoneOverlay';
8
12
  export { CkFeedbackButton } from './CkFeedbackButton';
@@ -16,8 +20,8 @@ export type { CkHistoryItemProps, CkHistoryItemEmits } from './CkHistoryItem';
16
20
  export { CkHistoryWrapper } from './CkHistoryWrapper';
17
21
  export type { CkHistoryWrapperProps } from './CkHistoryWrapper';
18
22
  export { CkMarkdownRenderer } from './CkMarkdownRenderer';
19
- export type { CkMarkdownRendererProps, CkMarkdownElementClasses, } from './CkMarkdownRenderer';
20
- export { CkMessageActionButton } from './CkMessageActionButton';
23
+ export type { CkMarkdownRendererProps, CkMarkdownRendererEmits, CkMarkdownElementClasses, } from './CkMarkdownRenderer';
24
+ export { CkMessageButton } from './CkMessageButton';
21
25
  export { CkModelSelector } from './CkModelSelector';
22
26
  export type { CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, } from './CkModelSelector';
23
27
  export { CkPromptSendButton } from './CkPromptSendButton';
@@ -26,6 +30,7 @@ export type { CkPromptMenuButtonProps } from './CkPromptMenuButton';
26
30
  export { CkPromptStopButton } from './CkPromptStopButton';
27
31
  export { CkPromptInput } from './CkPromptInput';
28
32
  export { CkPromptInputDisclaimer } from './CkPromptInputDisclaimer';
33
+ export { CkRegenerateMessageButton } from './CkRegenerateMessageButton';
29
34
  export { CkUserMessage } from './CkUserMessage';
30
35
  export type { CkUserMessageProps } from './CkUserMessage';
31
36
  //# sourceMappingURL=index.d.ts.map
@@ -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,iBAAiB,EAAE,MAAM,qBAAqB,CAAC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
42
42
  * Overrides `#agent-message-footer` to add real action buttons next to each
43
- * assistant reply: `CkCopyMessageActionButton` for clipboard copy and
43
+ * assistant reply: `CkCopyMessageButton` for clipboard copy and
44
44
  * `CkFeedbackButton` for binary thumbs up / thumbs down feedback. The
45
45
  * feedback state is owned by the host and locked once submitted.
46
46
  */
@@ -9,7 +9,7 @@ import type { CkMarkdownElementClasses } from '../../base/CkMarkdownRenderer';
9
9
  * @category Messages
10
10
  * @useCases complete chat conversation ui, streaming chat with markdown, assistant chat view, llm conversation component, drop-in chat surface
11
11
  * @keywords conversation, chat, messages, assistant, agent, user, markdown, streaming, avatar
12
- * @related CkConversationLayout, CkAgentMessage, CkUserMessage, CkMarkdownRenderer, CkCopyMessageActionButton, CkInput
12
+ * @related CkConversationLayout, CkAgentMessage, CkUserMessage, CkMarkdownRenderer, CkCopyMessageButton, CkInput
13
13
  */
14
14
  export interface CkConversationProps {
15
15
  /** List of messages to display, in chronological order. */
@@ -32,8 +32,8 @@ declare const __VLS_base: import("vue").DefineComponent<CkInputProps, {
32
32
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
33
33
  }>, {
34
34
  ariaLabel: string;
35
- disabled: boolean;
36
35
  loading: boolean;
36
+ disabled: boolean;
37
37
  modelValue: string;
38
38
  placeholder: string;
39
39
  stopAriaLabel: string;
@@ -1,5 +1,5 @@
1
- export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
- export type { CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, } from './base';
1
+ export { CkAgentMessage, CkCitation, CkCitationCard, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
+ export type { CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, } from './base';
3
3
  export { CkConversation, CkHistory, CkInput } from './composed';
4
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,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,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,26 +1,29 @@
1
- import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u } from "../CkInput.vue_vue_type_script_setup_true_lang-B-4xnH2c.js";
1
+ import { _, C, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x } from "../CkInput.vue_vue_type_script_setup_true_lang-DJN-nZ2-.js";
2
2
  export {
3
3
  _ as CkAgentMessage,
4
- a as CkConversation,
5
- b as CkConversationLayout,
6
- C as CkCopyMessageActionButton,
7
- c as CkDropZoneOverlay,
8
- d as CkFeedbackButton,
9
- e as CkFeedbackDialog,
10
- f as CkFileItemsList,
11
- g as CkHistory,
12
- h as CkHistoryItem,
13
- i as CkHistoryWrapper,
14
- j as CkInput,
15
- k as CkMarkdownRenderer,
16
- l as CkMessageActionButton,
17
- m as CkModelSelector,
18
- n as CkPromptInput,
19
- o as CkPromptInputDisclaimer,
20
- p as CkPromptMenuButton,
21
- q as CkPromptSendButton,
22
- r as CkPromptStopButton,
23
- s as CkSendIcon,
24
- t as CkStopIcon,
25
- u as CkUserMessage
4
+ C as CkCitation,
5
+ a as CkCitationCard,
6
+ b as CkConversation,
7
+ c as CkConversationLayout,
8
+ d as CkCopyMessageButton,
9
+ e as CkDropZoneOverlay,
10
+ f as CkFeedbackButton,
11
+ g as CkFeedbackDialog,
12
+ h as CkFileItemsList,
13
+ i as CkHistory,
14
+ j as CkHistoryItem,
15
+ k as CkHistoryWrapper,
16
+ l as CkInput,
17
+ m as CkMarkdownRenderer,
18
+ n as CkMessageButton,
19
+ o as CkModelSelector,
20
+ p as CkPromptInput,
21
+ q as CkPromptInputDisclaimer,
22
+ r as CkPromptMenuButton,
23
+ s as CkPromptSendButton,
24
+ t as CkPromptStopButton,
25
+ u as CkRegenerateMessageButton,
26
+ v as CkSendIcon,
27
+ w as CkStopIcon,
28
+ x as CkUserMessage
26
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useFileUpload.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUpload.ts"],"names":[],"mappings":"AACA,OAAO,EAkBL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAKzB,MAAM,SAAS,CAAC;AAEjB,cAAc,SAAS,CAAC;AAybxB,wBAAgB,aAAa,CAC3B,OAAO,EAAE,oBAAoB,GAC5B,mBAAmB,CA0zBrB"}
1
+ {"version":3,"file":"useFileUpload.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUpload.ts"],"names":[],"mappings":"AACA,OAAO,EAkBL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAKzB,MAAM,SAAS,CAAC;AAEjB,cAAc,SAAS,CAAC;AAybxB,wBAAgB,aAAa,CAC3B,OAAO,EAAE,oBAAoB,GAC5B,mBAAmB,CAmzBrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFileUploadWrapper.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUploadWrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,oBAAoB,EACpB,sBAAsB,EAIvB,MAAM,SAAS,CAAC;AAkJjB,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,sBAAsB,CA4SxB"}
1
+ {"version":3,"file":"useFileUploadWrapper.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUploadWrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,oBAAoB,EACpB,sBAAsB,EAIvB,MAAM,SAAS,CAAC;AAiJjB,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,sBAAsB,CA8UxB"}
@@ -1,4 +1,4 @@
1
- import { c, d, u, b, e, f } from "../index-DAmWGYNH.js";
1
+ import { c, d, u, b, e, f } from "../index-CyrVnbS9.js";
2
2
  export {
3
3
  c as createDocumentUploadProvider,
4
4
  d as defaultDocumentUploadConfig,
@@ -1,6 +1,8 @@
1
1
  export { useMessageHandler } from './useMessageHandler';
2
2
  export { useMarkdownParser } from './useMarkdownParser';
3
3
  export { remarkNormalizeMath, normalizeMathDelimiters, } from '../helpers/unified/remarkNormalizeMath';
4
+ export { remarkCitations } from '../helpers/unified/remarkCitations';
5
+ export type { RemarkCitationsOptions } from '../helpers/unified/remarkCitations';
4
6
  export { provideChatKitLabels, useChatKitLabels, defaultChatKitLabels, CHAT_KIT_LABELS, } from './useChatKitLabels';
5
7
  export type { ChatKitLabels } from './useChatKitLabels';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,11 +1,12 @@
1
- import { u } from "../useMessageHandler-CMdy-lm0.js";
2
- import { C, d, n, p, r, u as u2, a } from "../useChatKitLabels-D5gNv8se.js";
1
+ import { u } from "../useMessageHandler-N50Yj-NU.js";
2
+ import { C, d, n, p, r, b, u as u2, a } from "../useChatKitLabels-zMFV7aEz.js";
3
3
  export {
4
4
  C as CHAT_KIT_LABELS,
5
5
  d as defaultChatKitLabels,
6
6
  n as normalizeMathDelimiters,
7
7
  p as provideChatKitLabels,
8
- r as remarkNormalizeMath,
8
+ r as remarkCitations,
9
+ b as remarkNormalizeMath,
9
10
  u2 as useChatKitLabels,
10
11
  a as useMarkdownParser,
11
12
  u as useMessageHandler
@@ -27,6 +27,8 @@ export type ChatKitLabels = {
27
27
  copyMessageAction: string;
28
28
  /** Accessible label / tooltip for the copy-message action button after a successful copy */
29
29
  copyMessageActionCopied: string;
30
+ /** Accessible label / tooltip for the regenerate-message action button */
31
+ regenerateMessageAction: string;
30
32
  /**
31
33
  * Accessible label / tooltip for the thumbs-up button in `CkFeedbackButton`.
32
34
  * Optional for backward compatibility; falls back to
@@ -79,6 +81,17 @@ export type ChatKitLabels = {
79
81
  * can scroll wide tables). Falls back to `defaultChatKitLabels` when omitted.
80
82
  */
81
83
  markdownTableLabel?: string;
84
+ /**
85
+ * Accessible label for the external-link action in a citation card
86
+ * (`CkCitation` / `CkCitationCard`). Falls back to `defaultChatKitLabels`.
87
+ */
88
+ citationOpenSource?: string;
89
+ /**
90
+ * Prefix for a citation marker's accessible name in `CkCitation`, composed
91
+ * as `"{citationSourceLabel} {index}"` (e.g. "Source 1"). Falls back to
92
+ * `defaultChatKitLabels`.
93
+ */
94
+ citationSourceLabel?: string;
82
95
  /** Fallback title used by `CkHistory` when a conversation has no `title`. */
83
96
  historyItemUntitled: string;
84
97
  /** Accessible name for the trailing kebab trigger on each `CkHistory` row. */
@@ -1 +1 @@
1
- {"version":3,"file":"useChatKitLabels.d.ts","sourceRoot":"","sources":["../../src/handlers/useChatKitLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4FAA4F;IAC5F,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,+DAA+D;IAC/D,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,gEAAgE;IAChE,6BAA6B,CA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;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAK7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMarkdownParser.d.ts","sourceRoot":"","sources":["../../src/handlers/useMarkdownParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAQtD,OAAO,0BAA0B,CAAC;AAkFlC,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC;;EA0BrD"}
1
+ {"version":3,"file":"useMarkdownParser.d.ts","sourceRoot":"","sources":["../../src/handlers/useMarkdownParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAQtD,OAAO,0BAA0B,CAAC;AAqFlC,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC;;EA0BrD"}
@@ -10,17 +10,54 @@ export declare const useMessageHandler: () => {
10
10
  role: MessageRole;
11
11
  status: MessageStatus;
12
12
  metadata?: MessageMetadata;
13
+ parentId?: string;
13
14
  }) => void;
14
15
  setCurrentUserMessage: (text: string) => void;
15
16
  getMessageById: (id: string) => BaseMessage | undefined;
16
17
  clearCurrentUserMessage: () => void;
17
18
  commitUserMessage: (opts?: {
18
19
  metadata?: MessageMetadata;
20
+ parentId?: string;
19
21
  }) => BaseMessage;
20
22
  updateMessageId: (oldId: string, newId: string) => void;
21
23
  clearMessages: () => void;
22
24
  setTree: (incoming: ConversationTree) => void;
23
25
  navigate: (targetId: string) => void;
24
26
  cutBranchAfter: (messageId: string) => void;
27
+ cutBranchAt: (messageId: string) => void;
28
+ getTree: () => {
29
+ readonly nodes: {
30
+ readonly [x: string]: {
31
+ readonly id: string;
32
+ readonly parentId: string | null;
33
+ readonly childrenIds: readonly string[];
34
+ readonly activeChildIndex: number;
35
+ readonly role: MessageRole;
36
+ readonly content: readonly ({
37
+ readonly type: "text";
38
+ readonly id: string;
39
+ readonly text: string;
40
+ readonly status: import("..").MessageContentStatus;
41
+ } | {
42
+ readonly type: "tool";
43
+ readonly id: string;
44
+ readonly name: string;
45
+ readonly text?: string | undefined;
46
+ readonly icon?: string | undefined;
47
+ } | {
48
+ readonly type: "reasoning";
49
+ readonly id: string;
50
+ readonly text?: string | undefined;
51
+ readonly status: import("..").MessageContentStatus;
52
+ })[];
53
+ readonly status: MessageStatus;
54
+ readonly createdAt: Date;
55
+ readonly metadata?: {
56
+ readonly [x: string]: Readonly<unknown>;
57
+ } | undefined;
58
+ };
59
+ };
60
+ readonly rootId: string | null;
61
+ };
25
62
  };
26
63
  //# sourceMappingURL=useMessageHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMessageHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/useMessageHandler.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAW,EACX,aAAa,EAEd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAqC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAElE,eAAO,MAAM,iBAAiB;cA6IJ,GAAG,CAAC,WAAW,EAAE,CAAC;;;6BArFV;QAC9B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,cAAc,EAAE,CAAC;QAC1B,IAAI,EAAE,WAAW,CAAC;QAClB,MAAM,EAAE,aAAa,CAAC;QACtB,QAAQ,CAAC,EAAE,eAAe,CAAC;KAC5B;kCAnDoC,MAAM;yBAiFf,MAAM,KAAG,WAAW,GAAG,SAAS;;+BAzE1B;QAChC,QAAQ,CAAC,EAAE,eAAe,CAAC;KAC5B,KAAG,WAAW;6BAqFiB,MAAM,SAAS,MAAM;;wBAiB1B,gBAAgB;yBAKf,MAAM;gCAQC,MAAM;CAmB1C,CAAC"}
1
+ {"version":3,"file":"useMessageHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/useMessageHandler.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAW,EACX,aAAa,EAEd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAqC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAElE,eAAO,MAAM,iBAAiB;cA0LJ,GAAG,CAAC,WAAW,EAAE,CAAC;;;6BAnGV;QAC9B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,cAAc,EAAE,CAAC;QAC1B,IAAI,EAAE,WAAW,CAAC;QAClB,MAAM,EAAE,aAAa,CAAC;QACtB,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;kCAtEoC,MAAM;yBAoGf,MAAM,KAAG,WAAW,GAAG,SAAS;;+BApF1B;QAChC,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,KAAG,WAAW;6BA+FiB,MAAM,SAAS,MAAM;;wBAiB1B,gBAAgB;yBAKf,MAAM;gCAQC,MAAM;6BAST,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvC,CAAC"}
@@ -17,6 +17,21 @@ export declare function updateNodeId(tree: ConversationTree, oldId: string, newI
17
17
  * generated after it.
18
18
  */
19
19
  export declare function cutBranchAfter(tree: ConversationTree, id: string): void;
20
+ /**
21
+ * Remove the node with the given id *and* its entire subtree, then unlink it
22
+ * from its parent. Unlike {@link cutBranchAfter} (which keeps the target and
23
+ * drops only its descendants), this drops the target branch as a whole while
24
+ * leaving sibling branches intact — use it to discard one answer among several
25
+ * (e.g. an interrupted regenerate) without cropping the others.
26
+ *
27
+ * The parent's `activeChildIndex` is clamped to a remaining sibling so the
28
+ * active path stays valid. Removing the root clears the tree.
29
+ *
30
+ * Prefer {@link cutBranchAfter} when it fits the case: unlinking here scans
31
+ * and splices the parent's `childrenIds` (O(siblings)), whereas
32
+ * `cutBranchAfter` only clears the target's own `childrenIds`.
33
+ */
34
+ export declare function cutBranchAt(tree: ConversationTree, id: string): void;
20
35
  /**
21
36
  * Navigate to a different branch by updating the parent's activeChildIndex
22
37
  * to point at the target sibling.
@@ -1 +1 @@
1
- {"version":3,"file":"conversationTree.d.ts","sourceRoot":"","sources":["../../src/helpers/conversationTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3E,wBAAgB,eAAe,IAAI,gBAAgB,CAElD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,EAAE,CAmCnE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAYvE;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,gBAAgB,EACtB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC,CAC9D,GACA,IAAI,CAUN;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI,CAsBN;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAevE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAWvE"}
1
+ {"version":3,"file":"conversationTree.d.ts","sourceRoot":"","sources":["../../src/helpers/conversationTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3E,wBAAgB,eAAe,IAAI,gBAAgB,CAElD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,EAAE,CAmCnE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAYvE;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,gBAAgB,EACtB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC,CAC9D,GACA,IAAI,CAUN;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI,CAsBN;AAiBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAQvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAyBpE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAWvE"}
@@ -0,0 +1,17 @@
1
+ import type { Plugin } from 'unified';
2
+ export interface RemarkCitationsOptions {
3
+ /**
4
+ * When provided, only `[n]` markers whose number is in this set are turned
5
+ * into citation placeholders; any other `[n]` is left as literal text
6
+ * (an "unsupported" marker with no backing source). When omitted, every
7
+ * `[n]` is treated as a citation.
8
+ */
9
+ indices?: ReadonlySet<number>;
10
+ }
11
+ /**
12
+ * Replaces inline `[n]` citation references in the parsed markdown with a
13
+ * placeholder element (`<span data-citation-index="n">n</span>`) that survives
14
+ * stringify + sanitisation (`data-*` attributes are allowed by default).
15
+ */
16
+ export declare const remarkCitations: Plugin<[RemarkCitationsOptions?]>;
17
+ //# sourceMappingURL=remarkCitations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remarkCitations.d.ts","sourceRoot":"","sources":["../../../src/helpers/unified/remarkCitations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAQD;;;;GAIG;AAIH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,CAAC,sBAAsB,CAAC,CAAC,CA0B7D,CAAC"}