@aleph-alpha/chat-kit 0.5.3 → 0.6.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-UrrLmx86.js → CkInput.vue_vue_type_script_setup_true_lang-BWh7IesK.js} +2 -16
- package/dist/components/base/CkConversationLayout/CkConversationLayout.vue.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -59,7 +59,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
const scrollContainerRef = ref(null);
|
|
60
60
|
const containerHeight = ref(0);
|
|
61
61
|
const isAutoScrollEnabled = ref(true);
|
|
62
|
-
const isProgrammaticScroll = ref(false);
|
|
63
62
|
const hasBottomSpacer = ref(false);
|
|
64
63
|
const spacerHeight = ref(0);
|
|
65
64
|
let resizeObserver = null;
|
|
@@ -89,10 +88,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
89
88
|
if (!lastRow) return true;
|
|
90
89
|
const lastRowBottom = lastRow.offsetTop + lastRow.offsetHeight;
|
|
91
90
|
const viewportBottom = container.scrollTop + container.clientHeight;
|
|
92
|
-
return viewportBottom >= lastRowBottom -
|
|
91
|
+
return viewportBottom >= lastRowBottom - 10;
|
|
93
92
|
}
|
|
94
93
|
function handleScroll() {
|
|
95
|
-
if (isProgrammaticScroll.value) return;
|
|
96
94
|
isAutoScrollEnabled.value = isFollowingContent();
|
|
97
95
|
}
|
|
98
96
|
function updateSpacerHeight() {
|
|
@@ -128,15 +126,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
128
126
|
const userRows = container.querySelectorAll('[data-message-row="user"]');
|
|
129
127
|
const lastUserRow = userRows[userRows.length - 1];
|
|
130
128
|
if (lastUserRow) {
|
|
131
|
-
isProgrammaticScroll.value = true;
|
|
132
129
|
lastUserRow.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
133
|
-
container.addEventListener(
|
|
134
|
-
"scrollend",
|
|
135
|
-
() => {
|
|
136
|
-
isProgrammaticScroll.value = false;
|
|
137
|
-
},
|
|
138
|
-
{ once: true }
|
|
139
|
-
);
|
|
140
130
|
}
|
|
141
131
|
isAutoScrollEnabled.value = true;
|
|
142
132
|
});
|
|
@@ -150,11 +140,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
150
140
|
const lastRowBottom = lastRow.offsetTop + lastRow.offsetHeight;
|
|
151
141
|
const viewportBottom = container.scrollTop + container.clientHeight;
|
|
152
142
|
if (lastRowBottom > viewportBottom) {
|
|
153
|
-
isProgrammaticScroll.value = true;
|
|
154
143
|
container.scrollTop = lastRowBottom - container.clientHeight;
|
|
155
|
-
requestAnimationFrame(() => {
|
|
156
|
-
isProgrammaticScroll.value = false;
|
|
157
|
-
});
|
|
158
144
|
}
|
|
159
145
|
}
|
|
160
146
|
watch(
|
|
@@ -187,7 +173,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
187
173
|
return openBlock(), createElementBlock("div", {
|
|
188
174
|
ref_key: "scrollContainerRef",
|
|
189
175
|
ref: scrollContainerRef,
|
|
190
|
-
class: "flex flex-col gap-4 overflow-y-auto",
|
|
176
|
+
class: "relative flex flex-col gap-4 overflow-y-auto",
|
|
191
177
|
onScroll: handleScroll
|
|
192
178
|
}, [
|
|
193
179
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.messages, (message) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkConversationLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkConversationLayout/CkConversationLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkConversationLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkConversationLayout/CkConversationLayout.vue"],"names":[],"mappings":"AAoME,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS;IAA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"./ChatService-LogwJNxh.js";
|
|
|
2
2
|
import { u } from "./useMessageHandler-D7OdrrcB.js";
|
|
3
3
|
import { C as C2, d, p, u as u2, a } from "./useChatKitLabels-xZXcnxZZ.js";
|
|
4
4
|
import { useChat } from "./composables/index.js";
|
|
5
|
-
import { _, a as a2, b, c, d as d2, e, f, g, h } from "./CkInput.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _, a as a2, b, c, d as d2, e, f, g, h } from "./CkInput.vue_vue_type_script_setup_true_lang-BWh7IesK.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": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Chat kit package for building chat interfaces with Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"remark-parse": "^11.0.0",
|
|
64
64
|
"remark-rehype": "^11.1.2",
|
|
65
65
|
"unified": "^11.0.5",
|
|
66
|
-
"@aleph-alpha/ui-library": "1.
|
|
66
|
+
"@aleph-alpha/ui-library": "1.23.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@storybook/addon-a11y": "10.2.17",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"vitest": "4.0.15",
|
|
89
89
|
"vue": "^3.5.27",
|
|
90
90
|
"vue-tsc": "^3.2.4",
|
|
91
|
-
"@aleph-alpha/config-css": "0.
|
|
91
|
+
"@aleph-alpha/config-css": "0.22.0"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"build": "vite build && vue-tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --outDir dist",
|