@smart-coder-labs/apple-design-system 1.0.12 → 1.0.13

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.
@@ -0,0 +1,2 @@
1
+ export declare const update: (components: string[]) => Promise<void>;
2
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../cli/commands/update.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM,GAAU,YAAY,MAAM,EAAE,kBA+ChD,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.update = void 0;
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const ora_1 = __importDefault(require("ora"));
11
+ const registry_1 = require("../utils/registry");
12
+ const add_1 = require("./add");
13
+ const update = async (components) => {
14
+ // 1. Load config
15
+ let config = { componentsDir: "./components/ui" };
16
+ if (fs_extra_1.default.existsSync("design-system.json")) {
17
+ try {
18
+ config = await fs_extra_1.default.readJSON("design-system.json");
19
+ }
20
+ catch (e) {
21
+ console.warn("Could not read design-system.json, using defaults.");
22
+ }
23
+ }
24
+ else {
25
+ console.warn("design-system.json not found. Using default ./components/ui");
26
+ }
27
+ const resolvedComponentsDir = path_1.default.resolve(process.cwd(), config.componentsDir);
28
+ // 2. Identify installed components if none provided
29
+ if (!components || components.length === 0) {
30
+ const spinner = (0, ora_1.default)("Scanning for installed components...").start();
31
+ if (!fs_extra_1.default.existsSync(resolvedComponentsDir)) {
32
+ spinner.fail(`Components directory not found at ${config.componentsDir}`);
33
+ return;
34
+ }
35
+ const files = await fs_extra_1.default.readdir(resolvedComponentsDir);
36
+ const availableComponents = await (0, registry_1.getAvailableComponents)();
37
+ // Filter files that match registry components
38
+ const installedComponents = files
39
+ .filter(file => file.endsWith(".tsx") || file.endsWith(".ts"))
40
+ .map(file => path_1.default.basename(file, path_1.default.extname(file)))
41
+ .filter(name => availableComponents.includes(name));
42
+ spinner.stop();
43
+ if (installedComponents.length === 0) {
44
+ console.log(chalk_1.default.yellow("No installed components found to update."));
45
+ return;
46
+ }
47
+ console.log(chalk_1.default.blue(`Found ${installedComponents.length} components to update: ${installedComponents.join(", ")}`));
48
+ components = installedComponents;
49
+ }
50
+ // 3. Use add command to re-install/update them
51
+ // The add command handles fetching, dependency resolution, and overwriting files.
52
+ await (0, add_1.add)(components);
53
+ };
54
+ exports.update = update;
55
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../cli/commands/update.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AACxB,kDAA0B;AAC1B,8CAAsB;AACtB,gDAA2D;AAC3D,+BAA4B;AAErB,MAAM,MAAM,GAAG,KAAK,EAAE,UAAoB,EAAE,EAAE;IACnD,iBAAiB;IACjB,IAAI,MAAM,GAAG,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC;IAClD,IAAI,kBAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACtC,IAAI,CAAC;YACD,MAAM,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,qBAAqB,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAEhF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mBAAmB,CAAC;IACrC,CAAC;IAED,+CAA+C;IAC/C,kFAAkF;IAClF,MAAM,IAAA,SAAG,EAAC,UAAU,CAAC,CAAC;AACxB,CAAC,CAAC;AA/CW,QAAA,MAAM,UA+CjB"}
package/dist/cli/index.js CHANGED
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const commander_1 = require("commander");
5
5
  const init_1 = require("./commands/init");
6
6
  const add_1 = require("./commands/add");
7
+ const update_1 = require("./commands/update");
7
8
  const program = new commander_1.Command();
8
9
  program
9
10
  .name("apple-design-system")
@@ -18,5 +19,10 @@ program
18
19
  .description("Add a component to your project")
19
20
  .argument("[components...]", "The components to add")
20
21
  .action((components) => (0, add_1.add)(components));
22
+ program
23
+ .command("update")
24
+ .description("Update installed components to the latest version")
25
+ .argument("[components...]", "The components to update")
26
+ .action((components) => (0, update_1.update)(components));
21
27
  program.parse();
22
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../cli/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAAuC;AACvC,wCAAqC;AAErC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,qBAAqB,CAAC;KAC3B,WAAW,CAAC,8DAA8D,CAAC;KAC3E,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,WAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,iCAAiC,CAAC;KAC9C,QAAQ,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;KACpD,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,SAAG,EAAC,UAAU,CAAC,CAAC,CAAC;AAE3C,OAAO,CAAC,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../cli/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAAuC;AACvC,wCAAqC;AACrC,8CAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,qBAAqB,CAAC;KAC3B,WAAW,CAAC,8DAA8D,CAAC;KAC3E,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,WAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,iCAAiC,CAAC;KAC9C,QAAQ,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;KACpD,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,SAAG,EAAC,UAAU,CAAC,CAAC,CAAC;AAE3C,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,mDAAmD,CAAC;KAChE,QAAQ,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;KACvD,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,eAAM,EAAC,UAAU,CAAC,CAAC,CAAC;AAE9C,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-coder-labs/apple-design-system",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Design system completo estilo Apple (macOS/iOS/VisionOS) con Framer Motion",
5
5
  "keywords": [
6
6
  "apple-design-system",
@@ -66,9 +66,8 @@
66
66
  "devDependencies": {
67
67
  "@radix-ui/react-dialog": "^1.0.5",
68
68
  "@radix-ui/react-dropdown-menu": "^2.0.6",
69
- "@radix-ui/react-switch": "^1.0.3",
70
- "@radix-ui/react-tabs": "^1.0.4",
71
- "@radix-ui/react-tooltip": "^1.0.7",
69
+
70
+
72
71
  "@storybook/addon-docs": "^10.0.8",
73
72
  "@storybook/addon-onboarding": "^10.0.8",
74
73
  "@storybook/react-vite": "^10.0.8",