@donotdev/cli 0.0.19 → 0.0.20

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 (45) hide show
  1. package/dependencies-matrix.json +135 -47
  2. package/dist/bin/commands/bump.js +5 -2
  3. package/dist/bin/commands/create-app.js +1 -1
  4. package/dist/bin/commands/create-project.js +13 -2
  5. package/dist/bin/commands/deploy.js +18 -0
  6. package/dist/bin/commands/setup.js +3 -0
  7. package/dist/bin/commands/staging.js +18 -0
  8. package/dist/bin/commands/type-check.js +10 -4
  9. package/dist/bin/dndev.js +120 -179
  10. package/dist/bin/donotdev.js +120 -179
  11. package/dist/index.js +31 -2
  12. package/package.json +1 -1
  13. package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
  14. package/templates/app-demo/public/favicon.svg.example +1 -0
  15. package/templates/app-demo/public/icon-192x192.png.example +0 -0
  16. package/templates/app-demo/public/icon-512x512.png.example +0 -0
  17. package/templates/app-demo/src/App.tsx.example +3 -1
  18. package/templates/app-demo/src/config/app.ts.example +1 -0
  19. package/templates/app-demo/src/entities/booking.ts.example +75 -0
  20. package/templates/app-demo/src/entities/onboarding.ts.example +160 -0
  21. package/templates/app-demo/src/entities/product.ts.example +12 -0
  22. package/templates/app-demo/src/entities/quote.ts.example +70 -0
  23. package/templates/app-demo/src/pages/ChangelogPage.tsx.example +28 -1
  24. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +88 -0
  25. package/templates/app-demo/src/pages/DashboardPage.tsx.example +2 -0
  26. package/templates/app-demo/src/pages/HomePage.tsx.example +355 -2
  27. package/templates/app-demo/src/pages/OnboardingPage.tsx.example +47 -0
  28. package/templates/app-demo/src/pages/PricingPage.tsx.example +28 -1
  29. package/templates/app-demo/src/pages/ProductsPage.tsx.example +2 -0
  30. package/templates/app-demo/src/pages/ProfilePage.tsx.example +2 -0
  31. package/templates/app-demo/src/pages/SettingsPage.tsx.example +2 -0
  32. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +22 -16
  33. package/templates/app-demo/src/pages/ShowcasePage.tsx.example +3 -1
  34. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +147 -51
  35. package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +103 -21
  36. package/templates/app-demo/src/pages/components/componentConfig.ts.example +139 -59
  37. package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +12 -1
  38. package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +10 -1
  39. package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +10 -1
  40. package/templates/app-demo/src/themes.css.example +289 -77
  41. package/templates/app-demo/stats.html.example +4949 -0
  42. package/templates/app-next/src/locales/home_en.json.example +6 -6
  43. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  44. package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
  45. package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
@@ -83,7 +83,9 @@ import type { CSSFamily, PropType } from './ComponentsData';
83
83
  * Extract variant values from VARIANT constant object
84
84
  * Converts { DEFAULT: 'default', PRIMARY: 'primary' } to ['default', 'primary']
85
85
  */
