@melcanz85/chaincss 1.9.4 → 1.9.5

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 (3) hide show
  1. package/README.md +14 -31
  2. package/package.json +2 -1
  3. package/strVal.js +43 -0
package/README.md CHANGED
@@ -47,13 +47,13 @@ ChainCSS is a revolutionary CSS-in-JS solution that gives you **two powerful mod
47
47
  .borderRadius('4px')
48
48
  .block('.btn');
49
49
 
50
- module.exports = { button };
50
+ module.exports = button;
51
51
  ````
52
52
  **in your main.jcss**
53
53
 
54
54
  ```javascript
55
55
  <@
56
- const button = get('./button.js');
56
+ const button = get('./button.jcss');
57
57
 
58
58
  compile(button);
59
59
  @>
@@ -71,9 +71,10 @@ OR with vanilla nodejs project
71
71
  # ./style/global.css generated!
72
72
  ````
73
73
  * Note: running `npx chaincss ./src/main.jcss ./style --watch ` for the first time will
74
- generate chaincss.config.js with default values. You can edit this to
74
+ generate ./chaincss.config.js with default values. You can edit this to
75
75
  customize your build!.
76
76
 
77
+
77
78
  ### Mode 2: Runtime (React Hooks)
78
79
 
79
80
  **Perfect for:** Dynamic styles that respond to props, state, or themes.
@@ -97,9 +98,9 @@ OR with vanilla nodejs project
97
98
 
98
99
  return <button className={styles.button}>{children}</button>;
99
100
  }
100
- //Styles injected at runtime
101
- //Automatic cleanup on unmount
102
- //Fully dynamic based on props
101
+ // Styles injected at runtime
102
+ // Automatic cleanup on unmount
103
+ // Fully dynamic based on props
103
104
 
104
105
 
105
106
  ```
@@ -145,8 +146,6 @@ OR with vanilla nodejs project
145
146
 
146
147
  Watch Mode ✅ Instant recompilation
147
148
 
148
- VM Security ✅ Safe code execution
149
-
150
149
 
151
150
  ## The ChainCSS API
152
151
 
@@ -155,7 +154,7 @@ OR with vanilla nodejs project
155
154
  ```javascript
156
155
  // jQuery-like fluent API
157
156
  const style = $()
158
- .propertyName('value') // camelCase → kebab-case
157
+ .propertyName('value')
159
158
  .anotherProperty('value')
160
159
  .block('.selector'); // End the chain with selector(s)
161
160
 
@@ -184,13 +183,13 @@ OR with vanilla nodejs project
184
183
  .fontWeight('600')
185
184
  .block('.btn');
186
185
 
187
- module.exports = { button };
186
+ module.exports = button;
188
187
  ```
189
188
  **chaincss/main.jcss**
190
189
 
191
190
  ```javascript
192
191
  <@
193
- const { button } = get('./button.jcss');
192
+ const button = get('./button.jcss');
194
193
  compile({ button });
195
194
  @>
196
195
  ````
@@ -238,6 +237,7 @@ OR with vanilla nodejs project
238
237
  **Before (standard CSS):** 4,823 chars
239
238
  **After (atomic CSS):** 499 chars → **90% smaller!**
240
239
 
240
+
241
241
  ## Quick Start Guides
242
242
 
243
243
  ### With Node.js (Vanilla)
@@ -298,9 +298,9 @@ compile({ hello });" > chaincss/main.jcss
298
298
 
299
299
  Approach Runtime Cost Bundle Size Dynamic Styles Learning Curve
300
300
 
301
- **ChainCSS (Build)** **Zero** **Just CSS** Build-time Low
301
+ ChainCSS (Build) Zero Just CSS Build-time Low
302
302
 
303
- **ChainCSS (Runtime)** Minimal Small runtime Full Low
303
+ ChainCSS (Runtime) Minimal Small runtime Full Low
304
304
 
305
305
  Styled Components 5-10KB runtime CSS + runtime Full Medium
306
306
 
@@ -310,7 +310,7 @@ compile({ hello });" > chaincss/main.jcss
310
310
 
311
311
  CSS Modules Zero Just CSS None Low
312
312
 
313
- **ChainCSS is the ONLY library that gives you BOTH worlds!**
313
+ **ChainCSS is the ONLY library that gives you DUAL options**
314
314
 
315
315
  ## API Reference
316
316
 
@@ -370,23 +370,6 @@ compile({ hello });" > chaincss/main.jcss
370
370
  au BufRead,BufNewFile `*.jcss` setfiletype javascript
371
371
  ```
372
372
 
373
- ## Roadmap
374
-
375
- * Zero-runtime compilation
376
-
377
- * React hooks
378
-
379
- * Atomic CSS optimization
380
-
381
- * Design tokens
382
-
383
- * TypeScript support
384
-
385
- * Vue/Svelte integrations (coming soon)
386
-
387
- * Plugin system (coming soon)
388
-
389
-
390
373
  ## Contributing
391
374
 
392
375
  Contributions are welcome! Whether it's:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melcanz85/chaincss",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "A simple package transpiler for js to css",
5
5
  "main": "index.js",
6
6
  "module": "index.react.js",
@@ -21,6 +21,7 @@
21
21
  "transpiler.js",
22
22
  "tokens.js",
23
23
  "react-hooks.js",
24
+ "strVal.js",
24
25
  "atomic-optimizer.js",
25
26
  "cache-manager.js",
26
27
  "prefixer.js",
package/strVal.js ADDED
@@ -0,0 +1,43 @@
1
+ const strVal = {
2
+ userConf: `// ChainCSS Configuration
3
+ module.exports = {
4
+ atomic: {
5
+ enabled: false,
6
+ threshold: 3,
7
+ naming: 'hash',
8
+ cache: true,
9
+ cachePath: './.chaincss-cache',
10
+ minify: true
11
+ },
12
+ prefixer: {
13
+ mode: 'full',
14
+ browsers: ['> 0.5%', 'last 2 versions', 'not dead'],
15
+ enabled: true,
16
+ sourceMap: false,
17
+ sourceMapInline: false
18
+ }
19
+ };
20
+ `,
21
+ cli_opt_guide: `
22
+ ChainCSS - JavaScript-powered CSS preprocessor
23
+
24
+ Usage:
25
+ chaincss <inputFile> <outputFile> [options]
26
+
27
+ Options:
28
+ --watch Watch for changes
29
+ --no-prefix Disable automatic prefixing
30
+ --prefixer-mode <mode> Set prefixer mode (auto|lightweight|full)
31
+ --browsers <list> Browser support list (comma-separated)
32
+ --no-source-map Disable source maps
33
+ --source-map-inline Use inline source maps
34
+
35
+ Examples:
36
+ chaincss style.jcss style.css
37
+ chaincss style.jcss style.css --watch
38
+ chaincss style.jcss style.css --browsers ">5%,last 2 versions"
39
+ chaincss style.jcss style.css --no-prefix
40
+ `
41
+ }
42
+
43
+ module.exports = strVal;