@agentiffai/design 0.1.11 → 0.1.12

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 CHANGED
@@ -2,12 +2,12 @@ import { memo, useRef, useState, useEffect, useCallback, useId, useMemo } from '
2
2
  import styled11, { keyframes, css, createGlobalStyle } from 'styled-components';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { useButton } from '@react-aria/button';
5
- import { useTextField } from '@react-aria/textfield';
6
5
  import { useMeter } from '@react-aria/meter';
7
6
  import { useTabList, useTabPanel, useTab } from '@react-aria/tabs';
8
7
  import { Item } from '@react-stately/collections';
9
8
  import { useTabListState } from '@react-stately/tabs';
10
9
  import { DisclosureGroup, Disclosure, Button, DisclosurePanel, Heading } from 'react-aria-components';
10
+ import { useTextField } from '@react-aria/textfield';
11
11
 
12
12
  // src/components/AssistantThinking/AssistantThinking.tsx
13
13
 
@@ -456,7 +456,7 @@ var SuggestionButton = styled11.button`
456
456
  font-weight: ${tokens.typography.fontWeight.regular};
457
457
  text-align: center;
458
458
  border: 1px solid ${tokens.colors.border.default};
459
- border-radius: 20px;
459
+ border-radius: ${tokens.borderRadius.full};
460
460
  cursor: pointer;
461
461
  transition: all ${tokens.transitions.fast};
462
462
  white-space: nowrap;
@@ -490,9 +490,9 @@ var SuggestionButton = styled11.button`
490
490
  `;
491
491
  var InputWrapper = styled11.div`
492
492
  display: flex;
493
- align-items: center;
494
- gap: 10px;
495
- padding: 10px 14px;
493
+ align-items: flex-end; /* Align button to bottom when textarea expands */
494
+ gap: ${tokens.spacing.sm};
495
+ padding: ${tokens.spacing.sm} ${tokens.spacing.md};
496
496
  background-color: rgba(25, 25, 25, 0.4);
497
497
  border: 1px solid ${tokens.colors.border.subtle};
498
498
  border-radius: ${tokens.borderRadius.lg};
@@ -506,7 +506,7 @@ var InputWrapper = styled11.div`
506
506
  background-color: rgba(50, 50, 52, 0.6);
507
507
  }
508
508
  `;
509
- var InputField = styled11.input`
509
+ var InputField = styled11.textarea`
510
510
  flex: 1;
511
511
  border: none;
512
512
  outline: none;
@@ -514,6 +514,13 @@ var InputField = styled11.input`
514
514
  font-size: ${tokens.typography.fontSize.sm};
515
515
  color: ${tokens.colors.text.secondary};
516
516
  background: transparent;
517
+ resize: none; /* Disable manual resize, we auto-resize */
518
+ min-height: 24px; /* Single line height */
519
+ max-height: 150px; /* Max ~6 lines before scrolling */
520
+ overflow-y: auto;
521
+ line-height: 1.5;
522
+ padding: 0;
523
+ margin: 0;
517
524
 
518
525
  &::placeholder {
519
526
  color: ${tokens.colors.text.tertiary};
@@ -569,31 +576,29 @@ var ChatInput = ({
569
576
  isReadOnly = false,
570
577
  autoFocus = false,
571
578
  className,
572
- "aria-label": ariaLabel = "Chat message input",
573
- ...ariaProps
579
+ "aria-label": ariaLabel = "Chat message input"
580
+ // Note: Additional AriaTextFieldProps are accepted but not spread to textarea
581
+ // since useTextField is not compatible with textarea elements
574
582
  }) => {
575
583
  const [internalValue, setInternalValue] = useState(value);
576
584
  const inputRef = useRef(null);
577
585
  const currentValue = value !== void 0 ? value : internalValue;
578
586
  const setValue = onChange || setInternalValue;
579
- const { inputProps } = useTextField(
580
- {
581
- ...ariaProps,
582
- "aria-label": ariaLabel,
583
- value: currentValue,
584
- onChange: (newValue) => {
585
- setValue(newValue);
586
- },
587
- isDisabled,
588
- isReadOnly
589
- },
590
- inputRef
591
- );
587
+ const autoResize = useCallback(() => {
588
+ const textarea = inputRef.current;
589
+ if (textarea) {
590
+ textarea.style.height = "auto";
591
+ textarea.style.height = `${textarea.scrollHeight}px`;
592
+ }
593
+ }, []);
594
+ useEffect(() => {
595
+ autoResize();
596
+ }, [currentValue, autoResize]);
592
597
  const handleDirectChange = (e) => {
593
598
  setValue(e.target.value);
594
599
  };
595
600
  const handleKeyDown = (e) => {
596
- if (e.key === "Enter") {
601
+ if (e.key === "Enter" && !e.shiftKey) {
597
602
  e.preventDefault();
598
603
  handleSubmit();
599
604
  }
@@ -602,6 +607,9 @@ var ChatInput = ({
602
607
  if (currentValue.trim() && onSubmit && !isDisabled && !isReadOnly) {
603
608
  onSubmit(currentValue.trim());
604
609
  setValue("");
610
+ if (inputRef.current) {
611
+ inputRef.current.style.height = "auto";
612
+ }
605
613
  inputRef.current?.focus();
606
614
  }
607
615
  };
@@ -625,16 +633,16 @@ var ChatInput = ({
625
633
  /* @__PURE__ */ jsx(
626
634
  InputField,
627
635
  {
628
- ...inputProps,
629
636
  ref: inputRef,
630
- type: "text",
637
+ "aria-label": ariaLabel,
631
638
  placeholder,
632
639
  onKeyDown: handleKeyDown,
633
640
  onChange: handleDirectChange,
634
641
  autoFocus,
635
642
  disabled: isDisabled,
636
643
  readOnly: isReadOnly,
637
- value: currentValue
644
+ value: currentValue,
645
+ rows: 1
638
646
  }
639
647
  ),
640
648
  /* @__PURE__ */ jsx(
@@ -709,7 +717,7 @@ var NavigationContainer = styled11.div`
709
717
  display: flex;
