@donotdev/cli 0.0.3 → 0.0.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.
Files changed (48) hide show
  1. package/dependencies-matrix.json +12 -24
  2. package/dist/bin/commands/bump.d.ts +1 -1
  3. package/dist/bin/commands/format.d.ts +1 -1
  4. package/dist/bin/commands/lint.d.ts +1 -1
  5. package/package.json +1 -9
  6. package/templates/app-demo/src/themes.css.example +108 -156
  7. package/templates/app-next/src/locales/home_en.json.example +6 -0
  8. package/templates/app-next/src/pages/HomePage.tsx.example +152 -8
  9. package/templates/app-next/src/themes.css.example +92 -140
  10. package/templates/app-vite/src/App.tsx.example +2 -2
  11. package/templates/app-vite/src/locales/home_en.json.example +6 -0
  12. package/templates/app-vite/src/pages/HomePage.tsx.example +149 -8
  13. package/templates/app-vite/src/themes.css.example +90 -138
  14. package/templates/root-consumer/guides/AGENT_START_HERE.md.example +83 -61
  15. package/templates/root-consumer/guides/COMPONENTS_ATOMIC.md.example +134 -0
  16. package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +70 -0
  17. package/templates/root-consumer/guides/COMPONENTS_UI.md.example +135 -0
  18. package/templates/root-consumer/guides/ENV_SETUP.md.example +14 -0
  19. package/templates/root-consumer/guides/INDEX.md.example +17 -25
  20. package/templates/root-consumer/guides/SETUP_AUTH.md.example +77 -0
  21. package/templates/root-consumer/guides/SETUP_BILLING.md.example +78 -0
  22. package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +62 -0
  23. package/templates/root-consumer/guides/SETUP_I18N.md.example +48 -0
  24. package/templates/root-consumer/guides/SETUP_LAYOUTS.md.example +108 -0
  25. package/templates/root-consumer/guides/SETUP_OAUTH.md.example +53 -0
  26. package/templates/root-consumer/guides/SETUP_PAGES.md.example +112 -0
  27. package/templates/root-consumer/guides/SETUP_THEMES.md.example +107 -0
  28. package/templates/root-consumer/guides/advanced/COOKIE_REFERENCE.md.example +252 -0
  29. package/templates/root-consumer/guides/{EMULATOR_SETUP.md.example → advanced/EMULATORS.md.example} +1 -1
  30. package/templates/root-consumer/guides/{VERSION_CONTROL.md.example → advanced/VERSION_CONTROL.md.example} +0 -7
  31. package/templates/root-consumer/guides/AUTH_SETUP.md.example +0 -92
  32. package/templates/root-consumer/guides/BILLING_SETUP.md.example +0 -120
  33. package/templates/root-consumer/guides/CLI.md.example +0 -293
  34. package/templates/root-consumer/guides/COMPONENTS.md.example +0 -875
  35. package/templates/root-consumer/guides/FEATURES.md.example +0 -286
  36. package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +0 -97
  37. package/templates/root-consumer/guides/FUNCTIONS.md.example +0 -177
  38. package/templates/root-consumer/guides/GETTING_STARTED.md.example +0 -451
  39. package/templates/root-consumer/guides/HOW_TO_USE.md.example +0 -296
  40. package/templates/root-consumer/guides/I18N_SETUP.md.example +0 -204
  41. package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +0 -79
  42. package/templates/root-consumer/guides/INSTALLATION.md.example +0 -296
  43. package/templates/root-consumer/guides/LAYOUTS.md.example +0 -310
  44. package/templates/root-consumer/guides/PAGES_SETUP.md.example +0 -123
  45. package/templates/root-consumer/guides/STYLING.md.example +0 -273
  46. package/templates/root-consumer/guides/THEMING_SETUP.md.example +0 -119
  47. /package/templates/root-consumer/guides/{CONFIG_SETUP.md.example → SETUP_APP_CONFIG.md.example} +0 -0
  48. /package/templates/root-consumer/guides/{APP_CHECK_SETUP.md.example → advanced/APP_CHECK.md.example} +0 -0
@@ -2,178 +2,130 @@
2
2
 
3
3
  /* ===========================
4
4
  APP-WIDE SETTINGS
5
- These apply to all themes - spacing, radius, shadows, routing animations
5
+ Spacing, radius, shadows, animations - apply to all themes
6
6
  =========================== */
