@agentiffai/design 0.1.11 → 0.1.13
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/copilotkit/index.cjs +107 -97
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +23 -2
- package/dist/copilotkit/index.d.ts +23 -2
- package/dist/copilotkit/index.js +108 -98
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/icons/index.cjs +164 -1
- package/dist/icons/index.cjs.map +1 -1
- package/dist/icons/index.d.cts +19 -1
- package/dist/icons/index.d.ts +19 -1
- package/dist/icons/index.js +164 -2
- package/dist/icons/index.js.map +1 -1
- package/dist/index.cjs +309 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +309 -96
- package/dist/index.js.map +1 -1
- package/dist/layout/index.cjs +21 -21
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.js +21 -21
- package/dist/layout/index.js.map +1 -1
- package/dist/workflow/index.cjs +2 -2
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.js +2 -2
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4,12 +4,12 @@ var react = require('react');
|
|
|
4
4
|
var styled11 = require('styled-components');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var button = require('@react-aria/button');
|
|
7
|
-
var textfield = require('@react-aria/textfield');
|
|
8
7
|
var meter = require('@react-aria/meter');
|
|
9
8
|
var tabs$1 = require('@react-aria/tabs');
|
|
10
9
|
var collections = require('@react-stately/collections');
|
|
11
10
|
var tabs = require('@react-stately/tabs');
|
|
12
11
|
var reactAriaComponents = require('react-aria-components');
|
|
12
|
+
var textfield = require('@react-aria/textfield');
|
|
13
13
|
|
|
14
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
|
|
@@ -462,7 +462,7 @@ var SuggestionButton = styled11__default.default.button`
|
|
|
462
462
|
font-weight: ${tokens.typography.fontWeight.regular};
|
|
463
463
|
text-align: center;
|
|
464
464
|
border: 1px solid ${tokens.colors.border.default};
|
|
465
|
-
border-radius:
|
|
465
|
+
border-radius: ${tokens.borderRadius.full};
|
|
466
466
|
cursor: pointer;
|
|
467
467
|
transition: all ${tokens.transitions.fast};
|
|
468
468
|
white-space: nowrap;
|
|
@@ -496,9 +496,9 @@ var SuggestionButton = styled11__default.default.button`
|
|
|
496
496
|
`;
|
|
497
497
|
var InputWrapper = styled11__default.default.div`
|
|
498
498
|
display: flex;
|
|
499
|
-
align-items:
|
|
500
|
-
gap:
|
|
501
|
-
padding:
|
|
499
|
+
align-items: flex-end; /* Align button to bottom when textarea expands */
|
|
500
|
+
gap: ${tokens.spacing.sm};
|
|
501
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
502
502
|
background-color: rgba(25, 25, 25, 0.4);
|
|
503
503
|
border: 1px solid ${tokens.colors.border.subtle};
|
|
504
504
|
border-radius: ${tokens.borderRadius.lg};
|
|
@@ -512,7 +512,7 @@ var InputWrapper = styled11__default.default.div`
|
|
|
512
512
|
background-color: rgba(50, 50, 52, 0.6);
|
|
513
513
|
}
|
|
514
514
|
`;
|
|
515
|
-
var InputField = styled11__default.default.
|
|
515
|
+
var InputField = styled11__default.default.textarea`
|
|
516
516
|
flex: 1;
|
|
517
517
|
border: none;
|
|
518
518
|
outline: none;
|
|
@@ -520,6 +520,13 @@ var InputField = styled11__default.default.input`
|
|
|
520
520
|
font-size: ${tokens.typography.fontSize.sm};
|
|
521
521
|
color: ${tokens.colors.text.secondary};
|
|
522
522
|
background: transparent;
|
|
523
|
+
resize: none; /* Disable manual resize, we auto-resize */
|
|
524
|
+
min-height: 24px; /* Single line height */
|
|
525
|
+
max-height: 150px; /* Max ~6 lines before scrolling */
|
|
526
|
+
overflow-y: auto;
|
|
527
|
+
line-height: 1.5;
|
|
528
|
+
padding: 0;
|
|
529
|
+
margin: 0;
|
|
523
530
|
|
|
524
531
|
&::placeholder {
|
|
525
532
|
color: ${tokens.colors.text.tertiary};
|
|
@@ -575,31 +582,29 @@ var ChatInput = ({
|
|
|
575
582
|
isReadOnly = false,
|
|
576
583
|
autoFocus = false,
|
|
577
584
|
className,
|
|
578
|
-
"aria-label": ariaLabel = "Chat message input"
|
|
579
|
-
|
|
585
|
+
"aria-label": ariaLabel = "Chat message input"
|
|
586
|
+
// Note: Additional AriaTextFieldProps are accepted but not spread to textarea
|
|
587
|
+
// since useTextField is not compatible with textarea elements
|
|
580
588
|
}) => {
|
|
581
589
|
const [internalValue, setInternalValue] = react.useState(value);
|
|
582
590
|
const inputRef = react.useRef(null);
|
|
583
591
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
584
592
|
const setValue = onChange || setInternalValue;
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
"
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
inputRef
|
|
597
|
-
);
|
|
593
|
+
const autoResize = react.useCallback(() => {
|
|
594
|
+
const textarea = inputRef.current;
|
|
595
|
+
if (textarea) {
|
|
596
|
+
textarea.style.height = "auto";
|
|
597
|
+
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
598
|
+
}
|
|
599
|
+
}, []);
|
|
600
|
+
react.useEffect(() => {
|
|
601
|
+
autoResize();
|
|
602
|
+
}, [currentValue, autoResize]);
|
|
598
603
|
const handleDirectChange = (e) => {
|
|
599
604
|
setValue(e.target.value);
|
|
600
605
|
};
|
|
601
606
|
const handleKeyDown = (e) => {
|
|
602
|
-
if (e.key === "Enter") {
|
|
607
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
603
608
|
e.preventDefault();
|
|
604
609
|
handleSubmit();
|
|
605
610
|
}
|
|
@@ -608,6 +613,9 @@ var ChatInput = ({
|
|
|
608
613
|
if (currentValue.trim() && onSubmit && !isDisabled && !isReadOnly) {
|
|
609
614
|
onSubmit(currentValue.trim());
|
|
610
615
|
setValue("");
|
|
616
|
+
if (inputRef.current) {
|
|
617
|
+
inputRef.current.style.height = "auto";
|
|
618
|
+
}
|
|
611
619
|
inputRef.current?.focus();
|
|
612
620
|
}
|
|
613
621
|
};
|
|
@@ -631,16 +639,16 @@ var ChatInput = ({
|
|
|
631
639
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
632
640
|
InputField,
|
|
633
641
|
{
|
|
634
|
-
...inputProps,
|
|
635
642
|
ref: inputRef,
|
|
636
|
-
|
|
643
|
+
"aria-label": ariaLabel,
|
|
637
644
|
placeholder,
|
|
638
645
|
onKeyDown: handleKeyDown,
|
|
639
646
|
onChange: handleDirectChange,
|
|
640
647
|
autoFocus,
|
|
641
648
|
disabled: isDisabled,
|
|
642
649
|
readOnly: isReadOnly,
|
|
643
|
-
value: currentValue
|
|
650
|
+
value: currentValue,
|
|
651
|
+
rows: 1
|
|
644
652
|
}
|
|
645
653
|
),
|
|
646
654
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -715,7 +723,7 @@ var NavigationContainer = styled11__default.default.div`
|
|
|
715
723
|
display: flex;
|
|
716
724
|
flex-direction: column;
|
|
717
725
|
align-items: center;
|
|
718
|
-
padding-top:
|
|
726
|
+
padding-top: ${tokens.spacing.xs};
|
|
719
727
|
gap: ${tokens.spacing.xs};
|
|
720
728
|
width: 100%;
|
|
721
729
|
height: 100%;
|
|
@@ -768,7 +776,7 @@ var CategoryButton = styled11__default.default.button`
|
|
|
768
776
|
var CategoryLabel = styled11__default.default.span`
|
|
769
777
|
font-size: 9px;
|
|
770
778
|
color: ${tokens.colors.text.tertiary};
|
|
771
|
-
margin-top:
|
|
779
|
+
margin-top: ${tokens.spacing.xs};
|
|
772
780
|
text-align: center;
|
|
773
781
|
max-width: 56px;
|
|
774
782
|
overflow: hidden;
|
|
@@ -1617,7 +1625,7 @@ WorkflowStatusCard.displayName = "WorkflowStatusCard";
|
|
|
1617
1625
|
var DarkNotificationCardContainer = styled11__default.default.div`
|
|
1618
1626
|
display: flex;
|
|
1619
1627
|
flex-direction: column;
|
|
1620
|
-
padding:
|
|
1628
|
+
padding: ${tokens.spacing.xs};
|
|
1621
1629
|
background: ${tokens.colors.surface.base};
|
|
1622
1630
|
border-radius: ${tokens.borderRadius.md};
|
|
1623
1631
|
gap: ${tokens.spacing.xs};
|
|
@@ -1630,7 +1638,7 @@ var DarkSectionHeader = styled11__default.default.button`
|
|
|
1630
1638
|
align-items: center;
|
|
1631
1639
|
justify-content: space-between;
|
|
1632
1640
|
width: 100%;
|
|
1633
|
-
padding: ${tokens.spacing.xs}
|
|
1641
|
+
padding: ${tokens.spacing.xs} ${tokens.spacing.xs};
|
|
1634
1642
|
border: none;
|
|
1635
1643
|
background: transparent;
|
|
1636
1644
|
font-family: ${tokens.typography.fontFamily.primary};
|
|
@@ -1672,18 +1680,18 @@ var DarkChevronIcon = styled11__default.default.span`
|
|
|
1672
1680
|
var DarkSectionContent = styled11__default.default.div`
|
|
1673
1681
|
display: flex;
|
|
1674
1682
|
flex-direction: column;
|
|
1675
|
-
gap:
|
|
1683
|
+
gap: ${tokens.spacing.xs};
|
|
1676
1684
|
padding-left: ${tokens.spacing.xs};
|
|
1677
|
-
margin-top:
|
|
1685
|
+
margin-top: ${tokens.spacing.xs};
|
|
1678
1686
|
min-width: 0;
|
|
1679
1687
|
overflow: hidden;
|
|
1680
1688
|
`;
|
|
1681
1689
|
var DarkNotificationItemWrapper = styled11__default.default.button`
|
|
1682
1690
|
display: flex;
|
|
1683
1691
|
align-items: center;
|
|
1684
|
-
gap:
|
|
1692
|
+
gap: ${tokens.spacing.xs};
|
|
1685
1693
|
width: 100%;
|
|
1686
|
-
padding: ${tokens.spacing.xs}
|
|
1694
|
+
padding: ${tokens.spacing.xs} ${tokens.spacing.xs};
|
|
1687
1695
|
border: none;
|
|
1688
1696
|
cursor: pointer;
|
|
1689
1697
|
text-align: left;
|
|
@@ -1739,7 +1747,7 @@ var DarkItemIcon = styled11__default.default.span`
|
|
|
1739
1747
|
|
|
1740
1748
|
/* Custom icon (emoji or colored icon) styling */
|
|
1741
1749
|
${(props) => props.$hasCustomIcon && `
|
|
1742
|
-
padding:
|
|
1750
|
+
padding: ${tokens.spacing.xs};
|
|
1743
1751
|
`}
|
|
1744
1752
|
`;
|
|
1745
1753
|
var DarkItemText = styled11__default.default.span`
|
|
@@ -2017,7 +2025,7 @@ var TabButton = styled11__default.default.button`
|
|
|
2017
2025
|
flex-shrink: 0;
|
|
2018
2026
|
|
|
2019
2027
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2020
|
-
padding:
|
|
2028
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
2021
2029
|
font-size: ${tokens.typography.fontSize.xs};
|
|
2022
2030
|
}
|
|
2023
2031
|
|
|
@@ -2115,7 +2123,7 @@ styled11__default.default.button`
|
|
|
2115
2123
|
overflow: hidden;
|
|
2116
2124
|
|
|
2117
2125
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2118
|
-
padding:
|
|
2126
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
2119
2127
|
font-size: 13px;
|
|
2120
2128
|
gap: ${tokens.spacing.sm};
|
|
2121
2129
|
}
|
|
@@ -2197,7 +2205,7 @@ var CategoryTitle = styled11__default.default.div`
|
|
|
2197
2205
|
gap: ${tokens.spacing.sm};
|
|
2198
2206
|
|
|
2199
2207
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2200
|
-
gap:
|
|
2208
|
+
gap: ${tokens.spacing.xs};
|
|
2201
2209
|
}
|
|
2202
2210
|
`;
|
|
2203
2211
|
styled11__default.default.img`
|
|
@@ -2254,7 +2262,7 @@ var CategoryDisclosurePanel = styled11__default.default(reactAriaComponents.Disc
|
|
|
2254
2262
|
overflow: hidden;
|
|
2255
2263
|
|
|
2256
2264
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2257
|
-
padding-left:
|
|
2265
|
+
padding-left: ${tokens.spacing.xs};
|
|
2258
2266
|
}
|
|
2259
2267
|
|
|
2260
2268
|
&[data-entering] {
|
|
@@ -2276,7 +2284,7 @@ var ItemContainer = styled11__default.default.div`
|
|
|
2276
2284
|
display: flex;
|
|
2277
2285
|
align-items: center;
|
|
2278
2286
|
gap: ${tokens.spacing.sm};
|
|
2279
|
-
padding:
|
|
2287
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.sm}; // Increased vertical padding from 4px to 8px for better breathing room
|
|
2280
2288
|
border-radius: ${tokens.borderRadius.sm};
|
|
2281
2289
|
cursor: pointer;
|
|
2282
2290
|
transition: background-color ${tokens.transitions.fast};
|
|
@@ -2284,8 +2292,8 @@ var ItemContainer = styled11__default.default.div`
|
|
|
2284
2292
|
overflow: hidden;
|
|
2285
2293
|
|
|
2286
2294
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2287
|
-
gap:
|
|
2288
|
-
padding: ${tokens.spacing.sm}
|
|
2295
|
+
gap: ${tokens.spacing.xs};
|
|
2296
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.xs}; // Increased vertical padding from 4px to 8px for mobile
|
|
2289
2297
|
}
|
|
2290
2298
|
|
|
2291
2299
|
&:hover {
|
|
@@ -2326,7 +2334,7 @@ var ItemHeader = styled11__default.default(reactAriaComponents.Button)`
|
|
|
2326
2334
|
}
|
|
2327
2335
|
`;
|
|
2328
2336
|
var ItemDisclosurePanel = styled11__default.default(reactAriaComponents.DisclosurePanel)`
|
|
2329
|
-
padding:
|
|
2337
|
+
padding: ${tokens.spacing.xs};
|
|
2330
2338
|
background-color: ${tokens.colors.overlay};
|
|
2331
2339
|
border-radius: 0 0 ${tokens.borderRadius.md} ${tokens.borderRadius.md};
|
|
2332
2340
|
margin-top: -${tokens.spacing.xs};
|
|
@@ -2337,7 +2345,7 @@ var ItemDisclosurePanel = styled11__default.default(reactAriaComponents.Disclosu
|
|
|
2337
2345
|
overflow: hidden;
|
|
2338
2346
|
|
|
2339
2347
|
@media (max-width: ${tokens.breakpoints.mobile}px) {
|
|
2340
|
-
padding:
|
|
2348
|
+
padding: ${tokens.spacing.xs};
|
|
2341
2349
|
}
|
|
2342
2350
|
|
|
2343
2351
|
&[data-entering] {
|
|
@@ -2658,7 +2666,7 @@ function ItemWithLogs({
|
|
|
2658
2666
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(ItemDisclosurePanel, { children: run.customContent ? (
|
|
2659
2667
|
// Render custom content directly
|
|
2660
2668
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "16px" }, children: run.customContent })
|
|
2661
|
-
) : run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color:
|
|
2669
|
+
) : run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: tokens.colors.text.tertiary, fontSize: "13px", padding: "8px" }, children: "No action logs available" }) })
|
|
2662
2670
|
] });
|
|
2663
2671
|
}
|
|
2664
2672
|
function normalizeCategory(category) {
|
|
@@ -2693,7 +2701,7 @@ function WorkflowGroupItem({
|
|
|
2693
2701
|
/* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Heading, { level: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(CategoryHeader, { slot: "trigger", style: { paddingLeft: "8px" }, children: [
|
|
2694
2702
|
/* @__PURE__ */ jsxRuntime.jsxs(CategoryTitle, { children: [
|
|
2695
2703
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "13px", fontWeight: 500 }, children: group.workflowName }),
|
|
2696
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "11px", color:
|
|
2704
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "11px", color: tokens.colors.text.tertiary, marginLeft: "8px" }, children: [
|
|
2697
2705
|
"(",
|
|
2698
2706
|
group.runs.length,
|
|
2699
2707
|
")"
|
|
@@ -2903,7 +2911,7 @@ function ConnectionsTabContent({
|
|
|
2903
2911
|
return /* @__PURE__ */ jsxRuntime.jsxs(ConnectionsContainer, { children: [
|
|
2904
2912
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectionDescription, { children: descriptionText }),
|
|
2905
2913
|
/* @__PURE__ */ jsxRuntime.jsx(GoogleButton, { ...buttonProps, ref, $isConnected: isConnected, children: buttonText }),
|
|
2906
|
-
isConnected && googleConnection?.scopes && googleConnection.scopes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "16px", fontSize: "13px", color:
|
|
2914
|
+
isConnected && googleConnection?.scopes && googleConnection.scopes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "16px", fontSize: "13px", color: tokens.colors.text.secondary }, children: [
|
|
2907
2915
|
"Connected services: ",
|
|
2908
2916
|
googleConnection.scopes.join(", ")
|
|
2909
2917
|
] })
|
|
@@ -3354,12 +3362,12 @@ var NotificationItemWrapper = styled11__default.default.button`
|
|
|
3354
3362
|
align-items: center;
|
|
3355
3363
|
gap: ${tokens.spacing.md};
|
|
3356
3364
|
width: 100%;
|
|
3357
|
-
padding: ${(props) => props.$isSelected ? `${tokens.spacing.md} ${tokens.spacing.md}` :
|
|
3365
|
+
padding: ${(props) => props.$isSelected ? `${tokens.spacing.md} ${tokens.spacing.md}` : `${tokens.spacing.sm} ${tokens.spacing.md}`};
|
|
3358
3366
|
border: none;
|
|
3359
3367
|
cursor: pointer;
|
|
3360
3368
|
text-align: left;
|
|
3361
3369
|
transition: all ${tokens.transitions.normal};
|
|
3362
|
-
border-radius: ${(props) => props.$isSelected ? tokens.borderRadius.lg :
|
|
3370
|
+
border-radius: ${(props) => props.$isSelected ? tokens.borderRadius.lg : tokens.borderRadius.lg};
|
|
3363
3371
|
|
|
3364
3372
|
/* Default state - transparent background */
|
|
3365
3373
|
background-color: ${(props) => props.$isSelected ? tokens.colors.secondary : "transparent"};
|
|
@@ -3408,7 +3416,7 @@ var ItemIcon2 = styled11__default.default.span`
|
|
|
3408
3416
|
|
|
3409
3417
|
/* Custom icon (emoji or colored icon) styling */
|
|
3410
3418
|
${(props) => props.$hasCustomIcon && `
|
|
3411
|
-
padding:
|
|
3419
|
+
padding: ${tokens.spacing.xs};
|
|
3412
3420
|
`}
|
|
3413
3421
|
`;
|
|
3414
3422
|
var ItemText = styled11__default.default.span`
|
|
@@ -3652,7 +3660,7 @@ var StyledUserMessage = styled11__default.default.button`
|
|
|
3652
3660
|
&& {
|
|
3653
3661
|
background: ${tokens.colors.message.user} !important;
|
|
3654
3662
|
color: ${tokens.colors.text.primary} !important;
|
|
3655
|
-
border-radius: ${tokens.borderRadius
|
|
3663
|
+
border-radius: ${tokens.borderRadius["2xl"]} !important; /* Rounded corners that work for multi-line */
|
|
3656
3664
|
}
|
|
3657
3665
|
|
|
3658
3666
|
/* Subtle shadow and glow effect */
|
|
@@ -5235,6 +5243,9 @@ var Container12 = styled11__default.default.div`
|
|
|
5235
5243
|
white-space: pre-wrap;
|
|
5236
5244
|
word-break: break-word;
|
|
5237
5245
|
line-height: ${tokens.typography.lineHeight.normal};
|
|
5246
|
+
/* Performance optimizations for streaming text */
|
|
5247
|
+
text-rendering: optimizeSpeed;
|
|
5248
|
+
contain: content;
|
|
5238
5249
|
`;
|
|
5239
5250
|
var Cursor = styled11__default.default.span`
|
|
5240
5251
|
display: inline-block;
|
|
@@ -5294,20 +5305,9 @@ var MessageContainer = styled11__default.default.div`
|
|
|
5294
5305
|
align-items: flex-start;
|
|
5295
5306
|
padding: ${tokens.spacing.sm} 0;
|
|
5296
5307
|
max-width: 100%;
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
@keyframes fadeInSlideUp {
|
|
5302
|
-
from {
|
|
5303
|
-
opacity: 0;
|
|
5304
|
-
transform: translateY(${tokens.spacing.sm});
|
|
5305
|
-
}
|
|
5306
|
-
to {
|
|
5307
|
-
opacity: 1;
|
|
5308
|
-
transform: translateY(0);
|
|
5309
|
-
}
|
|
5310
|
-
}
|
|
5308
|
+
/* GPU acceleration hint for smooth rendering during streaming */
|
|
5309
|
+
will-change: contents;
|
|
5310
|
+
contain: content;
|
|
5311
5311
|
`;
|
|
5312
5312
|
var AvatarContainer = styled11__default.default.div`
|
|
5313
5313
|
flex-shrink: 0;
|
|
@@ -5342,9 +5342,8 @@ var ContentContainer = styled11__default.default.div`
|
|
|
5342
5342
|
min-width: 0;
|
|
5343
5343
|
`;
|
|
5344
5344
|
var MessageContent = styled11__default.default.div`
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
-webkit-backdrop-filter: blur(10px);
|
|
5345
|
+
/* Use solid color instead of backdrop-filter for performance during streaming */
|
|
5346
|
+
background-color: ${tokens.colors.surface.elevated};
|
|
5348
5347
|
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
5349
5348
|
border-radius: ${tokens.borderRadius.lg};
|
|
5350
5349
|
border-top-left-radius: ${tokens.borderRadius.sm};
|
|
@@ -5354,24 +5353,25 @@ var MessageContent = styled11__default.default.div`
|
|
|
5354
5353
|
font-family: ${tokens.typography.fontFamily.primary};
|
|
5355
5354
|
word-wrap: break-word;
|
|
5356
5355
|
white-space: pre-wrap;
|
|
5356
|
+
/* Optimize text rendering */
|
|
5357
|
+
text-rendering: optimizeSpeed;
|
|
5357
5358
|
`;
|
|
5358
5359
|
var LoadingDots3 = styled11__default.default.div`
|
|
5359
5360
|
display: flex;
|
|
5360
5361
|
gap: ${tokens.spacing.xs};
|
|
5361
5362
|
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
-webkit-backdrop-filter: blur(10px);
|
|
5363
|
+
/* Use solid color instead of backdrop-filter for performance */
|
|
5364
|
+
background-color: ${tokens.colors.surface.elevated};
|
|
5365
5365
|
border-radius: ${tokens.borderRadius.lg};
|
|
5366
5366
|
border-top-left-radius: ${tokens.borderRadius.sm};
|
|
5367
5367
|
width: fit-content;
|
|
5368
5368
|
`;
|
|
5369
|
-
var
|
|
5370
|
-
0%,
|
|
5371
|
-
|
|
5369
|
+
var pulse3 = styled11.keyframes`
|
|
5370
|
+
0%, 100% {
|
|
5371
|
+
opacity: 0.4;
|
|
5372
5372
|
}
|
|
5373
|
-
|
|
5374
|
-
|
|
5373
|
+
50% {
|
|
5374
|
+
opacity: 1;
|
|
5375
5375
|
}
|
|
5376
5376
|
`;
|
|
5377
5377
|
var LoadingDot = styled11__default.default.div`
|
|
@@ -5379,7 +5379,8 @@ var LoadingDot = styled11__default.default.div`
|
|
|
5379
5379
|
height: ${tokens.spacing.sm};
|
|
5380
5380
|
border-radius: ${tokens.borderRadius.full};
|
|
5381
5381
|
background-color: ${tokens.colors.text.tertiary};
|
|
5382
|
-
animation
|
|
5382
|
+
/* Use simple opacity animation instead of transform bounce */
|
|
5383
|
+
animation: ${pulse3} 1.4s ease-in-out infinite;
|
|
5383
5384
|
animation-delay: ${(props) => props.delay}s;
|
|
5384
5385
|
`;
|
|
5385
5386
|
var FileAttachmentContainer = styled11__default.default.div`
|
|
@@ -6770,6 +6771,161 @@ function LinkedInIcon({
|
|
|
6770
6771
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, style: { display: "inline-flex", width: size, height: size }, children: svgElement });
|
|
6771
6772
|
}
|
|
6772
6773
|
LinkedInIcon.displayName = "LinkedInIcon";
|
|
6774
|
+
var StyledIconWrapper3 = styled11__default.default.button`
|
|
6775
|
+
display: inline-flex;
|
|
6776
|
+
align-items: center;
|
|
6777
|
+
justify-content: center;
|
|
6778
|
+
background: transparent;
|
|
6779
|
+
border: none;
|
|
6780
|
+
padding: 0;
|
|
6781
|
+
cursor: pointer;
|
|
6782
|
+
transition: all 0.2s ease-in-out;
|
|
6783
|
+
width: ${({ $size }) => `${$size}px`};
|
|
6784
|
+
height: ${({ $size }) => `${$size}px`};
|
|
6785
|
+
border-radius: ${({ theme }) => theme?.radii?.sm ?? "4px"};
|
|
6786
|
+
|
|
6787
|
+
&:hover:not(:disabled) {
|
|
6788
|
+
opacity: 0.8;
|
|
6789
|
+
transform: scale(1.05);
|
|
6790
|
+
}
|
|
6791
|
+
|
|
6792
|
+
&:active:not(:disabled) {
|
|
6793
|
+
opacity: 0.6;
|
|
6794
|
+
transform: scale(0.95);
|
|
6795
|
+
}
|
|
6796
|
+
|
|
6797
|
+
&:focus-visible {
|
|
6798
|
+
outline: 2px solid ${({ theme }) => (theme?.colors?.primary && typeof theme.colors.primary === "object" ? theme.colors.primary.light : theme?.colors?.primary) ?? "#0066FF"};
|
|
6799
|
+
outline-offset: 2px;
|
|
6800
|
+
}
|
|
6801
|
+
|
|
6802
|
+
&:disabled {
|
|
6803
|
+
cursor: not-allowed;
|
|
6804
|
+
opacity: 0.5;
|
|
6805
|
+
}
|
|
6806
|
+
|
|
6807
|
+
/* Remove default focus outline, using focus-visible instead */
|
|
6808
|
+
&:focus {
|
|
6809
|
+
outline: none;
|
|
6810
|
+
}
|
|
6811
|
+
|
|
6812
|
+
svg {
|
|
6813
|
+
display: block;
|
|
6814
|
+
width: 100%;
|
|
6815
|
+
height: 100%;
|
|
6816
|
+
}
|
|
6817
|
+
`;
|
|
6818
|
+
function PostizIcon({
|
|
6819
|
+
variant = "colored",
|
|
6820
|
+
size = 24,
|
|
6821
|
+
className,
|
|
6822
|
+
style,
|
|
6823
|
+
"aria-label": ariaLabel = "Postiz",
|
|
6824
|
+
onPress,
|
|
6825
|
+
...ariaProps
|
|
6826
|
+
}) {
|
|
6827
|
+
const ref = react.useRef(null);
|
|
6828
|
+
const isInteractive = Boolean(onPress);
|
|
6829
|
+
const { buttonProps } = button.useButton(
|
|
6830
|
+
{
|
|
6831
|
+
...ariaProps,
|
|
6832
|
+
onPress,
|
|
6833
|
+
"aria-label": ariaLabel,
|
|
6834
|
+
isDisabled: !isInteractive
|
|
6835
|
+
},
|
|
6836
|
+
ref
|
|
6837
|
+
);
|
|
6838
|
+
const role = isInteractive ? "button" : "img";
|
|
6839
|
+
const ariaHidden = !isInteractive && !ariaLabel;
|
|
6840
|
+
const colors = {
|
|
6841
|
+
colored: {
|
|
6842
|
+
purple: "#612bd3",
|
|
6843
|
+
dark: "#131019",
|
|
6844
|
+
white: "#fff",
|
|
6845
|
+
stroke: "#131019"
|
|
6846
|
+
},
|
|
6847
|
+
black: {
|
|
6848
|
+
purple: "black",
|
|
6849
|
+
dark: "black",
|
|
6850
|
+
white: "black",
|
|
6851
|
+
stroke: "black"
|
|
6852
|
+
},
|
|
6853
|
+
white: {
|
|
6854
|
+
purple: "white",
|
|
6855
|
+
dark: "white",
|
|
6856
|
+
white: "white",
|
|
6857
|
+
stroke: "white"
|
|
6858
|
+
}
|
|
6859
|
+
};
|
|
6860
|
+
const c = colors[variant];
|
|
6861
|
+
const svgElement = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6862
|
+
"svg",
|
|
6863
|
+
{
|
|
6864
|
+
width: size,
|
|
6865
|
+
height: size,
|
|
6866
|
+
viewBox: "26.74 0.02 460.94 509.34",
|
|
6867
|
+
fill: "none",
|
|
6868
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6869
|
+
role,
|
|
6870
|
+
"aria-label": ariaLabel,
|
|
6871
|
+
"aria-hidden": ariaHidden,
|
|
6872
|
+
children: [
|
|
6873
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6874
|
+
"path",
|
|
6875
|
+
{
|
|
6876
|
+
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",
|
|
6877
|
+
fill: c.purple
|
|
6878
|
+
}
|
|
6879
|
+
),
|
|
6880
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6881
|
+
"path",
|
|
6882
|
+
{
|
|
6883
|
+
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",
|
|
6884
|
+
fill: "none",
|
|
6885
|
+
stroke: c.stroke,
|
|
6886
|
+
strokeWidth: "4.9373"
|
|
6887
|
+
}
|
|
6888
|
+
),
|
|
6889
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6890
|
+
"path",
|
|
6891
|
+
{
|
|
6892
|
+
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",
|
|
6893
|
+
fill: c.white
|
|
6894
|
+
}
|
|
6895
|
+
),
|
|
6896
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6897
|
+
"path",
|
|
6898
|
+
{
|
|
6899
|
+
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",
|
|
6900
|
+
fill: c.dark
|
|
6901
|
+
}
|
|
6902
|
+
)
|
|
6903
|
+
]
|
|
6904
|
+
}
|
|
6905
|
+
);
|
|
6906
|
+
if (isInteractive) {
|
|
6907
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6908
|
+
StyledIconWrapper3,
|
|
6909
|
+
{
|
|
6910
|
+
...buttonProps,
|
|
6911
|
+
ref,
|
|
6912
|
+
className,
|
|
6913
|
+
style,
|
|
6914
|
+
$size: size,
|
|
6915
|
+
children: svgElement
|
|
6916
|
+
}
|
|
6917
|
+
);
|
|
6918
|
+
}
|
|
6919
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6920
|
+
"span",
|
|
6921
|
+
{
|
|
6922
|
+
className,
|
|
6923
|
+
style: { display: "inline-flex", width: size, height: size, ...style },
|
|
6924
|
+
children: svgElement
|
|
6925
|
+
}
|
|
6926
|
+
);
|
|
6927
|
+
}
|
|
6928
|
+
PostizIcon.displayName = "PostizIcon";
|
|
6773
6929
|
var ColoredVariant = () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6774
6930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6775
6931
|
"path",
|
|
@@ -7272,7 +7428,7 @@ var StyledXIcon = styled11__default.default.svg`
|
|
|
7272
7428
|
&:focus-visible {
|
|
7273
7429
|
outline: 2px solid ${theme?.colors?.primary ?? "#007bff"};
|
|
7274
7430
|
outline-offset: 2px;
|
|
7275
|
-
border-radius:
|
|
7431
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
7276
7432
|
}
|
|
7277
7433
|
`}
|
|
7278
7434
|
`;
|
|
@@ -7425,15 +7581,15 @@ YouTubeIcon.displayName = "YouTubeIcon";
|
|
|
7425
7581
|
var PLATFORM_CONFIGS = {
|
|
7426
7582
|
x: {
|
|
7427
7583
|
icon: /* @__PURE__ */ jsxRuntime.jsx(XIcon, { variant: "white", size: 20 }),
|
|
7428
|
-
color:
|
|
7429
|
-
bgColor:
|
|
7584
|
+
color: tokens.colors.text.primary,
|
|
7585
|
+
bgColor: tokens.colors.platform.x,
|
|
7430
7586
|
maxChars: 280,
|
|
7431
7587
|
name: "X (Twitter)",
|
|
7432
7588
|
description: "Concise, punchy posts with 1-2 hashtags"
|
|
7433
7589
|
},
|
|
7434
7590
|
linkedin: {
|
|
7435
7591
|
icon: /* @__PURE__ */ jsxRuntime.jsx(LinkedInIcon, { variant: "colored", size: 20 }),
|
|
7436
|
-
color:
|
|
7592
|
+
color: tokens.colors.platform.linkedin,
|
|
7437
7593
|
bgColor: "#f3f6f8",
|
|
7438
7594
|
maxChars: 3e3,
|
|
7439
7595
|
name: "LinkedIn",
|
|
@@ -7441,7 +7597,7 @@ var PLATFORM_CONFIGS = {
|
|
|
7441
7597
|
},
|
|
7442
7598
|
instagram: {
|
|
7443
7599
|
icon: /* @__PURE__ */ jsxRuntime.jsx(InstagramIcon, { variant: "colored", size: 20 }),
|
|
7444
|
-
color:
|
|
7600
|
+
color: tokens.colors.platform.instagram,
|
|
7445
7601
|
bgColor: "#fafafa",
|
|
7446
7602
|
maxChars: 2200,
|
|
7447
7603
|
name: "Instagram",
|
|
@@ -7449,7 +7605,7 @@ var PLATFORM_CONFIGS = {
|
|
|
7449
7605
|
},
|
|
7450
7606
|
facebook: {
|
|
7451
7607
|
icon: /* @__PURE__ */ jsxRuntime.jsx(FacebookIcon, { variant: "colored", size: 20 }),
|
|
7452
|
-
color:
|
|
7608
|
+
color: tokens.colors.platform.facebook,
|
|
7453
7609
|
bgColor: "#f0f2f5",
|
|
7454
7610
|
maxChars: 63206,
|
|
7455
7611
|
name: "Facebook",
|
|
@@ -7457,7 +7613,7 @@ var PLATFORM_CONFIGS = {
|
|
|
7457
7613
|
},
|
|
7458
7614
|
youtube: {
|
|
7459
7615
|
icon: /* @__PURE__ */ jsxRuntime.jsx(YouTubeIcon, { variant: "colored", size: 20 }),
|
|
7460
|
-
color:
|
|
7616
|
+
color: tokens.colors.platform.youtube,
|
|
7461
7617
|
bgColor: "#f9f9f9",
|
|
7462
7618
|
maxChars: 5e3,
|
|
7463
7619
|
name: "YouTube",
|
|
@@ -7518,10 +7674,12 @@ function getCharacterCount(content, hashtags) {
|
|
|
7518
7674
|
return (content + hashtagString).length;
|
|
7519
7675
|
}
|
|
7520
7676
|
function isWithinCharLimit(platform, characterCount) {
|
|
7521
|
-
|
|
7677
|
+
const config = PLATFORM_CONFIGS[platform] || PLATFORM_CONFIGS.x;
|
|
7678
|
+
return characterCount <= config.maxChars;
|
|
7522
7679
|
}
|
|
7523
7680
|
function getCharacterLimitPercentage(platform, characterCount) {
|
|
7524
|
-
|
|
7681
|
+
const config = PLATFORM_CONFIGS[platform] || PLATFORM_CONFIGS.x;
|
|
7682
|
+
return Math.min(100, characterCount / config.maxChars * 100);
|
|
7525
7683
|
}
|
|
7526
7684
|
function getCharacterLimitColor(percentage) {
|
|
7527
7685
|
if (percentage > 100) return "bg-red-500";
|
|
@@ -7839,7 +7997,7 @@ var PostPreviewCard = ({
|
|
|
7839
7997
|
onContentChange,
|
|
7840
7998
|
isLoading = false
|
|
7841
7999
|
}) => {
|
|
7842
|
-
const platformConfig = PLATFORM_CONFIGS[post.platform];
|
|
8000
|
+
const platformConfig = PLATFORM_CONFIGS[post.platform] || PLATFORM_CONFIGS.x;
|
|
7843
8001
|
const showSkeleton = isLoading && !post.content;
|
|
7844
8002
|
const displayContent = isEditing && editContent !== void 0 ? editContent : post.editedContent || post.content;
|
|
7845
8003
|
const currentCharCount = displayContent.length;
|
|
@@ -7889,7 +8047,14 @@ var PostPreviewCard = ({
|
|
|
7889
8047
|
hashtag.replace(/^#/, "")
|
|
7890
8048
|
] }, hashtag)) })
|
|
7891
8049
|
] }),
|
|
7892
|
-
post.imageUrl
|
|
8050
|
+
post.imageUrl ? /* @__PURE__ */ jsxRuntime.jsx(ImagePreviewContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(ImagePreview, { src: post.imageUrl, alt: "Post image preview" }) }) : post.platform === "instagram" && /* @__PURE__ */ jsxRuntime.jsxs(ImagePlaceholder, { children: [
|
|
8051
|
+
/* @__PURE__ */ jsxRuntime.jsx(PlaceholderIcon, { children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
8052
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
8053
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
8054
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "21 15 16 10 5 21" })
|
|
8055
|
+
] }) }),
|
|
8056
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "No image attached" })
|
|
8057
|
+
] }),
|
|
7893
8058
|
/* @__PURE__ */ jsxRuntime.jsx(ProgressBarContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(ProgressBarTrack, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7894
8059
|
ProgressBarFill2,
|
|
7895
8060
|
{
|
|
@@ -8036,13 +8201,13 @@ var ProgressBarTrack = styled11__default.default.div`
|
|
|
8036
8201
|
width: 100%;
|
|
8037
8202
|
height: 4px;
|
|
8038
8203
|
background: ${tokens.colors.border.default};
|
|
8039
|
-
border-radius:
|
|
8204
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
8040
8205
|
overflow: hidden;
|
|
8041
8206
|
`;
|
|
8042
8207
|
var ProgressBarFill2 = styled11__default.default.div`
|
|
8043
8208
|
width: ${({ $percentage }) => $percentage}%;
|
|
8044
8209
|
height: 100%;
|
|
8045
|
-
border-radius:
|
|
8210
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
8046
8211
|
transition: width 0.3s ease, background-color 0.3s ease;
|
|
8047
8212
|
background: ${({ $colorClass }) => {
|
|
8048
8213
|
if ($colorClass.includes("red")) return tokens.colors.error;
|
|
@@ -8063,6 +8228,42 @@ var ImagePreview = styled11__default.default.img`
|
|
|
8063
8228
|
object-fit: cover;
|
|
8064
8229
|
display: block;
|
|
8065
8230
|
`;
|
|
8231
|
+
var ImagePlaceholder = styled11__default.default.div`
|
|
8232
|
+
width: 100%;
|
|
8233
|
+
height: 200px;
|
|
8234
|
+
background: linear-gradient(
|
|
8235
|
+
45deg,
|
|
8236
|
+
#f09433 0%,
|
|
8237
|
+
#e6683c 25%,
|
|
8238
|
+
#dc2743 50%,
|
|
8239
|
+
#cc2366 75%,
|
|
8240
|
+
#bc1888 100%
|
|
8241
|
+
);
|
|
8242
|
+
border-radius: ${tokens.borderRadius.md};
|
|
8243
|
+
display: flex;
|
|
8244
|
+
flex-direction: column;
|
|
8245
|
+
align-items: center;
|
|
8246
|
+
justify-content: center;
|
|
8247
|
+
gap: ${tokens.spacing.sm};
|
|
8248
|
+
color: white;
|
|
8249
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
8250
|
+
opacity: 0.8;
|
|
8251
|
+
margin-bottom: ${tokens.spacing.sm};
|
|
8252
|
+
`;
|
|
8253
|
+
var PlaceholderIcon = styled11__default.default.div`
|
|
8254
|
+
width: 48px;
|
|
8255
|
+
height: 48px;
|
|
8256
|
+
border: 2px solid white;
|
|
8257
|
+
border-radius: ${tokens.borderRadius.md};
|
|
8258
|
+
display: flex;
|
|
8259
|
+
align-items: center;
|
|
8260
|
+
justify-content: center;
|
|
8261
|
+
|
|
8262
|
+
svg {
|
|
8263
|
+
width: 24px;
|
|
8264
|
+
height: 24px;
|
|
8265
|
+
}
|
|
8266
|
+
`;
|
|
8066
8267
|
var shimmer = styled11.keyframes`
|
|
8067
8268
|
0% {
|
|
8068
8269
|
background-position: -200% 0;
|
|
@@ -8114,9 +8315,21 @@ var PlatformCarousel = ({
|
|
|
8114
8315
|
if (posts.length === 0) {
|
|
8115
8316
|
return /* @__PURE__ */ jsxRuntime.jsx(CarouselContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "No posts available" }) });
|
|
8116
8317
|
}
|
|
8318
|
+
const defaultConfig = {
|
|
8319
|
+
icon: null,
|
|
8320
|
+
color: tokens.colors.text.secondary,
|
|
8321
|
+
bgColor: tokens.colors.background.light,
|
|
8322
|
+
maxChars: 1e3,
|
|
8323
|
+
name: "Unknown",
|
|
8324
|
+
description: "Unknown platform"
|
|
8325
|
+
};
|
|
8326
|
+
const getConfig = (platform) => {
|
|
8327
|
+
const normalized = normalizePlatform(platform);
|
|
8328
|
+
return normalized ? PLATFORM_CONFIGS[normalized] : defaultConfig;
|
|
8329
|
+
};
|
|
8117
8330
|
return /* @__PURE__ */ jsxRuntime.jsxs(CarouselContainer, { children: [
|
|
8118
8331
|
/* @__PURE__ */ jsxRuntime.jsx(TabsContainer, { children: posts.map((post, index) => {
|
|
8119
|
-
const config =
|
|
8332
|
+
const config = getConfig(post.platform);
|
|
8120
8333
|
const isActive = index === activeIndex;
|
|
8121
8334
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8122
8335
|
PlatformTab,
|
|
@@ -8149,7 +8362,7 @@ var PlatformCarousel = ({
|
|
|
8149
8362
|
) }, `slide-${post.platform}-${index}`);
|
|
8150
8363
|
}) }),
|
|
8151
8364
|
posts.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(NavigationDotsContainer, { children: posts.map((post, index) => {
|
|
8152
|
-
const config =
|
|
8365
|
+
const config = getConfig(post.platform);
|
|
8153
8366
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8154
8367
|
NavigationDot,
|
|
8155
8368
|
{
|
|
@@ -8941,8 +9154,8 @@ var Indicators = styled11__default.default.div`
|
|
|
8941
9154
|
var IndicatorPill = styled11__default.default.span`
|
|
8942
9155
|
display: inline-flex;
|
|
8943
9156
|
align-items: center;
|
|
8944
|
-
gap:
|
|
8945
|
-
padding:
|
|
9157
|
+
gap: ${tokens.spacing.xs};
|
|
9158
|
+
padding: ${tokens.spacing.xs} ${tokens.spacing.sm};
|
|
8946
9159
|
border-radius: ${tokens.borderRadius.full};
|
|
8947
9160
|
background: ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}15` : `${tokens.colors.info}15`};
|
|
8948
9161
|
border: 1px solid ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}30` : `${tokens.colors.info}30`};
|
|
@@ -9752,7 +9965,7 @@ var spin = styled11.keyframes`
|
|
|
9752
9965
|
transform: rotate(360deg);
|
|
9753
9966
|
}
|
|
9754
9967
|
`;
|
|
9755
|
-
var
|
|
9968
|
+
var pulse4 = styled11.keyframes`
|
|
9756
9969
|
0%, 100% {
|
|
9757
9970
|
opacity: 1;
|
|
9758
9971
|
}
|
|
@@ -9830,7 +10043,7 @@ var IconContainer3 = styled11__default.default.div`
|
|
|
9830
10043
|
animation: ${(props) => {
|
|
9831
10044
|
if (props.$animated) {
|
|
9832
10045
|
if (props.$status === "running") return spin;
|
|
9833
|
-
if (props.$status === "pending") return
|
|
10046
|
+
if (props.$status === "pending") return pulse4;
|
|
9834
10047
|
}
|
|
9835
10048
|
return "none";
|
|
9836
10049
|
}}
|
|
@@ -9997,6 +10210,7 @@ exports.PlatformCarousel = PlatformCarousel;
|
|
|
9997
10210
|
exports.PlatformGrid = PlatformGrid;
|
|
9998
10211
|
exports.PostApprovalControls = PostApprovalControls;
|
|
9999
10212
|
exports.PostPreviewCard = PostPreviewCard;
|
|
10213
|
+
exports.PostizIcon = PostizIcon;
|
|
10000
10214
|
exports.RedditIcon = RedditIcon;
|
|
10001
10215
|
exports.Response = Response;
|
|
10002
10216
|
exports.SecretInput = SecretInput;
|