86
- function getVariantValues<T extends Record<string, string>>(variantObj: T): string[] {
86
+ function getVariantValues<T extends Record<string, string>>(
87
+ variantObj: T
88
+ ): string[] {
87
89
  return Object.values(variantObj);
88
90
  }
89
91
 
@@ -103,7 +105,15 @@ export interface ComponentConfig {
103
105
  mode?: string[];
104
106
  };
105
107
  propTypes?: PropType[];
106
- stateType?: 'controlled-value' | 'controlled-checked' | 'controlled-pressed' | 'controlled-range' | 'controlled-date' | 'controlled-dates' | 'controlled-date-range' | 'custom';
108
+ stateType?:
109
+ | 'controlled-value'
110
+ | 'controlled-checked'
111
+ | 'controlled-pressed'
112
+ | 'controlled-range'
113
+ | 'controlled-date'
114
+ | 'controlled-dates'
115
+ | 'controlled-date-range'
116
+ | 'custom';
107
117
  defaultStateValue?: any;
108
118
  renderMode?: 'default' | 'overlay' | 'modal' | 'tabs-generator';
109
119
  supportsCommonProps: {
@@ -124,12 +134,15 @@ export interface ComponentConfig {
124
134
  demoContent?: (value: any, setValue: (val: any) => void) => ReactNode;
125
135
  }
126
136
 
127
- export function getCSSFamilies(): Array<{ id: CSSFamily | 'all'; label: string }> {
137
+ export function getCSSFamilies(): Array<{
138
+ id: CSSFamily | 'all';
139
+ label: string;
140
+ }> {
128
141
  const families = new Set<CSSFamily>();
129
142
  COMPONENT_CONFIGS.forEach((config) => {
130
143
  families.add(config.cssFamily);
131
144
  });
132
-
145
+
133
146
  const labels: Record<CSSFamily, string> = {
134
147
  surface: 'Card-based',
135
148
  floating: 'Floating',
@@ -138,9 +151,16 @@ export function getCSSFamilies(): Array<{ id: CSSFamily | 'all'; label: string }
138
151
  input: 'Input',
139
152
  other: 'Others',
140
153
  };
141
-
142
- const order: CSSFamily[] = ['layout', 'surface', 'floating', 'interactive', 'input', 'other'];
143
-
154
+
155
+ const order: CSSFamily[] = [
156
+ 'layout',
157
+ 'surface',
158
+ 'floating',
159
+ 'interactive',
160
+ 'input',
161
+ 'other',
162
+ ];
163
+
144
164
  return [
145
165
  { id: 'all', label: 'All' },
146
166
  ...order
@@ -296,23 +316,27 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
296
316
  customProps: {
297
317
  type: 'single',
298
318
  },
299
- demoContent: (alignment: string) => createElement(
300
- Card,
301
- {
302
- title: 'Text Alignment Demo',
303
- variant: 'muted',
304
- style: { width: '100%', maxWidth: '600px' },
305
- },
319
+ demoContent: (alignment: string) =>
306
320
  createElement(
307
- Text,
321
+ Card,
308
322
  {
323
+ title: 'Text Alignment Demo',
324
+ variant: 'muted',
325
+ style: { width: '100%', maxWidth: '600px' },
326
+ },
327
+ createElement(Text, {
309
328
  style: {
310
- textAlign: alignment === 'left' ? 'left' : alignment === 'center' ? 'center' : 'right',
329
+ textAlign:
330
+ alignment === 'left'
331
+ ? 'left'
332
+ : alignment === 'center'
333
+ ? 'center'
334
+ : 'right',
311
335
  },
312
- children: 'This text aligns based on your selection. ToggleGroup is a segmented control for selecting one option from a set (like text alignment, view mode, or filter).',
313
- }
314
- )
315
- ),
336
+ children:
337
+ 'This text aligns based on your selection. ToggleGroup is a segmented control for selecting one option from a set (like text alignment, view mode, or filter).',
338
+ })
339
+ ),
316
340
  },
317
341
  {
318
342
  id: 'avatar',
@@ -353,7 +377,8 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
353
377
  },
354
378
  customProps: {
355
379
  title: 'Card Title',
356
- content: 'This is a card with customizable variants. Each variant uses different brand colors.',
380
+ content:
381
+ 'This is a card with customizable variants. Each variant uses different brand colors.',
357
382
  },
358
383
  },
359
384
  {
@@ -362,22 +387,22 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
362
387
  component: DataTable,
363
388
  cssFamily: 'other',
364
389
  variants: {},
365
- supportsCommonProps: {},
366
- customProps: {
367
- data: [
368
- { id: 1, name: 'Alpha', status: 'Active' },
369
- { id: 2, name: 'Beta', status: 'Pending' },
370
- { id: 3, name: 'Gamma', status: 'Disabled' },
371
- ],
372
- columns: [
373
- { key: 'id', title: 'ID', dataIndex: 'id' },
374
- { key: 'name', title: 'Name', dataIndex: 'name' },
375
- { key: 'status', title: 'Status', dataIndex: 'status' },
376
- ],
377
- searchable: true,
378
- filterable: true,
379
- pagination: false,
380
- },
390
+ supportsCommonProps: {},
391
+ customProps: {
392
+ data: [
393
+ { id: 1, name: 'Alpha', status: 'Active' },
394
+ { id: 2, name: 'Beta', status: 'Pending' },
395
+ { id: 3, name: 'Gamma', status: 'Disabled' },
396
+ ],
397
+ columns: [
398
+ { key: 'id', title: 'ID', dataIndex: 'id' },
399
+ { key: 'name', title: 'Name', dataIndex: 'name' },
400
+ { key: 'status', title: 'Status', dataIndex: 'status' },
401
+ ],
402
+ searchable: true,
403
+ filterable: true,
404
+ pagination: false,
405
+ },
381
406
  },
382
407
  {
383
408
  id: 'separator',
@@ -443,7 +468,16 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
443
468
  component: Spinner,
444
469
  cssFamily: 'other',
445
470
  variants: {
446
- variant: ['default', 'muted', 'primary', 'secondary', 'accent', 'success', 'warning', 'destructive'],
471
+ variant: [
472
+ 'default',
473
+ 'muted',
474
+ 'primary',
475
+ 'secondary',
476
+ 'accent',
477
+ 'success',
478
+ 'warning',
479
+ 'destructive',
480
+ ],
447
481
  },
448
482
  renderMode: 'overlay',
449
483
  stateType: 'custom',
@@ -486,7 +520,16 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
486
520
  component: RadioGroup,
487
521
  cssFamily: 'interactive',
488
522
  variants: {
489
- variant: ['default', 'primary', 'secondary', 'muted', 'accent', 'success', 'warning', 'destructive'],
523
+ variant: [
524
+ 'default',
525
+ 'primary',
526
+ 'secondary',
527
+ 'muted',
528
+ 'accent',
529
+ 'success',
530
+ 'warning',
531
+ 'destructive',
532
+ ],
490
533
  },
491
534
  propTypes: ['radioGroupItems'],
492
535
  stateType: 'controlled-value',
@@ -499,7 +542,16 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
499
542
  component: Checkbox,
500
543
  cssFamily: 'input',
501
544
  variants: {
502
- variant: ['default', 'primary', 'secondary', 'muted', 'accent', 'success', 'warning', 'destructive'],
545
+ variant: [
546
+ 'default',
547
+ 'primary',
548
+ 'secondary',
549
+ 'muted',
550
+ 'accent',
551
+ 'success',
552
+ 'warning',
553
+ 'destructive',
554
+ ],
503
555
  },
504
556
  stateType: 'controlled-checked',
505
557
  defaultStateValue: false,
@@ -514,7 +566,16 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
514
566
  component: Switch,
515
567
  cssFamily: 'input',
516
568
  variants: {
517
- variant: ['default', 'primary', 'secondary', 'muted', 'accent', 'success', 'warning', 'destructive'],
569
+ variant: [
570
+ 'default',
571
+ 'primary',
572
+ 'secondary',
573
+ 'muted',
574
+ 'accent',
575
+ 'success',
576
+ 'warning',
577
+ 'destructive',
578
+ ],
518
579
  },
519
580
  stateType: 'controlled-checked',
520
581
  defaultStateValue: true,
@@ -527,7 +588,16 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
527
588
  component: Slider,
528
589
  cssFamily: 'input',
529
590
  variants: {
530
- variant: ['default', 'primary', 'secondary', 'muted', 'accent', 'success', 'warning', 'destructive'],
591
+ variant: [
592
+ 'default',
593
+ 'primary',
594
+ 'secondary',
595
+ 'muted',
596
+ 'accent',
597
+ 'success',
598
+ 'warning',
599
+ 'destructive',
600
+ ],
531
601
  },
532
602
  stateType: 'controlled-range',
533
603
  defaultStateValue: [2],
@@ -644,7 +714,11 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
644
714
  { label: 'Regular Item', onClick: () => {} },
645
715
  { label: 'Separator below', onClick: () => {} },
646
716
  { type: 'separator' },
647
- { label: 'Destructive Item', variant: 'destructive', onClick: () => {} },
717
+ {
718
+ label: 'Destructive Item',
719
+ variant: 'destructive',
720
+ onClick: () => {},
721
+ },
648
722
  ],
649
723
  },
