@aleph-alpha/chat-kit 1.2.0 → 1.3.1

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 (37) hide show
  1. package/dist/{CkInput.vue_vue_type_script_setup_true_lang-CRymGkQs.js → CkInput.vue_vue_type_script_setup_true_lang-CyGLItQZ.js} +154 -39
  2. package/dist/chat-kit.css +9 -0
  3. package/dist/components/base/CkFeedbackButton/CkFeedbackButton.stories.d.ts +38 -0
  4. package/dist/components/base/CkFeedbackButton/CkFeedbackButton.stories.d.ts.map +1 -0
  5. package/dist/components/base/CkFeedbackButton/CkFeedbackButton.vue.d.ts +16 -0
  6. package/dist/components/base/CkFeedbackButton/CkFeedbackButton.vue.d.ts.map +1 -0
  7. package/dist/components/base/CkFeedbackButton/index.d.ts +3 -0
  8. package/dist/components/base/CkFeedbackButton/index.d.ts.map +1 -0
  9. package/dist/components/base/CkFeedbackButton/types.d.ts +60 -0
  10. package/dist/components/base/CkFeedbackButton/types.d.ts.map +1 -0
  11. package/dist/components/base/index.d.ts +2 -0
  12. package/dist/components/base/index.d.ts.map +1 -1
  13. package/dist/components/composed/CkConversation/CkConversation.stories.d.ts +4 -3
  14. package/dist/components/composed/CkConversation/CkConversation.stories.d.ts.map +1 -1
  15. package/dist/components/index.d.ts +2 -2
  16. package/dist/components/index.d.ts.map +1 -1
  17. package/dist/components/index.js +15 -14
  18. package/dist/favicon.ico +0 -0
  19. package/dist/handlers/index.js +1 -1
  20. package/dist/handlers/useChatKitLabels.d.ts +18 -0
  21. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +16 -15
  25. package/dist/{useChatKitLabels-BmWmMyqX.js → useChatKitLabels-ftC52m7f.js} +3 -0
  26. package/package.json +3 -2
  27. package/src/components/base/CkFeedbackButton/CkFeedbackButton.spec.ts +174 -0
  28. package/src/components/base/CkFeedbackButton/CkFeedbackButton.stories.ts +179 -0
  29. package/src/components/base/CkFeedbackButton/CkFeedbackButton.vue +141 -0
  30. package/src/components/base/CkFeedbackButton/index.ts +2 -0
  31. package/src/components/base/CkFeedbackButton/types.ts +61 -0
  32. package/src/components/base/index.ts +5 -0
  33. package/src/components/composed/CkConversation/CkConversation.stories.ts +46 -17
  34. package/src/components/index.ts +3 -0
  35. package/src/handlers/useChatKitLabels.spec.ts +70 -50
  36. package/src/handlers/useChatKitLabels.ts +21 -0
  37. package/src/index.ts +3 -0
@@ -1,7 +1,7 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, createVNode, Transition, toDisplayString, useAttrs, useSlots, computed, normalizeClass, withModifiers, resolveDynamicComponent, toRefs, h, useId, useTemplateRef, createTextVNode, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
- import { a as useMarkdownParser, u as useChatKitLabels } from "./useChatKitLabels-BmWmMyqX.js";
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, createVNode, Transition, toDisplayString, computed, normalizeClass, useAttrs, useSlots, withModifiers, resolveDynamicComponent, toRefs, h, useId, useTemplateRef, createTextVNode, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
+ import { u as useChatKitLabels, d as defaultChatKitLabels, a as useMarkdownParser } from "./useChatKitLabels-ftC52m7f.js";
3
3
  import { UiButton, UiTooltip, UiIcon, Primitive, UiPopover, UiPopoverTrigger, UiPopoverContent, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
4
- const _hoisted_1$8 = {
4
+ const _hoisted_1$9 = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
6
6
  width: "16",
7
7
  height: "16",
@@ -12,31 +12,31 @@ const _hoisted_1$8 = {
12
12
  "stroke-linecap": "round",
13
13
  "stroke-linejoin": "round"
14
14
  };
15
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
15
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16
16
  ...{ name: "CkSendIcon" },
17
17
  __name: "CkSendIcon",
18
18
  setup(__props) {
19
19
  return (_ctx, _cache) => {
20
- return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [
20
+ return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
21
21
  createElementVNode("path", { d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" }, null, -1),
22
22
  createElementVNode("path", { d: "M6 12h16" }, null, -1)
23
23
  ])]);
24
24
  };
25
25
  }
26
26
  });