710
718
  flex-direction: column;
711
719
  align-items: center;
712
- padding-top: 6px;
720
+ padding-top: ${tokens.spacing.xs};
713
721
  gap: ${tokens.spacing.xs};
714
722
  width: 100%;
715
723
  height: 100%;
@@ -762,7 +770,7 @@ var CategoryButton = styled11.button`
762
770
  var CategoryLabel = styled11.span`
763
771
  font-size: 9px;
764
772
  color: ${tokens.colors.text.tertiary};
765
- margin-top: 2px;
773
+ margin-top: ${tokens.spacing.xs};
766
774
  text-align: center;
767
775
  max-width: 56px;
768
776
  overflow: hidden;
@@ -1611,7 +1619,7 @@ WorkflowStatusCard.displayName = "WorkflowStatusCard";
1611
1619
  var DarkNotificationCardContainer = styled11.div`
1612
1620
  display: flex;
1613
1621
  flex-direction: column;
1614
- padding: 6px;
1622
+ padding: ${tokens.spacing.xs};
1615
1623
  background: ${tokens.colors.surface.base};
1616
1624
  border-radius: ${tokens.borderRadius.md};
1617
1625
  gap: ${tokens.spacing.xs};
@@ -1624,7 +1632,7 @@ var DarkSectionHeader = styled11.button`
1624
1632
  align-items: center;
1625
1633
  justify-content: space-between;
1626
1634
  width: 100%;
1627
- padding: ${tokens.spacing.xs} 2px;
1635
+ padding: ${tokens.spacing.xs} ${tokens.spacing.xs};
1628
1636
  border: none;
1629
1637
  background: transparent;
1630
1638
  font-family: ${tokens.typography.fontFamily.primary};
@@ -1666,18 +1674,18 @@ var DarkChevronIcon = styled11.span`
1666
1674
  var DarkSectionContent = styled11.div`
1667
1675
  display: flex;
1668
1676
  flex-direction: column;
1669
- gap: 2px;
1677
+ gap: ${tokens.spacing.xs};
1670
1678
  padding-left: ${tokens.spacing.xs};
1671
- margin-top: 2px;
1679
+ margin-top: ${tokens.spacing.xs};
1672
1680
  min-width: 0;
1673
1681
  overflow: hidden;
1674
1682
  `;
1675
1683
  var DarkNotificationItemWrapper = styled11.button`
1676
1684
  display: flex;
1677
1685
  align-items: center;
1678
- gap: 6px;
1686
+ gap: ${tokens.spacing.xs};
1679
1687
  width: 100%;
1680
- padding: ${tokens.spacing.xs} 6px;
1688
+ padding: ${tokens.spacing.xs} ${tokens.spacing.xs};
1681
1689
  border: none;
1682
1690
  cursor: pointer;
1683
1691
  text-align: left;
@@ -1733,7 +1741,7 @@ var DarkItemIcon = styled11.span`
1733
1741
 
1734
1742
  /* Custom icon (emoji or colored icon) styling */
1735
1743
  ${(props) => props.$hasCustomIcon && `
1736
- padding: 2px;
1744
+ padding: ${tokens.spacing.xs};
1737
1745
  `}
1738
1746
  `;
1739
1747
  var DarkItemText = styled11.span`
@@ -2011,7 +2019,7 @@ var TabButton = styled11.button`
2011
2019
  flex-shrink: 0;
2012
2020
 
2013
2021
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2014
- padding: 10px ${tokens.spacing.md};
2022
+ padding: ${tokens.spacing.sm} ${tokens.spacing.md};
2015
2023
  font-size: ${tokens.typography.fontSize.xs};
2016
2024
  }
2017
2025
 
@@ -2109,7 +2117,7 @@ styled11.button`
2109
2117
  overflow: hidden;
2110
2118
 
2111
2119
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2112
- padding: 10px ${tokens.spacing.md};
2120
+ padding: ${tokens.spacing.sm} ${tokens.spacing.md};
2113
2121
  font-size: 13px;
2114
2122
  gap: ${tokens.spacing.sm};
2115
2123
  }
@@ -2191,7 +2199,7 @@ var CategoryTitle = styled11.div`
2191
2199
  gap: ${tokens.spacing.sm};
2192
2200
 
2193
2201
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2194
- gap: 6px;
2202
+ gap: ${tokens.spacing.xs};
2195
2203
  }
2196
2204
  `;
2197
2205
  styled11.img`
@@ -2248,7 +2256,7 @@ var CategoryDisclosurePanel = styled11(DisclosurePanel)`
2248
2256
  overflow: hidden;
2249
2257
 
2250
2258
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2251
- padding-left: 2px;
2259
+ padding-left: ${tokens.spacing.xs};
2252
2260
  }
2253
2261
 
2254
2262
  &[data-entering] {
@@ -2270,7 +2278,7 @@ var ItemContainer = styled11.div`
2270
2278
  display: flex;
2271
2279
  align-items: center;
2272
2280
  gap: ${tokens.spacing.sm};
