@agentiffai/design 1.5.3 → 1.5.4
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/WorkflowStatusBadge-47sYxc2F.d.cts +208 -0
- package/dist/WorkflowStatusBadge-47sYxc2F.d.ts +208 -0
- package/dist/index.cjs +12190 -11054
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -116
- package/dist/index.d.ts +169 -116
- package/dist/index.js +12050 -10915
- package/dist/index.js.map +1 -1
- package/dist/workflow/index.cjs +1511 -92
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +189 -183
- package/dist/workflow/index.d.ts +189 -183
- package/dist/workflow/index.js +1513 -95
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/avatar-transparent-bg.png +0 -0
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,208 +1,214 @@
|
|
|
1
|
+
export { b as WorkflowCard, W as WorkflowCardProps, d as WorkflowErrorAlert, c as WorkflowErrorAlertProps, a as WorkflowIntegration, f as WorkflowProgressBar, e as WorkflowProgressBarProps, h as WorkflowResultPanel, g as WorkflowResultPanelProps, j as WorkflowStatusBadge, i as WorkflowStatusBadgeProps } from '../WorkflowStatusBadge-47sYxc2F.js';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* WorkflowDiscoveryCard Component (v2 of WorkflowCard)
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Linear: APP-262 — Design subtask: Workflow list card UI and metadata states
|
|
8
|
+
* Linear: AGE-56 — Workflow Card Design and Implementation
|
|
9
|
+
*
|
|
10
|
+
* The next-generation workflow list card. Designed for the workflows discovery
|
|
11
|
+
* screen where users browse and pick a workflow to run.
|
|
12
|
+
*
|
|
13
|
+
* Why this is a new component (vs editing WorkflowCard):
|
|
14
|
+
* - The existing WorkflowCard answers "what's the name and which integrations".
|
|
15
|
+
* That isn't enough for users facing 100s of workflows. They also need to
|
|
16
|
+
* know "can I run this now?", "do I need n8n / a paid sub / a Google login?",
|
|
17
|
+
* "is there a demo I can watch?".
|
|
18
|
+
* - Keeping the original simple card stable for places it is still used.
|
|
19
|
+
*
|
|
20
|
+
* Card has two states:
|
|
21
|
+
* • Collapsed — compact, scannable. Name, 1-line summary, readiness
|
|
22
|
+
* status, integration icons, tiny metadata icons.
|
|
23
|
+
* • Expanded — the "decision layer". Full description, setup checklist,
|
|
24
|
+
* required vs optional integrations, paid sheet trigger, demo player,
|
|
25
|
+
* source link, run button.
|
|
26
|
+
*
|
|
27
|
+
* Designed to be responsive — works at mobile, tablet, and desktop widths.
|
|
28
|
+
* Extensible — accepts arbitrary `customIndicators` for future flags
|
|
29
|
+
* (secure/private LLM, community node, etc.) without code changes here.
|
|
30
|
+
*
|
|
31
|
+
* Ranking/popularity slot is always reserved per Nick's note on Linear: even
|
|
32
|
+
* when the feature is not backed yet, design the indicator in and let the
|
|
33
|
+
* slot render empty.
|
|
9
34
|
*/
|
|
10
35
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Readiness state — the single most important piece of info on the card.
|
|
38
|
+
* Translates "can the user run this workflow right now?" into one clear label.
|
|
39
|
+
*/
|
|
40
|
+
type WorkflowReadiness = 'ready' | 'setup-required' | 'needs-n8n' | 'paid' | 'provisioning' | 'failed' | 'unavailable';
|
|
41
|
+
interface WorkflowDiscoveryIntegration {
|
|
42
|
+
/** Icon — string URL or a React node (e.g. an icon component) */
|
|
43
|
+
icon: string | React__default.ReactNode;
|
|
44
|
+
/** Integration name for alt text / tooltip */
|
|
15
45
|
name: string;
|
|
16
|
-
/** Whether
|
|
46
|
+
/** Whether the integration is connected */
|
|
17
47
|
connected?: boolean;
|
|
18
|
-
/** Whether
|
|
48
|
+
/** Whether the integration is optional */
|
|
19
49
|
optional?: boolean;
|
|
20
50
|
}
|
|
21
|
-
interface
|
|
22
|
-
/**
|
|
23
|
-
id: string;
|
|
24
|
-
/** Workflow name */
|
|
51
|
+
interface PaidIntegrationInfo {
|
|
52
|
+
/** Name of the paid integration (e.g. "Apify", "Postiz") */
|
|
25
53
|
name: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/** Click handler */
|
|
35
|
-
onClick?: () => void;
|
|
36
|
-
/** Whether the card is disabled */
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/** Optional className for styling */
|
|
39
|
-
className?: string;
|
|
54
|
+
/** Short pricing note, e.g. "$5/mo · free trial available" */
|
|
55
|
+
pricingNote?: string;
|
|
56
|
+
/** True if the integration offers a free trial */
|
|
57
|
+
hasFreeTrial?: boolean;
|
|
58
|
+
/** Affiliate signup URL */
|
|
59
|
+
signupUrl?: string;
|
|
60
|
+
/** Optional Loom/YouTube setup video URL */
|
|
61
|
+
setupVideoUrl?: string;
|
|
40
62
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
errorCode?: string;
|
|
56
|
-
/** Timestamp of the error */
|
|
57
|
-
timestamp?: string;
|
|
58
|
-
/** Visual variant */
|
|
59
|
-
variant?: 'inline' | 'banner' | 'modal';
|
|
60
|
-
/** Severity level */
|
|
61
|
-
severity?: 'error' | 'warning' | 'info';
|
|
62
|
-
/** Whether the error can be retried */
|
|
63
|
-
retryable?: boolean;
|
|
64
|
-
/** Callback when retry is clicked */
|
|
65
|
-
onRetry?: () => void;
|
|
66
|
-
/** Callback when dismiss is clicked */
|
|
67
|
-
onDismiss?: () => void;
|
|
68
|
-
/** Whether to show details section */
|
|
69
|
-
showDetails?: boolean;
|
|
70
|
-
/** Stack trace to display */
|
|
71
|
-
stackTrace?: string;
|
|
72
|
-
/** Custom title */
|
|
73
|
-
title?: string;
|
|
74
|
-
/** Custom className */
|
|
75
|
-
className?: string;
|
|
63
|
+
type SetupRequirementType = 'oauth' | 'api-key' | 'n8n' | 'paid' | 'apify-rental';
|
|
64
|
+
interface SetupRequirement {
|
|
65
|
+
/** Unique key */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Kind of requirement (drives icon / styling) */
|
|
68
|
+
type: SetupRequirementType;
|
|
69
|
+
/** Human-readable label, e.g. "Connect Google", "Deploy n8n" */
|
|
70
|
+
label: string;
|
|
71
|
+
/** Whether this requirement is already satisfied */
|
|
72
|
+
done?: boolean;
|
|
73
|
+
/** Label for the action button, e.g. "Connect", "Set up" */
|
|
74
|
+
actionLabel?: string;
|
|
75
|
+
/** Action callback */
|
|
76
|
+
onAction?: () => void;
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
progress?: number;
|
|
101
|
-
/** Optional message to display */
|
|
102
|
-
message?: string;
|
|
103
|
-
/** Status affects the color */
|
|
104
|
-
status?: 'pending' | 'running' | 'completed' | 'failed' | 'timeout';
|
|
105
|
-
/** Visual variant */
|
|
106
|
-
variant?: 'linear' | 'circular';
|
|
107
|
-
/** Size of the progress bar */
|
|
108
|
-
size?: 'sm' | 'md' | 'lg';
|
|
109
|
-
/** Whether to show percentage text */
|
|
110
|
-
showPercentage?: boolean;
|
|
111
|
-
/** Whether to animate progress changes */
|
|
112
|
-
animated?: boolean;
|
|
113
|
-
/** Custom className */
|
|
114
|
-
className?: string;
|
|
78
|
+
interface PopularityInfo {
|
|
79
|
+
/** Total run count (e.g. 1240) */
|
|
80
|
+
runCount?: number;
|
|
81
|
+
/** Ranking position (e.g. 2 = #2) */
|
|
82
|
+
rank?: number;
|
|
83
|
+
/** "Trending" flag */
|
|
84
|
+
trending?: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface CustomIndicator {
|
|
87
|
+
/** Unique key */
|
|
88
|
+
id: string;
|
|
89
|
+
/** Small icon (16px target) */
|
|
90
|
+
icon: React__default.ReactNode;
|
|
91
|
+
/** Tooltip / aria-label text */
|
|
92
|
+
tooltip: string;
|
|
93
|
+
/** Optional accent color */
|
|
94
|
+
color?: string;
|
|
95
|
+
}
|
|
96
|
+
interface ProvenanceSource {
|
|
97
|
+
/** Display label, e.g. "n8n.io template" */
|
|
98
|
+
label: string;
|
|
99
|
+
/** Source URL */
|
|
100
|
+
url: string;
|
|
115
101
|
}
|
|
116
102
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* Features:
|
|
120
|
-
* - Linear and circular variants
|
|
121
|
-
* - Determinate and indeterminate modes
|
|
122
|
-
* - Color-coded status (gray/blue/green/red/orange)
|
|
123
|
-
* - Size options (sm/md/lg)
|
|
124
|
-
* - Optional percentage display
|
|
125
|
-
* - Smooth animations
|
|
126
|
-
* - Progress message support
|
|
127
|
-
*/
|
|
128
|
-
declare const WorkflowProgressBar: React__default.FC<WorkflowProgressBarProps>;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* WorkflowResultPanel Component
|
|
132
|
-
*
|
|
133
|
-
* Displays workflow execution results with JSON/formatted/table views.
|
|
134
|
-
*
|
|
135
|
-
* @see specs/015-restyle-ai-chat/spec.md
|
|
103
|
+
* Community voting state for a workflow. Lives in design exploration only —
|
|
104
|
+
* each brainstorm variation can place it differently to see how it feels.
|
|
136
105
|
*/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
collapsible?: boolean;
|
|
145
|
-
/** Default expanded state */
|
|
146
|
-
defaultExpanded?: boolean;
|
|
147
|
-
/** Maximum height of content area */
|
|
148
|
-
maxHeight?: string;
|
|
149
|
-
/** Callback when download is clicked */
|
|
150
|
-
onDownload?: () => void;
|
|
151
|
-
/** Callback when copy is clicked */
|
|
152
|
-
onCopy?: () => void;
|
|
153
|
-
/** Custom title */
|
|
154
|
-
title?: string;
|
|
155
|
-
/** Custom className */
|
|
156
|
-
className?: string;
|
|
106
|
+
interface VotesInfo {
|
|
107
|
+
/** Upvote count */
|
|
108
|
+
up: number;
|
|
109
|
+
/** Downvote count */
|
|
110
|
+
down: number;
|
|
111
|
+
/** What the current user has voted (or null if not voted) */
|
|
112
|
+
userVote?: 'up' | 'down' | null;
|
|
157
113
|
}
|
|
158
114
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* - JSON, formatted, and table view variants
|
|
163
|
-
* - Collapsible content
|
|
164
|
-
* - Download and copy actions
|
|
165
|
-
* - Maximum height with scrolling
|
|
166
|
-
* - Empty state handling
|
|
167
|
-
* - Syntax highlighting for JSON
|
|
115
|
+
* Where the voting affordance renders on the card. Each placement is a
|
|
116
|
+
* distinct design hypothesis — we audition them in the brainstorm story
|
|
117
|
+
* so product + design can pick the right home for voting.
|
|
168
118
|
*/
|
|
169
|
-
|
|
170
|
-
|
|
119
|
+
type VotesPlacement =
|
|
120
|
+
/** Tiny compact arrow + count in the metadata icon row (top-right) */
|
|
121
|
+
'metadata'
|
|
122
|
+
/** Full pill (up arrow + count + down arrow + count) on the collapsed bottom row */
|
|
123
|
+
| 'bottom-row'
|
|
124
|
+
/** Block at the bottom of the expanded view */
|
|
125
|
+
| 'expanded-footer';
|
|
171
126
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* Displays workflow execution status with color coding.
|
|
175
|
-
*
|
|
176
|
-
* @see specs/015-restyle-ai-chat/spec.md
|
|
127
|
+
* Where the support / report-issue affordance renders on the card.
|
|
177
128
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
|
|
129
|
+
type SupportPlacement =
|
|
130
|
+
/** Tiny icon in the metadata icon row (top-right) */
|
|
131
|
+
'metadata'
|
|
132
|
+
/** Button in the expanded view footer */
|
|
133
|
+
| 'expanded-footer';
|
|
134
|
+
interface WorkflowDiscoveryCardProps {
|
|
135
|
+
/** Unique workflow identifier */
|
|
136
|
+
id: string;
|
|
137
|
+
/** Workflow display name */
|
|
138
|
+
name: string;
|
|
139
|
+
/** 1-line plain English summary (collapsed view) */
|
|
140
|
+
summary: string;
|
|
141
|
+
/** Longer description (expanded view). Falls back to `summary` if absent. */
|
|
142
|
+
description?: string;
|
|
143
|
+
/** Optional category */
|
|
144
|
+
category?: 'social_media' | 'ops' | 'crm' | string;
|
|
145
|
+
/** Optional workflow icon (URL or node) */
|
|
146
|
+
icon?: string | React__default.ReactNode;
|
|
147
|
+
/** Readiness state — drives the status label color and copy */
|
|
148
|
+
readiness: WorkflowReadiness;
|
|
149
|
+
/** Custom status label override (otherwise derived from `readiness`) */
|
|
150
|
+
statusLabel?: string;
|
|
151
|
+
/** Integration icons (collapsed view shows up to 4, rest as "+N") */
|
|
152
|
+
integrations?: WorkflowDiscoveryIntegration[];
|
|
153
|
+
/** Optional integrations — shown separately in expanded view */
|
|
154
|
+
optionalIntegrations?: WorkflowDiscoveryIntegration[];
|
|
155
|
+
/** Setup checklist for expanded view */
|
|
156
|
+
setupRequirements?: SetupRequirement[];
|
|
157
|
+
/** When set, the card shows a play-demo affordance */
|
|
158
|
+
demoVideoUrl?: string;
|
|
159
|
+
/** When set, the card shows the paid affiliate indicator + expanded sheet */
|
|
160
|
+
paidIntegration?: PaidIntegrationInfo;
|
|
161
|
+
/**
|
|
162
|
+
* Whether the workflow uses n8n under the hood. Shows a small n8n badge
|
|
163
|
+
* in the metadata icon row — except when the status already says "Needs n8n",
|
|
164
|
+
* in which case the badge is hidden to avoid duplication.
|
|
165
|
+
*/
|
|
166
|
+
usesN8n?: boolean;
|
|
167
|
+
/** Provenance source (e.g. n8n.io template the workflow was based on) */
|
|
168
|
+
source?: ProvenanceSource;
|
|
169
|
+
/** Popularity info — always reserves a slot per Nick's design ask */
|
|
170
|
+
popularity?: PopularityInfo;
|
|
171
|
+
/** Reserve popularity slot even if data is empty (defaults to true) */
|
|
172
|
+
reservePopularitySpace?: boolean;
|
|
173
|
+
/** Future-proofing — extra indicators (secure LLM, community node, etc.) */
|
|
174
|
+
customIndicators?: CustomIndicator[];
|
|
175
|
+
/** Estimated cost per run, e.g. "~$0.15" */
|
|
176
|
+
estimatedCostPerRun?: string;
|
|
177
|
+
/** Whether the card starts expanded (uncontrolled) */
|
|
178
|
+
defaultExpanded?: boolean;
|
|
179
|
+
/** Controlled expanded state */
|
|
180
|
+
isExpanded?: boolean;
|
|
181
|
+
/** Called when the expand state toggles */
|
|
182
|
+
onToggleExpanded?: (id: string, nextExpanded: boolean) => void;
|
|
183
|
+
/** Called when the user clicks Run (or the primary action) */
|
|
184
|
+
onRun?: (id: string) => void;
|
|
185
|
+
/** Called when the user wants to play the demo */
|
|
186
|
+
onPlayDemo?: (id: string, url: string) => void;
|
|
187
|
+
/** Called when the user wants to open the paid-integration sheet */
|
|
188
|
+
onOpenPaidSheet?: (id: string, info: PaidIntegrationInfo) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Community voting state. When provided the voting affordance renders in
|
|
191
|
+
* the placement specified by `votesPlacement` (defaults to expanded-footer).
|
|
192
|
+
*/
|
|
193
|
+
votes?: VotesInfo;
|
|
194
|
+
/** Where to render the voting affordance. Only used if `votes` is set. */
|
|
195
|
+
votesPlacement?: VotesPlacement;
|
|
196
|
+
/** Called when the user up/down votes */
|
|
197
|
+
onVote?: (id: string, direction: 'up' | 'down') => void;
|
|
198
|
+
/**
|
|
199
|
+
* Called when the user wants to report an issue with this workflow. The
|
|
200
|
+
* workflow name is passed so the consumer can pre-fill the support form
|
|
201
|
+
* with it as context (as Nick asked). Pass this callback to render the
|
|
202
|
+
* support affordance in the placement set by `supportPlacement`.
|
|
203
|
+
*/
|
|
204
|
+
onReportIssue?: (id: string, workflowName: string) => void;
|
|
205
|
+
/** Where to render the support affordance. Only used if `onReportIssue` is set. */
|
|
206
|
+
supportPlacement?: SupportPlacement;
|
|
207
|
+
/** Disabled state (greyed out, not interactive) */
|
|
208
|
+
disabled?: boolean;
|
|
192
209
|
/** Custom className */
|
|
193
210
|
className?: string;
|
|
194
211
|
}
|
|
195
|
-
|
|
196
|
-
* WorkflowStatusBadge component for showing workflow execution status
|
|
197
|
-
*
|
|
198
|
-
* Features:
|
|
199
|
-
* - Color-coded status badges (gray/blue/green/red/orange)
|
|
200
|
-
* - Status icons with optional animations
|
|
201
|
-
* - Size options (sm/md/lg)
|
|
202
|
-
* - Optional status labels
|
|
203
|
-
* - Spinning animation for running state
|
|
204
|
-
* - Pulse animation for pending state
|
|
205
|
-
*/
|
|
206
|
-
declare const WorkflowStatusBadge: React__default.FC<WorkflowStatusBadgeProps>;
|
|
212
|
+
declare const WorkflowDiscoveryCard: React__default.FC<WorkflowDiscoveryCardProps>;
|
|
207
213
|
|
|
208
|
-
export {
|
|
214
|
+
export { type CustomIndicator, type PaidIntegrationInfo, type PopularityInfo, type ProvenanceSource, type SetupRequirement, type SetupRequirementType, type SupportPlacement, type VotesInfo, type VotesPlacement, WorkflowDiscoveryCard, type WorkflowDiscoveryCardProps, type WorkflowDiscoveryIntegration, type WorkflowReadiness };
|