@dinachi/cli 0.5.0 → 0.6.0

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 (54) hide show
  1. package/README.md +13 -5
  2. package/dist/index.js +1086 -349
  3. package/package.json +17 -9
  4. package/templates/accordion/accordion.tsx +8 -3
  5. package/templates/alert-dialog/alert-dialog.tsx +24 -25
  6. package/templates/alert-dialog/index.ts +1 -1
  7. package/templates/autocomplete/autocomplete.tsx +0 -1
  8. package/templates/avatar/avatar.tsx +1 -3
  9. package/templates/badge/badge.tsx +167 -0
  10. package/templates/badge/index.ts +2 -0
  11. package/templates/button/button.tsx +6 -6
  12. package/templates/button/index.ts +2 -2
  13. package/templates/card/card.tsx +78 -0
  14. package/templates/card/index.ts +1 -0
  15. package/templates/checkbox/checkbox.tsx +2 -3
  16. package/templates/checkbox-group/checkbox-group.tsx +1 -3
  17. package/templates/collapsible/collapsible.tsx +1 -2
  18. package/templates/combobox/combobox.tsx +0 -1
  19. package/templates/context-menu/context-menu.tsx +0 -1
  20. package/templates/dialog/dialog.tsx +1 -1
  21. package/templates/drawer/drawer.tsx +0 -1
  22. package/templates/field/field.tsx +69 -85
  23. package/templates/fieldset/fieldset.tsx +0 -1
  24. package/templates/form/form.tsx +36 -28
  25. package/templates/input/index.ts +1 -2
  26. package/templates/input/input.tsx +0 -1
  27. package/templates/menu/menu.tsx +0 -1
  28. package/templates/menubar/menubar.tsx +21 -22
  29. package/templates/meter/meter.tsx +0 -1
  30. package/templates/navigation-menu/index.ts +1 -13
  31. package/templates/navigation-menu/navigation-menu.tsx +1 -3
  32. package/templates/number-field/number-field.tsx +0 -1
  33. package/templates/popover/popover.tsx +0 -1
  34. package/templates/preview-card/preview-card.tsx +0 -1
  35. package/templates/progress/progress.tsx +0 -1
  36. package/templates/radio/radio.tsx +0 -1
  37. package/templates/scroll-area/scroll-area.tsx +0 -1
  38. package/templates/select/select.tsx +1 -4
  39. package/templates/separator/separator.tsx +0 -1
  40. package/templates/slider/index.ts +10 -0
  41. package/templates/slider/slider.tsx +1 -3
  42. package/templates/switch/switch.tsx +0 -1
  43. package/templates/tabs/index.ts +8 -0
  44. package/templates/tabs/tabs.tsx +8 -3
  45. package/templates/textarea/index.ts +2 -0
  46. package/templates/textarea/textarea.tsx +23 -0
  47. package/templates/toast/toast.tsx +3 -2
  48. package/templates/toggle/toggle.tsx +0 -1
  49. package/templates/toggle-group/toggle-group.tsx +0 -1
  50. package/templates/toolbar/toolbar.tsx +0 -1
  51. package/templates/tooltip/tooltip.tsx +0 -1
  52. package/templates/tsconfig.json +20 -0
  53. package/templates/utils/utils.ts +0 -1
  54. package/templates/utils/variants.ts +0 -1
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A CLI for adding Dinachi UI components to your project. Just like shadcn/ui, this tool copies component source code directly into your project, giving you full ownership and control.
4
4
 
5
+ Best fit: React projects using Tailwind CSS (Next.js, Vite, Remix, CRA, and similar layouts).
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
@@ -48,7 +50,7 @@ This will:
48
50
  - Set up the project configuration
49
51
  - Install required dependencies
50
52
  - Create utility functions
51
- - Generate a `components.json` config file
53
+ - Generate a `components.json` config file with normalized project paths
52
54
 
53
55
  ### Add components
54
56
 
@@ -61,13 +63,16 @@ npx @dinachi/cli add button
61
63
  This will:
62
64
  - Copy the button component source code to your project
63
65
  - Place it in your configured components directory
64
- - Show you which dependencies are required
66
+ - Install any missing dependencies (or print them when using `--skip-install`)
65
67
 
66
68
  ### Available Commands
67
69
 
68
70
  - `dinachi init` - Initialize Dinachi UI in your project
71
+ - `dinachi init --skip-install` - Initialize without package installation
69
72
  - `dinachi add <component>` - Add a component to your project
70
73
  - `dinachi add <component> --overwrite` - Overwrite existing component files
74
+ - `dinachi add --all` - Install all registered components
75
+ - `dinachi add <component> --skip-install` - Add files without installing packages
71
76
 
72
77
  ### Available Components
73
78
 
@@ -113,7 +118,7 @@ This will:
113
118
  Unlike traditional component libraries, Dinachi UI copies the actual source code into your project. This means:
114
119
 
115
120
  ✅ **Full ownership** - The code is yours to modify
116
- ✅ **No runtime dependencies** - Only peer dependencies for utilities
121
+ ✅ **Dependencies stay in your app** - Required packages are installed directly into your project
117
122
  ✅ **Complete customization** - Change variants, styles, and behavior as needed
118
123
  ✅ **Zero abstractions** - See exactly how components work
119
124
 
@@ -133,8 +138,11 @@ After running `dinachi init`, you'll have a `components.json` file:
133
138
  "cssVariables": true
134
139
  },
135
140
  "aliases": {
136
- "components": "./src/components/ui",
137
- "utils": "./src/lib/utils"
141
+ "components": "./src/components",
142
+ "utils": "./src/lib/utils",
143
+ "ui": "./src/components/ui",
144
+ "lib": "./src/lib",
145
+ "hooks": "./src/hooks"
138
146
  }
139
147
  }
140
148
  ```