dp-widgets-framework 1.4.7 → 1.4.8
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/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -39221,9 +39221,9 @@ function CopilotKitChatbot({ widget, showHeader, styles, onResetReady, widgetIds
|
|
|
39221
39221
|
handleSubmit(e);
|
|
39222
39222
|
}
|
|
39223
39223
|
};
|
|
39224
|
-
return (jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full"), children: [showHeader && (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between pb-2 border-b", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Bot, { className: "h-4 w-4" }), jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: widget.title })] }) })), jsxRuntimeExports.jsxs("div", { className: "flex-1 h-full flex flex-col", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: chatMessages.length === 0 ? (jsxRuntimeExports.jsx("div", { className: "text-center text-gray-500 text-xs mt-8", children: ((_b = widget.config) === null || _b === void 0 ? void 0 : _b.copilotInitialMessage) || ((_c = widget.config) === null || _c === void 0 ? void 0 : _c.placeholder) || "How can I help you today?" })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [chatMessages.map((message) => (jsxRuntimeExports.jsx("div", { className: cn("flex", message.role === "user" ? "justify-end" : "justify-start"), children: jsxRuntimeExports.jsxs("div", { className: cn("max-w-[80%] rounded-lg px-4 py-2 text-
|
|
39224
|
+
return (jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full"), children: [showHeader && (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between pb-2 border-b", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Bot, { className: "h-4 w-4" }), jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: widget.title })] }) })), jsxRuntimeExports.jsxs("div", { className: "flex-1 h-full flex flex-col", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: chatMessages.length === 0 ? (jsxRuntimeExports.jsx("div", { className: "text-center text-gray-500 text-xs mt-8", children: ((_b = widget.config) === null || _b === void 0 ? void 0 : _b.copilotInitialMessage) || ((_c = widget.config) === null || _c === void 0 ? void 0 : _c.placeholder) || "How can I help you today?" })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [chatMessages.map((message) => (jsxRuntimeExports.jsx("div", { className: cn("flex", message.role === "user" ? "justify-end" : "justify-start"), children: jsxRuntimeExports.jsxs("div", { className: cn("max-w-[80%] rounded-lg px-4 py-2 text-sm", message.role === "user"
|
|
39225
39225
|
? "bg-primary-500 text-white"
|
|
39226
|
-
: "bg-gray-100 text-gray-900"), children: [jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap", children: jsxRuntimeExports.jsx(Markdown, { children: message.content }) }), message.createdAt && (jsxRuntimeExports.jsx("div", { className: cn("text-[10px] mt-1", message.role === "user" ? "text-primary-100" : "text-gray-500"), children: new Date(message.createdAt).toLocaleTimeString() }))] }) }, message.id))), isLoading && (jsxRuntimeExports.jsx("div", { className: "flex justify-start", children: jsxRuntimeExports.jsx("div", { className: "bg-gray-100 rounded-lg px-4 py-2 text-xs", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex space-x-1", children: [jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '0ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '150ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '300ms' } })] }), jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Thinking..." })] }) }) })), jsxRuntimeExports.jsx("div", { ref: messagesEndRef })] })) }), jsxRuntimeExports.jsx("form", { onSubmit: handleSubmit, className: "border-t border-slate-200 p-4", children: jsxRuntimeExports.jsxs("div", { className: "flex gap-2 relative", children: [jsxRuntimeExports.jsx("textarea", { value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder: ((_d = widget.config) === null || _d === void 0 ? void 0 : _d.placeholder) || "Type a message...", className: "resize-none h-20 overflow-y-auto flex-1 px-3 py-2 text-
|
|
39226
|
+
: "bg-gray-100 text-gray-900"), children: [jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap", children: jsxRuntimeExports.jsx(Markdown, { children: message.content }) }), message.createdAt && (jsxRuntimeExports.jsx("div", { className: cn("text-[10px] mt-1", message.role === "user" ? "text-primary-100" : "text-gray-500"), children: new Date(message.createdAt).toLocaleTimeString() }))] }) }, message.id))), isLoading && (jsxRuntimeExports.jsx("div", { className: "flex justify-start", children: jsxRuntimeExports.jsx("div", { className: "bg-gray-100 rounded-lg px-4 py-2 text-xs", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex space-x-1", children: [jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '0ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '150ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '300ms' } })] }), jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Thinking..." })] }) }) })), jsxRuntimeExports.jsx("div", { ref: messagesEndRef })] })) }), jsxRuntimeExports.jsx("form", { onSubmit: handleSubmit, className: "border-t border-slate-200 p-4", children: jsxRuntimeExports.jsxs("div", { className: "flex gap-2 relative", children: [jsxRuntimeExports.jsx("textarea", { value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder: ((_d = widget.config) === null || _d === void 0 ? void 0 : _d.placeholder) || "Type a message...", className: "resize-none h-20 overflow-y-auto flex-1 px-3 py-2 text-sm border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500" }), jsxRuntimeExports.jsx("button", { type: "submit", disabled: !inputValue.trim(), className: cn("absolute bottom-0 right-0 p-2 rounded-lg text-white flex items-center justify-center bg-transparent"), children: jsxRuntimeExports.jsx(Send, { className: cn("h-5 w-5", inputValue.trim()
|
|
39227
39227
|
? "text-primary-600"
|
|
39228
39228
|
: "text-gray-600 cursor-not-allowed") }) })] }) })] })] }));
|
|
39229
39229
|
}
|
package/dist/index.js
CHANGED
|
@@ -39248,9 +39248,9 @@ function CopilotKitChatbot({ widget, showHeader, styles, onResetReady, widgetIds
|
|
|
39248
39248
|
handleSubmit(e);
|
|
39249
39249
|
}
|
|
39250
39250
|
};
|
|
39251
|
-
return (jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full"), children: [showHeader && (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between pb-2 border-b", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(lucideReact.Bot, { className: "h-4 w-4" }), jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: widget.title })] }) })), jsxRuntimeExports.jsxs("div", { className: "flex-1 h-full flex flex-col", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: chatMessages.length === 0 ? (jsxRuntimeExports.jsx("div", { className: "text-center text-gray-500 text-xs mt-8", children: ((_b = widget.config) === null || _b === void 0 ? void 0 : _b.copilotInitialMessage) || ((_c = widget.config) === null || _c === void 0 ? void 0 : _c.placeholder) || "How can I help you today?" })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [chatMessages.map((message) => (jsxRuntimeExports.jsx("div", { className: cn("flex", message.role === "user" ? "justify-end" : "justify-start"), children: jsxRuntimeExports.jsxs("div", { className: cn("max-w-[80%] rounded-lg px-4 py-2 text-
|
|
39251
|
+
return (jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full"), children: [showHeader && (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between pb-2 border-b", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(lucideReact.Bot, { className: "h-4 w-4" }), jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: widget.title })] }) })), jsxRuntimeExports.jsxs("div", { className: "flex-1 h-full flex flex-col", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: chatMessages.length === 0 ? (jsxRuntimeExports.jsx("div", { className: "text-center text-gray-500 text-xs mt-8", children: ((_b = widget.config) === null || _b === void 0 ? void 0 : _b.copilotInitialMessage) || ((_c = widget.config) === null || _c === void 0 ? void 0 : _c.placeholder) || "How can I help you today?" })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [chatMessages.map((message) => (jsxRuntimeExports.jsx("div", { className: cn("flex", message.role === "user" ? "justify-end" : "justify-start"), children: jsxRuntimeExports.jsxs("div", { className: cn("max-w-[80%] rounded-lg px-4 py-2 text-sm", message.role === "user"
|
|
39252
39252
|
? "bg-primary-500 text-white"
|
|
39253
|
-
: "bg-gray-100 text-gray-900"), children: [jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap", children: jsxRuntimeExports.jsx(Markdown, { children: message.content }) }), message.createdAt && (jsxRuntimeExports.jsx("div", { className: cn("text-[10px] mt-1", message.role === "user" ? "text-primary-100" : "text-gray-500"), children: new Date(message.createdAt).toLocaleTimeString() }))] }) }, message.id))), isLoading && (jsxRuntimeExports.jsx("div", { className: "flex justify-start", children: jsxRuntimeExports.jsx("div", { className: "bg-gray-100 rounded-lg px-4 py-2 text-xs", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex space-x-1", children: [jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '0ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '150ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '300ms' } })] }), jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Thinking..." })] }) }) })), jsxRuntimeExports.jsx("div", { ref: messagesEndRef })] })) }), jsxRuntimeExports.jsx("form", { onSubmit: handleSubmit, className: "border-t border-slate-200 p-4", children: jsxRuntimeExports.jsxs("div", { className: "flex gap-2 relative", children: [jsxRuntimeExports.jsx("textarea", { value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder: ((_d = widget.config) === null || _d === void 0 ? void 0 : _d.placeholder) || "Type a message...", className: "resize-none h-20 overflow-y-auto flex-1 px-3 py-2 text-
|
|
39253
|
+
: "bg-gray-100 text-gray-900"), children: [jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap", children: jsxRuntimeExports.jsx(Markdown, { children: message.content }) }), message.createdAt && (jsxRuntimeExports.jsx("div", { className: cn("text-[10px] mt-1", message.role === "user" ? "text-primary-100" : "text-gray-500"), children: new Date(message.createdAt).toLocaleTimeString() }))] }) }, message.id))), isLoading && (jsxRuntimeExports.jsx("div", { className: "flex justify-start", children: jsxRuntimeExports.jsx("div", { className: "bg-gray-100 rounded-lg px-4 py-2 text-xs", children: jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex space-x-1", children: [jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '0ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '150ms' } }), jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-gray-400 rounded-full animate-bounce", style: { animationDelay: '300ms' } })] }), jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Thinking..." })] }) }) })), jsxRuntimeExports.jsx("div", { ref: messagesEndRef })] })) }), jsxRuntimeExports.jsx("form", { onSubmit: handleSubmit, className: "border-t border-slate-200 p-4", children: jsxRuntimeExports.jsxs("div", { className: "flex gap-2 relative", children: [jsxRuntimeExports.jsx("textarea", { value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder: ((_d = widget.config) === null || _d === void 0 ? void 0 : _d.placeholder) || "Type a message...", className: "resize-none h-20 overflow-y-auto flex-1 px-3 py-2 text-sm border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500" }), jsxRuntimeExports.jsx("button", { type: "submit", disabled: !inputValue.trim(), className: cn("absolute bottom-0 right-0 p-2 rounded-lg text-white flex items-center justify-center bg-transparent"), children: jsxRuntimeExports.jsx(lucideReact.Send, { className: cn("h-5 w-5", inputValue.trim()
|
|
39254
39254
|
? "text-primary-600"
|
|
39255
39255
|
: "text-gray-600 cursor-not-allowed") }) })] }) })] })] }));
|
|
39256
39256
|
}
|