@usecrow/ui 0.1.73 → 0.1.74

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 CHANGED
@@ -2385,6 +2385,13 @@ function useCopilotStyles2() {
2385
2385
  const context = React3.useContext(CopilotStyleContext);
2386
2386
  return context?.styles ?? DEFAULT_COPILOT_STYLES;
2387
2387
  }
2388
+ function useActiveStyles() {
2389
+ const copilotContext = React3.useContext(CopilotStyleContext);
2390
+ const widgetContext = React3.useContext(WidgetStyleContext);
2391
+ if (copilotContext) return copilotContext.styles;
2392
+ if (widgetContext) return widgetContext.styles;
2393
+ return DEFAULT_COPILOT_STYLES;
2394
+ }
2388
2395
  var PASSTHROUGH_KEYS = /* @__PURE__ */ new Set(["Escape", "Tab"]);
2389
2396
  function ShadowContainer({
2390
2397
  children,
@@ -2922,6 +2929,7 @@ function ReasoningTrace({
2922
2929
  ] }) });
2923
2930
  }
2924
2931
  function WaitingIndicator() {
2932
+ const mutedColor = useActiveStyles().colors.text + "80";
2925
2933
  const [messageIndex, setMessageIndex] = React3.useState(
2926
2934
  () => Math.floor(Math.random() * THINKING_MESSAGES.length)
2927
2935
  );
@@ -2932,7 +2940,7 @@ function WaitingIndicator() {
2932
2940
  return () => clearInterval(interval);
2933
2941
  }, []);
2934
2942
  const message = THINKING_MESSAGES[messageIndex] + "...";
2935
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-gap-1.5 crow-text-xs crow-text-gray-500", children: [
2943
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-gap-1.5 crow-text-xs", style: { color: mutedColor }, children: [
2936
2944
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-flex crow-items-center crow-justify-center crow-w-4 crow-h-4", children: /* @__PURE__ */ jsxRuntime.jsx(ShimmeringContent, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Brain, { className: "crow-w-3.5 crow-h-3.5" }) }) }),
2937
2945
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(ShimmeringContent, { children: message }) })
2938
2946
  ] });
@@ -2941,6 +2949,8 @@ function ThinkingBlock({
2941
2949
  thinking,
2942
2950
  isComplete
2943
2951
  }) {
2952
+ const themeColors = useActiveStyles().colors;
2953
+ const mutedColor = themeColors.text + "80";
2944
2954
  const [isExpanded, setIsExpanded] = React3.useState(!isComplete);
2945
2955
  const [messageIndex, setMessageIndex] = React3.useState(
2946
2956
  () => Math.floor(Math.random() * THINKING_MESSAGES.length)
@@ -2962,7 +2972,8 @@ function ThinkingBlock({
2962
2972
  "button",
2963
2973
  {
2964
2974
  onClick: () => setIsExpanded(!isExpanded),
2965
- className: `crow-flex crow-items-center crow-gap-1.5 crow-select-none crow-transition-colors ${isInProgress ? "crow-text-gray-500" : "crow-text-gray-600 hover:crow-text-gray-800"} crow-cursor-pointer`,
2975
+ className: "crow-flex crow-items-center crow-gap-1.5 crow-select-none crow-transition-colors crow-cursor-pointer",
2976
+ style: { color: mutedColor },
2966
2977
  children: [
2967
2978
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-flex crow-items-center crow-justify-center crow-w-4 crow-h-4", children: isInProgress ? /* @__PURE__ */ jsxRuntime.jsx(ShimmeringContent, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Brain, { className: "crow-w-3.5 crow-h-3.5" }) }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Brain, { className: "crow-w-3.5 crow-h-3.5" }) }),
2968
2979
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-font-medium", children: isInProgress ? /* @__PURE__ */ jsxRuntime.jsx(ShimmeringContent, { children: message }) : "Thought" }),
@@ -2987,10 +2998,11 @@ function ThinkingBlock({
2987
2998
  exit: { height: 0, opacity: 0 },
2988
2999
  transition: { duration: 0.15 },
2989
3000
  className: "crow-overflow-hidden",
2990
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-border-l-2 crow-border-gray-200 crow-pl-3 crow-ml-2", children: /* @__PURE__ */ jsxRuntime.jsx(
3001
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-border-l-2 crow-pl-3 crow-ml-2", style: { borderColor: themeColors.border }, children: /* @__PURE__ */ jsxRuntime.jsx(
2991
3002
  "div",
2992
3003
  {
2993
- className: `crow-text-xs crow-leading-relaxed crow-whitespace-pre-wrap ${isComplete ? "crow-text-gray-500" : "crow-text-gray-600"}`,
3004
+ className: "crow-text-xs crow-leading-relaxed crow-whitespace-pre-wrap",
3005
+ style: { color: mutedColor },
2994
3006
  children: thinking
2995
3007
  }
2996
3008
  ) })
@@ -3020,6 +3032,8 @@ function ToolCallBlock({
3020
3032
  toolRenderers,
3021
3033
  onToolConsent
3022
3034
  }) {
3035
+ const themeColors = useActiveStyles().colors;
3036
+ const mutedColor = themeColors.text + "80";
3023
3037
  const [expanded, setExpanded] = React3.useState(false);
3024
3038
  const hasArgs = Object.keys(toolCall.arguments || {}).length > 0;
3025
3039
  const isExecuting = toolCall.status === "executing";
@@ -3033,13 +3047,15 @@ function ToolCallBlock({
3033
3047
  /* @__PURE__ */ jsxRuntime.jsxs(
3034
3048
  "div",
3035
3049
  {
3036
- className: `crow-flex crow-items-center crow-gap-1.5 crow-select-none crow-transition-colors ${isExecuting || isAwaitingConsent ? "crow-text-gray-500" : "crow-text-gray-600"}`,
3050
+ className: "crow-flex crow-items-center crow-gap-1.5 crow-select-none crow-transition-colors",
3051
+ style: { color: mutedColor },
3037
3052
  children: [
3038
3053
  hasArgs && !isAwaitingConsent && /* @__PURE__ */ jsxRuntime.jsx(
3039
3054
  "button",
3040
3055
  {
3041
3056
  onClick: () => setExpanded(!expanded),
3042
- className: "crow-cursor-pointer hover:crow-text-gray-800",
3057
+ className: "crow-cursor-pointer",
3058
+ style: { color: mutedColor },
3043
3059
  children: /* @__PURE__ */ jsxRuntime.jsx(
3044
3060
  framerMotion.motion.div,
3045
3061
  {
@@ -3054,7 +3070,7 @@ function ToolCallBlock({
3054
3070
  isExecuting && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "crow-w-3 crow-h-3 crow-animate-spin crow-text-blue-500" }),
3055
3071
  isComplete && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "crow-w-3 crow-h-3 crow-text-green-500" }),
3056
3072
  isError && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-w-3 crow-h-3 crow-text-red-500", children: "\u2715" }),
3057
- isDenied && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-w-3 crow-h-3 crow-text-gray-400", children: "\u2715" }),
3073
+ isDenied && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-w-3 crow-h-3", style: { color: mutedColor }, children: "\u2715" }),
3058
3074
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-font-medium", children: toolCall.displayName || toolCall.name }),
3059
3075
  isAwaitingConsent && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3060
3076
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-amber-500", children: "needs permission" }),
@@ -3071,16 +3087,16 @@ function ToolCallBlock({
3071
3087
  "button",
3072
3088
  {
3073
3089
  onClick: () => onToolConsent?.(toolCall.id, false),
3074
- className: "crow-px-2 crow-py-0.5 crow-rounded crow-border crow-text-xs crow-font-medium crow-text-gray-500 crow-cursor-pointer",
3075
- style: { borderColor: "#d1d5db", backgroundColor: "transparent" },
3090
+ className: "crow-px-2 crow-py-0.5 crow-rounded crow-border crow-text-xs crow-font-medium crow-cursor-pointer",
3091
+ style: { borderColor: themeColors.border, backgroundColor: "transparent", color: mutedColor },
3076
3092
  children: "Deny"
3077
3093
  }
3078
3094
  )
3079
3095
  ] }),
3080
- isExecuting && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-gray-400", children: "running..." }),
3081
- isComplete && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-gray-400", children: "done" }),
3082
- isError && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-gray-400", children: "failed" }),
3083
- isDenied && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-gray-400", children: "denied" })
3096
+ isExecuting && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: mutedColor }, children: "running..." }),
3097
+ isComplete && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: mutedColor }, children: "done" }),
3098
+ isError && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: mutedColor }, children: "failed" }),
3099
+ isDenied && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: mutedColor }, children: "denied" })
3084
3100
  ]