7
7
  :root {
8
- /* ===========================
9
- ROUTING ANIMATIONS
10
- Customize page transition animations
11
- Pure CSS - zero JS overhead. Respects prefers-reduced-motion.
12
- Override in themes.css: --routing-animation: slide; to change animation type
13
- =========================== */
14
- /* Single animation type (fade, slide, or none to disable) - app-wide */
15
- /* --routing-animation: fade; */ /* fade | slide | none */
16
- /* --routing-default-duration: var(--dur-normal); */ /* Animation duration */
17
-
18
- /* Breakpoint-specific durations (all inherit from --routing-default-duration) */
19
- /* --routing-mobile-duration: var(--routing-default-duration); */
20
- /* --routing-tablet-duration: var(--routing-default-duration); */
21
- /* --routing-desktop-duration: var(--routing-default-duration); */
22
- /* --routing-wide-duration: var(--routing-default-duration); */
23
-
24
- /* Examples: */
25
- /* --routing-animation: slide; */ /* Use slide animation */
26
- /* --routing-animation: none; */ /* Disable animations */
27
- /* --routing-default-duration: 200ms; */ /* Faster animations */
28
-
29
- /* ===========================
30
- SPACING OVERRIDES
31
- Customize spacing scale
32
- =========================== */
33
- /* --gap-sm: 0.5rem; */ /* 8px - tight spacing */
34
- /* --gap-md: 1rem; */ /* 16px - medium spacing (default) */
35
- /* --gap-lg: 2rem; */ /* 32px - large spacing */
36
-
37
- /* ===========================
38
- BORDER RADIUS OVERRIDES
39
- Customize component corners
40
- =========================== */
41
- /* --radius-interactive: var(--radius-none); */ /* Buttons, links (default: square) */
42
- /* --radius-surface: var(--radius-md); */ /* Cards, dialogs (default: 8px round) */
43
- /* --radius-floating: var(--radius-none); */ /* Dropdowns, popovers (default: square) */
44
-
45
- /* ===========================
46
- SHADOW OVERRIDES
47
- Customize elevation
48
- =========================== */
49
- /* --shadow-sm: ...; */ /* Small shadows */
50
- /* --shadow-md: ...; */ /* Medium shadows (default) */
51
- /* --shadow-xl: ...; */ /* Large shadows */
8
+ /* Routing animations (fade | slide | none) */
9
+ /* --routing-animation: fade; */
10
+ /* --routing-default-duration: var(--dur-normal); */
11
+
12
+ /* Spacing scale */
13
+ /* --gap-sm: 0.5rem; */
14
+ /* --gap-md: 1rem; */
15
+ /* --gap-lg: 2rem; */
16
+
17
+ /* Border radius */
18
+ /* --radius-interactive: var(--radius-none); */
19
+ /* --radius-surface: var(--radius-md); */
20
+ /* --radius-floating: var(--radius-none); */
52
21
  }
53
22
 
54
23
  /* ===========================
55
- LIGHT THEME (High Contrast Light)
56
- Background: White
57
- Foreground: Black
24
+ LIGHT THEME
25
+ Zinc-based neutral palette
58
26
  =========================== */
