@deck-ui/routines 0.2.0 → 0.3.0
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/package.json +1 -1
- package/src/routine-card.tsx +8 -8
- package/src/routine-detail-actions.tsx +7 -7
- package/src/routine-detail-page.tsx +4 -4
- package/src/routine-edit-form.tsx +6 -6
- package/src/routine-run-history.tsx +7 -7
- package/src/routine-run-page.tsx +5 -5
- package/src/routines-grid.tsx +2 -2
package/package.json
CHANGED
package/src/routine-card.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export interface RoutineCardProps {
|
|
|
10
10
|
|
|
11
11
|
const STATUS_DOT: Record<string, string> = {
|
|
12
12
|
active: "bg-green-500",
|
|
13
|
-
paused: "bg-
|
|
13
|
+
paused: "bg-muted-foreground",
|
|
14
14
|
needs_setup: "bg-yellow-500",
|
|
15
15
|
error: "bg-red-500",
|
|
16
16
|
}
|
|
@@ -38,25 +38,25 @@ export function RoutineCard({ routine, onClick }: RoutineCardProps) {
|
|
|
38
38
|
<button
|
|
39
39
|
onClick={onClick}
|
|
40
40
|
className={cn(
|
|
41
|
-
"w-full text-left rounded-2xl border border-
|
|
42
|
-
"bg-white hover:border-
|
|
41
|
+
"w-full text-left rounded-2xl border border-border p-5",
|
|
42
|
+
"bg-white hover:border-border/80 transition-all duration-150",
|
|
43
43
|
"hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)]",
|
|
44
44
|
"flex flex-col gap-3",
|
|
45
45
|
)}
|
|
46
46
|
>
|
|
47
47
|
{/* Top: name + status */}
|
|
48
48
|
<div className="flex items-start gap-2.5">
|
|
49
|
-
<h3 className="text-[15px] font-medium text-
|
|
49
|
+
<h3 className="text-[15px] font-medium text-foreground leading-snug flex-1 min-w-0">
|
|
50
50
|
{displayName}
|
|
51
51
|
</h3>
|
|
52
52
|
<div className="flex items-center gap-1.5 shrink-0 mt-0.5">
|
|
53
53
|
<div
|
|
54
54
|
className={cn(
|
|
55
55
|
"size-1.5 rounded-full",
|
|
56
|
-
STATUS_DOT[routine.status] ?? "bg-
|
|
56
|
+
STATUS_DOT[routine.status] ?? "bg-muted-foreground",
|
|
57
57
|
)}
|
|
58
58
|
/>
|
|
59
|
-
<span className="text-xs text-
|
|
59
|
+
<span className="text-xs text-muted-foreground">
|
|
60
60
|
{STATUS_LABEL[routine.status] ?? routine.status}
|
|
61
61
|
</span>
|
|
62
62
|
</div>
|
|
@@ -64,13 +64,13 @@ export function RoutineCard({ routine, onClick }: RoutineCardProps) {
|
|
|
64
64
|
|
|
65
65
|
{/* Description */}
|
|
66
66
|
{routine.description && (
|
|
67
|
-
<p className="text-sm text-
|
|
67
|
+
<p className="text-sm text-muted-foreground leading-relaxed line-clamp-2">
|
|
68
68
|
{routine.description}
|
|
69
69
|
</p>
|
|
70
70
|
)}
|
|
71
71
|
|
|
72
72
|
{/* Footer: trigger + last run + run count */}
|
|
73
|
-
<div className="flex items-center gap-3 text-xs text-
|
|
73
|
+
<div className="flex items-center gap-3 text-xs text-muted-foreground pt-1">
|
|
74
74
|
<span className="flex items-center gap-1">
|
|
75
75
|
<Clock className="size-3" />
|
|
76
76
|
{triggerLabel}
|
|
@@ -35,17 +35,17 @@ export function RoutineDetailActions({
|
|
|
35
35
|
|
|
36
36
|
const pillBtn = cn(
|
|
37
37
|
"h-9 px-4 text-sm font-medium rounded-full transition-colors",
|
|
38
|
-
"border border-
|
|
38
|
+
"border border-border",
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<div className="flex items-center gap-2 pt-4 border-t border-
|
|
42
|
+
<div className="flex items-center gap-2 pt-4 border-t border-border">
|
|
43
43
|
<button
|
|
44
44
|
onClick={onSave}
|
|
45
45
|
disabled={saving}
|
|
46
46
|
className={cn(
|
|
47
47
|
"h-9 px-4 text-sm font-medium rounded-full",
|
|
48
|
-
"bg-
|
|
48
|
+
"bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
49
49
|
"disabled:opacity-50",
|
|
50
50
|
)}
|
|
51
51
|
>
|
|
@@ -55,13 +55,13 @@ export function RoutineDetailActions({
|
|
|
55
55
|
</span>
|
|
56
56
|
</button>
|
|
57
57
|
|
|
58
|
-
<button onClick={onRunNow} className={cn(pillBtn, "text-
|
|
58
|
+
<button onClick={onRunNow} className={cn(pillBtn, "text-foreground hover:bg-secondary")}>
|
|
59
59
|
<span className="flex items-center gap-1.5">
|
|
60
60
|
<RefreshCw className="size-3.5" /> Run Now
|
|
61
61
|
</span>
|
|
62
62
|
</button>
|
|
63
63
|
|
|
64
|
-
<button onClick={onToggle} className={cn(pillBtn, "text-
|
|
64
|
+
<button onClick={onToggle} className={cn(pillBtn, "text-foreground hover:bg-secondary")}>
|
|
65
65
|
<span className="flex items-center gap-1.5">
|
|
66
66
|
{isActive ? (
|
|
67
67
|
<><Pause className="size-3.5" /> Pause</>
|
|
@@ -84,7 +84,7 @@ export function RoutineDetailActions({
|
|
|
84
84
|
</button>
|
|
85
85
|
<button
|
|
86
86
|
onClick={() => setConfirmDelete(false)}
|
|
87
|
-
className={cn(pillBtn, "text-
|
|
87
|
+
className={cn(pillBtn, "text-foreground hover:bg-secondary")}
|
|
88
88
|
>
|
|
89
89
|
Cancel
|
|
90
90
|
</button>
|
|
@@ -92,7 +92,7 @@ export function RoutineDetailActions({
|
|
|
92
92
|
) : (
|
|
93
93
|
<button
|
|
94
94
|
onClick={handleDelete}
|
|
95
|
-
className={cn(pillBtn, "text-
|
|
95
|
+
className={cn(pillBtn, "text-muted-foreground hover:text-red-600 hover:border-red-200")}
|
|
96
96
|
>
|
|
97
97
|
<span className="flex items-center gap-1.5">
|
|
98
98
|
<Trash2 className="size-3.5" /> Delete
|
|
@@ -68,7 +68,7 @@ export function RoutineDetailPage({
|
|
|
68
68
|
if (!routine || !form) {
|
|
69
69
|
return (
|
|
70
70
|
<div className="flex-1 flex items-center justify-center">
|
|
71
|
-
<p className="text-sm text-
|
|
71
|
+
<p className="text-sm text-muted-foreground">Routine not found</p>
|
|
72
72
|
</div>
|
|
73
73
|
)
|
|
74
74
|
}
|
|
@@ -76,15 +76,15 @@ export function RoutineDetailPage({
|
|
|
76
76
|
return (
|
|
77
77
|
<div className="flex-1 flex flex-col min-h-0 overflow-hidden">
|
|
78
78
|
{/* Header */}
|
|
79
|
-
<div className="shrink-0 px-6 py-3 border-b border-
|
|
79
|
+
<div className="shrink-0 px-6 py-3 border-b border-border">
|
|
80
80
|
<div className="max-w-2xl mx-auto flex items-center gap-3">
|
|
81
81
|
<button
|
|
82
82
|
onClick={onBack}
|
|
83
|
-
className="size-8 flex items-center justify-center rounded-lg text-
|
|
83
|
+
className="size-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-accent transition-colors"
|
|
84
84
|
>
|
|
85
85
|
<ArrowLeft className="size-4" />
|
|
86
86
|
</button>
|
|
87
|
-
<h1 className="text-sm font-medium text-
|
|
87
|
+
<h1 className="text-sm font-medium text-foreground truncate flex-1">
|
|
88
88
|
{form.name || "Untitled"}
|
|
89
89
|
</h1>
|
|
90
90
|
</div>
|
|
@@ -22,12 +22,12 @@ const TRIGGER_OPTIONS: { value: TriggerType; label: string }[] = [
|
|
|
22
22
|
]
|
|
23
23
|
|
|
24
24
|
const inputClass = cn(
|
|
25
|
-
"w-full px-3 py-2 rounded-xl border border-
|
|
26
|
-
"text-sm text-
|
|
27
|
-
"focus:outline-none focus:border-
|
|
25
|
+
"w-full px-3 py-2 rounded-xl border border-border bg-white",
|
|
26
|
+
"text-sm text-foreground placeholder:text-muted-foreground/60",
|
|
27
|
+
"focus:outline-none focus:border-border/80 transition-colors",
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
-
const labelClass = "text-xs font-medium text-
|
|
30
|
+
const labelClass = "text-xs font-medium text-muted-foreground mb-1.5 block"
|
|
31
31
|
|
|
32
32
|
export function RoutineEditForm({
|
|
33
33
|
form,
|
|
@@ -121,8 +121,8 @@ export function RoutineEditForm({
|
|
|
121
121
|
className={cn(
|
|
122
122
|
"h-9 px-4 rounded-full text-sm font-medium transition-colors",
|
|
123
123
|
form.approvalMode === mode
|
|
124
|
-
? "bg-
|
|
125
|
-
: "border border-
|
|
124
|
+
? "bg-primary text-primary-foreground"
|
|
125
|
+
: "border border-border text-muted-foreground hover:bg-secondary",
|
|
126
126
|
)}
|
|
127
127
|
>
|
|
128
128
|
{mode === "manual" ? "Manual Review" : "Auto-approve"}
|
|
@@ -15,10 +15,10 @@ export function RunHistory({ runs, onSelectRun }: RunHistoryProps) {
|
|
|
15
15
|
if (runs.length === 0) {
|
|
16
16
|
return (
|
|
17
17
|
<div>
|
|
18
|
-
<p className="text-xs font-medium text-
|
|
18
|
+
<p className="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2">
|
|
19
19
|
Runs
|
|
20
20
|
</p>
|
|
21
|
-
<p className="text-sm text-
|
|
21
|
+
<p className="text-sm text-muted-foreground">No runs yet.</p>
|
|
22
22
|
</div>
|
|
23
23
|
)
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@ export function RunHistory({ runs, onSelectRun }: RunHistoryProps) {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<div>
|
|
33
|
-
<p className="text-xs font-medium text-
|
|
33
|
+
<p className="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2">
|
|
34
34
|
Run History
|
|
35
35
|
</p>
|
|
36
36
|
<div className="space-y-1">
|
|
@@ -66,20 +66,20 @@ function RunRow({ run, onClick }: { run: RoutineRun; onClick: () => void }) {
|
|
|
66
66
|
case "failed":
|
|
67
67
|
return <AlertCircle className="size-3.5 text-red-500" />
|
|
68
68
|
default:
|
|
69
|
-
return <Clock className="size-3.5 text-
|
|
69
|
+
return <Clock className="size-3.5 text-muted-foreground" />
|
|
70
70
|
}
|
|
71
71
|
})()
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
74
|
<button
|
|
75
75
|
onClick={onClick}
|
|
76
|
-
className="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left hover:bg-
|
|
76
|
+
className="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left hover:bg-accent/30 transition-colors"
|
|
77
77
|
>
|
|
78
78
|
{icon}
|
|
79
|
-
<span className="text-sm text-
|
|
79
|
+
<span className="text-sm text-foreground truncate flex-1">
|
|
80
80
|
{run.output_title || `${dateStr} ${timeStr}`}
|
|
81
81
|
</span>
|
|
82
|
-
<span className="text-xs text-
|
|
82
|
+
<span className="text-xs text-muted-foreground shrink-0">
|
|
83
83
|
{dateStr} {timeStr}
|
|
84
84
|
</span>
|
|
85
85
|
</button>
|
package/src/routine-run-page.tsx
CHANGED
|
@@ -52,19 +52,19 @@ export function RoutineRunPage({
|
|
|
52
52
|
return (
|
|
53
53
|
<div className="flex-1 flex flex-col min-h-0 overflow-hidden">
|
|
54
54
|
{/* Header */}
|
|
55
|
-
<div className="shrink-0 px-6 py-3 border-b border-
|
|
55
|
+
<div className="shrink-0 px-6 py-3 border-b border-border">
|
|
56
56
|
<div className="max-w-3xl mx-auto flex items-center gap-3">
|
|
57
57
|
<button
|
|
58
58
|
onClick={onBack}
|
|
59
|
-
className="size-7 flex items-center justify-center rounded-md text-
|
|
59
|
+
className="size-7 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
|
|
60
60
|
>
|
|
61
61
|
<ArrowLeft className="size-4" strokeWidth={1.75} />
|
|
62
62
|
</button>
|
|
63
63
|
<div className="min-w-0 flex-1">
|
|
64
|
-
<p className="text-sm font-medium text-
|
|
64
|
+
<p className="text-sm font-medium text-foreground truncate">
|
|
65
65
|
{displayName}
|
|
66
66
|
</p>
|
|
67
|
-
<p className="text-[11px] text-
|
|
67
|
+
<p className="text-[11px] text-muted-foreground">
|
|
68
68
|
{runDate}
|
|
69
69
|
<span className="mx-1">·</span>
|
|
70
70
|
<span className={cn(isRunning && "text-blue-500")}>
|
|
@@ -87,7 +87,7 @@ export function RoutineRunPage({
|
|
|
87
87
|
})
|
|
88
88
|
) : (
|
|
89
89
|
<div className="flex-1 flex items-center justify-center">
|
|
90
|
-
<p className="text-sm text-
|
|
90
|
+
<p className="text-sm text-muted-foreground">Run not found</p>
|
|
91
91
|
</div>
|
|
92
92
|
)}
|
|
93
93
|
</div>
|
package/src/routines-grid.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export function RoutinesGrid({
|
|
|
38
38
|
if (loading && routines.length === 0) {
|
|
39
39
|
return (
|
|
40
40
|
<div className="flex-1 flex items-center justify-center">
|
|
41
|
-
<p className="text-sm text-
|
|
41
|
+
<p className="text-sm text-muted-foreground animate-pulse">
|
|
42
42
|
Loading routines...
|
|
43
43
|
</p>
|
|
44
44
|
</div>
|
|
@@ -52,7 +52,7 @@ export function RoutinesGrid({
|
|
|
52
52
|
<h1 className="text-2xl font-semibold text-foreground tracking-tight">
|
|
53
53
|
Automate recurring work
|
|
54
54
|
</h1>
|
|
55
|
-
<p className="text-sm text-
|
|
55
|
+
<p className="text-sm text-muted-foreground">
|
|
56
56
|
Routines run on a schedule so Houston can work for you
|
|
57
57
|
automatically — daily reports, weekly research, and more.
|
|
58
58
|
</p>
|