centoui-cli 1.0.0-alpha.38 → 1.0.0-alpha.40
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 +13 -13
- package/dist/index.d.mts +32 -65
- package/dist/index.mjs +340 -625
- package/package.json +25 -25
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
|
|
92
|
+
import { defineConfig } from 'centoui'
|
|
93
93
|
|
|
94
94
|
export default defineConfig({
|
|
95
|
-
componentsDir:
|
|
96
|
-
themeFilePath: "./src/assets/css/centoui.css",
|
|
97
|
-
utilsFilePath: "./src/utils/centoui-utils.ts",
|
|
95
|
+
componentsDir: './src/components/centoui',
|
|
98
96
|
icons: {
|
|
99
|
-
check:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
chevronLeft:
|
|
104
|
-
chevronRight:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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,
|
|
35
|
+
export { CentoUIConfig, ComponentRegistryEntry, PackageJson, Registry };
|