59
27
  :root.light {
60
28
  --theme-icon: 'Sun';
61
29
  --theme-label: 'Light';
62
30
  --theme-is-dark: 0;
63
31
 
64
- /* ===========================
65
- 1. USER SETS - 5 BRAND COLORS
66
- =========================== */
67
- --foreground: #000000;
32
+ /* Core colors */
68
33
  --background: #ffffff;
69
- --primary: #00bcd4; /* Cyan */
70
- --secondary: #047857; /* Emerald-700 - WCAG AA compliant (5.48:1 with white) */
71
- --accent: #ff9800; /* Orange */
72
-
73
- /* ===========================
74
- 2. FRAMEWORK DEFAULTS - STATUS COLORS
75
- (Override if needed)
76
- =========================== */
77
- --success: #047857; /* Emerald-700 - WCAG AA compliant (5.48:1 with white) */
78
- --warning: #f59e0b;
79
- --destructive: #dc2626;
34
+ --foreground: #09090b;
35
+
36
+ /* Surfaces */
37
+ --card: #ffffff;
38
+ --card-foreground: #09090b;
39
+ --popover: #ffffff;
40
+ --popover-foreground: #09090b;
80
41
 
81
- /* ===========================
82
- 3. AUTO-COMPUTED - SURFACES
83
- (Plain sight computation for easy overriding)
84
- =========================== */
85
- --muted: color-mix(in oklab, var(--foreground) 5%, var(--background));
86
- --muted-foreground: color-mix(in oklab, var(--foreground) 75%, transparent);
87
- --border: color-mix(in oklab, var(--foreground) 15%, var(--background));
88
- --input: var(--muted);
42
+ /* Muted (zinc-100 / zinc-500) */
43
+ --muted: #f4f4f5;
44
+ --muted-foreground: #71717a;
45
+
46
+ /* Border & input (zinc-200) */
47
+ --border: #e4e4e7;
48
+ --input: #e4e4e7;
89
49
  --ring: var(--primary);
90
50
 
91
- --card: var(--background);
92
- --card-foreground: var(--foreground);
93
- --popover: var(--card);
94
- --popover-foreground: var(--card-foreground);
95
- --surface-1: var(--card);
96
-
97
- /* ===========================
98
- 4. AUTO-COMPUTED - TEXT ON BRAND COLORS
99
- (Mapped to foreground/background for consistency)
100
- =========================== */
101
- --primary-foreground: var(--foreground);
102
- --secondary-foreground: var(--background);
103
- --accent-foreground: var(--foreground);
104
-
105
- --success-foreground: var(--background);
106
- --warning-foreground: var(--foreground);
107
- --destructive-foreground: var(--background);
51
+ /* Brand colors - customize these */
52
+ --primary: #0284c7;
53
+ --primary-foreground: #ffffff;
54
+
55
+ --secondary: #f4f4f5;
56
+ --secondary-foreground: #18181b;
57
+
58
+ --accent: #ea580c;
59
+ --accent-foreground: #ffffff;
60
+
61
+ /* Status colors */
62
+ --destructive: #dc2626;
63
+ --destructive-foreground: #ffffff;
64
+ --success: #16a34a;
65
+ --success-foreground: #ffffff;
66
+ --warning: #f59e0b;
67
+ --warning-foreground: #09090b;
108
68
  }
109
69
 
110
70
  /* ===========================
111
- DARK THEME (High Contrast Dark)
112
- Background: Black
113
- Foreground: White
71
+ DARK THEME
72
+ Zinc-based dark palette
114
73
  =========================== */
115
74
  :root.dark {
116
75
  --theme-icon: 'Moon';
117
76
  --theme-label: 'Dark';
118
77
  --theme-is-dark: 1;
119
78
 
120
- /* ===========================
121
- 1. USER SETS - 5 BRAND COLORS
122
- =========================== */
123
- --foreground: #ffffff;
124
- --background: #000000;
125
- --primary: #00bcd4; /* Cyan */
126
- --secondary: #047857; /* Emerald-700 - WCAG AA compliant (5.48:1 with white) */
127
- --accent: #ff9800; /* Orange */
128
-
129
- /* ===========================
130
- 2. FRAMEWORK DEFAULTS - STATUS COLORS
131
- =========================== */
132
- --success: #047857; /* Emerald-700 - WCAG AA compliant (5.48:1 with white) */
133
- --warning: #f59e0b;
134
- --destructive: #dc2626; /* Red-600 - WCAG AA compliant (4.83:1 with white) */
135
-
136
- /* ===========================
137
- 3. AUTO-COMPUTED - SURFACES
138
- =========================== */
139
- --muted: color-mix(in oklab, var(--foreground) 10%, var(--background));
140
- --muted-foreground: color-mix(in oklab, var(--foreground) 75%, transparent);
141
- --border: color-mix(in oklab, var(--foreground) 15%, var(--background));
142
- --input: var(--muted);
79
+ /* Core colors */
80
+ --background: #09090b;
81
+ --foreground: #fafafa;
82
+
83
+ /* Surfaces */
84
+ --card: #09090b;
85
+ --card-foreground: #fafafa;
86
+ --popover: #18181b;
87
+ --popover-foreground: #fafafa;
88
+
89
+ /* Muted (zinc-800 / zinc-400) */
90
+ --muted: #27272a;
91
+ --muted-foreground: #a1a1aa;
92
+
93
+ /* Border & input (zinc-800) */
94
+ --border: #27272a;
95
+ --input: #27272a;
143
96
  --ring: var(--primary);
144
97
 
145
- --card: var(--background);
146
- --card-foreground: var(--foreground);
147
- --popover: var(--card);
148
- --popover-foreground: var(--card-foreground);
149
- --surface-1: var(--card);
150
-
151
- /* ===========================
152
- 4. AUTO-COMPUTED - TEXT ON BRAND COLORS
153
- =========================== */
154
- --primary-foreground: var(--background);
155
- --secondary-foreground: var(--foreground);
156
- --accent-foreground: var(--background);
157
-
158
- --success-foreground: var(--foreground);
159
- --warning-foreground: var(--background);
160
- --destructive-foreground: var(--foreground);
98
+ /* Brand colors - customize these */
99
+ --primary: #0ea5e9;
100
+ --primary-foreground: #ffffff;
101
+
102
+ --secondary: #27272a;
103
+ --secondary-foreground: #fafafa;
104
+
105
+ --accent: #f97316;
106
+ --accent-foreground: #ffffff;
107
+
108
+ /* Status colors */
109
+ --destructive: #dc2626;
110
+ --destructive-foreground: #ffffff;
111
+ --success: #16a34a;
112
+ --success-foreground: #ffffff;
113
+ --warning: #f59e0b;
114
+ --warning-foreground: #09090b;
161
115
  }
