@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
@@ -1,273 +0,0 @@
1
- # Styling Your App
2
-
3
- **Guide for:** DoNotDev framework consumers
4
-
5
- ---
6
-
7
- ## Quick Start: Zero CSS Required
8
-
9
- DoNotDev components work out of the box. Just pass props:
10
-
11
- ```tsx
12
- import { Card, Button, Section } from '@donotdev/components';
13
- import { PageContainer } from '@donotdev/ui';
14
-
15
- <PageContainer>
16
- <Section gridCols={3}>
17
- <Card title="Feature 1" content="Description" />
18
- <Card title="Feature 2" content="Description" />
19
- <Card title="Feature 3" content="Description" />
20
- </Section>
21
- </PageContainer>;
22
- ```
23
-
24
- **Result:** Responsive, accessible, themed. No CSS written.
25
-
26
- ---
27
-
28
- ## Page Structure (90% of use cases)
29
-
30
- ```tsx
31
- <PageContainer>
32
- <HeroSection title="Title" subtitle="Subtitle" />
33
-
34
- <Section gridCols={3} title="Features">
35
- <Card title="Feature 1" />
36
- <Card title="Feature 2" />
37
- <Card title="Feature 3" />
38
- </Section>
39
-
40
- <CallToAction title="Get Started" primaryAction={<Button>Action</Button>} />
41
- </PageContainer>
42
- ```
43
-
44
- **PageContainer handles:**
45
-
46
- - Width constraints (`variant`: `full`, `standard`, `narrow`, `text`, `form`, `table`, `dashboard`)
47
- - Spacing and typography via density system (`density`: `compact`, `standard`, `expressive`)
48
-
49
- **Section handles:**
50
-
51
- - Full-width backgrounds (`tone`: `base`, `muted`, `elevated`, `contrast`, `accent`)
52
- - Grid layout (`gridCols`: `1`, `2`, `3`, `4`)
53
- - Grid gap (`gridGap`: `none`, `tight`, `medium`, `large`)
54
-
55
- ---
56
-
57
- ## Density System
58
-
59
- Control spacing and typography globally:
60
-
61
- ```tsx
62
- <PageContainer density="expressive">
63
- {/* All components automatically use expressive scale */}
64
- <HeroSection title="Large Hero" />
65
- <Section gridCols={3}>
66
- <Card title="Card" />
67
- </Section>
68
- </PageContainer>
69
- ```
70
-
71
- **Three densities:**
72
-
73
- - **compact** - Dense layouts (admin, dashboards) - Minor Third (1.2×)
74
- - **standard** - DEFAULT, balanced (docs, SaaS) - Major Third (1.25×)
75
- - **expressive** - Spacious (marketing) - Perfect Fourth (1.333×)
76
-
77
- All spacing (`--gap-sm/md/lg`) and typography (`--font-size-*`) adjust automatically based on musical scale ratios.
78
-
79
- ---
80
-
81
- ## Breakthrough Components
82
-
83
- Some components break out of PageContainer width constraints to achieve full-width backgrounds:
84
-
85
- ```tsx
86
- <PageContainer variant="standard">
87
- {' '}
88
- {/* 1480px max */}
89
- <Section tone="muted" gridCols={3}>
90
- {/* Section has full-width gray background */}
91
- {/* But content is constrained to 1480px */}
92
- <Card title="Card 1" />
93
- <Card title="Card 2" />
94
- <Card title="Card 3" />
95
- </Section>
96
- <CallToAction
97
- title="Get Started"
98
- subtitle="Ready to build?"
99
- primaryAction={<Button>Start Now</Button>}
100
- />
101
- {/* CTA has full-width background, constrained content */}
102
- </PageContainer>
103
- ```
104
-
105
- **Breakthrough components:**
106
-
107
- - `Section` - Full-width backgrounds with grid layout
108
- - `HeroSection` - Full-width hero sections
109
- - `CallToAction` - Full-width conversion sections
110
-
111
- **Why?** Marketing pages need full-width colored backgrounds while keeping text readable (constrained width).
112
-
113
- ---
114
-
115
- ## Overriding Styles
116
-
117
- ### Via className
118
-
119
- ```tsx
120
- // Default styling
121
- <Card title="Feature" />
122
-
123
- // Tighter gap
124
- <Card title="Feature" className="dndev-gap-sm" />
125
-
126
- // Custom layout
127
- <div className="dndev-flex dndev-gap-md">
128
- <Card title="Left" />
129
- <Card title="Right" />
130
- </div>
131
- ```
132
-
133
- **Available utilities:**
134
-
135
- - Gap: `dndev-gap-none`, `dndev-gap-sm`, `dndev-gap-md`, `dndev-gap-lg`
136
- - Layout: `dndev-flex`, `dndev-flex-col`, `dndev-grid`, `dndev-center`
137
- - Padding: `dndev-p-{none|tight|medium|large}`
138
-
139
- ### Via Data Attributes
140
-
141
- **Text Alignment:**
142
- ```tsx
143
- <HeroSection data-text-align="center" title="Centered Hero" />
144
- <CallToAction data-text-align="center" title="Centered CTA" />
145
- <div data-text-align="end">Right-aligned text</div>
146
- ```
147
-
148
- **Universal data attributes:**
149
- - `data-text-align="start|center|end"` - Text alignment (RTL-aware)
150
- - `data-gap="none|tight|medium|large"` - Gap spacing
151
- - `data-radius="none|md|full"` - Border radius
152
- - `data-cols="1|2|3|4"` - Grid columns (when using grid utilities)
153
-
154
- **Why data attributes?**
155
- - DRY: Single CSS rule handles all components
156
- - No prop conflicts: `align` prop in Stack/Grid is for flex alignment, not text alignment
157
- - No nesting issues: Each element controls its own styling
158
- - Works with any element, not just framework components
159
-
160
- ### Via inline styles
161
-
162
- ```tsx
163
- <Button style={{ minWidth: '200px' }}>
164
- Wide Button
165
- </Button>
166
-
167
- <div style={{
168
- display: 'grid',
169
- gridTemplateColumns: '2fr 1fr',
170
- gap: 'var(--gap-md)'
171
- }}>
172
- <Card title="Main" />
173
- <Card title="Sidebar" />
174
- </div>
175
- ```
176
-
177
- ---
178
-
179
- ## CSS Variables
180
-
181
- All design tokens available as CSS variables:
182
-
183
- ```css
184
- /* Your custom styles */
185
- .my-component {
186
- padding: var(--gap-md);
187
- background: var(--color-surface);
188
- border-radius: var(--radius-md);
189
- box-shadow: var(--shadow-md);
190
- }
191
- ```
192
-
193
- **Common variables:**
194
-
195
- - **Gap:** `--gap-none`, `--gap-sm`, `--gap-md`, `--gap-lg`
196
- - **Radius:** `--radius-none`, `--radius-md`, `--radius-full`
197
- - **Shadows:** `--shadow-sm`, `--shadow-md`, `--shadow-lg`, `--shadow-xl`
198
- - **Colors:** `--color-primary`, `--color-surface`, `--color-text`
199
-
200
- ---
201
-
202
- ## Theming
203
-
204
- Override CSS variables in your `themes.css`:
205
-
206
- ```css
207
- [data-theme='custom'] {
208
- --color-primary: #ff6b6b;
209
- --gap-md: 1.5rem;
210
- --radius-md: 1rem;
211
- }
212
- ```
213
-
214
- See [THEMING.md](./THEMING.md) for complete guide.
215
-
216
- ---
217
-
218
- ## Advanced: Using Primitives
219
-
220
- For complex UI, use primitives directly:
221
-
222
- ```tsx
223
- import {
224
- TooltipPrimitive,
225
- TooltipTriggerPrimitive,
226
- TooltipContentPrimitive,
227
- } from '@donotdev/components';
228
-
229
- <TooltipPrimitive>
230
- <TooltipTriggerPrimitive asChild>
231
- <Button>Hover</Button>
232
- </TooltipTriggerPrimitive>
233
- <TooltipContentPrimitive>
234
- <div className="dndev-flex-col dndev-gap-sm">
235
- <h4>Title</h4>
236
- <p>Description</p>
237
- <Button>Action</Button>
238
- </div>
239
- </TooltipContentPrimitive>
240
- </TooltipPrimitive>;
241
- ```
242
-
243
- **When to use:**
244
-
245
- - Simple content → Props-based components
246
- - Complex/interactive content → Primitives
247
-
248
- ---
249
-
250
- ## Styling Approaches (All Valid)
251
-
252
- The framework is flexible. Use what works:
253
-
254
- ✅ Utility classes
255
- ✅ Inline styles
256
- ✅ CSS modules
257
- ✅ Tailwind (if you prefer)
258
- ✅ Styled components
259
- ✅ Emotion
260
-
261
- **Build your way.**
262
-
263
- ---
264
-
265
- ## Related
266
-
267
- - [COMPONENTS.md](./COMPONENTS.md) - Component catalog
268
- - [LAYOUTS.md](./LAYOUTS.md) - Layout patterns
269
- - [THEMING.md](./THEMING.md) - Theme customization
270
-
271
- ---
272
-
273
- **Last Updated:** 2025-12-03
@@ -1,119 +0,0 @@
1
- # Theming Setup
2
-
3
- **For AI Agents:** Override `src/themes.css`. CSS variables control everything.
4
-
5
- ---
6
-
7
- ## 1. Theme File
8
-
9
- **Scaffolded:** `src/themes.css` (already imported in your app)
10
-
11
- ```css
12
- /* src/themes.css */
13
- .light {
14
- --theme-icon: 'Sun';
15
- --theme-label: 'Light';
16
- --primary: #3b82f6;
17
- --background: #ffffff;
18
- --foreground: #0a0a0a;
19
- /* ... more variables with JSDoc in scaffolded file */
20
- }
21
-
22
- .dark {
23
- --theme-icon: 'Moon';
24
- --theme-label: 'Dark';
25
- --primary: #60a5fa;
26
- --background: #0a0a0a;
27
- --foreground: #fafafa;
28
- }
29
- ```
30
-
31
- ---
32
-
33
- ## 2. Add Custom Theme
34
-
35
- ```css
36
- .ocean {
37
- --theme-icon: 'Waves';
38
- --theme-label: 'Ocean';
39
- --primary: #0ea5e9;
40
- --background: #001a33;
41
- --foreground: #e0f2fe;
42
- }
43
- ```
44
-
45
- Framework auto-discovers themes. ThemeToggle auto-populated.
46
-
47
- ---
48
-
49
- ## 3. Key Variables
50
-
51
- **Base colors:**
52
- - `--background` / `--foreground`
53
- - `--primary` / `--primary-foreground`
54
- - `--secondary` / `--secondary-foreground`
55
-
56
- **Containers:**
57
- - `--card` / `--card-foreground`
58
- - `--popover` / `--popover-foreground`
59
-
60
- **Status:**
61
- - `--destructive`, `--success`, `--warning`
62
-
63
- **Radius:**
64
- - `--radius-surface` - Cards (rounded)
65
- - `--radius-floating` - Dropdowns (square)
66
- - `--radius-interactive` - Buttons (square)
67
-
68
- ---
69
-
70
- ## 4. Using Theme Colors
71
-
72
- **In CSS:**
73
- ```css
74
- .my-component {
75
- background: var(--background);
76
- color: var(--foreground);
77
- }
78
- ```
79
-
80
- **In components:**
81
- All framework components auto-use theme colors.
82
-
83
- ---
84
-
85
- ## 5. Theme Switching
86
-
87
- **Automatic (built-in):**
88
- ```tsx
89
- import { ThemeToggle } from '@donotdev/ui';
90
-
91
- // Auto-included in layout presets
92
- // Hides if 1 theme, icon if 2, dropdown if 3+
93
- <ThemeToggle />
94
- ```
95
-
96
- **Manual:**
97
- ```tsx
98
- import { useThemeStore } from '@donotdev/core';
99
-
100
- const { theme, setTheme } = useThemeStore();
101
- setTheme('dark');
102
- ```
103
-
104
- ---
105
-
106
- ## 6. Configuration
107
-
108
- ```typescript
109
- // src/config/app.ts
110
- export const appConfig: AppConfig = {
111
- theme: {
112
- defaultTheme: 'light',
113
- },
114
- };
115
- ```
116
-
117
- ---
118
-
119
- **Zero config. Infinite themes. Read JSDoc in scaffolded file for all variables.**