@tinkrapp/widget 1.0.0 → 1.0.1
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/course-ai-widget.global.js +80 -80
- package/dist/course-ai-widget.global.js.map +1 -1
- package/dist/react.cjs +23 -23
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +23 -23
- package/dist/react.js.map +1 -1
- package/package.json +79 -2
package/dist/react.cjs
CHANGED
|
@@ -2499,6 +2499,27 @@ function useChat() {
|
|
|
2499
2499
|
canSubmit: isReady && !isLoading && input.trim().length > 0
|
|
2500
2500
|
};
|
|
2501
2501
|
}
|
|
2502
|
+
var ThreadListItem = () => {
|
|
2503
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Root, { className: "group relative flex items-center gap-2 px-2 py-1.5 hover:bg-muted/50 data-[active]:bg-muted cursor-pointer transition-colors rounded-sm", children: /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Title, { fallback: "New Chat" }) }) }) });
|
|
2504
|
+
};
|
|
2505
|
+
var ChatHistoryPopover = ({
|
|
2506
|
+
onSelectThread
|
|
2507
|
+
}) => {
|
|
2508
|
+
const handleThreadSelect = () => {
|
|
2509
|
+
onSelectThread?.();
|
|
2510
|
+
};
|
|
2511
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", onClick: handleThreadSelect, children: [
|
|
2512
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", style: { color: "hsl(var(--muted-foreground))" }, children: "Previous 7 days" }) }),
|
|
2513
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[300px] overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2514
|
+
react.ThreadListPrimitive.Items,
|
|
2515
|
+
{
|
|
2516
|
+
components: {
|
|
2517
|
+
ThreadListItem
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
) })
|
|
2521
|
+
] });
|
|
2522
|
+
};
|
|
2502
2523
|
function Dialog({
|
|
2503
2524
|
...props
|
|
2504
2525
|
}) {
|
|
@@ -4287,7 +4308,7 @@ var ThreadList = () => {
|
|
|
4287
4308
|
react.ThreadListPrimitive.Items,
|
|
4288
4309
|
{
|
|
4289
4310
|
components: {
|
|
4290
|
-
ThreadListItem
|
|
4311
|
+
ThreadListItem: ThreadListItem2
|
|
4291
4312
|
}
|
|
4292
4313
|
}
|
|
4293
4314
|
),
|
|
@@ -4304,7 +4325,7 @@ var ThreadList = () => {
|
|
|
4304
4325
|
] })
|
|
4305
4326
|
] });
|
|
4306
4327
|
};
|
|
4307
|
-
var
|
|
4328
|
+
var ThreadListItem2 = () => {
|
|
4308
4329
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.ThreadListItemPrimitive.Root, { className: "aui-thread-list-item group relative flex items-center gap-2 px-3 py-2 hover:bg-muted/50 data-[active]:bg-muted cursor-pointer transition-colors", children: [
|
|
4309
4330
|
/* @__PURE__ */ jsxRuntime.jsxs(react.ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: [
|
|
4310
4331
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquareIcon, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" }),
|
|
@@ -4501,27 +4522,6 @@ var ChatWidget = ({
|
|
|
4501
4522
|
] }) })
|
|
4502
4523
|
] });
|
|
4503
4524
|
};
|
|
4504
|
-
var ThreadListItem2 = () => {
|
|
4505
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Root, { className: "group relative flex items-center gap-2 px-2 py-1.5 hover:bg-muted/50 data-[active]:bg-muted cursor-pointer transition-colors rounded-sm", children: /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(react.ThreadListItemPrimitive.Title, { fallback: "New Chat" }) }) }) });
|
|
4506
|
-
};
|
|
4507
|
-
var ChatHistoryPopover = ({
|
|
4508
|
-
onSelectThread
|
|
4509
|
-
}) => {
|
|
4510
|
-
const handleThreadSelect = () => {
|
|
4511
|
-
onSelectThread?.();
|
|
4512
|
-
};
|
|
4513
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", onClick: handleThreadSelect, children: [
|
|
4514
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", style: { color: "hsl(var(--muted-foreground))" }, children: "Previous 7 days" }) }),
|
|
4515
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[300px] overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4516
|
-
react.ThreadListPrimitive.Items,
|
|
4517
|
-
{
|
|
4518
|
-
components: {
|
|
4519
|
-
ThreadListItem: ThreadListItem2
|
|
4520
|
-
}
|
|
4521
|
-
}
|
|
4522
|
-
) })
|
|
4523
|
-
] });
|
|
4524
|
-
};
|
|
4525
4525
|
var layoutOptions = [
|
|
4526
4526
|
{
|
|
4527
4527
|
value: "sidebar",
|