@dyrected/admin 2.0.1 → 2.4.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/CHANGELOG.md +29 -0
- package/package.json +4 -4
- package/scripts/prefix-tailwind-precision.py +98 -0
- package/scripts/prefix-tailwind.py +67 -0
- package/src/components/auth/auth-gate.tsx +4 -4
- package/src/components/error-boundary.tsx +4 -4
- package/src/components/forms/fields/block-builder.tsx +24 -24
- package/src/components/forms/fields/date-picker.tsx +7 -7
- package/src/components/forms/fields/json-editor.tsx +5 -5
- package/src/components/forms/fields/media-picker.tsx +39 -39
- package/src/components/forms/fields/multi-select.tsx +12 -12
- package/src/components/forms/fields/radio-field.tsx +8 -8
- package/src/components/forms/fields/relationship-picker.tsx +13 -13
- package/src/components/forms/fields/rich-text-editor.tsx +22 -22
- package/src/components/forms/fields/select-field.tsx +3 -3
- package/src/components/forms/form-engine.tsx +3 -3
- package/src/components/forms/form-field-renderer.tsx +37 -37
- package/src/components/layout/admin-shell.tsx +60 -60
- package/src/components/live-preview/LivePreviewPane.tsx +14 -14
- package/src/components/media/focal-point-picker.tsx +9 -9
- package/src/components/media/media-card.tsx +10 -10
- package/src/components/media/media-grid.tsx +3 -3
- package/src/components/media/media-library-dialog.tsx +105 -105
- package/src/components/ui/badge.tsx +5 -5
- package/src/components/ui/button.tsx +11 -11
- package/src/components/ui/calendar.tsx +36 -36
- package/src/components/ui/card.tsx +6 -6
- package/src/components/ui/checkbox.tsx +3 -3
- package/src/components/ui/command.tsx +12 -12
- package/src/components/ui/data-table.tsx +18 -18
- package/src/components/ui/dialog.tsx +9 -9
- package/src/components/ui/dropdown-menu.tsx +16 -16
- package/src/components/ui/form.tsx +4 -4
- package/src/components/ui/input.tsx +3 -3
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/page-header.tsx +6 -6
- package/src/components/ui/pagination.tsx +6 -6
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +2 -2
- package/src/components/ui/radio-group.tsx +4 -4
- package/src/components/ui/render-cell.tsx +16 -16
- package/src/components/ui/scroll-area.tsx +6 -6
- package/src/components/ui/select.tsx +14 -14
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/sheet.tsx +13 -13
- package/src/components/ui/sidebar.tsx +60 -60
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/sonner.tsx +1 -1
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/table.tsx +7 -7
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle.tsx +6 -6
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.css +27 -27
- package/src/index.tsx +4 -4
- package/src/lib/utils.ts +7 -3
- package/src/pages/auth/first-user-page.tsx +18 -18
- package/src/pages/auth/login-page.tsx +14 -14
- package/src/pages/collections/edit-page.tsx +37 -37
- package/src/pages/collections/list-page.tsx +23 -23
- package/src/pages/dashboard/dashboard.tsx +49 -49
- package/src/pages/globals/editor-page.tsx +13 -13
- package/src/pages/media/media-page.tsx +106 -106
- package/src/pages/setup/setup-prompt.tsx +48 -48
- package/tailwind.config.ts +1 -0
- package/vite.config.ts +0 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "lucide-react";
|
|
10
10
|
import { cn } from "../../lib/utils";
|
|
11
11
|
import { Button } from "../../components/ui/button";
|
|
12
|
-
import { generateAIPrompt, generateFreshSetupPrompt, type SetupPromptConfig } from "@dyrected/
|
|
12
|
+
import { generateAIPrompt, generateFreshSetupPrompt, type SetupPromptConfig } from "@dyrected/sdk";
|
|
13
13
|
|
|
14
14
|
export type { SetupPromptConfig };
|
|
15
15
|
|
|
@@ -33,54 +33,54 @@ export function SetupPromptUI({ config }: SetupPromptProps) {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<div className="max-w-4xl mx-auto space-y-8 py-8 animate-in slide-in-from-bottom-4 duration-700">
|
|
37
|
-
<div className="text-center space-y-4">
|
|
38
|
-
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-bold uppercase tracking-wider mb-2">
|
|
39
|
-
<Sparkles className="h-3 w-3" />
|
|
36
|
+
<div className="dy-max-w-4xl dy-mx-auto dy-space-y-8 dy-py-8 dy-animate-in dy-slide-in-from-bottom-4 dy-duration-700">
|
|
37
|
+
<div className="dy-text-center dy-space-y-4">
|
|
38
|
+
<div className="dy-inline-flex dy-items-center dy-gap-2 dy-px-3 dy-py-1 dy-rounded-full dy-bg-primary/10 dy-text-primary dy-text-xs dy-font-bold dy-uppercase dy-tracking-wider dy-mb-2">
|
|
39
|
+
<Sparkles className="dy-h-3 dy-w-3" />
|
|
40
40
|
Integration Guide
|
|
41
41
|
</div>
|
|
42
|
-
<h1 className="text-2xl font-semibold tracking-tight lg:text-5xl text-foreground">
|
|
42
|
+
<h1 className="dy-text-2xl dy-font-semibold dy-tracking-tight lg:dy-text-5xl dy-text-foreground">
|
|
43
43
|
Connect Your Application
|
|
44
44
|
</h1>
|
|
45
|
-
<p className="text-lg text-muted-foreground max-w-2xl mx-auto">
|
|
45
|
+
<p className="dy-text-lg dy-text-muted-foreground dy-max-w-2xl dy-mx-auto">
|
|
46
46
|
{isFresh
|
|
47
47
|
? "Get a conversational walkthrough to set up Dyrected from scratch."
|
|
48
48
|
: "Use the AI prompt below to set up your frontend automatically, or follow the steps manually."}
|
|
49
49
|
</p>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
|
-
<div className="grid gap-6">
|
|
52
|
+
<div className="dy-grid dy-gap-6">
|
|
53
53
|
{/* Site Credentials */}
|
|
54
|
-
<section className="rounded-2xl border bg-card overflow-hidden shadow-xl">
|
|
55
|
-
<div className="p-4 border-b bg-muted/30">
|
|
56
|
-
<h3 className="text-lg font-semibold flex items-center gap-2">
|
|
57
|
-
<ShieldCheck className="h-5 w-5 text-primary" />
|
|
54
|
+
<section className="dy-rounded-2xl dy-border dy-bg-card dy-overflow-hidden dy-shadow-xl">
|
|
55
|
+
<div className="dy-p-4 dy-border-b dy-bg-muted/30">
|
|
56
|
+
<h3 className="dy-text-lg dy-font-semibold dy-flex dy-items-center dy-gap-2">
|
|
57
|
+
<ShieldCheck className="dy-h-5 dy-w-5 dy-text-primary" />
|
|
58
58
|
Site Credentials
|
|
59
59
|
</h3>
|
|
60
60
|
</div>
|
|
61
|
-
<div className="p-4">
|
|
62
|
-
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
61
|
+
<div className="dy-p-4">
|
|
62
|
+
<div className="dy-grid dy-gap-4 sm:dy-grid-cols-2 lg:dy-grid-cols-3">
|
|
63
63
|
{[
|
|
64
64
|
{ label: "Site ID", value: config.siteId, id: "siteId" },
|
|
65
65
|
{ label: "API Key", value: config.apiKey, id: "apiKey" },
|
|
66
66
|
{ label: "Base URL", value: config.baseUrl, id: "baseUrl" },
|
|
67
67
|
].map((item) => (
|
|
68
|
-
<div key={item.id} className="space-y-2">
|
|
69
|
-
<label className="text-xs font-bold text-muted-foreground uppercase">
|
|
68
|
+
<div key={item.id} className="dy-space-y-2">
|
|
69
|
+
<label className="dy-text-xs dy-font-bold dy-text-muted-foreground dy-uppercase">
|
|
70
70
|
{item.label}
|
|
71
71
|
</label>
|
|
72
|
-
<div className="relative group">
|
|
73
|
-
<div className="p-3 pr-10 rounded-lg bg-muted text-sm font-mono truncate border border-transparent group-hover:border-primary/20 transition-all">
|
|
72
|
+
<div className="dy-relative dy-group">
|
|
73
|
+
<div className="dy-p-3 dy-pr-10 dy-rounded-lg dy-bg-muted dy-text-sm dy-font-mono dy-truncate dy-border dy-border-transparent dy-group-hover:dy-border-primary/20 dy-transition-all">
|
|
74
74
|
{item.value}
|
|
75
75
|
</div>
|
|
76
76
|
<button
|
|
77
77
|
onClick={() => copyToClipboard(item.value || "", item.id)}
|
|
78
|
-
className="absolute right-2 top-1/2
|
|
78
|
+
className="dy-absolute dy-right-2 dy-top-1/2 dy--translate-y-1/2 dy-p-1.5 dy-rounded-md hover:dy-bg-background dy-transition-colors dy-text-muted-foreground"
|
|
79
79
|
>
|
|
80
80
|
{copied === item.id ? (
|
|
81
|
-
<Check className="h-4 w-4 text-green-500" />
|
|
81
|
+
<Check className="dy-h-4 dy-w-4 dy-text-green-500" />
|
|
82
82
|
) : (
|
|
83
|
-
<Copy className="h-4 w-4" />
|
|
83
|
+
<Copy className="dy-h-4 dy-w-4" />
|
|
84
84
|
)}
|
|
85
85
|
</button>
|
|
86
86
|
</div>
|
|
@@ -91,37 +91,37 @@ export function SetupPromptUI({ config }: SetupPromptProps) {
|
|
|
91
91
|
</section>
|
|
92
92
|
|
|
93
93
|
{/* AI Prompt */}
|
|
94
|
-
<section className="rounded-2xl border bg-white overflow-hidden shadow-xl ring-1 ring-primary/20">
|
|
95
|
-
<div className="p-6 border-b bg-primary/5 flex items-center justify-between gap-4 flex-wrap">
|
|
96
|
-
<div className="space-y-3">
|
|
97
|
-
<h3 className="text-lg font-semibold flex items-center gap-2">
|
|
98
|
-
<Sparkles className="h-5 w-5 text-primary animate-pulse" />
|
|
94
|
+
<section className="dy-rounded-2xl dy-border dy-bg-white dy-overflow-hidden dy-shadow-xl dy-ring-1 dy-ring-primary/20">
|
|
95
|
+
<div className="dy-p-6 dy-border-b dy-bg-primary/5 dy-flex dy-items-center dy-justify-between dy-gap-4 dy-flex-wrap">
|
|
96
|
+
<div className="dy-space-y-3">
|
|
97
|
+
<h3 className="dy-text-lg dy-font-semibold dy-flex dy-items-center dy-gap-2">
|
|
98
|
+
<Sparkles className="dy-h-5 dy-w-5 dy-text-primary dy-animate-pulse" />
|
|
99
99
|
AI Integration Prompt
|
|
100
100
|
</h3>
|
|
101
|
-
<div className="flex gap-2 bg-muted/50 p-1 rounded-lg w-fit">
|
|
101
|
+
<div className="dy-flex dy-gap-2 dy-bg-muted/50 dy-p-1 dy-rounded-lg dy-w-fit">
|
|
102
102
|
{(["next", "nuxt", "react", "vue"] as const).map((tab) => (
|
|
103
103
|
<button
|
|
104
104
|
key={tab}
|
|
105
105
|
onClick={() => setActiveTab(tab)}
|
|
106
106
|
className={cn(
|
|
107
|
-
"px-4 py-1.5 rounded-md text-xs font-medium transition-all capitalize",
|
|
107
|
+
"dy-px-4 dy-py-1.5 dy-rounded-md dy-text-xs dy-font-medium dy-transition-all dy-capitalize",
|
|
108
108
|
activeTab === tab
|
|
109
|
-
? "bg-background text-foreground shadow-sm"
|
|
110
|
-
: "text-muted-foreground hover:text-foreground"
|
|
109
|
+
? "dy-bg-background dy-text-foreground dy-shadow-sm"
|
|
110
|
+
: "dy-text-muted-foreground hover:dy-text-foreground"
|
|
111
111
|
)}
|
|
112
112
|
>
|
|
113
113
|
{tab === "next" ? "Next.js" : tab === "nuxt" ? "Nuxt.js" : tab}
|
|
114
114
|
</button>
|
|
115
115
|
))}
|
|
116
116
|
</div>
|
|
117
|
-
<div className="flex gap-2 bg-muted/50 p-1 rounded-lg w-fit">
|
|
117
|
+
<div className="dy-flex dy-gap-2 dy-bg-muted/50 dy-p-1 dy-rounded-lg dy-w-fit">
|
|
118
118
|
<button
|
|
119
119
|
onClick={() => setIsFresh(false)}
|
|
120
120
|
className={cn(
|
|
121
|
-
"px-4 py-1.5 rounded-md text-xs font-medium transition-all",
|
|
121
|
+
"dy-px-4 dy-py-1.5 dy-rounded-md dy-text-xs dy-font-medium dy-transition-all",
|
|
122
122
|
!isFresh
|
|
123
|
-
? "bg-background text-foreground shadow-sm"
|
|
124
|
-
: "text-muted-foreground hover:text-foreground"
|
|
123
|
+
? "dy-bg-background dy-text-foreground dy-shadow-sm"
|
|
124
|
+
: "dy-text-muted-foreground hover:dy-text-foreground"
|
|
125
125
|
)}
|
|
126
126
|
>
|
|
127
127
|
Existing Project
|
|
@@ -129,50 +129,50 @@ export function SetupPromptUI({ config }: SetupPromptProps) {
|
|
|
129
129
|
<button
|
|
130
130
|
onClick={() => setIsFresh(true)}
|
|
131
131
|
className={cn(
|
|
132
|
-
"px-4 py-1.5 rounded-md text-xs font-medium transition-all",
|
|
132
|
+
"dy-px-4 dy-py-1.5 dy-rounded-md dy-text-xs dy-font-medium dy-transition-all",
|
|
133
133
|
isFresh
|
|
134
|
-
? "bg-background text-foreground shadow-sm"
|
|
135
|
-
: "text-muted-foreground hover:text-foreground"
|
|
134
|
+
? "dy-bg-background dy-text-foreground dy-shadow-sm"
|
|
135
|
+
: "dy-text-muted-foreground hover:dy-text-foreground"
|
|
136
136
|
)}
|
|
137
137
|
>
|
|
138
138
|
Fresh Installation
|
|
139
139
|
</button>
|
|
140
140
|
</div>
|
|
141
|
-
<p className="text-sm text-muted-foreground">
|
|
141
|
+
<p className="dy-text-sm dy-text-muted-foreground">
|
|
142
142
|
Copy and paste this into your AI developer to handle everything automatically
|
|
143
143
|
</p>
|
|
144
144
|
</div>
|
|
145
145
|
<Button
|
|
146
146
|
onClick={() => copyToClipboard(promptText, "ai-developer")}
|
|
147
|
-
className="relative overflow-hidden group shrink-0"
|
|
147
|
+
className="dy-relative dy-overflow-hidden dy-group dy-shrink-0"
|
|
148
148
|
>
|
|
149
|
-
<div className="flex items-center gap-2">
|
|
149
|
+
<div className="dy-flex dy-items-center dy-gap-2">
|
|
150
150
|
{copied === "ai-developer" ? (
|
|
151
|
-
<Check className="h-4 w-4" />
|
|
151
|
+
<Check className="dy-h-4 dy-w-4" />
|
|
152
152
|
) : (
|
|
153
|
-
<Copy className="h-4 w-4" />
|
|
153
|
+
<Copy className="dy-h-4 dy-w-4" />
|
|
154
154
|
)}
|
|
155
155
|
{copied === "ai-developer" ? "Copied!" : "Copy Full Prompt"}
|
|
156
156
|
</div>
|
|
157
157
|
</Button>
|
|
158
158
|
</div>
|
|
159
|
-
<div className="p-6 bg-slate-950 text-slate-300 font-mono text-xs leading-relaxed max-h-[400px] overflow-y-auto scrollbar-thin scrollbar-thumb-white/10">
|
|
160
|
-
<pre className="whitespace-pre-wrap">{promptText}</pre>
|
|
159
|
+
<div className="dy-p-6 dy-bg-slate-950 dy-text-slate-300 dy-font-mono dy-text-xs dy-leading-relaxed dy-max-h-[400px] dy-overflow-y-auto dy-scrollbar-thin dy-scrollbar-thumb-white/10">
|
|
160
|
+
<pre className="dy-whitespace-pre-wrap">{promptText}</pre>
|
|
161
161
|
</div>
|
|
162
162
|
</section>
|
|
163
163
|
</div>
|
|
164
164
|
|
|
165
|
-
<div className="flex justify-center gap-4 pt-4">
|
|
165
|
+
<div className="dy-flex dy-justify-center dy-gap-4 dy-pt-4">
|
|
166
166
|
<Button variant="outline" asChild>
|
|
167
167
|
<a
|
|
168
168
|
href={`${config.baseUrl}/api/docs`}
|
|
169
169
|
target="_blank"
|
|
170
170
|
rel="noopener noreferrer"
|
|
171
|
-
className="flex items-center gap-2"
|
|
171
|
+
className="dy-flex dy-items-center dy-gap-2"
|
|
172
172
|
>
|
|
173
|
-
<Terminal className="h-4 w-4" />
|
|
173
|
+
<Terminal className="dy-h-4 dy-w-4" />
|
|
174
174
|
API Documentation
|
|
175
|
-
<ExternalLink className="h-3 w-3" />
|
|
175
|
+
<ExternalLink className="dy-h-3 dy-w-3" />
|
|
176
176
|
</a>
|
|
177
177
|
</Button>
|
|
178
178
|
</div>
|
package/tailwind.config.ts
CHANGED