@plumeria/webpack-plugin 0.21.4 → 0.22.0

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/dist/create.js +6 -3
  2. package/package.json +2 -2
package/dist/create.js CHANGED
@@ -15,7 +15,9 @@ function compileToSingleCSS(object) {
15
15
  Object.entries(flat).forEach(([prop, value]) => {
16
16
  const hashes = new Set();
17
17
  const sheets = new Set();
18
- (0, zss_engine_1.processAtomicProps)({ [prop]: value }, hashes, sheets);
18
+ const seen = new Set();
19
+ const resultQueue = [];
20
+ (0, zss_engine_1.processAtomicProps)({ [prop]: value }, hashes, sheets, seen, resultQueue);
19
21
  const propBaseSheets = [];
20
22
  const propQuerySheets = [];
21
23
  for (const sheet of sheets) {
@@ -86,16 +88,17 @@ exports.createVars = createVars;
86
88
  const createTokens = (object) => {
87
89
  const styles = {};
88
90
  Object.entries(object).forEach(([key, value]) => {
91
+ const kebabKey = (0, zss_engine_1.camelToKebabCase)(key);
89
92
  Object.entries(value).forEach(([subKey, subValue]) => {
90
93
  if (subKey.startsWith('@media')) {
91
94
  styles[':root'] ||= {};
92
95
  styles[':root'][subKey] ||= {};
93
- styles[':root'][subKey][`--${key}`] = subValue;
96
+ styles[':root'][subKey][`--${kebabKey}`] = subValue;
94
97
  }
95
98
  else {
96
99
  const themeSelector = subKey === 'default' ? ':root' : `:root[data-theme="${subKey}"]`;
97
100
  styles[themeSelector] ||= {};
98
- styles[themeSelector][`--${key}`] = subValue;
101
+ styles[themeSelector][`--${kebabKey}`] = subValue;
99
102
  }
100
103
  });
101
104
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/webpack-plugin",
3
- "version": "0.21.4",
3
+ "version": "0.22.0",
4
4
  "description": "Plumeria Webpack plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "@rust-gear/glob": "^0.2.2",
25
25
  "@types/babel__core": "^7.20.5",
26
26
  "webpack": "^5.101.0",
27
- "zss-engine": "^0.2.90"
27
+ "zss-engine": "^0.2.91"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"