@dyrected/admin 2.0.1 → 2.4.1

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.
Files changed (168) hide show
  1. package/dist/App.d.ts +1 -0
  2. package/dist/admin.css +2 -0
  3. package/dist/components/auth/auth-gate.d.ts +13 -0
  4. package/dist/components/error-boundary.d.ts +16 -0
  5. package/dist/components/forms/field-renderer.d.ts +22 -0
  6. package/dist/components/forms/fields/block-builder.d.ts +9 -0
  7. package/dist/components/forms/fields/date-picker.d.ts +8 -0
  8. package/dist/components/forms/fields/json-editor.d.ts +8 -0
  9. package/dist/components/forms/fields/media-picker.d.ts +12 -0
  10. package/dist/components/forms/fields/multi-select.d.ts +19 -0
  11. package/dist/components/forms/fields/radio-field.d.ts +8 -0
  12. package/dist/components/forms/fields/relationship-picker.d.ts +10 -0
  13. package/dist/components/forms/fields/rich-text-editor.d.ts +9 -0
  14. package/dist/components/forms/fields/select-field.d.ts +8 -0
  15. package/dist/components/forms/fields/switch-field.d.ts +6 -0
  16. package/dist/components/forms/fields/text-area-field.d.ts +8 -0
  17. package/dist/components/forms/fields/text-field.d.ts +8 -0
  18. package/dist/components/forms/form-engine.d.ts +14 -0
  19. package/dist/components/forms/form-field-renderer.d.ts +20 -0
  20. package/dist/components/forms/utils.d.ts +11 -0
  21. package/dist/components/layout/admin-shell.d.ts +5 -0
  22. package/dist/components/layout/branding-provider.d.ts +4 -0
  23. package/dist/components/live-preview/LivePreviewPane.d.ts +7 -0
  24. package/dist/components/media/focal-point-picker.d.ts +12 -0
  25. package/dist/components/media/media-card.d.ts +8 -0
  26. package/dist/components/media/media-grid.d.ts +8 -0
  27. package/dist/components/media/media-library-dialog.d.ts +11 -0
  28. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  29. package/dist/components/ui/badge.d.ts +9 -0
  30. package/dist/components/ui/button.d.ts +11 -0
  31. package/dist/components/ui/calendar.d.ts +8 -0
  32. package/dist/components/ui/card.d.ts +8 -0
  33. package/dist/components/ui/checkbox.d.ts +4 -0
  34. package/dist/components/ui/command.d.ts +80 -0
  35. package/dist/components/ui/data-table.d.ts +14 -0
  36. package/dist/components/ui/dialog.d.ts +19 -0
  37. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  38. package/dist/components/ui/form.d.ts +23 -0
  39. package/dist/components/ui/input.d.ts +3 -0
  40. package/dist/components/ui/label.d.ts +5 -0
  41. package/dist/components/ui/page-header.d.ts +10 -0
  42. package/dist/components/ui/pagination.d.ts +11 -0
  43. package/dist/components/ui/popover.d.ts +6 -0
  44. package/dist/components/ui/progress.d.ts +4 -0
  45. package/dist/components/ui/radio-group.d.ts +5 -0
  46. package/dist/components/ui/render-cell.d.ts +8 -0
  47. package/dist/components/ui/scroll-area.d.ts +5 -0
  48. package/dist/components/ui/select.d.ts +13 -0
  49. package/dist/components/ui/separator.d.ts +4 -0
  50. package/dist/components/ui/sheet.d.ts +25 -0
  51. package/dist/components/ui/sidebar.d.ts +65 -0
  52. package/dist/components/ui/skeleton.d.ts +2 -0
  53. package/dist/components/ui/sonner.d.ts +4 -0
  54. package/dist/components/ui/switch.d.ts +4 -0
  55. package/dist/components/ui/table.d.ts +10 -0
  56. package/dist/components/ui/tabs.d.ts +7 -0
  57. package/dist/components/ui/textarea.d.ts +3 -0
  58. package/dist/components/ui/toggle.d.ts +12 -0
  59. package/dist/components/ui/tooltip.d.ts +7 -0
  60. package/dist/hooks/use-mobile.d.ts +1 -0
  61. package/dist/hooks/use-preferences.d.ts +6 -0
  62. package/dist/index.d.ts +38 -0
  63. package/dist/index.mjs +69091 -0
  64. package/dist/lib/utils.d.ts +3 -0
  65. package/dist/main.d.ts +0 -0
  66. package/dist/pages/auth/first-user-page.d.ts +4 -0
  67. package/dist/pages/auth/login-page.d.ts +4 -0
  68. package/dist/pages/collections/edit-page.d.ts +1 -0
  69. package/dist/pages/collections/list-page.d.ts +5 -0
  70. package/dist/pages/dashboard/dashboard.d.ts +1 -0
  71. package/dist/pages/globals/editor-page.d.ts +1 -0
  72. package/dist/pages/media/media-page.d.ts +4 -0
  73. package/dist/pages/setup/setup-prompt.d.ts +6 -0
  74. package/dist/providers/dyrected-provider.d.ts +29 -0
  75. package/dist/providers/query-provider.d.ts +3 -0
  76. package/package.json +7 -4
  77. package/CHANGELOG.md +0 -124
  78. package/components.json +0 -17
  79. package/eslint.config.js +0 -22
  80. package/index.html +0 -13
  81. package/postcss.config.js +0 -6
  82. package/src/App.css +0 -184
  83. package/src/App.tsx +0 -25
  84. package/src/assets/dyrected.svg +0 -155
  85. package/src/assets/hero.png +0 -0
  86. package/src/assets/react.svg +0 -1
  87. package/src/assets/vite.svg +0 -1
  88. package/src/components/auth/auth-gate.tsx +0 -64
  89. package/src/components/error-boundary.tsx +0 -45
  90. package/src/components/forms/field-renderer.tsx +0 -111
  91. package/src/components/forms/fields/block-builder.tsx +0 -213
  92. package/src/components/forms/fields/date-picker.tsx +0 -60
  93. package/src/components/forms/fields/json-editor.tsx +0 -62
  94. package/src/components/forms/fields/media-picker.tsx +0 -286
  95. package/src/components/forms/fields/multi-select.tsx +0 -145
  96. package/src/components/forms/fields/radio-field.tsx +0 -51
  97. package/src/components/forms/fields/relationship-picker.tsx +0 -143
  98. package/src/components/forms/fields/rich-text-editor.tsx +0 -224
  99. package/src/components/forms/fields/select-field.tsx +0 -35
  100. package/src/components/forms/fields/switch-field.tsx +0 -16
  101. package/src/components/forms/fields/text-area-field.tsx +0 -15
  102. package/src/components/forms/fields/text-field.tsx +0 -24
  103. package/src/components/forms/form-engine.tsx +0 -87
  104. package/src/components/forms/form-field-renderer.tsx +0 -269
  105. package/src/components/forms/utils.ts +0 -97
  106. package/src/components/layout/admin-shell.tsx +0 -479
  107. package/src/components/layout/branding-provider.tsx +0 -112
  108. package/src/components/live-preview/LivePreviewPane.tsx +0 -128
  109. package/src/components/media/focal-point-picker.tsx +0 -66
  110. package/src/components/media/media-card.tsx +0 -44
  111. package/src/components/media/media-grid.tsx +0 -32
  112. package/src/components/media/media-library-dialog.tsx +0 -465
  113. package/src/components/ui/aspect-ratio.tsx +0 -7
  114. package/src/components/ui/badge.tsx +0 -36
  115. package/src/components/ui/button.tsx +0 -56
  116. package/src/components/ui/calendar.tsx +0 -214
  117. package/src/components/ui/card.tsx +0 -79
  118. package/src/components/ui/checkbox.tsx +0 -28
  119. package/src/components/ui/command.tsx +0 -151
  120. package/src/components/ui/data-table.tsx +0 -219
  121. package/src/components/ui/dialog.tsx +0 -122
  122. package/src/components/ui/dropdown-menu.tsx +0 -200
  123. package/src/components/ui/form.tsx +0 -178
  124. package/src/components/ui/input.tsx +0 -24
  125. package/src/components/ui/label.tsx +0 -24
  126. package/src/components/ui/page-header.tsx +0 -30
  127. package/src/components/ui/pagination.tsx +0 -57
  128. package/src/components/ui/popover.tsx +0 -29
  129. package/src/components/ui/progress.tsx +0 -26
  130. package/src/components/ui/radio-group.tsx +0 -42
  131. package/src/components/ui/render-cell.tsx +0 -110
  132. package/src/components/ui/scroll-area.tsx +0 -46
  133. package/src/components/ui/select.tsx +0 -160
  134. package/src/components/ui/separator.tsx +0 -29
  135. package/src/components/ui/sheet.tsx +0 -140
  136. package/src/components/ui/sidebar.tsx +0 -771
  137. package/src/components/ui/skeleton.tsx +0 -15
  138. package/src/components/ui/sonner.tsx +0 -27
  139. package/src/components/ui/switch.tsx +0 -27
  140. package/src/components/ui/table.tsx +0 -117
  141. package/src/components/ui/tabs.tsx +0 -53
  142. package/src/components/ui/textarea.tsx +0 -22
  143. package/src/components/ui/toggle.tsx +0 -43
  144. package/src/components/ui/tooltip.tsx +0 -28
  145. package/src/hooks/use-mobile.tsx +0 -19
  146. package/src/hooks/use-preferences.ts +0 -56
  147. package/src/index.css +0 -111
  148. package/src/index.tsx +0 -198
  149. package/src/lib/utils.ts +0 -32
  150. package/src/main.tsx +0 -10
  151. package/src/pages/auth/first-user-page.tsx +0 -115
  152. package/src/pages/auth/login-page.tsx +0 -91
  153. package/src/pages/collections/edit-page.tsx +0 -280
  154. package/src/pages/collections/list-page.tsx +0 -343
  155. package/src/pages/dashboard/dashboard.tsx +0 -150
  156. package/src/pages/globals/editor-page.tsx +0 -122
  157. package/src/pages/media/media-page.tsx +0 -564
  158. package/src/pages/setup/setup-prompt.tsx +0 -181
  159. package/src/providers/dyrected-provider.tsx +0 -122
  160. package/src/providers/query-provider.tsx +0 -19
  161. package/src/types/jexl.d.ts +0 -11
  162. package/tailwind.config.ts +0 -102
  163. package/tsconfig.app.json +0 -28
  164. package/tsconfig.json +0 -12
  165. package/tsconfig.node.json +0 -25
  166. package/vite.config.ts +0 -40
  167. /package/{public → dist}/favicon.svg +0 -0
  168. /package/{public → dist}/icons.svg +0 -0
