@css-hooks/core 2.0.2 → 2.0.4

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
@@ -92,6 +92,20 @@ experience without runtime style injection or build steps.
92
92
  </>
93
93
  ```
94
94
 
95
+ ## Compatibility
96
+
97
+ ### Framework integrations
98
+
99
+ | <img src="https://github.com/reactjs.png" alt="React" style="width: 24px; height: 24px" /><br/>React | <img src="https://github.com/preactjs.png" alt="Preact" style="width: 24px; height: 24px" /><br/>Preact | <img src="https://github.com/solidjs.png" alt="Solid" style="width: 24px; height: 24px" /><br/>Solid | <img src="https://github.com/qwikdev.png" alt="Qwik" style="width: 24px; height: 24px" /><br/>Qwik |
100
+ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
101
+ | <div align="center"><a href="https://www.npmjs.com/package/@css-hooks/react">✅</a></div> | <div align="center"><a href="https://www.npmjs.com/package/@css-hooks/preact">✅</a></div> | <div align="center"><a href="https://www.npmjs.com/package/@css-hooks/solid">✅</a></div> | <div align="center"><a href="https://www.npmjs.com/package/@css-hooks/qwik">✅</a></div> |
102
+
103
+ ### Browser support
104
+
105
+ | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome_24x24.png" alt="Chrome" /><br/>Chrome | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge_24x24.png" alt="Edge" /><br/>Edge | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/safari/safari_24x24.png" alt="Safari" /><br/>Safari | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox_24x24.png" alt="Firefox" /><br/>Firefox | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/opera/opera_24x24.png" alt="Opera" /><br/>Opera |
106
+ | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
107
+ | <div align="center">49+</div> | <div align="center">16+</div> | <div align="center">10+</div> | <div align="center">31+</div> | <div align="center">36+</div> |
108
+
95
109
  ## Documentation
96
110
 
97
111
  Please visit [css-hooks.com](https://css-hooks.com) to get started.
package/cjs/index.js CHANGED
@@ -228,7 +228,6 @@ function buildHooksSystem(stringify = genericStringify) {
228
228
  } else {
229
229
  baseStyles.push(rule);
230
230
  }
231
- delete rule.on;
232
231
  return [baseStyles, conditionalStyles];
233
232
  },
234
233
  [[], []],
@@ -293,6 +292,9 @@ function buildHooksSystem(stringify = genericStringify) {
293
292
  continue;
294
293
  }
295
294
  for (const [property, value] of Object.entries(rule)) {
295
+ if (property === "on") {
296
+ continue;
297
+ }
296
298
  if (sortProperties) {
297
299
  delete style[property];
298
300
  }
package/esm/index.js CHANGED
@@ -227,7 +227,6 @@ export function buildHooksSystem(stringify = genericStringify) {
227
227
  } else {
228
228
  baseStyles.push(rule);
229
229
  }
230
- delete rule.on;
231
230
  return [baseStyles, conditionalStyles];
232
231
  },
233
232
  [[], []],
@@ -292,6 +291,9 @@ export function buildHooksSystem(stringify = genericStringify) {
292
291
  continue;
293
292
  }
294
293
  for (const [property, value] of Object.entries(rule)) {
294
+ if (property === "on") {
295
+ continue;
296
+ }
295
297
  if (sortProperties) {
296
298
  delete style[property];
297
299
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@css-hooks/core",
3
3
  "description": "CSS Hooks core library",
4
- "version": "2.0.2",
4
+ "version": "2.0.4",
5
5
  "author": "Nick Saunders",
6
6
  "devDependencies": {
7
7
  "@microsoft/api-extractor": "^7.39.4",
@@ -36,14 +36,6 @@
36
36
  "url": "https://github.com/css-hooks/css-hooks.git",
37
37
  "directory": "packages/core"
38
38
  },
39
- "scripts": {
40
- "api": "node -e \"var path=require('path').resolve,fs=require('fs'),cp=fs.cpSync;cp(path('src', 'index.d.ts'),path('types','index.d.ts'))\" && api-extractor run",
41
- "clean": "rimraf cjs esm out types",
42
- "lint": "eslint src .*.*js *.*js",
43
- "prepublishOnly": "node -e \"var path=require('path').resolve,fs=require('fs'),cp=fs.cpSync,mkdir=fs.mkdirSync;cp(path('src', 'index.d.ts'),path('types','index.d.ts'));cp(path('src','index.js'),path('esm','index.js'));mkdir(path('cjs'),{recursive:true})\" && ascjs src/index.js cjs/index.js",
44
- "test": "tsc && node --test",
45
- "test.watch": "tsc-watch --onSuccess 'node --test'"
46
- },
47
39
  "types": "types",
48
40
  "exports": {
49
41
  ".": {
@@ -54,5 +46,12 @@
54
46
  },
55
47
  "browserslist": [
56
48
  "supports css-variables and supports object-entries"
57
- ]
58
- }
49
+ ],
50
+ "scripts": {
51
+ "api": "node -e \"var path=require('path').resolve,fs=require('fs'),cp=fs.cpSync;cp(path('src', 'index.d.ts'),path('types','index.d.ts'))\" && api-extractor run",
52
+ "clean": "rimraf cjs esm out types",
53
+ "lint": "eslint src .*.*js *.*js",
54
+ "test": "tsc && node --test",
55
+ "test.watch": "tsc-watch --onSuccess 'node --test'"
56
+ }
57
+ }