@apteva/apteva-kit 0.1.41 → 0.1.42
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.js +195 -195
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +195 -195
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -700,14 +700,14 @@ Widgets: @ui:type[{props}]. Types: ${widgets.join(", ")}. Add "meta" at root (no
|
|
|
700
700
|
var _jsxruntime = require('react/jsx-runtime');
|
|
701
701
|
function Card({ widget, onAction }) {
|
|
702
702
|
const { title, description, image, footer } = widget.props;
|
|
703
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-
|
|
703
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: [
|
|
704
704
|
image && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: image, alt: title, className: "w-full h-48 object-cover" }),
|
|
705
705
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4", children: [
|
|
706
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "!text-lg font-semibold !text-
|
|
707
|
-
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-
|
|
706
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "!text-lg font-semibold !text-neutral-900 dark:!text-white", children: title }),
|
|
707
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-neutral-600 dark:!text-neutral-400 mt-2", children: description })
|
|
708
708
|
] }),
|
|
709
|
-
(footer || widget.actions && widget.actions.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-t border-
|
|
710
|
-
footer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm !text-
|
|
709
|
+
(footer || widget.actions && widget.actions.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center", children: [
|
|
710
|
+
footer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm !text-neutral-600 dark:!text-neutral-400", children: footer }),
|
|
711
711
|
widget.actions && widget.actions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex gap-2", children: widget.actions.map((action, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
@@ -730,17 +730,17 @@ function Card({ widget, onAction }) {
|
|
|
730
730
|
|
|
731
731
|
function List({ widget, onAction }) {
|
|
732
732
|
const { items } = widget.props;
|
|
733
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-
|
|
733
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
734
734
|
"div",
|
|
735
735
|
{
|
|
736
|
-
className: `flex items-center p-4 transition-colors ${index !== items.length - 1 ? "border-b border-
|
|
736
|
+
className: `flex items-center p-4 transition-colors ${index !== items.length - 1 ? "border-b border-neutral-200 dark:border-neutral-700" : ""} ${!item.backgroundColor ? "hover:bg-neutral-50 dark:hover:bg-neutral-800" : ""}`,
|
|
737
737
|
style: item.backgroundColor ? { backgroundColor: item.backgroundColor } : void 0,
|
|
738
738
|
children: [
|
|
739
739
|
item.image && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: item.image, alt: item.title, className: "w-16 h-16 rounded object-cover" }),
|
|
740
740
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex-1 ${item.image ? "ml-4" : ""}`, children: [
|
|
741
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold !text-
|
|
742
|
-
item.subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-sm !text-
|
|
743
|
-
item.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-xs !text-
|
|
741
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold !text-neutral-900 dark:!text-white", children: item.title }),
|
|
742
|
+
item.subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-sm !text-neutral-600 dark:!text-neutral-400", children: item.subtitle }),
|
|
743
|
+
item.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1", children: item.description })
|
|
744
744
|
] }),
|
|
745
745
|
widget.actions && widget.actions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex gap-2", children: widget.actions.map((action, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
746
|
"button",
|
|
@@ -768,7 +768,7 @@ function Button({ widget, onAction }) {
|
|
|
768
768
|
const { label, variant = "primary", disabled = false } = widget.props;
|
|
769
769
|
const variantClasses = {
|
|
770
770
|
primary: "bg-blue-500 !text-white hover:bg-blue-600",
|
|
771
|
-
secondary: "bg-
|
|
771
|
+
secondary: "bg-neutral-500 !text-white hover:bg-neutral-600",
|
|
772
772
|
outline: "border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",
|
|
773
773
|
ghost: "!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"
|
|
774
774
|
};
|
|
@@ -796,8 +796,8 @@ function ButtonGroup({ widget, onAction }) {
|
|
|
796
796
|
const { layout = "horizontal", buttons } = widget.props;
|
|
797
797
|
const variantClasses = {
|
|
798
798
|
primary: "bg-blue-500 !text-white hover:bg-blue-600",
|
|
799
|
-
secondary: "bg-
|
|
800
|
-
outline: "border border-
|
|
799
|
+
secondary: "bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",
|
|
800
|
+
outline: "border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"
|
|
801
801
|
};
|
|
802
802
|
const getActionForButton = (buttonId) => {
|
|
803
803
|
return _optionalChain([widget, 'access', _7 => _7.actions, 'optionalAccess', _8 => _8.find, 'call', _9 => _9((action) => _optionalChain([action, 'access', _10 => _10.payload, 'optionalAccess', _11 => _11.buttonId]) === buttonId)]) || _optionalChain([widget, 'access', _12 => _12.actions, 'optionalAccess', _13 => _13[0]]);
|
|
@@ -851,13 +851,13 @@ function Table({ widget, onAction }) {
|
|
|
851
851
|
return "text-left";
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-
|
|
855
|
-
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "caption", { className: "px-4 py-2 text-sm text-
|
|
856
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "bg-
|
|
854
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full", children: [
|
|
855
|
+
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "caption", { className: "px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: caption }),
|
|
856
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
857
857
|
"th",
|
|
858
858
|
{
|
|
859
859
|
className: cn(
|
|
860
|
-
"font-semibold text-
|
|
860
|
+
"font-semibold text-neutral-900 dark:text-white",
|
|
861
861
|
compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm",
|
|
862
862
|
getAlignment(column.align)
|
|
863
863
|
),
|
|
@@ -871,9 +871,9 @@ function Table({ widget, onAction }) {
|
|
|
871
871
|
"tr",
|
|
872
872
|
{
|
|
873
873
|
className: cn(
|
|
874
|
-
"border-b border-
|
|
875
|
-
"transition-colors hover:bg-
|
|
876
|
-
striped && rowIndex % 2 === 1 && "bg-
|
|
874
|
+
"border-b border-neutral-200 dark:border-neutral-700 last:border-b-0",
|
|
875
|
+
"transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",
|
|
876
|
+
striped && rowIndex % 2 === 1 && "bg-neutral-50/50 dark:bg-neutral-800/50"
|
|
877
877
|
),
|
|
878
878
|
onClick: () => {
|
|
879
879
|
if (widget.actions && widget.actions.length > 0) {
|
|
@@ -890,7 +890,7 @@ function Table({ widget, onAction }) {
|
|
|
890
890
|
"td",
|
|
891
891
|
{
|
|
892
892
|
className: cn(
|
|
893
|
-
"text-
|
|
893
|
+
"text-neutral-700 dark:text-neutral-300",
|
|
894
894
|
compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm",
|
|
895
895
|
getAlignment(column.align)
|
|
896
896
|
),
|
|
@@ -905,7 +905,7 @@ function Table({ widget, onAction }) {
|
|
|
905
905
|
"td",
|
|
906
906
|
{
|
|
907
907
|
colSpan: columns.length,
|
|
908
|
-
className: "px-4 py-8 text-center text-sm text-
|
|
908
|
+
className: "px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",
|
|
909
909
|
children: "No data available"
|
|
910
910
|
}
|
|
911
911
|
) })
|
|
@@ -972,71 +972,71 @@ function Widgets({
|
|
|
972
972
|
function WidgetSkeleton({ type, className }) {
|
|
973
973
|
switch (type) {
|
|
974
974
|
case "card":
|
|
975
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
976
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
977
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
978
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
975
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden", className), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 space-y-3", children: [
|
|
976
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4" }),
|
|
977
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full" }),
|
|
978
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6" })
|
|
979
979
|
] }) });
|
|
980
980
|
case "list":
|
|
981
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse space-y-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 p-3 rounded-lg border border-
|
|
982
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-10 h-10 bg-
|
|
981
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse space-y-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800", children: [
|
|
982
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0" }),
|
|
983
983
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 space-y-2", children: [
|
|
984
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
985
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 bg-
|
|
984
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2" }),
|
|
985
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4" })
|
|
986
986
|
] })
|
|
987
987
|
] }, i)) });
|
|
988
988
|
case "button_group":
|
|
989
989
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse flex gap-2", className), children: [
|
|
990
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
991
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
992
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
990
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" }),
|
|
991
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" }),
|
|
992
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" })
|
|
993
993
|
] });
|
|
994
994
|
case "form":
|
|
995
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
996
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
995
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4", className), children: [
|
|
996
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3" }),
|
|
997
997
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
|
|
998
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-
|
|
999
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-
|
|
998
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-neutral-200 dark:bg-neutral-700 rounded" }),
|
|
999
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-neutral-200 dark:bg-neutral-700 rounded" })
|
|
1000
1000
|
] }),
|
|
1001
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
1001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24" })
|
|
1002
1002
|
] });
|
|
1003
1003
|
case "chart":
|
|
1004
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1005
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
1004
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4", className), children: [
|
|
1005
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4" }),
|
|
1006
1006
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-end gap-2 h-32", children: [
|
|
1007
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1008
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1010
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1007
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2" }),
|
|
1008
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4" }),
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3" }),
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full" }),
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3" })
|
|
1012
1012
|
] })
|
|
1013
1013
|
] });
|
|
1014
1014
|
case "image":
|
|
1015
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-video bg-
|
|
1015
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg" }) });
|
|
1016
1016
|
case "gallery":
|
|
1017
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse grid grid-cols-3 gap-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-square bg-
|
|
1017
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse grid grid-cols-3 gap-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg" }, i)) });
|
|
1018
1018
|
case "map":
|
|
1019
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-48 bg-
|
|
1019
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "w-8 h-8 text-neutral-400 dark:text-neutral-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: [
|
|
1020
1020
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
|
|
1021
1021
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1022
1022
|
] }) }) });
|
|
1023
1023
|
case "table":
|
|
1024
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1025
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex bg-
|
|
1026
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1027
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1024
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden", className), children: [
|
|
1025
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
1026
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16" }) }),
|
|
1027
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20" }) }),
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14" }) })
|
|
1029
1029
|
] }),
|
|
1030
|
-
[1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex border-b border-
|
|
1031
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1032
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1033
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1030
|
+
[1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0", children: [
|
|
1031
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24" }) }),
|
|
1032
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16" }) }),
|
|
1033
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20" }) })
|
|
1034
1034
|
] }, i))
|
|
1035
1035
|
] });
|
|
1036
1036
|
default:
|
|
1037
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
1039
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1037
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4", className), children: [
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2" }),
|
|
1039
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full" })
|
|
1040
1040
|
] });
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
@@ -1474,7 +1474,7 @@ function WelcomeScreen({
|
|
|
1474
1474
|
const hasPrompts = normalizedPrompts.length > 0;
|
|
1475
1475
|
const hasHeader = title || subtitle || icon;
|
|
1476
1476
|
if (!hasHeader && !hasPrompts) {
|
|
1477
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center h-full !text-
|
|
1477
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center space-y-2", children: [
|
|
1478
1478
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
|
|
1479
1479
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: "No messages yet. Start a conversation!" })
|
|
1480
1480
|
] }) });
|
|
@@ -1482,8 +1482,8 @@ function WelcomeScreen({
|
|
|
1482
1482
|
if (variant === "minimal") {
|
|
1483
1483
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col h-full px-4 py-4", children: [
|
|
1484
1484
|
hasHeader && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
|
|
1485
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-lg font-semibold !text-
|
|
1486
|
-
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm !text-
|
|
1485
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-lg font-semibold !text-neutral-900 dark:!text-white", children: title }),
|
|
1486
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm !text-neutral-500 dark:!text-neutral-400 mt-1", children: subtitle })
|
|
1487
1487
|
] }),
|
|
1488
1488
|
hasPrompts && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 space-y-2", children: normalizedPrompts.map((prompt, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1489
1489
|
"button",
|
|
@@ -1491,18 +1491,18 @@ function WelcomeScreen({
|
|
|
1491
1491
|
onClick: () => onPromptClick(prompt.text),
|
|
1492
1492
|
className: cn(
|
|
1493
1493
|
"w-full text-left px-4 py-3 rounded-xl",
|
|
1494
|
-
"bg-
|
|
1495
|
-
"border border-
|
|
1496
|
-
"hover:bg-
|
|
1497
|
-
"hover:border-
|
|
1494
|
+
"bg-neutral-50 dark:bg-neutral-800/50",
|
|
1495
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1496
|
+
"hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1497
|
+
"hover:border-neutral-300 dark:hover:border-neutral-600",
|
|
1498
1498
|
"transition-all duration-200",
|
|
1499
1499
|
"group"
|
|
1500
1500
|
),
|
|
1501
1501
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
1502
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 !text-
|
|
1502
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1503
1503
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1504
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1505
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1504
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white truncate", children: prompt.text }),
|
|
1505
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate", children: prompt.description })
|
|
1506
1506
|
] })
|
|
1507
1507
|
] })
|
|
1508
1508
|
},
|
|
@@ -1512,9 +1512,9 @@ function WelcomeScreen({
|
|
|
1512
1512
|
}
|
|
1513
1513
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8", children: [
|
|
1514
1514
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center mb-6 sm:mb-8 max-w-md", children: [
|
|
1515
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-
|
|
1516
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-xl sm:text-2xl font-semibold !text-
|
|
1517
|
-
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm sm:text-base !text-
|
|
1515
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center", children: icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
|
|
1516
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2", children: title }),
|
|
1517
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400", children: subtitle })
|
|
1518
1518
|
] }),
|
|
1519
1519
|
hasPrompts && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full max-w-2xl", children: [
|
|
1520
1520
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "sm:hidden space-y-2", children: normalizedPrompts.map((prompt, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1523,9 +1523,9 @@ function WelcomeScreen({
|
|
|
1523
1523
|
onClick: () => onPromptClick(prompt.text),
|
|
1524
1524
|
className: cn(
|
|
1525
1525
|
"w-full text-left px-4 py-3 rounded-xl",
|
|
1526
|
-
"bg-white dark:bg-
|
|
1527
|
-
"border border-
|
|
1528
|
-
"hover:bg-
|
|
1526
|
+
"bg-white dark:bg-neutral-800",
|
|
1527
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1528
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
1529
1529
|
"hover:border-blue-300 dark:hover:border-blue-600",
|
|
1530
1530
|
"active:scale-[0.98]",
|
|
1531
1531
|
"transition-all duration-200",
|
|
@@ -1533,15 +1533,15 @@ function WelcomeScreen({
|
|
|
1533
1533
|
"group"
|
|
1534
1534
|
),
|
|
1535
1535
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
1536
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-
|
|
1536
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1537
1537
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1538
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1539
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1538
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white", children: prompt.text }),
|
|
1539
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1", children: prompt.description })
|
|
1540
1540
|
] }),
|
|
1541
1541
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1542
1542
|
"svg",
|
|
1543
1543
|
{
|
|
1544
|
-
className: "w-4 h-4 !text-
|
|
1544
|
+
className: "w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",
|
|
1545
1545
|
fill: "none",
|
|
1546
1546
|
stroke: "currentColor",
|
|
1547
1547
|
viewBox: "0 0 24 24",
|
|
@@ -1566,9 +1566,9 @@ function WelcomeScreen({
|
|
|
1566
1566
|
onClick: () => onPromptClick(prompt.text),
|
|
1567
1567
|
className: cn(
|
|
1568
1568
|
"text-left p-4 rounded-xl",
|
|
1569
|
-
"bg-white dark:bg-
|
|
1570
|
-
"border border-
|
|
1571
|
-
"hover:bg-
|
|
1569
|
+
"bg-white dark:bg-neutral-800",
|
|
1570
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1571
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
1572
1572
|
"hover:border-blue-300 dark:hover:border-blue-600",
|
|
1573
1573
|
"hover:shadow-md",
|
|
1574
1574
|
"active:scale-[0.98]",
|
|
@@ -1576,10 +1576,10 @@ function WelcomeScreen({
|
|
|
1576
1576
|
"group"
|
|
1577
1577
|
),
|
|
1578
1578
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
|
|
1579
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-9 h-9 rounded-lg bg-
|
|
1579
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1580
1580
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1581
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1582
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1581
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white leading-snug", children: prompt.text }),
|
|
1582
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2", children: prompt.description })
|
|
1583
1583
|
] })
|
|
1584
1584
|
] })
|
|
1585
1585
|
},
|
|
@@ -1714,18 +1714,18 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1714
1714
|
pendingFiles.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-2 flex flex-wrap gap-2", children: pendingFiles.map((pf, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1715
1715
|
"div",
|
|
1716
1716
|
{
|
|
1717
|
-
className: "relative group flex items-center gap-2 px-3 py-2 bg-
|
|
1717
|
+
className: "relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",
|
|
1718
1718
|
children: [
|
|
1719
|
-
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-8 h-8 object-cover rounded" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center bg-
|
|
1719
|
+
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-8 h-8 object-cover rounded" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400", children: getFileIcon(pf.file.type) }),
|
|
1720
1720
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col min-w-0", children: [
|
|
1721
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium !text-
|
|
1722
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-
|
|
1721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]", children: pf.file.name }),
|
|
1722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-neutral-500 dark:!text-neutral-400", children: formatFileSize(pf.file.size) })
|
|
1723
1723
|
] }),
|
|
1724
1724
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1725
1725
|
"button",
|
|
1726
1726
|
{
|
|
1727
1727
|
onClick: () => removeFile(index),
|
|
1728
|
-
className: "absolute -top-1.5 -right-1.5 w-5 h-5 bg-
|
|
1728
|
+
className: "absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1729
1729
|
title: "Remove file",
|
|
1730
1730
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1731
1731
|
}
|
|
@@ -1734,14 +1734,14 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1734
1734
|
},
|
|
1735
1735
|
index
|
|
1736
1736
|
)) }),
|
|
1737
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-composer relative border-2 border-
|
|
1737
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-composer relative border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 transition-all duration-300 flex items-center px-3 py-2 gap-3", children: [
|
|
1738
1738
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex-shrink-0", children: [
|
|
1739
1739
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1740
1740
|
"button",
|
|
1741
1741
|
{
|
|
1742
1742
|
ref: menuButtonRef,
|
|
1743
1743
|
onClick: () => setShowMenu(!showMenu),
|
|
1744
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-
|
|
1744
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1745
1745
|
title: "More options",
|
|
1746
1746
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 5v10M5 10h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1747
1747
|
}
|
|
@@ -1751,7 +1751,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1751
1751
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1752
1752
|
"div",
|
|
1753
1753
|
{
|
|
1754
|
-
className: "fixed bg-
|
|
1754
|
+
className: "fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
|
|
1755
1755
|
style: {
|
|
1756
1756
|
left: _nullishCoalesce(_optionalChain([menuButtonRef, 'access', _24 => _24.current, 'optionalAccess', _25 => _25.getBoundingClientRect, 'call', _26 => _26(), 'access', _27 => _27.left]), () => ( 0)),
|
|
1757
1757
|
top: (_nullishCoalesce(_optionalChain([menuButtonRef, 'access', _28 => _28.current, 'optionalAccess', _29 => _29.getBoundingClientRect, 'call', _30 => _30(), 'access', _31 => _31.bottom]), () => ( 0))) + 8
|
|
@@ -1764,7 +1764,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1764
1764
|
_optionalChain([fileInputRef, 'access', _32 => _32.current, 'optionalAccess', _33 => _33.click, 'call', _34 => _34()]);
|
|
1765
1765
|
setShowMenu(false);
|
|
1766
1766
|
},
|
|
1767
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
1767
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",
|
|
1768
1768
|
children: [
|
|
1769
1769
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(2, 3)" }) }),
|
|
1770
1770
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Add photos & files" })
|
|
@@ -1778,7 +1778,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1778
1778
|
onSwitchMode();
|
|
1779
1779
|
setShowMenu(false);
|
|
1780
1780
|
},
|
|
1781
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
1781
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",
|
|
1782
1782
|
children: [
|
|
1783
1783
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4.5 h-4.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
|
|
1784
1784
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Switch to command mode" })
|
|
@@ -1799,7 +1799,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1799
1799
|
onKeyDown: handleKeyDown,
|
|
1800
1800
|
placeholder,
|
|
1801
1801
|
disabled,
|
|
1802
|
-
className: "flex-1 resize-none bg-transparent border-none focus:outline-none !text-
|
|
1802
|
+
className: "flex-1 resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1803
1803
|
rows: 1,
|
|
1804
1804
|
style: { maxHeight: "120px" }
|
|
1805
1805
|
}
|
|
@@ -1817,7 +1817,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1817
1817
|
{
|
|
1818
1818
|
onClick: handleSend,
|
|
1819
1819
|
disabled: !text.trim() && pendingFiles.length === 0 || disabled,
|
|
1820
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-
|
|
1820
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",
|
|
1821
1821
|
title: "Send message",
|
|
1822
1822
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1823
1823
|
}
|
|
@@ -1968,8 +1968,8 @@ function CommandComposer({
|
|
|
1968
1968
|
"div",
|
|
1969
1969
|
{
|
|
1970
1970
|
className: cn(
|
|
1971
|
-
"apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-
|
|
1972
|
-
state === "idle" && "border-
|
|
1971
|
+
"apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",
|
|
1972
|
+
state === "idle" && "border-neutral-200 dark:border-neutral-700",
|
|
1973
1973
|
state === "loading" && "border-blue-400 dark:border-blue-500",
|
|
1974
1974
|
state === "plan-pending" && "border-amber-400 dark:border-amber-500",
|
|
1975
1975
|
state === "success" && "border-green-400 dark:border-green-500",
|
|
@@ -1983,7 +1983,7 @@ function CommandComposer({
|
|
|
1983
1983
|
{
|
|
1984
1984
|
ref: menuButtonRef,
|
|
1985
1985
|
onClick: () => setShowMenu(!showMenu),
|
|
1986
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-
|
|
1986
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1987
1987
|
title: "More options",
|
|
1988
1988
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 5v10M5 10h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1989
1989
|
}
|
|
@@ -1993,7 +1993,7 @@ function CommandComposer({
|
|
|
1993
1993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1994
1994
|
"div",
|
|
1995
1995
|
{
|
|
1996
|
-
className: "fixed bg-
|
|
1996
|
+
className: "fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
|
|
1997
1997
|
style: {
|
|
1998
1998
|
left: _nullishCoalesce(_optionalChain([menuButtonRef, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.getBoundingClientRect, 'call', _41 => _41(), 'access', _42 => _42.left]), () => ( 0)),
|
|
1999
1999
|
top: (_nullishCoalesce(_optionalChain([menuButtonRef, 'access', _43 => _43.current, 'optionalAccess', _44 => _44.getBoundingClientRect, 'call', _45 => _45(), 'access', _46 => _46.bottom]), () => ( 0))) + 8
|
|
@@ -2006,7 +2006,7 @@ function CommandComposer({
|
|
|
2006
2006
|
_optionalChain([fileInputRef, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.click, 'call', _49 => _49()]);
|
|
2007
2007
|
setShowMenu(false);
|
|
2008
2008
|
},
|
|
2009
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
2009
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",
|
|
2010
2010
|
children: [
|
|
2011
2011
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(2, 3)" }) }),
|
|
2012
2012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Add photos & files" })
|
|
@@ -2020,7 +2020,7 @@ function CommandComposer({
|
|
|
2020
2020
|
onExpand();
|
|
2021
2021
|
setShowMenu(false);
|
|
2022
2022
|
},
|
|
2023
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
2023
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",
|
|
2024
2024
|
children: [
|
|
2025
2025
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4.5 h-4.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
2026
2026
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Expand to chat" })
|
|
@@ -2038,10 +2038,10 @@ function CommandComposer({
|
|
|
2038
2038
|
pendingFiles.length > 0 && state === "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-1 flex-shrink-0", children: pendingFiles.map((pf, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2039
2039
|
"div",
|
|
2040
2040
|
{
|
|
2041
|
-
className: "relative group flex items-center justify-center w-6 h-6 bg-
|
|
2041
|
+
className: "relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",
|
|
2042
2042
|
title: pf.file.name,
|
|
2043
2043
|
children: [
|
|
2044
|
-
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-6 h-6 object-cover" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-
|
|
2044
|
+
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-6 h-6 object-cover" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-neutral-500 dark:!text-neutral-400", children: getFileIcon(pf.file.type) }),
|
|
2045
2045
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2046
2046
|
"button",
|
|
2047
2047
|
{
|
|
@@ -2067,7 +2067,7 @@ function CommandComposer({
|
|
|
2067
2067
|
rows: 1,
|
|
2068
2068
|
className: cn(
|
|
2069
2069
|
"flex-1 resize-none bg-transparent border-none focus:outline-none",
|
|
2070
|
-
"!text-
|
|
2070
|
+
"!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500",
|
|
2071
2071
|
"text-sm leading-relaxed py-1",
|
|
2072
2072
|
"disabled:opacity-50"
|
|
2073
2073
|
),
|
|
@@ -2078,15 +2078,15 @@ function CommandComposer({
|
|
|
2078
2078
|
{
|
|
2079
2079
|
className: cn(
|
|
2080
2080
|
"flex-1 text-sm py-1 truncate flex items-center gap-2",
|
|
2081
|
-
state === "loading" && !isToolCall && "!text-
|
|
2081
|
+
state === "loading" && !isToolCall && "!text-neutral-600 dark:!text-neutral-400",
|
|
2082
2082
|
state === "loading" && isToolCall && "!text-blue-600 dark:!text-blue-400",
|
|
2083
|
-
state === "success" && "!text-
|
|
2083
|
+
state === "success" && "!text-neutral-900 dark:!text-neutral-100",
|
|
2084
2084
|
state === "error" && "!text-red-600 dark:!text-red-400",
|
|
2085
2085
|
state === "plan-pending" && "!text-amber-700 dark:!text-amber-300"
|
|
2086
2086
|
),
|
|
2087
2087
|
children: isToolCall ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2088
2088
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-mono", children: displayContent }),
|
|
2089
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
2089
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-neutral-400 dark:text-neutral-500", children: "Running..." })
|
|
2090
2090
|
] }) : displayContent
|
|
2091
2091
|
}
|
|
2092
2092
|
),
|
|
@@ -2103,7 +2103,7 @@ function CommandComposer({
|
|
|
2103
2103
|
"button",
|
|
2104
2104
|
{
|
|
2105
2105
|
onClick: onReject,
|
|
2106
|
-
className: "px-2 py-1 bg-
|
|
2106
|
+
className: "px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",
|
|
2107
2107
|
children: "Modify"
|
|
2108
2108
|
}
|
|
2109
2109
|
)
|
|
@@ -2121,7 +2121,7 @@ function CommandComposer({
|
|
|
2121
2121
|
"button",
|
|
2122
2122
|
{
|
|
2123
2123
|
onClick: handleNewCommand,
|
|
2124
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center !text-
|
|
2124
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",
|
|
2125
2125
|
title: "New command",
|
|
2126
2126
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
2127
2127
|
}
|
|
@@ -2133,9 +2133,9 @@ function CommandComposer({
|
|
|
2133
2133
|
disabled: !input.trim() && pendingFiles.length === 0 || disabled,
|
|
2134
2134
|
className: cn(
|
|
2135
2135
|
"w-8 h-8 rounded-lg flex items-center justify-center transition-all",
|
|
2136
|
-
"border border-
|
|
2136
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
2137
2137
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
2138
|
-
input.trim() || pendingFiles.length > 0 ? "bg-
|
|
2138
|
+
input.trim() || pendingFiles.length > 0 ? "bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white" : "bg-white dark:bg-neutral-800 !text-neutral-400"
|
|
2139
2139
|
),
|
|
2140
2140
|
title: "Execute command",
|
|
2141
2141
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 12h14M12 5l7 7-7 7" }) })
|
|
@@ -3431,9 +3431,9 @@ ${planToExecute}`;
|
|
|
3431
3431
|
"div",
|
|
3432
3432
|
{
|
|
3433
3433
|
className: cn(
|
|
3434
|
-
"relative border-2 rounded-xl bg-white dark:bg-
|
|
3434
|
+
"relative border-2 rounded-xl bg-white dark:bg-neutral-900 transition-all duration-300 flex flex-col",
|
|
3435
3435
|
state === "loading" && "animate-pulse-border",
|
|
3436
|
-
state === "idle" && "border-
|
|
3436
|
+
state === "idle" && "border-neutral-300 dark:border-neutral-700",
|
|
3437
3437
|
state === "loading" && "border-blue-500",
|
|
3438
3438
|
state === "plan-pending" && "border-blue-400",
|
|
3439
3439
|
state === "success" && "border-green-500",
|
|
@@ -3456,7 +3456,7 @@ ${planToExecute}`;
|
|
|
3456
3456
|
}
|
|
3457
3457
|
},
|
|
3458
3458
|
placeholder,
|
|
3459
|
-
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none !text-
|
|
3459
|
+
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500",
|
|
3460
3460
|
rows: 6
|
|
3461
3461
|
}
|
|
3462
3462
|
),
|
|
@@ -3466,11 +3466,11 @@ ${planToExecute}`;
|
|
|
3466
3466
|
{
|
|
3467
3467
|
src: file.preview,
|
|
3468
3468
|
alt: file.name,
|
|
3469
|
-
className: "w-20 h-20 object-cover rounded-lg border-2 border-
|
|
3469
|
+
className: "w-20 h-20 object-cover rounded-lg border-2 border-neutral-300 dark:border-neutral-600"
|
|
3470
3470
|
}
|
|
3471
|
-
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-20 h-20 flex flex-col items-center justify-center rounded-lg border-2 border-
|
|
3472
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-
|
|
3473
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[8px] text-
|
|
3471
|
+
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-20 h-20 flex flex-col items-center justify-center rounded-lg border-2 border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800", children: [
|
|
3472
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-neutral-500 dark:text-neutral-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z", clipRule: "evenodd" }) }),
|
|
3473
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[8px] text-neutral-500 dark:text-neutral-400 mt-1 px-1 truncate max-w-full", children: file.name.length > 12 ? file.name.slice(0, 12) + "..." : file.name })
|
|
3474
3474
|
] }),
|
|
3475
3475
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3476
3476
|
"button",
|
|
@@ -3489,7 +3489,7 @@ ${planToExecute}`;
|
|
|
3489
3489
|
"button",
|
|
3490
3490
|
{
|
|
3491
3491
|
onClick: () => _optionalChain([fileInputRef, 'access', _103 => _103.current, 'optionalAccess', _104 => _104.click, 'call', _105 => _105()]),
|
|
3492
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-
|
|
3492
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-neutral-500 dark:!text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3493
3493
|
title: "Attach file",
|
|
3494
3494
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8.4 2.8L4.4 6.8C3.736 7.464 3.736 8.536 4.4 9.2C5.064 9.864 6.136 9.864 6.8 9.2L11.6 4.4C12.704 3.296 12.704 1.504 11.6 0.4C10.496 -0.704 8.704 -0.704 7.6 0.4L2.8 5.2C1.256 6.744 1.256 9.256 2.8 10.8C4.344 12.344 6.856 12.344 8.4 10.8L12.4 6.8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(1.6, 2.4)" }) })
|
|
3495
3495
|
}
|
|
@@ -3500,8 +3500,8 @@ ${planToExecute}`;
|
|
|
3500
3500
|
{
|
|
3501
3501
|
onClick: () => setShowSettingsMenu(!showSettingsMenu),
|
|
3502
3502
|
className: cn(
|
|
3503
|
-
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-
|
|
3504
|
-
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-
|
|
3503
|
+
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3504
|
+
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-neutral-500 dark:!text-neutral-500"
|
|
3505
3505
|
),
|
|
3506
3506
|
title: "Settings",
|
|
3507
3507
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -3517,12 +3517,12 @@ ${planToExecute}`;
|
|
|
3517
3517
|
] })
|
|
3518
3518
|
}
|
|
3519
3519
|
),
|
|
3520
|
-
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-56 bg-white dark:bg-
|
|
3520
|
+
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-56 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg p-2.5 settings-menu-container", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "flex items-center justify-between cursor-pointer group", children: [
|
|
3521
3521
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
3522
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-
|
|
3522
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3523
3523
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
3524
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium text-
|
|
3525
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-
|
|
3524
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium text-neutral-700 dark:text-neutral-300", children: "Plan Mode" }),
|
|
3525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: "Review first" })
|
|
3526
3526
|
] })
|
|
3527
3527
|
] }),
|
|
3528
3528
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3534,7 +3534,7 @@ ${planToExecute}`;
|
|
|
3534
3534
|
},
|
|
3535
3535
|
className: cn(
|
|
3536
3536
|
"relative inline-flex h-4 w-8 items-center rounded-full transition-colors",
|
|
3537
|
-
internalPlanMode ? "bg-blue-600" : "bg-
|
|
3537
|
+
internalPlanMode ? "bg-blue-600" : "bg-neutral-300 dark:bg-neutral-600"
|
|
3538
3538
|
),
|
|
3539
3539
|
type: "button",
|
|
3540
3540
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3557,9 +3557,9 @@ ${planToExecute}`;
|
|
|
3557
3557
|
{
|
|
3558
3558
|
src: file.preview,
|
|
3559
3559
|
alt: file.name,
|
|
3560
|
-
className: "w-8 h-8 object-cover rounded border border-
|
|
3560
|
+
className: "w-8 h-8 object-cover rounded border border-neutral-300 dark:border-neutral-600"
|
|
3561
3561
|
}
|
|
3562
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center rounded border border-
|
|
3562
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800", title: file.name, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-neutral-500 dark:text-neutral-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z", clipRule: "evenodd" }) }) }),
|
|
3563
3563
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3564
3564
|
"button",
|
|
3565
3565
|
{
|
|
@@ -3583,7 +3583,7 @@ ${planToExecute}`;
|
|
|
3583
3583
|
}
|
|
3584
3584
|
},
|
|
3585
3585
|
placeholder,
|
|
3586
|
-
className: "flex-1 bg-transparent border-none focus:outline-none !text-
|
|
3586
|
+
className: "flex-1 bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1"
|
|
3587
3587
|
}
|
|
3588
3588
|
),
|
|
3589
3589
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3593,13 +3593,13 @@ ${planToExecute}`;
|
|
|
3593
3593
|
disabled: !command.trim(),
|
|
3594
3594
|
className: cn(
|
|
3595
3595
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3596
|
-
"border border-
|
|
3597
|
-
"bg-white dark:bg-
|
|
3598
|
-
"!text-
|
|
3599
|
-
"hover:bg-
|
|
3596
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3597
|
+
"bg-white dark:bg-neutral-800",
|
|
3598
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3599
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3600
3600
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3601
3601
|
"!text-lg",
|
|
3602
|
-
!command.trim() && "border-
|
|
3602
|
+
!command.trim() && "border-neutral-200 dark:border-neutral-700 !text-neutral-400 dark:!text-neutral-600"
|
|
3603
3603
|
),
|
|
3604
3604
|
title: "Execute",
|
|
3605
3605
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
@@ -3607,17 +3607,17 @@ ${planToExecute}`;
|
|
|
3607
3607
|
)
|
|
3608
3608
|
] }),
|
|
3609
3609
|
state === "loading" && !isCompact && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col items-center justify-center space-y-4 py-8", children: [
|
|
3610
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-6 h-6 border-2 border-
|
|
3611
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-6 h-6 border-2 border-neutral-300 border-t-blue-500 rounded-full animate-spin" }),
|
|
3611
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-600 dark:text-neutral-400 text-sm text-center max-w-md", children: enableStreaming && streamedContent ? streamedContent : loadingText }),
|
|
3612
3612
|
showProgress && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full max-w-sm", children: [
|
|
3613
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full bg-
|
|
3613
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full bg-neutral-200 dark:bg-neutral-700 rounded-full h-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3614
3614
|
"div",
|
|
3615
3615
|
{
|
|
3616
3616
|
className: "bg-blue-500 h-1.5 rounded-full transition-all duration-300",
|
|
3617
3617
|
style: { width: `${progress}%` }
|
|
3618
3618
|
}
|
|
3619
3619
|
) }),
|
|
3620
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-
|
|
3620
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-neutral-500 mt-2 text-center", children: [
|
|
3621
3621
|
progress,
|
|
3622
3622
|
"%"
|
|
3623
3623
|
] })
|
|
@@ -3625,8 +3625,8 @@ ${planToExecute}`;
|
|
|
3625
3625
|
] }),
|
|
3626
3626
|
state === "loading" && isCompact && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3627
3627
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex items-center gap-3 py-1", children: [
|
|
3628
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-
|
|
3629
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3628
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-neutral-300 border-t-blue-500 rounded-full animate-spin" }),
|
|
3629
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-600 dark:text-neutral-400 text-sm truncate", children: enableStreaming && streamedContent ? streamedContent : loadingText })
|
|
3630
3630
|
] }),
|
|
3631
3631
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3632
3632
|
"button",
|
|
@@ -3634,9 +3634,9 @@ ${planToExecute}`;
|
|
|
3634
3634
|
disabled: true,
|
|
3635
3635
|
className: cn(
|
|
3636
3636
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3637
|
-
"border border-
|
|
3638
|
-
"bg-white dark:bg-
|
|
3639
|
-
"!text-
|
|
3637
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
3638
|
+
"bg-white dark:bg-neutral-800",
|
|
3639
|
+
"!text-neutral-400 dark:!text-neutral-600",
|
|
3640
3640
|
"!text-lg",
|
|
3641
3641
|
"opacity-30 cursor-not-allowed"
|
|
3642
3642
|
),
|
|
@@ -3665,7 +3665,7 @@ ${planToExecute}`;
|
|
|
3665
3665
|
"button",
|
|
3666
3666
|
{
|
|
3667
3667
|
onClick: rejectPlan,
|
|
3668
|
-
className: "flex-1 px-4 py-2 bg-
|
|
3668
|
+
className: "flex-1 px-4 py-2 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-sm font-medium",
|
|
3669
3669
|
children: "Modify"
|
|
3670
3670
|
}
|
|
3671
3671
|
)
|
|
@@ -3696,7 +3696,7 @@ ${planToExecute}`;
|
|
|
3696
3696
|
"button",
|
|
3697
3697
|
{
|
|
3698
3698
|
onClick: rejectPlan,
|
|
3699
|
-
className: "px-3 py-1.5 bg-
|
|
3699
|
+
className: "px-3 py-1.5 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",
|
|
3700
3700
|
children: "Modify"
|
|
3701
3701
|
}
|
|
3702
3702
|
)
|
|
@@ -3722,7 +3722,7 @@ ${planToExecute}`;
|
|
|
3722
3722
|
}
|
|
3723
3723
|
},
|
|
3724
3724
|
placeholder,
|
|
3725
|
-
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none text-
|
|
3725
|
+
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none text-neutral-900 dark:text-white placeholder-neutral-400",
|
|
3726
3726
|
rows: 4
|
|
3727
3727
|
}
|
|
3728
3728
|
)
|
|
@@ -3735,7 +3735,7 @@ ${planToExecute}`;
|
|
|
3735
3735
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-green-700 dark:text-green-300 text-sm", children: "Command executed successfully" })
|
|
3736
3736
|
] })
|
|
3737
3737
|
] }),
|
|
3738
|
-
_optionalChain([result, 'access', _107 => _107.data, 'optionalAccess', _108 => _108.summary]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3738
|
+
_optionalChain([result, 'access', _107 => _107.data, 'optionalAccess', _108 => _108.summary]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-700 dark:text-neutral-300 text-sm leading-relaxed whitespace-pre-line", children: result.data.summary }),
|
|
3739
3739
|
result.widgets && result.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: result.widgets.map((widget) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3740
3740
|
WidgetRenderer,
|
|
3741
3741
|
{
|
|
@@ -3769,10 +3769,10 @@ ${planToExecute}`;
|
|
|
3769
3769
|
},
|
|
3770
3770
|
className: cn(
|
|
3771
3771
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3772
|
-
"border border-
|
|
3773
|
-
"bg-white dark:bg-
|
|
3774
|
-
"!text-
|
|
3775
|
-
"hover:bg-
|
|
3772
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3773
|
+
"bg-white dark:bg-neutral-800",
|
|
3774
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3775
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3776
3776
|
"!text-lg"
|
|
3777
3777
|
),
|
|
3778
3778
|
title: "New command",
|
|
@@ -3787,7 +3787,7 @@ ${planToExecute}`;
|
|
|
3787
3787
|
"button",
|
|
3788
3788
|
{
|
|
3789
3789
|
onClick: () => _optionalChain([fileInputRef, 'access', _109 => _109.current, 'optionalAccess', _110 => _110.click, 'call', _111 => _111()]),
|
|
3790
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-
|
|
3790
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-neutral-500 dark:!text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3791
3791
|
title: "Attach file",
|
|
3792
3792
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8.4 2.8L4.4 6.8C3.736 7.464 3.736 8.536 4.4 9.2C5.064 9.864 6.136 9.864 6.8 9.2L11.6 4.4C12.704 3.296 12.704 1.504 11.6 0.4C10.496 -0.704 8.704 -0.704 7.6 0.4L2.8 5.2C1.256 6.744 1.256 9.256 2.8 10.8C4.344 12.344 6.856 12.344 8.4 10.8L12.4 6.8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(1.6, 2.4)" }) })
|
|
3793
3793
|
}
|
|
@@ -3798,8 +3798,8 @@ ${planToExecute}`;
|
|
|
3798
3798
|
{
|
|
3799
3799
|
onClick: () => setShowSettingsMenu(!showSettingsMenu),
|
|
3800
3800
|
className: cn(
|
|
3801
|
-
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-
|
|
3802
|
-
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-
|
|
3801
|
+
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3802
|
+
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-neutral-500 dark:!text-neutral-500"
|
|
3803
3803
|
),
|
|
3804
3804
|
title: "Settings",
|
|
3805
3805
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -3815,12 +3815,12 @@ ${planToExecute}`;
|
|
|
3815
3815
|
] })
|
|
3816
3816
|
}
|
|
3817
3817
|
),
|
|
3818
|
-
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-64 bg-white dark:bg-
|
|
3818
|
+
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-64 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg p-3 settings-menu-container", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "flex items-center justify-between cursor-pointer group", children: [
|
|
3819
3819
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
3820
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-
|
|
3820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-neutral-500 dark:text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3821
3821
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
3822
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-medium text-
|
|
3823
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs text-
|
|
3822
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-medium text-neutral-700 dark:text-neutral-300", children: "Plan Mode" }),
|
|
3823
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs text-neutral-500 dark:text-neutral-400", children: "Review before executing" })
|
|
3824
3824
|
] })
|
|
3825
3825
|
] }),
|
|
3826
3826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3832,7 +3832,7 @@ ${planToExecute}`;
|
|
|
3832
3832
|
},
|
|
3833
3833
|
className: cn(
|
|
3834
3834
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
3835
|
-
internalPlanMode ? "bg-blue-600" : "bg-
|
|
3835
|
+
internalPlanMode ? "bg-blue-600" : "bg-neutral-300 dark:bg-neutral-600"
|
|
3836
3836
|
),
|
|
3837
3837
|
type: "button",
|
|
3838
3838
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3855,7 +3855,7 @@ ${planToExecute}`;
|
|
|
3855
3855
|
"button",
|
|
3856
3856
|
{
|
|
3857
3857
|
onClick: resetCommand,
|
|
3858
|
-
className: "px-3 py-1.5 text-sm text-
|
|
3858
|
+
className: "px-3 py-1.5 text-sm text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors",
|
|
3859
3859
|
children: "Reset"
|
|
3860
3860
|
}
|
|
3861
3861
|
),
|
|
@@ -3866,13 +3866,13 @@ ${planToExecute}`;
|
|
|
3866
3866
|
disabled: !command.trim(),
|
|
3867
3867
|
className: cn(
|
|
3868
3868
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all",
|
|
3869
|
-
"border border-
|
|
3870
|
-
"bg-white dark:bg-
|
|
3871
|
-
"!text-
|
|
3872
|
-
"hover:bg-
|
|
3869
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3870
|
+
"bg-white dark:bg-neutral-800",
|
|
3871
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3872
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3873
3873
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3874
3874
|
"!text-lg",
|
|
3875
|
-
!command.trim() && "border-
|
|
3875
|
+
!command.trim() && "border-neutral-200 dark:border-neutral-700 !text-neutral-400 dark:!text-neutral-600"
|
|
3876
3876
|
),
|
|
3877
3877
|
title: state === "error" ? "Retry" : "Execute",
|
|
3878
3878
|
children: state === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C9.65685 3 11.1257 3.82818 12 5.09091M12 3V5.09091M12 5.09091H9.81818", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
@@ -3880,28 +3880,28 @@ ${planToExecute}`;
|
|
|
3880
3880
|
)
|
|
3881
3881
|
] })
|
|
3882
3882
|
] }),
|
|
3883
|
-
showPlanDetails && isCompact && state === "plan-pending" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4", onClick: () => setShowPlanDetails(false), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-white dark:bg-
|
|
3884
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between p-6 border-b border-
|
|
3883
|
+
showPlanDetails && isCompact && state === "plan-pending" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4", onClick: () => setShowPlanDetails(false), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl max-w-2xl w-full max-h-[80vh] overflow-hidden", onClick: (e) => e.stopPropagation(), children: [
|
|
3884
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between p-6 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
3885
3885
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
3886
3886
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-6 h-6 text-blue-600 dark:text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3887
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold text-
|
|
3887
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold text-neutral-900 dark:text-white", children: "Proposed Execution Plan" })
|
|
3888
3888
|
] }),
|
|
3889
3889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3890
3890
|
"button",
|
|
3891
3891
|
{
|
|
3892
3892
|
onClick: () => setShowPlanDetails(false),
|
|
3893
|
-
className: "text-
|
|
3893
|
+
className: "text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",
|
|
3894
3894
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
3895
3895
|
}
|
|
3896
3896
|
)
|
|
3897
3897
|
] }),
|
|
3898
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-6 overflow-y-auto max-h-[calc(80vh-180px)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "prose prose-sm dark:prose-invert max-w-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3899
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end gap-3 p-6 border-t border-
|
|
3898
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-6 overflow-y-auto max-h-[calc(80vh-180px)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "prose prose-sm dark:prose-invert max-w-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-700 dark:text-neutral-300 whitespace-pre-line leading-relaxed", children: plan }) }) }),
|
|
3899
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end gap-3 p-6 border-t border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-800/50", children: [
|
|
3900
3900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3901
3901
|
"button",
|
|
3902
3902
|
{
|
|
3903
3903
|
onClick: rejectPlan,
|
|
3904
|
-
className: "px-6 py-2.5 bg-
|
|
3904
|
+
className: "px-6 py-2.5 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors font-medium",
|
|
3905
3905
|
children: "Modify Command"
|
|
3906
3906
|
}
|
|
3907
3907
|
),
|
|
@@ -4022,7 +4022,7 @@ function Prompt({
|
|
|
4022
4022
|
onBlur: handleBlur,
|
|
4023
4023
|
placeholder,
|
|
4024
4024
|
disabled: isLoading,
|
|
4025
|
-
className: "flex-1 px-4 py-2 border border-
|
|
4025
|
+
className: "flex-1 px-4 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-apteva-500 dark:bg-neutral-800 dark:border-neutral-600 dark:text-white"
|
|
4026
4026
|
}
|
|
4027
4027
|
),
|
|
4028
4028
|
submitOn === "button" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4035,7 +4035,7 @@ function Prompt({
|
|
|
4035
4035
|
}
|
|
4036
4036
|
)
|
|
4037
4037
|
] }),
|
|
4038
|
-
maxLength && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-
|
|
4038
|
+
maxLength && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-neutral-500", children: [
|
|
4039
4039
|
value.length,
|
|
4040
4040
|
" / ",
|
|
4041
4041
|
maxLength,
|
|
@@ -4045,12 +4045,12 @@ function Prompt({
|
|
|
4045
4045
|
"button",
|
|
4046
4046
|
{
|
|
4047
4047
|
onClick: () => setValue(suggestion),
|
|
4048
|
-
className: "px-3 py-1 text-sm bg-
|
|
4048
|
+
className: "px-3 py-1 text-sm bg-neutral-100 hover:bg-neutral-200 text-neutral-700 rounded-full transition-colors",
|
|
4049
4049
|
children: suggestion
|
|
4050
4050
|
},
|
|
4051
4051
|
idx
|
|
4052
4052
|
)) }),
|
|
4053
|
-
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm text-
|
|
4053
|
+
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm text-neutral-500", children: [
|
|
4054
4054
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-apteva-500 border-t-transparent rounded-full animate-spin" }),
|
|
4055
4055
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "AI is processing your request..." })
|
|
4056
4056
|
] })
|
|
@@ -4135,8 +4135,8 @@ function Stream({
|
|
|
4135
4135
|
};
|
|
4136
4136
|
const variantClasses = {
|
|
4137
4137
|
prose: "prose prose-sm max-w-none dark:prose-invert",
|
|
4138
|
-
code: "font-mono text-sm bg-
|
|
4139
|
-
plain: "text-
|
|
4138
|
+
code: "font-mono text-sm bg-neutral-900 text-green-400 p-4 rounded-lg",
|
|
4139
|
+
plain: "text-neutral-900 dark:text-neutral-100"
|
|
4140
4140
|
};
|
|
4141
4141
|
if (!isStreaming && !isComplete) {
|
|
4142
4142
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("p-4", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4169,9 +4169,9 @@ function ThreadItem({ thread, isActive = false, onSelect, onDelete }) {
|
|
|
4169
4169
|
onClick: onSelect,
|
|
4170
4170
|
children: [
|
|
4171
4171
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
4172
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold text-
|
|
4173
|
-
thread.preview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-
|
|
4174
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mt-1 text-xs text-
|
|
4172
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold text-neutral-900 dark:text-white truncate", children: thread.title }),
|
|
4173
|
+
thread.preview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-neutral-600 dark:text-neutral-400 truncate", children: thread.preview }),
|
|
4174
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mt-1 text-xs text-neutral-500", children: [
|
|
4175
4175
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
4176
4176
|
thread.messageCount,
|
|
4177
4177
|
" messages"
|
|
@@ -4187,7 +4187,7 @@ function ThreadItem({ thread, isActive = false, onSelect, onDelete }) {
|
|
|
4187
4187
|
e.stopPropagation();
|
|
4188
4188
|
onDelete();
|
|
4189
4189
|
},
|
|
4190
|
-
className: "p-2 text-
|
|
4190
|
+
className: "p-2 text-neutral-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",
|
|
4191
4191
|
title: "Delete thread",
|
|
4192
4192
|
children: "\u{1F5D1}\uFE0F"
|
|
4193
4193
|
}
|
|
@@ -4225,19 +4225,19 @@ function ThreadList({
|
|
|
4225
4225
|
);
|
|
4226
4226
|
const groupedThreads = groupBy === "date" ? groupThreadsByDate(filteredThreads) : { All: filteredThreads };
|
|
4227
4227
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col h-full", children: [
|
|
4228
|
-
showSearch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-
|
|
4228
|
+
showSearch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-neutral-200 dark:border-neutral-700", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4229
4229
|
"input",
|
|
4230
4230
|
{
|
|
4231
4231
|
type: "text",
|
|
4232
4232
|
placeholder: "Search conversations...",
|
|
4233
4233
|
value: searchQuery,
|
|
4234
4234
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
4235
|
-
className: "w-full px-3 py-2 text-sm border border-
|
|
4235
|
+
className: "w-full px-3 py-2 text-sm border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-apteva-500 dark:bg-neutral-800 dark:border-neutral-600 dark:text-white"
|
|
4236
4236
|
}
|
|
4237
4237
|
) }),
|
|
4238
4238
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 overflow-y-auto", children: [
|
|
4239
4239
|
Object.entries(groupedThreads).map(([group, groupThreads]) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
4240
|
-
groupBy !== "none" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-xs font-semibold text-
|
|
4240
|
+
groupBy !== "none" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-xs font-semibold text-neutral-500 uppercase", children: group }),
|
|
4241
4241
|
groupThreads.map((thread) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4242
4242
|
ThreadItem,
|
|
4243
4243
|
{
|
|
@@ -4249,7 +4249,7 @@ function ThreadList({
|
|
|
4249
4249
|
thread.id
|
|
4250
4250
|
))
|
|
4251
4251
|
] }, group)),
|
|
4252
|
-
filteredThreads.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-8 text-center text-
|
|
4252
|
+
filteredThreads.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-8 text-center text-neutral-500", children: [
|
|
4253
4253
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-10 h-10 mx-auto mb-2 opacity-50", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
4254
4254
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { children: "No conversations found" })
|
|
4255
4255
|
] })
|
|
@@ -4297,9 +4297,9 @@ function Threads({
|
|
|
4297
4297
|
className
|
|
4298
4298
|
}) {
|
|
4299
4299
|
const variantClasses = {
|
|
4300
|
-
sidebar: "h-full border-r border-
|
|
4301
|
-
dropdown: "absolute top-full left-0 right-0 mt-2 bg-white dark:bg-
|
|
4302
|
-
tabs: "flex gap-2 border-b border-
|
|
4300
|
+
sidebar: "h-full border-r border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900",
|
|
4301
|
+
dropdown: "absolute top-full left-0 right-0 mt-2 bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700 max-h-96 overflow-hidden",
|
|
4302
|
+
tabs: "flex gap-2 border-b border-neutral-200 dark:border-neutral-700 overflow-x-auto"
|
|
4303
4303
|
};
|
|
4304
4304
|
if (variant === "tabs") {
|
|
4305
4305
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn(variantClasses[variant], className), children: [
|
|
@@ -4309,7 +4309,7 @@ function Threads({
|
|
|
4309
4309
|
onClick: () => _optionalChain([onThreadSelect, 'optionalCall', _130 => _130(thread.id)]),
|
|
4310
4310
|
className: cn(
|
|
4311
4311
|
"px-4 py-2 whitespace-nowrap font-medium transition-colors",
|
|
4312
|
-
thread.id === currentThreadId ? "border-b-2 border-apteva-500 text-apteva-500" : "text-
|
|
4312
|
+
thread.id === currentThreadId ? "border-b-2 border-apteva-500 text-apteva-500" : "text-neutral-600 hover:text-neutral-900"
|
|
4313
4313
|
),
|
|
4314
4314
|
children: thread.title
|
|
4315
4315
|
},
|
|
@@ -4319,14 +4319,14 @@ function Threads({
|
|
|
4319
4319
|
"button",
|
|
4320
4320
|
{
|
|
4321
4321
|
onClick: onNewThread,
|
|
4322
|
-
className: "px-4 py-2 text-
|
|
4322
|
+
className: "px-4 py-2 text-neutral-600 hover:text-apteva-500 transition-colors font-medium",
|
|
4323
4323
|
children: "+ New"
|
|
4324
4324
|
}
|
|
4325
4325
|
)
|
|
4326
4326
|
] });
|
|
4327
4327
|
}
|
|
4328
4328
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn(variantClasses[variant], "flex flex-col", className), children: [
|
|
4329
|
-
showNewButton && onNewThread && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-
|
|
4329
|
+
showNewButton && onNewThread && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-neutral-200 dark:border-neutral-700", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4330
4330
|
"button",
|
|
4331
4331
|
{
|
|
4332
4332
|
onClick: onNewThread,
|