@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.mjs
CHANGED
|
@@ -171,11 +171,13 @@ import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-
|
|
|
171
171
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
172
172
|
|
|
173
173
|
// src/ui/textarea.tsx
|
|
174
|
+
import * as React from "react";
|
|
174
175
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
175
|
-
|
|
176
|
+
var Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
176
177
|
return /* @__PURE__ */ jsx7(
|
|
177
178
|
"textarea",
|
|
178
179
|
{
|
|
180
|
+
ref,
|
|
179
181
|
"data-slot": "textarea",
|
|
180
182
|
className: cn(
|
|
181
183
|
"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",
|
|
@@ -184,7 +186,8 @@ function Textarea({ className, ...props }) {
|
|
|
184
186
|
...props
|
|
185
187
|
}
|
|
186
188
|
);
|
|
187
|
-
}
|
|
189
|
+
});
|
|
190
|
+
Textarea.displayName = "Textarea";
|
|
188
191
|
|
|
189
192
|
// src/components/prompt-input.tsx
|
|
190
193
|
import {
|
|
@@ -197,7 +200,7 @@ import {
|
|
|
197
200
|
XIcon
|
|
198
201
|
} from "lucide-react";
|
|
199
202
|
import { nanoid } from "nanoid";
|
|
200
|
-
import
|
|
203
|
+
import React2, {
|
|
201
204
|
Children,
|
|
202
205
|
createContext,
|
|
203
206
|
Fragment as Fragment2,
|
|
@@ -509,7 +512,7 @@ var PromptInputBody = ({
|
|
|
509
512
|
className,
|
|
510
513
|
...props
|
|
511
514
|
}) => /* @__PURE__ */ jsx8("div", { className: cn(className, "flex flex-col"), ...props });
|
|
512
|
-
var PromptInputTextarea =
|
|
515
|
+
var PromptInputTextarea = React2.forwardRef(({
|
|
513
516
|
onChange,
|
|
514
517
|
onKeyDown: externalOnKeyDown,
|
|
515
518
|
className,
|
|
@@ -2431,7 +2434,8 @@ function ChatWidget({
|
|
|
2431
2434
|
onClose,
|
|
2432
2435
|
headerActions,
|
|
2433
2436
|
open,
|
|
2434
|
-
onOpenChange
|
|
2437
|
+
onOpenChange,
|
|
2438
|
+
inputPlugins
|
|
2435
2439
|
}) {
|
|
2436
2440
|
const layout = display?.layout || "popup";
|
|
2437
2441
|
const isControlled = open !== void 0;
|
|
@@ -2506,8 +2510,9 @@ function ChatWidget({
|
|
|
2506
2510
|
temperature,
|
|
2507
2511
|
theme,
|
|
2508
2512
|
features,
|
|
2509
|
-
starterPrompts
|
|
2510
|
-
|
|
2513
|
+
starterPrompts,
|
|
2514
|
+
inputPlugins
|
|
2515
|
+
}), [userId, model, systemPrompt, temperature, theme, features, starterPrompts, inputPlugins]);
|
|
2511
2516
|
const togglePosition = display?.toggleButtonPosition || { bottom: "24px", right: "24px" };
|
|
2512
2517
|
const themeClass = theme?.mode === "dark" ? "dark" : "";
|
|
2513
2518
|
if (layout === "inline") {
|
|
@@ -2914,9 +2919,9 @@ function useChatTheme() {
|
|
|
2914
2919
|
}
|
|
2915
2920
|
|
|
2916
2921
|
// src/ui/input.tsx
|
|
2917
|
-
import * as
|
|
2922
|
+
import * as React3 from "react";
|
|
2918
2923
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2919
|
-
var Input =
|
|
2924
|
+
var Input = React3.forwardRef(
|
|
2920
2925
|
({ className, type, ...props }, ref) => {
|
|
2921
2926
|
return /* @__PURE__ */ jsx23(
|
|
2922
2927
|
"input",
|