@alxxsck/ai-assistant 2.5.1 → 2.6.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.
- package/dist/{Avatar-DklBomzT.js → Avatar-DAuV3Kht.js} +1 -1
- package/dist/{ChatWidgetContent-DbOTIErq.js → ChatWidgetContent-BGznb_xm.js} +2217 -1924
- package/dist/api/messages.api.d.ts +6 -5
- package/dist/bridge-ai-chat-widget.es.js +1 -1
- package/dist/domain/message/message.store.d.ts +14 -1
- package/dist/{index-D9W50u8W.js → index-DBlYyJlj.js} +2272 -2004
- package/dist/ui/components/ChatPaginationSkeleton.d.ts +2 -0
- package/dist/ui/hooks/useCursorPagination.d.ts +15 -0
- package/dist/ui/hooks/usePinnedAutoScroll.d.ts +2 -1
- package/dist/ui/hooks/usePrependScrollAnchor.d.ts +13 -0
- package/package.json +3 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
type UseCursorPaginationOptions = {
|
|
3
|
+
rootRef: RefObject<HTMLElement | null>;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
onLoad: () => Promise<void>;
|
|
7
|
+
resetKey?: string;
|
|
8
|
+
rootMargin?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function useCursorPagination({ rootRef, enabled, isLoading, onLoad, resetKey, rootMargin, }: UseCursorPaginationOptions): {
|
|
11
|
+
error: Error | null;
|
|
12
|
+
loadMore: () => Promise<void>;
|
|
13
|
+
sentinelRef: RefObject<HTMLDivElement | null>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -2,9 +2,10 @@ import { type RefObject, type UIEventHandler } from "react";
|
|
|
2
2
|
type UsePinnedAutoScrollOptions = {
|
|
3
3
|
containerRef: RefObject<HTMLElement | null>;
|
|
4
4
|
contentRef: RefObject<HTMLElement | null>;
|
|
5
|
+
firstMessageId?: string;
|
|
5
6
|
messageCount: number;
|
|
6
7
|
threadId: string | undefined;
|
|
7
8
|
threshold?: number;
|
|
8
9
|
};
|
|
9
|
-
export declare function usePinnedAutoScroll({ containerRef, contentRef, messageCount, threadId, threshold, }: UsePinnedAutoScrollOptions): UIEventHandler<HTMLElement>;
|
|
10
|
+
export declare function usePinnedAutoScroll({ containerRef, contentRef, firstMessageId, messageCount, threadId, threshold, }: UsePinnedAutoScrollOptions): UIEventHandler<HTMLElement>;
|
|
10
11
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
type UsePrependScrollAnchorOptions = {
|
|
3
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
4
|
+
contextId: string | undefined;
|
|
5
|
+
firstItemId: string | undefined;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
itemCount: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function usePrependScrollAnchor({ containerRef, contextId, firstItemId, isLoading, itemCount, }: UsePrependScrollAnchorOptions): {
|
|
10
|
+
captureAnchor: () => void;
|
|
11
|
+
clearAnchor: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alxxsck/ai-assistant",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"description": "Embeddable Lola AI assistant library",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/bridge-ai-chat-widget.es.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"format": "prettier --write .",
|
|
34
34
|
"format:check": "prettier --check .",
|
|
35
35
|
"test": "vitest run",
|
|
36
|
+
"test:browser": "playwright test",
|
|
36
37
|
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
37
38
|
"build-lib": "vite build --config vite.config.lib.ts && tsc -p tsconfig.build.json",
|
|
38
39
|
"prepublishOnly": "npm run build-lib",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@eslint/js": "^9.39.1",
|
|
64
|
+
"@playwright/test": "^1.62.0",
|
|
63
65
|
"@tailwindcss/postcss": "^4.1.18",
|
|
64
66
|
"@tailwindcss/vite": "^4.1.18",
|
|
65
67
|
"@types/howler": "^2.2.12",
|