@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/react.d.cts CHANGED
@@ -43,7 +43,7 @@ declare function useChat(): {
43
43
 
44
44
  interface WidgetContainerProps {
45
45
  defaultOpen?: boolean;
46
- position?: "bottom-right" | "bottom-left";
46
+ position?: 'bottom-right' | 'bottom-left';
47
47
  }
48
48
  declare function WidgetContainer({ defaultOpen, position, }: WidgetContainerProps): react_jsx_runtime.JSX.Element;
49
49
 
package/dist/react.d.ts CHANGED
@@ -43,7 +43,7 @@ declare function useChat(): {
43
43
 
44
44
  interface WidgetContainerProps {
45
45
  defaultOpen?: boolean;
46
- position?: "bottom-right" | "bottom-left";
46
+ position?: 'bottom-right' | 'bottom-left';
47
47
  }
48
48
  declare function WidgetContainer({ defaultOpen, position, }: WidgetContainerProps): react_jsx_runtime.JSX.Element;
49
49
 
package/dist/react.js CHANGED
@@ -2469,6 +2469,27 @@ function useChat() {
2469
2469
  canSubmit: isReady && !isLoading && input.trim().length > 0
2470
2470
  };
2471
2471
  }
2472
+ var ThreadListItem = () => {
2473
+ return /* @__PURE__ */ jsx(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__ */ jsx(ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: /* @__PURE__ */ jsx("span", { className: "truncate text-sm text-foreground", children: /* @__PURE__ */ jsx(ThreadListItemPrimitive.Title, { fallback: "New Chat" }) }) }) });
2474
+ };
2475
+ var ChatHistoryPopover = ({
2476
+ onSelectThread
2477
+ }) => {
2478
+ const handleThreadSelect = () => {
2479
+ onSelectThread?.();
2480
+ };
2481
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", onClick: handleThreadSelect, children: [
2482
+ /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ jsx(Text, { size: "xs", style: { color: "hsl(var(--muted-foreground))" }, children: "Previous 7 days" }) }),
2483
+ /* @__PURE__ */ jsx("div", { className: "max-h-[300px] overflow-y-auto", children: /* @__PURE__ */ jsx(
2484
+ ThreadListPrimitive.Items,
2485
+ {
2486
+ components: {
2487
+ ThreadListItem
2488
+ }
2489
+ }
2490
+ ) })
2491
+ ] });
2492
+ };
2472
2493
  function Dialog({
2473
2494
  ...props
2474
2495
  }) {
@@ -4257,7 +4278,7 @@ var ThreadList = () => {
4257
4278
  ThreadListPrimitive.Items,
4258
4279
  {
4259
4280
  components: {
4260
- ThreadListItem
4281
+ ThreadListItem: ThreadListItem2
4261
4282
  }
4262
4283
  }
4263
4284
  ),
@@ -4274,7 +4295,7 @@ var ThreadList = () => {
4274
4295
  ] })
4275
4296
  ] });
4276
4297
  };
4277
- var ThreadListItem = () => {
4298
+ var ThreadListItem2 = () => {
4278
4299
  return /* @__PURE__ */ jsxs(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: [
4279
4300
  /* @__PURE__ */ jsxs(ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: [
4280
4301
  /* @__PURE__ */ jsx(MessageSquareIcon, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" }),
@@ -4471,27 +4492,6 @@ var ChatWidget = ({
4471
4492
  ] }) })
4472
4493
  ] });
4473
4494
  };
4474
- var ThreadListItem2 = () => {
4475
- return /* @__PURE__ */ jsx(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__ */ jsx(ThreadListItemPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 min-w-0", children: /* @__PURE__ */ jsx("span", { className: "truncate text-sm text-foreground", children: /* @__PURE__ */ jsx(ThreadListItemPrimitive.Title, { fallback: "New Chat" }) }) }) });
4476
- };
4477
- var ChatHistoryPopover = ({
4478
- onSelectThread
4479
- }) => {
4480
- const handleThreadSelect = () => {
4481
- onSelectThread?.();
4482
- };
4483
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", onClick: handleThreadSelect, children: [
4484
- /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ jsx(Text, { size: "xs", style: { color: "hsl(var(--muted-foreground))" }, children: "Previous 7 days" }) }),
4485
- /* @__PURE__ */ jsx("div", { className: "max-h-[300px] overflow-y-auto", children: /* @__PURE__ */ jsx(
4486
- ThreadListPrimitive.Items,
4487
- {
4488
- components: {
4489
- ThreadListItem: ThreadListItem2
4490
- }
4491
- }
4492
- ) })
4493
- ] });
4494
- };
4495
4495
  var layoutOptions = [
4496
4496
  {
4497
4497
  value: "sidebar",