centoui 1.0.0-alpha.4 → 1.0.0-alpha.41
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 +74 -12
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/package.json +39 -30
package/README.md
CHANGED
|
@@ -1,27 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>centoui</h1>
|
|
3
|
+
<p><strong>Vue components for elegant interfaces</strong></p>
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://npmx.dev/package/centoui"><img src="https://img.shields.io/npm/v/centoui.svg?style=plastic&label=NPM%20Version&color=blue" alt="NPM Version"></a>
|
|
6
|
+
<a href="https://npmx.dev/package/centoui"><img src="https://img.shields.io/npm/dw/centoui.svg?style=plastic&label=NPM%20Downloads&color=blue" alt="NPM Downloads"></a>
|
|
7
|
+
<a href="https://npmx.dev/package/centoui"><img src="https://img.shields.io/npm/unpacked-size/centoui?style=plastic&label=NPM%20Unpacked%20Size&color=blue" alt="NPM Unpacked Size"></a>
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
2
10
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/centoui)
|
|
5
|
-
[](https://github.com/favorodera/centoui/blob/main/LICENSE)
|
|
11
|
+
<br>
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
`centoui` is the core package of the CentoUI ecosystem. It contains every component's source code, the theme CSS, the component registry, and the `defineConfig` helper used by `centoui.config.ts`.
|
|
8
14
|
|
|
9
|
-
`centoui
|
|
15
|
+
When you run `centoui add button`, the CLI fetches the button source files from this package's registry and copies them into your project. You get the full `.vue` file and its variant definitions — no black-box imports.
|
|
10
16
|
|
|
11
17
|
## Installation
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
|
-
# Using pnpm
|
|
15
20
|
pnpm add centoui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## How It Works
|
|
24
|
+
|
|
25
|
+
CentoUI follows a **copy-paste** model. Components are not consumed as runtime imports from `node_modules`. Instead, they are copied directly into your project by the [CLI](../cli), giving you full ownership and the freedom to customize.
|
|
26
|
+
|
|
27
|
+
Each component consists of:
|
|
28
|
+
|
|
29
|
+
- A **`.vue` file** — the template and script, built on [Reka UI](https://reka-ui.com/) primitives for accessibility and behavior.
|
|
30
|
+
- An **`index.ts` file** — variant definitions using [Tailwind Variants](https://www.tailwind-variants.org/), TypeScript prop types, and the component export.
|
|
31
|
+
|
|
32
|
+
### Version-Locked Fetching
|
|
33
|
+
|
|
34
|
+
The CLI fetches all component files, the registry index, and the theme CSS from the **exact tagged release of this package** that matches the installed `centoui-cli` version. The source base URL is pinned to `refs/tags/v<VERSION>` — never to `main` or a floating ref.
|
|
35
|
+
|
|
36
|
+
This guarantees that the files copied into your project always correspond to the same release as the CLI you ran, so there is no risk of getting a component from a newer or older version of this package.
|
|
37
|
+
|
|
38
|
+
### Theming
|
|
16
39
|
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
A single `centoui.css` file controls the entire visual identity. It defines semantic color tokens using `oklch` for both light and dark modes — `--primary`, `--secondary`, `--error`, `--surface`, and more. Changing your palette is one file edit.
|
|
41
|
+
|
|
42
|
+
```css
|
|
43
|
+
:root {
|
|
44
|
+
--primary: oklch(0.09 0 0);
|
|
45
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
46
|
+
/* ... */
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dark {
|
|
50
|
+
--primary: oklch(0.98 0 0);
|
|
51
|
+
--primary-foreground: oklch(0.08 0 0);
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
The `defineConfig` helper is re-exported from this package for use in `centoui.config.ts`:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { defineConfig } from 'centoui'
|
|
61
|
+
|
|
62
|
+
export default defineConfig({
|
|
63
|
+
componentsDir: './src/components/centoui',
|
|
64
|
+
icons: {
|
|
65
|
+
check: 'lucide:check',
|
|
66
|
+
chevronDown: 'lucide:chevron-down',
|
|
67
|
+
close: 'lucide:x',
|
|
68
|
+
},
|
|
69
|
+
themeFilePath: './src/assets/css/centoui.css',
|
|
70
|
+
utilsFilePath: './src/utils/centoui-utils.ts',
|
|
71
|
+
})
|
|
19
72
|
```
|
|
20
73
|
|
|
21
|
-
##
|
|
74
|
+
## Peer Dependencies
|
|
75
|
+
|
|
76
|
+
CentoUI components rely on these runtime packages (automatically installed when you use the CLI):
|
|
22
77
|
|
|
23
|
-
|
|
78
|
+
- [`vue`](https://vuejs.org/) — Vue 3
|
|
79
|
+
- [`reka-ui`](https://reka-ui.com/) — Accessible headless primitives
|
|
80
|
+
- [`tailwindcss` + `@tailwindcss/vite`](https://tailwindcss.com/) — Styling engine
|
|
81
|
+
- [`tailwind-variants`](https://www.tailwind-variants.org/) — Variant-driven class composition
|
|
82
|
+
- [`tailwind-merge`](https://github.com/dcastil/tailwind-merge) — Class conflict resolution
|
|
83
|
+
- [`@vueuse/core`](https://vueuse.org/) — Composition utilities
|
|
84
|
+
- [`@iconify/vue`](https://iconify.design/) — Icon rendering (optional)
|
|
85
|
+
- [`tw-animate-css`](https://github.com/Wombosvideo/tw-animate-css) — Animation utilities
|
|
24
86
|
|
|
25
87
|
## License
|
|
26
88
|
|
|
27
|
-
[MIT](../../LICENSE) © [Favour Emeka](https://github.com/favorodera)
|
|
89
|
+
[MIT](../../LICENSE) © [Favour Emeka](https://github.com/favorodera)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CentoUIConfig } from "centoui-cli";
|
|
1
|
+
import { CentoUIConfig, CentoUIConfig as CentoUIConfig$1 } from "centoui-cli";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Creates the CentoUI config
|
|
6
|
-
* @param config
|
|
6
|
+
* @param config CentoUI config
|
|
7
7
|
* @returns CentoUI config
|
|
8
8
|
*/
|
|
9
|
-
declare function defineConfig(config: CentoUIConfig): CentoUIConfig;
|
|
9
|
+
declare function defineConfig(config: CentoUIConfig$1): CentoUIConfig$1;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { defineConfig };
|
|
11
|
+
export { type CentoUIConfig, defineConfig };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centoui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"
|
|
4
|
+
"version": "1.0.0-alpha.41",
|
|
5
5
|
"private": false,
|
|
6
|
-
"
|
|
6
|
+
"description": "Vue components for elegant interfaces",
|
|
7
7
|
"author": "Favour Emeka <favorodera@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"funding": "https://github.com/sponsors/favorodera",
|
|
9
10
|
"homepage": "https://centoui.vercel.app",
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
@@ -14,59 +15,67 @@
|
|
|
14
15
|
"bugs": {
|
|
15
16
|
"url": "https://github.com/favorodera/centoui/issues"
|
|
16
17
|
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"vue",
|
|
20
|
+
"ui",
|
|
21
|
+
"components",
|
|
22
|
+
"tailwindcss",
|
|
23
|
+
"tailwind",
|
|
24
|
+
"design-system",
|
|
25
|
+
"accessibility"
|
|
26
|
+
],
|
|
17
27
|
"exports": {
|
|
18
28
|
".": "./dist/index.js",
|
|
19
29
|
"./package.json": "./package.json"
|
|
20
30
|
},
|
|
31
|
+
"bin": {
|
|
32
|
+
"centoui": "./bin/centoui.js"
|
|
33
|
+
},
|
|
21
34
|
"files": [
|
|
22
35
|
"dist"
|
|
23
36
|
],
|
|
24
37
|
"publishConfig": {
|
|
25
38
|
"access": "public"
|
|
26
39
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"centoui-cli": "1.0.0-alpha.3"
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=22.0.0",
|
|
42
|
+
"pnpm": ">=11.0.0"
|
|
32
43
|
},
|
|
33
44
|
"peerDependencies": {
|
|
34
45
|
"vue": "^3.0.0"
|
|
35
46
|
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"centoui-cli": "1.0.0-alpha.41"
|
|
49
|
+
},
|
|
36
50
|
"devDependencies": {
|
|
37
|
-
"@clack/prompts": "^1.
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
51
|
+
"@clack/prompts": "^1.5.1",
|
|
52
|
+
"@favorodera/eslint-config": "^0.1.4",
|
|
53
|
+
"@iconify/vue": "^5.0.1",
|
|
54
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
40
55
|
"@types/fs-extra": "^11.0.4",
|
|
41
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
42
|
-
"@vitest/ui": "^4.1.
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"fs-extra": "^11.3.4",
|
|
46
|
-
"happy-dom": "^20.9.0",
|
|
56
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
57
|
+
"@vitest/ui": "^4.1.8",
|
|
58
|
+
"@vueuse/core": "^14.3.0",
|
|
59
|
+
"fs-extra": "^11.3.5",
|
|
47
60
|
"pathe": "^2.0.3",
|
|
48
|
-
"reka-ui": "^2.9.
|
|
49
|
-
"tailwind-merge": "^3.
|
|
61
|
+
"reka-ui": "^2.9.10",
|
|
62
|
+
"tailwind-merge": "^3.6.0",
|
|
50
63
|
"tailwind-variants": "^3.2.2",
|
|
51
|
-
"tailwindcss": "^4.
|
|
52
|
-
"tsdown": "^0.
|
|
53
|
-
"tsx": "^4.
|
|
64
|
+
"tailwindcss": "^4.3.1",
|
|
65
|
+
"tsdown": "^0.22.2",
|
|
66
|
+
"tsx": "^4.22.4",
|
|
54
67
|
"tw-animate-css": "^1.4.0",
|
|
55
|
-
"vite": "^8.0.
|
|
56
|
-
"vitest": "^4.1.
|
|
57
|
-
"
|
|
58
|
-
"vue": "^3.5
|
|
59
|
-
"vue-tsc": "^3.2.6"
|
|
60
|
-
},
|
|
61
|
-
"engines": {
|
|
62
|
-
"node": ">=22.0.0"
|
|
68
|
+
"vite": "^8.0.16",
|
|
69
|
+
"vitest": "^4.1.8",
|
|
70
|
+
"vue": "^3.5.38",
|
|
71
|
+
"vue-tsc": "^3.3.5"
|
|
63
72
|
},
|
|
64
73
|
"scripts": {
|
|
65
74
|
"build:registry": "tsx scripts/build-registry.ts",
|
|
66
75
|
"prebuild": "pnpm run build:registry",
|
|
67
76
|
"build": "tsdown",
|
|
68
77
|
"dev": "tsdown --watch",
|
|
69
|
-
"test": "vitest",
|
|
78
|
+
"test": "vitest run",
|
|
70
79
|
"test:watch": "vitest watch --ui",
|
|
71
80
|
"typecheck": "vue-tsc --noEmit",
|
|
72
81
|
"lint": "eslint . --fix"
|