zss-engine 0.2.60 → 0.2.62

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.
@@ -34,7 +34,10 @@ 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 atomicHash = (0, index_js_1.genBase36Hash)(singlePropObj, 1, 8);
37
+ const hashInput = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
38
+ const atomicHash = (0, index_js_1.genBase36Hash)(hashInput, 1, 8);
39
+ if (atomicHashes.has(atomicHash))
40
+ return;
38
41
  atomicHashes.add(atomicHash);
39
42
  let styleSheet = (0, index_js_1.transpileAtomic)(property, value, atomicHash);
40
43
  if (parentAtRule) {
@@ -30,7 +30,10 @@ 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 atomicHash = genBase36Hash(singlePropObj, 1, 8);
33
+ const hashInput = parentAtRule ? { [parentAtRule]: singlePropObj } : singlePropObj;
34
+ const atomicHash = genBase36Hash(hashInput, 1, 8);
35
+ if (atomicHashes.has(atomicHash))
36
+ return;
34
37
  atomicHashes.add(atomicHash);
35
38
  let styleSheet = transpileAtomic(property, value, atomicHash);
36
39
  if (parentAtRule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "description": "Zero-runtime StyleSheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",