2273
- padding: 10px ${tokens.spacing.sm}; // Increased vertical padding from 4px to 10px for better breathing room
2281
+ padding: ${tokens.spacing.sm} ${tokens.spacing.sm}; // Increased vertical padding from 4px to 8px for better breathing room
2274
2282
  border-radius: ${tokens.borderRadius.sm};
2275
2283
  cursor: pointer;
2276
2284
  transition: background-color ${tokens.transitions.fast};
@@ -2278,8 +2286,8 @@ var ItemContainer = styled11.div`
2278
2286
  overflow: hidden;
2279
2287
 
2280
2288
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2281
- gap: 6px;
2282
- padding: ${tokens.spacing.sm} 6px; // Increased vertical padding from 4px to 8px for mobile
2289
+ gap: ${tokens.spacing.xs};
2290
+ padding: ${tokens.spacing.sm} ${tokens.spacing.xs}; // Increased vertical padding from 4px to 8px for mobile
2283
2291
  }
2284
2292
 
2285
2293
  &:hover {
@@ -2320,7 +2328,7 @@ var ItemHeader = styled11(Button)`
2320
2328
  }
2321
2329
  `;
2322
2330
  var ItemDisclosurePanel = styled11(DisclosurePanel)`
2323
- padding: 6px;
2331
+ padding: ${tokens.spacing.xs};
2324
2332
  background-color: ${tokens.colors.overlay};
2325
2333
  border-radius: 0 0 ${tokens.borderRadius.md} ${tokens.borderRadius.md};
2326
2334
  margin-top: -${tokens.spacing.xs};
@@ -2331,7 +2339,7 @@ var ItemDisclosurePanel = styled11(DisclosurePanel)`
2331
2339
  overflow: hidden;
2332
2340
 
2333
2341
  @media (max-width: ${tokens.breakpoints.mobile}px) {
2334
- padding: 6px;
2342
+ padding: ${tokens.spacing.xs};
2335
2343
  }
2336
2344
 
2337
2345
  &[data-entering] {
@@ -2652,7 +2660,7 @@ function ItemWithLogs({
2652
2660
  isExpanded && /* @__PURE__ */ jsx(ItemDisclosurePanel, { children: run.customContent ? (
2653
2661
  // Render custom content directly
2654
2662
  /* @__PURE__ */ jsx("div", { style: { padding: "16px" }, children: run.customContent })
2655
- ) : run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsx("div", { style: { color: "#72767D", fontSize: "13px", padding: "8px" }, children: "No action logs available" }) })
2663
+ ) : run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsx("div", { style: { color: tokens.colors.text.tertiary, fontSize: "13px", padding: "8px" }, children: "No action logs available" }) })
2656
2664
  ] });
2657
2665
  }
2658
2666
  function normalizeCategory(category) {
@@ -2687,7 +2695,7 @@ function WorkflowGroupItem({
2687
2695
  /* @__PURE__ */ jsx(Heading, { level: 4, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", style: { paddingLeft: "8px" }, children: [
2688
2696
  /* @__PURE__ */ jsxs(CategoryTitle, { children: [
2689
2697
  /* @__PURE__ */ jsx("span", { style: { fontSize: "13px", fontWeight: 500 }, children: group.workflowName }),
2690
- /* @__PURE__ */ jsxs("span", { style: { fontSize: "11px", color: "#72767D", marginLeft: "8px" }, children: [
2698
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: "11px", color: tokens.colors.text.tertiary, marginLeft: "8px" }, children: [
2691
2699
  "(",
2692
2700
  group.runs.length,
2693
2701
  ")"
@@ -2897,7 +2905,7 @@ function ConnectionsTabContent({
2897
2905
  return /* @__PURE__ */ jsxs(ConnectionsContainer, { children: [
2898
2906
  /* @__PURE__ */ jsx(ConnectionDescription, { children: descriptionText }),
2899
2907
  /* @__PURE__ */ jsx(GoogleButton, { ...buttonProps, ref, $isConnected: isConnected, children: buttonText }),
2900
- isConnected && googleConnection?.scopes && googleConnection.scopes.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "16px", fontSize: "13px", color: "#B9BBBE" }, children: [
2908
+ isConnected && googleConnection?.scopes && googleConnection.scopes.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "16px", fontSize: "13px", color: tokens.colors.text.secondary }, children: [
2901
2909
  "Connected services: ",
2902
2910
  googleConnection.scopes.join(", ")
2903
2911
  ] })
@@ -3348,12 +3356,12 @@ var NotificationItemWrapper = styled11.button`
3348
3356
  align-items: center;
3349
3357
  gap: ${tokens.spacing.md};
3350
3358
  width: 100%;
3351
- padding: ${(props) => props.$isSelected ? `${tokens.spacing.md} ${tokens.spacing.md}` : `10px ${tokens.spacing.md}`};
3359
+ padding: ${(props) => props.$isSelected ? `${tokens.spacing.md} ${tokens.spacing.md}` : `${tokens.spacing.sm} ${tokens.spacing.md}`};
3352
3360
  border: none;
3353
3361
  cursor: pointer;
3354
3362
  text-align: left;
3355
3363
  transition: all ${tokens.transitions.normal};
3356
- border-radius: ${(props) => props.$isSelected ? tokens.borderRadius.lg : "10px"};
3364
+ border-radius: ${(props) => props.$isSelected ? tokens.borderRadius.lg : tokens.borderRadius.lg};
3357
3365
 
3358
3366
  /* Default state - transparent background */
3359
3367
  background-color: ${(props) => props.$isSelected ? tokens.colors.secondary : "transparent"};
