@plumeria/utils 18.2.5 → 18.2.7

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.
package/dist/create.js CHANGED
@@ -70,7 +70,10 @@ function getStyleRecords(styleRule) {
70
70
  hashSource = { [selector]: hashSource };
71
71
  }
72
72
  const hash = (0, zss_engine_1.genBase36Hash)(hashSource, 1, 8);
73
- const notSuffix = prop.startsWith('--') ? '' : notNormalize;
73
+ const conditionDepth = 1 + (atRule ? 1 : 0);
74
+ const notSuffix = prop.startsWith('--')
75
+ ? ''
76
+ : notNormalize.repeat(conditionDepth);
74
77
  let sheet = (0, zss_engine_1.transpileAtomic)(prop, value, hash, selector);
75
78
  sheet = sheet.replace(`.${hash}`, `.${hash}${notSuffix}`);
76
79
  if (atRule) {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mergeRules = void 0;
4
+ const zss_engine_1 = require("zss-engine");
4
5
  function mergeContainer(container) {
5
6
  if (!container.nodes)
6
7
  return;
@@ -33,6 +34,11 @@ function mergeContainer(container) {
33
34
  for (const node of [...rules.values(), ...atRules.values()]) {
34
35
  mergeContainer(node);
35
36
  }
37
+ for (const node of [...container.nodes]) {
38
+ if (node.type === 'atrule' && (0, zss_engine_1.isAtRule)(`@${node.name}`)) {
39
+ container.append(node);
40
+ }
41
+ }
36
42
  }
37
43
  const mergeRules = () => ({
38
44
  postcssPlugin: 'plumeria-merge-rules',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/utils",
3
- "version": "18.2.5",
3
+ "version": "18.2.7",
4
4
  "description": "Plumeria Utils",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "@swc/core": "1.15.47",
26
26
  "lightningcss": "^1.32.0",
27
27
  "postcss": "8.5.25",
28
- "zss-engine": "2.4.1"
28
+ "zss-engine": "2.4.2"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public",