@windrun-huaiin/third-ui 5.11.2 → 5.11.3
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/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef } from 'react'
|
|
4
|
+
import { cn } from '@lib/utils'
|
|
4
5
|
|
|
5
6
|
interface AIPromptTextareaProps {
|
|
6
7
|
/**
|
|
@@ -142,6 +143,7 @@ export function AIPromptTextarea({
|
|
|
142
143
|
adjustTextareaHeight()
|
|
143
144
|
}, 0)
|
|
144
145
|
return () => clearTimeout(timer)
|
|
146
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
145
147
|
}, [value, minHeight, maxHeight, autoScroll, extraScrollSpace])
|
|
146
148
|
|
|
147
149
|
// handle input, limit max words
|
|
@@ -207,7 +209,13 @@ export function AIPromptTextarea({
|
|
|
207
209
|
onPaste={handlePaste}
|
|
208
210
|
placeholder={placeholder}
|
|
209
211
|
disabled={disabled}
|
|
210
|
-
className={
|
|
212
|
+
className={cn(
|
|
213
|
+
'w-full p-4 bg-transparent transition-colors text-foreground placeholder-muted-foreground placeholder:text-base disabled:bg-muted disabled:cursor-not-allowed resize-none',
|
|
214
|
+
isEmbedded
|
|
215
|
+
? 'border-0 hover:border-2 hover:border-purple-500 focus:border-2 focus:border-purple-500'
|
|
216
|
+
: 'border-2 border-border rounded-lg hover:border-purple-500 focus:border-purple-500',
|
|
217
|
+
className
|
|
218
|
+
)}
|
|
211
219
|
style={{ minHeight: `${minHeight}px` }}
|
|
212
220
|
/>
|
|
213
221
|
)
|