3085
3101
  }
3086
3102
  ),
@@ -3181,7 +3197,7 @@ function MessageBubble({
3181
3197
  toolRenderers,
3182
3198
  onToolConsent
3183
3199
  }) {
3184
- const styles = useWidgetStyles2();
3200
+ const styles = useActiveStyles();
3185
3201
  const showThinkingSetting = useShowThinking();
3186
3202
  const isWaiting = message.content === "Thinking..." || message.isBot && isLoading && !message.content;
3187
3203
  const hasThinking = message.isBot && message.thinking;
@@ -3300,7 +3316,7 @@ function MessageList({
3300
3316
  }) });
3301
3317
  }
3302
3318
  var MessagesContainer = React3.forwardRef(({ children }, ref) => {
3303
- const styles = useWidgetStyles2();
3319
+ const styles = useActiveStyles();
3304
3320
  const internalRef = React3.useRef(null);
3305
3321
  const lastScrollHeightRef = React3.useRef(0);
3306
3322
  const isUserScrollingRef = React3.useRef(false);
@@ -3362,26 +3378,92 @@ function ConversationList({
3362
3378
  onSelect,
3363
3379
  onClose
3364
3380
  }) {
3381
+ const styles = useActiveStyles();
3365
3382
  return /* @__PURE__ */ jsxRuntime.jsxs(
3366
3383
  framerMotion.motion.div,
3367
3384
  {
3368
3385
  initial: { opacity: 0, height: 0 },
3369
3386
  animate: { opacity: 1, height: "auto" },
3370
3387
  exit: { opacity: 0, height: 0 },
3371
- className: "crow-mb-3 crow-rounded-xl crow-bg-gray-50 crow-border crow-border-gray-200",
3388
+ className: "crow-mb-3 crow-rounded-xl crow-border",
3389
+ style: {
3390
+ background: styles.colors.text + "08",
3391
+ borderColor: styles.colors.border
3392
+ },
3372
3393
  children: [
3373
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-p-2 crow-border-b crow-border-gray-200 crow-flex crow-justify-between crow-items-center", children: [
3374
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-sm crow-font-medium crow-text-gray-700", children: "Recent Conversations" }),
3375
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "crow-p-1 hover:crow-bg-gray-200 crow-rounded", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 14, className: "crow-text-gray-500" }) })
3376
- ] }),
3377
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-max-h-[200px] crow-overflow-y-auto", children: conversations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-p-4 crow-text-center crow-text-sm crow-text-gray-500", children: "No conversations yet" }) : conversations.map((conv) => /* @__PURE__ */ jsxRuntime.jsxs(
3394
+ /* @__PURE__ */ jsxRuntime.jsxs(
3395
+ "div",
3396
+ {
3397
+ className: "crow-p-2 crow-border-b crow-flex crow-justify-between crow-items-center",
3398
+ style: { borderColor: styles.colors.border },
3399
+ children: [
3400
+ /* @__PURE__ */ jsxRuntime.jsx(
3401
+ "span",
3402
+ {
3403
+ className: "crow-text-sm crow-font-medium",
3404
+ style: { color: styles.colors.text + "cc" },
3405
+ children: "Recent Conversations"
3406
+ }
3407
+ ),
3408
+ /* @__PURE__ */ jsxRuntime.jsx(
3409
+ "button",
3410
+ {
3411
+ onClick: onClose,
3412
+ className: "crow-p-1 crow-rounded",
3413
+ style: { color: styles.colors.text + "80" },
3414
+ onMouseEnter: (e) => {
3415
+ e.currentTarget.style.background = styles.colors.text + "10";
3416
+ },
3417
+ onMouseLeave: (e) => {
3418
+ e.currentTarget.style.background = "transparent";
3419
+ },
3420
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 14 })
3421
+ }
3422
+ )
3423
+ ]
3424
+ }
3425
+ ),
3426
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-max-h-[200px] crow-overflow-y-auto", children: conversations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
3427
+ "div",
3428
+ {
3429
+ className: "crow-p-4 crow-text-center crow-text-sm",
3430
+ style: { color: styles.colors.text + "80" },
3431
+ children: "No conversations yet"
3432
+ }
3433
+ ) : conversations.map((conv) => /* @__PURE__ */ jsxRuntime.jsxs(
3378
3434
  "button",
3379
3435
  {
3380
3436
  onClick: () => onSelect(conv.id),
3381
- className: `crow-w-full crow-p-3 crow-text-left hover:crow-bg-gray-100 crow-transition-colors crow-border-b crow-border-gray-100 last:crow-border-0 ${currentConversationId === conv.id ? "crow-bg-blue-50" : ""}`,
3437
+ className: "crow-w-full crow-p-3 crow-text-left crow-transition-colors crow-border-b last:crow-border-0",
3438
+ style: {
3439
+ borderColor: styles.colors.border,
3440
+ background: currentConversationId === conv.id ? styles.colors.primary + "18" : "transparent"
3441
+ },
3442
+ onMouseEnter: (e) => {
3443
+ if (currentConversationId !== conv.id) {
3444
+ e.currentTarget.style.background = styles.colors.text + "08";
3445
+ }
3446
+ },
3447
+ onMouseLeave: (e) => {
3448
+ e.currentTarget.style.background = currentConversationId === conv.id ? styles.colors.primary + "18" : "transparent";
3449
+ },
3382
3450
  children: [
3383
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-text-sm crow-font-medium crow-text-gray-800 crow-truncate", children: conv.name || "Untitled conversation" }),
3384
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-text-xs crow-text-gray-500 crow-mt-0.5", children: formatConversationDate(conv.updated_at) })
3451
+ /* @__PURE__ */ jsxRuntime.jsx(
3452
+ "div",
3453
+ {
3454
+ className: "crow-text-sm crow-font-medium crow-truncate",
3455
+ style: { color: styles.colors.text },
3456
+ children: conv.name || "Untitled conversation"
3457
+ }
3458
+ ),
3459
+ /* @__PURE__ */ jsxRuntime.jsx(
3460
+ "div",
3461
+ {
3462
+ className: "crow-text-xs crow-mt-0.5",
3463
+ style: { color: styles.colors.text + "80" },
3464
+ children: formatConversationDate(conv.updated_at)
3465
+ }
3466
+ )
3385
3467
  ]
3386
3468
  },
3387
3469
  conv.id
@@ -3398,14 +3480,26 @@ function WorkflowPanel({ workflow, onExit }) {
3398
3480
  animate: { opacity: 1, y: 0 },
3399
3481
  exit: { opacity: 0, y: -10 },
3400
3482
  transition: { duration: 0.3 },
3401
- className: "crow-mb-3 crow-p-3 crow-rounded-xl crow-bg-gray-50 crow-border crow-border-gray-200",
3483
+ className: "crow-mb-3 crow-p-3 crow-rounded-xl crow-border",
3484
+ style: {
3485
+ background: "var(--crow-bg-hover, rgba(0,0,0,0.04))",
3486
+ borderColor: "var(--crow-border, #e5e7eb)"
3487
+ },
3402
3488
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-justify-between", children: [
3403
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-text-sm crow-font-medium crow-text-gray-900 crow-flex crow-items-center crow-gap-1", children: workflow.name }),
3489
+ /* @__PURE__ */ jsxRuntime.jsx(
3490
+ "span",
3491
+ {
3492
+ className: "crow-text-sm crow-font-medium crow-flex crow-items-center crow-gap-1",
3493
+ style: { color: "var(--crow-text, #111827)" },
3494
+ children: workflow.name
3495
+ }
3496
+ ),
3404
3497
  /* @__PURE__ */ jsxRuntime.jsx(
3405
3498
  "button",
3406
3499
  {
3407
3500
  onClick: onExit,
3408
- className: "crow-text-xs crow-text-gray-500 hover:crow-text-gray-700 crow-underline",
3501
+ className: "crow-text-xs crow-underline",
3502
+ style: { color: "var(--crow-text-muted, #6b7280)" },
3409
3503
  children: "Exit"
3410
3504
  }
3411
3505
  )
@@ -3414,12 +3508,14 @@ function WorkflowPanel({ workflow, onExit }) {
3414
3508
  );
3415
3509
  }
3416
3510
  function PoweredByBadge({ apiUrl = "" }) {
3417
- const styles = useWidgetStyles2();
3511
+ const styles = useActiveStyles();
3418
3512
  const branding = styles.branding;
3419
3513
  if (!branding.showPoweredBy) return null;
3420
- const logoUrl = branding.logoUrl?.startsWith("http") ? branding.logoUrl : `${apiUrl}${branding.logoUrl}`;
3421
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-justify-center crow-gap-1.5 crow-mb-3 crow-text-xs crow-text-gray-400", children: [
3422
- branding.showLogo && logoUrl && /* @__PURE__ */ jsxRuntime.jsx(
3514
+ const showLogo = "showLogo" in branding ? branding.showLogo : false;
3515
+ const rawLogoUrl = "logoUrl" in branding ? branding.logoUrl : void 0;
3516
+ const logoUrl = rawLogoUrl?.startsWith("http") ? rawLogoUrl : rawLogoUrl ? `${apiUrl}${rawLogoUrl}` : void 0;
3517
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-justify-center crow-gap-1.5 crow-mb-3 crow-text-xs", style: { color: "var(--crow-text-muted, #9ca3af)" }, children: [
3518
+ showLogo && logoUrl && /* @__PURE__ */ jsxRuntime.jsx(
3423
3519
  "img",
3424
3520
  {
3425
3521
  src: logoUrl,
@@ -3466,10 +3562,10 @@ var ModelSelector = ({
3466
3562
  disabled,
3467
3563
  className: cn(
3468
3564
  "crow-flex crow-items-center crow-gap-1 crow-px-2 crow-py-1 crow-rounded-md crow-text-xs",
3469
- "crow-bg-transparent crow-text-gray-400",
3470
- "hover:crow-text-gray-700 crow-transition-colors",
3565
+ "crow-bg-transparent crow-transition-colors",
3471
3566
  disabled ? "crow-opacity-50 crow-cursor-not-allowed" : "crow-cursor-pointer"
3472
3567
  ),
3568
+ style: { color: "var(--crow-text-muted, #9ca3af)" },
3473
3569
  children: [
3474
3570
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedModelData?.name || "Select Model" }),
3475
3571
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3484,28 +3580,48 @@ var ModelSelector = ({
3484
3580
  ]
3485
3581
  }
3486
3582
  ),
3487
- isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-absolute crow-bottom-full crow-mb-2 crow-left-0 crow-min-w-[180px] crow-bg-white crow-border crow-border-gray-200 crow-rounded-xl crow-shadow-lg crow-z-50 crow-overflow-hidden", children: Object.entries(groupedModels).map(([provider, providerModels]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3488
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-px-3 crow-py-1.5 crow-text-xs crow-font-medium crow-text-gray-400 crow-uppercase crow-tracking-wide crow-bg-gray-50", children: provider }),
3489
- providerModels.map((model) => /* @__PURE__ */ jsxRuntime.jsxs(
3490
- "button",
3491
- {
3492
- onClick: () => {
3493
- onModelChange(model.id);
3494
- setIsOpen(false);
3495
- },
3496
- className: cn(
3497
- "crow-w-full crow-flex crow-items-center crow-justify-between crow-px-3 crow-py-1.5 crow-text-sm",
3498
- "hover:crow-bg-gray-100 crow-transition-colors",
3499
- model.id === selectedModel ? "crow-text-gray-900" : "crow-text-gray-600"
3583
+ isOpen && /* @__PURE__ */ jsxRuntime.jsx(
3584
+ "div",
3585
+ {
3586
+ className: "crow-absolute crow-bottom-full crow-mb-2 crow-left-0 crow-min-w-[180px] crow-rounded-xl crow-shadow-lg crow-z-50 crow-overflow-hidden crow-border",
3587
+ style: { background: "var(--crow-bg, #ffffff)", borderColor: "var(--crow-border, #e5e7eb)" },
3588
+ children: Object.entries(groupedModels).map(([provider, providerModels]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3589
+ /* @__PURE__ */ jsxRuntime.jsx(
3590
+ "div",
3591
+ {
3592
+ className: "crow-px-3 crow-py-1.5 crow-text-xs crow-font-medium crow-uppercase crow-tracking-wide",
3593
+ style: {
3594
+ color: "var(--crow-text-muted, #9ca3af)",
3595
+ background: "var(--crow-bg-hover, rgba(0,0,0,0.04))"
3596
+ },
3597
+ children: provider
3598
+ }
3500
3599
  ),
3501
- children: [
3502
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: model.name }),
3503
- model.id === selectedModel && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "crow-w-4 crow-h-4 crow-text-green-500" })
3504
- ]
3505
- },
3506
- model.id
3507
- ))
3508
- ] }, provider)) })
3600
+ providerModels.map((model) => /* @__PURE__ */ jsxRuntime.jsxs(
3601
+ "button",
3602
+ {
3603
+ onClick: () => {
3604
+ onModelChange(model.id);
3605
+ setIsOpen(false);
3606
+ },
3607
+ className: "crow-w-full crow-flex crow-items-center crow-justify-between crow-px-3 crow-py-1.5 crow-text-sm crow-transition-colors",
3608
+ style: { color: model.id === selectedModel ? "var(--crow-text, #111827)" : "var(--crow-text-muted, #4b5563)" },
3609
+ onMouseEnter: (e) => {
3610
+ e.currentTarget.style.background = "var(--crow-bg-hover, rgba(0,0,0,0.04))";
3611
+ },
3612
+ onMouseLeave: (e) => {
3613
+ e.currentTarget.style.background = "transparent";
3614
+ },
3615
+ children: [
3616
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: model.name }),
3617
+ model.id === selectedModel && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "crow-w-4 crow-h-4 crow-text-green-500" })
3618
+ ]
3619
+ },
3620
+ model.id
3621
+ ))
3622
+ ] }, provider))
3623
+ }
3624
+ )
3509
3625
  ] });
