css-in-props 2.10.253 → 2.10.272

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/transform.js +7 -6
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "css-in-props",
3
3
  "description": "Utilize props as CSS methods",
4
4
  "author": "symbo.ls",
5
- "version": "2.10.253",
5
+ "version": "2.10.272",
6
6
  "repository": "https://github.com/symbo-ls/smbls",
7
7
  "type": "module",
8
8
  "module": "src/index.js",
@@ -13,7 +13,7 @@
13
13
  "source": "index.js",
14
14
  "publishConfig": {},
15
15
  "scripts": {
16
- "copy:package:cjs": "cp ../../.build/package-cjs.json dist/cjs/package.json",
16
+ "copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
17
17
  "build:esm": "npx esbuild ./src/*.js --target=es2020 --format=esm --outdir=dist/esm",
18
18
  "build:cjs": "npx esbuild ./src/*.js --target=node16 --format=cjs --outdir=dist/cjs",
19
19
  "build:iife": "npx esbuild ./src/index.js --target=es2020 --format=iife --outdir=dist/iife --bundle --minify",
@@ -30,5 +30,5 @@
30
30
  "@symbo.ls/emotion": "latest",
31
31
  "@symbo.ls/scratch": "latest"
32
32
  },
33
- "gitHead": "a941c4b0f1e909f33428ac7f5dedcd90d0365c6b"
33
+ "gitHead": "297618a17a7a449fb3af9aca3b1e638769f888a7"
34
34
  }
package/src/transform.js CHANGED
@@ -10,7 +10,7 @@ export const transformClassname = (props, context = {}, registry = CSS_PROPS_REG
10
10
  if (!isObject(props)) return
11
11
 
12
12
  merge(element.class, registry)
13
- if (Object.keys(registry)[0] !== Object.keys(CSS_PROPS_REGISTRY)[0]) {
13
+ if (Object.keys(registry)[0] !== Object.keys(CSS_PROPS_REGISTRY)[0]) {
14
14
  merge(element.class, CSS_PROPS_REGISTRY)
15
15
  }
16
16
 
@@ -21,12 +21,13 @@ export const transformClassname = (props, context = {}, registry = CSS_PROPS_REG
21
21
  if (setter) setter(key, props[key], CLASS_NAMES, element, true)
22
22
  else if (isFunction(hasCSS)) {
23
23
  const stack = hasCSS({ props, context })
24
- const exec = isArray(stack) ? stack.reduce((a, c) => {
25
- return merge(a, c)
26
- }, {}) : stack
24
+ const exec = isArray(stack)
25
+ ? stack.reduce((a, c) => {
26
+ return merge(a, c)
27
+ }, {})
28
+ : stack
27
29
  deepMerge(CLASS_NAMES, exec)
28
- }
29
- else if (key === 'style') {
30
+ } else if (key === 'style') {
30
31
  deepMerge(CLASS_NAMES, props[key])
31
32
  } else excludedProps[key] = props[key]
32
33
  }