@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.
- package/dependencies-matrix.json +12 -24
- package/dist/bin/commands/bump.d.ts +1 -1
- package/dist/bin/commands/format.d.ts +1 -1
- package/dist/bin/commands/lint.d.ts +1 -1
- package/package.json +1 -9
- package/templates/app-demo/src/themes.css.example +108 -156
- package/templates/app-next/src/locales/home_en.json.example +6 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +152 -8
- package/templates/app-next/src/themes.css.example +92 -140
- package/templates/app-vite/src/App.tsx.example +2 -2
- package/templates/app-vite/src/locales/home_en.json.example +6 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +149 -8
- package/templates/app-vite/src/themes.css.example +90 -138
- package/templates/root-consumer/guides/AGENT_START_HERE.md.example +83 -61
- package/templates/root-consumer/guides/COMPONENTS_ATOMIC.md.example +134 -0
- package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +70 -0
- package/templates/root-consumer/guides/COMPONENTS_UI.md.example +135 -0
- package/templates/root-consumer/guides/ENV_SETUP.md.example +14 -0
- package/templates/root-consumer/guides/INDEX.md.example +17 -25
- package/templates/root-consumer/guides/SETUP_AUTH.md.example +77 -0
- package/templates/root-consumer/guides/SETUP_BILLING.md.example +78 -0
- package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +62 -0
- package/templates/root-consumer/guides/SETUP_I18N.md.example +48 -0
- package/templates/root-consumer/guides/SETUP_LAYOUTS.md.example +108 -0
- package/templates/root-consumer/guides/SETUP_OAUTH.md.example +53 -0
- package/templates/root-consumer/guides/SETUP_PAGES.md.example +112 -0
- package/templates/root-consumer/guides/SETUP_THEMES.md.example +107 -0
- package/templates/root-consumer/guides/advanced/COOKIE_REFERENCE.md.example +252 -0
- package/templates/root-consumer/guides/{EMULATOR_SETUP.md.example → advanced/EMULATORS.md.example} +1 -1
- package/templates/root-consumer/guides/{VERSION_CONTROL.md.example → advanced/VERSION_CONTROL.md.example} +0 -7
- package/templates/root-consumer/guides/AUTH_SETUP.md.example +0 -92
- package/templates/root-consumer/guides/BILLING_SETUP.md.example +0 -120
- package/templates/root-consumer/guides/CLI.md.example +0 -293
- package/templates/root-consumer/guides/COMPONENTS.md.example +0 -875
- package/templates/root-consumer/guides/FEATURES.md.example +0 -286
- package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +0 -97
- package/templates/root-consumer/guides/FUNCTIONS.md.example +0 -177
- package/templates/root-consumer/guides/GETTING_STARTED.md.example +0 -451
- package/templates/root-consumer/guides/HOW_TO_USE.md.example +0 -296
- package/templates/root-consumer/guides/I18N_SETUP.md.example +0 -204
- package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +0 -79
- package/templates/root-consumer/guides/INSTALLATION.md.example +0 -296
- package/templates/root-consumer/guides/LAYOUTS.md.example +0 -310
- package/templates/root-consumer/guides/PAGES_SETUP.md.example +0 -123
- package/templates/root-consumer/guides/STYLING.md.example +0 -273
- package/templates/root-consumer/guides/THEMING_SETUP.md.example +0 -119
- /package/templates/root-consumer/guides/{CONFIG_SETUP.md.example → SETUP_APP_CONFIG.md.example} +0 -0
- /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
|
-
|
|
5
|
+
Spacing, radius, shadows, animations - apply to all themes
|
|
6
6
|
=========================== */
|
|
7
7
|
:root {
|
|
8
|
-
/*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
/* --
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
/* --
|
|
20
|
-
/* --
|
|
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
|
|
56
|
-
|
|
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
|
-
--
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
--
|
|
87
|
-
--
|
|
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
|
-
|
|
92
|
-
--
|
|
93
|
-
--
|
|
94
|
-
|
|
95
|
-
--
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
--
|
|
103
|
-
--
|
|
104
|
-
|
|
105
|
-
--success-foreground:
|
|
106
|
-
--warning
|
|
107
|
-
--
|
|
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
|
|
112
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--
|
|
126
|
-
--
|
|
127
|
-
--
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
--
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
146
|
-
--
|
|
147
|
-
--
|
|
148
|
-
|
|
149
|
-
--
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
--
|
|
157
|
-
|
|
158
|
-
--success
|
|
159
|
-
--
|
|
160
|
-
--
|
|
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
|
-
--
|
|
173
|
-
--
|
|
174
|
-
--
|
|
175
|
-
|
|
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.
|
|
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.
|
|
23
|
+
* @version 0.0.4
|
|
24
24
|
* @since 0.0.1
|
|
25
25
|
* @author AMBROISE PARK Consulting
|
|
26
26
|
*/
|
|
@@ -2,21 +2,162 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Home page component
|
|
5
|
-
* @description
|
|
6
|
-
* @version 0.0.
|
|
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
|
-
|
|
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
|
-
|
|
44
|
+
namespace: NAMESPACE,
|
|
17
45
|
icon: <Home />,
|
|
18
46
|
};
|
|
19
47
|
|
|
20
48
|
export default function HomePage() {
|
|
21
|
-
|
|
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
|
+
}
|