@onpe/ui 1.0.33 → 1.0.35
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.
- package/dist/cli.esm.js +6 -6
- package/dist/cli.js +6 -6
- package/package.json +1 -1
package/dist/cli.esm.js
CHANGED
|
@@ -5869,7 +5869,7 @@ function addComponent(componentName) {
|
|
|
5869
5869
|
return __generator(this, function (_a) {
|
|
5870
5870
|
switch (_a.label) {
|
|
5871
5871
|
case 0:
|
|
5872
|
-
isIcon = componentName.toLowerCase().startsWith(
|
|
5872
|
+
isIcon = componentName.toLowerCase().startsWith("icon-");
|
|
5873
5873
|
componentPath = require$$1.join(process.cwd(), "src", "components", isIcon ? "onpe-icons" : "onpe-ui");
|
|
5874
5874
|
// Crear directorio si no existe
|
|
5875
5875
|
return [4 /*yield*/, lib.ensureDir(componentPath)];
|
|
@@ -5902,7 +5902,7 @@ function addComponent(componentName) {
|
|
|
5902
5902
|
componentFile = isIcon ? availableIcons[componentName.toLowerCase()] : availableComponents[componentName.toLowerCase()];
|
|
5903
5903
|
if (!componentFile) {
|
|
5904
5904
|
availableItems = isIcon ? Object.keys(availableIcons) : Object.keys(availableComponents);
|
|
5905
|
-
throw new Error("".concat(isIcon ?
|
|
5905
|
+
throw new Error("".concat(isIcon ? "Icono" : "Componente", " '").concat(componentName, "' no encontrado. ").concat(isIcon ? "Iconos" : "Componentes", " disponibles: ").concat(availableItems.join(", ")));
|
|
5906
5906
|
}
|
|
5907
5907
|
_a.label = 2;
|
|
5908
5908
|
case 2:
|
|
@@ -5923,18 +5923,18 @@ function addComponent(componentName) {
|
|
|
5923
5923
|
return [4 /*yield*/, lib.writeFile(filePath, personalizedCode)];
|
|
5924
5924
|
case 5:
|
|
5925
5925
|
_a.sent();
|
|
5926
|
-
console.log("\uD83D\uDCC1 ".concat(isIcon ?
|
|
5926
|
+
console.log("\uD83D\uDCC1 ".concat(isIcon ? "Icono" : "Componente", " guardado en: ").concat(filePath));
|
|
5927
5927
|
// Mostrar instrucciones
|
|
5928
5928
|
console.log("\n📋 Próximos pasos:");
|
|
5929
|
-
console.log("1. Importa el ".concat(isIcon ?
|
|
5929
|
+
console.log("1. Importa el ".concat(isIcon ? "icono" : "componente", ":"));
|
|
5930
5930
|
importPath = isIcon ? "./components/onpe-icons/".concat(fileName.replace(".tsx", "")) : "./components/onpe-ui/".concat(fileName.replace(".tsx", ""));
|
|
5931
5931
|
console.log(" import { ".concat(componentName.charAt(0).toUpperCase() + componentName.slice(1), " } from '").concat(importPath, "'"));
|
|
5932
|
-
console.log("2. Usa el ".concat(isIcon ?
|
|
5932
|
+
console.log("2. Usa el ".concat(isIcon ? "icono" : "componente", ":"));
|
|
5933
5933
|
console.log(" <".concat(componentName.charAt(0).toUpperCase() + componentName.slice(1), " />"));
|
|
5934
5934
|
return [3 /*break*/, 7];
|
|
5935
5935
|
case 6:
|
|
5936
5936
|
error_1 = _a.sent();
|
|
5937
|
-
throw new Error("Error al instalar el ".concat(isIcon ?
|
|
5937
|
+
throw new Error("Error al instalar el ".concat(isIcon ? "icono" : "componente", ": ").concat(error_1.message));
|
|
5938
5938
|
case 7: return [2 /*return*/];
|
|
5939
5939
|
}
|
|
5940
5940
|
});
|
package/dist/cli.js
CHANGED
|
@@ -5869,7 +5869,7 @@ function addComponent(componentName) {
|
|
|
5869
5869
|
return __generator(this, function (_a) {
|
|
5870
5870
|
switch (_a.label) {
|
|
5871
5871
|
case 0:
|
|
5872
|
-
isIcon = componentName.toLowerCase().startsWith(
|
|
5872
|
+
isIcon = componentName.toLowerCase().startsWith("icon-");
|
|
5873
5873
|
componentPath = require$$1.join(process.cwd(), "src", "components", isIcon ? "onpe-icons" : "onpe-ui");
|
|
5874
5874
|
// Crear directorio si no existe
|
|
5875
5875
|
return [4 /*yield*/, lib.ensureDir(componentPath)];
|
|
@@ -5902,7 +5902,7 @@ function addComponent(componentName) {
|
|
|
5902
5902
|
componentFile = isIcon ? availableIcons[componentName.toLowerCase()] : availableComponents[componentName.toLowerCase()];
|
|
5903
5903
|
if (!componentFile) {
|
|
5904
5904
|
availableItems = isIcon ? Object.keys(availableIcons) : Object.keys(availableComponents);
|
|
5905
|
-
throw new Error("".concat(isIcon ?
|
|
5905
|
+
throw new Error("".concat(isIcon ? "Icono" : "Componente", " '").concat(componentName, "' no encontrado. ").concat(isIcon ? "Iconos" : "Componentes", " disponibles: ").concat(availableItems.join(", ")));
|
|
5906
5906
|
}
|
|
5907
5907
|
_a.label = 2;
|
|
5908
5908
|
case 2:
|
|
@@ -5923,18 +5923,18 @@ function addComponent(componentName) {
|
|
|
5923
5923
|
return [4 /*yield*/, lib.writeFile(filePath, personalizedCode)];
|
|
5924
5924
|
case 5:
|
|
5925
5925
|
_a.sent();
|
|
5926
|
-
console.log("\uD83D\uDCC1 ".concat(isIcon ?
|
|
5926
|
+
console.log("\uD83D\uDCC1 ".concat(isIcon ? "Icono" : "Componente", " guardado en: ").concat(filePath));
|
|
5927
5927
|
// Mostrar instrucciones
|
|
5928
5928
|
console.log("\n📋 Próximos pasos:");
|
|
5929
|
-
console.log("1. Importa el ".concat(isIcon ?
|
|
5929
|
+
console.log("1. Importa el ".concat(isIcon ? "icono" : "componente", ":"));
|
|
5930
5930
|
importPath = isIcon ? "./components/onpe-icons/".concat(fileName.replace(".tsx", "")) : "./components/onpe-ui/".concat(fileName.replace(".tsx", ""));
|
|
5931
5931
|
console.log(" import { ".concat(componentName.charAt(0).toUpperCase() + componentName.slice(1), " } from '").concat(importPath, "'"));
|
|
5932
|
-
console.log("2. Usa el ".concat(isIcon ?
|
|
5932
|
+
console.log("2. Usa el ".concat(isIcon ? "icono" : "componente", ":"));
|
|
5933
5933
|
console.log(" <".concat(componentName.charAt(0).toUpperCase() + componentName.slice(1), " />"));
|
|
5934
5934
|
return [3 /*break*/, 7];
|
|
5935
5935
|
case 6:
|
|
5936
5936
|
error_1 = _a.sent();
|
|
5937
|
-
throw new Error("Error al instalar el ".concat(isIcon ?
|
|
5937
|
+
throw new Error("Error al instalar el ".concat(isIcon ? "icono" : "componente", ": ").concat(error_1.message));
|
|
5938
5938
|
case 7: return [2 /*return*/];
|
|
5939
5939
|
}
|
|
5940
5940
|
});
|