@aleph-alpha/chat-kit 1.3.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.
- package/dist/{CkInput.vue_vue_type_script_setup_true_lang-BoUxOQbH.js → CkInput.vue_vue_type_script_setup_true_lang-CyGLItQZ.js} +4 -4
- package/dist/chat-kit.css +2 -11
- package/dist/components/base/CkFeedbackButton/CkFeedbackButton.vue.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/favicon.ico +0 -0
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/src/components/base/CkFeedbackButton/CkFeedbackButton.vue +8 -24
|
@@ -422,7 +422,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
422
422
|
return openBlock(), createElementBlock("div", {
|
|
423
423
|
role: "group",
|
|
424
424
|
"aria-label": groupLabel.value,
|
|
425
|
-
class: "ck-feedback-button flex items-center gap-
|
|
425
|
+
class: "ck-feedback-button flex items-center gap-4"
|
|
426
426
|
}, [
|
|
427
427
|
createVNode(unref(UiTooltip), {
|
|
428
428
|
content: thumbsUpLabel.value,
|
|
@@ -437,7 +437,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
437
437
|
disabled: isUpDisabled.value,
|
|
438
438
|
class: [
|
|
439
439
|
"ck-feedback-button__thumb",
|
|
440
|
-
{ "
|
|
440
|
+
{ "bg-core-bg-tertiary": isUpSelected.value }
|
|
441
441
|
],
|
|
442
442
|
onClick: _cache[0] || (_cache[0] = ($event) => handleClick("up"))
|
|
443
443
|
}), {
|
|
@@ -467,7 +467,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
467
467
|
disabled: isDownDisabled.value,
|
|
468
468
|
class: [
|
|
469
469
|
"ck-feedback-button__thumb",
|
|
470
|
-
{ "
|
|
470
|
+
{ "bg-core-bg-tertiary": isDownSelected.value }
|
|
471
471
|
],
|
|
472
472
|
onClick: _cache[1] || (_cache[1] = ($event) => handleClick("down"))
|
|
473
473
|
}), {
|
|
@@ -488,7 +488,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
|
-
const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
491
|
+
const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-245705b8"]]);
|
|
492
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';
|
|
493
493
|
const _hoisted_1$3 = ["data-active"];
|
|
494
494
|
const _hoisted_2$2 = { class: "min-w-0 flex-1" };
|
package/dist/chat-kit.css
CHANGED
|
@@ -14,20 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.ck-feedback-button__thumb[data-v-
|
|
17
|
+
.ck-feedback-button__thumb[data-v-245705b8] {
|
|
18
18
|
transition: background-color 0.15s ease-out;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
/* Selected thumbs stay visually emphasised on top of the default ghost
|
|
22
|
-
variant: the filled icon (via `fill-current`) carries the primary
|
|
23
|
-
affordance; the tinted background reinforces it without competing with
|
|
24
|
-
neighbouring action buttons. The token matches `bg-core-bg-tertiary`
|
|
25
|
-
used elsewhere in chat-kit. */
|
|
26
|
-
.ck-feedback-button__thumb--selected[data-v-c452d66c] button {
|
|
27
|
-
background-color: var(--core-bg-tertiary);
|
|
28
|
-
}
|
|
29
20
|
@media (prefers-reduced-motion: reduce) {
|
|
30
|
-
.ck-feedback-button__thumb[data-v-
|
|
21
|
+
.ck-feedback-button__thumb[data-v-245705b8] {
|
|
31
22
|
transition-duration: 0.01ms;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkFeedbackButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackButton/CkFeedbackButton.vue"],"names":[],"mappings":"
|
|
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"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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,
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { C } from "./ChatService-LogwJNxh.js";
|
|
|
2
2
|
import { u } from "./useMessageHandler-BmBdu2EW.js";
|
|
3
3
|
import { C as C2, d, p, u as u2, a } from "./useChatKitLabels-ftC52m7f.js";
|
|
4
4
|
import { u as u3, a as a2, b } from "./useConversationSessions-ulFhtpQr.js";
|
|
5
|
-
import { _, a as a3, b as b2, C as C3, c, d as d2, e, f, g, h, i, j, k, l, m, n, o, p as p2 } from "./CkInput.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _, a as a3, b as b2, C as C3, c, d as d2, e, f, g, h, i, j, k, l, m, n, o, p as p2 } from "./CkInput.vue_vue_type_script_setup_true_lang-CyGLItQZ.js";
|
|
6
6
|
export {
|
|
7
7
|
C2 as CHAT_KIT_LABELS,
|
|
8
8
|
C as ChatService,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/chat-kit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Chat kit package for building chat interfaces with Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -64,11 +64,12 @@
|
|
|
64
64
|
"remark-parse": "^11.0.0",
|
|
65
65
|
"remark-rehype": "^11.1.2",
|
|
66
66
|
"unified": "^11.0.5",
|
|
67
|
-
"@aleph-alpha/ui-library": "2.
|
|
67
|
+
"@aleph-alpha/ui-library": "2.4.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@storybook/addon-a11y": "10.2.17",
|
|
71
71
|
"@storybook/addon-docs": "10.2.17",
|
|
72
|
+
"@storybook/addon-themes": "10.2.17",
|
|
72
73
|
"@storybook/vue3-vite": "10.2.17",
|
|
73
74
|
"@testing-library/jest-dom": "6.9.1",
|
|
74
75
|
"@testing-library/vue": "8.1.0",
|
|
@@ -27,10 +27,7 @@ const emit = defineEmits<{
|
|
|
27
27
|
|
|
28
28
|
const labels = useChatKitLabels();
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
// the English default. The final fallback covers consumers who type their
|
|
32
|
-
// labels object as `ChatKitLabels` without the (optional) feedback keys, so
|
|
33
|
-
// the value is always a string at the call site.
|
|
30
|
+
// Resolution order: per-instance prop, injected label, English default.
|
|
34
31
|
const thumbsUpLabel = computed(
|
|
35
32
|
() =>
|
|
36
33
|
props.ariaLabelThumbsUp ??
|
|
@@ -53,12 +50,8 @@ const groupLabel = computed(
|
|
|
53
50
|
const isUpSelected = computed(() => props.value === 'up');
|
|
54
51
|
const isDownSelected = computed(() => props.value === 'down');
|
|
55
52
|
|
|
56
|
-
// When locked, the unselected thumb is disabled
|
|
57
|
-
//
|
|
58
|
-
// can still announce the locked-in choice via `aria-pressed`, but both thumbs
|
|
59
|
-
// carry `aria-disabled="true"` so screen readers communicate that the choice
|
|
60
|
-
// is no longer interactive. Clicks on either are no-ops, gated by the early
|
|
61
|
-
// return in `handleClick`.
|
|
53
|
+
// When locked, only the unselected thumb is natively disabled; the selected
|
|
54
|
+
// thumb stays focusable so screen readers can announce its `aria-pressed`.
|
|
62
55
|
const isUpDisabled = computed(
|
|
63
56
|
() => props.disabled || (props.locked && !isUpSelected.value),
|
|
64
57
|
);
|
|
@@ -80,7 +73,7 @@ function handleClick(target: 'up' | 'down'): void {
|
|
|
80
73
|
<div
|
|
81
74
|
role="group"
|
|
82
75
|
:aria-label="groupLabel"
|
|
83
|
-
class="ck-feedback-button flex items-center gap-
|
|
76
|
+
class="ck-feedback-button flex items-center gap-4"
|
|
84
77
|
>
|
|
85
78
|
<UiTooltip
|
|
86
79
|
:content="thumbsUpLabel"
|
|
@@ -95,7 +88,7 @@ function handleClick(target: 'up' | 'down'): void {
|
|
|
95
88
|
:disabled="isUpDisabled"
|
|
96
89
|
:class="[
|
|
97
90
|
'ck-feedback-button__thumb',
|
|
98
|
-
{ '
|
|
91
|
+
{ 'bg-core-bg-tertiary': isUpSelected },
|
|
99
92
|
]"
|
|
100
93
|
@click="handleClick('up')"
|
|
101
94
|
>
|
|
@@ -120,7 +113,7 @@ function handleClick(target: 'up' | 'down'): void {
|
|
|
120
113
|
:disabled="isDownDisabled"
|
|
121
114
|
:class="[
|
|
122
115
|
'ck-feedback-button__thumb',
|
|
123
|
-
{ '
|
|
116
|
+
{ 'bg-core-bg-tertiary': isDownSelected },
|
|
124
117
|
]"
|
|
125
118
|
@click="handleClick('down')"
|
|
126
119
|
>
|
|
@@ -136,21 +129,12 @@ function handleClick(target: 'up' | 'down'): void {
|
|
|
136
129
|
</template>
|
|
137
130
|
|
|
138
131
|
<style scoped>
|
|
139
|
-
.ck-feedback-button__thumb
|
|
132
|
+
.ck-feedback-button__thumb {
|
|
140
133
|
transition: background-color 0.15s ease-out;
|
|
141
134
|
}
|
|
142
135
|
|
|
143
|
-
/* Selected thumbs stay visually emphasised on top of the default ghost
|
|
144
|
-
variant: the filled icon (via `fill-current`) carries the primary
|
|
145
|
-
affordance; the tinted background reinforces it without competing with
|
|
146
|
-
neighbouring action buttons. The token matches `bg-core-bg-tertiary`
|
|
147
|
-
used elsewhere in chat-kit. */
|
|
148
|
-
.ck-feedback-button__thumb--selected :deep(button) {
|
|
149
|
-
background-color: var(--core-bg-tertiary);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
136
|
@media (prefers-reduced-motion: reduce) {
|
|
153
|
-
.ck-feedback-button__thumb
|
|
137
|
+
.ck-feedback-button__thumb {
|
|
154
138
|
transition-duration: 0.01ms;
|
|
155
139
|
}
|
|
156
140
|
}
|