@css-hooks/core 1.5.2 → 1.5.3
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/cjs/index.js +3 -5
- package/esm/index.js +3 -5
- package/package.json +7 -8
package/cjs/index.js
CHANGED
|
@@ -186,17 +186,15 @@ function buildHooksSystem(stringify = genericStringify) {
|
|
|
186
186
|
}
|
|
187
187
|
return v;
|
|
188
188
|
});
|
|
189
|
-
for (const
|
|
189
|
+
for (const propertyNameStr in innerProperties) {
|
|
190
|
+
const propertyName = propertyNameStr;
|
|
190
191
|
const v1 = stringifyImpl(propertyName, innerProperties[propertyName]);
|
|
191
192
|
if (v1 !== null) {
|
|
192
193
|
let v0 = fallback(propertyName);
|
|
193
194
|
if (v0 === null) {
|
|
194
195
|
v0 = fallbackKeyword;
|
|
195
196
|
}
|
|
196
|
-
|
|
197
|
-
properties[propertyName] =
|
|
198
|
-
`var(--${hookId(hookName)}-1, ${v1}) var(--${hookId(hookName)}-0, ${v0})`;
|
|
199
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-explicit-any */
|
|
197
|
+
properties[propertyName] = `var(--${hookId(hookName)}-1, ${v1}) var(--${hookId(hookName)}-0, ${v0})`;
|
|
200
198
|
}
|
|
201
199
|
}
|
|
202
200
|
delete properties[hookName];
|
package/esm/index.js
CHANGED
|
@@ -182,17 +182,15 @@ export function buildHooksSystem(stringify = genericStringify) {
|
|
|
182
182
|
}
|
|
183
183
|
return v;
|
|
184
184
|
});
|
|
185
|
-
for (const
|
|
185
|
+
for (const propertyNameStr in innerProperties) {
|
|
186
|
+
const propertyName = propertyNameStr;
|
|
186
187
|
const v1 = stringifyImpl(propertyName, innerProperties[propertyName]);
|
|
187
188
|
if (v1 !== null) {
|
|
188
189
|
let v0 = fallback(propertyName);
|
|
189
190
|
if (v0 === null) {
|
|
190
191
|
v0 = fallbackKeyword;
|
|
191
192
|
}
|
|
192
|
-
|
|
193
|
-
properties[propertyName] =
|
|
194
|
-
`var(--${hookId(hookName)}-1, ${v1}) var(--${hookId(hookName)}-0, ${v0})`;
|
|
195
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-explicit-any */
|
|
193
|
+
properties[propertyName] = `var(--${hookId(hookName)}-1, ${v1}) var(--${hookId(hookName)}-0, ${v0})`;
|
|
196
194
|
}
|
|
197
195
|
}
|
|
198
196
|
delete properties[hookName];
|
package/package.json
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@css-hooks/core",
|
|
3
3
|
"description": "CSS Hooks core library",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.3",
|
|
5
5
|
"author": "Nick Saunders",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@tsconfig/strictest": "^2.0.1",
|
|
8
8
|
"@types/css-tree": "^2.3.2",
|
|
9
|
-
"@types/jest": "^29.5.3",
|
|
10
9
|
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
11
10
|
"@typescript-eslint/parser": "^6.3.0",
|
|
12
11
|
"css-tree": "^2.3.1",
|
|
13
12
|
"eslint": "^8.47.0",
|
|
14
|
-
"jest": "^29.6.2",
|
|
15
13
|
"rimraf": "^5.0.1",
|
|
16
|
-
"
|
|
14
|
+
"tsc-watch": "^6.0.4",
|
|
17
15
|
"typescript": "^5.1.6"
|
|
18
16
|
},
|
|
19
17
|
"files": [
|
|
@@ -24,6 +22,7 @@
|
|
|
24
22
|
"license": "MIT",
|
|
25
23
|
"main": "cjs",
|
|
26
24
|
"module": "esm",
|
|
25
|
+
"type": "module",
|
|
27
26
|
"private": false,
|
|
28
27
|
"repository": {
|
|
29
28
|
"type": "git",
|
|
@@ -31,11 +30,11 @@
|
|
|
31
30
|
"directory": "packages/core"
|
|
32
31
|
},
|
|
33
32
|
"scripts": {
|
|
34
|
-
"clean": "rimraf cjs esm types",
|
|
35
|
-
"
|
|
36
|
-
"lint": "eslint __tests__ src .*.*js *.*js",
|
|
33
|
+
"clean": "rimraf cjs esm out types",
|
|
34
|
+
"lint": "eslint src .*.*js *.*js",
|
|
37
35
|
"prepublishOnly": "tsc -p tsconfig.dist.json --outDir esm --module es6 && tsc -p tsconfig.dist.json --outDir cjs --module commonjs && tsc -p tsconfig.dist.json --outDir types --declaration --emitDeclarationOnly",
|
|
38
|
-
"test": "
|
|
36
|
+
"test": "tsc && node --test",
|
|
37
|
+
"test.watch": "tsc-watch --onSuccess 'node --test'"
|
|
39
38
|
},
|
|
40
39
|
"types": "types",
|
|
41
40
|
"exports": {
|