@admin-layout/tailwind-ui 12.2.4-alpha.46 → 12.2.4-alpha.51

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.
@@ -4,7 +4,7 @@ import {jsx}from'react/jsx-runtime';import*as React from'react';import {cn}from'
4
4
  }) {
5
5
  return jsx("div", {
6
6
  role: "toolbar",
7
- className: cn('flex w-full flex-row items-center gap-2 rounded-xl border border-slate-800/90 bg-slate-950 p-2 text-slate-50 shadow-sm', className),
7
+ className: cn('flex w-full flex-row items-center gap-2 rounded-xl border border-border bg-background p-2 text-foreground shadow-sm', className),
8
8
  ...props
9
9
  });
10
10
  }
@@ -41,7 +41,7 @@ const AIToolbarInputSurface = React.forwardRef(function AIToolbarInputSurface({
41
41
  }, ref) {
42
42
  return jsx("div", {
43
43
  ref: ref,
44
- className: cn('flex min-h-9 min-w-0 flex-1 items-center rounded-full border-0 bg-slate-900 px-3 py-0.5 shadow-inner outline-none ring-0 focus-visible:outline-none focus-visible:ring-0', className),
44
+ className: cn('flex min-h-9 min-w-0 flex-1 items-center rounded-full border border-input bg-muted px-3 py-0.5 shadow-inner outline-none ring-0 focus-visible:outline-none focus-visible:ring-0', className),
45
45
  ...props
46
46
  });
47
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AIToolbarPrimitives.js","sources":["../../../../src/components/AIToolbar/components/AIToolbarPrimitives.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"wGAkBM;AAEN,EAAA,SAAA;AAIA,EAAA,GAAA;AAIA,CAAA,EAAA;AAIA,EAAA,OAAMA;AAEN,IAAA,IAAA,EAAA,SAAO;AAeP,IAAA,sIAA8E,EAAA,SAAA,CAAA;IAC1E,GAAA;GACF,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"AIToolbarPrimitives.js","sources":["../../../../src/components/AIToolbar/components/AIToolbarPrimitives.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"wGAkBM;AAEN,EAAA,SAAA;AAIA,EAAA,GAAA;AAIA,CAAA,EAAA;AAIA,EAAA,OAAMA;AAEN,IAAA,IAAA,EAAA,SAAO;AAeP,IAAA,mIAA8E,EAAA,SAAA,CAAA;IAC1E,GAAA;GACF,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -37,7 +37,7 @@ const COMPONENTS = {
37
37
  };
38
38
  return jsx("a", {
39
39
  href: href,
40
- className: "text-gray-600 underline underline-offset-2 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-100 cursor-pointer",
40
+ className: "cursor-pointer text-primary underline underline-offset-2 hover:text-primary/80",
41
41
  onClick: handleClick,
42
42
  ...props,
43
43
  children: children
@@ -43,14 +43,14 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {MicIcon,InfoIcon}from'
43
43
  children: [jsx("div", {
44
44
  className: "mb-1 font-semibold text-orange-600",
45
45
  children: "Speech Provider Configuration Required"
46
- }), jsx("p", {
46
+ }), jsx("div", {
47
47
  className: "text-muted-foreground",
48
48
  children: !speechProviderStatus ? jsxs(Fragment, {
49
49
  children: [jsxs("div", {
50
50
  className: "mt-2 flex flex-row items-center gap-1 text-orange-600",
51
51
  children: [jsx(InfoIcon, {
52
52
  size: 16
53
- }), selectedSttProvider.provider ? null : jsx("p", {
53
+ }), selectedSttProvider.provider ? null : jsx("span", {
54
54
  children: "PROVIDER IS MISSING"
55
55
  })]
56
56
  }), jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/completion/Input.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,eAAO,MAAM,KAAK,GAAI,sTAsBnB,mBAAmB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,4CAkO7C,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/completion/Input.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,eAAO,MAAM,KAAK,GAAI,sTAsBnB,mBAAmB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,4CAuP7C,CAAC"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIToolbarInputSurface}from'../AIToolbarPrimitives.js';import {XIcon,Loader2}from'lucide-react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import {Input as Input$1}from'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import {Popover,PopoverContent,PopoverTrigger}from'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import'../../../../shardui/scroll-area.js';import'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import {Switch}from'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';import {Markdown}from'../Markdown/index.js';import {AssistantMessageActions}from'./AssistantMessageActions.js';import {CopyButton}from'../Markdown/copy-button.js';import {MessageHistory}from'./MessageHistory.js';const Input = ({
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {useRef,useMemo,useLayoutEffect}from'react';import {AIToolbarInputSurface}from'../AIToolbarPrimitives.js';import {XIcon,Loader2}from'lucide-react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import {Input as Input$1}from'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import {Popover,PopoverContent,PopoverTrigger}from'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import'../../../../shardui/scroll-area.js';import'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import {Switch}from'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';import {Markdown}from'../Markdown/index.js';import {AssistantMessageActions}from'./AssistantMessageActions.js';import {CopyButton}from'../Markdown/copy-button.js';import {MessageHistory}from'./MessageHistory.js';const Input = ({
2
2
  isPopoverOpen,
3
3
  isLoading,
4
4
  reset,
@@ -21,6 +21,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
21
21
  setKeepEngaged,
22
22
  regenerateAssistantMessage
23
23
  }) => {
24
+ const conversationEndRef = useRef(null);
24
25
  const sortedAsc = useMemo(() => [...conversationHistory].sort((a, b) => (a.timestamp ?? 0) - (b.timestamp ?? 0)), [conversationHistory]);
25
26
  /** In-flight assistant bubble: hide when history already contains the same assistant text (avoids double render if `response` lingers). */
26
27
  const streamingAssistantVisible = useMemo(() => {
@@ -32,6 +33,23 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
32
33
  }
33
34
  return true;
34
35
  }, [isLoading, response, sortedAsc]);
36
+ /** Keep the latest assistant stream and new turns in view inside the popover scroll viewport. */
37
+ useLayoutEffect(() => {
38
+ if (!isPopoverOpen) return;
39
+ const anchor = conversationEndRef.current;
40
+ if (!anchor || !scrollAreaRef.current) return;
41
+ const scrollToEnd = () => {
42
+ anchor.scrollIntoView({
43
+ block: 'end',
44
+ behavior: 'auto',
45
+ inline: 'nearest'
46
+ });
47
+ };
48
+ const outer = requestAnimationFrame(() => {
49
+ requestAnimationFrame(scrollToEnd);
50
+ });
51
+ return () => cancelAnimationFrame(outer);
52
+ }, [isPopoverOpen, sortedAsc, response, isLoading, error, streamingAssistantVisible]);
35
53
  const copyPayload = useMemo(() => {
36
54
  const lines = sortedAsc.map(m => m.role === 'user' ? `You:\n${m.content}` : `AI:\n${m.content}`);
37
55
  const last = sortedAsc[sortedAsc.length - 1];
@@ -53,8 +71,13 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
53
71
  align: "center",
54
72
  side: "top",
55
73
  sideOffset: 8,
56
- collisionPadding: 12,
57
- className: "z-[200] flex h-[min(90vh,calc(100dvh-1rem))] w-screen max-w-[min(100vw,48rem)] flex-col overflow-hidden border bg-popover p-0 text-popover-foreground shadow-lg",
74
+ collisionPadding: {
75
+ top: 8,
76
+ bottom: 8,
77
+ left: 8,
78
+ right: 8
79
+ },
80
+ className: cn('z-[200] flex h-[min(90vh,calc(100dvh-1rem))] flex-col overflow-hidden border bg-popover p-0 text-popover-foreground shadow-lg', 'w-[calc(100vw-16px)] max-w-[calc(100vw-16px)] min-w-0 rounded-md'),
58
81
  children: [jsxs("div", {
59
82
  className: "flex shrink-0 items-center justify-between border-b bg-muted/30 px-4 py-2",
60
83
  children: [jsxs("div", {
@@ -118,7 +141,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
118
141
  }) : null, sortedAsc.map(msg => jsx("div", {
119
142
  className: cn('flex w-full', msg.role === 'user' ? 'justify-end' : 'justify-start'),
120
143
  children: jsxs("div", {
121
- className: cn('max-w-[min(100%,40rem)] rounded-xl px-3 py-2 text-sm shadow-sm', msg.role === 'user' ? 'border border-primary/25 bg-primary/15 text-foreground' : 'border border-border/60 bg-muted/70'),
144
+ className: cn('rounded-xl px-3 py-2 text-sm shadow-sm', msg.role === 'user' ? 'max-w-[min(100%,40rem)] border border-border/60 bg-muted/70 text-foreground' : 'w-full min-w-0 max-w-full border border-border/60 bg-muted/70'),
122
145
  children: [jsxs("div", {
123
146
  className: "mb-1.5 flex items-center gap-2",
124
147
  children: [jsx("span", {
@@ -142,7 +165,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
142
165
  }, msg.id)), streamingAssistantVisible ? jsx("div", {
143
166
  className: "flex w-full justify-start",
144
167
  children: jsxs("div", {
145
- className: "max-w-[min(100%,40rem)] rounded-xl border border-border/60 bg-muted/70 px-3 py-2 text-sm shadow-sm",
168
+ className: "w-full min-w-0 max-w-full rounded-xl border border-border/60 bg-muted/70 px-3 py-2 text-sm shadow-sm",
146
169
  children: [jsxs("div", {
147
170
  className: "mb-1.5 flex items-center gap-2",
148
171
  children: [jsx("span", {
@@ -164,7 +187,11 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo}from'react';import {AIT
164
187
  }
165
188
  }) : null]
166
189
  })
167
- }) : null]
190
+ }) : null, jsx("div", {
191
+ ref: conversationEndRef,
192
+ className: "h-0 w-full shrink-0",
193
+ "aria-hidden": true
194
+ })]
168
195
  })
169
196
  })]
170
197
  }), jsx(PopoverTrigger, {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/tailwind-ui",
3
- "version": "12.2.4-alpha.46",
3
+ "version": "12.2.4-alpha.51",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -29,7 +29,7 @@
29
29
  "watch": "npm run build:lib:watch"
30
30
  },
31
31
  "dependencies": {
32
- "@admin-layout/client": "12.2.4-alpha.46",
32
+ "@admin-layout/client": "12.2.4-alpha.49",
33
33
  "@radix-ui/react-accordion": "^1.2.0",
34
34
  "@radix-ui/react-alert-dialog": "^1.1.1",
35
35
  "@radix-ui/react-aspect-ratio": "^1.1.0",
@@ -96,5 +96,5 @@
96
96
  "typescript": {
97
97
  "definition": "lib/index.d.ts"
98
98
  },
99
- "gitHead": "244974088e07688363f073121b72c13d05490518"
99
+ "gitHead": "4a87359a41b6211aa022668844ab1dd2249c689b"
100
100
  }