@agentiffai/design 1.3.20 → 1.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -443,6 +443,8 @@ interface PostPreviewCardProps {
443
443
  onContentChange?: (content: string) => void;
444
444
  /** Show loading skeleton when content is being generated */
445
445
  isLoading?: boolean;
446
+ /** Callback to change/add an image. When provided, image areas become clickable. */
447
+ onImageChange?: () => void;
446
448
  }
447
449
  declare const PostPreviewCard: React__default.FC<PostPreviewCardProps>;
448
450
 
@@ -464,6 +466,8 @@ interface PlatformCarouselProps {
464
466
  onEditContentChange?: (content: string) => void;
465
467
  /** Whether content is being loaded/generated */
466
468
  isLoading?: boolean;
469
+ /** Callback when user requests to change/add an image for a post */
470
+ onImageChangeRequest?: (index: number) => void;
467
471
  }
468
472
  declare const PlatformCarousel: React__default.FC<PlatformCarouselProps>;
469
473
 
@@ -488,6 +492,8 @@ interface PlatformGridProps {
488
492
  activeIndex?: number;
489
493
  /** Callback when a post is clicked/selected */
490
494
  onActiveChange?: (index: number) => void;
495
+ /** Callback when user requests to change/add an image for a post */
496
+ onImageChangeRequest?: (index: number) => void;
491
497
  }
492
498
  /**
493
499
  * PlatformGrid displays all proposed posts in a responsive grid layout.
@@ -531,6 +537,8 @@ interface SocialMediaCanvasProps {
531
537
  isLoading?: boolean;
532
538
  /** Currently active post index (for grid mode) */
533
539
  activeIndex?: number;
540
+ /** Callback when user requests to change/add an image for a post */
541
+ onImageChangeRequest?: (index: number) => void;
534
542
  }
535
543
  /**
536
544
  * SocialMediaCanvas displays social media post previews in carousel or grid mode.
@@ -700,7 +708,9 @@ interface TokenUsageCardProps {
700
708
  periodLabel: string;
701
709
  onViewAll?: () => void;
702
710
  className?: string;
711
+ /** Show loading skeleton state */
712
+ loading?: boolean;
703
713
  }
704
- declare function TokenUsageCard({ currentUsage, maxLimit, transactions, periodLabel, onViewAll, className, }: TokenUsageCardProps): React__default.ReactElement;
714
+ declare function TokenUsageCard({ currentUsage, maxLimit, transactions, periodLabel, onViewAll, className, loading, }: TokenUsageCardProps): React__default.ReactElement;
705
715
 
706
716
  export { type ApprovalStatus, AssistantThinking, type AssistantThinkingProps, CATEGORY_CONFIGS, type CategoryConfig, ChatInput, type ChatInputProps, ConnectionStatusBadge, type ConnectionStatusBadgeProps, DarkNotificationCard, type EngagementOpportunity, type EngagementStatus, IntegrationCard, type IntegrationCardProps, NotificationCard, type NotificationCardProps, type NotificationItem, type NotificationSection, PLATFORM_CONFIGS, type Platform, PlatformCarousel, type PlatformCarouselProps, type PlatformConfig, PlatformGrid, type PlatformGridProps, PostApprovalControls, type PostApprovalControlsProps, PostPreviewCard, type PostPreviewCardProps, type PostViewMode, type ProgressCategory, type ProposedPost, RedditEngagementControls, type RedditEngagementControlsProps, RedditOpportunityCard, type RedditOpportunityCardProps, type ReplyTone, SecretInput, type SecretInputProps, SocialMediaCanvas, type SocialMediaCanvasProps, type TokenTransaction, TokenUsageCard, type TokenUsageCardProps, UserMessage, type UserMessageProps, categorizeProgress, getCategoryColor, getCategoryIcon, getCharacterCount, getCharacterLimitColor, getCharacterLimitPercentage, isWithinCharLimit, normalizePlatform };
