zss-engine 0.2.53 → 0.2.54

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.
@@ -35,12 +35,12 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
35
35
  const normalizedValue = (0, index_js_1.applyCssValue)(value, CSSProp);
36
36
  const singlePropObj = { [property]: normalizedValue };
37
37
  const atomicHash = (0, index_js_1.genBase36Hash)(singlePropObj, 1, 7);
38
- atomicHashes.push(atomicHash);
38
+ atomicHashes.add(atomicHash);
39
39
  let styleSheet = (0, index_js_1.transpileAtomic)(property, value, atomicHash);
40
40
  if (parentAtRule) {
41
41
  styleSheet = `${parentAtRule} { ${styleSheet} }`;
42
42
  }
43
- allStyleSheets.push(styleSheet);
43
+ allStyleSheets.add(styleSheet);
44
44
  }
45
45
  });
46
46
  }
@@ -31,12 +31,12 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
31
31
  const normalizedValue = applyCssValue(value, CSSProp);
32
32
  const singlePropObj = { [property]: normalizedValue };
33
33
  const atomicHash = genBase36Hash(singlePropObj, 1, 7);
34
- atomicHashes.push(atomicHash);
34
+ atomicHashes.add(atomicHash);
35
35
  let styleSheet = transpileAtomic(property, value, atomicHash);
36
36
  if (parentAtRule) {
37
37
  styleSheet = `${parentAtRule} { ${styleSheet} }`;
38
38
  }
39
- allStyleSheets.push(styleSheet);
39
+ allStyleSheets.add(styleSheet);
40
40
  }
41
41
  });
42
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.2.53",
3
+ "version": "0.2.54",
4
4
  "description": "Zero-runtime StyleSheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",
@@ -1,4 +1,4 @@
1
1
  import type { CSSProperties, CreateStyle } from '../index.js';
2
2
  declare function splitAtomicAndNested(obj: CSSProperties, flat: CreateStyle, nonFlat: CreateStyle): void;
3
- declare function processAtomicProps(flatProps: Record<string, unknown>, atomicHashes: string[], allStyleSheets: string[], parentAtRule?: string): void;
3
+ declare function processAtomicProps(flatProps: Record<string, unknown>, atomicHashes: Set<string>, allStyleSheets: Set<string>, parentAtRule?: string): void;
4
4
  export { splitAtomicAndNested, processAtomicProps };