@aleph-alpha/chat-kit 1.12.0 → 1.14.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 (43) hide show
  1. package/dist/{CkInput.vue_vue_type_script_setup_true_lang-C1Jnn1fK.js → CkInput.vue_vue_type_script_setup_true_lang-BVZ7FG88.js} +430 -142
  2. package/dist/chat-kit.css +47 -0
  3. package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts +30 -0
  4. package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts.map +1 -0
  5. package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts +13 -0
  6. package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts.map +1 -0
  7. package/dist/components/base/CkFeedbackDialog/index.d.ts +3 -0
  8. package/dist/components/base/CkFeedbackDialog/index.d.ts.map +1 -0
  9. package/dist/components/base/CkFeedbackDialog/types.d.ts +152 -0
  10. package/dist/components/base/CkFeedbackDialog/types.d.ts.map +1 -0
  11. package/dist/components/base/CkUserMessage/CkUserMessage.stories.d.ts +6 -0
  12. package/dist/components/base/CkUserMessage/CkUserMessage.stories.d.ts.map +1 -1
  13. package/dist/components/base/CkUserMessage/CkUserMessage.vue.d.ts +4 -1
  14. package/dist/components/base/CkUserMessage/CkUserMessage.vue.d.ts.map +1 -1
  15. package/dist/components/base/CkUserMessage/types.d.ts +14 -5
  16. package/dist/components/base/CkUserMessage/types.d.ts.map +1 -1
  17. package/dist/components/base/index.d.ts +2 -0
  18. package/dist/components/base/index.d.ts.map +1 -1
  19. package/dist/components/index.d.ts +2 -2
  20. package/dist/components/index.d.ts.map +1 -1
  21. package/dist/components/index.js +16 -15
  22. package/dist/handlers/index.js +1 -1
  23. package/dist/handlers/useChatKitLabels.d.ts +22 -0
  24. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +17 -16
  28. package/dist/{useChatKitLabels-ftC52m7f.js → useChatKitLabels-BxNkTzr2.js} +11 -0
  29. package/package.json +5 -5
  30. package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.spec.ts +177 -0
  31. package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts +258 -0
  32. package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue +288 -0
  33. package/src/components/base/CkFeedbackDialog/index.ts +2 -0
  34. package/src/components/base/CkFeedbackDialog/types.ts +155 -0
  35. package/src/components/base/CkUserMessage/CkUserMessage.spec.ts +25 -0
  36. package/src/components/base/CkUserMessage/CkUserMessage.stories.ts +34 -0
  37. package/src/components/base/CkUserMessage/CkUserMessage.vue +115 -5
  38. package/src/components/base/CkUserMessage/types.ts +14 -5
  39. package/src/components/base/index.ts +8 -0
  40. package/src/components/index.ts +6 -0
  41. package/src/handlers/useChatKitLabels.spec.ts +13 -0
  42. package/src/handlers/useChatKitLabels.ts +35 -0
  43. package/src/index.ts +6 -0
package/dist/chat-kit.css CHANGED
@@ -22,3 +22,50 @@
22
22
  transition-duration: 0.01ms;
23
23
  }
24
24
  }
