fyrebot-widget 1.0.0 → 1.1.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/ChatbotWidget.d.ts.map +1 -1
- package/dist/ChatbotWidget.js +136 -9
- package/dist/api.d.ts +4 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +22 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatbotWidget.d.ts","sourceRoot":"","sources":["../src/ChatbotWidget.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"ChatbotWidget.d.ts","sourceRoot":"","sources":["../src/ChatbotWidget.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6xBjD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/ChatbotWidget.js
CHANGED
|
@@ -6,12 +6,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
7
7
|
import { MessageCircle, X, Send, Loader2, Bot, User, Sparkles, RefreshCw } from 'lucide-react';
|
|
8
8
|
import { ChatbotApiClient } from './api';
|
|
9
|
-
export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle = 'Ask me anything', brandName, primaryColor = '#6366f1', welcomeMessage = 'Hello! How can I help you today?', placeholder = 'Type your message...', position = 'bottom-right', showTypingIndicator = true, showTimestamps = true, showSources = true, maxHeight = '600px', maxWidth = '400px', className = '', onOpen, onClose, onMessageSent, onMessageReceived, onError, }) => {
|
|
9
|
+
export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle = 'Ask me anything', brandName, primaryColor = '#6366f1', welcomeMessage = 'Hello! How can I help you today?', placeholder = 'Type your message...', position = 'bottom-right', showTypingIndicator = true, showTimestamps = true, showSources = true, showSuggestedQuestions = true, suggestedQuestions: customSuggestions, maxSuggestions = 4, maxHeight = '600px', maxWidth = '400px', className = '', onOpen, onClose, onMessageSent, onMessageReceived, onError, }) => {
|
|
10
10
|
const [isOpen, setIsOpen] = useState(false);
|
|
11
11
|
const [messages, setMessages] = useState([]);
|
|
12
12
|
const [input, setInput] = useState('');
|
|
13
13
|
const [isLoading, setIsLoading] = useState(false);
|
|
14
14
|
const [error, setError] = useState(null);
|
|
15
|
+
const [suggestions, setSuggestions] = useState([]);
|
|
16
|
+
const [loadingSuggestions, setLoadingSuggestions] = useState(false);
|
|
15
17
|
const scrollRef = useRef(null);
|
|
16
18
|
const apiClient = useRef(null);
|
|
17
19
|
// Initialize API client
|
|
@@ -24,6 +26,33 @@ export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle
|
|
|
24
26
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
25
27
|
}
|
|
26
28
|
}, [messages, isLoading]);
|
|
29
|
+
// Fetch suggestions when chat opens and no messages exist
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const fetchSuggestions = async () => {
|
|
32
|
+
if (!isOpen || messages.length > 0 || !showSuggestedQuestions || !apiClient.current) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// Use custom suggestions if provided
|
|
36
|
+
if (customSuggestions && customSuggestions.length > 0) {
|
|
37
|
+
setSuggestions(customSuggestions.slice(0, maxSuggestions).map(s => s.question));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
// Otherwise fetch from API
|
|
41
|
+
try {
|
|
42
|
+
setLoadingSuggestions(true);
|
|
43
|
+
const fetchedSuggestions = await apiClient.current.getSuggestedQuestions(maxSuggestions);
|
|
44
|
+
setSuggestions(fetchedSuggestions);
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
// Silently fail - suggestions are optional
|
|
48
|
+
console.warn('Failed to load suggested questions:', err);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
setLoadingSuggestions(false);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
fetchSuggestions();
|
|
55
|
+
}, [isOpen, messages.length, showSuggestedQuestions, customSuggestions, maxSuggestions]);
|
|
27
56
|
// Handle open/close
|
|
28
57
|
const handleToggle = useCallback(() => {
|
|
29
58
|
const newState = !isOpen;
|
|
@@ -36,14 +65,25 @@ export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle
|
|
|
36
65
|
onClose?.();
|
|
37
66
|
}
|
|
38
67
|
}, [isOpen, onOpen, onClose]);
|
|
39
|
-
//
|
|
40
|
-
const
|
|
41
|
-
|
|
68
|
+
// Handle suggestion click
|
|
69
|
+
const handleSuggestionClick = useCallback((suggestion) => {
|
|
70
|
+
setInput(suggestion);
|
|
71
|
+
// Auto-send the suggestion
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
if (apiClient.current) {
|
|
74
|
+
handleSendMessage(suggestion);
|
|
75
|
+
}
|
|
76
|
+
}, 0);
|
|
77
|
+
}, []);
|
|
78
|
+
// Send message (extracted to reusable function)
|
|
79
|
+
const handleSendMessage = useCallback(async (messageText) => {
|
|
80
|
+
const textToSend = messageText || input.trim();
|
|
81
|
+
if (!textToSend || isLoading || !apiClient.current)
|
|
42
82
|
return;
|
|
43
83
|
const userMessage = {
|
|
44
84
|
id: `user-${Date.now()}`,
|
|
45
85
|
role: 'user',
|
|
46
|
-
content:
|
|
86
|
+
content: textToSend,
|
|
47
87
|
timestamp: new Date(),
|
|
48
88
|
};
|
|
49
89
|
setMessages((prev) => [...prev, userMessage]);
|
|
@@ -76,9 +116,9 @@ export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle
|
|
|
76
116
|
const handleKeyPress = useCallback((e) => {
|
|
77
117
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
78
118
|
e.preventDefault();
|
|
79
|
-
|
|
119
|
+
handleSendMessage();
|
|
80
120
|
}
|
|
81
|
-
}, [
|
|
121
|
+
}, [handleSendMessage]);
|
|
82
122
|
// Reset conversation
|
|
83
123
|
const handleReset = useCallback(() => {
|
|
84
124
|
setMessages([]);
|
|
@@ -458,6 +498,92 @@ export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle
|
|
|
458
498
|
background: #333;
|
|
459
499
|
}
|
|
460
500
|
|
|
501
|
+
.chatbot-suggestions {
|
|
502
|
+
padding: 0 16px 16px;
|
|
503
|
+
display: flex;
|
|
504
|
+
flex-direction: column;
|
|
505
|
+
gap: 8px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.chatbot-suggestions-title {
|
|
509
|
+
font-size: 12px;
|
|
510
|
+
color: #888;
|
|
511
|
+
font-weight: 500;
|
|
512
|
+
margin-bottom: 4px;
|
|
513
|
+
text-transform: uppercase;
|
|
514
|
+
letter-spacing: 0.5px;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.chatbot-suggestion-chip {
|
|
518
|
+
background: #2a2a2a;
|
|
519
|
+
border: 1px solid #333;
|
|
520
|
+
color: #ccc;
|
|
521
|
+
padding: 10px 14px;
|
|
522
|
+
border-radius: 20px;
|
|
523
|
+
font-size: 13px;
|
|
524
|
+
cursor: pointer;
|
|
525
|
+
transition: all 0.2s ease;
|
|
526
|
+
text-align: left;
|
|
527
|
+
display: flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
gap: 8px;
|
|
530
|
+
animation: fadeIn 0.3s ease;
|
|
531
|
+
animation-fill-mode: backwards;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.chatbot-suggestion-chip:nth-child(2) {
|
|
535
|
+
animation-delay: 0.1s;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.chatbot-suggestion-chip:nth-child(3) {
|
|
539
|
+
animation-delay: 0.2s;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.chatbot-suggestion-chip:nth-child(4) {
|
|
543
|
+
animation-delay: 0.3s;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.chatbot-suggestion-chip:nth-child(5) {
|
|
547
|
+
animation-delay: 0.4s;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.chatbot-suggestion-chip:hover {
|
|
551
|
+
background: #333;
|
|
552
|
+
border-color: ${primaryColor};
|
|
553
|
+
color: #fff;
|
|
554
|
+
transform: translateX(4px);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.chatbot-suggestion-icon {
|
|
558
|
+
color: ${primaryColor};
|
|
559
|
+
opacity: 0.7;
|
|
560
|
+
font-size: 16px;
|
|
561
|
+
flex-shrink: 0;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.chatbot-suggestions-skeleton {
|
|
565
|
+
display: flex;
|
|
566
|
+
flex-direction: column;
|
|
567
|
+
gap: 8px;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.chatbot-skeleton-chip {
|
|
571
|
+
height: 38px;
|
|
572
|
+
background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
|
|
573
|
+
background-size: 200% 100%;
|
|
574
|
+
animation: shimmer 1.5s infinite;
|
|
575
|
+
border-radius: 20px;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
@keyframes shimmer {
|
|
579
|
+
0% {
|
|
580
|
+
background-position: 200% 0;
|
|
581
|
+
}
|
|
582
|
+
100% {
|
|
583
|
+
background-position: -200% 0;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
461
587
|
@media (max-width: 480px) {
|
|
462
588
|
.chatbot-window {
|
|
463
589
|
width: calc(100vw - 40px);
|
|
@@ -467,9 +593,10 @@ export const ChatbotWidget = ({ apiUrl, apiKey, title = 'AI Assistant', subtitle
|
|
|
467
593
|
` }), !isOpen && (_jsx("button", { className: "chatbot-button", onClick: handleToggle, "aria-label": "Open chat", children: _jsx(MessageCircle, { size: 28 }) })), isOpen && (_jsxs("div", { className: "chatbot-window", children: [_jsxs("div", { className: "chatbot-header", children: [_jsxs("div", { className: "chatbot-header-content", children: [_jsx("div", { className: "chatbot-icon", children: _jsx(Sparkles, { size: 20 }) }), _jsxs("div", { className: "chatbot-title", children: [_jsx("h3", { children: title }), subtitle && _jsx("p", { children: subtitle })] })] }), _jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [messages.length > 0 && (_jsx("button", { className: "chatbot-close", onClick: handleReset, "aria-label": "Reset conversation", title: "Start new conversation", children: _jsx(RefreshCw, { size: 18 }) })), _jsx("button", { className: "chatbot-close", onClick: handleToggle, "aria-label": "Close chat", children: _jsx(X, { size: 20 }) })] })] }), _jsxs("div", { className: "chatbot-messages", ref: scrollRef, children: [messages.length === 0 ? (_jsxs("div", { className: "chatbot-welcome", children: [_jsx("div", { className: "chatbot-welcome-icon", children: _jsx(Bot, { size: 32 }) }), _jsx("h4", { style: { margin: '0 0 8px 0', color: '#ccc' }, children: brandName ? `Welcome to ${brandName}!` : 'Welcome!' }), _jsx("p", { style: { margin: 0, fontSize: '14px' }, children: welcomeMessage })] })) : (messages.map((message) => (_jsxs("div", { className: `chatbot-message ${message.role}`, children: [_jsx("div", { className: `chatbot-avatar ${message.role === 'user' ? 'user' : 'bot'}`, children: message.role === 'user' ? _jsx(User, { size: 18 }) : _jsx(Bot, { size: 18 }) }), _jsxs("div", { className: "chatbot-message-content", children: [_jsx("div", { className: `chatbot-bubble ${message.role === 'user' ? 'user' : 'bot'}`, children: message.content }), showSources && message.sources && message.sources.length > 0 && (_jsx("div", { className: "chatbot-sources", children: message.sources.map((source, idx) => (_jsxs("span", { className: "chatbot-source", children: [source.title, " (", Math.round(source.score * 100), "%)"] }, idx))) })), showTimestamps && (_jsx("div", { className: "chatbot-timestamp", children: new Date(message.timestamp).toLocaleTimeString([], {
|
|
468
594
|
hour: '2-digit',
|
|
469
595
|
minute: '2-digit',
|
|
470
|
-
}) }))] })] }, message.id)))), isLoading && showTypingIndicator && (_jsxs("div", { className: "chatbot-typing", children: [_jsx("div", { className: "chatbot-avatar bot", children: _jsx(Bot, { size: 18 }) }), _jsxs("div", { className: "chatbot-typing-dots", children: [_jsx("div", { className: "chatbot-typing-dot" }), _jsx("div", { className: "chatbot-typing-dot" }), _jsx("div", { className: "chatbot-typing-dot" })] })] }))] }), error && (_jsxs("div", { className: "chatbot-error", children: [_jsx("span", { children: "\u26A0\uFE0F" }), error] })), _jsxs("div", { className: "chatbot-input-area", children: [_jsx("div", { className: "chatbot-input-wrapper", children: _jsx("input", { type: "text", className: "chatbot-input", value: input, onChange: (e) => setInput(e.target.value), onKeyPress: handleKeyPress, placeholder: placeholder, disabled: isLoading }) }), _jsx("button", { className: "chatbot-button-icon", onClick:
|
|
596
|
+
}) }))] })] }, message.id)))), isLoading && showTypingIndicator && (_jsxs("div", { className: "chatbot-typing", children: [_jsx("div", { className: "chatbot-avatar bot", children: _jsx(Bot, { size: 18 }) }), _jsxs("div", { className: "chatbot-typing-dots", children: [_jsx("div", { className: "chatbot-typing-dot" }), _jsx("div", { className: "chatbot-typing-dot" }), _jsx("div", { className: "chatbot-typing-dot" })] })] }))] }), showSuggestedQuestions && messages.length === 0 && !isLoading && (_jsxs("div", { className: "chatbot-suggestions", children: [_jsx("div", { className: "chatbot-suggestions-title", children: "Suggested Questions" }), loadingSuggestions ? (_jsxs("div", { className: "chatbot-suggestions-skeleton", children: [_jsx("div", { className: "chatbot-skeleton-chip" }), _jsx("div", { className: "chatbot-skeleton-chip" }), _jsx("div", { className: "chatbot-skeleton-chip" }), _jsx("div", { className: "chatbot-skeleton-chip" })] })) : suggestions.length > 0 ? (suggestions.map((suggestion, idx) => (_jsxs("button", { className: "chatbot-suggestion-chip", onClick: () => handleSuggestionClick(suggestion), disabled: isLoading, children: [_jsx("span", { className: "chatbot-suggestion-icon", children: "\uD83D\uDCAC" }), suggestion] }, idx)))) : null] })), error && (_jsxs("div", { className: "chatbot-error", children: [_jsx("span", { children: "\u26A0\uFE0F" }), error] })), _jsxs("div", { className: "chatbot-input-area", children: [_jsx("div", { className: "chatbot-input-wrapper", children: _jsx("input", { type: "text", className: "chatbot-input", value: input, onChange: (e) => setInput(e.target.value), onKeyPress: handleKeyPress, placeholder: placeholder, disabled: isLoading }) }), _jsx("button", { className: "chatbot-button-icon", onClick: () => handleSendMessage(), disabled: !input.trim() || isLoading, "aria-label": "Send message", children: isLoading ? _jsx(Loader2, { size: 20, className: "spin" }) : _jsx(Send, { size: 20 }) })] })] })), _jsx("style", { children: `
|
|
471
597
|
.spin {
|
|
472
|
-
animation: spin 1s
|
|
598
|
+
animation: spin 1s linear infinite;
|
|
599
|
+
}
|
|
473
600
|
@keyframes spin {
|
|
474
601
|
from { transform: rotate(0deg); }
|
|
475
602
|
to { transform: rotate(360deg); }
|
package/dist/api.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export declare class ChatbotApiClient {
|
|
|
13
13
|
* Send a chat message to the API
|
|
14
14
|
*/
|
|
15
15
|
sendMessage(message: string): Promise<ChatApiResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Get suggested questions based on tenant's data
|
|
18
|
+
*/
|
|
19
|
+
getSuggestedQuestions(limit?: number): Promise<string[]>;
|
|
16
20
|
/**
|
|
17
21
|
* Get current session ID
|
|
18
22
|
*/
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AAE5D,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAuB;gBAE5B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAqB1C;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA6B5D;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,OAAO,CAAC,WAAW;CA2BpB"}
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AAE5D,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAuB;gBAE5B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAqB1C;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA6B5D;;OAEG;IACG,qBAAqB,CAAC,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAwBjE;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,OAAO,CAAC,WAAW;CA2BpB"}
|
package/dist/api.js
CHANGED
|
@@ -48,6 +48,28 @@ export class ChatbotApiClient {
|
|
|
48
48
|
throw this.handleError(error);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Get suggested questions based on tenant's data
|
|
53
|
+
*/
|
|
54
|
+
async getSuggestedQuestions(limit = 5) {
|
|
55
|
+
try {
|
|
56
|
+
const response = await this.client.get('/chat/suggestions', {
|
|
57
|
+
params: { limit }
|
|
58
|
+
});
|
|
59
|
+
if (!response.data.success || !response.data.data) {
|
|
60
|
+
throw new Error(response.data.error || 'Failed to get suggestions');
|
|
61
|
+
}
|
|
62
|
+
return response.data.data.questions;
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
// If suggestions endpoint doesn't exist or fails, return empty array
|
|
66
|
+
// This allows graceful degradation
|
|
67
|
+
if (axios.isAxiosError(error) && error.response?.status === 404) {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
throw this.handleError(error);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
51
73
|
/**
|
|
52
74
|
* Get current session ID
|
|
53
75
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
* Chatbot Widget Types
|
|
3
3
|
* Production-ready TypeScript definitions
|
|
4
4
|
*/
|
|
5
|
+
export interface SuggestedQuestion {
|
|
6
|
+
id: string;
|
|
7
|
+
question: string;
|
|
8
|
+
category?: string;
|
|
9
|
+
}
|
|
5
10
|
export interface ChatMessage {
|
|
6
11
|
id: string;
|
|
7
12
|
role: 'user' | 'assistant';
|
|
@@ -38,6 +43,12 @@ export interface ChatbotConfig {
|
|
|
38
43
|
showTimestamps?: boolean;
|
|
39
44
|
/** Enable/disable source citations */
|
|
40
45
|
showSources?: boolean;
|
|
46
|
+
/** Enable/disable suggested questions */
|
|
47
|
+
showSuggestedQuestions?: boolean;
|
|
48
|
+
/** Custom suggested questions (if not provided, fetched from API) */
|
|
49
|
+
suggestedQuestions?: SuggestedQuestion[];
|
|
50
|
+
/** Maximum number of suggested questions to show */
|
|
51
|
+
maxSuggestions?: number;
|
|
41
52
|
/** Maximum height of the chat window */
|
|
42
53
|
maxHeight?: string;
|
|
43
54
|
/** Maximum width of the chat window */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fyrebot-widget",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Production-ready AI chatbot popup widget by Fyrebot - Multi-tenant support with seamless React integration",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|
|
61
|
-
"url": "https://github.com/fyrebot
|
|
61
|
+
"url": "https://github.com/aasim-shah/fyrebot-widget"
|
|
62
62
|
},
|
|
63
63
|
"bugs": {
|
|
64
|
-
"url": "https://github.com/fyrebot
|
|
64
|
+
"url": "https://github.com/aasim-shah/fyrebot-widget/issues"
|
|
65
65
|
},
|
|
66
|
-
"homepage": "
|
|
66
|
+
"homepage": "http://167.172.17.109:3001"
|
|
67
67
|
}
|