@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.d.cts
CHANGED
|
@@ -298,7 +298,7 @@ interface PlatformConfig {
|
|
|
298
298
|
/**
|
|
299
299
|
* Categories for workflow progress tracking
|
|
300
300
|
*/
|
|
301
|
-
type ProgressCategory = 'notion' | 'setup' | 'integration' | 'generation' | 'image' | 'scheduling' | 'completion';
|
|
301
|
+
type ProgressCategory = 'notion' | 'setup' | 'integration' | 'generation' | 'image' | 'scheduling' | 'completion' | 'processing' | 'custom';
|
|
302
302
|
/**
|
|
303
303
|
* Configuration for a progress category
|
|
304
304
|
*/
|
|
@@ -359,11 +359,11 @@ declare const CATEGORY_CONFIGS: Record<ProgressCategory, CategoryConfig>;
|
|
|
359
359
|
*/
|
|
360
360
|
declare function categorizeProgress(message: string): ProgressCategory;
|
|
361
361
|
/**
|
|
362
|
-
* Get the icon for a progress category
|
|
362
|
+
* Get the icon for a progress category (with fallback for unknown categories)
|
|
363
363
|
*/
|
|
364
364
|
declare function getCategoryIcon(category: ProgressCategory): string;
|
|
365
365
|
/**
|
|
366
|
-
* Get the color class for a progress category
|
|
366
|
+
* Get the color class for a progress category (with fallback for unknown categories)
|
|
367
367
|
*/
|
|
368
368
|
declare function getCategoryColor(category: ProgressCategory): string;
|
|
369
369
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -298,7 +298,7 @@ interface PlatformConfig {
|
|
|
298
298
|
/**
|
|
299
299
|
* Categories for workflow progress tracking
|
|
300
300
|
*/
|
|
301
|
-
type ProgressCategory = 'notion' | 'setup' | 'integration' | 'generation' | 'image' | 'scheduling' | 'completion';
|
|
301
|
+
type ProgressCategory = 'notion' | 'setup' | 'integration' | 'generation' | 'image' | 'scheduling' | 'completion' | 'processing' | 'custom';
|
|
302
302
|
/**
|
|
303
303
|
* Configuration for a progress category
|
|
304
304
|
*/
|
|
@@ -359,11 +359,11 @@ declare const CATEGORY_CONFIGS: Record<ProgressCategory, CategoryConfig>;
|
|
|
359
359
|
*/
|
|
360
360
|
declare function categorizeProgress(message: string): ProgressCategory;
|
|
361
361
|
/**
|
|
362
|
-
* Get the icon for a progress category
|
|
362
|
+
* Get the icon for a progress category (with fallback for unknown categories)
|
|
363
363
|
*/
|
|
364
364
|
declare function getCategoryIcon(category: ProgressCategory): string;
|
|
365
365
|
/**
|
|
366
|
-
* Get the color class for a progress category
|
|
366
|
+
* Get the color class for a progress category (with fallback for unknown categories)
|
|
367
367
|
*/
|
|
368
368
|
declare function getCategoryColor(category: ProgressCategory): string;
|
|
369
369
|
/**
|
package/dist/index.js
CHANGED
|
@@ -7855,6 +7855,16 @@ var CATEGORY_CONFIGS = {
|
|
|
7855
7855
|
icon: "\u2705",
|
|
7856
7856
|
label: "Done",
|
|
7857
7857
|
color: "bg-emerald-500"
|
|
7858
|
+
},
|
|
7859
|
+
processing: {
|
|
7860
|
+
icon: "\u2699\uFE0F",
|
|
7861
|
+
label: "Processing",
|
|
7862
|
+
color: "bg-blue-500"
|
|
7863
|
+
},
|
|
7864
|
+
custom: {
|
|
7865
|
+
icon: "\u{1F527}",
|
|
7866
|
+
label: "Custom",
|
|
7867
|
+
color: "bg-gray-500"
|
|
7858
7868
|
}
|
|
7859
7869
|
};
|
|
7860
7870
|
function categorizeProgress(message) {
|
|
@@ -7868,10 +7878,10 @@ function categorizeProgress(message) {
|
|
|
7868
7878
|
return "setup";
|
|
7869
7879
|
}
|
|
7870
7880
|
function getCategoryIcon(category) {
|
|
7871
|
-
return CATEGORY_CONFIGS[category]
|
|
7881
|
+
return CATEGORY_CONFIGS[category]?.icon ?? "\u2699\uFE0F";
|
|
7872
7882
|
}
|
|
7873
7883
|
function getCategoryColor(category) {
|
|
7874
|
-
return CATEGORY_CONFIGS[category]
|
|
7884
|
+
return CATEGORY_CONFIGS[category]?.color ?? "bg-gray-500";
|
|
7875
7885
|
}
|
|
7876
7886
|
function normalizePlatform(platform) {
|
|
7877
7887
|
const normalized = platform.toLowerCase();
|
|
@@ -9081,7 +9091,12 @@ var TONE_CONFIG = {
|
|
|
9081
9091
|
}
|
|
9082
9092
|
};
|
|
9083
9093
|
function getToneConfig(tone) {
|
|
9084
|
-
return TONE_CONFIG[tone]
|
|
9094
|
+
return TONE_CONFIG[tone] ?? {
|
|
9095
|
+
label: tone || "Unknown",
|
|
9096
|
+
color: tokens.colors.text.secondary,
|
|
9097
|
+
icon: "/assets/icon-set/Icon-chat-1-fill.svg",
|
|
9098
|
+
description: "Unknown tone"
|
|
9099
|
+
};
|
|
9085
9100
|
}
|
|
9086
9101
|
({
|
|
9087
9102
|
pending: {
|
|
@@ -9121,8 +9136,10 @@ function getSubredditColor(subreddit) {
|
|
|
9121
9136
|
return SUBREDDIT_COLORS[lower] || REDDIT_COLORS.orange;
|
|
9122
9137
|
}
|
|
9123
9138
|
function formatRelativeTime(timestamp) {
|
|
9139
|
+
if (!timestamp) return "unknown";
|
|
9124
9140
|
const now = /* @__PURE__ */ new Date();
|
|
9125
9141
|
const date = new Date(timestamp);
|
|
9142
|
+
if (Number.isNaN(date.getTime())) return "unknown";
|
|
9126
9143
|
const diffMs = now.getTime() - date.getTime();
|
|
9127
9144
|
const diffMins = Math.floor(diffMs / 6e4);
|
|
9128
9145
|
const diffHours = Math.floor(diffMins / 60);
|
|
@@ -9134,13 +9151,14 @@ function formatRelativeTime(timestamp) {
|
|
|
9134
9151
|
return date.toLocaleDateString();
|
|
9135
9152
|
}
|
|
9136
9153
|
function formatNumber(num) {
|
|
9154
|
+
if (num === void 0 || num === null) return "0";
|
|
9137
9155
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
9138
9156
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}k`;
|
|
9139
9157
|
return num.toString();
|
|
9140
9158
|
}
|
|
9141
9159
|
function truncateText(text, maxLength) {
|
|
9142
9160
|
if (text.length <= maxLength) return text;
|
|
9143
|
-
return text.slice(0, maxLength - 3)
|
|
9161
|
+
return `${text.slice(0, maxLength - 3)}...`;
|
|
9144
9162
|
}
|
|
9145
9163
|
function getSubredditUrl(subreddit) {
|
|
9146
9164
|
return `https://www.reddit.com/r/${subreddit}`;
|
|
@@ -9207,7 +9225,7 @@ var RedditOpportunityCard = ({
|
|
|
9207
9225
|
isLoading = false,
|
|
9208
9226
|
condensed = false
|
|
9209
9227
|
}) => {
|
|
9210
|
-
const displayContent = isEditing && editContent !== void 0 ? editContent : opportunity.editedReply || opportunity.draftReply;
|
|
9228
|
+
const displayContent = isEditing && editContent !== void 0 ? editContent : opportunity.editedReply || opportunity.draftReply || "";
|
|
9211
9229
|
const charCount = displayContent.length;
|
|
9212
9230
|
const charPercentage = useMemo(
|
|
9213
9231
|
() => getRedditCharPercentage(charCount, REDDIT_LIMITS.comment),
|