25
+
26
+ .ck-feedback-dialog__chip[data-v-eaffd2d5] {
27
+ width: 100%;
28
+ min-height: 36px;
29
+ height: auto;
30
+ justify-content: center;
31
+ text-align: center;
32
+ line-height: 1rem;
33
+ }
34
+ .ck-feedback-dialog__response[data-v-eaffd2d5] p,
35
+ .ck-feedback-dialog__response[data-v-eaffd2d5] li {
36
+ line-height: 1.5rem;
37
+ }
38
+ .ck-feedback-dialog__response[data-v-eaffd2d5] p {
39
+ margin: 0 0 0.5rem 0;
40
+ }
41
+ .ck-feedback-dialog__response[data-v-eaffd2d5] p:last-child {
42
+ margin-bottom: 0;
43
+ }
44
+
45
+ /* Floating pill per design — the inset white + soft drop shadow aren't
46
+ expressible with the design-system shadow utilities, so set them here. */
47
+ .ck-user-message__toggle[data-v-c759a863] {
48
+ box-shadow:
49
+ 0 2px 2px 0 rgba(0, 0, 0, 0.05),
50
+ 0 0 4px 0 #fff inset;
51
+ }
52
+
53
+ /* text-lg has a 1.75rem (28px) line-height; clamp height = lines × line-height. */
54
+ .ck-user-message__content--clamped[data-v-c759a863] {
55
+ max-height: calc(var(--ck-collapsed-lines) * 1.75rem);
56
+ overflow: hidden;
57
+ }
58
+
59
+ /* Fade the last visible line to low opacity. */
60
+ .ck-user-message__content--faded[data-v-c759a863] {
61
+ -webkit-mask-image: linear-gradient(
62
+ to bottom,
63
+ #000 calc(100% - 1.75rem),
64
+ transparent 100%
65
+ );
66
+ mask-image: linear-gradient(
67
+ to bottom,
68
+ #000 calc(100% - 1.75rem),
69
+ transparent 100%
70
+ );
71
+ }
@@ -0,0 +1,30 @@
1
+ import CkFeedbackDialog from './CkFeedbackDialog.vue';
2
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
+ declare const meta: Meta<typeof CkFeedbackDialog>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ /**
7
+ * Positive variant. Single-select reason chips on the right, the response on
8
+ * the left, optional free text underneath.
9
+ */
10
+ export declare const Positive: Story;
11
+ /**
12
+ * Negative variant. Same shape, different reason set and title.
13
+ */
14
+ export declare const Negative: Story;
15
+ /**
16
+ * When no response text is provided, the left column collapses and the reasons
17
+ * + free-text input fill the dialog.
18
+ */
19
+ export declare const NoResponseColumn: Story;
20
+ /**
21
+ * Submit shows a busy state while the host persists the payload; both actions
22
+ * are non-interactive.
23
+ */
24
+ export declare const Submitting: Story;
25
+ /**
26
+ * Realistic end-to-end flow wired to `CkFeedbackButton`. Click a thumb to open
27
+ * the dialog; submit or cancel; the button locks only on submit.
28
+ */
29
+ export declare const WithFeedbackButton: Story;
30
+ //# sourceMappingURL=CkFeedbackDialog.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkFeedbackDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAOtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAsC3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAgBvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoEnC;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAqEhC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload } from './types';
2
+ declare const __VLS_export: import("vue").DefineComponent<CkFeedbackDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ cancel: () => any;
4
+ submit: (payload: CkFeedbackDialogSubmitPayload) => any;
5
+ "update:open": (open: boolean) => any;
6
+ }, string, import("vue").PublicProps, Readonly<CkFeedbackDialogProps> & Readonly<{
7
+ onCancel?: (() => any) | undefined;
8
+ onSubmit?: ((payload: CkFeedbackDialogSubmitPayload) => any) | undefined;
9
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ //# sourceMappingURL=CkFeedbackDialog.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CkFeedbackDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue"],"names":[],"mappings":"AAwSA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAqgBjB,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,3 @@
1
+ export { default as CkFeedbackDialog } from './CkFeedbackDialog.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/CkFeedbackDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Modal dialog for collecting qualitative feedback on an assistant response.
3
+ * Opened after a binary thumbs-up / thumbs-down click (see `CkFeedbackButton`),
4
+ * it lets the user pick a single reason code and add an optional free-text
5
+ * comment, then submit both alongside the original sentiment.
6
+ *
7
+ * One reason per submission: the backend (feedback-kit) stores a single
8
+ * `reason` enum per response, so the dialog is single-select by design.
9
+ *
10
+ * Fully prop-driven: the host application owns `open`, the list of reasons to
11
+ * show (fetched from `GET /feedback/config`), the response text to display, and
12
+ * the submission handler. The component only manages transient form state (the
13
+ * selected reason and free-text value) until the user submits or cancels.
14
+ *
15
+ * @category Feedback
16
+ * @useCases collect qualitative feedback, gather a reason code for a response,
17
+ * capture a free-text comment, drive a two-step rating flow
18
+ * @keywords feedback, dialog, modal, reason codes, free text, qualitative,
19
+ * rating, comment
20
+ * @related CkFeedbackButton, CkMessageActionButton, CkAgentMessage,
21
+ * CkConversation, UiDialog, UiToggleGroup
22
+ */
23
+ export type CkFeedbackSentiment = 'positive' | 'negative';
24
+ /**
25
+ * A selectable reason: `code` is the stable machine value submitted to the
26
+ * backend; `label` is the human-readable string shown on the chip. Both come
27
+ * from the backend's `GET /feedback/config` so the UI never drifts from what
28
+ * the backend accepts.
29
+ */
30
+ export interface CkFeedbackReason {
31
+ code: string;
32
+ label: string;
33
+ }
34
+ export interface CkFeedbackDialogSubmitPayload {
35
+ /** The sentiment the dialog was opened for. */
36
+ sentiment: CkFeedbackSentiment;
37
+ /** The selected reason `code`, or `null` if the user only left free text. */
38
+ reason: string | null;
39
+ /** Free-text comment, trimmed. Empty string when the user typed nothing. */
40
+ reasonText: string;
41
+ }
42
+ export interface CkFeedbackDialogProps {
43
+ /**
44
+ * Controlled open state. Use with `v-model:open`. When `true` the dialog is
45
+ * visible and form state is editable; when `false` the dialog is closed.
46
+ * @default false
47
+ */
48
+ open?: boolean;
49
+ /**
50
+ * Which sentiment the user gave before this dialog opened. Drives the title
51
+ * ("Give positive feedback" vs "Give negative feedback") and is echoed back
52
+ * on submit.
53
+ */
54
+ sentiment: CkFeedbackSentiment;
55
+ /**
56
+ * The assistant response being rated. Rendered as markdown in the left
57
+ * column so the user can see what they're giving feedback on. Omit (or pass
58
+ * an empty string) to hide the response column entirely.
59
+ * @default undefined
60
+ */
61
+ responseText?: string;
62
+ /**
63
+ * Available reasons to render as single-select chips. The host fetches the
64
+ * appropriate per-sentiment list from `GET /feedback/config` and passes it
65
+ * here. The chip shows `label`; the selected `code` is emitted on submit.
66
+ */
67
+ reasons: CkFeedbackReason[];
68
+ /**
69
+ * Maximum length for the free-text input. The browser will hard-limit the
70
+ * field via the native `maxlength` attribute, and a "x/max" counter is
71
+ * shown beneath the textarea.
72
+ * @default 250
73
+ */
74
+ maxFreeTextLength?: number;
75
+ /**
76
+ * When `true`, the Submit button shows a busy state and clicks are ignored.
77
+ * Use while the parent is awaiting the backend POST.
78
+ * @default false
79
+ */
80
+ submitting?: boolean;
81
+ /**
82
+ * When `true`, both Submit and Cancel are non-interactive. Primarily used
83
+ * to keep the dialog frozen while showing a confirmation or error state
84
+ * before the host closes it.
85
+ * @default false
86
+ */
87
+ disabled?: boolean;
88
+ /**
89
+ * Overrides the injected dialog title for positive feedback. Defaults to
90
+ * `useChatKitLabels().feedbackDialogTitlePositive`.
91
+ */
92
+ titlePositive?: string;
93
+ /**
94
+ * Overrides the injected dialog title for negative feedback. Defaults to
95
+ * `useChatKitLabels().feedbackDialogTitleNegative`.
96
+ */
97
+ titleNegative?: string;
98
+ /**
99
+ * Overrides the injected "Response" heading shown above the response
100
+ * preview column. Defaults to `useChatKitLabels().feedbackDialogResponseHeading`.
101
+ */
102
+ responseHeading?: string;
103
+ /**
104
+ * Screen-reader description for the dialog (sets `aria-describedby`; not
105
+ * shown visually). Defaults to `useChatKitLabels().feedbackDialogDescription`.
106
+ */
107
+ description?: string;
108
+ /**
109
+ * Overrides the injected "Other" label above the free-text input.
110
+ * Defaults to `useChatKitLabels().feedbackDialogOtherLabel`.
111
+ */
112
+ otherLabel?: string;
113
+ /**
114
+ * Tooltip text shown when the user hovers the (i) icon next to the "Other"
115
+ * label. Defaults to `useChatKitLabels().feedbackDialogOtherTooltip`.
116
+ */
117
+ otherTooltip?: string;
118
+ /**
119
+ * Placeholder text for the free-text input. Defaults to
120
+ * `useChatKitLabels().feedbackDialogFreeTextPlaceholder`.
121
+ */
122
+ freeTextPlaceholder?: string;
123
+ /**
124
+ * Label for the Cancel button. Defaults to
125
+ * `useChatKitLabels().feedbackDialogCancelLabel`.
126
+ */
127
+ cancelLabel?: string;
128
+ /**
129
+ * Label for the Submit button. Defaults to
130
+ * `useChatKitLabels().feedbackDialogSubmitLabel`.
131
+ */
132
+ submitLabel?: string;
133
+ }
134
+ export interface CkFeedbackDialogEmits {
135
+ /**
136
+ * Two-way binding for the `open` prop. Emitted when the dialog requests to
137
+ * be closed (Cancel button, close icon, ESC, or outside click).
138
+ */
139
+ (e: 'update:open', open: boolean): void;
140
+ /**
141
+ * Emitted when the user clicks Submit. The host should persist the payload
142
+ * (e.g. POST to `/feedback/`) then close the dialog by setting `open` to
143
+ * `false`. Not emitted while `submitting` or `disabled`.
144
+ */
145
+ (e: 'submit', payload: CkFeedbackDialogSubmitPayload): void;
146
+ /**
147
+ * Emitted when the user clicks Cancel or otherwise dismisses the dialog
148
+ * without submitting (close icon, ESC, outside click).
149
+ */
150
+ (e: 'cancel'): void;
151
+ }
152
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C,+CAA+C;IAC/C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,6EAA6E;IAC7E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC5D;;;OAGG;IACH,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACrB"}
@@ -22,4 +22,10 @@ export declare const MultilineMessage: Story;
22
22
  * attachments). Use when a plain string is not sufficient.