650
724
  },
@@ -757,7 +831,8 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
757
831
  supportsCommonProps: {
758
832
  title: true,
759
833
  },
760
- layoutDescription: 'Full-width container with padding, background, and optional separator. Use for page sections.',
834
+ layoutDescription:
835
+ 'Full-width container with padding, background, and optional separator. Use for page sections.',
761
836
  },
762
837
  {
763
838
  id: 'accordion',
@@ -803,20 +878,24 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
803
878
  component: NavigationMenu,
804
879
  cssFamily: 'interactive',
805
880
  variants: {},
806
- supportsCommonProps: {},
807
- customProps: {
808
- items: [
809
- { label: 'Home', path: '/home' },
810
- {
811
- label: 'Products',
812
- children: [
813
- { label: 'Framework', description: 'Core UI kit', path: '/products/framework' },
814
- { label: 'CLI', description: 'Dev tooling', path: '/products/cli' },
815
- ],
816
- },
817
- { label: 'Docs', path: '/docs' },
818
- ],
819
- },
881
+ supportsCommonProps: {},
882
+ customProps: {
883
+ items: [
884
+ { label: 'Home', path: '/home' },
885
+ {
886
+ label: 'Products',
887
+ children: [
888
+ {
889
+ label: 'Framework',
890
+ description: 'Core UI kit',
891
+ path: '/products/framework',
892
+ },
893
+ { label: 'CLI', description: 'Dev tooling', path: '/products/cli' },
894
+ ],
895
+ },
896
+ { label: 'Docs', path: '/docs' },
897
+ ],
898
+ },
820
899
  },