162
116
 
163
- /* ===========================
117
+ /* ===========================
164
118
  CUSTOM THEMES
165
- =========================== */
119
+ Add your brand themes below
120
+ =========================== */
166
121
 
167
- /* Add your custom themes here */
168
122
  /* Example:
169
- .brand {
123
+ :root.brand {
170
124
  --theme-icon: 'Zap';
171
125
  --theme-label: 'Brand';
172
- --background: #your-brand-background;
173
- --foreground: #your-brand-foreground;
174
- --primary: #your-brand-primary;
175
- --secondary: #your-brand-secondary;
176
- --accent: #your-brand-accent;
177
- ... other variables ...
126
+ --theme-is-dark: 0;
127
+ --background: #your-color;
128
+ --foreground: #your-color;
129
+ ...
178
130
  }
179
131
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Main application component
3
3
  * @description Root application component with configuration-driven architecture
4
- * @version 0.0.1
4
+ * @version 0.0.4
5
5
  * @since 0.0.1
6
6
  * @author AMBROISE PARK Consulting
7
7
  */
@@ -20,7 +20,7 @@ import { appConfig } from './config/app';
20
20
  *
21
21
  * Note: HomePage.tsx in src/pages/ is automatically used for the root route "/"
22
22
  *
23
- * @version 0.0.1
23
+ * @version 0.0.4
24
24
  * @since 0.0.1
25
25
  * @author AMBROISE PARK Consulting
26
26
  */
@@ -0,0 +1,6 @@
1
+ {
2
+ "hero": {
3
+ "title": "Welcome to DnDev",
4
+ "subtitle": "Your app is ready. Explore the framework patterns below."
5
+ }
6
+ }
@@ -2,21 +2,162 @@
2
2
 
3
3
  /**
4
4
  * @fileoverview Home page component
5
- * @description Main landing page for the application
6
- * @version 0.0.1
5
+ * @description Scaffold landing page demonstrating DoNotDev framework patterns
6
+ * @version 0.0.4
7
7
  * @since 0.0.1
8
- * @author AMBROISE PARK Consulting
9
8
  */
10
9
 
11
- import { HomeTemplate } from '@donotdev/templates';
12
10
  import { Home } from 'lucide-react';
13
- import type { PageMeta } from '@donotdev/core';
11
+
12
+ import {
13
+ Button,
14
+ CallToAction,
15
+ Card,
16
+ Grid,
17
+ GridArea,
18
+ HeroSection,
19
+ RadioGroup,
20
+ Section,
21
+ Stack,
22
+ Text,
23
+ } from '@donotdev/components';
24
+ import {
25
+ useLayout,
26
+ useTranslation,
27
+ type LayoutPreset,
28
+ type PageMeta,
29
+ } from '@donotdev/core';
30
+ import { PageContainer, Link } from '@donotdev/ui';
31
+
32
+ const LAYOUT_PRESETS: LayoutPreset[] = [
33
+ 'admin',
34
+ 'docs',
35
+ 'landing',
36
+ 'moolti',
37
+ 'blog',
38
+ 'game',
39
+ ];
40
+
41
+ export const NAMESPACE = 'home';
14
42
 