23
23
  */
24
24
  export declare const WithSlotContent: Story;
25
+ /**
26
+ * Long message clamped to 4 lines. The last visible line fades out and a
27
+ * centered "Show more" / "Show less" toggle expands and collapses the text.
28
+ * The toggle only appears when the content actually overflows the clamp.
29
+ */
30
+ export declare const Collapsible: Story;
25
31
  //# sourceMappingURL=CkUserMessage.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CkUserMessage.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAiBpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAwCnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC"}
1
+ {"version":3,"file":"CkUserMessage.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAsBpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAwDnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC"}
@@ -3,7 +3,10 @@ declare var __VLS_1: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
- declare const __VLS_base: import("vue").DefineComponent<CkUserMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkUserMessageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_base: import("vue").DefineComponent<CkUserMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkUserMessageProps> & Readonly<{}>, {
7
+ message: string;
8
+ collapsedLines: number;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
11
  declare const _default: typeof __VLS_export;
9
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CkUserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.vue"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA6ClD,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,gTAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CkUserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.vue"],"names":[],"mappings":"AAwIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA2JlD,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;AAO/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"}
@@ -1,15 +1,24 @@
1
1
  /**
2
- * Bubble layout for a single user turn in a conversation. Renders the message
3
- * text on the right side with a tokenized background and max-width; supports
4
- * a default slot for custom inline content.
2
+ * Layout for a single user turn in a conversation. Renders the message text
3
+ * right-aligned in the muted on-surface color with a max-width; supports a
4
+ * default slot for custom inline content. When `collapsedLines` is set, long
5
+ * messages are clamped with a fade and a "Show more" / "Show less" toggle.
5
6
  *
6
7
  * @category Messages
7
- * @useCases render user message bubble, conversation turn from user, chat input preview, right-aligned message
8
- * @keywords user, message, bubble, chat, conversation, turn
8
+ * @useCases render user message, conversation turn from user, chat input preview, right-aligned message, collapsible long message
9
+ * @keywords user, message, chat, conversation, turn, collapse, show more
9
10
  * @related CkAgentMessage, CkConversation
10
11
  */