821
900
  {
822
901
  id: 'pagination',
@@ -877,7 +956,8 @@ export const COMPONENT_CONFIGS: ComponentConfig[] = [
877
956
  cssFamily: 'layout',
878
957
  variants: {},
879
958
  supportsCommonProps: {},
880
- layoutDescription: 'CSS Grid layout primitive for 2D layouts. Use for multi-column layouts or named areas.',
959
+ layoutDescription:
960
+ 'CSS Grid layout primitive for 2D layouts. Use for multi-column layouts or named areas.',
881
961
  },
882
962
  {
883
963
  id: 'list',
@@ -1,3 +1,5 @@
1
+ // apps/demo/src/pages/legal/LegalPage.tsx
2
+
1
3
  import { Scale } from 'lucide-react';
2
4
 
3
5
  import { LegalNoticeTemplate } from '@donotdev/templates';
@@ -10,5 +12,14 @@ export const meta: PageMeta = {
10
12
  };
11
13
 
12
14
  export default function LegalPage() {
13
- return <LegalNoticeTemplate />;
15
+ return (
16
+ <LegalNoticeTemplate
17
+ publisherName="Demo Company"
18
+ publisherType="company"
19
+ registeredOffice="123 Demo Street, Paris, France"
20
+ email="legal@demo.example.com"
21
+ directorName="John Doe"
22
+ hostingProvider="Vercel Inc."
23
+ />
24
+ );
14
25
  }
@@ -1,3 +1,5 @@
1
+ // apps/demo/src/pages/legal/PrivacyPage.tsx
2
+
1
3
  import { Shield } from 'lucide-react';
2
4
 
3
5
  import { PrivacyPolicyTemplate } from '@donotdev/templates';
@@ -10,5 +12,12 @@ export const meta: PageMeta = {
10
12
  };
11
13
 
12
14
  export default function PrivacyPage() {
13
- return <PrivacyPolicyTemplate />;
15
+ return (
16
+ <PrivacyPolicyTemplate
17
+ companyName="Demo Company"
18
+ websiteUrl="https://demo.example.com"
19
+ privacyEmail="privacy@demo.example.com"
20
+ companyAddress="123 Demo Street, Paris, France"
21
+ />
22
+ );
14
23
  }
@@ -1,3 +1,5 @@
1
+ // apps/demo/src/pages/legal/TermsPage.tsx
2
+
1
3
  import { FileText } from 'lucide-react';
2
4
 
3
5
  import { TermsOfServiceTemplate } from '@donotdev/templates';
@@ -10,5 +12,12 @@ export const meta: PageMeta = {
10
12
  };
11
13
 
12
14
  export default function TermsPage() {
13
- return <TermsOfServiceTemplate />;
15
+ return (
16
+ <TermsOfServiceTemplate
17
+ companyName="Demo Company"
18
+ websiteUrl="https://demo.example.com"
19
+ legalEmail="legal@demo.example.com"
20
+ companyAddress="123 Demo Street, Paris, France"
21
+ />
22
+ );
14
23
  }