ui-thing 0.1.55 → 0.2.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 (39) hide show
  1. package/.husky/pre-commit +1 -0
  2. package/CHANGELOG.md +80 -0
  3. package/README.md +4 -3
  4. package/dist/index.js +1273 -15547
  5. package/dist/index.js.map +1 -1
  6. package/package.json +33 -21
  7. package/src/commands/add.ts +218 -274
  8. package/src/commands/init.ts +107 -58
  9. package/src/commands/prettier.ts +6 -8
  10. package/src/commands/shortcuts.ts +13 -13
  11. package/src/commands/theme.ts +9 -6
  12. package/src/index.ts +2 -2
  13. package/src/templates/css.ts +958 -773
  14. package/src/templates/prettier.ts +14 -16
  15. package/src/templates/shortcuts.ts +225 -126
  16. package/src/templates/tw-helper.ts +8 -0
  17. package/src/templates/vs-code.ts +24 -0
  18. package/src/types.ts +74 -3
  19. package/src/utils/addPrettierConfig.ts +49 -6
  20. package/src/utils/addShortcutFiles.ts +5 -4
  21. package/src/utils/addTailwindVitePlugin.ts +35 -0
  22. package/src/utils/addVSCodeFiles.ts +13 -0
  23. package/src/utils/compareUIConfig.ts +1 -2
  24. package/src/utils/config.ts +59 -86
  25. package/src/utils/constants.ts +67 -13
  26. package/src/utils/detectNuxtVersion.ts +20 -0
  27. package/src/utils/fetchComponents.ts +14 -1
  28. package/src/utils/installPackages.ts +3 -27
  29. package/src/utils/mergeJsonFile.ts +28 -0
  30. package/src/utils/printFancyBoxMessage.ts +62 -16
  31. package/src/utils/promptForComponents.ts +8 -6
  32. package/src/utils/uiConfigPrompt.ts +12 -37
  33. package/tsconfig.json +2 -1
  34. package/dist/chunk-FW4363Y4.js +0 -2
  35. package/dist/chunk-FW4363Y4.js.map +0 -1
  36. package/dist/prompt-4NXDAQWE.js +0 -46
  37. package/dist/prompt-4NXDAQWE.js.map +0 -1
  38. package/src/comps.ts +0 -3181
  39. package/src/templates/tailwind.ts +0 -142
