zss-engine 0.2.55 → 0.2.56

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.
@@ -25,10 +25,10 @@ function splitAtomicAndNested(obj, flat, nonFlat) {
25
25
  }
26
26
  });
27
27
  }
28
- function processAtomicProps(flatProps, atomicHashes, styleSheetMap, parentAtRule) {
28
+ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRule) {
29
29
  Object.entries(flatProps).forEach(([property, value]) => {
30
30
  if (property.startsWith('@media') || property.startsWith('@container')) {
31
- processAtomicProps(value, atomicHashes, styleSheetMap, property);
31
+ processAtomicProps(value, atomicHashes, allStyleSheets, property);
32
32
  }
33
33
  else {
34
34
  const CSSProp = (0, index_js_1.camelToKebabCase)(property);
@@ -40,7 +40,7 @@ function processAtomicProps(flatProps, atomicHashes, styleSheetMap, parentAtRule
40
40
  if (parentAtRule) {
41
41
  styleSheet = `${parentAtRule} { ${styleSheet} }`;
42
42
  }
43
- styleSheetMap.set(atomicHash, styleSheet);
43
+ allStyleSheets.add(styleSheet);
44
44
  }
45
45
  });
46
46
  }
@@ -21,10 +21,10 @@ function splitAtomicAndNested(obj, flat, nonFlat) {
21
21
  }
22
22
  });
23
23
  }
24
- function processAtomicProps(flatProps, atomicHashes, styleSheetMap, parentAtRule) {
24
+ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRule) {
25
25
  Object.entries(flatProps).forEach(([property, value]) => {
26
26
  if (property.startsWith('@media') || property.startsWith('@container')) {
27
- processAtomicProps(value, atomicHashes, styleSheetMap, property);
27
+ processAtomicProps(value, atomicHashes, allStyleSheets, property);
28
28
  }
29
29
  else {
30
30
  const CSSProp = camelToKebabCase(property);
@@ -36,7 +36,7 @@ function processAtomicProps(flatProps, atomicHashes, styleSheetMap, parentAtRule
36
36
  if (parentAtRule) {
37
37
  styleSheet = `${parentAtRule} { ${styleSheet} }`;
38
38
  }
39
- styleSheetMap.set(atomicHash, 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.55",
3
+ "version": "0.2.56",
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: Set<string>, styleSheetMap: Map<string, 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 };