11
12
  export interface CkUserMessageProps {
12
13
  /** Text content of the user message. Rendered inside the bubble when no default slot is provided. */
13
14
  message?: string;
15
+ /**
16
+ * When greater than `0`, collapse the message to at most this many lines.
17
+ * The last visible line fades out and a "Show more" / "Show less" toggle is
18
+ * revealed only when the content actually overflows. Omit or pass `0`
19
+ * (the default) to render the full message with no clamping — preserving the
20
+ * original behavior for existing consumers.
21
+ */
22
+ collapsedLines?: number;
14
23
  }
15
24
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -5,6 +5,8 @@ export type { CkConversationLayoutProps } from './CkConversationLayout';
5
5
  export { CkCopyMessageActionButton } from './CkCopyMessageActionButton';
6
6
  export { CkFeedbackButton } from './CkFeedbackButton';
7
7
  export type { CkFeedbackButtonProps, CkFeedbackValue, } from './CkFeedbackButton';
8
+ export { CkFeedbackDialog } from './CkFeedbackDialog';
9
+ export type { CkFeedbackDialogProps, CkFeedbackDialogEmits, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, } from './CkFeedbackDialog';
8
10
  export { CkFileItemsList } from './CkFileItemsList';
9
11
  export type { CkFileEntry, CkFileItemsListProps, CkFileItemsListEmits, } from './CkFileItemsList';
