@donotdev/cli 0.0.31 → 0.0.33

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.
@@ -1,174 +1,174 @@
1
- # Version Control Guide
2
-
3
- **How to upgrade DoNotDev framework packages in your project**
4
-
5
- ---
6
-
7
- ## Quick Start
8
-
9
- ```bash
10
- # Check for available updates
11
- dndev bump --check
12
-
13
- # Apply safe updates (minor/patch versions)
14
- dndev bump
15
-
16
- # Preview changes without applying
17
- dndev bump --dry-run
18
- ```
19
-
20
- ---
21
-
22
- ## How It Works
23
-
24
- ### Automatic Updates
25
-
26
- **Patch versions (0.0.x):**
27
- - Handled automatically by `bun install`
28
- - No action needed - `^` ranges allow automatic patch updates
29
- - Example: `^0.0.2` → `0.0.3`, `0.0.4`, etc.
30
-
31
- **Minor versions (0.x.y):**
32
- - Handled automatically by `dndev bump`
33
- - **RISK FREE:** All changes are backward compatible via deprecation
34
- - No breaking changes in 0.x.y range
35
- - Example: `^0.0.2` → `^0.1.0` (auto-updated, safe)
36
-
37
- ### Manual Validation Required
38
-
39
- **Major versions (0.*.* → 1.x.y):**
40
- - `dndev bump` detects major version changes
41
- - Shows migration guide with breaking changes
42
- - **You must validate manually** before updating
43
- - **Only place where breaking changes occur**
44
- - Example: `^0.1.0` → `^1.0.0` (requires validation)
45
-
46
- ---
47
-
48
- ## Upgrade Process
49
-
50
- ### Step 1: Check for Updates
51
-
52
- ```bash
53
- dndev bump --check
54
- ```
55
-
56
- This shows:
57
- - Available updates for `@donotdev/*` packages (from npm)
58
- - Available updates for external peer dependencies (from matrix)
59
- - Major version changes (with migration guides)
60
-
61
- ### Step 2: Review Migration Guides
62
-
63
- If major version changes are detected:
64
- - Read the migration guide shown in the output
65
- - Check for breaking changes that affect your code
66
- - Review the migration guide file (path shown in output)
67
-
68
- ### Step 3: Apply Updates
69
-
70
- ```bash
71
- # Safe updates (minor/patch) - auto-applied
72
- dndev bump
73
-
74
- # Or preview first
75
- dndev bump --dry-run
76
- ```
77
-
78
- **What gets updated:**
79
- - `@donotdev/*` packages: Updated to latest compatible version
80
- - External peer dependencies: Updated to matrix versions
81
- - All `package.json` files in your project
82
-
83
- ---
84
-
85
- ## Understanding Version Ranges
86
-
87
- ### `^` Range (Caret)
88
-
89
- **What it means:**
90
- - Allows updates to latest minor/patch version
91
- - Same major version required
92
- - Example: `^0.0.2` allows `0.0.2` through `0.0.9`, but not `0.1.0`
93
-
94
- **Why we use it:**
95
- - Automatic patch updates via `bun install`
96
- - Safe minor updates via `dndev bump`
97
- - Prevents accidental major version updates
98
-
99
- ### Version Format
100
-
101
- ```json
102
- {
103
- "dependencies": {
104
- "@donotdev/core": "^0.0.2",
105
- "react": "^19.2.3"
106
- }
107
- }
108
- ```
109
-
110
- - `^0.0.2` = allows `0.0.2` to `0.0.x` (patch updates)
111
- - `^0.1.0` = allows `0.1.0` to `0.x.x` (minor updates)
112
- - `^1.0.0` = allows `1.0.0` to `1.x.x` (minor updates, not `2.0.0`)
113
-
114
- ---
115
-
116
- ## Migration Guides
117
-
118
- When upgrading major versions, migration guides are provided:
119
-
120
- **Location:** Shown in `dndev bump` output
121
-
122
- **Contains:**
123
- - List of breaking changes
124
- - Step-by-step migration instructions
125
- - Code examples for updated APIs
126
-
127
- **Example:**
128
- ```
129
- ⚠️ Major version update detected: @donotdev/core 0.1.0 → 1.0.0
130
-
131
- Migration guide: docs/migration/v0.1-to-v1.0.md
132
-
133
- Breaking changes:
134
- - Removed useAuth() - use useAuthentication() instead
135
- - Theme API changed - see migration guide
136
-
137
- Review the migration guide before updating.
138
- ```
139
-
140
- ---
141
-
142
- ## Troubleshooting
143
-
144
- ### "No updates available"
145
-
146
- - All packages are up to date
147
- - Or you're already on latest version
148
-
149
- ### "Major version change detected"
150
-
151
- - Review migration guide
152
- - Check breaking changes
153
- - Update code if needed
154
- - Run `dndev bump` again to apply
155
-
156
- ### "Package not found on npm"
157
-
158
- - Package may not be published yet
159
- - Check package name spelling
160
- - Verify you're using correct registry
161
-
162
- ---
163
-
164
- ## Best Practices
165
-
166
- 1. **Regular updates:** Run `dndev bump --check` monthly
167
- 2. **Test after updates:** Run your test suite after applying updates
168
- 3. **Review major changes:** Always read migration guides for major versions
169
- 4. **Use `--dry-run`:** Preview changes before applying
170
- 5. **Commit changes:** Commit updated `package.json` files after successful updates
171
-
172
- ---
173
-
174
- **Keep your dependencies up to date. Stay secure. Stay compatible.**
1
+ # Version Control Guide
2
+
3
+ **How to upgrade DoNotDev framework packages in your project**
4
+
5
+ ---
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Check for available updates
11
+ dndev bump --check
12
+
13
+ # Apply safe updates (minor/patch versions)
14
+ dndev bump
15
+
16
+ # Preview changes without applying
17
+ dndev bump --dry-run
18
+ ```
19
+
20
+ ---
21
+
22
+ ## How It Works
23
+
24
+ ### Automatic Updates
25
+
26
+ **Patch versions (0.0.x):**
27
+ - Handled automatically by `bun install`
28
+ - No action needed - `^` ranges allow automatic patch updates
29
+ - Example: `^0.0.2` → `0.0.3`, `0.0.4`, etc.
30
+
31
+ **Minor versions (0.x.y):**
32
+ - Handled automatically by `dndev bump`
33
+ - **RISK FREE:** All changes are backward compatible via deprecation
34
+ - No breaking changes in 0.x.y range
35
+ - Example: `^0.0.2` → `^0.1.0` (auto-updated, safe)
36
+
37
+ ### Manual Validation Required
38
+
39
+ **Major versions (0.*.* → 1.x.y):**
40
+ - `dndev bump` detects major version changes
41
+ - Shows migration guide with breaking changes
42
+ - **You must validate manually** before updating
43
+ - **Only place where breaking changes occur**
44
+ - Example: `^0.1.0` → `^1.0.0` (requires validation)
45
+
46
+ ---
47
+
48
+ ## Upgrade Process
49
+
50
+ ### Step 1: Check for Updates
51
+
52
+ ```bash
53
+ dndev bump --check
54
+ ```
55
+
56
+ This shows:
57
+ - Available updates for `@donotdev/*` packages (from npm)
58
+ - Available updates for external peer dependencies (from matrix)
59
+ - Major version changes (with migration guides)
60
+
61
+ ### Step 2: Review Migration Guides
62
+
63
+ If major version changes are detected:
64
+ - Read the migration guide shown in the output
65
+ - Check for breaking changes that affect your code
66
+ - Review the migration guide file (path shown in output)
67
+
68
+ ### Step 3: Apply Updates
69
+
70
+ ```bash
71
+ # Safe updates (minor/patch) - auto-applied
72
+ dndev bump
73
+
74
+ # Or preview first
75
+ dndev bump --dry-run
76
+ ```
77
+
78
+ **What gets updated:**
79
+ - `@donotdev/*` packages: Updated to latest compatible version
80
+ - External peer dependencies: Updated to matrix versions
81
+ - All `package.json` files in your project
82
+
83
+ ---
84
+
85
+ ## Understanding Version Ranges
86
+
87
+ ### `^` Range (Caret)
88
+
89
+ **What it means:**
90
+ - Allows updates to latest minor/patch version
91
+ - Same major version required
92
+ - Example: `^0.0.2` allows `0.0.2` through `0.0.9`, but not `0.1.0`
93
+
94
+ **Why we use it:**
95
+ - Automatic patch updates via `bun install`
96
+ - Safe minor updates via `dndev bump`
97
+ - Prevents accidental major version updates
98
+
99
+ ### Version Format
100
+
101
+ ```json
102
+ {
103
+ "dependencies": {
104
+ "@donotdev/core": "^0.0.2",
105
+ "react": "^19.2.3"
106
+ }
107
+ }
108
+ ```
109
+
110
+ - `^0.0.2` = allows `0.0.2` to `0.0.x` (patch updates)
111
+ - `^0.1.0` = allows `0.1.0` to `0.x.x` (minor updates)
112
+ - `^1.0.0` = allows `1.0.0` to `1.x.x` (minor updates, not `2.0.0`)
113
+
114
+ ---
115
+
116
+ ## Migration Guides
117
+
118
+ When upgrading major versions, migration guides are provided:
119
+
120
+ **Location:** Shown in `dndev bump` output
121
+
122
+ **Contains:**
123
+ - List of breaking changes
124
+ - Step-by-step migration instructions
125
+ - Code examples for updated APIs
126
+
127
+ **Example:**
128
+ ```
129
+ ⚠️ Major version update detected: @donotdev/core 0.1.0 → 1.0.0
130
+
131
+ Migration guide: docs/migration/v0.1-to-v1.0.md
132
+
133
+ Breaking changes:
134
+ - Removed useAuth() - use useAuthentication() instead
135
+ - Theme API changed - see migration guide
136
+
137
+ Review the migration guide before updating.
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Troubleshooting
143
+
144
+ ### "No updates available"
145
+
146
+ - All packages are up to date
147
+ - Or you're already on latest version
148
+
149
+ ### "Major version change detected"
150
+
151
+ - Review migration guide
152
+ - Check breaking changes
153
+ - Update code if needed
154
+ - Run `dndev bump` again to apply
155
+
156
+ ### "Package not found on npm"
157
+
158
+ - Package may not be published yet
159
+ - Check package name spelling
160
+ - Verify you're using correct registry
161
+
162
+ ---
163
+
164
+ ## Best Practices
165
+
166
+ 1. **Regular updates:** Run `dndev bump --check` monthly
167
+ 2. **Test after updates:** Run your test suite after applying updates
168
+ 3. **Review major changes:** Always read migration guides for major versions
169
+ 4. **Use `--dry-run`:** Preview changes before applying
170
+ 5. **Commit changes:** Commit updated `package.json` files after successful updates
171
+
172
+ ---
173
+
174
+ **Keep your dependencies up to date. Stay secure. Stay compatible.**
@@ -15,7 +15,7 @@
15
15
  | [Pricing](#pricing) | Plan comparison | PricingTable, Section |
16
16
  | [Settings](#settings) | User preferences | Section, form components |
17
17
  | [Profile](#profile) | User profile display/edit | Section, Card, Avatar |
18
- | [Detail Page](#detail-page) | Single item display (non-edit) | Section, Card, Grid |
18
+ | [Detail Page](#detail-page) | Single item display (non-edit) | Section (bleed), ImageGallery, Card, Grid |
19
19
  | [Analytics](#analytics) | Charts and metrics | Section, Grid, Card, charts |
20
20
 
21
21
  ---
@@ -26,7 +26,8 @@
26
26
 
27
27
  ```tsx
28
28
  import { useEffect, useState } from 'react';
29
- import { PageContainer, Loader, useNavigate } from '@donotdev/ui';
29
+ import { Spinner } from '@donotdev/components';
30
+ import { PageContainer, useNavigate } from '@donotdev/ui';
30
31
  import { Section, Card, Grid, Stack, Button, Text, Badge } from '@donotdev/components';
31
32
  import type { PageMeta } from '@donotdev/core';
32
33
  import { ChartBar, Plus, ArrowRight } from 'lucide-react';
@@ -65,7 +66,7 @@ export default function DashboardPage() {
65
66
  {/* KPI Cards */}