15
43
  export const meta: PageMeta = {
16
- title: 'Home',
44
+ namespace: NAMESPACE,
17
45
  icon: <Home />,
18
46
  };
19
47
 
20
48
  export default function HomePage() {
21
- return <HomeTemplate />;
22
- }
49
+ const currentPreset = useLayout('layoutPreset');
50
+ const setLayoutPreset = useLayout('setLayoutPreset');
51
+ const { t } = useTranslation([NAMESPACE]);
52
+
53
+ return (
54
+ <PageContainer>
55
+ <HeroSection
56
+ title={t('hero.title', "Welcome to DnDev")}
57
+ subtitle={t('hero.subtitle', "Your app is ready. Explore the framework patterns below.")}
58
+ variant="primary"
59
+ />
60
+
61
+ {/* Layout Switcher */}
62
+ <Section title="Try Our Layouts" tone="muted" align="center">
63
+ <Text>
64
+ Pick a layout and see it change live. Set your preferred layout in
65
+ config/app.ts
66
+ </Text>
67
+ <RadioGroup
68
+ value={currentPreset || 'landing'}
69
+ onValueChange={(value) => setLayoutPreset(value as LayoutPreset)}
70
+ gridCols={3}
71
+ items={LAYOUT_PRESETS.map((preset) => ({
72
+ value: preset,
73
+ label: preset.charAt(0).toUpperCase() + preset.slice(1),
74
+ }))}
75
+ />
76
+ </Section>
77
+
78
+ {/* Components Showcase */}
79
+ <Section title="Components Showcase">
80
+ {/* Stack Example */}
81
+ <Card title="Stack Component">
82
+ <Text variant="muted">
83
+ Stack creates flex containers. Default vertical, use direction="row"
84
+ for horizontal.
85
+ </Text>
86
+ <Stack direction="row" gap="medium">
87
+ <Card variant="primary" title="Item 1">
88
+ <Text>Horizontal</Text>
89
+ </Card>
90
+ <Card variant="accent" title="Item 2">
91
+ <Text>Stack</Text>
92
+ </Card>
93
+ </Stack>
94
+ </Card>
95
+
96
+ {/* Grid + GridArea Example */}
97
+ <Card title="Grid + GridArea Components">
98
+ <Text variant="muted">
99
+ Grid with named areas for complex layouts.
100
+ </Text>
101
+ <Grid
102
+ areas={`"header header"
103
+ "sidebar main"
104
+ "footer footer"`}
105
+ templateColumns="1fr 2fr"
106
+ gap="tight"
107
+ >
108
+ <GridArea name="header">
109
+ <Card variant="glass">
110
+ <Text>Header Header</Text>
111
+ </Card>
112
+ </GridArea>
113
+ <GridArea name="main">
114
+ <Card variant="glass">
115
+ <Text>Main 2fr</Text>
116
+ </Card>
117
+ </GridArea>
118
+ <GridArea name="sidebar">
119
+ <Card variant="glass">
120
+ <Text>Sidebar 1fr</Text>
121
+ </Card>
122
+ </GridArea>
123
+ <GridArea name="footer">
124
+ <Card variant="glass">
125
+ <Text>Footer Footer</Text>
126
+ </Card>
127
+ </GridArea>
128
+ </Grid>
129
+ </Card>
130
+ </Section>
131
+
132
+ {/* CallToAction */}
133
+ <CallToAction
134
+ title="Ready to Build?"
135
+ subtitle="Check out the guides folder for setup instructions."
136
+ primaryAction={
137
+ <Button
138
+ variant="primary"
139
+ render={({ children, ...props }) => (
140
+ <Link path="https://donotdev.com" {...props}>
141
+ {children}
142
+ </Link>
143
+ )}
144
+ >
145
+ Learn More
146
+ </Button>
147
+ }
148
+ secondaryAction={
149
+ <Button
150
+ variant="outline"
151
+ render={({ children, ...props }) => (
152
+ <Link path="https://discord.gg/fbeYWDak" {...props}>
153
+ {children}
154
+ </Link>
155
+ )}
156
+ >
157
+ Join Discord
158
+ </Button>
159
+ }
160
+ />
161
+ </PageContainer>
162
+ );
163
+ }