10
12
  export { CkHistoryItem } from './CkHistoryItem';
@@ -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,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,WAAW,EACX,o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,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,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,5 +1,5 @@
1
- export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
- export type { CkConversationLayoutProps, CkFeedbackButtonProps, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './base';
1
+ export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
2
+ export type { CkConversationLayoutProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, 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,gBAAgB,EAChB,eAAe,EACf,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,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,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,gBAAgB,EAChB,eAAe,EACf,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,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,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,22 +1,23 @@
1
- import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q } from "../CkInput.vue_vue_type_script_setup_true_lang-C1Jnn1fK.js";
1
+ import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r } from "../CkInput.vue_vue_type_script_setup_true_lang-BVZ7FG88.js";
2
2
  export {
3
3
  _ as CkAgentMessage,
4
4
  a as CkConversation,
5
5
  b as CkConversationLayout,
6
6
  C as CkCopyMessageActionButton,
7
7
  c as CkFeedbackButton,
8
- d as CkFileItemsList,
9
- e as CkHistory,
10
- f as CkHistoryItem,
11
- g as CkHistoryWrapper,
12
- h as CkInput,
13
- i as CkMarkdownRenderer,
14
- j as CkMessageActionButton,
15
- k as CkPromptActionButton,
16
- l as CkPromptInput,
17
- m as CkPromptInputDisclaimer,
18
- n as CkPromptStopButton,
19
- o as CkSendIcon,
20
- p as CkStopIcon,
21
- q as CkUserMessage
8
+ d as CkFeedbackDialog,
9
+ e as CkFileItemsList,
10
+ f as CkHistory,
11
+ g as CkHistoryItem,
12
+ h as CkHistoryWrapper,
13
+ i as CkInput,
14
+ j as CkMarkdownRenderer,
15
+ k as CkMessageActionButton,
16
+ l as CkPromptActionButton,
17
+ m as CkPromptInput,
18
+ n as CkPromptInputDisclaimer,
19
+ o as CkPromptStopButton,
20
+ p as CkSendIcon,
21
+ q as CkStopIcon,
22
+ r as CkUserMessage
22
23
  };
@@ -1,5 +1,5 @@
1
1
  import { u } from "../useMessageHandler-CMdy-lm0.js";