66
67
  <Section title="Overview" gridCols={[1, 2, 3, 3]}>
67
68
  <Card variant="glass" title="Total Items">
68
- {loading ? <Loader /> : (
69
+ {loading ? <Spinner overlay /> : (
69
70
  <Text level="h2">{metrics?.totalItems ?? 0}</Text>
70
71
  )}
71
72
  </Card>
@@ -94,7 +95,7 @@ export default function DashboardPage() {
94
95
  - Quick actions at top (cards with onClick)
95
96
  - KPI cards in grid
96
97
  - Alert/attention sections with actions
97
- - Loading states with `<Loader />`
98
+ - Loading states with `<Spinner overlay />`
98
99
 
99
100
  ---
100
101
 
@@ -243,7 +244,7 @@ export default function CarPage() {
243
244
 
244
245
  ```tsx
245
246
  import { PageContainer, useNavigate } from '@donotdev/ui';
246
- import { HeroSection, Section, Card, Grid, Button } from '@donotdev/components';
247
+ import { HeroSection, Section, CallToAction, Card, Grid, Button } from '@donotdev/components';
247
248
  import type { PageMeta } from '@donotdev/core';
248
249
  import { Home } from 'lucide-react';
249
250
 
@@ -260,18 +261,17 @@ export default function HomePage() {
260
261
 
261
262
  return (
262
263
  <PageContainer>
264
+ {/* Hero with background image — bleed for full-viewport-width */}
263
265
  <HeroSection
266
+ bleed
267
+ backgroundImage="/images/hero.jpg"
264
268
  title="Your App Name"
265
269
  subtitle="One-line value proposition"
266
- primaryAction={{
267
- label: "Get Started",
268
- onClick: () => navigate('/signup'),
269
- }}
270
- secondaryAction={{
271
- label: "Learn More",
272
- onClick: () => navigate('/about'),
273
- }}
274
- />
270
+ fullHeight
271
+ >
272
+ <Button onClick={() => navigate('/signup')}>Get Started</Button>
273
+ <Button variant="outline" onClick={() => navigate('/about')}>Learn More</Button>
274
+ </HeroSection>
275
275
 
276
276
  <Section title="Features">
277
277
  <Grid cols={[1, 2, 3, 3]} gap="large">
@@ -298,23 +298,24 @@ export default function HomePage() {
298
298
  </Grid>
299
299
  </Section>
300
300
 
301
- <Section>
302
- <Card variant="primary" align="center">
303
- <Text level="h2">Ready to get started?</Text>
304
- <Button size="large" onClick={() => navigate('/signup')}>
305
- Start Free Trial
306
- </Button>
307
- </Card>
308
- </Section>
301
+ {/* Full-width CTA with background image */}
302
+ <CallToAction
303
+ bleed
304
+ backgroundImage="/images/cta-bg.jpg"
305
+ title="Ready to get started?"
306
+ subtitle="Start your free trial today"
307
+ primaryAction={<Button onClick={() => navigate('/signup')}>Start Free Trial</Button>}
308
+ />
309
309
  </PageContainer>
310
310
  );
311
311
  }
312
312
  ```
313
313
 
314
314
  **Key patterns:**
315
- - `HeroSection` at top with CTAs
315
+ - `HeroSection bleed backgroundImage` at top for immersive hero banner
316
316
  - Feature grid with `Card` components
317
- - Final CTA section
317
+ - `CallToAction bleed backgroundImage` for full-width CTA with image
318
+ - `Section bleed` for any full-width content (galleries, maps, videos)
318
319
  - HARDCODE strings first, i18n later
319
320
 
320
321
  ---
@@ -366,7 +367,7 @@ export default function PricingPage() {
366
367
 
367
368
  return (
368
369
  <PageContainer>
369
- <Section title="Choose Your Plan" align="center">
370
+ <Section title="Choose Your Plan" textAlign="center">
370
371
  <PricingTable plans={plans} />
371
372
  </Section>
372
373
  </PageContainer>
@@ -518,8 +519,10 @@ export default function ProfilePage() {
518
519
 
519
520
  ```tsx
520
521
  import { useEffect, useState } from 'react';
521
- import { PageContainer, Loader, useNavigate } from '@donotdev/ui';
522
+ import { Spinner } from '@donotdev/components';
523
+ import { PageContainer, useNavigate } from '@donotdev/ui';
522
524
  import { Section, Card, Grid, Stack, Text, Button, Badge } from '@donotdev/components';
525
+ import { ImageGallery } from '@donotdev/components';
523
526
  import { useCrud } from '@donotdev/crud';
524
527
  import { productEntity } from 'entities/product';
525
528
  import type { PageMeta } from '@donotdev/core';
@@ -546,18 +549,20 @@ export default function ProductDetailPage() {
546
549
  }
547
550
  }, [id, get]);
548
551
 
549
- if (loading) return <PageContainer><Loader /></PageContainer>;
552
+ if (loading) return <PageContainer><Spinner overlay /></PageContainer>;
550
553
  if (!product) return <PageContainer><Text>Product not found</Text></PageContainer>;
551
554
 
552
555
  return (
553
556
  <PageContainer>
557
+ {/* Full-width image gallery — bleed breaks out of content constraints */}
558
+ {product.images?.length > 0 && (
559
+ <Section bleed>
560
+ <ImageGallery images={product.images} />
561
+ </Section>
562
+ )}
563
+
554
564
  <Section>
555
565
  <Grid cols={[1, 1, 2, 2]} gap="large">
556
- {/* Image */}
557
- <Card>
558
- <img src={product.image} alt={product.name} />
559
- </Card>
560
-
561
566
  {/* Details */}
562
567
  <Stack direction="column">
563
568
  <Text level="h1">{product.name}</Text>
@@ -583,7 +588,8 @@ export default function ProductDetailPage() {
583
588
 
584
589
  ```tsx
585
590
  import { useEffect, useState } from 'react';
586
- import { PageContainer, Loader } from '@donotdev/ui';
591
+ import { Spinner } from '@donotdev/components';
592
+ import { PageContainer } from '@donotdev/ui';
587
593
  import { Section, Card, Grid, Stack, Text } from '@donotdev/components';
588
594
  import type { PageMeta } from '@donotdev/core';
589
595
  import { TrendingUp } from 'lucide-react';
@@ -604,7 +610,7 @@ export default function AnalyticsPage() {
604
610
  fetchAnalytics().then(setData).finally(() => setLoading(false));
605
611
  }, []);
606
612
 
607
- if (loading) return <PageContainer><Loader /></PageContainer>;
613
+ if (loading) return <PageContainer><Spinner overlay /></PageContainer>;
608
614
 
609
615
  return (
610
616
  <PageContainer>
@@ -675,6 +681,36 @@ export const meta: PageMeta = {
675
681
 
676
682
  ---
677
683
 
684
+ ## Full-Width Bleed (Breakthrough)
685
+
686
+ **When content needs to span the full viewport width**, use the `bleed` prop on Section, HeroSection, or CallToAction. This breaks out of `PageContainer` content constraints — no manual CSS needed.
687
+
688
+ ```tsx
689
+ // Image gallery spanning full width (real estate, car listings, etc.)
690
+ <Section bleed>
691
+ <ImageGallery images={listing.images} />
692
+ </Section>
693
+
694
+ // Hero banner with background image
695
+ <HeroSection bleed backgroundImage="/hero.jpg" title="Welcome" fullHeight>
696
+ <Button>Get Started</Button>
697
+ </HeroSection>
698
+
699
+ // CTA with background image
700
+ <CallToAction bleed backgroundImage="/cta.jpg" title="Join Us" primaryAction={<Button>Sign Up</Button>} />
701
+
702
+ // Any content — map, video, testimonial wall
703
+ <Section bleed>
704
+ <MyMapComponent />
705
+ </Section>
706
+ ```
707
+
708
+ **How it works:** CSS `width: 100vw; margin-inline: calc(50% - 50vw)` — works at any nesting depth.
709
+
710
+ **`backgroundImage` prop** (HeroSection, CallToAction only): Adds a cover image with a dark gradient overlay (`::before` pseudo-element) so text remains readable. Text automatically turns white.
711
+
712
+ ---
713
+
678
714
  ## Usage
679
715
 
680
716
  1. **Find pattern** that matches your page type