@@ -3402,7 +3410,7 @@ var ItemIcon2 = styled11.span`
3402
3410
 
3403
3411
  /* Custom icon (emoji or colored icon) styling */
3404
3412
  ${(props) => props.$hasCustomIcon && `
3405
- padding: 2px;
3413
+ padding: ${tokens.spacing.xs};
3406
3414
  `}
3407
3415
  `;
3408
3416
  var ItemText = styled11.span`
@@ -3646,7 +3654,7 @@ var StyledUserMessage = styled11.button`
3646
3654
  && {
3647
3655
  background: ${tokens.colors.message.user} !important;
3648
3656
  color: ${tokens.colors.text.primary} !important;
3649
- border-radius: ${tokens.borderRadius.full} !important; /* Pill shape - fully rounded ends */
3657
+ border-radius: ${tokens.borderRadius["2xl"]} !important; /* Rounded corners that work for multi-line */
3650
3658
  }
3651
3659
 
3652
3660
  /* Subtle shadow and glow effect */
@@ -5229,6 +5237,9 @@ var Container12 = styled11.div`
5229
5237
  white-space: pre-wrap;
5230
5238
  word-break: break-word;
5231
5239
  line-height: ${tokens.typography.lineHeight.normal};
5240
+ /* Performance optimizations for streaming text */
5241
+ text-rendering: optimizeSpeed;
5242
+ contain: content;
5232
5243
  `;
5233
5244
  var Cursor = styled11.span`
5234
5245
  display: inline-block;
@@ -5288,20 +5299,9 @@ var MessageContainer = styled11.div`
5288
5299
  align-items: flex-start;
5289
5300
  padding: ${tokens.spacing.sm} 0;
5290
5301
  max-width: 100%;
5291
-
5292
- /* Fade in and slide up animation */
5293
- animation: fadeInSlideUp ${tokens.animation.duration.medium} ease-out;
5294
-
5295
- @keyframes fadeInSlideUp {
5296
- from {
5297
- opacity: 0;
5298
- transform: translateY(${tokens.spacing.sm});
5299
- }
5300
- to {
5301
- opacity: 1;
5302
- transform: translateY(0);
5303
- }
5304
- }
5302
+ /* GPU acceleration hint for smooth rendering during streaming */
5303
+ will-change: contents;
5304
+ contain: content;
5305
5305
  `;
5306
5306
  var AvatarContainer = styled11.div`
5307
5307
  flex-shrink: 0;
@@ -5336,9 +5336,8 @@ var ContentContainer = styled11.div`
5336
5336
  min-width: 0;
5337
5337
  `;
5338
5338
  var MessageContent = styled11.div`
5339
- background-color: ${tokens.colors.surface.glass};
5340
- backdrop-filter: blur(10px);
5341
- -webkit-backdrop-filter: blur(10px);
5339
+ /* Use solid color instead of backdrop-filter for performance during streaming */
5340
+ background-color: ${tokens.colors.surface.elevated};
5342
5341
  padding: ${tokens.spacing.sm} ${tokens.spacing.md};
5343
5342
  border-radius: ${tokens.borderRadius.lg};
5344
5343
  border-top-left-radius: ${tokens.borderRadius.sm};
@@ -5348,24 +5347,25 @@ var MessageContent = styled11.div`
5348
5347
  font-family: ${tokens.typography.fontFamily.primary};
5349
5348
  word-wrap: break-word;
5350
5349
  white-space: pre-wrap;
5350
+ /* Optimize text rendering */
5351
+ text-rendering: optimizeSpeed;
5351
5352
  `;
5352
5353
  var LoadingDots3 = styled11.div`
5353
5354
  display: flex;
5354
5355
  gap: ${tokens.spacing.xs};
5355
5356
  padding: ${tokens.spacing.sm} ${tokens.spacing.md};
5356
- background-color: ${tokens.colors.surface.glass};
5357
- backdrop-filter: blur(10px);
5358
- -webkit-backdrop-filter: blur(10px);
5357
+ /* Use solid color instead of backdrop-filter for performance */
5358
+ background-color: ${tokens.colors.surface.elevated};
5359
5359
  border-radius: ${tokens.borderRadius.lg};
5360
5360
  border-top-left-radius: ${tokens.borderRadius.sm};
5361
5361
  width: fit-content;
