chaincss 1.13.3 → 2.0.0

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/LICENSE +2 -3
  3. package/README.md +238 -105
  4. package/dist/cli/commands/build.d.ts +3 -0
  5. package/dist/cli/commands/build.d.ts.map +1 -0
  6. package/dist/cli/commands/compile.d.ts +3 -0
  7. package/dist/cli/commands/compile.d.ts.map +1 -0
  8. package/dist/cli/commands/init.d.ts +5 -0
  9. package/dist/cli/commands/init.d.ts.map +1 -0
  10. package/dist/cli/commands/timeline.d.ts +2 -0
  11. package/dist/cli/commands/timeline.d.ts.map +1 -0
  12. package/dist/cli/commands/watch.d.ts +6 -0
  13. package/dist/cli/commands/watch.d.ts.map +1 -0
  14. package/dist/cli/index.d.ts +2 -0
  15. package/dist/cli/index.d.ts.map +1 -0
  16. package/dist/cli/index.js +5960 -0
  17. package/dist/cli/types.d.ts +51 -0
  18. package/dist/cli/types.d.ts.map +1 -0
  19. package/dist/cli/utils/config-loader.d.ts +8 -0
  20. package/dist/cli/utils/config-loader.d.ts.map +1 -0
  21. package/dist/cli/utils/file-utils.d.ts +9 -0
  22. package/dist/cli/utils/file-utils.d.ts.map +1 -0
  23. package/dist/cli/utils/logger.d.ts +17 -0
  24. package/dist/cli/utils/logger.d.ts.map +1 -0
  25. package/dist/compiler/atomic-optimizer.d.ts +76 -0
  26. package/dist/compiler/atomic-optimizer.d.ts.map +1 -0
  27. package/dist/compiler/btt.d.ts +138 -0
  28. package/dist/compiler/btt.d.ts.map +1 -0
  29. package/dist/compiler/cache-manager.d.ts +20 -0
  30. package/dist/compiler/cache-manager.d.ts.map +1 -0
  31. package/dist/compiler/commonProps.d.ts +2 -0
  32. package/dist/compiler/commonProps.d.ts.map +1 -0
  33. package/dist/compiler/index.d.ts +12 -0
  34. package/dist/compiler/index.d.ts.map +1 -0
  35. package/dist/compiler/index.js +5177 -0
  36. package/dist/compiler/prefixer.d.ts +42 -0
  37. package/dist/compiler/prefixer.d.ts.map +1 -0
  38. package/dist/compiler/theme-contract.d.ts +61 -0
  39. package/dist/compiler/theme-contract.d.ts.map +1 -0
  40. package/dist/compiler/tokens.d.ts +52 -0
  41. package/dist/compiler/tokens.d.ts.map +1 -0
  42. package/dist/compiler/types.d.ts +57 -0
  43. package/dist/compiler/types.d.ts.map +1 -0
  44. package/dist/core/compiler.d.ts +32 -0
  45. package/dist/core/compiler.d.ts.map +1 -0
  46. package/dist/core/constants.d.ts +129 -0
  47. package/dist/core/constants.d.ts.map +1 -0
  48. package/dist/core/index.d.ts +4 -0
  49. package/dist/core/index.d.ts.map +1 -0
  50. package/dist/core/types.d.ts +88 -0
  51. package/dist/core/types.d.ts.map +1 -0
  52. package/dist/core/utils.d.ts +37 -0
  53. package/dist/core/utils.d.ts.map +1 -0
  54. package/dist/index.d.ts +13 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +5667 -0
  57. package/dist/plugins/vite.d.ts +11 -0
  58. package/dist/plugins/vite.d.ts.map +1 -0
  59. package/dist/plugins/vite.js +25839 -0
  60. package/dist/plugins/webpack.d.ts +45 -0
  61. package/dist/plugins/webpack.d.ts.map +1 -0
  62. package/dist/plugins/webpack.js +107 -0
  63. package/dist/runtime/hmr.d.ts +3 -0
  64. package/dist/runtime/hmr.d.ts.map +1 -0
  65. package/dist/runtime/index.d.ts +15 -0
  66. package/dist/runtime/index.d.ts.map +1 -0
  67. package/dist/runtime/index.js +552 -0
  68. package/dist/runtime/injector.d.ts +85 -0
  69. package/dist/runtime/injector.d.ts.map +1 -0
  70. package/dist/runtime/react.d.ts +54 -0
  71. package/dist/runtime/react.d.ts.map +1 -0
  72. package/dist/runtime/react.js +270 -0
  73. package/dist/runtime/types.d.ts +45 -0
  74. package/dist/runtime/types.d.ts.map +1 -0
  75. package/dist/runtime/utils.d.ts +62 -0
  76. package/dist/runtime/utils.d.ts.map +1 -0
  77. package/dist/runtime/vue.d.ts +52 -0
  78. package/dist/runtime/vue.d.ts.map +1 -0
  79. package/dist/runtime/vue.js +232 -0
  80. package/package.json +90 -119
  81. package/browser/commonProps.js +0 -14
  82. package/browser/index.js +0 -3
  83. package/browser/react-hooks.js +0 -162
  84. package/browser/rtt.js +0 -400
  85. package/browser/vue-composables.js +0 -200
  86. package/node/atomic-optimizer.js +0 -526
  87. package/node/btt.js +0 -1009
  88. package/node/cache-manager.js +0 -56
  89. package/node/chaincss.js +0 -642
  90. package/node/index.js +0 -2
  91. package/node/loaders/chaincss-loader.js +0 -62
  92. package/node/plugins/next-plugin.js +0 -120
  93. package/node/plugins/vite-plugin.js +0 -383
  94. package/node/plugins/webpack-plugin.js +0 -41
  95. package/node/prefixer.js +0 -237
  96. package/node/strVal.js +0 -92
  97. package/node/theme-validator.js +0 -32
  98. package/shared/theme-contract.js +0 -98
  99. package/shared/tokens.cjs +0 -256
  100. package/shared/tokens.mjs +0 -320
  101. package/types.d.ts +0 -325
