@usecrow/ui 0.1.51 → 0.1.52
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.cjs +17 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1103,10 +1103,9 @@ interface WidgetHeaderProps {
|
|
|
1103
1103
|
onNewChat: () => void;
|
|
1104
1104
|
onToggleHistory: () => void;
|
|
1105
1105
|
showMinimize?: boolean;
|
|
1106
|
-
isMinimized?: boolean;
|
|
1107
1106
|
onToggleMinimize?: () => void;
|
|
1108
1107
|
}
|
|
1109
|
-
declare function WidgetHeader({ isVerifiedUser, showConversationList, onNewChat, onToggleHistory, showMinimize,
|
|
1108
|
+
declare function WidgetHeader({ isVerifiedUser, showConversationList, onNewChat, onToggleHistory, showMinimize, onToggleMinimize, }: WidgetHeaderProps): react_jsx_runtime.JSX.Element;
|
|
1110
1109
|
|
|
1111
1110
|
/**
|
|
1112
1111
|
* CopilotToggleButton - Edge toggle button for floating copilot
|
package/dist/index.d.ts
CHANGED
|
@@ -1103,10 +1103,9 @@ interface WidgetHeaderProps {
|
|
|
1103
1103
|
onNewChat: () => void;
|
|
1104
1104
|
onToggleHistory: () => void;
|
|
1105
1105
|
showMinimize?: boolean;
|
|
1106
|
-
isMinimized?: boolean;
|
|
1107
1106
|
onToggleMinimize?: () => void;
|
|
1108
1107
|
}
|
|
1109
|
-
declare function WidgetHeader({ isVerifiedUser, showConversationList, onNewChat, onToggleHistory, showMinimize,
|
|
1108
|
+
declare function WidgetHeader({ isVerifiedUser, showConversationList, onNewChat, onToggleHistory, showMinimize, onToggleMinimize, }: WidgetHeaderProps): react_jsx_runtime.JSX.Element;
|
|
1110
1109
|
|
|
1111
1110
|
/**
|
|
1112
1111
|
* CopilotToggleButton - Edge toggle button for floating copilot
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|
|
3
3
|
import { DEFAULT_TOOLS, CrowClient } from '@usecrow/client';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
|
-
import { Square, ArrowUp, ChevronDown, Check, MessageCircle, Plus, History,
|
|
6
|
+
import { Square, ArrowUp, ChevronDown, Check, MessageCircle, Plus, RotateCcw, History, X, Brain, ChevronRight, Loader2 } from 'lucide-react';
|
|
7
7
|
import ReactMarkdown from 'react-markdown';
|
|
8
8
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
9
9
|
|
|
@@ -1956,7 +1956,6 @@ function WidgetHeader({
|
|
|
1956
1956
|
onNewChat,
|
|
1957
1957
|
onToggleHistory,
|
|
1958
1958
|
showMinimize = false,
|
|
1959
|
-
isMinimized = false,
|
|
1960
1959
|
onToggleMinimize
|
|
1961
1960
|
}) {
|
|
1962
1961
|
const { agentName, styles } = useWidgetStyleContext();
|
|
@@ -1978,7 +1977,7 @@ function WidgetHeader({
|
|
|
1978
1977
|
}
|
|
1979
1978
|
) }),
|
|
1980
1979
|
/* @__PURE__ */ jsxs("div", { className: "crow-flex crow-items-center crow-gap-1", children: [
|
|
1981
|
-
/* @__PURE__ */ jsx(
|
|
1980
|
+
isVerifiedUser ? /* @__PURE__ */ jsx(
|
|
1982
1981
|
"button",
|
|
1983
1982
|
{
|
|
1984
1983
|
onClick: onNewChat,
|
|
@@ -1987,6 +1986,15 @@ function WidgetHeader({
|
|
|
1987
1986
|
title: "New Chat",
|
|
1988
1987
|
children: /* @__PURE__ */ jsx(Plus, { size: 18, className: "crow-text-gray-700" })
|
|
1989
1988
|
}
|
|
1989
|
+
) : /* @__PURE__ */ jsx(
|
|
1990
|
+
"button",
|
|
1991
|
+
{
|
|
1992
|
+
onClick: onNewChat,
|
|
1993
|
+
className: "crow-p-1.5 hover:crow-bg-gray-200 crow-rounded crow-transition-colors",
|
|
1994
|
+
"aria-label": "Restart Chat",
|
|
1995
|
+
title: "Restart Chat",
|
|
1996
|
+
children: /* @__PURE__ */ jsx(RotateCcw, { size: 16, className: "crow-text-gray-700" })
|
|
1997
|
+
}
|
|
1990
1998
|
),
|
|
1991
1999
|
isVerifiedUser && /* @__PURE__ */ jsx(
|
|
1992
2000
|
"button",
|
|
@@ -2002,9 +2010,10 @@ function WidgetHeader({
|
|
|
2002
2010
|
"button",
|
|
2003
2011
|
{
|
|
2004
2012
|
onClick: onToggleMinimize,
|
|
2005
|
-
className: "crow-p-1 hover:crow-bg-gray-200 crow-rounded crow-transition-colors",
|
|
2006
|
-
"aria-label":
|
|
2007
|
-
|
|
2013
|
+
className: "crow-p-1.5 hover:crow-bg-gray-200 crow-rounded crow-transition-colors",
|
|
2014
|
+
"aria-label": "Close chat",
|
|
2015
|
+
title: "Close chat",
|
|
2016
|
+
children: /* @__PURE__ */ jsx(X, { size: 18, className: "crow-text-gray-700" })
|
|
2008
2017
|
}
|
|
2009
2018
|
)
|
|
2010
2019
|
] })
|
|
@@ -3802,7 +3811,9 @@ function CrowWidget({
|
|
|
3802
3811
|
isVerifiedUser,
|
|
3803
3812
|
showConversationList,
|
|
3804
3813
|
onNewChat: handleNewChat,
|
|
3805
|
-
onToggleHistory: handleToggleHistory
|
|
3814
|
+
onToggleHistory: handleToggleHistory,
|
|
3815
|
+
showMinimize: variant === "floating",
|
|
3816
|
+
onToggleMinimize: () => setIsCollapsed(true)
|
|
3806
3817
|
}
|
|
3807
3818
|
),
|
|
3808
3819
|
/* @__PURE__ */ jsx(AnimatePresence, { children: showConversationList && isVerifiedUser && /* @__PURE__ */ jsx(
|