@agentiffai/design 1.3.15 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +53 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +53 -16
- package/dist/index.js.map +1 -1
- package/dist/workflow/index.cjs +5 -5
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +2 -2
- package/dist/workflow/index.d.ts +2 -2
- package/dist/workflow/index.js +5 -5
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8271,9 +8271,9 @@ var ProgressFill = styled47__default.default.div`
|
|
|
8271
8271
|
}};
|
|
8272
8272
|
`;
|
|
8273
8273
|
var Actions3 = styled47__default.default.div`
|
|
8274
|
-
display:
|
|
8275
|
-
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
|
8274
|
+
display: flex;
|
|
8276
8275
|
gap: ${tokens.spacing.sm};
|
|
8276
|
+
justify-content: flex-end;
|
|
8277
8277
|
`;
|
|
8278
8278
|
var ActionButton5 = styled47__default.default.button`
|
|
8279
8279
|
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
@@ -8281,9 +8281,11 @@ var ActionButton5 = styled47__default.default.button`
|
|
|
8281
8281
|
font-size: ${tokens.typography.fontSize.sm};
|
|
8282
8282
|
font-weight: ${tokens.typography.fontWeight.semibold};
|
|
8283
8283
|
cursor: pointer;
|
|
8284
|
-
transition:
|
|
8284
|
+
transition: background ${tokens.transitions.fast}, opacity ${tokens.transitions.fast};
|
|
8285
8285
|
border: none;
|
|
8286
8286
|
white-space: nowrap;
|
|
8287
|
+
min-width: 90px;
|
|
8288
|
+
text-align: center;
|
|
8287
8289
|
|
|
8288
8290
|
&:disabled {
|
|
8289
8291
|
opacity: 0.5;
|
|
@@ -9268,6 +9270,29 @@ function truncateText(text, maxLength) {
|
|
|
9268
9270
|
function getSubredditUrl(subreddit) {
|
|
9269
9271
|
return `https://www.reddit.com/r/${subreddit}`;
|
|
9270
9272
|
}
|
|
9273
|
+
var renderSimpleMarkdown = (text) => {
|
|
9274
|
+
if (!text) return null;
|
|
9275
|
+
let processed = text;
|
|
9276
|
+
processed = processed.replace(/\*\*(.+?)\*\*/g, "{{BOLD:$1}}");
|
|
9277
|
+
processed = processed.replace(/\*(.+?)\*/g, "{{ITALIC:$1}}");
|
|
9278
|
+
processed = processed.replace(/`(.+?)`/g, "{{CODE:$1}}");
|
|
9279
|
+
const segments = processed.split(/({{(?:BOLD|ITALIC|CODE):.+?}})/g);
|
|
9280
|
+
return segments.map((segment, i) => {
|
|
9281
|
+
if (segment.startsWith("{{BOLD:")) {
|
|
9282
|
+
const content = segment.slice(7, -2);
|
|
9283
|
+
return /* @__PURE__ */ jsxRuntime.jsx("strong", { children: content }, i);
|
|
9284
|
+
}
|
|
9285
|
+
if (segment.startsWith("{{ITALIC:")) {
|
|
9286
|
+
const content = segment.slice(9, -2);
|
|
9287
|
+
return /* @__PURE__ */ jsxRuntime.jsx("em", { children: content }, i);
|
|
9288
|
+
}
|
|
9289
|
+
if (segment.startsWith("{{CODE:")) {
|
|
9290
|
+
const content = segment.slice(7, -2);
|
|
9291
|
+
return /* @__PURE__ */ jsxRuntime.jsx("code", { style: { background: "rgba(255,255,255,0.1)", padding: "0 4px", borderRadius: "3px", fontFamily: "monospace" }, children: content }, i);
|
|
9292
|
+
}
|
|
9293
|
+
return segment;
|
|
9294
|
+
});
|
|
9295
|
+
};
|
|
9271
9296
|
var SubredditBadge = ({
|
|
9272
9297
|
subreddit,
|
|
9273
9298
|
linked = true
|
|
@@ -9402,7 +9427,7 @@ var RedditOpportunityCard = ({
|
|
|
9402
9427
|
placeholder: "Write your reply...",
|
|
9403
9428
|
autoFocus: true
|
|
9404
9429
|
}
|
|
9405
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(ReplyContent, { children: displayContent }),
|
|
9430
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(ReplyContent, { children: renderSimpleMarkdown(displayContent) }),
|
|
9406
9431
|
opportunity.strategy ? /* @__PURE__ */ jsxRuntime.jsxs(StrategyHint, { children: [
|
|
9407
9432
|
/* @__PURE__ */ jsxRuntime.jsx(StrategyIconImg, { src: "/assets/icon-set/Icon-lightbulb-fill.svg", alt: "" }),
|
|
9408
9433
|
/* @__PURE__ */ jsxRuntime.jsxs(StrategyText, { children: [
|
|
@@ -9734,10 +9759,13 @@ var RedditEngagementControls = ({
|
|
|
9734
9759
|
const [showRegenerateInput, setShowRegenerateInput] = react.useState(false);
|
|
9735
9760
|
const [regenerateFeedback, setRegenerateFeedback] = react.useState("");
|
|
9736
9761
|
const [copiedFeedback, setCopiedFeedback] = react.useState(false);
|
|
9762
|
+
const [engagedWithContent, setEngagedWithContent] = react.useState(null);
|
|
9763
|
+
const isEngaged = engagedWithContent !== null && engagedWithContent === currentReply;
|
|
9737
9764
|
const handleCopyAndOpen = react.useCallback(async () => {
|
|
9738
9765
|
try {
|
|
9739
9766
|
await navigator.clipboard.writeText(currentReply);
|
|
9740
9767
|
setCopiedFeedback(true);
|
|
9768
|
+
setEngagedWithContent(currentReply);
|
|
9741
9769
|
setTimeout(() => setCopiedFeedback(false), 2e3);
|
|
9742
9770
|
onCopyAndOpen();
|
|
9743
9771
|
} catch (err) {
|
|
@@ -9837,14 +9865,14 @@ var RedditEngagementControls = ({
|
|
|
9837
9865
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9838
9866
|
ActionButton6,
|
|
9839
9867
|
{
|
|
9840
|
-
$variant: "primary",
|
|
9868
|
+
$variant: isEngaged && !copiedFeedback ? "engaged" : "primary",
|
|
9841
9869
|
onClick: handleCopyAndOpen,
|
|
9842
|
-
disabled: isLoading,
|
|
9843
|
-
$pulse: !justCopied && !copiedFeedback,
|
|
9844
|
-
title: "Copy reply and open post in new tab",
|
|
9870
|
+
disabled: isLoading || isEngaged && !copiedFeedback,
|
|
9871
|
+
$pulse: !justCopied && !copiedFeedback && !isEngaged,
|
|
9872
|
+
title: isEngaged ? "Already copied - edit to re-enable" : "Copy reply and open post in new tab",
|
|
9845
9873
|
children: [
|
|
9846
|
-
copiedFeedback ? /* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-check-fill.svg", alt: "" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-clipboard-fill.svg", alt: "" }),
|
|
9847
|
-
copiedFeedback ? "Copied!" : "
|
|
9874
|
+
copiedFeedback ? /* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-check-fill.svg", alt: "" }) : isEngaged ? /* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-check-fill.svg", alt: "" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-clipboard-fill.svg", alt: "" }),
|
|
9875
|
+
copiedFeedback ? "Copied!" : isEngaged ? "Engaged" : "Engage"
|
|
9848
9876
|
]
|
|
9849
9877
|
}
|
|
9850
9878
|
),
|
|
@@ -9853,7 +9881,7 @@ var RedditEngagementControls = ({
|
|
|
9853
9881
|
{
|
|
9854
9882
|
$variant: "success",
|
|
9855
9883
|
onClick: onMarkPosted,
|
|
9856
|
-
disabled: isLoading || !justCopied && !copiedFeedback,
|
|
9884
|
+
disabled: isLoading || !justCopied && !copiedFeedback && !isEngaged,
|
|
9857
9885
|
title: "Mark as posted after you've replied",
|
|
9858
9886
|
children: [
|
|
9859
9887
|
/* @__PURE__ */ jsxRuntime.jsx(Icon3, { src: "/assets/icon-set/Icon-check-fill.svg", alt: "" }),
|
|
@@ -10080,6 +10108,15 @@ var ActionButton6 = styled47__default.default.button`
|
|
|
10080
10108
|
opacity: 0.9;
|
|
10081
10109
|
}
|
|
10082
10110
|
`;
|
|
10111
|
+
case "engaged":
|
|
10112
|
+
return styled47.css`
|
|
10113
|
+
background: ${tokens.colors.text.tertiary};
|
|
10114
|
+
color: ${tokens.colors.background.darker};
|
|
10115
|
+
cursor: default;
|
|
10116
|
+
${Icon3} {
|
|
10117
|
+
filter: brightness(0) saturate(100%) invert(15%);
|
|
10118
|
+
}
|
|
10119
|
+
`;
|
|
10083
10120
|
default:
|
|
10084
10121
|
return "";
|
|
10085
10122
|
}
|
|
@@ -10352,13 +10389,13 @@ var WorkflowCard = ({
|
|
|
10352
10389
|
name,
|
|
10353
10390
|
description,
|
|
10354
10391
|
integrations = [],
|
|
10355
|
-
|
|
10392
|
+
needsSetup = false,
|
|
10356
10393
|
onClick,
|
|
10357
10394
|
disabled = false,
|
|
10358
10395
|
className
|
|
10359
10396
|
}) => {
|
|
10360
10397
|
const missingCount = integrations.filter((i) => i.connected === false).length;
|
|
10361
|
-
const hasFooter = integrations.length > 0 ||
|
|
10398
|
+
const hasFooter = integrations.length > 0 || needsSetup;
|
|
10362
10399
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10363
10400
|
Card3,
|
|
10364
10401
|
{
|
|
@@ -10401,9 +10438,9 @@ var WorkflowCard = ({
|
|
|
10401
10438
|
]
|
|
10402
10439
|
}
|
|
10403
10440
|
),
|
|
10404
|
-
|
|
10405
|
-
/* @__PURE__ */ jsxRuntime.jsx(IndicatorDot, { $variant: "
|
|
10406
|
-
/* @__PURE__ */ jsxRuntime.jsx(IndicatorText, { children: "
|
|
10441
|
+
needsSetup && /* @__PURE__ */ jsxRuntime.jsxs(IndicatorPill, { $variant: "warning", title: "Setup required before use", children: [
|
|
10442
|
+
/* @__PURE__ */ jsxRuntime.jsx(IndicatorDot, { $variant: "warning" }),
|
|
10443
|
+
/* @__PURE__ */ jsxRuntime.jsx(IndicatorText, { children: "Needs Setup" })
|
|
10407
10444
|
] })
|
|
10408
10445
|
] })
|
|
10409
10446
|
] })
|