2
- import { C, d, p, u as u2, a } from "../useChatKitLabels-ftC52m7f.js";
2
+ import { C, d, p, u as u2, a } from "../useChatKitLabels-BxNkTzr2.js";
3
3
  export {
4
4
  C as CHAT_KIT_LABELS,
5
5
  d as defaultChatKitLabels,
@@ -45,6 +45,28 @@ export type ChatKitLabels = {
45
45
  * `defaultChatKitLabels.feedbackGroup` when omitted.
46
46
  */
47
47
  feedbackGroup?: string;
48
+ /** `CkFeedbackDialog` title when sentiment is `'positive'`. */
49
+ feedbackDialogTitlePositive?: string;
50
+ /** `CkFeedbackDialog` title when sentiment is `'negative'`. */
51
+ feedbackDialogTitleNegative?: string;
52
+ /** Heading above the response preview in `CkFeedbackDialog`. */
53
+ feedbackDialogResponseHeading?: string;
54
+ /** Screen-reader description for `CkFeedbackDialog` (sets `aria-describedby`). */
55
+ feedbackDialogDescription?: string;
56
+ /** "Other" label above the free-text input in `CkFeedbackDialog`. */
57
+ feedbackDialogOtherLabel?: string;
58
+ /** Tooltip on the (i) icon next to "Other" in `CkFeedbackDialog`. */
59
+ feedbackDialogOtherTooltip?: string;
60
+ /** Placeholder for the free-text input in `CkFeedbackDialog`. */
61
+ feedbackDialogFreeTextPlaceholder?: string;
62
+ /** Cancel button label in `CkFeedbackDialog`. */
63
+ feedbackDialogCancelLabel?: string;
64
+ /** Submit button label in `CkFeedbackDialog`. */
65
+ feedbackDialogSubmitLabel?: string;
66
+ /** Label for the `CkUserMessage` toggle when the message is collapsed. */
67
+ userMessageShowMore?: string;
68
+ /** Label for the `CkUserMessage` toggle when the message is expanded. */
69
+ userMessageShowLess?: string;
48
70
  /** Fallback title used by `CkHistory` when a conversation has no `title`. */
49
71
  historyItemUntitled: string;
50
72
  /** 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,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E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AAE,cAAc,GAAG,IAAI,CAKjE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAK7D"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { useChat, useConversationSessions, useConversations, } from './composabl
5
5
  export type { ChatActions, ChatState, ConversationSession, CreateConversationInput, MessageHandler, MutationOptions, UseChatReturn, UseConversationSessionsReturn, UseConversationsOptions, UseConversationsReturn, } from './composables';
6
6
  export { SdkError, createDocumentUploadProvider, defaultDocumentUploadConfig, defaultEndpoints, useDocumentUploadWithDefaultConfig, } from './composables/fileUpload';
7
7
  export type { DocumentUploadConfig, DocumentUploadProvider, FileEntry, FileStatus, } from './composables/fileUpload';
8
- export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
9
- export type { CkConversationLayoutProps, CkConversationProps, CkFeedbackButtonProps, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
8
+ export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
9
+ export type { CkConversationLayoutProps, CkConversationProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
10
10
  export type { BaseMessage, Conversation, ConversationTree, MessageContent, MessageContentStatus, MessageMetadata, MessageReasoningContent, MessageRole, MessageStatus, MessageTextContent, MessageToolContent, TreeMessage, } from './types';
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,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;AASpB,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;AAEvB,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,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,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,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,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,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;AASpB,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;AAEvB,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,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,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,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,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { u } from "./useMessageHandler-CMdy-lm0.js";
2
- import { C, d, p, u as u2, a } from "./useChatKitLabels-ftC52m7f.js";
2
+ import { C, d, p, u as u2, a } from "./useChatKitLabels-BxNkTzr2.js";
3
3
  import { S, c, d as d2, a as a2, u as u3, b, e, f } from "./index-Ct5hD214.js";
4
- import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q } from "./CkInput.vue_vue_type_script_setup_true_lang-C1Jnn1fK.js";
4
+ import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r } from "./CkInput.vue_vue_type_script_setup_true_lang-BVZ7FG88.js";
5
5
  export {
6
6
  C as CHAT_KIT_LABELS,
7
7
  _ as CkAgentMessage,
@@ -9,20 +9,21 @@ export {
9
9
  b2 as CkConversationLayout,
10
10
  C2 as CkCopyMessageActionButton,
11
11
  c2 as CkFeedbackButton,
12
- d3 as CkFileItemsList,
13
- e2 as CkHistory,
14
- f2 as CkHistoryItem,
15
- g as CkHistoryWrapper,
16
- h as CkInput,
17
- i as CkMarkdownRenderer,
18
- j as CkMessageActionButton,
19
- k as CkPromptActionButton,
20
- l as CkPromptInput,
21
- m as CkPromptInputDisclaimer,
22
- n as CkPromptStopButton,
23
- o as CkSendIcon,
24
- p2 as CkStopIcon,
25
- q as CkUserMessage,
12
+ d3 as CkFeedbackDialog,
13
+ e2 as CkFileItemsList,
14
+ f2 as CkHistory,
15
+ g as CkHistoryItem,
16
+ h as CkHistoryWrapper,
17
+ i as CkInput,
18
+ j as CkMarkdownRenderer,
19
+ k as CkMessageActionButton,
20
+ l as CkPromptActionButton,
21
+ m as CkPromptInput,
22
+ n as CkPromptInputDisclaimer,
23
+ o as CkPromptStopButton,
24
+ p2 as CkSendIcon,
25
+ q as CkStopIcon,
26
+ r as CkUserMessage,
26
27
  S as SdkError,
27
28
  c as createDocumentUploadProvider,
28
29
  d as defaultChatKitLabels,
@@ -12708,6 +12708,17 @@ const defaultChatKitLabels = {
12708
12708
  feedbackThumbsUp: "Good response",
12709
12709
  feedbackThumbsDown: "Bad response",
12710
12710
  feedbackGroup: "Rate this response",
12711
+ feedbackDialogTitlePositive: "Give positive feedback",
12712
+ feedbackDialogTitleNegative: "Give negative feedback",
12713
+ feedbackDialogResponseHeading: "Response",
12714
+ feedbackDialogDescription: "Select a reason and optionally add a comment, then submit your feedback.",
12715
+ feedbackDialogOtherLabel: "Other",
12716
+ feedbackDialogOtherTooltip: "Add anything else you want to share about this response.",
12717
+ feedbackDialogFreeTextPlaceholder: "Write down some additional details",
12718
+ feedbackDialogCancelLabel: "Cancel",
12719
+ feedbackDialogSubmitLabel: "Submit",
12720
+ userMessageShowMore: "Show more",
12721
+ userMessageShowLess: "Show less",
12711
12722
  historyItemUntitled: "Untitled conversation",
12712
12723
  historyItemActionAriaLabel: "Conversation options",
12713
12724
  historyItemEditAction: "Edit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/chat-kit",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Chat kit package for building chat interfaces with Vue",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -65,15 +65,16 @@
65
65
  "vue": "^3.5.27"
66
66
  },
67
67
  "dependencies": {
68
+ "@aleph-alpha/ui-library": "^2.7.0",
68
69
  "dompurify": "^3.3.2",
69
70
  "rehype-stringify": "^10.0.1",
70
71
  "remark-gfm": "^4.0.1",
71
72
  "remark-parse": "^11.0.0",
72
73
  "remark-rehype": "^11.1.2",
73
- "unified": "^11.0.5",
74
- "@aleph-alpha/ui-library": "2.6.2"
74
+ "unified": "^11.0.5"
75
75
  },
76
76
  "devDependencies": {
77
+ "@aleph-alpha/config-css": "^1.2.0",
77
78
  "@storybook/addon-a11y": "10.2.17",
78
79
  "@storybook/addon-docs": "10.2.17",
79
80
  "@storybook/addon-themes": "10.2.17",
@@ -96,8 +97,7 @@
96
97
  "vite": "^7.3.2",
97
98
  "vitest": "4.0.15",
98
99
  "vue": "^3.5.27",
99
- "vue-tsc": "^3.2.4",
100
- "@aleph-alpha/config-css": "1.2.0"
100
+ "vue-tsc": "^3.2.4"
101
101
  },
102
102
  "scripts": {
103
103
  "build": "vite build && vue-tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --outDir dist",