package/dist/index.d.ts CHANGED
@@ -443,6 +443,8 @@ interface PostPreviewCardProps {
443
443
  onContentChange?: (content: string) => void;
444
444
  /** Show loading skeleton when content is being generated */
445
445
  isLoading?: boolean;
446
+ /** Callback to change/add an image. When provided, image areas become clickable. */
447
+ onImageChange?: () => void;
446
448
  }
447
449
  declare const PostPreviewCard: React__default.FC<PostPreviewCardProps>;
448
450
 
@@ -464,6 +466,8 @@ interface PlatformCarouselProps {
464
466
  onEditContentChange?: (content: string) => void;
465
467
  /** Whether content is being loaded/generated */
466
468
  isLoading?: boolean;
469
+ /** Callback when user requests to change/add an image for a post */
470
+ onImageChangeRequest?: (index: number) => void;
467
471
  }
468
472
  declare const PlatformCarousel: React__default.FC<PlatformCarouselProps>;
469
473
 
@@ -488,6 +492,8 @@ interface PlatformGridProps {
488
492
  activeIndex?: number;
489
493
  /** Callback when a post is clicked/selected */
490
494
  onActiveChange?: (index: number) => void;
495
+ /** Callback when user requests to change/add an image for a post */
496
+ onImageChangeRequest?: (index: number) => void;
491
497
  }
492
498
  /**
493
499
  * PlatformGrid displays all proposed posts in a responsive grid layout.
@@ -531,6 +537,8 @@ interface SocialMediaCanvasProps {
531
537
  isLoading?: boolean;
532
538
  /** Currently active post index (for grid mode) */
533
539
  activeIndex?: number;
540
+ /** Callback when user requests to change/add an image for a post */
541
+ onImageChangeRequest?: (index: number) => void;
534
542
  }
535
543
  /**
536
544
  * SocialMediaCanvas displays social media post previews in carousel or grid mode.
@@ -700,7 +708,9 @@ interface TokenUsageCardProps {
700
708
  periodLabel: string;
701
709
  onViewAll?: () => void;
702
710
  className?: string;
711
+ /** Show loading skeleton state */
712
+ loading?: boolean;
703
713
  }
704
- declare function TokenUsageCard({ currentUsage, maxLimit, transactions, periodLabel, onViewAll, className, }: TokenUsageCardProps): React__default.ReactElement;
714
+ declare function TokenUsageCard({ currentUsage, maxLimit, transactions, periodLabel, onViewAll, className, loading, }: TokenUsageCardProps): React__default.ReactElement;
705
715
 
706
716
  export { type ApprovalStatus, AssistantThinking, type AssistantThinkingProps, CATEGORY_CONFIGS, type CategoryConfig, ChatInput, type ChatInputProps, ConnectionStatusBadge, type ConnectionStatusBadgeProps, DarkNotificationCard, type EngagementOpportunity, type EngagementStatus, IntegrationCard, type IntegrationCardProps, NotificationCard, type NotificationCardProps, type NotificationItem, type NotificationSection, PLATFORM_CONFIGS, type Platform, PlatformCarousel, type PlatformCarouselProps, type PlatformConfig, PlatformGrid, type PlatformGridProps, PostApprovalControls, type PostApprovalControlsProps, PostPreviewCard, type PostPreviewCardProps, type PostViewMode, type ProgressCategory, type ProposedPost, RedditEngagementControls, type RedditEngagementControlsProps, RedditOpportunityCard, type RedditOpportunityCardProps, type ReplyTone, SecretInput, type SecretInputProps, SocialMediaCanvas, type SocialMediaCanvasProps, type TokenTransaction, TokenUsageCard, type TokenUsageCardProps, UserMessage, type UserMessageProps, categorizeProgress, getCategoryColor, getCategoryIcon, getCharacterCount, getCharacterLimitColor, getCharacterLimitPercentage, isWithinCharLimit, normalizePlatform };