@@ -0,0 +1 @@
1
+ npx lint-staged
package/CHANGELOG.md CHANGED
@@ -1,5 +1,85 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.0
4
+
5
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.56...v0.2.0)
6
+
7
+ ### 🚀 Enhancements
8
+
9
+ - **tw-helper:** Add helper function for Tailwind CSS class suggestions ([229f84e](https://github.com/BayBreezy/ui-thing-cli/commit/229f84e))
10
+ - **vscode:** Add VS Code recommendations and settings configuration ([6ca724c](https://github.com/BayBreezy/ui-thing-cli/commit/6ca724c))
11
+ - **tailwind:** Add function to integrate Tailwind CSS Vite plugin into Nuxt config ([ca20e72](https://github.com/BayBreezy/ui-thing-cli/commit/ca20e72))
12
+ - **mergeJsonFile:** Add function to merge JSON data into a file without overwriting existing keys ([891a79a](https://github.com/BayBreezy/ui-thing-cli/commit/891a79a))
13
+ - **init:** Add CSS path to configuration for Tailwind CSS integration ([750bf7f](https://github.com/BayBreezy/ui-thing-cli/commit/750bf7f))
14
+
15
+ ### 🩹 Fixes
16
+
17
+ - **detectNuxtVersion:** Return default version 4 instead of null on error ([023e5fa](https://github.com/BayBreezy/ui-thing-cli/commit/023e5fa))
18
+ - **init:** Add type property to imports for tailwind-variants ([f014cd9](https://github.com/BayBreezy/ui-thing-cli/commit/f014cd9))
19
+
20
+ ### 💅 Refactors
21
+
22
+ - Update structure of `printFancyBoxMessage` allowing the file to be more testable & flexible ([5853619](https://github.com/BayBreezy/ui-thing-cli/commit/5853619))
23
+ - **init:** Update the init command ([45ff68d](https://github.com/BayBreezy/ui-thing-cli/commit/45ff68d))
24
+ - **prettier:** Enhance config merging logic and user prompts for existing .prettierrc ([05b360c](https://github.com/BayBreezy/ui-thing-cli/commit/05b360c))
25
+ - **installPackages:** Remove package.json check and streamline postinstall execution ([d3a3167](https://github.com/BayBreezy/ui-thing-cli/commit/d3a3167))
26
+ - **uiConfigPrompt:** Remove Nuxt version prompt and streamline configuration logic ([d1d37eb](https://github.com/BayBreezy/ui-thing-cli/commit/d1d37eb))
27
+ - **addCommand:** Refactor add command to improve component handling and configuration updates ([838a59f](https://github.com/BayBreezy/ui-thing-cli/commit/838a59f))
28
+ - **shortcuts:** Simplify shortcuts command and update descriptions ([f3b9487](https://github.com/BayBreezy/ui-thing-cli/commit/f3b9487))
29
+ - **theme:** Replace consola with kleur for improved error messaging ([d35f04b](https://github.com/BayBreezy/ui-thing-cli/commit/d35f04b))
30
+ - **prettier:** Convert PRETTIER_CONFIG from string to object for improved readability ([cd393bb](https://github.com/BayBreezy/ui-thing-cli/commit/cd393bb))
31
+ - **shortcuts:** Enhance shortcut handling with improved key mapping and event management ([c74938a](https://github.com/BayBreezy/ui-thing-cli/commit/c74938a))
32
+ - **css:** Update css themes to match theming in Tailwind v4 ([77cd9c3](https://github.com/BayBreezy/ui-thing-cli/commit/77cd9c3))
33
+ - **shortcuts:** Remove unused useShortcuts composable and update file writing logic ([04b13e6](https://github.com/BayBreezy/ui-thing-cli/commit/04b13e6))
34
+ - **compareUIConfig:** Remove `tailwindConfigLocation` and adjust missing properties check ([e697309](https://github.com/BayBreezy/ui-thing-cli/commit/e697309))
35
+ - **config:** Update import paths and streamline UI config handling ([34c5291](https://github.com/BayBreezy/ui-thing-cli/commit/34c5291))
36
+ - **constants:** Update UI configuration and dependencies for Nuxt 3 and 4 ([e140d92](https://github.com/BayBreezy/ui-thing-cli/commit/e140d92))
37
+ - **fetchComponents:** Enhance component fetching with spinner and environment variable support ([658656d](https://github.com/BayBreezy/ui-thing-cli/commit/658656d))
38
+ - **promptForComponents:** Fetch components dynamically for user selection ([69b36ad](https://github.com/BayBreezy/ui-thing-cli/commit/69b36ad))
39
+ - **runAddCommand:** Pass allComponents to promptUserForComponents for improved user selection ([6b10c36](https://github.com/BayBreezy/ui-thing-cli/commit/6b10c36))
40
+ - **tailwind:** Remove deprecated Tailwind CSS configuration file ([fed7a46](https://github.com/BayBreezy/ui-thing-cli/commit/fed7a46))
41
+ - **fetchComponents:** Reorder dotenv import for consistency ([20577b7](https://github.com/BayBreezy/ui-thing-cli/commit/20577b7))
42
+ - **promptUserForComponents:** Allow passing allComponents as an argument for flexibility ([051d4e6](https://github.com/BayBreezy/ui-thing-cli/commit/051d4e6))
43
+ - **types:** Enhance UIConfig and InitOptions types with detailed comments and structure ([fa83270](https://github.com/BayBreezy/ui-thing-cli/commit/fa83270))
44
+ - **config:** Remove unused getNuxtConfig function and make createConfigPaths private ([d2c0bbc](https://github.com/BayBreezy/ui-thing-cli/commit/d2c0bbc))
45
+ - Change exported functions to local scope for better encapsulation ([3437c0e](https://github.com/BayBreezy/ui-thing-cli/commit/3437c0e))
46
+ - **prompt:** Simplify onRender message in component selection prompt ([0119278](https://github.com/BayBreezy/ui-thing-cli/commit/0119278))
47
+ - **prompt:** Remove unnecessary onRender function from component selection prompt ([d4de748](https://github.com/BayBreezy/ui-thing-cli/commit/d4de748))
48
+
49
+ ### 📖 Documentation
50
+
51
+ - **prettier:** Update description to clarify purpose of the command ([d4aa3cf](https://github.com/BayBreezy/ui-thing-cli/commit/d4aa3cf))
52
+ - Update cover image URL and refine project description in README ([41a545d](https://github.com/BayBreezy/ui-thing-cli/commit/41a545d))
53
+
54
+ ### 🏡 Chore
55
+
56
+ - Bump deps ([fbec408](https://github.com/BayBreezy/ui-thing-cli/commit/fbec408))
57
+ - Add lint-staged ([d804d18](https://github.com/BayBreezy/ui-thing-cli/commit/d804d18))
58
+ - Update dependencies and modify TypeScript configuration ([8145761](https://github.com/BayBreezy/ui-thing-cli/commit/8145761))
59
+ - Update dependencies and scripts in package.json ([2045df5](https://github.com/BayBreezy/ui-thing-cli/commit/2045df5))
60
+ - Remove unused comp file ([8864f56](https://github.com/BayBreezy/ui-thing-cli/commit/8864f56))
61
+ - Update description and upgrade prettier-plugin-sort-imports to version 4.6.2 ([5939aa9](https://github.com/BayBreezy/ui-thing-cli/commit/5939aa9))
62
+
63
+ ### ❤️ Contributors
64
+
65
+ - Behon Baker ([@BayBreezy](https://github.com/BayBreezy))
66
+
67
+ ## v0.1.56
68
+
69
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.55...v0.1.56)
70
+
71
+ ### 🚀 Enhancements
72
+
73
+ - Add timeline component ([ee8c46a](https://github.com/BayBreezy/ui-thing-cli/commit/ee8c46a))
74
+
75
+ ### 🏡 Chore
76
+
77
+ - Bump deps ([7a6c05d](https://github.com/BayBreezy/ui-thing-cli/commit/7a6c05d))
78
+
79
+ ### ❤️ Contributors
80
+
81
+ - Behon Baker ([@BayBreezy](https://github.com/BayBreezy))
82
+
3
83
  ## v0.1.55
4
84
 
5
85
  [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.1.54...v0.1.55)
package/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # UI Thing CLI
2
2
 
3
- ![Cover Image](https://ui-thing.behonbaker.com/cover.png)
3
+ ![Cover Image](https://uithing.com/cover.png)
4
4
 
5
5
  ## Credits
6
6
 
7
7
  - shadcn/ui
8
8
  - Radiv-Vue
9
+ - Reka UI
9
10
  - TailwindCSS
10
11
  - Nuxt
11
12
  - Nuxt UI
@@ -20,7 +21,7 @@ If you can 😊
20
21
 
21
22
  ## Getting Started
22
23
 
23
- - Create a Nuxt 3 project
24
+ - Create a Nuxt project
24
25
  - Install the dependencies
25
26
  - Run the init command
26
27
 
@@ -80,4 +81,4 @@ This command will add the prettier configuration to your project.
80
81
  npx ui-thing@latest shortcuts
81
82
  ```
82
83
 
83
- This command will add the `defineShortcuts` & `useShortcuts` composables to your project.
84
+ This command will add the `shortcuts` composable to your project.