aliascss 1.4.3 → 1.4.4

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.
@@ -1,5 +1,6 @@
1
1
  import { compiler as statementMaker } from './returnStatement.js';
2
2
  import config from './config.js';
3
+ import { splitByCommaOutsideParens } from './utils/helper.js';
3
4
  // import mapRawAttributeNames from './utils/browser-helper.js';
4
5
  export default statementMaker;
5
6
  export let classPrinter = {
@@ -93,7 +94,8 @@ export let classPrinter = {
93
94
  split.forEach((each) => {
94
95
  try {
95
96
  const [at, pNv] = each.replace(/\]\[/, ']-[').replace("-", "=").split("=");
96
- const result = returnPnV(pNv.replace(/^\[|\]$/g, '').split(','));
97
+ // const result=returnPnV(pNv.replace(/^\[|\]$/g,'').split(','));
98
+ const result = returnPnV(splitByCommaOutsideParens(pNv.replace(/^\[|\]$/g, '')));
97
99
  kfStatement += ` ${at.replace('@', '').replace(/:/g, ',').replace(/,/g, "%,").replace(/[\[|\]]/g, '')}% {${result ? result : ''}}`;
98
100
  }
99
101
  catch (error) {
@@ -9,6 +9,7 @@ import postcssDiscardDuplicates from 'postcss-discard-duplicates';
9
9
  import cssnano from 'cssnano';
10
10
  import chokidar from 'chokidar';
11
11
  import sortMediaQueries from 'postcss-sort-media-queries';
12
+ import { splitByCommaOutsideParens } from '../utils/helper.js';
12
13
  const init = {
13
14
  classList: [], // hold className for MasterCSS to avoid repeating
14
15
  groups: [],
@@ -133,7 +134,8 @@ export function keyframesStatement(name, timeLine, statementMaker) {
133
134
  split.forEach((each) => {
134
135
  try {
135
136
  const [at, pNv] = each.replace(/\]\[/, ']-[').replace("-", "=").split("=");
136
- kfStatement += ` ${at.replace('@', '').replace(/:/g, ',').replace(/,/g, "%,").replace(/[\[|\]]/g, '')}% {${returnPnV(pNv.replace(/^\[|\]$/g, '').split(','))}}`;
137
+ // kfStatement+=` ${at.replace('@','').replace(/:/g,',').replace(/,/g,"%,").replace(/[\[|\]]/g,'')}% {${returnPnV(pNv.replace(/^\[|\]$/g,'').split(','))}}`
138
+ kfStatement += ` ${at.replace('@', '').replace(/:/g, ',').replace(/,/g, "%,").replace(/[\[|\]]/g, '')}% {${returnPnV(splitByCommaOutsideParens(pNv.replace(/^\[|\]$/g, '')))}}`;
137
139
  }
138
140
  catch (error) {
139
141
  console.error('Not a valid entry for AliasCSS keyframes processor : ' + each, error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliascss",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "AliasCSS is a CSS post processor.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",