5362
5362
  `;
5363
- var bounce = keyframes`
5364
- 0%, 60%, 100% {
5365
- transform: translateY(0);
5363
+ var pulse3 = keyframes`
5364
+ 0%, 100% {
5365
+ opacity: 0.4;
5366
5366
  }
5367
- 30% {
5368
- transform: translateY(-${tokens.spacing.sm});
5367
+ 50% {
5368
+ opacity: 1;
5369
5369
  }
5370
5370
  `;
5371
5371
  var LoadingDot = styled11.div`
@@ -5373,7 +5373,8 @@ var LoadingDot = styled11.div`
5373
5373
  height: ${tokens.spacing.sm};
5374
5374
  border-radius: ${tokens.borderRadius.full};
5375
5375
  background-color: ${tokens.colors.text.tertiary};
5376
- animation: ${bounce} 1.4s ease-in-out infinite;
5376
+ /* Use simple opacity animation instead of transform bounce */
5377
+ animation: ${pulse3} 1.4s ease-in-out infinite;
5377
5378
  animation-delay: ${(props) => props.delay}s;
5378
5379
  `;
5379
5380
  var FileAttachmentContainer = styled11.div`
@@ -6764,6 +6765,161 @@ function LinkedInIcon({
6764
6765
  return /* @__PURE__ */ jsx("span", { className, style: { display: "inline-flex", width: size, height: size }, children: svgElement });
6765
6766
  }
6766
6767
  LinkedInIcon.displayName = "LinkedInIcon";
6768
+ var StyledIconWrapper3 = styled11.button`
6769
+ display: inline-flex;
6770
+ align-items: center;
6771
+ justify-content: center;
6772
+ background: transparent;
6773
+ border: none;
6774
+ padding: 0;
6775
+ cursor: pointer;
6776
+ transition: all 0.2s ease-in-out;
6777
+ width: ${({ $size }) => `${$size}px`};
6778
+ height: ${({ $size }) => `${$size}px`};
6779
+ border-radius: ${({ theme }) => theme?.radii?.sm ?? "4px"};
6780
+
6781
+ &:hover:not(:disabled) {
6782
+ opacity: 0.8;
6783
+ transform: scale(1.05);
6784
+ }
6785
+
6786
+ &:active:not(:disabled) {
6787
+ opacity: 0.6;
6788
+ transform: scale(0.95);
6789
+ }
6790
+
6791
+ &:focus-visible {
6792
+ outline: 2px solid ${({ theme }) => (theme?.colors?.primary && typeof theme.colors.primary === "object" ? theme.colors.primary.light : theme?.colors?.primary) ?? "#0066FF"};
6793
+ outline-offset: 2px;
6794
+ }
6795
+
6796
+ &:disabled {
6797
+ cursor: not-allowed;
6798
+ opacity: 0.5;
6799
+ }
6800
+
6801
+ /* Remove default focus outline, using focus-visible instead */
6802
+ &:focus {
6803
+ outline: none;
6804
+ }
6805
+
6806
+ svg {
6807
+ display: block;
6808
+ width: 100%;
6809
+ height: 100%;
6810
+ }
6811
+ `;
6812
+ function PostizIcon({
6813
+ variant = "colored",
6814
+ size = 24,
6815
+ className,
6816
+ style,
6817
+ "aria-label": ariaLabel = "Postiz",
6818
+ onPress,
6819
+ ...ariaProps
6820
+ }) {
6821
+ const ref = useRef(null);
6822
+ const isInteractive = Boolean(onPress);
6823
+ const { buttonProps } = useButton(
6824
+ {
6825
+ ...ariaProps,
6826
+ onPress,
6827
+ "aria-label": ariaLabel,
6828
+ isDisabled: !isInteractive
6829
+ },
6830
+ ref
6831
+ );
6832
+ const role = isInteractive ? "button" : "img";
6833
+ const ariaHidden = !isInteractive && !ariaLabel;
6834
+ const colors = {
6835
+ colored: {
6836
+ purple: "#612bd3",
6837
+ dark: "#131019",
6838
+ white: "#fff",
6839
+ stroke: "#131019"
6840
+ },
6841
+ black: {
6842
+ purple: "black",
6843
+ dark: "black",
6844
+ white: "black",
6845
+ stroke: "black"
6846
+ },
6847
+ white: {
6848
+ purple: "white",
6849
+ dark: "white",
6850
+ white: "white",
6851
+ stroke: "white"
6852
+ }
6853
+ };
6854
+ const c = colors[variant];
6855
+ const svgElement = /* @__PURE__ */ jsxs(
6856
+ "svg",
6857
+ {
6858
+ width: size,
6859
+ height: size,
6860
+ viewBox: "26.74 0.02 460.94 509.34",
6861
+ fill: "none",
6862
+ xmlns: "http://www.w3.org/2000/svg",
6863
+ role,
6864
+ "aria-label": ariaLabel,
6865
+ "aria-hidden": ariaHidden,
6866
+ children: [
6867
+ /* @__PURE__ */ jsx(
6868
+ "path",
6869
+ {
6870
+ d: "M103.4 82.6c.4 5.6.8 12 1.4 19.1L125 362.4c2.3 29.1 3.4 43.8 9.9 54.4 5.7 9.4 14.4 16.7 24.5 21 11.6 4.9 26.1 3.7 55.2 1.4l199.8-15.4c18.9-1.5 31.7-2.5 41.2-4.8-3.2 7.5-8.1 14.3-14.5 19.5-9.6 8-23.9 11.4-52.4 17.9l-195 45c-28.5 6.5-42.8 9.9-54.8 6.8-10.7-2.7-20.3-8.6-27.3-17.1-8-9.6-11.4-23.9-17.9-52.4L34.7 184c-6.5-28.5-9.9-42.8-6.8-54.8 2.7-10.7 8.6-20.3 17.1-27.3 9.6-8 23.9-11.4 52.4-17.9z",
6871
+ fill: c.purple
6872
+ }
6873
+ ),
6874
+ /* @__PURE__ */ jsx(
6875
+ "path",
6876
+ {
6877
+ d: "M112.8 101.1c-1.1-14.8-2-25.2-1.9-33.6 0-8.2.9-13.6 2.8-18 3.6-8.6 9.8-15.8 17.7-20.8 4.1-2.5 9.2-4.2 17.4-5.4 8.2-1.3 18.8-2.2 33.5-3.3L382 4.4c14.8-1.1 25.2-2 33.6-1.9 8.2 0 13.6.9 18 2.8 8.6 3.6 15.8 9.8 20.8 17.7 2.5 4.1 4.2 9.2 5.4 17.4s2.2 18.8 3.3 33.5l20.2 260.8c1.1 14.8 2 25.2 1.9 33.6 0 8.2-.9 13.6-2.8 18-3.6 8.6-9.8 15.8-17.7 20.8-4.1 2.5-9.2 4.2-17.4 5.4-8.2 1.3-18.8 2.2-33.5 3.3l-199.7 15.4c-14.8 1.1-25.2 2-33.6 1.9-8.2 0-13.6-.9-18-2.8-8.6-3.6-15.8-9.8-20.8-17.7-2.5-4.1-4.2-9.2-5.4-17.4-1.3-8.2-2.2-18.8-3.3-33.5z",
6878
+ fill: "none",
6879
+ stroke: c.stroke,
6880
+ strokeWidth: "4.9373"
6881
+ }
6882
+ ),
6883
+ /* @__PURE__ */ jsx(
6884
+ "path",
6885
+ {
6886
+ d: "m182.9 27.9 199.7-15.4c14.9-1.2 25-1.9 33-1.9 7.7 0 11.9.9 14.9 2.2 7 3 13 8 17 14.6 1.7 2.9 3.2 6.8 4.5 14.5 1.3 7.8 2.1 18 3.2 32.9l20.2 260.8c1.2 14.9 1.9 25 1.9 33 0 7.7-.9 11.9-2.2 14.9-3 7-8 13-14.6 17-2.9 1.7-6.8 3.2-14.5 4.5-7.8 1.3-18 2.1-32.9 3.2l-199.7 15.3c-14.8 1.2-25 1.9-33 1.9-7.7 0-11.9-.9-14.9-2.2-7-3-13-8-17-14.6-1.7-2.9-3.2-6.8-4.5-14.5-1.3-7.8-2.1-18-3.2-32.9l-20.2-260.8c-1.2-14.8-1.9-25-1.9-33 0-7.7.9-11.9 2.2-14.9 3-7 8-13 14.6-17 2.9-1.7 6.8-3.2 14.5-4.5 7.9-1.1 18.1-1.9 32.9-3.1",
6887
+ fill: c.white
6888
+ }
6889
+ ),
6890
+ /* @__PURE__ */ jsx(
6891
+ "path",
6892
+ {
6893
+ d: "m269.4 88.3 1.9 24.8c3.5-4.3 7.9-7.9 13.4-11 5.4-3.3 12.3-5.2 20.4-5.8 7.4-.6 14.7.3 21.4 2.7 7 2.4 13.3 6.4 18.8 12.5 5.7 5.7 10.6 13.7 14.5 23.8s6.3 22.5 7.5 37.2c.8 10.5.7 21.2-.5 31.9-1 10.7-3.4 20.4-7.3 29.1-4 8.7-9.7 16-17.2 21.9-7.3 5.6-16.7 8.9-28.4 9.8-8.3.7-15 .1-20-1.8-5-2.1-8.8-4.6-11.5-7.4l6.2 80-46.5 15.5L221.8 92zm26.4 149c5.7-.4 10.4-2.7 14.1-6.7 3.7-4.3 6.3-9.5 8-15.8 2-6.3 3.1-13.3 3.4-20.8.5-7.7.5-15.3-.1-22.9-.9-12.1-2.8-21.6-5.5-28.4-2.5-6.8-5.3-11.9-8.4-14.9-3.2-3.3-6.1-5.2-9.1-5.9-2.7-.7-4.9-1-6.3-.8-4 .3-7.7 2.1-11.2 5.1-3.6 3-5.9 7.2-7.3 12.9l7.1 91.9c1.2 1.7 3.2 3.3 5.6 4.9 2.5 1.2 5.7 1.7 9.7 1.4",
6894
+ fill: c.dark
6895
+ }
6896
+ )
6897
+ ]
6898
+ }
6899
+ );
6900
+ if (isInteractive) {
6901
+ return /* @__PURE__ */ jsx(
6902
+ StyledIconWrapper3,
6903
+ {
6904
+ ...buttonProps,
6905
+ ref,
6906
+ className,
6907
+ style,
6908
+ $size: size,
6909
+ children: svgElement
6910
+ }
6911
+ );
6912
+ }
6913
+ return /* @__PURE__ */ jsx(
6914
+ "span",
6915
+ {
6916
+ className,
6917
+ style: { display: "inline-flex", width: size, height: size, ...style },
6918
+ children: svgElement
6919
+ }
6920
+ );
6921
+ }
6922
+ PostizIcon.displayName = "PostizIcon";
6767
6923
  var ColoredVariant = () => /* @__PURE__ */ jsxs(Fragment, { children: [
6768
6924
  /* @__PURE__ */ jsx(
6769
6925
  "path",
@@ -7266,7 +7422,7 @@ var StyledXIcon = styled11.svg`
7266
7422
  &:focus-visible {
7267
7423
  outline: 2px solid ${theme?.colors?.primary ?? "#007bff"};
7268
7424
  outline-offset: 2px;
7269
- border-radius: 2px;
7425
+ border-radius: ${tokens.borderRadius.sm};
7270
7426
  }
7271
7427
  `}
7272
7428
  `;
@@ -7419,15 +7575,15 @@ YouTubeIcon.displayName = "YouTubeIcon";
7419
7575
  var PLATFORM_CONFIGS = {
7420
7576
  x: {
7421
7577
  icon: /* @__PURE__ */ jsx(XIcon, { variant: "white", size: 20 }),
7422
- color: "#FFFFFF",
7423
- bgColor: "#000000",
7578
+ color: tokens.colors.text.primary,
7579
+ bgColor: tokens.colors.platform.x,
7424
7580
  maxChars: 280,
7425
7581
  name: "X (Twitter)",
7426
7582
  description: "Concise, punchy posts with 1-2 hashtags"
7427
7583
  },
7428
7584
  linkedin: {
7429
7585
  icon: /* @__PURE__ */ jsx(LinkedInIcon, { variant: "colored", size: 20 }),
7430
- color: "#0A66C2",
7586
+ color: tokens.colors.platform.linkedin,
7431
7587
  bgColor: "#f3f6f8",
7432
7588
  maxChars: 3e3,
7433
7589
  name: "LinkedIn",
@@ -7435,7 +7591,7 @@ var PLATFORM_CONFIGS = {
7435
7591
  },
7436
7592
  instagram: {
7437
7593
  icon: /* @__PURE__ */ jsx(InstagramIcon, { variant: "colored", size: 20 }),
7438
- color: "#E4405F",
7594
+ color: tokens.colors.platform.instagram,
7439
7595
  bgColor: "#fafafa",
7440
7596
  maxChars: 2200,
7441
7597
  name: "Instagram",
@@ -7443,7 +7599,7 @@ var PLATFORM_CONFIGS = {
7443
7599
  },
7444
7600
  facebook: {
7445
7601
  icon: /* @__PURE__ */ jsx(FacebookIcon, { variant: "colored", size: 20 }),
7446
- color: "#1877F2",
7602
+ color: tokens.colors.platform.facebook,
7447
7603
  bgColor: "#f0f2f5",
7448
7604
  maxChars: 63206,
7449
7605
  name: "Facebook",
@@ -7451,7 +7607,7 @@ var PLATFORM_CONFIGS = {
7451
7607
  },
7452
7608
  youtube: {
7453
7609
  icon: /* @__PURE__ */ jsx(YouTubeIcon, { variant: "colored", size: 20 }),
7454
- color: "#FF0000",
7610
+ color: tokens.colors.platform.youtube,
7455
7611
  bgColor: "#f9f9f9",
7456
7612
  maxChars: 5e3,
7457
7613
  name: "YouTube",
@@ -7512,10 +7668,12 @@ function getCharacterCount(content, hashtags) {
7512
7668
  return (content + hashtagString).length;
7513
7669
  }
7514
7670
  function isWithinCharLimit(platform, characterCount) {
7515
- return characterCount <= PLATFORM_CONFIGS[platform].maxChars;
7671
+ const config = PLATFORM_CONFIGS[platform] || PLATFORM_CONFIGS.x;
7672
+ return characterCount <= config.maxChars;
7516
7673
  }
7517
7674
  function getCharacterLimitPercentage(platform, characterCount) {
7518
- return Math.min(100, characterCount / PLATFORM_CONFIGS[platform].maxChars * 100);
7675
+ const config = PLATFORM_CONFIGS[platform] || PLATFORM_CONFIGS.x;
7676
+ return Math.min(100, characterCount / config.maxChars * 100);
7519
7677
  }
7520
7678
  function getCharacterLimitColor(percentage) {
7521
7679
  if (percentage > 100) return "bg-red-500";
@@ -7833,7 +7991,7 @@ var PostPreviewCard = ({
7833
7991
  onContentChange,
7834
7992
  isLoading = false
7835
7993
  }) => {
7836
- const platformConfig = PLATFORM_CONFIGS[post.platform];
7994
+ const platformConfig = PLATFORM_CONFIGS[post.platform] || PLATFORM_CONFIGS.x;
7837
7995
  const showSkeleton = isLoading && !post.content;
7838
7996
  const displayContent = isEditing && editContent !== void 0 ? editContent : post.editedContent || post.content;
7839
7997
  const currentCharCount = displayContent.length;
@@ -8030,13 +8188,13 @@ var ProgressBarTrack = styled11.div`
8030
8188
  width: 100%;
8031
8189
  height: 4px;
8032
8190
  background: ${tokens.colors.border.default};
8033
- border-radius: 2px;
8191
+ border-radius: ${tokens.borderRadius.sm};
8034
8192
  overflow: hidden;
8035
8193
  `;
8036
8194
  var ProgressBarFill2 = styled11.div`
8037
8195
  width: ${({ $percentage }) => $percentage}%;
8038
8196
  height: 100%;
8039
- border-radius: 2px;
8197
+ border-radius: ${tokens.borderRadius.sm};
8040
8198
  transition: width 0.3s ease, background-color 0.3s ease;
8041
8199
  background: ${({ $colorClass }) => {
8042
8200
  if ($colorClass.includes("red")) return tokens.colors.error;
@@ -8108,9 +8266,21 @@ var PlatformCarousel = ({
8108
8266
  if (posts.length === 0) {
8109
8267
  return /* @__PURE__ */ jsx(CarouselContainer, { children: /* @__PURE__ */ jsx(EmptyState, { children: "No posts available" }) });
8110
8268
  }
8269
+ const defaultConfig = {
8270
+ icon: null,
8271
+ color: tokens.colors.text.secondary,
8272
+ bgColor: tokens.colors.background.light,
8273
+ maxChars: 1e3,
8274
+ name: "Unknown",
8275
+ description: "Unknown platform"
8276
+ };
8277
+ const getConfig = (platform) => {
8278
+ const normalized = normalizePlatform(platform);
8279
+ return normalized ? PLATFORM_CONFIGS[normalized] : defaultConfig;
8280
+ };
8111
8281
  return /* @__PURE__ */ jsxs(CarouselContainer, { children: [
8112
8282
  /* @__PURE__ */ jsx(TabsContainer, { children: posts.map((post, index) => {
8113
- const config = PLATFORM_CONFIGS[post.platform];
8283
+ const config = getConfig(post.platform);
8114
8284
  const isActive = index === activeIndex;
8115
8285
  return /* @__PURE__ */ jsxs(
8116
8286
  PlatformTab,
@@ -8143,7 +8313,7 @@ var PlatformCarousel = ({
8143
8313
  ) }, `slide-${post.platform}-${index}`);
8144
8314
  }) }),
8145
8315
  posts.length > 1 && /* @__PURE__ */ jsx(NavigationDotsContainer, { children: posts.map((post, index) => {
8146
- const config = PLATFORM_CONFIGS[post.platform];
8316
+ const config = getConfig(post.platform);
8147
8317
  return /* @__PURE__ */ jsx(
8148
8318
  NavigationDot,
8149
8319
  {
@@ -8935,8 +9105,8 @@ var Indicators = styled11.div`
8935
9105
  var IndicatorPill = styled11.span`
8936
9106
  display: inline-flex;
8937
9107
  align-items: center;
8938
- gap: 6px;
8939
- padding: 4px 10px;
9108
+ gap: ${tokens.spacing.xs};
9109
+ padding: ${tokens.spacing.xs} ${tokens.spacing.sm};
8940
9110
  border-radius: ${tokens.borderRadius.full};
8941
9111
  background: ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}15` : `${tokens.colors.info}15`};
8942
9112
  border: 1px solid ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}30` : `${tokens.colors.info}30`};
@@ -9746,7 +9916,7 @@ var spin = keyframes`
9746
9916
  transform: rotate(360deg);
9747
9917
  }
9748
9918
  `;
9749
- var pulse3 = keyframes`
9919
+ var pulse4 = keyframes`
9750
9920
  0%, 100% {
9751
9921
  opacity: 1;
9752
9922
  }
@@ -9824,7 +9994,7 @@ var IconContainer3 = styled11.div`
9824
9994
  animation: ${(props) => {
9825
9995
  if (props.$animated) {
9826
9996
  if (props.$status === "running") return spin;
9827
- if (props.$status === "pending") return pulse3;
9997
+ if (props.$status === "pending") return pulse4;
9828
9998
  }
9829
9999
  return "none";
9830
10000
  }}
@@ -9952,6 +10122,6 @@ var WorkflowStatusBadge = ({
9952
10122
  };
9953
10123
  WorkflowStatusBadge.displayName = "WorkflowStatusBadge";
9954
10124
 
9955
- export { ActionButtons, Actions, AgentState, AssistantMessage, AssistantThinking, Button2 as Button, CATEGORY_CONFIGS, CategoryNav, ChatInput, ConnectionStatusBadge, UserMessage2 as CopilotUserMessage, DarkNotificationCard, FacebookIcon, FileAttachment, Footer, GlobalStyle, GmailIcon, Header, Icon, IconNames, Input2 as Input, InstagramIcon, IntegrationCard, Layout, LinkedInIcon, Messages, MessagesList, MessagesListContainer, MessagesListContent, NavHorizontal, NavVertical, NotificationCard, PLATFORM_CONFIGS, PaneMenus, PaneSectionHeader, PlatformCarousel, PlatformGrid, PostApprovalControls, PostPreviewCard, RedditIcon, Response, SecretInput, ServiceIcon, SlackIcon, SocialMediaCanvas, StreamErrorMessage, StreamStatusIndicator, StreamingText2 as StreamingText, Suggestions, TelegramIcon, TokenUsageCard, UserMessage, WhatsAppIcon, Window, WorkflowCard, WorkflowErrorAlert, WorkflowProgressBar, WorkflowResultPanel, WorkflowStatusBadge, WorkflowStatusCard, XIcon, YouTubeIcon, categorizeProgress, darkTheme, getCategoryColor, getCategoryIcon, getCharacterCount, getCharacterLimitColor, getCharacterLimitPercentage, isWithinCharLimit, lightTheme, normalizePlatform, tokens };
10125
+ export { ActionButtons, Actions, AgentState, AssistantMessage, AssistantThinking, Button2 as Button, CATEGORY_CONFIGS, CategoryNav, ChatInput, ConnectionStatusBadge, UserMessage2 as CopilotUserMessage, DarkNotificationCard, FacebookIcon, FileAttachment, Footer, GlobalStyle, GmailIcon, Header, Icon, IconNames, Input2 as Input, InstagramIcon, IntegrationCard, Layout, LinkedInIcon, Messages, MessagesList, MessagesListContainer, MessagesListContent, NavHorizontal, NavVertical, NotificationCard, PLATFORM_CONFIGS, PaneMenus, PaneSectionHeader, PlatformCarousel, PlatformGrid, PostApprovalControls, PostPreviewCard, PostizIcon, RedditIcon, Response, SecretInput, ServiceIcon, SlackIcon, SocialMediaCanvas, StreamErrorMessage, StreamStatusIndicator, StreamingText2 as StreamingText, Suggestions, TelegramIcon, TokenUsageCard, UserMessage, WhatsAppIcon, Window, WorkflowCard, WorkflowErrorAlert, WorkflowProgressBar, WorkflowResultPanel, WorkflowStatusBadge, WorkflowStatusCard, XIcon, YouTubeIcon, categorizeProgress, darkTheme, getCategoryColor, getCategoryIcon, getCharacterCount, getCharacterLimitColor, getCharacterLimitPercentage, isWithinCharLimit, lightTheme, normalizePlatform, tokens };
9956
10126
  //# sourceMappingURL=index.js.map
9957
10127
  //# sourceMappingURL=index.js.map