@asgard-js/react 0.0.33-canary.2 → 0.0.33
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,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgard-js/react",
|
|
3
|
-
"version": "0.0.33
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"highlight.js": "^11.11.1",
|
|
33
33
|
"katex": "^0.16.22",
|
|
34
34
|
"react-markdown": "^10.1.0",
|
|
35
|
-
"react-vega": "^7.
|
|
35
|
+
"react-vega": "^7.6.0",
|
|
36
36
|
"rehype-highlight": "^7.0.2",
|
|
37
37
|
"rehype-katex": "^7.0.1",
|
|
38
38
|
"remark-gfm": "^4.0.1",
|
|
39
39
|
"remark-math": "^6.0.0",
|
|
40
40
|
"vega": "^6.1.2",
|
|
41
|
-
"vega-embed": "6.
|
|
41
|
+
"vega-embed": "^6.0.0",
|
|
42
42
|
"vega-lite": "^6.1.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vitest": "^1.6.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@asgard-js/core": "^0.0.33
|
|
57
|
+
"@asgard-js/core": "^0.0.33",
|
|
58
58
|
"react": "^18.0.0",
|
|
59
59
|
"react-dom": "^18.0.0"
|
|
60
60
|
},
|
|
@@ -14,16 +14,20 @@ import SendSvg from '../../../icons/send.svg?react';
|
|
|
14
14
|
import { SpeechInputButton } from './speech-input-button';
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import { useAsgardThemeContext } from '../../../context/asgard-theme-context';
|
|
17
|
+
import { useAsgardAppInitializationContext } from '../../../context/asgard-app-initialization-context';
|
|
17
18
|
|
|
18
19
|
export function ChatbotFooter(): ReactNode {
|
|
19
20
|
const { sendMessage, isConnecting } = useAsgardContext();
|
|
20
21
|
|
|
21
22
|
const { chatbot } = useAsgardThemeContext();
|
|
23
|
+
const { data: { annotations } } = useAsgardAppInitializationContext();
|
|
22
24
|
|
|
23
25
|
const [value, setValue] = useState('');
|
|
24
26
|
const [isComposing, setIsComposing] = useState(false);
|
|
25
27
|
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
|
26
28
|
|
|
29
|
+
const inputPlaceholder = annotations?.embedConfig?.inputPlaceholder || 'Enter message';
|
|
30
|
+
|
|
27
31
|
const disabled = useMemo(
|
|
28
32
|
() => isConnecting || !value.trim(),
|
|
29
33
|
[isConnecting, value]
|
|
@@ -106,7 +110,7 @@ export function ChatbotFooter(): ReactNode {
|
|
|
106
110
|
disabled={isConnecting}
|
|
107
111
|
cols={40}
|
|
108
112
|
value={value}
|
|
109
|
-
placeholder=
|
|
113
|
+
placeholder={inputPlaceholder}
|
|
110
114
|
onChange={onChange}
|
|
111
115
|
onKeyDown={onKeyDown}
|
|
112
116
|
onCompositionStart={() => setIsComposing(true)}
|