package/dist/index.js CHANGED
@@ -8533,9 +8533,11 @@ var PostPreviewCard = ({
8533
8533
  isEditing = false,
8534
8534
  editContent,
8535
8535
  onContentChange,
8536
- isLoading = false
8536
+ isLoading = false,
8537
+ onImageChange
8537
8538
  }) => {
8538
8539
  const platformConfig = PLATFORM_CONFIGS[post.platform] || PLATFORM_CONFIGS.x;
8540
+ const [imageError, setImageError] = useState(false);
8539
8541
  const showSkeleton = isLoading && !post.content;
8540
8542
  const displayContent = isEditing && editContent !== void 0 ? editContent : post.editedContent || post.content;
8541
8543
  const currentCharCount = displayContent.length;
@@ -8585,14 +8587,96 @@ var PostPreviewCard = ({
8585
8587
  hashtag.replace(/^#/, "")
8586
8588
  ] }, hashtag)) })
8587
8589
  ] }),
8588
- post.imageUrl ? /* @__PURE__ */ jsx(ImagePreviewContainer, { children: /* @__PURE__ */ jsx(ImagePreview, { src: post.imageUrl, alt: "Post image preview" }) }) : ["instagram", "linkedin", "facebook", "youtube"].includes(post.platform) && /* @__PURE__ */ jsxs(ImagePlaceholder, { children: [
8589
- /* @__PURE__ */ jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
8590
- /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
8591
- /* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
8592
- /* @__PURE__ */ jsx("polyline", { points: "21 15 16 10 5 21" })
8593
- ] }) }),
8590
+ post.imageUrl && !imageError ? onImageChange ? /* @__PURE__ */ jsx(ImageChangeButton, { type: "button", onClick: onImageChange, "aria-label": "Change image", children: /* @__PURE__ */ jsxs(ImagePreviewContainer, { children: [
8591
+ /* @__PURE__ */ jsx(
8592
+ ImagePreview,
8593
+ {
8594
+ src: post.imageUrl,
8595
+ alt: "Post image preview",
8596
+ onError: () => setImageError(true)
8597
+ }
8598
+ ),
8599
+ /* @__PURE__ */ jsx(ImageOverlay, { children: /* @__PURE__ */ jsx(OverlayText, { children: "Change image" }) })
8600
+ ] }) }) : /* @__PURE__ */ jsx(ImagePreviewContainer, { children: /* @__PURE__ */ jsx(
8601
+ ImagePreview,
8602
+ {
8603
+ src: post.imageUrl,
8604
+ alt: "Post image preview",
8605
+ onError: () => setImageError(true)
8606
+ }
8607
+ ) }) : post.imageUrl && imageError ? onImageChange ? /* @__PURE__ */ jsx(ImageChangeButton, { type: "button", onClick: onImageChange, "aria-label": "Replace image", children: /* @__PURE__ */ jsxs(ImagePlaceholder, { $clickable: true, children: [
8608
+ /* @__PURE__ */ jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxs(
8609
+ "svg",
8610
+ {
8611
+ viewBox: "0 0 24 24",
8612
+ fill: "none",
8613
+ stroke: "currentColor",
8614
+ strokeWidth: "2",
8615
+ role: "img",
8616
+ "aria-label": "Image unavailable",
8617
+ children: [
8618
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
8619
+ /* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
8620
+ /* @__PURE__ */ jsx("polyline", { points: "21 15 16 10 5 21" })
8621
+ ]
8622
+ }
8623
+ ) }),
8624
+ /* @__PURE__ */ jsx("span", { children: "Tap to replace image" })
8625
+ ] }) }) : /* @__PURE__ */ jsxs(ImagePlaceholder, { children: [
8626
+ /* @__PURE__ */ jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxs(
8627
+ "svg",
8628
+ {
8629
+ viewBox: "0 0 24 24",
8630
+ fill: "none",
8631
+ stroke: "currentColor",
8632
+ strokeWidth: "2",
8633
+ role: "img",
8634
+ "aria-label": "Image unavailable",
8635
+ children: [
8636
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
8637
+ /* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
8638
+ /* @__PURE__ */ jsx("polyline", { points: "21 15 16 10 5 21" })
8639
+ ]
8640
+ }
8641
+ ) }),
8642
+ /* @__PURE__ */ jsx("span", { children: "Image unavailable" })
8643
+ ] }) : ["instagram", "linkedin", "facebook", "youtube"].includes(post.platform) && (onImageChange ? /* @__PURE__ */ jsx(ImageChangeButton, { type: "button", onClick: onImageChange, "aria-label": "Add image", children: /* @__PURE__ */ jsxs(ImagePlaceholder, { $clickable: true, children: [
8644
+ /* @__PURE__ */ jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxs(
8645
+ "svg",
8646
+ {
8647
+ viewBox: "0 0 24 24",
8648
+ fill: "none",
8649
+ stroke: "currentColor",
8650
+ strokeWidth: "2",
8651
+ role: "img",
8652
+ "aria-label": "Add image",
8653
+ children: [
8654
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
8655
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "16" }),
8656
+ /* @__PURE__ */ jsx("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
8657
+ ]
8658
+ }
8659
+ ) }),
8660
+ /* @__PURE__ */ jsx("span", { children: "Tap to add image" })
8661
+ ] }) }) : /* @__PURE__ */ jsxs(ImagePlaceholder, { children: [
8662
+ /* @__PURE__ */ jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxs(
8663
+ "svg",
8664
+ {
8665
+ viewBox: "0 0 24 24",
8666
+ fill: "none",
8667
+ stroke: "currentColor",
8668
+ strokeWidth: "2",
8669
+ role: "img",
8670
+ "aria-label": "No image attached",
8671
+ children: [
8672
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
8673
+ /* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
8674
+ /* @__PURE__ */ jsx("polyline", { points: "21 15 16 10 5 21" })
8675
+ ]
8676
+ }
8677
+ ) }),
8594
8678
  /* @__PURE__ */ jsx("span", { children: "No image attached" })
8595
- ] }),
8679
+ ] })),
8596
8680
  /* @__PURE__ */ jsx(ProgressBarContainer, { children: /* @__PURE__ */ jsx(ProgressBarTrack, { children: /* @__PURE__ */ jsx(
8597
8681
  ProgressBarFill2,
8598
8682
  {
@@ -8753,7 +8837,17 @@ var ProgressBarFill2 = styled48.div`
8753
8837
  return tokens.colors.success;
8754
8838
  }};
8755
8839
  `;
8840
+ var ImageChangeButton = styled48.button`
8841
+ display: block;
8842
+ width: 100%;
8843
+ padding: 0;
8844
+ border: none;
8845
+ background: none;
8846
+ cursor: pointer;
8847
+ -webkit-tap-highlight-color: transparent;
8848
+ `;
8756
8849
  var ImagePreviewContainer = styled48.div`
8850
+ position: relative;
8757
8851
  margin-bottom: ${tokens.spacing.sm};
8758
8852
  border-radius: ${tokens.borderRadius.sm};
8759
8853
  overflow: hidden;
@@ -8766,6 +8860,30 @@ var ImagePreview = styled48.img`
8766
8860
  object-fit: cover;
8767
8861
  display: block;
8768
8862
  `;
8863
+ var ImageOverlay = styled48.div`
8864
+ position: absolute;
8865
+ inset: 0;
8866
+ background: rgba(0, 0, 0, 0.5);
8867
+ display: flex;
8868
+ align-items: center;
8869
+ justify-content: center;
8870
+ opacity: 0;
8871
+ transition: opacity ${tokens.transitions.fast};
8872
+
8873
+ ${ImageChangeButton}:hover &,
8874
+ ${ImageChangeButton}:focus-visible & {
8875
+ opacity: 1;
8876
+ }
8877
+
8878
+ @media (hover: none) {
8879
+ opacity: 0.6;
8880
+ }
8881
+ `;
8882
+ var OverlayText = styled48.span`
8883
+ color: white;
8884
+ font-size: ${tokens.typography.fontSize.sm};
8885
+ font-weight: ${tokens.typography.fontWeight.semibold};
8886
+ `;
8769
8887
  var ImagePlaceholder = styled48.div`
8770
8888
  width: 100%;
8771
8889
  height: 200px;
@@ -8785,8 +8903,16 @@ var ImagePlaceholder = styled48.div`
8785
8903
  gap: ${tokens.spacing.sm};
8786
8904
  color: white;
8787
8905
  font-size: ${tokens.typography.fontSize.sm};
8788
- opacity: 0.8;
8906
+ opacity: ${({ $clickable }) => $clickable ? 0.9 : 0.8};
8789
8907
  margin-bottom: ${tokens.spacing.sm};
8908
+ transition: opacity ${tokens.transitions.fast};
8909
+
8910
+ ${({ $clickable }) => $clickable && `
8911
+ ${ImageChangeButton}:hover &,
8912
+ ${ImageChangeButton}:focus-visible & {
8913
+ opacity: 1;
8914
+ }
8915
+ `}
8790
8916
  `;
8791
8917
  var PlaceholderIcon = styled48.div`
8792
8918
  width: 48px;
@@ -8835,7 +8961,8 @@ var PlatformCarousel = ({
8835
8961
  editingIndex,
8836
8962
  editContent,
8837
8963
  onEditContentChange,
8838
- isLoading = false
8964
+ isLoading = false,
8965
+ onImageChangeRequest
8839
8966
  }) => {
8840
8967
  const [activeIndex, setActiveIndex] = useState(0);
8841
8968
  useEffect(() => {
@@ -8895,7 +9022,8 @@ var PlatformCarousel = ({
8895
9022
  isEditing,
8896
9023
  editContent: isEditing ? editContent : void 0,
8897
9024
  onContentChange: isEditing ? onEditContentChange : void 0,
8898
- isLoading
9025
+ isLoading,
9026
+ onImageChange: onImageChangeRequest ? () => onImageChangeRequest(index) : void 0
8899
9027
  }
8900
9028
  ) }, `slide-${post.platform}-${index}`);
8901
9029
  }) }),
@@ -9027,7 +9155,8 @@ var PlatformGrid = ({
9027
9155
  onEditContentChange,
9028
9156
  isLoading = false,
9029
9157
  activeIndex = 0,
9030
- onActiveChange
9158
+ onActiveChange,
9159
+ onImageChangeRequest
9031
9160
  }) => {
9032
9161
  if (posts.length === 0) {
9033
9162
  return /* @__PURE__ */ jsx(EmptyState2, { children: /* @__PURE__ */ jsx(EmptyStateText, { children: "No posts to display" }) });
@@ -9059,7 +9188,8 @@ var PlatformGrid = ({
9059
9188
  isEditing,
9060
9189
  editContent: isEditing ? editContent : void 0,
9061
9190
  onContentChange: isEditing ? onEditContentChange : void 0,
9062
- isLoading
9191
+ isLoading,
9192
+ onImageChange: onImageChangeRequest ? () => onImageChangeRequest(index) : void 0
9063
9193
  }
9064
9194
  )
9065
9195
  },
@@ -9251,7 +9381,8 @@ var SocialMediaCanvas = ({
9251
9381
  editContent,
9252
9382
  onEditContentChange,
9253
9383
  isLoading = false,
9254
- activeIndex = 0
9384
+ activeIndex = 0,
9385
+ onImageChangeRequest
9255
9386
  }) => {
9256
9387
  const [viewMode, setViewMode] = useState(initialViewMode);
9257
9388
  const handleActiveChange = (index) => {
@@ -9308,7 +9439,8 @@ var SocialMediaCanvas = ({
9308
9439
  editingIndex,
9309
9440
  editContent,
9310
9441
  onEditContentChange,
9311
- isLoading
9442
+ isLoading,
9443
+ onImageChangeRequest
9312
9444
  }
9313
9445
  ) : /* @__PURE__ */ jsx(
9314
9446
  PlatformGrid,
@@ -9319,7 +9451,8 @@ var SocialMediaCanvas = ({
9319
9451
  onEditContentChange,
9320
9452
  isLoading,
9321
9453
  activeIndex,
9322
- onActiveChange: handleActiveChange
9454
+ onActiveChange: handleActiveChange,
9455
+ onImageChangeRequest
9323
9456
  }
9324
9457
  ) })
9325
9458
  ] });
@@ -10316,6 +10449,11 @@ var ActionButton6 = styled48.button`
10316
10449
  animation: ${pulse4} 2s ease-in-out infinite;
10317
10450
  `}
10318
10451
  `;
10452
+ var TYPE_ICONS = {
10453
+ input: "/assets/icon-set/Icon-arrow-up-fill.svg",
10454
+ output: "/assets/icon-set/Icon-download-2-fill.svg",
10455
+ system: "/assets/icon-set/Icon-settings-3-fill.svg"
10456
+ };
10319
10457
  function formatNumber2(num) {
10320
10458
  if (num >= 1e6) {
10321
10459
  return `${(num / 1e6).toFixed(1)}M`;
@@ -10349,11 +10487,6 @@ var usageLevelColors = {
10349
10487
  high: "#ff8c00",
10350
10488
  critical: tokens.colors.error
10351
10489
  };
10352
- var typeIcons = {
10353
- input: "\u2191",
10354
- output: "\u2193",
10355
- system: "\u2699"
10356
- };
10357
10490
  var typeColors = {
10358
10491
  input: tokens.colors.info,
10359
10492
  output: tokens.colors.success,
@@ -10365,13 +10498,38 @@ function TokenUsageCard({
10365
10498
  transactions,
10366
10499
  periodLabel,
10367
10500
  onViewAll,
10368
- className
10501
+ className,
10502
+ loading = false
10369
10503
  }) {
10370
10504
  const percentage = useMemo(
10371
10505
  () => Math.min(currentUsage / maxLimit * 100, 100),
10372
10506
  [currentUsage, maxLimit]
10373
10507
  );
10374
10508
  const usageLevel = useMemo(() => getUsageLevel(percentage), [percentage]);
10509
+ if (loading) {
10510
+ return /* @__PURE__ */ jsxs(Card2, { className, "data-testid": "token-usage-card-loading", children: [
10511
+ /* @__PURE__ */ jsxs(Header4, { children: [
10512
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "120px", $height: "20px" }),
10513
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "80px", $height: "16px" })
10514
+ ] }),
10515
+ /* @__PURE__ */ jsxs(UsageSection, { children: [
10516
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "160px", $height: "28px" }),
10517
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "100%", $height: "8px", $radius: tokens.borderRadius.full }),
10518
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "80px", $height: "14px" })
10519
+ ] }),
10520
+ /* @__PURE__ */ jsxs(TransactionsSection, { children: [
10521
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "100px", $height: "14px" }),
10522
+ /* @__PURE__ */ jsx(TransactionsList, { children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs(TransactionItem, { children: [
10523
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "24px", $height: "24px", $radius: tokens.borderRadius.sm }),
10524
+ /* @__PURE__ */ jsxs(TransactionInfo, { children: [
10525
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "70%", $height: "14px" }),
10526
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "50%", $height: "12px" })
10527
+ ] }),
10528
+ /* @__PURE__ */ jsx(SkeletonBlock, { $width: "32px", $height: "14px" })
10529
+ ] }, i)) })
10530
+ ] })
10531
+ ] });
10532
+ }
10375
10533
  return /* @__PURE__ */ jsxs(Card2, { className, "data-testid": "token-usage-card", children: [
10376
10534
  /* @__PURE__ */ jsxs(Header4, { children: [
10377
10535
  /* @__PURE__ */ jsx(Title2, { children: "Token Usage" }),
@@ -10392,7 +10550,7 @@ function TokenUsageCard({
10392
10550
  transactions.length > 0 && /* @__PURE__ */ jsxs(TransactionsSection, { children: [
10393
10551
  /* @__PURE__ */ jsx(TransactionsHeader, { children: "Recent Activity" }),
10394
10552
  /* @__PURE__ */ jsx(TransactionsList, { children: transactions.slice(0, 5).map((transaction) => /* @__PURE__ */ jsxs(TransactionItem, { children: [
10395
- /* @__PURE__ */ jsx(TransactionIcon, { $type: transaction.type, children: typeIcons[transaction.type] }),
10553
+ /* @__PURE__ */ jsx(TransactionIcon, { $type: transaction.type, children: /* @__PURE__ */ jsx("img", { src: TYPE_ICONS[transaction.type], alt: "", width: 14, height: 14 }) }),
10396
10554
  /* @__PURE__ */ jsxs(TransactionInfo, { children: [
10397
10555
  /* @__PURE__ */ jsx(TransactionDescription, { children: transaction.description }),
10398
10556
  /* @__PURE__ */ jsxs(TransactionMeta, { children: [
@@ -10414,18 +10572,20 @@ var Card2 = styled48.div`
10414
10572
  display: flex;
10415
10573
  flex-direction: column;
10416
10574
  background: ${tokens.colors.background.darker};
10417
- border-radius: ${tokens.borderRadius.xl};
10418
10575
  border: 1px solid ${tokens.colors.border.default};
10576
+ border-radius: ${tokens.borderRadius.xl};
10577
+ height: 100%;
10419
10578
  overflow: hidden;
10420
10579
  `;
10421
10580
  var Header4 = styled48.div`
10422
10581
  display: flex;
10423
10582
  justify-content: space-between;
10424
10583
  align-items: center;
10425
- padding: ${tokens.spacing.sm} ${tokens.spacing.md};
10584
+ padding: 0 0.5rem;
10426
10585
  background: ${tokens.colors.background.darker};
10427
10586
  border-bottom: 1px solid ${tokens.colors.border.default};
10428
10587
  min-height: 48px;
10588
+ flex-shrink: 0;
10429
10589
  `;
10430
10590
  var Title2 = styled48.h3`
10431
10591
  margin: 0;
@@ -10489,9 +10649,11 @@ var TransactionsSection = styled48.div`
10489
10649
  display: flex;
10490
10650
  flex-direction: column;
10491
10651
  gap: ${tokens.spacing.sm};
10492
- padding: ${tokens.spacing.md};
10493
- padding-top: ${tokens.spacing.sm};
10652
+ padding: ${tokens.spacing.sm} ${tokens.spacing.md} ${tokens.spacing.md};
10494
10653
  border-top: 1px solid ${tokens.colors.border.subtle};
10654
+ flex: 1;
10655
+ overflow-y: auto;
10656
+ min-height: 0;
10495
10657
  `;
10496
10658
  var TransactionsHeader = styled48.h4`
10497
10659
  margin: 0;
@@ -10503,15 +10665,24 @@ var TransactionsHeader = styled48.h4`
10503
10665
  var TransactionsList = styled48.div`
10504
10666
  display: flex;
10505
10667
  flex-direction: column;
10506
- gap: ${tokens.spacing.xs};
10668
+ gap: ${tokens.spacing.sm};
10507
10669
  `;
10508
10670
  var TransactionItem = styled48.div`
10509
10671
  display: flex;
10510
10672
  align-items: center;
10511
10673
  gap: ${tokens.spacing.sm};
10512
10674
  padding: ${tokens.spacing.sm};
10513
- background: ${tokens.colors.background.darker};
10514
- border-radius: ${tokens.borderRadius.sm};
10675
+ background: ${tokens.colors.background.dark};
10676
+ border-radius: ${tokens.borderRadius.lg};
10677
+ border: 1px solid ${tokens.colors.border.default};
10678
+ min-width: 0;
10679
+ overflow: hidden;
10680
+ transition: border-color ${tokens.transitions.fast},
10681
+ background-color ${tokens.transitions.fast};
10682
+
10683
+ &:hover {
10684
+ border-color: ${tokens.colors.border.hover};
10685
+ }
10515
10686
  `;
10516
10687
  var TransactionIcon = styled48.span`
10517
10688
  width: 24px;
@@ -10519,14 +10690,26 @@ var TransactionIcon = styled48.span`
10519
10690
  display: flex;
10520
10691
  align-items: center;
10521
10692
  justify-content: center;
10522
- font-size: ${tokens.typography.fontSize.sm};
10523
- color: ${({ $type }) => typeColors[$type]};
10693
+ flex-shrink: 0;
10524
10694
  background: ${tokens.colors.background.light};
10525
10695
  border-radius: ${tokens.borderRadius.sm};
10696
+
10697
+ img {
10698
+ filter: ${({ $type }) => {
10699
+ if ($type === "input") {
10700
+ return "brightness(0) saturate(100%) invert(55%) sepia(83%) saturate(1956%) hue-rotate(190deg) brightness(101%) contrast(101%)";
10701
+ }
10702
+ if ($type === "output") {
10703
+ return "brightness(0) saturate(100%) invert(73%) sepia(34%) saturate(547%) hue-rotate(99deg) brightness(91%) contrast(89%)";
10704
+ }
10705
+ return "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(85%)";
10706
+ }};
10707
+ }
10526
10708
  `;
10527
10709
  var TransactionInfo = styled48.div`
10528
10710
  flex: 1;
10529
10711
  min-width: 0;
10712
+ overflow: hidden;
10530
10713
  `;
10531
10714
  var TransactionDescription = styled48.div`
10532
10715
  font-size: ${tokens.typography.fontSize.sm};
@@ -10542,12 +10725,20 @@ var TransactionMeta = styled48.div`
10542
10725
  font-size: ${tokens.typography.fontSize.xs};
10543
10726
  font-family: ${tokens.typography.fontFamily.primary};
10544
10727
  color: ${tokens.colors.text.tertiary};
10728
+ overflow: hidden;
10729
+
10730
+ span {
10731
+ overflow: hidden;
10732
+ text-overflow: ellipsis;
10733
+ white-space: nowrap;
10734
+ }
10545
10735
  `;
10546
10736
  var TransactionTokens = styled48.span`
10547
10737
  font-size: ${tokens.typography.fontSize.sm};
10548
10738
  font-weight: ${tokens.typography.fontWeight.medium};
10549
10739
  font-family: ${tokens.typography.fontFamily.primary};
10550
10740
  color: ${({ $type }) => typeColors[$type]};
10741
+ flex-shrink: 0;
10551
10742
  `;
10552
10743
  var EmptyState4 = styled48.div`
10553
10744
  text-align: center;
@@ -10574,6 +10765,17 @@ var ViewAllButton = styled48.button`
10574
10765
  color: ${tokens.colors.text.primary};
10575
10766
  }
10576
10767
  `;
10768
+ var pulse5 = keyframes`
10769
+ 0%, 100% { opacity: 1; }
10770
+ 50% { opacity: 0.4; }
10771
+ `;
10772
+ var SkeletonBlock = styled48.div`
10773
+ width: ${({ $width }) => $width};
10774
+ height: ${({ $height }) => $height};
10775
+ background: ${tokens.colors.background.light};
10776
+ border-radius: ${({ $radius }) => $radius || tokens.borderRadius.sm};
10777
+ animation: ${pulse5} 1.5s ease-in-out infinite;
10778
+ `;
10577
10779
  var WorkflowCard = ({
10578
10780
  id,
10579
10781
  name,
@@ -11564,7 +11766,7 @@ var spin = keyframes`
11564
11766
  transform: rotate(360deg);
11565
11767
  }
11566
11768
  `;
11567
- var pulse5 = keyframes`
11769
+ var pulse6 = keyframes`
11568
11770
  0%, 100% {
11569
11771
  opacity: 1;
11570
11772
  }
@@ -11642,7 +11844,7 @@ var IconContainer3 = styled48.div`
11642
11844
  animation: ${(props) => {
11643
11845
  if (props.$animated) {
11644
11846
  if (props.$status === "running") return spin;
11645
- if (props.$status === "pending") return pulse5;
11847
+ if (props.$status === "pending") return pulse6;
11646
11848
  }
11647
11849
  return "none";
11648
11850
  }}