@assistant-ui/react 0.3.3 → 0.3.5
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -529,9 +529,10 @@ var useActionBarCopy = ({
|
|
529
529
|
const { setIsCopied } = useMessageUtils.getState();
|
530
530
|
const { isEditing, value: composerValue } = useEditComposer.getState();
|
531
531
|
const valueToCopy = isEditing ? composerValue : getMessageText(message);
|
532
|
-
navigator.clipboard.writeText(valueToCopy)
|
533
|
-
|
534
|
-
|
532
|
+
navigator.clipboard.writeText(valueToCopy).then(() => {
|
533
|
+
setIsCopied(true);
|
534
|
+
setTimeout(() => setIsCopied(false), copiedDuration);
|
535
|
+
});
|
535
536
|
}, [useMessage, useMessageUtils, useEditComposer, copiedDuration]);
|
536
537
|
if (!hasCopyableContent) return null;
|
537
538
|
return callback;
|
@@ -1217,7 +1218,6 @@ var useSmooth = (text, smooth = false) => {
|
|
1217
1218
|
new TextStreamAnimator(setDisplayedText)
|
1218
1219
|
);
|
1219
1220
|
useEffect8(() => {
|
1220
|
-
console.log("smooth", smooth);
|
1221
1221
|
if (!smooth) {
|
1222
1222
|
animatorRef.stop();
|
1223
1223
|
return;
|
@@ -1230,7 +1230,6 @@ var useSmooth = (text, smooth = false) => {
|
|
1230
1230
|
}
|
1231
1231
|
animatorRef.targetText = text;
|
1232
1232
|
animatorRef.start();
|
1233
|
-
console.log("animating");
|
1234
1233
|
}, [animatorRef, smooth, text]);
|
1235
1234
|
useEffect8(() => {
|
1236
1235
|
return () => {
|