package/CHANGELOG.md ADDED
@@ -0,0 +1,81 @@
1
+ # Changelog
2
+
3
+ All notable changes to ChainCSS will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] - 2026-04-10
9
+
10
+ ### 🎉 Major Release: Zero-Runtime Architecture
11
+
12
+ ChainCSS 2.0 is a complete rewrite focused on **zero-runtime CSS-in-JS** with optional runtime for development.
13
+
14
+ ### ✨ Added
15
+
16
+ - **Zero-runtime mode**: Styles compile to static CSS at build time (0KB in production)
17
+ - **Shorthand properties**: `$.bg()`, `$.c()`, `$.p()`, `$.m()`, `$.rounded()`, etc. (write less, do more)
18
+ - **Responsive breakpoint methods**: `.mobile()`, `.tablet()`, `.desktop()`, `.sm()`, `.md()`, `.lg()`, `.xl()`
19
+ - **Animation presets**: `.fadeIn()`, `.slideInUp()`, `.pulse()`, `.spin()`, `.bounce()`, `.shake()`, etc.
20
+ - **Math/Calc helpers**: `$.calc()`, `$.add()`, `$.subtract()`, `$.multiply()`, `$.divide()`
21
+ - **Debug mode**: `.debug()` with console output showing source file and line number
22
+ - **Style versioning**: Source comments in CSS (`/* Generated from: nav.chain.js:15 */`)
23
+ - **Timeline/Diff viewer**: Track style changes with `chaincss build --timeline` and `chaincss timeline diff`
24
+ - **Configurable breakpoints**: Custom breakpoints in `chaincss.config.js`
25
+ - **Environment-aware defaults**: `readable` class names in development, `hash` in production
26
+ - **Atomic CSS optimization**: Automatic detection and reuse of common styles (opt-in)
27
+ - **CLI tool**: `chaincss init`, `chaincss build`, `chaincss watch`, `chaincss clean`
28
+ - **Vite plugin**: Seamless integration with Vite
29
+ - **Webpack plugin**: Webpack loader for .chain.js files
30
+ - **TypeScript support**: Full type definitions with generated types
31
+ - **Recipe system**: Variant-based component styling
32
+ - **Design tokens**: Built-in token system with theme contracts
33
+ - **Optional runtime**: 3.2KB runtime for development and dynamic theming
34
+ - **React hooks**: `useChainStyles`, `useDynamicChainStyles`, `useThemeChainStyles`, `createStyledComponent`
35
+ - **Vue composables**: `useAtomicClasses`, `createStyledComponent`
36
+ - **Improved file structure**: Each component has its own `styles/` folder with `.chain.js`, `.class.js`, and `.css` files
37
+ - **Global styles separation**: `global-style/` folder for global CSS
38
+ - **Better minification**: `global.css` minified for production, component CSS unminified for debugging
39
+
40
+ ### 🔧 Changed
41
+
42
+ - Complete rewrite from runtime-only to hybrid architecture
43
+ - New package structure with ESM support
44
+ - Better tree-shaking for smaller bundles
45
+ - Improved CSS property validation
46
+ - Class name generation now uses `readable` format by default in development
47
+
48
+ ### 🗑️ Removed
49
+
50
+ - `@melcanz85/chaincss` legacy package reference (now unified under `chaincss`)
51
+
52
+ ### 📚 Documentation
53
+
54
+ - New documentation site with interactive playground
55
+ - Migration guide from v1.x
56
+ - API reference with examples
57
+ - CLI reference with all commands
58
+ - Configuration guide with all options
59
+
60
+ ---
61
+
62
+ ## [1.13.3] - 2026-03-30
63
+
64
+ ### Fixed
65
+ - Bug fixes and performance improvements
66
+
67
+ ### Changed
68
+ - Updated dependencies
69
+
70
+ ---
71
+
72
+ ## [1.0.0] - 2023-01-01
73
+
74
+ ### 🎉 Initial Release
75
+
76
+ - Chainable CSS API
77
+ - Runtime style injection
78
+ - React hooks
79
+ - Vue composables
80
+ - Token system
81
+ - Recipe variants
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Rommel Caneos
3
+ Copyright (c) 2006 Rommel Caneos
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,5 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
- EOF
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,138 +4,271 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![Live Demo](https://img.shields.io/badge/demo-live-brightgreen)](https://chaincss.dev)
6
6
 
7
- > ChainCSS is the JavaScript-native styling engine for the modern web
7
+ > **ChainCSS** The JavaScript-native styling engine for the modern web.
8
8
 
9
9
  > **Note:** The previous package `@melcanz85/chaincss` is no longer supported.
10
- > **Please install `chaincss` instead:** `npm install chaincss`
10
+ > **Please install this updated `chaincss` instead:** `npm install chaincss`
11
11
 
12
- ## Features
12
+ ##Features
13
13
 
14
- ### Core Styling Features
14
+ ### Core Styling
15
15
 
16
- | Feature | Description |
17
- |---------|-------------|
18
- | **Chainable API** | `$().color('red').padding('10px').block()` |
19
- | **CSS Properties** | All standard CSS properties (camelCase) |
20
- | **Multiple Selectors** | `.block('.btn', '.button', '[type="button"]')` |
21
- | **Hover States** | `.hover().backgroundColor('blue').end()` |
22
- | **Hover Exit** | `.end()` method to exit hover mode |
23
- | **Nested Selectors** | `.select('.parent .child')` |
24
- | **Token Resolution** | `:colors.primary` actual color value |
25
- | **CSS Property Validation** | Warns on invalid CSS properties |
26
-
27
- ### At-Rules (CSS Rules)
28
-
29
- | At-Rule | Method | Example |
30
- |---------|--------|---------|
31
- | **Media Queries** | `.media()` | `.media('(max-width: 768px)', (css) => {...})` |
32
- | **Keyframes** | `.keyframes()` | `.keyframes('slide', (kf) => {...})` |
33
- | **Font Face** | `.fontFace()` | `.fontFace((css) => {...})` |
34
- | **Supports** | `.supports()` | `.supports('display: grid', (css) => {...})` |
35
- | **Container Queries** | `.container()` | `.container('(min-width: 400px)', (css) => {...})` |
36
- | **CSS Layers** | `.layer()` | `.layer('components', (css) => {...})` |
37
- | **Counter Styles** | `.counterStyle()` | `.counterStyle('circled', (css) => {...})` |
38
- | **Custom Properties** | `.property()` | `.property('--my-color', (css) => {...})` |
39
-
40
- ### Design System
41
-
42
- | Feature | Description |
43
- |---------|-------------|
44
- | **Design Tokens** | `createTokens()` with colors, spacing, typography |
45
- | **Token Getter** | `tokens.get('colors.primary')` |
46
- | **Token Resolution in Styles** | `$colors.primary` syntax |
47
- | **Theme Switching** | Dynamic token updates at runtime |
48
- | **CSS Variables Output** | `tokens.toCSSVariables()` |
16
+ | Feature | Description | Example |
17
+ |---------|-------------|---------|
18
+ | **Chainable API** | Intuitive method chaining | `$.color('red').padding('10px')` |
19
+ | **Shorthand Properties** | Write less, do more | `$.bg('blue').c('white').p('20px')` |
20
+ | **CSS Properties** | All standard CSS properties | `$.display('flex').gap('1rem')` |
21
+ | **Multiple Selectors** | Style multiple elements | `.$el('.btn', '.button')` |
22
+ | **Hover States** | Interactive styles | `.hover().bg('darkblue').end()` |
23
+ | **Responsive Breakpoints** | Built-in breakpoint methods | `.mobile(css => css.p('1rem'))` |
24
+ | **Media Queries** | Custom media queries | `.media('(max-width: 768px)', ...)` |
49
25
 
50
- ### Component System
26
+ ### 🚀 Advanced Features
51
27
 
52
- | Feature | Description |
53
- |---------|-------------|
54
- | **Framework Agnostic** | React, Next.js, Vite, Webpack |
55
- | **Recipe System** | `recipe()` for variant-based components |
56
- | **Base Styles** | `recipe({ base: $().padding('8px').block() })` |
57
- | **Variants** | `variants: { color: { primary: $().bg('blue').block() } }` |
58
- | **Default Variants** | `defaultVariants: { color: 'primary' }` |
59
- | **Compound Variants** | `compoundVariants: [{ variants: { color: 'primary', size: 'lg' }, style: ... }]` |
60
- | **Variant Combination** | `button({ color: 'primary', size: 'lg' })` |
61
- | **Compile All Variants** | `button.compileAll()` |
28
+ | Feature | Description | Example |
29
+ |---------|-------------|---------|
30
+ | **Animation Presets** | Pre-built animations | `.fadeIn().duration('0.3s')` |
31
+ | **Math Helpers** | CSS calc() helpers | `$.width($.calc('100% - 20px'))` |
32
+ | **Design Tokens** | Centralized design values | `tokens.get('colors.primary')` |
33
+ | **Debug Mode** | Console debugging for styles | `$.debug().bg('red')` |
34
+ | **Source Comments** | Track style origins | `/* Generated from: nav.chain.js:15 */` |
35
+ | **Style Timeline** | Track style changes | `chaincss build --timeline` |
62
36
 
63
- ### Build-Time Features (CLI)
37
+ ### 🏗️ Build System
64
38
 
65
39
  | Feature | Command/Flag |
66
40
  |---------|--------------|
67
- | **CSS Compilation** | `chaincss input.jcss output/dir` |
68
- | **Watch Mode** | `--watch` flag |
69
- | **Atomic CSS Optimization** | `--atomic` flag |
70
- | **Source Maps** | `--source-map` flag |
71
- | **Minification** | Via CleanCSS (built-in) |
72
- | **Autoprefixer** | `--prefixer-mode auto` |
73
- | **Class Map Generation** | `.map.json` output |
74
- | **JS Module Export** | `.classes.js` output |
75
- | **TypeScript Definitions** | `.classes.d.ts` output |
76
- | **Build Manifest** | `chaincss-manifest.json` |
77
- | **CSS Property Cache** | Local cache for faster builds |
78
-
79
- ### React Runtime Features
80
-
81
- | Feature | Description |
82
- |---------|-------------|
83
- | **useChainStyles** | Main React hook for styles |
84
- | **useDynamicChainStyles** | For dynamic styles with dependencies |
85
- | **useThemeChainStyles** | For theme-aware styles |
86
- | **ChainCSSGlobal** | Global style injection component |
87
- | **withChainStyles** | HOC for class components |
88
- | **cx** | Class name utility (like clsx) |
41
+ | **CSS Compilation** | `chaincss build` |
42
+ | **Watch Mode** | `chaincss watch` |
43
+ | **Config File** | `chaincss.config.js` |
44
+ | **Auto-prefixer** | Built-in via `--prefixer` |
45
+ | **Minification** | Global.css minified, components unminified |
46
+ | **TypeScript Support** | Full type definitions |
47
+ | **Source Maps** | For debugging |
48
+
49
+ ### ⚛️ Framework Support
89
50
 
90
- ### Plugin Ecosystem
51
+ | Framework | Support |
52
+ |-----------|---------|
53
+ | **React** | ✅ `useChainStyles` hook, `createStyledComponent` |
54
+ | **Vue** | ✅ `useAtomicClasses` composable |
55
+ | **Solid** | ✅ Coming soon |
56
+ | **Svelte** | ✅ Coming soon |
57
+ | **Vanilla** | ✅ Runtime mode |
58
+
59
+ ### 🔌 Plugins
91
60
 
92
61
  | Plugin | Description |
93
62
  |--------|-------------|
94
- | **Vite Plugin** | `.jcss` support with HMR |
95
- | **Webpack Plugin** | Build-time compilation |
96
- | **Next.js Plugin** | SSR support |
97
- | **Webpack Loader** | ChainCSS loader for webpack |
63
+ | **Vite** | Automatic `.chain.js` compilation |
64
+ | **Webpack** | Build-time integration |
65
+ | **Next.js** | SSR support |
98
66
 
99
- ### Development Tools
67
+ ### 📁 File Structure
100
68
 
101
- | Feature | Description |
102
- |---------|-------------|
103
- | **TypeScript Support** | Full type definitions (`types.d.ts`) |
104
- | **Configuration File** | `chaincss.config.cjs` for customization |
105
- | **Cache Management** | Atomic optimizer cache |
106
- | **Cache Cleanup** | Auto cleanup of old cache files |
107
- | **Atomic Optimizer Stats** | `atomicOptimizer.getStats()` |
108
- | **configureAtomic** | Programmatic atomic config |
69
+ ```
70
+ src/
71
+ ├── components/
72
+ │ └── Button/
73
+ │ ├── Button.tsx
74
+ │ └── styles/
75
+ │ ├── button.chain.js # Source styles
76
+ │ ├── button.class.js # Generated class names
77
+ │ └── button.css # Generated CSS
78
+ ├── global-style/
79
+ │ ├── global.chain.js # Global styles
80
+ │ └── global.css # Combined CSS
81
+ └── chaincss.config.js # Configuration
82
+ ```
109
83
 
110
- ### CSS Output Features
84
+ ## 📦 Installation
111
85
 
112
- | Feature | Description |
113
- |---------|-------------|
114
- | **Pure CSS Output** | `global.css` generation |
115
- | **Atomic CSS Output** | Reusable atomic classes |
116
- | **Source Maps** | `.map` files for debugging |
117
- | **Class Mapping** | Selector → atomic class map |
118
- | **Minified Output** | Via CleanCSS |
119
- | **Vendor Prefixing** | Via Autoprefixer |
86
+ ```bash
87
+ npm install chaincss
88
+ ```
89
+
90
+ ## 🚀 Quick Start
91
+
92
+ ### 1. Initialize configuration
93
+
94
+ ```bash
95
+ npx chaincss init
96
+ # or for full configuration
97
+ npx chaincss init --full
98
+ ```
99
+
100
+ ### 2. Create your first style
101
+
102
+ ```javascript
103
+ // src/components/Button/styles/button.chain.js
104
+ import { $ } from 'chaincss';
105
+
106
+ export const button = $
107
+ .bg('#667eea')
108
+ .c('white')
109
+ .p('12px 24px')
110
+ .rounded('8px')
111
+ .cursor('pointer')
112
+ .hover()
113
+ .bg('#5a67d8')
114
+ .end()
115
+ .$el('.btn');
116
+ ```
117
+
118
+ ### 3. Build styles
119
+
120
+ ```bash
121
+ npx chaincss build
122
+ ```
123
+
124
+ ### 4. Use in React
125
+
126
+ ```jsx
127
+ import { button } from './styles/button.class.js';
128
+ import './styles/button.css';
129
+
130
+ function Button() {
131
+ return <button className={button}>Click me</button>;
132
+ }
133
+ ```
134
+
135
+ ## 📝 Examples
120
136
 
121
- ### Performance Features
137
+ ### Responsive Design
122
138
 
123
- | Feature | Description |
139
+ ```javascript
140
+ export const title = $
141
+ .fontSize('3rem')
142
+ .mobile(css => css.fontSize('1.5rem'))
143
+ .tablet(css => css.fontSize('2rem'))
144
+ .desktop(css => css.fontSize('2.5rem'))
145
+ .$el('.title');
146
+ ```
147
+
148
+ ### Animations
149
+
150
+ ```javascript
151
+ export const card = $
152
+ .fadeInUp({ duration: '0.5s' })
153
+ .pulse({ duration: '2s', iteration: 'infinite' })
154
+ .bg('white')
155
+ .rounded('12px')
156
+ .$el('.card');
157
+ ```
158
+
159
+ ### Math Helpers
160
+
161
+ ```javascript
162
+ export const container = $
163
+ .width($.calc('100% - 40px'))
164
+ .padding($.add($.rem(2), $.px(10)))
165
+ .margin($.subtract('100vw', '20px'))
166
+ .$el('.container');
167
+ ```
168
+
169
+ ### Shorthand Properties
170
+
171
+ ```javascript
172
+ export const card = $
173
+ .bg('white')
174
+ .c('gray-800')
175
+ .p('20px')
176
+ .m('10px')
177
+ .rounded('8px')
178
+ .shadow('lg')
179
+ .$el('.card');
180
+ ```
181
+
182
+ ## ⚙️ Configuration
183
+
184
+ Create `chaincss.config.js`:
185
+
186
+ ```javascript
187
+ export default {
188
+ inputs: ['src/**/*.chain.js'],
189
+ output: 'dist/styles',
190
+ atomic: {
191
+ enabled: false, // Enable atomic CSS optimization
192
+ naming: 'readable' // or 'hash' for production
193
+ },
194
+ prefixer: {
195
+ enabled: true // Auto-prefixer for cross-browser support
196
+ },
197
+ breakpoints: {
198
+ mobile: '(max-width: 768px)',
199
+ tablet: '(min-width: 769px) and (max-width: 1024px)',
200
+ desktop: '(min-width: 1025px)'
201
+ },
202
+ debug: false,
203
+ verbose: false
204
+ };
205
+ ```
206
+
207
+ ## 🎯 Runtime Mode (Optional)
208
+
209
+ For dynamic styles without build step:
210
+
211
+ ```jsx
212
+ import { useChainStyles } from 'chaincss/runtime';
213
+
214
+ function DynamicButton() {
215
+ const styles = useChainStyles({
216
+ button: {
217
+ backgroundColor: '#667eea',
218
+ color: 'white',
219
+ padding: '12px 24px'
220
+ }
221
+ });
222
+
223
+ return <button className={styles.button}>Click me</button>;
224
+ }
225
+ ```
226
+
227
+ ## 📊 CLI Commands
228
+
229
+ | Command | Description |
124
230
  |---------|-------------|
125
- | **Zero Runtime Option** | Build mode = 0KB runtime |
126
- | **Small Runtime** | Runtime mode = ~3.2KB |
127
- | **Tree Shaking** | `sideEffects: false` |
128
- | **Atomic CSS Optimization** | Eliminates duplicate styles |
129
- | **Cache Strategy** | File + compiled function cache |
231
+ | `chaincss init` | Create config file |
232
+ | `chaincss init --full` | Create full config with all options |
233
+ | `chaincss build` | Build all styles |
234
+ | `chaincss build --timeline` | Build with timeline tracking |
235
+ | `chaincss watch` | Watch for changes |
236
+ | `chaincss clean` | Remove generated files |
130
237
 
238
+ ## 🔧 Package.json Scripts
131
239
 
132
- For complete guide, documentation, examples, and API reference see:
240
+ ```json
241
+ {
242
+ "scripts": {
243
+ "dev": "concurrently \"npm:css:watch\" \"vite\"",
244
+ "build": "npm run css:build && vite build",
245
+ "css:build": "chaincss build",
246
+ "css:watch": "chaincss watch",
247
+ "css:clean": "chaincss clean"
248
+ }
249
+ }
250
+ ```
133
251
 
134
- ## [Documentation](https://www.chaincss.dev/docs)
252
+ ## 📚 Documentation
135
253
 
136
-
254
+ For complete guide, API reference, and examples:
137
255
 
256
+ ### [Documentation](https://chaincss.dev/docs)
138
257
 
139
- ## License
258
+ - [Getting Started](https://chaincss.dev/docs)
259
+ - [Chainable API](https://chaincss.dev/docs/chainable-api)
260
+ - [Responsive Design](https://chaincss.dev/docs/responsive)
261
+ - [Animations](https://chaincss.dev/docs/animations)
262
+ - [Configuration](https://chaincss.dev/docs/configuration)
263
+
264
+ ## 🤝 Contributing
265
+
266
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md).
267
+
268
+ ## 📄 License
140
269
 
141
270
  MIT © [Rommel Caneos](https://github.com/melcanz08)
271
+
272
+ ## 🌟 Star History
273
+
274
+ [![Star History Chart](https://api.star-history.com/svg?repos=melcanz08/chaincss&type=Date)](https://star-history.com/#melcanz08/chaincss&Date)
@@ -0,0 +1,3 @@
1
+ import type { BuildOptions } from '../types.js';
2
+ export declare function buildCommand(options: BuildOptions): Promise<void>;
3
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAoFvE"}
@@ -0,0 +1,3 @@
1
+ import type { CompileOptions } from '../types.js';
2
+ export declare function compileCommand(options: CompileOptions): Promise<void>;
3
+ //# sourceMappingURL=compile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/compile.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAuF3E"}
@@ -0,0 +1,5 @@
1
+ export declare function initCommand(options: {
2
+ force?: boolean;
3
+ verbose?: boolean;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAOA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyGhG"}
@@ -0,0 +1,2 @@
1
+ export declare function timelineCommand(action: string, options: any): Promise<void>;
2
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/timeline.ts"],"names":[],"mappings":"AAIA,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAkEjE"}
@@ -0,0 +1,6 @@
1
+ import type { BuildOptions } from '../types.js';
2
+ export interface WatchOptions extends BuildOptions {
3
+ debounce?: number;
4
+ }
5
+ export declare function watchCommand(options: WatchOptions): Promise<void>;
6
+ //# sourceMappingURL=watch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/watch.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0LvE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}