3510
3626
  };
3511
3627
  var isMediaRecorderSupported = () => {
@@ -3706,9 +3822,12 @@ var Textarea = React3__default.default.forwardRef(
3706
3822
  "textarea",
3707
3823
  {
3708
3824
  className: cn(
3709
- "crow-flex crow-w-full crow-rounded-md crow-border-none crow-bg-transparent crow-px-3 crow-py-1.5 crow-text-base crow-text-gray-900 placeholder:crow-text-gray-500 focus-visible:crow-outline-none focus-visible:crow-ring-0 disabled:crow-cursor-not-allowed disabled:crow-opacity-50 crow-min-h-[32px] crow-resize-none",
3825
+ "crow-flex crow-w-full crow-rounded-md crow-border-none crow-bg-transparent crow-px-3 crow-py-1.5 crow-text-base focus-visible:crow-outline-none focus-visible:crow-ring-0 disabled:crow-cursor-not-allowed disabled:crow-opacity-50 crow-min-h-[32px] crow-resize-none",
3710
3826
  className
3711
3827
  ),
3828
+ style: {
3829
+ color: "inherit"
3830
+ },
3712
3831
  ref,
3713
3832
  rows: 1,
3714
3833
  ...props
@@ -3725,9 +3844,10 @@ var TooltipContent = React3__default.default.forwardRef(({ className, sideOffset
3725
3844
  ref,
3726
3845
  sideOffset,
3727
3846
  className: cn(
3728
- "crow-z-50 crow-overflow-hidden crow-rounded-md crow-border crow-border-gray-300 crow-bg-white crow-text-gray-900 crow-px-3 crow-py-1.5 crow-text-sm crow-shadow-md",
3847
+ "crow-z-50 crow-overflow-hidden crow-rounded-md crow-border crow-px-3 crow-py-1.5 crow-text-sm crow-shadow-md",
3729
3848
  className
3730
3849
  ),
3850
+ style: { background: "var(--crow-bg, #ffffff)", borderColor: "var(--crow-border, #d1d5db)", color: "var(--crow-text, #111827)" },
3731
3851
  ...props
3732
3852
  }
3733
3853
  ));
@@ -3735,9 +3855,9 @@ TooltipContent.displayName = "TooltipContent";
3735
3855
  var Button = React3__default.default.forwardRef(
3736
3856
  ({ className, variant = "default", size = "default", ...props }, ref) => {
3737
3857
  const variantClasses = {
3738
- default: "crow-bg-black hover:crow-bg-gray-800 crow-text-white",
3739
- outline: "crow-border crow-bg-transparent hover:crow-bg-gray-100",
3740
- ghost: "crow-bg-transparent hover:crow-bg-gray-100"
3858
+ default: "crow-text-white",
3859
+ outline: "crow-border crow-bg-transparent",
3860
+ ghost: "crow-bg-transparent"
3741
3861
  };
3742
3862
  const sizeClasses = {
3743
3863
  default: "crow-h-10 crow-px-4 crow-py-2",
@@ -3810,11 +3930,16 @@ var PromptInput = React3__default.default.forwardRef(
3810
3930
  {
3811
3931
  ref,
3812
3932
  className: cn(
3813
- "crow-rounded-3xl crow-border crow-border-gray-300 crow-bg-white crow-p-1.5 crow-shadow-lg crow-transition-all crow-duration-300",
3933
+ "crow-rounded-3xl crow-border crow-p-1.5 crow-shadow-lg crow-transition-all crow-duration-300",
3814
3934
  isLoading && "crow-border-red-500",
3815
3935
  className
3816
3936
  ),
3817
- style,
3937
+ style: {
3938
+ background: "var(--crow-bg, #ffffff)",
3939
+ color: "var(--crow-text, #111827)",
3940
+ borderColor: isLoading ? void 0 : "var(--crow-border, #d1d5db)",
3941
+ ...style
3942
+ },
3818
3943
  children
3819
3944
  }
3820
3945
  )
@@ -3897,6 +4022,7 @@ var PromptInputBox = React3__default.default.forwardRef(
3897
4022
  backendUrl = "",
3898
4023
  triggerVoiceRecording = 0
3899
4024
  }, ref) => {
4025
+ const themeStyles = useActiveStyles();
3900
4026
  const [input, setInput] = React3__default.default.useState("");
3901
4027
  const promptBoxRef = React3__default.default.useRef(null);
3902
4028
  const voice = useVoiceInput({ backendUrl, silenceTimeoutMs: 1500 });
@@ -3950,10 +4076,15 @@ var PromptInputBox = React3__default.default.forwardRef(
3950
4076
  highlighted && "crow-ring-4 crow-ring-offset-2 crow-animate-pulse crow-shadow-[0_0_20px_rgba(0,0,0,0.25)]",
3951
4077
  className
3952
4078
  ),
3953
- style: highlighted ? {
3954
- "--tw-ring-color": "var(--crow-user-bubble, #000)",
3955
- "--tw-ring-offset-color": "var(--crow-background, #fff)"
3956
- } : void 0,
4079
+ style: {
4080
+ background: themeStyles.colors.background,
4081
+ color: themeStyles.colors.text,
4082
+ borderColor: themeStyles.colors.border,
4083
+ ...highlighted ? {
4084
+ "--tw-ring-color": themeStyles.colors.userBubble,
4085
+ "--tw-ring-offset-color": themeStyles.colors.background
4086
+ } : {}
4087
+ },
3957
4088
  disabled: isLoading,
3958
4089
  ref: ref || promptBoxRef,
3959
4090
  children: [
@@ -3993,10 +4124,8 @@ var PromptInputBox = React3__default.default.forwardRef(
3993
4124
  /* @__PURE__ */ jsxRuntime.jsx(
3994
4125
  lucideReact.Mic,
3995
4126
  {
3996
- className: cn(
3997
- "crow-h-3.5 crow-w-3.5 crow-transition-colors",
3998
- voice.isRecording ? "crow-text-red-500" : "crow-text-gray-400"
3999
- )
4127
+ className: "crow-h-3.5 crow-w-3.5 crow-transition-colors",
4128
+ style: { color: voice.isRecording ? "#ef4444" : "var(--crow-text-muted, #9ca3af)" }
4000
4129
  }
4001
4130
  ),
4002
4131
  voice.isRecording && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "crow-absolute crow-top-0 crow-right-0 crow-h-2 crow-w-2 crow-rounded-full crow-bg-red-500 crow-animate-pulse" })
@@ -4014,12 +4143,10 @@ var PromptInputBox = React3__default.default.forwardRef(
4014
4143
  {
4015
4144
  variant: "default",
4016
4145
  size: "icon",
4017
- className: cn(
4018
- "crow-h-7 crow-w-7 crow-rounded-full crow-transition-all crow-duration-200",
4019
- (isLoading || showStopButton) && "crow-bg-red-500 hover:crow-bg-red-500",
4020
- hasContent && !isLoading && !showStopButton && "crow-bg-black hover:crow-bg-gray-800",
4021
- !hasContent && !isLoading && !showStopButton && "crow-bg-transparent"
4022
- ),
4146
+ className: "crow-h-7 crow-w-7 crow-rounded-full crow-transition-all crow-duration-200",
4147
+ style: {
4148
+ background: isLoading || showStopButton ? "#ef4444" : hasContent ? "var(--crow-primary, #000000)" : "transparent"
4149
+ },
4023
4150
  onClick: () => {
4024
4151
  if ((isLoading || showStopButton) && onStop) {
4025
4152
  onStop();
@@ -4036,10 +4163,8 @@ var PromptInputBox = React3__default.default.forwardRef(
4036
4163
  ) : /* @__PURE__ */ jsxRuntime.jsx(
4037
4164
  lucideReact.ArrowUp,
4038
4165
  {
4039
- className: cn(
4040
- "crow-h-3.5 crow-w-3.5",
4041
- hasContent ? "crow-text-white" : "crow-text-gray-400"
4042
- )
4166
+ className: "crow-h-3.5 crow-w-3.5",
4167
+ style: { color: hasContent ? "white" : "var(--crow-text-muted, #9ca3af)" }
4043
4168
  }
4044
4169
  )
4045
4170
  }
@@ -4059,7 +4184,7 @@ function BrowserUseConfirmation({
4059
4184
  onAllow,
4060
4185
  onDeny
4061
4186
  }) {
4062
- const styles = useWidgetStyles2();
4187
+ const styles = useActiveStyles();
4063
4188
  return /* @__PURE__ */ jsxRuntime.jsx(
4064
4189
  "div",
4065
4190
  {
@@ -4141,7 +4266,7 @@ function BrowserUseQuestion({
4141
4266
  question,
4142
4267
  onSubmit
4143
4268
  }) {
4144
- const styles = useWidgetStyles2();
4269
+ const styles = useActiveStyles();
4145
4270
  const [answer, setAnswer] = React3.useState("");
4146
4271
  const [isSubmitting, setIsSubmitting] = React3.useState(false);
4147
4272
  const handleSubmit = React3.useCallback(() => {
@@ -4228,15 +4353,15 @@ function SuggestedActions({
4228
4353
  actions,
4229
4354
  onActionClick
4230
4355
  }) {
4231
- const styles = useWidgetStyles2();
4356
+ const styles = useActiveStyles();
4232
4357
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-flex crow-flex-wrap crow-gap-2 crow-px-1 crow-pb-2", children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
4233
4358
  "button",
4234
4359
  {
4235
4360
  onClick: () => onActionClick(action),
4236
4361
  className: "crow-rounded-full crow-border crow-px-3 crow-py-1.5 crow-text-sm crow-font-medium crow-transition-colors hover:crow-opacity-80 crow-cursor-pointer",
4237
4362
  style: {
4238
- borderColor: styles.colors.primary,
4239
- color: styles.colors.primary,
4363
+ borderColor: styles.colors.border,
4364
+ color: styles.colors.text,
4240
4365
  background: "transparent"
4241
4366
  },
4242
4367
  children: action.label
@@ -6095,7 +6220,20 @@ function CrowCopilot({
6095
6220
  lineHeight: styles.typography.lineHeight,
6096
6221
  letterSpacing: styles.typography.letterSpacing,
6097
6222
  background: styles.colors.background,
6098
- borderColor: styles.colors.border
6223
+ borderColor: styles.colors.border,
6224
+ // CSS variables for dark mode / theme propagation
6225
+ "--crow-primary": styles.colors.primary,
6226
+ "--crow-bg": styles.colors.background,
6227
+ "--crow-text": styles.colors.text,
6228
+ "--crow-border": styles.colors.border,
6229
+ "--crow-bot-bubble": styles.colors.botBubble,
6230
+ "--crow-bot-text": styles.colors.botText,
6231
+ "--crow-user-bubble": styles.colors.userBubble,
6232
+ "--crow-user-text": styles.colors.userText,
6233
+ "--crow-messages-bg": styles.colors.messagesBackground,
6234
+ "--crow-text-muted": styles.colors.text + "80",
6235
+ "--crow-bg-hover": styles.colors.text + "10",
6236
+ "--crow-bg-active": styles.colors.text + "18"
6099
6237
  },
6100
6238
  children: [
6101
6239
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6121,8 +6259,10 @@ function CrowCopilot({
6121
6259
  return /* @__PURE__ */ jsxRuntime.jsxs(
6122
6260
  "div",
6123
6261
  {
6124
- className: `crow-relative crow-flex-shrink-0 crow-flex crow-items-center crow-text-[13px] crow-leading-tight crow-py-2.5 crow-transition-colors crow-select-none crow-cursor-pointer ${isActive ? "crow-text-gray-900 crow-font-medium" : "crow-text-gray-500 hover:crow-text-gray-700 hover:crow-bg-gray-50"}`,
6262
+ className: "crow-relative crow-flex-shrink-0 crow-flex crow-items-center crow-text-[13px] crow-leading-tight crow-py-2.5 crow-transition-colors crow-select-none crow-cursor-pointer",
6125
6263
  style: {
6264
+ color: isActive ? styles.colors.text : styles.colors.text + "80",
6265
+ fontWeight: isActive ? 500 : void 0,
6126
6266
  maxWidth: "180px",
6127
6267
  borderRight: idx < tabs.length - 1 ? `1px solid ${styles.colors.border}` : "none",
6128
6268
  paddingLeft: "16px",
@@ -6154,7 +6294,7 @@ function CrowCopilot({
6154
6294
  isCloseable && /* @__PURE__ */ jsxRuntime.jsx(
6155
6295
  "span",
6156
6296
  {
6157
- className: "crow-rounded crow-p-0.5 crow-flex-shrink-0 crow-inline-flex crow-items-center crow-justify-center crow-transition-opacity hover:crow-bg-gray-200",
6297
+ className: "crow-rounded crow-p-0.5 crow-flex-shrink-0 crow-inline-flex crow-items-center crow-justify-center crow-transition-opacity",
6158
6298
  style: {
6159
6299
  marginLeft: "6px",
6160
6300
  opacity: isHovered ? 1 : 0,
@@ -6166,7 +6306,7 @@ function CrowCopilot({
6166
6306
  },
6167
6307
  role: "button",
6168
6308
  "aria-label": `Close ${tab.name}`,
6169
- children: /* @__PURE__ */ jsxRuntime.jsx(TabCloseIcon, { className: "crow-w-3 crow-h-3 crow-text-gray-400 hover:crow-text-gray-600" })
6309
+ children: /* @__PURE__ */ jsxRuntime.jsx(TabCloseIcon, { className: "crow-w-3 crow-h-3", style: { color: styles.colors.text + "80" } })
6170
6310
  }
6171
6311
  ),
6172
6312
  isActive && /* @__PURE__ */ jsxRuntime.jsx(
@@ -6196,10 +6336,17 @@ function CrowCopilot({
6196
6336
  "button",
6197
6337
  {
6198
6338
  onClick: handleNewChat,
6199
- className: "crow-p-2 hover:crow-bg-gray-100 crow-transition-colors",
6339
+ className: "crow-p-2 crow-transition-colors crow-rounded",
6340
+ style: { color: styles.colors.text + "80" },
6341
+ onMouseEnter: (e) => {
6342
+ e.currentTarget.style.background = styles.colors.text + "10";
6343
+ },
6344
+ onMouseLeave: (e) => {
6345
+ e.currentTarget.style.background = "transparent";
6346
+ },
6200
6347
  "aria-label": "New Chat",
6201
6348
  title: "New Chat",
6202
- children: /* @__PURE__ */ jsxRuntime.jsx(PlusIcon, { className: "crow-w-4 crow-h-4 crow-text-gray-500" })
6349
+ children: /* @__PURE__ */ jsxRuntime.jsx(PlusIcon, { className: "crow-w-4 crow-h-4" })
6203
6350
  }
6204
6351
  ),
6205
6352
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -6208,29 +6355,53 @@ function CrowCopilot({
6208
6355
  onClick: handleToggleHistory,
6209
6356
  disabled: !isVerifiedUser,
6210
6357
  "aria-disabled": !isVerifiedUser,
6211
- className: `crow-p-2 crow-transition-colors ${showConversationList ? "crow-bg-gray-100" : "hover:crow-bg-gray-100"} ${!isVerifiedUser ? "crow-opacity-40 crow-cursor-not-allowed" : ""}`,
6358
+ className: `crow-p-2 crow-transition-colors crow-rounded ${!isVerifiedUser ? "crow-opacity-40 crow-cursor-not-allowed" : ""}`,
6359
+ style: {
6360
+ color: styles.colors.text + "80",
6361
+ background: showConversationList ? styles.colors.text + "10" : "transparent"
6362
+ },
6363
+ onMouseEnter: (e) => {
6364
+ if (isVerifiedUser) e.currentTarget.style.background = styles.colors.text + "10";
6365
+ },
6366
+ onMouseLeave: (e) => {
6367
+ if (!showConversationList) e.currentTarget.style.background = "transparent";
6368
+ },
6212
6369
  "aria-label": "Conversation History",
6213
6370
  title: isVerifiedUser ? "Conversation History" : "Sign in to view history",
6214
- children: /* @__PURE__ */ jsxRuntime.jsx(HistoryIcon, { className: "crow-w-4 crow-h-4 crow-text-gray-500" })
6371
+ children: /* @__PURE__ */ jsxRuntime.jsx(HistoryIcon, { className: "crow-w-4 crow-h-4" })
6215
6372
  }
6216
6373
  ),
6217
6374
  canScrollRight && /* @__PURE__ */ jsxRuntime.jsx(
6218
6375
  "button",
6219
6376
  {
6220
6377
  onClick: handleScrollRight,
6221
- className: "crow-p-2 hover:crow-bg-gray-100 crow-transition-colors",
6378
+ className: "crow-p-2 crow-transition-colors crow-rounded",
6379
+ style: { color: styles.colors.text + "80" },
6380
+ onMouseEnter: (e) => {
6381
+ e.currentTarget.style.background = styles.colors.text + "10";
6382
+ },
6383
+ onMouseLeave: (e) => {
6384
+ e.currentTarget.style.background = "transparent";
6385
+ },
6222
6386
  "aria-label": "Scroll tabs",
6223
6387
  title: "Scroll tabs",
6224
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "crow-w-4 crow-h-4 crow-text-gray-500" })
6388
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "crow-w-4 crow-h-4" })
6225
6389
  }
6226
6390
  ),
6227
6391
  (forceShowClose ?? showClose) && (overrideOnClose ?? onClose) && /* @__PURE__ */ jsxRuntime.jsx(
6228
6392
  "button",
6229
6393
  {
6230
6394
  onClick: overrideOnClose ?? onClose,
6231
- className: "crow-p-2 hover:crow-bg-gray-100 crow-transition-colors",
6395
+ className: "crow-p-2 crow-transition-colors crow-rounded",
6396
+ style: { color: styles.colors.text + "80" },
6397
+ onMouseEnter: (e) => {
6398
+ e.currentTarget.style.background = styles.colors.text + "10";
6399
+ },
6400
+ onMouseLeave: (e) => {
6401
+ e.currentTarget.style.background = "transparent";
6402
+ },
6232
6403
  "aria-label": "Close",
6233
- children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { className: "crow-w-4 crow-h-4 crow-text-gray-500" })
6404
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { className: "crow-w-4 crow-h-4" })
6234
6405
  }
6235
6406
  )
6236
6407
  ]
@@ -6244,7 +6415,7 @@ function CrowCopilot({
6244
6415
  {
6245
6416
  className: "crow-flex crow-items-center crow-gap-1.5 crow-px-3 crow-py-1.5 crow-border-b crow-text-xs",
6246
6417
  style: {
6247
- color: "#6b7280",
6418
+ color: styles.colors.text + "80",
6248
6419
  borderColor: styles.colors.border
6249
6420
  },
6250
6421
  children: [
@@ -6281,7 +6452,14 @@ function CrowCopilot({
6281
6452
  onClose: handleCloseConversationList
6282
6453
  }
6283
6454
  ),
6284
- showConversationList && !isVerifiedUser && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-mb-3 crow-rounded-xl crow-bg-gray-50 crow-border crow-border-gray-200 crow-p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-text-sm crow-text-gray-600", children: "Sign in to view conversation history." }) })
6455
+ showConversationList && !isVerifiedUser && /* @__PURE__ */ jsxRuntime.jsx(
6456
+ "div",
6457
+ {
6458
+ className: "crow-mb-3 crow-rounded-xl crow-border crow-p-4",
6459
+ style: { background: styles.colors.text + "08", borderColor: styles.colors.border },
6460
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "crow-text-sm", style: { color: styles.colors.text + "99" }, children: "Sign in to view conversation history." })
6461
+ }
6462
+ )
6285
6463
  ] }),
6286
6464
  /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: activeWorkflow && /* @__PURE__ */ jsxRuntime.jsx(
6287
6465
  WorkflowPanel,
@@ -6334,7 +6512,7 @@ function CrowCopilot({
6334
6512
  className: "crow-p-3 crow-border-t",
6335
6513
  style: { borderColor: styles.colors.border },
6336
6514
  children: [
6337
- toolStatus && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-mb-1 crow-flex crow-items-center crow-gap-2 crow-rounded-lg crow-border crow-border-[var(--crow-border,#e5e7eb)] crow-bg-[var(--crow-bg-secondary,#f3f4f6)] crow-px-3 crow-py-2 crow-text-sm", children: [
6515
+ toolStatus && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-mb-1 crow-flex crow-items-center crow-gap-2 crow-rounded-lg crow-border crow-px-3 crow-py-2 crow-text-sm", style: { borderColor: styles.colors.border, background: styles.colors.border + "30" }, children: [
6338
6516
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "crow-animate-spin crow-h-4 crow-w-4 crow-shrink-0 crow-text-[var(--crow-primary,#7c3aed)]", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
6339
6517
  /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "crow-opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
6340
6518
  /* @__PURE__ */ jsxRuntime.jsx("path", { className: "crow-opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
@@ -6383,7 +6561,8 @@ function CrowCopilot({
6383
6561
  }
6384
6562
  const isRight = position === "right";
6385
6563
  const edgeSide = isRight ? "left" : "right";
6386
- const toggleIcon = isCollapsed ? /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#6b7280", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#6b7280", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: isRight ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) });
6564
+ const toggleIconColor = styles.colors.text + "80";
6565
+ const toggleIcon = isCollapsed ? /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: toggleIconColor, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: toggleIconColor, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: isRight ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) });
6387
6566
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", flexShrink: 0, height: "100%" }, children: [
6388
6567
  /* @__PURE__ */ jsxRuntime.jsx(
6389
6568
  "button",
@@ -6402,8 +6581,8 @@ function CrowCopilot({
6402
6581
  display: "flex",
6403
6582
  alignItems: "center",
6404
6583
  justifyContent: "center",
6405
- background: "#fff",
6406
- border: "1px solid #e5e7eb",
6584
+ background: styles.colors.background,
6585
+ border: `1px solid ${styles.colors.border}`,
6407
6586
  [isRight ? "borderRight" : "borderLeft"]: "none",
6408
6587
  borderRadius: isRight ? "8px 0 0 8px" : "0 8px 8px 0",
6409
6588
  cursor: isCollapsed ? "pointer" : "col-resize",
@@ -6473,7 +6652,7 @@ function HistoryIcon({ className }) {
6473
6652
  }
6474
6653
  );
6475
6654
  }
6476
- function TabCloseIcon({ className }) {
6655
+ function TabCloseIcon({ className, style }) {
6477
6656
  return /* @__PURE__ */ jsxRuntime.jsxs(
6478
6657
  "svg",
6479
6658
  {
@@ -6487,6 +6666,7 @@ function TabCloseIcon({ className }) {
6487
6666
  strokeLinecap: "round",
6488
6667
  strokeLinejoin: "round",
6489
6668
  className,
6669
+ style,
6490
6670
  children: [
6491
6671
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18" }),
6492
6672
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 6 12 12" })