@agentiffai/design 1.3.9 → 1.3.11
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 +23 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7861,6 +7861,16 @@ var CATEGORY_CONFIGS = {
|
|
|
7861
7861
|
icon: "\u2705",
|
|
7862
7862
|
label: "Done",
|
|
7863
7863
|
color: "bg-emerald-500"
|
|
7864
|
+
},
|
|
7865
|
+
processing: {
|
|
7866
|
+
icon: "\u2699\uFE0F",
|
|
7867
|
+
label: "Processing",
|
|
7868
|
+
color: "bg-blue-500"
|
|
7869
|
+
},
|
|
7870
|
+
custom: {
|
|
7871
|
+
icon: "\u{1F527}",
|
|
7872
|
+
label: "Custom",
|
|
7873
|
+
color: "bg-gray-500"
|
|
7864
7874
|
}
|
|
7865
7875
|
};
|
|
7866
7876
|
function categorizeProgress(message) {
|
|
@@ -7874,10 +7884,10 @@ function categorizeProgress(message) {
|
|
|
7874
7884
|
return "setup";
|
|
7875
7885
|
}
|
|
7876
7886
|
function getCategoryIcon(category) {
|
|
7877
|
-
return CATEGORY_CONFIGS[category]
|
|
7887
|
+
return CATEGORY_CONFIGS[category]?.icon ?? "\u2699\uFE0F";
|
|
7878
7888
|
}
|
|
7879
7889
|
function getCategoryColor(category) {
|
|
7880
|
-
return CATEGORY_CONFIGS[category]
|
|
7890
|
+
return CATEGORY_CONFIGS[category]?.color ?? "bg-gray-500";
|
|
7881
7891
|
}
|
|
7882
7892
|
function normalizePlatform(platform) {
|
|
7883
7893
|
const normalized = platform.toLowerCase();
|
|
@@ -9087,7 +9097,12 @@ var TONE_CONFIG = {
|
|
|
9087
9097
|
}
|
|
9088
9098
|
};
|
|
9089
9099
|
function getToneConfig(tone) {
|
|
9090
|
-
return TONE_CONFIG[tone]
|
|
9100
|
+
return TONE_CONFIG[tone] ?? {
|
|
9101
|
+
label: tone || "Unknown",
|
|
9102
|
+
color: tokens.colors.text.secondary,
|
|
9103
|
+
icon: "/assets/icon-set/Icon-chat-1-fill.svg",
|
|
9104
|
+
description: "Unknown tone"
|
|
9105
|
+
};
|
|
9091
9106
|
}
|
|
9092
9107
|
({
|
|
9093
9108
|
pending: {
|
|
@@ -9127,8 +9142,10 @@ function getSubredditColor(subreddit) {
|
|
|
9127
9142
|
return SUBREDDIT_COLORS[lower] || REDDIT_COLORS.orange;
|
|
9128
9143
|
}
|
|
9129
9144
|
function formatRelativeTime(timestamp) {
|
|
9145
|
+
if (!timestamp) return "unknown";
|
|
9130
9146
|
const now = /* @__PURE__ */ new Date();
|
|
9131
9147
|
const date = new Date(timestamp);
|
|
9148
|
+
if (Number.isNaN(date.getTime())) return "unknown";
|
|
9132
9149
|
const diffMs = now.getTime() - date.getTime();
|
|
9133
9150
|
const diffMins = Math.floor(diffMs / 6e4);
|
|
9134
9151
|
const diffHours = Math.floor(diffMins / 60);
|
|
@@ -9140,13 +9157,14 @@ function formatRelativeTime(timestamp) {
|
|
|
9140
9157
|
return date.toLocaleDateString();
|
|
9141
9158
|
}
|
|
9142
9159
|
function formatNumber(num) {
|
|
9160
|
+
if (num === void 0 || num === null) return "0";
|
|
9143
9161
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
9144
9162
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}k`;
|
|
9145
9163
|
return num.toString();
|
|
9146
9164
|
}
|
|
9147
9165
|
function truncateText(text, maxLength) {
|
|
9148
9166
|
if (text.length <= maxLength) return text;
|
|
9149
|
-
return text.slice(0, maxLength - 3)
|
|
9167
|
+
return `${text.slice(0, maxLength - 3)}...`;
|
|
9150
9168
|
}
|
|
9151
9169
|
function getSubredditUrl(subreddit) {
|
|
9152
9170
|
return `https://www.reddit.com/r/${subreddit}`;
|
|
@@ -9213,7 +9231,7 @@ var RedditOpportunityCard = ({
|
|
|
9213
9231
|
isLoading = false,
|
|
9214
9232
|
condensed = false
|
|
9215
9233
|
}) => {
|
|
9216
|
-
const displayContent = isEditing && editContent !== void 0 ? editContent : opportunity.editedReply || opportunity.draftReply;
|
|
9234
|
+
const displayContent = isEditing && editContent !== void 0 ? editContent : opportunity.editedReply || opportunity.draftReply || "";
|
|
9217
9235
|
const charCount = displayContent.length;
|
|
9218
9236
|
const charPercentage = react.useMemo(
|
|
9219
9237
|
() => getRedditCharPercentage(charCount, REDDIT_LIMITS.comment),
|