@mordn/chat-widget 0.6.0 → 0.6.2
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -288,7 +288,7 @@ interface ChatWidgetProps extends ChatWidgetConfig {
|
|
|
288
288
|
*/
|
|
289
289
|
widgetId?: string;
|
|
290
290
|
}
|
|
291
|
-
declare function ChatWidget({ userId, conversationId, initialMessages, className, model, systemPrompt, temperature, theme, features, display, starterPrompts, onClose, headerActions, open, onOpenChange, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
291
|
+
declare function ChatWidget({ userId, conversationId, initialMessages, className, model, systemPrompt, temperature, theme, features, display, starterPrompts, onClose, headerActions, open, onOpenChange, inputPlugins, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
292
292
|
|
|
293
293
|
interface ChatTheme {
|
|
294
294
|
lightPrimary: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -288,7 +288,7 @@ interface ChatWidgetProps extends ChatWidgetConfig {
|
|
|
288
288
|
*/
|
|
289
289
|
widgetId?: string;
|
|
290
290
|
}
|
|
291
|
-
declare function ChatWidget({ userId, conversationId, initialMessages, className, model, systemPrompt, temperature, theme, features, display, starterPrompts, onClose, headerActions, open, onOpenChange, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
291
|
+
declare function ChatWidget({ userId, conversationId, initialMessages, className, model, systemPrompt, temperature, theme, features, display, starterPrompts, onClose, headerActions, open, onOpenChange, inputPlugins, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
292
292
|
|
|
293
293
|
interface ChatTheme {
|
|
294
294
|
lightPrimary: string;
|
package/dist/index.js
CHANGED
|
@@ -220,11 +220,13 @@ var import_lucide_react3 = require("lucide-react");
|
|
|
220
220
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
221
221
|
|
|
222
222
|
// src/ui/textarea.tsx
|
|
223
|
+
var React = __toESM(require("react"));
|
|
223
224
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
224
|
-
|
|
225
|
+
var Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
225
226
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
226
227
|
"textarea",
|
|
227
228
|
{
|
|
229
|
+
ref,
|
|
228
230
|
"data-slot": "textarea",
|
|
229
231
|
className: cn(
|
|
230
232
|
"border-input placeholder:text-muted-foreground focus-visible:border-ring aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-[14px] transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -233,7 +235,8 @@ function Textarea({ className, ...props }) {
|
|
|
233
235
|
...props
|
|
234
236
|
}
|
|
235
237
|
);
|
|
236
|
-
}
|
|
238
|
+
});
|
|
239
|
+
Textarea.displayName = "Textarea";
|
|
237
240
|
|
|
238
241
|
// src/components/prompt-input.tsx
|
|
239
242
|
var import_lucide_react4 = require("lucide-react");
|
|
@@ -2451,7 +2454,8 @@ function ChatWidget({
|
|
|
2451
2454
|
onClose,
|
|
2452
2455
|
headerActions,
|
|
2453
2456
|
open,
|
|
2454
|
-
onOpenChange
|
|
2457
|
+
onOpenChange,
|
|
2458
|
+
inputPlugins
|
|
2455
2459
|
}) {
|
|
2456
2460
|
const layout = display?.layout || "popup";
|
|
2457
2461
|
const isControlled = open !== void 0;
|
|
@@ -2526,8 +2530,9 @@ function ChatWidget({
|
|
|
2526
2530
|
temperature,
|
|
2527
2531
|
theme,
|
|
2528
2532
|
features,
|
|
2529
|
-
starterPrompts
|
|
2530
|
-
|
|
2533
|
+
starterPrompts,
|
|
2534
|
+
inputPlugins
|
|
2535
|
+
}), [userId, model, systemPrompt, temperature, theme, features, starterPrompts, inputPlugins]);
|
|
2531
2536
|
const togglePosition = display?.toggleButtonPosition || { bottom: "24px", right: "24px" };
|
|
2532
2537
|
const themeClass = theme?.mode === "dark" ? "dark" : "";
|
|
2533
2538
|
if (layout === "inline") {
|
|
@@ -2934,9 +2939,9 @@ function useChatTheme() {
|
|
|
2934
2939
|
}
|
|
2935
2940
|
|
|
2936
2941
|
// src/ui/input.tsx
|
|
2937
|
-
var
|
|
2942
|
+
var React3 = __toESM(require("react"));
|
|
2938
2943
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2939
|
-
var Input =
|
|
2944
|
+
var Input = React3.forwardRef(
|
|
2940
2945
|
({ className, type, ...props }, ref) => {
|
|
2941
2946
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2942
2947
|
"input",
|