@@ -1,181 +0,0 @@
1
- import { useState } from "react";
2
- import {
3
- Copy,
4
- Check,
5
- ExternalLink,
6
- Terminal,
7
- Sparkles,
8
- ShieldCheck,
9
- } from "lucide-react";
10
- import { cn } from "../../lib/utils";
11
- import { Button } from "../../components/ui/button";
12
- import { generateAIPrompt, generateFreshSetupPrompt, type SetupPromptConfig } from "@dyrected/core";
13
-
14
- export type { SetupPromptConfig };
15
-
16
- export interface SetupPromptProps {
17
- config: SetupPromptConfig;
18
- }
19
-
20
- export function SetupPromptUI({ config }: SetupPromptProps) {
21
- const [copied, setCopied] = useState<string | null>(null);
22
- const [isFresh, setIsFresh] = useState(false);
23
- const [activeTab, setActiveTab] = useState<"next" | "nuxt" | "react" | "vue">("next");
24
-
25
- const promptText = isFresh
26
- ? generateFreshSetupPrompt(activeTab, config)
27
- : generateAIPrompt(activeTab, config);
28
-
29
- const copyToClipboard = (text: string, id: string) => {
30
- navigator.clipboard.writeText(text);
31
- setCopied(id);
32
- setTimeout(() => setCopied(null), 2000);
33
- };
34
-
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" />
40
- Integration Guide
41
- </div>
42
- <h1 className="text-2xl font-semibold tracking-tight lg:text-5xl text-foreground">
43
- Connect Your Application
44
- </h1>
45
- <p className="text-lg text-muted-foreground max-w-2xl mx-auto">
46
- {isFresh
47
- ? "Get a conversational walkthrough to set up Dyrected from scratch."
48
- : "Use the AI prompt below to set up your frontend automatically, or follow the steps manually."}
49
- </p>
50
- </div>
51
-
52
- <div className="grid gap-6">
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" />
58
- Site Credentials
59
- </h3>
60
- </div>
61
- <div className="p-4">
62
- <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
63
- {[
64
- { label: "Site ID", value: config.siteId, id: "siteId" },
65
- { label: "API Key", value: config.apiKey, id: "apiKey" },
66
- { label: "Base URL", value: config.baseUrl, id: "baseUrl" },
67
- ].map((item) => (
68
- <div key={item.id} className="space-y-2">
69
- <label className="text-xs font-bold text-muted-foreground uppercase">
70
- {item.label}
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">
74
- {item.value}
75
- </div>
76
- <button
77
- onClick={() => copyToClipboard(item.value || "", item.id)}
78
- className="absolute right-2 top-1/2 -translate-y-1/2 p-1.5 rounded-md hover:bg-background transition-colors text-muted-foreground"
79
- >
80
- {copied === item.id ? (
81
- <Check className="h-4 w-4 text-green-500" />
82
- ) : (
83
- <Copy className="h-4 w-4" />
84
- )}
85
- </button>
86
- </div>
87
- </div>
88
- ))}
89
- </div>
90
- </div>
91
- </section>
92
-
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" />
99
- AI Integration Prompt
100
- </h3>
101
- <div className="flex gap-2 bg-muted/50 p-1 rounded-lg w-fit">
102
- {(["next", "nuxt", "react", "vue"] as const).map((tab) => (
103
- <button
104
- key={tab}
105
- onClick={() => setActiveTab(tab)}
106
- className={cn(
107
- "px-4 py-1.5 rounded-md text-xs font-medium transition-all capitalize",
108
- activeTab === tab
109
- ? "bg-background text-foreground shadow-sm"
110
- : "text-muted-foreground hover:text-foreground"
111
- )}
112
- >
113
- {tab === "next" ? "Next.js" : tab === "nuxt" ? "Nuxt.js" : tab}
114
- </button>
115
- ))}
116
- </div>
117
- <div className="flex gap-2 bg-muted/50 p-1 rounded-lg w-fit">
118
- <button
119
- onClick={() => setIsFresh(false)}
120
- className={cn(
121
- "px-4 py-1.5 rounded-md text-xs font-medium transition-all",
122
- !isFresh
123
- ? "bg-background text-foreground shadow-sm"
124
- : "text-muted-foreground hover:text-foreground"
125
- )}
126
- >
127
- Existing Project
128
- </button>
129
- <button
130
- onClick={() => setIsFresh(true)}
131
- className={cn(
132
- "px-4 py-1.5 rounded-md text-xs font-medium transition-all",
133
- isFresh
134
- ? "bg-background text-foreground shadow-sm"
135
- : "text-muted-foreground hover:text-foreground"
136
- )}
137
- >
138
- Fresh Installation
139
- </button>
140
- </div>
141
- <p className="text-sm text-muted-foreground">
142
- Copy and paste this into your AI developer to handle everything automatically
143
- </p>
144
- </div>
145
- <Button
146
- onClick={() => copyToClipboard(promptText, "ai-developer")}
147
- className="relative overflow-hidden group shrink-0"
148
- >
149
- <div className="flex items-center gap-2">
150
- {copied === "ai-developer" ? (
151
- <Check className="h-4 w-4" />
152
- ) : (
153
- <Copy className="h-4 w-4" />
154
- )}
155
- {copied === "ai-developer" ? "Copied!" : "Copy Full Prompt"}
156
- </div>
157
- </Button>
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>
161
- </div>
162
- </section>
163
- </div>
164
-
165
- <div className="flex justify-center gap-4 pt-4">
166
- <Button variant="outline" asChild>
167
- <a
168
- href={`${config.baseUrl}/api/docs`}
169
- target="_blank"
170
- rel="noopener noreferrer"
171
- className="flex items-center gap-2"
172
- >
173
- <Terminal className="h-4 w-4" />
174
- API Documentation
175
- <ExternalLink className="h-3 w-3" />
176
- </a>
177
- </Button>
178
- </div>
179
- </div>
180
- );
181
- }
@@ -1,122 +0,0 @@
1
- import React, { createContext, useContext, useState, useEffect } from "react";
2
- import { createClient, DyrectedClient } from "@dyrected/sdk";
3
-
4
- interface DyrectedContextType {
5
- client: DyrectedClient | null;
6
- config: {
7
- baseUrl: string;
8
- apiKey: string | undefined;
9
- siteId: string | undefined;
10
- };
11
- setAuth: (baseUrl: string, apiKey: string, siteId?: string) => void;
12
- logout: () => void;
13
- isAuthenticated: boolean;
14
- schemas: { collections: any[]; globals: any[]; admin?: any } | null;
15
- user: any | null;
16
- setToken: (token: string) => void;
17
- }
18
-
19
- const DyrectedContext = createContext<DyrectedContextType | undefined>(undefined);
20
-
21
- export interface DyrectedProviderProps {
22
- children: React.ReactNode;
23
- apiKey?: string;
24
- baseUrl?: string;
25
- siteId?: string;
26
- }
27
-
28
- export function DyrectedProvider({
29
- children,
30
- apiKey: initialApiKey,
31
- baseUrl: initialBaseUrl,
32
- siteId: initialSiteId
33
- }: DyrectedProviderProps) {
34
- const [baseUrl, setBaseUrl] = useState<string>(() => initialBaseUrl || (typeof window !== 'undefined' ? localStorage.getItem("dyrected_url") : null) || "");
35
- const [apiKey, setApiKey] = useState<string | undefined>(() => initialApiKey || (typeof window !== 'undefined' ? localStorage.getItem("dyrected_key") : null) || undefined);
36
- const [siteId, setSiteId] = useState<string | undefined>(() => initialSiteId || (typeof window !== 'undefined' ? localStorage.getItem("dyrected_site_id") : null) || undefined);
37
- const [client, setClient] = useState<DyrectedClient | null>(null);
38
- const [schemas, setSchemas] = useState<{ collections: any[]; globals: any[]; admin?: any } | null>(null);
39
- const [user, setUser] = useState<any | null>(null);
40
-
41
- useEffect(() => {
42
- if (baseUrl) {
43
- const newClient = createClient({
44
- baseUrl,
45
- apiKey: apiKey || undefined,
46
- siteId: siteId || undefined,
47
- });
48
- setClient(newClient);
49
-
50
- // Fetch schemas
51
- newClient.getSchemas().then(setSchemas).catch(err => {
52
- console.error("Failed to fetch schemas:", err);
53
- setSchemas(null);
54
- });
55
- }
56
- }, [baseUrl, apiKey, siteId]);
57
-
58
- useEffect(() => {
59
- const token = localStorage.getItem("dyrected_token");
60
- if (token && client && schemas && !user) {
61
- setToken(token);
62
- }
63
- }, [client, schemas, user]);
64
-
65
- const setAuth = (newUrl: string, newKey: string, newSiteId?: string) => {
66
- localStorage.setItem("dyrected_url", newUrl);
67
- localStorage.setItem("dyrected_key", newKey);
68
- if (newSiteId) localStorage.setItem("dyrected_site_id", newSiteId);
69
- else localStorage.removeItem("dyrected_site_id");
70
-
71
- setBaseUrl(newUrl);
72
- setApiKey(newKey);
73
- setSiteId(newSiteId);
74
- };
75
-
76
- const setToken = (token: string) => {
77
- localStorage.setItem("dyrected_token", token);
78
- if (client) {
79
- client.setToken(token);
80
- // Prefer __admins for the dashboard session; fall back to the first auth collection.
81
- const authCollection =
82
- schemas?.collections.find((c: any) => c.slug === '__admins') ??
83
- schemas?.collections.find((c: any) => c.auth);
84
- if (authCollection) {
85
- client.collection(authCollection.slug).me().then(setUser).catch(() => setUser(null));
86
- }
87
- }
88
- };
89
-
90
- const logout = () => {
91
- localStorage.removeItem("dyrected_url");
92
- localStorage.removeItem("dyrected_key");
93
- localStorage.removeItem("dyrected_site_id");
94
- localStorage.removeItem("dyrected_token");
95
- setBaseUrl("");
96
- setApiKey(undefined);
97
- setSiteId(undefined);
98
- setClient(null);
99
- setUser(null);
100
- };
101
-
102
- return (
103
- <DyrectedContext.Provider value={{
104
- client,
105
- config: { baseUrl, apiKey, siteId },
106
- setAuth,
107
- setToken,
108
- logout,
109
- isAuthenticated: !!baseUrl && !!apiKey,
110
- schemas,
111
- user
112
- }}>
113
- {children}
114
- </DyrectedContext.Provider>
115
- );
116
- }
117
-
118
- export const useDyrected = () => {
119
- const context = useContext(DyrectedContext);
120
- if (!context) throw new Error("useDyrected must be used within a DyrectedProvider");
121
- return context;
122
- };
@@ -1,19 +0,0 @@
1
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
2
- import { useState } from "react";
3
-
4
- export function QueryProvider({ children }: { children: React.ReactNode }) {
5
- const [queryClient] = useState(() => new QueryClient({
6
- defaultOptions: {
7
- queries: {
8
- staleTime: 60 * 1000,
9
- retry: 1,
10
- },
11
- },
12
- }));
13
-
14
- return (
15
- <QueryClientProvider client={queryClient}>
16
- {children}
17
- </QueryClientProvider>
18
- );
19
- }
@@ -1,11 +0,0 @@
1
- declare module 'jexl' {
2
- const jexl: {
3
- evalSync: (expression: string, context: any) => any;
4
- eval: (expression: string, context: any) => Promise<any>;
5
- addFunction: (name: string, fn: (...args: any[]) => any) => void;
6
- addTransform: (name: string, fn: (...args: any[]) => any) => void;
7
- addBinaryOp: (name: string, precedence: number, fn: (a: any, b: any) => any) => void;
8
- addUnaryOp: (name: string, fn: (a: any) => any) => void;
9
- };
10
- export default jexl;
11
- }
@@ -1,102 +0,0 @@
1
- import type { Config } from "tailwindcss"
2
- import tailwindAnimate from "tailwindcss-animate"
3
-
4
- const config: Config = {
5
- darkMode: ["class"],
6
- content: [
7
- './pages/**/*.{ts,tsx}',
8
- './components/**/*.{ts,tsx}',
9
- './app/**/*.{ts,tsx}',
10
- './src/**/*.{ts,tsx}',
11
- ],
12
- theme: {
13
- container: {
14
- center: true,
15
- padding: '2rem',
16
- screens: {
17
- '2xl': '1400px'
18
- }
19
- },
20
- extend: {
21
- fontFamily: {
22
- sans: ['var(--font-sans)', 'ui-sans-serif', 'system-ui', 'sans-serif'],
23
- serif: ['var(--font-serif)', 'ui-serif', 'Georgia', 'serif'],
24
- },
25
- colors: {
26
- border: 'hsl(var(--border))',
27
- input: 'hsl(var(--input))',
28
- ring: 'hsl(var(--ring))',
29
- background: 'hsl(var(--background))',
30
- foreground: 'hsl(var(--foreground))',
31
- primary: {
32
- DEFAULT: 'hsl(var(--primary))',
33
- foreground: 'hsl(var(--primary-foreground))'
34
- },
35
- secondary: {
36
- DEFAULT: 'hsl(var(--secondary))',
37
- foreground: 'hsl(var(--secondary-foreground))'
38
- },
39
- destructive: {
40
- DEFAULT: 'hsl(var(--destructive))',
41
- foreground: 'hsl(var(--destructive-foreground))'
42
- },
43
- muted: {
44
- DEFAULT: 'hsl(var(--muted))',
45
- foreground: 'hsl(var(--muted-foreground))'
46
- },
47
- accent: {
48
- DEFAULT: 'hsl(var(--accent))',
49
- foreground: 'hsl(var(--accent-foreground))'
50
- },
51
- popover: {
52
- DEFAULT: 'hsl(var(--popover))',
53
- foreground: 'hsl(var(--popover-foreground))'
54
- },
55
- card: {
56
- DEFAULT: 'hsl(var(--card))',
57
- foreground: 'hsl(var(--card-foreground))'
58
- },
59
- sidebar: {
60
- DEFAULT: 'hsl(var(--sidebar-background))',
61
- foreground: 'hsl(var(--sidebar-foreground))',
62
- primary: 'hsl(var(--sidebar-primary))',
63
- 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
64
- accent: 'hsl(var(--sidebar-accent))',
65
- 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
66
- border: 'hsl(var(--sidebar-border))',
67
- ring: 'hsl(var(--sidebar-ring))'
68
- }
69
- },
70
- borderRadius: {
71
- lg: 'var(--radius)',
72
- md: 'calc(var(--radius) - 2px)',
73
- sm: 'calc(var(--radius) - 4px)'
74
- },
75
- keyframes: {
76
- 'accordion-down': {
77
- from: {
78
- height: '0'
79
- },
80
- to: {
81
- height: 'var(--radix-accordion-content-height)'
82
- }
83
- },
84
- 'accordion-up': {
85
- from: {
86
- height: 'var(--radix-accordion-content-height)'
87
- },
88
- to: {
89
- height: '0'
90
- }
91
- }
92
- },
93
- animation: {
94
- 'accordion-down': 'accordion-down 0.2s ease-out',
95
- 'accordion-up': 'accordion-up 0.2s ease-out'
96
- }
97
- }
98
- },
99
- plugins: [tailwindAnimate],
100
- }
101
-
102
- export default config
package/tsconfig.app.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "es2023",
5
- "lib": ["ES2023", "DOM"],
6
- "module": "esnext",
7
- "types": ["vite/client"],
8
- "skipLibCheck": true,
9
- "paths": {
10
- "@/*": ["./src/*"]
11
- },
12
-
13
- /* Bundler mode */
14
- "moduleResolution": "bundler",
15
- "allowImportingTsExtensions": true,
16
- "verbatimModuleSyntax": true,
17
- "moduleDetection": "force",
18
- "noEmit": true,
19
- "jsx": "react-jsx",
20
-
21
- /* Linting */
22
- "noUnusedLocals": true,
23
- "noUnusedParameters": true,
24
- "erasableSyntaxOnly": true,
25
- "noFallthroughCasesInSwitch": true
26
- },
27
- "include": ["src"]
28
- }
package/tsconfig.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ],
7
- "compilerOptions": {
8
- "paths": {
9
- "@/*": ["./src/*"]
10
- }
11
- }
12
- }
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "es2023",
5
- "lib": ["ES2023"],
6
- "module": "esnext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
- "paths": {},
10
-
11
- /* Bundler mode */
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
14
- "verbatimModuleSyntax": true,
15
- "moduleDetection": "force",
16
- "noEmit": true,
17
-
18
- /* Linting */
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true
23
- },
24
- "include": ["vite.config.ts"]
25
- }
package/vite.config.ts DELETED
@@ -1,40 +0,0 @@
1
- import path from "path";
2
- import { defineConfig } from "vite";
3
- import react from "@vitejs/plugin-react";
4
- import { nodePolyfills } from "vite-plugin-node-polyfills";
5
- import dts from "vite-plugin-dts";
6
-
7
- // https://vite.dev/config/
8
- export default defineConfig({
9
- plugins: [
10
- react(),
11
- dts({
12
- tsconfigPath: "./tsconfig.app.json",
13
- insertTypesEntry: true,
14
- }),
15
- nodePolyfills({
16
- // Whether to polyfill `node:` protocol imports.
17
- protocolImports: true,
18
- }),
19
- ],
20
- build: {
21
- lib: {
22
- entry: path.resolve(__dirname, "src/index.tsx"),
23
- name: "DyrectedAdmin",
24
- fileName: () => "index.mjs",
25
- formats: ["es"],
26
- },
27
- rollupOptions: {
28
- output: {
29
- format: "es",
30
- manualChunks: undefined,
31
- },
32
- },
33
- },
34
- resolve: {
35
- alias: {
36
- "@": path.resolve(__dirname, "./src"),
37
- "@dyrected/core": path.resolve(__dirname, "../core/src"),
38
- },
39
- },
40
- });
File without changes
File without changes