zss-engine 0.2.62 → 0.2.64

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.
@@ -6,7 +6,37 @@ const isDocumentDefined = typeof document !== 'undefined';
6
6
  exports.isServer = !isWindowDefined || !isDocumentDefined;
7
7
  exports.isDevelopment = process.env.NODE_ENV === 'development';
8
8
  exports.isTestingDevelopment = process.env.NODE_ENV === 'test' || exports.isDevelopment;
9
- const exception = ['line-height', 'font-weight', 'opacity', 'scale', 'z-index', 'column-count', 'order', 'orphans', 'widows'];
9
+ const exception = [
10
+ 'animation-iteration-count',
11
+ 'column-count',
12
+ 'columns',
13
+ 'fill-opacity',
14
+ 'flex',
15
+ 'flex-grow',
16
+ 'flex-shrink',
17
+ 'flood-opacity',
18
+ 'font-size-adjust',
19
+ 'font-weight',
20
+ 'grid-column',
21
+ 'grid-column-end',
22
+ 'grid-column-start',
23
+ 'grid-row',
24
+ 'grid-row-end',
25
+ 'grid-row-start',
26
+ 'initial-letter',
27
+ 'line-height',
28
+ 'opacity',
29
+ 'order',
30
+ 'orphans',
31
+ 'scale',
32
+ 'shape-image-threshold',
33
+ 'stop-opacity',
34
+ 'stroke-opacity',
35
+ 'tab-size',
36
+ 'widows',
37
+ 'z-index',
38
+ 'zoom',
39
+ ];
10
40
  const applyCssValue = (value, cssProp) => {
11
41
  if (typeof value === 'number') {
12
42
  return exception.includes(cssProp) ? value.toString() : value + 'px';
@@ -34,8 +34,8 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
34
34
  const CSSProp = (0, index_js_1.camelToKebabCase)(property);
35
35
  const normalizedValue = (0, index_js_1.applyCssValue)(value, CSSProp);
36
36
  const singlePropObj = { [property]: normalizedValue };
37
- const hashInput = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
38
- const atomicHash = (0, index_js_1.genBase36Hash)(hashInput, 1, 8);
37
+ const styleObj = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
38
+ const atomicHash = (0, index_js_1.genBase36Hash)(styleObj, 1, 8);
39
39
  if (atomicHashes.has(atomicHash))
40
40
  return;
41
41
  atomicHashes.add(atomicHash);
@@ -3,7 +3,37 @@ const isDocumentDefined = typeof document !== 'undefined';
3
3
  export const isServer = !isWindowDefined || !isDocumentDefined;
4
4
  export const isDevelopment = process.env.NODE_ENV === 'development';
5
5
  export const isTestingDevelopment = process.env.NODE_ENV === 'test' || isDevelopment;
6
- const exception = ['line-height', 'font-weight', 'opacity', 'scale', 'z-index', 'column-count', 'order', 'orphans', 'widows'];
6
+ const exception = [
7
+ 'animation-iteration-count',
8
+ 'column-count',
9
+ 'columns',
10
+ 'fill-opacity',
11
+ 'flex',
12
+ 'flex-grow',
13
+ 'flex-shrink',
14
+ 'flood-opacity',
15
+ 'font-size-adjust',
16
+ 'font-weight',
17
+ 'grid-column',
18
+ 'grid-column-end',
19
+ 'grid-column-start',
20
+ 'grid-row',
21
+ 'grid-row-end',
22
+ 'grid-row-start',
23
+ 'initial-letter',
24
+ 'line-height',
25
+ 'opacity',
26
+ 'order',
27
+ 'orphans',
28
+ 'scale',
29
+ 'shape-image-threshold',
30
+ 'stop-opacity',
31
+ 'stroke-opacity',
32
+ 'tab-size',
33
+ 'widows',
34
+ 'z-index',
35
+ 'zoom',
36
+ ];
7
37
  export const applyCssValue = (value, cssProp) => {
8
38
  if (typeof value === 'number') {
9
39
  return exception.includes(cssProp) ? value.toString() : value + 'px';
@@ -30,8 +30,8 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
30
30
  const CSSProp = camelToKebabCase(property);
31
31
  const normalizedValue = applyCssValue(value, CSSProp);
32
32
  const singlePropObj = { [property]: normalizedValue };
33
- const hashInput = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
34
- const atomicHash = genBase36Hash(hashInput, 1, 8);
33
+ const styleObj = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
34
+ const atomicHash = genBase36Hash(styleObj, 1, 8);
35
35
  if (atomicHashes.has(atomicHash))
36
36
  return;
37
37
  atomicHashes.add(atomicHash);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.2.62",
3
+ "version": "0.2.64",
4
4
  "description": "Zero-runtime StyleSheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",