@srcroot/ui 0.0.24 → 0.0.25

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 (2) hide show
  1. package/dist/index.js +12 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1031,10 +1031,19 @@ async function add(components, options) {
1031
1031
  const comp = REGISTRY[name];
1032
1032
  const targetPath = path2.join(componentsDir, comp.file);
1033
1033
  if (fs2.existsSync(targetPath) && !options.overwrite) {
1034
- if (componentsToAdd.length <= 10) {
1035
- spinner.info(`${chalk2.cyan(comp.file)} already exists, skipping`);
1034
+ spinner.stop();
1035
+ const { overwrite } = await prompts2({
1036
+ type: "confirm",
1037
+ name: "overwrite",
1038
+ message: `${chalk2.cyan(comp.file)} already exists. Overwrite?`,
1039
+ initial: false
1040
+ });
1041
+ if (!overwrite) {
1042
+ spinner.info(`Skipped ${chalk2.cyan(comp.file)}`);
1043
+ spinner.start("Adding components...");
1044
+ continue;
1036
1045
  }
1037
- continue;
1046
+ spinner.start("Adding components...");
1038
1047
  }
1039
1048
  const registryPath = path2.resolve(__dirname3, "..", "registry", comp.file);
1040
1049
  if (!fs2.existsSync(registryPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srcroot/ui",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "A shadcn-style CLI UI library with polymorphic, accessible React components",
5
5
  "type": "module",
6
6
  "bin": {