27
- const _hoisted_1$7 = {
27
+ const _hoisted_1$8 = {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: "16",
30
30
  height: "16",
31
31
  viewBox: "0 0 16 16",
32
32
  fill: "none"
33
33
  };
34
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
34
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
35
35
  ...{ name: "CkStopIcon" },
36
36
  __name: "CkStopIcon",
37
37
  setup(__props) {
38
38
  return (_ctx, _cache) => {
39
- return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
39
+ return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [
40
40
  createElementVNode("path", {
41
41
  d: "M13.3335 3.33301C13.3335 2.96482 13.035 2.66634 12.6668 2.66634H3.3335C2.96531 2.66634 2.66683 2.96482 2.66683 3.33301V12.6663C2.66683 13.0345 2.96531 13.333 3.3335 13.333H12.6668C13.035 13.333 13.3335 13.0345 13.3335 12.6663V3.33301ZM14.6668 12.6663C14.6668 13.7709 13.7714 14.6663 12.6668 14.6663H3.3335C2.22893 14.6663 1.3335 13.7709 1.3335 12.6663V3.33301C1.3335 2.22844 2.22893 1.33301 3.3335 1.33301H12.6668C13.7714 1.33301 14.6668 2.22844 14.6668 3.33301V12.6663Z",
42
42
  fill: "#1D1D1B"
@@ -45,7 +45,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
45
45
  };
46
46
  }
47
47
  });
48
- const _hoisted_1$6 = { class: "flex w-full items-start gap-2" };
48
+ const _hoisted_1$7 = { class: "flex w-full items-start gap-2" };
49
49
  const _hoisted_2$4 = {
50
50
  key: 0,
51
51
  class: "flex flex-shrink-0 items-center justify-center"
@@ -59,12 +59,12 @@ const _hoisted_5$2 = {
59
59
  key: 1,
60
60
  class: "flex items-center"
61
61
  };
62
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
62
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
63
63
  ...{ name: "CkAgentMessage" },
64
64
  __name: "CkAgentMessage",
65
65
  setup(__props) {
66
66
  return (_ctx, _cache) => {
67
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
67
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
68
68
  _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
69
69
  renderSlot(_ctx.$slots, "icon")
70
70
  ])) : createCommentVNode("", true),
@@ -83,7 +83,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
83
83
  };
84
84
  }
85
85
  });
86
- const _hoisted_1$5 = ["data-message-row"];
86
+ const _hoisted_1$6 = ["data-message-row"];
87
87
  const _hoisted_2$3 = {
88
88
  key: 0,
89
89
  class: "flex justify-end"
@@ -92,7 +92,7 @@ const _hoisted_3$2 = {
92
92
  key: 1,
93
93
  class: "flex justify-start"
94
94
  };
95
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
95
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
96
96
  ...{ name: "CkConversationLayout" },
97
97
  __name: "CkConversationLayout",
98
98
  props: {
@@ -237,7 +237,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
237
237
  ])) : (openBlock(), createElementBlock("div", _hoisted_3$2, [
238
238
  renderSlot(_ctx.$slots, "agent-message", { message })
239
239
  ]))
240
- ], 8, _hoisted_1$5);
240
+ ], 8, _hoisted_1$6);
241
241
  }), 128)),
242
242
  hasBottomSpacer.value ? (openBlock(), createElementBlock("div", {
243
243
  key: 0,
@@ -248,7 +248,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
248
248
  };
249
249
  }
250
250
  });
251
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
251
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
252
252
  ...{
253
253
  name: "CkMessageActionButton"
254
254
  },
@@ -272,11 +272,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
272
272
  };
273
273
  }
274
274
  });
275
- const _hoisted_1$4 = {
275
+ const _hoisted_1$5 = {
276
276
  class: "sr-only",
277
277
  "aria-live": "polite"
278
278
  };
279
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
279
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
280
280
  ...{
281
281
  name: "CkCopyMessageActionButton"
282
282
  },
@@ -333,7 +333,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
333
333
  "delay-duration": 0
334
334
  }, {
335
335
  default: withCtx(() => [
336
- createVNode(unref(_sfc_main$c), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
336
+ createVNode(unref(_sfc_main$d), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
337
337
  disabled: __props.disabled,
338
338
  onClick: handleClick
339
339
  }), {
@@ -360,7 +360,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
360
360
  ]),
361
361
  _: 1
362
362
  }, 16, ["disabled"]),
