@myned-ai/avatar-chat-widget 0.2.0 → 0.4.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/asset/avatar.gif +0 -0
- package/dist/asset/nyx.zip +0 -0
- package/dist/avatar-chat-widget.d.ts +40 -3
- package/dist/avatar-chat-widget.js +3424 -1084
- package/dist/avatar-chat-widget.js.map +1 -1
- package/dist/avatar-chat-widget.umd.js +1 -1
- package/dist/avatar-chat-widget.umd.js.map +1 -1
- package/package.json +1 -1
- package/public/asset/avatar.gif +0 -0
- package/public/asset/nyx.zip +0 -0
|
Binary file
|
package/dist/asset/nyx.zip
CHANGED
|
Binary file
|
|
@@ -37,11 +37,10 @@ declare class AvatarChatElement extends HTMLElement {
|
|
|
37
37
|
private config;
|
|
38
38
|
private avatar;
|
|
39
39
|
private chatManager;
|
|
40
|
+
private drawerController;
|
|
40
41
|
private _isMounted;
|
|
41
42
|
private _isConnected;
|
|
42
43
|
private _isCollapsed;
|
|
43
|
-
private themeMediaQuery;
|
|
44
|
-
private themeChangeHandler;
|
|
45
44
|
constructor();
|
|
46
45
|
/**
|
|
47
46
|
* Configure the widget (call before mount)
|
|
@@ -63,6 +62,11 @@ declare class AvatarChatElement extends HTMLElement {
|
|
|
63
62
|
* Initialize avatar renderer
|
|
64
63
|
*/
|
|
65
64
|
private initializeAvatar;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the avatar URL from config or assets base URL
|
|
67
|
+
* Ensures we always have an absolute URL that works across different deployment scenarios
|
|
68
|
+
*/
|
|
69
|
+
private resolveAvatarUrl;
|
|
66
70
|
/**
|
|
67
71
|
* Initialize chat manager
|
|
68
72
|
*/
|
|
@@ -71,6 +75,30 @@ declare class AvatarChatElement extends HTMLElement {
|
|
|
71
75
|
* Setup UI event listeners
|
|
72
76
|
*/
|
|
73
77
|
private setupUIEvents;
|
|
78
|
+
/**
|
|
79
|
+
* Escape HTML to prevent XSS in user-provided suggestions
|
|
80
|
+
*/
|
|
81
|
+
private escapeHtml;
|
|
82
|
+
/**
|
|
83
|
+
* Mark that conversation has messages (shows chat area instead of suggestions)
|
|
84
|
+
*/
|
|
85
|
+
private markHasMessages;
|
|
86
|
+
/**
|
|
87
|
+
* Initialize the drawer controller and view mode selector
|
|
88
|
+
*/
|
|
89
|
+
private initializeDrawer;
|
|
90
|
+
/**
|
|
91
|
+
* Setup expand button for text-focus mode
|
|
92
|
+
*/
|
|
93
|
+
private setupExpandButton;
|
|
94
|
+
/**
|
|
95
|
+
* Setup view mode toggle button
|
|
96
|
+
*/
|
|
97
|
+
private setupViewModeSelector;
|
|
98
|
+
/**
|
|
99
|
+
* Update view mode UI to reflect current state (no longer needed with toggle button)
|
|
100
|
+
*/
|
|
101
|
+
private updateViewModeUI;
|
|
74
102
|
/**
|
|
75
103
|
* Update connection status (stub - connection indicator removed from UI)
|
|
76
104
|
*/
|
|
@@ -109,7 +137,16 @@ declare class AvatarChatElement extends HTMLElement {
|
|
|
109
137
|
*/
|
|
110
138
|
reconnect(): Promise<void>;
|
|
111
139
|
/**
|
|
112
|
-
*
|
|
140
|
+
* Web Component lifecycle: Called when element is removed from DOM
|
|
141
|
+
* Ensures cleanup happens even if element is removed externally (not via destroy())
|
|
142
|
+
*/
|
|
143
|
+
disconnectedCallback(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Internal cleanup logic (shared by destroy() and disconnectedCallback())
|
|
146
|
+
*/
|
|
147
|
+
private cleanup;
|
|
148
|
+
/**
|
|
149
|
+
* Cleanup and remove from DOM
|
|
113
150
|
*/
|
|
114
151
|
destroy(): void;
|
|
115
152
|
}
|