@topthink/chat 1.0.14 → 1.0.16
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/es/index.js +1 -1
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -558,7 +558,7 @@ import*as e from"react";import{useCallback as r,useState as t,useImperativeHandl
|
|
|
558
558
|
box-shadow: 0.125rem 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
|
|
559
559
|
`,ke=p.div`
|
|
560
560
|
margin: 0 1rem 1rem;
|
|
561
|
-
`;function we(e){let{className:o,bot:n,user:i,input:s,showProcess:c,...d}=e;const[m,p]=t(d.messages||[]),u=a(null),g=r((()=>{const e=u.current;e&&requestAnimationFrame((()=>{e.scrollTo({top:e.scrollHeight})}))}),[]),{ref:f,height:b}=_();return l((()=>{g()}),[b]),k(ze,{className:o,children:w(h,{children:[k(je,{ref:u,children:k(Ne,{ref:f,children:m.map(((e,r)=>k(ae,{message:e,showProcess:c,bot:n,user:i},r)))})}),
|
|
561
|
+
`;function we(e){let{className:o,bot:n,user:i,input:s,showProcess:c,...d}=e;const[m,p]=t(d.messages||[]),u=a(null),g=r((()=>{const e=u.current;e&&requestAnimationFrame((()=>{e.scrollTo({top:e.scrollHeight})}))}),[]),{ref:f,height:b}=_();return l((()=>{g()}),[b]),k(ze,{className:o,children:w(h,{children:[k(je,{ref:u,children:k(Ne,{ref:f,children:m.map(((e,r)=>k(ae,{message:e,showProcess:c,bot:n,user:i},r)))})}),s&&k(ge,{onMessages:p,scrollRef:u,...s})]})})}const je=p.div`
|
|
562
562
|
display: flex;
|
|
563
563
|
flex-direction: column;
|
|
564
564
|
flex: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topthink/chat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prebuild": "rimraf es types",
|
|
6
6
|
"build": "rollup -c --environment NODE_ENV:production",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/runtime": "^7.11.2",
|
|
20
|
-
"@topthink/components": "^1.0.
|
|
20
|
+
"@topthink/components": "^1.0.89",
|
|
21
21
|
"katex": "^0.16.9",
|
|
22
22
|
"react-markdown": "^8.0.7",
|
|
23
23
|
"react-textarea-autosize": "^8.5.3",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
|
|
58
58
|
"license": "MIT",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "0a2f66abbd7c826e59d63c2ea8117291ff8c9481"
|
|
60
60
|
}
|