363
- createElementVNode("span", _hoisted_1$4, toDisplayString(copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy), 1)
363
+ createElementVNode("span", _hoisted_1$5, toDisplayString(copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy), 1)
364
364
  ]),
365
365
  _: 1
366
366
  }, 8, ["open", "content"]);
@@ -374,7 +374,121 @@ const _export_sfc = (sfc, props) => {
374
374
  }
375
375
  return target;
376
376
  };
377
- const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f77a1193"]]);
377
+ const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-f77a1193"]]);
378
+ const _hoisted_1$4 = ["aria-label"];
379
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
380
+ ...{
381
+ name: "CkFeedbackButton"
382
+ },
383
+ __name: "CkFeedbackButton",
384
+ props: {
385
+ value: { default: null },
386
+ locked: { type: Boolean, default: false },
387
+ disabled: { type: Boolean, default: false },
388
+ ariaLabelThumbsUp: { default: void 0 },
389
+ ariaLabelThumbsDown: { default: void 0 },
390
+ ariaLabelGroup: { default: void 0 }
391
+ },
392
+ emits: ["update:value"],
393
+ setup(__props, { emit: __emit }) {
394
+ const props = __props;
395
+ const emit = __emit;
396
+ const labels = useChatKitLabels();
397
+ const thumbsUpLabel = computed(
398
+ () => props.ariaLabelThumbsUp ?? labels.value.feedbackThumbsUp ?? defaultChatKitLabels.feedbackThumbsUp
399
+ );
400
+ const thumbsDownLabel = computed(
401
+ () => props.ariaLabelThumbsDown ?? labels.value.feedbackThumbsDown ?? defaultChatKitLabels.feedbackThumbsDown
402
+ );
403
+ const groupLabel = computed(
404
+ () => props.ariaLabelGroup ?? labels.value.feedbackGroup ?? defaultChatKitLabels.feedbackGroup
405
+ );
406
+ const isUpSelected = computed(() => props.value === "up");
407
+ const isDownSelected = computed(() => props.value === "down");
408
+ const isUpDisabled = computed(
409
+ () => props.disabled || props.locked && !isUpSelected.value
410
+ );
411
+ const isDownDisabled = computed(
412
+ () => props.disabled || props.locked && !isDownSelected.value
413
+ );
414
+ function handleClick(target) {
415
+ if (props.disabled || props.locked) {
416
+ return;
417
+ }
418
+ const isCurrentlySelected = target === "up" ? isUpSelected.value : isDownSelected.value;
419
+ emit("update:value", isCurrentlySelected ? null : target);
420
+ }
421
+ return (_ctx, _cache) => {
422
+ return openBlock(), createElementBlock("div", {
423
+ role: "group",
424
+ "aria-label": groupLabel.value,
425
+ class: "ck-feedback-button flex items-center gap-4"
426
+ }, [
427
+ createVNode(unref(UiTooltip), {
428
+ content: thumbsUpLabel.value,
429
+ side: "bottom",
430
+ align: "center",
431
+ "delay-duration": 0
432
+ }, {
433
+ default: withCtx(() => [
434
+ createVNode(unref(_sfc_main$d), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
435
+ "aria-pressed": isUpSelected.value,
436
+ "aria-disabled": __props.locked || void 0,
437
+ disabled: isUpDisabled.value,
438
+ class: [
439
+ "ck-feedback-button__thumb",
440
+ { "bg-core-bg-tertiary": isUpSelected.value }
441
+ ],
442
+ onClick: _cache[0] || (_cache[0] = ($event) => handleClick("up"))
443
+ }), {
444
+ default: withCtx(() => [
445
+ createVNode(unref(UiIcon), {
446
+ name: "thumbs-up",
447
+ size: 16,
448
+ "aria-hidden": "true",
449
+ class: normalizeClass(isUpSelected.value ? "fill-current" : void 0)
450
+ }, null, 8, ["class"])
451
+ ]),
452
+ _: 1
453
+ }, 16, ["aria-pressed", "aria-disabled", "disabled", "class"])
454
+ ]),
455
+ _: 1
456
+ }, 8, ["content"]),
457
+ createVNode(unref(UiTooltip), {
458
+ content: thumbsDownLabel.value,
459
+ side: "bottom",
460
+ align: "center",
461
+ "delay-duration": 0
462
+ }, {
463
+ default: withCtx(() => [
464
+ createVNode(unref(_sfc_main$d), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
465
+ "aria-pressed": isDownSelected.value,
466
+ "aria-disabled": __props.locked || void 0,
467
+ disabled: isDownDisabled.value,
468
+ class: [
469
+ "ck-feedback-button__thumb",
470
+ { "bg-core-bg-tertiary": isDownSelected.value }
471
+ ],
472
+ onClick: _cache[1] || (_cache[1] = ($event) => handleClick("down"))
473
+ }), {
474
+ default: withCtx(() => [
475
+ createVNode(unref(UiIcon), {
476
+ name: "thumbs-down",
477
+ size: 16,
478
+ "aria-hidden": "true",
479
+ class: normalizeClass(isDownSelected.value ? "fill-current" : void 0)
480
+ }, null, 8, ["class"])
481
+ ]),
482
+ _: 1
483
+ }, 16, ["aria-pressed", "aria-disabled", "disabled", "class"])
484
+ ]),
485
+ _: 1
486
+ }, 8, ["content"])
487
+ ], 8, _hoisted_1$4);
488
+ };
489
+ }
490
+ });
491
+ const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-245705b8"]]);
378
492
  const CHAT_HISTORY_ACTIVE_INDICATOR_CLASS = 'before:absolute before:z-10 before:top-1/2 before:left-0 before:h-1/2 before:w-0.5 before:-translate-y-1/2 before:origin-left before:scale-x-0 before:rounded-full before:bg-background-accent-default before:opacity-0 before:transition-[transform,opacity] before:duration-200 before:ease-linear before:content-[""] data-[active=true]:before:scale-x-100 data-[active=true]:before:opacity-100';
