centoui-cli 1.0.0-alpha.38 → 1.0.0-alpha.39

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/README.md CHANGED
@@ -89,23 +89,23 @@ This design eliminates an entire class of version mismatch bugs where the CLI an
89
89
  After running `centoui init`, your project root will contain a `centoui.config.ts`:
90
90
 
91
91
  ```ts
92
- import { defineConfig } from "centoui"
92
+ import { defineConfig } from 'centoui'
93
93
 
94
94
  export default defineConfig({
95
- componentsDir: "./src/components/centoui",
96
- themeFilePath: "./src/assets/css/centoui.css",
97
- utilsFilePath: "./src/utils/centoui-utils.ts",
95
+ componentsDir: './src/components/centoui',
98
96
  icons: {
99
- check: "lucide:check",
100
- close: "lucide:x",
101
- chevronDown: "lucide:chevron-down",
102
- chevronUp: "lucide:chevron-up",
103
- chevronLeft: "lucide:chevron-left",
104
- chevronRight: "lucide:chevron-right",
105
- chevronDoubleLeft: "lucide:chevrons-left",
106
- chevronDoubleRight: "lucide:chevrons-right",
107
- ellipsis: "lucide:ellipsis",
97
+ check: 'lucide:check',
98
+ chevronDoubleLeft: 'lucide:chevrons-left',
99
+ chevronDoubleRight: 'lucide:chevrons-right',
100
+ chevronDown: 'lucide:chevron-down',
101
+ chevronLeft: 'lucide:chevron-left',
102
+ chevronRight: 'lucide:chevron-right',
103
+ chevronUp: 'lucide:chevron-up',
104
+ close: 'lucide:x',
105
+ ellipsis: 'lucide:ellipsis',
108
106
  },
107
+ themeFilePath: './src/assets/css/centoui.css',
108
+ utilsFilePath: './src/utils/centoui-utils.ts',
109
109
  })
110
110
  ```
111
111
 
package/dist/index.d.mts CHANGED
@@ -1,68 +1,35 @@
1
1
  //#region src/types.d.ts
2
- /**
3
- * Mirrors the `globals.json` registry schema.
4
- * Defines properties that every CentoUI project must have.
5
- */
6
- type GlobalsRegistry = {
7
- /**
8
- * NPM packages that are required in every CentoUI project.
9
- * Keys are package names; values are semver version ranges (e.g. `"^4.2.2"`).
10
- */
11
- packageDeps: Record<string, string>;
12
- };
13
- /**
14
- * Mirrors the `component.json` registry schema.
15
- * Describes a single installable CentoUI component.
16
- */
17
- type ComponentRegistry = {
18
- /** Unique identifier for the component. Matches its registry filename (e.g. `"button"`). */name: string; /** Short human-readable description shown in CLI output. */
19
- description: string;
20
- /**
21
- * Whether this component requires the global utils file (e.g., isSlotEmpty).
22
- * If true, the utils file will be written when this component is installed.
23
- */
24
- needsUtils?: boolean;
25
- /**
26
- * Source file paths relative to `packages/core/src/`.
27
- * All paths start with `components/` by convention (e.g. `"components/button/button.vue"`).
28
- * The CLI fetches each file from GitHub and writes it into the user's components directory.
29
- */
30
- files: string[];
31
- /**
32
- * Names of other CentoUI components that must be installed alongside this one.
33
- * The CLI resolves the full dependency tree automatically.
34
- */
35
- componentDeps?: string[];
36
- /**
37
- * NPM packages required specifically by this component,
38
- * in addition to the global dependencies defined in `GlobalsRegistry`.
39
- * Keys are package names; values are semver version ranges.
40
- */
41
- packageDeps?: Record<string, string>;
42
- };
43
- /**
44
- * The complete CentoUI registry — the `index.json` file fetched from GitHub.
45
- * Contains global project dependencies and the full list of installable components.
46
- */
47
- type Registry = {
48
- /** Global properties that every CentoUI project must have. */globals: GlobalsRegistry; /** All components that can be installed with `centoui add`. */
49
- components: ComponentRegistry[];
50
- };
51
- /**
52
- * The user-side CentoUI configuration, stored in `centoui.config.ts`.
53
- * Generated by `centoui init` and consumed by every subsequent CLI command.
54
- */
55
- type CentoUIConfig = {
56
- /** Relative path (from project root) to the directory where components are installed. */componentsDir: string; /** Relative path (from project root) to the CSS file that receives theme and component styles. */
57
- themeFilePath: string; /** Relative path (from project root) to the utils file. */
58
- utilsFilePath: string;
59
- /**
60
- * Maps internal CentoUI icon slot names to Iconify icon IDs.
61
- * Components reference icon slots by their internal name so you can swap icon libraries freely.
62
- *
63
- * @example { menu: 'lucide:menu', close: 'lucide:x' }
64
- */
2
+ /** Describes a single installable CentoUI component. */
3
+ interface ComponentRegistryEntry {
4
+ /** Unique identifier for the component (e.g. `"button"`). */
5
+ name: string;
6
+ /** Source file paths relative to `packages/core/src/`. */
7
+ files: Array<string>;
8
+ /** Names of other CentoUI components required by this one. */
9
+ componentDependencies?: Array<string>;
10
+ /** NPM packages required by this component. */
11
+ npmDependencies?: Record<string, string>;
12
+ }
13
+ /** The complete CentoUI registry (`index.json`). */
14
+ interface Registry {
15
+ /** NPM packages required in every CentoUI project. */
16
+ npmDependencies: Record<string, string>;
17
+ /** Installable components. */
18
+ components: Array<ComponentRegistryEntry>;
19
+ }
20
+ /** User configuration stored in `centoui.config.ts`. */
21
+ interface CentoUIConfig {
22
+ /** Relative path to the component installation directory. */
23
+ componentsDir: string;
24
+ /** Relative path to the CSS file. */
25
+ themeFilePath: string;
26
+ /** Maps internal icon slot names to Iconify IDs. */
65
27
  icons: Record<string, string>;
66
- };
28
+ }
29
+ /** Partial package.json structure needed by the CLI. */
30
+ interface PackageJson {
31
+ dependencies?: Record<string, string>;
32
+ devDependencies?: Record<string, string>;
33
+ }
67
34
  //#endregion
68
- export { CentoUIConfig, ComponentRegistry, GlobalsRegistry, Registry };
35
+ export { CentoUIConfig, ComponentRegistryEntry, PackageJson, Registry };