379
493
  const _hoisted_1$3 = ["data-active"];
380
494
  const _hoisted_2$2 = { class: "min-w-0 flex-1" };
@@ -949,7 +1063,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
949
1063
  );
950
1064
  const isLoading = (message) => message.status === "started" || message.status === "sending";
951
1065
  return (_ctx, _cache) => {
952
- return openBlock(), createBlock(_sfc_main$d, { messages: __props.messages }, {
1066
+ return openBlock(), createBlock(_sfc_main$e, { messages: __props.messages }, {
953
1067
  "user-message": withCtx(({ message }) => [
954
1068
  createElementVNode("div", {
955
1069
  class: normalizeClass({ "ml-8": hasIcon.value })
@@ -970,7 +1084,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
970
1084
  ]),
971
1085
  "agent-message": withCtx(({ message }) => [
972
1086
  renderSlot(_ctx.$slots, "agent-message", { message }, () => [
973
- createVNode(_sfc_main$e, null, createSlots({
1087
+ createVNode(_sfc_main$f, null, createSlots({
974
1088
  footer: withCtx(() => [
975
1089
  renderSlot(_ctx.$slots, "agent-message-footer", { message }, () => [
976
1090
  message.content && !isLoading(message) ? (openBlock(), createBlock(CkCopyMessageActionButton, {
@@ -1213,7 +1327,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1213
1327
  }, {
1214
1328
  default: withCtx(() => [
1215
1329
  renderSlot(_ctx.$slots, "stop-icon", {}, () => [
1216
- createVNode(_sfc_main$f)
1330
+ createVNode(_sfc_main$g)
1217
1331
  ])
1218
1332
  ]),
1219
1333
  _: 3
@@ -1223,7 +1337,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1223
1337
  }), {
1224
1338
  default: withCtx(() => [
1225
1339
  renderSlot(_ctx.$slots, "send-icon", {}, () => [
1226
- createVNode(_sfc_main$g)
1340
+ createVNode(_sfc_main$h)
1227
1341
  ])
1228
1342
  ]),
1229
1343
  _: 3
@@ -1253,20 +1367,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1253
1367
  });
1254
1368
  export {
1255
1369
  CkCopyMessageActionButton as C,
1256
- _sfc_main$e as _,
1370
+ _sfc_main$f as _,
1257
1371
  _sfc_main$2 as a,
1258
- _sfc_main$d as b,
1259
- _sfc_main$1 as c,
1260
- _sfc_main$a as d,
1261
- _sfc_main$9 as e,
1262
- _sfc_main as f,
1263
- _sfc_main$8 as g,
1264
- _sfc_main$c as h,
1265
- _sfc_main$7 as i,
1266
- _sfc_main$5 as j,
1267
- _sfc_main$4 as k,
1268
- _sfc_main$6 as l,
1269
- _sfc_main$g as m,
1270
- _sfc_main$f as n,
1271
- _sfc_main$3 as o
1372
+ _sfc_main$e as b,
1373
+ CkFeedbackButton as c,
1374
+ _sfc_main$1 as d,
1375
+ _sfc_main$a as e,
1376
+ _sfc_main$9 as f,
1377
+ _sfc_main as g,
1378
+ _sfc_main$8 as h,
1379
+ _sfc_main$d as i,
1380
+ _sfc_main$7 as j,
1381
+ _sfc_main$5 as k,
1382
+ _sfc_main$4 as l,
1383
+ _sfc_main$6 as m,
1384
+ _sfc_main$h as n,
1385
+ _sfc_main$g as o,
1386
+ _sfc_main$3 as p
1272
1387
  };
package/dist/chat-kit.css CHANGED
@@ -13,3 +13,12 @@
13
13
  transition-duration: 0.01ms;
14
14
  }
15
15
  }
16
+
17
+ .ck-feedback-button__thumb[data-v-245705b8] {
18
+ transition: background-color 0.15s ease-out;
19
+ }
20
+ @media (prefers-reduced-motion: reduce) {
21
+ .ck-feedback-button__thumb[data-v-245705b8] {
22
+ transition-duration: 0.01ms;
23
+ }
24
+ }
@@ -0,0 +1,38 @@
1
+ import CkFeedbackButton from './CkFeedbackButton.vue';
2
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
+ declare const meta: Meta<typeof CkFeedbackButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ /**
7
+ * Default, idle state. Both thumbs are interactive and unfilled. Use this
8
+ * inside `CkConversation`'s `#agent-message-footer` slot to collect binary
9
+ * feedback on assistant replies.
10
+ */
11
+ export declare const Default: Story;
12
+ /**
13
+ * Thumbs-up is selected. The icon fills and the button shows a tinted
14
+ * background to mark the active choice. The host still receives
15
+ * `update:value` events; pass `locked` to make the choice final.
16
+ */
17
+ export declare const SelectedUp: Story;
18
+ /**
19
+ * Thumbs-down is selected. Same affordance as `SelectedUp`, on the other
20
+ * thumb.
21
+ */
22
+ export declare const SelectedDown: Story;
23
+ /**
24
+ * Locked after submission. The chosen thumb stays filled; the other becomes
25
+ * non-interactive. Clicks no longer emit `update:value`.
26
+ */
27
+ export declare const Locked: Story;
28
+ /**
29
+ * Both thumbs disabled, for example while the assistant message is still
30
+ * streaming or after a network error.
31
+ */
32
+ export declare const Disabled: Story;
33
+ /**
34
+ * Realistic flow: the host listens for `update:value`, persists the choice,
35
+ * then sets `locked` to freeze the control. Click a thumb to see it lock.
36
+ */
37
+ export declare const SubmitOnSelect: Story;
38
+ //# sourceMappingURL=CkFeedbackButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkFeedbackButton.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackButton/CkFeedbackButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CA+BvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqEnC;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAGxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAG1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KAGpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAGtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAmB5B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { CkFeedbackButtonProps, CkFeedbackValue } from './types';
2
+ declare const __VLS_export: import("vue").DefineComponent<CkFeedbackButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:value": (value: CkFeedbackValue) => any;
4
+ }, string, import("vue").PublicProps, Readonly<CkFeedbackButtonProps> & Readonly<{
5
+ "onUpdate:value"?: ((value: CkFeedbackValue) => any) | undefined;
6
+ }>, {
7
+ value: CkFeedbackValue;
8
+ disabled: boolean;
9
+ locked: boolean;
10
+ ariaLabelThumbsUp: string;
11
+ ariaLabelThumbsDown: string;
12
+ ariaLabelGroup: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ //# sourceMappingURL=CkFeedbackButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkFeedbackButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackButton/CkFeedbackButton.vue"],"names":[],"mappings":"AAqJA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiRtE,QAAA,MAAM,YAAY;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,3 @@
1
+ export { default as CkFeedbackButton } from './CkFeedbackButton.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/CkFeedbackButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Binary thumbs up / thumbs down feedback control for assistant messages.
3
+ * Fully prop-driven: the host application owns the selection and lock state
4
+ * and decides when (or if) to persist it to a backend.
5
+ *
6
+ * Labels default to those provided by `useChatKitLabels` (which can be
7
+ * translated via `provideChatKitLabels`). The `ariaLabel*` props override
8
+ * the injected labels on a per-instance basis when set.
9
+ *
10
+ * @category Feedback
11
+ * @useCases like or dislike an assistant reply, collect binary message rating, lock feedback after submission, rate AI response
12
+ * @keywords feedback, thumbs up, thumbs down, like, dislike, rating, vote, action, message, button
13
+ * @related CkMessageActionButton, CkCopyMessageActionButton, CkAgentMessage, CkConversation
14
+ */
15
+ export type CkFeedbackValue = 'up' | 'down' | null;
16
+ export interface CkFeedbackButtonProps {
17
+ /**
18
+ * Currently selected feedback value. `null` means no choice has been made.
19
+ * @default null
20
+ */
21
+ value?: CkFeedbackValue;
22
+ /**
23
+ * When `true`, the current `value` is final: clicks are ignored and the
24
+ * unselected thumb becomes non-interactive. Use after the host has
25
+ * persisted the user's choice.
26
+ * @default false
27
+ */
28
+ locked?: boolean;
29
+ /**
30
+ * When `true`, both thumbs are disabled regardless of `value`. Use while
31
+ * the parent message is still streaming or in an error state.
32
+ * @default false
33
+ */
34
+ disabled?: boolean;
35
+ /**
36
+ * Overrides the injected `feedbackThumbsUp` label for the thumbs-up button.
37
+ * When omitted, falls back to `useChatKitLabels().feedbackThumbsUp`.
38
+ */
39
+ ariaLabelThumbsUp?: string;
40
+ /**
41
+ * Overrides the injected `feedbackThumbsDown` label for the thumbs-down
42
+ * button. When omitted, falls back to
43
+ * `useChatKitLabels().feedbackThumbsDown`.
44
+ */
45
+ ariaLabelThumbsDown?: string;
46
+ /**
47
+ * Overrides the injected `feedbackGroup` label for the surrounding group.
48
+ * When omitted, falls back to `useChatKitLabels().feedbackGroup`.
49
+ */
50
+ ariaLabelGroup?: string;
51
+ }
52
+ export interface CkFeedbackButtonEmits {
53
+ /**
54
+ * Emitted when the user clicks an enabled thumb. The payload is the new
55
+ * value: `'up'`, `'down'`, or `null` when toggling off the current choice.
56
+ * Not emitted while `locked` or `disabled`.
57
+ */
58
+ (e: 'update:value', value: CkFeedbackValue): void;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackButton/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,CAAC,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;CACnD"}
@@ -3,6 +3,8 @@ export { CkAgentMessage } from './CkAgentMessage';
3
3
  export { CkConversationLayout } from './CkConversationLayout';
4
4
  export type { CkConversationLayoutProps } from './CkConversationLayout';
5
5
  export { CkCopyMessageActionButton } from './CkCopyMessageActionButton';
6
+ export { CkFeedbackButton } from './CkFeedbackButton';
7
+ export type { CkFeedbackButtonProps, CkFeedbackValue, } from './CkFeedbackButton';
6
8
  export { CkHistoryItem } from './CkHistoryItem';
7
9
  export type { CkHistoryItemProps, CkHistoryItemEmits } from './CkHistoryItem';
8
10
  export { CkHistoryWrapper } from './CkHistoryWrapper';
@@ -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,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"}
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,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,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"}
@@ -31,9 +31,10 @@ export declare const NoIcon: Story;
31
31
  */
32
32
  export declare const WithCustomIcon: Story;
33
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.
34
+ * Overrides `#agent-message-footer` to add real action buttons next to each
35
+ * assistant reply: `CkCopyMessageActionButton` for clipboard copy and
36
+ * `CkFeedbackButton` for binary thumbs up / thumbs down feedback. The
37
+ * feedback state is owned by the host and locked once submitted.
37
38
  */
38
39
  export declare const WithFooterActions: Story;
39
40
  /**
@@ -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,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
+ {"version":3,"file":"CkConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.stories.ts"],"names":[],"mappings":"AAIA,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;AAiNnC;;;;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;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA8B/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,5 +1,5 @@
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';
1
+ export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
+ export type { CkConversationLayoutProps, CkFeedbackButtonProps, CkFeedbackValue, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, 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,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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,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,qBAAqB,EACrB,eAAe,EACf,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,20 +1,21 @@
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-CRymGkQs.js";
1
+ import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p } from "../CkInput.vue_vue_type_script_setup_true_lang-CyGLItQZ.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 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
7
+ c as CkFeedbackButton,
8
+ d as CkHistory,
9
+ e as CkHistoryItem,
10
+ f as CkHistoryWrapper,
11
+ g as CkInput,
12
+ h as CkMarkdownRenderer,
13
+ i as CkMessageActionButton,
14
+ j as CkPromptActionButton,
15
+ k as CkPromptInput,
16
+ l as CkPromptInputDisclaimer,
17
+ m as CkPromptStopButton,
18
+ n as CkSendIcon,
19
+ o as CkStopIcon,
20
+ p as CkUserMessage
20
21
  };
Binary file
@@ -1,5 +1,5 @@
1
1
  import { u } from "../useMessageHandler-BmBdu2EW.js";
2
- import { C, d, p, u as u2, a } from "../useChatKitLabels-BmWmMyqX.js";
2
+ import { C, d, p, u as u2, a } from "../useChatKitLabels-ftC52m7f.js";
3
3
  export {
4
4
  C as CHAT_KIT_LABELS,
5
5
  d as defaultChatKitLabels,
@@ -27,6 +27,24 @@ 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
+ /**
31
+ * Accessible label / tooltip for the thumbs-up button in `CkFeedbackButton`.
32
+ * Optional for backward compatibility; falls back to
33
+ * `defaultChatKitLabels.feedbackThumbsUp` when omitted.
34
+ */
35
+ feedbackThumbsUp?: string;
36
+ /**
37
+ * Accessible label / tooltip for the thumbs-down button in `CkFeedbackButton`.
38
+ * Optional for backward compatibility; falls back to
39
+ * `defaultChatKitLabels.feedbackThumbsDown` when omitted.
40
+ */
41
+ feedbackThumbsDown?: string;
42
+ /**
43
+ * Accessible group label announced when focus enters `CkFeedbackButton`.
44
+ * Optional for backward compatibility; falls back to
45
+ * `defaultChatKitLabels.feedbackGroup` when omitted.
46
+ */
47
+ feedbackGroup?: string;
30
48
  /** Fallback title used by `CkHistory` when a conversation has no `title`. */
31
49
  historyItemUntitled: string;
32
50
  /** 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,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,0BAA0B,EAAE,MAAM,CAAC;IACnC,uEAAuE;IACvE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yEAAyE;IACzE,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,aAUlC,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAAC,aAAa,CAAC,CAC1C,CAAC;AAE5B,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5C,yFAAyF;AACzF,KAAK,cAAc,GACf,GAAG,CAAC,aAAa,CAAC,GAClB,WAAW,CAAC,aAAa,CAAC,GAC1B,CAAC,MAAM,aAAa,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAKjE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAK7D"}
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,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,0BAA0B,EAAE,MAAM,CAAC;IACnC,uEAAuE;IACvE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yEAAyE;IACzE,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,aAalC,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAAC,aAAa,CAAC,CAC1C,CAAC;AAE5B,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5C,yFAAyF;AACzF,KAAK,cAAc,GACf,GAAG,CAAC,aAAa,CAAC,GAClB,WAAW,CAAC,aAAa,CAAC,GAC1B,CAAC,MAAM,aAAa,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAKjE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAK7D"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { useMessageHandler, useMarkdownParser, provideChatKitLabels, useChatKitL
3
3
  export type { ChatKitLabels } from './handlers';
4
4
  export { useChat, useConversationSessions, useConversations, } from './composables';
5
5
  export type { ChatActions, ChatState, ConversationSession, CreateConversationInput, MessageHandler, MutationOptions, UseChatReturn, UseConversationSessionsReturn, UseConversationsOptions, UseConversationsReturn, } from './composables';
6
- export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
7
- export type { CkConversationLayoutProps, CkConversationProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
6
+ export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
7
+ export type { CkConversationLayoutProps, CkConversationProps, CkFeedbackButtonProps, CkFeedbackValue, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
8
8
  export type { BaseMessage, Conversation, ConversationTree, MessageRole, MessageStatus, TreeMessage, } from './types';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,SAAS,CAAC"}